

#include "BUILTIN.h"
extern OBJ __ASeq_6;
extern OBJ _ASeq_26(OBJ,OBJ);extern OBJ __ASeq_26;
extern OBJ _ACom_47(OBJ,OBJ);extern OBJ __ACom_47;

#include "Nat.h"
extern TUP2 _ASeqMapEnv_4(OBJ,OBJ,OBJ);extern OBJ __ASeqMapEnv_4;
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _AComCompose_3(OBJ,OBJ);extern OBJ __AComCompose_3;
extern TUP2 _AMySeqFun3_4(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_4; /* \* */
extern TUP2 _AMySeqFun3_5(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_5; /* \*,1 */
extern OBJ _AMySeqFun3_6(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_6; /* \*,2 */
extern TUP2 _AMySeqFun3_7(OBJ,OBJ,OBJ,OBJ);OBJ __AMySeqFun3_7; /* / */
extern OBJ _AMySeqFun3_8(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_8; /* combine */
extern OBJ _AMySeqFun3_9(OBJ,OBJ);OBJ __AMySeqFun3_9; /* \*,2'9 */
extern OBJ _AMySeqFun3_10(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_10; /* \*,2'10 */
extern OBJ _AMySeqFun3_11(OBJ,OBJ,OBJ);OBJ __AMySeqFun3_11; /* combine'11 */

extern TUP2 _AMySeqFun3_4(OBJ x1,OBJ x2,OBJ x3) /* \* */
{TUP2 r;
 r=_ASeqMapEnv_4(x1,x2,x3);
 return r;}
extern OBJ _AMySeqFun3_4_c(OBJ x1,OBJ x2,OBJ x3) /* \* */
{OBJ r;
 {TUP2 t=_AMySeqFun3_4(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern TUP2 _AMySeqFun3_5(OBJ x1,OBJ x2,OBJ x3) /* \*,1 */
{TUP2 r;
 r=_ASeqMapEnv_4(x1,x2,x3);
 return r;}
extern OBJ _AMySeqFun3_5_c(OBJ x1,OBJ x2,OBJ x3) /* \*,1 */
{OBJ r;
 {TUP2 t=_AMySeqFun3_5(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AMySeqFun3_6(OBJ x1,OBJ x2,OBJ x3) /* \*,2 */
{OBJ r;
 if(ISPRM(x3)){
  FRCLS(x1,1);
  CPCLS(__ACom_47,1);
  {OBJ x18;OBJ x19;OBJ x20;
   PRD1(2,x18);FLD1(x18,1)=x2;FLD1(x18,2)=__ASeq_6;
   PRD(1,0,x19);FLD(x19,1)=x18;
   x20=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x19);
   PRD(2,0,r);FLD(r,1)=x20;FLD(r,2)=__ASeq_6;}
 }else{
  {OBJ x21=FLD1(x3,1);
   COPY(x21,1);
   CPCLS(x1,1);
   CPCLS(__AMySeqFun3_10,1);
   {OBJ x23;OBJ x24;
    x23=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x21);
    x24=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AMySeqFun3_10,2))(__AMySeqFun3_10,x1,x3);
    r=_AComCompose_3(x23,x24);}}}
 return r;}

extern TUP2 _AMySeqFun3_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{TUP2 r;
 if(ISPRM(x4)){
  FRCLS(x1,1);
  r.c1=x2;r.c2=x3;
 }else{
  {OBJ x25=FLD1(x4,1);OBJ x26=FLD1(x4,2);
   if(EXPRD(x4,1)){
    DSPRDF(x4);
   }else{
    COPY(x25,1);COPY(x26,1);
    FRPRD(x4,1);}
   CPCLS(x1,1);
   {TUP2 x29;
    x29=_AMySeqFun3_7(x1,x2,x3,x26);
    {OBJ t=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(x1,3))(x1,x29.c1,x25,x29.c2);
     r.c1=FLD1(t,1);
     r.c2=FLD1(t,2);
     DSPRDF(t);}}}}
 return r;}
extern OBJ _AMySeqFun3_7_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* / */
{OBJ r;
 {TUP2 t=_AMySeqFun3_7(x1,x2,x3,x4);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AMySeqFun3_8(OBJ x1,OBJ x2,OBJ x3) /* combine */
{OBJ r;
 if(ISPRM(x2)){
  FRCLS(x1,1);
  FREE(x3,1);
  r=__ASeq_6;
 }else{
  {OBJ x24=FLD1(x2,1);OBJ x25=FLD1(x2,2);
   if(EXPRD(x2,1)){
    DSPRDF(x2);
   }else{
    COPY(x24,1);COPY(x25,1);
    FRPRD(x2,1);}
   CPCLS(x1,1);
   COPY(x3,1);
   CPCLS(__AMySeqFun3_11,1);
   {OBJ x27;OBJ x28;OBJ x29;
    x27=_AMySeqFun3_8(x1,x25,x3);
    x28=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AMySeqFun3_11,2))(__AMySeqFun3_11,x1,x24);
    x29=_ASeqMap_3(x28,x3);
    r=_ASeq_26(x27,x29);}}}
 return r;}

extern OBJ _AMySeqFun3_9(OBJ x1,OBJ x2) /* \*,2'9 */
{OBJ r;
 {OBJ x6;
  if(ISTGPRD(x2,0)){
   {OBJ x3=FLD(x2,1);
    if(EXPRD(x2,1)){
     x6=x3;
     DSPRDF(x2);
    }else{
     CPPRD(x3,1);
     x6=x3;
     FRPRD(x2,1);}}
  }else{
   HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
  {OBJ x17=FLD1(x6,1);OBJ x18;FLAG x_x6=EXPRD(x6,1);
   if(x_x6){
   }else{
    x18=FLD1(x6,2);COPY(x17,1);COPY(x18,1);}
   CPCLS(__ACom_47,1);
   {OBJ x19;OBJ x20;OBJ x21;OBJ x22;
    if(x_x6){
     RSOME(x6,x19);FLD1(x19,1)=x1;
    }else{
     FRPRD(x6,1);PRD1(2,x19);FLD1(x19,1)=x1;FLD1(x19,2)=x18;}
    PRD1(2,x20);FLD1(x20,1)=x17;FLD1(x20,2)=x19;
    PRD(1,0,x21);FLD(x21,1)=x20;
    x22=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x21);
    PRD(2,0,r);FLD(r,1)=x22;FLD(r,2)=__ASeq_6;}}}
 return r;}

extern OBJ _AMySeqFun3_10(OBJ x1,OBJ x2,OBJ x3) /* \*,2'10 */
{OBJ r;
 {OBJ x10;OBJ x6;
  if(ISTGPRD(x3,0)){
   {OBJ x7=FLD(x3,1);
    if(EXPRD(x3,1)){
     x10=x7;
     DSPRDF(x3);
    }else{
     CPPRD(x7,1);
     x10=x7;
     FRPRD(x3,1);}}
  }else{
   HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
  if(ISPRM(x2)){
   HLT("Seq at <unknown> : undefined selection rt\'Seq:seq->seq");
  }else{
   {OBJ x5=FLD1(x2,2);
    if(EXPRD(x2,1)){
     x6=x5;
     FREE(FLD1(x2,1),1);DSPRDF(x2);
    }else{
     COPY(x5,1);
     x6=x5;
     FRPRD(x2,1);}}}
  {OBJ x19=FLD1(x10,1);OBJ x20=FLD1(x10,2);
   if(EXPRD(x10,1)){
    DSPRDF(x10);
   }else{
    COPY(x19,1);COPY(x20,1);
    FRPRD(x10,1);}
   CPCLS(__AMySeqFun3_9,1);
   {OBJ x21;OBJ x22;
    x21=_AMySeqFun3_6(x1,x19,x6);
    x22=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMySeqFun3_9,1))(__AMySeqFun3_9,x20);
    r=_AComCompose_3(x21,x22);}}}
 return r;}

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

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

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

init_AMySeqFun3()
{
 static int visited=0; if(visited) return; visited=1;
 init_ASeq();
 init_APair();
 init_ACom();
 init_ANat();
 init_AVoid();
 init_AOption();
 init_ASeqMapEnv();
 init_ASeqMap();
 init_AComCompose();
 CLS(3,_AMySeqFun3_11,__AMySeqFun3_11);
 CLS(3,_AMySeqFun3_10,__AMySeqFun3_10);
 CLS(2,_AMySeqFun3_9,__AMySeqFun3_9);
 CLS(3,_AMySeqFun3_8,__AMySeqFun3_8);
 CLS(4,_AMySeqFun3_7_c,__AMySeqFun3_7);
 CLS(3,_AMySeqFun3_6,__AMySeqFun3_6);
 CLS(3,_AMySeqFun3_5_c,__AMySeqFun3_5);
 CLS(3,_AMySeqFun3_4_c,__AMySeqFun3_4);
 MTH(4,0,3,_mt_4_0_3);LZYMTH(4,0,3,_mt_4_0_3);
 MTH(4,3,1,_mt_4_3_1);LZYMTH(4,3,1,_mt_4_3_1_l);}

