

#include "BUILTIN.h"
extern OBJ _AIcFun_1(OBJ,OBJ);extern OBJ __AIcFun_1;
extern OBJ _AIcFun_3(OBJ,OBJ);extern OBJ __AIcFun_3;

#include "Array.h"
extern OBJ _AMap_16(OBJ,OBJ,OBJ);extern OBJ __AMap_16;
extern OBJ _AMap_20(OBJ,OBJ,OBJ);extern OBJ __AMap_20;
extern OBJ _AMap_31(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMap_31;
extern OBJ _AIc_27(OBJ);extern OBJ __AIc_27;
extern OBJ _AIc_30(OBJ);extern OBJ __AIc_30;
extern OBJ _AIc_32(OBJ);extern OBJ __AIc_32;
extern OBJ _AIc_90(OBJ);extern OBJ __AIc_90;
extern OBJ _AIc_98(OBJ);extern OBJ __AIc_98;
extern OBJ __AOcError_12;
extern OBJ __AOcError_15;
extern OBJ _AOcError_16(OBJ,OBJ,OBJ);extern OBJ __AOcError_16;
extern OBJ _AOcError_21(OBJ,OBJ);extern OBJ __AOcError_21;
extern OBJ _ABSTree_57(OBJ,OBJ,OBJ);extern OBJ __ABSTree_57;
extern OBJ _ABSTree_61(OBJ,OBJ,OBJ);extern OBJ __ABSTree_61;

#include "Bitset.h"
extern OBJ __ASeq_6;
extern OBJ _ASeq_40(OBJ,OBJ);extern OBJ __ASeq_40;
extern OBJ _ASeq_52(OBJ,OBJ);extern OBJ __ASeq_52;

#include "Nat.h"
extern OBJ _ABSTreeConv_7(OBJ,OBJ);extern OBJ __ABSTreeConv_7;

#include "Char.h"

#include "Int.h"
extern OBJ __AOcPos_9;
extern OBJ _AIde_14(OBJ,OBJ);extern OBJ __AIde_14;
extern OBJ __AIde_17;

#include "Denotation.h"
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;
extern OBJ _ASeqReduce_4(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_4;
extern OBJ __AIdeMap_3;
extern OBJ __AIdeSet_2;
extern OBJ _AIdeMSC_1(OBJ);extern OBJ __AIdeMSC_1;
extern TUP2 _AInitOrder_1(OBJ,OBJ);OBJ __AInitOrder_1; /* initOrder */
extern TUP2 _AInitOrder_3(OBJ,OBJ,OBJ);OBJ __AInitOrder_3; /* checkOrder */
extern OBJ _AInitOrder_4(OBJ,OBJ);OBJ __AInitOrder_4; /* nextSym */
extern OBJ _AInitOrder_5(OBJ,OBJ,OBJ);OBJ __AInitOrder_5; /* calcConstDep */
extern OBJ _AInitOrder_6(OBJ,OBJ,OBJ);OBJ __AInitOrder_6; /* calcProcDep */
extern OBJ _AInitOrder_7(OBJ,OBJ,OBJ);OBJ __AInitOrder_7; /* applied */
extern OBJ _AInitOrder_8(OBJ,OBJ,OBJ);OBJ __AInitOrder_8; /* applied,1 */
extern OBJ _AInitOrder_9(OBJ,OBJ,OBJ);OBJ __AInitOrder_9; /* applied,2 */
OBJ __AInitOrder_10; /* nextSym'10 */
extern OBJ _AInitOrder_11(OBJ,OBJ);OBJ __AInitOrder_11; /* checkOrder'11 */
OBJ __AInitOrder_12; /* checkOrder'12 */
OBJ __AInitOrder_13; /* checkOrder'13 */
OBJ __AInitOrder_14; /* checkOrder'14 */

extern TUP2 _AInitOrder_1(OBJ x1,OBJ x2) /* initOrder */
{TUP2 r;
 CPCLS(__AInitOrder_5,1);
 CPCLS(__AIc_32,1);
 COPY(__AIdeMap_3,1);
 FRPRD(x1,1);
 CPPRD(x2,2);
 {OBJ x3;OBJ x4;OBJ x5;OBJ x6;
  x3=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_5,1))(__AInitOrder_5,x2);
  x4=_AIcFun_3(__AIc_32,x2);
  x5=_ASeqReduce_4(x3,__AIdeMap_3,x4);
  COPY(x5,1);
  x6=_AIdeMSC_1(x5);
  r=_AInitOrder_3(x2,x5,x6);}
 return r;}
extern OBJ _AInitOrder_1_c(OBJ x1,OBJ x2) /* initOrder */
{OBJ r;
 {TUP2 t=_AInitOrder_1(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _AInitOrder_3(OBJ x1,OBJ x2,OBJ x3) /* checkOrder */
{TUP2 r;
 if(ISPRM(x3)){
  FRPRD(x1,1);
  FREE(x2,1);
  CPPRD(__AOcError_15,1);
  r.c1=__AOcError_15;r.c2=__ASeq_6;
 }else{
  {OBJ x69=FLD1(x3,1);OBJ x70=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
    COPY(x69,2);
   }else{
    COPY(x69,3);COPY(x70,1);}
   CPPRD(x1,1);
   CPCLS(__AInitOrder_11,1);
   {OBJ x72;OBJ x74;OBJ x75;OBJ x76;OBJ x79;OBJ x80;OBJ x81;OBJ x82;
    x72=_ASeq_52(x69,__ANat_5);
    x74=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_11,1))(__AInitOrder_11,x1);
    ANat_81(x72,__ANat_8,x75);
    x76=_ASeqMap_3(x74,x69);
    if(ISPRM(x76)){
     HLT("Seq at <unknown> : undefined selection ft\'Seq:seq->data");
    }else{
     {OBJ x77=FLD1(x76,1);
      CPPRD(x77,1);
      x79=x77;}}
    if(ISTGPRM(x75,1)){
     COPY(x2,1);
     COPY(x76,1);
     CPCLS(__AIc_32,1);
     x80=_ASeq_40(__AIc_32,x76);
    }else{
     COPY(x2,1);
     x80=__ABUILTIN_3;}
    {TUP2 t=_AInitOrder_3(x1,x2,x70);
     x81=t.c1;
     x82=t.c2;}
    if(ISTGPRM(x80,1)){
     if(x_x3){
      DSPRDF(x3);
     }else{
      FRPRD(x3,1);}
     FREE(x2,1);
     FREE(x69,1);
     {OBJ x85;OBJ x86;OBJ x87;OBJ x88;OBJ x89;OBJ x90;OBJ x91;
      if(ISPRM(x76)){
       HLT("Seq at <unknown> : undefined selection rt\'Seq:seq->seq");
      }else{
       {OBJ x84=FLD1(x76,2);
	if(EXPRD(x76,1)){
	 r.c2=x82;x85=x84;
	 FRPRD(FLD1(x76,1),1);DSPRDF(x76);
	}else{
	 COPY(x84,1);
	 r.c2=x82;x85=x84;
	 FRPRD(x76,1);}
	CPCLS(__AInitOrder_4,1);
	CPPRD(__AInitOrder_12,1);
	CPPRD(__AInitOrder_13,1);}}
      x86=_ASeqReduce_3(__AInitOrder_4,__AInitOrder_12,x85);
      x87=_AIc_27(x79);
      ADenotation_4(x87,x86,x88);
      ADenotation_4(__AInitOrder_13,x88,x89);
      x90=_AOcError_16(__AOcError_12,x89,__AOcPos_9);
      r.c1=_AOcError_21(x81,x90);}
    }else{
     FREE(x76,1);
     if(ISTGPRD(x79,3)){
      {OBJ x99;OBJ x100;OBJ x101;
       if(ISPRM(x69)){
	HLT("Seq at <unknown> : undefined selection ft\'Seq:seq->data");
       }else{
	{OBJ x97=FLD1(x69,1);
	 if(EXPRD(x69,1)){
	  x99=x97;
	  FREE(FLD1(x69,2),1);DSPRDF(x69);
	 }else{
	  CPPRD(x97,1);
	  x99=x97;
	  FRPRD(x69,1);}
	 CPCLS(__AIde_14,2);}}
       CPPRD(x99,1);
       x100=_AMap_16(__AIde_14,x2,x99);
       x101=_ABSTree_61(__AIde_14,x99,x100);
       if(ISTGPRM(x101,1)){
	if(x_x3){
	 DSPRDF(x3);
	}else{
	 FRPRD(x3,1);}
	r.c2=x82;
	CPPRD(__AInitOrder_14,1);
	{OBJ x102;OBJ x103;OBJ x104;
	 x102=_AIc_27(x79);
	 ADenotation_4(__AInitOrder_14,x102,x103);
	 x104=_AOcError_16(__AOcError_12,x103,__AOcPos_9);
	 r.c1=_AOcError_21(x81,x104);}
       }else{
	r.c1=x81;
	if(x_x3){
	 RSOME(x3,r.c2);FLD1(r.c2,1)=x79;FLD1(r.c2,2)=x82;
	}else{
	 FRPRD(x3,1);PRD1(2,r.c2);FLD1(r.c2,1)=x79;FLD1(r.c2,2)=x82;}}}
     }else{
      if(x_x3){
       DSPRDF(x3);
      }else{
       FRPRD(x3,1);}
      r.c1=x81;r.c2=x82;
      FREE(x2,1);
      FREE(x69,1);
      FRPRD(x79,1);}}}}}
 return r;}
extern OBJ _AInitOrder_3_c(OBJ x1,OBJ x2,OBJ x3) /* checkOrder */
{OBJ r;
 {TUP2 t=_AInitOrder_3(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AInitOrder_4(OBJ x1,OBJ x2) /* nextSym */
{OBJ r;
 CPPRD(__AInitOrder_10,1);
 {OBJ x3;OBJ x4;
  x3=_AIc_27(x1);
  ADenotation_4(x3,x2,x4);
  ADenotation_4(__AInitOrder_10,x4,r);}
 return r;}

extern OBJ _AInitOrder_5(OBJ x1,OBJ x2,OBJ x3) /* calcConstDep */
{OBJ r;
 CPCLS(__AInitOrder_6,1);
 CPPRD(x1,1);
 CPPRD(x2,1);
 {OBJ x10;OBJ x11;
  x10=_AIc_30(x2);
  x11=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_6,1))(__AInitOrder_6,x1);
  if(ISTGPRD(x2,3)){
   {OBJ x8=FLD(x2,5);
    if(EXPRD(x2,1)){
     FLD(x2,5)=NIL;DSPRD(x2);
    }else{
     COPY(x8,1);
     FRPRD(x2,1);}
    CPCLS(__AIde_14,2);
    COPY(__AIdeSet_2,1);
    {OBJ x9;OBJ x12;OBJ x13;OBJ x14;
     x9=x8;
     x12=_AInitOrder_7(x1,x9,__AIdeSet_2);
     COPY(x12,1);
     x13=_AMap_31(__AIde_14,x10,x12,x3);
     x14=_ABSTreeConv_7(__AIde_14,x12);
     r=_ASeqReduce_4(x11,x13,x14);}}
  }else{
   HLT("Ic at <unknown> : undefined selection init\'Ic:obj->stm");}}
 return r;}

extern OBJ _AInitOrder_6(OBJ x1,OBJ x2,OBJ x3) /* calcProcDep */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x4;
  x4=_AIcFun_1(x1,x2);
  if(ISTGPRD(x4,2)){
   {OBJ x33=FLD(x4,7);
    COPY(x33,1);
    COPY(x3,1);
    CPCLS(__AIde_14,1);
    {OBJ x34;OBJ x35;
     x34=_AIc_30(x4);
     CPPRD(x34,1);
     x35=_AMap_20(__AIde_14,x34,x3);
     if(ISTGPRM(x35,1)){
      FRPRD(x1,1);
      FREE(x33,1);
      FRPRD(x34,1);
      r=x3;
     }else{
      CPPRD(x1,1);
      CPCLS(__AInitOrder_6,1);
      CPCLS(__AIde_14,2);
      COPY(__AIdeSet_2,1);
      {OBJ x36;OBJ x37;OBJ x38;OBJ x39;
       x36=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_6,1))(__AInitOrder_6,x1);
       x37=_AInitOrder_7(x1,x33,__AIdeSet_2);
       COPY(x37,1);
       x38=_ABSTreeConv_7(__AIde_14,x37);
       x39=_AMap_31(__AIde_14,x34,x37,x3);
       r=_ASeqReduce_4(x36,x39,x38);}}}}
  }else{
   FRPRD(x1,1);
   FRPRD(x4,1);
   r=x3;}}
 return r;}

extern OBJ _AInitOrder_7(OBJ x1,OBJ x2,OBJ x3) /* applied */
{OBJ r;
 if(ISPRD(x2)&&(ISTGPRD(x2,4))){
  CPCLS(__AInitOrder_9,1);
  {OBJ x238;OBJ x239;
   x238=_AIc_98(x2);
   x239=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_9,1))(__AInitOrder_9,x1);
   r=_ASeqReduce_4(x239,x3,x238);}
 }else{
  if(ISPRD(x2)&&(ISTGPRD(x2,5))){
   CPPRD(x1,1);
   CPPRD(x2,1);
   CPCLS(__AInitOrder_9,1);
   {OBJ x243;OBJ x244;OBJ x245;OBJ x246;
    x243=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_9,1))(__AInitOrder_9,x1);
    x244=_AIc_98(x2);
    x245=_AIc_90(x2);
    x246=_AInitOrder_9(x1,x245,x3);
    r=_ASeqReduce_4(x243,x246,x244);}
  }else{
   if(ISPRD(x2)&&(ISTGPRD(x2,6))){
    CPPRD(x1,1);
    CPPRD(x2,1);
    CPCLS(__AInitOrder_9,1);
    {OBJ x250;OBJ x251;OBJ x252;OBJ x257;OBJ x253;OBJ x263;OBJ x274;
     x250=_AIc_90(x2);
     x251=_AIc_98(x2);
     x252=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_9,1))(__AInitOrder_9,x1);
     if(ISTGPRD(x250,0)){
      COPY(x251,1);
      x257=__ABUILTIN_5;
     }else{
      COPY(x251,1);
      x257=__ABUILTIN_3;}
     x253=_ASeqReduce_4(x252,x3,x251);
     if(ISTGPRM(x257,1)){
      {OBJ x262;
       if(ISTGPRD(x250,0)){
	{OBJ x259=FLD(x250,2);
	 x262=x259;}
       }else{
	HLT("Ide at <unknown> : undefined selection origin\'Ide:ide->origin");}
       ANat_76(x262,__AIde_17,x263);}
     }else{
      x263=__ABUILTIN_3;}
     if(ISTGPRM(x263,1)){
      CPPRD(x1,1);
      CPPRD(x250,1);
      {OBJ x264;
       x264=_AIcFun_1(x1,x250);
       if(ISTGPRD(x264,2)){
	{OBJ x269=FLD(x264,5);
	 if(EXPRD(x264,1)){
	  FLD(x264,5)=NIL;DSPRD(x264);
	 }else{
	  COPY(x269,1);
	  FRPRD(x264,1);}
	 {OBJ x272;OBJ x273;
	  x272=_ASeq_52(x251,__ANat_5);
	  x273=_ASeq_52(x269,__ANat_5);
	  ANat_79(x272,x273,x274);}}
       }else{
	FREE(x251,1);
	FRPRD(x264,1);
	x274=__ABUILTIN_5;}}
     }else{
      FREE(x251,1);
      x274=__ABUILTIN_3;}
     if(ISTGPRM(x274,1)){
      r=_AInitOrder_9(x1,x250,x253);
     }else{
      r=x253;
      FRPRD(x1,1);
      FRPRD(x250,1);}}
   }else{
    {OBJ x278;OBJ x284;
     if(ISPRD(x2)&&(ISTGPRD(x2,11))){
      x278=__ABUILTIN_5;
     }else{
      x278=__ABUILTIN_3;}
     if(ISTGPRM(x278,1)){
      x284=__ABUILTIN_5;
     }else{
      if(ISPRD(x2)&&(ISTGPRD(x2,12))){
       x284=__ABUILTIN_5;
      }else{
       x284=__ABUILTIN_3;}}
     if(ISTGPRM(x284,1)){
      CPCLS(__AInitOrder_9,1);
      {OBJ x285;OBJ x286;
       x285=_AIc_98(x2);
       x286=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_9,1))(__AInitOrder_9,x1);
       r=_ASeqReduce_4(x286,x3,x285);}
     }else{
      if(ISPRD(x2)&&(ISTGPRD(x2,13))){
       {OBJ x288=FLD(x2,2);
	if(EXPRD(x2,1)){
	 FREE(FLD(x2,1),1);DSPRDF(x2);
	}else{
	 COPY(x288,1);
	 FRPRD(x2,1);}
	CPCLS(__AInitOrder_7,1);
	{OBJ x289;
	 x289=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_7,1))(__AInitOrder_7,x1);
	 r=_ASeqReduce_4(x289,x3,x288);}}
      }else{
       if(ISPRD(x2)&&(ISTGPRD(x2,14))){
	{OBJ x292=FLD(x2,3);OBJ x293=FLD(x2,4);
	 COPY(x292,1);COPY(x293,1);
	 CPPRD(x1,2);
	 CPCLS(__AInitOrder_8,1);
	 {OBJ x294;OBJ x295;OBJ x296;OBJ x297;
	  x294=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_8,1))(__AInitOrder_8,x1);
	  x295=_AIc_90(x2);
	  x296=_AInitOrder_7(x1,x293,x3);
	  x297=_AInitOrder_9(x1,x295,x296);
	  r=_ASeqReduce_4(x294,x297,x292);}}
       }else{
	FRPRD(x1,1);
	FREE(x2,1);
	r=x3;}}}}}}}
 return r;}

extern OBJ _AInitOrder_8(OBJ x1,OBJ x2,OBJ x3) /* applied,1 */
{OBJ r;
 CPCLS(__AInitOrder_7,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AInitOrder_7,1))(__AInitOrder_7,x1);
  {OBJ x8=FLD1(x2,4);
   if(EXPRD(x2,1)){
    FLD1(x2,4)=NIL;DSPRD(x2);
   }else{
    COPY(x8,1);
    FRPRD(x2,1);}
   {OBJ x9;
    x9=x8;
    r=_ASeqReduce_4(x4,x3,x9);}}}
 return r;}

extern OBJ _AInitOrder_9(OBJ x1,OBJ x2,OBJ x3) /* applied,2 */
{OBJ r;
 FRPRD(x1,1);
 if(ISTGPRD(x2,0)){
  {OBJ x15=FLD(x2,2);
   {OBJ x16;
    ANat_76(x15,__AIde_17,x16);
    if(ISTGPRM(x16,1)){
     CPCLS(__AIde_14,1);
     r=_ABSTree_57(__AIde_14,x2,x3);
    }else{
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      DCPRD(x2,1);}
     r=x3;}}}
 }else{
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   DCPRD(x2,1);}
  r=x3;}
 return r;}

extern OBJ _AInitOrder_11(OBJ x1,OBJ x2) /* checkOrder'11 */
{OBJ r;
 r=_AIcFun_1(x1,x2);
 return r;}

init_AInitOrder()
{
 static int visited=0; if(visited) return; visited=1;
 init_AIcFun();
 init_ATree();
 init_AArray();
 init_AMap();
 init_AIc();
 init_ASetByBST();
 init_AOcError();
 init_ABSTree();
 init_APreparedOptions();
 init_ABitset();
 init_ASeq();
 init_AMapConv();
 init_ANat();
 init_ASetByBSTFilter();
 init_AOption();
 init_ASetByBSTConv();
 init_AOcOptions();
 init_ABSTreeConv();
 init_AChar();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AString();
 init_AFile();
 init_AInt();
 init_AOcPos();
 init_ASet();
 init_ANatMap();
 init_AIde();
 init_AStore();
 init_ASourceAn();
 init_AFormat();
 init_AFmt();
 init_APair();
 init_ADenotation();
 init_ASeqMap();
 init_ASeqReduce();
 init_AIdeMap();
 init_AIdeSet();
 init_AIdeMSC();
 DEN("direct cyclic initialization: ",__AInitOrder_14);
 DEN("indirect cyclic initialization: ",__AInitOrder_13);
 DEN("",__AInitOrder_12);
 CLS(2,_AInitOrder_11,__AInitOrder_11);
 DEN(",",__AInitOrder_10);
 CLS(3,_AInitOrder_9,__AInitOrder_9);
 CLS(3,_AInitOrder_8,__AInitOrder_8);
 CLS(3,_AInitOrder_7,__AInitOrder_7);
 CLS(3,_AInitOrder_6,__AInitOrder_6);
 CLS(3,_AInitOrder_5,__AInitOrder_5);
 CLS(2,_AInitOrder_4,__AInitOrder_4);
 CLS(3,_AInitOrder_3_c,__AInitOrder_3);
 CLS(2,_AInitOrder_1_c,__AInitOrder_1);}

