

#include "BUILTIN.h"
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _ASeqFilter_2(OBJ,OBJ);extern OBJ __ASeqFilter_2;
extern OBJ _ABuiltin_17(OBJ);extern OBJ __ABuiltin_17;
extern OBJ _AInterOpalAccess_1(OBJ,OBJ);extern OBJ __AInterOpalAccess_1;
extern OBJ _AInterOpalAccess_8(OBJ,OBJ);extern OBJ __AInterOpalAccess_8;
extern OBJ _AInterOpalAccess_14(OBJ);extern OBJ __AInterOpalAccess_14;
extern OBJ _AInterOpalAccess_19(OBJ);extern OBJ __AInterOpalAccess_19;
extern OBJ _AInterOpalAccess_29(OBJ,OBJ);extern OBJ __AInterOpalAccess_29;
extern OBJ __ASeq_6;
extern OBJ _ASeq_52(OBJ,OBJ);extern OBJ __ASeq_52;
extern OBJ _ANameTranslation_2(OBJ,OBJ);extern OBJ __ANameTranslation_2;
extern OBJ __AInterOpal_21;
extern OBJ _AInterOpal_25(OBJ);extern OBJ __AInterOpal_25;
extern OBJ _AInterOpal_28(OBJ);extern OBJ __AInterOpal_28;
extern OBJ _AInterOpal_39(OBJ);extern OBJ __AInterOpal_39;

#include "Denotation.h"
extern OBJ _AParameterTranslation_4(OBJ);extern OBJ __AParameterTranslation_4;

#include "Array.h"

#include "Nat.h"
extern OBJ _ACompose_4(OBJ,OBJ,OBJ);extern OBJ __ACompose_4;

#include "Char.h"

#include "Int.h"
OBJ __AFctTranslation_1; /* nullType */
extern OBJ _AFctTranslation_2(OBJ,OBJ,OBJ);OBJ __AFctTranslation_2; /* type */
extern OBJ _AFctTranslation_3(OBJ,OBJ,OBJ);OBJ __AFctTranslation_3; /* type,1 */
extern OBJ _AFctTranslation_4(OBJ,OBJ,OBJ);OBJ __AFctTranslation_4; /* type,2 */
extern OBJ _AFctTranslation_5(OBJ,OBJ);OBJ __AFctTranslation_5; /* optFun */
extern OBJ _AFctTranslation_6(OBJ,OBJ);OBJ __AFctTranslation_6; /* optGen */
extern OBJ _AFctTranslation_9(OBJ);OBJ __AFctTranslation_9; /* bool */
extern OBJ _AFctTranslation_11(OBJ);OBJ __AFctTranslation_11; /* tuple */
extern OBJ _AFctTranslation_13(OBJ,OBJ);OBJ __AFctTranslation_13; /* optSpec */
extern OBJ _AFctTranslation_14(OBJ,OBJ);OBJ __AFctTranslation_14; /* type,2'14 */
OBJ __AFctTranslation_15; /* type,1'15 */
OBJ __AFctTranslation_16; /* bool'16 */
extern OBJ _AFctTranslation_17(OBJ);OBJ __AFctTranslation_17; /* bool'17 */
OBJ __AFctTranslation_18; /* bool'18 */
extern OBJ _AFctTranslation_19(OBJ);OBJ __AFctTranslation_19; /* bool'19 */
OBJ __AFctTranslation_20; /* type'20 */
OBJ __AFctTranslation_21; /* type'21 */

extern OBJ _AFctTranslation_2(OBJ x1,OBJ x2,OBJ x3) /* type */
{OBJ r;
 if(ISPRM(x3)){
  HLT("type\'FctTranslation: not defined for sort");
 }else{
  if(ISTGPRD(x3,1)){
   {OBJ x32=FLD(x3,1);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     CPPRD(x32,1);
     FRPRD(x3,1);}
    r=_AFctTranslation_3(x1,x2,x32);}
  }else{
   {OBJ x33=FLD(x3,1);
    if(EXPRD(x3,1)){
     CPPRD(x33,1);
     FRPRD(FLD(x3,2),1);DSPRDF(x3);
    }else{
     CPPRD(x33,2);
     FRPRD(x3,1);}
    CPPRD(__AFctTranslation_20,1);
    {OBJ x35;
     ADenotation_21(x33,__AFctTranslation_20,x35);
     if(ISTGPRM(x35,1)){
      FRPRD(x33,1);
      CPPRD(x1,1);
      {OBJ x36;
       x36=_AFctTranslation_9(x1);
       r=_AFctTranslation_3(x1,x2,x36);}
     }else{
      FRPRD(x1,1);
      FRPRD(x2,1);
      CPPRD(__AFctTranslation_21,1);
      {OBJ x37;
       ADenotation_4(__AFctTranslation_21,x33,x37);
       ABUILTIN_12(x37,r);}}}}}}
 return r;}

extern OBJ _AFctTranslation_3(register OBJ x1,register OBJ x2,register OBJ x3) /* type,1 */
{OBJ r;OBJ* p1=&r;
 for(;;){
  switch(TGPRD(x3)){
   case 0:
    {OBJ x214=FLD(x3,1);
     if(EXPRD(x3,1)){
      DSPRDF(x3);
     }else{
      CPPRD(x214,1);
      FRPRD(x3,1);}
     *p1=_AFctTranslation_4(x1,x2,x214);}break;
   case 1:
    HLT("type\'FctTranslation: not defined for tuple");break;
   default: 
    {OBJ x185=FLD(x3,1);OBJ x186=FLD(x3,2);FLAG x_x3=EXPRD(x3,1);
     if(x_x3){
     }else{
      CPPRD(x185,1);CPPRD(x186,1);}
     if(ISTGPRD(x185,1)){
      {OBJ x187=FLD(x185,1);
       if(EXPRD(x185,1)){
	DSPRDF(x185);
       }else{
	COPY(x187,1);
	FRPRD(x185,1);}
       {OBJ x189;
	if(ISTGPRD(x186,1)){
	 x189=__ABUILTIN_5;
	}else{
	 x189=__ABUILTIN_3;}
	if(ISPRM(x187)){
	 if(ISTGPRM(x189,1)){
	  CPCLS(__AFctTranslation_3,1);
	  {OBJ x190;
	   x190=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AFctTranslation_3,2))(__AFctTranslation_3,x1,x2);
	   if(ISTGPRD(x186,1)){
	    {OBJ x191=FLD(x186,1);
	     if(EXPRD(x186,1)){
	      DSPRDF(x186);
	     }else{
	      COPY(x191,1);
	      FRPRD(x186,1);}
	     COPY(__AFctTranslation_15,1);
	     {OBJ x192;
	      x192=_ASeqMap_3(x190,x191);
	      if(x_x3){
	       RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,1)=__AFctTranslation_15;
	      }else{
	       FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,1)=__AFctTranslation_15;}
	      FLD(*p1,2)=_AFctTranslation_11(x192);}}
	   }else{
	    HLT("InterOpal at <unknown> : undefined selection elems\'InterOpal:fct->seq");}}
	 }else{
	  COPY(__AFctTranslation_15,1);
	  {
	   if(x_x3){
	    RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,1)=__AFctTranslation_15;
	   }else{
	    FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,1)=__AFctTranslation_15;}
	   x3=x186;p1=&FLD(*p1,2);continue;}}
	}else{
	 if(ISTGPRM(x189,1)){
	  CPCLS(__AFctTranslation_3,1);
	  {OBJ x197;
	   x197=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AFctTranslation_3,2))(__AFctTranslation_3,x1,x2);
	   if(ISTGPRD(x186,1)){
	    {OBJ x198=FLD(x186,1);
	     if(EXPRD(x186,1)){
	      DSPRDF(x186);
	     }else{
	      COPY(x198,1);
	      FRPRD(x186,1);}
	     CPCLS(x197,1);
	     {OBJ x199;OBJ x200;
	      x199=_ASeqMap_3(x197,x198);
	      x200=_ASeqMap_3(x197,x187);
	      if(x_x3){
	       RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,1)=x200;
	      }else{
	       FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,1)=x200;}
	      FLD(*p1,2)=_AFctTranslation_11(x199);}}
	   }else{
	    HLT("InterOpal at <unknown> : undefined selection elems\'InterOpal:fct->seq");}}
	 }else{
	  CPPRD(x1,1);
	  CPPRD(x2,1);
	  CPCLS(__AFctTranslation_3,1);
	  {OBJ x202;OBJ x203;
	   x202=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AFctTranslation_3,2))(__AFctTranslation_3,x1,x2);
	   x203=_AFctTranslation_3(x1,x2,x186);
	   if(x_x3){
	    RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,2)=x203;
	   }else{
	    FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,2)=x203;}
	   FLD(*p1,1)=_ASeqMap_3(x202,x187);}}}}}
     }else{
      if(ISTGPRD(x186,1)){
       {OBJ x205=FLD(x186,1);
	if(EXPRD(x186,1)){
	 DSPRDF(x186);
	}else{
	 COPY(x205,1);
	 FRPRD(x186,1);}
	CPPRD(x1,1);
	CPPRD(x2,1);
	CPCLS(__AFctTranslation_3,1);
	{OBJ x206;OBJ x207;OBJ x208;OBJ x209;
	 x206=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AFctTranslation_3,2))(__AFctTranslation_3,x1,x2);
	 x207=_AFctTranslation_3(x1,x2,x185);
	 PRD1(2,x208);FLD1(x208,1)=x207;FLD1(x208,2)=__ASeq_6;
	 x209=_ASeqMap_3(x206,x205);
	 if(x_x3){
	  RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,1)=x208;
	 }else{
	  FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,1)=x208;}
	 FLD(*p1,2)=_AFctTranslation_11(x209);}}
      }else{
       CPPRD(x1,1);
       CPPRD(x2,1);
       {OBJ x212;OBJ x211;OBJ x213;
	x212=_AFctTranslation_3(x1,x2,x186);
	x211=_AFctTranslation_3(x1,x2,x185);
	PRD1(2,x213);FLD1(x213,1)=x211;FLD1(x213,2)=__ASeq_6;
	if(x_x3){
	 RPRD(x3,*p1);CHGTG(*p1,3);FLD(*p1,1)=x213;FLD(*p1,2)=x212;
	}else{
	 FRPRD(x3,1);PRD(2,3,*p1);FLD(*p1,1)=x213;FLD(*p1,2)=x212;}}}}}}
  break;}
 return r;}

extern OBJ _AFctTranslation_4(OBJ x1,OBJ x2,OBJ x3) /* type,2 */
{OBJ r;
 CPPRD(x1,2);
 CPPRD(x3,2);
 {OBJ x4;OBJ x5;OBJ x6;
  x4=_ANameTranslation_2(x1,x3);
  x5=_AInterOpalAccess_8(x1,x3);
  PRD(1,1,x6);FLD(x6,1)=x4;
  if(ISTGPRM(x5,1)){
   r=x6;
   FRPRD(x1,1);
   FRPRD(x2,1);
   FRPRD(x3,1);
  }else{
   CPPRD(x3,1);
   CPCLS(__AInterOpal_28,1);
   CPCLS(__AInterOpal_39,1);
   {OBJ x7;
    x7=_ACompose_4(__AInterOpal_28,__AInterOpal_39,x3);
    if(ISTGPRM(x7,1)){
     FRPRD(x1,1);
     FRPRD(x3,1);
     {OBJ x8;
      x8=_AParameterTranslation_4(x2);
      if(ISPRM(x8)){
       r=x6;
      }else{
       PRD(2,6,r);FLD(r,1)=x6;FLD(r,2)=x8;}}
    }else{
     CPPRD(x3,1);
     CPCLS(__AInterOpal_25,1);
     CPCLS(__AInterOpal_39,1);
     {OBJ x11;
      x11=_ACompose_4(__AInterOpal_25,__AInterOpal_39,x3);
      if(ISTGPRM(x11,1)){
       CPPRD(x1,2);
       CPCLS(__AFctTranslation_4,1);
       CPCLS(__AFctTranslation_14,1);
       {OBJ x13;OBJ x12;OBJ x14;OBJ x15;OBJ x16;
	x13=_AInterOpalAccess_29(x1,x3);
	x12=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AFctTranslation_4,2))(__AFctTranslation_4,x1,x2);
	x14=(*(OBJ(*)(OBJ,OBJ))METHOD(__AFctTranslation_14,1))(__AFctTranslation_14,x1);
	x15=_ASeqFilter_2(x14,x13);
	x16=_ASeqMap_3(x12,x15);
	if(ISPRM(x16)){
	 r=x6;
	}else{
	 PRD(2,6,r);FLD(r,1)=x6;FLD(r,2)=x16;}}
      }else{
       HLT("FctTranslation at <116,9-119,23> : missing else in type\'FctTranslation:interOpal**info->name->type");}}}}}}
 return r;}

extern OBJ _AFctTranslation_5(OBJ x1,OBJ x2) /* optFun */
{OBJ r;
 if(ISPRM(x1)){
  r=x2;
 }else{
  PRD(2,3,r);FLD(r,1)=x1;FLD(r,2)=x2;}
 return r;}

extern OBJ _AFctTranslation_6(OBJ x1,OBJ x2) /* optGen */
{OBJ r;
 if(ISPRM(x1)){
  r=x2;
 }else{
  PRD(2,7,r);FLD(r,1)=x1;FLD(r,2)=x2;}
 return r;}

extern OBJ _AFctTranslation_9(OBJ x1) /* bool */
{OBJ r;
 CPCLS(__AFctTranslation_17,1);
 {OBJ x2;OBJ x3;
  x2=_AInterOpalAccess_14(x1);
  x3=_ASeqFilter_2(__AFctTranslation_17,x2);
  if(ISPRM(x3)){
   HLT("bool\'FctTranslation: no structure BOOL \?!");
  }else{
   {OBJ x54=FLD1(x3,1);
    if(EXPRD(x3,1)){
     CPPRD(x54,1);
     FREE(FLD1(x3,2),1);DSPRDF(x3);
    }else{
     CPPRD(x54,2);
     FRPRD(x3,1);}
    CPCLS(__AFctTranslation_19,1);
    {OBJ x56;OBJ x57;
     x56=_AInterOpalAccess_19(x54);
     x57=_ASeqFilter_2(__AFctTranslation_19,x56);
     if(ISPRM(x57)){
      HLT("bool\'FctTranslation: no sort bool \?!");
     }else{
      {OBJ x58=FLD1(x57,1);
       if(EXPRD(x57,1)){
	FREE(FLD1(x57,2),1);DSPRDF(x57);
       }else{
	CPPRD(x58,1);
	FRPRD(x57,1);}
       {OBJ x61=FLD1(x54,2);
	if(EXPRD(x54,1)){
	 FLD1(x54,2)=NIL;DSPRD(x54);
	}else{
	 COPY(x61,1);
	 FRPRD(x54,1);}
	{OBJ x69=FLD1(x58,2);
	 if(EXPRD(x58,1)){
	  DSPRD(x58);
	 }else{
	  FRPRD(x58,1);}
	 {OBJ x75;
	  PRD1(3,x75);FLD1(x75,1)=x69;FLD1(x75,2)=x61;FLD1(x75,3)=__AInterOpal_21;
	  PRD(1,0,r);FLD(r,1)=x75;}}}}}}}}}
 return r;}

extern OBJ _AFctTranslation_11(OBJ x1) /* tuple */
{OBJ r;
 COPY(x1,1);
 {OBJ x2;OBJ x3;OBJ x4;
  x2=_ASeq_52(x1,__ANat_5);
  x3=_ABuiltin_17(x2);
  PRD(1,1,x4);FLD(x4,1)=x3;
  if(ISPRM(x1)){
   r=x4;
  }else{
   PRD(2,6,r);FLD(r,1)=x4;FLD(r,2)=x1;}}
 return r;}

extern OBJ _AFctTranslation_13(OBJ x1,OBJ x2) /* optSpec */
{OBJ r;
 if(ISPRM(x2)){
  r=x1;
 }else{
  PRD(2,6,r);FLD(r,1)=x1;FLD(r,2)=x2;}
 return r;}

extern OBJ _AFctTranslation_14(OBJ x1,OBJ x2) /* type,2'14 */
{OBJ r;
 r=_AInterOpalAccess_1(x1,x2);
 return r;}

extern OBJ _AFctTranslation_17(OBJ x1) /* bool'17 */
{OBJ r;
 {OBJ x4=FLD1(x1,3);
  if(EXPRD(x1,1)){
   FLD1(x1,3)=NIL;DSPRD(x1);
  }else{
   CPPRD(x4,1);
   FRPRD(x1,1);}
  CPPRD(__AFctTranslation_16,1);
  {OBJ x10;
   x10=x4;
   ADenotation_21(x10,__AFctTranslation_16,r);}}
 return r;}

extern OBJ _AFctTranslation_19(OBJ x1) /* bool'19 */
{OBJ r;
 {OBJ x21=FLD1(x1,3);OBJ x22=FLD1(x1,4);
  if(EXPRD(x1,1)){
   FLD1(x1,3)=NIL;FLD1(x1,4)=NIL;DSPRD(x1);
  }else{
   CPPRD(x21,1);COPY(x22,1);
   FRPRD(x1,1);}
  CPPRD(__AFctTranslation_18,1);
  {OBJ x26;
   ADenotation_21(x21,__AFctTranslation_18,x26);
   if(ISTGPRM(x26,1)){
    if(ISPRM(x22)){
     r=__ABUILTIN_5;
    }else{
     FREE(x22,1);
     r=__ABUILTIN_3;}
   }else{
    FREE(x22,1);
    r=__ABUILTIN_3;}}}
 return r;}

static void ___AFctTranslation_1()
{
 {
  PRD(1,1,__AFctTranslation_1);
  FLD(__AFctTranslation_1,1)=_ABuiltin_17(__ANat_5);}}


init_AFctTranslation()
{
 static int visited=0; if(visited) return; visited=1;
 init_ASeqMap();
 init_ASeqReduce();
 init_ASeqFilter();
 init_ATypeAn();
 init_ABuiltin();
 init_AIde();
 init_AInterOpalAccess();
 init_ASeq();
 init_ANameTranslation();
 init_AInterOpal();
 init_ADenotation();
 init_AParameterTranslation();
 init_AArray();
 init_ANat();
 init_ASetByBST();
 init_AAc();
 init_ABSTree();
 init_ANatMap();
 init_ATree();
 init_AAn();
 init_ACompose();
 init_ASourceAn();
 init_AOptimAn();
 init_ATransAn();
 init_APragmaAn();
 init_AOption();
 init_AStore();
 init_AFormat();
 init_AString();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ASet();
 init_APair();
 init_AIdeMap();
 init_AMap();
 init_ADyn();
 DEN("type\'FctTranslation: not defined for other/",__AFctTranslation_21);
 DEN("any",__AFctTranslation_20);
 CLS(1,_AFctTranslation_19,__AFctTranslation_19);
 DEN("bool",__AFctTranslation_18);
 CLS(1,_AFctTranslation_17,__AFctTranslation_17);
 DEN("BOOL",__AFctTranslation_16);
 CLS(2,_AFctTranslation_14,__AFctTranslation_14);
 CLS(2,_AFctTranslation_13,__AFctTranslation_13);
 CLS(1,_AFctTranslation_11,__AFctTranslation_11);
 CLS(1,_AFctTranslation_9,__AFctTranslation_9);
 CLS(2,_AFctTranslation_6,__AFctTranslation_6);
 CLS(2,_AFctTranslation_5,__AFctTranslation_5);
 CLS(3,_AFctTranslation_4,__AFctTranslation_4);
 CLS(3,_AFctTranslation_3,__AFctTranslation_3);
 CLS(3,_AFctTranslation_2,__AFctTranslation_2);
 ___AFctTranslation_1();
 COPY(__AFctTranslation_1,1);
 PRD1(2,__AFctTranslation_15);FLD1(__AFctTranslation_15,1)=__AFctTranslation_1;FLD1(__AFctTranslation_15,2)=__ASeq_6;}

