

#include "BUILTIN.h"
extern OBJ __ABuiltin_2;
extern OBJ __ABuiltin_3;
extern OBJ __ABuiltin_4;
extern OBJ __ABuiltin_5;
extern OBJ __ABuiltin_6;
extern OBJ __ABuiltin_7;
extern OBJ __ABuiltin_8;
extern OBJ __ABuiltin_9;
extern OBJ __ABuiltin_10;
extern OBJ __ABuiltin_11;
extern OBJ __ABuiltin_12;
extern OBJ __ABuiltin_13;
extern OBJ __ABuiltin_14;
extern OBJ __ABuiltin_15;
extern OBJ __ABuiltin_16;

#include "Array.h"

#include "Nat.h"
extern OBJ _AInterOpal_25(OBJ);extern OBJ __AInterOpal_25;
extern OBJ _AInterOpal_28(OBJ);extern OBJ __AInterOpal_28;
extern OBJ _AInterOpal_30(OBJ);extern OBJ __AInterOpal_30;
extern OBJ _AInterOpal_39(OBJ);extern OBJ __AInterOpal_39;
extern OBJ _AInterOpal_314(OBJ,OBJ);extern OBJ __AInterOpal_314;
extern OBJ __AIde_17;
extern OBJ _ACompose_4(OBJ,OBJ,OBJ);extern OBJ __ACompose_4;
extern OBJ __AAn_2;
extern OBJ _AAn_5(OBJ,OBJ);extern OBJ __AAn_5;
extern OBJ _ASourceAn_9(OBJ,OBJ);extern OBJ __ASourceAn_9;
extern OBJ __ANatMap_3;
extern OBJ _ANatMap_4(OBJ,OBJ,OBJ);extern OBJ __ANatMap_4;
extern OBJ _ANatMap_14(OBJ,OBJ);extern OBJ __ANatMap_14;

#include "Char.h"

#include "Int.h"
extern OBJ _AMap_16(OBJ,OBJ,OBJ);extern OBJ __AMap_16;

#include "Denotation.h"
extern OBJ _AInterOpalAccess_8(OBJ,OBJ);extern OBJ __AInterOpalAccess_8;
extern OBJ _AInterOpalAccess_36(OBJ,OBJ);extern OBJ __AInterOpalAccess_36;
OBJ __ANameTranslation_1; /* nullIde */
extern OBJ _ANameTranslation_2(OBJ,OBJ);OBJ __ANameTranslation_2; /* ide */
extern OBJ _ANameTranslation_3(OBJ,OBJ);OBJ __ANameTranslation_3; /* internalIde */
extern OBJ _ANameTranslation_4(OBJ,OBJ);OBJ __ANameTranslation_4; /* externalIde */
extern OBJ _ANameTranslation_5(OBJ);OBJ __ANameTranslation_5; /* parameterIde */
extern OBJ _ANameTranslation_6(OBJ);OBJ __ANameTranslation_6; /* posAn */
extern OBJ _ANameTranslation_7(OBJ);OBJ __ANameTranslation_7; /* ` */
OBJ __ANameTranslation_13; /* predefBoolMap */
OBJ __ANameTranslation_14; /* predefDenotationMap */
OBJ __ANameTranslation_15; /* externalIde'15 */
OBJ __ANameTranslation_16; /* externalIde'16 */
extern OBJ _ANameTranslation_17(OBJ);OBJ __ANameTranslation_17; /* `'17 */

extern OBJ _ANameTranslation_2(OBJ x1,OBJ x2) /* ide */
{OBJ r;
 CPCLS(__AInterOpal_30,1);
 CPCLS(__AInterOpal_39,1);
 CPPRD(x2,1);
 {OBJ x3;
  x3=_ACompose_4(__AInterOpal_30,__AInterOpal_39,x2);
  if(ISTGPRM(x3,1)){
   FRPRD(x1,1);
   {OBJ x4=FLD1(x2,1);
    if(EXPRD(x2,1)){
     DSPRD(x2);
    }else{
     FRPRD(x2,1);}
    {OBJ x7;
     x7=x4;
     PRDF(1,1,r);FLD(r,1)=x7;}}
  }else{
   CPPRD(x1,1);
   CPPRD(x2,1);
   {OBJ x8;
    x8=_AInterOpalAccess_8(x1,x2);
    if(ISTGPRM(x8,1)){
     {
      PRDF(1,1,r);
      FLD(r,1)=_AInterOpalAccess_36(x1,x2);}
    }else{
     CPPRD(x2,1);
     CPCLS(__AInterOpal_28,1);
     CPCLS(__AInterOpal_39,1);
     {OBJ x10;
      x10=_ACompose_4(__AInterOpal_28,__AInterOpal_39,x2);
      if(ISTGPRM(x10,1)){
       FRPRD(x1,1);
       {OBJ x11=FLD1(x2,1);
	if(EXPRD(x2,1)){
	 DSPRD(x2);
	}else{
	 FRPRD(x2,1);}
	PRDF(2,0,r);FLD(r,1)=x11;FLD(r,2)=__AIde_17;}
      }else{
       CPPRD(x2,1);
       CPCLS(__AInterOpal_25,1);
       CPCLS(__AInterOpal_39,1);
       {OBJ x14;
	x14=_ACompose_4(__AInterOpal_25,__AInterOpal_39,x2);
	if(ISTGPRM(x14,1)){
	 r=_ANameTranslation_4(x1,x2);
	}else{
	 HLT("NameTranslation at <47,8-48,48> : missing else in ide\'NameTranslation:interOpal->name->ide");}}}}}}}}
 return r;}

extern OBJ _ANameTranslation_3(OBJ x1,OBJ x2) /* internalIde */
{OBJ r;
 FRPRD(x1,1);
 {OBJ x3=FLD1(x2,1);
  if(EXPRD(x2,1)){
   DSPRD(x2);
  }else{
   FRPRD(x2,1);}
  {OBJ x6;
   x6=x3;
   PRDF(2,0,r);FLD(r,1)=x6;FLD(r,2)=__AIde_17;}}
 return r;}

extern OBJ _ANameTranslation_4(OBJ x1,OBJ x2) /* externalIde */
{OBJ r;
 {OBJ x30=FLD1(x2,1);OBJ x31=FLD1(x2,2);
  if(EXPRD(x2,1)){
   FREE(FLD1(x2,3),1);DSPRDF(x2);
  }else{
   COPY(x31,1);
   FRPRD(x2,1);}
  if(ISPRD(x31)){
   {OBJ x33=FLD1(x31,1);
    {OBJ x34;
     ANat_76(x33,__ANat_8,x34);
     if(ISTGPRM(x34,1)){
      FRPRD(x1,1);
      if(EXPRD(x31,1)){
       DSPRDF(x31);
      }else{
       DCPRD(x31,1);}
      CPPRD(__ANameTranslation_13,1);
      r=_ANatMap_14(__ANameTranslation_13,x30);
     }else{
      {OBJ x35;
       ANat_76(x33,__ANat_9,x35);
       if(ISTGPRM(x35,1)){
	FRPRD(x1,1);
	if(EXPRD(x31,1)){
	 DSPRDF(x31);
	}else{
	 DCPRD(x31,1);}
	CPPRD(__ANameTranslation_14,1);
	r=_ANatMap_14(__ANameTranslation_14,x30);
       }else{
	{OBJ x37=FLD1(x1,2);
	 if(EXPRD(x1,1)){
	  DSPRDF(x1);
	 }else{
	  COPY(x37,1);
	  FRPRD(x1,1);}
	 CPCLS(__AInterOpal_314,1);
	 {OBJ x38;
	  x38=_AMap_16(__AInterOpal_314,x37,x31);
	  {OBJ x41=FLD1(x38,3);
	   if(EXPRD(x38,1)){
	    CPPRD(x41,1);
	    FLD1(x38,3)=NIL;DSPRD(x38);
	   }else{
	    CPPRD(x41,2);
	    FRPRD(x38,1);}
	   CPPRD(__ANameTranslation_15,1);
	   {OBJ x47;
	    ADenotation_21(x41,__ANameTranslation_15,x47);
	    if(ISTGPRM(x47,1)){
	     FRPRD(x41,1);
	     CPPRD(__ABuiltin_15,1);
	     r=__ABuiltin_15;
	    }else{
	     CPPRD(__ANameTranslation_16,1);
	     {OBJ x48;
	      ADenotation_21(x41,__ANameTranslation_16,x48);
	      if(ISTGPRM(x48,1)){
	       CPPRD(__ABuiltin_16,1);
	       r=__ABuiltin_16;
	      }else{
	       PRDF(2,0,r);FLD(r,1)=x30;FLD(r,2)=x33;}}}}}}}}}}}}
  }else{
   HLT("InterOpal at <unknown> : undefined selection no\'InterOpal:origin->nat");}}
 return r;}

extern OBJ _ANameTranslation_5(OBJ x1) /* parameterIde */
{OBJ r;
 PRDF(1,1,r);FLD(r,1)=x1;
 return r;}

extern OBJ _ANameTranslation_6(OBJ x1) /* posAn */
{OBJ r;
 {OBJ x2;OBJ x3;
  x2=_ANameTranslation_7(x1);
  PRDF(1,1,x3);FLD(x3,1)=x2;
  r=_AAn_5(__AAn_2,x3);}
 return r;}

extern OBJ _ANameTranslation_7(OBJ x1) /* ` */
{OBJ r;
 {OBJ x2;OBJ x4;
  if(ISPRM(x1)){
   x2=__ABUILTIN_5;
  }else{
   x2=__ABUILTIN_3;}
  if(ISTGPRM(x2,1)){
   x4=__ABUILTIN_5;
  }else{
   if(ISPRD(x1)&&(ISTGPRD(x1,1))){
    x4=__ABUILTIN_5;
   }else{
    x4=__ABUILTIN_3;}}
  if(ISTGPRM(x4,1)){
   FREE(x1,1);
   CPCLS(__ANameTranslation_17,1);
   r=(*(OBJ(*)(OBJ,OBJ))METHOD(__ANameTranslation_17,1))(__ANameTranslation_17,__ABUILTIN_20);
  }else{
   {OBJ x22;OBJ x13;
    if(ISPRD(x1)&&(ISTGPRD(x1,3)||ISTGPRD(x1,2))){
     {OBJ x32=FLD(x1,2);OBJ x33=FLD(x1,3);
      if(EXPRD(x1,1)){
       x13=x32;x22=x33;
       DSPRD(x1);
      }else{
       x13=x32;x22=x33;
       FRPRD(x1,1);}}
    }else{
     HLT("InterOpal at <unknown> : undefined selection col\'InterOpal:pos->nat");}
    r=_ASourceAn_9(x13,x22);}}}
 return r;}

extern OBJ _ANameTranslation_17(OBJ x1) /* `'17 */
{OBJ r;
 r=_ASourceAn_9(__ANat_8,__ANat_8);
 return r;}


static void ___ANameTranslation_13()
{
 CPPRD(__ANatMap_3,1);
 CPPRD(__ABuiltin_2,1);
 CPPRD(__ABuiltin_3,1);
 CPPRD(__ABuiltin_4,1);
 CPPRD(__ABuiltin_5,1);
 CPPRD(__ABuiltin_6,1);
 CPPRD(__ABuiltin_7,1);
 CPPRD(__ABuiltin_8,1);
 CPPRD(__ABuiltin_9,1);
 CPPRD(__ABuiltin_10,1);
 CPPRD(__ABuiltin_11,1);
 {OBJ x1;OBJ x2;OBJ x3;OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;OBJ x9;
  x1=_ANatMap_4(__ANat_17,__ABuiltin_11,__ANatMap_3);
  x2=_ANatMap_4(__ANat_16,__ABuiltin_10,x1);
  x3=_ANatMap_4(__ANat_15,__ABuiltin_8,x2);
  x4=_ANatMap_4(__ANat_14,__ABuiltin_7,x3);
  x5=_ANatMap_4(__ANat_13,__ABuiltin_9,x4);
  x6=_ANatMap_4(__ANat_12,__ABuiltin_6,x5);
  x7=_ANatMap_4(__ANat_11,__ABuiltin_3,x6);
  x8=_ANatMap_4(__ANat_10,__ABuiltin_5,x7);
  x9=_ANatMap_4(__ANat_9,__ABuiltin_4,x8);
  __ANameTranslation_13=_ANatMap_4(__ANat_8,__ABuiltin_2,x9);}}

static void ___ANameTranslation_14()
{
 CPPRD(__ANatMap_3,1);
 CPPRD(__ABuiltin_12,1);
 CPPRD(__ABuiltin_13,1);
 CPPRD(__ABuiltin_14,1);
 {OBJ x1;OBJ x2;
  x1=_ANatMap_4(__ANat_10,__ABuiltin_14,__ANatMap_3);
  x2=_ANatMap_4(__ANat_9,__ABuiltin_13,x1);
  __ANameTranslation_14=_ANatMap_4(__ANat_8,__ABuiltin_12,x2);}}

init_ANameTranslation()
{
 static int visited=0; if(visited) return; visited=1;
 init_ABuiltin();
 init_AAc();
 init_AArray();
 init_ASetByBST();
 init_ANat();
 init_ABSTree();
 init_AInterOpal();
 init_ATree();
 init_AIde();
 init_ACompose();
 init_AAn();
 init_ASourceAn();
 init_ATypeAn();
 init_AOptimAn();
 init_ATransAn();
 init_APragmaAn();
 init_ASeq();
 init_AOption();
 init_ANatMap();
 init_AStore();
 init_AFormat();
 init_AString();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ASet();
 init_APair();
 init_AIdeMap();
 init_AMap();
 init_ADyn();
 init_ADenotation();
 init_AInterOpalAccess();
 LCLS(1,_ANameTranslation_17,__ANameTranslation_17);
 DEN("INLINE",__ANameTranslation_16);
 DEN("ABORT",__ANameTranslation_15);
 CLS(1,_ANameTranslation_7,__ANameTranslation_7);
 CLS(1,_ANameTranslation_6,__ANameTranslation_6);
 CLS(1,_ANameTranslation_5,__ANameTranslation_5);
 CLS(2,_ANameTranslation_4,__ANameTranslation_4);
 CLS(2,_ANameTranslation_3,__ANameTranslation_3);
 CLS(2,_ANameTranslation_2,__ANameTranslation_2);
 PRDF(1,1,__ANameTranslation_1);FLD(__ANameTranslation_1,1)=__ANat_5;
 ___ANameTranslation_13();
 ___ANameTranslation_14();}

