#include "cdefs.h"
#include "mem.h"
extern cptr object_methods[meth_max];
extern cptr integer_methods[meth_max];
extern cptr character_methods[meth_max];
extern cptr boolean_methods[meth_max];
extern cptr collection_methods[meth_max];
extern cptr set_methods[meth_max];
extern cptr sset_methods[meth_max];
extern cptr rlist_methods[meth_max];
extern cptr strpool_methods[meth_max];
extern cptr charset_methods[meth_max];
extern cptr intset_methods[meth_max];
extern cptr strset_methods[meth_max];
extern cptr pset_methods[meth_max];

extern cint strpool_str_5;
extern cint strpool_str_6;
extern cint boolean_True;
extern cint object_Undefined;
extern cint boolean_False;
extern cint intset_predef;
extern cint strset_predef;
extern cint charset_predef;
extern cint strpool_str_31;
extern cint strpool_str_50;
extern cint strpool_str_51;
extern cint strpool_str_52;
extern cint strpool_str_44;
extern cint strpool_str_55;
extern cint strpool_str_56;
extern cint strpool_str_57;


cptr rset_methods[meth_max];

cint rset_alloc(cint rset_self, cint rset_rstart, cint rset_rend){
  cint rset_result;
  cint t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29;
  t2 = set_alloc((cint)rset_self);
  rset_result = t2;
  t3 = ((cptr)rset_rstart)[4] /* class_of*/ == strpool_str_5;
  t4 = t3;
  if (t4){
    t5 = ((cptr)rset_rend)[4] /* class_of*/ == strpool_str_5;
    t4 = t5;
  };
  if (t4){
    ((cptr)intset_predef)[1] += 1;
    ((cptr)rset_self)[7] /* elemtype*/ = intset_predef;
    t6 = mem_malloc(28); ((cptr)t6)[0] = integer_methods;
    t7 = integer_ialloc((cint)t6, (cint)0);
    ((cptr)rset_self)[8] /* elem*/ = t7;
  }else{
  t8 = ((cptr)rset_rstart)[4] /* class_of*/ == strpool_str_6;
  t9 = t8;
  if (t9){
    t10 = ((cptr)rset_rstart)[3] /* len*/ == 1;
    t9 = t10;
  };
  t11 = t9;
  if (t11){
    t12 = ((cptr)rset_rend)[4] /* class_of*/ == strpool_str_6;
    t11 = t12;
  };
  t13 = t11;
  if (t13){
    t14 = ((cptr)rset_rend)[3] /* len*/ == 1;
    t13 = t14;
  };
  if (t13){
    ((cptr)charset_predef)[1] += 1;
    ((cptr)rset_self)[7] /* elemtype*/ = charset_predef;
    t15 = mem_malloc(36); ((cptr)t15)[0] = character_methods;
    t16 = character_alloc((cint)t15, (cint)0, (cint)0);
    ((cptr)rset_self)[8] /* elem*/ = t16;
  }else{
    object_Dec_ref(rset_rstart);
    object_Dec_ref(rset_rend);
    set_reclaim((cint)rset_self);
    t1 = object_Undefined;
    goto t1_label;
  };};
  ((cptr)rset_self)[5] /* representation*/ = strpool_str_55;
  ((cptr)rset_self)[9] /* r_start*/ = rset_rstart;
  ((cptr)rset_self)[10] /* r_end*/ = rset_rend;
  t17 = ((cptr)rset_rstart)[2] /* hashval*/ <= ((cptr)rset_rend)[2] /* hashval*/;
  if (t17){
    t18 = ((cptr)rset_rstart)[2] /* hashval*/ - 1;
    t19 = ((cptr)rset_rend)[2] /* hashval*/ - t18;
    ((cptr)rset_self)[3] /* len*/ = t19;
    t20 = ((cptr)rset_self)[3] /* len*/ <= 0;
    if (t20){
      ((cptr)rset_self)[3] /* len*/ = -1;
    };
    t21 = ((cptr)rset_rstart)[2] /* hashval*/ - 1;
    t22 = ((cptr)rset_self)[3] /* len*/ * t21;
    t23 = ((cptr)rset_self)[3] /* len*/ + 1;
    t24 = t23 * ((cptr)rset_self)[3] /* len*/;
    t25 = t24 / 2;
    t26 = t22 + t25;
    ((cptr)rset_self)[2] /* hashval*/ = t26;
  }else{
    t27 = (cptr)(((cptr)(((cptr)rset_self)[0]))[4]); /* reclaim*/
    ((f0)t27)((cint)rset_self);
    t28 = mem_malloc(48); ((cptr)t28)[0] = sset_methods;
    t29 = sset_alloc((cint)t28);
    t1 = t29;
    goto t1_label;
  };
  t1 = rset_result;
  goto t1_label;
  t1_label: return t1;
}

cint rset_reclaim(cint rset_self){
  cint t30;
  object_Dec_ref(((cptr)rset_self)[9] /* r_start*/);
  object_Dec_ref(((cptr)rset_self)[10] /* r_end*/);
  object_Dec_ref(((cptr)rset_self)[8] /* elem*/);
  set_reclaim((cint)rset_self);
  t30_label: return t30;
}

cint rset_Contains(cint rset_self, cint rset_ob){
  cint rset_result;
  cint t31, t32, t33, t34, t35, t36, t37, t38, t39, t40, t41, t42, t43, t44, t45;
  rset_result = boolean_False;
  t32 = ((cptr)(((cptr)((cptr)rset_self)[9] /* r_start*/)[0]))[37];
  t33 = ((f0)t32)((cint)((cptr)rset_self)[9] /* r_start*/, (cint)rset_ob); /* equal*/
  t36 = t33 == 1;
  t37 = t36;
  if (!t37){  t34 = ((cptr)(((cptr)((cptr)rset_self)[10] /* r_end*/)[0]))[37];
  t35 = ((f0)t34)((cint)((cptr)rset_self)[10] /* r_end*/, (cint)rset_ob); /* equal*/
    t38 = t35 == 1;
    t37 = t38;
  };
  if (t37){
    rset_result = boolean_True;
  };
  t39 = ((cptr)(((cptr)((cptr)rset_self)[9] /* r_start*/)[0]))[60];
  t40 = ((f0)t39)((cint)((cptr)rset_self)[9] /* r_start*/, (cint)rset_ob); /* less_than*/
  t43 = t40 == 1;
  t44 = t43;
  if (t44){
  t41 = ((cptr)(((cptr)rset_ob)[0]))[60];
  t42 = ((f0)t41)((cint)rset_ob, (cint)((cptr)rset_self)[10] /* r_end*/); /* less_than*/
    t45 = t42 == 1;
    t44 = t45;
  };
  if (t44){
    rset_result = boolean_True;
  };
  object_Dec_ref(rset_self);
  object_Dec_ref(rset_ob);
  t31 = rset_result;
  goto t31_label;
  t31_label: return t31;
}

cint rset_lookup(cint rset_self, cint rset_i){
  cint rset_result;
  cint t46, t47, t48, t49, t50, t51, t52, t53, t54;
  t47 = rset_i < 1;
  t48 = t47;
  if (!t48){    t49 = rset_i > ((cptr)rset_self)[3] /* len*/;
    t48 = t49;
  };
  if (t48){
    t46 = object_Undefined;
    goto t46_label;
  };
  t50 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ + rset_i;
  t51 = t50 - 1;
  t52 = ((cptr)(((cptr)((cptr)rset_self)[8] /* elem*/)[0]))[109];
  t53 = ((f0)t52)((cint)((cptr)rset_self)[8] /* elem*/, (cint)t51); /* update_hashval*/
  rset_result = t53;
  ((cptr)rset_self)[8] /* elem*/ = rset_result;
  t46 = rset_result;
  goto t46_label;
  t46_label: return t46;
}

cint rset_Intersect(cint rset_self, cint rset_ob){
  cint rset_result, rset_os, rset_sv, rset_fv;
  cint t55, t56, t57, t58, t59, t60, t61, t62, t63, t64, t65, t66, t67, t68, t69, t70, t71, t72, t73, t74;
  rset_os = rset_ob;
  t56 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_31;
  t57 = t56;
  if (!t57){    t58 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_56;
    t59 = t58;
    if (t59){
      t60 = ((cptr)rset_self)[7] /* elemtype*/ == intset_predef;
      t59 = t60;
    };
    t57 = t59;
  };
  t61 = t57;
  if (!t61){    t62 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_57;
    t63 = t62;
    if (t63){
      t64 = ((cptr)rset_self)[7] /* elemtype*/ == strset_predef;
      t63 = t64;
    };
    t61 = t63;
  };
  t65 = t61;
  if (!t65){    t66 = rset_ob == ((cptr)rset_self)[7] /* elemtype*/;
    t65 = t66;
  };
  if (t65){
    object_Dec_ref(rset_ob);
    t55 = rset_self;
    goto t55_label;
  }else{
  t67 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_55;
  t68 = t67;
  if (t68){
    t69 = ((cptr)rset_self)[7] /* elemtype*/ == ((cptr)rset_os)[7] /* elemtype*/;
    t68 = t69;
  };
  if (t68){
    rset_sv = ((cptr)rset_self)[9] /* r_start*/;
    t70 = ((cptr)rset_sv)[2] /* hashval*/ < ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    if (t70){
      rset_sv = ((cptr)rset_os)[9] /* r_start*/;
    };
    rset_fv = ((cptr)rset_self)[10] /* r_end*/;
    t71 = ((cptr)rset_fv)[2] /* hashval*/ > ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
    if (t71){
      rset_fv = ((cptr)rset_os)[10] /* r_end*/;
    };
    t72 = mem_malloc(44); ((cptr)t72)[0] = rset_methods;
    ((cptr)rset_sv)[1] += 1;
    ((cptr)rset_fv)[1] += 1;
    t73 = rset_alloc((cint)t72, (cint)rset_sv, (cint)rset_fv);
    t55 = t73;
    goto t55_label;
  }else{
    t74 = set_Intersect((cint)rset_self, (cint)rset_ob);
    t55 = t74;
    goto t55_label;
  };};
  t55 = rset_result;
  goto t55_label;
  t55_label: return t55;
}

cint rset_Make_list(cint rset_self){
  cint rset_result;
  cint t75, t76, t77;
  t76 = mem_malloc(44); ((cptr)t76)[0] = rlist_methods;
  ((cptr)((cptr)rset_self)[9] /* r_start*/)[1] += 1;
  ((cptr)((cptr)rset_self)[10] /* r_end*/)[1] += 1;
  t77 = rlist_alloc((cint)t76, (cint)((cptr)rset_self)[9] /* r_start*/, (cint)((cptr)rset_self)[10] /* r_end*/);
  rset_result = t77;
  object_Dec_ref(rset_self);
  t75 = rset_result;
  goto t75_label;
  t75_label: return t75;
}

cint rset_Max(cint rset_self, cint rset_ob){
  cint rset_result;
  cint t78, t79, t80;
  t79 = rset_ob != object_Undefined;
  if (t79){
    t80 = collection_Max((cint)rset_self, (cint)rset_ob);
    t78 = t80;
    goto t78_label;
  };
  ((cptr)((cptr)rset_self)[10] /* r_end*/)[1] += 1;
  rset_result = ((cptr)rset_self)[10] /* r_end*/;
  object_Dec_ref(rset_self);
  object_Dec_ref(rset_ob);
  t78 = rset_result;
  goto t78_label;
  t78_label: return t78;
}

cint rset_Min(cint rset_self, cint rset_ob){
  cint rset_result;
  cint t81, t82, t83;
  t82 = rset_ob != object_Undefined;
  if (t82){
    t83 = collection_Min((cint)rset_self, (cint)rset_ob);
    t81 = t83;
    goto t81_label;
  };
  ((cptr)((cptr)rset_self)[9] /* r_start*/)[1] += 1;
  rset_result = ((cptr)rset_self)[9] /* r_start*/;
  object_Dec_ref(rset_self);
  object_Dec_ref(rset_ob);
  t81 = rset_result;
  goto t81_label;
  t81_label: return t81;
}

cint rset_Minus(cint rset_self, cint rset_ob){
  cint rset_result, rset_os, rset_sv, rset_fv;
  cint t84, t85, t86, t87, t88, t89, t90, t91, t92, t93, t94, t95, t96, t97, t98, t99, t100, t101, t102, t103, t104, t105, t106, t107, t108, t109, t110, t111, t112, t113, t114, t115, t116, t117, t118, t119, t120, t121, t122, t123, t124, t125, t126;
  rset_os = rset_ob;
  t85 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_31;
  t86 = t85;
  if (!t86){    t87 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_56;
    t88 = t87;
    if (t88){
      t89 = ((cptr)rset_self)[7] /* elemtype*/ == intset_predef;
      t88 = t89;
    };
    t86 = t88;
  };
  t90 = t86;
  if (!t90){    t91 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_57;
    t92 = t91;
    if (t92){
      t93 = ((cptr)rset_self)[7] /* elemtype*/ == charset_predef;
      t92 = t93;
    };
    t90 = t92;
  };
  t94 = t90;
  if (!t94){    t95 = rset_ob == ((cptr)rset_self)[7] /* elemtype*/;
    t94 = t95;
  };
  if (t94){
    object_Dec_ref(rset_self);
    object_Dec_ref(rset_ob);
    t96 = mem_malloc(48); ((cptr)t96)[0] = sset_methods;
    t97 = sset_alloc((cint)t96);
    t84 = t97;
    goto t84_label;
  }else{
  t98 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_55;
  t99 = t98;
  if (t99){
    t100 = ((cptr)rset_self)[7] /* elemtype*/ == ((cptr)rset_os)[7] /* elemtype*/;
    t99 = t100;
  };
  if (t99){
    t101 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ < ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t102 = t101;
    if (t102){
      t103 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
      t102 = t103;
    };
    t104 = t102;
    if (t104){
      t105 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t104 = t105;
    };
    if (t104){
      ((cptr)((cptr)rset_self)[9] /* r_start*/)[1] += 1;
      rset_sv = ((cptr)rset_self)[9] /* r_start*/;
      ((cptr)((cptr)rset_self)[8] /* elem*/)[1] += 1;
      t106 = ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/ - 1;
      t107 = ((cptr)(((cptr)((cptr)rset_self)[8] /* elem*/)[0]))[109];
      t108 = ((f0)t107)((cint)((cptr)rset_self)[8] /* elem*/, (cint)t106); /* update_hashval*/
      rset_fv = t108;
      object_Dec_ref(rset_self);
      object_Dec_ref(rset_ob);
      t110 = mem_malloc(44); ((cptr)t110)[0] = rset_methods;
      t111 = rset_alloc((cint)t110, (cint)rset_sv, (cint)rset_fv);
      t84 = t111;
      goto t84_label;
    }else{
    t112 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t113 = t112;
    if (t113){
      t114 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t113 = t114;
    };
    t115 = t113;
    if (t115){
      t116 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ > ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t115 = t116;
    };
    if (t115){
      ((cptr)((cptr)rset_self)[8] /* elem*/)[1] += 1;
      t117 = ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/ + 1;
      t118 = ((cptr)(((cptr)((cptr)rset_self)[8] /* elem*/)[0]))[109];
      t119 = ((f0)t118)((cint)((cptr)rset_self)[8] /* elem*/, (cint)t117); /* update_hashval*/
      rset_sv = t119;
      ((cptr)((cptr)rset_self)[10] /* r_end*/)[1] += 1;
      rset_fv = ((cptr)rset_self)[10] /* r_end*/;
      object_Dec_ref(rset_self);
      object_Dec_ref(rset_ob);
      t121 = mem_malloc(44); ((cptr)t121)[0] = rset_methods;
      t122 = rset_alloc((cint)t121, (cint)rset_sv, (cint)rset_fv);
      t84 = t122;
      goto t84_label;
    }else{
    t123 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ > ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
    t124 = t123;
    if (!t124){      t125 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ < ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
      t124 = t125;
    };
    if (t124){
      object_Dec_ref(rset_ob);
      t84 = rset_self;
      goto t84_label;
    };};};
  };};
  t126 = set_Minus((cint)rset_self, (cint)rset_ob);
  t84 = t126;
  goto t84_label;
  t84_label: return t84;
}

cint rset_Mkstr(cint rset_self){
  cint rset_result;
  cint t127, t128, t129, t130, t131, t132, t133, t134, t135, t136, t137;
  t128 = ((cptr)rset_self)[3] /* len*/ == 0;
  if (t128){
    ((cptr)strpool_str_50)[1] += 1;
    rset_result = strpool_str_50;
  }else{
    ((cptr)strpool_str_51)[1] += 1;
    t129 = ((cptr)(((cptr)rset_self)[0]))[112];
    t130 = ((f0)t129)((cint)rset_self); /* ubstr*/
    t131 = ((cptr)(((cptr)strpool_str_51)[0]))[97];
    t132 = ((f0)t131)((cint)strpool_str_51, (cint)t130); /* Plus*/
    ((cptr)strpool_str_52)[1] += 1;
    t135 = ((cptr)(((cptr)t132)[0]))[97];
    t136 = ((f0)t135)((cint)t132, (cint)strpool_str_52); /* Plus*/
    rset_result = t136;
  };
  object_Dec_ref(rset_self);
  t127 = rset_result;
  goto t127_label;
  t127_label: return t127;
}

cint rset_Plus(cint rset_self, cint rset_ob){
  cint rset_result, rset_os, rset_sv, rset_fv;
  cint t138, t139, t140, t141, t142, t143, t144, t145, t146, t147, t148, t149, t150, t151, t152, t153, t154, t155, t156, t157, t158, t159, t160, t161, t162, t163, t164, t165, t166, t167, t168, t169, t170, t171, t172, t173, t174, t175, t176, t177, t178, t179, t180, t181, t182, t183, t184;
  rset_os = rset_ob;
  t139 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_31;
  t140 = t139;
  if (!t140){    t141 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_56;
    t142 = t141;
    if (t142){
      t143 = ((cptr)rset_self)[7] /* elemtype*/ == intset_predef;
      t142 = t143;
    };
    t140 = t142;
  };
  t144 = t140;
  if (!t144){    t145 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_57;
    t146 = t145;
    if (t146){
      t147 = ((cptr)rset_self)[7] /* elemtype*/ == charset_predef;
      t146 = t147;
    };
    t144 = t146;
  };
  t148 = t144;
  if (!t148){    t149 = rset_ob == ((cptr)rset_self)[7] /* elemtype*/;
    t148 = t149;
  };
  if (t148){
    object_Dec_ref(rset_self);
    t138 = rset_ob;
    goto t138_label;
  }else{
  t150 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_55;
  t151 = t150;
  if (t151){
    t152 = ((cptr)rset_self)[7] /* elemtype*/ == ((cptr)rset_os)[7] /* elemtype*/;
    t151 = t152;
  };
  if (t151){
    t153 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t154 = t153;
    if (t154){
      t155 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
      t154 = t155;
    };
    t156 = t154;
    if (t156){
      t157 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t156 = t157;
    };
    if (t156){
      ((cptr)((cptr)rset_self)[9] /* r_start*/)[1] += 1;
      rset_sv = ((cptr)rset_self)[9] /* r_start*/;
      ((cptr)((cptr)rset_os)[10] /* r_end*/)[1] += 1;
      rset_fv = ((cptr)rset_os)[10] /* r_end*/;
      object_Dec_ref(rset_self);
      object_Dec_ref(rset_ob);
      t158 = mem_malloc(44); ((cptr)t158)[0] = rset_methods;
      t159 = rset_alloc((cint)t158, (cint)rset_sv, (cint)rset_fv);
      t138 = t159;
      goto t138_label;
    }else{
    t160 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t161 = t160;
    if (t161){
      t162 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t161 = t162;
    };
    t163 = t161;
    if (t163){
      t164 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t163 = t164;
    };
    if (t163){
      ((cptr)((cptr)rset_os)[9] /* r_start*/)[1] += 1;
      rset_sv = ((cptr)rset_os)[9] /* r_start*/;
      ((cptr)((cptr)rset_self)[10] /* r_end*/)[1] += 1;
      rset_fv = ((cptr)rset_self)[10] /* r_end*/;
      object_Dec_ref(rset_self);
      object_Dec_ref(rset_ob);
      t165 = mem_malloc(44); ((cptr)t165)[0] = rset_methods;
      t166 = rset_alloc((cint)t165, (cint)rset_sv, (cint)rset_fv);
      t138 = t166;
      goto t138_label;
    }else{
    t167 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t168 = t167;
    if (t168){
      t169 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t168 = t169;
    };
    if (t168){
      object_Dec_ref(rset_self);
      t138 = rset_ob;
      goto t138_label;
    }else{
    t170 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t171 = t170;
    if (t171){
      t172 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t171 = t172;
    };
    if (t171){
      object_Dec_ref(rset_ob);
      t138 = rset_self;
      goto t138_label;
    }else{
    t173 = ((cptr)rset_self)[3] /* len*/ > 0;
    t174 = t173;
    if (t174){
      t175 = ((cptr)rset_ob)[3] /* len*/ > 0;
      t174 = t175;
    };
    t176 = t174;
    if (t176){
      t177 = ((cptr)rset_self)[3] /* len*/ + ((cptr)rset_ob)[3] /* len*/;
      t178 = t177 > 100;
      t179 = t178;
      if (!t179){        t180 = ((cptr)rset_self)[3] /* len*/ + ((cptr)rset_ob)[3] /* len*/;
        t181 = t180 <= 0;
        t179 = t181;
      };
      t176 = t179;
    };
    if (t176){
      t182 = mem_malloc(40); ((cptr)t182)[0] = pset_methods;
      t183 = pset_alloc((cint)t182, (cint)rset_self, (cint)rset_ob);
      t138 = t183;
      goto t138_label;
    };};};};};
  };};
  t184 = set_Plus((cint)rset_self, (cint)rset_ob);
  t138 = t184;
  goto t138_label;
  t138_label: return t138;
}

cint rset_Subset(cint rset_self, cint rset_ob){
  cint rset_result, rset_os;
  cint t185, t186, t187, t188, t189, t190, t191, t192, t193, t194, t195, t196, t197, t198, t199, t200, t201, t202, t203;
  rset_os = rset_ob;
  t186 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_31;
  t187 = t186;
  if (!t187){    t188 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_56;
    t189 = t188;
    if (t189){
      t190 = ((cptr)rset_self)[7] /* elemtype*/ == intset_predef;
      t189 = t190;
    };
    t187 = t189;
  };
  t191 = t187;
  if (!t191){    t192 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_57;
    t193 = t192;
    if (t193){
      t194 = ((cptr)rset_self)[7] /* elemtype*/ == charset_predef;
      t193 = t194;
    };
    t191 = t193;
  };
  t195 = t191;
  if (!t195){    t196 = rset_ob == ((cptr)rset_self)[7] /* elemtype*/;
    t195 = t196;
  };
  if (t195){
    object_Dec_ref(rset_self);
    object_Dec_ref(rset_ob);
    t185 = boolean_True;
    goto t185_label;
  }else{
  t197 = ((cptr)rset_ob)[5] /* representation*/ == strpool_str_55;
  t198 = t197;
  if (t198){
    t199 = ((cptr)rset_self)[7] /* elemtype*/ == ((cptr)rset_os)[7] /* elemtype*/;
    t198 = t199;
  };
  if (t198){
    t200 = ((cptr)((cptr)rset_self)[9] /* r_start*/)[2] /* hashval*/ >= ((cptr)((cptr)rset_os)[9] /* r_start*/)[2] /* hashval*/;
    t201 = t200;
    if (t201){
      t202 = ((cptr)((cptr)rset_self)[10] /* r_end*/)[2] /* hashval*/ <= ((cptr)((cptr)rset_os)[10] /* r_end*/)[2] /* hashval*/;
      t201 = t202;
    };
    if (t201){
      rset_result = boolean_True;
    }else{
      rset_result = boolean_False;
    };
    object_Dec_ref(rset_self);
    object_Dec_ref(rset_ob);
    t185 = rset_result;
    goto t185_label;
  };};
  t203 = collection_Subset((cint)rset_self, (cint)rset_ob);
  t185 = t203;
  goto t185_label;
  t185_label: return t185;
}

cint rset_ubstr(cint rset_self){
  cint rset_result;
  cint t204, t205, t206, t207, t208, t209, t210, t211, t212, t213, t214, t215, t216, t217, t218, t219, t220;
  t205 = ((cptr)rset_self)[3] /* len*/ >= 0;
  t206 = t205;
  if (t206){
    t207 = ((cptr)rset_self)[3] /* len*/ < 100;
    t206 = t207;
  };
  if (t206){
    t208 = collection_ubstr((cint)rset_self);
    t204 = t208;
    goto t204_label;
  };
  ((cptr)((cptr)rset_self)[9] /* r_start*/)[1] += 1;
  t209 = ((cptr)(((cptr)((cptr)rset_self)[9] /* r_start*/)[0]))[88];
  t210 = ((f0)t209)((cint)((cptr)rset_self)[9] /* r_start*/); /* Mkstr*/
  ((cptr)strpool_str_44)[1] += 1;
  t212 = ((cptr)(((cptr)t210)[0]))[97];
  t213 = ((f0)t212)((cint)t210, (cint)strpool_str_44); /* Plus*/
  ((cptr)((cptr)rset_self)[10] /* r_end*/)[1] += 1;
  t214 = ((cptr)(((cptr)((cptr)rset_self)[10] /* r_end*/)[0]))[88];
  t215 = ((f0)t214)((cint)((cptr)rset_self)[10] /* r_end*/); /* Mkstr*/
  t217 = ((cptr)(((cptr)t213)[0]))[97];
  t218 = ((f0)t217)((cint)t213, (cint)t215); /* Plus*/
  t204 = t218;
  goto t204_label;
  t204_label: return t204;
}

void init_rset(){
  copy_meth_table(rset_methods, set_methods);
  rset_methods[0] = 44;
  rset_methods[3] = rset_alloc;
  rset_methods[4] = rset_reclaim;
  rset_methods[20] = rset_Contains;
  rset_methods[62] = rset_lookup;
  rset_methods[54] = rset_Intersect;
  rset_methods[68] = rset_Make_list;
  rset_methods[80] = rset_Max;
  rset_methods[82] = rset_Min;
  rset_methods[83] = rset_Minus;
  rset_methods[88] = rset_Mkstr;
  rset_methods[97] = rset_Plus;
  rset_methods[104] = rset_Subset;
  rset_methods[112] = rset_ubstr;
}
