

#include "BUILTIN.h"

#include "Bitset.h"
extern OBJ _AOcOptions_7(OBJ);extern OBJ __AOcOptions_7;
extern OBJ _AOcOptions_14(OBJ,OBJ);extern OBJ __AOcOptions_14;

#include "Array.h"
extern OBJ _ACom_47(OBJ,OBJ);extern OBJ __ACom_47;

#include "Nat.h"
extern TUP2 _AGlobSig4SigAna_14(OBJ,OBJ);extern OBJ __AGlobSig4SigAna_14;
extern TUP2 _AGlobSig4SigAna_15(OBJ,OBJ);extern OBJ __AGlobSig4SigAna_15;
extern TUP2 _AGlobSig4SigAna_16(OBJ,OBJ);extern OBJ __AGlobSig4SigAna_16;
extern OBJ _AGlobSig4SigAna_17(OBJ,OBJ);extern OBJ __AGlobSig4SigAna_17;
extern TUP2 _AMatchIdentFunDeep_1(OBJ,OBJ);extern OBJ __AMatchIdentFunDeep_1;
extern TUP2 _AMatchIdentFunDeep_2(OBJ,OBJ);extern OBJ __AMatchIdentFunDeep_2;
extern TUP3 _AMatchIdentFunDeep_3(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMatchIdentFunDeep_3;
extern TUP2 _AMatchIdentFunDeep_9(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMatchIdentFunDeep_9;
extern OBJ __ASeq_6;
extern TUP2 _AMatchIdentFunFlat_1(OBJ,OBJ);extern OBJ __AMatchIdentFunFlat_1;
extern TUP2 _AMatchIdentFunFlat_2(OBJ,OBJ);extern OBJ __AMatchIdentFunFlat_2;
extern TUP3 _AMatchIdentFunFlat_3(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMatchIdentFunFlat_3;
extern OBJ _AFlattenCandidateSets_1(OBJ,OBJ);extern OBJ __AFlattenCandidateSets_1;

#include "Char.h"
extern OBJ _AGlobSigToText_1(OBJ,OBJ);extern OBJ __AGlobSigToText_1;
extern OBJ __ASigAnaTexts_3;
extern OBJ __ASigAnaTexts_4;
extern OBJ __ASigAnaTexts_5;
extern OBJ __ASigAnaTexts_6;
extern OBJ _ADEBUG_2(OBJ,OBJ,OBJ);extern OBJ __ADEBUG_2;
extern OBJ _ADEBUG_4(OBJ,OBJ,OBJ);extern OBJ __ADEBUG_4;
extern OBJ __AOcVerbose_3;
extern OBJ _AOcVerbose_5(OBJ,OBJ,OBJ);extern OBJ __AOcVerbose_5;
extern OBJ _AOcVerbose_6(OBJ,OBJ,OBJ);extern OBJ __AOcVerbose_6;
extern OBJ _AOcVerbose_7(OBJ,OBJ,OBJ);extern OBJ __AOcVerbose_7;

#include "Int.h"
extern OBJ _AComCompose_5(OBJ,OBJ);extern OBJ __AComCompose_5;
extern OBJ _AComCompose_6(OBJ,OBJ);extern OBJ __AComCompose_6;

#include "Denotation.h"
extern OBJ __AObjects_29;
extern OBJ __AObjects_30;

#include "Real.h"
extern OBJ _AGlobSigFix_1(OBJ,OBJ);OBJ __AGlobSigFix_1; /* globSigFix */
extern OBJ _AGlobSigFix_3(OBJ,OBJ);OBJ __AGlobSigFix_3; /* globSigFix2 */
extern OBJ _AGlobSigFix_4(OBJ,OBJ,OBJ);OBJ __AGlobSigFix_4; /* globSigFix3 */
extern OBJ _AGlobSigFix_5(OBJ,OBJ,OBJ);OBJ __AGlobSigFix_5; /* iterateIdentFunDeletionDeep */
extern OBJ _AGlobSigFix_6(OBJ,OBJ,OBJ);OBJ __AGlobSigFix_6; /* iterateIdentFunDeletionFlat */
extern TUP2 _AGlobSigFix_7(OBJ,OBJ);OBJ __AGlobSigFix_7; /* identifyParameterDeep */
extern TUP2 _AGlobSigFix_8(OBJ,OBJ);OBJ __AGlobSigFix_8; /* identifyParameterFlat */
OBJ __AGlobSigFix_9; /* iterateIdentFunDeletionFlat'9 */
extern OBJ _AGlobSigFix_10(OBJ,OBJ,OBJ,OBJ);OBJ __AGlobSigFix_10; /* iterateIdentFunDeletionFlat'10 */
OBJ __AGlobSigFix_11; /* globSigFix2'11 */
OBJ __AGlobSigFix_12; /* globSigFix2'12 */
OBJ __AGlobSigFix_13; /* iterateIdentFunDeletionDeep'13 */
OBJ __AGlobSigFix_14; /* iterateIdentFunDeletionDeep'14 */
OBJ __AGlobSigFix_15; /* iterateIdentFunDeletionDeep'15 */
OBJ __AGlobSigFix_16; /* iterateIdentFunDeletionDeep'16 */
OBJ __AGlobSigFix_17; /* iterateIdentFunDeletionDeep'17 */
OBJ __AGlobSigFix_18; /* iterateIdentFunDeletionDeep'18 */
extern OBJ _AGlobSigFix_19(OBJ,OBJ,OBJ,OBJ);OBJ __AGlobSigFix_19; /* iterateIdentFunDeletionDeep'19 */
extern OBJ _AGlobSigFix_20(OBJ,OBJ,OBJ);OBJ __AGlobSigFix_20; /* globSigFix'20 */

extern OBJ _AGlobSigFix_1(OBJ x1,OBJ x2) /* globSigFix */
{OBJ r;
 CPCLS(__AGlobSigFix_20,1);
 CPPRD(__ASigAnaTexts_3,1);
 CPPRD(x1,1);
 {OBJ x3;OBJ x4;
  x3=_AOcVerbose_5(x1,__AOcVerbose_3,__ASigAnaTexts_3);
  x4=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AGlobSigFix_20,2))(__AGlobSigFix_20,x1,x2);
  r=_AComCompose_5(x3,x4);}
 return r;}

extern OBJ _AGlobSigFix_3(OBJ x1,OBJ x2) /* globSigFix2 */
{OBJ r;
 CPCLS(__AGlobSigFix_4,1);
 CPPRD(__AGlobSigFix_11,1);
 CPPRD(__AGlobSigFix_12,1);
 CPCLS(__AGlobSigToText_1,1);
 CPPRD(x1,3);
 COPY(x2,1);
 {OBJ x3;OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;
  x3=_AOcOptions_14(__AGlobSigFix_11,x1);
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigToText_1,1))(__AGlobSigToText_1,x2);
  x5=_AOcOptions_14(__AGlobSigFix_12,x1);
  x6=_ADEBUG_2(x3,x4,x2);
  x7=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AGlobSigFix_4,2))(__AGlobSigFix_4,x1,x5);
  x8=_AGlobSigFix_6(x1,x6,__ABUILTIN_3);
  r=_AComCompose_5(x8,x7);}
 return r;}

extern OBJ _AGlobSigFix_4(OBJ x1,OBJ x2,OBJ x3) /* globSigFix3 */
{OBJ r;
 CPCLS(__ACom_47,1);
 CPCLS(__AGlobSigToText_1,1);
 CPPRD(__ASigAnaTexts_6,1);
 COPY(x3,1);
 {OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigToText_1,1))(__AGlobSigToText_1,x3);
  x5=_AOcVerbose_7(x1,__AOcVerbose_3,__ASigAnaTexts_6);
  x6=_ADEBUG_2(x2,x4,x3);
  PRD(1,0,x7);FLD(x7,1)=x6;
  x8=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x7);
  PRD(2,0,x9);FLD(x9,1)=x8;FLD(x9,2)=__ASeq_6;
  r=_AComCompose_6(x5,x9);}
 return r;}

extern OBJ _AGlobSigFix_5(OBJ x1,OBJ x2,OBJ x3) /* iterateIdentFunDeletionDeep */
{OBJ r;
 if(ISTGPRM(x3,1)){
  CPPRD(x1,2);
  COPY(x2,1);
  CPCLS(__AGlobSigFix_7,1);
  CPPRD(__AGlobSigFix_13,1);
  CPPRD(__AGlobSigFix_14,1);
  CPCLS(__ACom_47,1);
  CPCLS(__AGlobSigToText_1,2);
  {OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;OBJ x10;OBJ x11;OBJ x12;OBJ x13;OBJ x14;
   x4=_AOcOptions_14(__AGlobSigFix_13,x1);
   x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigToText_1,1))(__AGlobSigToText_1,x2);
   x6=_AOcOptions_14(__AGlobSigFix_14,x1);
   x7=_AOcOptions_7(x1);
   x8=_ADEBUG_2(x4,x5,x2);
   x9=_AGlobSig4SigAna_17(__AGlobSigFix_7,x8);
   COPY(x9,1);
   x10=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigToText_1,1))(__AGlobSigToText_1,x9);
   x11=_ADEBUG_2(x6,x10,x9);
   x12=_AFlattenCandidateSets_1(x7,x11);
   PRD(1,0,x13);FLD(x13,1)=x12;
   x14=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x13);
   PRD(2,0,r);FLD(r,1)=x14;FLD(r,2)=__ASeq_6;}
 }else{
  CPPRD(x1,2);
  CPPRD(__AGlobSigFix_15,1);
  CPPRD(__AGlobSigFix_16,1);
  CPPRD(__AGlobSigFix_17,1);
  CPCLS(__AMatchIdentFunDeep_1,1);
  CPCLS(__AMatchIdentFunDeep_2,1);
  CPCLS(__AMatchIdentFunDeep_3,1);
  CPPRD(__ASigAnaTexts_4,1);
  {OBJ x15;OBJ x17;TUP2 x18;OBJ x20;OBJ x31;
   x15=_AOcVerbose_6(x1,__AOcVerbose_3,__ASigAnaTexts_4);
   x17=_AOcOptions_14(__AGlobSigFix_15,x1);
   x18=_AGlobSig4SigAna_16(__AMatchIdentFunDeep_3,x2);
   x20=_ADEBUG_4(x17,__AGlobSigFix_16,x18.c1);
   {TUP2 x22;OBJ x24;TUP2 x26;OBJ x28;OBJ x29;OBJ x30;
    x22=_AGlobSig4SigAna_15(__AMatchIdentFunDeep_2,x20);
    x24=_ADEBUG_4(x17,__AGlobSigFix_17,x22.c1);
    x26=_AGlobSig4SigAna_14(__AMatchIdentFunDeep_1,x24);
    if(ISTGPRM(x26.c2,1)){
     x28=x22.c2;
    }else{
     x28=__ABUILTIN_3;}
    if(ISTGPRM(x28,1)){
     x29=x18.c2;
     CPPRD(__AGlobSigFix_18,1);
     CPCLS(__AGlobSigFix_19,1);
    }else{
     CPPRD(__AGlobSigFix_18,1);
     CPCLS(__AGlobSigFix_19,1);
     x29=__ABUILTIN_3;}
    x30=_ADEBUG_4(x17,__AGlobSigFix_18,x26.c1);
    x31=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__AGlobSigFix_19,3))(__AGlobSigFix_19,x1,x29,x30);}
   r=_AComCompose_5(x15,x31);}}
 return r;}

extern OBJ _AGlobSigFix_6(OBJ x1,OBJ x2,OBJ x3) /* iterateIdentFunDeletionFlat */
{OBJ r;
 if(ISTGPRM(x3,1)){
  COPY(x2,1);
  CPCLS(__AGlobSigFix_8,1);
  CPPRD(__AGlobSigFix_9,1);
  CPCLS(__ACom_47,1);
  CPCLS(__AGlobSigToText_1,1);
  {OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;
   x4=_AOcOptions_14(__AGlobSigFix_9,x1);
   x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigToText_1,1))(__AGlobSigToText_1,x2);
   x6=_ADEBUG_2(x4,x5,x2);
   x7=_AGlobSig4SigAna_17(__AGlobSigFix_8,x6);
   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;}
 }else{
  CPPRD(x1,1);
  CPCLS(__AMatchIdentFunFlat_1,1);
  CPCLS(__AMatchIdentFunFlat_2,1);
  CPCLS(__AMatchIdentFunFlat_3,1);
  CPPRD(__ASigAnaTexts_5,1);
  {OBJ x10;TUP2 x12;OBJ x22;
   x10=_AOcVerbose_6(x1,__AOcVerbose_3,__ASigAnaTexts_5);
   x12=_AGlobSig4SigAna_16(__AMatchIdentFunFlat_3,x2);
   {TUP2 x15;TUP2 x18;OBJ x20;OBJ x21;
    x15=_AGlobSig4SigAna_15(__AMatchIdentFunFlat_2,x12.c1);
    x18=_AGlobSig4SigAna_14(__AMatchIdentFunFlat_1,x15.c1);
    if(ISTGPRM(x18.c2,1)){
     x20=x15.c2;
    }else{
     x20=__ABUILTIN_3;}
    if(ISTGPRM(x20,1)){
     x21=x12.c2;
     CPCLS(__AGlobSigFix_10,1);
    }else{
     CPCLS(__AGlobSigFix_10,1);
     x21=__ABUILTIN_3;}
    x22=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__AGlobSigFix_10,3))(__AGlobSigFix_10,x1,x18.c1,x21);}
   r=_AComCompose_5(x10,x22);}}
 return r;}

extern TUP2 _AGlobSigFix_7(OBJ x1,OBJ x2) /* identifyParameterDeep */
{TUP2 r;
 {OBJ x3;
  PRD1(2,x3);FLD1(x3,1)=x1;FLD1(x3,2)=__ABUILTIN_5;
  {OBJ x17=FLD1(x2,1);OBJ x18=FLD1(x2,2);FLAG x_x2=EXPRD(x2,1);
   if(x_x2){
   }else{
    CPPRD(x17,1);CPPRD(x18,1);}
   {TUP2 x20;
    x20=_AMatchIdentFunDeep_9(__AObjects_29,__AObjects_30,x3,x17);
    {OBJ x22=FLD1(x20.c1,1);
     if(EXPRD(x20.c1,1)){
      r.c1=x22;
      DSPRDF(x20.c1);
     }else{
      COPY(x22,1);
      r.c1=x22;
      FRPRD(x20.c1,1);}
     if(x_x2){
      RSOME(x2,r.c2);FLD1(r.c2,1)=x20.c2;
     }else{
      FRPRD(x2,1);PRD1(2,r.c2);FLD1(r.c2,1)=x20.c2;FLD1(r.c2,2)=x18;}}}}}
 return r;}
extern OBJ _AGlobSigFix_7_c(OBJ x1,OBJ x2) /* identifyParameterDeep */
{OBJ r;
 {TUP2 t=_AGlobSigFix_7(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _AGlobSigFix_8(OBJ x1,OBJ x2) /* identifyParameterFlat */
{TUP2 r;
 r.c1=x1;r.c2=x2;
 return r;}
extern OBJ _AGlobSigFix_8_c(OBJ x1,OBJ x2) /* identifyParameterFlat */
{OBJ r;
 {TUP2 t=_AGlobSigFix_8(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AGlobSigFix_10(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* iterateIdentFunDeletionFlat'10 */
{OBJ r;
 r=_AGlobSigFix_6(x1,x2,x3);
 return r;}

extern OBJ _AGlobSigFix_19(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* iterateIdentFunDeletionDeep'19 */
{OBJ r;
 r=_AGlobSigFix_5(x1,x3,x2);
 return r;}

extern OBJ _AGlobSigFix_20(OBJ x1,OBJ x2,OBJ x3) /* globSigFix'20 */
{OBJ r;
 CPCLS(__AGlobSigFix_3,1);
 CPPRD(x1,1);
 {OBJ x4;OBJ x5;
  x4=_AGlobSigFix_5(x1,x2,__ABUILTIN_3);
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigFix_3,1))(__AGlobSigFix_3,x1);
  r=_AComCompose_5(x4,x5);}
 return r;}

init_AGlobSigFix()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABitset();
 init_APatterns();
 init_AAttributes();
 init_ADArray();
 init_AGlobSig();
 init_ANatMap();
 init_AOcOptions();
 init_AArray();
 init_ACom();
 init_APartName();
 init_ANat();
 init_AGlobSig4SigAna();
 init_AVoid();
 init_AMatchIdentFunDeep();
 init_ASeq();
 init_AMatchIdentFunFlat();
 init_AOption();
 init_AFlattenCandidateSets();
 init_AChar();
 init_AGlobSigToText();
 init_AStream();
 init_ASigAnaTexts();
 init_AString();
 init_ADEBUG();
 init_AFile();
 init_AOcVerbose();
 init_AInt();
 init_AComCompose();
 init_ATable();
 init_ATree();
 init_AUniqueTable();
 init_ADenotation();
 init_ADeclEntry();
 init_AMapReduce();
 init_APartNameEntry();
 init_ASeqReduce();
 init_AImpExpEntry();
 init_ASetByBST();
 init_AObjects();
 init_ABSTree();
 init_AName();
 init_ASeqMap();
 init_AGlobSigImpl();
 init_ASeqConv();
 init_ARep();
 init_AReal();
 init_APragma();
 init_ALexem();
 init_AImpl();
 init_AGlobPragma();
 init_AOcPos();
 init_APair();
 init_AMap();
 init_ASet();
 init_AFct();
 CLS(3,_AGlobSigFix_20,__AGlobSigFix_20);
 CLS(4,_AGlobSigFix_19,__AGlobSigFix_19);
 DEN("******* Nach matchIdentFunBySortPnDeep",__AGlobSigFix_18);
 DEN("******* Nach matchIdentFunByInstPnDeep",__AGlobSigFix_17);
 DEN("******* Nach matchIdentFunByOnlyPnDeep",__AGlobSigFix_16);
 DEN("printGsFixDeepPhase",__AGlobSigFix_15);
 DEN("printGsFixIdentifyParameterDeep",__AGlobSigFix_14);
 DEN("printGsFixDeep",__AGlobSigFix_13);
 DEN("printGsFix",__AGlobSigFix_12);
 DEN("printGsFixToFlat",__AGlobSigFix_11);
 CLS(4,_AGlobSigFix_10,__AGlobSigFix_10);
 DEN("printGsFixFlat",__AGlobSigFix_9);
 CLS(2,_AGlobSigFix_8_c,__AGlobSigFix_8);
 CLS(2,_AGlobSigFix_7_c,__AGlobSigFix_7);
 CLS(3,_AGlobSigFix_6,__AGlobSigFix_6);
 CLS(3,_AGlobSigFix_5,__AGlobSigFix_5);
 CLS(3,_AGlobSigFix_4,__AGlobSigFix_4);
 CLS(2,_AGlobSigFix_3,__AGlobSigFix_3);
 CLS(2,_AGlobSigFix_1,__AGlobSigFix_1);}

