

#include "BUILTIN.h"
extern OBJ __AIdeSet_2;
extern OBJ _AIdeMSC_1(OBJ);extern OBJ __AIdeMSC_1;
extern OBJ _AAcFun_10(OBJ,OBJ);extern OBJ __AAcFun_10;
extern OBJ _AAcFun_11(OBJ,OBJ,OBJ);extern OBJ __AAcFun_11;
extern OBJ _AAcFun_14(OBJ,OBJ);extern OBJ __AAcFun_14;
extern OBJ _AAcFun_23(OBJ,OBJ);extern OBJ __AAcFun_23;
extern OBJ _AFormatFun1_2(OBJ,OBJ,OBJ,OBJ,OBJ);extern OBJ __AFormatFun1_2;
extern OBJ _AAc_20(OBJ);extern OBJ __AAc_20;
extern OBJ _AAc_21(OBJ);extern OBJ __AAc_21;
extern OBJ _AAc_22(OBJ);extern OBJ __AAc_22;
extern OBJ _AFormatDebug_3(OBJ,OBJ,OBJ,OBJ);extern OBJ __AFormatDebug_3;
extern OBJ __ASeq_6;
extern OBJ _ASeq_26(OBJ,OBJ);extern OBJ __ASeq_26;

#include "Nat.h"
extern OBJ _ABSTree_34(OBJ,OBJ);extern OBJ __ABSTree_34;
extern OBJ _ABSTree_57(OBJ,OBJ,OBJ);extern OBJ __ABSTree_57;
extern OBJ _ABSTree_61(OBJ,OBJ,OBJ);extern OBJ __ABSTree_61;
extern OBJ _AIde_14(OBJ,OBJ);extern OBJ __AIde_14;
extern OBJ __AIde_17;
extern OBJ _AAn_7(OBJ,OBJ);extern OBJ __AAn_7;
extern OBJ _ABSTreeConv_7(OBJ,OBJ);extern OBJ __ABSTreeConv_7;
extern OBJ _AMap_16(OBJ,OBJ,OBJ);extern OBJ __AMap_16;
extern OBJ _AMap_31(OBJ,OBJ,OBJ,OBJ);extern OBJ __AMap_31;
extern OBJ _AMap_33(OBJ,OBJ,OBJ);extern OBJ __AMap_33;

#include "Bitset.h"
extern OBJ __AOptimAn_24;

#include "Array.h"

#include "Denotation.h"
extern OBJ __AFormat_9;
extern OBJ _AFmt_28(OBJ);extern OBJ __AFmt_28;

#include "Char.h"

#include "Int.h"
extern OBJ __AIdeMap_3;
extern OBJ _AOcOptions_14(OBJ,OBJ);extern OBJ __AOcOptions_14;
extern OBJ __AOcOptions_151;
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;
extern TUP2 _AOptimUnfold_1(OBJ,OBJ);OBJ __AOptimUnfold_1; /* optimUnfold */
extern OBJ _AOptimUnfold_3(OBJ,OBJ);OBJ __AOptimUnfold_3; /* deps */
extern OBJ _AOptimUnfold_4(OBJ);OBJ __AOptimUnfold_4; /* deps? */
extern OBJ _AOptimUnfold_5(OBJ);OBJ __AOptimUnfold_5; /* incount */
extern OBJ _AOptimUnfold_6(OBJ);OBJ __AOptimUnfold_6; /* graph */
extern OBJ _AOptimUnfold_7(OBJ,OBJ);OBJ __AOptimUnfold_7; /* format */
extern OBJ _AOptimUnfold_8(OBJ);OBJ __AOptimUnfold_8; /* function? */
extern OBJ _AOptimUnfold_9(OBJ);OBJ __AOptimUnfold_9; /* constant? */
extern OBJ _AOptimUnfold_10(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_10; /* sampleDeps */
extern OBJ _AOptimUnfold_11(OBJ,OBJ);OBJ __AOptimUnfold_11; /* incr */
extern OBJ _AOptimUnfold_12(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_12; /* sample */
extern TUP2 _AOptimUnfold_13(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_13; /* annotateUnfold */
extern OBJ _AOptimUnfold_14(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_14; /* getTargetFunction */
extern OBJ _AOptimUnfold_15(OBJ);OBJ __AOptimUnfold_15; /* format'15 */
OBJ __AOptimUnfold_16; /* format'16 */
extern OBJ _AOptimUnfold_17(OBJ);OBJ __AOptimUnfold_17; /* format'17 */
OBJ __AOptimUnfold_18; /* format'18 */
extern OBJ _AOptimUnfold_19(OBJ);OBJ __AOptimUnfold_19; /* format'19 */
OBJ __AOptimUnfold_20; /* format'20 */
extern OBJ _AOptimUnfold_21(OBJ);OBJ __AOptimUnfold_21; /* format'21 */
extern OBJ _AOptimUnfold_22(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_22; /* sample'22 */
extern OBJ _AOptimUnfold_23(OBJ,OBJ,OBJ);OBJ __AOptimUnfold_23; /* sample'23 */
OBJ __AOptimUnfold_24; /* optimUnfold'24 */
extern OBJ _AOptimUnfold_25(OBJ);OBJ __AOptimUnfold_25; /* optimUnfold'25 */
extern OBJ _AOptimUnfold_26(OBJ);OBJ __AOptimUnfold_26; /* optimUnfold'26 */
OBJ __AOptimUnfold_27; /* optimUnfold'27 */
extern OBJ _AOptimUnfold_28(OBJ);OBJ __AOptimUnfold_28; /* optimUnfold'28 */
OBJ __AOptimUnfold_29; /* optimUnfold'29 */
OBJ __AOptimUnfold_30; /* optimUnfold'30 */

extern TUP2 _AOptimUnfold_1(OBJ x1,OBJ x2) /* optimUnfold */
{TUP2 r;
 CPCLS(__AOptimUnfold_7,1);
 CPCLS(__AOptimUnfold_8,1);
 CPCLS(__AOptimUnfold_10,1);
 CPCLS(__AOptimUnfold_25,1);
 CPCLS(__AOptimUnfold_26,1);
 CPCLS(__AOptimUnfold_28,1);
 CPCLS(__AAcFun_23,1);
 CPPRD(x2,4);
 {OBJ x7;OBJ x8;OBJ x9;OBJ x10;OBJ x11;OBJ x12;OBJ x13;
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_25,1))(__AOptimUnfold_25,__ABUILTIN_20);
  x8=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_26,1))(__AOptimUnfold_26,__ABUILTIN_20);
  x9=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_28,1))(__AOptimUnfold_28,__ABUILTIN_20);
  x10=(*(OBJ(*)(OBJ,OBJ))METHOD(__AAcFun_23,1))(__AAcFun_23,x2);
  x11=_AAcFun_14(__AOptimUnfold_8,x2);
  x12=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_10,1))(__AOptimUnfold_10,x2);
  x13=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_7,1))(__AOptimUnfold_7,x2);
  {OBJ x3=FLD1(x1,1);
   if(EXPRD(x1,1)){
    FLD1(x1,1)=NIL;DSPRD(x1);
   }else{
    CPPRD(x3,1);
    FRPRD(x1,1);}
   COPY(x11,1);
   CPPRD(__AOptimUnfold_29,1);
   CPPRD(__AOptimUnfold_30,1);
   CPCLS(__AAc_21,1);
   CPCLS(__AFormatFun1_2,1);
   {OBJ x6;OBJ x14;OBJ x15;OBJ x16;OBJ x17;OBJ x18;
    x6=x3;
    x14=_AOcOptions_14(__AOptimUnfold_30,x6);
    x15=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__AFormatFun1_2,4))(__AFormatFun1_2,x7,x8,x9,x10);
    x16=_ASeqMap_3(__AAc_21,x11);
    x17=_AFormatDebug_3(x14,x15,x16,x11);
    x18=_ASeqReduce_3(x12,__AOptimUnfold_29,x17);
    {OBJ x19=FLD1(x18,1);
     COPY(x19,1);
     CPCLS(__AOptimUnfold_9,1);
     {OBJ x21;OBJ x22;OBJ x23;TUP2 x26;OBJ x27;
      x21=x19;
      x22=_AIdeMSC_1(x21);
      COPY(x22,1);
      x23=_AFormatDebug_3(x14,x13,x22,x22);
      x26=_AOptimUnfold_13(x2,x18,x23);r.c1=x26.c1;
      CPPRD(r.c1,1);
      x27=_AAcFun_14(__AOptimUnfold_9,r.c1);
      r.c2=_ASeq_26(x26.c2,x27);}}}}}
 return r;}
extern OBJ _AOptimUnfold_1_c(OBJ x1,OBJ x2) /* optimUnfold */
{OBJ r;
 {TUP2 t=_AOptimUnfold_1(x1,x2);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AOptimUnfold_3(OBJ x1,OBJ x2) /* deps */
{OBJ r;
 PRD1(2,r);FLD1(r,1)=x1;FLD1(r,2)=x2;
 return r;}

extern OBJ _AOptimUnfold_4(OBJ x1) /* deps? */
{OBJ r;
 FRPRD(x1,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _AOptimUnfold_5(OBJ x1) /* incount */
{OBJ r;
 {OBJ x3=FLD1(x1,2);
  if(EXPRD(x1,1)){
   r=x3;
   FREE(FLD1(x1,1),1);DSPRDF(x1);
  }else{
   COPY(x3,1);
   r=x3;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _AOptimUnfold_6(OBJ x1) /* graph */
{OBJ r;
 {OBJ x2=FLD1(x1,1);
  if(EXPRD(x1,1)){
   r=x2;
   FREE(FLD1(x1,2),1);DSPRDF(x1);
  }else{
   COPY(x2,1);
   r=x2;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _AOptimUnfold_7(OBJ x1,OBJ x2) /* format */
{OBJ r;
 CPCLS(__AOptimUnfold_15,1);
 CPCLS(__AOptimUnfold_17,1);
 CPCLS(__AOptimUnfold_19,1);
 CPCLS(__AOptimUnfold_21,1);
 COPY(__AFormat_9,1);
 CPCLS(__AAcFun_23,1);
 CPCLS(__AFormatFun1_2,1);
 {OBJ x3;OBJ x4;OBJ x5;OBJ x6;OBJ x7;OBJ x8;
  x3=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_15,1))(__AOptimUnfold_15,__ABUILTIN_20);
  COPY(x3,1);
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_17,1))(__AOptimUnfold_17,__ABUILTIN_20);
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_19,1))(__AOptimUnfold_19,__ABUILTIN_20);
  x6=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_21,1))(__AOptimUnfold_21,__ABUILTIN_20);
  x7=(*(OBJ(*)(OBJ,OBJ))METHOD(__AAcFun_23,1))(__AAcFun_23,x1);
  x8=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ,OBJ))METHOD(__AFormatFun1_2,4))(__AFormatFun1_2,x4,x5,x6,x7);
  r=_AFormatFun1_2(x3,__AFormat_9,x3,x8,x2);}
 return r;}

extern OBJ _AOptimUnfold_8(OBJ x1) /* function? */
{OBJ r;
 if(ISTGPRD(x1,2)){
  {OBJ x25=FLD(x1,4);
   if(EXPRD(x1,1)){
    FLD(x1,4)=NIL;DSPRD(x1);
   }else{
    CPPRD(x25,1);
    FRPRD(x1,1);}
   if(ISTGPRD(x25,4)){
    if(EXPRD(x25,1)){
     DSPRD(x25);
    }else{
     DCPRD(x25,1);}
    r=__ABUILTIN_5;
   }else{
    FRPRD(x25,1);
    r=__ABUILTIN_3;}}
 }else{
  FRPRD(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AOptimUnfold_9(OBJ x1) /* constant? */
{OBJ r;
 if(ISTGPRD(x1,2)){
  {OBJ x29=FLD(x1,4);
   if(EXPRD(x1,1)){
    FLD(x1,4)=NIL;DSPRD(x1);
   }else{
    CPPRD(x29,1);
    FRPRD(x1,1);}
   if(ISTGPRD(x29,4)){
    if(EXPRD(x29,1)){
     DSPRD(x29);
    }else{
     DCPRD(x29,1);}
    r=__ABUILTIN_3;
   }else{
    FRPRD(x29,1);
    r=__ABUILTIN_5;}}
 }else{
  FRPRD(x1,1);
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AOptimUnfold_10(OBJ x1,OBJ x2,OBJ x3) /* sampleDeps */
{OBJ r;
 CPPRD(x2,1);
 {OBJ x12;
  x12=_AAc_21(x2);
  if(ISTGPRD(x2,2)){
   {OBJ x23=FLD(x2,4);
    if(EXPRD(x2,1)){
     FLD(x2,4)=NIL;DSPRD(x2);
    }else{
     CPPRD(x23,1);
     FRPRD(x2,1);}
    {OBJ x34=FLD1(x3,1);OBJ x35=FLD1(x3,2);
     if(EXPRD(x3,1)){
      CPCLS(__AOptimUnfold_11,1);
      CPCLS(__AIde_14,2);
      COPY(__AIdeSet_2,1);
      {OBJ x36;OBJ x37;OBJ x38;
       x36=_AOptimUnfold_12(x1,x23,__AIdeSet_2);
       COPY(x36,1);
       x37=_ABSTreeConv_7(__AIde_14,x36);
       x38=_AMap_31(__AIde_14,x12,x36,x34);
       RSOME(x3,r);FLD1(r,1)=x38;
       FLD1(r,2)=_ASeqReduce_3(__AOptimUnfold_11,x35,x37);}
     }else{
      COPY(x34,1);COPY(x35,1);
      CPCLS(__AOptimUnfold_11,1);
      CPCLS(__AIde_14,2);
      COPY(__AIdeSet_2,1);
      {OBJ x36;OBJ x37;OBJ x38;
       x36=_AOptimUnfold_12(x1,x23,__AIdeSet_2);
       COPY(x36,1);
       x37=_ABSTreeConv_7(__AIde_14,x36);
       x38=_AMap_31(__AIde_14,x12,x36,x34);
       FRPRD(x3,1);PRD1(2,r);FLD1(r,1)=x38;
       FLD1(r,2)=_ASeqReduce_3(__AOptimUnfold_11,x35,x37);}}}}
  }else{
   HLT("Ac at <unknown> : undefined selection def\'Ac:dec->exp");}}
 return r;}

extern OBJ _AOptimUnfold_11(OBJ x1,OBJ x2) /* incr */
{OBJ r;
 CPCLS(__AIde_14,1);
 CPPRD(x1,1);
 COPY(x2,1);
 {OBJ x3;
  x3=_AMap_33(__AIde_14,x2,x1);
  if(ISPRM(x3)){
   CPCLS(__AIde_14,1);
   r=_AMap_31(__AIde_14,x1,__ANat_8,x2);
  }else{
   {OBJ x9=FLD1(x3,1);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     FRPRD(x3,1);}
    CPCLS(__AIde_14,1);
    {OBJ x10;
     ANat_2(x9,x10);
     r=_AMap_31(__AIde_14,x1,x10,x2);}}}}
 return r;}

extern OBJ _AOptimUnfold_12(register OBJ x1,register OBJ x2,register OBJ x3) /* sample */
{OBJ r;
 for(;;){
  if(ISTGPRD(x2,2)){
   {OBJ x185=FLD(x2,2);
    if(EXPRD(x2,1)){
     FREE(FLD(x2,1),1);DSPRDF(x2);
    }else{
     CPPRD(x185,1);
     FRPRD(x2,1);}
    if(ISTGPRD(x185,0)){
     CPPRD(x185,1);
     {OBJ x188;OBJ x196;
      x188=_AAcFun_10(x1,x185);
      if(ISTGPRD(x188,2)){
       {OBJ x192=FLD(x188,4);
	if(EXPRD(x188,1)){
	 FLD(x188,4)=NIL;DSPRD(x188);
	}else{
	 CPPRD(x192,1);
	 FRPRD(x188,1);}
	if(ISTGPRD(x192,4)){
	 if(EXPRD(x192,1)){
	  DSPRD(x192);
	 }else{
	  DCPRD(x192,1);}
	 x196=__ABUILTIN_5;
	}else{
	 FRPRD(x192,1);
	 x196=__ABUILTIN_3;}}
      }else{
       FRPRD(x188,1);
       x196=__ABUILTIN_3;}
      if(ISTGPRM(x196,1)){
       CPCLS(__AIde_14,1);
       r=_ABSTree_57(__AIde_14,x185,x3);
      }else{
       if(EXPRD(x185,1)){
	DSPRDF(x185);
       }else{
	DCPRD(x185,1);}
       r=x3;}}
    }else{
     if(EXPRD(x185,1)){
      DSPRDF(x185);
     }else{
      DCPRD(x185,1);}
     FRPRD(x1,1);
     r=x3;}}
  }else{
   if(ISTGPRD(x2,3)){
    {OBJ x199=FLD(x2,2);OBJ x200=FLD(x2,3);
     if(EXPRD(x2,1)){
      FREE(FLD(x2,1),1);DSPRDF(x2);
     }else{
      CPPRD(x199,1);COPY(x200,1);
      FRPRD(x2,1);}
     CPPRD(x1,1);
     CPCLS(__AOptimUnfold_12,1);
     {OBJ x201;OBJ x202;
      x201=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_12,1))(__AOptimUnfold_12,x1);
      x202=_AOptimUnfold_12(x1,x199,x3);
      r=_ASeqReduce_3(x201,x202,x200);}}
   }else{
    if(ISTGPRD(x2,4)){
     {OBJ x205=FLD(x2,3);
      if(EXPRD(x2,1)){
       FLD(x2,3)=NIL;DSPRD(x2);
      }else{
       CPPRD(x205,1);
       FRPRD(x2,1);}
      x2=x205;continue;}
    }else{
     if(ISTGPRD(x2,5)){
      {OBJ x207=FLD(x2,2);OBJ x208=FLD(x2,3);
       if(EXPRD(x2,1)){
	FREE(FLD(x2,1),1);DSPRDF(x2);
       }else{
	COPY(x207,1);CPPRD(x208,1);
	FRPRD(x2,1);}
       CPPRD(x1,1);
       CPCLS(__AOptimUnfold_22,1);
       {OBJ x209;OBJ x210;
	x209=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_22,1))(__AOptimUnfold_22,x1);
	x210=_ASeqReduce_3(x209,x3,x207);
	x2=x208;x3=x210;continue;}}
     }else{
      if(ISTGPRD(x2,6)){
       {OBJ x212=FLD(x2,2);OBJ x213=FLD(x2,3);OBJ x214=FLD(x2,4);
	if(EXPRD(x2,1)){
	 FREE(FLD(x2,1),1);DSPRDF(x2);
	}else{
	 CPPRD(x212,1);COPY(x213,1);CPPRD(x214,1);
	 FRPRD(x2,1);}
	CPPRD(x1,2);
	CPCLS(__AOptimUnfold_23,1);
	{OBJ x215;OBJ x216;OBJ x217;
	 x215=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_23,1))(__AOptimUnfold_23,x1);
	 x216=_ASeqReduce_3(x215,x3,x213);
	 x217=_AOptimUnfold_12(x1,x214,x216);
	 x2=x212;x3=x217;continue;}}
      }else{
       FRPRD(x1,1);
       FRPRD(x2,1);
       r=x3;}}}}}
  break;}
 return r;}

extern TUP2 _AOptimUnfold_13(OBJ x1,OBJ x2,OBJ x3) /* annotateUnfold */
{TUP2 r;
 if(ISPRM(x3)){
  FRPRD(x2,1);
  r.c1=x1;r.c2=__ASeq_6;
 }else{
  {OBJ x135=FLD1(x3,1);OBJ x136=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
   if(x_x3){
   }else{
    COPY(x135,1);COPY(x136,1);}
   CPPRD(x1,1);
   CPCLS(__AOptimUnfold_14,1);
   {OBJ x137;OBJ x140;OBJ x143;OBJ x144;OBJ x145;
    x137=(*(OBJ(*)(OBJ,OBJ))METHOD(__AOptimUnfold_14,1))(__AOptimUnfold_14,x1);
    x140=_ASeqReduce_3(x137,__ASeq_6,x135);
    if(ISPRM(x140)){
     CPPRD(x2,1);
     x143=__ABUILTIN_5;
    }else{
     CPPRD(x2,1);
     x143=__ABUILTIN_3;}
    {TUP2 t=_AOptimUnfold_13(x1,x2,x136);
     x144=t.c1;
     x145=t.c2;}
    if(ISTGPRM(x143,1)){
     if(x_x3){
      DSPRDF(x3);
     }else{
      FRPRD(x3,1);}
     r.c1=x144;r.c2=x145;
     FRPRD(x2,1);
     FREE(x140,1);
    }else{
     if(ISPRM(x140)){
      HLT("Seq at <unknown> : undefined selection rt\'Seq:seq->seq");
     }else{
      {OBJ x195=FLD1(x140,1);OBJ x196=FLD1(x140,2);
       CPPRD(x195,1);COPY(x196,1);
       {OBJ x200;OBJ x206;
	if(ISPRM(x196)){
	 x200=__ABUILTIN_5;
	}else{
	 if(EXPRD(x196,1)){
	  DSPRD(x196);
	 }else{
	  DCPRD(x196,1);}
	 x200=__ABUILTIN_3;}
	if(ISTGPRM(x200,1)){
	 {OBJ x201=FLD1(x2,1);
	  COPY(x201,1);
	  CPPRD(x195,1);
	  CPCLS(__AIde_14,2);
	  {OBJ x203;OBJ x204;OBJ x205;
	   x203=_AAc_21(x195);
	   CPPRD(x203,1);
	   x204=_AMap_16(__AIde_14,x201,x203);
	   x205=_ABSTree_61(__AIde_14,x203,x204);
	   if(ISTGPRM(x205,1)){
	    x206=__ABUILTIN_3;
	   }else{
	    x206=__ABUILTIN_5;}}}
	}else{
	 x206=__ABUILTIN_3;}
	if(ISTGPRM(x206,1)){
	 if(EXPRD(x140,1)){
	  DSPRD(x140);
	 }else{
	  DCPRD(x140,1);}
	 CPPRD(x195,3);
	 {OBJ x207;OBJ x208;OBJ x209;
	  x207=_AAc_21(x195);
	  x208=_AAc_22(x195);
	  x209=_AAc_20(x195);
	  if(ISTGPRD(x195,2)){
	   {OBJ x213=FLD(x195,4);FLAG x_x195=EXPRD(x195,1);
	    if(x_x195){
	    }else{
	     CPPRD(x213,1);}
	    {OBJ x226;OBJ x219;
	     if(ISTGPRD(x213,5)||ISTGPRD(x213,4)){
	      {OBJ x222=FLD(x213,3);
	       CPPRD(x222,1);
	       x226=x222;}
	     }else{
	      HLT("Ac at <unknown> : undefined selection scope\'Ac:exp->exp");}
	     if(ISPRM(x208)){
	      x219=__AOptimAn_24;
	     }else{
	      {OBJ x216=FLD1(x208,3);
	       COPY(x216,1);
	       x219=x216;}}
	     if(ISPRD(x219)&&(ISTGPRD(x219,1))){
	      {OBJ x228=FLD(x219,2);OBJ x229=FLD(x219,3);FLAG x_x219=EXPRD(x219,1);
	       if(x_x219){
	       }else{}
	       {OBJ x231;OBJ x235;OBJ x236;OBJ x237;OBJ x238;OBJ x239;OBJ x240;
		if(ISTGPRD(x226,0)){
		 if(EXPRD(x226,1)){
		  FREE(FLD(x226,1),1);DSPRDF(x226);
		 }else{
		  DCPRD(x226,1);}
		 x231=__ABUILTIN_5;
		}else{
		 FRPRD(x226,1);
		 x231=__ABUILTIN_3;}
		if(ISTGPRM(x231,1)){
		 FRPRD(x2,1);
		 CPPRD(x207,1);
		 x235=__ANat_59;
		}else{
		 {OBJ x232=FLD1(x2,1);
		  if(EXPRD(x2,1)){
		   FREE(FLD1(x2,2),1);DSPRDF(x2);
		  }else{
		   COPY(x232,1);
		   FRPRD(x2,1);}
		  CPPRD(x207,2);
		  CPCLS(__AIde_14,2);
		  {OBJ x234;
		   x234=_AMap_16(__AIde_14,x232,x207);
		   x235=_ABSTree_34(__AIde_14,x234);}}}
		if(x_x219){
		 RPRDF(x219,x236);FLD(x236,1)=x235;
		}else{
		 FRPRD(x219,1);PRDF(3,1,x236);FLD(x236,1)=x235;FLD(x236,2)=x228;FLD(x236,3)=x229;}
		x237=_AAn_7(x208,x236);
		if(x_x195){
		 RPRD(x195,x238);FREE(FLD(x238,1),1);FLD(x238,1)=x237;FRPRD(FLD(x238,2),1);FLD(x238,2)=x207;FLD(x238,3)=x209;
		}else{
		 FRPRD(x195,1);PRD(4,2,x238);FLD(x238,1)=x237;FLD(x238,2)=x207;FLD(x238,3)=x209;FLD(x238,4)=x213;}
		CPPRD(x238,1);
		if(x_x3){
		 RSOME(x3,r.c2);FLD1(r.c2,1)=x238;FLD1(r.c2,2)=x145;
		}else{
		 FRPRD(x3,1);PRD1(2,r.c2);FLD1(r.c2,1)=x238;FLD1(r.c2,2)=x145;}
		r.c1=_AAcFun_11(x144,x207,x238);}}
	     }else{
	      HLT("OptimAn at <unknown> : undefined selection maxIdeNo\'OptimAn:optimAn->nat");}}}
	  }else{
	   HLT("Ac at <unknown> : undefined selection def\'Ac:dec->exp");}}
	}else{
	 if(x_x3){
	  DSPRDF(x3);
	 }else{
	  FRPRD(x3,1);}
	 r.c1=x144;
	 FRPRD(x2,1);
	 FRPRD(x195,1);
	 r.c2=_ASeq_26(x140,x145);}}}}}}}}
 return r;}
extern OBJ _AOptimUnfold_13_c(OBJ x1,OBJ x2,OBJ x3) /* annotateUnfold */
{OBJ r;
 {TUP2 t=_AOptimUnfold_13(x1,x2,x3);
  PRD1(2,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;}
 return r;}

extern OBJ _AOptimUnfold_14(OBJ x1,OBJ x2,OBJ x3) /* getTargetFunction */
{OBJ r;
 {OBJ x8;OBJ x9;
  if(ISTGPRD(x2,0)){
   {OBJ x5=FLD(x2,2);
    x8=x5;}
  }else{
   HLT("Ide at <unknown> : undefined selection origin\'Ide:ide->origin");}
  ANat_76(x8,__AIde_17,x9);
  if(ISTGPRM(x9,1)){
   {
    PRD1(2,r);FLD1(r,2)=x3;
    FLD1(r,1)=_AAcFun_10(x1,x2);}
  }else{
   FRPRD(x1,1);
   FRPRD(x2,1);
   r=x3;}}
 return r;}

extern OBJ _AOptimUnfold_15(OBJ x1) /* format'15 */
{OBJ r;
 CPPRD(__AOcOptions_151,1);
 r=_AFmt_28(__AOcOptions_151);
 return r;}

extern OBJ _AOptimUnfold_17(OBJ x1) /* format'17 */
{OBJ r;
 CPPRD(__AOptimUnfold_16,1);
 r=_AFmt_28(__AOptimUnfold_16);
 return r;}

extern OBJ _AOptimUnfold_19(OBJ x1) /* format'19 */
{OBJ r;
 CPPRD(__AOptimUnfold_18,1);
 r=_AFmt_28(__AOptimUnfold_18);
 return r;}

extern OBJ _AOptimUnfold_21(OBJ x1) /* format'21 */
{OBJ r;
 CPPRD(__AOptimUnfold_20,1);
 r=_AFmt_28(__AOptimUnfold_20);
 return r;}

extern OBJ _AOptimUnfold_22(OBJ x1,OBJ x2,OBJ x3) /* sample'22 */
{OBJ r;
 if(ISTGPRD(x2,2)){
  {OBJ x7=FLD(x2,4);
   if(EXPRD(x2,1)){
    FLD(x2,4)=NIL;DSPRD(x2);
   }else{
    CPPRD(x7,1);
    FRPRD(x2,1);}
   {OBJ x8;
    x8=x7;
    r=_AOptimUnfold_12(x1,x8,x3);}}
 }else{
  HLT("Ac at <unknown> : undefined selection def\'Ac:dec->exp");}
 return r;}

extern OBJ _AOptimUnfold_23(OBJ x1,OBJ x2,OBJ x3) /* sample'23 */
{OBJ r;
 {OBJ x6=FLD1(x2,3);
  if(EXPRD(x2,1)){
   FLD1(x2,3)=NIL;DSPRD(x2);
  }else{
   CPPRD(x6,1);
   FRPRD(x2,1);}
  {OBJ x7;
   x7=x6;
   r=_AOptimUnfold_12(x1,x7,x3);}}
 return r;}

extern OBJ _AOptimUnfold_25(OBJ x1) /* optimUnfold'25 */
{OBJ r;
 CPPRD(__AOptimUnfold_24,1);
 r=_AFmt_28(__AOptimUnfold_24);
 return r;}

extern OBJ _AOptimUnfold_26(OBJ x1) /* optimUnfold'26 */
{OBJ r;
 CPPRD(__AOptimUnfold_18,1);
 r=_AFmt_28(__AOptimUnfold_18);
 return r;}

extern OBJ _AOptimUnfold_28(OBJ x1) /* optimUnfold'28 */
{OBJ r;
 CPPRD(__AOptimUnfold_27,1);
 r=_AFmt_28(__AOptimUnfold_27);
 return r;}


init_AOptimUnfold()
{
 static int visited=0; if(visited) return; visited=1;
 init_ACompose();
 init_AIdeSet();
 init_AIdeMSC();
 init_AAcFun();
 init_APreparedOptions();
 init_AFormatFun1();
 init_AAc();
 init_AFormatDebug();
 init_ASeq();
 init_ASetByBST();
 init_ANat();
 init_ASetByBSTFilter();
 init_AOption();
 init_ASetByBSTConv();
 init_ANatMap();
 init_ABSTree();
 init_AIde();
 init_ATree();
 init_AAn();
 init_ABSTreeConv();
 init_ATypeAn();
 init_AMap();
 init_ASourceAn();
 init_ABitset();
 init_AOptimAn();
 init_AArray();
 init_ATransAn();
 init_AMapConv();
 init_APragmaAn();
 init_ADenotation();
 init_AStore();
 init_AMapReduce();
 init_AFormat();
 init_AString();
 init_ACom();
 init_AStream();
 init_AVoid();
 init_AFmt();
 init_AChar();
 init_AFile();
 init_AInt();
 init_ASet();
 init_APair();
 init_AIdeMap();
 init_AOcOptions();
 init_ASeqMap();
 init_ASeqReduce();
 DEN("dumpMSC",__AOptimUnfold_30);
 LCLS(1,_AOptimUnfold_28,__AOptimUnfold_28);
 DEN("}",__AOptimUnfold_27);
 LCLS(1,_AOptimUnfold_26,__AOptimUnfold_26);
 LCLS(1,_AOptimUnfold_25,__AOptimUnfold_25);
 DEN("{",__AOptimUnfold_24);
 CLS(3,_AOptimUnfold_23,__AOptimUnfold_23);
 CLS(3,_AOptimUnfold_22,__AOptimUnfold_22);
 LCLS(1,_AOptimUnfold_21,__AOptimUnfold_21);
 DEN(">",__AOptimUnfold_20);
 LCLS(1,_AOptimUnfold_19,__AOptimUnfold_19);
 DEN(",",__AOptimUnfold_18);
 LCLS(1,_AOptimUnfold_17,__AOptimUnfold_17);
 DEN("<",__AOptimUnfold_16);
 LCLS(1,_AOptimUnfold_15,__AOptimUnfold_15);
 CLS(3,_AOptimUnfold_14,__AOptimUnfold_14);
 CLS(3,_AOptimUnfold_13_c,__AOptimUnfold_13);
 CLS(3,_AOptimUnfold_12,__AOptimUnfold_12);
 CLS(2,_AOptimUnfold_11,__AOptimUnfold_11);
 CLS(3,_AOptimUnfold_10,__AOptimUnfold_10);
 CLS(1,_AOptimUnfold_9,__AOptimUnfold_9);
 CLS(1,_AOptimUnfold_8,__AOptimUnfold_8);
 CLS(2,_AOptimUnfold_7,__AOptimUnfold_7);
 CLS(1,_AOptimUnfold_6,__AOptimUnfold_6);
 CLS(1,_AOptimUnfold_5,__AOptimUnfold_5);
 CLS(1,_AOptimUnfold_4,__AOptimUnfold_4);
 CLS(2,_AOptimUnfold_3,__AOptimUnfold_3);
 CLS(2,_AOptimUnfold_1_c,__AOptimUnfold_1);
 COPY(__AIdeMap_3,2);
 PRD1(2,__AOptimUnfold_29);FLD1(__AOptimUnfold_29,1)=__AIdeMap_3;FLD1(__AOptimUnfold_29,2)=__AIdeMap_3;}

