

#include "BUILTIN.h"
extern OBJ __ARelCmp_2;
extern OBJ __ARelCmp_4;
extern OBJ __ARelCmp_6;
extern OBJ _APairCompare_3(OBJ,OBJ,OBJ,OBJ);OBJ __APairCompare_3; /* cmp */
extern OBJ _APairCompare_4(OBJ,OBJ,OBJ,OBJ);OBJ __APairCompare_4; /* eq? */

extern OBJ _APairCompare_3(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* cmp */
{OBJ r;
 {OBJ x21=FLD1(x3,1);OBJ x22=FLD1(x3,2);
  if(EXPRD(x3,1)){
   DSPRDF(x3);
  }else{
   COPY(x21,1);COPY(x22,1);
   FRPRD(x3,1);}
  {OBJ x33=FLD1(x4,1);OBJ x34=FLD1(x4,2);
   if(EXPRD(x4,1)){
    COPY(x33,1);
    DSPRDF(x4);
   }else{
    COPY(x33,2);COPY(x34,1);
    FRPRD(x4,1);}
   CPCLS(x1,1);
   COPY(x21,1);
   {OBJ x35;
    x35=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x21,x33);
    if(ISTGPRM(x35,1)){
     FRCLS(x1,1);
     FRCLS(x2,1);
     FREE(x21,1);
     FREE(x22,1);
     FREE(x33,1);
     FREE(x34,1);
     COPY(__ARelCmp_6,1);
     r=__ARelCmp_6;
    }else{
     {OBJ x36;
      x36=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x33,x21);
      if(ISTGPRM(x36,1)){
       FRCLS(x2,1);
       FREE(x22,1);
       FREE(x34,1);
       COPY(__ARelCmp_2,1);
       r=__ARelCmp_2;
      }else{
       CPCLS(x2,1);
       COPY(x22,1);
       COPY(x34,1);
       {OBJ x37;
	x37=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x2,2))(x2,x22,x34);
	if(ISTGPRM(x37,1)){
	 FRCLS(x2,1);
	 FREE(x22,1);
	 FREE(x34,1);
	 COPY(__ARelCmp_6,1);
	 r=__ARelCmp_6;
	}else{
	 {OBJ x38;
	  x38=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x2,2))(x2,x34,x22);
	  if(ISTGPRM(x38,1)){
	   COPY(__ARelCmp_2,1);
	   r=__ARelCmp_2;
	  }else{
	   COPY(__ARelCmp_4,1);
	   r=__ARelCmp_4;}}}}}}}}}}
 return r;}

extern OBJ _APairCompare_4(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* eq? */
{OBJ r;
 {OBJ x18=FLD1(x3,1);OBJ x19=FLD1(x3,2);
  if(EXPRD(x3,1)){
   DSPRDF(x3);
  }else{
   COPY(x18,1);COPY(x19,1);
   FRPRD(x3,1);}
  {OBJ x27=FLD1(x4,1);OBJ x28=FLD1(x4,2);
   if(EXPRD(x4,1)){
    DSPRDF(x4);
   }else{
    COPY(x27,1);COPY(x28,1);
    FRPRD(x4,1);}
   {OBJ x29;
    x29=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x18,x27);
    if(ISTGPRM(x29,1)){
     r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x2,2))(x2,x19,x28);
    }else{
     FRCLS(x2,1);
     FREE(x19,1);
     FREE(x28,1);
     r=__ABUILTIN_3;}}}}
 return r;}

static OBJ _mt_4_0_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,2);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 return r;}

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

static OBJ _mt_4_2_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),t1,t2);
 return r;}

init_APairCompare()
{
 static int visited=0; if(visited) return; visited=1;
 init_APair();
 init_ARelCmp();
 CLS(4,_APairCompare_4,__APairCompare_4);
 CLS(4,_APairCompare_3,__APairCompare_3);
 MTH(4,0,2,_mt_4_0_2);LZYMTH(4,0,2,_mt_4_0_2);
 MTH(4,0,4,_mt_4_0_4);LZYMTH(4,0,4,_mt_4_0_4);
 MTH(4,2,2,_mt_4_2_2);LZYMTH(4,2,2,_mt_4_2_2);}

