

#include "BUILTIN.h"

#include "Nat.h"
extern TUP2 _APair_8(OBJ);extern OBJ __APair_8;
extern OBJ _ASeqFilter_2(OBJ,OBJ);extern OBJ __ASeqFilter_2;
extern OBJ _AMapByOSFilter_4(OBJ,OBJ,OBJ);OBJ __AMapByOSFilter_4; /* | */
extern TUP2 _AMapByOSFilter_5(OBJ,OBJ,OBJ);OBJ __AMapByOSFilter_5; /* partition */
extern OBJ _AMapByOSFilter_6(OBJ,OBJ);OBJ __AMapByOSFilter_6; /* |'6 */
extern OBJ _AMapByOSFilter_7(OBJ,OBJ);OBJ __AMapByOSFilter_7; /* partition'7 */
extern OBJ _AMapByOSFilter_8(OBJ,OBJ);OBJ __AMapByOSFilter_8; /* partition'8 */

extern OBJ _AMapByOSFilter_4(OBJ x1,OBJ x2,OBJ x3) /* | */
{OBJ r;
 CPCLS(__AMapByOSFilter_6,1);
 FRCLS(x1,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOSFilter_6,1))(__AMapByOSFilter_6,x2);
  r=_ASeqFilter_2(x4,x3);}
 return r;}

extern TUP2 _AMapByOSFilter_5(OBJ x1,OBJ x2,OBJ x3) /* partition */
{TUP2 r;
 CPCLS(__AMapByOSFilter_7,1);
 CPCLS(__AMapByOSFilter_8,1);
 FRCLS(x1,1);
 CPCLS(x2,1);
 COPY(x3,1);
 {OBJ x4;OBJ x6;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOSFilter_7,1))(__AMapByOSFilter_7,x2);
  r.c1=_ASeqFilter_2(x4,x3);
  x6=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOSFilter_8,1))(__AMapByOSFilter_8,x2);
  r.c2=_ASeqFilter_2(x6,x3);}
 return r;}
extern OBJ _AMapByOSFilter_5_c(OBJ x1,OBJ x2,OBJ x3) /* partition */
{OBJ r;
 {TUP2 t=_AMapByOSFilter_5(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AMapByOSFilter_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 _AMapByOSFilter_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 _AMapByOSFilter_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_AMapByOSFilter()
{
 static int visited=0; if(visited) return; visited=1;
 init_AMapByOS();
 init_ANat();
 init_AOption();
 init_ASet();
 init_ASeq();
 init_APair();
 init_ASetFilter();
 init_ASeqMap();
 init_ASeqFilter();
 CLS(2,_AMapByOSFilter_8,__AMapByOSFilter_8);
 CLS(2,_AMapByOSFilter_7,__AMapByOSFilter_7);
 CLS(2,_AMapByOSFilter_6,__AMapByOSFilter_6);
 CLS(3,_AMapByOSFilter_5_c,__AMapByOSFilter_5);
 CLS(3,_AMapByOSFilter_4,__AMapByOSFilter_4);}

