

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _ATreeReduce_3(OBJ,OBJ,OBJ);OBJ __ATreeReduce_3; /* / */
extern OBJ _ATreeReduce_4(OBJ,OBJ,OBJ);OBJ __ATreeReduce_4; /* /_pre */
extern OBJ _ATreeReduce_5(OBJ,OBJ,OBJ);OBJ __ATreeReduce_5; /* /_in */
extern OBJ _ATreeReduce_6(OBJ,OBJ,OBJ);OBJ __ATreeReduce_6; /* /_post */

extern OBJ _ATreeReduce_3(OBJ x1,OBJ x2,OBJ x3) /* / */
{OBJ r;
 if(ISPRM(x3)){
  FRCLS(x1,1);
  r=x2;
 }else{
  {OBJ x33=FLD1(x3,1);OBJ x34=FLD1(x3,2);OBJ x35=FLD1(x3,3);
   if(EXPRD(x3,1)){
    DSPRDF(x3);
   }else{
    COPY(x33,1);COPY(x34,1);COPY(x35,1);
    FRPRD(x3,1);}
   CPCLS(x1,2);
   COPY(x2,1);
   {OBJ x38;OBJ x37;
    x38=_ATreeReduce_3(x1,x2,x34);
    x37=_ATreeReduce_3(x1,x2,x35);
    r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x33,x38,x37);}}}
 return r;}

extern OBJ _ATreeReduce_4(OBJ x1,OBJ x2,OBJ x3) /* /_pre */
{OBJ r;
 if(ISPRM(x3)){
  FRCLS(x1,1);
  r=x2;
 }else{
  {OBJ x33=FLD1(x3,1);OBJ x34=FLD1(x3,2);OBJ x35=FLD1(x3,3);
   if(EXPRD(x3,1)){
    DSPRDF(x3);
   }else{
    COPY(x33,1);COPY(x34,1);COPY(x35,1);
    FRPRD(x3,1);}
   CPCLS(x1,2);
   {OBJ x37;OBJ x38;
    x37=_ATreeReduce_4(x1,x2,x35);
    x38=_ATreeReduce_4(x1,x37,x34);
    r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x33,x38);}}}
 return r;}

extern OBJ _ATreeReduce_5(register OBJ x1,register OBJ x2,register OBJ x3) /* /_in */
{OBJ r;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   r=x2;
  }else{
   {OBJ x33=FLD1(x3,1);OBJ x34=FLD1(x3,2);OBJ x35=FLD1(x3,3);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     COPY(x33,1);COPY(x34,1);COPY(x35,1);
     FRPRD(x3,1);}
    CPCLS(x1,2);
    {OBJ x37;OBJ x38;
     x37=_ATreeReduce_5(x1,x2,x35);
     x38=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x33,x37);
     x2=x38;x3=x34;continue;}}}
  break;}
 return r;}

extern OBJ _ATreeReduce_6(register OBJ x1,register OBJ x2,register OBJ x3) /* /_post */
{OBJ r;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   r=x2;
  }else{
   {OBJ x33=FLD1(x3,1);OBJ x34=FLD1(x3,2);OBJ x35=FLD1(x3,3);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     COPY(x33,1);COPY(x34,1);COPY(x35,1);
     FRPRD(x3,1);}
    CPCLS(x1,2);
    {OBJ x37;OBJ x38;
     x37=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x33,x2);
     x38=_ATreeReduce_6(x1,x37,x35);
     x2=x38;x3=x34;continue;}}}
  break;}
 return r;}

init_ATreeReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_ATree();
 init_ANat();
 init_AOption();
 init_ASeq();
 init_ARelCmp();
 CLS(3,_ATreeReduce_6,__ATreeReduce_6);
 CLS(3,_ATreeReduce_5,__ATreeReduce_5);
 CLS(3,_ATreeReduce_4,__ATreeReduce_4);
 CLS(3,_ATreeReduce_3,__ATreeReduce_3);}

