

#include "BUILTIN.h"
extern OBJ _AIc_30(OBJ);extern OBJ __AIc_30;
extern OBJ _AIc_90(OBJ);extern OBJ __AIc_90;
extern OBJ _AIc_129(OBJ);extern OBJ __AIc_129;

#include "Nat.h"
extern OBJ __ASeq_6;
extern OBJ _AIde_13(OBJ,OBJ);extern OBJ __AIde_13;

#include "Char.h"

#include "Int.h"
extern OBJ _ASeqCompare_3(OBJ,OBJ,OBJ);extern OBJ __ASeqCompare_3;

#include "Array.h"
OBJ __ARecAna_2; /* tmcRec */
extern OBJ _ARecAna_3(OBJ);OBJ __ARecAna_3; /* tmcRec? */
OBJ __ARecAna_4; /* tailRec */
extern OBJ _ARecAna_5(OBJ);OBJ __ARecAna_5; /* tailRec? */
OBJ __ARecAna_6; /* someRec */
extern OBJ _ARecAna_7(OBJ);OBJ __ARecAna_7; /* someRec? */
extern OBJ _ARecAna_8(OBJ);OBJ __ARecAna_8; /* analyzeRecursion */
extern OBJ _ARecAna_15(OBJ,OBJ,OBJ);OBJ __ARecAna_15; /* anaSeq */
extern OBJ _ARecAna_16(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __ARecAna_16; /* anaCase */
extern OBJ _ARecAna_17(OBJ,OBJ);OBJ __ARecAna_17; /* max */

extern OBJ _ARecAna_3(OBJ x1) /* tmcRec? */
{OBJ r;
 if(ISTGPRM(x1,2)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ARecAna_5(OBJ x1) /* tailRec? */
{OBJ r;
 if(ISTGPRM(x1,1)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ARecAna_7(OBJ x1) /* someRec? */
{OBJ r;
 if(ISTGPRM(x1,0)){
  r=__ABUILTIN_5;
 }else{
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _ARecAna_8(OBJ x1) /* analyzeRecursion */
{OBJ r;
 CPPRD(x1,1);
 {OBJ x2;
  x2=_AIc_30(x1);
  if(ISTGPRD(x1,2)){
   {OBJ x25=FLD(x1,6);OBJ x26=FLD(x1,7);
    if(EXPRD(x1,1)){
     FLD(x1,6)=NIL;FLD(x1,7)=NIL;DSPRD(x1);
    }else{
     COPY(x25,1);COPY(x26,1);
     FRPRD(x1,1);}
    {OBJ x27;
     PRD1(2,x27);FLD1(x27,1)=x26;FLD1(x27,2)=__ASeq_6;
     r=_ARecAna_15(x2,x25,x27);}}
  }else{
   HLT("Ic at <unknown> : undefined selection outs\'Ic:obj->seq");}}
 return r;}

extern OBJ _ARecAna_15(register OBJ x1,register OBJ x2,register OBJ x3) /* anaSeq */
{OBJ r;
 for(;;){
  if(ISPRM(x3)){
   FRPRD(x1,1);
   FREE(x2,1);
   r=__ARecAna_6;
  }else{
   {OBJ x158=FLD1(x3,1);OBJ x159=FLD1(x3,2);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     COPY(x158,1);COPY(x159,1);
     FRPRD(x3,1);}
    if(ISPRD(x158)&&(ISTGPRD(x158,5))){
     CPPRD(x1,1);
     CPPRD(x158,1);
     {OBJ x164;OBJ x165;
      x164=_AIc_90(x158);
      x165=_AIde_13(x164,x1);
      if(ISTGPRM(x165,1)){
       if(ISPRM(x159)){
	FRPRD(x1,1);
	CPCLS(__AIde_13,1);
	{OBJ x166;OBJ x167;
	 x166=_AIc_129(x158);
	 x167=_ASeqCompare_3(__AIde_13,x166,x2);
	 if(ISTGPRM(x167,1)){
	  r=__ARecAna_4;
	 }else{
	  r=__ARecAna_2;}}
       }else{
	{OBJ x168=FLD1(x159,1);OBJ x169=FLD1(x159,2);
	 COPY(x168,1);COPY(x169,1);
	 if(EXPRD(x158,1)){
	  DSPRD(x158);
	 }else{
	  DCPRD(x158,1);}
	 {OBJ x172;OBJ x181;
	  if(ISPRM(x169)){
	   x172=__ABUILTIN_5;
	  }else{
	   if(EXPRD(x169,1)){
	    DSPRD(x169);
	   }else{
	    DCPRD(x169,1);}
	   x172=__ABUILTIN_3;}
	  if(ISTGPRM(x172,1)){
	   if(ISPRD(x168)&&(ISTGPRD(x168,12)||ISTGPRD(x168,11))){
	    if(EXPRD(x168,1)){
	     DSPRD(x168);
	    }else{
	     DCPRD(x168,1);}
	    x181=__ABUILTIN_5;
	   }else{
	    FREE(x168,1);
	    x181=__ABUILTIN_3;}
	  }else{
	   FREE(x168,1);
	   x181=__ABUILTIN_3;}
	  if(ISTGPRM(x181,1)){
	   FRPRD(x1,1);
	   FREE(x2,1);
	   if(EXPRD(x159,1)){
	    DSPRD(x159);
	   }else{
	    DCPRD(x159,1);}
	   r=__ARecAna_2;
	  }else{
	   x3=x159;continue;}}}}
      }else{
       if(EXPRD(x158,1)){
	DSPRD(x158);
       }else{
	DCPRD(x158,1);}
       x3=x159;continue;}}
    }else{
     if(ISPRD(x158)&&(ISTGPRD(x158,14))){
      {OBJ x184=FLD(x158,3);OBJ x185=FLD(x158,4);
       if(EXPRD(x158,1)){
	FLD(x158,3)=NIL;FLD(x158,4)=NIL;DSPRD(x158);
       }else{
	COPY(x184,1);COPY(x185,1);
	FRPRD(x158,1);}
       if(ISPRM(x159)){
	r=_ARecAna_16(x1,x2,x184,x185,__ARecAna_6);
       }else{
	FREE(x184,1);
	FREE(x185,1);
	x3=x159;continue;}}
     }else{
      if(ISPRD(x158)&&(ISTGPRD(x158,13))){
       {OBJ x189=FLD(x158,2);
	if(EXPRD(x158,1)){
	 FREE(FLD(x158,1),1);DSPRDF(x158);
	}else{
	 COPY(x189,1);
	 FRPRD(x158,1);}
	if(ISPRM(x159)){
	 x3=x189;continue;
	}else{
	 FREE(x189,1);
	 x3=x159;continue;}}
      }else{
       FREE(x158,1);
       x3=x159;continue;}}}}}
  break;}
 return r;}

extern OBJ _ARecAna_16(register OBJ x1,register OBJ x2,register OBJ x3,register OBJ x4,register OBJ x5) /* anaCase */
{OBJ r;
 for(;;){
  if(ISPRM(x3)){
   {OBJ x28;OBJ x29;
    PRD1(2,x28);FLD1(x28,1)=x4;FLD1(x28,2)=__ASeq_6;
    x29=_ARecAna_15(x1,x2,x28);
    r=_ARecAna_17(x29,x5);}
  }else{
   {OBJ x30=FLD1(x3,1);OBJ x31=FLD1(x3,2);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     CPPRD(x30,1);COPY(x31,1);
     FRPRD(x3,1);}
    {OBJ x35=FLD1(x30,4);
     if(EXPRD(x30,1)){
      FLD1(x30,4)=NIL;DSPRD(x30);
     }else{
      COPY(x35,1);
      FRPRD(x30,1);}
     CPPRD(x1,1);
     COPY(x2,1);
     {OBJ x36;OBJ x37;
      x36=_ARecAna_15(x1,x2,x35);
      x37=_ARecAna_17(x36,x5);
      if(ISTGPRM(x37,2)){
       r=x37;
       FRPRD(x1,1);
       FREE(x2,1);
       FREE(x4,1);
       FREE(x31,1);
      }else{
       x3=x31;x5=x37;continue;}}}}}
  break;}
 return r;}

extern OBJ _ARecAna_17(OBJ x1,OBJ x2) /* max */
{OBJ r;
 if(ISTGPRM(x2,2)){
  r=x2;
 }else{
  {OBJ x6;OBJ x7;
   if(ISTGPRM(x1,2)){
    x6=__ABUILTIN_5;
   }else{
    x6=__ABUILTIN_3;}
   if(ISTGPRM(x6,1)){
    x7=__ABUILTIN_5;
   }else{
    if(ISTGPRM(x1,1)){
     x7=__ABUILTIN_5;
    }else{
     x7=__ABUILTIN_3;}}
   if(ISTGPRM(x7,1)){
    r=x1;
   }else{
    r=x2;}}}
 return r;}




init_ARecAna()
{
 static int visited=0; if(visited) return; visited=1;
 init_AIc();
 init_ANat();
 init_ASeq();
 init_ASet();
 init_ANatMap();
 init_AIde();
 init_AStore();
 init_ASourceAn();
 init_AOption();
 init_AFormat();
 init_AString();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AChar();
 init_AFile();
 init_AInt();
 init_APair();
 init_ASeqCompare();
 init_ARelCmp();
 init_AArray();
 init_AMap();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 CLS(2,_ARecAna_17,__ARecAna_17);
 CLS(5,_ARecAna_16,__ARecAna_16);
 CLS(3,_ARecAna_15,__ARecAna_15);
 CLS(1,_ARecAna_8,__ARecAna_8);
 CLS(1,_ARecAna_7,__ARecAna_7);
 CLS(1,_ARecAna_5,__ARecAna_5);
 CLS(1,_ARecAna_3,__ARecAna_3);
 PRM(2,__ARecAna_2);
 PRM(1,__ARecAna_4);
 PRM(0,__ARecAna_6);}

