

#include "BUILTIN.h"
extern OBJ _AIde_18(OBJ);extern OBJ __AIde_18;
extern OBJ __ASourceAn_57;
extern OBJ _AFormat_5(OBJ,OBJ);extern OBJ __AFormat_5;
extern OBJ _AFormat_10(OBJ,OBJ);extern OBJ __AFormat_10;

#include "Nat.h"
extern OBJ _ASeq_15(OBJ,OBJ,OBJ);extern OBJ __ASeq_15;
extern OBJ _ASeq_19(OBJ,OBJ,OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __ASeq_19;
extern OBJ _AFmt_28(OBJ);extern OBJ __AFmt_28;

#include "Char.h"

#include "Int.h"

#include "Denotation.h"

#include "NatConv.h"

#include "Real.h"
extern OBJ _ASourceAnFun_1(OBJ,OBJ);OBJ __ASourceAnFun_1; /* symbol */
extern OBJ _ASourceAnFun_2(OBJ);OBJ __ASourceAnFun_2; /* format */
extern OBJ _ASourceAnFun_3(OBJ);OBJ __ASourceAnFun_3; /* ` */
OBJ __ASourceAnFun_4; /* `'4 */
OBJ __ASourceAnFun_5; /* format'5 */
extern OBJ _ASourceAnFun_6(OBJ);OBJ __ASourceAnFun_6; /* format'6 */
OBJ __ASourceAnFun_7; /* format'7 */
extern OBJ _ASourceAnFun_8(OBJ);OBJ __ASourceAnFun_8; /* format'8 */
OBJ __ASourceAnFun_9; /* format'9 */
extern OBJ _ASourceAnFun_10(OBJ);OBJ __ASourceAnFun_10; /* format'10 */
OBJ __ASourceAnFun_11; /* format'11 */
OBJ __ASourceAnFun_12; /* format'12 */
OBJ __ASourceAnFun_13; /* format'13 */
OBJ __ASourceAnFun_14; /* format'14 */
extern OBJ _ASourceAnFun_15(OBJ);OBJ __ASourceAnFun_15; /* format'15 */
OBJ __ASourceAnFun_16; /* format'16 */
extern OBJ _ASourceAnFun_17(OBJ);OBJ __ASourceAnFun_17; /* format'17 */
OBJ __ASourceAnFun_18; /* format'18 */
extern OBJ _ASourceAnFun_19(OBJ);OBJ __ASourceAnFun_19; /* format'19 */

extern OBJ _ASourceAnFun_1(OBJ x1,OBJ x2) /* symbol */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,3))){
  {OBJ x7=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x7;
    DSPRDF(x1);
   }else{
    CPPRD(x7,1);
    r=x7;
    FRPRD(x1,1);}
   FRPRD(x2,1);}
 }else{
  FREE(x1,1);
  {OBJ x8;
   x8=_AIde_18(x2);
   r=_AFormat_10(x8,__ANat_59);}}
 return r;}

extern OBJ _ASourceAnFun_2(OBJ x1) /* format */
{OBJ r;
 if(ISPRM(x1)){
  CPCLS(__ASourceAnFun_19,1);
  r=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_19,1))(__ASourceAnFun_19,__ABUILTIN_20);
 }else{
  switch(TGPRD(x1)){
   case 2:
    {OBJ x113=FLD(x1,1);OBJ x114=FLD(x1,2);OBJ x115=FLD(x1,3);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      CPPRD(x114,1);
      FRPRD(x1,1);}
     CPCLS(__ASourceAnFun_6,1);
     CPCLS(__ASourceAnFun_8,1);
     CPCLS(__ASourceAnFun_10,1);
     {OBJ x116;OBJ x117;OBJ x118;OBJ x121;OBJ x119;OBJ x120;OBJ x122;OBJ x123;OBJ x124;OBJ x125;
      x116=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_6,1))(__ASourceAnFun_6,__ABUILTIN_20);
      x117=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_8,1))(__ASourceAnFun_8,__ABUILTIN_20);
      x118=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_10,1))(__ASourceAnFun_10,__ABUILTIN_20);
      if(ISTGPRM(x115,0)){
       x121=__ABUILTIN_5;
      }else{
       x121=__ABUILTIN_3;}
      x119=_AFmt_28(x114);
      x120=_ASourceAnFun_3(x113);
      x122=_AFmt_28(x120);
      if(ISTGPRM(x121,1)){
       COPY(x118,1);
       CPPRD(__ASourceAnFun_11,1);
       x123=__ASourceAnFun_11;
      }else{
       switch(TGPRM(x115)){
	case 2:
	 COPY(x118,1);
	 CPPRD(__ASourceAnFun_13,1);
	 x123=__ASourceAnFun_13;break;
	case 0:
	 HLT("SourceAnFun at <35,23-37,53> : missing else in format\'SourceAnFun:sourceAn->format");break;
	default: 
	 COPY(x118,1);
	 CPPRD(__ASourceAnFun_12,1);
	 x123=__ASourceAnFun_12;}}
      x124=_AFmt_28(x123);
      x125=_ASeq_19(x116,x122,x118,x119,x118,x124,x117);
      r=_AFormat_5(__ANat_9,x125);}}break;
   case 3:
    {OBJ x126=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      CPPRD(x126,1);
      FRPRD(x1,1);}
     CPCLS(__ASourceAnFun_6,1);
     CPCLS(__ASourceAnFun_8,1);
     {OBJ x127;OBJ x128;OBJ x129;OBJ x130;
      x127=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_8,1))(__ASourceAnFun_8,__ABUILTIN_20);
      x128=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_6,1))(__ASourceAnFun_6,__ABUILTIN_20);
      x129=_AFmt_28(x126);
      x130=_ASeq_15(x128,x129,x127);
      r=_AFormat_5(__ANat_9,x130);}}break;
   case 4:
    {OBJ x131=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      CPPRD(x131,1);
      FRPRD(x1,1);}
     CPCLS(__ASourceAnFun_15,1);
     CPCLS(__ASourceAnFun_17,1);
     {OBJ x132;OBJ x133;OBJ x134;OBJ x135;
      x132=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_15,1))(__ASourceAnFun_15,__ABUILTIN_20);
      x133=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_17,1))(__ASourceAnFun_17,__ABUILTIN_20);
      x134=_AFmt_28(x131);
      x135=_ASeq_15(x132,x134,x133);
      r=_AFormat_5(__ANat_9,x135);}}break;
   default: 
    {OBJ x107=FLD(x1,1);
     if(EXPRD(x1,1)){
      DSPRDF(x1);
     }else{
      FRPRD(x1,1);}
     CPCLS(__ASourceAnFun_6,1);
     CPCLS(__ASourceAnFun_8,1);
     {OBJ x108;OBJ x109;OBJ x110;OBJ x111;OBJ x112;
      x108=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_8,1))(__ASourceAnFun_8,__ABUILTIN_20);
      x109=(*(OBJ(*)(OBJ,OBJ))METHOD(__ASourceAnFun_6,1))(__ASourceAnFun_6,__ABUILTIN_20);
      x110=_ASourceAnFun_3(x107);
      x111=_AFmt_28(x110);
      x112=_ASeq_15(x109,x111,x108);
      r=_AFormat_5(__ANat_9,x112);}}}}
 return r;}

extern OBJ _ASourceAnFun_3(OBJ x1) /* ` */
{OBJ r;
 CPPRD(__ASourceAnFun_4,1);
 {OBJ x2;OBJ x3;OBJ x4;OBJ x5;OBJ x6;
  ANat_64(x1,__ASourceAn_57,x2);
  ANat_66(x1,__ASourceAn_57,x3);
  ANatConv_1(x2,x4);
  ANatConv_1(x3,x5);
  ADenotation_4(__ASourceAnFun_4,x5,x6);
  ADenotation_4(x4,x6,r);}
 return r;}

extern OBJ _ASourceAnFun_6(OBJ x1) /* format'6 */
{OBJ r;
 CPPRD(__ASourceAnFun_5,1);
 r=_AFmt_28(__ASourceAnFun_5);
 return r;}

extern OBJ _ASourceAnFun_8(OBJ x1) /* format'8 */
{OBJ r;
 CPPRD(__ASourceAnFun_7,1);
 r=_AFmt_28(__ASourceAnFun_7);
 return r;}

extern OBJ _ASourceAnFun_10(OBJ x1) /* format'10 */
{OBJ r;
 CPPRD(__ASourceAnFun_9,1);
 r=_AFmt_28(__ASourceAnFun_9);
 return r;}

extern OBJ _ASourceAnFun_15(OBJ x1) /* format'15 */
{OBJ r;
 CPPRD(__ASourceAnFun_14,1);
 r=_AFmt_28(__ASourceAnFun_14);
 return r;}

extern OBJ _ASourceAnFun_17(OBJ x1) /* format'17 */
{OBJ r;
 CPPRD(__ASourceAnFun_16,1);
 r=_AFmt_28(__ASourceAnFun_16);
 return r;}

extern OBJ _ASourceAnFun_19(OBJ x1) /* format'19 */
{OBJ r;
 CPPRD(__ASourceAnFun_18,1);
 r=_AFmt_28(__ASourceAnFun_18);
 return r;}

init_ASourceAnFun()
{
 static int visited=0; if(visited) return; visited=1;
 init_AIde();
 init_ASourceAn();
 init_AFormat();
 init_ANat();
 init_AString();
 init_ASeq();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AOption();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ADenotation();
 init_ANatConv();
 init_AFormatFun1();
 init_AReal();
 LCLS(1,_ASourceAnFun_19,__ASourceAnFun_19);
 DEN("",__ASourceAnFun_18);
 LCLS(1,_ASourceAnFun_17,__ASourceAnFun_17);
 DEN("\"",__ASourceAnFun_16);
 LCLS(1,_ASourceAnFun_15,__ASourceAnFun_15);
 DEN("version=\"",__ASourceAnFun_14);
 DEN("always",__ASourceAnFun_13);
 DEN("optional",__ASourceAnFun_12);
 DEN("never",__ASourceAnFun_11);
 LCLS(1,_ASourceAnFun_10,__ASourceAnFun_10);
 DEN(",",__ASourceAnFun_9);
 LCLS(1,_ASourceAnFun_8,__ASourceAnFun_8);
 DEN("}",__ASourceAnFun_7);
 LCLS(1,_ASourceAnFun_6,__ASourceAnFun_6);
 DEN("{",__ASourceAnFun_5);
 DEN(".",__ASourceAnFun_4);
 CLS(1,_ASourceAnFun_3,__ASourceAnFun_3);
 CLS(1,_ASourceAnFun_2,__ASourceAnFun_2);
 CLS(2,_ASourceAnFun_1,__ASourceAnFun_1);}

