

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _ABSTree_6(OBJ,OBJ);extern OBJ __ABSTree_6;
extern OBJ _ABSTree_11(OBJ,OBJ);extern OBJ __ABSTree_11;
extern OBJ _ABSTree_12(OBJ,OBJ,OBJ);extern OBJ __ABSTree_12;
extern OBJ _ABSTree_13(OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_13;
extern OBJ _ABSTree_14(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_14;
extern OBJ _ABSTree_15(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_15;
extern OBJ _ABSTree_16(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_16;
extern OBJ _ABSTree_17(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_17;
extern OBJ _ABSTree_18(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_18;
extern OBJ _ABSTree_22(OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_22;
extern OBJ _ABSTree_26(OBJ,OBJ);extern OBJ __ABSTree_26;
extern OBJ _ABSTree_28(OBJ,OBJ);extern OBJ __ABSTree_28;
extern OBJ _ABSTree_34(OBJ,OBJ);extern OBJ __ABSTree_34;
extern OBJ _ABSTree_38(OBJ,OBJ,OBJ);extern OBJ __ABSTree_38;
extern OBJ _ABSTree_39(OBJ,OBJ,OBJ);extern OBJ __ABSTree_39;
extern OBJ _ABSTree_40(OBJ,OBJ,OBJ);extern OBJ __ABSTree_40;
extern OBJ _ABSTree_41(OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTree_41;
extern OBJ _ABSTree_42(OBJ,OBJ,OBJ);extern OBJ __ABSTree_42;
extern OBJ _ABSTree_57(OBJ,OBJ,OBJ);extern OBJ __ABSTree_57;
extern OBJ _ABSTree_58(OBJ,OBJ,OBJ);extern OBJ __ABSTree_58;
extern OBJ _ABSTree_61(OBJ,OBJ,OBJ);extern OBJ __ABSTree_61;
extern OBJ __ATree_7;
extern OBJ _ASetByBST_4(OBJ);OBJ __ASetByBST_4; /* {} */
extern OBJ _ASetByBST_5(OBJ,OBJ,OBJ);OBJ __ASetByBST_5; /* incl */
extern OBJ _ASetByBST_6(OBJ,OBJ);OBJ __ASetByBST_6; /* % */
extern OBJ _ASetByBST_7(OBJ,OBJ,OBJ);OBJ __ASetByBST_7; /* %,1 */
extern OBJ _ASetByBST_8(OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_8; /* %,2 */
extern OBJ _ASetByBST_9(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_9; /* %,3 */
extern OBJ _ASetByBST_10(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_10; /* %,4 */
extern OBJ _ASetByBST_11(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_11; /* %,5 */
extern OBJ _ASetByBST_12(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_12; /* %,6 */
extern OBJ _ASetByBST_13(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_13; /* %,7 */
extern OBJ _ASetByBST_15(OBJ,OBJ,OBJ);OBJ __ASetByBST_15; /* excl */
extern OBJ _ASetByBST_16(OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_16; /* .. */
extern OBJ _ASetByBST_17(OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_17; /* iter */
extern OBJ _ASetByBST_18(OBJ,OBJ,OBJ);OBJ __ASetByBST_18; /* + */
extern OBJ _ASetByBST_19(OBJ,OBJ,OBJ);OBJ __ASetByBST_19; /* - */
extern OBJ _ASetByBST_20(OBJ,OBJ,OBJ);OBJ __ASetByBST_20; /* * */
extern OBJ _ASetByBST_21(OBJ,OBJ);OBJ __ASetByBST_21; /* arb */
extern OBJ _ASetByBST_22(OBJ,OBJ);OBJ __ASetByBST_22; /* {}? */
extern OBJ _ASetByBST_23(OBJ,OBJ,OBJ);OBJ __ASetByBST_23; /* in */
extern OBJ _ASetByBST_24(OBJ,OBJ);OBJ __ASetByBST_24; /* # */
extern OBJ _ASetByBST_25(OBJ,OBJ);OBJ __ASetByBST_25; /* min */
extern OBJ _ASetByBST_26(OBJ,OBJ);OBJ __ASetByBST_26; /* max */
extern OBJ _ASetByBST_27(OBJ,OBJ,OBJ);OBJ __ASetByBST_27; /* exist? */
extern OBJ _ASetByBST_28(OBJ,OBJ,OBJ);OBJ __ASetByBST_28; /* find? */
extern OBJ _ASetByBST_29(OBJ,OBJ,OBJ);OBJ __ASetByBST_29; /* forall? */
extern OBJ _ASetByBST_30(OBJ,OBJ,OBJ);OBJ __ASetByBST_30; /* = */
extern OBJ _ASetByBST_31(OBJ,OBJ,OBJ);OBJ __ASetByBST_31; /* <= */
extern OBJ _ASetByBST_32(OBJ,OBJ,OBJ);OBJ __ASetByBST_32; /* < */
extern OBJ _ASetByBST_33(OBJ,OBJ,OBJ,OBJ);OBJ __ASetByBST_33; /* <,1 */
extern OBJ _ASetByBST_34(OBJ,OBJ,OBJ);OBJ __ASetByBST_34; /* {<} */
extern OBJ _ASetByBST_35(OBJ,OBJ);OBJ __ASetByBST_35; /* abs */
extern OBJ _ASetByBST_36(OBJ,OBJ);OBJ __ASetByBST_36; /* rep */
extern OBJ _ASetByBST_37(OBJ,OBJ,OBJ);OBJ __ASetByBST_37; /* union */
extern OBJ _ASetByBST_39(OBJ,OBJ);OBJ __ASetByBST_39; /* abs? */
extern OBJ _ASetByBST_41(OBJ,OBJ,OBJ);OBJ __ASetByBST_41; /* +,1 */
extern OBJ _ASetByBST_43(OBJ,OBJ,OBJ);OBJ __ASetByBST_43; /* -,1 */
extern OBJ _ASetByBST_44(OBJ,OBJ,OBJ);OBJ __ASetByBST_44; /* *,1 */
extern TUP3 _ASetByBST_45(OBJ,OBJ,OBJ);OBJ __ASetByBST_45; /* split */
extern OBJ _ASetByBST_46(OBJ,OBJ,OBJ);OBJ __ASetByBST_46; /* =,1 */
extern OBJ _ASetByBST_47(OBJ,OBJ,OBJ);OBJ __ASetByBST_47; /* <,2 */
extern OBJ _ASetByBST_48(OBJ,OBJ,OBJ);OBJ __ASetByBST_48; /* <=,1 */

extern OBJ _ASetByBST_4(OBJ x1) /* {} */
{OBJ r;
 FRCLS(x1,1);
 r=__ATree_7;
 return r;}

extern OBJ _ASetByBST_5(OBJ x1,OBJ x2,OBJ x3) /* incl */
{OBJ r;
 r=_ABSTree_57(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_6(OBJ x1,OBJ x2) /* % */
{OBJ r;
 r=_ABSTree_11(x1,x2);
 return r;}

extern OBJ _ASetByBST_7(OBJ x1,OBJ x2,OBJ x3) /* %,1 */
{OBJ r;
 r=_ABSTree_12(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* %,2 */
{OBJ r;
 r=_ABSTree_13(x1,x2,x3,x4);
 return r;}

extern OBJ _ASetByBST_9(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* %,3 */
{OBJ r;
 r=_ABSTree_14(x1,x2,x3,x4,x5);
 return r;}

extern OBJ _ASetByBST_10(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* %,4 */
{OBJ r;
 r=_ABSTree_15(x1,x2,x3,x4,x5,x6);
 return r;}

extern OBJ _ASetByBST_11(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7) /* %,5 */
{OBJ r;
 r=_ABSTree_16(x1,x2,x3,x4,x5,x6,x7);
 return r;}

extern OBJ _ASetByBST_12(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7,OBJ x8) /* %,6 */
{OBJ r;
 r=_ABSTree_17(x1,x2,x3,x4,x5,x6,x7,x8);
 return r;}

extern OBJ _ASetByBST_13(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6,OBJ x7,OBJ x8,OBJ x9) /* %,7 */
{OBJ r;
 r=_ABSTree_18(x1,x2,x3,x4,x5,x6,x7,x8,x9);
 return r;}

extern OBJ _ASetByBST_15(OBJ x1,OBJ x2,OBJ x3) /* excl */
{OBJ r;
 r=_ABSTree_58(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_16(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* .. */
{OBJ r;
 {OBJ x5;
  ANat_81(x2,x3,x5);
  if(ISTGPRM(x5,1)){
   FRCLS(x1,1);
   FRCLS(x4,1);
   r=__ATree_7;
  }else{
   CPCLS(x1,1);
   CPCLS(x4,1);
   {OBJ x6;OBJ x7;OBJ x8;
    x6=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x2);
    ANat_2(x2,x7);
    x8=_ASetByBST_16(x1,x7,x3,x4);
    r=_ABSTree_57(x1,x6,x8);}}}
 return r;}

extern OBJ _ASetByBST_17(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* iter */
{OBJ r;
 COPY(x2,1);
 CPCLS(x4,1);
 {OBJ x5;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x2);
  if(ISTGPRM(x5,1)){
   CPCLS(x1,1);
   COPY(x2,1);
   CPCLS(x3,1);
   {OBJ x6;OBJ x7;
    x6=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x2);
    x7=_ASetByBST_17(x1,x6,x3,x4);
    r=_ABSTree_57(x1,x2,x7);}
  }else{
   FRCLS(x1,1);
   FREE(x2,1);
   FRCLS(x3,1);
   FRCLS(x4,1);
   r=__ATree_7;}}
 return r;}

extern OBJ _ASetByBST_18(OBJ x1,OBJ x2,OBJ x3) /* + */
{OBJ r;
 r=_ASetByBST_41(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_19(OBJ x1,OBJ x2,OBJ x3) /* - */
{OBJ r;
 r=_ASetByBST_43(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_20(OBJ x1,OBJ x2,OBJ x3) /* * */
{OBJ r;
 r=_ASetByBST_44(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_21(OBJ x1,OBJ x2) /* arb */
{OBJ r;
 if(ISPRM(x2)){
  HLT("arb\'SetByBST: cannot select from empty set");
 }else{
  r=_ABSTree_28(x1,x2);}
 return r;}

extern OBJ _ASetByBST_22(OBJ x1,OBJ x2) /* {}? */
{OBJ r;
 FRCLS(x1,1);
 if(ISPRM(x2)){
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x2,1)){
   DSPRD(x2);
  }else{
   DCPRD(x2,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASetByBST_23(OBJ x1,OBJ x2,OBJ x3) /* in */
{OBJ r;
 r=_ABSTree_61(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_24(OBJ x1,OBJ x2) /* # */
{OBJ r;
 r=_ABSTree_34(x1,x2);
 return r;}

extern OBJ _ASetByBST_25(OBJ x1,OBJ x2) /* min */
{OBJ r;
 if(ISPRM(x2)){
  HLT("min\'SetByBST: applied to empty set");
 }else{
  r=_ABSTree_26(x1,x2);}
 return r;}

extern OBJ _ASetByBST_26(OBJ x1,OBJ x2) /* max */
{OBJ r;
 if(ISPRM(x2)){
  HLT("max\'SetByBST: applied to empty set");
 }else{
  r=_ABSTree_28(x1,x2);}
 return r;}

extern OBJ _ASetByBST_27(OBJ x1,OBJ x2,OBJ x3) /* exist? */
{OBJ r;
 r=_ABSTree_38(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_28(OBJ x1,OBJ x2,OBJ x3) /* find? */
{OBJ r;
 r=_ABSTree_40(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_29(OBJ x1,OBJ x2,OBJ x3) /* forall? */
{OBJ r;
 r=_ABSTree_39(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_30(OBJ x1,OBJ x2,OBJ x3) /* = */
{OBJ r;
 r=_ASetByBST_46(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_31(OBJ x1,OBJ x2,OBJ x3) /* <= */
{OBJ r;
 r=_ASetByBST_48(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_32(OBJ x1,OBJ x2,OBJ x3) /* < */
{OBJ r;
 r=_ASetByBST_47(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_33(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* <,1 */
{OBJ r;
 r=_ABSTree_41(x1,x2,x3,x4);
 return r;}

extern OBJ _ASetByBST_34(OBJ x1,OBJ x2,OBJ x3) /* {<} */
{OBJ r;
 r=_ABSTree_42(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_35(OBJ x1,OBJ x2) /* abs */
{OBJ r;
 FRCLS(x1,1);
 r=x2;
 return r;}

extern OBJ _ASetByBST_36(OBJ x1,OBJ x2) /* rep */
{OBJ r;
 FRCLS(x1,1);
 r=x2;
 return r;}

extern OBJ _ASetByBST_37(OBJ x1,OBJ x2,OBJ x3) /* union */
{OBJ r;
 r=_ASetByBST_41(x1,x2,x3);
 return r;}

extern OBJ _ASetByBST_39(OBJ x1,OBJ x2) /* abs? */
{OBJ r;
 FRCLS(x1,1);
 FREE(x2,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ASetByBST_41(OBJ x1,OBJ x2,OBJ x3) /* +,1 */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  if(ISPRM(x3)){
   r=__ATree_7;
  }else{
   r=x3;}
 }else{
  if(ISPRM(x3)){
   FRCLS(x1,1);
   r=x2;
  }else{
   {OBJ x71=FLD1(x3,2);OBJ x72=FLD1(x3,3);
    COPY(x71,1);COPY(x72,1);
    CPCLS(x1,4);
    {OBJ x74;TUP3 x76;OBJ x80;OBJ x79;
     x74=_ABSTree_6(x1,x3);
     COPY(x74,1);
     x76=_ASetByBST_45(x1,x2,x74);
     x80=_ASetByBST_41(x1,x76.c2,x72);
     x79=_ASetByBST_41(x1,x76.c1,x71);
     r=_ABSTree_22(x1,x74,x79,x80);}}}}
 return r;}

extern OBJ _ASetByBST_43(OBJ x1,OBJ x2,OBJ x3) /* -,1 */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  if(ISPRM(x3)){
   r=x2;
  }else{
   if(EXPRD(x3,1)){
    DSPRD(x3);
   }else{
    DCPRD(x3,1);}
   r=__ATree_7;}
 }else{
  if(ISPRM(x3)){
   FRCLS(x1,1);
   r=x2;
  }else{
   {OBJ x84=FLD1(x3,2);OBJ x85=FLD1(x3,3);
    COPY(x84,1);COPY(x85,1);
    CPCLS(x1,4);
    {OBJ x86;TUP3 x89;OBJ x93;OBJ x92;
     x86=_ABSTree_6(x1,x3);
     x89=_ASetByBST_45(x1,x2,x86);
     x93=_ASetByBST_43(x1,x89.c1,x84);
     x92=_ASetByBST_43(x1,x89.c2,x85);
     r=_ASetByBST_41(x1,x93,x92);}}}}
 return r;}

extern OBJ _ASetByBST_44(OBJ x1,OBJ x2,OBJ x3) /* *,1 */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  if(ISPRM(x3)){
   r=__ATree_7;
  }else{
   if(EXPRD(x3,1)){
    DSPRD(x3);
   }else{
    DCPRD(x3,1);}
   r=__ATree_7;}
 }else{
  if(ISPRM(x3)){
   FRCLS(x1,1);
   if(EXPRD(x2,1)){
    DSPRD(x2);
   }else{
    DCPRD(x2,1);}
   r=__ATree_7;
  }else{
   {OBJ x90=FLD1(x3,2);OBJ x91=FLD1(x3,3);
    COPY(x90,1);COPY(x91,1);
    CPCLS(x1,2);
    {OBJ x92;TUP3 x95;
     x92=_ABSTree_6(x1,x3);
     COPY(x92,1);
     x95=_ASetByBST_45(x1,x2,x92);
     if(ISTGPRM(x95.c3,1)){
      CPCLS(x1,2);
      {OBJ x99;OBJ x98;
       x99=_ASetByBST_44(x1,x95.c1,x90);
       x98=_ASetByBST_44(x1,x95.c2,x91);
       r=_ABSTree_22(x1,x92,x99,x98);}
     }else{
      FREE(x92,1);
      CPCLS(x1,2);
      {OBJ x101;OBJ x100;
       x101=_ASetByBST_44(x1,x95.c1,x90);
       x100=_ASetByBST_44(x1,x95.c2,x91);
       r=_ASetByBST_41(x1,x101,x100);}}}}}}
 return r;}

extern TUP3 _ASetByBST_45(OBJ x1,OBJ x2,OBJ x3) /* split */
{TUP3 r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  FREE(x3,1);
  r.c1=__ATree_7;r.c2=__ATree_7;r.c3=__ABUILTIN_3;
 }else{
  {OBJ x41=FLD1(x2,2);OBJ x42=FLD1(x2,3);
   COPY(x41,1);COPY(x42,1);
   CPCLS(x1,2);
   COPY(x3,1);
   {OBJ x43;OBJ x45;
    x43=_ABSTree_6(x1,x2);
    COPY(x43,1);
    x45=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x3,x43);
    if(ISTGPRM(x45,1)){
     CPCLS(x1,1);
     {TUP3 x48;
      x48=_ASetByBST_45(x1,x41,x3);r.c1=x48.c1;r.c3=x48.c3;
      r.c2=_ABSTree_22(x1,x43,x48.c2,x42);}
    }else{
     CPCLS(x1,1);
     COPY(x3,1);
     COPY(x43,1);
     {OBJ x51;
      x51=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x43,x3);
      if(ISTGPRM(x51,1)){
       CPCLS(x1,1);
       {TUP3 x53;
	x53=_ASetByBST_45(x1,x42,x3);r.c2=x53.c2;r.c3=x53.c3;
	r.c1=_ABSTree_22(x1,x43,x41,x53.c1);}
      }else{
       r.c1=x41;r.c2=x42;
       FRCLS(x1,1);
       FREE(x3,1);
       FREE(x43,1);
       r.c3=__ABUILTIN_5;}}}}}}
 return r;}
extern OBJ _ASetByBST_45_c(OBJ x1,OBJ x2,OBJ x3) /* split */
{OBJ r;
 {TUP3 t=_ASetByBST_45(x1,x2,x3);
  PRD1(3,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;}
 return r;}

extern OBJ _ASetByBST_46(register OBJ x1,register OBJ x2,register OBJ x3) /* =,1 */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   if(ISPRM(x3)){
    r=__ABUILTIN_5;
   }else{
    if(EXPRD(x3,1)){
     DSPRD(x3);
    }else{
     DCPRD(x3,1);}
    r=__ABUILTIN_3;}
  }else{
   if(ISPRM(x3)){
    FRCLS(x1,1);
    if(EXPRD(x2,1)){
     DSPRD(x2);
    }else{
     DCPRD(x2,1);}
    r=__ABUILTIN_3;
   }else{
    {OBJ x69=FLD1(x3,2);OBJ x70=FLD1(x3,3);
     COPY(x69,1);COPY(x70,1);
     CPCLS(x1,2);
     {OBJ x72;TUP3 x74;OBJ x77;
      x72=_ABSTree_6(x1,x3);
      x74=_ASetByBST_45(x1,x2,x72);
      if(ISTGPRM(x74.c3,1)){
       CPCLS(x1,1);
       x77=_ASetByBST_46(x1,x74.c1,x69);
      }else{
       FREE(x69,1);
       FREE(x74.c1,1);
       x77=__ABUILTIN_3;}
      if(ISTGPRM(x77,1)){
       x2=x74.c2;x3=x70;continue;
      }else{
       FRCLS(x1,1);
       FREE(x70,1);
       FREE(x74.c2,1);
       r=__ABUILTIN_3;}}}}}
  break;}
 return r;}

extern OBJ _ASetByBST_47(register OBJ x1,register OBJ x2,register OBJ x3) /* <,2 */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   if(ISPRM(x3)){
    r=__ABUILTIN_3;
   }else{
    if(EXPRD(x3,1)){
     DSPRD(x3);
    }else{
     DCPRD(x3,1);}
    r=__ABUILTIN_5;}
  }else{
   {OBJ x48=FLD1(x2,2);OBJ x49=FLD1(x2,3);
    COPY(x48,1);COPY(x49,1);
    CPCLS(x1,2);
    {OBJ x50;TUP3 x53;OBJ x56;
     x50=_ABSTree_6(x1,x2);
     x53=_ASetByBST_45(x1,x3,x50);
     if(ISTGPRM(x53.c3,1)){
      CPCLS(x1,1);
      x56=_ASetByBST_47(x1,x48,x53.c1);
     }else{
      FREE(x48,1);
      FREE(x53.c1,1);
      x56=__ABUILTIN_3;}
     if(ISTGPRM(x56,1)){
      x2=x49;x3=x53.c2;continue;
     }else{
      FRCLS(x1,1);
      FREE(x49,1);
      FREE(x53.c2,1);
      r=__ABUILTIN_3;}}}}
  break;}
 return r;}

extern OBJ _ASetByBST_48(register OBJ x1,register OBJ x2,register OBJ x3) /* <=,1 */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   FREE(x3,1);
   r=__ABUILTIN_5;
  }else{
   {OBJ x34=FLD1(x2,2);OBJ x35=FLD1(x2,3);
    COPY(x34,1);COPY(x35,1);
    CPCLS(x1,2);
    {OBJ x36;TUP3 x39;OBJ x42;
     x36=_ABSTree_6(x1,x2);
     x39=_ASetByBST_45(x1,x3,x36);
     if(ISTGPRM(x39.c3,1)){
      CPCLS(x1,1);
      x42=_ASetByBST_48(x1,x34,x39.c1);
     }else{
      FREE(x34,1);
      FREE(x39.c1,1);
      x42=__ABUILTIN_3;}
     if(ISTGPRM(x42,1)){
      x2=x35;x3=x39.c2;continue;
     }else{
      FRCLS(x1,1);
      FREE(x35,1);
      FREE(x39.c2,1);
      r=__ABUILTIN_3;}}}}
  break;}
 return r;}

static OBJ _mt_4_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_4_1_2(OBJ t,OBJ t1,OBJ t2) 
{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,2);
 FLDCLS(r,2)=t1;
 FLDCLS(r,3)=t2;
 return r;}

static OBJ _mt_4_3_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);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1);
 return r;}
static OBJ _mt_4_3_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;FLDCLS(t,3)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_ASetByBST()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_ASeq();
 init_AOption();
 init_ABSTree();
 init_ATree();
 init_APair();
 CLS(3,_ASetByBST_31,__ASetByBST_31);
 CLS(3,_ASetByBST_30,__ASetByBST_30);
 CLS(3,_ASetByBST_29,__ASetByBST_29);
 CLS(3,_ASetByBST_28,__ASetByBST_28);
 CLS(3,_ASetByBST_27,__ASetByBST_27);
 CLS(2,_ASetByBST_26,__ASetByBST_26);
 CLS(2,_ASetByBST_25,__ASetByBST_25);
 CLS(2,_ASetByBST_24,__ASetByBST_24);
 CLS(3,_ASetByBST_23,__ASetByBST_23);
 CLS(2,_ASetByBST_22,__ASetByBST_22);
 CLS(2,_ASetByBST_21,__ASetByBST_21);
 CLS(3,_ASetByBST_20,__ASetByBST_20);
 CLS(3,_ASetByBST_19,__ASetByBST_19);
 CLS(3,_ASetByBST_18,__ASetByBST_18);
 CLS(4,_ASetByBST_17,__ASetByBST_17);
 CLS(4,_ASetByBST_16,__ASetByBST_16);
 CLS(3,_ASetByBST_48,__ASetByBST_48);
 CLS(3,_ASetByBST_15,__ASetByBST_15);
 CLS(3,_ASetByBST_47,__ASetByBST_47);
 CLS(3,_ASetByBST_46,__ASetByBST_46);
 CLS(9,_ASetByBST_13,__ASetByBST_13);
 CLS(3,_ASetByBST_45_c,__ASetByBST_45);
 CLS(8,_ASetByBST_12,__ASetByBST_12);
 CLS(3,_ASetByBST_44,__ASetByBST_44);
 CLS(7,_ASetByBST_11,__ASetByBST_11);
 CLS(3,_ASetByBST_43,__ASetByBST_43);
 CLS(6,_ASetByBST_10,__ASetByBST_10);
 CLS(5,_ASetByBST_9,__ASetByBST_9);
 CLS(3,_ASetByBST_41,__ASetByBST_41);
 CLS(4,_ASetByBST_8,__ASetByBST_8);
 CLS(2,_ASetByBST_39,__ASetByBST_39);
 CLS(3,_ASetByBST_7,__ASetByBST_7);
 CLS(2,_ASetByBST_6,__ASetByBST_6);
 CLS(3,_ASetByBST_5,__ASetByBST_5);
 CLS(3,_ASetByBST_37,__ASetByBST_37);
 CLS(2,_ASetByBST_36,__ASetByBST_36);
 CLS(1,_ASetByBST_4,__ASetByBST_4);
 CLS(2,_ASetByBST_35,__ASetByBST_35);
 CLS(3,_ASetByBST_34,__ASetByBST_34);
 CLS(4,_ASetByBST_33,__ASetByBST_33);
 CLS(3,_ASetByBST_32,__ASetByBST_32);
 MTH(4,0,3,_mt_4_0_3);LZYMTH(4,0,3,_mt_4_0_3);
 MTH(4,1,2,_mt_4_1_2);LZYMTH(4,1,2,_mt_4_1_2);
 MTH(4,3,1,_mt_4_3_1);LZYMTH(4,3,1,_mt_4_3_1_l);}

