

#include "BUILTIN.h"
extern OBJ __ATree_7;

#include "Nat.h"
extern OBJ _ATreeMapEnv_4(OBJ,OBJ,OBJ);OBJ __ATreeMapEnv_4; /* *_V */
extern TUP2 _ATreeMapEnv_5(OBJ,OBJ,OBJ);OBJ __ATreeMapEnv_5; /* *_^ */
extern TUP2 _ATreeMapEnv_6(OBJ,OBJ,OBJ);OBJ __ATreeMapEnv_6; /* *_pre */
extern TUP2 _ATreeMapEnv_7(OBJ,OBJ,OBJ);OBJ __ATreeMapEnv_7; /* *_in */
extern TUP2 _ATreeMapEnv_8(OBJ,OBJ,OBJ);OBJ __ATreeMapEnv_8; /* *_post */

extern OBJ _ATreeMapEnv_4(register OBJ x1,register OBJ x2,register OBJ x3) /* *_V */
{OBJ r;OBJ* p1=&r;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   FREE(x2,1);
   *p1=__ATree_7;
  }else{
   {OBJ x37=FLD1(x3,1);OBJ x38=FLD1(x3,2);OBJ x39=FLD1(x3,3);
    if(EXPRD(x3,1)){
     CPCLS(x1,2);
     {OBJ x42;OBJ x43;OBJ x44;OBJ x46;
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x37);
       x42=FLD1(t,1);
       x43=FLD1(t,2);
       x44=FLD1(t,3);
       DSPRDF(t);}
      x46=_ATreeMapEnv_4(x1,x42,x38);
      RSOME(x3,*p1);FLD1(*p1,1)=x44;FLD1(*p1,2)=x46;
      x2=x43;x3=x39;p1=&FLD1(*p1,3);continue;}
    }else{
     COPY(x37,1);COPY(x38,1);COPY(x39,1);
     CPCLS(x1,2);
     {OBJ x42;OBJ x43;OBJ x44;OBJ x46;
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x37);
       x42=FLD1(t,1);
       x43=FLD1(t,2);
       x44=FLD1(t,3);
       DSPRDF(t);}
      x46=_ATreeMapEnv_4(x1,x42,x38);
      FRPRD(x3,1);PRD1(3,*p1);FLD1(*p1,1)=x44;FLD1(*p1,2)=x46;
      x2=x43;x3=x39;p1=&FLD1(*p1,3);continue;}}}}
  break;}
 return r;}

extern TUP2 _ATreeMapEnv_5(OBJ x1,OBJ x2,OBJ x3) /* *_^ */
{TUP2 r;
 if(ISPRM(x3)){
  FRCLS(x1,1);
  r.c1=x2;r.c2=__ATree_7;
 }else{
  {OBJ x41=FLD1(x3,1);OBJ x42=FLD1(x3,2);OBJ x43=FLD1(x3,3);
   if(EXPRD(x3,1)){
    CPCLS(x1,2);
    COPY(x2,1);
    {TUP2 x46;TUP2 x49;OBJ x53;
     x46=_ATreeMapEnv_5(x1,x2,x43);
     x49=_ATreeMapEnv_5(x1,x2,x42);
     {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x49.c1,x46.c1,x41);
      r.c1=FLD1(t,1);
      x53=FLD1(t,2);
      DSPRDF(t);}
     RSOME(x3,r.c2);FLD1(r.c2,1)=x53;FLD1(r.c2,2)=x49.c2;FLD1(r.c2,3)=x46.c2;}
   }else{
    COPY(x41,1);COPY(x42,1);COPY(x43,1);
    CPCLS(x1,2);
    COPY(x2,1);
    {TUP2 x46;TUP2 x49;OBJ x53;
     x46=_ATreeMapEnv_5(x1,x2,x43);
     x49=_ATreeMapEnv_5(x1,x2,x42);
     {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x49.c1,x46.c1,x41);
      r.c1=FLD1(t,1);
      x53=FLD1(t,2);
      DSPRDF(t);}
     FRPRD(x3,1);PRD1(3,r.c2);FLD1(r.c2,1)=x53;FLD1(r.c2,2)=x49.c2;FLD1(r.c2,3)=x46.c2;}}}}
 return r;}
extern OBJ _ATreeMapEnv_5_c(OBJ x1,OBJ x2,OBJ x3) /* *_^ */
{OBJ r;
 {TUP2 t=_ATreeMapEnv_5(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _ATreeMapEnv_6(register OBJ x1,register OBJ x2,register OBJ x3) /* *_pre */
{TUP2 r;OBJ* p1=&r.c1;OBJ* p2=&r.c2;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   *p1=x2;*p2=__ATree_7;
  }else{
   {OBJ x41=FLD1(x3,1);OBJ x42=FLD1(x3,2);OBJ x43=FLD1(x3,3);
    if(EXPRD(x3,1)){
     CPCLS(x1,2);
     {OBJ x46;OBJ x47;TUP2 x49;
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x41);
       x46=FLD1(t,1);
       x47=FLD1(t,2);
       DSPRDF(t);}
      x49=_ATreeMapEnv_6(x1,x46,x42);
      RSOME(x3,*p2);FLD1(*p2,1)=x47;FLD1(*p2,2)=x49.c2;
      x2=x49.c1;x3=x43;p2=&FLD1(*p2,3);continue;}
    }else{
     COPY(x41,1);COPY(x42,1);COPY(x43,1);
     CPCLS(x1,2);
     {OBJ x46;OBJ x47;TUP2 x49;
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x41);
       x46=FLD1(t,1);
       x47=FLD1(t,2);
       DSPRDF(t);}
      x49=_ATreeMapEnv_6(x1,x46,x42);
      FRPRD(x3,1);PRD1(3,*p2);FLD1(*p2,1)=x47;FLD1(*p2,2)=x49.c2;
      x2=x49.c1;x3=x43;p2=&FLD1(*p2,3);continue;}}}}
  break;}
 return r;}
extern OBJ _ATreeMapEnv_6_c(OBJ x1,OBJ x2,OBJ x3) /* *_pre */
{OBJ r;
 {TUP2 t=_ATreeMapEnv_6(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _ATreeMapEnv_7(register OBJ x1,register OBJ x2,register OBJ x3) /* *_in */
{TUP2 r;OBJ* p1=&r.c1;OBJ* p2=&r.c2;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   *p1=x2;*p2=__ATree_7;
  }else{
   {OBJ x41=FLD1(x3,1);OBJ x42=FLD1(x3,2);OBJ x43=FLD1(x3,3);
    if(EXPRD(x3,1)){
     CPCLS(x1,2);
     {TUP2 x46;OBJ x49;OBJ x50;
      x46=_ATreeMapEnv_7(x1,x2,x42);
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x46.c1,x41);
       x49=FLD1(t,1);
       x50=FLD1(t,2);
       DSPRDF(t);}
      RSOME(x3,*p2);FLD1(*p2,1)=x50;FLD1(*p2,2)=x46.c2;
      x2=x49;x3=x43;p2=&FLD1(*p2,3);continue;}
    }else{
     COPY(x41,1);COPY(x42,1);COPY(x43,1);
     CPCLS(x1,2);
     {TUP2 x46;OBJ x49;OBJ x50;
      x46=_ATreeMapEnv_7(x1,x2,x42);
      {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x46.c1,x41);
       x49=FLD1(t,1);
       x50=FLD1(t,2);
       DSPRDF(t);}
      FRPRD(x3,1);PRD1(3,*p2);FLD1(*p2,1)=x50;FLD1(*p2,2)=x46.c2;
      x2=x49;x3=x43;p2=&FLD1(*p2,3);continue;}}}}
  break;}
 return r;}
extern OBJ _ATreeMapEnv_7_c(OBJ x1,OBJ x2,OBJ x3) /* *_in */
{OBJ r;
 {TUP2 t=_ATreeMapEnv_7(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _ATreeMapEnv_8(OBJ x1,OBJ x2,OBJ x3) /* *_post */
{TUP2 r;
 if(ISPRM(x3)){
  FRCLS(x1,1);
  r.c1=x2;r.c2=__ATree_7;
 }else{
  {OBJ x41=FLD1(x3,1);OBJ x42=FLD1(x3,2);OBJ x43=FLD1(x3,3);
   if(EXPRD(x3,1)){
    CPCLS(x1,2);
    {TUP2 x46;TUP2 x49;OBJ x53;
     x46=_ATreeMapEnv_8(x1,x2,x42);
     x49=_ATreeMapEnv_8(x1,x46.c1,x43);
     {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x49.c1,x41);
      r.c1=FLD1(t,1);
      x53=FLD1(t,2);
      DSPRDF(t);}
     RSOME(x3,r.c2);FLD1(r.c2,1)=x53;FLD1(r.c2,2)=x46.c2;FLD1(r.c2,3)=x49.c2;}
   }else{
    COPY(x41,1);COPY(x42,1);COPY(x43,1);
    CPCLS(x1,2);
    {TUP2 x46;TUP2 x49;OBJ x53;
     x46=_ATreeMapEnv_8(x1,x2,x42);
     x49=_ATreeMapEnv_8(x1,x46.c1,x43);
     {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x49.c1,x41);
      r.c1=FLD1(t,1);
      x53=FLD1(t,2);
      DSPRDF(t);}
     FRPRD(x3,1);PRD1(3,r.c2);FLD1(r.c2,1)=x53;FLD1(r.c2,2)=x46.c2;FLD1(r.c2,3)=x49.c2;}}}}
 return r;}
extern OBJ _ATreeMapEnv_8_c(OBJ x1,OBJ x2,OBJ x3) /* *_post */
{OBJ r;
 {TUP2 t=_ATreeMapEnv_8(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

init_ATreeMapEnv()
{
 static int visited=0; if(visited) return; visited=1;
 init_ATree();
 init_ANat();
 init_AOption();
 init_ASeq();
 init_ARelCmp();
 CLS(3,_ATreeMapEnv_8_c,__ATreeMapEnv_8);
 CLS(3,_ATreeMapEnv_7_c,__ATreeMapEnv_7);
 CLS(3,_ATreeMapEnv_6_c,__ATreeMapEnv_6);
 CLS(3,_ATreeMapEnv_5_c,__ATreeMapEnv_5);
 CLS(3,_ATreeMapEnv_4,__ATreeMapEnv_4);}

