

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ __ASeq_6;

#include "Array.h"
extern OBJ _ACAST_3(OBJ);extern OBJ __ACAST_3;

#include "Denotation.h"

#include "NatConv.h"
extern OBJ _AMap_16(OBJ,OBJ,OBJ);extern OBJ __AMap_16;
extern OBJ _AMap_31(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMap_31;
extern OBJ _AMap_33(OBJ,OBJ,OBJ);extern OBJ __AMap_33;

#include "Int.h"

#include "Real.h"

#include "Char.h"
extern OBJ __ATree_7;

#include "RUNTIME.h"

#define __ARUNTIME_AmakeSym_L21 __ARUNTIME_21
extern OBJ __ARUNTIME_AmakeSym_L21;

#define __ARUNTIME_AmakeSym_L22 __ARUNTIME_22
extern OBJ __ARUNTIME_AmakeSym_L22;

#define __ARUNTIME_AsymMap_L23 __ARUNTIME_23
extern OBJ __ARUNTIME_AsymMap_L23;

#define __ARUNTIME_AsymMap_L24 __ARUNTIME_24
extern OBJ __ARUNTIME_AsymMap_L24;

#define __ARUNTIME_AsymMap_L25 __ARUNTIME_25
extern OBJ __ARUNTIME_AsymMap_L25;

#define __ARUNTIME_AsymMap_L26 __ARUNTIME_26
extern OBJ __ARUNTIME_AsymMap_L26;
OBJ __ARUNTIME_SuSu; /* _|_ */
extern OBJ _ARUNTIME_Alink(OBJ);OBJ __ARUNTIME_Alink; /* link */
extern OBJ _ARUNTIME_Alookup(OBJ,OBJ);OBJ __ARUNTIME_Alookup; /* lookup */
extern OBJ _ARUNTIME_Aredefine(OBJ,OBJ,OBJ);OBJ __ARUNTIME_Aredefine; /* redefine */
extern OBJ _ARUNTIME_Acons(OBJ,OBJ);OBJ __ARUNTIME_Acons; /* cons */
extern OBJ _ARUNTIME_Atest_(OBJ,OBJ);OBJ __ARUNTIME_Atest_; /* test? */
extern OBJ _ARUNTIME_Atag(OBJ);OBJ __ARUNTIME_Atag; /* tag */
extern OBJ _ARUNTIME_Asel(OBJ,OBJ);OBJ __ARUNTIME_Asel; /* sel */
extern OBJ _ARUNTIME_AasBool(OBJ);OBJ __ARUNTIME_AasBool; /* asBool */
extern OBJ _ARUNTIME_AasDenotation(OBJ);OBJ __ARUNTIME_AasDenotation; /* asDenotation */
extern OBJ _ARUNTIME_AasObj(OBJ);OBJ __ARUNTIME_AasObj; /* asObj */
extern OBJ _ARUNTIME_AasObj_O1(OBJ);OBJ __ARUNTIME_AasObj_O1; /* asObj,1 */
extern OBJ _ARUNTIME_AmakeStructSym(OBJ);OBJ __ARUNTIME_AmakeStructSym; /* makeStructSym */
extern OBJ _ARUNTIME_AmakeSym(OBJ,OBJ);OBJ __ARUNTIME_AmakeSym; /* makeSym */
OBJ __ARUNTIME_AsymMap; /* symMap */
extern OBJ _ARUNTIME_AcLink(OBJ,OBJ);OBJ __ARUNTIME_AcLink; /* cLink */
extern OBJ _ARUNTIME_AcLookup(OBJ,OBJ);OBJ __ARUNTIME_AcLookup; /* cLookup */
extern OBJ _ARUNTIME_AcRedefine(OBJ,OBJ,OBJ);OBJ __ARUNTIME_AcRedefine; /* cRedefine */
OBJ __ARUNTIME_AundefObj; /* undefObj */
OBJ __ARUNTIME_AmakeSym_L21; /* makeSym'21 */
OBJ __ARUNTIME_AmakeSym_L22; /* makeSym'22 */
OBJ __ARUNTIME_AsymMap_L23; /* symMap'23 */
OBJ __ARUNTIME_AsymMap_L24; /* symMap'24 */
OBJ __ARUNTIME_AsymMap_L25; /* symMap'25 */
OBJ __ARUNTIME_AsymMap_L26; /* symMap'26 */

#include "RUNTIME.hc.c"

extern OBJ _ARUNTIME_Alink(OBJ x1) /* link */
{OBJ r;
 CPCLS(__ARUNTIME_AcLink,1);
 {OBJ x2;OBJ x3;
  ARUNTIME_AmakeStructSym(x1,x2);
  x3=(*(OBJ(*)(OBJ,OBJ))METHOD(__ARUNTIME_AcLink,1))(__ARUNTIME_AcLink,x2);
  PRD(2,0,r);FLD(r,1)=x3;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ARUNTIME_Alookup(OBJ x1,OBJ x2) /* lookup */
{OBJ r;
 CPCLS(__ARUNTIME_AcLookup,1);
 {OBJ x3;OBJ x4;
  ARUNTIME_AmakeSym(x1,x2,x3);
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__ARUNTIME_AcLookup,1))(__ARUNTIME_AcLookup,x3);
  PRD(2,0,r);FLD(r,1)=x4;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ARUNTIME_Aredefine(OBJ x1,OBJ x2,OBJ x3) /* redefine */
{OBJ r;
 CPCLS(__ARUNTIME_AcRedefine,1);
 {OBJ x4;OBJ x5;
  ARUNTIME_AmakeSym(x1,x2,x4);
  x5=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ARUNTIME_AcRedefine,2))(__ARUNTIME_AcRedefine,x4,x3);
  PRD(2,0,r);FLD(r,1)=x5;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _ARUNTIME_AasBool(OBJ x1) /* asBool */
{OBJ r;
 r=_ACAST_3(x1);
 return r;}

extern OBJ _ARUNTIME_AasDenotation(OBJ x1) /* asDenotation */
{OBJ r;
 r=_ACAST_3(x1);
 return r;}

extern OBJ _ARUNTIME_AasObj(OBJ x1) /* asObj */
{OBJ r;
 r=_ACAST_3(x1);
 return r;}

extern OBJ _ARUNTIME_AasObj_O1(OBJ x1) /* asObj,1 */
{OBJ r;
 r=_ACAST_3(x1);
 return r;}

extern OBJ _ARUNTIME_AmakeStructSym(OBJ x1) /* makeStructSym */
{OBJ r;
 COPY(__ARUNTIME_AsymMap,1);
 CPCLS(__ADenotation_17,1);
 CPPRD(x1,1);
 {OBJ x2;
  x2=_AMap_33(__ADenotation_17,__ARUNTIME_AsymMap,x1);
  if(ISPRM(x2)){
   r=x1;
  }else{
   {OBJ x9=FLD1(x2,1);
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     CPPRD(x9,1);
     FRPRD(x2,1);}
    FRPRD(x1,1);
    {OBJ x10=FLD1(x9,1);
     if(EXPRD(x9,1)){
      r=x10;
      FREE(FLD1(x9,2),1);DSPRDF(x9);
     }else{
      CPPRD(x10,1);
      r=x10;
      FRPRD(x9,1);}}}}}
 return r;}

extern OBJ _ARUNTIME_AmakeSym(OBJ x1,OBJ x2) /* makeSym */
{OBJ r;
 COPY(__ARUNTIME_AsymMap,1);
 CPCLS(__ADenotation_17,1);
 CPPRD(x1,1);
 {OBJ x3;
  x3=_AMap_33(__ADenotation_17,__ARUNTIME_AsymMap,x1);
  if(ISPRM(x3)){
   CPPRD(__ARUNTIME_AmakeSym_L21,1);
   CPPRD(__ARUNTIME_AmakeSym_L22,1);
   {OBJ x34;OBJ x35;OBJ x36;
    ANatConv_1(x2,x34);
    ADenotation_4(__ARUNTIME_AmakeSym_L21,x34,x35);
    ADenotation_4(x1,x35,x36);
    ADenotation_4(__ARUNTIME_AmakeSym_L22,x36,r);}
  }else{
   {OBJ x27=FLD1(x3,1);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     CPPRD(x27,1);
     FRPRD(x3,1);}
    FRPRD(x1,1);
    {OBJ x28=FLD1(x27,1);OBJ x29=FLD1(x27,2);
     if(EXPRD(x27,1)){
      DSPRDF(x27);
     }else{
      CPPRD(x28,1);COPY(x29,1);
      FRPRD(x27,1);}
     CPPRD(__ARUNTIME_AmakeSym_L21,1);
     CPPRD(__ARUNTIME_AmakeSym_L22,1);
     CPCLS(__ANat_80,1);
     {OBJ x30;OBJ x31;OBJ x32;OBJ x33;
      x30=_AMap_16(__ANat_80,x29,x2);
      ANatConv_1(x30,x31);
      ADenotation_4(__ARUNTIME_AmakeSym_L21,x31,x32);
      ADenotation_4(x28,x32,x33);
      ADenotation_4(__ARUNTIME_AmakeSym_L22,x33,r);}}}}}
 return r;}


static void ___ARUNTIME_16()
{
 /* __ARUNTIME_AsymMap */
 CPPRD(__ARUNTIME_AsymMap_L23,3);
 CPPRD(__ARUNTIME_AsymMap_L24,1);
 CPPRD(__ARUNTIME_AsymMap_L25,1);
 CPPRD(__ARUNTIME_AsymMap_L26,1);
 CPCLS(__ANat_80,12);
 CPCLS(__ADenotation_17,3);
 {OBJ x1;OBJ x2;OBJ x3;OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;OBJ x10;OBJ x11;OBJ x12;OBJ x13;OBJ x14;OBJ x15;OBJ x16;OBJ x17;
  x1=_AMap_31(__ANat_80,__ANat_17,__ANat_18,__ATree_7);
  x2=_AMap_31(__ANat_80,__ANat_10,__ANat_9,__ATree_7);
  x3=_AMap_31(__ANat_80,__ANat_9,__ANat_19,__ATree_7);
  x4=_AMap_31(__ANat_80,__ANat_16,__ANat_17,x1);
  x5=_AMap_31(__ANat_80,__ANat_9,__ANat_8,x2);
  PRD1(2,x6);FLD1(x6,1)=__ARUNTIME_AsymMap_L23;FLD1(x6,2)=x3;
  x7=_AMap_31(__ANat_80,__ANat_15,__ANat_15,x4);
  PRD1(2,x8);FLD1(x8,1)=__ARUNTIME_AsymMap_L23;FLD1(x8,2)=x5;
  x9=_AMap_31(__ADenotation_17,__ARUNTIME_AsymMap_L24,x6,__ATree_7);
  x10=_AMap_31(__ANat_80,__ANat_14,__ANat_16,x7);
  x11=_AMap_31(__ADenotation_17,__ARUNTIME_AsymMap_L25,x8,x9);
  x12=_AMap_31(__ANat_80,__ANat_13,__ANat_14,x10);
  x13=_AMap_31(__ANat_80,__ANat_12,__ANat_13,x12);
  x14=_AMap_31(__ANat_80,__ANat_11,__ANat_12,x13);
  x15=_AMap_31(__ANat_80,__ANat_10,__ANat_11,x14);
  x16=_AMap_31(__ANat_80,__ANat_9,__ANat_10,x15);
  PRD1(2,x17);FLD1(x17,1)=__ARUNTIME_AsymMap_L23;FLD1(x17,2)=x16;
  __ARUNTIME_AsymMap=_AMap_31(__ADenotation_17,__ARUNTIME_AsymMap_L26,x17,x11);}}

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

static OBJ _mt_3_2_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),t1);
 return r;}
static OBJ _mt_3_2_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_ARUNTIME()
{
 static int visited=0; if(visited) return; visited=1;
 init_AVoid();
 init_ANat();
 init_ASeq();
 init_AArray();
 init_ACom();
 init_AOption();
 init_ACAST();
 init_ADenotation();
 init_ANatConv();
 init_AMap();
 init_APair();
 init_ASet();
 init_AInt();
 init_AReal();
 init_AChar();
 init_ASeqMap();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 DEN("BOOL",__ARUNTIME_26);
 DEN("DENOTATION",__ARUNTIME_25);
 DEN("ABORT",__ARUNTIME_24);
 DEN("BUILTIN",__ARUNTIME_23);
 DEN("__A",__ARUNTIME_22);
 DEN("_",__ARUNTIME_21);
 CLS(3,_ARUNTIME_19,__ARUNTIME_19);
 CLS(2,_ARUNTIME_18,__ARUNTIME_18);
 CLS(2,_ARUNTIME_17,__ARUNTIME_17);
 CLS(2,_ARUNTIME_15,__ARUNTIME_15);
 CLS(1,_ARUNTIME_14,__ARUNTIME_14);
 CLS(1,_ARUNTIME_13,__ARUNTIME_13);
 CLS(1,_ARUNTIME_12,__ARUNTIME_12);
 CLS(1,_ARUNTIME_11,__ARUNTIME_11);
 CLS(1,_ARUNTIME_10,__ARUNTIME_10);
 CLS(2,_ARUNTIME_9,__ARUNTIME_9);
 CLS(1,_ARUNTIME_8,__ARUNTIME_8);
 CLS(2,_ARUNTIME_7,__ARUNTIME_7);
 CLS(2,_ARUNTIME_6,__ARUNTIME_6);
 CLS(3,_ARUNTIME_5,__ARUNTIME_5);
 CLS(2,_ARUNTIME_4,__ARUNTIME_4);
 CLS(1,_ARUNTIME_3,__ARUNTIME_3);
 MTH(3,0,2,_mt_3_0_2);LZYMTH(3,0,2,_mt_3_0_2);
 MTH(3,2,1,_mt_3_2_1);LZYMTH(3,2,1,_mt_3_2_1_l);
 init_const_ARUNTIME();
 /* __ARUNTIME_SuSu */
 COPY(__ARUNTIME_AundefObj,1);
 __ARUNTIME_SuSu=__ARUNTIME_AundefObj;
 ___ARUNTIME_16();}

