

#include "BUILTIN.h"

#include "Array.h"

#include "Nat.h"

#include "ArrayReduce.h"

#define __AArrayReduce_Ss_L11 __AArrayReduce_11
#define _AArrayReduce_Ss_L11 _AArrayReduce_11
#define AArrayReduce_11 AArrayReduce_Ss_L11
extern OBJ __AArrayReduce_Ss_L11;
extern OBJ _AArrayReduce_Ss_L11(OBJ,OBJ,OBJ,OBJ);

#define __AArrayReduce_Sb_L12 __AArrayReduce_12
#define _AArrayReduce_Sb_L12 _AArrayReduce_12
#define AArrayReduce_12 AArrayReduce_Sb_L12
extern OBJ __AArrayReduce_Sb_L12;
extern OBJ _AArrayReduce_Sb_L12(OBJ,OBJ,OBJ,OBJ);
extern OBJ _AArrayReduce_Ss(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Ss; /* / */
extern OBJ _AArrayReduce_Sb(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Sb; /* \ */
extern OBJ _AArrayReduce_Ss_O1(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Ss_O1; /* /,1 */
extern OBJ _AArrayReduce_Sb_O1(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Sb_O1; /* \,1 */
extern OBJ _AArrayReduce_Ss_O2(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Ss_O2; /* /,2 */
extern OBJ _AArrayReduce_Sb_O2(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Sb_O2; /* \,2 */
extern OBJ _AArrayReduce_Ss_O3(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Ss_O3; /* /,3 */
extern OBJ _AArrayReduce_Sb_O3(OBJ,OBJ,OBJ);OBJ __AArrayReduce_Sb_O3; /* \,3 */
extern OBJ _AArrayReduce_Ss_L11(OBJ,OBJ,OBJ,OBJ);OBJ __AArrayReduce_Ss_L11; /* /'11 */
extern OBJ _AArrayReduce_Sb_L12(OBJ,OBJ,OBJ,OBJ);OBJ __AArrayReduce_Sb_L12; /* \'12 */

#include "ArrayReduce.hc.c"

extern OBJ _AArrayReduce_Ss(OBJ x1,OBJ x2,OBJ x3) /* / */
{OBJ r;
 CPCLS(__AArrayReduce_Ss_L11,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AArrayReduce_Ss_L11,1))(__AArrayReduce_Ss_L11,x1);
  AArrayReduce_Ss_O1(x4,x2,x3,r);}
 return r;}

extern OBJ _AArrayReduce_Sb(OBJ x1,OBJ x2,OBJ x3) /* \ */
{OBJ r;
 CPCLS(__AArrayReduce_Sb_L12,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AArrayReduce_Sb_L12,1))(__AArrayReduce_Sb_L12,x1);
  AArrayReduce_Sb_O1(x4,x2,x3,r);}
 return r;}

extern OBJ _AArrayReduce_Ss_O2(OBJ x1,OBJ x2,OBJ x3) /* /,2 */
{OBJ r;
 CPCLS(__AArrayReduce_Ss_L11,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AArrayReduce_Ss_L11,1))(__AArrayReduce_Ss_L11,x1);
  AArrayReduce_Ss_O1(x4,x2,x3,r);}
 return r;}

extern OBJ _AArrayReduce_Sb_O2(OBJ x1,OBJ x2,OBJ x3) /* \,2 */
{OBJ r;
 CPCLS(__AArrayReduce_Sb_L12,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AArrayReduce_Sb_L12,1))(__AArrayReduce_Sb_L12,x1);
  AArrayReduce_Sb_O1(x4,x2,x3,r);}
 return r;}

extern OBJ _AArrayReduce_Ss_O3(OBJ x1,OBJ x2,OBJ x3) /* /,3 */
{OBJ r;
 AArrayReduce_Ss_O1(x1,x2,x3,r);
 return r;}

extern OBJ _AArrayReduce_Sb_O3(OBJ x1,OBJ x2,OBJ x3) /* \,3 */
{OBJ r;
 AArrayReduce_Sb_O1(x1,x2,x3,r);
 return r;}

extern OBJ _AArrayReduce_Ss_L11(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* /'11 */
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x3,x4);
 return r;}

extern OBJ _AArrayReduce_Sb_L12(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* \'12 */
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x3,x4);
 return r;}

static OBJ _mt_3_0_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,2);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 return r;}

static OBJ _mt_3_2_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),t1);
 return r;}
static OBJ _mt_3_2_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

static OBJ _mt_4_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,1);
 FLDCLS(r,1)=t1;
 return r;}

static OBJ _mt_4_0_4(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(t1,t2,t3,t4);
 return r;}

static OBJ _mt_4_1_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),t1,t2,t3);
 return r;}

init_AArrayReduce()
{
 static int visited=0; if(visited) return; visited=1;
 init_AArray();
 init_ANat();
 CLS(4,_AArrayReduce_12,__AArrayReduce_12);
 CLS(4,_AArrayReduce_11,__AArrayReduce_11);
 CLS(3,_AArrayReduce_10,__AArrayReduce_10);
 CLS(3,_AArrayReduce_9,__AArrayReduce_9);
 CLS(3,_AArrayReduce_8,__AArrayReduce_8);
 CLS(3,_AArrayReduce_7,__AArrayReduce_7);
 CLS(3,_AArrayReduce_6,__AArrayReduce_6);
 CLS(3,_AArrayReduce_5,__AArrayReduce_5);
 CLS(3,_AArrayReduce_4,__AArrayReduce_4);
 CLS(3,_AArrayReduce_3,__AArrayReduce_3);
 MTH(3,0,2,_mt_3_0_2);LZYMTH(3,0,2,_mt_3_0_2);
 MTH(3,2,1,_mt_3_2_1);LZYMTH(3,2,1,_mt_3_2_1_l);
 MTH(4,0,1,_mt_4_0_1);LZYMTH(4,0,1,_mt_4_0_1);
 MTH(4,0,4,_mt_4_0_4);LZYMTH(4,0,4,_mt_4_0_4);
 MTH(4,1,3,_mt_4_1_3);LZYMTH(4,1,3,_mt_4_1_3);
 init_const_AArrayReduce();}

