

#include "BUILTIN.h"
extern OBJ _AHeap_51(OBJ,OBJ,OBJ);extern OBJ __AHeap_51;

#include "Nat.h"
extern OBJ _ATreeReduce_3(OBJ,OBJ,OBJ);extern OBJ __ATreeReduce_3;
extern OBJ _ATreeReduce_4(OBJ,OBJ,OBJ);extern OBJ __ATreeReduce_4;
extern OBJ _ATreeReduce_5(OBJ,OBJ,OBJ);extern OBJ __ATreeReduce_5;
extern OBJ _ATreeReduce_6(OBJ,OBJ,OBJ);extern OBJ __ATreeReduce_6;
extern OBJ _AHeapReduce_4(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_4; /* / */
extern OBJ _AHeapReduce_5(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_5; /* /,1 */
extern OBJ _AHeapReduce_6(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_6; /* /_pre */
extern OBJ _AHeapReduce_7(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_7; /* /_in */
extern OBJ _AHeapReduce_8(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_8; /* /_post */
extern OBJ _AHeapReduce_9(OBJ,OBJ,OBJ,OBJ);OBJ __AHeapReduce_9; /* /,2 */

extern OBJ _AHeapReduce_4(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{OBJ r;
 r=_AHeapReduce_9(x1,x2,x3,x4);
 return r;}

extern OBJ _AHeapReduce_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,1 */
{OBJ r;
 FRCLS(x1,1);
 r=_ATreeReduce_3(x2,x3,x4);
 return r;}

extern OBJ _AHeapReduce_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /_pre */
{OBJ r;
 FRCLS(x1,1);
 r=_ATreeReduce_4(x2,x3,x4);
 return r;}

extern OBJ _AHeapReduce_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /_in */
{OBJ r;
 FRCLS(x1,1);
 r=_ATreeReduce_5(x2,x3,x4);
 return r;}

extern OBJ _AHeapReduce_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /_post */
{OBJ r;
 FRCLS(x1,1);
 r=_ATreeReduce_6(x2,x3,x4);
 return r;}

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

init_AHeapReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_AHeap();
 init_ANat();
 init_AOption();
 init_ASeq();
 init_ATree();
 init_ATreeReduce();
 init_ARelCmp();
 CLS(4,_AHeapReduce_9,__AHeapReduce_9);
 CLS(4,_AHeapReduce_8,__AHeapReduce_8);
 CLS(4,_AHeapReduce_7,__AHeapReduce_7);
 CLS(4,_AHeapReduce_6,__AHeapReduce_6);
 CLS(4,_AHeapReduce_5,__AHeapReduce_5);
 CLS(4,_AHeapReduce_4,__AHeapReduce_4);}

