

#include "BUILTIN.h"

#include "Nat.h"
extern TUP2 _APair_8(OBJ);extern OBJ __APair_8;
extern OBJ _AMapNotForUserPurpose_4(OBJ,OBJ,OBJ);extern OBJ __AMapNotForUserPurpose_4;
extern OBJ _ACAST_3(OBJ);extern OBJ __ACAST_3;
extern OBJ _ABSTreeReduce_5(OBJ,OBJ,OBJ,OBJ);extern OBJ __ABSTreeReduce_5;
extern OBJ _AMapReduce_5(OBJ,OBJ,OBJ,OBJ);OBJ __AMapReduce_5; /* / */
extern OBJ _AMapReduce_6(OBJ,OBJ,OBJ,OBJ);OBJ __AMapReduce_6; /* /,1 */
extern OBJ _AMapReduce_7(OBJ,OBJ,OBJ,OBJ);OBJ __AMapReduce_7; /* /,2 */
extern OBJ _AMapReduce_8(OBJ,OBJ,OBJ,OBJ);OBJ __AMapReduce_8; /* /,3 */
extern OBJ _AMapReduce_9(OBJ,OBJ,OBJ);OBJ __AMapReduce_9; /* /'9 */
extern OBJ _AMapReduce_10(OBJ,OBJ,OBJ);OBJ __AMapReduce_10; /* /,1'10 */

extern OBJ _AMapReduce_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{OBJ r;
 CPCLS(__AMapReduce_9,1);
 CPCLS(__AMapNotForUserPurpose_4,1);
 {OBJ x5;OBJ x6;OBJ x7;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapNotForUserPurpose_4,1))(__AMapNotForUserPurpose_4,x1);
  x6=_ACAST_3(x4);
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapReduce_9,1))(__AMapReduce_9,x2);
  r=_ABSTreeReduce_5(x5,x7,x3,x6);}
 return r;}

extern OBJ _AMapReduce_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,1 */
{OBJ r;
 CPCLS(__AMapReduce_10,1);
 CPCLS(__AMapNotForUserPurpose_4,1);
 {OBJ x5;OBJ x6;OBJ x7;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapNotForUserPurpose_4,1))(__AMapNotForUserPurpose_4,x1);
  x6=_ACAST_3(x4);
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapReduce_10,1))(__AMapReduce_10,x2);
  r=_ABSTreeReduce_5(x5,x7,x3,x6);}
 return r;}

extern OBJ _AMapReduce_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,2 */
{OBJ r;
 r=_AMapReduce_5(x1,x2,x3,x4);
 return r;}

extern OBJ _AMapReduce_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /,3 */
{OBJ r;
 r=_AMapReduce_6(x1,x2,x3,x4);
 return r;}

extern OBJ _AMapReduce_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 _AMapReduce_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_AMapReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_AMap();
 init_ANat();
 init_AOption();
 init_ASet();
 init_ASeq();
 init_APair();
 init_AMapNotForUserPurpose();
 init_ASetByBST();
 init_ASetByBSTReduce();
 init_ABSTree();
 init_ATree();
 init_ACAST();
 init_ABSTreeReduce();
 CLS(3,_AMapReduce_10,__AMapReduce_10);
 CLS(3,_AMapReduce_9,__AMapReduce_9);
 CLS(4,_AMapReduce_8,__AMapReduce_8);
 CLS(4,_AMapReduce_7,__AMapReduce_7);
 CLS(4,_AMapReduce_6,__AMapReduce_6);
 CLS(4,_AMapReduce_5,__AMapReduce_5);}

