

#include "BUILTIN.h"

#include "Nat.h"

#include "Char.h"
extern OBJ _ABSTree_57(OBJ,OBJ,OBJ);extern OBJ __ABSTree_57;
extern OBJ __ATree_7;
extern OBJ _ABSTreeConv_7(OBJ,OBJ);extern OBJ __ABSTreeConv_7;
extern OBJ _ASeqConv_3(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ASeqConv_3;
extern OBJ _ASeqConv_5(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ASeqConv_5;
extern OBJ __ASeqConv_8;
extern OBJ _ASetByBSTConv_3(OBJ,OBJ,OBJ);OBJ __ASetByBSTConv_3; /* ` */
extern OBJ _ASetByBSTConv_4(OBJ,OBJ,OBJ);OBJ __ASetByBSTConv_4; /* `,1 */
extern OBJ _ASetByBSTConv_5(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBSTConv_5; /* `,2 */
extern OBJ _ASetByBSTConv_6(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBSTConv_6; /* `,3 */
extern OBJ _ASetByBSTConv_7(OBJ,OBJ);OBJ __ASetByBSTConv_7; /* asSet */
extern OBJ _ASetByBSTConv_8(OBJ,OBJ);OBJ __ASetByBSTConv_8; /* asSeq */
OBJ __ASetByBSTConv_9; /* `'9 */
OBJ __ASetByBSTConv_10; /* `'10 */

extern OBJ _ASetByBSTConv_3(OBJ x1,OBJ x2,OBJ x3) /* ` */
{OBJ r;
 CPPRD(__ASetByBSTConv_9,1);
 CPPRD(__ASetByBSTConv_10,1);
 CPPRD(__ASeqConv_8,1);
 {OBJ x4;
  x4=_ABSTreeConv_7(x1,x3);
  r=_ASeqConv_3(__ASetByBSTConv_9,__ASeqConv_8,__ASetByBSTConv_10,x2,x4);}
 return r;}

extern OBJ _ASetByBSTConv_4(OBJ x1,OBJ x2,OBJ x3) /* `,1 */
{OBJ r;
 CPPRD(__ASetByBSTConv_9,1);
 CPPRD(__ASetByBSTConv_10,1);
 CPPRD(__ASeqConv_8,1);
 {OBJ x4;
  x4=_ABSTreeConv_7(x1,x3);
  r=_ASeqConv_5(__ASetByBSTConv_9,__ASeqConv_8,__ASetByBSTConv_10,x2,x4);}
 return r;}

extern OBJ _ASetByBSTConv_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* `,2 */
{OBJ r;
 {OBJ x7;
  x7=_ABSTreeConv_7(x1,x6);
  r=_ASeqConv_3(x2,x3,x4,x5,x7);}
 return r;}

extern OBJ _ASetByBSTConv_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* `,3 */
{OBJ r;
 {OBJ x7;
  x7=_ABSTreeConv_7(x1,x6);
  r=_ASeqConv_5(x2,x3,x4,x5,x7);}
 return r;}

extern OBJ _ASetByBSTConv_7(OBJ x1,OBJ x2) /* asSet */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  r=__ATree_7;
 }else{
  {OBJ x21=FLD1(x2,1);OBJ x22=FLD1(x2,2);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x21,1);COPY(x22,1);
    FRPRD(x2,1);}
   CPCLS(x1,1);
   {OBJ x24;
    x24=_ASetByBSTConv_7(x1,x22);
    r=_ABSTree_57(x1,x21,x24);}}}
 return r;}

extern OBJ _ASetByBSTConv_8(OBJ x1,OBJ x2) /* asSeq */
{OBJ r;
 r=_ABSTreeConv_7(x1,x2);
 return r;}

static OBJ _mt_6_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_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_1_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 if(EXCLS(t)){
  r=t;
 }else{
  DPCLS(t,r);
  FLDCLS(r,1)=FLDCLS(t,1);
  COPY(FLDCLS(r,1),1);}
 INCCLS(r,1,3);
 FLDCLS(r,2)=t1;
 FLDCLS(r,3)=t2;
 FLDCLS(r,4)=t3;
 return r;}

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

static OBJ _mt_6_4_1(OBJ t,OBJ t1) 
{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);
  FLDCLS(r,4)=FLDCLS(t,4);
  COPY(FLDCLS(r,1),1);
  COPY(FLDCLS(r,2),1);
  COPY(FLDCLS(r,3),1);
  COPY(FLDCLS(r,4),1);}
 INCCLS(r,4,1);
 FLDCLS(r,5)=t1;
 return r;}

static OBJ _mt_6_4_2(OBJ t,OBJ t1,OBJ t2) 
{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))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1,t2);
 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_ASetByBSTConv()
{
 static int visited=0; if(visited) return; visited=1;
 init_ASetByBST();
 init_ASeq();
 init_AString();
 init_ANat();
 init_AChar();
 init_AOption();
 init_ABSTree();
 init_ATree();
 init_APair();
 init_ABSTreeConv();
 init_ASeqConv();
 init_ATreeMap();
 DEN("}",__ASetByBSTConv_10);
 DEN("{",__ASetByBSTConv_9);
 CLS(2,_ASetByBSTConv_8,__ASetByBSTConv_8);
 CLS(2,_ASetByBSTConv_7,__ASetByBSTConv_7);
 CLS(6,_ASetByBSTConv_6,__ASetByBSTConv_6);
 CLS(6,_ASetByBSTConv_5,__ASetByBSTConv_5);
 CLS(3,_ASetByBSTConv_4,__ASetByBSTConv_4);
 CLS(3,_ASetByBSTConv_3,__ASetByBSTConv_3);
 MTH(6,0,4,_mt_6_0_4);LZYMTH(6,0,4,_mt_6_0_4);
 MTH(6,0,5,_mt_6_0_5);LZYMTH(6,0,5,_mt_6_0_5);
 MTH(6,1,3,_mt_6_1_3);LZYMTH(6,1,3,_mt_6_1_3);
 MTH(6,1,4,_mt_6_1_4);LZYMTH(6,1,4,_mt_6_1_4);
 MTH(6,4,1,_mt_6_4_1);LZYMTH(6,4,1,_mt_6_4_1);
 MTH(6,4,2,_mt_6_4_2);LZYMTH(6,4,2,_mt_6_4_2);
 MTH(6,5,1,_mt_6_5_1);LZYMTH(6,5,1,_mt_6_5_1_l);}

