

#include "BUILTIN.h"

#include "Nat.h"
extern TUP2 _APair_8(OBJ);extern OBJ __APair_8;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;
extern OBJ _AMapByOSReduce_5(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_5; /* / */
extern OBJ _AMapByOSReduce_6(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_6; /* /,1 */
extern OBJ _AMapByOSReduce_7(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_7; /* /,2 */
extern OBJ _AMapByOSReduce_8(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_8; /* /,3 */
extern OBJ _AMapByOSReduce_9(OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_9; /* /'9 */
extern OBJ _AMapByOSReduce_10(OBJ,OBJ,OBJ);OBJ __AMapByOSReduce_10; /* /,1'10 */

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

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

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

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

extern OBJ _AMapByOSReduce_9(OBJ x1,OBJ x2,OBJ x3) /* /'9 */
{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 _AMapByOSReduce_10(OBJ x1,OBJ x2,OBJ x3) /* /,1'10 */
{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_AMapByOSReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_AMapByOS();
 init_ANat();
 init_AOption();
 init_ASet();
 init_ASeq();
 init_APair();
 init_ASetReduce();
 init_ASeqMap();
 init_ASeqReduce();
 CLS(3,_AMapByOSReduce_10,__AMapByOSReduce_10);
 CLS(3,_AMapByOSReduce_9,__AMapByOSReduce_9);
 CLS(4,_AMapByOSReduce_8,__AMapByOSReduce_8);
 CLS(4,_AMapByOSReduce_7,__AMapByOSReduce_7);
 CLS(4,_AMapByOSReduce_6,__AMapByOSReduce_6);
 CLS(4,_AMapByOSReduce_5,__AMapByOSReduce_5);}

