

#include "BUILTIN.h"
extern OBJ _AString_49(OBJ);extern OBJ __AString_49;
extern OBJ _ACom_47(OBJ,OBJ);extern OBJ __ACom_47;

#include "Nat.h"
extern OBJ _AOcOptions_14(OBJ,OBJ);extern OBJ __AOcOptions_14;
extern OBJ _AOcOptions_15(OBJ);extern OBJ __AOcOptions_15;

#include "Char.h"
extern OBJ __ASeq_6;
extern OBJ _AStream_16(OBJ);extern OBJ __AStream_16;
extern OBJ _AFile_14(OBJ);extern OBJ __AFile_14;
extern OBJ _AFile_27(OBJ,OBJ);extern OBJ __AFile_27;

#include "Int.h"

#include "Denotation.h"
extern OBJ _AComCompose_5(OBJ,OBJ);extern OBJ __AComCompose_5;
extern OBJ _AComCompose_6(OBJ,OBJ);extern OBJ __AComCompose_6;

#include "Bitset.h"

#include "Array.h"
extern OBJ _ADumpToFile_2(OBJ,OBJ,OBJ,OBJ);OBJ __ADumpToFile_2; /* dumpToFile */
extern OBJ _ADumpToFile_3(OBJ,OBJ,OBJ,OBJ);OBJ __ADumpToFile_3; /* dumpToFile,1 */
OBJ __ADumpToFile_4; /* dumpToFile'4 */
OBJ __ADumpToFile_5; /* dumpToFile'5 */
OBJ __ADumpToFile_6; /* dumpToFile'6 */
extern OBJ _ADumpToFile_7(OBJ);OBJ __ADumpToFile_7; /* dumpToFile'7 */
extern OBJ _ADumpToFile_8(OBJ,OBJ);OBJ __ADumpToFile_8; /* dumpToFile'8 */

extern OBJ _ADumpToFile_2(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* dumpToFile */
{OBJ r;
 CPPRD(__ADumpToFile_4,1);
 CPCLS(__ACom_47,1);
 CPPRD(x2,1);
 CPPRD(x4,1);
 {OBJ x5;OBJ x10;
  ADenotation_4(__ADumpToFile_4,x2,x5);
  x10=(*(OBJ(*)(OBJ,OBJ))METHOD(__ACom_47,1))(__ACom_47,x4);
  {OBJ x6=FLD1(x1,1);
   if(EXPRD(x1,1)){
    FLD1(x1,1)=NIL;DSPRD(x1);
   }else{
    CPPRD(x6,1);
    FRPRD(x1,1);}
   {OBJ x9;OBJ x11;OBJ x12;
    x9=x6;
    CPPRD(x9,1);
    x11=_AOcOptions_14(x5,x9);
    PRD(2,0,x12);FLD(x12,1)=x10;FLD(x12,2)=__ASeq_6;
    if(ISTGPRM(x11,1)){
     {OBJ x16;OBJ x13;OBJ x17;OBJ x23;OBJ x18;OBJ x24;OBJ x25;OBJ x26;
      if(ISTGPRD(x4,0)){
       CPPRD(__ADumpToFile_5,1);
       x16=__ABUILTIN_5;
      }else{
       CPPRD(__ADumpToFile_5,1);
       x16=__ABUILTIN_3;}
      ADenotation_4(__ADumpToFile_5,x2,x13);
      x17=_AOcOptions_15(x9);
      if(ISTGPRM(x16,1)){
       {OBJ x22;
	if(ISTGPRD(x4,0)){
	 {OBJ x19=FLD(x4,1);
	  if(EXPRD(x4,1)){
	   x22=x19;
	   DSPRDF(x4);
	  }else{
	   COPY(x19,1);
	   x22=x19;
	   FRPRD(x4,1);}
	  CPCLS(__ADumpToFile_8,1);}
	}else{
	 HLT("Com at <unknown> : undefined selection data\'Com:ans->data");}
	x23=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x22);}
      }else{
       FRCLS(x3,1);
       FRPRD(x4,1);
       CPCLS(__ADumpToFile_7,1);
       CPCLS(__ADumpToFile_8,1);
       x23=(*(OBJ(*)(OBJ,OBJ))METHOD(__ADumpToFile_7,1))(__ADumpToFile_7,__ABUILTIN_20);}
      ADenotation_4(x17,x13,x18);
      x24=_AStream_16(x18);
      x25=(*(OBJ(*)(OBJ,OBJ))METHOD(__ADumpToFile_8,1))(__ADumpToFile_8,x23);
      x26=_AComCompose_5(x24,x25);
      r=_AComCompose_6(x26,x12);}
    }else{
     r=x12;
     FRPRD(x2,1);
     FRCLS(x3,1);
     FRPRD(x4,1);
     FRPRD(x9,1);}}}}
 return r;}

extern OBJ _ADumpToFile_3(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* dumpToFile,1 */
{OBJ r;
 {OBJ x5;
  PRD(1,0,x5);FLD(x5,1)=x4;
  r=_ADumpToFile_2(x1,x2,x3,x5);}
 return r;}

extern OBJ _ADumpToFile_7(OBJ x1) /* dumpToFile'7 */
{OBJ r;
 CPPRD(__ADumpToFile_6,1);
 r=_AString_49(__ADumpToFile_6);
 return r;}

extern OBJ _ADumpToFile_8(OBJ x1,OBJ x2) /* dumpToFile'8 */
{OBJ r;
 {OBJ x3;OBJ x4;
  x3=_AFile_14(x2);
  x4=_AFile_27(x2,x1);
  r=_AComCompose_6(x4,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_ADumpToFile()
{
 static int visited=0; if(visited) return; visited=1;
 init_AString();
 init_ACom();
 init_APreparedOptions();
 init_ANat();
 init_AOcOptions();
 init_AChar();
 init_ASeq();
 init_AStream();
 init_AVoid();
 init_AFile();
 init_AInt();
 init_AOption();
 init_ADenotation();
 init_AComCompose();
 init_ASeqMap();
 init_ANatMap();
 init_ASet();
 init_APair();
 init_ATree();
 init_ABitset();
 init_AMap();
 init_ASetByBST();
 init_ABSTree();
 init_AArray();
 init_AMapReduce();
 init_ASeqReduce();
 CLS(2,_ADumpToFile_8,__ADumpToFile_8);
 LCLS(1,_ADumpToFile_7,__ADumpToFile_7);
 DEN("previous command wasn\'t okay!",__ADumpToFile_6);
 DEN(".",__ADumpToFile_5);
 DEN("dump",__ADumpToFile_4);
 CLS(4,_ADumpToFile_3,__ADumpToFile_3);
 CLS(4,_ADumpToFile_2,__ADumpToFile_2);
 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);}

