

#include "BUILTIN.h"

#include "Bitset.h"
extern OBJ _ADArray_20(OBJ,OBJ);extern OBJ __ADArray_20;
extern OBJ __AObjects_30;
extern OBJ __AObjects_34;
extern OBJ _AObjects_37(OBJ,OBJ);extern OBJ __AObjects_37;
extern OBJ _AGlobSig_55(OBJ);extern OBJ __AGlobSig_55;

#include "Array.h"
extern OBJ _ACom_47(OBJ,OBJ);extern OBJ __ACom_47;
extern OBJ _APartName_30(OBJ);extern OBJ __APartName_30;
extern OBJ _AAbsyFun2_6(OBJ,OBJ,OBJ);extern OBJ __AAbsyFun2_6;
extern OBJ __ASeq_6;
extern OBJ _ASeq_40(OBJ,OBJ);extern OBJ __ASeq_40;
extern OBJ _AAbsyFun3_5(OBJ,OBJ,OBJ);extern OBJ __AAbsyFun3_5;
extern OBJ _AComCompose_3(OBJ,OBJ);extern OBJ __AComCompose_3;
extern OBJ _AComCompose_4(OBJ,OBJ);extern OBJ __AComCompose_4;

#include "Nat.h"
extern OBJ _ADEBUG_2(OBJ,OBJ,OBJ);extern OBJ __ADEBUG_2;
extern OBJ _ADEBUG_10(OBJ);extern OBJ __ADEBUG_10;
extern OBJ _ADecl4SigAna_10(OBJ,OBJ,OBJ);extern OBJ __ADecl4SigAna_10;
extern OBJ _ADecl4SigAna_11(OBJ,OBJ);extern OBJ __ADecl4SigAna_11;
extern OBJ _ADecl4SigAna_12(OBJ,OBJ,OBJ);extern OBJ __ADecl4SigAna_12;

#include "Char.h"

#include "Denotation.h"
extern OBJ _AErrCom_5(OBJ,OBJ,OBJ);extern OBJ __AErrCom_5;
extern OBJ _AErrCom_6(OBJ,OBJ,OBJ);extern OBJ __AErrCom_6;
extern OBJ _AErrCom_7(OBJ,OBJ,OBJ,OBJ);extern OBJ __AErrCom_7;
extern OBJ _AGlobSigEvalInst_5(OBJ,OBJ,OBJ);extern OBJ __AGlobSigEvalInst_5;
extern OBJ _AGlobSigEvalInst_7(OBJ,OBJ,OBJ);extern OBJ __AGlobSigEvalInst_7;
extern OBJ _AGlobSigToText_1(OBJ,OBJ);extern OBJ __AGlobSigToText_1;
extern OBJ _AImpDecl4SigAna_4(OBJ,OBJ,OBJ);extern OBJ __AImpDecl4SigAna_4;
extern OBJ _AImpDecl4SigAna_17(OBJ,OBJ,OBJ,OBJ);extern OBJ __AImpDecl4SigAna_17;
extern TUP2 _AImpDecl4SigAna_19(OBJ,OBJ,OBJ);extern OBJ __AImpDecl4SigAna_19;
extern OBJ _AImpDecl4SigAna_30(OBJ,OBJ,OBJ);extern OBJ __AImpDecl4SigAna_30;
extern OBJ _AImpDecl4SigAna_52(OBJ,OBJ);extern OBJ __AImpDecl4SigAna_52;

#include "Int.h"
extern OBJ _AMySeqFun1_12(OBJ,OBJ);extern OBJ __AMySeqFun1_12;
extern OBJ _AName4SigAna_4(OBJ,OBJ);extern OBJ __AName4SigAna_4;
extern OBJ _AName4SigAna_13(OBJ,OBJ);extern OBJ __AName4SigAna_13;
extern OBJ _AName4SigAna_35(OBJ,OBJ);extern OBJ __AName4SigAna_35;
extern OBJ _AName4SigAna_36(OBJ,OBJ);extern OBJ __AName4SigAna_36;
extern TUP2 _ASeqFilter_5(OBJ,OBJ);extern OBJ __ASeqFilter_5;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;
extern OBJ _ASeqSort_2(OBJ,OBJ);extern OBJ __ASeqSort_2;
extern OBJ _AImpExpEntry_91(OBJ);extern OBJ __AImpExpEntry_91;
extern OBJ _AName_11(OBJ);extern OBJ __AName_11;
extern OBJ _AName_12(OBJ);extern OBJ __AName_12;
extern OBJ __AName_29;
extern OBJ _AName_34(OBJ);extern OBJ __AName_34;
extern OBJ _AGlobSigEvalDecl_1(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_1; /* evalDecl */
extern TUP2 _AGlobSigEvalDecl_2(OBJ,OBJ);OBJ __AGlobSigEvalDecl_2; /* findDoubleOpDecl */
OBJ __AGlobSigEvalDecl_3; /* noError */
extern OBJ _AGlobSigEvalDecl_4(OBJ,OBJ);OBJ __AGlobSigEvalDecl_4; /* evalDecl2 */
OBJ __AGlobSigEvalDecl_5; /* evalDeclSortPN? */
extern OBJ _AGlobSigEvalDecl_6(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_6; /* evalDeclSortPN */
extern OBJ _AGlobSigEvalDecl_7(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_7; /* eqNameh */
extern OBJ _AGlobSigEvalDecl_8(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_8; /* !! */
extern OBJ _AGlobSigEvalDecl_9(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_9; /* evalDeclSortPN2 */
extern OBJ _AGlobSigEvalDecl_10(OBJ,OBJ);OBJ __AGlobSigEvalDecl_10; /* isGenericInst */
extern OBJ _AGlobSigEvalDecl_11(OBJ,OBJ);OBJ __AGlobSigEvalDecl_11; /* isGenericInst,1 */
extern OBJ _AGlobSigEvalDecl_12(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_12; /* getInstE */
extern OBJ _AGlobSigEvalDecl_13(OBJ,OBJ);OBJ __AGlobSigEvalDecl_13; /* < */
extern OBJ _AGlobSigEvalDecl_14(OBJ,OBJ,OBJ);OBJ __AGlobSigEvalDecl_14; /* h12 */
OBJ __AGlobSigEvalDecl_15; /* !!'15 */
OBJ __AGlobSigEvalDecl_16; /* evalDeclSortPN'16 */
OBJ __AGlobSigEvalDecl_17; /* evalDeclSortPN?'17 */

extern OBJ _AGlobSigEvalDecl_1(OBJ x1,OBJ x2,OBJ x3) /* evalDecl */
{OBJ r;
 COPY(x2,1);
 {OBJ x4;OBJ x5;
  PRDF(1,1,x4);FLD(x4,1)=x3;
  x5=_AName4SigAna_4(x2,x4);
  if(ISTGPRM(x5,1)){
   FRPRD(x1,1);
   CPCLS(__ACom_47,1);
   {OBJ x6;OBJ x7;OBJ x8;
    PRD1(2,x6);FLD1(x6,1)=x2;FLD1(x6,2)=__AGlobSigEvalDecl_3;
    PRD(1,0,x7);FLD(x7,1)=x6;
    x8=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x7);
    PRD(2,0,r);FLD(r,1)=x8;FLD(r,2)=__ASeq_6;}
  }else{
   COPY(x2,1);
   CPCLS(__AGlobSigEvalDecl_4,1);
   CPCLS(__AGlobSigEvalDecl_6,1);
   {OBJ x9;OBJ x10;OBJ x11;OBJ x12;OBJ x13;
    x9=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigEvalDecl_6,1))(__AGlobSigEvalDecl_6,x1);
    PRD1(2,x10);FLD1(x10,1)=x2;FLD1(x10,2)=__ABUILTIN_5;
    x11=_ADecl4SigAna_11(x2,x3);
    x12=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigEvalDecl_4,1))(__AGlobSigEvalDecl_4,x3);
    x13=_AAbsyFun3_5(x9,x10,x11);
    r=_AComCompose_3(x13,x12);}}}
 return r;}

extern TUP2 _AGlobSigEvalDecl_2(OBJ x1,OBJ x2) /* findDoubleOpDecl */
{TUP2 r;
 if(ISPRM(x2)){
  r.c1=x1;r.c2=x2;
 }else{
  {OBJ x40=FLD1(x2,1);OBJ x41=FLD1(x2,2);FLAG x_x2=EXPRD(x2,1);
   if(x_x2){
   }else{
    COPY(x41,1);}
   COPY(x1,1);
   CPCLS(__AGlobSigEvalDecl_13,1);
   CPCLS(__AGlobSigEvalDecl_14,1);
   {OBJ x43;TUP2 x45;OBJ x48;OBJ x49;
    x43=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AGlobSigEvalDecl_14,2))(__AGlobSigEvalDecl_14,x1,x40);
    x45=_ASeqFilter_5(x43,x41);
    if(x_x2){
     RSOME(x2,x48);FLD1(x48,2)=x45.c1;
    }else{
     FRPRD(x2,1);PRD1(2,x48);FLD1(x48,1)=x40;FLD1(x48,2)=x45.c1;}
    x49=_ASeqSort_2(__AGlobSigEvalDecl_13,x48);
    if(ISPRM(x49)){
     HLT("Seq at <unknown> : undefined selection rt\'Seq:seq->seq");
    }else{
     {OBJ x60=FLD1(x49,1);OBJ x61=FLD1(x49,2);FLAG x_x49=EXPRD(x49,1);
      if(x_x49){
      }else{
       COPY(x61,1);}
      CPCLS(__ADecl4SigAna_12,1);
      {OBJ x63;TUP2 x64;
       x63=(*(OBJ(*)(OBJ,OBJ))METHOD(__ADecl4SigAna_12,1))(__ADecl4SigAna_12,x60);
       x64=_AGlobSigEvalDecl_2(x1,x45.c2);
       if(x_x49){
	RSOME(x49,r.c2);FLD1(r.c2,2)=x64.c2;
       }else{
	FRPRD(x49,1);PRD1(2,r.c2);FLD1(r.c2,1)=x60;FLD1(r.c2,2)=x64.c2;}
       r.c1=_ASeqReduce_3(x63,x64.c1,x61);}}}}}}
 return r;}
extern OBJ _AGlobSigEvalDecl_2_c(OBJ x1,OBJ x2) /* findDoubleOpDecl */
{OBJ r;
 {TUP2 t=_AGlobSigEvalDecl_2(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AGlobSigEvalDecl_4(OBJ x1,OBJ x2) /* evalDecl2 */
{OBJ r;
 {OBJ x6;
  if(ISTGPRD(x2,0)){
   {OBJ x3=FLD(x2,1);
    if(EXPRD(x2,1)){
     x6=x3;
     DSPRDF(x2);
    }else{
     CPPRD(x3,1);
     x6=x3;
     FRPRD(x2,1);}}
  }else{
   HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
  {OBJ x29=FLD1(x6,1);OBJ x30=FLD1(x6,2);
   if(EXPRD(x6,1)){
    DSPRDF(x6);
   }else{
    CPPRD(x29,1);COPY(x30,1);
    FRPRD(x6,1);}
   {OBJ x31=FLD1(x29,1);OBJ x32;FLAG x_x29=EXPRD(x29,1);
    if(x_x29){
    }else{
     x32=FLD1(x29,2);COPY(x31,1);}
    CPCLS(__ACom_47,1);
    {OBJ x33;OBJ x34;OBJ x35;OBJ x36;
     x33=_ADecl4SigAna_10(x31,x1,x30);
     if(x_x29){
      RSOME(x29,x34);FLD1(x34,1)=x33;
     }else{
      FRPRD(x29,1);PRD1(2,x34);FLD1(x34,1)=x33;FLD1(x34,2)=x32;}
     PRD(1,0,x35);FLD(x35,1)=x34;
     x36=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x35);
     PRD(2,0,r);FLD(r,1)=x36;FLD(r,2)=__ASeq_6;}}}}
 return r;}

extern OBJ _AGlobSigEvalDecl_6(OBJ x1,OBJ x2,OBJ x3) /* evalDeclSortPN */
{OBJ r;
 if(ISPRM(x3)){
  FRPRD(x1,1);
  CPCLS(__ACom_47,1);
  {OBJ x786;OBJ x787;OBJ x788;
   PRD1(2,x786);FLD1(x786,1)=x2;FLD1(x786,2)=x3;
   PRD(1,0,x787);FLD(x787,1)=x786;
   x788=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x787);
   PRD(2,0,r);FLD(r,1)=x788;FLD(r,2)=__ASeq_6;}
 }else{
  if(ISPRD(x3)&&(ISTGPRD(x3,1))){
   FRPRD(x1,1);
   CPCLS(__ACom_47,1);
   {OBJ x790;OBJ x791;OBJ x792;
    PRD1(2,x790);FLD1(x790,1)=x2;FLD1(x790,2)=x3;
    PRD(1,0,x791);FLD(x791,1)=x790;
    x792=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x791);
    PRD(2,0,r);FLD(r,1)=x792;FLD(r,2)=__ASeq_6;}
  }else{
   if(ISPRD(x3)&&(ISTGPRD(x3,2))){
    FRPRD(x1,1);
    CPCLS(__ACom_47,1);
    {OBJ x796;OBJ x797;OBJ x798;
     PRD1(2,x796);FLD1(x796,1)=x2;FLD1(x796,2)=x3;
     PRD(1,0,x797);FLD(x797,1)=x796;
     x798=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x797);
     PRD(2,0,r);FLD(r,1)=x798;FLD(r,2)=__ASeq_6;}
   }else{
    if(ISPRD(x3)&&(ISTGPRD(x3,3))){
     {OBJ x800=FLD1(x2,1);OBJ x801=FLD1(x2,2);
      COPY(x800,3);
      CPPRD(x3,1);
      CPCLS(__AGlobSigEvalDecl_7,1);
      CPCLS(__AGlobSigEvalDecl_8,1);
      {OBJ x802;OBJ x803;OBJ x804;
       x802=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigEvalDecl_7,1))(__AGlobSigEvalDecl_7,x800);
       x803=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AGlobSigEvalDecl_8,2))(__AGlobSigEvalDecl_8,x800,x3);
       x804=_ADEBUG_2(__AGlobSigEvalDecl_5,x803,x3);
       if(ISPRD(x804)&&(ISTGPRD(x804,3))){
	{OBJ x805=FLD(x804,1);FLAG x_x804=EXPRD(x804,1);
	 if(x_x804){
	  CPPRD(x805,2);
	 }else{
	  CPPRD(x805,3);}
	 COPY(x800,2);
	 {OBJ x806;OBJ x807;
	  x806=_AName4SigAna_36(x800,x805);
	  x807=_AName4SigAna_35(x800,x805);
	  {OBJ x809=FLD1(x805,2);FLAG x_x805=EXPRD(x805,1);
	   if(x_x805){
	   }else{
	    COPY(x809,1);}
	   {OBJ x819;OBJ x810;OBJ x820;
	    if(ISTGPRD(x807,1)){
	     {OBJ x812=FLD(x807,2);
	      if(EXPRD(x807,1)){
	       x819=x812;
	       FRPRD(FLD(x807,1),1);DSPRDF(x807);
	      }else{
	       COPY(x812,1);
	       x819=x812;
	       FRPRD(x807,1);}}
	    }else{
	     HLT("PartNameEntry at <unknown> : undefined selection flatPN\'PartNameEntry:pN->seq");}
	    COPY(x819,1);
	    x810=_APartName_30(x806);
	    x820=_AMySeqFun1_12(x802,x819);
	    if(ISPRM(x819)){
	     if(EXPRD(x2,1)){
	      FREE(FLD1(x2,1),1);DSPRDF(x2);
	     }else{
	      DCPRD(x2,1);}
	     FREE(x820,1);
	     CPCLS(__ACom_47,1);
	     {OBJ x821;OBJ x822;OBJ x823;OBJ x824;OBJ x825;OBJ x826;
	      if(x_x805){
	       RSOME(x805,x821);FLD1(x821,1)=x800;FLD1(x821,2)=__ABUILTIN_3;
	      }else{
	       FRPRD(x805,1);PRD1(2,x821);FLD1(x821,1)=x800;FLD1(x821,2)=__ABUILTIN_3;}
	      PRD1(2,x822);FLD1(x822,1)=x821;FLD1(x822,2)=__AName_29;
	      if(x_x804){
	       RPRD(x804,x823);CHGTG(x823,0);FLD(x823,1)=x822;
	      }else{
	       FRPRD(x804,1);PRD(1,0,x823);FLD(x823,1)=x822;}
	      x824=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x823);
	      PRD(2,0,x825);FLD(x825,1)=x824;FLD(x825,2)=__ASeq_6;
	      x826=_AErrCom_5(x1,x809,x810);
	      r=_AComCompose_4(x826,x825);}
	    }else{
	     {OBJ x827=FLD1(x819,1);FLAG x_x819=EXPRD(x819,1);
	      if(x_x819){
	      }else{
	       CPPRD(x827,1);}
	      {OBJ x830=FLD1(x827,2);
	       CPPRD(x830,1);
	       {OBJ x835;OBJ x836;
		if(ISPRM(x820)){
		 HLT("Seq at <unknown> : undefined selection rt\'Seq:seq->seq");
		}else{
		 {OBJ x834=FLD1(x820,2);
		  COPY(x834,1);
		  x835=x834;
		  CPPRD(x830,1);
		  CPPRD(__AObjects_34,1);}}
		x836=_AObjects_37(x830,__AObjects_34);
		if(ISTGPRM(x836,1)){
		 if(EXPRD(x827,1)){
		  DSPRD(x827);
		 }else{
		  DCPRD(x827,1);}
		 FRPRD(x830,1);
		 if(ISPRM(x835)){
		  {OBJ x839;
		   if(ISPRM(x820)){
		    HLT("Seq at <unknown> : undefined selection ft\'Seq:seq->data");
		   }else{
		    {OBJ x837=FLD1(x820,1);
		     if(EXPRD(x820,1)){
		      x839=x837;
		      FREE(FLD1(x820,2),1);DSPRDF(x820);
		     }else{
		      CPPRD(x837,1);
		      x839=x837;
		      FRPRD(x820,1);}}}
		   {OBJ x840=FLD1(x839,1);
		    if(EXPRD(x839,1)){
		     FLD1(x839,1)=NIL;DSPRD(x839);
		    }else{
		     COPY(x840,1);
		     FRPRD(x839,1);}
		    if(ISPRD(x840)&&(ISTGPRD(x840,1))){
		     if(x_x805){
		      DSPRDF(x805);
		     }else{
		      FRPRD(x805,1);}
		     FRPRD(x1,1);
		     FREE(x800,1);
		     FREE(x809,1);
		     FRPRD(x810,1);
		     CPCLS(__ACom_47,1);
		     {OBJ x845;OBJ x846;OBJ x847;
		      if(x_x819){
		       RSOME(x819,x845);FLD1(x845,1)=x2;FREE(FLD1(x845,2),1);FLD1(x845,2)=x840;
		      }else{
		       FRPRD(x819,1);PRD1(2,x845);FLD1(x845,1)=x2;FLD1(x845,2)=x840;}
		      if(x_x804){
		       RPRD(x804,x846);CHGTG(x846,0);FLD(x846,1)=x845;
		      }else{
		       FRPRD(x804,1);PRD(1,0,x846);FLD(x846,1)=x845;}
		      x847=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x846);
		      PRD(2,0,r);FLD(r,1)=x847;FLD(r,2)=__ASeq_6;}
		    }else{
		     if(ISPRD(x840)&&(ISTGPRD(x840,2))){
		      {OBJ x850=FLD(x840,3);
		       {OBJ x851;
			ANat_76(x850,__AObjects_30,x851);
			if(ISTGPRM(x851,1)){
			 if(x_x805){
			  DSPRDF(x805);
			 }else{
			  FRPRD(x805,1);}
			 FRPRD(x1,1);
			 FREE(x800,1);
			 FREE(x809,1);
			 FRPRD(x810,1);
			 CPCLS(__ACom_47,1);
			 {OBJ x852;OBJ x853;OBJ x854;
			  if(x_x819){
			   RSOME(x819,x852);FLD1(x852,1)=x2;FREE(FLD1(x852,2),1);FLD1(x852,2)=x840;
			  }else{
			   FRPRD(x819,1);PRD1(2,x852);FLD1(x852,1)=x2;FLD1(x852,2)=x840;}
			  if(x_x804){
			   RPRD(x804,x853);CHGTG(x853,0);FLD(x853,1)=x852;
			  }else{
			   FRPRD(x804,1);PRD(1,0,x853);FLD(x853,1)=x852;}
			  x854=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x853);
			  PRD(2,0,r);FLD(r,1)=x854;FLD(r,2)=__ASeq_6;}
			}else{
			 COPY(x800,1);
			 CPPRD(x840,1);
			 {OBJ x855;OBJ x856;OBJ x857;
			  x855=_AName_12(x840);
			  x856=_AImpDecl4SigAna_4(x800,x855,x850);
			  if(ISTGPRM(x856,1)){
			   x857=__ABUILTIN_5;
			  }else{
			   COPY(x800,1);
			   CPPRD(x840,1);
			   x857=_AName4SigAna_13(x800,x840);}
			  if(ISTGPRM(x857,1)){
			   if(EXPRD(x2,1)){
			    FREE(FLD1(x2,1),1);DSPRDF(x2);
			   }else{
			    DCPRD(x2,1);}
			   if(EXPRD(x840,1)){
			    DSPRDF(x840);
			   }else{
			    DCPRD(x840,1);}
			   CPPRD(__AGlobSigEvalDecl_16,1);
			   CPCLS(__ACom_47,1);
			   {OBJ x858;OBJ x859;OBJ x860;OBJ x861;OBJ x862;OBJ x863;
			    if(x_x819){
			     RSOME(x819,x858);FLD1(x858,1)=x800;FREE(FLD1(x858,2),1);FLD1(x858,2)=__ABUILTIN_3;
			    }else{
			     FRPRD(x819,1);PRD1(2,x858);FLD1(x858,1)=x800;FLD1(x858,2)=__ABUILTIN_3;}
			    if(x_x805){
			     RSOME(x805,x859);FLD1(x859,1)=x858;FLD1(x859,2)=__AName_29;
			    }else{
			     FRPRD(x805,1);PRD1(2,x859);FLD1(x859,1)=x858;FLD1(x859,2)=__AName_29;}
			    if(x_x804){
			     RPRD(x804,x860);CHGTG(x860,0);FLD(x860,1)=x859;
			    }else{
			     FRPRD(x804,1);PRD(1,0,x860);FLD(x860,1)=x859;}
			    x861=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x860);
			    PRD(2,0,x862);FLD(x862,1)=x861;FLD(x862,2)=__ASeq_6;
			    x863=_AErrCom_7(x1,x809,x810,__AGlobSigEvalDecl_16);
			    r=_AComCompose_4(x863,x862);}
			  }else{
			   if(x_x805){
			    DSPRDF(x805);
			   }else{
			    FRPRD(x805,1);}
			   FRPRD(x1,1);
			   FREE(x800,1);
			   FREE(x809,1);
			   FRPRD(x810,1);
			   CPCLS(__ACom_47,1);
			   {OBJ x864;OBJ x865;OBJ x866;
			    if(x_x819){
			     RSOME(x819,x864);FLD1(x864,1)=x2;FREE(FLD1(x864,2),1);FLD1(x864,2)=x840;
			    }else{
			     FRPRD(x819,1);PRD1(2,x864);FLD1(x864,1)=x2;FLD1(x864,2)=x840;}
			    if(x_x804){
			     RPRD(x804,x865);CHGTG(x865,0);FLD(x865,1)=x864;
			    }else{
			     FRPRD(x804,1);PRD(1,0,x865);FLD(x865,1)=x864;}
			    x866=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x865);
			    PRD(2,0,r);FLD(r,1)=x866;FLD(r,2)=__ASeq_6;}}}}}}
		     }else{
		      HLT("Name at <unknown> : undefined selection inst\'Name:name->inst");}}}}
		 }else{
		  if(x_x805){
		   DSPRDF(x805);
		  }else{
		   FRPRD(x805,1);}
		  if(EXPRD(x2,1)){
		   FREE(FLD1(x2,1),1);DSPRDF(x2);
		  }else{
		   DCPRD(x2,1);}
		  FREE(x820,1);
		  CPCLS(__ACom_47,1);
		  {OBJ x869;OBJ x870;OBJ x871;OBJ x872;OBJ x873;OBJ x874;
		   if(EXPRD(x835,1)){
		    RSOME(x835,x869);FRPRD(FLD1(x869,1),1);FLD1(x869,1)=x800;FREE(FLD1(x869,2),1);FLD1(x869,2)=__ABUILTIN_3;
		   }else{
		    DCPRD(x835,1);PRD1(2,x869);FLD1(x869,1)=x800;FLD1(x869,2)=__ABUILTIN_3;}
		   if(x_x819){
		    RSOME(x819,x870);FLD1(x870,1)=x869;FREE(FLD1(x870,2),1);FLD1(x870,2)=__AName_29;
		   }else{
		    FRPRD(x819,1);PRD1(2,x870);FLD1(x870,1)=x869;FLD1(x870,2)=__AName_29;}
		   if(x_x804){
		    RPRD(x804,x871);CHGTG(x871,0);FLD(x871,1)=x870;
		   }else{
		    FRPRD(x804,1);PRD(1,0,x871);FLD(x871,1)=x870;}
		   x872=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x871);
		   PRD(2,0,x873);FLD(x873,1)=x872;FLD(x873,2)=__ASeq_6;
		   x874=_AErrCom_6(x1,x809,x810);
		   r=_AComCompose_4(x874,x873);}}
		}else{
		 if(x_x805){
		  DSPRDF(x805);
		 }else{
		  FRPRD(x805,1);}
		 if(EXPRD(x2,1)){
		  FREE(FLD1(x2,1),1);DSPRDF(x2);
		 }else{
		  DCPRD(x2,1);}
		 FREE(x820,1);
		 if(ISPRM(x835)){
		  if(x_x804){
		   DSPRDF(x804);
		  }else{
		   FRPRD(x804,1);}
		  if(x_x819){
		   FREE(FLD1(x819,2),1);DSPRDF(x819);
		  }else{
		   FRPRD(x819,1);}
		  FREE(x809,1);
		  FRPRD(x810,1);
		  CPCLS(__AGlobSigEvalDecl_9,1);
		  {OBJ x883;OBJ x884;
		   x883=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AGlobSigEvalDecl_9,2))(__AGlobSigEvalDecl_9,x827,x801);
		   x884=_AGlobSigEvalInst_5(x1,x800,x830);
		   r=_AComCompose_3(x884,x883);}
		 }else{
		  if(EXPRD(x827,1)){
		   DSPRD(x827);
		  }else{
		   DCPRD(x827,1);}
		  FRPRD(x830,1);
		  CPCLS(__ACom_47,1);
		  {OBJ x877;OBJ x878;OBJ x879;OBJ x880;OBJ x881;OBJ x882;
		   if(EXPRD(x835,1)){
		    RSOME(x835,x877);FRPRD(FLD1(x877,1),1);FLD1(x877,1)=x800;FREE(FLD1(x877,2),1);FLD1(x877,2)=__ABUILTIN_3;
		   }else{
		    DCPRD(x835,1);PRD1(2,x877);FLD1(x877,1)=x800;FLD1(x877,2)=__ABUILTIN_3;}
		   if(x_x819){
		    RSOME(x819,x878);FLD1(x878,1)=x877;FREE(FLD1(x878,2),1);FLD1(x878,2)=__AName_29;
		   }else{
		    FRPRD(x819,1);PRD1(2,x878);FLD1(x878,1)=x877;FLD1(x878,2)=__AName_29;}
		   if(x_x804){
		    RPRD(x804,x879);CHGTG(x879,0);FLD(x879,1)=x878;
		   }else{
		    FRPRD(x804,1);PRD(1,0,x879);FLD(x879,1)=x878;}
		   x880=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x879);
		   PRD(2,0,x881);FLD(x881,1)=x880;FLD(x881,2)=__ASeq_6;
		   x882=_AErrCom_6(x1,x809,x810);
		   r=_AComCompose_4(x882,x881);}}}}}}}}}}}
       }else{
	HLT("Name at <unknown> : undefined selection sortPN\'Name:name->sortPN");}}}
    }else{
     HLT("GlobSigEvalDecl at <85,12-137,22> : missing else in evalDeclSortPN\'GlobSigEvalDecl:options->pair**name->com");}}}}
 return r;}

extern OBJ _AGlobSigEvalDecl_7(OBJ x1,OBJ x2,OBJ x3) /* eqNameh */
{OBJ r;
 {OBJ x14=FLD1(x2,1);
  if(EXPRD(x2,1)){
   FLD1(x2,1)=NIL;DSPRD(x2);
  }else{
   COPY(x14,1);
   FRPRD(x2,1);}
  {OBJ x18=FLD1(x3,1);
   if(EXPRD(x3,1)){
    FLD1(x3,1)=NIL;DSPRD(x3);
   }else{
    COPY(x18,1);
    FRPRD(x3,1);}
   {OBJ x22;
    x22=x18;
    r=_AGlobSigEvalInst_7(x1,x14,x22);}}}
 return r;}

extern OBJ _AGlobSigEvalDecl_8(OBJ x1,OBJ x2,OBJ x3) /* !! */
{OBJ r;
 CPPRD(__AGlobSigEvalDecl_15,1);
 {OBJ x4;OBJ x5;OBJ x6;
  x4=_AName_34(x2);
  x5=_AGlobSigToText_1(x1,__ABUILTIN_20);
  ADenotation_4(__AGlobSigEvalDecl_15,x5,x6);
  ADenotation_4(x4,x6,r);}
 return r;}

extern OBJ _AGlobSigEvalDecl_9(OBJ x1,OBJ x2,OBJ x3) /* evalDeclSortPN2 */
{OBJ r;
 {OBJ x92=FLD1(x1,1);
  if(EXPRD(x1,1)){
   FLD1(x1,1)=NIL;DSPRD(x1);
  }else{
   COPY(x92,1);
   FRPRD(x1,1);}
  {OBJ x99;OBJ x100;OBJ x101;
   if(ISTGPRD(x3,0)){
    {OBJ x96=FLD(x3,1);
     if(EXPRD(x3,1)){
      x99=x96;
      DSPRDF(x3);
     }else{
      CPPRD(x96,1);
      x99=x96;
      FRPRD(x3,1);}
     COPY(x92,2);}
   }else{
    HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
   x100=_AName_11(x92);
   x101=_AName_12(x92);
   {OBJ x102=FLD1(x99,1);OBJ x103=FLD1(x99,2);FLAG x_x99=EXPRD(x99,1);
    if(x_x99){
    }else{
     CPPRD(x102,1);COPY(x103,1);}
    if(ISPRD(x92)&&(ISTGPRD(x92,2))){
     {OBJ x106=FLD(x92,3);
      {OBJ x107=FLD1(x102,1);OBJ x108=FLD1(x102,2);FLAG x_x102=EXPRD(x102,1);
       if(x_x102){
       }else{
	COPY(x107,1);}
       {OBJ x110;OBJ x109;OBJ x111;OBJ x120;OBJ x121;OBJ x122;OBJ x123;OBJ x124;OBJ x125;
	if(ISTGPRM(x108,1)){
	 COPY(x107,2);
	 x110=x2;
	}else{
	 COPY(x107,2);
	 x110=__ABUILTIN_3;}
	x109=_AGlobSigEvalDecl_12(x107,x101,x106);
	x111=_AGlobSigEvalDecl_10(x107,x109);
	if(ISTGPRM(x111,1)){
	 COPY(x107,1);
	 {OBJ x112;TUP2 x114;OBJ x116;OBJ x117;OBJ x118;
	  x112=_AImpDecl4SigAna_4(x107,x101,x106);
	  x114=_AImpDecl4SigAna_19(x107,x101,x103);
	  x116=_AImpDecl4SigAna_30(x114.c1,x92,x114.c2);
	  PRDF(3,2,x117);FLD(x117,1)=x101;FLD(x117,2)=x100;FLD(x117,3)=x114.c2;
	  if(ISTGPRM(x112,1)){
	   x121=x117;
	   CPCLS(__ACom_47,1);
	   x120=_AImpDecl4SigAna_17(x116,x101,x106,x114.c2);
	  }else{
	   x120=x116;x121=x117;
	   CPCLS(__ACom_47,1);}}
	}else{
	 x121=x92;x120=x107;
	 FREE(x103,1);
	 CPCLS(__ACom_47,1);}
	if(x_x102){
	 RSOME(x102,x122);FLD1(x122,1)=x120;FLD1(x122,2)=x110;
	}else{
	 FRPRD(x102,1);PRD1(2,x122);FLD1(x122,1)=x120;FLD1(x122,2)=x110;}
	if(x_x99){
	 RSOME(x99,x123);FLD1(x123,1)=x122;FLD1(x123,2)=x121;
	}else{
	 FRPRD(x99,1);PRD1(2,x123);FLD1(x123,1)=x122;FLD1(x123,2)=x121;}
	PRD(1,0,x124);FLD(x124,1)=x123;
	x125=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x124);
	PRD(2,0,r);FLD(r,1)=x125;FLD(r,2)=__ASeq_6;}}}
    }else{
     HLT("Name at <unknown> : undefined selection inst\'Name:name->inst");}}}}
 return r;}

extern OBJ _AGlobSigEvalDecl_10(register OBJ x1,register OBJ x2) /* isGenericInst */
{OBJ r;
 for(;;){
  if(ISPRD(x2)&&(ISTGPRD(x2,6)||ISTGPRD(x2,9)||ISTGPRD(x2,5))){
   if(EXPRD(x2,1)){
    DSPRD(x2);
   }else{
    DCPRD(x2,1);}
   FREE(x1,1);
   r=__ABUILTIN_5;
  }else{
   if(ISPRD(x2)&&(ISTGPRD(x2,7))){
    {OBJ x66=FLD(x2,1);
     if(EXPRD(x2,1)){
      DSPRDF(x2);
     }else{
      COPY(x66,1);
      FRPRD(x2,1);}
     x2=x66;continue;}
   }else{
    if(ISPRD(x2)&&(ISTGPRD(x2,8)||ISTGPRD(x2,4))){
     {OBJ x68=FLD(x2,1);
      if(EXPRD(x2,1)){
       FLD(x2,1)=NIL;DSPRD(x2);
      }else{
       COPY(x68,1);
       FRPRD(x2,1);}
      CPCLS(__AGlobSigEvalDecl_11,1);
      {OBJ x69;
       x69=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigEvalDecl_11,1))(__AGlobSigEvalDecl_11,x1);
       r=_ASeq_40(x69,x68);}}
    }else{
     HLT("GlobSigEvalDecl at <174,5-17> : missing else in isGenericInst\'GlobSigEvalDecl:globSig**instE->bool");}}}
  break;}
 return r;}

extern OBJ _AGlobSigEvalDecl_11(OBJ x1,OBJ x2) /* isGenericInst,1 */
{OBJ r;
 if(ISPRD(x2)&&(ISTGPRD(x2,2))){
  {OBJ x16=FLD(x2,3);
   COPY(x1,1);
   CPPRD(x2,1);
   {OBJ x17;OBJ x18;
    x17=_AImpDecl4SigAna_52(x1,x2);
    x18=_AName_12(x2);
    if(ISTGPRM(x17,1)){
     COPY(x1,1);
     {OBJ x19;
      x19=_AGlobSigEvalDecl_12(x1,x18,x16);
      r=_AGlobSigEvalDecl_10(x1,x19);}
    }else{
     FREE(x1,1);
     r=__ABUILTIN_3;}}}
 }else{
  FREE(x1,1);
  FREE(x2,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AGlobSigEvalDecl_12(OBJ x1,OBJ x2,OBJ x3) /* getInstE */
{OBJ r;
 {OBJ x4;OBJ x5;OBJ x6;
  x4=_AGlobSig_55(x1);
  x5=_ADArray_20(x4,x2);
  x6=_AImpExpEntry_91(x5);
  r=_ADArray_20(x6,x3);}
 return r;}

extern OBJ _AGlobSigEvalDecl_13(OBJ x1,OBJ x2) /* < */
{OBJ r;
 ANat_80(x1,x2,r);
 return r;}

extern OBJ _AGlobSigEvalDecl_14(OBJ x1,OBJ x2,OBJ x3) /* h12 */
{OBJ r;
 CPCLS(__AGlobSigEvalInst_7,1);
 COPY(x1,2);
 {OBJ x4;OBJ x5;OBJ x6;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AGlobSigEvalInst_7,1))(__AGlobSigEvalInst_7,x1);
  x5=_ADecl4SigAna_11(x1,x2);
  x6=_ADecl4SigAna_11(x1,x3);
  r=_AAbsyFun2_6(x4,x5,x6);}
 return r;}



init_AGlobSigEvalDecl()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABitset();
 init_APatterns();
 init_AAttributes();
 init_ADArray();
 init_AObjects();
 init_ANatMap();
 init_AGlobSig();
 init_AArray();
 init_ACom();
 init_APartName();
 init_AOcOptions();
 init_AAbsyFun2();
 init_ASeq();
 init_AAbsyFun3();
 init_APair();
 init_AComCompose();
 init_ANat();
 init_ADEBUG();
 init_AOption();
 init_ADecl4SigAna();
 init_AChar();
 init_ADenotation();
 init_AStream();
 init_AErrCom();
 init_AVoid();
 init_AGlobSigEvalInst();
 init_AString();
 init_AGlobSigToText();
 init_AFile();
 init_AImpDecl4SigAna();
 init_AInt();
 init_AMySeqFun1();
 init_ATable();
 init_AName4SigAna();
 init_AUniqueTable();
 init_ASeqFilter();
 init_ADeclEntry();
 init_ASeqReduce();
 init_APartNameEntry();
 init_ASeqSort();
 init_AImpExpEntry();
 init_AMaps4SigAna();
 init_AName();
 init_ASetByBST();
 init_AGlobSigImpl();
 init_ABSTree();
 init_ARep();
 init_ATree();
 init_APragma();
 init_ASeqMap();
 init_AImpl();
 init_AMapReduce();
 init_AGlobPragma();
 init_ASeqConv();
 init_AOcPos();
 init_ADArrayReduce();
 init_AMap();
 init_ALexem();
 init_ASet();
 init_AFct();
 DEN("-zevalDeclSortPN",__AGlobSigEvalDecl_17);
 DEN("instantiation missing",__AGlobSigEvalDecl_16);
 DEN("\n",__AGlobSigEvalDecl_15);
 CLS(3,_AGlobSigEvalDecl_14,__AGlobSigEvalDecl_14);
 CLS(2,_AGlobSigEvalDecl_13,__AGlobSigEvalDecl_13);
 CLS(3,_AGlobSigEvalDecl_12,__AGlobSigEvalDecl_12);
 CLS(2,_AGlobSigEvalDecl_11,__AGlobSigEvalDecl_11);
 CLS(2,_AGlobSigEvalDecl_10,__AGlobSigEvalDecl_10);
 CLS(3,_AGlobSigEvalDecl_9,__AGlobSigEvalDecl_9);
 LCLS(3,_AGlobSigEvalDecl_8,__AGlobSigEvalDecl_8);
 CLS(3,_AGlobSigEvalDecl_7,__AGlobSigEvalDecl_7);
 CLS(3,_AGlobSigEvalDecl_6,__AGlobSigEvalDecl_6);
 CLS(2,_AGlobSigEvalDecl_4,__AGlobSigEvalDecl_4);
 CLS(2,_AGlobSigEvalDecl_2_c,__AGlobSigEvalDecl_2);
 CLS(3,_AGlobSigEvalDecl_1,__AGlobSigEvalDecl_1);
 __AGlobSigEvalDecl_3=__ABUILTIN_5;
 CPPRD(__AGlobSigEvalDecl_17,1);
 __AGlobSigEvalDecl_5=_ADEBUG_10(__AGlobSigEvalDecl_17);}

