

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _ABagConv_13(OBJ,OBJ);extern OBJ __ABagConv_13;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;

#include "Char.h"
extern OBJ _ABagReduce_4(OBJ,OBJ,OBJ,OBJ);OBJ __ABagReduce_4; /* / */
extern OBJ _ABagReduce_5(OBJ,OBJ,OBJ,OBJ);OBJ __ABagReduce_5; /* /,1 */
extern OBJ _ABagReduce_6(OBJ,OBJ,OBJ,OBJ);OBJ __ABagReduce_6; /* /,2 */
extern OBJ _ABagReduce_7(OBJ,OBJ,OBJ,OBJ);OBJ __ABagReduce_7; /* /,3 */
extern OBJ _ABagReduce_8(OBJ,OBJ,OBJ);OBJ __ABagReduce_8; /* /,3'8 */

extern OBJ _ABagReduce_4(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{OBJ r;
 {OBJ x5;
  x5=_ABagConv_13(x1,x4);
  r=_ASeqReduce_3(x2,x3,x5);}
 return r;}

extern OBJ _ABagReduce_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,1 */
{OBJ r;
 CPCLS(__ABagReduce_8,1);
 FRCLS(x1,1);
 {OBJ x5;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__ABagReduce_8,1))(__ABagReduce_8,x2);
  r=_ASeqReduce_3(x5,x3,x4);}
 return r;}

extern OBJ _ABagReduce_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,2 */
{OBJ r;
 {OBJ x5;
  x5=_ABagConv_13(x1,x4);
  r=_ASeqReduce_3(x2,x3,x5);}
 return r;}

extern OBJ _ABagReduce_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,3 */
{OBJ r;
 CPCLS(__ABagReduce_8,1);
 FRCLS(x1,1);
 {OBJ x5;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__ABagReduce_8,1))(__ABagReduce_8,x2);
  r=_ASeqReduce_3(x5,x3,x4);}
 return r;}

extern OBJ _ABagReduce_8(OBJ x1,OBJ x2,OBJ x3) /* /,3'8 */
{OBJ r;
 {OBJ x10=FLD1(x2,1);OBJ x11=FLD1(x2,2);
  if(EXPRD(x2,1)){
   DSPRDF(x2);
  }else{
   COPY(x10,1);
   FRPRD(x2,1);}
  r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x10,x11,x3);}
 return r;}

init_ABagReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABag();
 init_ANat();
 init_APair();
 init_AOption();
 init_ASeq();
 init_ABagConv();
 init_ASeqReduce();
 init_AString();
 init_AChar();
 CLS(3,_ABagReduce_8,__ABagReduce_8);
 CLS(4,_ABagReduce_7,__ABagReduce_7);
 CLS(4,_ABagReduce_6,__ABagReduce_6);
 CLS(4,_ABagReduce_5,__ABagReduce_5);
 CLS(4,_ABagReduce_4,__ABagReduce_4);}

