

#include "BUILTIN.h"
extern OBJ _ADArray_15(OBJ,OBJ,OBJ);extern OBJ __ADArray_15;
extern OBJ _AImpExpEntry_126(OBJ);extern OBJ __AImpExpEntry_126;

#include "Array.h"
extern TUP2 _AMaps4SigAna_13(OBJ);extern OBJ __AMaps4SigAna_13;
extern OBJ __AMaps4SigAna_24;
extern OBJ _AMaps4SigAna_25(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMaps4SigAna_25;
extern OBJ _AMaps4SigAna_28(OBJ);extern OBJ __AMaps4SigAna_28;
extern OBJ __AMaps4SigAna_30;
extern OBJ __AAttributes_11;
extern OBJ _APair_5(OBJ);extern OBJ __APair_5;
extern TUP2 _AImpDecl4SigAna_35(OBJ,OBJ,OBJ);extern OBJ __AImpDecl4SigAna_35;
extern OBJ _AImpDecl4SigAna_41(OBJ,OBJ);extern OBJ __AImpDecl4SigAna_41;
extern OBJ _AInterOpalAccess_16(OBJ);extern OBJ __AInterOpalAccess_16;
extern OBJ _AInterOpalAccess_37(OBJ);extern OBJ __AInterOpalAccess_37;
extern OBJ _AInterOpalModifier_2(OBJ);extern OBJ __AInterOpalModifier_2;
extern OBJ _AInterOpalModifier_3(OBJ);extern OBJ __AInterOpalModifier_3;
extern OBJ _AInterOpalModifier_9(OBJ);extern OBJ __AInterOpalModifier_9;
extern OBJ _ARep_2(OBJ,OBJ);extern OBJ __ARep_2;
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern TUP2 _ASeqMapEnv_4(OBJ,OBJ,OBJ);extern OBJ __ASeqMapEnv_4;

#include "Nat.h"
extern OBJ _ASeqReduce_4(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_4;

#include "Char.h"

#include "Bitset.h"
extern OBJ _ADEBUG_2(OBJ,OBJ,OBJ);extern OBJ __ADEBUG_2;
extern OBJ _ADEBUG_10(OBJ);extern OBJ __ADEBUG_10;

#include "Int.h"
extern OBJ __AObjects_29;
extern OBJ __AObjects_30;
extern TUP2 _AStructPrep_1(OBJ,OBJ,OBJ);OBJ __AStructPrep_1; /* preInsertStruct */
OBJ __AStructPrep_3; /* strDecTab? */
extern TUP2 _AStructPrep_4(OBJ,OBJ,OBJ);OBJ __AStructPrep_4; /* addExplPreImports */
extern OBJ _AStructPrep_5(OBJ,OBJ,OBJ);OBJ __AStructPrep_5; /* preInsertTransitive */
extern OBJ _AStructPrep_6(OBJ,OBJ);OBJ __AStructPrep_6; /* preInsertTransInst */
OBJ __AStructPrep_7; /* addExplPreImports'7 */
extern OBJ _AStructPrep_8(OBJ,OBJ);OBJ __AStructPrep_8; /* preInsertStruct'8 */
OBJ __AStructPrep_9; /* strDecTab?'9 */

extern TUP2 _AStructPrep_1(OBJ x1,OBJ x2,OBJ x3) /* preInsertStruct */
{TUP2 r;
 CPCLS(__AStructPrep_5,1);
 CPPRD(x1,1);
 {OBJ x10;
  x10=(*(OBJ(*)(OBJ,OBJ))METHOD(__AStructPrep_5,1))(__AStructPrep_5,x1);
  {OBJ x43=FLD1(x3,1);OBJ x44=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
    CPPRD(x43,2);
   }else{
    CPPRD(x43,3);COPY(x44,1);}
   {OBJ x45;OBJ x46;OBJ x47;OBJ x51;OBJ x48;OBJ x52;OBJ x53;OBJ x55;OBJ x56;OBJ x58;OBJ x59;OBJ x60;OBJ x61;OBJ x62;
    x45=_AInterOpalAccess_37(x43);
    x46=_AInterOpalModifier_2(x43);
    x47=_AInterOpalAccess_16(x43);
    if(ISPRM(x46)){
     COPY(x2,1);
     CPCLS(__AStructPrep_4,1);
     CPPRD(__AMaps4SigAna_24,1);
     CPPRD(__AMaps4SigAna_30,1);
     x51=__ABUILTIN_3;
    }else{
     if(EXPRD(x46,1)){
      DSPRD(x46);
     }else{
      DCPRD(x46,1);}
     COPY(x2,1);
     CPCLS(__AStructPrep_4,1);
     CPPRD(__AMaps4SigAna_24,1);
     CPPRD(__AMaps4SigAna_30,1);
     x51=__ABUILTIN_5;}
    x48=_ARep_2(x1,x45);
    CPPRD(x48,1);
    x52=_AImpDecl4SigAna_41(x2,x48);
    x53=(*(OBJ(*)(OBJ,OBJ))METHOD(__AStructPrep_4,1))(__AStructPrep_4,x51);
    {TUP2 t=_ASeqMapEnv_4(x53,x52,x44);
     x55=t.c1;
     x56=t.c2;}
    {TUP2 t=_AImpDecl4SigAna_35(x2,x48,x55);
     x58=t.c1;
     x59=t.c2;}
    x60=_AMaps4SigAna_25(__AMaps4SigAna_24,__AObjects_29,x59,__AMaps4SigAna_30);
    if(x_x3){
     RSOME(x3,x61);FLD1(x61,1)=x58;FLD1(x61,2)=x60;
    }else{
     FRPRD(x3,1);PRD1(2,x61);FLD1(x61,1)=x58;FLD1(x61,2)=x60;}
    x62=_ASeqReduce_4(x10,x61,x47);
    {OBJ x63=FLD1(x62,1);OBJ x64=FLD1(x62,2);
     if(EXPRD(x62,1)){
      CPPRD(x64,1);
      r.c1=x63;
      CPCLS(__AStructPrep_8,1);
      {OBJ x65;
       x65=(*(OBJ(*)(OBJ,OBJ))METHOD(__AStructPrep_8,1))(__AStructPrep_8,x64);
       RSOME(x62,r.c2);FLD1(r.c2,2)=x56;
       FLD1(r.c2,1)=_ADEBUG_2(__AStructPrep_3,x65,x64);}
     }else{
      COPY(x63,1);CPPRD(x64,2);
      r.c1=x63;
      CPCLS(__AStructPrep_8,1);
      {OBJ x65;
       x65=(*(OBJ(*)(OBJ,OBJ))METHOD(__AStructPrep_8,1))(__AStructPrep_8,x64);
       FRPRD(x62,1);PRD1(2,r.c2);FLD1(r.c2,2)=x56;
       FLD1(r.c2,1)=_ADEBUG_2(__AStructPrep_3,x65,x64);}}}}}}
 return r;}
extern OBJ _AStructPrep_1_c(OBJ x1,OBJ x2,OBJ x3) /* preInsertStruct */
{OBJ r;
 {TUP2 t=_AStructPrep_1(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _AStructPrep_4(OBJ x1,OBJ x2,OBJ x3) /* addExplPreImports */
{TUP2 r;
 {OBJ x12=FLD1(x3,2);
  if(EXPRD(x3,1)){
   FRPRD(FLD1(x3,1),1);DSPRDF(x3);
  }else{
   FRPRD(x3,1);}
  {OBJ x14;OBJ x15;
   if(ISTGPRM(x1,1)){
    {TUP2 t=_AMaps4SigAna_13(x2);
     x14=t.c1;
     x15=t.c2;}
   }else{
    CPPRD(__AStructPrep_7,1);
    x14=x2;x15=__AStructPrep_7;}
   if(ISTGPRM(x12,1)){
    r.c1=x14;
    r.c2=_AImpExpEntry_126(x15);
   }else{
    r.c1=x14;r.c2=x15;}}}
 return r;}
extern OBJ _AStructPrep_4_c(OBJ x1,OBJ x2,OBJ x3) /* addExplPreImports */
{OBJ r;
 {TUP2 t=_AStructPrep_4(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AStructPrep_5(OBJ x1,OBJ x2,OBJ x3) /* preInsertTransitive */
{OBJ r;
 CPPRD(x2,1);
 {OBJ x19;
  x19=_AInterOpalModifier_3(x2);
  {OBJ x52=FLD1(x3,1);OBJ x53=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
   }else{
    COPY(x52,1);CPPRD(x53,1);}
   {OBJ x85=FLD1(x2,2);OBJ x86=FLD1(x2,3);
    if(EXPRD(x2,1)){
     FLD1(x2,2)=NIL;FLD1(x2,3)=NIL;DSPRD(x2);
    }else{
     COPY(x85,1);CPPRD(x86,1);
     FRPRD(x2,1);}
    CPCLS(__APair_5,1);
    {OBJ x92;OBJ x93;
     x92=_ASeqMap_3(__APair_5,x19);
     x93=_ARep_2(x1,x86);
     if(ISPRD(x85)){
      {OBJ x94=FLD1(x85,1);
       if(EXPRD(x85,1)){
	DSPRDF(x85);
       }else{
	FRPRD(x85,1);}
       COPY(x52,1);
       CPPRD(x93,1);
       CPCLS(__AStructPrep_6,1);
       CPPRD(__AMaps4SigAna_30,1);
       {OBJ x95;OBJ x96;OBJ x97;
	x95=_AImpDecl4SigAna_41(x52,x93);
	if(x_x3){
	 RSOME(x3,x96);FLD1(x96,1)=x95;FLD1(x96,2)=__AMaps4SigAna_30;
	}else{
	 FRPRD(x3,1);PRD1(2,x96);FLD1(x96,1)=x95;FLD1(x96,2)=__AMaps4SigAna_30;}
	x97=_ASeqReduce_4(__AStructPrep_6,x96,x92);
	{OBJ x98=FLD1(x97,1);OBJ x99=FLD1(x97,2);
	 if(EXPRD(x97,1)){
	  {TUP2 x101;
	   x101=_AImpDecl4SigAna_35(x52,x93,x98);
	   RSOME(x97,r);FLD1(r,1)=x101.c1;
	   FLD1(r,2)=_AMaps4SigAna_25(x53,x94,x101.c2,x99);}
	 }else{
	  CPPRD(x98,1);CPPRD(x99,1);
	  {TUP2 x101;
	   x101=_AImpDecl4SigAna_35(x52,x93,x98);
	   FRPRD(x97,1);PRD1(2,r);FLD1(r,1)=x101.c1;
	   FLD1(r,2)=_AMaps4SigAna_25(x53,x94,x101.c2,x99);}}}}}
     }else{
      HLT("InterOpal at <unknown> : undefined selection no\'InterOpal:origin->nat");}}}}}
 return r;}

extern OBJ _AStructPrep_6(OBJ x1,OBJ x2) /* preInsertTransInst */
{OBJ r;
 {OBJ x9;
  x9=_AInterOpalModifier_9(x1);
  {OBJ x18=FLD1(x2,1);OBJ x19=FLD1(x2,2);FLAG x_x2=EXPRD(x2,1);
   if(x_x2){
   }else{
    CPPRD(x18,1);CPPRD(x19,1);}
   {TUP2 x21;
    x21=_AMaps4SigAna_13(x18);
    {OBJ x23=FLD1(x21.c2,1);
     if(EXPRD(x21.c2,1)){
      FRPRD(FLD1(x21.c2,3),1);DSPRDF(x21.c2);
     }else{
      FRPRD(x21.c2,1);}
     {
      if(x_x2){
       RSOME(x2,r);FLD1(r,1)=x21.c1;
      }else{
       FRPRD(x2,1);PRD1(2,r);FLD1(r,1)=x21.c1;}
      FLD1(r,2)=_ADArray_15(x19,x9,x23);}}}}}
 return r;}

extern OBJ _AStructPrep_8(OBJ x1,OBJ x2) /* preInsertStruct'8 */
{OBJ r;
 r=_AMaps4SigAna_28(x1);
 return r;}



init_AStructPrep()
{
 static int visited=0; if(visited) return; visited=1;
 init_AGlobSigImpl();
 init_APartNameEntry();
 init_AName();
 init_ATable();
 init_AGlobSig();
 init_ADArray();
 init_AImpExpEntry();
 init_ANatMap();
 init_AInterOpal();
 init_AArray();
 init_AMaps4SigAna();
 init_AAttributes();
 init_AOcOptions();
 init_APatterns();
 init_APair();
 init_AUniqueTable();
 init_ARepTab();
 init_ADeclEntry();
 init_ASeq();
 init_ADyn();
 init_AStruct();
 init_AImpDecl4SigAna();
 init_APartName();
 init_AInterOpalAccess();
 init_AImpl();
 init_AInterOpalModifier();
 init_AGlobPragma();
 init_AOcError();
 init_AOcPos();
 init_ACompose();
 init_ARep();
 init_ATriple();
 init_APragma();
 init_ASeqMap();
 init_AMap();
 init_ASeqMapEnv();
 init_ANat();
 init_ASeqReduce();
 init_AOption();
 init_AMySeqFun1();
 init_ASet();
 init_AMySeqFun2();
 init_AChar();
 init_AAbsyFun2();
 init_AFct();
 init_AOptionMap();
 init_ABitset();
 init_ADEBUG();
 init_ACom();
 init_AGlobSigToText();
 init_AStream();
 init_ADArrayReduce();
 init_AVoid();
 init_ASetByBST();
 init_AString();
 init_ABSTree();
 init_AFile();
 init_ATree();
 init_AInt();
 init_ALexem();
 init_AObjects();
 DEN("-zstrDecTab",__AStructPrep_9);
 LCLS(2,_AStructPrep_8,__AStructPrep_8);
 CLS(2,_AStructPrep_6,__AStructPrep_6);
 CLS(3,_AStructPrep_5,__AStructPrep_5);
 CLS(3,_AStructPrep_4_c,__AStructPrep_4);
 CLS(3,_AStructPrep_1_c,__AStructPrep_1);
 CPPRD(__AStructPrep_9,1);
 __AStructPrep_3=_ADEBUG_10(__AStructPrep_9);
 CPPRD(__AAttributes_11,1);
 PRD1(3,__AStructPrep_7);FLD1(__AStructPrep_7,1)=__AObjects_30;FLD1(__AStructPrep_7,2)=__ANat_5;FLD1(__AStructPrep_7,3)=__AAttributes_11;}

