

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _AFormat_5(OBJ,OBJ);extern OBJ __AFormat_5;
extern OBJ __ASeq_6;
extern OBJ _ASeq_14(OBJ,OBJ);extern OBJ __ASeq_14;
extern OBJ _ASeq_15(OBJ,OBJ,OBJ);extern OBJ __ASeq_15;
extern OBJ _AFmt_28(OBJ);extern OBJ __AFmt_28;

#include "Char.h"

#include "Int.h"

#include "NatConv.h"

#include "Real.h"
extern OBJ _AIde_2(OBJ);OBJ __AIde_2; /* origin */
extern OBJ _AIde_3(OBJ);OBJ __AIde_3; /* origin? */
extern OBJ _AIde_4(OBJ);OBJ __AIde_4; /* # */
extern OBJ _AIde_6(OBJ);OBJ __AIde_6; /* local */
extern OBJ _AIde_7(OBJ);OBJ __AIde_7; /* local? */
extern OBJ _AIde_8(OBJ);OBJ __AIde_8; /* #,1 */
extern OBJ _AIde_9(OBJ,OBJ);OBJ __AIde_9; /* global */
extern OBJ _AIde_10(OBJ);OBJ __AIde_10; /* global? */
extern OBJ _AIde_11(OBJ);OBJ __AIde_11; /* origin,1 */
extern OBJ _AIde_13(OBJ,OBJ);OBJ __AIde_13; /* = */
extern OBJ _AIde_14(OBJ,OBJ);OBJ __AIde_14; /* < */
extern OBJ _AIde_15(OBJ,OBJ);OBJ __AIde_15; /* =,1 */
extern OBJ _AIde_16(OBJ,OBJ);OBJ __AIde_16; /* <,1 */
OBJ __AIde_17; /* target */
extern OBJ _AIde_18(OBJ);OBJ __AIde_18; /* format */
extern OBJ _AIde_19(OBJ);OBJ __AIde_19; /* format,1 */
OBJ __AIde_20; /* format,1'20 */
extern OBJ _AIde_21(OBJ);OBJ __AIde_21; /* format,1'21 */
OBJ __AIde_22; /* format'22 */
extern OBJ _AIde_23(OBJ);OBJ __AIde_23; /* format'23 */

extern OBJ _AIde_2(OBJ x1) /* origin */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _AIde_3(OBJ x1) /* origin? */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _AIde_4(OBJ x1) /* # */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _AIde_6(OBJ x1) /* local */
{OBJ r;
 PRDF(1,1,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AIde_7(OBJ x1) /* local? */
{OBJ r;
 if(ISTGPRD(x1,1)){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AIde_8(OBJ x1) /* #,1 */
{OBJ r;
 {OBJ x2=FLD(x1,1);
  if(EXPRD(x1,1)){
   r=x2;
   DSPRD(x1);
  }else{
   r=x2;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _AIde_9(OBJ x1,OBJ x2) /* global */
{OBJ r;
 PRDF(2,0,r);FLD(r,1)=x1;FLD(r,2)=x2;
 return r;}

extern OBJ _AIde_10(OBJ x1) /* global? */
{OBJ r;
 if(ISTGPRD(x1,0)){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AIde_11(OBJ x1) /* origin,1 */
{OBJ r;
 if(ISTGPRD(x1,0)){
  {OBJ x3=FLD(x1,2);
   if(EXPRD(x1,1)){
    r=x3;
    DSPRDF(x1);
   }else{
    r=x3;
    FRPRD(x1,1);}}
 }else{
  HLT("Ide at <unknown> : undefined selection origin\'Ide:ide->origin");}
 return r;}

extern OBJ _AIde_13(OBJ x1,OBJ x2) /* = */
{OBJ r;
 if(ISTGPRD(x1,1)){
  {OBJ x30=FLD(x1,1);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   if(ISTGPRD(x2,1)){
    {OBJ x39=FLD(x2,1);
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      FRPRD(x2,1);}
     ANat_76(x30,x39,r);}
   }else{
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     DCPRD(x2,1);}
    r=__ABUILTIN_3;}}
 }else{
  {OBJ x42=FLD(x1,1);OBJ x43=FLD(x1,2);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   if(ISTGPRD(x2,1)){
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     DCPRD(x2,1);}
    r=__ABUILTIN_3;
   }else{
    {OBJ x59=FLD(x2,1);OBJ x60=FLD(x2,2);
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      FRPRD(x2,1);}
     {OBJ x61;
      ANat_76(x43,x60,x61);
      if(ISTGPRM(x61,1)){
       ANat_76(x42,x59,r);
      }else{
       r=__ABUILTIN_3;}}}}}}
 return r;}

extern OBJ _AIde_14(OBJ x1,OBJ x2) /* < */
{OBJ r;
 if(ISTGPRD(x1,1)){
  {OBJ x31=FLD(x1,1);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   if(ISTGPRD(x2,1)){
    {OBJ x40=FLD(x2,1);
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      FRPRD(x2,1);}
     ANat_80(x31,x40,r);}
   }else{
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     DCPRD(x2,1);}
    r=__ABUILTIN_5;}}
 }else{
  {OBJ x43=FLD(x1,1);OBJ x44=FLD(x1,2);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   if(ISTGPRD(x2,1)){
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     DCPRD(x2,1);}
    r=__ABUILTIN_3;
   }else{
    {OBJ x61=FLD(x2,1);OBJ x62=FLD(x2,2);
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      FRPRD(x2,1);}
     {OBJ x63;
      ANat_80(x44,x62,x63);
      if(ISTGPRM(x63,1)){
       r=__ABUILTIN_5;
      }else{
       {OBJ x64;
	ANat_76(x44,x62,x64);
	if(ISTGPRM(x64,1)){
	 ANat_80(x43,x61,r);
	}else{
	 r=__ABUILTIN_3;}}}}}}}}
 return r;}

extern OBJ _AIde_15(OBJ x1,OBJ x2) /* =,1 */
{OBJ r;
 ANat_76(x1,x2,r);
 return r;}

extern OBJ _AIde_16(OBJ x1,OBJ x2) /* <,1 */
{OBJ r;
 ANat_80(x1,x2,r);
 return r;}

extern OBJ _AIde_18(OBJ x1) /* format */
{OBJ r;
 if(ISTGPRD(x1,0)){
  {OBJ x29=FLD(x1,1);OBJ x30=FLD(x1,2);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   CPCLS(__AIde_23,1);
   {OBJ x31;OBJ x32;OBJ x33;OBJ x34;
    x31=(*(OBJ(*)(OBJ,OBJ))METHOD(__AIde_23,1))(__AIde_23,__ABUILTIN_20);
    ANatConv_1(x29,x32);
    ANat_76(x30,__AIde_17,x33);
    x34=_AFmt_28(x32);
    if(ISTGPRM(x33,1)){
     {OBJ x35;
      x35=_ASeq_14(x31,x34);
      r=_AFormat_5(__ANat_5,x35);}
    }else{
     {OBJ x36;OBJ x37;
      x36=_AIde_19(x30);
      x37=_ASeq_15(x31,x34,x36);
      r=_AFormat_5(__ANat_5,x37);}}}}
 }else{
  {OBJ x38=FLD(x1,1);
   if(EXPRD(x1,1)){
    DSPRDF(x1);
   }else{
    FRPRD(x1,1);}
   {OBJ x39;OBJ x40;OBJ x41;
    ANatConv_1(x38,x39);
    x40=_AFmt_28(x39);
    PRD1(2,x41);FLD1(x41,1)=x40;FLD1(x41,2)=__ASeq_6;
    r=_AFormat_5(__ANat_5,x41);}}}
 return r;}

extern OBJ _AIde_19(OBJ x1) /* format,1 */
{OBJ r;
 CPCLS(__AIde_21,1);
 {OBJ x2;OBJ x3;OBJ x4;OBJ x5;
  x2=(*(OBJ(*)(OBJ,OBJ))METHOD(__AIde_21,1))(__AIde_21,__ABUILTIN_20);
  ANatConv_1(x1,x3);
  x4=_AFmt_28(x3);
  x5=_ASeq_14(x2,x4);
  r=_AFormat_5(__ANat_5,x5);}
 return r;}

extern OBJ _AIde_21(OBJ x1) /* format,1'21 */
{OBJ r;
 CPPRD(__AIde_20,1);
 r=_AFmt_28(__AIde_20);
 return r;}

extern OBJ _AIde_23(OBJ x1) /* format'23 */
{OBJ r;
 CPPRD(__AIde_22,1);
 r=_AFmt_28(__AIde_22);
 return r;}


init_AIde()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_AFormat();
 init_AString();
 init_ASeq();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AOption();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ANatConv();
 init_AReal();
 LCLS(1,_AIde_23,__AIde_23);
 DEN("$",__AIde_22);
 LCLS(1,_AIde_21,__AIde_21);
 DEN("\'",__AIde_20);
 CLS(1,_AIde_19,__AIde_19);
 CLS(1,_AIde_18,__AIde_18);
 CLS(2,_AIde_16,__AIde_16);
 CLS(2,_AIde_15,__AIde_15);
 CLS(2,_AIde_14,__AIde_14);
 CLS(2,_AIde_13,__AIde_13);
 CLS(1,_AIde_11,__AIde_11);
 CLS(1,_AIde_10,__AIde_10);
 CLS(2,_AIde_9,__AIde_9);
 CLS(1,_AIde_8,__AIde_8);
 CLS(1,_AIde_7,__AIde_7);
 CLS(1,_AIde_6,__AIde_6);
 CLS(1,_AIde_4,__AIde_4);
 CLS(1,_AIde_3,__AIde_3);
 CLS(1,_AIde_2,__AIde_2);
 __AIde_17=__ANat_5;}

