

#include "BUILTIN.h"

#include "Denotation.h"

#include "Nat.h"

#include "Char.h"

#include "Int.h"
extern OBJ _APairConv_3(OBJ,OBJ,OBJ);OBJ __APairConv_3; /* ` */
extern OBJ _APairConv_4(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __APairConv_4; /* `,1 */
OBJ __APairConv_5; /* `'5 */
OBJ __APairConv_6; /* `'6 */
OBJ __APairConv_7; /* `'7 */

extern OBJ _APairConv_3(OBJ x1,OBJ x2,OBJ x3) /* ` */
{OBJ r;
 CPPRD(__APairConv_5,1);
 CPPRD(__APairConv_6,1);
 CPPRD(__APairConv_7,1);
 r=_APairConv_4(__APairConv_5,__APairConv_6,__APairConv_7,x1,x2,x3);
 return r;}

extern OBJ _APairConv_4(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* `,1 */
{OBJ r;
 {OBJ x18=FLD1(x6,1);OBJ x19=FLD1(x6,2);
  if(EXPRD(x6,1)){
   DSPRDF(x6);
  }else{
   COPY(x18,1);COPY(x19,1);
   FRPRD(x6,1);}
  {OBJ x20;OBJ x21;OBJ x22;OBJ x23;OBJ x24;
   x20=(*(OBJ(*)(OBJ,OBJ))METHOD(x5,1))(x5,x19);
   x21=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x18);
   ADenotation_4(x20,x3,x22);
   ADenotation_4(x2,x22,x23);
   ADenotation_4(x21,x23,x24);
   ADenotation_4(x1,x24,r);}}
 return r;}

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;}

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

static OBJ _mt_6_0_5(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4,OBJ t5) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,5);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 FLDCLS(r,4)=t4;
 FLDCLS(r,5)=t5;
 return r;}

static OBJ _mt_6_0_6(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4,OBJ t5,OBJ t6) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(t1,t2,t3,t4,t5,t6);
 return r;}

static OBJ _mt_6_3_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 if(EXCLS(t)){
  r=t;
 }else{
  DPCLS(t,r);
  FLDCLS(r,1)=FLDCLS(t,1);
  FLDCLS(r,2)=FLDCLS(t,2);
  FLDCLS(r,3)=FLDCLS(t,3);
  COPY(FLDCLS(r,1),1);
  COPY(FLDCLS(r,2),1);
  COPY(FLDCLS(r,3),1);}
 INCCLS(r,3,2);
 FLDCLS(r,4)=t1;
 FLDCLS(r,5)=t2;
 return r;}

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

static OBJ _mt_6_5_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  COPY(FLDCLS(t,3),1);
  COPY(FLDCLS(t,4),1);
  COPY(FLDCLS(t,5),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),FLDCLS(t,5),t1);
 return r;}
static OBJ _mt_6_5_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),FLDCLS(t,5),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;FLDCLS(t,3)=NIL;FLDCLS(t,4)=NIL;FLDCLS(t,5)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_APairConv()
{
 static int visited=0; if(visited) return; visited=1;
 init_APair();
 init_ADenotation();
 init_ANat();
 init_AChar();
 init_AInt();
 DEN(")",__APairConv_7);
 DEN(",",__APairConv_6);
 DEN("(",__APairConv_5);
 CLS(6,_APairConv_4,__APairConv_4);
 CLS(3,_APairConv_3,__APairConv_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);
 MTH(6,0,3,_mt_6_0_3);LZYMTH(6,0,3,_mt_6_0_3);
 MTH(6,0,5,_mt_6_0_5);LZYMTH(6,0,5,_mt_6_0_5);
 MTH(6,0,6,_mt_6_0_6);LZYMTH(6,0,6,_mt_6_0_6);
 MTH(6,3,2,_mt_6_3_2);LZYMTH(6,3,2,_mt_6_3_2);
 MTH(6,3,3,_mt_6_3_3);LZYMTH(6,3,3,_mt_6_3_3);
 MTH(6,5,1,_mt_6_5_1);LZYMTH(6,5,1,_mt_6_5_1_l);}

