

#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 _ASetByBSTFilter_3(OBJ,OBJ,OBJ);extern OBJ __ASetByBSTFilter_3;
extern OBJ _AMapByBSTFilter_4(OBJ,OBJ,OBJ);OBJ __AMapByBSTFilter_4; /* | */
extern TUP2 _AMapByBSTFilter_5(OBJ,OBJ,OBJ);OBJ __AMapByBSTFilter_5; /* partition */
extern OBJ _AMapByBSTFilter_6(OBJ,OBJ);OBJ __AMapByBSTFilter_6; /* |'6 */
extern OBJ _AMapByBSTFilter_7(OBJ,OBJ);OBJ __AMapByBSTFilter_7; /* partition'7 */
extern OBJ _AMapByBSTFilter_8(OBJ,OBJ);OBJ __AMapByBSTFilter_8; /* partition'8 */

extern OBJ _AMapByBSTFilter_4(OBJ x1,OBJ x2,OBJ x3) /* | */
{OBJ r;
 CPCLS(__AMapByBSTFilter_6,1);
 CPCLS(__AMapByBST_26,1);
 {OBJ x4;OBJ x5;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBST_26,1))(__AMapByBST_26,x1);
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBSTFilter_6,1))(__AMapByBSTFilter_6,x2);
  r=_ASetByBSTFilter_3(x4,x5,x3);}
 return r;}

extern TUP2 _AMapByBSTFilter_5(OBJ x1,OBJ x2,OBJ x3) /* partition */
{TUP2 r;
 CPCLS(__AMapByBSTFilter_7,1);
 CPCLS(__AMapByBSTFilter_8,1);
 CPCLS(__AMapByBST_26,1);
 CPCLS(x2,1);
 COPY(x3,1);
 {OBJ x4;OBJ x5;OBJ x7;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBST_26,1))(__AMapByBST_26,x1);
  CPCLS(x4,1);
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBSTFilter_7,1))(__AMapByBSTFilter_7,x2);
  r.c1=_ASetByBSTFilter_3(x4,x5,x3);
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByBSTFilter_8,1))(__AMapByBSTFilter_8,x2);
  r.c2=_ASetByBSTFilter_3(x4,x7,x3);}
 return r;}
extern OBJ _AMapByBSTFilter_5_c(OBJ x1,OBJ x2,OBJ x3) /* partition */
{OBJ r;
 {TUP2 t=_AMapByBSTFilter_5(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AMapByBSTFilter_6(OBJ x1,OBJ x2) /* |'6 */
{OBJ r;
 {TUP2 x4;
  x4=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x4.c1,x4.c2);}
 return r;}

extern OBJ _AMapByBSTFilter_7(OBJ x1,OBJ x2) /* partition'7 */
{OBJ r;
 {TUP2 x4;
  x4=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x4.c1,x4.c2);}
 return r;}

extern OBJ _AMapByBSTFilter_8(OBJ x1,OBJ x2) /* partition'8 */
{OBJ r;
 {TUP2 x7;OBJ x9;
  x7=_APair_8(x2);
  x9=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x7.c1,x7.c2);
  if(ISTGPRM(x9,1)){
   r=__ABUILTIN_3;
  }else{
   r=__ABUILTIN_5;}}
 return r;}

init_AMapByBSTFilter()
{
 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_ASetByBSTFilter();
 CLS(2,_AMapByBSTFilter_8,__AMapByBSTFilter_8);
 CLS(2,_AMapByBSTFilter_7,__AMapByBSTFilter_7);
 CLS(2,_AMapByBSTFilter_6,__AMapByBSTFilter_6);
 CLS(3,_AMapByBSTFilter_5_c,__AMapByBSTFilter_5);
 CLS(3,_AMapByBSTFilter_4,__AMapByBSTFilter_4);}

