

#include "BUILTIN.h"
extern OBJ _AUnion2_2(OBJ);OBJ __AUnion2_2; /* data2 */
extern OBJ _AUnion2_3(OBJ);OBJ __AUnion2_3; /* data2? */
extern OBJ _AUnion2_4(OBJ);OBJ __AUnion2_4; /* cont2 */
extern OBJ _AUnion2_5(OBJ);OBJ __AUnion2_5; /* data1 */
extern OBJ _AUnion2_6(OBJ);OBJ __AUnion2_6; /* data1? */
extern OBJ _AUnion2_7(OBJ);OBJ __AUnion2_7; /* cont1 */

extern OBJ _AUnion2_2(OBJ x1) /* data2 */
{OBJ r;
 PRD(1,1,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AUnion2_3(OBJ x1) /* data2? */
{OBJ r;
 if(ISTGPRD(x1,1)){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AUnion2_4(OBJ x1) /* cont2 */
{OBJ r;
 if(ISTGPRD(x1,1)){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("Union2 at <unknown> : undefined selection cont2\'Union2:union->data2");}
 return r;}

extern OBJ _AUnion2_5(OBJ x1) /* data1 */
{OBJ r;
 PRD(1,0,r);FLD(r,1)=x1;
 return r;}

extern OBJ _AUnion2_6(OBJ x1) /* data1? */
{OBJ r;
 if(ISTGPRD(x1,0)){
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x1,1)){
   FREE(FLD(x1,1),1);DSPRDF(x1);
  }else{
   DCPRD(x1,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AUnion2_7(OBJ x1) /* cont1 */
{OBJ r;
 if(ISTGPRD(x1,0)){
  {OBJ x2=FLD(x1,1);
   if(EXPRD(x1,1)){
    r=x2;
    DSPRDF(x1);
   }else{
    COPY(x2,1);
    r=x2;
    FRPRD(x1,1);}}
 }else{
  HLT("Union2 at <unknown> : undefined selection cont1\'Union2:union->data1");}
 return r;}

static OBJ _mt_1_0_1(OBJ t,OBJ t1) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ))ENTRY(t))(t1);
 return r;}
static OBJ _mt_1_0_1_l(OBJ t,OBJ t1) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ))ENTRY(t))(t1);
 COPY(r,1);LZYCLS(t,r);
 return r;}

init_AUnion2()
{
 static int visited=0; if(visited) return; visited=1;
 CLS(1,_AUnion2_7,__AUnion2_7);
 CLS(1,_AUnion2_6,__AUnion2_6);
 CLS(1,_AUnion2_5,__AUnion2_5);
 CLS(1,_AUnion2_4,__AUnion2_4);
 CLS(1,_AUnion2_3,__AUnion2_3);
 CLS(1,_AUnion2_2,__AUnion2_2);
 MTH(1,0,1,_mt_1_0_1);LZYMTH(1,0,1,_mt_1_0_1_l);}

