

#include "BUILTIN.h"

#include "Denotation.h"

#include "Nat.h"

#include "Char.h"

#include "Int.h"
extern OBJ _AUnion4Conv_5(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AUnion4Conv_5; /* ` */
OBJ __AUnion4Conv_6; /* `'6 */
OBJ __AUnion4Conv_7; /* `'7 */
OBJ __AUnion4Conv_8; /* `'8 */
OBJ __AUnion4Conv_9; /* `'9 */
OBJ __AUnion4Conv_10; /* `'10 */

extern OBJ _AUnion4Conv_5(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* ` */
{OBJ r;
 switch(TGPRD(x5)){
  case 2:
   {OBJ x53=FLD(x5,1);
    if(EXPRD(x5,1)){
     DSPRDF(x5);
    }else{
     COPY(x53,1);
     FRPRD(x5,1);}
    FRCLS(x1,1);
    FRCLS(x2,1);
    FRCLS(x4,1);
    CPPRD(__AUnion4Conv_6,1);
    CPPRD(__AUnion4Conv_8,1);
    {OBJ x54;OBJ x55;
     x54=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x53);
     ADenotation_4(x54,__AUnion4Conv_6,x55);
     ADenotation_4(__AUnion4Conv_8,x55,r);}}break;
  case 3:
   {OBJ x56=FLD(x5,1);
    if(EXPRD(x5,1)){
     DSPRDF(x5);
    }else{
     COPY(x56,1);
     FRPRD(x5,1);}
    FRCLS(x1,1);
    FRCLS(x2,1);
    FRCLS(x3,1);
    CPPRD(__AUnion4Conv_6,1);
    CPPRD(__AUnion4Conv_9,1);
    {OBJ x57;OBJ x58;
     x57=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x56);
     ADenotation_4(x57,__AUnion4Conv_6,x58);
     ADenotation_4(__AUnion4Conv_9,x58,r);}}break;
  case 0:
   {OBJ x59=FLD(x5,1);
    if(EXPRD(x5,1)){
     DSPRDF(x5);
    }else{
     COPY(x59,1);
     FRPRD(x5,1);}
    FRCLS(x2,1);
    FRCLS(x3,1);
    FRCLS(x4,1);
    CPPRD(__AUnion4Conv_6,1);
    CPPRD(__AUnion4Conv_10,1);
    {OBJ x60;OBJ x61;
     x60=(*(OBJ(*)(OBJ,OBJ))METHOD(x1,1))(x1,x59);
     ADenotation_4(x60,__AUnion4Conv_6,x61);
     ADenotation_4(__AUnion4Conv_10,x61,r);}}break;
  default: 
   {OBJ x50=FLD(x5,1);
    if(EXPRD(x5,1)){
     DSPRDF(x5);
    }else{
     COPY(x50,1);
     FRPRD(x5,1);}
    FRCLS(x1,1);
    FRCLS(x3,1);
    FRCLS(x4,1);
    CPPRD(__AUnion4Conv_6,1);
    CPPRD(__AUnion4Conv_7,1);
    {OBJ x51;OBJ x52;
     x51=(*(OBJ(*)(OBJ,OBJ))METHOD(x2,1))(x2,x50);
     ADenotation_4(x51,__AUnion4Conv_6,x52);
     ADenotation_4(__AUnion4Conv_7,x52,r);}}}
 return r;}

static OBJ _mt_5_0_4(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,4);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 FLDCLS(r,4)=t4;
 return r;}

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

static OBJ _mt_5_4_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);
  COPY(FLDCLS(t,4),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1);
 return r;}
static OBJ _mt_5_4_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),FLDCLS(t,4),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;FLDCLS(t,3)=NIL;FLDCLS(t,4)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_AUnion4Conv()
{
 static int visited=0; if(visited) return; visited=1;
 init_AUnion4();
 init_ADenotation();
 init_ANat();
 init_AChar();
 init_AInt();
 DEN("[1|",__AUnion4Conv_10);
 DEN("[4|",__AUnion4Conv_9);
 DEN("[3|",__AUnion4Conv_8);
 DEN("[2|",__AUnion4Conv_7);
 DEN("]",__AUnion4Conv_6);
 CLS(5,_AUnion4Conv_5,__AUnion4Conv_5);
 MTH(5,0,4,_mt_5_0_4);LZYMTH(5,0,4,_mt_5_0_4);
 MTH(5,0,5,_mt_5_0_5);LZYMTH(5,0,5,_mt_5_0_5);
 MTH(5,4,1,_mt_5_4_1);LZYMTH(5,4,1,_mt_5_4_1_l);}

