

#include "BUILTIN.h"

#include "Denotation.h"
extern OBJ _AComCompose_3(OBJ,OBJ);extern OBJ __AComCompose_3;
extern OBJ _AComCompose_4(OBJ,OBJ);extern OBJ __AComCompose_4;
extern OBJ _AComCompose_5(OBJ,OBJ);extern OBJ __AComCompose_5;
extern OBJ _AComSeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __AComSeqReduce_3;
extern OBJ _AComSeqReduce_4(OBJ,OBJ,OBJ);extern OBJ __AComSeqReduce_4;
extern OBJ _AAc_21(OBJ);extern OBJ __AAc_21;
extern OBJ _AAc_22(OBJ);extern OBJ __AAc_22;
extern OBJ _AAc_24(OBJ);extern OBJ __AAc_24;
extern OBJ __AIc_2;
extern OBJ __AIc_4;
extern OBJ __AIc_6;
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_39(OBJ);extern OBJ __AIc_39;
extern OBJ _APredicate_6(OBJ,OBJ,OBJ);extern OBJ __APredicate_6;
extern OBJ _APreparedOptions_21(OBJ);extern OBJ __APreparedOptions_21;
extern OBJ _APreparedOptions_22(OBJ);extern OBJ __APreparedOptions_22;
extern OBJ _APreparedOptions_23(OBJ);extern OBJ __APreparedOptions_23;
extern OBJ _APreparedOptions_24(OBJ);extern OBJ __APreparedOptions_24;
extern OBJ _APreparedOptions_27(OBJ);extern OBJ __APreparedOptions_27;
extern OBJ __AOcVerbose_1;
extern OBJ __AOcVerbose_2;
extern OBJ __AOcVerbose_3;
extern OBJ _AOcVerbose_4(OBJ,OBJ,OBJ);extern OBJ __AOcVerbose_4;
extern OBJ __AOcError_15;
extern OBJ _ANatMapReduce_3(OBJ,OBJ,OBJ);extern OBJ __ANatMapReduce_3;
extern OBJ __AIdeSet_2;
extern OBJ _ACom_47(OBJ,OBJ);extern OBJ __ACom_47;

#include "Nat.h"
extern OBJ _AAcFun_11(OBJ,OBJ,OBJ);extern OBJ __AAcFun_11;
extern OBJ _AAcFun_14(OBJ,OBJ);extern OBJ __AAcFun_14;
extern OBJ _AAcDump_1(OBJ,OBJ);extern OBJ __AAcDump_1;
extern OBJ __ASeq_6;
extern OBJ _AIcFun_2(OBJ,OBJ,OBJ);extern OBJ __AIcFun_2;
extern OBJ _AIcFun_3(OBJ,OBJ);extern OBJ __AIcFun_3;
extern OBJ _AIcFun_10(OBJ,OBJ);extern OBJ __AIcFun_10;
extern OBJ __ABuiltin_1;
extern OBJ _ADumpToFile_2(OBJ,OBJ,OBJ,OBJ);extern OBJ __ADumpToFile_2;
extern OBJ _ATransType_1(OBJ,OBJ);extern OBJ __ATransType_1;
extern OBJ _AOcOptions_14(OBJ,OBJ);extern OBJ __AOcOptions_14;
extern TUP2 _ATransDec_1(OBJ,OBJ,OBJ);extern OBJ __ATransDec_1;
extern OBJ _ATransDec_2(OBJ,OBJ,OBJ);extern OBJ __ATransDec_2;

#include "Char.h"
extern OBJ _AOptimReuse_1(OBJ,OBJ,OBJ);extern OBJ __AOptimReuse_1;
extern OBJ _AOptimLazySel_1(OBJ,OBJ,OBJ);extern OBJ __AOptimLazySel_1;
extern OBJ _AOptimMergeMatch_1(OBJ,OBJ,OBJ);extern OBJ __AOptimMergeMatch_1;

#include "Int.h"

#include "Array.h"
extern OBJ __ANatMap_3;
extern OBJ _ANatMap_4(OBJ,OBJ,OBJ);extern OBJ __ANatMap_4;
extern OBJ _ASetByBST_41(OBJ,OBJ,OBJ);extern OBJ __ASetByBST_41;
extern OBJ _AIde_14(OBJ,OBJ);extern OBJ __AIde_14;
extern OBJ _ABSTree_61(OBJ,OBJ,OBJ);extern OBJ __ABSTree_61;
extern OBJ __ASourceAn_28;

#include "Bitset.h"

#include "Real.h"
extern OBJ _ATranslate_1(OBJ,OBJ);OBJ __ATranslate_1; /* translate */
extern OBJ _ATranslate_3(OBJ,OBJ);OBJ __ATranslate_3; /* preopt */
extern OBJ _ATranslate_4(OBJ);OBJ __ATranslate_4; /* anyDec */
extern OBJ _ATranslate_5(OBJ,OBJ);OBJ __ATranslate_5; /* trans */
extern OBJ _ATranslate_6(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_6; /* transImport */
extern OBJ _ATranslate_7(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_7; /* transImportDec */
extern OBJ _ATranslate_8(OBJ,OBJ);OBJ __ATranslate_8; /* postopt */
extern OBJ _ATranslate_9(OBJ,OBJ,OBJ);OBJ __ATranslate_9; /* optim */
extern OBJ _ATranslate_10(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_10; /* dOptim */
extern OBJ _ATranslate_11(OBJ,OBJ,OBJ);OBJ __ATranslate_11; /* dump */
extern OBJ _ATranslate_12(OBJ);OBJ __ATranslate_12; /* dumpMod */
OBJ __ATranslate_13; /* preopt'13 */
extern OBJ _ATranslate_14(OBJ,OBJ);OBJ __ATranslate_14; /* preopt'14 */
OBJ __ATranslate_15; /* preopt'15 */
extern OBJ _ATranslate_16(OBJ,OBJ,OBJ);OBJ __ATranslate_16; /* preopt'16 */
extern OBJ _ATranslate_17(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_17; /* preopt'17 */
extern OBJ _ATranslate_18(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_18; /* preopt'18 */
extern OBJ _ATranslate_19(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_19; /* preopt'19 */
OBJ __ATranslate_20; /* transImport'20 */
OBJ __ATranslate_21; /* trans'21 */
OBJ __ATranslate_22; /* trans'22 */
OBJ __ATranslate_23; /* trans'23 */
extern OBJ _ATranslate_24(OBJ,OBJ,OBJ);OBJ __ATranslate_24; /* trans'24 */
extern OBJ _ATranslate_25(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_25; /* trans'25 */
extern OBJ _ATranslate_26(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_26; /* trans'26 */
extern OBJ _ATranslate_27(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_27; /* trans'27 */
extern OBJ _ATranslate_28(OBJ,OBJ,OBJ,OBJ);OBJ __ATranslate_28; /* trans'28 */
extern OBJ _ATranslate_29(OBJ);OBJ __ATranslate_29; /* postopt'29 */
OBJ __ATranslate_30; /* postopt'30 */
OBJ __ATranslate_31; /* postopt'31 */
OBJ __ATranslate_32; /* translate'32 */
extern OBJ _ATranslate_33(OBJ);OBJ __ATranslate_33; /* translate'33 */
extern OBJ _ATranslate_34(OBJ,OBJ);OBJ __ATranslate_34; /* translate'34 */
extern OBJ _ATranslate_35(OBJ,OBJ);OBJ __ATranslate_35; /* translate'35 */
extern OBJ _ATranslate_36(OBJ,OBJ,OBJ);OBJ __ATranslate_36; /* translate'36 */

extern OBJ _ATranslate_1(OBJ x1,OBJ x2) /* translate */
{OBJ r;
 {OBJ x3=FLD1(x1,1);
  CPPRD(x3,1);
  CPPRD(__ATranslate_32,1);
  CPCLS(__ATranslate_36,1);
  {OBJ x6;OBJ x7;OBJ x8;
   x6=x3;
   x7=_AOcVerbose_4(x6,__AOcVerbose_1,__ATranslate_32);
   x8=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ATranslate_36,2))(__ATranslate_36,x1,x2);
   r=_AComCompose_5(x7,x8);}}
 return r;}

extern OBJ _ATranslate_3(OBJ x1,OBJ x2) /* preopt */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x3;
  x3=_APreparedOptions_24(x1);
  if(ISTGPRM(x3,1)){
   {OBJ x4=FLD1(x1,1);
    CPPRD(x4,1);
    CPPRD(__ATranslate_13,1);
    CPCLS(__ATranslate_19,1);
    {OBJ x7;OBJ x8;OBJ x9;
     x7=x4;
     CPPRD(x7,1);
     x8=_AOcVerbose_4(x7,__AOcVerbose_2,__ATranslate_13);
     x9=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_19,3))(__ATranslate_19,x1,x2,x7);
     r=_AComCompose_5(x8,x9);}}
  }else{
   FRPRD(x1,1);
   CPCLS(__ACom_47,1);
   {OBJ x10;OBJ x11;
    PRD(1,0,x10);FLD(x10,1)=x2;
    x11=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x10);
    PRD(2,0,r);FLD(r,1)=x11;FLD(r,2)=__ASeq_6;}}}
 return r;}

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

extern OBJ _ATranslate_5(OBJ x1,OBJ x2) /* trans */
{OBJ r;
 {OBJ x3=FLD1(x1,1);
  CPPRD(x3,1);
  CPPRD(__ATranslate_21,1);
  CPCLS(__ATranslate_28,1);
  {OBJ x6;OBJ x7;OBJ x8;
   x6=x3;
   CPPRD(x6,1);
   x7=_AOcVerbose_4(x6,__AOcVerbose_2,__ATranslate_21);
   x8=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_28,3))(__ATranslate_28,x1,x2,x6);
   r=_AComCompose_5(x7,x8);}}
 return r;}

extern OBJ _ATranslate_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* transImport */
{OBJ r;
 CPCLS(__ATranslate_7,1);
 CPPRD(x1,1);
 {OBJ x6;
  x6=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_7,3))(__ATranslate_7,x1,x2,x3);
  {OBJ x36=FLD1(x4,2);OBJ x37=FLD1(x4,3);OBJ x39=FLD1(x4,5);FLAG x_x4=EXPRD(x4,1);
   if(x_x4){
   }else{
    CPPRD(x36,1);CPPRD(x39,1);}
   CPPRD(__ANatMap_3,1);
   {OBJ x40;OBJ x41;OBJ x47;OBJ x48;
    x40=_ANatMapReduce_3(x6,__ANatMap_3,x39);
    ANat_76(x37,__ABuiltin_1,x41);
    if(ISTGPRM(x41,1)){
     FRPRD(x1,1);
     CPPRD(__ANatMap_3,1);
     x47=__AIc_2;
    }else{
     {OBJ x42=FLD1(x1,1);
      if(EXPRD(x1,1)){
       FLD1(x1,1)=NIL;DSPRD(x1);
      }else{
       CPPRD(x42,1);
       FRPRD(x1,1);}
      CPPRD(x36,1);
      CPPRD(__ATranslate_20,1);
      {OBJ x45;OBJ x46;
       ADenotation_4(__ATranslate_20,x36,x45);
       x46=_AOcOptions_14(x45,x42);
       if(ISTGPRM(x46,1)){
	CPPRD(__ANatMap_3,1);
	x47=__AIc_4;
       }else{
	CPPRD(__ANatMap_3,1);
	x47=__AIc_6;}}}}
    if(x_x4){
     RSOME(x4,x48);FREE(FLD1(x48,1),1);FLD1(x48,1)=x36;FLD1(x48,2)=x37;FLD1(x48,3)=x47;FRPRD(FLD1(x48,4),1);FLD1(x48,4)=__ANatMap_3;FLD1(x48,5)=x40;
    }else{
     FRPRD(x4,1);PRD1(5,x48);FLD1(x48,1)=x36;FLD1(x48,2)=x37;FLD1(x48,3)=x47;FLD1(x48,4)=__ANatMap_3;FLD1(x48,5)=x40;}
    r=_ANatMap_4(x37,x48,x5);}}}
 return r;}

extern OBJ _ATranslate_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* transImportDec */
{OBJ r;
 CPCLS(__AIde_14,1);
 CPPRD(x4,1);
 {OBJ x6;OBJ x7;
  x6=_AAc_21(x4);
  CPPRD(x6,1);
  x7=_ABSTree_61(__AIde_14,x6,x3);
  if(ISTGPRM(x7,1)){
   {OBJ x8;OBJ x12;
    x8=_ATransDec_2(x1,x2,x4);
    {OBJ x9=FLD(x6,1);
     if(EXPRD(x6,1)){
      x12=x9;
      DSPRD(x6);
     }else{
      x12=x9;
      FRPRD(x6,1);}}
    r=_ANatMap_4(x12,x8,x5);}
  }else{
   FRPRD(x1,1);
   FRPRD(x2,1);
   FRPRD(x4,1);
   FRPRD(x6,1);
   r=x5;}}
 return r;}

extern OBJ _ATranslate_8(OBJ x1,OBJ x2) /* postopt */
{OBJ r;
 CPPRD(x1,1);
 CPPRD(x2,1);
 {OBJ x3;OBJ x4;OBJ x6;
  x3=_APreparedOptions_21(x1);
  PRD(1,0,x4);FLD(x4,1)=x2;
  if(ISTGPRM(x3,1)){
   x6=__ABUILTIN_5;
  }else{
   CPPRD(x1,1);
   {OBJ x5;
    x5=_APreparedOptions_23(x1);
    if(ISTGPRM(x5,1)){
     x6=__ABUILTIN_5;
    }else{
     CPPRD(x1,1);
     x6=_APreparedOptions_22(x1);}}}
  if(ISTGPRM(x6,1)){
   CPPRD(x1,2);
   CPCLS(__ATranslate_9,1);
   CPCLS(__ATranslate_11,1);
   CPCLS(__ATranslate_29,1);
   CPPRD(__ATranslate_30,1);
   {OBJ x11;OBJ x12;OBJ x13;
    x11=(*(OBJ(*)(OBJ,OBJ))METHOD(__ATranslate_9,1))(__ATranslate_9,x1);
    x12=(*(OBJ(*)(OBJ,OBJ))METHOD(__ATranslate_29,1))(__ATranslate_29,__ABUILTIN_20);
    x13=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ATranslate_11,2))(__ATranslate_11,x1,__ATranslate_30);
    {OBJ x7=FLD1(x1,1);
     if(EXPRD(x1,1)){
      FLD1(x1,1)=NIL;DSPRD(x1);
     }else{
      CPPRD(x7,1);
      FRPRD(x1,1);}
     CPPRD(__ATranslate_31,1);
     {OBJ x10;OBJ x14;OBJ x15;OBJ x16;OBJ x17;
      x10=x7;
      x14=_AOcVerbose_4(x10,__AOcVerbose_2,__ATranslate_31);
      x15=_AIcFun_3(x12,x2);
      x16=_AComSeqReduce_3(x11,x4,x15);
      x17=_AComCompose_4(x14,x16);
      r=_AComCompose_3(x17,x13);}}}
  }else{
   FRPRD(x1,1);
   FRPRD(x2,1);
   CPCLS(__ACom_47,1);
   {OBJ x18;
    x18=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x4);
    PRD(2,0,r);FLD(r,1)=x18;FLD(r,2)=__ASeq_6;}}}
 return r;}

extern OBJ _ATranslate_9(OBJ x1,OBJ x2,OBJ x3) /* optim */
{OBJ r;
 CPPRD(x2,1);
 {OBJ x12;
  x12=_AIc_27(x2);
  {OBJ x15=FLD1(x1,1);
   CPPRD(x15,1);
   {OBJ x21;OBJ x22;OBJ x23;
    if(ISTGPRD(x3,0)){
     {OBJ x18=FLD(x3,1);
      if(EXPRD(x3,1)){
       x21=x18;
       DSPRDF(x3);
      }else{
       CPPRD(x18,1);
       x21=x18;
       FRPRD(x3,1);}
      CPCLS(__ATranslate_10,1);}
    }else{
     HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
    x22=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_10,3))(__ATranslate_10,x1,x21,x2);
    x23=_AOcVerbose_4(x15,__AOcVerbose_3,x12);
    r=_AComCompose_3(x23,x22);}}}
 return r;}

extern OBJ _ATranslate_10(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* dOptim */
{OBJ r;
 CPPRD(x1,1);
 FRPRD(x4,1);
 {OBJ x5;OBJ x6;OBJ x14;OBJ x16;OBJ x17;OBJ x18;OBJ x19;OBJ x20;OBJ x21;
  x5=_APreparedOptions_22(x1);
  if(ISTGPRM(x5,1)){
   CPPRD(x1,1);
   CPPRD(x2,1);
   x6=_AOptimMergeMatch_1(x1,x2,x3);
  }else{
   x6=x3;}
  if(ISTGPRD(x6,2)){
   x14=__ABUILTIN_5;
  }else{
   x14=__ABUILTIN_3;}
  if(ISTGPRM(x14,1)){
   CPPRD(x1,1);
   {OBJ x15;
    x15=_APreparedOptions_21(x1);
    if(ISTGPRM(x15,1)){
     x16=__ABUILTIN_5;
    }else{
     CPPRD(x1,1);
     x16=_APreparedOptions_23(x1);}}
  }else{
   x16=__ABUILTIN_3;}
  if(ISTGPRM(x16,1)){
   CPPRD(x2,1);
   CPCLS(__ACom_47,1);
   x17=_AOptimReuse_1(x1,x2,x6);
  }else{
   x17=x6;
   FRPRD(x1,1);
   CPCLS(__ACom_47,1);}
  CPPRD(x17,1);
  x18=_AIc_30(x17);
  x19=_AIcFun_2(x2,x18,x17);
  PRD(1,0,x20);FLD(x20,1)=x19;
  x21=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x20);
  PRD(2,0,r);FLD(r,1)=x21;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ATranslate_11(OBJ x1,OBJ x2,OBJ x3) /* dump */
{OBJ r;
 CPCLS(__ATranslate_12,1);
 r=_ADumpToFile_2(x1,x2,__ATranslate_12,x3);
 return r;}

extern OBJ _ATranslate_12(OBJ x1) /* dumpMod */
{OBJ r;
 r=_AIcFun_10(x1,__ABUILTIN_20);
 return r;}

extern OBJ _ATranslate_14(OBJ x1,OBJ x2) /* preopt'14 */
{OBJ r;
 r=_AAcDump_1(x1,x2);
 return r;}

extern OBJ _ATranslate_16(OBJ x1,OBJ x2,OBJ x3) /* preopt'16 */
{OBJ r;
 CPCLS(__ATranslate_14,1);
 CPPRD(__ATranslate_15,1);
 CPCLS(__ACom_47,1);
 CPCLS(__ADumpToFile_2,1);
 {OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;
  PRD(1,0,x4);FLD(x4,1)=x3;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x4);
  PRD(2,0,x6);FLD(x6,1)=x5;FLD(x6,2)=__ASeq_6;
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__ATranslate_14,1))(__ATranslate_14,x2);
  x8=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ADumpToFile_2,3))(__ADumpToFile_2,x1,__ATranslate_15,x7);
  r=_AComCompose_3(x6,x8);}
 return r;}

extern OBJ _ATranslate_17(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* preopt'17 */
{OBJ r;
 CPCLS(__ACom_47,1);
 COPY(x3,1);
 {OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;
  x5=_AOptimLazySel_1(x1,x3,x2);
  CPPRD(x5,1);
  x6=_AAc_21(x5);
  x7=_AAcFun_11(x3,x6,x5);
  PRD(1,0,x8);FLD(x8,1)=x7;
  x9=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x8);
  PRD(2,0,r);FLD(r,1)=x9;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ATranslate_18(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* preopt'18 */
{OBJ r;
 CPPRD(x3,1);
 {OBJ x5;OBJ x11;
  x5=_AAc_22(x3);
  if(ISPRM(x5)){
   x11=__ASourceAn_28;
  }else{
   {OBJ x7=FLD1(x5,2);
    if(EXPRD(x5,1)){
     x11=x7;
     FLD1(x5,2)=NIL;DSPRD(x5);
    }else{
     COPY(x7,1);
     x11=x7;
     FRPRD(x5,1);}}}
  if(ISPRD(x11)&&(ISTGPRD(x11,3))){
   {OBJ x12=FLD(x11,1);
    if(EXPRD(x11,1)){
     DSPRDF(x11);
    }else{
     CPPRD(x12,1);
     FRPRD(x11,1);}
    CPCLS(__ATranslate_17,1);
    {OBJ x13;OBJ x14;OBJ x15;
     x13=x12;
     x14=_AOcVerbose_4(x2,__AOcVerbose_3,x13);
     x15=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_17,3))(__ATranslate_17,x1,x3,x4);
     r=_AComCompose_5(x14,x15);}}
  }else{
   HLT("SourceAn at <unknown> : undefined selection symbol\'SourceAn:sourceAn->denotation");}}
 return r;}

extern OBJ _ATranslate_19(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* preopt'19 */
{OBJ r;
 CPCLS(__ATranslate_16,1);
 CPCLS(__ATranslate_18,1);
 CPCLS(__AAc_24,1);
 CPPRD(x1,1);
 CPPRD(x2,1);
 CPPRD(x3,1);
 {OBJ x5;OBJ x6;OBJ x7;OBJ x8;
  x5=_AAcFun_14(__AAc_24,x2);
  x6=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ATranslate_16,2))(__ATranslate_16,x1,x3);
  x7=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ATranslate_18,2))(__ATranslate_18,x1,x3);
  x8=_AComSeqReduce_4(x7,x2,x5);
  r=_AComCompose_5(x8,x6);}
 return r;}

extern OBJ _ATranslate_24(OBJ x1,OBJ x2,OBJ x3) /* trans'24 */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x4;
  x4=_APreparedOptions_27(x1);
  {OBJ x45=FLD1(x3,1);OBJ x46=FLD1(x3,2);
   if(EXPRD(x3,1)){
    DSPRDF(x3);
   }else{
    CPPRD(x45,1);COPY(x46,1);
    FRPRD(x3,1);}
   CPPRD(x2,1);
   CPCLS(__ATranslate_6,1);
   {OBJ x47;
    x47=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_6,3))(__ATranslate_6,x1,x2,x46);
    {OBJ x49=FLD1(x2,2);OBJ x50=FLD1(x2,3);OBJ x51=FLD1(x2,4);FLAG x_x2=EXPRD(x2,1);
     if(x_x2){
     }else{
      CPPRD(x49,1);CPPRD(x51,1);}
     {OBJ x53;OBJ x54;OBJ x55;OBJ x56;OBJ x57;
      if(ISTGPRM(x4,1)){
       CPCLS(__ACom_47,1);
       CPPRD(__ANatMap_3,1);
       x53=__AIc_4;
      }else{
       CPCLS(__ACom_47,1);
       CPPRD(__ANatMap_3,1);
       x53=__AIc_6;}
      x54=_ANatMapReduce_3(x47,__ANatMap_3,x51);
      if(x_x2){
       RSOME(x2,x55);FREE(FLD1(x55,1),1);FLD1(x55,1)=x49;FLD1(x55,2)=x50;FLD1(x55,3)=x53;FLD1(x55,4)=x54;FRPRD(FLD1(x55,5),1);FLD1(x55,5)=x45;
      }else{
       FRPRD(x2,1);PRD1(5,x55);FLD1(x55,1)=x49;FLD1(x55,2)=x50;FLD1(x55,3)=x53;FLD1(x55,4)=x54;FLD1(x55,5)=x45;}
      PRD(1,0,x56);FLD(x56,1)=x55;
      x57=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x56);
      PRD(2,0,r);FLD(r,1)=x57;FLD(r,2)=__ASeq_6;}}}}}
 return r;}

extern OBJ _ATranslate_25(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* trans'25 */
{OBJ r;
 COPY(x3,1);
 {OBJ x12;
  x12=_AAc_21(x3);
  {OBJ x25=FLD1(x4,1);OBJ x26=FLD1(x4,2);FLAG x_x4=EXPRD(x4,1);
   if(x_x4){
   }else{
    CPPRD(x25,1);COPY(x26,1);}
   {OBJ x31;OBJ x32;OBJ x33;OBJ x34;OBJ x35;OBJ x36;OBJ x37;OBJ x38;
    {OBJ x28=FLD(x12,1);
     if(EXPRD(x12,1)){
      x31=x28;
      DSPRD(x12);
     }else{
      x31=x28;
      FRPRD(x12,1);}
     CPCLS(__ACom_47,1);
     CPCLS(__AIde_14,1);}
    {TUP2 t=_ATransDec_1(x1,x2,x3);
     x32=t.c1;
     x33=t.c2;}
    x34=_ASetByBST_41(__AIde_14,x33,x26);
    x35=_ANatMap_4(x31,x32,x25);
    if(x_x4){
     RSOME(x4,x36);FLD1(x36,1)=x35;FLD1(x36,2)=x34;
    }else{
     FRPRD(x4,1);PRD1(2,x36);FLD1(x36,1)=x35;FLD1(x36,2)=x34;}
    PRD(1,0,x37);FLD(x37,1)=x36;
    x38=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x37);
    PRD(2,0,r);FLD(r,1)=x38;FLD(r,2)=__ASeq_6;}}}
 return r;}

extern OBJ _ATranslate_26(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* trans'26 */
{OBJ r;
 CPPRD(x4,1);
 {OBJ x6;OBJ x12;
  x6=_AAc_22(x4);
  if(ISPRM(x6)){
   x12=__ASourceAn_28;
  }else{
   {OBJ x8=FLD1(x6,2);
    if(EXPRD(x6,1)){
     x12=x8;
     FLD1(x6,2)=NIL;DSPRD(x6);
    }else{
     COPY(x8,1);
     x12=x8;
     FRPRD(x6,1);}}}
  if(ISPRD(x12)&&(ISTGPRD(x12,3))){
   {OBJ x13=FLD(x12,1);
    if(EXPRD(x12,1)){
     DSPRDF(x12);
    }else{
     CPPRD(x13,1);
     FRPRD(x12,1);}
    CPCLS(__ATranslate_25,1);
    {OBJ x14;OBJ x15;OBJ x16;
     x14=x13;
     x15=_AOcVerbose_4(x2,__AOcVerbose_3,x14);
     x16=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_25,4))(__ATranslate_25,x1,x3,x4,x5);
     r=_AComCompose_5(x15,x16);}}
  }else{
   HLT("SourceAn at <unknown> : undefined selection symbol\'SourceAn:sourceAn->denotation");}}
 return r;}

extern OBJ _ATranslate_27(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* trans'27 */
{OBJ r;
 CPCLS(__ATranslate_4,1);
 CPPRD(__ATranslate_23,1);
 CPCLS(__ATranslate_24,1);
 CPCLS(__ATranslate_26,1);
 CPPRD(x1,1);
 CPPRD(x3,2);
 {OBJ x5;OBJ x6;OBJ x7;OBJ x8;
  x5=_AAcFun_14(__ATranslate_4,x3);
  x6=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ATranslate_24,2))(__ATranslate_24,x1,x3);
  x7=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_26,3))(__ATranslate_26,x1,x2,x3);
  x8=_AComSeqReduce_4(x7,__ATranslate_23,x5);
  r=_AComCompose_5(x8,x6);}
 return r;}

extern OBJ _ATranslate_28(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* trans'28 */
{OBJ r;
 CPPRD(__ATranslate_22,1);
 CPCLS(__ATranslate_27,1);
 CPPRD(x1,1);
 CPPRD(x3,1);
 {OBJ x5;OBJ x6;OBJ x7;
  x5=_ATransType_1(x1,x2);
  x6=_AOcVerbose_4(x3,__AOcVerbose_2,__ATranslate_22);
  x7=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ATranslate_27,3))(__ATranslate_27,x1,x3,x5);
  r=_AComCompose_5(x6,x7);}
 return r;}

extern OBJ _ATranslate_29(OBJ x1) /* postopt'29 */
{OBJ r;
 CPCLS(__AIc_32,1);
 CPCLS(__AIc_39,1);
 CPCLS(__APredicate_6,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__APredicate_6,2))(__APredicate_6,__AIc_39,__AIc_32);
 return r;}

extern OBJ _ATranslate_33(OBJ x1) /* translate'33 */
{OBJ r;
 CPPRD(__AOcError_15,1);
 CPCLS(__ACom_47,1);
 {OBJ x2;OBJ x3;OBJ x4;
  PRD1(2,x2);FLD1(x2,1)=x1;FLD1(x2,2)=__AOcError_15;
  PRD(1,0,x3);FLD(x3,1)=x2;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x3);
  PRD(2,0,r);FLD(r,1)=x4;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ATranslate_34(OBJ x1,OBJ x2) /* translate'34 */
{OBJ r;
 CPCLS(__ATranslate_33,1);
 {OBJ x3;
  x3=_ATranslate_8(x1,x2);
  r=_AComCompose_5(x3,__ATranslate_33);}
 return r;}

extern OBJ _ATranslate_35(OBJ x1,OBJ x2) /* translate'35 */
{OBJ r;
 CPCLS(__ATranslate_34,1);
 CPPRD(x1,1);
 {OBJ x3;OBJ x4;
  x3=_ATranslate_5(x1,x2);
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__ATranslate_34,1))(__ATranslate_34,x1);
  r=_AComCompose_5(x3,x4);}
 return r;}

extern OBJ _ATranslate_36(OBJ x1,OBJ x2,OBJ x3) /* translate'36 */
{OBJ r;
 CPCLS(__ATranslate_35,1);
 CPPRD(x1,1);
 {OBJ x4;OBJ x5;
  x4=_ATranslate_3(x1,x2);
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__ATranslate_35,1))(__ATranslate_35,x1);
  r=_AComCompose_5(x4,x5);}
 return r;}


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

static OBJ _mt_5_4_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);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1);
 return r;}
static OBJ _mt_5_4_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),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;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_ATranslate()
{
 static int visited=0; if(visited) return; visited=1;
 init_ASeqReduce();
 init_AIdeMap();
 init_AIdeBag();
 init_ADenotation();
 init_AComCompose();
 init_ABag();
 init_AComSeqReduce();
 init_AAc();
 init_AAcAnaScheme();
 init_ACompose();
 init_AIc();
 init_APredicate();
 init_APreparedOptions();
 init_AOcVerbose();
 init_AOcError();
 init_ANatMapReduce();
 init_APair();
 init_AIdeSet();
 init_ACom();
 init_ATypeAnFun();
 init_ANat();
 init_AAcFun();
 init_AVoid();
 init_AAcDump();
 init_ASeq();
 init_AIcFun();
 init_AOption();
 init_ABuiltin();
 init_AOcPos();
 init_ADumpToFile();
 init_AString();
 init_ATransType();
 init_AOcOptions();
 init_ATransDec();
 init_AChar();
 init_AOptimReuse();
 init_AStream();
 init_AOptimLazySel();
 init_AFile();
 init_AOptimMergeMatch();
 init_AInt();
 init_AArray();
 init_ASet();
 init_AMap();
 init_ANatMap();
 init_ASetByBST();
 init_AIde();
 init_ABSTree();
 init_AStore();
 init_ATree();
 init_ASourceAn();
 init_ABitset();
 init_AFormat();
 init_AReal();
 init_AFmt();
 init_ASeqMap();
 init_AAn();
 init_ASetByBSTFilter();
 init_ATypeAn();
 init_ASetByBSTConv();
 init_AOptimAn();
 init_ABSTreeConv();
 init_ATransAn();
 init_AMapReduce();
 init_APragmaAn();
 DEN("optimizing procedures ...",__ATranslate_31);
 DEN("TransOpt",__ATranslate_30);
 LCLS(1,_ATranslate_29,__ATranslate_29);
 CLS(4,_ATranslate_28,__ATranslate_28);
 CLS(4,_ATranslate_27,__ATranslate_27);
 CLS(5,_ATranslate_26,__ATranslate_26);
 CLS(5,_ATranslate_25,__ATranslate_25);
 CLS(3,_ATranslate_24,__ATranslate_24);
 DEN("translating functions ...",__ATranslate_22);
 DEN("analyzing types ...",__ATranslate_21);
 DEN("gForeign:",__ATranslate_20);
 CLS(4,_ATranslate_19,__ATranslate_19);
 CLS(4,_ATranslate_18,__ATranslate_18);
 CLS(4,_ATranslate_17,__ATranslate_17);
 CLS(3,_ATranslate_16,__ATranslate_16);
 DEN("OptimSel",__ATranslate_15);
 CLS(2,_ATranslate_14,__ATranslate_14);
 DEN("optimizing selections ...",__ATranslate_13);
 CLS(1,_ATranslate_12,__ATranslate_12);
 CLS(3,_ATranslate_11,__ATranslate_11);
 CLS(4,_ATranslate_10,__ATranslate_10);
 CLS(3,_ATranslate_9,__ATranslate_9);
 CLS(2,_ATranslate_8,__ATranslate_8);
 CLS(5,_ATranslate_7,__ATranslate_7);
 CLS(5,_ATranslate_6,__ATranslate_6);
 CLS(2,_ATranslate_5,__ATranslate_5);
 CLS(3,_ATranslate_36,__ATranslate_36);
 CLS(1,_ATranslate_4,__ATranslate_4);
 CLS(2,_ATranslate_35,__ATranslate_35);
 CLS(2,_ATranslate_3,__ATranslate_3);
 CLS(2,_ATranslate_34,__ATranslate_34);
 CLS(1,_ATranslate_33,__ATranslate_33);
 CLS(2,_ATranslate_1,__ATranslate_1);
 DEN("translating to imperative code ...",__ATranslate_32);
 MTH(5,0,4,_mt_5_0_4);LZYMTH(5,0,4,_mt_5_0_4);
 MTH(5,4,1,_mt_5_4_1);LZYMTH(5,4,1,_mt_5_4_1_l);
 CPPRD(__ANatMap_3,1);
 COPY(__AIdeSet_2,1);
 PRD1(2,__ATranslate_23);FLD1(__ATranslate_23,1)=__ANatMap_3;FLD1(__ATranslate_23,2)=__AIdeSet_2;}

