

#include "BUILTIN.h"
extern OBJ _ACom_22(OBJ);extern OBJ __ACom_22;

#include "Nat.h"

#include "Char.h"

#include "Denotation.h"
extern OBJ __AStream_5;
extern OBJ _AComCompose_4(OBJ,OBJ);extern OBJ __AComCompose_4;
extern OBJ _AFile_28(OBJ,OBJ);extern OBJ __AFile_28;

#include "Int.h"
OBJ __AOcExit_1; /* languageError */
OBJ __AOcExit_2; /* ioError */
OBJ __AOcExit_3; /* internalError */
extern OBJ _AOcExit_4(OBJ);OBJ __AOcExit_4; /* exit */
OBJ __AOcExit_9; /* okExitCode */
OBJ __AOcExit_10; /* errExitCode */
OBJ __AOcExit_11; /* ioExitCode */
OBJ __AOcExit_12; /* fatalExitCode */
extern OBJ _AOcExit_13(OBJ);OBJ __AOcExit_13; /* exit'13 */
extern OBJ _AOcExit_14(OBJ);OBJ __AOcExit_14; /* exit'14 */
extern OBJ _AOcExit_15(OBJ);OBJ __AOcExit_15; /* exit'15 */
extern OBJ _AOcExit_16(OBJ);OBJ __AOcExit_16; /* exit'16 */
OBJ __AOcExit_17; /* exit'17 */

extern OBJ _AOcExit_4(OBJ x1) /* exit */
{OBJ r;
 if(ISTGPRD(x1,0)){
  if(EXPRD(x1,1)){
   DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  CPCLS(__AOcExit_13,1);
  r=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOcExit_13,1))(__AOcExit_13,__ABUILTIN_20);
 }else{
  {OBJ x19=FLD(x1,1);
   if(EXPRD(x1,1)){
    CPPRD(x19,1);
    DSPRDF(x1);
   }else{
    CPPRD(x19,2);
    FRPRD(x1,1);}
   CPPRD(__AOcExit_1,1);
   {OBJ x20;
    ADenotation_21(x19,__AOcExit_1,x20);
    if(ISTGPRM(x20,1)){
     FRPRD(x19,1);
     CPCLS(__AOcExit_14,1);
     r=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOcExit_14,1))(__AOcExit_14,__ABUILTIN_20);
    }else{
     CPPRD(x19,1);
     CPPRD(__AOcExit_2,1);
     {OBJ x21;
      ADenotation_21(x19,__AOcExit_2,x21);
      if(ISTGPRM(x21,1)){
       FRPRD(x19,1);
       CPCLS(__AOcExit_15,1);
       r=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOcExit_15,1))(__AOcExit_15,__ABUILTIN_20);
      }else{
       CPPRD(x19,1);
       CPPRD(__AOcExit_3,1);
       CPCLS(__AOcExit_16,1);
       {OBJ x22;OBJ x23;
	x22=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOcExit_16,1))(__AOcExit_16,__ABUILTIN_20);
	ADenotation_21(x19,__AOcExit_3,x23);
	if(ISTGPRM(x23,1)){
	 r=x22;
	 FRPRD(x19,1);
	}else{
	 CPPRD(__AOcExit_17,1);
	 {OBJ x24;OBJ x25;
	  ADenotation_4(__AOcExit_17,x19,x24);
	  x25=_AFile_28(__AStream_5,x24);
	  r=_AComCompose_4(x25,x22);}}}}}}}}}
 return r;}

extern OBJ _AOcExit_13(OBJ x1) /* exit'13 */
{OBJ r;
 r=_ACom_22(__AOcExit_9);
 return r;}

extern OBJ _AOcExit_14(OBJ x1) /* exit'14 */
{OBJ r;
 r=_ACom_22(__AOcExit_10);
 return r;}

extern OBJ _AOcExit_15(OBJ x1) /* exit'15 */
{OBJ r;
 r=_ACom_22(__AOcExit_11);
 return r;}

extern OBJ _AOcExit_16(OBJ x1) /* exit'16 */
{OBJ r;
 r=_ACom_22(__AOcExit_12);
 return r;}





init_AOcExit()
{
 static int visited=0; if(visited) return; visited=1;
 init_AString();
 init_AVoid();
 init_ACom();
 init_ANat();
 init_ASeq();
 init_AOption();
 init_AChar();
 init_ADenotation();
 init_AStream();
 init_AComCompose();
 init_AFile();
 init_AInt();
 init_ASeqMap();
 DEN("unknown failure reason: ",__AOcExit_17);
 LCLS(1,_AOcExit_16,__AOcExit_16);
 LCLS(1,_AOcExit_15,__AOcExit_15);
 LCLS(1,_AOcExit_14,__AOcExit_14);
 LCLS(1,_AOcExit_13,__AOcExit_13);
 CLS(1,_AOcExit_4,__AOcExit_4);
 DEN("internal error",__AOcExit_3);
 DEN("i/o error",__AOcExit_2);
 DEN("language error",__AOcExit_1);
 __AOcExit_9=__ANat_5;
 __AOcExit_10=__ANat_8;
 __AOcExit_11=__ANat_9;
 __AOcExit_12=inline_c_nat((NAT)(255));}

