

#include "BUILTIN.h"
extern OBJ _ARel_7(OBJ,OBJ);extern OBJ __ARel_7;
extern OBJ _ARel_8(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ARel_8;

#include "Nat.h"
extern OBJ _AMapReduce_6(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMapReduce_6;
extern OBJ _ACAST_3(OBJ);extern OBJ __ACAST_3;
extern OBJ _ARelMap_11(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelMap_11; /* * */
extern OBJ _ARelMap_12(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelMap_12; /* *,1 */
extern OBJ _ARelMap_13(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelMap_13; /* *,1'13 */
extern OBJ _ARelMap_14(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelMap_14; /* *,1'14 */
extern TUP3 _ARelMap_15(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelMap_15; /* *'15 */

extern OBJ _ARelMap_11(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7,OBJ x8) /* * */
{OBJ r;
 CPCLS(__ARelMap_15,1);
 {OBJ x9;
  x9=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__ARelMap_15,3))(__ARelMap_15,x5,x6,x7);
  r=_ARelMap_12(x1,x2,x3,x4,x9,x8);}
 return r;}

extern OBJ _ARelMap_12(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* *,1 */
{OBJ r;
 CPCLS(__ARelMap_14,1);
 CPCLS(x3,1);
 CPCLS(x4,1);
 {OBJ x7;OBJ x8;OBJ x9;
  x7=_ACAST_3(x6);
  x8=_ARel_7(x3,x4);
  x9=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__ARelMap_14,4))(__ARelMap_14,x2,x3,x4,x5);
  r=_AMapReduce_6(x1,x9,x8,x7);}
 return r;}

extern OBJ _ARelMap_13(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7) /* *,1'13 */
{OBJ r;
 {OBJ x17;OBJ x18;OBJ x19;
  {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x3,3))(x3,x4,x5,x6);
   x17=FLD1(t,1);
   x18=FLD1(t,2);
   x19=FLD1(t,3);
   DSPRDF(t);}
  r=_ARel_8(x1,x2,x17,x18,x19,x7);}
 return r;}

extern OBJ _ARelMap_14(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7) /* *,1'14 */
{OBJ r;
 CPCLS(__ARelMap_13,1);
 {OBJ x8;
  x8=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__ARelMap_13,4))(__ARelMap_13,x2,x3,x4,x5);
  r=_AMapReduce_6(x1,x8,x7,x6);}
 return r;}

extern TUP3 _ARelMap_15(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* *'15 */
{TUP3 r;
 r.c1=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x4);
 r.c2=(*(OBJ(*)(OBJ,OBJ))METHOD(x2,1))(x2,x5);
 r.c3=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x6);
 return r;}
extern OBJ _ARelMap_15_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* *'15 */
{OBJ r;
 {TUP3 t=_ARelMap_15(x1,x2,x3,x4,x5,x6);
  PRD1(3,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;}
 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_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_7_0_4(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,4);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 FLDCLS(r,4)=t4;
 return r;}

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

static OBJ _mt_7_4_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);
  COPY(FLDCLS(t,4),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1,t2,t3);
 return r;}

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

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

static OBJ _mt_8_4_4(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4) 
{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);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1,t2,t3,t4);
 return r;}

init_ARelMap()
{
 static int visited=0; if(visited) return; visited=1;
 init_ARel();
 init_ASet();
 init_APair();
 init_ATriple();
 init_AOption();
 init_ASeq();
 init_ANat();
 init_ARelNotForUserPurpose();
 init_AMap();
 init_AMapReduce();
 init_AMapFilter();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 init_ACAST();
 CLS(6,_ARelMap_15_c,__ARelMap_15);
 CLS(7,_ARelMap_14,__ARelMap_14);
 CLS(7,_ARelMap_13,__ARelMap_13);
 CLS(6,_ARelMap_12,__ARelMap_12);
 CLS(8,_ARelMap_11,__ARelMap_11);
 MTH(6,0,3,_mt_6_0_3);LZYMTH(6,0,3,_mt_6_0_3);
 MTH(6,3,3,_mt_6_3_3);LZYMTH(6,3,3,_mt_6_3_3);
 MTH(7,0,4,_mt_7_0_4);LZYMTH(7,0,4,_mt_7_0_4);
 MTH(7,0,7,_mt_7_0_7);LZYMTH(7,0,7,_mt_7_0_7);
 MTH(7,4,3,_mt_7_4_3);LZYMTH(7,4,3,_mt_7_4_3);
 MTH(8,0,4,_mt_8_0_4);LZYMTH(8,0,4,_mt_8_0_4);
 MTH(8,0,8,_mt_8_0_8);LZYMTH(8,0,8,_mt_8_0_8);
 MTH(8,4,4,_mt_8_4_4);LZYMTH(8,4,4,_mt_8_4_4);}

