

#include "BUILTIN.h"
extern OBJ _AOption_2(OBJ);OBJ __AOption_2; /* avail */
extern OBJ _AOption_3(OBJ);OBJ __AOption_3; /* avail? */
extern OBJ _AOption_4(OBJ);OBJ __AOption_4; /* cont */
OBJ __AOption_5; /* nil */
extern OBJ _AOption_6(OBJ);OBJ __AOption_6; /* nil? */
extern OBJ _AOption_9(OBJ,OBJ);OBJ __AOption_9; /* cont,1 */
extern OBJ _AOption_10(OBJ,OBJ,OBJ);OBJ __AOption_10; /* < */
extern OBJ _AOption_11(OBJ,OBJ,OBJ);OBJ __AOption_11; /* = */

extern OBJ _AOption_2(OBJ x1) /* avail */
{OBJ r;
 PRD1(1,r);FLD1(r,1)=x1;
 return r;}

extern OBJ _AOption_3(OBJ x1) /* avail? */
{OBJ r;
 if(ISPRM(x1)){
  r=__ABUILTIN_3;
 }else{
  if(EXPRD(x1,1)){
   FREE(FLD1(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _AOption_4(OBJ x1) /* cont */
{OBJ r;
 if(ISPRM(x1)){
  HLT("Option at <unknown> : undefined selection cont\'Option:option->data");
 }else{
  {OBJ x2=FLD1(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}}
 return r;}

extern OBJ _AOption_6(OBJ x1) /* nil? */
{OBJ r;
 if(ISPRM(x1)){
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x1,1)){
   FREE(FLD1(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AOption_9(OBJ x1,OBJ x2) /* cont,1 */
{OBJ r;
 if(ISPRM(x2)){
  r=x1;
 }else{
  {OBJ x8=FLD1(x2,1);
   if(EXPRD(x2,1)){
    r=x8;
    DSPRDF(x2);
   }else{
    COPY(x8,1);
    r=x8;
    FRPRD(x2,1);}
   FREE(x1,1);}}
 return r;}

extern OBJ _AOption_10(OBJ x1,OBJ x2,OBJ x3) /* < */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  if(ISPRM(x3)){
   r=__ABUILTIN_3;
  }else{
   if(EXPRD(x3,1)){
    FREE(FLD1(x3,1),1);DSPRDF(x3);
   }else{
    DCPRD(x3,1);}
   r=__ABUILTIN_5;}
 }else{
  {OBJ x25=FLD1(x2,1);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x25,1);
    FRPRD(x2,1);}
   if(ISPRM(x3)){
    FRCLS(x1,1);
    FREE(x25,1);
    r=__ABUILTIN_3;
   }else{
    {OBJ x26=FLD1(x3,1);
     if(EXPRD(x3,1)){
      DSPRDF(x3);
     }else{
      COPY(x26,1);
      FRPRD(x3,1);}
     r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x25,x26);}}}}
 return r;}

extern OBJ _AOption_11(OBJ x1,OBJ x2,OBJ x3) /* = */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  if(ISPRM(x3)){
   r=__ABUILTIN_5;
  }else{
   if(EXPRD(x3,1)){
    FREE(FLD1(x3,1),1);DSPRDF(x3);
   }else{
    DCPRD(x3,1);}
   r=__ABUILTIN_3;}
 }else{
  {OBJ x25=FLD1(x2,1);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x25,1);
    FRPRD(x2,1);}
   if(ISPRM(x3)){
    FRCLS(x1,1);
    FREE(x25,1);
    r=__ABUILTIN_3;
   }else{
    {OBJ x26=FLD1(x3,1);
     if(EXPRD(x3,1)){
      DSPRDF(x3);
     }else{
      COPY(x26,1);
      FRPRD(x3,1);}
     r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x25,x26);}}}}
 return r;}


static OBJ _mt_1_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ))ENTRY(t))(t1);
 return r;}
static OBJ _mt_1_0_1_l(OBJ t,OBJ t1) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ))ENTRY(t))(t1);
 COPY(r,1);LZYCLS(t,r);
 return r;}

static OBJ _mt_2_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,1);
 FLDCLS(r,1)=t1;
 return r;}

static OBJ _mt_2_0_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ))ENTRY(t))(t1,t2);
 return r;}

static OBJ _mt_2_1_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),t1);
 return r;}
static OBJ _mt_2_1_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

static OBJ _mt_3_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,1);
 FLDCLS(r,1)=t1;
 return r;}

static OBJ _mt_3_0_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(t1,t2,t3);
 return r;}

static OBJ _mt_3_1_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),t1,t2);
 return r;}

init_AOption()
{
 static int visited=0; if(visited) return; visited=1;
 CLS(3,_AOption_11,__AOption_11);
 CLS(3,_AOption_10,__AOption_10);
 CLS(2,_AOption_9,__AOption_9);
 CLS(1,_AOption_6,__AOption_6);
 CLS(1,_AOption_4,__AOption_4);
 CLS(1,_AOption_3,__AOption_3);
 CLS(1,_AOption_2,__AOption_2);
 MTH(1,0,1,_mt_1_0_1);LZYMTH(1,0,1,_mt_1_0_1_l);
 MTH(2,0,1,_mt_2_0_1);LZYMTH(2,0,1,_mt_2_0_1);
 MTH(2,0,2,_mt_2_0_2);LZYMTH(2,0,2,_mt_2_0_2);
 MTH(2,1,1,_mt_2_1_1);LZYMTH(2,1,1,_mt_2_1_1_l);
 MTH(3,0,1,_mt_3_0_1);LZYMTH(3,0,1,_mt_3_0_1);
 MTH(3,0,3,_mt_3_0_3);LZYMTH(3,0,3,_mt_3_0_3);
 MTH(3,1,2,_mt_3_1_2);LZYMTH(3,1,2,_mt_3_1_2);
 PRM1(__AOption_5);}

