

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ __AOption_5;
extern OBJ __ASeq_6;
extern OBJ _ASeq_40(OBJ,OBJ);extern OBJ __ASeq_40;
extern OBJ _ASeq_41(OBJ,OBJ);extern OBJ __ASeq_41;
extern OBJ _ASeq_42(OBJ,OBJ);extern OBJ __ASeq_42;
extern OBJ _ASeq_52(OBJ,OBJ);extern OBJ __ASeq_52;
extern TUP2 _APair_8(OBJ);extern OBJ __APair_8;
extern OBJ _ASetMap_5(OBJ,OBJ,OBJ,OBJ);extern OBJ __ASetMap_5;
extern OBJ _ASeqMap_3(OBJ,OBJ);extern OBJ __ASeqMap_3;
extern OBJ _ASeqReduce_3(OBJ,OBJ,OBJ);extern OBJ __ASeqReduce_3;

#include "Char.h"
extern OBJ _AMapByOS_5(OBJ);OBJ __AMapByOS_5; /* {} */
extern OBJ _AMapByOS_6(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_6; /* def */
extern OBJ _AMapByOS_8(OBJ,OBJ,OBJ);OBJ __AMapByOS_8; /* undef */
extern OBJ _AMapByOS_9(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_9; /* upd */
extern OBJ _AMapByOS_10(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_10; /* extend */
extern OBJ _AMapByOS_11(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_11; /* .. */
extern OBJ _AMapByOS_12(OBJ,OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_12; /* iter */
extern OBJ _AMapByOS_13(OBJ,OBJ,OBJ);OBJ __AMapByOS_13; /* init */
extern OBJ _AMapByOS_14(OBJ,OBJ,OBJ);OBJ __AMapByOS_14; /* <+ */
extern OBJ _AMapByOS_15(OBJ,OBJ,OBJ);OBJ __AMapByOS_15; /* <- */
extern OBJ _AMapByOS_16(OBJ,OBJ,OBJ);OBJ __AMapByOS_16; /* ! */
extern OBJ _AMapByOS_17(OBJ,OBJ,OBJ);OBJ __AMapByOS_17; /* !? */
extern OBJ _AMapByOS_18(OBJ,OBJ);OBJ __AMapByOS_18; /* {}? */
extern OBJ _AMapByOS_19(OBJ,OBJ,OBJ);OBJ __AMapByOS_19; /* def? */
extern OBJ _AMapByOS_20(OBJ,OBJ);OBJ __AMapByOS_20; /* dom */
extern OBJ _AMapByOS_21(OBJ,OBJ);OBJ __AMapByOS_21; /* codom */
extern OBJ _AMapByOS_22(OBJ,OBJ);OBJ __AMapByOS_22; /* # */
extern OBJ _AMapByOS_23(OBJ,OBJ,OBJ);OBJ __AMapByOS_23; /* exist? */
extern OBJ _AMapByOS_24(OBJ,OBJ,OBJ);OBJ __AMapByOS_24; /* find? */
extern OBJ _AMapByOS_25(OBJ,OBJ,OBJ);OBJ __AMapByOS_25; /* forall? */
extern OBJ _AMapByOS_26(OBJ,OBJ,OBJ);OBJ __AMapByOS_26; /* less */
extern OBJ _AMapByOS_27(OBJ,OBJ);OBJ __AMapByOS_27; /* abs */
extern OBJ _AMapByOS_28(OBJ,OBJ);OBJ __AMapByOS_28; /* rep */
extern OBJ _AMapByOS_30(OBJ,OBJ);OBJ __AMapByOS_30; /* abs? */
extern OBJ _AMapByOS_32(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_32; /* def,1 */
extern OBJ _AMapByOS_33(OBJ,OBJ,OBJ);OBJ __AMapByOS_33; /* undef,1 */
extern OBJ _AMapByOS_34(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_34; /* upd,1 */
extern OBJ _AMapByOS_35(OBJ,OBJ,OBJ);OBJ __AMapByOS_35; /* <+,1 */
extern OBJ _AMapByOS_36(OBJ,OBJ,OBJ);OBJ __AMapByOS_36; /* !?,1 */
extern OBJ _AMapByOS_37(OBJ,OBJ,OBJ,OBJ);OBJ __AMapByOS_37; /* init'37 */
extern OBJ _AMapByOS_38(OBJ);OBJ __AMapByOS_38; /* dom'38 */
extern OBJ _AMapByOS_39(OBJ);OBJ __AMapByOS_39; /* codom'39 */
extern OBJ _AMapByOS_40(OBJ,OBJ);OBJ __AMapByOS_40; /* exist?'40 */
extern OBJ _AMapByOS_41(OBJ,OBJ);OBJ __AMapByOS_41; /* find?'41 */
extern OBJ _AMapByOS_42(OBJ,OBJ);OBJ __AMapByOS_42; /* forall?'42 */

extern OBJ _AMapByOS_5(OBJ x1) /* {} */
{OBJ r;
 FRCLS(x1,1);
 r=__ASeq_6;
 return r;}

extern OBJ _AMapByOS_6(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* def */
{OBJ r;
 r=_AMapByOS_32(x1,x2,x3,x4);
 return r;}

extern OBJ _AMapByOS_8(OBJ x1,OBJ x2,OBJ x3) /* undef */
{OBJ r;
 r=_AMapByOS_33(x1,x2,x3);
 return r;}

extern OBJ _AMapByOS_9(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* upd */
{OBJ r;
 r=_AMapByOS_34(x1,x2,x3,x4);
 return r;}

extern OBJ _AMapByOS_10(register OBJ x1,register OBJ x2,register OBJ x3,register OBJ x4) /* extend */
{OBJ r;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   if(ISPRM(x4)){
    r=x2;
   }else{
    HLT("extend\'MapByOS: seq[codom] too long");}
  }else{
   {OBJ x67=FLD1(x3,1);OBJ x68=FLD1(x3,2);
    if(EXPRD(x3,1)){
     DSPRDF(x3);
    }else{
     COPY(x67,1);COPY(x68,1);
     FRPRD(x3,1);}
    if(ISPRM(x4)){
     HLT("extend\'MapByOS: seq[dom] too long");
    }else{
     {OBJ x69=FLD1(x4,1);OBJ x70=FLD1(x4,2);
      if(EXPRD(x4,1)){
       DSPRDF(x4);
      }else{
       COPY(x69,1);COPY(x70,1);
       FRPRD(x4,1);}
      CPCLS(x1,1);
      {OBJ x73;
       x73=_AMapByOS_32(x1,x67,x69,x2);
       x2=x73;x3=x68;x4=x70;continue;}}}}}
  break;}
 return r;}

extern OBJ _AMapByOS_11(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* .. */
{OBJ r;
 {OBJ x6;
  ANat_81(x2,x3,x6);
  if(ISTGPRM(x6,1)){
   FRCLS(x1,1);
   FRCLS(x4,1);
   FRCLS(x5,1);
   r=__ASeq_6;
  }else{
   CPCLS(x1,1);
   CPCLS(x4,1);
   CPCLS(x5,1);
   {OBJ x7;OBJ x8;OBJ x9;OBJ x10;
    x7=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x2);
    COPY(x7,1);
    ANat_2(x2,x8);
    x9=(*(OBJ(*)(OBJ,OBJ))METHOD(x5,1))(x5,x7);
    x10=_AMapByOS_11(x1,x8,x3,x4,x5);
    r=_AMapByOS_32(x1,x7,x9,x10);}}}
 return r;}

extern OBJ _AMapByOS_12(OBJ x1,OBJ x2,OBJ x3,OBJ x4,OBJ x5) /* iter */
{OBJ r;
 COPY(x2,1);
 CPCLS(x4,1);
 {OBJ x6;
  x6=(*(OBJ(*)(OBJ,OBJ))METHOD(x4,1))(x4,x2);
  if(ISTGPRM(x6,1)){
   CPCLS(x1,1);
   COPY(x2,2);
   CPCLS(x3,1);
   CPCLS(x5,1);
   {OBJ x11;OBJ x12;OBJ x13;
    x11=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x2);
    x12=(*(OBJ(*)(OBJ,OBJ))METHOD(x5,1))(x5,x2);
    x13=_AMapByOS_12(x1,x11,x3,x4,x5);
    r=_AMapByOS_32(x1,x2,x12,x13);}
  }else{
   FRCLS(x1,1);
   FREE(x2,1);
   FRCLS(x3,1);
   FRCLS(x4,1);
   FRCLS(x5,1);
   r=__ASeq_6;}}
 return r;}

extern OBJ _AMapByOS_13(OBJ x1,OBJ x2,OBJ x3) /* init */
{OBJ r;
 CPCLS(__AMapByOS_37,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AMapByOS_37,2))(__AMapByOS_37,x1,x3);
  r=_ASeqReduce_3(x4,__ASeq_6,x2);}
 return r;}

extern OBJ _AMapByOS_14(OBJ x1,OBJ x2,OBJ x3) /* <+ */
{OBJ r;
 r=_AMapByOS_35(x1,x2,x3);
 return r;}

extern OBJ _AMapByOS_15(OBJ x1,OBJ x2,OBJ x3) /* <- */
{OBJ r;
 CPCLS(__AMapByOS_8,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOS_8,1))(__AMapByOS_8,x1);
  r=_ASeqReduce_3(x4,x2,x3);}
 return r;}

extern OBJ _AMapByOS_16(OBJ x1,OBJ x2,OBJ x3) /* ! */
{OBJ r;
 {OBJ x4;
  x4=_AMapByOS_36(x1,x2,x3);
  if(ISPRM(x4)){
   HLT("!\'MapByOS: element not in domain");
  }else{
   {OBJ x8=FLD1(x4,1);
    if(EXPRD(x4,1)){
     r=x8;
     DSPRDF(x4);
    }else{
     COPY(x8,1);
     r=x8;
     FRPRD(x4,1);}}}}
 return r;}

extern OBJ _AMapByOS_17(OBJ x1,OBJ x2,OBJ x3) /* !? */
{OBJ r;
 r=_AMapByOS_36(x1,x2,x3);
 return r;}

extern OBJ _AMapByOS_18(OBJ x1,OBJ x2) /* {}? */
{OBJ r;
 FRCLS(x1,1);
 if(ISPRM(x2)){
  r=__ABUILTIN_5;
 }else{
  if(EXPRD(x2,1)){
   DSPRD(x2);
  }else{
   DCPRD(x2,1);}
  r=__ABUILTIN_3;}
 return r;}

extern OBJ _AMapByOS_19(OBJ x1,OBJ x2,OBJ x3) /* def? */
{OBJ r;
 {OBJ x4;
  x4=_AMapByOS_36(x1,x3,x2);
  if(ISPRM(x4)){
   r=__ABUILTIN_3;
  }else{
   if(EXPRD(x4,1)){
    FREE(FLD1(x4,1),1);DSPRDF(x4);
   }else{
    DCPRD(x4,1);}
   r=__ABUILTIN_5;}}
 return r;}

extern OBJ _AMapByOS_20(OBJ x1,OBJ x2) /* dom */
{OBJ r;
 CPCLS(__AMapByOS_26,1);
 CPCLS(__AMapByOS_38,1);
 CPCLS(x1,1);
 {OBJ x3;
  x3=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOS_26,1))(__AMapByOS_26,x1);
  r=_ASetMap_5(x3,x1,__AMapByOS_38,x2);}
 return r;}

extern OBJ _AMapByOS_21(OBJ x1,OBJ x2) /* codom */
{OBJ r;
 CPCLS(__AMapByOS_39,1);
 FRCLS(x1,1);
 r=_ASeqMap_3(__AMapByOS_39,x2);
 return r;}

extern OBJ _AMapByOS_22(OBJ x1,OBJ x2) /* # */
{OBJ r;
 FRCLS(x1,1);
 r=_ASeq_52(x2,__ANat_5);
 return r;}

extern OBJ _AMapByOS_23(OBJ x1,OBJ x2,OBJ x3) /* exist? */
{OBJ r;
 CPCLS(__AMapByOS_40,1);
 FRCLS(x1,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOS_40,1))(__AMapByOS_40,x2);
  r=_ASeq_40(x4,x3);}
 return r;}

extern OBJ _AMapByOS_24(OBJ x1,OBJ x2,OBJ x3) /* find? */
{OBJ r;
 CPCLS(__AMapByOS_41,1);
 FRCLS(x1,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOS_41,1))(__AMapByOS_41,x2);
  r=_ASeq_41(x4,x3);}
 return r;}

extern OBJ _AMapByOS_25(OBJ x1,OBJ x2,OBJ x3) /* forall? */
{OBJ r;
 CPCLS(__AMapByOS_42,1);
 FRCLS(x1,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ))METHOD(__AMapByOS_42,1))(__AMapByOS_42,x2);
  r=_ASeq_42(x4,x3);}
 return r;}

extern OBJ _AMapByOS_26(OBJ x1,OBJ x2,OBJ x3) /* less */
{OBJ r;
 {OBJ x10=FLD1(x2,1);
  if(EXPRD(x2,1)){
   FREE(FLD1(x2,2),1);DSPRDF(x2);
  }else{
   COPY(x10,1);
   FRPRD(x2,1);}
  {OBJ x12=FLD1(x3,1);
   if(EXPRD(x3,1)){
    FREE(FLD1(x3,2),1);DSPRDF(x3);
   }else{
    COPY(x12,1);
    FRPRD(x3,1);}
   {OBJ x14;
    x14=x12;
    r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x10,x14);}}}
 return r;}

extern OBJ _AMapByOS_27(OBJ x1,OBJ x2) /* abs */
{OBJ r;
 FRCLS(x1,1);
 r=x2;
 return r;}

extern OBJ _AMapByOS_28(OBJ x1,OBJ x2) /* rep */
{OBJ r;
 FRCLS(x1,1);
 r=x2;
 return r;}

extern OBJ _AMapByOS_30(OBJ x1,OBJ x2) /* abs? */
{OBJ r;
 FRCLS(x1,1);
 FREE(x2,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _AMapByOS_32(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* def,1 */
{OBJ r;
 if(ISPRM(x4)){
  FRCLS(x1,1);
  {OBJ x47;
   PRD1(2,x47);FLD1(x47,1)=x2;FLD1(x47,2)=x3;
   PRD1(2,r);FLD1(r,1)=x47;FLD1(r,2)=__ASeq_6;}
 }else{
  {OBJ x48=FLD1(x4,1);OBJ x49=FLD1(x4,2);FLAG x_x4=EXPRD(x4,1);
   if(x_x4){
   }else{
    CPPRD(x48,1);COPY(x49,1);}
   {OBJ x51=FLD1(x48,1);OBJ x52=FLD1(x48,2);FLAG x_x48=EXPRD(x48,1);
    if(x_x48){
     COPY(x51,1);
    }else{
     COPY(x51,2);COPY(x52,1);}
    CPCLS(x1,1);
    COPY(x2,1);
    {OBJ x53;
     x53=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x51);
     if(ISTGPRM(x53,1)){
      FRCLS(x1,1);
      {OBJ x54;OBJ x55;OBJ x56;
       if(x_x48){
	RSOME(x48,x54);FLD1(x54,1)=x2;FLD1(x54,2)=x3;
       }else{
	FRPRD(x48,1);PRD1(2,x54);FLD1(x54,1)=x2;FLD1(x54,2)=x3;}
       if(x_x4){
	RSOME(x4,x55);FLD1(x55,1)=x51;FLD1(x55,2)=x52;
       }else{
	FRPRD(x4,1);PRD1(2,x55);FLD1(x55,1)=x51;FLD1(x55,2)=x52;}
       PRD1(2,x56);FLD1(x56,1)=x55;FLD1(x56,2)=x49;
       PRD1(2,r);FLD1(r,1)=x54;FLD1(r,2)=x56;}
     }else{
      CPCLS(x1,1);
      COPY(x2,1);
      COPY(x51,1);
      {OBJ x57;
       x57=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x51,x2);
       if(ISTGPRM(x57,1)){
	{OBJ x58;OBJ x59;
	 x58=_AMapByOS_32(x1,x2,x3,x49);
	 if(x_x48){
	  RSOME(x48,x59);
	 }else{
	  FRPRD(x48,1);PRD1(2,x59);FLD1(x59,1)=x51;FLD1(x59,2)=x52;}
	 if(x_x4){
	  RSOME(x4,r);FLD1(r,1)=x59;FLD1(r,2)=x58;
	 }else{
	  FRPRD(x4,1);PRD1(2,r);FLD1(r,1)=x59;FLD1(r,2)=x58;}}
       }else{
	FRCLS(x1,1);
	FREE(x51,1);
	FREE(x52,1);
	{OBJ x60;
	 if(x_x48){
	  RSOME(x48,x60);FLD1(x60,1)=x2;FLD1(x60,2)=x3;
	 }else{
	  FRPRD(x48,1);PRD1(2,x60);FLD1(x60,1)=x2;FLD1(x60,2)=x3;}
	 if(x_x4){
	  RSOME(x4,r);FLD1(r,1)=x60;
	 }else{
	  FRPRD(x4,1);PRD1(2,r);FLD1(r,1)=x60;FLD1(r,2)=x49;}}}}}}}}}
 return r;}

extern OBJ _AMapByOS_33(register OBJ x1,register OBJ x2,register OBJ x3) /* undef,1 */
{OBJ r;OBJ* p1=&r;
 for(;;){
  if(ISPRM(x3)){
   FRCLS(x1,1);
   FREE(x2,1);
   *p1=__ASeq_6;
  }else{
   {OBJ x35=FLD1(x3,1);OBJ x36=FLD1(x3,2);
    CPPRD(x35,1);COPY(x36,1);
    {OBJ x38=FLD1(x35,1);
     COPY(x38,2);
     CPCLS(x1,1);
     COPY(x2,1);
     {OBJ x40;
      x40=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x38);
      if(ISTGPRM(x40,1)){
       FRCLS(x1,1);
       FREE(x2,1);
       if(EXPRD(x35,1)){
	DSPRD(x35);
       }else{
	DCPRD(x35,1);}
       FREE(x36,1);
       FREE(x38,1);
       *p1=x3;
      }else{
       if(EXPRD(x3,1)){
	DSPRD(x3);
       }else{
	DCPRD(x3,1);}
       CPCLS(x1,1);
       COPY(x2,1);
       {OBJ x41;
	x41=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x38,x2);
	if(ISTGPRM(x41,1)){
	 {
	  PRD1(2,*p1);FLD1(*p1,1)=x35;
	  x3=x36;p1=&FLD1(*p1,2);continue;}
	}else{
	 *p1=x36;
	 FRCLS(x1,1);
	 FREE(x2,1);
	 if(EXPRD(x35,1)){
	  DSPRD(x35);
	 }else{
	  DCPRD(x35,1);}}}}}}}}
  break;}
 return r;}

extern OBJ _AMapByOS_34(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* upd,1 */
{OBJ r;
 if(ISPRM(x4)){
  FRCLS(x1,1);
  FREE(x2,1);
  FRCLS(x3,1);
  r=__ASeq_6;
 }else{
  {OBJ x42=FLD1(x4,1);OBJ x43=FLD1(x4,2);
   CPPRD(x42,1);COPY(x43,1);
   {OBJ x45=FLD1(x42,1);OBJ x46=FLD1(x42,2);
    COPY(x45,2);COPY(x46,1);
    CPCLS(x1,1);
    COPY(x2,1);
    {OBJ x47;
     x47=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x2,x45);
     if(ISTGPRM(x47,1)){
      if(EXPRD(x42,1)){
       DSPRD(x42);
      }else{
       DCPRD(x42,1);}
      FRCLS(x1,1);
      FREE(x2,1);
      FRCLS(x3,1);
      FREE(x43,1);
      FREE(x45,1);
      FREE(x46,1);
      r=x4;
     }else{
      if(EXPRD(x4,1)){
       DSPRD(x4);
      }else{
       DCPRD(x4,1);}
      CPCLS(x1,1);
      COPY(x2,1);
      COPY(x45,1);
      {OBJ x48;
       x48=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x45,x2);
       if(ISTGPRM(x48,1)){
	{OBJ x49;OBJ x50;
	 x49=_AMapByOS_34(x1,x2,x3,x43);
	 if(EXPRD(x42,1)){
	  RSOME(x42,x50);FREE(FLD1(x50,1),1);FREE(FLD1(x50,2),1);
	 }else{
	  DCPRD(x42,1);PRD1(2,x50);FLD1(x50,1)=x45;FLD1(x50,2)=x46;}
	 PRD1(2,r);FLD1(r,1)=x50;FLD1(r,2)=x49;}
       }else{
	FRCLS(x1,1);
	FREE(x45,1);
	{OBJ x51;OBJ x52;
	 x51=(*(OBJ(*)(OBJ,OBJ))METHOD(x3,1))(x3,x46);
	 if(EXPRD(x42,1)){
	  RSOME(x42,x52);FREE(FLD1(x52,1),1);FLD1(x52,1)=x2;FREE(FLD1(x52,2),1);FLD1(x52,2)=x51;
	 }else{
	  DCPRD(x42,1);PRD1(2,x52);FLD1(x52,1)=x2;FLD1(x52,2)=x51;}
	 PRD1(2,r);FLD1(r,1)=x52;FLD1(r,2)=x43;}}}}}}}}
 return r;}

extern OBJ _AMapByOS_35(register OBJ x1,register OBJ x2,register OBJ x3) /* <+,1 */
{OBJ r;OBJ* p1=&r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   if(ISPRM(x3)){
    *p1=__ASeq_6;
   }else{
    *p1=x3;}
  }else{
   {OBJ x139=FLD1(x2,1);OBJ x140=FLD1(x2,2);
    CPPRD(x139,1);COPY(x140,1);
    if(ISPRM(x3)){
     FRCLS(x1,1);
     FRPRD(x139,1);
     FREE(x140,1);
     *p1=x2;
    }else{
     {OBJ x141=FLD1(x3,1);OBJ x142=FLD1(x3,2);FLAG x_x3=EXPRD(x3,1);
      if(x_x3){
      }else{
       CPPRD(x141,1);COPY(x142,1);}
      if(EXPRD(x2,1)){
       DSPRD(x2);
      }else{
       DCPRD(x2,1);}
      {OBJ x145=FLD1(x139,1);OBJ x146=FLD1(x139,2);FLAG x_x139=EXPRD(x139,1);
       if(x_x139){
       }else{
	COPY(x145,1);COPY(x146,1);}
       {OBJ x147=FLD1(x141,1);OBJ x148;FLAG x_x141=EXPRD(x141,1);
	if(x_x141){
	 COPY(x147,2);
	}else{
	 x148=FLD1(x141,2);COPY(x147,3);COPY(x148,1);}
	CPCLS(x1,1);
	COPY(x145,1);
	{OBJ x149;OBJ x150;
	 if(x_x141){
	  RSOME(x141,x149);
	 }else{
	  FRPRD(x141,1);PRD1(2,x149);FLD1(x149,1)=x147;FLD1(x149,2)=x148;}
	 x150=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x145,x147);
	 if(ISTGPRM(x150,1)){
	  FREE(x147,1);
	  {OBJ x151;OBJ x152;
	   if(x_x139){
	    RSOME(x139,x151);
	   }else{
	    FRPRD(x139,1);PRD1(2,x151);FLD1(x151,1)=x145;FLD1(x151,2)=x146;}
	   if(x_x3){
	    RSOME(x3,x152);FLD1(x152,1)=x149;
	   }else{
	    FRPRD(x3,1);PRD1(2,x152);FLD1(x152,1)=x149;FLD1(x152,2)=x142;}
	   PRD1(2,*p1);FLD1(*p1,1)=x151;
	   x2=x140;x3=x152;p1=&FLD1(*p1,2);continue;}
	 }else{
	  CPCLS(x1,1);
	  COPY(x145,1);
	  {OBJ x154;
	   x154=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x147,x145);
	   if(ISTGPRM(x154,1)){
	    {OBJ x155;OBJ x156;
	     if(x_x139){
	      RSOME(x139,x155);
	     }else{
	      FRPRD(x139,1);PRD1(2,x155);FLD1(x155,1)=x145;FLD1(x155,2)=x146;}
	     if(x_x3){
	      RSOME(x3,x156);FLD1(x156,1)=x155;FLD1(x156,2)=x140;
	     }else{
	      FRPRD(x3,1);PRD1(2,x156);FLD1(x156,1)=x155;FLD1(x156,2)=x140;}
	     PRD1(2,*p1);FLD1(*p1,1)=x149;
	     x2=x156;x3=x142;p1=&FLD1(*p1,2);continue;}
	   }else{
	    if(x_x3){
	     DSPRDF(x3);
	    }else{
	     FRPRD(x3,1);}
	    FREE(x145,1);
	    FREE(x146,1);
	    {
	     if(x_x139){
	      RSOME(x139,*p1);FLD1(*p1,1)=x149;
	     }else{
	      FRPRD(x139,1);PRD1(2,*p1);FLD1(*p1,1)=x149;}
	     x2=x140;x3=x142;p1=&FLD1(*p1,2);continue;}}}}}}}}}}}
  break;}
 return r;}

extern OBJ _AMapByOS_36(register OBJ x1,register OBJ x2,register OBJ x3) /* !?,1 */
{OBJ r;
 for(;;){
  if(ISPRM(x2)){
   FRCLS(x1,1);
   FREE(x3,1);
   r=__AOption_5;
  }else{
   {OBJ x33=FLD1(x2,1);OBJ x34=FLD1(x2,2);
    if(EXPRD(x2,1)){
     DSPRDF(x2);
    }else{
     CPPRD(x33,1);COPY(x34,1);
     FRPRD(x2,1);}
    {OBJ x36=FLD1(x33,1);OBJ x37=FLD1(x33,2);
     if(EXPRD(x33,1)){
      COPY(x36,1);
      DSPRDF(x33);
     }else{
      COPY(x36,2);COPY(x37,1);
      FRPRD(x33,1);}
     CPCLS(x1,1);
     COPY(x3,1);
     {OBJ x38;
      x38=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x3,x36);
      if(ISTGPRM(x38,1)){
       FRCLS(x1,1);
       FREE(x3,1);
       FREE(x34,1);
       FREE(x36,1);
       FREE(x37,1);
       r=__AOption_5;
      }else{
       CPCLS(x1,1);
       COPY(x3,1);
       {OBJ x39;
	x39=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x36,x3);
	if(ISTGPRM(x39,1)){
	 FREE(x37,1);
	 x2=x34;continue;
	}else{
	 FRCLS(x1,1);
	 FREE(x3,1);
	 FREE(x34,1);
	 PRD1(1,r);FLD1(r,1)=x37;}}}}}}}
  break;}
 return r;}

extern OBJ _AMapByOS_37(OBJ x1,OBJ x2,OBJ x3,OBJ x4) /* init'37 */
{OBJ r;
 COPY(x3,1);
 {OBJ x5;
  x5=(*(OBJ(*)(OBJ,OBJ))METHOD(x2,1))(x2,x3);
  r=_AMapByOS_32(x1,x3,x5,x4);}
 return r;}

extern OBJ _AMapByOS_38(OBJ x1) /* dom'38 */
{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 _AMapByOS_39(OBJ x1) /* codom'39 */
{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 _AMapByOS_40(OBJ x1,OBJ x2) /* exist?'40 */
{OBJ r;
 {TUP2 x4;
  x4=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x4.c1,x4.c2);}
 return r;}

extern OBJ _AMapByOS_41(OBJ x1,OBJ x2) /* find?'41 */
{OBJ r;
 {TUP2 x4;
  x4=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x4.c1,x4.c2);}
 return r;}

extern OBJ _AMapByOS_42(OBJ x1,OBJ x2) /* forall?'42 */
{OBJ r;
 {TUP2 x4;
  x4=_APair_8(x2);
  r=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(x1,2))(x1,x4.c1,x4.c2);}
 return r;}

static OBJ _mt_5_1_2(OBJ t,OBJ t1,OBJ t2) 
{OBJ r;
 if(EXCLS(t)){
  r=t;
 }else{
  DPCLS(t,r);
  FLDCLS(r,1)=FLDCLS(t,1);
  COPY(FLDCLS(r,1),1);}
 INCCLS(r,1,2);
 FLDCLS(r,2)=t1;
 FLDCLS(r,3)=t2;
 return r;}

static OBJ _mt_5_1_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 if(EXCLS(t)){
  r=t;
 }else{
  DPCLS(t,r);
  FLDCLS(r,1)=FLDCLS(t,1);
  COPY(FLDCLS(r,1),1);}
 INCCLS(r,1,3);
 FLDCLS(r,2)=t1;
 FLDCLS(r,3)=t2;
 FLDCLS(r,4)=t3;
 return r;}

init_AMapByOS()
{
 static int visited=0; if(visited) return; visited=1;
 init_ANat();
 init_AOption();
 init_ASet();
 init_ASeq();
 init_APair();
 init_ASetMap();
 init_ASetReduce();
 init_ASeqMap();
 init_ASetConv();
 init_ASeqReduce();
 init_AString();
 init_AChar();
 init_ASeqConv();
 CLS(2,_AMapByOS_30,__AMapByOS_30);
 CLS(2,_AMapByOS_28,__AMapByOS_28);
 CLS(2,_AMapByOS_27,__AMapByOS_27);
 CLS(3,_AMapByOS_26,__AMapByOS_26);
 CLS(3,_AMapByOS_25,__AMapByOS_25);
 CLS(3,_AMapByOS_24,__AMapByOS_24);
 CLS(3,_AMapByOS_23,__AMapByOS_23);
 CLS(2,_AMapByOS_22,__AMapByOS_22);
 CLS(2,_AMapByOS_21,__AMapByOS_21);
 CLS(2,_AMapByOS_20,__AMapByOS_20);
 CLS(3,_AMapByOS_19,__AMapByOS_19);
 CLS(2,_AMapByOS_18,__AMapByOS_18);
 CLS(3,_AMapByOS_17,__AMapByOS_17);
 CLS(3,_AMapByOS_16,__AMapByOS_16);
 CLS(3,_AMapByOS_15,__AMapByOS_15);
 CLS(3,_AMapByOS_14,__AMapByOS_14);
 CLS(3,_AMapByOS_13,__AMapByOS_13);
 CLS(5,_AMapByOS_12,__AMapByOS_12);
 CLS(5,_AMapByOS_11,__AMapByOS_11);
 CLS(2,_AMapByOS_42,__AMapByOS_42);
 CLS(4,_AMapByOS_10,__AMapByOS_10);
 CLS(2,_AMapByOS_41,__AMapByOS_41);
 CLS(4,_AMapByOS_9,__AMapByOS_9);
 CLS(2,_AMapByOS_40,__AMapByOS_40);
 CLS(3,_AMapByOS_8,__AMapByOS_8);
 CLS(1,_AMapByOS_39,__AMapByOS_39);
 CLS(1,_AMapByOS_38,__AMapByOS_38);
 CLS(4,_AMapByOS_6,__AMapByOS_6);
 CLS(4,_AMapByOS_37,__AMapByOS_37);
 CLS(1,_AMapByOS_5,__AMapByOS_5);
 CLS(3,_AMapByOS_36,__AMapByOS_36);
 CLS(3,_AMapByOS_35,__AMapByOS_35);
 CLS(4,_AMapByOS_34,__AMapByOS_34);
 CLS(3,_AMapByOS_33,__AMapByOS_33);
 CLS(4,_AMapByOS_32,__AMapByOS_32);
 MTH(5,1,2,_mt_5_1_2);LZYMTH(5,1,2,_mt_5_1_2);
 MTH(5,1,3,_mt_5_1_3);LZYMTH(5,1,3,_mt_5_1_3);}

