

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ _AHeapConv_13(OBJ,OBJ);extern OBJ __AHeapConv_13;
extern OBJ _ATreeZip_4(OBJ,OBJ,OBJ);extern OBJ __ATreeZip_4;
extern TUP2 _ATreeZip_5(OBJ,OBJ);extern OBJ __ATreeZip_5;

#include "Char.h"
extern OBJ _AHeapZip_7(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AHeapZip_7; /* zip */
extern TUP2 _AHeapZip_8(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AHeapZip_8; /* unzip */

extern OBJ _AHeapZip_7(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5,OBJ x6) /* zip */
{OBJ r;
 FRCLS(x1,1);
 FRCLS(x2,1);
 {OBJ x7;
  x7=_ATreeZip_4(x4,x5,x6);
  r=_AHeapConv_13(x3,x7);}
 return r;}

extern TUP2 _AHeapZip_8(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* unzip */
{TUP2 r;
 FRCLS(x3,1);
 {TUP2 x7;
  x7=_ATreeZip_5(x4,x5);
  r.c1=_AHeapConv_13(x1,x7.c1);
  r.c2=_AHeapConv_13(x2,x7.c2);}
 return r;}
extern OBJ _AHeapZip_8_c(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* unzip */
{OBJ r;
 {TUP2 t=_AHeapZip_8(x1,x2,x3,x4,x5);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

static OBJ _mt_5_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_5_3_2(OBJ t,OBJ t1,OBJ t2) 
{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,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1,t2);
 return r;}

static OBJ _mt_6_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_6_3_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{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,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1,t2,t3);
 return r;}

init_AHeapZip()
{
 static int visited=0; if(visited) return; visited=1;
 init_AHeap();
 init_ANat();
 init_AOption();
 init_ASeq();
 init_ATree();
 init_AHeapConv();
 init_ATreeZip();
 init_AString();
 init_AChar();
 init_ARelCmp();
 init_ATreeConv();
 CLS(5,_AHeapZip_8_c,__AHeapZip_8);
 CLS(6,_AHeapZip_7,__AHeapZip_7);
 MTH(5,0,3,_mt_5_0_3);LZYMTH(5,0,3,_mt_5_0_3);
 MTH(5,3,2,_mt_5_3_2);LZYMTH(5,3,2,_mt_5_3_2);
 MTH(6,0,3,_mt_6_0_3);LZYMTH(6,0,3,_mt_6_0_3);
 MTH(6,3,3,_mt_6_3_3);LZYMTH(6,3,3,_mt_6_3_3);}

