

#include "BUILTIN.h"

#include "Bitset.h"

#include "Nat.h"
extern OBJ __ASeq_6;
extern OBJ _ASeq_26(OBJ,OBJ);extern OBJ __ASeq_26;
extern OBJ _ARep_27(OBJ,OBJ);extern OBJ __ARep_27;
extern TUP2 _ASubstitution_5(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ASubstitution_5;

#include "Array.h"
extern OBJ _AMapReduce_6(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMapReduce_6;
extern OBJ __ATree_7;
extern OBJ _AMap_8(OBJ,OBJ,OBJ);extern OBJ __AMap_8;
extern OBJ _AMap_14(OBJ,OBJ,OBJ);extern OBJ __AMap_14;
extern OBJ _AMap_16(OBJ,OBJ,OBJ);extern OBJ __AMap_16;
extern OBJ _AMap_20(OBJ,OBJ,OBJ);extern OBJ __AMap_20;
extern OBJ _AMap_31(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMap_31;
extern OBJ _AMap_33(OBJ,OBJ,OBJ);extern OBJ __AMap_33;
extern OBJ __AOption_5;

#include "Char.h"

#include "Int.h"
OBJ __APartialSignatures_2; /* {} */
extern OBJ _APartialSignatures_3(OBJ,OBJ);OBJ __APartialSignatures_3; /* addGlobal */
extern OBJ _APartialSignatures_4(OBJ,OBJ,OBJ,OBJ);OBJ __APartialSignatures_4; /* addLocal */
extern OBJ _APartialSignatures_5(OBJ,OBJ);OBJ __APartialSignatures_5; /* hideLocal */
extern TUP2 _APartialSignatures_6(OBJ,OBJ);OBJ __APartialSignatures_6; /* getLocal */
extern OBJ _APartialSignatures_7(OBJ,OBJ);OBJ __APartialSignatures_7; /* isLocal */
extern OBJ _APartialSignatures_8(OBJ,OBJ);OBJ __APartialSignatures_8; /* getLocalFct */
extern TUP4 _APartialSignatures_9(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __APartialSignatures_9; /* combine */
extern OBJ _APartialSignatures_10(OBJ,OBJ);OBJ __APartialSignatures_10; /* partSig */
extern OBJ _APartialSignatures_11(OBJ);OBJ __APartialSignatures_11; /* partSig? */
extern OBJ _APartialSignatures_12(OBJ);OBJ __APartialSignatures_12; /* locals */
extern OBJ _APartialSignatures_13(OBJ);OBJ __APartialSignatures_13; /* contents */
extern TUP2 _APartialSignatures_22(OBJ,OBJ);OBJ __APartialSignatures_22; /* combine,1 */
extern TUP4 _APartialSignatures_23(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __APartialSignatures_23; /* combine,2 */
extern OBJ _APartialSignatures_24(OBJ,OBJ,OBJ,OBJ);OBJ __APartialSignatures_24; /* combine,1'24 */
extern OBJ _APartialSignatures_25(OBJ,OBJ,OBJ,OBJ);OBJ __APartialSignatures_25; /* combine,2'25 */

extern OBJ _APartialSignatures_3(OBJ x1,OBJ x2) /* addGlobal */
{OBJ r;
 {OBJ x10=FLD1(x1,1);OBJ x11;
  if(EXPRD(x1,1)){
   CPCLS(__ARep_27,1);
   {
    RSOME(x1,r);
    FLD1(r,1)=_AMap_31(__ARep_27,x2,__AOption_5,x10);}
  }else{
   x11=FLD1(x1,2);COPY(x10,1);COPY(x11,1);
   CPCLS(__ARep_27,1);
   {
    FRPRD(x1,1);PRD1(2,r);FLD1(r,2)=x11;
    FLD1(r,1)=_AMap_31(__ARep_27,x2,__AOption_5,x10);}}}
 return r;}

extern OBJ _APartialSignatures_4(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* addLocal */
{OBJ r;
 CPPRD(x3,1);
 {OBJ x11;OBJ x12;
  PRD1F(1,x11);FLD1(x11,1)=x2;
  PRD1(2,x12);FLD1(x12,1)=x3;FLD1(x12,2)=x4;
  {OBJ x15=FLD1(x1,1);OBJ x16=FLD1(x1,2);
   if(EXPRD(x1,1)){
    CPCLS(__ANat_80,1);
    CPCLS(__ARep_27,1);
    {OBJ x17;
     x17=_AMap_31(__ANat_80,x2,x12,x16);
     RSOME(x1,r);FLD1(r,2)=x17;
     FLD1(r,1)=_AMap_31(__ARep_27,x3,x11,x15);}
   }else{
    COPY(x15,1);COPY(x16,1);
    CPCLS(__ANat_80,1);
    CPCLS(__ARep_27,1);
    {OBJ x17;
     x17=_AMap_31(__ANat_80,x2,x12,x16);
     FRPRD(x1,1);PRD1(2,r);FLD1(r,2)=x17;
     FLD1(r,1)=_AMap_31(__ARep_27,x3,x11,x15);}}}}
 return r;}

extern OBJ _APartialSignatures_5(OBJ x1,OBJ x2) /* hideLocal */
{OBJ r;
 {OBJ x10=FLD1(x2,1);OBJ x11;
  if(EXPRD(x2,1)){
   CPCLS(__ARep_27,1);
   {
    RSOME(x2,r);
    FLD1(r,1)=_AMap_8(__ARep_27,x1,x10);}
  }else{
   x11=FLD1(x2,2);COPY(x10,1);COPY(x11,1);
   CPCLS(__ARep_27,1);
   {
    FRPRD(x2,1);PRD1(2,r);FLD1(r,2)=x11;
    FLD1(r,1)=_AMap_8(__ARep_27,x1,x10);}}}
 return r;}

extern TUP2 _APartialSignatures_6(OBJ x1,OBJ x2) /* getLocal */
{TUP2 r;
 {OBJ x19=FLD1(x2,2);
  if(EXPRD(x2,1)){
   FREE(FLD1(x2,1),1);DSPRDF(x2);
  }else{
   COPY(x19,1);
   FRPRD(x2,1);}
  CPCLS(__ANat_80,1);
  {OBJ x20;
   x20=_AMap_16(__ANat_80,x19,x1);
   {OBJ x21=FLD1(x20,1);OBJ x22=FLD1(x20,2);
    if(EXPRD(x20,1)){
     r.c1=x21;r.c2=x22;
     DSPRDF(x20);
    }else{
     CPPRD(x21,1);COPY(x22,1);
     r.c1=x21;r.c2=x22;
     FRPRD(x20,1);}}}}
 return r;}
extern OBJ _APartialSignatures_6_c(OBJ x1,OBJ x2) /* getLocal */
{OBJ r;
 {TUP2 t=_APartialSignatures_6(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _APartialSignatures_7(OBJ x1,OBJ x2) /* isLocal */
{OBJ r;
 {OBJ x12=FLD1(x2,1);
  if(EXPRD(x2,1)){
   COPY(x12,1);
   FREE(FLD1(x2,2),1);DSPRDF(x2);
  }else{
   COPY(x12,2);
   FRPRD(x2,1);}
  CPPRD(x1,1);
  CPCLS(__ARep_27,1);
  {OBJ x14;
   x14=_AMap_20(__ARep_27,x1,x12);
   if(ISTGPRM(x14,1)){
    CPCLS(__ARep_27,1);
    {OBJ x15;
     x15=_AMap_16(__ARep_27,x12,x1);
     if(ISPRM(x15)){
      r=__ABUILTIN_3;
     }else{
      if(EXPRD(x15,1)){
       DSPRDF(x15);
      }else{
       DCPRD(x15,1);}
      r=__ABUILTIN_5;}}
   }else{
    FRPRD(x1,1);
    FREE(x12,1);
    r=__ABUILTIN_3;}}}
 return r;}

extern OBJ _APartialSignatures_8(OBJ x1,OBJ x2) /* getLocalFct */
{OBJ r;
 {OBJ x15=FLD1(x2,1);OBJ x16=FLD1(x2,2);
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   COPY(x15,1);COPY(x16,1);
   FRPRD(x2,1);}
  CPCLS(__ARep_27,1);
  {OBJ x17;OBJ x19;OBJ x20;
   x17=_AMap_16(__ARep_27,x15,x1);
   if(ISPRM(x17)){
    HLT("Option at <unknown> : undefined selection cont\'Option:option->data");
   }else{
    {OBJ x18=FLD1(x17,1);
     if(EXPRD(x17,1)){
      x19=x18;
      DSPRDF(x17);
     }else{
      x19=x18;
      FRPRD(x17,1);}
     CPCLS(__ANat_80,1);}}
   x20=_AMap_16(__ANat_80,x16,x19);
   {OBJ x22=FLD1(x20,2);
    if(EXPRD(x20,1)){
     r=x22;
     FRPRD(FLD1(x20,1),1);DSPRDF(x20);
    }else{
     COPY(x22,1);
     r=x22;
     FRPRD(x20,1);}}}}
 return r;}

extern TUP4 _APartialSignatures_9(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* combine */
{TUP4 r;
 {OBJ x28=FLD1(x2,1);OBJ x29=FLD1(x2,2);
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   COPY(x28,1);COPY(x29,1);
   FRPRD(x2,1);}
  {OBJ x46=FLD1(x3,1);OBJ x47=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
   }else{
    COPY(x46,1);COPY(x47,1);}
   {TUP4 x50;TUP2 x54;
    x50=_APartialSignatures_23(x1,x29,x47,x4,x5);r.c2=x50.c2;r.c3=x50.c3;
    x54=_APartialSignatures_22(x28,x46);
    if(x_x3){
     RSOME(x3,r.c1);FLD1(r.c1,1)=x54.c1;FLD1(r.c1,2)=x50.c1;
    }else{
     FRPRD(x3,1);PRD1(2,r.c1);FLD1(r.c1,1)=x54.c1;FLD1(r.c1,2)=x50.c1;}
    r.c4=_ASeq_26(x54.c2,x50.c4);}}}
 return r;}
extern OBJ _APartialSignatures_9_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* combine */
{OBJ r;
 {TUP4 t=_APartialSignatures_9(x1,x2,x3,x4,x5);
  PRD1(4,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;
  FLD1(r,4)=t.c4;}
 return r;}

extern OBJ _APartialSignatures_10(OBJ x1,OBJ x2) /* partSig */
{OBJ r;
 PRD1(2,r);FLD1(r,1)=x1;FLD1(r,2)=x2;
 return r;}

extern OBJ _APartialSignatures_11(OBJ x1) /* partSig? */
{OBJ r;
 FRPRD(x1,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _APartialSignatures_12(OBJ x1) /* locals */
{OBJ r;
 {OBJ x3=FLD1(x1,2);
  if(EXPRD(x1,1)){
   r=x3;
   FREE(FLD1(x1,1),1);DSPRDF(x1);
  }else{
   COPY(x3,1);
   r=x3;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _APartialSignatures_13(OBJ x1) /* contents */
{OBJ r;
 {OBJ x2=FLD1(x1,1);
  if(EXPRD(x1,1)){
   r=x2;
   FREE(FLD1(x1,2),1);DSPRDF(x1);
  }else{
   COPY(x2,1);
   r=x2;
   FRPRD(x1,1);}}
 return r;}

extern TUP2 _APartialSignatures_22(OBJ x1,OBJ x2) /* combine,1 */
{TUP2 r;
 CPCLS(__APartialSignatures_24,1);
 CPCLS(__ARep_27,2);
 COPY(x1,1);
 COPY(x2,1);
 {OBJ x4;
  r.c1=_AMap_14(__ARep_27,x1,x2);
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__APartialSignatures_24,1))(__APartialSignatures_24,x1);
  r.c2=_AMapReduce_6(__ARep_27,x4,__ASeq_6,x2);}
 return r;}
extern OBJ _APartialSignatures_22_c(OBJ x1,OBJ x2) /* combine,1 */
{OBJ r;
 {TUP2 t=_APartialSignatures_22(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP4 _APartialSignatures_23(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* combine,2 */
{TUP4 r;
 CPCLS(__APartialSignatures_25,1);
 CPCLS(__ANat_80,1);
 {OBJ x6;OBJ x7;OBJ x8;
  PRD1(4,x6);FLD1(x6,1)=x3;FLD1(x6,2)=x4;FLD1(x6,3)=x5;FLD1(x6,4)=__ASeq_6;
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__APartialSignatures_25,1))(__APartialSignatures_25,x1);
  x8=_AMapReduce_6(__ANat_80,x7,x6,x2);
  {OBJ x29=FLD1(x8,1);OBJ x30=FLD1(x8,2);OBJ x31=FLD1(x8,3);OBJ x32=FLD1(x8,4);
   if(EXPRD(x8,1)){
    r.c1=x29;r.c2=x30;r.c3=x31;r.c4=x32;
    DSPRDF(x8);
   }else{
    COPY(x29,1);COPY(x30,1);COPY(x32,1);
    r.c1=x29;r.c2=x30;r.c3=x31;r.c4=x32;
    FRPRD(x8,1);}}}
 return r;}
extern OBJ _APartialSignatures_23_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* combine,2 */
{OBJ r;
 {TUP4 t=_APartialSignatures_23(x1,x2,x3,x4,x5);
  PRD1(4,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;
  FLD1(r,4)=t.c4;}
 return r;}

extern OBJ _APartialSignatures_24(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* combine,1'24 */
{OBJ r;
 CPCLS(__ARep_27,1);
 CPPRD(x2,1);
 {OBJ x5;
  x5=_AMap_33(__ARep_27,x1,x2);
  if(ISPRM(x5)){
   FRPRD(x2,1);
   FREE(x3,1);
   r=x4;
  }else{
   {OBJ x35=FLD1(x5,1);
    if(EXPRD(x5,1)){
     DSPRDF(x5);
    }else{
     COPY(x35,1);
     FRPRD(x5,1);}
    if(ISPRM(x35)){
     if(ISPRM(x3)){
      FRPRD(x2,1);
      r=x4;
     }else{
      if(EXPRD(x3,1)){
       DSPRDF(x3);
      }else{
       DCPRD(x3,1);}
      {OBJ x37;
       PRD(1,6,x37);FLD(x37,1)=x2;
       PRD1(2,r);FLD1(r,1)=x37;FLD1(r,2)=x4;}}
    }else{
     if(EXPRD(x35,1)){
      DSPRDF(x35);
     }else{
      DCPRD(x35,1);}
     if(ISPRM(x3)){
      {OBJ x39;
       PRD(1,6,x39);FLD(x39,1)=x2;
       PRD1(2,r);FLD1(r,1)=x39;FLD1(r,2)=x4;}
     }else{
      if(EXPRD(x3,1)){
       DSPRDF(x3);
      }else{
       DCPRD(x3,1);}
      FRPRD(x2,1);
      r=x4;}}}}}
 return r;}

extern OBJ _APartialSignatures_25(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* combine,2'25 */
{OBJ r;
 {OBJ x70=FLD1(x4,1);OBJ x71=FLD1(x4,2);OBJ x72=FLD1(x4,3);OBJ x73=FLD1(x4,4);FLAG x_x4=EXPRD(x4,1);
  if(x_x4){
  }else{
   COPY(x70,1);COPY(x71,1);COPY(x73,1);}
  {OBJ x93=FLD1(x3,1);OBJ x94=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
   }else{
    CPPRD(x93,1);COPY(x94,1);}
   COPY(x70,1);
   CPCLS(__ANat_80,1);
   {OBJ x95;
    x95=_AMap_33(__ANat_80,x70,x2);
    if(ISPRM(x95)){
     FREE(x1,1);
     CPCLS(__ANat_80,1);
     {OBJ x96;
      if(x_x3){
       RSOME(x3,x96);
      }else{
       FRPRD(x3,1);PRD1(2,x96);FLD1(x96,1)=x93;FLD1(x96,2)=x94;}
      if(x_x4){
       RSOME(x4,r);
      }else{
       FRPRD(x4,1);PRD1(4,r);FLD1(r,2)=x71;FLD1(r,3)=x72;FLD1(r,4)=x73;}
      FLD1(r,1)=_AMap_31(__ANat_80,x2,x96,x70);}
    }else{
     {OBJ x98=FLD1(x95,1);
      if(EXPRD(x95,1)){
       if(x_x3){
	DSPRDF(x3);
       }else{
	FRPRD(x3,1);}
       DSPRDF(x95);
      }else{
       CPPRD(x98,1);
       if(x_x3){
	DSPRDF(x3);
       }else{
	FRPRD(x3,1);}
       FRPRD(x95,1);}
      {OBJ x100=FLD1(x98,2);FLAG x_x98=EXPRD(x98,1);
       if(x_x98){
	COPY(x100,1);
       }else{
	COPY(x100,2);}
       COPY(x71,1);
       COPY(x94,1);
       {TUP2 x102;
	x102=_ASubstitution_5(x1,x94,x100,x71,x72);
	if(ISPRM(x102.c1)){
	 COPY(x71,1);
	 {OBJ x104;OBJ x105;
	  PRD(4,7,x104);FLD(x104,1)=x93;FLD(x104,2)=x94;FLD(x104,3)=x100;FLD(x104,4)=x71;
	  if(x_x98){
	   RSOME(x98,x105);FRPRD(FLD1(x105,1),1);FLD1(x105,1)=x104;FLD1(x105,2)=x73;
	  }else{
	   FRPRD(x98,1);PRD1(2,x105);FLD1(x105,1)=x104;FLD1(x105,2)=x73;}
	  if(x_x4){
	   RSOME(x4,r);FLD1(r,4)=x105;
	  }else{
	   FRPRD(x4,1);PRD1(4,r);FLD1(r,1)=x70;FLD1(r,2)=x71;FLD1(r,3)=x72;FLD1(r,4)=x105;}}
	}else{
	 if(x_x98){
	  FRPRD(FLD1(x98,1),1);DSPRDF(x98);
	 }else{
	  FRPRD(x98,1);}
	 FREE(x71,1);
	 FRPRD(x93,1);
	 FREE(x94,1);
	 FREE(x100,1);
	 if(x_x4){
	  RSOME(x4,r);FLD1(r,2)=x102.c1;FLD1(r,3)=x102.c2;
	 }else{
	  FRPRD(x4,1);PRD1(4,r);FLD1(r,1)=x70;FLD1(r,2)=x102.c1;FLD1(r,3)=x102.c2;FLD1(r,4)=x73;}}}}}}}}}
 return r;}


init_APartialSignatures()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABitset();
 init_ATable();
 init_AUniqueTable();
 init_ADeclEntry();
 init_ANat();
 init_APartNameEntry();
 init_ASeq();
 init_AImpExpEntry();
 init_ARep();
 init_APragma();
 init_AFct();
 init_AAttributes();
 init_AAnalyzedGlobSig();
 init_ADArray();
 init_ASubstitution();
 init_ANatMap();
 init_AReason();
 init_AArray();
 init_AOcError();
 init_AQuadruple();
 init_AOcPos();
 init_ASeqReduce();
 init_APartName();
 init_ASeqMap();
 init_AGlobSig();
 init_AMapReduce();
 init_AGlobPragma();
 init_ALexem();
 init_AName();
 init_ATree();
 init_AGlobSigImpl();
 init_AAbsyFun3();
 init_AObjects();
 init_AAnalyzedGlobSigH();
 init_AImpl();
 init_AGlobSigToText();
 init_APatterns();
 init_AImpDecl4SigAna();
 init_APair();
 init_AMySeqFun1();
 init_AMap();
 init_AName4SigAna();
 init_AOption();
 init_ASetByBST();
 init_ACom();
 init_ABSTree();
 init_AVoid();
 init_AChar();
 init_AString();
 init_AOcOptions();
 init_AStream();
 init_AFile();
 init_AInt();
 init_ASet();
 CLS(4,_APartialSignatures_25,__APartialSignatures_25);
 CLS(4,_APartialSignatures_24,__APartialSignatures_24);
 CLS(5,_APartialSignatures_23_c,__APartialSignatures_23);
 CLS(2,_APartialSignatures_22_c,__APartialSignatures_22);
 CLS(1,_APartialSignatures_13,__APartialSignatures_13);
 CLS(1,_APartialSignatures_12,__APartialSignatures_12);
 CLS(1,_APartialSignatures_11,__APartialSignatures_11);
 CLS(2,_APartialSignatures_10,__APartialSignatures_10);
 CLS(5,_APartialSignatures_9_c,__APartialSignatures_9);
 CLS(2,_APartialSignatures_8,__APartialSignatures_8);
 CLS(2,_APartialSignatures_7,__APartialSignatures_7);
 CLS(2,_APartialSignatures_6_c,__APartialSignatures_6);
 CLS(2,_APartialSignatures_5,__APartialSignatures_5);
 CLS(4,_APartialSignatures_4,__APartialSignatures_4);
 CLS(2,_APartialSignatures_3,__APartialSignatures_3);
 PRD1F(2,__APartialSignatures_2);FLD1(__APartialSignatures_2,1)=__ATree_7;FLD1(__APartialSignatures_2,2)=__ATree_7;}

