

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _ASeqCompare_3(OBJ,OBJ,OBJ);extern OBJ __ASeqCompare_3;
extern OBJ _AStore_2(OBJ);OBJ __AStore_2; /* tup */
extern OBJ _AStore_3(OBJ);OBJ __AStore_3; /* tup? */
extern OBJ _AStore_4(OBJ);OBJ __AStore_4; /* comps */
extern OBJ _AStore_5(OBJ);OBJ __AStore_5; /* sum */
extern OBJ _AStore_6(OBJ);OBJ __AStore_6; /* sum? */
extern OBJ _AStore_7(OBJ);OBJ __AStore_7; /* members */
extern OBJ _AStore_8(OBJ,OBJ);OBJ __AStore_8; /* clos */
extern OBJ _AStore_9(OBJ);OBJ __AStore_9; /* clos? */
extern OBJ _AStore_10(OBJ);OBJ __AStore_10; /* outs */
extern OBJ _AStore_11(OBJ);OBJ __AStore_11; /* ins */
OBJ __AStore_12; /* someClos */
extern OBJ _AStore_13(OBJ);OBJ __AStore_13; /* someClos? */
extern OBJ _AStore_14(OBJ,OBJ);OBJ __AStore_14; /* oneProd */
extern OBJ _AStore_15(OBJ);OBJ __AStore_15; /* oneProd? */
extern OBJ _AStore_17(OBJ);OBJ __AStore_17; /* tag */
extern OBJ _AStore_18(OBJ,OBJ);OBJ __AStore_18; /* prod */
extern OBJ _AStore_19(OBJ);OBJ __AStore_19; /* prod? */
OBJ __AStore_22; /* someProd */
extern OBJ _AStore_23(OBJ);OBJ __AStore_23; /* someProd? */
extern OBJ _AStore_24(OBJ);OBJ __AStore_24; /* onePrim */
extern OBJ _AStore_25(OBJ);OBJ __AStore_25; /* onePrim? */
extern OBJ _AStore_27(OBJ);OBJ __AStore_27; /* prim */
extern OBJ _AStore_28(OBJ);OBJ __AStore_28; /* prim? */
OBJ __AStore_30; /* somePrim */
extern OBJ _AStore_31(OBJ);OBJ __AStore_31; /* somePrim? */
OBJ __AStore_32; /* some */
extern OBJ _AStore_33(OBJ);OBJ __AStore_33; /* some? */
extern OBJ _AStore_34(OBJ,OBJ);OBJ __AStore_34; /* = */
extern OBJ _AStore_35(OBJ);OBJ __AStore_35; /* isPrim? */
extern OBJ _AStore_36(OBJ);OBJ __AStore_36; /* isProd? */
extern OBJ _AStore_37(OBJ);OBJ __AStore_37; /* isClos? */

extern OBJ _AStore_2(OBJ x1) /* tup */
{OBJ r;
 PRD(1,10,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AStore_3(OBJ x1) /* tup? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,10))){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_4(OBJ x1) /* comps */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,6)||ISTGPRD(x1,5))){
  {OBJ x3=FLD(x1,2);
   if(EXPRD(x1,1)){
    r=x3;
    FLD(x1,2)=NIL;DSPRD(x1);
   }else{
    COPY(x3,1);
    r=x3;
    FRPRD(x1,1);}}
 }else{
  if(ISPRD(x1)&&(ISTGPRD(x1,10))){
   {OBJ x6=FLD(x1,1);
    if(EXPRD(x1,1)){
     r=x6;
     DSPRDF(x1);
    }else{
     COPY(x6,1);
     r=x6;
     FRPRD(x1,1);}}
  }else{
   HLT("Store at <unknown> : undefined selection comps\'Store:store->seq");}}
 return r;}

extern OBJ _AStore_5(OBJ x1) /* sum */
{OBJ r;
 PRD(1,9,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AStore_6(OBJ x1) /* sum? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,9))){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_7(OBJ x1) /* members */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,9))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("Store at <unknown> : undefined selection members\'Store:store->seq");}
 return r;}

extern OBJ _AStore_8(OBJ x1,OBJ x2) /* clos */
{OBJ r;
 PRD(2,8,r);FLD(r,1)=x1;FLD(r,2)=x2;
 return r;}

extern OBJ _AStore_9(OBJ x1) /* clos? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,8))){
  if(EXPRD(x1,1)){
   DSPRD(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_10(OBJ x1) /* outs */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,8))){
  {OBJ x3=FLD(x1,2);
   if(EXPRD(x1,1)){
    r=x3;
    FREE(FLD(x1,1),1);DSPRDF(x1);
   }else{
    COPY(x3,1);
    r=x3;
    FRPRD(x1,1);}}
 }else{
  HLT("Store at <unknown> : undefined selection outs\'Store:store->seq");}
 return r;}

extern OBJ _AStore_11(OBJ x1) /* ins */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,8))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    FREE(FLD(x1,2),1);DSPRDF(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("Store at <unknown> : undefined selection ins\'Store:store->seq");}
 return r;}

extern OBJ _AStore_13(OBJ x1) /* someClos? */
{OBJ r;
 if(ISPRM(x1)&&(ISTGPRM(x1,7))){
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_14(OBJ x1,OBJ x2) /* oneProd */
{OBJ r;
 PRD(2,6,r);FLD(r,1)=x1;FLD(r,2)=x2;
 return r;}

extern OBJ _AStore_15(OBJ x1) /* oneProd? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,6))){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,2),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_17(OBJ x1) /* tag */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,3)||ISTGPRD(x1,5)||ISTGPRD(x1,6)||ISTGPRD(x1,2))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRD(x1);
   }else{
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("Store at <unknown> : undefined selection tag\'Store:store->nat");}
 return r;}

extern OBJ _AStore_18(OBJ x1,OBJ x2) /* prod */
{OBJ r;
 PRD(2,5,r);FLD(r,1)=x1;FLD(r,2)=x2;
 return r;}

extern OBJ _AStore_19(OBJ x1) /* prod? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,5))){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,2),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_23(OBJ x1) /* someProd? */
{OBJ r;
 if(ISPRM(x1)&&(ISTGPRM(x1,4))){
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_24(OBJ x1) /* onePrim */
{OBJ r;
 PRDF(1,3,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AStore_25(OBJ x1) /* onePrim? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,3))){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_27(OBJ x1) /* prim */
{OBJ r;
 PRDF(1,2,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AStore_28(OBJ x1) /* prim? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,2))){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_31(OBJ x1) /* somePrim? */
{OBJ r;
 if(ISPRM(x1)&&(ISTGPRM(x1,1))){
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_33(OBJ x1) /* some? */
{OBJ r;
 if(ISPRM(x1)&&(ISTGPRM(x1,0))){
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AStore_34(OBJ x1,OBJ x2) /* = */
{OBJ r;
 if(ISPRM(x1)){
  switch(TGPRM(x1)){
   case 4:
    if(ISPRM(x2)&&(ISTGPRM(x2,4))){
     r=__ABUILTIN_5;
    }else{
     FREE(x2,1);
     r=__ABUILTIN_3;}break;
   case 1:
    if(ISPRM(x2)&&(ISTGPRM(x2,1))){
     r=__ABUILTIN_5;
    }else{
     FREE(x2,1);
     r=__ABUILTIN_3;}break;
   case 0:
    if(ISPRM(x2)&&(ISTGPRM(x2,0))){
     r=__ABUILTIN_5;
    }else{
     FREE(x2,1);
     r=__ABUILTIN_3;}break;
   default: 
    if(ISPRM(x2)&&(ISTGPRM(x2,7))){
     r=__ABUILTIN_5;
    }else{
     FREE(x2,1);
     r=__ABUILTIN_3;}}
 }else{
  switch(TGPRD(x1)){
   case 9:
    {OBJ x340=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x340,1);
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,9))){
      {OBJ x341=FLD(x2,1);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	COPY(x341,1);
	FRPRD(x2,1);}
       CPCLS(__AStore_34,1);
       r=_ASeqCompare_3(__AStore_34,x340,x341);}
     }else{
      FREE(x2,1);
      FREE(x340,1);
      r=__ABUILTIN_3;}}break;
   case 10:
    {OBJ x342=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x342,1);
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,10))){
      {OBJ x343=FLD(x2,1);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	COPY(x343,1);
	FRPRD(x2,1);}
       CPCLS(__AStore_34,1);
       r=_ASeqCompare_3(__AStore_34,x342,x343);}
     }else{
      FREE(x2,1);
      FREE(x342,1);
      r=__ABUILTIN_3;}}break;
   case 8:
    {OBJ x344=FLD(x1,1);OBJ x345=FLD(x1,2);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x344,1);COPY(x345,1);
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,8))){
      {OBJ x346=FLD(x2,1);OBJ x347=FLD(x2,2);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	COPY(x346,1);COPY(x347,1);
	FRPRD(x2,1);}
       CPCLS(__AStore_34,1);
       {OBJ x348;
	x348=_ASeqCompare_3(__AStore_34,x344,x346);
	if(ISTGPRM(x348,1)){
	 CPCLS(__AStore_34,1);
	 r=_ASeqCompare_3(__AStore_34,x345,x347);
	}else{
	 FREE(x345,1);
	 FREE(x347,1);
	 r=__ABUILTIN_3;}}}
     }else{
      FREE(x2,1);
      FREE(x344,1);
      FREE(x345,1);
      r=__ABUILTIN_3;}}break;
   case 5:
    {OBJ x349=FLD(x1,1);OBJ x350=FLD(x1,2);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x350,1);
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,5))){
      {OBJ x351=FLD(x2,1);OBJ x352=FLD(x2,2);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	COPY(x352,1);
	FRPRD(x2,1);}
       {OBJ x353;
	ANat_76(x349,x351,x353);
	if(ISTGPRM(x353,1)){
	 CPCLS(__AStore_34,1);
	 r=_ASeqCompare_3(__AStore_34,x350,x352);
	}else{
	 FREE(x350,1);
	 FREE(x352,1);
	 r=__ABUILTIN_3;}}}
     }else{
      FREE(x2,1);
      FREE(x350,1);
      r=__ABUILTIN_3;}}break;
   case 6:
    {OBJ x354=FLD(x1,1);OBJ x355=FLD(x1,2);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x355,1);
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,6))){
      {OBJ x356=FLD(x2,1);OBJ x357=FLD(x2,2);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	COPY(x357,1);
	FRPRD(x2,1);}
       {OBJ x358;
	ANat_76(x354,x356,x358);
	if(ISTGPRM(x358,1)){
	 CPCLS(__AStore_34,1);
	 r=_ASeqCompare_3(__AStore_34,x355,x357);
	}else{
	 FREE(x355,1);
	 FREE(x357,1);
	 r=__ABUILTIN_3;}}}
     }else{
      FREE(x2,1);
      FREE(x355,1);
      r=__ABUILTIN_3;}}break;
   case 2:
    {OBJ x359=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,2))){
      {OBJ x360=FLD(x2,1);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	FRPRD(x2,1);}
       ANat_76(x359,x360,r);}
     }else{
      FREE(x2,1);
      r=__ABUILTIN_3;}}break;
   default: 
    {OBJ x338=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      FRPRD(x1,1);}
     if(ISPRD(x2)&&(ISTGPRD(x2,3))){
      {OBJ x339=FLD(x2,1);
       if(EXPRD(x2,1)){
	DSPRDF(x2);
       }else{
	FRPRD(x2,1);}
       ANat_76(x338,x339,r);}
     }else{
      FREE(x2,1);
      r=__ABUILTIN_3;}}}}
 return r;}

extern OBJ _AStore_35(OBJ x1) /* isPrim? */
{OBJ r;
 {OBJ x3;OBJ x7;
  if(ISPRD(x1)&&(ISTGPRD(x1,2))){
   x3=__ABUILTIN_5;
  }else{
   x3=__ABUILTIN_3;}
  if(ISTGPRM(x3,1)){
   x7=__ABUILTIN_5;
  }else{
   if(ISPRM(x1)&&(ISTGPRM(x1,1))){
    x7=__ABUILTIN_5;
   }else{
    if(ISPRD(x1)&&(ISTGPRD(x1,3))){
     x7=__ABUILTIN_5;
    }else{
     x7=__ABUILTIN_3;}}}
  if(ISTGPRM(x7,1)){
   FREE(x1,1);
   r=__ABUILTIN_5;
  }else{
   if(ISPRD(x1)&&(ISTGPRD(x1,10))){
    {OBJ x18=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x18,1);
      FRPRD(x1,1);}
     if(ISPRM(x18)){
      r=__ABUILTIN_5;
     }else{
      if(EXPRD(x18,1)){
       DSPRD(x18);
      }else{
       DCPRD(x18,1);}
      r=__ABUILTIN_3;}}
   }else{
    FREE(x1,1);
    r=__ABUILTIN_3;}}}
 return r;}

extern OBJ _AStore_36(OBJ x1) /* isProd? */
{OBJ r;
 {OBJ x4;OBJ x10;
  if(ISPRD(x1)&&(ISTGPRD(x1,5))){
   x4=__ABUILTIN_5;
  }else{
   x4=__ABUILTIN_3;}
  if(ISTGPRM(x4,1)){
   x10=__ABUILTIN_5;
  }else{
   if(ISPRM(x1)&&(ISTGPRM(x1,4))){
    x10=__ABUILTIN_5;
   }else{
    if(ISPRD(x1)&&(ISTGPRD(x1,6))){
     x10=__ABUILTIN_5;
    }else{
     x10=__ABUILTIN_3;}}}
  if(ISTGPRM(x10,1)){
   FREE(x1,1);
   r=__ABUILTIN_5;
  }else{
   if(ISPRD(x1)&&(ISTGPRD(x1,10))){
    {OBJ x21=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      COPY(x21,1);
      FRPRD(x1,1);}
     if(ISPRM(x21)){
      r=__ABUILTIN_3;
     }else{
      if(EXPRD(x21,1)){
       DSPRD(x21);
      }else{
       DCPRD(x21,1);}
      r=__ABUILTIN_5;}}
   }else{
    FREE(x1,1);
    r=__ABUILTIN_3;}}}
 return r;}

extern OBJ _AStore_37(OBJ x1) /* isClos? */
{OBJ r;
 if(ISPRM(x1)&&(ISTGPRM(x1,7))){
  r=__ABUILTIN_5;
 }else{
  if(ISPRD(x1)&&(ISTGPRD(x1,8))){
   if(EXPRD(x1,1)){
    DSPRD(x1);
   }else{
    DCPRD(x1,1);}
   r=__ABUILTIN_5;
  }else{
   FREE(x1,1);
   r=__ABUILTIN_3;}}
 return r;}





init_AStore()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_ASeq();
 init_AOption();
 init_ASeqCompare();
 init_ARelCmp();
 CLS(1,_AStore_31,__AStore_31);
 CLS(1,_AStore_28,__AStore_28);
 CLS(1,_AStore_27,__AStore_27);
 CLS(1,_AStore_25,__AStore_25);
 CLS(1,_AStore_24,__AStore_24);
 CLS(1,_AStore_23,__AStore_23);
 CLS(1,_AStore_19,__AStore_19);
 CLS(2,_AStore_18,__AStore_18);
 CLS(1,_AStore_17,__AStore_17);
 CLS(1,_AStore_15,__AStore_15);
 CLS(2,_AStore_14,__AStore_14);
 CLS(1,_AStore_13,__AStore_13);
 CLS(1,_AStore_11,__AStore_11);
 CLS(1,_AStore_10,__AStore_10);
 CLS(1,_AStore_9,__AStore_9);
 CLS(2,_AStore_8,__AStore_8);
 CLS(1,_AStore_7,__AStore_7);
 CLS(1,_AStore_6,__AStore_6);
 CLS(1,_AStore_5,__AStore_5);
 CLS(1,_AStore_37,__AStore_37);
 CLS(1,_AStore_4,__AStore_4);
 CLS(1,_AStore_36,__AStore_36);
 CLS(1,_AStore_3,__AStore_3);
 CLS(1,_AStore_35,__AStore_35);
 CLS(1,_AStore_2,__AStore_2);
 CLS(2,_AStore_34,__AStore_34);
 CLS(1,_AStore_33,__AStore_33);
 PRM(7,__AStore_12);
 PRM(4,__AStore_22);
 PRM(1,__AStore_30);
 PRM(0,__AStore_32);}

