

#include "BUILTIN.h"
extern TUP2 _ASeqMapEnv_4(OBJ,OBJ,OBJ);extern OBJ __ASeqMapEnv_4;
extern OBJ _ATypeAnFun_1(OBJ,OBJ);extern OBJ __ATypeAnFun_1;
extern OBJ _ATypeAnFun_2(OBJ,OBJ);extern OBJ __ATypeAnFun_2;
extern OBJ _ATypeAnFun_3(OBJ,OBJ);extern OBJ __ATypeAnFun_3;
extern OBJ _ATransAnFun_1(OBJ,OBJ);extern OBJ __ATransAnFun_1;
extern OBJ _ATransAnFun_2(OBJ,OBJ,OBJ);extern OBJ __ATransAnFun_2;
extern OBJ _ATransAnFun_4(OBJ,OBJ,OBJ);extern OBJ __ATransAnFun_4;

#include "Array.h"
extern OBJ __AStore_12;
extern OBJ __AStore_22;
extern OBJ __AStore_30;
extern OBJ __AStore_32;
extern OBJ _ATypeAn_6(OBJ);extern OBJ __ATypeAn_6;

#include "Nat.h"

#include "Char.h"
extern OBJ __ASeq_6;

#include "Int.h"
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;
extern OBJ _ATransType_1(OBJ,OBJ);OBJ __ATransType_1; /* transTypes */
extern OBJ _ATransType_2(OBJ,OBJ);OBJ __ATransType_2; /* type2Store */
extern OBJ _ATransType_3(OBJ);OBJ __ATransType_3; /* anyTypeDec */
extern OBJ _ATransType_4(OBJ,OBJ);OBJ __ATransType_4; /* transTypeDec */
extern TUP2 _ATransType_5(OBJ,OBJ);OBJ __ATransType_5; /* transTypeIde */
extern TUP2 _ATransType_6(OBJ,OBJ);OBJ __ATransType_6; /* transType */
extern TUP2 _ATransType_7(OBJ,OBJ);OBJ __ATransType_7; /* transSum */
extern TUP3 _ATransType_8(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ATransType_8; /* transSum,1 */
OBJ __ATransType_9; /* transType'9 */
OBJ __ATransType_10; /* transType'10 */
OBJ __ATransType_11; /* type2Store'11 */

extern OBJ _ATransType_1(OBJ x1,OBJ x2) /* transTypes */
{OBJ r;
 CPCLS(__ATransType_3,2);
 CPCLS(__ATransType_4,2);
 FREE(x1,1);
 CPPRD(x2,1);
 {OBJ x3;OBJ x4;OBJ x5;
  x3=_ATypeAnFun_3(__ATransType_3,x2);
  x4=_ASeqReduce_3(__ATransType_4,x2,x3);
  CPPRD(x4,1);
  x5=_ATypeAnFun_2(__ATransType_3,x4);
  r=_ASeqReduce_3(__ATransType_4,x4,x5);}
 return r;}

extern OBJ _ATransType_2(register OBJ x1,register OBJ x2) /* type2Store */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRPRD(x1,1);
   r=__AStore_32;
  }else{
   switch(TGPRD(x2)){
    case 3:
     if(EXPRD(x2,1)){
      DSPRD(x2);
     }else{
      DCPRD(x2,1);}
     FRPRD(x1,1);
     r=__AStore_12;break;
    case 4:
     {OBJ x156=FLD(x2,2);
      if(EXPRD(x2,1)){
       FRPRD(FLD(x2,1),1);DSPRDF(x2);
      }else{
       COPY(x156,1);
       FRPRD(x2,1);}
      FRPRD(x1,1);
      if(ISPRM(x156)){
       r=__AStore_30;
      }else{
       if(EXPRD(x156,1)){
	DSPRD(x156);
       }else{
	DCPRD(x156,1);}
       r=__AStore_22;}}break;
    case 5:
     if(EXPRD(x2,1)){
      FREE(FLD(x2,1),1);DSPRDF(x2);
     }else{
      DCPRD(x2,1);}
     FRPRD(x1,1);
     r=__AStore_32;break;
    case 6:
     {OBJ x160=FLD(x2,1);
      if(EXPRD(x2,1)){
       FREE(FLD(x2,2),1);DSPRDF(x2);
      }else{
       COPY(x160,1);
       FRPRD(x2,1);}
      x2=x160;continue;}break;
    case 7:
     {OBJ x163=FLD(x2,2);
      if(EXPRD(x2,1)){
       FREE(FLD(x2,1),1);DSPRDF(x2);
      }else{
       COPY(x163,1);
       FRPRD(x2,1);}
      x2=x163;continue;}break;
    case 2:
     {OBJ x164=FLD(x2,1);
      if(EXPRD(x2,1)){
       DSPRDF(x2);
      }else{
       COPY(x164,1);
       FRPRD(x2,1);}
      FRPRD(x1,1);
      {OBJ x167;
       if(ISPRM(x164)){
	x167=__ABUILTIN_5;
       }else{
	if(EXPRD(x164,1)){
	 DSPRD(x164);
	}else{
	 DCPRD(x164,1);}
	x167=__ABUILTIN_3;}
       if(ISTGPRM(x167,1)){
	COPY(__ATransType_11,1);
	r=__ATransType_11;
       }else{
	r=__AStore_22;}}}break;
    default: 
     {OBJ x147=FLD(x2,1);
      if(EXPRD(x2,1)){
       DSPRDF(x2);
      }else{
       CPPRD(x147,1);
       FRPRD(x2,1);}
      if(ISTGPRD(x147,0)){
       {OBJ x150;
	x150=_ATransAnFun_1(x1,x147);
	if(ISPRM(x150)){
	 HLT("Option at <unknown> : undefined selection cont\'Option:option->data");
	}else{
	 {OBJ x151=FLD1(x150,1);
	  if(EXPRD(x150,1)){
	   r=x151;
	   DSPRDF(x150);
	  }else{
	   COPY(x151,1);
	   r=x151;
	   FRPRD(x150,1);}}}}
      }else{
       if(EXPRD(x147,1)){
	DSPRDF(x147);
       }else{
	DCPRD(x147,1);}
       FRPRD(x1,1);
       r=__AStore_32;}}}}
  break;}
 return r;}

extern OBJ _ATransType_3(OBJ x1) /* anyTypeDec */
{OBJ r;
 FRPRD(x1,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ATransType_4(OBJ x1,OBJ x2) /* transTypeDec */
{OBJ r;
 {OBJ x3;TUP2 x6;
  x3=_ATypeAn_6(x1);
  x6=_ATransType_5(x2,x3);r=x6.c1;
  FREE(x6.c2,1);}
 return r;}

extern TUP2 _ATransType_5(OBJ x1,OBJ x2) /* transTypeIde */
{TUP2 r;
 CPPRD(x1,1);
 CPPRD(x2,1);
 {OBJ x3;
  x3=_ATransAnFun_1(x1,x2);
  if(ISPRM(x3)){
   CPPRD(x1,1);
   CPPRD(x2,1);
   {OBJ x49;
    x49=_ATypeAnFun_1(x1,x2);
    switch(TGPRD(x49)){
     case 2:
      {OBJ x59=FLD(x49,3);
       if(EXPRD(x49,1)){
	COPY(x59,1);
	r.c2=x59;
	FRPRD(FLD(x49,1),1);DSPRDF(x49);
       }else{
	COPY(x59,2);
	r.c2=x59;
	FRPRD(x49,1);}
       r.c1=_ATransAnFun_2(x1,x2,r.c2);}break;
     case 0:
      if(EXPRD(x49,1)){
       FRPRD(FLD(x49,1),1);DSPRDF(x49);
      }else{
       DCPRD(x49,1);}
      r.c1=_ATransAnFun_2(x1,x2,__AStore_32);
      r.c2=__AStore_32;break;
     default: 
      {OBJ x51=FLD(x49,2);
       if(EXPRD(x49,1)){
	FRPRD(FLD(x49,1),1);DSPRDF(x49);
       }else{
	COPY(x51,1);
	FRPRD(x49,1);}
       CPPRD(x2,1);
       {OBJ x52;TUP2 x54;
	x52=_ATransAnFun_2(x1,x2,__AStore_32);
	x54=_ATransType_6(x52,x51);r.c2=x54.c2;
	COPY(r.c2,1);
	r.c1=_ATransAnFun_2(x54.c1,x2,r.c2);}}}}
  }else{
   {OBJ x48=FLD1(x3,1);
    if(EXPRD(x3,1)){
     r.c2=x48;
     DSPRDF(x3);
    }else{
     COPY(x48,1);
     r.c2=x48;
     FRPRD(x3,1);}
    FRPRD(x2,1);
    r.c1=x1;}}}
 return r;}
extern OBJ _ATransType_5_c(OBJ x1,OBJ x2) /* transTypeIde */
{OBJ r;
 {TUP2 t=_ATransType_5(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _ATransType_6(register OBJ x1,register OBJ x2) /* transType */
{TUP2 r;
 for(;;){
  if(ISPRM(x2)){
   r.c1=x1;r.c2=__AStore_32;
  }else{
   switch(TGPRD(x2)){
    case 3:
     if(EXPRD(x2,1)){
      DSPRD(x2);
     }else{
      DCPRD(x2,1);}
     r.c1=x1;r.c2=__AStore_12;break;
    case 4:
     {OBJ x175=FLD(x2,1);OBJ x176=FLD(x2,2);FLAG x_x2=EXPRD(x2,1);
      if(x_x2){
      }else{
       CPPRD(x175,1);COPY(x176,1);}
      if(ISPRM(x176)){
       if(x_x2){
	DSPRDF(x2);
       }else{
	FRPRD(x2,1);}
       COPY(__ATransType_9,1);
       r.c1=_ATransAnFun_4(x1,x175,__ATransType_9);
       r.c2=__AStore_30;
      }else{
       CPCLS(__ATransType_6,1);
       {TUP2 x181;OBJ x183;
	x181=_ASeqMapEnv_4(__ATransType_6,x1,x176);
	if(x_x2){
	 RPRD(x2,x183);CHGTG(x183,6);FLD(x183,1)=__ANat_5;FLD(x183,2)=x181.c2;
	}else{
	 FRPRD(x2,1);PRD(2,6,x183);FLD(x183,1)=__ANat_5;FLD(x183,2)=x181.c2;}
	r.c1=_ATransAnFun_4(x181.c1,x175,x183);
	r.c2=__AStore_22;}}}break;
    case 5:
     r=_ATransType_7(x1,x2);break;
    case 6:
     {OBJ x186=FLD(x2,1);
      if(EXPRD(x2,1)){
       FREE(FLD(x2,2),1);DSPRDF(x2);
      }else{
       COPY(x186,1);
       FRPRD(x2,1);}
      x2=x186;continue;}break;
    case 7:
     {OBJ x189=FLD(x2,2);
      if(EXPRD(x2,1)){
       FREE(FLD(x2,1),1);DSPRDF(x2);
      }else{
       COPY(x189,1);
       FRPRD(x2,1);}
      x2=x189;continue;}break;
    case 2:
     {OBJ x190=FLD(x2,1);
      if(EXPRD(x2,1)){
       DSPRDF(x2);
      }else{
       COPY(x190,1);
       FRPRD(x2,1);}
      if(ISPRM(x190)){
       COPY(__ATransType_10,1);
       r.c1=x1;r.c2=__ATransType_10;
      }else{
       if(EXPRD(x190,1)){
	DSPRD(x190);
       }else{
	DCPRD(x190,1);}
       r.c1=x1;r.c2=__AStore_22;}}break;
    default: 
     {OBJ x169=FLD(x2,1);
      if(EXPRD(x2,1)){
       DSPRDF(x2);
      }else{
       CPPRD(x169,1);
       FRPRD(x2,1);}
      if(ISTGPRD(x169,0)){
       r=_ATransType_5(x1,x169);
      }else{
       if(EXPRD(x169,1)){
	DSPRDF(x169);
       }else{
	DCPRD(x169,1);}
       r.c1=x1;r.c2=__AStore_32;}}}}
  break;}
 return r;}
extern OBJ _ATransType_6_c(OBJ x1,OBJ x2) /* transType */
{OBJ r;
 {TUP2 t=_ATransType_6(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _ATransType_7(OBJ x1,OBJ x2) /* transSum */
{TUP2 r;
 if(ISPRD(x2)&&(ISTGPRD(x2,5))){
  {OBJ x3=FLD(x2,1);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x3,1);
    FRPRD(x2,1);}
   {OBJ x4;TUP3 x6;OBJ x9;
    x4=x3;
    x6=_ATransType_8(x1,x4,__ANat_5,__ANat_5,__ANat_5);
    ANat_76(x6.c2,__ANat_5,x9);
    if(ISTGPRM(x9,1)){
     r.c1=x6.c1;
     r.c2=__AStore_22;
    }else{
     {OBJ x10;
      ANat_76(x6.c3,__ANat_5,x10);
      if(ISTGPRM(x10,1)){
       r.c1=x6.c1;
       r.c2=__AStore_30;
      }else{
       r.c1=x6.c1;
       r.c2=__AStore_32;}}}}}
 }else{
  HLT("TypeAn at <unknown> : undefined selection members\'TypeAn:type->seq");}
 return r;}
extern OBJ _ATransType_7_c(OBJ x1,OBJ x2) /* transSum */
{OBJ r;
 {TUP2 t=_ATransType_7(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP3 _ATransType_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* transSum,1 */
{TUP3 r;
 if(ISPRM(x2)){
  r.c1=x1;r.c2=x3;r.c3=x4;
 }else{
  {OBJ x94=FLD1(x2,1);OBJ x95=FLD1(x2,2);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x94,1);COPY(x95,1);
    FRPRD(x2,1);}
   {OBJ x96;
    ANat_2(x5,x96);
    if(ISPRD(x94)&&(ISTGPRD(x94,4))){
     {OBJ x98=FLD(x94,1);OBJ x99=FLD(x94,2);FLAG x_x94=EXPRD(x94,1);
      if(x_x94){
      }else{
       CPPRD(x98,1);COPY(x99,1);}
      if(ISPRM(x99)){
       if(x_x94){
	DSPRDF(x94);
       }else{
	FRPRD(x94,1);}
       {OBJ x100;TUP3 x102;OBJ x105;OBJ x106;OBJ x107;
	ANat_2(x3,x100);
	x102=_ATransType_8(x1,x95,x100,x4,x96);
	ANat_81(x102.c2,__ANat_8,x105);
	if(ISTGPRM(x105,1)){
	 r.c2=x102.c2;r.c3=x102.c3;
	 PRDF(1,2,x106);FLD(x106,1)=x5;
	}else{
	 r.c2=x102.c2;r.c3=x102.c3;
	 PRDF(1,3,x106);FLD(x106,1)=x5;}
	r.c1=_ATransAnFun_4(x102.c1,x98,x106);}
      }else{
       CPCLS(__ATransType_6,1);
       {OBJ x110;TUP3 x112;OBJ x115;TUP2 x117;OBJ x119;OBJ x120;
	ANat_2(x4,x110);
	x112=_ATransType_8(x1,x95,x3,x110,x96);
	ANat_81(x112.c3,__ANat_8,x115);
	x117=_ASeqMapEnv_4(__ATransType_6,x112.c1,x99);
	if(ISTGPRM(x115,1)){
	 r.c2=x112.c2;r.c3=x112.c3;
	 if(x_x94){
	  RPRD(x94,x119);CHGTG(x119,5);FLD(x119,1)=x5;FLD(x119,2)=x117.c2;
	 }else{
	  FRPRD(x94,1);PRD(2,5,x119);FLD(x119,1)=x5;FLD(x119,2)=x117.c2;}
	}else{
	 r.c2=x112.c2;r.c3=x112.c3;
	 if(x_x94){
	  RPRD(x94,x119);CHGTG(x119,6);FLD(x119,1)=x5;FLD(x119,2)=x117.c2;
	 }else{
	  FRPRD(x94,1);PRD(2,6,x119);FLD(x119,1)=x5;FLD(x119,2)=x117.c2;}}
	r.c1=_ATransAnFun_4(x117.c1,x98,x119);}}}
    }else{
     HLT("TypeAn at <unknown> : undefined selection cons\'TypeAn:type->ide");}}}}
 return r;}
extern OBJ _ATransType_8_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* transSum,1 */
{OBJ r;
 {TUP3 t=_ATransType_8(x1,x2,x3,x4,x5);
  PRD1(3,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;}
 return r;}




init_ATransType()
{
 static int visited=0; if(visited) return; visited=1;
 init_ASeqMapEnv();
 init_ATypeAnFun();
 init_ATransAnFun();
 init_AArray();
 init_AStore();
 init_AMap();
 init_ATypeAn();
 init_ASetByBST();
 init_AAc();
 init_ABSTree();
 init_APreparedOptions();
 init_ATree();
 init_ANat();
 init_ABuiltin();
 init_AOcOptions();
 init_AChar();
 init_ASeq();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AString();
 init_AFile();
 init_AInt();
 init_AOption();
 init_ANatMap();
 init_AIde();
 init_AAn();
 init_ASourceAn();
 init_AOptimAn();
 init_ATransAn();
 init_APragmaAn();
 init_AFormat();
 init_AFmt();
 init_ASet();
 init_APair();
 init_AIdeMap();
 init_ASeqMap();
 init_ASeqReduce();
 CLS(5,_ATransType_8_c,__ATransType_8);
 CLS(2,_ATransType_7_c,__ATransType_7);
 CLS(2,_ATransType_6_c,__ATransType_6);
 CLS(2,_ATransType_5_c,__ATransType_5);
 CLS(2,_ATransType_4,__ATransType_4);
 CLS(1,_ATransType_3,__ATransType_3);
 CLS(2,_ATransType_2,__ATransType_2);
 CLS(2,_ATransType_1,__ATransType_1);
 PRDF(1,3,__ATransType_9);FLD(__ATransType_9,1)=__ANat_5;
 PRDF(1,10,__ATransType_10);FLD(__ATransType_10,1)=__ASeq_6;
 PRDF(1,10,__ATransType_11);FLD(__ATransType_11,1)=__ASeq_6;}

