

#include "BUILTIN.h"

#include "Nat.h"
OBJ __ASourceAn_2; /* always */
extern OBJ _ASourceAn_3(OBJ);OBJ __ASourceAn_3; /* always? */
OBJ __ASourceAn_4; /* optional */
extern OBJ _ASourceAn_5(OBJ);OBJ __ASourceAn_5; /* optional? */
OBJ __ASourceAn_6; /* never */
extern OBJ _ASourceAn_7(OBJ);OBJ __ASourceAn_7; /* never? */
extern OBJ _ASourceAn_9(OBJ,OBJ);OBJ __ASourceAn_9; /* pos */
extern OBJ _ASourceAn_10(OBJ);OBJ __ASourceAn_10; /* pos? */
extern OBJ _ASourceAn_11(OBJ);OBJ __ASourceAn_11; /* colum */
extern OBJ _ASourceAn_12(OBJ);OBJ __ASourceAn_12; /* line */
extern OBJ _ASourceAn_14(OBJ);OBJ __ASourceAn_14; /* version */
extern OBJ _ASourceAn_15(OBJ);OBJ __ASourceAn_15; /* version? */
extern OBJ _ASourceAn_16(OBJ);OBJ __ASourceAn_16; /* version,1 */
extern OBJ _ASourceAn_17(OBJ);OBJ __ASourceAn_17; /* symbol */
extern OBJ _ASourceAn_18(OBJ);OBJ __ASourceAn_18; /* symbol? */
extern OBJ _ASourceAn_19(OBJ);OBJ __ASourceAn_19; /* symbol,1 */
extern OBJ _ASourceAn_20(OBJ,OBJ,OBJ);OBJ __ASourceAn_20; /* error */
extern OBJ _ASourceAn_21(OBJ);OBJ __ASourceAn_21; /* error? */
extern OBJ _ASourceAn_22(OBJ);OBJ __ASourceAn_22; /* kind */
extern OBJ _ASourceAn_23(OBJ);OBJ __ASourceAn_23; /* message */
extern OBJ _ASourceAn_24(OBJ);OBJ __ASourceAn_24; /* pos,1 */
extern OBJ _ASourceAn_25(OBJ);OBJ __ASourceAn_25; /* pos,2 */
extern OBJ _ASourceAn_26(OBJ);OBJ __ASourceAn_26; /* pos?,1 */
OBJ __ASourceAn_28; /* none */
extern OBJ _ASourceAn_29(OBJ);OBJ __ASourceAn_29; /* none? */
OBJ __ASourceAn_30; /* noPos */
extern OBJ _ASourceAn_31(OBJ,OBJ);OBJ __ASourceAn_31; /* = */
extern OBJ _ASourceAn_32(OBJ);OBJ __ASourceAn_32; /* abs */
extern OBJ _ASourceAn_33(OBJ);OBJ __ASourceAn_33; /* abs? */
extern OBJ _ASourceAn_34(OBJ);OBJ __ASourceAn_34; /* rep */
OBJ __ASourceAn_57; /* lineFactor */

extern OBJ _ASourceAn_3(OBJ x1) /* always? */
{OBJ r;
 if(ISTGPRM(x1,2)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_5(OBJ x1) /* optional? */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_7(OBJ x1) /* never? */
{OBJ r;
 if(ISTGPRM(x1,0)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_9(OBJ x1,OBJ x2) /* pos */
{OBJ r;
 {OBJ x3;
  ANat_63(__ASourceAn_57,x1,x3);
  ANat_61(x3,x2,r);}
 return r;}

extern OBJ _ASourceAn_10(OBJ x1) /* pos? */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ASourceAn_11(OBJ x1) /* colum */
{OBJ r;
 ANat_66(x1,__ASourceAn_57,r);
 return r;}

extern OBJ _ASourceAn_12(OBJ x1) /* line */
{OBJ r;
 ANat_64(x1,__ASourceAn_57,r);
 return r;}

extern OBJ _ASourceAn_14(OBJ x1) /* version */
{OBJ r;
 PRD(1,4,r);FLD(r,1)=x1;
 return r;}

extern OBJ _ASourceAn_15(OBJ x1) /* version? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,4))){
  if(EXPRD(x1,1)){
   FRPRD(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_16(OBJ x1) /* version,1 */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,4))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    CPPRD(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("SourceAn at <unknown> : undefined selection version\'SourceAn:sourceAn->denotation");}
 return r;}

extern OBJ _ASourceAn_17(OBJ x1) /* symbol */
{OBJ r;
 PRD(1,3,r);FLD(r,1)=x1;
 return r;}

extern OBJ _ASourceAn_18(OBJ x1) /* symbol? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,3))){
  if(EXPRD(x1,1)){
   FRPRD(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_19(OBJ x1) /* symbol,1 */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,3))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    CPPRD(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("SourceAn at <unknown> : undefined selection symbol\'SourceAn:sourceAn->denotation");}
 return r;}

extern OBJ _ASourceAn_20(OBJ x1,OBJ x2,OBJ x3) /* error */
{OBJ r;
 PRD(3,2,r);FLD(r,1)=x1;FLD(r,2)=x2;FLD(r,3)=x3;
 return r;}

extern OBJ _ASourceAn_21(OBJ x1) /* error? */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,2))){
  if(EXPRD(x1,1)){
   FRPRD(FLD(x1,2),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_22(OBJ x1) /* kind */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,2))){
  {OBJ x4=FLD(x1,3);
   if(EXPRD(x1,1)){
    r=x4;
    FRPRD(FLD(x1,2),1);DSPRDF(x1);
   }else{
    r=x4;
    FRPRD(x1,1);}}
 }else{
  HLT("SourceAn at <unknown> : undefined selection kind\'SourceAn:sourceAn->errorKind");}
 return r;}

extern OBJ _ASourceAn_23(OBJ x1) /* message */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,2))){
  {OBJ x3=FLD(x1,2);
   if(EXPRD(x1,1)){
    r=x3;
    DSPRDF(x1);
   }else{
    CPPRD(x3,1);
    r=x3;
    FRPRD(x1,1);}}
 }else{
  HLT("SourceAn at <unknown> : undefined selection message\'SourceAn:sourceAn->denotation");}
 return r;}

extern OBJ _ASourceAn_24(OBJ x1) /* pos,1 */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,2)||ISTGPRD(x1,1))){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRD(x1);
   }else{
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("SourceAn at <unknown> : undefined selection pos\'SourceAn:sourceAn->pos");}
 return r;}

extern OBJ _ASourceAn_25(OBJ x1) /* pos,2 */
{OBJ r;
 PRDF(1,1,r);FLD(r,1)=x1;
 return r;}

extern OBJ _ASourceAn_26(OBJ x1) /* pos?,1 */
{OBJ r;
 if(ISPRD(x1)&&(ISTGPRD(x1,1))){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_29(OBJ x1) /* none? */
{OBJ r;
 if(ISPRM(x1)){
  r=__ABUILTIN_5;
 }else{
  FREE(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ASourceAn_31(OBJ x1,OBJ x2) /* = */
{OBJ r;
 ANat_76(x1,x2,r);
 return r;}

extern OBJ _ASourceAn_32(OBJ x1) /* abs */
{OBJ r;
 r=x1;
 return r;}

extern OBJ _ASourceAn_33(OBJ x1) /* abs? */
{OBJ r;
 r=__ABUILTIN_5;
 return r;}

extern OBJ _ASourceAn_34(OBJ x1) /* rep */
{OBJ r;
 r=x1;
 return r;}





static void ___ASourceAn_30()
{
 {OBJ x1;
  ANat_63(__ASourceAn_57,__ANat_8,x1);
  ANat_61(x1,__ANat_8,__ASourceAn_30);}}


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

init_ASourceAn()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 CLS(2,_ASourceAn_31,__ASourceAn_31);
 CLS(1,_ASourceAn_29,__ASourceAn_29);
 CLS(1,_ASourceAn_26,__ASourceAn_26);
 CLS(1,_ASourceAn_25,__ASourceAn_25);
 CLS(1,_ASourceAn_24,__ASourceAn_24);
 CLS(1,_ASourceAn_23,__ASourceAn_23);
 CLS(1,_ASourceAn_22,__ASourceAn_22);
 CLS(1,_ASourceAn_21,__ASourceAn_21);
 CLS(3,_ASourceAn_20,__ASourceAn_20);
 CLS(1,_ASourceAn_19,__ASourceAn_19);
 CLS(1,_ASourceAn_18,__ASourceAn_18);
 CLS(1,_ASourceAn_17,__ASourceAn_17);
 CLS(1,_ASourceAn_16,__ASourceAn_16);
 CLS(1,_ASourceAn_15,__ASourceAn_15);
 CLS(1,_ASourceAn_14,__ASourceAn_14);
 CLS(1,_ASourceAn_12,__ASourceAn_12);
 CLS(1,_ASourceAn_11,__ASourceAn_11);
 CLS(1,_ASourceAn_10,__ASourceAn_10);
 CLS(2,_ASourceAn_9,__ASourceAn_9);
 CLS(1,_ASourceAn_7,__ASourceAn_7);
 CLS(1,_ASourceAn_5,__ASourceAn_5);
 CLS(1,_ASourceAn_3,__ASourceAn_3);
 CLS(1,_ASourceAn_34,__ASourceAn_34);
 CLS(1,_ASourceAn_33,__ASourceAn_33);
 CLS(1,_ASourceAn_32,__ASourceAn_32);
 MTH(3,0,3,_mt_3_0_3);LZYMTH(3,0,3,_mt_3_0_3);
 PRM(2,__ASourceAn_2);
 PRM(1,__ASourceAn_4);
 PRM(0,__ASourceAn_6);
 PRM1(__ASourceAn_28);
 __ASourceAn_57=inline_c_nat((NAT)(1024));
 ___ASourceAn_30();}

