

#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 _ARelReduce_7(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ARelReduce_7;
extern OBJ _AMap_33(OBJ,OBJ,OBJ);extern OBJ __AMap_33;
extern OBJ _AMapReduce_6(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMapReduce_6;
extern OBJ _ACAST_3(OBJ);extern OBJ __ACAST_3;
extern OBJ _ARelCompose_11(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelCompose_11; /* o */
extern OBJ _ARelCompose_12(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelCompose_12; /* ; */
extern OBJ _ARelCompose_13(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelCompose_13; /* ;'13 */
extern OBJ _ARelCompose_14(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARelCompose_14; /* ;'14 */

extern OBJ _ARelCompose_11(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* o */
{OBJ r;
 r=_ARelCompose_12(x1,x2,x3,x4,x6,x5);
 return r;}

extern OBJ _ARelCompose_12(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* ; */
{OBJ r;
 CPCLS(__ARelCompose_14,1);
 CPCLS(x1,2);
 CPCLS(x2,1);
 CPCLS(x3,1);
 {OBJ x7;OBJ x8;OBJ x9;
  x7=_ACAST_3(x6);
  x8=_ARel_7(x1,x3);
  x9=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__ARelCompose_14,5))(__ARelCompose_14,x1,x2,x3,x4,x7);
  r=_ARelReduce_7(x1,x2,x9,x8,x5);}
 return r;}

extern OBJ _ARelCompose_13(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7,OBJ x8) /* ;'13 */
{OBJ r;
 {OBJ x9;
  x9=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x3,2))(x3,x5,x7);
  r=_ARel_8(x1,x2,x4,x6,x9,x8);}
 return r;}

extern OBJ _ARelCompose_14(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7,OBJ x8,OBJ x9) /* ;'14 */
{OBJ r;
 {OBJ x10;
  x10=_AMap_33(x2,x5,x7);
  if(ISPRM(x10)){
   FRCLS(x1,1);
   FRCLS(x3,1);
   FRCLS(x4,1);
   FREE(x6,1);
   FREE(x8,1);
   r=x9;
  }else{
   {OBJ x16=FLD1(x10,1);
    if(EXPRD(x10,1)){
     DSPRDF(x10);
    }else{
     COPY(x16,1);
     FRPRD(x10,1);}
    CPCLS(x3,1);
    CPCLS(__ARelCompose_13,1);
    {OBJ x17;
     x17=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__ARelCompose_13,5))(__ARelCompose_13,x1,x3,x4,x6,x8);
     r=_AMapReduce_6(x3,x17,x9,x16);}}}}
 return r;}

static OBJ _mt_8_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_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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(t,5),t1,t2,t3,t4);
 return r;}

init_ARelCompose()
{
 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_ARelReduce();
 init_AMap();
 init_AMapReduce();
 init_AMapFilter();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 init_ACAST();
 CLS(9,_ARelCompose_14,__ARelCompose_14);
 CLS(8,_ARelCompose_13,__ARelCompose_13);
 CLS(6,_ARelCompose_12,__ARelCompose_12);
 CLS(6,_ARelCompose_11,__ARelCompose_11);
 MTH(8,0,5,_mt_8_0_5);LZYMTH(8,0,5,_mt_8_0_5);
 MTH(8,0,8,_mt_8_0_8);LZYMTH(8,0,8,_mt_8_0_8);
 MTH(8,5,3,_mt_8_5_3);LZYMTH(8,5,3,_mt_8_5_3);
 MTH(9,0,5,_mt_9_0_5);LZYMTH(9,0,5,_mt_9_0_5);
 MTH(9,0,9,_mt_9_0_9);LZYMTH(9,0,9,_mt_9_0_9);
 MTH(9,5,4,_mt_9_5_4);LZYMTH(9,5,4,_mt_9_5_4);}

