

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ __AOption_5;
extern OBJ __ASeq_6;
extern OBJ _ASeq_26(OBJ,OBJ);extern OBJ __ASeq_26;
extern OBJ _ASeq_52(OBJ,OBJ);extern OBJ __ASeq_52;
extern OBJ _ACompose_4(OBJ,OBJ,OBJ);extern OBJ __ACompose_4;
extern OBJ __ARelCmp_2;
extern OBJ __ARelCmp_4;
extern OBJ __ARelCmp_6;
extern OBJ _ATree_2(OBJ,OBJ,OBJ);OBJ __ATree_2; /* node */
extern OBJ _ATree_3(OBJ);OBJ __ATree_3; /* node? */
extern OBJ _ATree_4(OBJ);OBJ __ATree_4; /* right */
extern OBJ _ATree_5(OBJ);OBJ __ATree_5; /* left */
extern OBJ _ATree_6(OBJ);OBJ __ATree_6; /* val */
OBJ __ATree_7; /* nil */
extern OBJ _ATree_8(OBJ);OBJ __ATree_8; /* nil? */
extern OBJ _ATree_10(OBJ);OBJ __ATree_10; /* % */
extern OBJ _ATree_11(OBJ,OBJ);OBJ __ATree_11; /* iter */
extern OBJ _ATree_12(OBJ,OBJ);OBJ __ATree_12; /* :=_val */
extern OBJ _ATree_13(OBJ,OBJ);OBJ __ATree_13; /* :=_left */
extern OBJ _ATree_14(OBJ,OBJ);OBJ __ATree_14; /* :=_right */
extern OBJ _ATree_15(OBJ);OBJ __ATree_15; /* swap */
extern OBJ _ATree_16(OBJ);OBJ __ATree_16; /* reflect */
extern OBJ _ATree_17(OBJ);OBJ __ATree_17; /* lrotate */
extern OBJ _ATree_18(OBJ);OBJ __ATree_18; /* rrotate */
extern OBJ _ATree_19(OBJ);OBJ __ATree_19; /* leftmost */
extern OBJ _ATree_20(OBJ);OBJ __ATree_20; /* rightmost */
extern OBJ _ATree_21(OBJ);OBJ __ATree_21; /* children */
extern OBJ _ATree_22(OBJ);OBJ __ATree_22; /* grandchildren */
extern OBJ _ATree_23(OBJ,OBJ);OBJ __ATree_23; /* level */
extern OBJ _ATree_24(OBJ);OBJ __ATree_24; /* front */
extern OBJ _ATree_25(OBJ);OBJ __ATree_25; /* # */
extern OBJ _ATree_26(OBJ);OBJ __ATree_26; /* depth */
extern OBJ _ATree_27(OBJ);OBJ __ATree_27; /* width */
extern OBJ _ATree_28(OBJ);OBJ __ATree_28; /* leaf? */
extern OBJ _ATree_29(OBJ,OBJ);OBJ __ATree_29; /* exist? */
extern OBJ _ATree_30(OBJ,OBJ);OBJ __ATree_30; /* forall? */
extern OBJ _ATree_31(OBJ,OBJ);OBJ __ATree_31; /* find? */
extern OBJ _ATree_32(OBJ,OBJ,OBJ);OBJ __ATree_32; /* < */
extern OBJ _ATree_33(OBJ,OBJ,OBJ);OBJ __ATree_33; /* = */
extern OBJ _ATree_64(OBJ,OBJ,OBJ);OBJ __ATree_64; /* cmp */
extern OBJ _ATree_65(OBJ);OBJ __ATree_65; /* %'65 */
extern OBJ _ATree_66(OBJ);OBJ __ATree_66; /* children'66 */
extern OBJ _ATree_67(OBJ);OBJ __ATree_67; /* grandchildren'67 */

extern OBJ _ATree_2(OBJ x1,OBJ x2,OBJ x3) /* node */
{OBJ r;
 PRD1(3,r);FLD1(r,1)=x1;FLD1(r,2)=x2;FLD1(r,3)=x3;
 return r;}

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

extern OBJ _ATree_4(OBJ x1) /* right */
{OBJ r;
 if(ISPRM(x1)){
  HLT("Tree at <unknown> : undefined selection right\'Tree:tree->tree");
 }else{
  {OBJ x4=FLD1(x1,3);
   if(EXPRD(x1,1)){
    r=x4;
    FLD1(x1,3)=NIL;DSPRD(x1);
   }else{
    COPY(x4,1);
    r=x4;
    FRPRD(x1,1);}}}
 return r;}

extern OBJ _ATree_5(OBJ x1) /* left */
{OBJ r;
 if(ISPRM(x1)){
  HLT("Tree at <unknown> : undefined selection left\'Tree:tree->tree");
 }else{
  {OBJ x3=FLD1(x1,2);
   if(EXPRD(x1,1)){
    r=x3;
    FLD1(x1,2)=NIL;DSPRD(x1);
   }else{
    COPY(x3,1);
    r=x3;
    FRPRD(x1,1);}}}
 return r;}

extern OBJ _ATree_6(OBJ x1) /* val */
{OBJ r;
 if(ISPRM(x1)){
  HLT("Tree at <unknown> : undefined selection val\'Tree:tree->data");
 }else{
  {OBJ x2=FLD1(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    FLD1(x1,1)=NIL;DSPRD(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}}
 return r;}

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

extern OBJ _ATree_10(OBJ x1) /* % */
{OBJ r;
 r=_ATree_65(x1);
 return r;}

extern OBJ _ATree_11(register OBJ x1,register OBJ x2) /* iter */
{OBJ r;OBJ* p1=&r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   *p1=__ATree_7;
  }else{
   {OBJ x14=FLD1(x2,1);
    if(EXPRD(x2,1)){
     COPY(x14,1);
     DSPRDF(x2);
    }else{
     COPY(x14,2);
     FRPRD(x2,1);}
    CPCLS(x1,2);
    {OBJ x16;OBJ x17;OBJ x19;
     {OBJ t=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x14);
      x16=FLD1(t,1);
      x17=FLD1(t,2);
      DSPRDF(t);}
     x19=_ATree_11(x1,x16);
     PRD1(3,*p1);FLD1(*p1,1)=x14;FLD1(*p1,2)=x19;
     x2=x17;p1=&FLD1(*p1,3);continue;}}}
  break;}
 return r;}

extern OBJ _ATree_12(OBJ x1,OBJ x2) /* :=_val */
{OBJ r;
 if(ISPRM(x1)){
  HLT(":=_val\'Tree: applied to empty tree");
 }else{
  {OBJ x27;OBJ x28;
   if(EXPRD(x1,1)){
    RSOME(x1,r);FREE(FLD1(r,1),1);FLD1(r,1)=x2;
   }else{
    x27=FLD1(x1,2);x28=FLD1(x1,3);COPY(x27,1);COPY(x28,1);
    FRPRD(x1,1);PRD1(3,r);FLD1(r,1)=x2;FLD1(r,2)=x27;FLD1(r,3)=x28;}}}
 return r;}

extern OBJ _ATree_13(OBJ x1,OBJ x2) /* :=_left */
{OBJ r;
 if(ISPRM(x1)){
  HLT(":=_left\'Tree: applied to empty tree");
 }else{
  {OBJ x26;OBJ x28;
   if(EXPRD(x1,1)){
    RSOME(x1,r);FREE(FLD1(r,2),1);FLD1(r,2)=x2;
   }else{
    x26=FLD1(x1,1);x28=FLD1(x1,3);COPY(x26,1);COPY(x28,1);
    FRPRD(x1,1);PRD1(3,r);FLD1(r,1)=x26;FLD1(r,2)=x2;FLD1(r,3)=x28;}}}
 return r;}

extern OBJ _ATree_14(OBJ x1,OBJ x2) /* :=_right */
{OBJ r;
 if(ISPRM(x1)){
  HLT(":=_right\'Tree: applied to empty tree");
 }else{
  {OBJ x26;OBJ x27;
   if(EXPRD(x1,1)){
    RSOME(x1,r);FREE(FLD1(r,3),1);FLD1(r,3)=x2;
   }else{
    x26=FLD1(x1,1);x27=FLD1(x1,2);COPY(x26,1);COPY(x27,1);
    FRPRD(x1,1);PRD1(3,r);FLD1(r,1)=x26;FLD1(r,2)=x27;FLD1(r,3)=x2;}}}
 return r;}

extern OBJ _ATree_15(OBJ x1) /* swap */
{OBJ r;
 if(ISPRM(x1)){
  r=__ATree_7;
 }else{
  {OBJ x29;OBJ x30=FLD1(x1,2);OBJ x31=FLD1(x1,3);
   if(EXPRD(x1,1)){
    RSOME(x1,r);FLD1(r,2)=x31;FLD1(r,3)=x30;
   }else{
    x29=FLD1(x1,1);COPY(x29,1);COPY(x30,1);COPY(x31,1);
    FRPRD(x1,1);PRD1(3,r);FLD1(r,1)=x29;FLD1(r,2)=x31;FLD1(r,3)=x30;}}}
 return r;}

extern OBJ _ATree_16(register OBJ x1) /* reflect */
{OBJ r;OBJ* p1=&r;
 for(;;){
  if(ISPRM(x1)){
   *p1=__ATree_7;
  }else{
   {OBJ x31;OBJ x32=FLD1(x1,2);OBJ x33=FLD1(x1,3);
    if(EXPRD(x1,1)){
     {OBJ x36;
      x36=_ATree_16(x33);
      RSOME(x1,*p1);FLD1(*p1,2)=x36;
      x1=x32;p1=&FLD1(*p1,3);continue;}
    }else{
     x31=FLD1(x1,1);COPY(x31,1);COPY(x32,1);COPY(x33,1);
     {OBJ x36;
      x36=_ATree_16(x33);
      FRPRD(x1,1);PRD1(3,*p1);FLD1(*p1,1)=x31;FLD1(*p1,2)=x36;
      x1=x32;p1=&FLD1(*p1,3);continue;}}}}
  break;}
 return r;}

extern OBJ _ATree_17(OBJ x1) /* lrotate */
{OBJ r;
 if(ISPRM(x1)){
  HLT("lrotate\'Tree: right child is empty");
 }else{
  {OBJ x66=FLD1(x1,1);OBJ x67=FLD1(x1,2);OBJ x68=FLD1(x1,3);FLAG x_x1=EXPRD(x1,1);
   if(x_x1){
   }else{
    COPY(x66,1);COPY(x67,1);COPY(x68,1);}
   if(ISPRM(x68)){
    HLT("lrotate\'Tree: right child is empty");
   }else{
    {OBJ x69;OBJ x70=FLD1(x68,2);OBJ x71;
     if(EXPRD(x68,1)){
      {OBJ x74;
       if(x_x1){
	RSOME(x1,x74);FLD1(x74,3)=x70;
       }else{
	FRPRD(x1,1);PRD1(3,x74);FLD1(x74,1)=x66;FLD1(x74,2)=x67;FLD1(x74,3)=x70;}
       RSOME(x68,r);FLD1(r,2)=x74;}
     }else{
      x69=FLD1(x68,1);x71=FLD1(x68,3);COPY(x69,1);COPY(x70,1);COPY(x71,1);
      {OBJ x74;
       if(x_x1){
	RSOME(x1,x74);FLD1(x74,3)=x70;
       }else{
	FRPRD(x1,1);PRD1(3,x74);FLD1(x74,1)=x66;FLD1(x74,2)=x67;FLD1(x74,3)=x70;}
       FRPRD(x68,1);PRD1(3,r);FLD1(r,1)=x69;FLD1(r,2)=x74;FLD1(r,3)=x71;}}}}}}
 return r;}

extern OBJ _ATree_18(OBJ x1) /* rrotate */
{OBJ r;
 if(ISPRM(x1)){
  HLT("rrotate\'Tree: left child is empty");
 }else{
  {OBJ x66=FLD1(x1,1);OBJ x67=FLD1(x1,2);OBJ x68=FLD1(x1,3);FLAG x_x1=EXPRD(x1,1);
   if(x_x1){
   }else{
    COPY(x66,1);COPY(x67,1);COPY(x68,1);}
   if(ISPRM(x67)){
    HLT("rrotate\'Tree: left child is empty");
   }else{
    {OBJ x69;OBJ x70;OBJ x71=FLD1(x67,3);
     if(EXPRD(x67,1)){
      {OBJ x74;
       if(x_x1){
	RSOME(x1,x74);FLD1(x74,2)=x71;
       }else{
	FRPRD(x1,1);PRD1(3,x74);FLD1(x74,1)=x66;FLD1(x74,2)=x71;FLD1(x74,3)=x68;}
       RSOME(x67,r);FLD1(r,3)=x74;}
     }else{
      x69=FLD1(x67,1);x70=FLD1(x67,2);COPY(x69,1);COPY(x70,1);COPY(x71,1);
      {OBJ x74;
       if(x_x1){
	RSOME(x1,x74);FLD1(x74,2)=x71;
       }else{
	FRPRD(x1,1);PRD1(3,x74);FLD1(x74,1)=x66;FLD1(x74,2)=x71;FLD1(x74,3)=x68;}
       FRPRD(x67,1);PRD1(3,r);FLD1(r,1)=x69;FLD1(r,2)=x70;FLD1(r,3)=x74;}}}}}}
 return r;}

extern OBJ _ATree_19(register OBJ x1) /* leftmost */
{OBJ r;
 for(;;){
  if(ISPRM(x1)){
   HLT("leftmost\'Tree: applied to empty tree");
  }else{
   {OBJ x23=FLD1(x1,1);OBJ x24=FLD1(x1,2);
    if(EXPRD(x1,1)){
     FREE(FLD1(x1,3),1);DSPRDF(x1);
    }else{
     COPY(x23,1);COPY(x24,1);
     FRPRD(x1,1);}
    if(ISPRM(x24)){
     r=x23;
    }else{
     FREE(x23,1);
     x1=x24;continue;}}}
  break;}
 return r;}

extern OBJ _ATree_20(register OBJ x1) /* rightmost */
{OBJ r;
 for(;;){
  if(ISPRM(x1)){
   HLT("rightmost\'Tree: applied to empty tree");
  }else{
   {OBJ x23=FLD1(x1,1);OBJ x25=FLD1(x1,3);
    if(EXPRD(x1,1)){
     FREE(FLD1(x1,2),1);DSPRDF(x1);
    }else{
     COPY(x23,1);COPY(x25,1);
     FRPRD(x1,1);}
    if(ISPRM(x25)){
     r=x23;
    }else{
     FREE(x23,1);
     x1=x25;continue;}}}
  break;}
 return r;}

extern OBJ _ATree_21(OBJ x1) /* children */
{OBJ r;
 r=_ATree_66(x1);
 return r;}

extern OBJ _ATree_22(OBJ x1) /* grandchildren */
{OBJ r;
 r=_ATree_67(x1);
 return r;}

extern OBJ _ATree_23(OBJ x1,OBJ x2) /* level */
{OBJ r;
 {OBJ x3;
  ANat_6(x1,x3);
  if(ISTGPRM(x3,1)){
   if(ISPRM(x2)){
    r=__ASeq_6;
   }else{
    {OBJ x16=FLD1(x2,1);
     if(EXPRD(x2,1)){
      FLD1(x2,1)=NIL;DSPRD(x2);
     }else{
      COPY(x16,1);
      FRPRD(x2,1);}
     PRD1(2,r);FLD1(r,1)=x16;FLD1(r,2)=__ASeq_6;}}
  }else{
   {OBJ x19;
    ANat_3(x1,x19);
    if(ISTGPRM(x19,1)){
     if(ISPRM(x2)){
      r=__ASeq_6;
     }else{
      {OBJ x47=FLD1(x2,2);OBJ x48=FLD1(x2,3);
       if(EXPRD(x2,1)){
	FREE(FLD1(x2,1),1);DSPRDF(x2);
       }else{
	COPY(x47,1);COPY(x48,1);
	FRPRD(x2,1);}
       {OBJ x49;OBJ x52;OBJ x51;
	ANat_4(x1,x49);
	x52=_ATree_23(x49,x47);
	x51=_ATree_23(x49,x48);
	r=_ASeq_26(x52,x51);}}}
    }else{
     HLT("Tree at <unknown> : missing else in level\'Tree:nat**tree->seq");}}}}
 return r;}

extern OBJ _ATree_24(OBJ x1) /* front */
{OBJ r;
 if(ISPRM(x1)){
  r=__ASeq_6;
 }else{
  {OBJ x32=FLD1(x1,1);OBJ x33=FLD1(x1,2);OBJ x34=FLD1(x1,3);
   COPY(x32,1);COPY(x33,1);COPY(x34,1);
   {OBJ x35;
    x35=_ATree_28(x1);
    if(ISTGPRM(x35,1)){
     FREE(x33,1);
     FREE(x34,1);
     PRD1(2,r);FLD1(r,1)=x32;FLD1(r,2)=__ASeq_6;
    }else{
     FREE(x32,1);
     {OBJ x38;OBJ x37;
      x38=_ATree_24(x33);
      x37=_ATree_24(x34);
      r=_ASeq_26(x38,x37);}}}}}
 return r;}

extern OBJ _ATree_25(OBJ x1) /* # */
{OBJ r;
 if(ISPRM(x1)){
  r=__ANat_5;
 }else{
  {OBJ x29=FLD1(x1,2);OBJ x30=FLD1(x1,3);
   if(EXPRD(x1,1)){
    FREE(FLD1(x1,1),1);DSPRDF(x1);
   }else{
    COPY(x29,1);COPY(x30,1);
    FRPRD(x1,1);}
   {OBJ x33;OBJ x32;OBJ x34;
    x33=_ATree_25(x29);
    x32=_ATree_25(x30);
    ANat_61(x33,x32,x34);
    ANat_2(x34,r);}}}
 return r;}

extern OBJ _ATree_26(OBJ x1) /* depth */
{OBJ r;
 if(ISPRM(x1)){
  HLT("depth\'Tree: no depth for empty tree");
 }else{
  {OBJ x85=FLD1(x1,2);OBJ x86=FLD1(x1,3);
   if(EXPRD(x1,1)){
    FREE(FLD1(x1,1),1);DSPRDF(x1);
   }else{
    COPY(x85,1);COPY(x86,1);
    FRPRD(x1,1);}
   if(ISPRM(x85)){
    if(ISPRM(x86)){
     r=__ANat_5;
    }else{
     {OBJ x90;
      x90=_ATree_26(x86);
      ANat_2(x90,r);}}
   }else{
    if(ISPRM(x86)){
     {OBJ x94;
      x94=_ATree_26(x85);
      ANat_2(x94,r);}
    }else{
     {OBJ x99;OBJ x98;OBJ x100;
      x99=_ATree_26(x86);
      x98=_ATree_26(x85);
      ANat_73(x98,x99,x100);
      ANat_2(x100,r);}}}}}
 return r;}

extern OBJ _ATree_27(OBJ x1) /* width */
{OBJ r;
 {OBJ x2;
  x2=_ATree_24(x1);
  r=_ASeq_52(x2,__ANat_5);}
 return r;}

extern OBJ _ATree_28(OBJ x1) /* leaf? */
{OBJ r;
 if(ISPRM(x1)){
  r=__ABUILTIN_3;
 }else{
  {OBJ x39=FLD1(x1,2);OBJ x40=FLD1(x1,3);
   if(EXPRD(x1,1)){
    FREE(FLD1(x1,1),1);DSPRDF(x1);
   }else{
    COPY(x39,1);COPY(x40,1);
    FRPRD(x1,1);}
   if(ISPRM(x39)){
    if(ISPRM(x40)){
     r=__ABUILTIN_5;
    }else{
     if(EXPRD(x40,1)){
      DSPRD(x40);
     }else{
      DCPRD(x40,1);}
     r=__ABUILTIN_3;}
   }else{
    if(EXPRD(x39,1)){
     DSPRD(x39);
    }else{
     DCPRD(x39,1);}
    FREE(x40,1);
    r=__ABUILTIN_3;}}}
 return r;}

extern OBJ _ATree_29(OBJ x1,OBJ x2) /* exist? */
{OBJ r;
 {OBJ x3;
  x3=_ATree_31(x1,x2);
  if(ISPRM(x3)){
   r=__ABUILTIN_3;
  }else{
   if(EXPRD(x3,1)){
    FREE(FLD1(x3,1),1);DSPRDF(x3);
   }else{
    DCPRD(x3,1);}
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _ATree_30(OBJ x1,OBJ x2) /* forall? */
{OBJ r;
 CPCLS(__ABUILTIN_7,1);
 CPCLS(__ACompose_4,1);
 {OBJ x3;OBJ x4;
  x3=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__ACompose_4,2))(__ACompose_4,__ABUILTIN_7,x1);
  x4=_ATree_31(x3,x2);
  if(ISPRM(x4)){
   r=__ABUILTIN_5;
  }else{
   if(EXPRD(x4,1)){
    FREE(FLD1(x4,1),1);DSPRDF(x4);
   }else{
    DCPRD(x4,1);}
   r=__ABUILTIN_3;}}
 return r;}

extern OBJ _ATree_31(OBJ x1,OBJ x2) /* find? */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  r=__AOption_5;
 }else{
  {OBJ x41=FLD1(x2,1);OBJ x42=FLD1(x2,2);OBJ x43=FLD1(x2,3);
   if(EXPRD(x2,1)){
    COPY(x41,1);
    DSPRDF(x2);
   }else{
    COPY(x41,2);COPY(x42,1);COPY(x43,1);
    FRPRD(x2,1);}
   CPCLS(x1,1);
   {OBJ x45;
    x45=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x41);
    if(ISTGPRM(x45,1)){
     FRCLS(x1,1);
     FREE(x42,1);
     FREE(x43,1);
     PRD1(1,r);FLD1(r,1)=x41;
    }else{
     FREE(x41,1);
     CPCLS(x1,1);
     {OBJ x46;
      x46=_ATree_31(x1,x42);
      if(ISPRM(x46)){
       {OBJ x48;
	x48=_ATree_31(x1,x43);
	if(ISPRM(x48)){
	 r=__AOption_5;
	}else{
	 r=x48;}}
      }else{
       r=x46;
       FRCLS(x1,1);
       FREE(x43,1);}}}}}}
 return r;}

extern OBJ _ATree_32(OBJ x1,OBJ x2,OBJ x3) /* < */
{OBJ r;
 {OBJ x4;
  x4=_ATree_64(x1,x2,x3);
  if(ISTGPRM(x4,0)){
   r=__ABUILTIN_5;
  }else{
   r=__ABUILTIN_3;}}
 return r;}

extern OBJ _ATree_33(register OBJ x1,register OBJ x2,register OBJ x3) /* = */
{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{
   {OBJ x93=FLD1(x2,1);OBJ x94=FLD1(x2,2);OBJ x95=FLD1(x2,3);
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     COPY(x93,1);COPY(x94,1);COPY(x95,1);
     FRPRD(x2,1);}
    if(ISPRM(x3)){
     FRCLS(x1,1);
     FREE(x93,1);
     FREE(x94,1);
     FREE(x95,1);
     r=__ABUILTIN_3;
    }else{
     {OBJ x96=FLD1(x3,1);OBJ x97=FLD1(x3,2);OBJ x98=FLD1(x3,3);
      if(EXPRD(x3,1)){
       DSPRDF(x3);
      }else{
       COPY(x96,1);COPY(x97,1);COPY(x98,1);
       FRPRD(x3,1);}
      CPCLS(x1,1);
      {OBJ x101;
       x101=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x93,x96);
       if(ISTGPRM(x101,1)){
	CPCLS(x1,1);
	{OBJ x102;
	 x102=_ATree_33(x1,x94,x97);
	 if(ISTGPRM(x102,1)){
	  x2=x95;x3=x98;continue;
	 }else{
	  FRCLS(x1,1);
	  FREE(x95,1);
	  FREE(x98,1);
	  r=__ABUILTIN_3;}}
       }else{
	FRCLS(x1,1);
	FREE(x94,1);
	FREE(x95,1);
	FREE(x97,1);
	FREE(x98,1);
	r=__ABUILTIN_3;}}}}}}
  break;}
 return r;}

extern OBJ _ATree_64(register OBJ x1,register OBJ x2,register OBJ x3) /* cmp */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   if(ISPRM(x3)){
    r=__ARelCmp_4;
   }else{
    if(EXPRD(x3,1)){
     DSPRD(x3);
    }else{
     DCPRD(x3,1);}
    r=__ARelCmp_6;}
  }else{
   {OBJ x97=FLD1(x2,1);OBJ x98=FLD1(x2,2);OBJ x99=FLD1(x2,3);
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     COPY(x97,1);COPY(x98,1);COPY(x99,1);
     FRPRD(x2,1);}
    if(ISPRM(x3)){
     FRCLS(x1,1);
     FREE(x97,1);
     FREE(x98,1);
     FREE(x99,1);
     r=__ARelCmp_2;
    }else{
     {OBJ x100=FLD1(x3,1);OBJ x101=FLD1(x3,2);OBJ x102=FLD1(x3,3);
      if(EXPRD(x3,1)){
       COPY(x100,1);
       DSPRDF(x3);
      }else{
       COPY(x100,2);COPY(x101,1);COPY(x102,1);
       FRPRD(x3,1);}
      CPCLS(x1,1);
      COPY(x97,1);
      {OBJ x105;
       x105=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x97,x100);
       if(ISTGPRM(x105,1)){
	FRCLS(x1,1);
	FREE(x97,1);
	FREE(x98,1);
	FREE(x99,1);
	FREE(x100,1);
	FREE(x101,1);
	FREE(x102,1);
	r=__ARelCmp_6;
       }else{
	CPCLS(x1,1);
	{OBJ x106;
	 x106=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x100,x97);
	 if(ISTGPRM(x106,1)){
	  FRCLS(x1,1);
	  FREE(x98,1);
	  FREE(x99,1);
	  FREE(x101,1);
	  FREE(x102,1);
	  r=__ARelCmp_2;
	 }else{
	  CPCLS(x1,1);
	  {OBJ x107;
	   x107=_ATree_64(x1,x98,x101);
	   if(ISTGPRM(x107,1)){
	    x2=x99;x3=x102;continue;
	   }else{
	    r=x107;
	    FRCLS(x1,1);
	    FREE(x99,1);
	    FREE(x102,1);}}}}}}}}}}
  break;}
 return r;}

extern OBJ _ATree_65(OBJ x1) /* %'65 */
{OBJ r;
 PRD1(3,r);FLD1(r,1)=x1;FLD1(r,2)=__ATree_7;FLD1(r,3)=__ATree_7;
 return r;}

extern OBJ _ATree_66(OBJ x1) /* children'66 */
{OBJ r;
 r=_ATree_23(__ANat_8,x1);
 return r;}

extern OBJ _ATree_67(OBJ x1) /* grandchildren'67 */
{OBJ r;
 r=_ATree_23(__ANat_9,x1);
 return r;}


init_ATree()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_AOption();
 init_ASeq();
 init_ASeqMap();
 init_ASeqOfSeq();
 init_ACompose();
 init_ARelCmp();
 CLS(2,_ATree_31,__ATree_31);
 CLS(2,_ATree_30,__ATree_30);
 CLS(2,_ATree_29,__ATree_29);
 CLS(1,_ATree_28,__ATree_28);
 CLS(1,_ATree_27,__ATree_27);
 CLS(1,_ATree_26,__ATree_26);
 CLS(1,_ATree_25,__ATree_25);
 CLS(1,_ATree_24,__ATree_24);
 CLS(2,_ATree_23,__ATree_23);
 CLS(1,_ATree_22,__ATree_22);
 CLS(1,_ATree_21,__ATree_21);
 CLS(1,_ATree_20,__ATree_20);
 CLS(1,_ATree_19,__ATree_19);
 CLS(1,_ATree_18,__ATree_18);
 CLS(1,_ATree_17,__ATree_17);
 CLS(1,_ATree_16,__ATree_16);
 CLS(1,_ATree_15,__ATree_15);
 CLS(2,_ATree_14,__ATree_14);
 CLS(2,_ATree_13,__ATree_13);
 CLS(2,_ATree_12,__ATree_12);
 CLS(2,_ATree_11,__ATree_11);
 CLS(1,_ATree_10,__ATree_10);
 CLS(1,_ATree_8,__ATree_8);
 CLS(1,_ATree_6,__ATree_6);
 CLS(1,_ATree_5,__ATree_5);
 CLS(1,_ATree_4,__ATree_4);
 CLS(1,_ATree_67,__ATree_67);
 CLS(1,_ATree_3,__ATree_3);
 CLS(1,_ATree_66,__ATree_66);
 CLS(3,_ATree_2,__ATree_2);
 CLS(1,_ATree_65,__ATree_65);
 CLS(3,_ATree_33,__ATree_33);
 CLS(3,_ATree_32,__ATree_32);
 CLS(3,_ATree_64,__ATree_64);
 PRM1(__ATree_7);}

