

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _ASeqFilter_2(OBJ,OBJ);extern OBJ __ASeqFilter_2;
extern TUP2 _ASeqFilter_5(OBJ,OBJ);extern OBJ __ASeqFilter_5;
extern OBJ _ABagFilter_3(OBJ,OBJ,OBJ);OBJ __ABagFilter_3; /* | */
extern TUP2 _ABagFilter_4(OBJ,OBJ,OBJ);OBJ __ABagFilter_4; /* partition */
extern OBJ _ABagFilter_5(OBJ,OBJ);OBJ __ABagFilter_5; /* |'5 */
extern OBJ _ABagFilter_6(OBJ,OBJ);OBJ __ABagFilter_6; /* partition'6 */

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

extern TUP2 _ABagFilter_4(OBJ x1,OBJ x2,OBJ x3) /* partition */
{TUP2 r;
 CPCLS(__ABagFilter_6,1);
 FRCLS(x1,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__ABagFilter_6,1))(__ABagFilter_6,x2);
  r=_ASeqFilter_5(x4,x3);}
 return r;}
extern OBJ _ABagFilter_4_c(OBJ x1,OBJ x2,OBJ x3) /* partition */
{OBJ r;
 {TUP2 t=_ABagFilter_4(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _ABagFilter_5(OBJ x1,OBJ x2) /* |'5 */
{OBJ r;
 {OBJ x3=FLD1(x2,1);
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   COPY(x3,1);
   FRPRD(x2,1);}
  {OBJ x5;
   x5=x3;
   r=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x5);}}
 return r;}

extern OBJ _ABagFilter_6(OBJ x1,OBJ x2) /* partition'6 */
{OBJ r;
 {OBJ x3=FLD1(x2,1);
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   COPY(x3,1);
   FRPRD(x2,1);}
  {OBJ x5;
   x5=x3;
   r=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x5);}}
 return r;}

init_ABagFilter()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABag();
 init_ANat();
 init_APair();
 init_AOption();
 init_ASeq();
 init_ASeqFilter();
 CLS(2,_ABagFilter_6,__ABagFilter_6);
 CLS(2,_ABagFilter_5,__ABagFilter_5);
 CLS(3,_ABagFilter_4_c,__ABagFilter_4);
 CLS(3,_ABagFilter_3,__ABagFilter_3);}

