

#include "BUILTIN.h"

#include "Denotation.h"

#include "Nat.h"

#include "Char.h"

#include "Int.h"
OBJ __ABool_1; /* T */
OBJ __ABool_2; /* F */
extern OBJ _ABool_3(OBJ);OBJ __ABool_3; /* id */
extern OBJ _ABool_4(OBJ);OBJ __ABool_4; /* not */
extern OBJ _ABool_5(OBJ);OBJ __ABool_5; /* true */
extern OBJ _ABool_6(OBJ);OBJ __ABool_6; /* false */
extern OBJ _ABool_7(OBJ);OBJ __ABool_7; /* T,1 */
extern OBJ _ABool_8(OBJ);OBJ __ABool_8; /* F,1 */
extern OBJ _ABool_9(OBJ,OBJ);OBJ __ABool_9; /* equiv */
extern OBJ _ABool_10(OBJ,OBJ);OBJ __ABool_10; /* xor */
extern OBJ _ABool_11(OBJ,OBJ);OBJ __ABool_11; /* /\ */
extern OBJ _ABool_12(OBJ,OBJ);OBJ __ABool_12; /* \/ */
extern OBJ _ABool_13(OBJ,OBJ);OBJ __ABool_13; /* nand */
extern OBJ _ABool_14(OBJ,OBJ);OBJ __ABool_14; /* nor */
extern OBJ _ABool_15(OBJ,OBJ);OBJ __ABool_15; /* /~\ */
extern OBJ _ABool_16(OBJ,OBJ);OBJ __ABool_16; /* \~/ */
extern OBJ _ABool_17(OBJ,OBJ);OBJ __ABool_17; /* implies */
extern OBJ _ABool_18(OBJ,OBJ);OBJ __ABool_18; /* => */
extern OBJ _ABool_19(OBJ,OBJ);OBJ __ABool_19; /* 1st */
extern OBJ _ABool_20(OBJ,OBJ);OBJ __ABool_20; /* 2nd */
extern OBJ _ABool_21(OBJ,OBJ);OBJ __ABool_21; /* n1st */
extern OBJ _ABool_22(OBJ,OBJ);OBJ __ABool_22; /* n2nd */
extern OBJ _ABool_23(OBJ,OBJ);OBJ __ABool_23; /* true,1 */
extern OBJ _ABool_24(OBJ,OBJ);OBJ __ABool_24; /* false,1 */
extern OBJ _ABool_25(OBJ,OBJ);OBJ __ABool_25; /* T,2 */
extern OBJ _ABool_26(OBJ,OBJ);OBJ __ABool_26; /* F,2 */
extern OBJ _ABool_27(OBJ,OBJ);OBJ __ABool_27; /* < */
extern OBJ _ABool_28(OBJ,OBJ);OBJ __ABool_28; /* <= */
extern OBJ _ABool_29(OBJ,OBJ);OBJ __ABool_29; /* > */
extern OBJ _ABool_30(OBJ,OBJ);OBJ __ABool_30; /* >= */
extern OBJ _ABool_31(OBJ);OBJ __ABool_31; /* ! */
OBJ __ABool_32; /* !'32 */
OBJ __ABool_33; /* !'33 */

extern OBJ _ABool_3(OBJ x1) /* id */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _ABool_4(OBJ x1) /* not */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_3;
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_5(OBJ x1) /* true */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ABool_6(OBJ x1) /* false */
{OBJ r;
 r=__ABUILTIN_3;
 return r;}

extern OBJ _ABool_7(OBJ x1) /* T,1 */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ABool_8(OBJ x1) /* F,1 */
{OBJ r;
 r=__ABUILTIN_3;
 return r;}

extern OBJ _ABool_9(OBJ x1,OBJ x2) /* equiv */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=x2;
 }else{
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_10(OBJ x1,OBJ x2) /* xor */
{OBJ r;
 if(ISTGPRM(x1,0)){
  r=x2;
 }else{
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_11(OBJ x1,OBJ x2) /* /\ */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=x2;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ABool_12(OBJ x1,OBJ x2) /* \/ */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_5;
 }else{
  r=x2;}
 return r;}

extern OBJ _ABool_13(OBJ x1,OBJ x2) /* nand */
{OBJ r;
 {OBJ x3;
  if(ISTGPRM(x1,1)){
   x3=x2;
  }else{
   x3=__ABUILTIN_3;}
  if(ISTGPRM(x3,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_14(OBJ x1,OBJ x2) /* nor */
{OBJ r;
 {OBJ x3;
  if(ISTGPRM(x1,1)){
   x3=__ABUILTIN_5;
  }else{
   x3=x2;}
  if(ISTGPRM(x3,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_15(OBJ x1,OBJ x2) /* /~\ */
{OBJ r;
 {OBJ x3;
  if(ISTGPRM(x1,1)){
   x3=x2;
  }else{
   x3=__ABUILTIN_3;}
  if(ISTGPRM(x3,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_16(OBJ x1,OBJ x2) /* \~/ */
{OBJ r;
 {OBJ x3;
  if(ISTGPRM(x1,1)){
   x3=__ABUILTIN_5;
  }else{
   x3=x2;}
  if(ISTGPRM(x3,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ABool_17(OBJ x1,OBJ x2) /* implies */
{OBJ r;
 if(ISTGPRM(x1,1)){
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_18(OBJ x1,OBJ x2) /* => */
{OBJ r;
 if(ISTGPRM(x1,1)){
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_19(OBJ x1,OBJ x2) /* 1st */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _ABool_20(OBJ x1,OBJ x2) /* 2nd */
{OBJ r;
 r=x2;
 return r;}

extern OBJ _ABool_21(OBJ x1,OBJ x2) /* n1st */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_3;
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_22(OBJ x1,OBJ x2) /* n2nd */
{OBJ r;
 if(ISTGPRM(x2,1)){
  r=__ABUILTIN_3;
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_23(OBJ x1,OBJ x2) /* true,1 */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ABool_24(OBJ x1,OBJ x2) /* false,1 */
{OBJ r;
 r=__ABUILTIN_3;
 return r;}

extern OBJ _ABool_25(OBJ x1,OBJ x2) /* T,2 */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ABool_26(OBJ x1,OBJ x2) /* F,2 */
{OBJ r;
 r=__ABUILTIN_3;
 return r;}

extern OBJ _ABool_27(OBJ x1,OBJ x2) /* < */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_3;
 }else{
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}}
 return r;}

extern OBJ _ABool_28(OBJ x1,OBJ x2) /* <= */
{OBJ r;
 if(ISTGPRM(x1,1)){
  if(ISTGPRM(x2,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_29(OBJ x1,OBJ x2) /* > */
{OBJ r;
 if(ISTGPRM(x2,1)){
  r=__ABUILTIN_3;
 }else{
  if(ISTGPRM(x1,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}}
 return r;}

extern OBJ _ABool_30(OBJ x1,OBJ x2) /* >= */
{OBJ r;
 if(ISTGPRM(x2,1)){
  if(ISTGPRM(x1,1)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}
 }else{
  r=__ABUILTIN_5;}
 return r;}

extern OBJ _ABool_31(OBJ x1) /* ! */
{OBJ r;
 CPPRD(__ABool_32,1);
 CPPRD(x1,1);
 {OBJ x2;
  ADenotation_21(x1,__ABool_32,x2);
  if(ISTGPRM(x2,1)){
   FRPRD(x1,1);
   r=__ABUILTIN_5;
  }else{
   CPPRD(__ABool_33,1);
   {OBJ x3;
    ADenotation_21(x1,__ABool_33,x3);
    if(ISTGPRM(x3,1)){
     r=__ABUILTIN_3;
    }else{
     HLT("!\'Bool: wrong denotation");}}}}
 return r;}



init_ABool()
{
 static int visited=0; if(visited) return; visited=1;
 init_ADenotation();
 init_ANat();
 init_AChar();
 init_AInt();
 CLS(1,_ABool_31,__ABool_31);
 CLS(2,_ABool_30,__ABool_30);
 CLS(2,_ABool_29,__ABool_29);
 CLS(2,_ABool_28,__ABool_28);
 CLS(2,_ABool_27,__ABool_27);
 CLS(2,_ABool_26,__ABool_26);
 CLS(2,_ABool_25,__ABool_25);
 CLS(2,_ABool_24,__ABool_24);
 CLS(2,_ABool_23,__ABool_23);
 CLS(2,_ABool_22,__ABool_22);
 CLS(2,_ABool_21,__ABool_21);
 CLS(2,_ABool_20,__ABool_20);
 CLS(2,_ABool_19,__ABool_19);
 CLS(2,_ABool_18,__ABool_18);
 CLS(2,_ABool_17,__ABool_17);
 CLS(2,_ABool_16,__ABool_16);
 CLS(2,_ABool_15,__ABool_15);
 CLS(2,_ABool_14,__ABool_14);
 CLS(2,_ABool_13,__ABool_13);
 CLS(2,_ABool_12,__ABool_12);
 CLS(2,_ABool_11,__ABool_11);
 CLS(2,_ABool_10,__ABool_10);
 CLS(2,_ABool_9,__ABool_9);
 CLS(1,_ABool_8,__ABool_8);
 CLS(1,_ABool_7,__ABool_7);
 CLS(1,_ABool_6,__ABool_6);
 CLS(1,_ABool_5,__ABool_5);
 CLS(1,_ABool_4,__ABool_4);
 CLS(1,_ABool_3,__ABool_3);
 DEN("false",__ABool_33);
 DEN("true",__ABool_32);
 __ABool_1=__ABUILTIN_5;
 __ABool_2=__ABUILTIN_3;}

