

#include "BUILTIN.h"
extern OBJ _AMapByBST_26(OBJ,OBJ,OBJ);extern OBJ __AMapByBST_26;

#include "Nat.h"
extern TUP2 _APair_8(OBJ);extern OBJ __APair_8;
extern OBJ _ABSTreeReduce_5(OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTreeReduce_5;
extern OBJ _AMapByBSTReduce_5(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByBSTReduce_5; /* / */
extern OBJ _AMapByBSTReduce_6(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByBSTReduce_6; /* /,1 */
extern OBJ _AMapByBSTReduce_7(OBJ,OBJ,OBJ);OBJ __AMapByBSTReduce_7; /* /'7 */
extern OBJ _AMapByBSTReduce_8(OBJ,OBJ,OBJ);OBJ __AMapByBSTReduce_8; /* /,1'8 */

extern OBJ _AMapByBSTReduce_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{OBJ r;
 CPCLS(__AMapByBSTReduce_7,1);
 CPCLS(__AMapByBST_26,1);
 {OBJ x5;OBJ x6;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBST_26,1))(__AMapByBST_26,x1);
  x6=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBSTReduce_7,1))(__AMapByBSTReduce_7,x2);
  r=_ABSTreeReduce_5(x5,x6,x3,x4);}
 return r;}

extern OBJ _AMapByBSTReduce_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,1 */
{OBJ r;
 CPCLS(__AMapByBSTReduce_8,1);
 CPCLS(__AMapByBST_26,1);
 {OBJ x5;OBJ x6;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBST_26,1))(__AMapByBST_26,x1);
  x6=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBSTReduce_8,1))(__AMapByBSTReduce_8,x2);
  r=_ABSTreeReduce_5(x5,x6,x3,x4);}
 return r;}

extern OBJ _AMapByBSTReduce_7(OBJ x1,OBJ x2,OBJ x3) /* /'7 */
{OBJ r;
 {OBJ x5=FLD1(x2,2);
  if(EXPRD(x2,1)){
   FREE(FLD1(x2,1),1);DSPRDF(x2);
  }else{
   COPY(x5,1);
   FRPRD(x2,1);}
  {OBJ x6;
   x6=x5;
   r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x6,x3);}}
 return r;}

extern OBJ _AMapByBSTReduce_8(OBJ x1,OBJ x2,OBJ x3) /* /,1'8 */
{OBJ r;
 {TUP2 x11;
  x11=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x11.c1,x11.c2,x3);}
 return r;}

init_AMapByBSTReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_AMapByBST();
 init_ANat();
 init_AOption();
 init_ASetByBST();
 init_ASeq();
 init_APair();
 init_ABSTree();
 init_ATree();
 init_ASetByBSTReduce();
 init_ABSTreeReduce();
 CLS(3,_AMapByBSTReduce_8,__AMapByBSTReduce_8);
 CLS(3,_AMapByBSTReduce_7,__AMapByBSTReduce_7);
 CLS(4,_AMapByBSTReduce_6,__AMapByBSTReduce_6);
 CLS(4,_AMapByBSTReduce_5,__AMapByBSTReduce_5);}

