

#include "BUILTIN.h"

#include "Nat.h"

#include "Char.h"

#include "Int.h"

#include "Denotation.h"

#define __ADenotation_S1_L31 __ADenotation_31
extern OBJ __ADenotation_S1_L31;
extern OBJ _ADenotation_Ainit(OBJ,OBJ);OBJ __ADenotation_Ainit; /* init */
extern OBJ _ADenotation_Ainit_O1(OBJ,OBJ);OBJ __ADenotation_Ainit_O1; /* init,1 */
OBJ __ADenotation_Aempty; /* empty */
extern OBJ _ADenotation_Spp(OBJ,OBJ);OBJ __ADenotation_Spp; /* ++ */
extern OBJ _ADenotation_Spsp(OBJ,OBJ,OBJ);OBJ __ADenotation_Spsp; /* +/+ */
extern OBJ _ADenotation_Spsp_O1(OBJ,OBJ,OBJ);OBJ __ADenotation_Spsp_O1; /* +/+,1 */
extern OBJ _ADenotation_Sp5p(OBJ,OBJ,OBJ);OBJ __ADenotation_Sp5p; /* +%+ */
extern OBJ _ADenotation_Sp5p_O1(OBJ,OBJ,OBJ);OBJ __ADenotation_Sp5p_O1; /* +%+,1 */
extern OBJ _ADenotation_Sie(OBJ,OBJ,OBJ);OBJ __ADenotation_Sie; /* := */
extern OBJ _ADenotation_Aupd(OBJ,OBJ,OBJ);OBJ __ADenotation_Aupd; /* upd */
extern OBJ _ADenotation_Aslice(OBJ,OBJ,OBJ);OBJ __ADenotation_Aslice; /* slice */
extern OBJ _ADenotation_Adelete(OBJ,OBJ,OBJ);OBJ __ADenotation_Adelete; /* delete */
extern OBJ _ADenotation_Ainsert(OBJ,OBJ,OBJ);OBJ __ADenotation_Ainsert; /* insert */
extern OBJ _ADenotation_S1(OBJ,OBJ);OBJ __ADenotation_S1; /* ! */
extern OBJ _ADenotation_S3(OBJ);OBJ __ADenotation_S3; /* # */
extern OBJ _ADenotation_Aempty_(OBJ);OBJ __ADenotation_Aempty_; /* empty? */
extern OBJ _ADenotation_Sl(OBJ,OBJ);OBJ __ADenotation_Sl; /* < */
extern OBJ _ADenotation_Sle(OBJ,OBJ);OBJ __ADenotation_Sle; /* <= */
extern OBJ _ADenotation_Sge(OBJ,OBJ);OBJ __ADenotation_Sge; /* >= */
extern OBJ _ADenotation_Sg(OBJ,OBJ);OBJ __ADenotation_Sg; /* > */
extern OBJ _ADenotation_Se(OBJ,OBJ);OBJ __ADenotation_Se; /* = */
extern OBJ _ADenotation_SSe(OBJ,OBJ);OBJ __ADenotation_SSe; /* |= */
extern OBJ _ADenotation_S5(OBJ);OBJ __ADenotation_S5; /* % */
extern OBJ _ADenotation_S1_O1(OBJ);OBJ __ADenotation_S1_O1; /* !,1 */
extern OBJ _ADenotation_AuncheckedUpd(OBJ,OBJ,OBJ);OBJ __ADenotation_AuncheckedUpd; /* uncheckedUpd */
extern OBJ _ADenotation_AuncheckedSel(OBJ,OBJ);OBJ __ADenotation_AuncheckedSel; /* uncheckedSel */
extern OBJ _ADenotation_Acompare(OBJ,OBJ);OBJ __ADenotation_Acompare; /* compare */
extern OBJ _ADenotation_S5_L30(OBJ);OBJ __ADenotation_S5_L30; /* %'30 */
OBJ __ADenotation_S1_L31; /* !'31 */

#include "Denotation.hc.c"

extern OBJ _ADenotation_Spsp(OBJ x1,OBJ x2,OBJ x3) /* +/+ */
{OBJ r;
 CPPRD(x2,1);
 {OBJ x4;OBJ x5;
  ADenotation_S3(x2,x4);
  ANat_6(x4,x5);
  if(ISTGPRM(x5,1)){
   FRPRD(x2,1);
   r=x3;
  }else{
   CPPRD(x3,1);
   {OBJ x6;OBJ x7;
    ADenotation_S3(x3,x6);
    ANat_6(x6,x7);
    if(ISTGPRM(x7,1)){
     FRPRD(x3,1);
     r=x2;
    }else{
     {OBJ x8;OBJ x9;
      ADenotation_Ainit(__ANat_8,x1,x8);
      ADenotation_Spp(x8,x3,x9);
      ADenotation_Spp(x2,x9,r);}}}}}
 return r;}

extern OBJ _ADenotation_Spsp_O1(OBJ x1,OBJ x2,OBJ x3) /* +/+,1 */
{OBJ r;
 CPPRD(x2,1);
 {OBJ x4;OBJ x5;
  ADenotation_S3(x2,x4);
  ANat_6(x4,x5);
  if(ISTGPRM(x5,1)){
   FRPRD(x1,1);
   FRPRD(x2,1);
   r=x3;
  }else{
   CPPRD(x3,1);
   {OBJ x6;OBJ x7;
    ADenotation_S3(x3,x6);
    ANat_6(x6,x7);
    if(ISTGPRM(x7,1)){
     FRPRD(x1,1);
     FRPRD(x3,1);
     r=x2;
    }else{
     {OBJ x8;
      ADenotation_Spp(x1,x3,x8);
      ADenotation_Spp(x2,x8,r);}}}}}
 return r;}

extern OBJ _ADenotation_Sp5p(OBJ x1,OBJ x2,OBJ x3) /* +%+ */
{OBJ r;
 {OBJ x4;OBJ x5;
  ADenotation_Ainit(__ANat_8,x1,x4);
  ADenotation_Spp(x4,x3,x5);
  ADenotation_Spp(x2,x5,r);}
 return r;}

extern OBJ _ADenotation_Sp5p_O1(OBJ x1,OBJ x2,OBJ x3) /* +%+,1 */
{OBJ r;
 {OBJ x4;
  ADenotation_Spp(x1,x3,x4);
  ADenotation_Spp(x2,x4,r);}
 return r;}

extern OBJ _ADenotation_Sie(OBJ x1,OBJ x2,OBJ x3) /* := */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x4;OBJ x5;
  ADenotation_S3(x1,x4);
  ANat_80(x2,x4,x5);
  if(ISTGPRM(x5,1)){
   ADenotation_AuncheckedUpd(x1,x2,x3,r);
  }else{
   HLT(":=\'Denotation: index out of range");}}
 return r;}

extern OBJ _ADenotation_Aupd(OBJ x1,OBJ x2,OBJ x3) /* upd */
{OBJ r;
 CPPRD(x3,1);
 {OBJ x4;OBJ x5;
  ADenotation_S3(x3,x4);
  ANat_80(x1,x4,x5);
  if(ISTGPRM(x5,1)){
   ADenotation_AuncheckedUpd(x3,x1,x2,r);
  }else{
   HLT("upd\'Denotation: index out of range");}}
 return r;}

extern OBJ _ADenotation_S1(OBJ x1,OBJ x2) /* ! */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x3;OBJ x4;
  ADenotation_S3(x1,x3);
  ANat_80(x2,x3,x4);
  if(ISTGPRM(x4,1)){
   ADenotation_AuncheckedSel(x1,x2,r);
  }else{
   CPPRD(__ADenotation_S1_L31,1);
   {OBJ x5;
    ADenotation_Spp(__ADenotation_S1_L31,x1,x5);
    ABUILTIN_12(x5,r);}}}
 return r;}

extern OBJ _ADenotation_Aempty_(OBJ x1) /* empty? */
{OBJ r;
 {OBJ x2;
  ADenotation_S3(x1,x2);
  ANat_6(x2,r);}
 return r;}

extern OBJ _ADenotation_Sl(OBJ x1,OBJ x2) /* < */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_83(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_Sle(OBJ x1,OBJ x2) /* <= */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_81(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_Sge(OBJ x1,OBJ x2) /* >= */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_82(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_Sg(OBJ x1,OBJ x2) /* > */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_84(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_Se(OBJ x1,OBJ x2) /* = */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_79(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_SSe(OBJ x1,OBJ x2) /* |= */
{OBJ r;
 {OBJ x3;
  ADenotation_Acompare(x1,x2,x3);
  AInt_80(x3,__AInt_2,r);}
 return r;}

extern OBJ _ADenotation_S5(OBJ x1) /* % */
{OBJ r;
 ADenotation_S5_L30(x1,r);
 return r;}

extern OBJ _ADenotation_S1_O1(OBJ x1) /* !,1 */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _ADenotation_S5_L30(OBJ x1) /* %'30 */
{OBJ r;
 ADenotation_Ainit(__ANat_8,x1,r);
 return r;}

static OBJ _mt_3_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,1);
 FLDCLS(r,1)=t1;
 return r;}

static OBJ _mt_3_0_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(t1,t2,t3);
 return r;}

static OBJ _mt_3_1_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),t1,t2);
 return r;}

init_ADenotation()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_AChar();
 init_AInt();
 DEN("!\'Denotation: index out of range for denotation ",__ADenotation_31);
 CLS(1,_ADenotation_30,__ADenotation_30);
 CLS(2,_ADenotation_29,__ADenotation_29);
 CLS(2,_ADenotation_26,__ADenotation_26);
 CLS(3,_ADenotation_25,__ADenotation_25);
 CLS(1,_ADenotation_24,__ADenotation_24);
 CLS(1,_ADenotation_23,__ADenotation_23);
 CLS(2,_ADenotation_22,__ADenotation_22);
 CLS(2,_ADenotation_21,__ADenotation_21);
 CLS(2,_ADenotation_20,__ADenotation_20);
 CLS(2,_ADenotation_19,__ADenotation_19);
 CLS(2,_ADenotation_18,__ADenotation_18);
 CLS(2,_ADenotation_17,__ADenotation_17);
 CLS(1,_ADenotation_16,__ADenotation_16);
 CLS(1,_ADenotation_15,__ADenotation_15);
 CLS(2,_ADenotation_14,__ADenotation_14);
 CLS(3,_ADenotation_13,__ADenotation_13);
 CLS(3,_ADenotation_12,__ADenotation_12);
 CLS(3,_ADenotation_11,__ADenotation_11);
 CLS(3,_ADenotation_10,__ADenotation_10);
 CLS(3,_ADenotation_9,__ADenotation_9);
 CLS(3,_ADenotation_8,__ADenotation_8);
 CLS(3,_ADenotation_7,__ADenotation_7);
 CLS(3,_ADenotation_6,__ADenotation_6);
 CLS(3,_ADenotation_5,__ADenotation_5);
 CLS(2,_ADenotation_4,__ADenotation_4);
 DEN("",__ADenotation_3);
 CLS(2,_ADenotation_2,__ADenotation_2);
 CLS(2,_ADenotation_1,__ADenotation_1);
 MTH(3,0,1,_mt_3_0_1);LZYMTH(3,0,1,_mt_3_0_1);
 MTH(3,0,3,_mt_3_0_3);LZYMTH(3,0,3,_mt_3_0_3);
 MTH(3,1,2,_mt_3_1_2);LZYMTH(3,1,2,_mt_3_1_2);
 init_const_ADenotation();}

