

#include "BUILTIN.h"
extern OBJ __ATransAnFun_8;
extern OBJ _APragmaAnFun_1(OBJ);extern OBJ __APragmaAnFun_1;
extern OBJ _AAc_20(OBJ);extern OBJ __AAc_20;
extern OBJ _AAc_21(OBJ);extern OBJ __AAc_21;
extern OBJ _AAc_22(OBJ);extern OBJ __AAc_22;
extern OBJ _AAc_50(OBJ);extern OBJ __AAc_50;
extern OBJ _AFormat_5(OBJ,OBJ);extern OBJ __AFormat_5;

#include "Array.h"

#include "Nat.h"
extern OBJ __ASeq_6;
extern OBJ _ASeq_16(OBJ,OBJ,OBJ,OBJ);extern OBJ __ASeq_16;
extern OBJ _ASeq_26(OBJ,OBJ);extern OBJ __ASeq_26;
extern OBJ _AFmt_28(OBJ);extern OBJ __AFmt_28;

#include "Char.h"

#include "Int.h"
extern OBJ __ATypeAn_52;
extern OBJ __ASourceAn_28;
extern OBJ __AOptimAn_24;
extern OBJ __ATransAn_8;
extern OBJ __APragmaAn_34;
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _ATypeAnFun_12(OBJ);extern OBJ __ATypeAnFun_12;
extern OBJ _ASourceAnFun_2(OBJ);extern OBJ __ASourceAnFun_2;
extern OBJ _AOptimAnFun_2(OBJ);extern OBJ __AOptimAnFun_2;
extern OBJ _AAnFun_1(OBJ,OBJ,OBJ);OBJ __AAnFun_1; /* mapAn */
extern OBJ _AAnFun_2(OBJ,OBJ,OBJ);OBJ __AAnFun_2; /* mapAn,1 */
extern OBJ _AAnFun_3(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AAnFun_3; /* format */
extern OBJ _AAnFun_4(OBJ,OBJ,OBJ);OBJ __AAnFun_4; /* mapAnMatch */
extern OBJ _AAnFun_5(OBJ,OBJ);OBJ __AAnFun_5; /* optional */
OBJ __AAnFun_6; /* optional'6 */
OBJ __AAnFun_7; /* optional'7 */
extern OBJ _AAnFun_8(OBJ);OBJ __AAnFun_8; /* optional'8 */
OBJ __AAnFun_9; /* optional'9 */
extern OBJ _AAnFun_10(OBJ);OBJ __AAnFun_10; /* optional'10 */
extern OBJ _AAnFun_11(OBJ);OBJ __AAnFun_11; /* format'11 */

extern OBJ _AAnFun_1(register OBJ x1,register OBJ x2,register OBJ x3) /* mapAn */
{OBJ r;OBJ* p1=&r;
 for(;;){
  {OBJ x6;OBJ x4;OBJ x7;
   if(ISTGPRD(x3,0)){
    CPCLS(x2,1);
    CPPRD(x3,1);
    x6=__ABUILTIN_5;
   }else{
    CPCLS(x2,1);
    CPPRD(x3,1);
    x6=__ABUILTIN_3;}
   x4=_AAc_50(x3);
   x7=(*(OBJ(*)(OBJ,OBJ))METHOD(x2,1))(x2,x4);
   if(ISTGPRM(x6,1)){
    FRCLS(x1,1);
    FRCLS(x2,1);
    FRPRD(x3,1);
    PRD(1,0,*p1);FLD(*p1,1)=x7;
   }else{
    switch(TGPRD(x3)){
     case 1:
      {OBJ x212;
       if(EXPRD(x3,1)){
	FRCLS(x1,1);
	FRCLS(x2,1);
	RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;
       }else{
	x212=FLD(x3,2);CPPRD(x212,1);
	FRCLS(x1,1);
	FRCLS(x2,1);
	FRPRD(x3,1);PRD(2,1,*p1);FLD(*p1,1)=x7;FLD(*p1,2)=x212;}}break;
     case 3:
      {OBJ x214=FLD(x3,2);OBJ x215=FLD(x3,3);
       if(EXPRD(x3,1)){
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_1,1);
	{OBJ x216;OBJ x218;
	 x216=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_1,2))(__AAnFun_1,x1,x2);
	 x218=_ASeqMap_3(x216,x215);
	 RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;FLD(*p1,3)=x218;
	 x3=x214;p1=&FLD(*p1,2);continue;}
       }else{
	CPPRD(x214,1);COPY(x215,1);
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_1,1);
	{OBJ x216;OBJ x218;
	 x216=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_1,2))(__AAnFun_1,x1,x2);
	 x218=_ASeqMap_3(x216,x215);
	 FRPRD(x3,1);PRD(3,3,*p1);FLD(*p1,1)=x7;FLD(*p1,3)=x218;
	 x3=x214;p1=&FLD(*p1,2);continue;}}}break;
     case 6:
      {OBJ x220=FLD(x3,2);OBJ x221=FLD(x3,3);OBJ x222=FLD(x3,4);
       if(EXPRD(x3,1)){
	CPCLS(x1,2);
	CPCLS(x2,2);
	CPCLS(__AAnFun_4,1);
	{OBJ x223;OBJ x225;OBJ x226;
	 x223=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_4,2))(__AAnFun_4,x1,x2);
	 x225=_ASeqMap_3(x223,x221);
	 x226=_AAnFun_1(x1,x2,x220);
	 RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;FLD(*p1,2)=x226;FLD(*p1,3)=x225;
	 x3=x222;p1=&FLD(*p1,4);continue;}
       }else{
	CPPRD(x220,1);COPY(x221,1);CPPRD(x222,1);
	CPCLS(x1,2);
	CPCLS(x2,2);
	CPCLS(__AAnFun_4,1);
	{OBJ x223;OBJ x225;OBJ x226;
	 x223=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_4,2))(__AAnFun_4,x1,x2);
	 x225=_ASeqMap_3(x223,x221);
	 x226=_AAnFun_1(x1,x2,x220);
	 FRPRD(x3,1);PRD(4,6,*p1);FLD(*p1,1)=x7;FLD(*p1,2)=x226;FLD(*p1,3)=x225;
	 x3=x222;p1=&FLD(*p1,4);continue;}}}break;
     case 4:
      {OBJ x228=FLD(x3,2);OBJ x229=FLD(x3,3);
       if(EXPRD(x3,1)){
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_2,1);
	{OBJ x230;OBJ x231;
	 x230=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_2,2))(__AAnFun_2,x1,x2);
	 x231=_ASeqMap_3(x230,x228);
	 RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;FLD(*p1,2)=x231;
	 x3=x229;p1=&FLD(*p1,3);continue;}
       }else{
	COPY(x228,1);CPPRD(x229,1);
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_2,1);
	{OBJ x230;OBJ x231;
	 x230=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_2,2))(__AAnFun_2,x1,x2);
	 x231=_ASeqMap_3(x230,x228);
	 FRPRD(x3,1);PRD(3,4,*p1);FLD(*p1,1)=x7;FLD(*p1,2)=x231;
	 x3=x229;p1=&FLD(*p1,3);continue;}}}break;
     case 5:
      {OBJ x234=FLD(x3,2);OBJ x235=FLD(x3,3);
       if(EXPRD(x3,1)){
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_2,1);
	{OBJ x236;OBJ x237;
	 x236=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_2,2))(__AAnFun_2,x1,x2);
	 x237=_ASeqMap_3(x236,x234);
	 RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;FLD(*p1,2)=x237;
	 x3=x235;p1=&FLD(*p1,3);continue;}
       }else{
	COPY(x234,1);CPPRD(x235,1);
	CPCLS(x1,1);
	CPCLS(x2,1);
	CPCLS(__AAnFun_2,1);
	{OBJ x236;OBJ x237;
	 x236=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_2,2))(__AAnFun_2,x1,x2);
	 x237=_ASeqMap_3(x236,x234);
	 FRPRD(x3,1);PRD(3,5,*p1);FLD(*p1,1)=x7;FLD(*p1,2)=x237;
	 x3=x235;p1=&FLD(*p1,3);continue;}}}break;
     case 0:
      HLT("AnFun at <35,8-46,44> : missing else in mapAn\'AnFun:(an->an)**(an->an)->exp->exp");break;
     default: 
      {OBJ x210;
       if(EXPRD(x3,1)){
	FRCLS(x1,1);
	FRCLS(x2,1);
	RPRD(x3,*p1);FREE(FLD(*p1,1),1);FLD(*p1,1)=x7;
       }else{
	x210=FLD(x3,2);CPPRD(x210,1);
	FRCLS(x1,1);
	FRCLS(x2,1);
	FRPRD(x3,1);PRD(2,2,*p1);FLD(*p1,1)=x7;FLD(*p1,2)=x210;}}}}}
  break;}
 return r;}

extern OBJ _AAnFun_2(OBJ x1,OBJ x2,OBJ x3) /* mapAn,1 */
{OBJ r;
 {OBJ x7;OBJ x4;OBJ x8;
  if(ISTGPRD(x3,0)){
   CPCLS(x1,1);
   CPPRD(x3,1);
   x7=__ABUILTIN_5;
  }else{
   CPCLS(x1,1);
   CPPRD(x3,1);
   x7=__ABUILTIN_3;}
  x4=_AAc_22(x3);
  x8=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x4);
  if(ISTGPRM(x7,1)){
   FRCLS(x1,1);
   FRCLS(x2,1);
   {
    PRD(2,0,r);FLD(r,1)=x8;
    FLD(r,2)=_AAc_21(x3);}
  }else{
   switch(TGPRD(x3)){
    case 2:
     {OBJ x68=FLD(x3,4);
      CPPRD(x68,1);
      CPPRD(x3,1);
      {OBJ x69;OBJ x70;
       x69=_AAc_21(x3);
       x70=_AAc_20(x3);
       PRD(4,2,r);FLD(r,1)=x8;FLD(r,2)=x69;FLD(r,3)=x70;
       FLD(r,4)=_AAnFun_1(x1,x2,x68);}}break;
    case 3:
     {OBJ x75=FLD(x3,4);
      FRCLS(x1,1);
      FRCLS(x2,1);
      CPPRD(x3,1);
      {OBJ x76;
       x76=_AAc_20(x3);
       PRD(4,3,r);FLD(r,1)=x8;FLD(r,3)=x76;FLD(r,4)=x75;
       FLD(r,2)=_AAc_21(x3);}}break;
    case 0:
     HLT("AnFun at <56,8-59,64> : missing else in mapAn\'AnFun:(an->an)**(an->an)->dec->dec");break;
    default: 
     FRCLS(x1,1);
     FRCLS(x2,1);
     CPPRD(x3,1);
     {OBJ x63;
      x63=_AAc_20(x3);
      PRD(3,1,r);FLD(r,1)=x8;FLD(r,3)=x63;
      FLD(r,2)=_AAc_21(x3);}}}}
 return r;}

extern OBJ _AAnFun_3(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* format */
{OBJ r;
 CPCLS(__AAnFun_11,1);
 {OBJ x31;OBJ x37;OBJ x30;OBJ x24;OBJ x18;OBJ x12;OBJ x38;OBJ x39;OBJ x40;OBJ x41;OBJ x53;OBJ x49;OBJ x47;OBJ x45;OBJ x43;OBJ x54;OBJ x55;OBJ x56;OBJ x57;OBJ x58;OBJ x59;OBJ x60;OBJ x61;OBJ x62;
  x31=(*(OBJ(*)(OBJ,OBJ))METHOD(__AAnFun_11,1))(__AAnFun_11,__ABUILTIN_20);
  if(ISPRM(x6)){
   x37=__APragmaAn_34;x30=__ATransAn_8;x24=__AOptimAn_24;x18=__ASourceAn_28;x12=__ATypeAn_52;
  }else{
   {OBJ x68=FLD1(x6,1);OBJ x69=FLD1(x6,2);OBJ x70=FLD1(x6,3);OBJ x71=FLD1(x6,4);OBJ x72=FLD1(x6,5);
    if(EXPRD(x6,1)){
     x12=x68;x18=x69;x24=x70;x30=x71;x37=x72;
     DSPRDF(x6);
    }else{
     COPY(x68,1);COPY(x69,1);COPY(x70,1);COPY(x71,1);COPY(x72,1);
     x12=x68;x18=x69;x24=x70;x30=x71;x37=x72;
     FRPRD(x6,1);}}}
  COPY(x37,1);
  COPY(x24,1);
  COPY(x18,1);
  COPY(x12,1);
  x38=_ATypeAnFun_12(x12);
  x39=_ASourceAnFun_2(x18);
  x40=_AOptimAnFun_2(x24);
  x41=_APragmaAnFun_1(x37);
  if(ISTGPRM(x5,1)){
   if(ISPRM(x37)){
    x53=__ABUILTIN_3;
   }else{
    if(EXPRD(x37,1)){
     FREE(FLD1(x37,1),1);DSPRDF(x37);
    }else{
     DCPRD(x37,1);}
    x53=__ABUILTIN_5;}
  }else{
   FREE(x37,1);
   x53=__ABUILTIN_3;}
  if(ISTGPRM(x4,1)){
   if(ISPRM(x30)){
    x49=__ABUILTIN_3;
   }else{
    FREE(x30,1);
    x49=__ABUILTIN_5;}
  }else{
   FREE(x30,1);
   x49=__ABUILTIN_3;}
  if(ISTGPRM(x3,1)){
   if(ISPRM(x24)){
    x47=__ABUILTIN_3;
   }else{
    FREE(x24,1);
    x47=__ABUILTIN_5;}
  }else{
   FREE(x24,1);
   x47=__ABUILTIN_3;}
  if(ISTGPRM(x2,1)){
   if(ISPRM(x18)){
    x45=__ABUILTIN_3;
   }else{
    FREE(x18,1);
    x45=__ABUILTIN_5;}
  }else{
   FREE(x18,1);
   x45=__ABUILTIN_3;}
  if(ISTGPRM(x1,1)){
   if(ISPRM(x12)){
    x43=__ABUILTIN_3;
   }else{
    FREE(x12,1);
    x43=__ABUILTIN_5;}
  }else{
   FREE(x12,1);
   x43=__ABUILTIN_3;}
  x54=_AAnFun_5(x43,x38);
  x55=_AAnFun_5(x45,x39);
  x56=_AAnFun_5(x47,x40);
  x57=_AAnFun_5(x49,x31);
  x58=_AAnFun_5(x53,x41);
  x59=_ASeq_26(x57,x58);
  x60=_ASeq_26(x56,x59);
  x61=_ASeq_26(x55,x60);
  x62=_ASeq_26(x54,x61);
  r=_AFormat_5(__ANat_5,x62);}
 return r;}

extern OBJ _AAnFun_4(OBJ x1,OBJ x2,OBJ x3) /* mapAnMatch */
{OBJ r;
 CPCLS(__AAnFun_2,1);
 CPCLS(x1,1);
 CPCLS(x2,1);
 {OBJ x8;
  x8=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AAnFun_2,2))(__AAnFun_2,x1,x2);
  {OBJ x19;OBJ x20=FLD1(x3,2);OBJ x21=FLD1(x3,3);
   if(EXPRD(x3,1)){
    {OBJ x22;
     x22=_AAnFun_1(x1,x2,x21);
     RSOME(x3,r);FLD1(r,3)=x22;
     FLD1(r,2)=_ASeqMap_3(x8,x20);}
   }else{
    x19=FLD1(x3,1);CPPRD(x19,1);COPY(x20,1);CPPRD(x21,1);
    {OBJ x22;
     x22=_AAnFun_1(x1,x2,x21);
     FRPRD(x3,1);PRD1(3,r);FLD1(r,1)=x19;FLD1(r,3)=x22;
     FLD1(r,2)=_ASeqMap_3(x8,x20);}}}}
 return r;}

extern OBJ _AAnFun_5(OBJ x1,OBJ x2) /* optional */
{OBJ r;
 if(ISTGPRM(x1,1)){
  COPY(__AAnFun_6,1);
  CPCLS(__AAnFun_8,1);
  CPCLS(__AAnFun_10,1);
  {OBJ x3;OBJ x4;
   x3=(*(OBJ(*)(OBJ,OBJ))METHOD(__AAnFun_8,1))(__AAnFun_8,__ABUILTIN_20);
   x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AAnFun_10,1))(__AAnFun_10,__ABUILTIN_20);
   r=_ASeq_16(__AAnFun_6,x3,x2,x4);}
 }else{
  FREE(x2,1);
  r=__ASeq_6;}
 return r;}

extern OBJ _AAnFun_8(OBJ x1) /* optional'8 */
{OBJ r;
 CPPRD(__AAnFun_7,1);
 r=_AFmt_28(__AAnFun_7);
 return r;}

extern OBJ _AAnFun_10(OBJ x1) /* optional'10 */
{OBJ r;
 CPPRD(__AAnFun_9,1);
 r=_AFmt_28(__AAnFun_9);
 return r;}

extern OBJ _AAnFun_11(OBJ x1) /* format'11 */
{OBJ r;
 CPPRD(__ATransAnFun_8,1);
 r=_AFmt_28(__ATransAnFun_8);
 return r;}


static OBJ _mt_6_0_5(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4,OBJ t5) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,5);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 FLDCLS(r,4)=t4;
 FLDCLS(r,5)=t5;
 return r;}

static OBJ _mt_6_5_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  COPY(FLDCLS(t,3),1);
  COPY(FLDCLS(t,4),1);
  COPY(FLDCLS(t,5),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),FLDCLS(t,5),t1);
 return r;}
static OBJ _mt_6_5_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),FLDCLS(t,5),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;FLDCLS(t,3)=NIL;FLDCLS(t,4)=NIL;FLDCLS(t,5)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_AAnFun()
{
 static int visited=0; if(visited) return; visited=1;
 init_ATransAnFun();
 init_APragmaAnFun();
 init_AMap();
 init_ASetByBST();
 init_AAn();
 init_ABSTree();
 init_AAc();
 init_ATree();
 init_AFormat();
 init_AArray();
 init_ANat();
 init_ABuiltin();
 init_AString();
 init_ASeq();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AOption();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ANatMap();
 init_AIde();
 init_ATypeAn();
 init_ASourceAn();
 init_AOptimAn();
 init_ATransAn();
 init_APragmaAn();
 init_AStore();
 init_ASet();
 init_APair();
 init_AIdeMap();
 init_ASeqMap();
 init_ATypeAnFun();
 init_ASourceAnFun();
 init_AOptimAnFun();
 LCLS(1,_AAnFun_11,__AAnFun_11);
 LCLS(1,_AAnFun_10,__AAnFun_10);
 DEN("]",__AAnFun_9);
 LCLS(1,_AAnFun_8,__AAnFun_8);
 DEN("[",__AAnFun_7);
 CLS(2,_AAnFun_5,__AAnFun_5);
 CLS(3,_AAnFun_4,__AAnFun_4);
 CLS(6,_AAnFun_3,__AAnFun_3);
 CLS(3,_AAnFun_2,__AAnFun_2);
 CLS(3,_AAnFun_1,__AAnFun_1);
 MTH(6,0,5,_mt_6_0_5);LZYMTH(6,0,5,_mt_6_0_5);
 MTH(6,5,1,_mt_6_5_1);LZYMTH(6,5,1,_mt_6_5_1_l);
 PRDF(1,1,__AAnFun_6);FLD(__AAnFun_6,1)=__ANat_5;}

