__attribute__((visibility ("hidden")))
mono_reflection_init ()
{

}


__attribute__((visibility ("hidden")))
mono_class_get_ref_info (struct MonoClass * klass)
{
  unsigned int D.22728;
  void * D.22731;

  D.22728 = klass->ref_info_handle;
  if (D.22728 == 0) goto <D.22729>; else goto <D.22730>;
  <D.22729>:
  D.22731 = 0B;
  return D.22731;
  <D.22730>:
  D.22728 = klass->ref_info_handle;
  D.22731 = mono_gchandle_get_target (D.22728);
  return D.22731;
}


__attribute__((visibility ("hidden")))
mono_class_set_ref_info (struct MonoClass * klass, void * obj)
{
  unsigned int D.22733;
  unsigned int D.22734;
  _Bool D.22735;
  long int D.22736;
  long int D.22737;

  D.22733 = mono_gchandle_new (obj, 0);
  klass->ref_info_handle = D.22733;
  D.22734 = klass->ref_info_handle;
  D.22735 = D.22734 == 0;
  D.22736 = (long int) D.22735;
  D.22737 = __builtin_expect (D.22736, 0);
  if (D.22737 != 0) goto <D.22738>; else goto <D.22739>;
  <D.22738>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 641, "klass->ref_info_handle != 0");
  <D.22739>:
}


__attribute__((visibility ("hidden")))
mono_class_free_ref_info (struct MonoClass * klass)
{
  unsigned int D.22740;

  D.22740 = klass->ref_info_handle;
  if (D.22740 != 0) goto <D.22741>; else goto <D.22742>;
  <D.22741>:
  D.22740 = klass->ref_info_handle;
  mono_gchandle_free (D.22740);
  klass->ref_info_handle = 0;
  <D.22742>:
}


mono_custom_attrs_free (struct MonoCustomAttrInfo * ainfo)
{
  int D.22743;

  D.22743 = ainfo->cached;
  if (D.22743 == 0) goto <D.22744>; else goto <D.22745>;
  <D.22744>:
  monoeg_g_free (ainfo);
  <D.22745>:
}


__attribute__((visibility ("hidden")))
mono_image_build_metadata (struct MonoReflectionModuleBuilder * moduleb)
{
  struct MonoVTable * D.22746;
  unsigned int D.22747;
  int D.22750;
  unsigned int D.22753;
  unsigned int D.22754;
  unsigned int D.22755;
  guint32 * D.22756;
  unsigned char D.22757;
  long unsigned int D.22758;
  long unsigned int D.22759;
  guint32 * D.22760;
  struct MonoDynamicStream * D.22761;
  unsigned int D.22762;
  guint32 * D.22763;
  unsigned int D.22764;
  guint32 * D.22765;
  guint32 * D.22766;
  guint32 * D.22767;
  struct MonoArray * D.22768;
  long unsigned int D.22771;
  unsigned int D.22772;
  unsigned int D.22773;
  long unsigned int D.22774;
  char * D.22775;
  struct MonoReflectionMethodBuilder * D.22776;
  long unsigned int D.22777;
  struct MonoArray * D.22778;
  long unsigned int D.22781;
  unsigned int D.22782;
  unsigned int D.22783;
  char * D.22784;
  struct MonoReflectionFieldBuilder * D.22785;
  long unsigned int D.22786;
  int D.22787;
  int D.22788;
  void * iftmp.0;
  long unsigned int D.22792;
  long unsigned int D.22793;
  void * D.22794;
  struct MonoArray * D.22796;
  char * D.22799;
  void * * D.22800;
  int D.22801;
  long unsigned int D.22802;
  unsigned int D.22803;
  unsigned int D.22804;
  long unsigned int D.22805;
  long unsigned int D.22806;
  void * * D.22807;
  struct MonoString * D.22808;
  struct MonoString * D.22809;
  struct MonoArray * D.22810;
  struct MonoArray * D.22811;
  struct MonoArray * D.22814;
  struct MonoArray * D.22817;
  struct MonoGHashTable * D.22820;
  char * D.22823;
  long unsigned int D.22824;
  struct MonoArray * D.22825;
  long unsigned int D.22828;
  char * D.22829;
  int D.22830;
  int D.22831;
  struct MonoDynamicTable * table;
  struct MonoDynamicImage * assembly;
  struct MonoReflectionAssemblyBuilder * assemblyb;
  struct MonoDomain * domain;
  struct MonoPtrArray types;
  guint32 * values;
  int i;
  int j;

  try
    {
      assemblyb = moduleb->assemblyb;
      assembly = moduleb->dynamic_image;
      D.22746 = MEM[(struct MonoObject *)assemblyb].vtable;
      domain = D.22746->domain;
      D.22747 = assembly->text_rva;
      if (D.22747 != 0) goto <D.22748>; else goto <D.22749>;
      <D.22748>:
      return;
      <D.22749>:
      assembly->text_rva = 8192;
      D.22750 = moduleb->is_main;
      if (D.22750 != 0) goto <D.22751>; else goto <D.22752>;
      <D.22751>:
      mono_image_emit_manifest (moduleb);
      <D.22752>:
      table = &assembly->tables[2];
      table->rows = 1;
      D.22753 = table->next_idx;
      D.22754 = D.22753 + 1;
      table->next_idx = D.22754;
      D.22755 = table->rows;
      alloc_table (table, D.22755);
      D.22756 = table->values;
      D.22757 = table->columns;
      D.22758 = (long unsigned int) D.22757;
      D.22759 = D.22758 * 4;
      values = D.22756 + D.22759;
      *values = 0;
      D.22760 = values + 4;
      D.22761 = &assembly->sheap;
      D.22762 = string_heap_insert (D.22761, "<Module>");
      *D.22760 = D.22762;
      D.22763 = values + 8;
      D.22761 = &assembly->sheap;
      D.22764 = string_heap_insert (D.22761, "");
      *D.22763 = D.22764;
      D.22765 = values + 12;
      *D.22765 = 0;
      D.22766 = values + 16;
      *D.22766 = 1;
      D.22767 = values + 20;
      *D.22767 = 1;
      D.22768 = moduleb->global_methods;
      if (D.22768 != 0B) goto <D.22769>; else goto <D.22770>;
      <D.22769>:
      table = &assembly->tables[6];
      D.22768 = moduleb->global_methods;
      D.22771 = mono_array_length (D.22768);
      D.22755 = table->rows;
      D.22772 = (unsigned int) D.22771;
      D.22773 = D.22755 + D.22772;
      table->rows = D.22773;
      D.22755 = table->rows;
      alloc_table (table, D.22755);
      i = 0;
      goto <D.20288>;
      <D.20287>:
      D.22768 = moduleb->global_methods;
      D.22774 = (long unsigned int) i;
      D.22775 = mono_array_addr_with_size (D.22768, 8, D.22774);
      D.22776 = MEM[(struct MonoReflectionMethodBuilder * *)D.22775];
      mono_image_get_method_info (D.22776, assembly);
      i = i + 1;
      <D.20288>:
      D.22774 = (long unsigned int) i;
      D.22768 = moduleb->global_methods;
      D.22777 = mono_array_length (D.22768);
      if (D.22774 < D.22777) goto <D.20287>; else goto <D.20289>;
      <D.20289>:
      <D.22770>:
      D.22778 = moduleb->global_fields;
      if (D.22778 != 0B) goto <D.22779>; else goto <D.22780>;
      <D.22779>:
      table = &assembly->tables[4];
      D.22778 = moduleb->global_fields;
      D.22781 = mono_array_length (D.22778);
      D.22755 = table->rows;
      D.22782 = (unsigned int) D.22781;
      D.22783 = D.22755 + D.22782;
      table->rows = D.22783;
      D.22755 = table->rows;
      alloc_table (table, D.22755);
      i = 0;
      goto <D.20291>;
      <D.20290>:
      D.22778 = moduleb->global_fields;
      D.22774 = (long unsigned int) i;
      D.22784 = mono_array_addr_with_size (D.22778, 8, D.22774);
      D.22785 = MEM[(struct MonoReflectionFieldBuilder * *)D.22784];
      mono_image_get_field_info (D.22785, assembly);
      i = i + 1;
      <D.20291>:
      D.22774 = (long unsigned int) i;
      D.22778 = moduleb->global_fields;
      D.22786 = mono_array_length (D.22778);
      if (D.22774 < D.22786) goto <D.20290>; else goto <D.20292>;
      <D.20292>:
      <D.22780>:
      table = &assembly->tables[0];
      alloc_table (table, 1);
      mono_image_fill_module_table (domain, moduleb, assembly);
      types.size = 0;
      D.22787 = moduleb->num_types;
      D.22788 = MAX_EXPR <D.22787, 16>;
      types.capacity = D.22788;
      D.22787 = moduleb->num_types;
      if (D.22787 > 16) goto <D.22790>; else goto <D.22791>;
      <D.22790>:
      D.22787 = moduleb->num_types;
      D.22792 = (long unsigned int) D.22787;
      D.22793 = D.22792 * 8;
      D.22787 = moduleb->num_types;
      D.22794 = mono_gc_make_root_descr_all_refs (D.22787);
      iftmp.0 = mono_gc_alloc_fixed (D.22793, D.22794);
      goto <D.22795>;
      <D.22791>:
      iftmp.0 = __builtin_alloca (128);
      <D.22795>:
      types.data = iftmp.0;
      D.22796 = moduleb->types;
      if (D.22796 != 0B) goto <D.22797>; else goto <D.22798>;
      <D.22797>:
      i = 0;
      goto <D.20295>;
      <D.20294>:
      {
        struct MonoReflectionTypeBuilder * type;

        D.22796 = moduleb->types;
        D.22774 = (long unsigned int) i;
        D.22799 = mono_array_addr_with_size (D.22796, 8, D.22774);
        type = MEM[(struct MonoReflectionTypeBuilder * *)D.22799];
        collect_types (&types, type);
      }
      i = i + 1;
      <D.20295>:
      D.22787 = moduleb->num_types;
      if (D.22787 > i) goto <D.20294>; else goto <D.20296>;
      <D.20296>:
      <D.22798>:
      D.22800 = types.data;
      D.22801 = types.size;
      D.22802 = (long unsigned int) D.22801;
      qsort (D.22800, D.22802, 8, compare_types_by_table_idx);
      table = &assembly->tables[2];
      D.22755 = table->rows;
      D.22801 = types.size;
      D.22803 = (unsigned int) D.22801;
      D.22804 = D.22755 + D.22803;
      table->rows = D.22804;
      D.22755 = table->rows;
      alloc_table (table, D.22755);
      i = 0;
      goto <D.20299>;
      <D.20298>:
      {
        struct MonoReflectionTypeBuilder * tb;

        D.22800 = types.data;
        D.22805 = (long unsigned int) i;
        D.22806 = D.22805 * 8;
        D.22807 = D.22800 + D.22806;
        tb = *D.22807;
        D.22761 = &assembly->sheap;
        D.22808 = tb->nspace;
        string_heap_insert_mstring (D.22761, D.22808);
      }
      i = i + 1;
      <D.20299>:
      D.22801 = types.size;
      if (D.22801 > i) goto <D.20298>; else goto <D.20300>;
      <D.20300>:
      i = 0;
      goto <D.20303>;
      <D.20302>:
      {
        struct MonoReflectionTypeBuilder * tb;

        D.22800 = types.data;
        D.22805 = (long unsigned int) i;
        D.22806 = D.22805 * 8;
        D.22807 = D.22800 + D.22806;
        tb = *D.22807;
        D.22761 = &assembly->sheap;
        D.22809 = tb->name;
        string_heap_insert_mstring (D.22761, D.22809);
      }
      i = i + 1;
      <D.20303>:
      D.22801 = types.size;
      if (D.22801 > i) goto <D.20302>; else goto <D.20304>;
      <D.20304>:
      i = 0;
      goto <D.20307>;
      <D.20306>:
      {
        struct MonoReflectionTypeBuilder * type;

        D.22800 = types.data;
        D.22805 = (long unsigned int) i;
        D.22806 = D.22805 * 8;
        D.22807 = D.22800 + D.22806;
        type = *D.22807;
        mono_image_get_type_info (domain, type, assembly);
      }
      i = i + 1;
      <D.20307>:
      D.22801 = types.size;
      if (D.22801 > i) goto <D.20306>; else goto <D.20308>;
      <D.20308>:
      D.22810 = assemblyb->cattrs;
      mono_image_add_cattrs (assembly, 1, 14, D.22810);
      D.22811 = assemblyb->permissions_minimum;
      if (D.22811 != 0B) goto <D.22812>; else goto <D.22813>;
      <D.22812>:
      D.22811 = assemblyb->permissions_minimum;
      mono_image_add_decl_security (assembly, 536870913, D.22811);
      <D.22813>:
      D.22814 = assemblyb->permissions_optional;
      if (D.22814 != 0B) goto <D.22815>; else goto <D.22816>;
      <D.22815>:
      D.22814 = assemblyb->permissions_optional;
      mono_image_add_decl_security (assembly, 536870913, D.22814);
      <D.22816>:
      D.22817 = assemblyb->permissions_refused;
      if (D.22817 != 0B) goto <D.22818>; else goto <D.22819>;
      <D.22818>:
      D.22817 = assemblyb->permissions_refused;
      mono_image_add_decl_security (assembly, 536870913, D.22817);
      <D.22819>:
      module_add_cattrs (assembly, moduleb);
      D.22820 = assembly->token_fixups;
      mono_g_hash_table_foreach (D.22820, fixup_method, assembly);
      D.22768 = moduleb->global_methods;
      if (D.22768 != 0B) goto <D.22821>; else goto <D.22822>;
      <D.22821>:
      i = 0;
      goto <D.20311>;
      <D.20310>:
      {
        struct MonoReflectionMethodBuilder * mb;

        D.22768 = moduleb->global_methods;
        D.22774 = (long unsigned int) i;
        D.22823 = mono_array_addr_with_size (D.22768, 8, D.22774);
        mb = MEM[(struct MonoReflectionMethodBuilder * *)D.22823];
        mono_image_add_methodimpl (assembly, mb);
      }
      i = i + 1;
      <D.20311>:
      D.22774 = (long unsigned int) i;
      D.22768 = moduleb->global_methods;
      D.22824 = mono_array_length (D.22768);
      if (D.22774 < D.22824) goto <D.20310>; else goto <D.20312>;
      <D.20312>:
      <D.22822>:
      i = 0;
      goto <D.20319>;
      <D.20318>:
      {
        struct MonoReflectionTypeBuilder * type;

        D.22800 = types.data;
        D.22805 = (long unsigned int) i;
        D.22806 = D.22805 * 8;
        D.22807 = D.22800 + D.22806;
        type = *D.22807;
        D.22825 = type->methods;
        if (D.22825 != 0B) goto <D.22826>; else goto <D.22827>;
        <D.22826>:
        j = 0;
        goto <D.20316>;
        <D.20315>:
        {
          struct MonoReflectionMethodBuilder * mb;

          D.22825 = type->methods;
          D.22828 = (long unsigned int) j;
          D.22829 = mono_array_addr_with_size (D.22825, 8, D.22828);
          mb = MEM[(struct MonoReflectionMethodBuilder * *)D.22829];
          mono_image_add_methodimpl (assembly, mb);
        }
        j = j + 1;
        <D.20316>:
        D.22830 = type->num_methods;
        if (D.22830 > j) goto <D.20315>; else goto <D.20317>;
        <D.20317>:
        <D.22827>:
      }
      i = i + 1;
      <D.20319>:
      D.22801 = types.size;
      if (D.22801 > i) goto <D.20318>; else goto <D.20320>;
      <D.20320>:
      D.22831 = types.capacity;
      if (D.22831 > 16) goto <D.22832>; else goto <D.22833>;
      <D.22832>:
      D.22800 = types.data;
      mono_gc_free_fixed (D.22800);
      <D.22833>:
      fixup_cattrs (assembly);
    }
  finally
    {
      types = {CLOBBER};
    }
}


fixup_method (struct MonoReflectionILGen * ilgen, void * value, struct MonoDynamicImage * assembly)
{
  long int value.1;
  struct MonoArray * D.22838;
  long unsigned int D.22839;
  char * D.22840;
  sizetype D.22841;
  int D.22842;
  sizetype D.22843;
  sizetype D.22844;
  unsigned char * D.22845;
  unsigned char D.22846;
  int D.22847;
  struct MonoObject * D.22848;
  struct MonoVTable * D.22849;
  struct MonoClass * D.22850;
  const char * D.22851;
  int D.22852;
  int D.22855;
  int D.22857;
  struct GHashTable * D.22860;
  void * D.22861;
  long int D.22862;
  int D.22864;
  int D.22868;
  int D.22875;
  int D.22877;
  struct GHashTable * D.22878;
  void * D.22879;
  long int D.22880;
  int D.22881;
  int D.22884;
  int D.22890;
  int D.22892;
  int D.22894;
  int D.22896;
  int iftmp.2;
  struct MonoClass * D.22900;
  struct MonoGenericClass * D.22901;
  struct MonoGenericContainer * D.22903;
  _Bool D.22905;
  long int D.22906;
  long int D.22907;
  int D.22910;
  int D.22913;
  int D.22916;
  _Bool D.22917;
  long int D.22918;
  long int D.22919;
  int D.22924;
  int D.22926;
  int D.22927;
  int D.22930;
  int D.22933;
  int D.22936;
  struct MonoMethodSignature * D.22939;
  short unsigned int D.22940;
  _Bool D.22941;
  long int D.22942;
  long int D.22943;
  int D.22946;
  int D.22949;
  unsigned char D.22952;
  unsigned char * D.22953;
  unsigned int D.22954;
  unsigned char D.22955;
  unsigned char * D.22956;
  unsigned int D.22957;
  unsigned char D.22958;
  int D.22959;
  unsigned int D.22960;
  guint32 code_idx;
  struct MonoReflectionILTokenInfo * iltoken;
  struct MonoReflectionFieldBuilder * field;
  struct MonoReflectionCtorBuilder * ctor;
  struct MonoReflectionMethodBuilder * method;
  struct MonoReflectionTypeBuilder * tb;
  struct MonoReflectionArrayMethod * am;
  guint32 i;
  guint32 idx;
  unsigned char * target;

  value.1 = (long int) value;
  code_idx = (guint32) value.1;
  idx = 0;
  i = 0;
  goto <D.20179>;
  <D.20178>:
  D.22838 = ilgen->token_fixups;
  D.22839 = (long unsigned int) i;
  iltoken = mono_array_addr_with_size (D.22838, 16, D.22839);
  D.22840 = assembly->code.data;
  D.22841 = (sizetype) code_idx;
  D.22842 = iltoken->code_pos;
  D.22843 = (sizetype) D.22842;
  D.22844 = D.22841 + D.22843;
  target = D.22840 + D.22844;
  D.22845 = target + 3;
  D.22846 = *D.22845;
  D.22847 = (int) D.22846;
  switch (D.22847) <default: <D.20176>, case 2: <D.20169>, case 4: <D.20164>, case 6: <D.20167>, case 10: <D.20170>, case 43: <D.20174>>
  <D.20164>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22852 = strcmp (D.22851, "FieldBuilder");
  if (D.22852 == 0) goto <D.22853>; else goto <D.22854>;
  <D.22853>:
  field = iltoken->member;
  D.22855 = field->table_idx;
  idx = (guint32) D.22855;
  goto <D.22856>;
  <D.22854>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22857 = strcmp (D.22851, "MonoField");
  if (D.22857 == 0) goto <D.22858>; else goto <D.22859>;
  <D.22858>:
  {
    struct MonoClassField * f;

    D.22848 = iltoken->member;
    f = MEM[(struct MonoReflectionField *)D.22848].field;
    D.22860 = assembly->field_to_table_idx;
    D.22861 = monoeg_g_hash_table_lookup (D.22860, f);
    D.22862 = (long int) D.22861;
    idx = (guint32) D.22862;
  }
  goto <D.22863>;
  <D.22859>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4237);
  <D.22863>:
  <D.22856>:
  goto <D.20166>;
  <D.20167>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22864 = strcmp (D.22851, "MethodBuilder");
  if (D.22864 == 0) goto <D.22865>; else goto <D.22866>;
  <D.22865>:
  method = iltoken->member;
  idx = method->table_idx;
  goto <D.22867>;
  <D.22866>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22868 = strcmp (D.22851, "ConstructorBuilder");
  if (D.22868 == 0) goto <D.22869>; else goto <D.22870>;
  <D.22869>:
  ctor = iltoken->member;
  idx = ctor->table_idx;
  goto <D.22871>;
  <D.22870>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22875 = strcmp (D.22851, "MonoMethod");
  if (D.22875 == 0) goto <D.22872>; else goto <D.22876>;
  <D.22876>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22877 = strcmp (D.22851, "MonoCMethod");
  if (D.22877 == 0) goto <D.22872>; else goto <D.22873>;
  <D.22872>:
  {
    struct MonoMethod * m;

    D.22848 = iltoken->member;
    m = MEM[(struct MonoReflectionMethod *)D.22848].method;
    D.22878 = assembly->method_to_table_idx;
    D.22879 = monoeg_g_hash_table_lookup (D.22878, m);
    D.22880 = (long int) D.22879;
    idx = (guint32) D.22880;
  }
  goto <D.22874>;
  <D.22873>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4252);
  <D.22874>:
  <D.22871>:
  <D.22867>:
  goto <D.20166>;
  <D.20169>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22881 = strcmp (D.22851, "TypeBuilder");
  if (D.22881 != 0) goto <D.22882>; else goto <D.22883>;
  <D.22882>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4257);
  <D.22883>:
  tb = iltoken->member;
  idx = tb->table_idx;
  goto <D.20166>;
  <D.20170>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22884 = strcmp (D.22851, "MonoArrayMethod");
  if (D.22884 == 0) goto <D.22885>; else goto <D.22886>;
  <D.22885>:
  am = iltoken->member;
  idx = am->table_idx;
  goto <D.22887>;
  <D.22886>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22890 = strcmp (D.22851, "MonoMethod");
  if (D.22890 == 0) goto <D.22888>; else goto <D.22891>;
  <D.22891>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22892 = strcmp (D.22851, "MonoCMethod");
  if (D.22892 == 0) goto <D.22888>; else goto <D.22893>;
  <D.22893>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22894 = strcmp (D.22851, "MonoGenericMethod");
  if (D.22894 == 0) goto <D.22888>; else goto <D.22895>;
  <D.22895>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22896 = strcmp (D.22851, "MonoGenericCMethod");
  if (D.22896 == 0) goto <D.22888>; else goto <D.22889>;
  <D.22888>:
  {
    struct MonoMethod * m;

    D.22848 = iltoken->member;
    m = MEM[(struct MonoReflectionMethod *)D.22848].method;
    D.22900 = m->klass;
    D.22901 = D.22900->generic_class;
    if (D.22901 == 0B) goto <D.22902>; else goto <D.22898>;
    <D.22902>:
    D.22900 = m->klass;
    D.22903 = D.22900->generic_container;
    if (D.22903 == 0B) goto <D.22904>; else goto <D.22898>;
    <D.22904>:
    iftmp.2 = 1;
    goto <D.22899>;
    <D.22898>:
    iftmp.2 = 0;
    <D.22899>:
    D.22905 = iftmp.2 != 0;
    D.22906 = (long int) D.22905;
    D.22907 = __builtin_expect (D.22906, 0);
    if (D.22907 != 0) goto <D.22908>; else goto <D.22909>;
    <D.22908>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4270, "m->klass->generic_class || m->klass->generic_container");
    <D.22909>:
    // predicted unlikely by continue predictor.
    goto <D.20172>;
  }
  <D.22889>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22910 = strcmp (D.22851, "FieldBuilder");
  if (D.22910 == 0) goto <D.22911>; else goto <D.22912>;
  <D.22911>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22912>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22913 = strcmp (D.22851, "MonoField");
  if (D.22913 == 0) goto <D.22914>; else goto <D.22915>;
  <D.22914>:
  {
    struct MonoClassField * f;

    D.22848 = iltoken->member;
    f = MEM[(struct MonoReflectionField *)D.22848].field;
    D.22916 = is_field_on_inst (f);
    D.22917 = D.22916 == 0;
    D.22918 = (long int) D.22917;
    D.22919 = __builtin_expect (D.22918, 0);
    if (D.22919 != 0) goto <D.22920>; else goto <D.22921>;
    <D.22920>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4276, "is_field_on_inst (f)");
    <D.22921>:
    // predicted unlikely by continue predictor.
    goto <D.20172>;
  }
  <D.22915>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22924 = strcmp (D.22851, "MethodBuilder");
  if (D.22924 == 0) goto <D.22922>; else goto <D.22925>;
  <D.22925>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22926 = strcmp (D.22851, "ConstructorBuilder");
  if (D.22926 == 0) goto <D.22922>; else goto <D.22923>;
  <D.22922>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22923>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22927 = strcmp (D.22851, "FieldOnTypeBuilderInst");
  if (D.22927 == 0) goto <D.22928>; else goto <D.22929>;
  <D.22928>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22929>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22930 = strcmp (D.22851, "MethodOnTypeBuilderInst");
  if (D.22930 == 0) goto <D.22931>; else goto <D.22932>;
  <D.22931>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22932>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22933 = strcmp (D.22851, "ConstructorOnTypeBuilderInst");
  if (D.22933 == 0) goto <D.22934>; else goto <D.22935>;
  <D.22934>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22935>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4288);
  <D.22887>:
  goto <D.20166>;
  <D.20174>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22936 = strcmp (D.22851, "MonoGenericMethod");
  if (D.22936 == 0) goto <D.22937>; else goto <D.22938>;
  <D.22937>:
  {
    struct MonoMethod * m;

    D.22848 = iltoken->member;
    m = MEM[(struct MonoReflectionMethod *)D.22848].method;
    D.22939 = mono_method_signature (m);
    D.22940 = D.22939->generic_param_count;
    D.22941 = D.22940 == 0;
    D.22942 = (long int) D.22941;
    D.22943 = __builtin_expect (D.22942, 0);
    if (D.22943 != 0) goto <D.22944>; else goto <D.22945>;
    <D.22944>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4294, "mono_method_signature (m)->generic_param_count");
    <D.22945>:
    // predicted unlikely by continue predictor.
    goto <D.20172>;
  }
  <D.22938>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22946 = strcmp (D.22851, "MethodBuilder");
  if (D.22946 == 0) goto <D.22947>; else goto <D.22948>;
  <D.22947>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22948>:
  D.22848 = iltoken->member;
  D.22849 = D.22848->vtable;
  D.22850 = D.22849->klass;
  D.22851 = D.22850->name;
  D.22949 = strcmp (D.22851, "MethodOnTypeBuilderInst");
  if (D.22949 == 0) goto <D.22950>; else goto <D.22951>;
  <D.22950>:
  // predicted unlikely by continue predictor.
  goto <D.20172>;
  <D.22951>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4301);
  <D.20176>:
  D.22845 = target + 3;
  D.22846 = *D.22845;
  D.22847 = (int) D.22846;
  monoeg_g_log (0B, 4, "got unexpected table 0x%02x in fixup", D.22847);
  <D.20177>:
  goto <D.20177>;
  <D.20166>:
  D.22952 = (unsigned char) idx;
  *target = D.22952;
  D.22953 = target + 1;
  D.22954 = idx >> 8;
  D.22955 = (unsigned char) D.22954;
  *D.22953 = D.22955;
  D.22956 = target + 2;
  D.22957 = idx >> 16;
  D.22958 = (unsigned char) D.22957;
  *D.22956 = D.22958;
  <D.20172>:
  i = i + 1;
  <D.20179>:
  D.22959 = ilgen->num_token_fixups;
  D.22960 = (unsigned int) D.22959;
  if (D.22960 > i) goto <D.20178>; else goto <D.20180>;
  <D.20180>:
}


is_field_on_inst (struct MonoClassField * field)
{
  gboolean D.22961;
  int iftmp.3;
  struct MonoClass * D.22965;
  struct MonoGenericClass * D.22966;
  long unsigned int D.22968;
  long unsigned int D.22969;
  struct MonoClassField * D.22971;

  D.22965 = field->parent;
  D.22966 = D.22965->generic_class;
  if (D.22966 != 0B) goto <D.22967>; else goto <D.22963>;
  <D.22967>:
  D.22965 = field->parent;
  D.22966 = D.22965->generic_class;
  D.22968 = BIT_FIELD_REF <*D.22966, 64, 192>;
  D.22969 = D.22968 & 9223372036854775808;
  if (D.22969 != 0) goto <D.22970>; else goto <D.22963>;
  <D.22970>:
  D.22965 = field->parent;
  D.22966 = D.22965->generic_class;
  D.22971 = MEM[(struct MonoDynamicGenericClass *)D.22966].fields;
  if (D.22971 != 0B) goto <D.22972>; else goto <D.22963>;
  <D.22972>:
  iftmp.3 = 1;
  goto <D.22964>;
  <D.22963>:
  iftmp.3 = 0;
  <D.22964>:
  D.22961 = iftmp.3;
  return D.22961;
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.4;
  int iftmp.5;
  int D.22982;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.22975>; else goto <D.22976>;
  <D.22975>:
  if (__ret == 1) goto <D.22978>; else goto <D.22979>;
  <D.22978>:
  iftmp.5 = -1;
  goto <D.22980>;
  <D.22979>:
  iftmp.5 = 1;
  <D.22980>:
  iftmp.4 = iftmp.5;
  goto <D.22981>;
  <D.22976>:
  iftmp.4 = 0;
  <D.22981>:
  __ret = iftmp.4;
  D.22982 = __ret;
  return D.22982;
}


compare_types_by_table_idx (struct MonoReflectionTypeBuilder * * type1, struct MonoReflectionTypeBuilder * * type2)
{
  struct MonoReflectionTypeBuilder * D.22984;
  unsigned int D.22985;
  struct MonoReflectionTypeBuilder * D.22986;
  unsigned int D.22987;
  gint D.22990;

  D.22984 = *type1;
  D.22985 = D.22984->table_idx;
  D.22986 = *type2;
  D.22987 = D.22986->table_idx;
  if (D.22985 < D.22987) goto <D.22988>; else goto <D.22989>;
  <D.22988>:
  D.22990 = -1;
  return D.22990;
  <D.22989>:
  D.22984 = *type1;
  D.22985 = D.22984->table_idx;
  D.22986 = *type2;
  D.22987 = D.22986->table_idx;
  if (D.22985 > D.22987) goto <D.22991>; else goto <D.22992>;
  <D.22991>:
  D.22990 = 1;
  return D.22990;
  <D.22992>:
  D.22990 = 0;
  return D.22990;
}


mono_image_emit_manifest (struct MonoReflectionModuleBuilder * moduleb)
{
  struct MonoVTable * D.22994;
  guint32 * D.22995;
  guint32 iftmp.6;
  unsigned int D.22997;
  guint32 * D.23001;
  struct MonoDynamicStream * D.23002;
  struct MonoString * D.23003;
  unsigned int D.23004;
  struct MonoString * D.23005;
  guint32 * D.23008;
  unsigned int D.23009;
  unsigned int D.23011;
  guint32 * D.23012;
  struct MonoArray * D.23013;
  unsigned int D.23014;
  guint32 * D.23015;
  unsigned int D.23016;
  struct MonoString * D.23017;
  struct MonoArray * D.23018;
  long unsigned int D.23019;
  char * D.23020;
  struct MonoArray * D.23023;
  long unsigned int D.23026;
  char * D.23027;
  int D.23028;
  long unsigned int D.23029;
  struct MonoArray * D.23030;
  char * D.23033;
  long unsigned int D.23034;
  struct MonoArray * D.23035;
  char * D.23038;
  struct MonoArray * D.23041;
  long unsigned int D.23044;
  long unsigned int D.23045;
  unsigned int D.23046;
  long unsigned int D.23047;
  struct MonoDynamicTable * table;
  struct MonoDynamicImage * assembly;
  struct MonoReflectionAssemblyBuilder * assemblyb;
  struct MonoDomain * domain;
  guint32 * values;
  int i;
  guint32 module_index;

  assemblyb = moduleb->assemblyb;
  assembly = moduleb->dynamic_image;
  D.22994 = MEM[(struct MonoObject *)assemblyb].vtable;
  domain = D.22994->domain;
  table = &assembly->tables[32];
  alloc_table (table, 1);
  D.22995 = table->values;
  values = D.22995 + 36;
  D.22997 = assemblyb->algid;
  if (D.22997 != 0) goto <D.22998>; else goto <D.22999>;
  <D.22998>:
  iftmp.6 = assemblyb->algid;
  goto <D.23000>;
  <D.22999>:
  iftmp.6 = 32772;
  <D.23000>:
  *values = iftmp.6;
  D.23001 = values + 28;
  D.23002 = &assembly->sheap;
  D.23003 = assemblyb->name;
  D.23004 = string_heap_insert_mstring (D.23002, D.23003);
  *D.23001 = D.23004;
  D.23005 = assemblyb->culture;
  if (D.23005 != 0B) goto <D.23006>; else goto <D.23007>;
  <D.23006>:
  D.23008 = values + 32;
  D.23002 = &assembly->sheap;
  D.23005 = assemblyb->culture;
  D.23009 = string_heap_insert_mstring (D.23002, D.23005);
  *D.23008 = D.23009;
  goto <D.23010>;
  <D.23007>:
  D.23008 = values + 32;
  D.23002 = &assembly->sheap;
  D.23011 = string_heap_insert (D.23002, "");
  *D.23008 = D.23011;
  <D.23010>:
  D.23012 = values + 24;
  D.23013 = assemblyb->public_key;
  D.23014 = load_public_key (D.23013, assembly);
  *D.23012 = D.23014;
  D.23015 = values + 20;
  D.23016 = assemblyb->flags;
  *D.23015 = D.23016;
  D.23017 = assemblyb->version;
  set_version_from_string (D.23017, values);
  module_index = 0;
  i = 0;
  goto <D.20260>;
  <D.20259>:
  {
    int j;
    struct MonoReflectionModuleBuilder * file_module;

    D.23018 = assemblyb->modules;
    D.23019 = (long unsigned int) i;
    D.23020 = mono_array_addr_with_size (D.23018, 8, D.23019);
    file_module = MEM[(struct MonoReflectionModuleBuilder * *)D.23020];
    if (file_module != moduleb) goto <D.23021>; else goto <D.23022>;
    <D.23021>:
    mono_image_fill_file_table (domain, file_module, assembly);
    module_index = module_index + 1;
    D.23023 = file_module->types;
    if (D.23023 != 0B) goto <D.23024>; else goto <D.23025>;
    <D.23024>:
    j = 0;
    goto <D.20257>;
    <D.20256>:
    {
      struct MonoReflectionTypeBuilder * tb;

      D.23023 = file_module->types;
      D.23026 = (long unsigned int) j;
      D.23027 = mono_array_addr_with_size (D.23023, 8, D.23026);
      tb = MEM[(struct MonoReflectionTypeBuilder * *)D.23027];
      mono_image_fill_export_table (domain, tb, module_index, 0, assembly);
    }
    j = j + 1;
    <D.20257>:
    D.23028 = file_module->num_types;
    if (D.23028 > j) goto <D.20256>; else goto <D.20258>;
    <D.20258>:
    <D.23025>:
    <D.23022>:
  }
  i = i + 1;
  <D.20260>:
  D.23019 = (long unsigned int) i;
  D.23018 = assemblyb->modules;
  D.23029 = mono_array_length (D.23018);
  if (D.23019 < D.23029) goto <D.20259>; else goto <D.20261>;
  <D.20261>:
  D.23030 = assemblyb->loaded_modules;
  if (D.23030 != 0B) goto <D.23031>; else goto <D.23032>;
  <D.23031>:
  i = 0;
  goto <D.20264>;
  <D.20263>:
  {
    struct MonoReflectionModule * file_module;

    D.23030 = assemblyb->loaded_modules;
    D.23019 = (long unsigned int) i;
    D.23033 = mono_array_addr_with_size (D.23030, 8, D.23019);
    file_module = MEM[(struct MonoReflectionModule * *)D.23033];
    mono_image_fill_file_table (domain, file_module, assembly);
    module_index = module_index + 1;
    mono_image_fill_export_table_from_module (domain, file_module, module_index, assembly);
  }
  i = i + 1;
  <D.20264>:
  D.23019 = (long unsigned int) i;
  D.23030 = assemblyb->loaded_modules;
  D.23034 = mono_array_length (D.23030);
  if (D.23019 < D.23034) goto <D.20263>; else goto <D.20265>;
  <D.20265>:
  <D.23032>:
  D.23035 = assemblyb->type_forwarders;
  if (D.23035 != 0B) goto <D.23036>; else goto <D.23037>;
  <D.23036>:
  mono_image_fill_export_table_from_type_forwarders (assemblyb, assembly);
  <D.23037>:
  module_index = 0;
  i = 0;
  goto <D.20274>;
  <D.20273>:
  {
    int j;
    struct MonoReflectionModuleBuilder * file_module;

    D.23018 = assemblyb->modules;
    D.23019 = (long unsigned int) i;
    D.23038 = mono_array_addr_with_size (D.23018, 8, D.23019);
    file_module = MEM[(struct MonoReflectionModuleBuilder * *)D.23038];
    if (file_module != moduleb) goto <D.23039>; else goto <D.23040>;
    <D.23039>:
    module_index = module_index + 1;
    D.23041 = file_module->resources;
    if (D.23041 != 0B) goto <D.23042>; else goto <D.23043>;
    <D.23042>:
    {
      int len;

      D.23041 = file_module->resources;
      D.23044 = mono_array_length (D.23041);
      len = (int) D.23044;
      j = 0;
      goto <D.20271>;
      <D.20270>:
      {
        struct MonoReflectionResource * res;

        D.23041 = file_module->resources;
        D.23045 = (long unsigned int) j;
        res = mono_array_addr_with_size (D.23041, 40, D.23045);
        D.23046 = module_index << 2;
        assembly_add_resource_manifest (file_module, assembly, res, D.23046);
      }
      j = j + 1;
      <D.20271>:
      if (j < len) goto <D.20270>; else goto <D.20272>;
      <D.20272>:
    }
    <D.23043>:
    <D.23040>:
  }
  i = i + 1;
  <D.20274>:
  D.23019 = (long unsigned int) i;
  D.23018 = assemblyb->modules;
  D.23047 = mono_array_length (D.23018);
  if (D.23019 < D.23047) goto <D.20273>; else goto <D.20275>;
  <D.20275>:
}


load_public_key (struct MonoArray * pkey, struct MonoDynamicImage * assembly)
{
  guint32 D.23050;
  unsigned int D.23051;
  char * b.7;
  struct MonoDynamicStream * D.23053;
  long int b.8;
  long int blob_size.9;
  long int D.23056;
  unsigned int D.23057;
  char * D.23058;
  unsigned int D.23059;
  void * D.23060;
  guint8 * D.23061;
  char * D.23062;
  int D.23063;
  char * D.23067;
  int D.23068;
  unsigned int D.23072;
  long unsigned int D.23074;
  long unsigned int D.23075;
  int D.23076;
  unsigned int D.23077;
  long unsigned int D.23078;
  void * D.23079;
  gsize len;
  guint32 token;
  char blob_size[6];
  char * b;

  try
    {
      token = 0;
      b = &blob_size;
      if (pkey == 0B) goto <D.23048>; else goto <D.23049>;
      <D.23048>:
      D.23050 = token;
      return D.23050;
      <D.23049>:
      len = mono_array_length (pkey);
      D.23051 = (unsigned int) len;
      b.7 = b;
      mono_metadata_encode_value (D.23051, b.7, &b);
      D.23053 = &assembly->blob;
      b.7 = b;
      b.8 = (long int) b.7;
      blob_size.9 = (long int) &blob_size;
      D.23056 = b.8 - blob_size.9;
      D.23057 = (unsigned int) D.23056;
      token = mono_image_add_stream_data (D.23053, &blob_size, D.23057);
      D.23053 = &assembly->blob;
      D.23058 = mono_array_addr_with_size (pkey, 1, 0);
      D.23059 = (unsigned int) len;
      mono_image_add_stream_data (D.23053, D.23058, D.23059);
      D.23060 = monoeg_malloc (len);
      assembly->public_key = D.23060;
      D.23061 = assembly->public_key;
      D.23062 = mono_array_addr_with_size (pkey, 1, 0);
      memcpy (D.23061, D.23062, len);
      D.23063 = (int) len;
      assembly->public_key_len = D.23063;
      if (len == 16) goto <D.23066>; else goto <D.23064>;
      <D.23066>:
      D.23067 = mono_array_addr_with_size (pkey, 1, 0);
      D.23063 = (int) len;
      D.23068 = mono_is_ecma_key (D.23067, D.23063);
      if (D.23068 != 0) goto <D.23069>; else goto <D.23064>;
      <D.23069>:
      assembly->strong_name_size = 128;
      goto <D.23065>;
      <D.23064>:
      if (len > 79) goto <D.23070>; else goto <D.23071>;
      <D.23070>:
      D.23059 = (unsigned int) len;
      D.23072 = D.23059 + 4294967264;
      assembly->strong_name_size = D.23072;
      goto <D.23073>;
      <D.23071>:
      D.23074 = len + 18446744073709551584;
      D.23075 = D.23074 << 3;
      D.23076 = (int) D.23075;
      D.23063 = (int) len;
      monoeg_g_log (0B, 16, "Invalid public key length: %d bits (total: %d)", D.23076, D.23063);
      assembly->strong_name_size = 128;
      <D.23073>:
      <D.23065>:
      D.23077 = assembly->strong_name_size;
      D.23078 = (long unsigned int) D.23077;
      D.23079 = monoeg_malloc0 (D.23078);
      assembly->strong_name = D.23079;
      D.23050 = token;
      return D.23050;
    }
  finally
    {
      blob_size = {CLOBBER};
      b = {CLOBBER};
    }
}


mono_image_add_stream_data (struct MonoDynamicStream * stream, const char * data, guint32 len)
{
  unsigned int D.23082;
  unsigned int D.23083;
  int D.23084;
  char * D.23085;
  sizetype D.23086;
  char * D.23087;
  long unsigned int D.23088;
  guint32 D.23089;
  guint32 idx;

  D.23082 = stream->index;
  D.23083 = D.23082 + len;
  D.23084 = (int) D.23083;
  make_room_in_stream (stream, D.23084);
  D.23085 = stream->data;
  D.23082 = stream->index;
  D.23086 = (sizetype) D.23082;
  D.23087 = D.23085 + D.23086;
  D.23088 = (long unsigned int) len;
  memcpy (D.23087, data, D.23088);
  idx = stream->index;
  D.23082 = stream->index;
  D.23083 = D.23082 + len;
  stream->index = D.23083;
  D.23089 = idx;
  return D.23089;
}


make_room_in_stream (struct MonoDynamicStream * stream, int size)
{
  unsigned int D.23091;
  unsigned int size.10;
  unsigned int D.23098;
  char * D.23099;
  long unsigned int D.23100;
  void * D.23101;

  D.23091 = stream->alloc_size;
  size.10 = (unsigned int) size;
  if (D.23091 >= size.10) goto <D.23093>; else goto <D.23094>;
  <D.23093>:
  return;
  <D.23094>:
  goto <D.18853>;
  <D.18852>:
  D.23091 = stream->alloc_size;
  if (D.23091 <= 4095) goto <D.23095>; else goto <D.23096>;
  <D.23095>:
  stream->alloc_size = 4096;
  goto <D.23097>;
  <D.23096>:
  D.23091 = stream->alloc_size;
  D.23098 = D.23091 * 2;
  stream->alloc_size = D.23098;
  <D.23097>:
  <D.18853>:
  D.23091 = stream->alloc_size;
  size.10 = (unsigned int) size;
  if (D.23091 <= size.10) goto <D.18852>; else goto <D.18854>;
  <D.18854>:
  D.23099 = stream->data;
  D.23091 = stream->alloc_size;
  D.23100 = (long unsigned int) D.23091;
  D.23101 = monoeg_realloc (D.23099, D.23100);
  stream->data = D.23101;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.23103;
  long unsigned int D.23104;

  D.23104 = __builtin_object_size (__dest, 0);
  D.23103 = __builtin___memcpy_chk (__dest, __src, __len, D.23104);
  return D.23103;
}


set_version_from_string (struct MonoString * version, guint32 * values)
{
  guint32 * D.23106;
  guint32 * D.23107;
  guint32 * D.23108;
  guint32 * D.23109;
  unsigned int D.23112;
  long unsigned int D.23113;
  long unsigned int D.23114;
  guint32 * D.23115;
  long int D.23116;
  unsigned int D.23117;
  gchar * p.11;
  char D.23119;
  int D.23120;
  gchar * p.12;
  gchar * ver;
  gchar * p;
  gchar * str;
  guint32 i;

  try
    {
      D.23106 = values + 4;
      *D.23106 = 0;
      D.23107 = values + 8;
      *D.23107 = 0;
      D.23108 = values + 16;
      *D.23108 = 0;
      D.23109 = values + 12;
      *D.23109 = 0;
      if (version == 0B) goto <D.23110>; else goto <D.23111>;
      <D.23110>:
      return;
      <D.23111>:
      str = mono_string_to_utf8 (version);
      ver = str;
      i = 0;
      goto <D.20233>;
      <D.20232>:
      D.23112 = i + 1;
      D.23113 = (long unsigned int) D.23112;
      D.23114 = D.23113 * 4;
      D.23115 = values + D.23114;
      D.23116 = strtol (ver, &p, 10);
      D.23117 = (unsigned int) D.23116;
      *D.23115 = D.23117;
      p.11 = p;
      D.23119 = *p.11;
      D.23120 = (int) D.23119;
      switch (D.23120) <default: <D.23122>, case 42: <D.20231>, case 46: <D.20229>>
      <D.20229>:
      p.11 = p;
      p.12 = p.11 + 1;
      p = p.12;
      goto <D.20230>;
      <D.20231>:
      p.11 = p;
      p.12 = p.11 + 1;
      p = p.12;
      goto <D.20230>;
      <D.23122>:
      <D.20230>:
      ver = p;
      i = i + 1;
      <D.20233>:
      if (i <= 3) goto <D.20232>; else goto <D.20234>;
      <D.20234>:
      monoeg_g_free (str);
    }
  finally
    {
      p = {CLOBBER};
    }
}


mono_image_fill_export_table (struct MonoDomain * domain, struct MonoReflectionTypeBuilder * tb, guint32 module_index, guint32 parent_index, struct MonoDynamicImage * assembly)
{
  struct MonoType * D.23126;
  unsigned int D.23127;
  unsigned int D.23128;
  struct MonoArray * D.23129;
  long unsigned int D.23132;
  char * D.23133;
  struct MonoReflectionTypeBuilder * D.23134;
  long unsigned int D.23135;
  struct MonoClass * klass;
  guint32 idx;
  guint32 i;

  D.23126 = mono_reflection_type_get_handle (tb);
  klass = mono_class_from_mono_type (D.23126);
  D.23127 = tb->table_idx;
  D.23128 = D.23127 | 33554432;
  klass->type_token = D.23128;
  idx = mono_image_fill_export_table_from_class (domain, klass, module_index, parent_index, assembly);
  D.23129 = tb->subtypes;
  if (D.23129 != 0B) goto <D.23130>; else goto <D.23131>;
  <D.23130>:
  i = 0;
  goto <D.19990>;
  <D.19989>:
  D.23129 = tb->subtypes;
  D.23132 = (long unsigned int) i;
  D.23133 = mono_array_addr_with_size (D.23129, 8, D.23132);
  D.23134 = MEM[(struct MonoReflectionTypeBuilder * *)D.23133];
  mono_image_fill_export_table (domain, D.23134, module_index, idx, assembly);
  i = i + 1;
  <D.19990>:
  D.23132 = (long unsigned int) i;
  D.23129 = tb->subtypes;
  D.23135 = mono_array_length (D.23129);
  if (D.23132 < D.23135) goto <D.19989>; else goto <D.19991>;
  <D.19991>:
  <D.23131>:
}


mono_image_fill_export_table_from_class (struct MonoDomain * domain, struct MonoClass * klass, guint32 module_index, guint32 parent_index, struct MonoDynamicImage * assembly)
{
  unsigned int D.23136;
  unsigned int D.23137;
  guint32 D.23140;
  unsigned int D.23141;
  unsigned int D.23142;
  guint32 * D.23143;
  unsigned int D.23144;
  unsigned int D.23145;
  long unsigned int D.23146;
  long unsigned int D.23147;
  guint32 * D.23148;
  unsigned int D.23149;
  struct MonoClass * D.23150;
  guint32 * D.23153;
  unsigned int D.23154;
  unsigned int D.23155;
  unsigned int D.23157;
  guint32 * D.23158;
  struct MonoDynamicStream * D.23159;
  const char * D.23160;
  unsigned int D.23161;
  guint32 * D.23162;
  const char * D.23163;
  unsigned int D.23164;
  unsigned int D.23165;
  struct MonoClassExt * D.23166;
  struct GList * D.23169;
  void * D.23172;
  unsigned int D.23173;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 visib;
  guint32 res;

  D.23136 = klass->flags;
  visib = D.23136 & 7;
  D.23137 = visib & 3;
  if (D.23137 == 0) goto <D.23138>; else goto <D.23139>;
  <D.23138>:
  D.23140 = 0;
  return D.23140;
  <D.23139>:
  table = &assembly->tables[39];
  D.23141 = table->rows;
  D.23142 = D.23141 + 1;
  table->rows = D.23142;
  D.23141 = table->rows;
  alloc_table (table, D.23141);
  D.23143 = table->values;
  D.23144 = table->next_idx;
  D.23145 = D.23144 * 5;
  D.23146 = (long unsigned int) D.23145;
  D.23147 = D.23146 * 4;
  values = D.23143 + D.23147;
  D.23136 = klass->flags;
  *values = D.23136;
  D.23148 = values + 4;
  D.23149 = klass->type_token;
  *D.23148 = D.23149;
  D.23150 = klass->nested_in;
  if (D.23150 != 0B) goto <D.23151>; else goto <D.23152>;
  <D.23151>:
  D.23153 = values + 16;
  D.23154 = parent_index << 2;
  D.23155 = D.23154 + 2;
  *D.23153 = D.23155;
  goto <D.23156>;
  <D.23152>:
  D.23153 = values + 16;
  D.23157 = module_index << 2;
  *D.23153 = D.23157;
  <D.23156>:
  D.23158 = values + 8;
  D.23159 = &assembly->sheap;
  D.23160 = klass->name;
  D.23161 = string_heap_insert (D.23159, D.23160);
  *D.23158 = D.23161;
  D.23162 = values + 12;
  D.23159 = &assembly->sheap;
  D.23163 = klass->name_space;
  D.23164 = string_heap_insert (D.23159, D.23163);
  *D.23162 = D.23164;
  res = table->next_idx;
  D.23144 = table->next_idx;
  D.23165 = D.23144 + 1;
  table->next_idx = D.23165;
  D.23166 = klass->ext;
  if (D.23166 != 0B) goto <D.23167>; else goto <D.23168>;
  <D.23167>:
  D.23166 = klass->ext;
  D.23169 = D.23166->nested_classes;
  if (D.23169 != 0B) goto <D.23170>; else goto <D.23171>;
  <D.23170>:
  {
    struct GList * tmp;

    D.23166 = klass->ext;
    tmp = D.23166->nested_classes;
    goto <D.19977>;
    <D.19976>:
    D.23172 = tmp->data;
    D.23144 = table->next_idx;
    D.23173 = D.23144 + 4294967295;
    mono_image_fill_export_table_from_class (domain, D.23172, module_index, D.23173, assembly);
    tmp = tmp->next;
    <D.19977>:
    if (tmp != 0B) goto <D.19976>; else goto <D.19978>;
    <D.19978>:
  }
  <D.23171>:
  <D.23168>:
  D.23140 = res;
  return D.23140;
}


mono_image_fill_file_table (struct MonoDomain * domain, struct MonoReflectionModule * module, struct MonoDynamicImage * assembly)
{
  unsigned int D.23175;
  unsigned int D.23176;
  guint32 * D.23177;
  unsigned int D.23178;
  unsigned int D.23179;
  long unsigned int D.23180;
  long unsigned int D.23181;
  guint32 * D.23182;
  struct MonoDynamicStream * D.23183;
  struct MonoImage * D.23184;
  const char * D.23185;
  unsigned int D.23186;
  long unsigned int D.23187;
  long unsigned int D.23188;
  struct MonoReflectionAssemblyBuilder * D.23191;
  struct MonoString * D.23192;
  char * D.23194;
  char * b.13;
  guint32 * D.23196;
  struct MonoDynamicStream * D.23197;
  long int b.14;
  long int blob_size.15;
  long int D.23200;
  unsigned int D.23201;
  unsigned int D.23202;
  unsigned int D.23203;
  struct MonoDynamicTable * table;
  guint32 * values;
  char blob_size[6];
  guchar hash[20];
  char * b;
  char * dir;
  char * path;

  try
    {
      b = &blob_size;
      table = &assembly->tables[38];
      D.23175 = table->rows;
      D.23176 = D.23175 + 1;
      table->rows = D.23176;
      D.23175 = table->rows;
      alloc_table (table, D.23175);
      D.23177 = table->values;
      D.23178 = table->next_idx;
      D.23179 = D.23178 * 3;
      D.23180 = (long unsigned int) D.23179;
      D.23181 = D.23180 * 4;
      values = D.23177 + D.23181;
      *values = 0;
      D.23182 = values + 4;
      D.23183 = &assembly->sheap;
      D.23184 = module->image;
      D.23185 = D.23184->module_name;
      D.23186 = string_heap_insert (D.23183, D.23185);
      *D.23182 = D.23186;
      D.23184 = module->image;
      D.23187 = BIT_FIELD_REF <*D.23184, 64, 192>;
      D.23188 = D.23187 & 268435456;
      if (D.23188 != 0) goto <D.23189>; else goto <D.23190>;
      <D.23189>:
      D.23191 = MEM[(struct MonoReflectionModuleBuilder *)module].assemblyb;
      D.23192 = D.23191->dir;
      dir = mono_string_to_utf8 (D.23192);
      D.23184 = module->image;
      D.23185 = D.23184->module_name;
      path = monoeg_g_strdup_printf ("%s%c%s", dir, 47, D.23185);
      goto <D.23193>;
      <D.23190>:
      dir = 0B;
      D.23184 = module->image;
      D.23194 = D.23184->name;
      path = monoeg_strdup (D.23194);
      <D.23193>:
      mono_sha1_get_digest_from_file (path, &hash);
      monoeg_g_free (dir);
      monoeg_g_free (path);
      b.13 = b;
      mono_metadata_encode_value (20, b.13, &b);
      D.23196 = values + 8;
      D.23197 = &assembly->blob;
      b.13 = b;
      b.14 = (long int) b.13;
      blob_size.15 = (long int) &blob_size;
      D.23200 = b.14 - blob_size.15;
      D.23201 = (unsigned int) D.23200;
      D.23202 = mono_image_add_stream_data (D.23197, &blob_size, D.23201);
      *D.23196 = D.23202;
      D.23197 = &assembly->blob;
      mono_image_add_stream_data (D.23197, &hash, 20);
      D.23178 = table->next_idx;
      D.23203 = D.23178 + 1;
      table->next_idx = D.23203;
    }
  finally
    {
      blob_size = {CLOBBER};
      hash = {CLOBBER};
      b = {CLOBBER};
    }
}


monoeg_strdup (const gchar * str)
{
  gchar * D.23206;

  if (str != 0B) goto <D.23204>; else goto <D.23205>;
  <D.23204>:
  D.23206 = __strdup (str);
  return D.23206;
  <D.23205>:
  D.23206 = 0B;
  return D.23206;
}


mono_image_fill_export_table_from_module (struct MonoDomain * domain, struct MonoReflectionModule * module, guint32 module_index, struct MonoDynamicImage * assembly)
{
  unsigned int D.23208;
  unsigned int D.23209;
  unsigned int D.23210;
  unsigned int D.23211;
  <unnamed-unsigned:24> D.23214;
  unsigned int D.23215;
  struct MonoImage * image;
  struct MonoTableInfo * t;
  guint32 i;

  image = module->image;
  t = &image->tables[2];
  i = 0;
  goto <D.20003>;
  <D.20002>:
  {
    struct MonoClass * klass;

    D.23208 = i + 1;
    D.23209 = D.23208 | 33554432;
    klass = mono_class_get (image, D.23209);
    D.23210 = klass->flags;
    D.23211 = D.23210 & 1;
    if (D.23211 != 0) goto <D.23212>; else goto <D.23213>;
    <D.23212>:
    mono_image_fill_export_table_from_class (domain, klass, module_index, 0, assembly);
    <D.23213>:
  }
  i = i + 1;
  <D.20003>:
  D.23214 = t->rows;
  D.23215 = (unsigned int) D.23214;
  if (D.23215 > i) goto <D.20002>; else goto <D.20004>;
  <D.20004>:
}


mono_image_fill_export_table_from_type_forwarders (struct MonoReflectionAssemblyBuilder * assemblyb, struct MonoDynamicImage * assembly)
{
  struct MonoArray * D.23216;
  long unsigned int D.23219;
  char * D.23220;
  _Bool D.23223;
  long int D.23224;
  long int D.23225;
  long unsigned int D.23228;
  struct MonoClass * klass;
  int i;

  D.23216 = assemblyb->type_forwarders;
  if (D.23216 == 0B) goto <D.23217>; else goto <D.23218>;
  <D.23217>:
  return;
  <D.23218>:
  i = 0;
  goto <D.20033>;
  <D.20032>:
  {
    struct MonoReflectionType * t;
    struct MonoType * type;

    D.23216 = assemblyb->type_forwarders;
    D.23219 = (long unsigned int) i;
    D.23220 = mono_array_addr_with_size (D.23216, 8, D.23219);
    t = MEM[(struct MonoReflectionType * *)D.23220];
    if (t == 0B) goto <D.23221>; else goto <D.23222>;
    <D.23221>:
    // predicted unlikely by continue predictor.
    goto <D.20031>;
    <D.23222>:
    type = mono_reflection_type_get_handle (t);
    D.23223 = type == 0B;
    D.23224 = (long int) D.23223;
    D.23225 = __builtin_expect (D.23224, 0);
    if (D.23225 != 0) goto <D.23226>; else goto <D.23227>;
    <D.23226>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3863, "type");
    <D.23227>:
    klass = mono_class_from_mono_type (type);
    add_exported_type (assemblyb, assembly, klass, 0);
  }
  <D.20031>:
  i = i + 1;
  <D.20033>:
  D.23219 = (long unsigned int) i;
  D.23216 = assemblyb->type_forwarders;
  D.23228 = mono_array_length (D.23216);
  if (D.23219 < D.23228) goto <D.20032>; else goto <D.20034>;
  <D.20034>:
}


add_exported_type (struct MonoReflectionAssemblyBuilder * assemblyb, struct MonoDynamicImage * assembly, struct MonoClass * klass, guint32 parent_index)
{
  struct MonoClass * D.23230;
  unsigned int D.23233;
  struct MonoImage * D.23235;
  unsigned int D.23236;
  _Bool D.23237;
  long int D.23238;
  long int D.23239;
  unsigned int D.23242;
  unsigned int D.23243;
  unsigned int D.23244;
  guint32 * D.23245;
  unsigned int D.23246;
  long unsigned int D.23247;
  long unsigned int D.23248;
  guint32 iftmp.16;
  guint32 * D.23253;
  guint32 * D.23254;
  guint32 * D.23255;
  struct MonoDynamicStream * D.23256;
  const char * D.23257;
  unsigned int D.23258;
  guint32 * D.23259;
  const char * D.23260;
  unsigned int D.23261;
  unsigned int D.23262;
  unsigned int D.23263;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 scope;
  guint32 scope_idx;
  guint32 impl;
  guint32 current_idx;
  gboolean forwarder;
  void * iter;
  struct MonoClass * nested;

  try
    {
      forwarder = 1;
      iter = 0B;
      D.23230 = klass->nested_in;
      if (D.23230 != 0B) goto <D.23231>; else goto <D.23232>;
      <D.23231>:
      D.23233 = parent_index << 2;
      impl = D.23233 + 2;
      forwarder = 0;
      goto <D.23234>;
      <D.23232>:
      D.23235 = klass->image;
      scope = resolution_scope_from_image (assembly, D.23235);
      D.23236 = scope & 3;
      D.23237 = D.23236 != 2;
      D.23238 = (long int) D.23237;
      D.23239 = __builtin_expect (D.23238, 0);
      if (D.23239 != 0) goto <D.23240>; else goto <D.23241>;
      <D.23240>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3823, "(scope & MONO_RESOLTION_SCOPE_MASK) == MONO_RESOLTION_SCOPE_ASSEMBLYREF");
      <D.23241>:
      scope_idx = scope >> 2;
      D.23242 = scope_idx << 2;
      impl = D.23242 + 1;
      <D.23234>:
      table = &assembly->tables[39];
      D.23243 = table->rows;
      D.23244 = D.23243 + 1;
      table->rows = D.23244;
      D.23243 = table->rows;
      alloc_table (table, D.23243);
      current_idx = table->next_idx;
      D.23245 = table->values;
      D.23246 = current_idx * 5;
      D.23247 = (long unsigned int) D.23246;
      D.23248 = D.23247 * 4;
      values = D.23245 + D.23248;
      if (forwarder != 0) goto <D.23250>; else goto <D.23251>;
      <D.23250>:
      iftmp.16 = 2097152;
      goto <D.23252>;
      <D.23251>:
      iftmp.16 = 0;
      <D.23252>:
      *values = iftmp.16;
      D.23253 = values + 4;
      *D.23253 = 0;
      D.23254 = values + 16;
      *D.23254 = impl;
      D.23255 = values + 8;
      D.23256 = &assembly->sheap;
      D.23257 = klass->name;
      D.23258 = string_heap_insert (D.23256, D.23257);
      *D.23255 = D.23258;
      D.23259 = values + 12;
      D.23256 = &assembly->sheap;
      D.23260 = klass->name_space;
      D.23261 = string_heap_insert (D.23256, D.23260);
      *D.23259 = D.23261;
      D.23262 = table->next_idx;
      D.23263 = D.23262 + 1;
      table->next_idx = D.23263;
      goto <D.20021>;
      <D.20020>:
      add_exported_type (assemblyb, assembly, nested, current_idx);
      <D.20021>:
      nested = mono_class_get_nested_types (klass, &iter);
      if (nested != 0B) goto <D.20020>; else goto <D.20022>;
      <D.20022>:
    }
  finally
    {
      iter = {CLOBBER};
    }
}


resolution_scope_from_image (struct MonoDynamicImage * assembly, struct MonoImage * image)
{
  struct GHashTable * D.23264;
  void * D.23265;
  long int D.23266;
  guint32 D.23269;
  struct MonoAssembly * D.23270;
  unsigned char D.23271;
  struct MonoAssembly * D.23274;
  unsigned int D.23277;
  unsigned int token.17;
  unsigned int D.23279;
  unsigned int D.23280;
  unsigned int D.23281;
  guint32 * D.23282;
  long unsigned int D.23283;
  long unsigned int D.23284;
  struct MonoDynamicStream * D.23285;
  const char * D.23286;
  unsigned int D.23287;
  void * D.23288;
  struct MonoTableInfo * D.23292;
  unsigned int token.18;
  unsigned int D.23294;
  unsigned int D.23295;
  long unsigned int D.23296;
  long unsigned int D.23297;
  guint32 * D.23298;
  const char * D.23299;
  unsigned int D.23300;
  unsigned int D.23301;
  guint32 * D.23302;
  unsigned int D.23303;
  guint32 * D.23304;
  unsigned int D.23305;
  guint32 * D.23306;
  unsigned int D.23307;
  guint32 * D.23308;
  guint32 * D.23309;
  guint32 * D.23310;
  const char * D.23311;
  unsigned char D.23312;
  unsigned int D.23315;
  guchar * D.23318;
  unsigned int publen.19;
  guint32 * D.23320;
  struct MonoDynamicStream * D.23321;
  unsigned int D.23322;
  struct MonoDynamicTable * table;
  guint32 token;
  guint32 * values;
  guint32 cols[9];
  const char * pubkey;
  guint32 publen;

  try
    {
      D.23264 = assembly->handleref;
      D.23265 = monoeg_g_hash_table_lookup (D.23264, image);
      D.23266 = (long int) D.23265;
      token = (guint32) D.23266;
      if (token != 0) goto <D.23267>; else goto <D.23268>;
      <D.23267>:
      D.23269 = token;
      return D.23269;
      <D.23268>:
      D.23270 = image->assembly;
      D.23271 = D.23270->dynamic;
      if (D.23271 != 0) goto <D.23272>; else goto <D.23273>;
      <D.23272>:
      D.23270 = image->assembly;
      D.23274 = assembly->image.assembly;
      if (D.23270 == D.23274) goto <D.23275>; else goto <D.23276>;
      <D.23275>:
      table = &assembly->tables[26];
      D.23277 = table->next_idx;
      token.17 = D.23277;
      D.23279 = token.17 + 1;
      table->next_idx = D.23279;
      token = token.17;
      D.23280 = table->rows;
      D.23281 = D.23280 + 1;
      table->rows = D.23281;
      D.23280 = table->rows;
      alloc_table (table, D.23280);
      D.23282 = table->values;
      D.23283 = (long unsigned int) token;
      D.23284 = D.23283 * 4;
      values = D.23282 + D.23284;
      D.23285 = &assembly->sheap;
      D.23286 = image->module_name;
      D.23287 = string_heap_insert (D.23285, D.23286);
      *values = D.23287;
      token = token << 2;
      token = token | 1;
      D.23264 = assembly->handleref;
      D.23283 = (long unsigned int) token;
      D.23288 = (void *) D.23283;
      monoeg_g_hash_table_insert_replace (D.23264, image, D.23288, 0);
      D.23269 = token;
      return D.23269;
      <D.23276>:
      <D.23273>:
      D.23270 = image->assembly;
      D.23271 = D.23270->dynamic;
      if (D.23271 != 0) goto <D.23289>; else goto <D.23290>;
      <D.23289>:
      memset (&cols, 0, 36);
      goto <D.23291>;
      <D.23290>:
      D.23270 = image->assembly;
      image = D.23270->image;
      D.23292 = &image->tables[32];
      mono_metadata_decode_row (D.23292, 0, &cols, 9);
      <D.23291>:
      table = &assembly->tables[35];
      D.23277 = table->next_idx;
      token.18 = D.23277;
      D.23294 = token.18 + 1;
      table->next_idx = D.23294;
      token = token.18;
      D.23280 = table->rows;
      D.23281 = D.23280 + 1;
      table->rows = D.23281;
      D.23280 = table->rows;
      alloc_table (table, D.23280);
      D.23282 = table->values;
      D.23295 = token * 9;
      D.23296 = (long unsigned int) D.23295;
      D.23297 = D.23296 * 4;
      values = D.23282 + D.23297;
      D.23298 = values + 24;
      D.23285 = &assembly->sheap;
      D.23299 = image->assembly_name;
      D.23300 = string_heap_insert (D.23285, D.23299);
      *D.23298 = D.23300;
      D.23301 = cols[1];
      *values = D.23301;
      D.23302 = values + 4;
      D.23303 = cols[2];
      *D.23302 = D.23303;
      D.23304 = values + 8;
      D.23305 = cols[3];
      *D.23304 = D.23305;
      D.23306 = values + 12;
      D.23307 = cols[4];
      *D.23306 = D.23307;
      D.23308 = values + 16;
      *D.23308 = 0;
      D.23309 = values + 28;
      *D.23309 = 0;
      D.23310 = values + 32;
      *D.23310 = 0;
      D.23270 = image->assembly;
      D.23311 = D.23270->aname.culture;
      D.23312 = MEM[(const unsigned char * {ref-all})D.23311];
      if (D.23312 != 0) goto <D.23313>; else goto <D.23314>;
      <D.23313>:
      D.23309 = values + 28;
      D.23285 = &assembly->sheap;
      D.23270 = image->assembly;
      D.23311 = D.23270->aname.culture;
      D.23315 = string_heap_insert (D.23285, D.23311);
      *D.23309 = D.23315;
      <D.23314>:
      pubkey = mono_image_get_public_key (image, &publen);
      if (pubkey != 0B) goto <D.23316>; else goto <D.23317>;
      <D.23316>:
      {
        guchar pubtoken[9];

        try
          {
            pubtoken[0] = 8;
            D.23318 = &pubtoken + 1;
            publen.19 = publen;
            mono_digest_get_public_token (D.23318, pubkey, publen.19);
            D.23320 = values + 20;
            D.23321 = &assembly->blob;
            D.23322 = mono_image_add_stream_data (D.23321, &pubtoken, 9);
            *D.23320 = D.23322;
          }
        finally
          {
            pubtoken = {CLOBBER};
          }
      }
      goto <D.23323>;
      <D.23317>:
      D.23320 = values + 20;
      *D.23320 = 0;
      <D.23323>:
      token = token << 2;
      token = token | 2;
      D.23264 = assembly->handleref;
      D.23283 = (long unsigned int) token;
      D.23288 = (void *) D.23283;
      monoeg_g_hash_table_insert_replace (D.23264, image, D.23288, 0);
      D.23269 = token;
      return D.23269;
    }
  finally
    {
      cols = {CLOBBER};
      publen = {CLOBBER};
    }
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memset (void * __dest, int __ch, size_t __len)
{
  void * D.23326;
  long unsigned int D.23327;

  D.23327 = __builtin_object_size (__dest, 0);
  D.23326 = __builtin___memset_chk (__dest, __ch, __len, D.23327);
  return D.23326;
}


assembly_add_resource_manifest (struct MonoReflectionModuleBuilder * mb, struct MonoDynamicImage * assembly, struct MonoReflectionResource * rsrc, guint32 implementation)
{
  unsigned int D.23329;
  unsigned int D.23330;
  guint32 * D.23331;
  unsigned int D.23332;
  unsigned int D.23333;
  long unsigned int D.23334;
  long unsigned int D.23335;
  unsigned int D.23336;
  guint32 * D.23337;
  unsigned int D.23338;
  guint32 * D.23339;
  struct MonoDynamicStream * D.23340;
  struct MonoString * D.23341;
  unsigned int D.23342;
  guint32 * D.23343;
  unsigned int D.23344;
  struct MonoDynamicTable * table;
  guint32 * values;

  table = &assembly->tables[40];
  D.23329 = table->rows;
  D.23330 = D.23329 + 1;
  table->rows = D.23330;
  D.23329 = table->rows;
  alloc_table (table, D.23329);
  D.23331 = table->values;
  D.23332 = table->next_idx;
  D.23333 = D.23332 * 4;
  D.23334 = (long unsigned int) D.23333;
  D.23335 = D.23334 * 4;
  values = D.23331 + D.23335;
  D.23336 = rsrc->offset;
  *values = D.23336;
  D.23337 = values + 4;
  D.23338 = rsrc->attrs;
  *D.23337 = D.23338;
  D.23339 = values + 8;
  D.23340 = &assembly->sheap;
  D.23341 = rsrc->name;
  D.23342 = string_heap_insert_mstring (D.23340, D.23341);
  *D.23339 = D.23342;
  D.23343 = values + 12;
  *D.23343 = implementation;
  D.23332 = table->next_idx;
  D.23344 = D.23332 + 1;
  table->next_idx = D.23344;
}


string_heap_insert (struct MonoDynamicStream * sh, const char * str)
{
  struct GHashTable * D.23345;
  int D.23346;
  guint32 D.23349;
  void * oldval.20;
  long int oldval.21;
  long unsigned int D.23352;
  unsigned int D.23353;
  unsigned int D.23354;
  int D.23355;
  gchar * D.23356;
  long unsigned int D.23357;
  void * D.23358;
  char * D.23359;
  sizetype D.23360;
  char * D.23361;
  long unsigned int D.23362;
  unsigned int D.23363;
  unsigned int D.23364;
  guint32 idx;
  guint32 len;
  void * oldkey;
  void * oldval;

  try
    {
      D.23345 = sh->hash;
      D.23346 = monoeg_g_hash_table_lookup_extended (D.23345, str, &oldkey, &oldval);
      if (D.23346 != 0) goto <D.23347>; else goto <D.23348>;
      <D.23347>:
      oldval.20 = oldval;
      oldval.21 = (long int) oldval.20;
      D.23349 = (guint32) oldval.21;
      return D.23349;
      <D.23348>:
      D.23352 = __strlen_g (str);
      D.23353 = (unsigned int) D.23352;
      len = D.23353 + 1;
      idx = sh->index;
      D.23354 = idx + len;
      D.23355 = (int) D.23354;
      make_room_in_stream (sh, D.23355);
      D.23345 = sh->hash;
      D.23356 = monoeg_strdup (str);
      D.23357 = (long unsigned int) idx;
      D.23358 = (void *) D.23357;
      monoeg_g_hash_table_insert_replace (D.23345, D.23356, D.23358, 0);
      D.23359 = sh->data;
      D.23360 = (sizetype) idx;
      D.23361 = D.23359 + D.23360;
      D.23362 = (long unsigned int) len;
      memcpy (D.23361, str, D.23362);
      D.23363 = sh->index;
      D.23364 = D.23363 + len;
      sh->index = D.23364;
      D.23349 = idx;
      return D.23349;
    }
  finally
    {
      oldkey = {CLOBBER};
      oldval = {CLOBBER};
    }
}


__attribute__((__gnu_inline__))
__strlen_g (const char * __str)
{
  size_t D.23367;
  long int __ptr.22;
  long int __str.23;
  long int D.23370;
  char * __ptr;
  char * __tmp;

  __ptr = 0B;
  __tmp = __str;
  __asm__ __volatile__("   la    0,0
0: srst  %0,%1
   jo    0b
" : "=&a" __ptr, "=&a" __tmp : "0" __ptr, "1" __tmp : "0", "memory", "cc");
  __ptr.22 = (long int) __ptr;
  __str.23 = (long int) __str;
  D.23370 = __ptr.22 - __str.23;
  D.23367 = (size_t) D.23370;
  return D.23367;
}


mono_image_get_method_info (struct MonoReflectionMethodBuilder * mb, struct MonoDynamicImage * assembly)
{
  guint32 * D.23372;
  unsigned int D.23373;
  struct MonoString * D.23374;
  int iftmp.24;
  unsigned int D.23378;
  unsigned int D.23381;
  unsigned int D.23382;
  unsigned int D.23384;
  unsigned int D.23385;
  unsigned int D.23386;
  guint32 * D.23387;
  unsigned int D.23388;
  long unsigned int D.23389;
  long unsigned int D.23390;
  unsigned int D.23391;
  unsigned int D.23392;
  unsigned int ncharset.25;
  unsigned int D.23394;
  unsigned int extra_flags.26;
  unsigned int D.23396;
  guint32 * D.23397;
  unsigned int D.23398;
  unsigned int D.23399;
  unsigned int D.23400;
  struct MonoString * D.23401;
  guint32 * D.23404;
  struct MonoDynamicStream * D.23405;
  unsigned int D.23406;
  struct MonoString * D.23408;
  unsigned int D.23409;
  guint32 * D.23410;
  unsigned int D.23411;
  unsigned int D.23412;
  long unsigned int D.23415;
  long unsigned int D.23416;
  guint32 * D.23417;
  struct MonoArray * D.23418;
  long unsigned int D.23421;
  unsigned int D.23422;
  unsigned int D.23423;
  long unsigned int D.23424;
  char * D.23425;
  void * D.23426;
  long unsigned int D.23427;
  struct MonoDynamicTable * table;
  guint32 * values;
  struct ReflectionMethodBuilder rmb;
  int i;

  try
    {
      reflection_methodbuilder_from_method_builder (&rmb, mb);
      mono_image_basic_method (&rmb, assembly);
      D.23372 = rmb.table_idx;
      D.23373 = *D.23372;
      mb->table_idx = D.23373;
      D.23374 = mb->dll;
      if (D.23374 != 0B) goto <D.23375>; else goto <D.23376>;
      <D.23375>:
      {
        guint32 moduleref;
        int ncharset;
        int extra_flags;

        D.23378 = mb->charset;
        if (D.23378 != 0) goto <D.23379>; else goto <D.23380>;
        <D.23379>:
        D.23378 = mb->charset;
        D.23381 = D.23378 + 2147483647;
        D.23382 = D.23381 * 2;
        iftmp.24 = (int) D.23382;
        goto <D.23383>;
        <D.23380>:
        iftmp.24 = 0;
        <D.23383>:
        ncharset = iftmp.24;
        D.23384 = mb->extra_flags;
        extra_flags = (int) D.23384;
        table = &assembly->tables[28];
        D.23385 = table->rows;
        D.23386 = D.23385 + 1;
        table->rows = D.23386;
        D.23385 = table->rows;
        alloc_table (table, D.23385);
        D.23387 = table->values;
        D.23385 = table->rows;
        D.23388 = D.23385 * 4;
        D.23389 = (long unsigned int) D.23388;
        D.23390 = D.23389 * 4;
        values = D.23387 + D.23390;
        D.23391 = mb->native_cc;
        D.23392 = D.23391 << 8;
        ncharset.25 = (unsigned int) ncharset;
        D.23394 = D.23392 | ncharset.25;
        extra_flags.26 = (unsigned int) extra_flags;
        D.23396 = D.23394 | extra_flags.26;
        *values = D.23396;
        D.23397 = values + 4;
        D.23398 = mb->table_idx;
        D.23399 = D.23398 << 1;
        D.23400 = D.23399 | 1;
        *D.23397 = D.23400;
        D.23401 = mb->dllentry;
        if (D.23401 != 0B) goto <D.23402>; else goto <D.23403>;
        <D.23402>:
        D.23404 = values + 8;
        D.23405 = &assembly->sheap;
        D.23401 = mb->dllentry;
        D.23406 = string_heap_insert_mstring (D.23405, D.23401);
        *D.23404 = D.23406;
        goto <D.23407>;
        <D.23403>:
        D.23404 = values + 8;
        D.23405 = &assembly->sheap;
        D.23408 = mb->name;
        D.23409 = string_heap_insert_mstring (D.23405, D.23408);
        *D.23404 = D.23409;
        <D.23407>:
        D.23405 = &assembly->sheap;
        D.23374 = mb->dll;
        moduleref = string_heap_insert_mstring (D.23405, D.23374);
        D.23410 = values + 12;
        D.23411 = find_index_in_table (assembly, 26, 0, moduleref);
        *D.23410 = D.23411;
        D.23412 = *D.23410;
        if (D.23412 == 0) goto <D.23413>; else goto <D.23414>;
        <D.23413>:
        table = &assembly->tables[26];
        D.23385 = table->rows;
        D.23386 = D.23385 + 1;
        table->rows = D.23386;
        D.23385 = table->rows;
        alloc_table (table, D.23385);
        D.23387 = table->values;
        D.23385 = table->rows;
        D.23415 = (long unsigned int) D.23385;
        D.23416 = D.23415 * 4;
        D.23417 = D.23387 + D.23416;
        *D.23417 = moduleref;
        D.23410 = values + 12;
        D.23385 = table->rows;
        *D.23410 = D.23385;
        <D.23414>:
      }
      <D.23376>:
      D.23418 = mb->generic_params;
      if (D.23418 != 0B) goto <D.23419>; else goto <D.23420>;
      <D.23419>:
      table = &assembly->tables[42];
      D.23418 = mb->generic_params;
      D.23421 = mono_array_length (D.23418);
      D.23385 = table->rows;
      D.23422 = (unsigned int) D.23421;
      D.23423 = D.23385 + D.23422;
      table->rows = D.23423;
      D.23385 = table->rows;
      alloc_table (table, D.23385);
      i = 0;
      goto <D.19311>;
      <D.19310>:
      {
        guint32 owner;

        D.23398 = mb->table_idx;
        D.23399 = D.23398 << 1;
        owner = D.23399 | 1;
        D.23418 = mb->generic_params;
        D.23424 = (long unsigned int) i;
        D.23425 = mono_array_addr_with_size (D.23418, 8, D.23424);
        D.23426 = MEM[(void * *)D.23425];
        mono_image_get_generic_param_info (D.23426, owner, assembly);
      }
      i = i + 1;
      <D.19311>:
      D.23424 = (long unsigned int) i;
      D.23418 = mb->generic_params;
      D.23427 = mono_array_length (D.23418);
      if (D.23424 < D.23427) goto <D.19310>; else goto <D.19312>;
      <D.19312>:
      <D.23420>:
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


reflection_methodbuilder_from_method_builder (struct ReflectionMethodBuilder * rmb, struct MonoReflectionMethodBuilder * mb)
{
  struct MonoReflectionILGen * D.23428;
  struct MonoObject * D.23429;
  struct MonoReflectionType * D.23430;
  struct MonoArray * D.23431;
  struct MonoArray * D.23432;
  struct MonoGenericContainer * D.23433;
  struct MonoArray * D.23434;
  unsigned int D.23435;
  unsigned int D.23436;
  unsigned int D.23437;
  struct MonoArray * D.23438;
  struct MonoObject * D.23439;
  struct MonoString * D.23440;
  guint32 * D.23441;
  unsigned char D.23442;
  struct MonoArray * D.23443;
  struct MonoArray * D.23444;
  struct MonoArray * D.23445;
  struct MonoArray * D.23446;
  struct MonoArray * D.23447;
  struct MonoMethod * D.23448;
  struct MonoString * D.23449;
  unsigned int D.23452;
  int D.23453;
  unsigned int D.23454;
  int D.23455;
  unsigned int D.23456;
  int D.23457;
  struct MonoString * D.23458;

  memset (rmb, 0, 208);
  D.23428 = mb->ilgen;
  rmb->ilgen = D.23428;
  D.23429 = mb->rtype;
  D.23430 = mono_reflection_type_resolve_user_types (D.23429);
  rmb->rtype = D.23430;
  D.23431 = mb->parameters;
  rmb->parameters = D.23431;
  D.23432 = mb->generic_params;
  rmb->generic_params = D.23432;
  D.23433 = mb->generic_container;
  rmb->generic_container = D.23433;
  rmb->opt_types = 0B;
  D.23434 = mb->pinfo;
  rmb->pinfo = D.23434;
  D.23435 = mb->attrs;
  rmb->attrs = D.23435;
  D.23436 = mb->iattrs;
  rmb->iattrs = D.23436;
  D.23437 = mb->call_conv;
  rmb->call_conv = D.23437;
  D.23438 = mb->code;
  rmb->code = D.23438;
  D.23439 = mb->type;
  rmb->type = D.23439;
  D.23440 = mb->name;
  rmb->name = D.23440;
  D.23441 = &mb->table_idx;
  rmb->table_idx = D.23441;
  D.23442 = mb->init_locals;
  rmb->init_locals = D.23442;
  rmb->skip_visibility = 0;
  D.23443 = mb->return_modreq;
  rmb->return_modreq = D.23443;
  D.23444 = mb->return_modopt;
  rmb->return_modopt = D.23444;
  D.23445 = mb->param_modreq;
  rmb->param_modreq = D.23445;
  D.23446 = mb->param_modopt;
  rmb->param_modopt = D.23446;
  D.23447 = mb->permissions;
  rmb->permissions = D.23447;
  D.23448 = mb->mhandle;
  rmb->mhandle = D.23448;
  rmb->nrefs = 0;
  rmb->refs = 0B;
  D.23449 = mb->dll;
  if (D.23449 != 0B) goto <D.23450>; else goto <D.23451>;
  <D.23450>:
  D.23452 = mb->charset;
  D.23453 = (int) D.23452;
  rmb->charset = D.23453;
  D.23454 = mb->extra_flags;
  D.23455 = (int) D.23454;
  rmb->extra_flags = D.23455;
  D.23456 = mb->native_cc;
  D.23457 = (int) D.23456;
  rmb->native_cc = D.23457;
  D.23458 = mb->dllentry;
  rmb->dllentry = D.23458;
  D.23449 = mb->dll;
  rmb->dll = D.23449;
  <D.23451>:
}


mono_reflection_type_resolve_user_types (struct MonoReflectionType * type)
{
  struct MonoType * D.23462;
  struct MonoReflectionType * D.23463;
  int D.23464;
  int D.23467;
  struct MonoException * D.23470;

  if (type == 0B) goto <D.23459>; else goto <D.23461>;
  <D.23461>:
  D.23462 = type->type;
  if (D.23462 != 0B) goto <D.23459>; else goto <D.23460>;
  <D.23459>:
  D.23463 = type;
  return D.23463;
  <D.23460>:
  D.23464 = is_usertype (type);
  if (D.23464 != 0) goto <D.23465>; else goto <D.23466>;
  <D.23465>:
  type = mono_reflection_type_get_underlying_system_type (type);
  D.23467 = is_usertype (type);
  if (D.23467 != 0) goto <D.23468>; else goto <D.23469>;
  <D.23468>:
  D.23470 = mono_get_exception_not_supported ("User defined subclasses of System.Type are not yet supported22");
  mono_raise_exception (D.23470);
  <D.23469>:
  <D.23466>:
  D.23463 = type;
  return D.23463;
}


mono_reflection_type_get_underlying_system_type (struct MonoReflectionType * t)
{
  struct MonoMethod * method_get_underlying_system_type.27;
  struct MonoClass * D.23475;
  struct MonoMethod * method_get_underlying_system_type.28;
  struct MonoReflectionType * D.23477;
  static struct MonoMethod * method_get_underlying_system_type = 0B;
  struct MonoMethod * usertype_method;

  method_get_underlying_system_type.27 = method_get_underlying_system_type;
  if (method_get_underlying_system_type.27 == 0B) goto <D.23473>; else goto <D.23474>;
  <D.23473>:
  D.23475 = mono_defaults.systemtype_class;
  method_get_underlying_system_type.28 = mono_class_get_method_from_name (D.23475, "get_UnderlyingSystemType", 0);
  method_get_underlying_system_type = method_get_underlying_system_type.28;
  <D.23474>:
  method_get_underlying_system_type.27 = method_get_underlying_system_type;
  usertype_method = mono_object_get_virtual_method (t, method_get_underlying_system_type.27);
  D.23477 = mono_runtime_invoke (usertype_method, t, 0B, 0B);
  return D.23477;
}


is_usertype (struct MonoReflectionType * ref)
{
  struct MonoVTable * D.23479;
  gboolean D.23480;
  int iftmp.29;
  struct MonoImage * D.23485;
  struct MonoImage * D.23486;
  const char * D.23488;
  int D.23489;
  struct MonoClass * class;

  D.23479 = MEM[(struct MonoObject *)ref].vtable;
  class = D.23479->klass;
  D.23485 = class->image;
  D.23486 = mono_defaults.corlib;
  if (D.23485 != D.23486) goto <D.23482>; else goto <D.23487>;
  <D.23487>:
  D.23488 = class->name;
  D.23489 = strcmp ("TypeDelegator", D.23488);
  if (D.23489 == 0) goto <D.23482>; else goto <D.23483>;
  <D.23482>:
  iftmp.29 = 1;
  goto <D.23484>;
  <D.23483>:
  iftmp.29 = 0;
  <D.23484>:
  D.23480 = iftmp.29;
  return D.23480;
}


mono_image_basic_method (struct ReflectionMethodBuilder * mb, struct MonoDynamicImage * assembly)
{
  guint32 * D.23491;
  unsigned int D.23492;
  unsigned int D.23493;
  unsigned int D.23494;
  struct GHashTable * D.23495;
  struct MonoMethod * D.23496;
  unsigned int D.23497;
  long unsigned int D.23498;
  void * D.23499;
  guint32 * D.23500;
  unsigned int D.23501;
  long unsigned int D.23502;
  long unsigned int D.23503;
  guint32 * D.23504;
  struct MonoDynamicStream * D.23505;
  struct MonoString * D.23506;
  unsigned int D.23507;
  guint32 * D.23508;
  unsigned int D.23509;
  guint32 * D.23510;
  unsigned int D.23511;
  guint32 * D.23512;
  unsigned int D.23513;
  unsigned int D.23514;
  guint32 * D.23515;
  unsigned int D.23516;
  struct MonoArray * D.23517;
  struct MonoArray * D.23518;
  guint32 * D.23521;
  unsigned int D.23522;
  unsigned int D.23523;
  long unsigned int D.23524;
  long unsigned int D.23525;
  long unsigned int D.23526;
  char * D.23527;
  void * D.23528;
  long unsigned int D.23531;
  unsigned int D.23532;
  unsigned int D.23533;
  unsigned int D.23534;
  long unsigned int D.23535;
  long unsigned int D.23536;
  char * D.23537;
  unsigned int D.23540;
  struct MonoString * D.23541;
  unsigned int D.23544;
  struct MonoReflectionMarshal * D.23546;
  unsigned int D.23549;
  unsigned int D.23550;
  unsigned int D.23551;
  long unsigned int D.23552;
  long unsigned int D.23553;
  unsigned int D.23554;
  unsigned int D.23555;
  guint32 * D.23556;
  unsigned int D.23557;
  unsigned int D.23558;
  unsigned int D.23559;
  unsigned int D.23560;
  unsigned int D.23563;
  long unsigned int D.23564;
  long unsigned int D.23565;
  guint32 * D.23566;
  unsigned int D.23567;
  unsigned int D.23568;
  unsigned int D.23569;
  guint32 * D.23570;
  struct MonoObject * D.23571;
  unsigned int D.23572;
  unsigned int field_type.30;
  long unsigned int D.23574;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint i;
  guint count;

  table = &assembly->tables[6];
  D.23491 = mb->table_idx;
  D.23492 = table->next_idx;
  D.23493 = D.23492;
  D.23494 = D.23493 + 1;
  table->next_idx = D.23494;
  *D.23491 = D.23493;
  D.23495 = assembly->method_to_table_idx;
  D.23496 = mb->mhandle;
  D.23491 = mb->table_idx;
  D.23497 = *D.23491;
  D.23498 = (long unsigned int) D.23497;
  D.23499 = (void *) D.23498;
  monoeg_g_hash_table_insert_replace (D.23495, D.23496, D.23499, 0);
  D.23500 = table->values;
  D.23491 = mb->table_idx;
  D.23497 = *D.23491;
  D.23501 = D.23497 * 6;
  D.23502 = (long unsigned int) D.23501;
  D.23503 = D.23502 * 4;
  values = D.23500 + D.23503;
  D.23504 = values + 12;
  D.23505 = &assembly->sheap;
  D.23506 = mb->name;
  D.23507 = string_heap_insert_mstring (D.23505, D.23506);
  *D.23504 = D.23507;
  D.23508 = values + 8;
  D.23509 = mb->attrs;
  *D.23508 = D.23509;
  D.23510 = values + 4;
  D.23511 = mb->iattrs;
  *D.23510 = D.23511;
  D.23512 = values + 16;
  D.23513 = method_builder_encode_signature (assembly, mb);
  *D.23512 = D.23513;
  D.23514 = method_encode_code (assembly, mb);
  *values = D.23514;
  table = &assembly->tables[8];
  D.23515 = values + 20;
  D.23492 = table->next_idx;
  *D.23515 = D.23492;
  D.23491 = mb->table_idx;
  D.23497 = *D.23491;
  D.23516 = D.23497 | 100663296;
  D.23517 = mb->permissions;
  mono_image_add_decl_security (assembly, D.23516, D.23517);
  D.23518 = mb->pinfo;
  if (D.23518 != 0B) goto <D.23519>; else goto <D.23520>;
  <D.23519>:
  {
    struct MonoDynamicTable * mtable;
    guint32 * mvalues;

    mtable = &assembly->tables[13];
    D.23521 = mtable->values;
    D.23522 = mtable->next_idx;
    D.23523 = D.23522 * 2;
    D.23524 = (long unsigned int) D.23523;
    D.23525 = D.23524 * 4;
    mvalues = D.23521 + D.23525;
    count = 0;
    i = 0;
    goto <D.19261>;
    <D.19260>:
    D.23518 = mb->pinfo;
    D.23526 = (long unsigned int) i;
    D.23527 = mono_array_addr_with_size (D.23518, 8, D.23526);
    D.23528 = MEM[(void * *)D.23527];
    if (D.23528 != 0B) goto <D.23529>; else goto <D.23530>;
    <D.23529>:
    count = count + 1;
    <D.23530>:
    i = i + 1;
    <D.19261>:
    D.23526 = (long unsigned int) i;
    D.23518 = mb->pinfo;
    D.23531 = mono_array_length (D.23518);
    if (D.23526 < D.23531) goto <D.19260>; else goto <D.19262>;
    <D.19262>:
    D.23532 = table->rows;
    D.23533 = D.23532 + count;
    table->rows = D.23533;
    D.23532 = table->rows;
    alloc_table (table, D.23532);
    D.23500 = table->values;
    D.23492 = table->next_idx;
    D.23534 = D.23492 * 3;
    D.23535 = (long unsigned int) D.23534;
    D.23536 = D.23535 * 4;
    values = D.23500 + D.23536;
    i = 0;
    goto <D.19266>;
    <D.19265>:
    {
      struct MonoReflectionParamBuilder * pb;

      D.23518 = mb->pinfo;
      D.23526 = (long unsigned int) i;
      D.23537 = mono_array_addr_with_size (D.23518, 8, D.23526);
      pb = MEM[(struct MonoReflectionParamBuilder * *)D.23537];
      if (pb != 0B) goto <D.23538>; else goto <D.23539>;
      <D.23538>:
      D.23540 = pb->attrs;
      *values = D.23540;
      D.23510 = values + 4;
      *D.23510 = i;
      D.23541 = pb->name;
      if (D.23541 != 0B) goto <D.23542>; else goto <D.23543>;
      <D.23542>:
      D.23508 = values + 8;
      D.23505 = &assembly->sheap;
      D.23541 = pb->name;
      D.23544 = string_heap_insert_mstring (D.23505, D.23541);
      *D.23508 = D.23544;
      goto <D.23545>;
      <D.23543>:
      D.23508 = values + 8;
      *D.23508 = 0;
      <D.23545>:
      values = values + 12;
      D.23546 = pb->marshal_info;
      if (D.23546 != 0B) goto <D.23547>; else goto <D.23548>;
      <D.23547>:
      D.23549 = mtable->rows;
      D.23550 = D.23549 + 1;
      mtable->rows = D.23550;
      D.23549 = mtable->rows;
      alloc_table (mtable, D.23549);
      D.23521 = mtable->values;
      D.23549 = mtable->rows;
      D.23551 = D.23549 * 2;
      D.23552 = (long unsigned int) D.23551;
      D.23553 = D.23552 * 4;
      mvalues = D.23521 + D.23553;
      D.23492 = table->next_idx;
      D.23554 = D.23492 << 1;
      D.23555 = D.23554 | 1;
      *mvalues = D.23555;
      D.23556 = mvalues + 4;
      D.23546 = pb->marshal_info;
      D.23557 = encode_marshal_blob (assembly, D.23546);
      *D.23556 = D.23557;
      <D.23548>:
      D.23492 = table->next_idx;
      D.23558 = D.23492;
      D.23559 = D.23558 + 1;
      table->next_idx = D.23559;
      pb->table_idx = D.23558;
      D.23540 = pb->attrs;
      D.23560 = D.23540 & 4096;
      if (D.23560 != 0) goto <D.23561>; else goto <D.23562>;
      <D.23561>:
      {
        guint32 field_type;

        try
          {
            field_type = 0;
            mtable = &assembly->tables[11];
            D.23549 = mtable->rows;
            D.23550 = D.23549 + 1;
            mtable->rows = D.23550;
            D.23549 = mtable->rows;
            alloc_table (mtable, D.23549);
            D.23521 = mtable->values;
            D.23549 = mtable->rows;
            D.23563 = D.23549 * 4;
            D.23564 = (long unsigned int) D.23563;
            D.23565 = D.23564 * 4;
            mvalues = D.23521 + D.23565;
            D.23566 = mvalues + 8;
            D.23567 = pb->table_idx;
            D.23568 = D.23567 << 2;
            D.23569 = D.23568 | 1;
            *D.23566 = D.23569;
            D.23570 = mvalues + 12;
            D.23571 = pb->def_value;
            D.23572 = encode_constant (assembly, D.23571, &field_type);
            *D.23570 = D.23572;
            field_type.30 = field_type;
            *mvalues = field_type.30;
            D.23556 = mvalues + 4;
            *D.23556 = 0;
          }
        finally
          {
            field_type = {CLOBBER};
          }
      }
      <D.23562>:
      <D.23539>:
    }
    i = i + 1;
    <D.19266>:
    D.23526 = (long unsigned int) i;
    D.23518 = mb->pinfo;
    D.23574 = mono_array_length (D.23518);
    if (D.23526 < D.23574) goto <D.19265>; else goto <D.19267>;
    <D.19267>:
  }
  <D.23520>:
}


method_builder_encode_signature (struct MonoDynamicImage * assembly, struct ReflectionMethodBuilder * mb)
{
  guint32 iftmp.31;
  struct MonoArray * D.23576;
  long unsigned int D.23579;
  guint32 iftmp.32;
  struct MonoArray * D.23582;
  long unsigned int D.23585;
  guint32 iftmp.33;
  struct MonoArray * D.23588;
  long unsigned int D.23591;
  unsigned int D.23593;
  unsigned int D.23594;
  unsigned int D.23597;
  unsigned int D.23598;
  unsigned char D.23603;
  unsigned int D.23606;
  struct MonoArray * D.23607;
  struct MonoArray * D.23608;
  struct MonoReflectionType * D.23609;
  struct MonoArray * D.23610;
  long unsigned int D.23613;
  long unsigned int D.23614;
  char * D.23617;
  struct MonoArray * D.23618;
  long unsigned int D.23621;
  char * D.23624;
  char * D.23625;
  unsigned int i.34;
  char * D.23629;
  guint32 D.23630;
  struct SigBuffer buf;
  int i;
  guint32 nparams;
  guint32 ngparams;
  guint32 notypes;
  guint32 idx;

  try
    {
      D.23576 = mb->parameters;
      if (D.23576 != 0B) goto <D.23577>; else goto <D.23578>;
      <D.23577>:
      D.23576 = mb->parameters;
      D.23579 = mono_array_length (D.23576);
      iftmp.31 = (guint32) D.23579;
      goto <D.23580>;
      <D.23578>:
      iftmp.31 = 0;
      <D.23580>:
      nparams = iftmp.31;
      D.23582 = mb->generic_params;
      if (D.23582 != 0B) goto <D.23583>; else goto <D.23584>;
      <D.23583>:
      D.23582 = mb->generic_params;
      D.23585 = mono_array_length (D.23582);
      iftmp.32 = (guint32) D.23585;
      goto <D.23586>;
      <D.23584>:
      iftmp.32 = 0;
      <D.23586>:
      ngparams = iftmp.32;
      D.23588 = mb->opt_types;
      if (D.23588 != 0B) goto <D.23589>; else goto <D.23590>;
      <D.23589>:
      D.23588 = mb->opt_types;
      D.23591 = mono_array_length (D.23588);
      iftmp.33 = (guint32) D.23591;
      goto <D.23592>;
      <D.23590>:
      iftmp.33 = 0;
      <D.23592>:
      notypes = iftmp.33;
      sigbuffer_init (&buf, 32);
      D.23593 = mb->call_conv;
      idx = D.23593 & 96;
      D.23593 = mb->call_conv;
      D.23594 = D.23593 & 2;
      if (D.23594 != 0) goto <D.23595>; else goto <D.23596>;
      <D.23595>:
      idx = idx | 5;
      <D.23596>:
      D.23597 = mb->attrs;
      D.23598 = D.23597 & 16;
      if (D.23598 == 0) goto <D.23599>; else goto <D.23600>;
      <D.23599>:
      idx = idx | 32;
      <D.23600>:
      if (ngparams != 0) goto <D.23601>; else goto <D.23602>;
      <D.23601>:
      idx = idx | 16;
      <D.23602>:
      D.23603 = (unsigned char) idx;
      sigbuffer_add_byte (&buf, D.23603);
      if (ngparams != 0) goto <D.23604>; else goto <D.23605>;
      <D.23604>:
      sigbuffer_add_value (&buf, ngparams);
      <D.23605>:
      D.23606 = nparams + notypes;
      sigbuffer_add_value (&buf, D.23606);
      D.23607 = mb->return_modreq;
      D.23608 = mb->return_modopt;
      encode_custom_modifiers (assembly, D.23607, D.23608, &buf);
      D.23609 = mb->rtype;
      encode_reflection_type (assembly, D.23609, &buf);
      i = 0;
      goto <D.19072>;
      <D.19071>:
      {
        struct MonoArray * modreq;
        struct MonoArray * modopt;
        struct MonoReflectionType * pt;

        modreq = 0B;
        modopt = 0B;
        D.23610 = mb->param_modreq;
        if (D.23610 != 0B) goto <D.23611>; else goto <D.23612>;
        <D.23611>:
        D.23613 = (long unsigned int) i;
        D.23610 = mb->param_modreq;
        D.23614 = mono_array_length (D.23610);
        if (D.23613 < D.23614) goto <D.23615>; else goto <D.23616>;
        <D.23615>:
        D.23610 = mb->param_modreq;
        D.23613 = (long unsigned int) i;
        D.23617 = mono_array_addr_with_size (D.23610, 8, D.23613);
        modreq = MEM[(struct MonoArray * *)D.23617];
        <D.23616>:
        <D.23612>:
        D.23618 = mb->param_modopt;
        if (D.23618 != 0B) goto <D.23619>; else goto <D.23620>;
        <D.23619>:
        D.23613 = (long unsigned int) i;
        D.23618 = mb->param_modopt;
        D.23621 = mono_array_length (D.23618);
        if (D.23613 < D.23621) goto <D.23622>; else goto <D.23623>;
        <D.23622>:
        D.23618 = mb->param_modopt;
        D.23613 = (long unsigned int) i;
        D.23624 = mono_array_addr_with_size (D.23618, 8, D.23613);
        modopt = MEM[(struct MonoArray * *)D.23624];
        <D.23623>:
        <D.23620>:
        encode_custom_modifiers (assembly, modreq, modopt, &buf);
        D.23576 = mb->parameters;
        D.23613 = (long unsigned int) i;
        D.23625 = mono_array_addr_with_size (D.23576, 8, D.23613);
        pt = MEM[(struct MonoReflectionType * *)D.23625];
        encode_reflection_type (assembly, pt, &buf);
      }
      i = i + 1;
      <D.19072>:
      i.34 = (unsigned int) i;
      if (i.34 < nparams) goto <D.19071>; else goto <D.19073>;
      <D.19073>:
      if (notypes != 0) goto <D.23627>; else goto <D.23628>;
      <D.23627>:
      sigbuffer_add_byte (&buf, 65);
      <D.23628>:
      i = 0;
      goto <D.19076>;
      <D.19075>:
      {
        struct MonoReflectionType * pt;

        D.23588 = mb->opt_types;
        D.23613 = (long unsigned int) i;
        D.23629 = mono_array_addr_with_size (D.23588, 8, D.23613);
        pt = MEM[(struct MonoReflectionType * *)D.23629];
        encode_reflection_type (assembly, pt, &buf);
      }
      i = i + 1;
      <D.19076>:
      i.34 = (unsigned int) i;
      if (i.34 < notypes) goto <D.19075>; else goto <D.19077>;
      <D.19077>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.23630 = idx;
      return D.23630;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


sigbuffer_init (struct SigBuffer * buf, int size)
{
  long unsigned int D.23633;
  void * D.23634;
  char * D.23635;
  sizetype D.23636;
  char * D.23637;

  D.23633 = (long unsigned int) size;
  D.23634 = monoeg_malloc (D.23633);
  buf->buf = D.23634;
  D.23635 = buf->buf;
  buf->p = D.23635;
  D.23635 = buf->buf;
  D.23636 = (sizetype) size;
  D.23637 = D.23635 + D.23636;
  buf->end = D.23637;
}


sigbuffer_add_value (struct SigBuffer * buf, guint32 val)
{
  char * D.23638;
  char * * D.23639;

  sigbuffer_make_room (buf, 6);
  D.23638 = buf->p;
  D.23639 = &buf->p;
  mono_metadata_encode_value (val, D.23638, D.23639);
}


sigbuffer_make_room (struct SigBuffer * buf, int size)
{
  char * D.23640;
  long int D.23641;
  char * D.23642;
  long int D.23643;
  long int D.23644;
  long int D.23645;
  char * D.23648;
  long int D.23649;
  long int D.23650;
  unsigned int D.23651;
  unsigned int size.35;
  unsigned int D.23653;
  unsigned int D.23654;
  long unsigned int D.23655;
  long int D.23656;
  sizetype D.23657;
  char * D.23658;
  sizetype D.23659;
  char * D.23660;

  D.23640 = buf->end;
  D.23641 = (long int) D.23640;
  D.23642 = buf->p;
  D.23643 = (long int) D.23642;
  D.23644 = D.23641 - D.23643;
  D.23645 = (long int) size;
  if (D.23644 < D.23645) goto <D.23646>; else goto <D.23647>;
  <D.23646>:
  {
    int new_size;
    char * p;

    D.23640 = buf->end;
    D.23641 = (long int) D.23640;
    D.23648 = buf->buf;
    D.23649 = (long int) D.23648;
    D.23650 = D.23641 - D.23649;
    D.23651 = (unsigned int) D.23650;
    size.35 = (unsigned int) size;
    D.23653 = D.23651 + size.35;
    D.23654 = D.23653 + 32;
    new_size = (int) D.23654;
    D.23648 = buf->buf;
    D.23655 = (long unsigned int) new_size;
    p = monoeg_realloc (D.23648, D.23655);
    D.23642 = buf->p;
    D.23643 = (long int) D.23642;
    D.23648 = buf->buf;
    D.23649 = (long int) D.23648;
    D.23656 = D.23643 - D.23649;
    size = (int) D.23656;
    buf->buf = p;
    D.23657 = (sizetype) size;
    D.23658 = p + D.23657;
    buf->p = D.23658;
    D.23648 = buf->buf;
    D.23659 = (sizetype) new_size;
    D.23660 = D.23648 + D.23659;
    buf->end = D.23660;
  }
  <D.23647>:
}


encode_custom_modifiers (struct MonoDynamicImage * assembly, struct MonoArray * modreq, struct MonoArray * modopt, struct SigBuffer * buf)
{
  long unsigned int D.23663;
  char * D.23664;
  void * D.23665;
  unsigned int D.23666;
  long unsigned int D.23667;
  char * D.23670;
  void * D.23671;
  unsigned int D.23672;
  long unsigned int D.23673;
  int i;

  if (modreq != 0B) goto <D.23661>; else goto <D.23662>;
  <D.23661>:
  i = 0;
  goto <D.19041>;
  <D.19040>:
  {
    struct MonoType * mod;

    D.23663 = (long unsigned int) i;
    D.23664 = mono_array_addr_with_size (modreq, 8, D.23663);
    D.23665 = MEM[(void * *)D.23664];
    mod = mono_reflection_type_get_handle (D.23665);
    sigbuffer_add_byte (buf, 31);
    D.23666 = mono_image_typedef_or_ref (assembly, mod);
    sigbuffer_add_value (buf, D.23666);
  }
  i = i + 1;
  <D.19041>:
  D.23663 = (long unsigned int) i;
  D.23667 = mono_array_length (modreq);
  if (D.23663 < D.23667) goto <D.19040>; else goto <D.19042>;
  <D.19042>:
  <D.23662>:
  if (modopt != 0B) goto <D.23668>; else goto <D.23669>;
  <D.23668>:
  i = 0;
  goto <D.19045>;
  <D.19044>:
  {
    struct MonoType * mod;

    D.23663 = (long unsigned int) i;
    D.23670 = mono_array_addr_with_size (modopt, 8, D.23663);
    D.23671 = MEM[(void * *)D.23670];
    mod = mono_reflection_type_get_handle (D.23671);
    sigbuffer_add_byte (buf, 32);
    D.23672 = mono_image_typedef_or_ref (assembly, mod);
    sigbuffer_add_value (buf, D.23672);
  }
  i = i + 1;
  <D.19045>:
  D.23663 = (long unsigned int) i;
  D.23673 = mono_array_length (modopt);
  if (D.23663 < D.23673) goto <D.19044>; else goto <D.19046>;
  <D.19046>:
  <D.23669>:
}


mono_image_typedef_or_ref (struct MonoDynamicImage * assembly, struct MonoType * type)
{
  guint32 D.23674;

  D.23674 = mono_image_typedef_or_ref_full (assembly, type, 1);
  return D.23674;
}


mono_image_typedef_or_ref_full (struct MonoDynamicImage * assembly, struct MonoType * type, gboolean try_typespec)
{
  guint32 D.23680;
  struct GHashTable * D.23681;
  void * D.23682;
  long int D.23683;
  struct MonoImage * D.23688;
  struct MonoImage * D.23689;
  unsigned char D.23692;
  unsigned int D.23697;
  struct MonoGHashTable * D.23698;
  long unsigned int D.23699;
  void * D.23700;
  void * D.23701;
  struct MonoClass * D.23702;
  struct MonoType * D.23705;
  unsigned int D.23706;
  int D.23708;
  unsigned int D.23711;
  unsigned int D.23712;
  guint32 * D.23713;
  unsigned int D.23714;
  unsigned int D.23715;
  long unsigned int D.23716;
  long unsigned int D.23717;
  guint32 * D.23718;
  struct MonoDynamicStream * D.23719;
  const char * D.23720;
  unsigned int D.23721;
  guint32 * D.23722;
  const char * D.23723;
  unsigned int D.23724;
  unsigned int D.23725;
  unsigned int D.23726;
  void * D.23727;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 token;
  guint32 scope;
  guint32 enclosing;
  struct MonoClass * klass;

  if (try_typespec != 0) goto <D.23676>; else goto <D.23677>;
  <D.23676>:
  token = create_typespec (assembly, type);
  if (token != 0) goto <D.23678>; else goto <D.23679>;
  <D.23678>:
  D.23680 = token;
  return D.23680;
  <D.23679>:
  <D.23677>:
  D.23681 = assembly->typeref;
  D.23682 = monoeg_g_hash_table_lookup (D.23681, type);
  D.23683 = (long int) D.23682;
  token = (guint32) D.23683;
  if (token != 0) goto <D.23684>; else goto <D.23685>;
  <D.23684>:
  D.23680 = token;
  return D.23680;
  <D.23685>:
  klass = mono_class_from_mono_type (type);
  if (klass == 0B) goto <D.23686>; else goto <D.23687>;
  <D.23686>:
  klass = mono_class_from_mono_type (type);
  <D.23687>:
  D.23688 = klass->image;
  D.23689 = &assembly->image;
  if (D.23688 == D.23689) goto <D.23690>; else goto <D.23691>;
  <D.23690>:
  D.23692 = type->type;
  if (D.23692 != 19) goto <D.23693>; else goto <D.23694>;
  <D.23693>:
  D.23692 = type->type;
  if (D.23692 != 30) goto <D.23695>; else goto <D.23696>;
  <D.23695>:
  {
    struct MonoReflectionTypeBuilder * tb;

    tb = mono_class_get_ref_info (klass);
    D.23697 = tb->table_idx;
    token = D.23697 << 2;
    D.23698 = assembly->tokens;
    D.23699 = (long unsigned int) token;
    D.23700 = (void *) D.23699;
    D.23701 = mono_class_get_ref_info (klass);
    mono_g_hash_table_insert (D.23698, D.23700, D.23701);
    D.23680 = token;
    return D.23680;
  }
  <D.23696>:
  <D.23694>:
  <D.23691>:
  D.23702 = klass->nested_in;
  if (D.23702 != 0B) goto <D.23703>; else goto <D.23704>;
  <D.23703>:
  D.23702 = klass->nested_in;
  D.23705 = &D.23702->byval_arg;
  enclosing = mono_image_typedef_or_ref_full (assembly, D.23705, 0);
  enclosing = enclosing >> 2;
  D.23706 = enclosing << 2;
  scope = D.23706 | 3;
  goto <D.23707>;
  <D.23704>:
  D.23688 = klass->image;
  scope = resolution_scope_from_image (assembly, D.23688);
  <D.23707>:
  table = &assembly->tables[1];
  D.23708 = assembly->save;
  if (D.23708 != 0) goto <D.23709>; else goto <D.23710>;
  <D.23709>:
  D.23711 = table->rows;
  D.23712 = D.23711 + 1;
  alloc_table (table, D.23712);
  D.23713 = table->values;
  D.23714 = table->next_idx;
  D.23715 = D.23714 * 3;
  D.23716 = (long unsigned int) D.23715;
  D.23717 = D.23716 * 4;
  values = D.23713 + D.23717;
  *values = scope;
  D.23718 = values + 4;
  D.23719 = &assembly->sheap;
  D.23720 = klass->name;
  D.23721 = string_heap_insert (D.23719, D.23720);
  *D.23718 = D.23721;
  D.23722 = values + 8;
  D.23719 = &assembly->sheap;
  D.23723 = klass->name_space;
  D.23724 = string_heap_insert (D.23719, D.23723);
  *D.23722 = D.23724;
  <D.23710>:
  D.23714 = table->next_idx;
  D.23725 = D.23714 << 2;
  token = D.23725 | 1;
  D.23681 = assembly->typeref;
  D.23699 = (long unsigned int) token;
  D.23700 = (void *) D.23699;
  monoeg_g_hash_table_insert_replace (D.23681, type, D.23700, 0);
  D.23714 = table->next_idx;
  D.23726 = D.23714 + 1;
  table->next_idx = D.23726;
  D.23698 = assembly->tokens;
  D.23699 = (long unsigned int) token;
  D.23700 = (void *) D.23699;
  D.23727 = mono_class_get_ref_info (klass);
  mono_g_hash_table_insert (D.23698, D.23700, D.23727);
  D.23680 = token;
  return D.23680;
}


create_typespec (struct MonoDynamicImage * assembly, struct MonoType * type)
{
  struct GHashTable * D.23729;
  void * D.23730;
  long int D.23731;
  guint32 D.23734;
  unsigned char D.23735;
  int D.23736;
  struct MonoGenericContainer * D.23740;
  int D.23741;
  unsigned int D.23744;
  unsigned int D.23745;
  guint32 * D.23746;
  unsigned int D.23747;
  long unsigned int D.23748;
  long unsigned int D.23749;
  unsigned int D.23750;
  long unsigned int D.23751;
  void * D.23752;
  unsigned int D.23753;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 token;
  struct SigBuffer buf;

  try
    {
      D.23729 = assembly->typespec;
      D.23730 = monoeg_g_hash_table_lookup (D.23729, type);
      D.23731 = (long int) D.23730;
      token = (guint32) D.23731;
      if (token != 0) goto <D.23732>; else goto <D.23733>;
      <D.23732>:
      D.23734 = token;
      return D.23734;
      <D.23733>:
      sigbuffer_init (&buf, 32);
      D.23735 = type->type;
      D.23736 = (int) D.23735;
      switch (D.23736) <default: <D.19505>, case 15: <D.19495>, case 17: <D.19503>, case 18: <D.19502>, case 19: <D.19498>, case 20: <D.19497>, case 21: <D.19500>, case 27: <D.19494>, case 29: <D.19496>, case 30: <D.19499>>
      <D.19494>:
      <D.19495>:
      <D.19496>:
      <D.19497>:
      <D.19498>:
      <D.19499>:
      <D.19500>:
      encode_type (assembly, type, &buf);
      goto <D.19501>;
      <D.19502>:
      <D.19503>:
      {
        struct MonoClass * k;

        k = mono_class_from_mono_type (type);
        if (k == 0B) goto <D.23737>; else goto <D.23739>;
        <D.23739>:
        D.23740 = k->generic_container;
        if (D.23740 == 0B) goto <D.23737>; else goto <D.23738>;
        <D.23737>:
        sigbuffer_free (&buf);
        D.23734 = 0;
        return D.23734;
        <D.23738>:
        encode_type (assembly, type, &buf);
        goto <D.19501>;
      }
      <D.19505>:
      sigbuffer_free (&buf);
      D.23734 = 0;
      return D.23734;
      <D.19501>:
      table = &assembly->tables[27];
      D.23741 = assembly->save;
      if (D.23741 != 0) goto <D.23742>; else goto <D.23743>;
      <D.23742>:
      token = sigbuffer_add_to_blob_cached (assembly, &buf);
      D.23744 = table->rows;
      D.23745 = D.23744 + 1;
      alloc_table (table, D.23745);
      D.23746 = table->values;
      D.23747 = table->next_idx;
      D.23748 = (long unsigned int) D.23747;
      D.23749 = D.23748 * 4;
      values = D.23746 + D.23749;
      *values = token;
      <D.23743>:
      sigbuffer_free (&buf);
      D.23747 = table->next_idx;
      D.23750 = D.23747 << 2;
      token = D.23750 | 2;
      D.23729 = assembly->typespec;
      D.23751 = (long unsigned int) token;
      D.23752 = (void *) D.23751;
      monoeg_g_hash_table_insert_replace (D.23729, type, D.23752, 0);
      D.23747 = table->next_idx;
      D.23753 = D.23747 + 1;
      table->next_idx = D.23753;
      D.23734 = token;
      return D.23734;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


encode_type (struct MonoDynamicImage * assembly, struct MonoType * type, struct SigBuffer * buf)
{
  long unsigned int D.23758;
  long unsigned int D.23759;
  unsigned char D.23762;
  int D.23763;
  unsigned int D.23764;
  struct MonoType * D.23765;
  struct MonoClass * D.23766;
  struct MonoType * D.23767;
  struct MonoGenericContainer * D.23768;
  struct MonoGenericInst * D.23771;
  unsigned char D.23773;
  unsigned int D.23774;
  struct MonoType * D.23775;
  unsigned int D.23776;
  struct MonoArrayType * D.23777;
  struct MonoClass * D.23778;
  struct MonoType * D.23779;
  unsigned char D.23780;
  unsigned int D.23781;
  struct MonoGenericClass * D.23782;
  struct MonoGenericParam * D.23783;
  short unsigned int D.23784;
  unsigned int D.23785;

  if (type == 0B) goto <D.23756>; else goto <D.23757>;
  <D.23756>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 679);
  return;
  <D.23757>:
  D.23758 = BIT_FIELD_REF <*type, 64, 64>;
  D.23759 = D.23758 & 8589934592;
  if (D.23759 != 0) goto <D.23760>; else goto <D.23761>;
  <D.23760>:
  sigbuffer_add_value (buf, 16);
  <D.23761>:
  D.23762 = type->type;
  D.23763 = (int) D.23762;
  switch (D.23763) <default: <D.19025>, case 1: <D.18996>, case 2: <D.18997>, case 3: <D.18998>, case 4: <D.18999>, case 5: <D.19000>, case 6: <D.19001>, case 7: <D.19002>, case 8: <D.19003>, case 9: <D.19004>, case 10: <D.19005>, case 11: <D.19006>, case 12: <D.19007>, case 13: <D.19008>, case 14: <D.19011>, case 15: <D.19015>, case 17: <D.19017>, case 18: <D.19018>, case 19: <D.19023>, case 20: <D.19021>, case 21: <D.19022>, case 22: <D.19013>, case 24: <D.19009>, case 25: <D.19010>, case 28: <D.19012>, case 29: <D.19016>, case 30: <D.19024>>
  <D.18996>:
  <D.18997>:
  <D.18998>:
  <D.18999>:
  <D.19000>:
  <D.19001>:
  <D.19002>:
  <D.19003>:
  <D.19004>:
  <D.19005>:
  <D.19006>:
  <D.19007>:
  <D.19008>:
  <D.19009>:
  <D.19010>:
  <D.19011>:
  <D.19012>:
  <D.19013>:
  D.23762 = type->type;
  D.23764 = (unsigned int) D.23762;
  sigbuffer_add_value (buf, D.23764);
  goto <D.19014>;
  <D.19015>:
  D.23762 = type->type;
  D.23764 = (unsigned int) D.23762;
  sigbuffer_add_value (buf, D.23764);
  D.23765 = type->data.type;
  encode_type (assembly, D.23765, buf);
  goto <D.19014>;
  <D.19016>:
  D.23762 = type->type;
  D.23764 = (unsigned int) D.23762;
  sigbuffer_add_value (buf, D.23764);
  D.23766 = type->data.klass;
  D.23767 = &D.23766->byval_arg;
  encode_type (assembly, D.23767, buf);
  goto <D.19014>;
  <D.19017>:
  <D.19018>:
  {
    struct MonoClass * k;

    k = mono_class_from_mono_type (type);
    D.23768 = k->generic_container;
    if (D.23768 != 0B) goto <D.23769>; else goto <D.23770>;
    <D.23769>:
    {
      struct MonoGenericClass * gclass;

      D.23768 = k->generic_container;
      D.23771 = D.23768->context.class_inst;
      gclass = mono_metadata_lookup_generic_class (k, D.23771, 1);
      encode_generic_class (assembly, gclass, buf);
    }
    goto <D.23772>;
    <D.23770>:
    D.23773 = k->byval_arg.type;
    D.23774 = (unsigned int) D.23773;
    sigbuffer_add_value (buf, D.23774);
    D.23775 = &k->byval_arg;
    D.23776 = mono_image_typedef_or_ref (assembly, D.23775);
    sigbuffer_add_value (buf, D.23776);
    <D.23772>:
    goto <D.19014>;
  }
  <D.19021>:
  D.23762 = type->type;
  D.23764 = (unsigned int) D.23762;
  sigbuffer_add_value (buf, D.23764);
  D.23777 = type->data.array;
  D.23778 = D.23777->eklass;
  D.23779 = &D.23778->byval_arg;
  encode_type (assembly, D.23779, buf);
  D.23777 = type->data.array;
  D.23780 = D.23777->rank;
  D.23781 = (unsigned int) D.23780;
  sigbuffer_add_value (buf, D.23781);
  sigbuffer_add_value (buf, 0);
  sigbuffer_add_value (buf, 0);
  goto <D.19014>;
  <D.19022>:
  D.23782 = type->data.generic_class;
  encode_generic_class (assembly, D.23782, buf);
  goto <D.19014>;
  <D.19023>:
  <D.19024>:
  D.23762 = type->type;
  D.23764 = (unsigned int) D.23762;
  sigbuffer_add_value (buf, D.23764);
  D.23783 = type->data.generic_param;
  D.23784 = D.23783->num;
  D.23785 = (unsigned int) D.23784;
  sigbuffer_add_value (buf, D.23785);
  goto <D.19014>;
  <D.19025>:
  D.23762 = type->type;
  D.23763 = (int) D.23762;
  monoeg_g_log (0B, 4, "need to encode type %x", D.23763);
  <D.19026>:
  goto <D.19026>;
  <D.19014>:
}


encode_generic_class (struct MonoDynamicImage * assembly, struct MonoGenericClass * gclass, struct SigBuffer * buf)
{
  _Bool D.23786;
  long int D.23787;
  long int D.23788;
  unsigned char D.23791;
  unsigned int D.23792;
  struct MonoType * D.23793;
  unsigned int D.23794;
  <unnamed-unsigned:22> D.23795;
  unsigned int D.23796;
  struct MonoType * D.23797;
  int D.23798;
  int i;
  struct MonoGenericInst * class_inst;
  struct MonoClass * klass;

  D.23786 = gclass == 0B;
  D.23787 = (long int) D.23786;
  D.23788 = __builtin_expect (D.23787, 0);
  if (D.23788 != 0) goto <D.23789>; else goto <D.23790>;
  <D.23789>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 660, "gclass");
  <D.23790>:
  class_inst = gclass->context.class_inst;
  sigbuffer_add_value (buf, 21);
  klass = gclass->container_class;
  D.23791 = klass->byval_arg.type;
  D.23792 = (unsigned int) D.23791;
  sigbuffer_add_value (buf, D.23792);
  D.23793 = &klass->byval_arg;
  D.23794 = mono_image_typedef_or_ref_full (assembly, D.23793, 0);
  sigbuffer_add_value (buf, D.23794);
  D.23795 = class_inst->type_argc;
  D.23796 = (unsigned int) D.23795;
  sigbuffer_add_value (buf, D.23796);
  i = 0;
  goto <D.18989>;
  <D.18988>:
  D.23797 = class_inst->type_argv[i];
  encode_type (assembly, D.23797, buf);
  i = i + 1;
  <D.18989>:
  D.23795 = class_inst->type_argc;
  D.23798 = (int) D.23795;
  if (D.23798 > i) goto <D.18988>; else goto <D.18990>;
  <D.18990>:
}


sigbuffer_add_byte (struct SigBuffer * buf, guint8 val)
{
  char * D.23799;
  char * D.23800;

  sigbuffer_make_room (buf, 1);
  D.23799 = buf->p;
  *D.23799 = val;
  D.23799 = buf->p;
  D.23800 = D.23799 + 1;
  buf->p = D.23800;
}


encode_reflection_type (struct MonoDynamicImage * assembly, struct MonoReflectionType * type, struct SigBuffer * buf)
{
  struct MonoType * D.23803;

  if (type == 0B) goto <D.23801>; else goto <D.23802>;
  <D.23801>:
  sigbuffer_add_value (buf, 1);
  return;
  <D.23802>:
  D.23803 = mono_reflection_type_get_handle (type);
  encode_type (assembly, D.23803, buf);
}


sigbuffer_add_to_blob_cached (struct MonoDynamicImage * assembly, struct SigBuffer * buf)
{
  char * D.23805;
  long int D.23806;
  char * D.23807;
  long int D.23808;
  long int D.23809;
  long int D.23810;
  char * D.23811;
  long int D.23812;
  long int D.23813;
  _Bool D.23814;
  long int D.23815;
  long int D.23816;
  char * b.36;
  guint32 D.23820;
  long int b.37;
  long int blob_size.38;
  long int D.23823;
  int D.23824;
  int size.39;
  char blob_size[8];
  char * b;
  guint32 size;

  try
    {
      b = &blob_size;
      D.23805 = buf->p;
      D.23806 = (long int) D.23805;
      D.23807 = buf->buf;
      D.23808 = (long int) D.23807;
      D.23809 = D.23806 - D.23808;
      size = (guint32) D.23809;
      D.23810 = (long int) size;
      D.23811 = buf->end;
      D.23812 = (long int) D.23811;
      D.23807 = buf->buf;
      D.23808 = (long int) D.23807;
      D.23813 = D.23812 - D.23808;
      D.23814 = D.23810 > D.23813;
      D.23815 = (long int) D.23814;
      D.23816 = __builtin_expect (D.23815, 0);
      if (D.23816 != 0) goto <D.23817>; else goto <D.23818>;
      <D.23817>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 501, "size <= (buf->end - buf->buf)");
      <D.23818>:
      b.36 = b;
      mono_metadata_encode_value (size, b.36, &b);
      b.36 = b;
      b.37 = (long int) b.36;
      blob_size.38 = (long int) &blob_size;
      D.23823 = b.37 - blob_size.38;
      D.23824 = (int) D.23823;
      D.23807 = buf->buf;
      size.39 = (int) size;
      D.23820 = add_to_blob_cached (assembly, &blob_size, D.23824, D.23807, size.39);
      return D.23820;
    }
  finally
    {
      blob_size = {CLOBBER};
      b = {CLOBBER};
    }
}


add_to_blob_cached (struct MonoDynamicImage * assembly, char * b1, int s1, char * b2, int s2)
{
  int D.23828;
  long unsigned int D.23829;
  long unsigned int D.23830;
  sizetype D.23831;
  char * D.23832;
  long unsigned int D.23833;
  struct GHashTable * D.23834;
  int D.23835;
  void * oldval.40;
  long int oldval.41;
  struct MonoDynamicStream * D.23841;
  unsigned int s1.42;
  unsigned int s2.43;
  long unsigned int D.23844;
  void * D.23845;
  guint32 D.23846;
  guint32 idx;
  char * copy;
  void * oldkey;
  void * oldval;

  try
    {
      D.23828 = s1 + s2;
      D.23829 = (long unsigned int) D.23828;
      copy = monoeg_malloc (D.23829);
      D.23830 = (long unsigned int) s1;
      memcpy (copy, b1, D.23830);
      D.23831 = (sizetype) s1;
      D.23832 = copy + D.23831;
      D.23833 = (long unsigned int) s2;
      memcpy (D.23832, b2, D.23833);
      D.23834 = assembly->blob_cache;
      D.23835 = monoeg_g_hash_table_lookup_extended (D.23834, copy, &oldkey, &oldval);
      if (D.23835 != 0) goto <D.23836>; else goto <D.23837>;
      <D.23836>:
      monoeg_g_free (copy);
      oldval.40 = oldval;
      oldval.41 = (long int) oldval.40;
      idx = (guint32) oldval.41;
      goto <D.23840>;
      <D.23837>:
      D.23841 = &assembly->blob;
      s1.42 = (unsigned int) s1;
      idx = mono_image_add_stream_data (D.23841, b1, s1.42);
      D.23841 = &assembly->blob;
      s2.43 = (unsigned int) s2;
      mono_image_add_stream_data (D.23841, b2, s2.43);
      D.23834 = assembly->blob_cache;
      D.23844 = (long unsigned int) idx;
      D.23845 = (void *) D.23844;
      monoeg_g_hash_table_insert_replace (D.23834, copy, D.23845, 0);
      <D.23840>:
      D.23846 = idx;
      return D.23846;
    }
  finally
    {
      oldkey = {CLOBBER};
      oldval = {CLOBBER};
    }
}


sigbuffer_free (struct SigBuffer * buf)
{
  char * D.23849;

  D.23849 = buf->buf;
  monoeg_g_free (D.23849);
}


method_encode_code (struct MonoDynamicImage * assembly, struct ReflectionMethodBuilder * mb)
{
  long unsigned int D.23850;
  long unsigned int D.23851;
  guint32 D.23854;
  struct MonoReflectionILGen * D.23855;
  int D.23858;
  gint32 iftmp.44;
  struct MonoArray * D.23860;
  long unsigned int D.23863;
  struct MonoArray * D.23865;
  unsigned int D.23868;
  struct MonoString * D.23872;
  long unsigned int D.23873;
  struct MonoDynamicStream * D.23874;
  int iftmp.45;
  unsigned int D.23886;
  char D.23888;
  char D.23889;
  char flags.46;
  char flags.47;
  int D.23896;
  struct MonoGHashTable * D.23899;
  unsigned int D.23900;
  long unsigned int D.23901;
  void * D.23902;
  char * D.23903;
  unsigned int D.23904;
  unsigned int D.23907;
  unsigned char D.23910;
  char D.23913;
  unsigned int D.23914;
  char D.23915;
  char D.23916;
  short unsigned int D.23917;
  short unsigned int D.23918;
  signed short D.23919;
  int D.23920;
  int D.23921;
  signed short D.23922;
  signed short D.23923;
  short unsigned int short_value.48;
  void * D.23925;
  unsigned int D.23926;
  unsigned int D.23927;
  unsigned int D.23928;
  unsigned int D.23929;
  unsigned int D.23930;
  unsigned int D.23931;
  unsigned int D.23932;
  unsigned int D.23933;
  unsigned int int_value.49;
  void * D.23935;
  unsigned int D.23936;
  unsigned int D.23937;
  unsigned int D.23938;
  unsigned int D.23939;
  unsigned int D.23940;
  unsigned int D.23941;
  unsigned int D.23942;
  unsigned int D.23943;
  unsigned int int_value.50;
  void * D.23945;
  unsigned int D.23950;
  long unsigned int D.23951;
  void * D.23952;
  char * D.23953;
  unsigned int num_exception.51;
  unsigned int D.23957;
  unsigned char D.23958;
  int D.23959;
  unsigned char D.23960;
  int D.23961;
  unsigned char D.23962;
  long unsigned int D.23963;
  unsigned int D.23964;
  unsigned int D.23965;
  long unsigned int D.23966;
  struct MonoArray * D.23967;
  int D.23970;
  int D.23971;
  long unsigned int D.23972;
  int D.23973;
  unsigned int D.23974;
  unsigned int D.23975;
  unsigned int D.23976;
  unsigned int D.23977;
  unsigned int D.23978;
  unsigned int D.23979;
  unsigned int D.23980;
  unsigned int D.23981;
  unsigned int D.23982;
  unsigned int val.52;
  unsigned int D.23984;
  unsigned int D.23985;
  unsigned int D.23986;
  unsigned int D.23987;
  unsigned int D.23988;
  unsigned int D.23989;
  unsigned int D.23990;
  unsigned int D.23991;
  unsigned int D.23992;
  unsigned int val.53;
  int D.23996;
  unsigned int D.23997;
  unsigned int D.23998;
  unsigned int D.23999;
  unsigned int D.24000;
  unsigned int D.24001;
  unsigned int D.24002;
  unsigned int D.24003;
  unsigned int D.24004;
  unsigned int D.24005;
  unsigned int val.54;
  unsigned int D.24008;
  unsigned int D.24009;
  unsigned int D.24010;
  unsigned int D.24011;
  unsigned int D.24012;
  unsigned int D.24013;
  unsigned int D.24014;
  unsigned int D.24015;
  unsigned int D.24016;
  unsigned int val.55;
  int D.24018;
  unsigned int D.24019;
  unsigned int D.24020;
  unsigned int D.24021;
  unsigned int D.24022;
  unsigned int D.24023;
  unsigned int D.24024;
  unsigned int D.24025;
  unsigned int D.24026;
  unsigned int D.24027;
  unsigned int val.56;
  int D.24029;
  unsigned int D.24030;
  unsigned int D.24031;
  unsigned int D.24032;
  unsigned int D.24033;
  unsigned int D.24034;
  unsigned int D.24035;
  unsigned int D.24036;
  unsigned int D.24037;
  unsigned int D.24038;
  unsigned int val.57;
  struct MonoObject * D.24040;
  struct MonoType * D.24043;
  unsigned int D.24044;
  unsigned int val.58;
  int D.24049;
  unsigned int val.59;
  unsigned int val.60;
  unsigned int D.24053;
  unsigned int D.24054;
  unsigned int D.24055;
  unsigned int D.24056;
  unsigned int D.24057;
  unsigned int D.24058;
  unsigned int D.24059;
  unsigned int D.24060;
  unsigned int val.61;
  long unsigned int D.24062;
  char flags;
  guint32 idx;
  guint32 code_size;
  gint32 max_stack;
  gint32 i;
  gint32 num_locals;
  gint32 num_exception;
  gint maybe_small;
  guint32 fat_flags;
  char fat_header[12];
  guint32 int_value;
  guint16 short_value;
  guint32 local_sig;
  guint32 header_size;
  struct MonoArray * code;
  void fat_header = <<< error >>>;

  try
    {
      flags = 0;
      num_locals = 0;
      num_exception = 0;
      local_sig = 0;
      header_size = 12;
      D.23850 = BIT_FIELD_REF <*mb, 64, 448>;
      D.23851 = D.23850 & 39582418604035;
      if (D.23851 != 0) goto <D.23852>; else goto <D.23853>;
      <D.23852>:
      D.23854 = 0;
      return D.23854;
      <D.23853>:
      D.23855 = mb->ilgen;
      if (D.23855 != 0B) goto <D.23856>; else goto <D.23857>;
      <D.23856>:
      D.23855 = mb->ilgen;
      code = D.23855->code;
      D.23855 = mb->ilgen;
      D.23858 = D.23855->code_len;
      code_size = (guint32) D.23858;
      D.23855 = mb->ilgen;
      max_stack = D.23855->max_stack;
      D.23855 = mb->ilgen;
      D.23860 = D.23855->locals;
      if (D.23860 != 0B) goto <D.23861>; else goto <D.23862>;
      <D.23861>:
      D.23855 = mb->ilgen;
      D.23860 = D.23855->locals;
      D.23863 = mono_array_length (D.23860);
      iftmp.44 = (gint32) D.23863;
      goto <D.23864>;
      <D.23862>:
      iftmp.44 = 0;
      <D.23864>:
      num_locals = iftmp.44;
      D.23855 = mb->ilgen;
      D.23865 = D.23855->ex_handlers;
      if (D.23865 != 0B) goto <D.23866>; else goto <D.23867>;
      <D.23866>:
      D.23855 = mb->ilgen;
      D.23868 = method_count_clauses (D.23855);
      num_exception = (gint32) D.23868;
      <D.23867>:
      goto <D.23869>;
      <D.23857>:
      code = mb->code;
      if (code == 0B) goto <D.23870>; else goto <D.23871>;
      <D.23870>:
      {
        char * name;
        char * str;
        struct MonoException * exception;

        D.23872 = mb->name;
        name = mono_string_to_utf8 (D.23872);
        str = monoeg_g_strdup_printf ("Method %s does not have any IL associated", name);
        exception = mono_get_exception_argument (0B, "a method does not have any IL associated");
        monoeg_g_free (str);
        monoeg_g_free (name);
        mono_raise_exception (exception);
      }
      <D.23871>:
      D.23873 = mono_array_length (code);
      code_size = (guint32) D.23873;
      max_stack = 8;
      <D.23869>:
      D.23874 = &assembly->code;
      stream_data_align (D.23874);
      if (max_stack <= 8) goto <D.23878>; else goto <D.23876>;
      <D.23878>:
      if (num_locals == 0) goto <D.23879>; else goto <D.23876>;
      <D.23879>:
      if (num_exception == 0) goto <D.23880>; else goto <D.23876>;
      <D.23880>:
      iftmp.45 = 1;
      goto <D.23877>;
      <D.23876>:
      iftmp.45 = 0;
      <D.23877>:
      maybe_small = iftmp.45;
      if (maybe_small != 0) goto <D.23881>; else goto <D.23882>;
      <D.23881>:
      if (code_size <= 63) goto <D.23885>; else goto <D.23883>;
      <D.23885>:
      D.23886 = code_size & 1;
      if (D.23886 == 0) goto <D.23887>; else goto <D.23883>;
      <D.23887>:
      D.23888 = (char) code_size;
      D.23889 = D.23888 << 2;
      flags.46 = D.23889 | 2;
      flags = flags.46;
      goto <D.23884>;
      <D.23883>:
      if (code_size <= 31) goto <D.23891>; else goto fat_header;
      <D.23891>:
      D.23886 = code_size & 1;
      if (D.23886 != 0) goto <D.23892>; else goto fat_header;
      <D.23892>:
      D.23888 = (char) code_size;
      D.23889 = D.23888 << 2;
      flags.47 = D.23889 | 6;
      flags = flags.47;
      <D.23884>:
      D.23874 = &assembly->code;
      idx = mono_image_add_stream_data (D.23874, &flags, 1);
      D.23855 = mb->ilgen;
      if (D.23855 != 0B) goto <D.23894>; else goto <D.23895>;
      <D.23894>:
      D.23855 = mb->ilgen;
      D.23896 = D.23855->num_token_fixups;
      if (D.23896 != 0) goto <D.23897>; else goto <D.23898>;
      <D.23897>:
      D.23899 = assembly->token_fixups;
      D.23855 = mb->ilgen;
      D.23900 = idx + 1;
      D.23901 = (long unsigned int) D.23900;
      D.23902 = (void *) D.23901;
      mono_g_hash_table_insert (D.23899, D.23855, D.23902);
      <D.23898>:
      <D.23895>:
      D.23874 = &assembly->code;
      D.23903 = mono_array_addr_with_size (code, 1, 0);
      mono_image_add_stream_data (D.23874, D.23903, code_size);
      D.23904 = assembly->text_rva;
      D.23854 = D.23904 + idx;
      return D.23854;
      <D.23882>:
      fat_header:
      if (num_locals != 0) goto <D.23905>; else goto <D.23906>;
      <D.23905>:
      D.23855 = mb->ilgen;
      D.23907 = encode_locals (assembly, D.23855);
      local_sig = D.23907 | 285212672;
      <D.23906>:
      fat_flags = 3;
      if (num_exception != 0) goto <D.23908>; else goto <D.23909>;
      <D.23908>:
      fat_flags = fat_flags | 8;
      <D.23909>:
      D.23910 = mb->init_locals;
      if (D.23910 != 0) goto <D.23911>; else goto <D.23912>;
      <D.23911>:
      fat_flags = fat_flags | 16;
      <D.23912>:
      D.23913 = (char) fat_flags;
      fat_header[0] = D.23913;
      D.23914 = header_size / 4;
      D.23915 = (char) D.23914;
      D.23916 = D.23915 << 4;
      fat_header[1] = D.23916;
      D.23917 = (short unsigned int) max_stack;
      D.23918 = D.23917 >> 8;
      D.23919 = (signed short) D.23918;
      D.23917 = (short unsigned int) max_stack;
      D.23920 = (int) D.23917;
      D.23921 = D.23920 << 8;
      D.23922 = (signed short) D.23921;
      D.23923 = D.23919 | D.23922;
      short_value.48 = (short unsigned int) D.23923;
      short_value = short_value.48;
      D.23925 = &fat_header + 2;
      memcpy (D.23925, &short_value, 2);
      D.23926 = code_size << 24;
      D.23927 = code_size >> 8;
      D.23928 = D.23927 & 65280;
      D.23929 = D.23926 | D.23928;
      D.23930 = code_size << 8;
      D.23931 = D.23930 & 16711680;
      D.23932 = D.23929 | D.23931;
      D.23933 = code_size >> 24;
      int_value.49 = D.23932 | D.23933;
      int_value = int_value.49;
      D.23935 = &fat_header + 4;
      memcpy (D.23935, &int_value, 4);
      D.23936 = local_sig << 24;
      D.23937 = local_sig >> 8;
      D.23938 = D.23937 & 65280;
      D.23939 = D.23936 | D.23938;
      D.23940 = local_sig << 8;
      D.23941 = D.23940 & 16711680;
      D.23942 = D.23939 | D.23941;
      D.23943 = local_sig >> 24;
      int_value.50 = D.23942 | D.23943;
      int_value = int_value.50;
      D.23945 = &fat_header + 8;
      memcpy (D.23945, &int_value, 4);
      D.23874 = &assembly->code;
      idx = mono_image_add_stream_data (D.23874, &fat_header, 12);
      D.23855 = mb->ilgen;
      if (D.23855 != 0B) goto <D.23946>; else goto <D.23947>;
      <D.23946>:
      D.23855 = mb->ilgen;
      D.23896 = D.23855->num_token_fixups;
      if (D.23896 != 0) goto <D.23948>; else goto <D.23949>;
      <D.23948>:
      D.23899 = assembly->token_fixups;
      D.23855 = mb->ilgen;
      D.23950 = idx + 12;
      D.23951 = (long unsigned int) D.23950;
      D.23952 = (void *) D.23951;
      mono_g_hash_table_insert (D.23899, D.23855, D.23952);
      <D.23949>:
      <D.23947>:
      D.23874 = &assembly->code;
      D.23953 = mono_array_addr_with_size (code, 1, 0);
      mono_image_add_stream_data (D.23874, D.23953, code_size);
      if (num_exception != 0) goto <D.23954>; else goto <D.23955>;
      <D.23954>:
      {
        unsigned char sheader[4];
        struct MonoILExceptionInfo * ex_info;
        struct MonoILExceptionBlock * ex_block;
        int j;

        try
          {
            D.23874 = &assembly->code;
            stream_data_align (D.23874);
            sheader[0] = 65;
            num_exception.51 = (unsigned int) num_exception;
            D.23957 = num_exception.51 * 24;
            num_exception = (gint32) D.23957;
            num_exception = num_exception + 4;
            D.23958 = (unsigned char) num_exception;
            sheader[1] = D.23958;
            D.23959 = num_exception >> 8;
            D.23960 = (unsigned char) D.23959;
            sheader[2] = D.23960;
            D.23961 = num_exception >> 16;
            D.23962 = (unsigned char) D.23961;
            sheader[3] = D.23962;
            D.23874 = &assembly->code;
            mono_image_add_stream_data (D.23874, &sheader, 4);
            D.23855 = mb->ilgen;
            D.23865 = D.23855->ex_handlers;
            D.23963 = mono_array_length (D.23865);
            D.23964 = (unsigned int) D.23963;
            D.23965 = D.23964 + 4294967295;
            i = (gint32) D.23965;
            goto <D.19157>;
            <D.19156>:
            D.23855 = mb->ilgen;
            D.23865 = D.23855->ex_handlers;
            D.23966 = (long unsigned int) i;
            ex_info = mono_array_addr_with_size (D.23865, 24, D.23966);
            D.23967 = ex_info->handlers;
            if (D.23967 != 0B) goto <D.23968>; else goto <D.23969>;
            <D.23968>:
            {
              int finally_start;

              D.23970 = ex_info->start;
              D.23971 = ex_info->len;
              finally_start = D.23970 + D.23971;
              j = 0;
              goto <D.19153>;
              <D.19152>:
              {
                guint32 val;

                try
                  {
                    D.23967 = ex_info->handlers;
                    D.23972 = (long unsigned int) j;
                    ex_block = mono_array_addr_with_size (D.23967, 24, D.23972);
                    D.23973 = ex_block->type;
                    D.23974 = (unsigned int) D.23973;
                    D.23975 = D.23974 << 24;
                    D.23973 = ex_block->type;
                    D.23974 = (unsigned int) D.23973;
                    D.23976 = D.23974 >> 8;
                    D.23977 = D.23976 & 65280;
                    D.23978 = D.23975 | D.23977;
                    D.23973 = ex_block->type;
                    D.23974 = (unsigned int) D.23973;
                    D.23979 = D.23974 << 8;
                    D.23980 = D.23979 & 16711680;
                    D.23981 = D.23978 | D.23980;
                    D.23973 = ex_block->type;
                    D.23974 = (unsigned int) D.23973;
                    D.23982 = D.23974 >> 24;
                    val.52 = D.23981 | D.23982;
                    val = val.52;
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                    D.23970 = ex_info->start;
                    D.23984 = (unsigned int) D.23970;
                    D.23985 = D.23984 << 24;
                    D.23970 = ex_info->start;
                    D.23984 = (unsigned int) D.23970;
                    D.23986 = D.23984 >> 8;
                    D.23987 = D.23986 & 65280;
                    D.23988 = D.23985 | D.23987;
                    D.23970 = ex_info->start;
                    D.23984 = (unsigned int) D.23970;
                    D.23989 = D.23984 << 8;
                    D.23990 = D.23989 & 16711680;
                    D.23991 = D.23988 | D.23990;
                    D.23970 = ex_info->start;
                    D.23984 = (unsigned int) D.23970;
                    D.23992 = D.23984 >> 24;
                    val.53 = D.23991 | D.23992;
                    val = val.53;
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                    D.23973 = ex_block->type;
                    if (D.23973 == 2) goto <D.23994>; else goto <D.23995>;
                    <D.23994>:
                    D.23970 = ex_info->start;
                    D.23996 = finally_start - D.23970;
                    D.23997 = (unsigned int) D.23996;
                    D.23998 = D.23997 << 24;
                    D.23970 = ex_info->start;
                    D.23996 = finally_start - D.23970;
                    D.23997 = (unsigned int) D.23996;
                    D.23999 = D.23997 >> 8;
                    D.24000 = D.23999 & 65280;
                    D.24001 = D.23998 | D.24000;
                    D.23970 = ex_info->start;
                    D.23996 = finally_start - D.23970;
                    D.23997 = (unsigned int) D.23996;
                    D.24002 = D.23997 << 8;
                    D.24003 = D.24002 & 16711680;
                    D.24004 = D.24001 | D.24003;
                    D.23970 = ex_info->start;
                    D.23996 = finally_start - D.23970;
                    D.23997 = (unsigned int) D.23996;
                    D.24005 = D.23997 >> 24;
                    val.54 = D.24004 | D.24005;
                    val = val.54;
                    goto <D.24007>;
                    <D.23995>:
                    D.23971 = ex_info->len;
                    D.24008 = (unsigned int) D.23971;
                    D.24009 = D.24008 << 24;
                    D.23971 = ex_info->len;
                    D.24008 = (unsigned int) D.23971;
                    D.24010 = D.24008 >> 8;
                    D.24011 = D.24010 & 65280;
                    D.24012 = D.24009 | D.24011;
                    D.23971 = ex_info->len;
                    D.24008 = (unsigned int) D.23971;
                    D.24013 = D.24008 << 8;
                    D.24014 = D.24013 & 16711680;
                    D.24015 = D.24012 | D.24014;
                    D.23971 = ex_info->len;
                    D.24008 = (unsigned int) D.23971;
                    D.24016 = D.24008 >> 24;
                    val.55 = D.24015 | D.24016;
                    val = val.55;
                    <D.24007>:
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                    D.24018 = ex_block->start;
                    D.24019 = (unsigned int) D.24018;
                    D.24020 = D.24019 << 24;
                    D.24018 = ex_block->start;
                    D.24019 = (unsigned int) D.24018;
                    D.24021 = D.24019 >> 8;
                    D.24022 = D.24021 & 65280;
                    D.24023 = D.24020 | D.24022;
                    D.24018 = ex_block->start;
                    D.24019 = (unsigned int) D.24018;
                    D.24024 = D.24019 << 8;
                    D.24025 = D.24024 & 16711680;
                    D.24026 = D.24023 | D.24025;
                    D.24018 = ex_block->start;
                    D.24019 = (unsigned int) D.24018;
                    D.24027 = D.24019 >> 24;
                    val.56 = D.24026 | D.24027;
                    val = val.56;
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                    D.24029 = ex_block->len;
                    D.24030 = (unsigned int) D.24029;
                    D.24031 = D.24030 << 24;
                    D.24029 = ex_block->len;
                    D.24030 = (unsigned int) D.24029;
                    D.24032 = D.24030 >> 8;
                    D.24033 = D.24032 & 65280;
                    D.24034 = D.24031 | D.24033;
                    D.24029 = ex_block->len;
                    D.24030 = (unsigned int) D.24029;
                    D.24035 = D.24030 << 8;
                    D.24036 = D.24035 & 16711680;
                    D.24037 = D.24034 | D.24036;
                    D.24029 = ex_block->len;
                    D.24030 = (unsigned int) D.24029;
                    D.24038 = D.24030 >> 24;
                    val.57 = D.24037 | D.24038;
                    val = val.57;
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                    D.24018 = ex_block->start;
                    D.24029 = ex_block->len;
                    finally_start = D.24018 + D.24029;
                    D.24040 = ex_block->extype;
                    if (D.24040 != 0B) goto <D.24041>; else goto <D.24042>;
                    <D.24041>:
                    D.24040 = ex_block->extype;
                    D.24043 = mono_reflection_type_get_handle (D.24040);
                    D.24044 = mono_image_typedef_or_ref (assembly, D.24043);
                    val.58 = mono_metadata_token_from_dor (D.24044);
                    val = val.58;
                    goto <D.24046>;
                    <D.24042>:
                    D.23973 = ex_block->type;
                    if (D.23973 == 1) goto <D.24047>; else goto <D.24048>;
                    <D.24047>:
                    D.24049 = ex_block->filter_offset;
                    val.59 = (unsigned int) D.24049;
                    val = val.59;
                    goto <D.24051>;
                    <D.24048>:
                    val = 0;
                    <D.24051>:
                    <D.24046>:
                    val.60 = val;
                    D.24053 = val.60 << 24;
                    val.60 = val;
                    D.24054 = val.60 >> 8;
                    D.24055 = D.24054 & 65280;
                    D.24056 = D.24053 | D.24055;
                    val.60 = val;
                    D.24057 = val.60 << 8;
                    D.24058 = D.24057 & 16711680;
                    D.24059 = D.24056 | D.24058;
                    val.60 = val;
                    D.24060 = val.60 >> 24;
                    val.61 = D.24059 | D.24060;
                    val = val.61;
                    D.23874 = &assembly->code;
                    mono_image_add_stream_data (D.23874, &val, 4);
                  }
                finally
                  {
                    val = {CLOBBER};
                  }
              }
              j = j + 1;
              <D.19153>:
              D.23972 = (long unsigned int) j;
              D.23967 = ex_info->handlers;
              D.24062 = mono_array_length (D.23967);
              if (D.23972 < D.24062) goto <D.19152>; else goto <D.19154>;
              <D.19154>:
            }
            goto <D.24063>;
            <D.23969>:
            monoeg_g_log (0B, 4, "No clauses for ex info block %d", i);
            <D.19155>:
            goto <D.19155>;
            <D.24063>:
            i = i + -1;
            <D.19157>:
            if (i >= 0) goto <D.19156>; else goto <D.19158>;
            <D.19158>:
          }
        finally
          {
            sheader = {CLOBBER};
          }
      }
      <D.23955>:
      D.23904 = assembly->text_rva;
      D.23854 = D.23904 + idx;
      return D.23854;
    }
  finally
    {
      flags = {CLOBBER};
      fat_header = {CLOBBER};
      int_value = {CLOBBER};
      short_value = {CLOBBER};
    }
}


method_count_clauses (struct MonoReflectionILGen * ilgen)
{
  struct MonoArray * D.24066;
  long unsigned int D.24067;
  struct MonoArray * D.24068;
  long unsigned int D.24071;
  unsigned int D.24072;
  long unsigned int D.24074;
  guint32 D.24075;
  guint32 num_clauses;
  int i;
  struct MonoILExceptionInfo * ex_info;

  num_clauses = 0;
  i = 0;
  goto <D.19100>;
  <D.19099>:
  D.24066 = ilgen->ex_handlers;
  D.24067 = (long unsigned int) i;
  ex_info = mono_array_addr_with_size (D.24066, 24, D.24067);
  D.24068 = ex_info->handlers;
  if (D.24068 != 0B) goto <D.24069>; else goto <D.24070>;
  <D.24069>:
  D.24068 = ex_info->handlers;
  D.24071 = mono_array_length (D.24068);
  D.24072 = (unsigned int) D.24071;
  num_clauses = D.24072 + num_clauses;
  goto <D.24073>;
  <D.24070>:
  num_clauses = num_clauses + 1;
  <D.24073>:
  i = i + 1;
  <D.19100>:
  D.24067 = (long unsigned int) i;
  D.24066 = ilgen->ex_handlers;
  D.24074 = mono_array_length (D.24066);
  if (D.24067 < D.24074) goto <D.19099>; else goto <D.19101>;
  <D.19101>:
  D.24075 = num_clauses;
  return D.24075;
}


encode_locals (struct MonoDynamicImage * assembly, struct MonoReflectionILGen * ilgen)
{
  struct MonoArray * D.24077;
  long unsigned int D.24078;
  long unsigned int D.24079;
  char * D.24080;
  unsigned char D.24081;
  struct MonoObject * D.24084;
  unsigned int i.62;
  struct GHashTable * D.24086;
  struct GHashTable * D.24089;
  long unsigned int D.24090;
  const void * D.24091;
  void * D.24092;
  long int D.24093;
  guint32 D.24096;
  unsigned int D.24097;
  unsigned int idx.63;
  unsigned int D.24099;
  unsigned int D.24100;
  unsigned int D.24101;
  guint32 * D.24102;
  long unsigned int D.24103;
  long unsigned int D.24104;
  void * D.24105;
  void * D.24106;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 idx;
  guint32 sig_idx;
  guint nl;
  struct SigBuffer buf;
  int i;

  try
    {
      D.24077 = ilgen->locals;
      D.24078 = mono_array_length (D.24077);
      nl = (guint) D.24078;
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 7);
      sigbuffer_add_value (&buf, nl);
      i = 0;
      goto <D.19091>;
      <D.19090>:
      {
        struct MonoReflectionLocalBuilder * lb;

        D.24077 = ilgen->locals;
        D.24079 = (long unsigned int) i;
        D.24080 = mono_array_addr_with_size (D.24077, 8, D.24079);
        lb = MEM[(struct MonoReflectionLocalBuilder * *)D.24080];
        D.24081 = lb->is_pinned;
        if (D.24081 != 0) goto <D.24082>; else goto <D.24083>;
        <D.24082>:
        sigbuffer_add_value (&buf, 69);
        <D.24083>:
        D.24084 = lb->type;
        encode_reflection_type (assembly, D.24084, &buf);
      }
      i = i + 1;
      <D.19091>:
      i.62 = (unsigned int) i;
      if (i.62 < nl) goto <D.19090>; else goto <D.19092>;
      <D.19092>:
      sig_idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.24086 = assembly->standalonesig_cache;
      if (D.24086 == 0B) goto <D.24087>; else goto <D.24088>;
      <D.24087>:
      D.24089 = monoeg_g_hash_table_new (0B, 0B);
      assembly->standalonesig_cache = D.24089;
      <D.24088>:
      D.24086 = assembly->standalonesig_cache;
      D.24090 = (long unsigned int) sig_idx;
      D.24091 = (const void *) D.24090;
      D.24092 = monoeg_g_hash_table_lookup (D.24086, D.24091);
      D.24093 = (long int) D.24092;
      idx = (guint32) D.24093;
      if (idx != 0) goto <D.24094>; else goto <D.24095>;
      <D.24094>:
      D.24096 = idx;
      return D.24096;
      <D.24095>:
      table = &assembly->tables[17];
      D.24097 = table->next_idx;
      idx.63 = D.24097;
      D.24099 = idx.63 + 1;
      table->next_idx = D.24099;
      idx = idx.63;
      D.24100 = table->rows;
      D.24101 = D.24100 + 1;
      table->rows = D.24101;
      D.24100 = table->rows;
      alloc_table (table, D.24100);
      D.24102 = table->values;
      D.24103 = (long unsigned int) idx;
      D.24104 = D.24103 * 4;
      values = D.24102 + D.24104;
      *values = sig_idx;
      D.24086 = assembly->standalonesig_cache;
      D.24090 = (long unsigned int) sig_idx;
      D.24105 = (void *) D.24090;
      D.24103 = (long unsigned int) idx;
      D.24106 = (void *) D.24103;
      monoeg_g_hash_table_insert_replace (D.24086, D.24105, D.24106, 0);
      D.24096 = idx;
      return D.24096;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


stream_data_align (struct MonoDynamicStream * stream)
{
  unsigned int D.24109;
  unsigned int D.24112;
  char buf[4];
  guint32 count;

  try
    {
      buf = {};
      D.24109 = stream->index;
      count = D.24109 & 3;
      if (count != 0) goto <D.24110>; else goto <D.24111>;
      <D.24110>:
      D.24112 = 4 - count;
      mono_image_add_stream_data (stream, &buf, D.24112);
      <D.24111>:
    }
  finally
    {
      buf = {CLOBBER};
    }
}


encode_marshal_blob (struct MonoDynamicImage * assembly, struct MonoReflectionMarshal * minfo)
{
  int D.24113;
  unsigned int D.24114;
  int D.24115;
  unsigned int D.24116;
  int D.24119;
  unsigned char D.24121;
  unsigned int D.24122;
  guint32 iftmp.64;
  int D.24126;
  guint32 iftmp.65;
  _Bool D.24134;
  unsigned int D.24135;
  struct MonoString * D.24138;
  long unsigned int D.24141;
  struct MonoString * D.24146;
  struct MonoObject * D.24148;
  struct MonoType * D.24151;
  long unsigned int D.24153;
  struct MonoString * D.24154;
  long unsigned int D.24157;
  guint32 D.24159;
  char * str;
  struct SigBuffer buf;
  guint32 idx;
  guint32 len;

  try
    {
      sigbuffer_init (&buf, 32);
      D.24113 = minfo->type;
      D.24114 = (unsigned int) D.24113;
      sigbuffer_add_value (&buf, D.24114);
      D.24113 = minfo->type;
      switch (D.24113) <default: <D.19403>, case 23: <D.19397>, case 29: <D.19401>, case 30: <D.19398>, case 42: <D.19400>, case 44: <D.19402>>
      <D.19397>:
      <D.19398>:
      D.24115 = minfo->count;
      D.24116 = (unsigned int) D.24115;
      sigbuffer_add_value (&buf, D.24116);
      goto <D.19399>;
      <D.19400>:
      D.24119 = minfo->eltype;
      if (D.24119 != 0) goto <D.24117>; else goto <D.24120>;
      <D.24120>:
      D.24121 = minfo->has_size;
      if (D.24121 != 0) goto <D.24117>; else goto <D.24118>;
      <D.24117>:
      D.24119 = minfo->eltype;
      D.24122 = (unsigned int) D.24119;
      sigbuffer_add_value (&buf, D.24122);
      D.24121 = minfo->has_size;
      if (D.24121 != 0) goto <D.24123>; else goto <D.24124>;
      <D.24123>:
      D.24126 = minfo->param_num;
      if (D.24126 != -1) goto <D.24127>; else goto <D.24128>;
      <D.24127>:
      D.24126 = minfo->param_num;
      iftmp.64 = (guint32) D.24126;
      goto <D.24129>;
      <D.24128>:
      iftmp.64 = 0;
      <D.24129>:
      sigbuffer_add_value (&buf, iftmp.64);
      D.24115 = minfo->count;
      if (D.24115 != -1) goto <D.24131>; else goto <D.24132>;
      <D.24131>:
      D.24115 = minfo->count;
      iftmp.65 = (guint32) D.24115;
      goto <D.24133>;
      <D.24132>:
      iftmp.65 = 0;
      <D.24133>:
      sigbuffer_add_value (&buf, iftmp.65);
      D.24126 = minfo->param_num;
      D.24134 = D.24126 != -1;
      D.24135 = (unsigned int) D.24134;
      sigbuffer_add_value (&buf, D.24135);
      <D.24124>:
      <D.24118>:
      goto <D.19399>;
      <D.19401>:
      D.24119 = minfo->eltype;
      if (D.24119 != 0) goto <D.24136>; else goto <D.24137>;
      <D.24136>:
      D.24119 = minfo->eltype;
      D.24122 = (unsigned int) D.24119;
      sigbuffer_add_value (&buf, D.24122);
      <D.24137>:
      goto <D.19399>;
      <D.19402>:
      D.24138 = minfo->guid;
      if (D.24138 != 0B) goto <D.24139>; else goto <D.24140>;
      <D.24139>:
      D.24138 = minfo->guid;
      str = mono_string_to_utf8 (D.24138);
      D.24141 = __strlen_g (str);
      len = (guint32) D.24141;
      sigbuffer_add_value (&buf, len);
      sigbuffer_add_mem (&buf, str, len);
      monoeg_g_free (str);
      goto <D.24142>;
      <D.24140>:
      sigbuffer_add_value (&buf, 0);
      <D.24142>:
      sigbuffer_add_value (&buf, 0);
      D.24146 = minfo->marshaltype;
      if (D.24146 != 0B) goto <D.24143>; else goto <D.24147>;
      <D.24147>:
      D.24148 = minfo->marshaltyperef;
      if (D.24148 != 0B) goto <D.24143>; else goto <D.24144>;
      <D.24143>:
      D.24148 = minfo->marshaltyperef;
      if (D.24148 != 0B) goto <D.24149>; else goto <D.24150>;
      <D.24149>:
      D.24148 = minfo->marshaltyperef;
      D.24151 = mono_reflection_type_get_handle (D.24148);
      str = type_get_fully_qualified_name (D.24151);
      goto <D.24152>;
      <D.24150>:
      D.24146 = minfo->marshaltype;
      str = mono_string_to_utf8 (D.24146);
      <D.24152>:
      D.24153 = __strlen_g (str);
      len = (guint32) D.24153;
      sigbuffer_add_value (&buf, len);
      sigbuffer_add_mem (&buf, str, len);
      monoeg_g_free (str);
      goto <D.24145>;
      <D.24144>:
      sigbuffer_add_value (&buf, 0);
      <D.24145>:
      D.24154 = minfo->mcookie;
      if (D.24154 != 0B) goto <D.24155>; else goto <D.24156>;
      <D.24155>:
      D.24154 = minfo->mcookie;
      str = mono_string_to_utf8 (D.24154);
      D.24157 = __strlen_g (str);
      len = (guint32) D.24157;
      sigbuffer_add_value (&buf, len);
      sigbuffer_add_mem (&buf, str, len);
      monoeg_g_free (str);
      goto <D.24158>;
      <D.24156>:
      sigbuffer_add_value (&buf, 0);
      <D.24158>:
      goto <D.19399>;
      <D.19403>:
      goto <D.19399>;
      <D.19399>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.24159 = idx;
      return D.24159;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


type_get_fully_qualified_name (struct MonoType * type)
{
  char * D.24163;

  D.24163 = mono_type_get_name_full (type, 3);
  return D.24163;
}


sigbuffer_add_mem (struct SigBuffer * buf, char * p, guint32 size)
{
  int size.66;
  char * D.24166;
  long unsigned int D.24167;
  sizetype D.24168;
  char * D.24169;

  size.66 = (int) size;
  sigbuffer_make_room (buf, size.66);
  D.24166 = buf->p;
  D.24167 = (long unsigned int) size;
  memcpy (D.24166, p, D.24167);
  D.24166 = buf->p;
  D.24168 = (sizetype) size;
  D.24169 = D.24166 + D.24168;
  buf->p = D.24169;
}


encode_constant (struct MonoDynamicImage * assembly, struct MonoObject * val, guint32 * ret_type)
{
  struct MonoVTable * D.24173;
  struct MonoClass * D.24174;
  unsigned char D.24175;
  unsigned int D.24176;
  unsigned int D.24177;
  long unsigned int D.24178;
  long unsigned int D.24179;
  struct MonoType * D.24182;
  unsigned char D.24183;
  unsigned int D.24184;
  struct MonoImage * D.24187;
  int D.24188;
  const char * D.24190;
  int D.24191;
  const char * D.24193;
  int D.24194;
  int D.24196;
  int D.24197;
  char * b.67;
  int D.24199;
  int D.24200;
  long unsigned int D.24201;
  int D.24202;
  long int b.68;
  long int blob_size.69;
  long int D.24205;
  int D.24206;
  int len.70;
  guint32 D.24208;
  struct MonoGenericClass * D.24209;
  struct MonoClass * D.24210;
  unsigned char D.24211;
  unsigned int D.24212;
  struct MonoDynamicStream * D.24213;
  unsigned int D.24214;
  char blob_size[64];
  char * b;
  char * p;
  char * box_val;
  char * buf;
  guint32 idx;
  guint32 len;
  guint32 dummy;
  void handle_enum = <<< error >>>;

  try
    {
      b = &blob_size;
      idx = 0;
      len = 0;
      dummy = 0;
      buf = monoeg_malloc (64);
      p = buf;
      if (val == 0B) goto <D.24170>; else goto <D.24171>;
      <D.24170>:
      *ret_type = 18;
      len = 4;
      box_val = &dummy;
      goto <D.24172>;
      <D.24171>:
      box_val = val + 16;
      D.24173 = val->vtable;
      D.24174 = D.24173->klass;
      D.24175 = D.24174->byval_arg.type;
      D.24176 = (unsigned int) D.24175;
      *ret_type = D.24176;
      <D.24172>:
      handle_enum:
      D.24177 = *ret_type;
      switch (D.24177) <default: <D.19387>, case 2: <D.19365>, case 3: <D.19369>, case 4: <D.19367>, case 5: <D.19366>, case 6: <D.19371>, case 7: <D.19370>, case 8: <D.19373>, case 9: <D.19372>, case 10: <D.19376>, case 11: <D.19375>, case 12: <D.19374>, case 13: <D.19377>, case 14: <D.19382>, case 17: <D.19378>, case 18: <D.19381>, case 21: <D.19386>>
      <D.19365>:
      <D.19366>:
      <D.19367>:
      len = 1;
      goto <D.19368>;
      <D.19369>:
      <D.19370>:
      <D.19371>:
      len = 2;
      goto <D.19368>;
      <D.19372>:
      <D.19373>:
      <D.19374>:
      len = 4;
      goto <D.19368>;
      <D.19375>:
      <D.19376>:
      len = 8;
      goto <D.19368>;
      <D.19377>:
      len = 8;
      goto <D.19368>;
      <D.19378>:
      {
        struct MonoClass * klass;

        D.24173 = val->vtable;
        klass = D.24173->klass;
        D.24178 = BIT_FIELD_REF <*klass, 64, 256>;
        D.24179 = D.24178 & 576460752303423488;
        if (D.24179 != 0) goto <D.24180>; else goto <D.24181>;
        <D.24180>:
        D.24182 = mono_class_enum_basetype (klass);
        D.24183 = D.24182->type;
        D.24184 = (unsigned int) D.24183;
        *ret_type = D.24184;
        goto handle_enum;
        <D.24181>:
        D.24187 = klass->image;
        D.24188 = mono_is_corlib_image (D.24187);
        if (D.24188 != 0) goto <D.24189>; else goto <D.24185>;
        <D.24189>:
        D.24190 = klass->name_space;
        D.24191 = strcmp (D.24190, "System");
        if (D.24191 == 0) goto <D.24192>; else goto <D.24185>;
        <D.24192>:
        D.24193 = klass->name;
        D.24194 = strcmp (D.24193, "DateTime");
        if (D.24194 == 0) goto <D.24195>; else goto <D.24185>;
        <D.24195>:
        len = 8;
        goto <D.24186>;
        <D.24185>:
        monoeg_g_log (0B, 4, "we can\'t encode valuetypes, we should have never reached this line");
        <D.19380>:
        goto <D.19380>;
        <D.24186>:
        goto <D.19368>;
      }
      <D.19381>:
      goto <D.19368>;
      <D.19382>:
      {
        struct MonoString * str;

        str = val;
        D.24196 = str->length;
        D.24197 = D.24196 * 2;
        len = (guint32) D.24197;
        b.67 = b;
        mono_metadata_encode_value (len, b.67, &b);
        {
          char * swapped;
          const char * p;

          D.24199 = mono_string_length (str);
          D.24200 = D.24199 * 2;
          D.24201 = (long unsigned int) D.24200;
          swapped = monoeg_malloc (D.24201);
          p = mono_string_chars (str);
          D.24202 = mono_string_length (str);
          swap_with_size (swapped, p, 2, D.24202);
          b.67 = b;
          b.68 = (long int) b.67;
          blob_size.69 = (long int) &blob_size;
          D.24205 = b.68 - blob_size.69;
          D.24206 = (int) D.24205;
          len.70 = (int) len;
          idx = add_to_blob_cached (assembly, &blob_size, D.24206, swapped, len.70);
          monoeg_g_free (swapped);
        }
        monoeg_g_free (buf);
        D.24208 = idx;
        return D.24208;
      }
      <D.19386>:
      D.24173 = val->vtable;
      D.24174 = D.24173->klass;
      D.24209 = D.24174->generic_class;
      D.24210 = D.24209->container_class;
      D.24211 = D.24210->byval_arg.type;
      D.24212 = (unsigned int) D.24211;
      *ret_type = D.24212;
      goto handle_enum;
      <D.19387>:
      D.24177 = *ret_type;
      monoeg_g_log (0B, 4, "we don\'t encode constant type 0x%02x yet", D.24177);
      <D.19388>:
      goto <D.19388>;
      <D.19368>:
      b.67 = b;
      mono_metadata_encode_value (len, b.67, &b);
      D.24213 = &assembly->blob;
      b.67 = b;
      b.68 = (long int) b.67;
      blob_size.69 = (long int) &blob_size;
      D.24205 = b.68 - blob_size.69;
      D.24214 = (unsigned int) D.24205;
      idx = mono_image_add_stream_data (D.24213, &blob_size, D.24214);
      len.70 = (int) len;
      swap_with_size (&blob_size, box_val, len.70, 1);
      D.24213 = &assembly->blob;
      mono_image_add_stream_data (D.24213, &blob_size, len);
      monoeg_g_free (buf);
      D.24208 = idx;
      return D.24208;
    }
  finally
    {
      blob_size = {CLOBBER};
      b = {CLOBBER};
      dummy = {CLOBBER};
    }
}


swap_with_size (char * dest, const char * val, int len, int nelem)
{
  char D.24218;
  char D.24219;
  char * D.24220;
  char D.24221;
  char D.24222;
  char * D.24223;
  char * D.24224;
  char D.24225;
  char D.24226;
  char D.24227;
  char D.24228;
  char * D.24229;
  char * D.24230;
  char * D.24231;
  char * D.24232;
  sizetype D.24233;
  int elem;

  elem = 0;
  goto <D.18937>;
  <D.18936>:
  switch (len) <default: <D.18935>, case 1: <D.18930>, case 2: <D.18932>, case 4: <D.18933>, case 8: <D.18934>>
  <D.18930>:
  D.24218 = *val;
  *dest = D.24218;
  goto <D.18931>;
  <D.18932>:
  D.24219 = MEM[(const char *)val + 1B];
  *dest = D.24219;
  D.24220 = dest + 1;
  D.24218 = *val;
  *D.24220 = D.24218;
  goto <D.18931>;
  <D.18933>:
  D.24221 = MEM[(const char *)val + 3B];
  *dest = D.24221;
  D.24220 = dest + 1;
  D.24222 = MEM[(const char *)val + 2B];
  *D.24220 = D.24222;
  D.24223 = dest + 2;
  D.24219 = MEM[(const char *)val + 1B];
  *D.24223 = D.24219;
  D.24224 = dest + 3;
  D.24218 = *val;
  *D.24224 = D.24218;
  goto <D.18931>;
  <D.18934>:
  D.24225 = MEM[(const char *)val + 7B];
  *dest = D.24225;
  D.24220 = dest + 1;
  D.24226 = MEM[(const char *)val + 6B];
  *D.24220 = D.24226;
  D.24223 = dest + 2;
  D.24227 = MEM[(const char *)val + 5B];
  *D.24223 = D.24227;
  D.24224 = dest + 3;
  D.24228 = MEM[(const char *)val + 4B];
  *D.24224 = D.24228;
  D.24229 = dest + 4;
  D.24221 = MEM[(const char *)val + 3B];
  *D.24229 = D.24221;
  D.24230 = dest + 5;
  D.24222 = MEM[(const char *)val + 2B];
  *D.24230 = D.24222;
  D.24231 = dest + 6;
  D.24219 = MEM[(const char *)val + 1B];
  *D.24231 = D.24219;
  D.24232 = dest + 7;
  D.24218 = *val;
  *D.24232 = D.24218;
  goto <D.18931>;
  <D.18935>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 541);
  <D.18931>:
  D.24233 = (sizetype) len;
  dest = dest + D.24233;
  D.24233 = (sizetype) len;
  val = val + D.24233;
  elem = elem + 1;
  <D.18937>:
  if (elem < nelem) goto <D.18936>; else goto <D.18938>;
  <D.18938>:
}


find_index_in_table (struct MonoDynamicImage * assembly, int table_idx, int col, guint32 token)
{
  unsigned char D.24234;
  int D.24235;
  _Bool D.24236;
  long int D.24237;
  long int D.24238;
  guint32 * D.24241;
  long unsigned int D.24242;
  long unsigned int D.24243;
  long unsigned int D.24244;
  long unsigned int D.24245;
  guint32 * D.24246;
  unsigned int D.24247;
  guint32 D.24250;
  unsigned int D.24251;
  unsigned int i.71;
  int i;
  struct MonoDynamicTable * table;
  guint32 * values;

  table = &assembly->tables[table_idx];
  D.24234 = table->columns;
  D.24235 = (int) D.24234;
  D.24236 = D.24235 <= col;
  D.24237 = (long int) D.24236;
  D.24238 = __builtin_expect (D.24237, 0);
  if (D.24238 != 0) goto <D.24239>; else goto <D.24240>;
  <D.24239>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 1155, "col < table->columns");
  <D.24240>:
  D.24241 = table->values;
  D.24234 = table->columns;
  D.24242 = (long unsigned int) D.24234;
  D.24243 = D.24242 * 4;
  values = D.24241 + D.24243;
  i = 1;
  goto <D.19169>;
  <D.19168>:
  D.24244 = (long unsigned int) col;
  D.24245 = D.24244 * 4;
  D.24246 = values + D.24245;
  D.24247 = *D.24246;
  if (D.24247 == token) goto <D.24248>; else goto <D.24249>;
  <D.24248>:
  D.24250 = (guint32) i;
  return D.24250;
  <D.24249>:
  D.24234 = table->columns;
  D.24242 = (long unsigned int) D.24234;
  D.24243 = D.24242 * 4;
  values = values + D.24243;
  i = i + 1;
  <D.19169>:
  D.24251 = table->rows;
  i.71 = (unsigned int) i;
  if (D.24251 >= i.71) goto <D.19168>; else goto <D.19170>;
  <D.19170>:
  D.24250 = 0;
  return D.24250;
}


mono_image_get_generic_param_info (struct MonoReflectionGenericParam * gparam, guint32 owner, struct MonoDynamicImage * assembly)
{
  int D.24254;
  struct MonoReflectionGenericParam * * D.24259;
  void * D.24260;
  struct GPtrArray * D.24261;
  struct GenericParamTableEntry * entry;

  entry = monoeg_malloc0 (16);
  entry->owner = owner;
  D.24254 = mono_gc_is_moving ();
  if (D.24254 != 0) goto <D.24255>; else goto <D.24256>;
  <D.24255>:
  if (0 != 0) goto <D.24257>; else goto <D.24258>;
  <D.24257>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2206, "sizeof (entry->gparam) == sizeof (MonoObject*)");
  <D.24258>:
  D.24259 = &entry->gparam;
  D.24260 = mono_gc_make_root_descr_all_refs (1);
  mono_gc_register_root (D.24259, 8, D.24260);
  <D.24256>:
  entry->gparam = gparam;
  D.24261 = assembly->gen_params;
  monoeg_g_ptr_array_add (D.24261, entry);
}


mono_image_get_field_info (struct MonoReflectionFieldBuilder * fb, struct MonoDynamicImage * assembly)
{
  unsigned int D.24262;
  unsigned int D.24263;
  unsigned int D.24266;
  unsigned int D.24267;
  unsigned int D.24268;
  unsigned int D.24269;
  int D.24270;
  struct GHashTable * D.24271;
  struct MonoClassField * D.24272;
  int D.24273;
  long unsigned int D.24274;
  void * D.24275;
  guint32 * D.24276;
  int D.24277;
  long unsigned int D.24278;
  long unsigned int D.24279;
  guint32 * D.24280;
  struct MonoDynamicStream * D.24281;
  struct MonoString * D.24282;
  unsigned int D.24283;
  guint32 * D.24284;
  unsigned int D.24285;
  int D.24286;
  unsigned int D.24289;
  unsigned int D.24290;
  unsigned int D.24291;
  long unsigned int D.24292;
  long unsigned int D.24293;
  unsigned int D.24294;
  unsigned int D.24295;
  unsigned int D.24298;
  long unsigned int D.24299;
  long unsigned int D.24300;
  int D.24301;
  unsigned int D.24302;
  guint32 * D.24303;
  struct MonoObject * D.24304;
  unsigned int D.24305;
  unsigned int field_type.72;
  unsigned int D.24307;
  struct MonoArray * D.24310;
  long unsigned int D.24313;
  struct MonoDynamicStream * D.24316;
  char * D.24317;
  long unsigned int D.24318;
  unsigned int D.24319;
  struct MonoClass * D.24321;
  int D.24322;
  unsigned int D.24323;
  unsigned int D.24324;
  unsigned int D.24325;
  struct MonoReflectionMarshal * D.24326;
  int D.24329;
  unsigned int D.24330;
  unsigned int D.24331;
  struct MonoDynamicTable * table;
  guint32 * values;

  D.24262 = fb->attrs;
  D.24263 = D.24262 & 64;
  if (D.24263 != 0) goto <D.24264>; else goto <D.24265>;
  <D.24264>:
  D.24262 = fb->attrs;
  D.24266 = D.24262 | 32768;
  fb->attrs = D.24266;
  <D.24265>:
  table = &assembly->tables[4];
  D.24267 = table->next_idx;
  D.24268 = D.24267;
  D.24269 = D.24268 + 1;
  table->next_idx = D.24269;
  D.24270 = (int) D.24268;
  fb->table_idx = D.24270;
  D.24271 = assembly->field_to_table_idx;
  D.24272 = fb->handle;
  D.24273 = fb->table_idx;
  D.24274 = (long unsigned int) D.24273;
  D.24275 = (void *) D.24274;
  monoeg_g_hash_table_insert_replace (D.24271, D.24272, D.24275, 0);
  D.24276 = table->values;
  D.24273 = fb->table_idx;
  D.24277 = D.24273 * 3;
  D.24278 = (long unsigned int) D.24277;
  D.24279 = D.24278 * 4;
  values = D.24276 + D.24279;
  D.24280 = values + 4;
  D.24281 = &assembly->sheap;
  D.24282 = fb->name;
  D.24283 = string_heap_insert_mstring (D.24281, D.24282);
  *D.24280 = D.24283;
  D.24262 = fb->attrs;
  *values = D.24262;
  D.24284 = values + 8;
  D.24285 = field_encode_signature (assembly, fb);
  *D.24284 = D.24285;
  D.24286 = fb->offset;
  if (D.24286 != -1) goto <D.24287>; else goto <D.24288>;
  <D.24287>:
  table = &assembly->tables[16];
  D.24289 = table->rows;
  D.24290 = D.24289 + 1;
  table->rows = D.24290;
  D.24289 = table->rows;
  alloc_table (table, D.24289);
  D.24276 = table->values;
  D.24289 = table->rows;
  D.24291 = D.24289 * 2;
  D.24292 = (long unsigned int) D.24291;
  D.24293 = D.24292 * 4;
  values = D.24276 + D.24293;
  D.24280 = values + 4;
  D.24273 = fb->table_idx;
  D.24294 = (unsigned int) D.24273;
  *D.24280 = D.24294;
  D.24286 = fb->offset;
  D.24295 = (unsigned int) D.24286;
  *values = D.24295;
  <D.24288>:
  D.24262 = fb->attrs;
  D.24263 = D.24262 & 64;
  if (D.24263 != 0) goto <D.24296>; else goto <D.24297>;
  <D.24296>:
  {
    guint32 field_type;

    try
      {
        field_type = 0;
        table = &assembly->tables[11];
        D.24289 = table->rows;
        D.24290 = D.24289 + 1;
        table->rows = D.24290;
        D.24289 = table->rows;
        alloc_table (table, D.24289);
        D.24276 = table->values;
        D.24289 = table->rows;
        D.24298 = D.24289 * 4;
        D.24299 = (long unsigned int) D.24298;
        D.24300 = D.24299 * 4;
        values = D.24276 + D.24300;
        D.24284 = values + 8;
        D.24273 = fb->table_idx;
        D.24301 = D.24273 << 2;
        D.24302 = (unsigned int) D.24301;
        *D.24284 = D.24302;
        D.24303 = values + 12;
        D.24304 = fb->def_value;
        D.24305 = encode_constant (assembly, D.24304, &field_type);
        *D.24303 = D.24305;
        field_type.72 = field_type;
        *values = field_type.72;
        D.24280 = values + 4;
        *D.24280 = 0;
      }
    finally
      {
        field_type = {CLOBBER};
      }
  }
  <D.24297>:
  D.24262 = fb->attrs;
  D.24307 = D.24262 & 256;
  if (D.24307 != 0) goto <D.24308>; else goto <D.24309>;
  <D.24308>:
  {
    guint32 rva_idx;

    table = &assembly->tables[29];
    D.24289 = table->rows;
    D.24290 = D.24289 + 1;
    table->rows = D.24290;
    D.24289 = table->rows;
    alloc_table (table, D.24289);
    D.24276 = table->values;
    D.24289 = table->rows;
    D.24291 = D.24289 * 2;
    D.24292 = (long unsigned int) D.24291;
    D.24293 = D.24292 * 4;
    values = D.24276 + D.24293;
    D.24280 = values + 4;
    D.24273 = fb->table_idx;
    D.24294 = (unsigned int) D.24273;
    *D.24280 = D.24294;
    D.24310 = fb->rva_data;
    if (D.24310 != 0B) goto <D.24311>; else goto <D.24312>;
    <D.24311>:
    D.24310 = fb->rva_data;
    D.24313 = mono_array_length (D.24310);
    if (D.24313 > 9) goto <D.24314>; else goto <D.24315>;
    <D.24314>:
    D.24316 = &assembly->code;
    stream_data_align (D.24316);
    <D.24315>:
    D.24316 = &assembly->code;
    D.24310 = fb->rva_data;
    D.24317 = mono_array_addr_with_size (D.24310, 1, 0);
    D.24310 = fb->rva_data;
    D.24318 = mono_array_length (D.24310);
    D.24319 = (unsigned int) D.24318;
    rva_idx = mono_image_add_stream_data (D.24316, D.24317, D.24319);
    goto <D.24320>;
    <D.24312>:
    D.24316 = &assembly->code;
    D.24272 = fb->handle;
    D.24321 = D.24272->parent;
    D.24322 = mono_class_value_size (D.24321, 0B);
    D.24323 = (unsigned int) D.24322;
    rva_idx = mono_image_add_stream_zero (D.24316, D.24323);
    <D.24320>:
    D.24324 = assembly->text_rva;
    D.24325 = D.24324 + rva_idx;
    *values = D.24325;
  }
  <D.24309>:
  D.24326 = fb->marshal_info;
  if (D.24326 != 0B) goto <D.24327>; else goto <D.24328>;
  <D.24327>:
  table = &assembly->tables[13];
  D.24289 = table->rows;
  D.24290 = D.24289 + 1;
  table->rows = D.24290;
  D.24289 = table->rows;
  alloc_table (table, D.24289);
  D.24276 = table->values;
  D.24289 = table->rows;
  D.24291 = D.24289 * 2;
  D.24292 = (long unsigned int) D.24291;
  D.24293 = D.24292 * 4;
  values = D.24276 + D.24293;
  D.24273 = fb->table_idx;
  D.24329 = D.24273 << 1;
  D.24330 = (unsigned int) D.24329;
  *values = D.24330;
  D.24280 = values + 4;
  D.24326 = fb->marshal_info;
  D.24331 = encode_marshal_blob (assembly, D.24326);
  *D.24280 = D.24331;
  <D.24328>:
}


field_encode_signature (struct MonoDynamicImage * assembly, struct MonoReflectionFieldBuilder * fb)
{
  struct MonoObject * D.24332;
  struct MonoArray * D.24333;
  struct MonoArray * D.24334;
  struct MonoGenericContainer * D.24335;
  struct MonoGenericInst * D.24340;
  guint32 D.24342;
  struct SigBuffer buf;
  guint32 idx;
  guint32 typespec;
  struct MonoType * type;
  struct MonoClass * class;

  try
    {
      typespec = 0;
      D.24332 = fb->type;
      init_type_builder_generics (D.24332);
      D.24332 = fb->type;
      type = mono_reflection_type_get_handle (D.24332);
      class = mono_class_from_mono_type (type);
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 6);
      D.24333 = fb->modreq;
      D.24334 = fb->modopt;
      encode_custom_modifiers (assembly, D.24333, D.24334, &buf);
      D.24335 = class->generic_container;
      if (D.24335 != 0B) goto <D.24336>; else goto <D.24337>;
      <D.24336>:
      typespec = create_typespec (assembly, type);
      <D.24337>:
      if (typespec != 0) goto <D.24338>; else goto <D.24339>;
      <D.24338>:
      {
        struct MonoGenericClass * gclass;

        D.24335 = class->generic_container;
        D.24340 = D.24335->context.class_inst;
        gclass = mono_metadata_lookup_generic_class (class, D.24340, 1);
        encode_generic_class (assembly, gclass, &buf);
      }
      goto <D.24341>;
      <D.24339>:
      encode_type (assembly, type, &buf);
      <D.24341>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.24342 = idx;
      return D.24342;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


init_type_builder_generics (struct MonoObject * type)
{
  struct MonoVTable * D.24345;
  struct MonoClass * D.24346;
  int D.24347;
  struct MonoGenericContainer * D.24352;
  struct MonoReflectionTypeBuilder * tb;

  D.24345 = type->vtable;
  D.24346 = D.24345->klass;
  D.24347 = is_sre_type_builder (D.24346);
  if (D.24347 == 0) goto <D.24348>; else goto <D.24349>;
  <D.24348>:
  return;
  <D.24349>:
  tb = type;
  if (tb != 0B) goto <D.24350>; else goto <D.24351>;
  <D.24350>:
  D.24352 = tb->generic_container;
  if (D.24352 != 0B) goto <D.24353>; else goto <D.24354>;
  <D.24353>:
  mono_reflection_create_generic_class (tb);
  <D.24354>:
  <D.24351>:
}


is_sre_type_builder (struct MonoClass * class)
{
  struct MonoClass * cached_class.73;
  gboolean D.24359;
  _Bool D.24360;
  int D.24361;
  const char * D.24364;
  int D.24365;
  const char * D.24368;
  int D.24369;

  {
    static struct MonoClass * cached_class;

    cached_class.73 = cached_class;
    if (cached_class.73 != 0B) goto <D.24357>; else goto <D.24358>;
    <D.24357>:
    cached_class.73 = cached_class;
    D.24360 = cached_class.73 == class;
    D.24359 = (gboolean) D.24360;
    return D.24359;
    <D.24358>:
    D.24361 = is_corlib_type (class);
    if (D.24361 != 0) goto <D.24362>; else goto <D.24363>;
    <D.24362>:
    D.24364 = class->name;
    D.24365 = strcmp ("TypeBuilder", D.24364);
    if (D.24365 == 0) goto <D.24366>; else goto <D.24367>;
    <D.24366>:
    D.24368 = class->name_space;
    D.24369 = strcmp ("System.Reflection.Emit", D.24368);
    if (D.24369 == 0) goto <D.24370>; else goto <D.24371>;
    <D.24370>:
    cached_class = class;
    D.24359 = 1;
    return D.24359;
    <D.24371>:
    <D.24367>:
    <D.24363>:
    D.24359 = 0;
    return D.24359;
  }
}


is_corlib_type (struct MonoClass * class)
{
  gboolean D.24373;
  struct MonoImage * D.24374;
  struct MonoImage * D.24375;
  _Bool D.24376;

  D.24374 = class->image;
  D.24375 = mono_defaults.corlib;
  D.24376 = D.24374 == D.24375;
  D.24373 = (gboolean) D.24376;
  return D.24373;
}


mono_image_add_stream_zero (struct MonoDynamicStream * stream, guint32 len)
{
  unsigned int D.24378;
  unsigned int D.24379;
  int D.24380;
  char * D.24381;
  sizetype D.24382;
  char * D.24383;
  long unsigned int D.24384;
  guint32 D.24385;
  guint32 idx;

  D.24378 = stream->index;
  D.24379 = D.24378 + len;
  D.24380 = (int) D.24379;
  make_room_in_stream (stream, D.24380);
  D.24381 = stream->data;
  D.24378 = stream->index;
  D.24382 = (sizetype) D.24378;
  D.24383 = D.24381 + D.24382;
  D.24384 = (long unsigned int) len;
  memset (D.24383, 0, D.24384);
  idx = stream->index;
  D.24378 = stream->index;
  D.24379 = D.24378 + len;
  stream->index = D.24379;
  D.24385 = idx;
  return D.24385;
}


mono_image_fill_module_table (struct MonoDomain * domain, struct MonoReflectionModuleBuilder * mb, struct MonoDynamicImage * assembly)
{
  unsigned int D.24387;
  unsigned int D.24388;
  unsigned int D.24389;
  guint32 * D.24390;
  unsigned int D.24391;
  unsigned int D.24392;
  unsigned int D.24393;
  long unsigned int D.24394;
  long unsigned int D.24395;
  guint32 * D.24396;
  struct MonoDynamicStream * D.24397;
  struct MonoString * D.24398;
  unsigned int D.24399;
  struct MonoDynamicStream * D.24400;
  struct MonoArray * D.24401;
  char * D.24402;
  unsigned int D.24403;
  long unsigned int D.24404;
  long unsigned int D.24405;
  guint32 * D.24406;
  unsigned int D.24407;
  long unsigned int D.24408;
  long unsigned int D.24409;
  guint32 * D.24410;
  unsigned int i.74;
  unsigned int D.24412;
  long unsigned int D.24413;
  long unsigned int D.24414;
  guint32 * D.24415;
  unsigned int D.24416;
  long unsigned int D.24417;
  long unsigned int D.24418;
  guint32 * D.24419;
  struct MonoDynamicTable * table;
  int i;

  table = &assembly->tables[0];
  D.24387 = table->next_idx;
  D.24388 = D.24387;
  D.24389 = D.24388 + 1;
  table->next_idx = D.24389;
  mb->table_idx = D.24388;
  D.24390 = table->values;
  D.24391 = mb->table_idx;
  D.24392 = D.24391 * 5;
  D.24393 = D.24392 + 1;
  D.24394 = (long unsigned int) D.24393;
  D.24395 = D.24394 * 4;
  D.24396 = D.24390 + D.24395;
  D.24397 = &assembly->sheap;
  D.24398 = mb->module.name;
  D.24399 = string_heap_insert_mstring (D.24397, D.24398);
  *D.24396 = D.24399;
  D.24400 = &assembly->guid;
  D.24401 = mb->guid;
  D.24402 = mono_array_addr_with_size (D.24401, 1, 0);
  D.24403 = mono_image_add_stream_data (D.24400, D.24402, 16);
  i = (int) D.24403;
  i = i / 16;
  i = i + 1;
  D.24390 = table->values;
  D.24391 = mb->table_idx;
  D.24392 = D.24391 * 5;
  D.24404 = (long unsigned int) D.24392;
  D.24405 = D.24404 * 4;
  D.24406 = D.24390 + D.24405;
  *D.24406 = 0;
  D.24390 = table->values;
  D.24391 = mb->table_idx;
  D.24392 = D.24391 * 5;
  D.24407 = D.24392 + 2;
  D.24408 = (long unsigned int) D.24407;
  D.24409 = D.24408 * 4;
  D.24410 = D.24390 + D.24409;
  i.74 = (unsigned int) i;
  *D.24410 = i.74;
  D.24390 = table->values;
  D.24391 = mb->table_idx;
  D.24392 = D.24391 * 5;
  D.24412 = D.24392 + 3;
  D.24413 = (long unsigned int) D.24412;
  D.24414 = D.24413 * 4;
  D.24415 = D.24390 + D.24414;
  *D.24415 = 0;
  D.24390 = table->values;
  D.24391 = mb->table_idx;
  D.24392 = D.24391 * 5;
  D.24416 = D.24392 + 4;
  D.24417 = (long unsigned int) D.24416;
  D.24418 = D.24417 * 4;
  D.24419 = D.24390 + D.24418;
  *D.24419 = 0;
}


collect_types (struct MonoPtrArray * types, struct MonoReflectionTypeBuilder * type)
{
  int D.24420;
  int D.24421;
  long unsigned int D.24424;
  long unsigned int D.24425;
  int D.24426;
  void * D.24427;
  void * * D.24428;
  long unsigned int D.24429;
  int D.24432;
  int D.24433;
  long unsigned int D.24434;
  long unsigned int D.24435;
  void * * D.24436;
  struct MonoArray * D.24437;
  long unsigned int D.24440;
  char * D.24441;
  long unsigned int D.24442;
  int i;

  D.24420 = types->size;
  D.24421 = types->capacity;
  if (D.24420 >= D.24421) goto <D.24422>; else goto <D.24423>;
  <D.24422>:
  {
    void * __tmp;

    D.24421 = types->capacity;
    D.24424 = (long unsigned int) D.24421;
    D.24425 = D.24424 * 16;
    D.24421 = types->capacity;
    D.24426 = D.24421 * 2;
    D.24427 = mono_gc_make_root_descr_all_refs (D.24426);
    __tmp = mono_gc_alloc_fixed (D.24425, D.24427);
    D.24428 = types->data;
    D.24421 = types->capacity;
    D.24424 = (long unsigned int) D.24421;
    D.24429 = D.24424 * 8;
    mono_gc_memmove_aligned (__tmp, D.24428, D.24429);
    D.24421 = types->capacity;
    if (D.24421 > 16) goto <D.24430>; else goto <D.24431>;
    <D.24430>:
    D.24428 = types->data;
    mono_gc_free_fixed (D.24428);
    <D.24431>:
    types->data = __tmp;
    D.24421 = types->capacity;
    D.24426 = D.24421 * 2;
    types->capacity = D.24426;
  }
  <D.24423>:
  D.24428 = types->data;
  D.24420 = types->size;
  D.24432 = D.24420;
  D.24433 = D.24432 + 1;
  types->size = D.24433;
  D.24434 = (long unsigned int) D.24432;
  D.24435 = D.24434 * 8;
  D.24436 = D.24428 + D.24435;
  *D.24436 = type;
  D.24437 = type->subtypes;
  if (D.24437 == 0B) goto <D.24438>; else goto <D.24439>;
  <D.24438>:
  return;
  <D.24439>:
  i = 0;
  goto <D.19885>;
  <D.19884>:
  {
    struct MonoReflectionTypeBuilder * subtype;

    D.24437 = type->subtypes;
    D.24440 = (long unsigned int) i;
    D.24441 = mono_array_addr_with_size (D.24437, 8, D.24440);
    subtype = MEM[(struct MonoReflectionTypeBuilder * *)D.24441];
    collect_types (types, subtype);
  }
  i = i + 1;
  <D.19885>:
  D.24440 = (long unsigned int) i;
  D.24437 = type->subtypes;
  D.24442 = mono_array_length (D.24437);
  if (D.24440 < D.24442) goto <D.19884>; else goto <D.19886>;
  <D.19886>:
}


alloc_table (struct MonoDynamicTable * table, guint nrows)
{
  unsigned char D.24444;
  _Bool D.24445;
  long int D.24446;
  long int D.24447;
  unsigned int D.24450;
  unsigned int D.24451;
  unsigned int D.24457;
  guint32 * D.24458;
  long unsigned int D.24459;
  long unsigned int D.24460;
  long unsigned int D.24461;
  long unsigned int D.24462;
  void * D.24463;

  table->rows = nrows;
  D.24444 = table->columns;
  D.24445 = D.24444 == 0;
  D.24446 = (long int) D.24445;
  D.24447 = __builtin_expect (D.24446, 0);
  if (D.24447 != 0) goto <D.24448>; else goto <D.24449>;
  <D.24448>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 327, "table->columns");
  <D.24449>:
  D.24450 = nrows + 1;
  D.24451 = table->alloc_rows;
  if (D.24450 >= D.24451) goto <D.24452>; else goto <D.24453>;
  <D.24452>:
  goto <D.18846>;
  <D.18845>:
  D.24451 = table->alloc_rows;
  if (D.24451 == 0) goto <D.24454>; else goto <D.24455>;
  <D.24454>:
  table->alloc_rows = 16;
  goto <D.24456>;
  <D.24455>:
  D.24451 = table->alloc_rows;
  D.24457 = D.24451 * 2;
  table->alloc_rows = D.24457;
  <D.24456>:
  <D.18846>:
  D.24450 = nrows + 1;
  D.24451 = table->alloc_rows;
  if (D.24450 >= D.24451) goto <D.18845>; else goto <D.18847>;
  <D.18847>:
  D.24458 = table->values;
  D.24451 = table->alloc_rows;
  D.24459 = (long unsigned int) D.24451;
  D.24444 = table->columns;
  D.24460 = (long unsigned int) D.24444;
  D.24461 = D.24459 * D.24460;
  D.24462 = D.24461 * 4;
  D.24463 = monoeg_realloc (D.24458, D.24462);
  table->values = D.24463;
  <D.24453>:
}


string_heap_insert_mstring (struct MonoDynamicStream * sh, struct MonoString * str)
{
  guint32 D.24464;
  char * name;
  guint32 idx;

  name = mono_string_to_utf8 (str);
  idx = string_heap_insert (sh, name);
  monoeg_g_free (name);
  D.24464 = idx;
  return D.24464;
}


mono_image_get_type_info (struct MonoDomain * domain, struct MonoReflectionTypeBuilder * tb, struct MonoDynamicImage * assembly)
{
  guint32 * D.24466;
  unsigned int D.24467;
  unsigned int D.24468;
  long unsigned int D.24469;
  long unsigned int D.24470;
  unsigned int D.24471;
  struct MonoString * D.24472;
  int D.24473;
  guint * D.24476;
  struct MonoDynamicStream * D.24477;
  unsigned int D.24478;
  struct MonoString * D.24479;
  int D.24480;
  guint * D.24483;
  unsigned int D.24484;
  struct MonoObject * D.24488;
  unsigned int D.24491;
  guint * D.24493;
  struct MonoType * D.24494;
  unsigned int D.24495;
  guint * D.24496;
  unsigned int D.24497;
  guint * D.24498;
  unsigned int D.24499;
  unsigned int D.24502;
  int D.24505;
  int D.24507;
  unsigned int D.24508;
  unsigned int D.24509;
  unsigned int D.24510;
  long unsigned int D.24511;
  long unsigned int D.24512;
  unsigned int D.24513;
  unsigned int D.24514;
  struct MonoArray * D.24515;
  long unsigned int D.24518;
  unsigned int D.24519;
  unsigned int D.24520;
  int D.24521;
  int D.24522;
  long unsigned int D.24523;
  long unsigned int D.24524;
  long unsigned int D.24525;
  char * D.24526;
  struct MonoType * D.24527;
  unsigned int D.24528;
  long unsigned int D.24529;
  struct MonoArray * D.24530;
  int D.24533;
  unsigned int D.24534;
  unsigned int D.24535;
  char * D.24536;
  struct MonoReflectionFieldBuilder * D.24537;
  struct MonoArray * D.24538;
  long unsigned int D.24541;
  unsigned int D.24542;
  unsigned int D.24543;
  char * D.24544;
  struct MonoReflectionCtorBuilder * D.24545;
  long unsigned int D.24546;
  struct MonoArray * D.24547;
  int D.24550;
  unsigned int D.24551;
  unsigned int D.24552;
  char * D.24553;
  struct MonoReflectionMethodBuilder * D.24554;
  struct MonoArray * D.24555;
  long unsigned int D.24558;
  long unsigned int D.24561;
  unsigned int D.24562;
  unsigned int D.24563;
  unsigned int D.24564;
  long unsigned int D.24565;
  long unsigned int D.24566;
  unsigned int D.24567;
  char * D.24568;
  struct MonoReflectionEventBuilder * D.24569;
  long unsigned int D.24570;
  struct MonoArray * D.24571;
  long unsigned int D.24574;
  long unsigned int D.24577;
  unsigned int D.24578;
  unsigned int D.24579;
  unsigned int D.24580;
  char * D.24581;
  struct MonoReflectionPropertyBuilder * D.24582;
  long unsigned int D.24583;
  struct MonoArray * D.24584;
  long unsigned int D.24587;
  unsigned int D.24588;
  unsigned int D.24589;
  char * D.24590;
  struct MonoReflectionGenericParam * D.24591;
  long unsigned int D.24592;
  unsigned int D.24593;
  struct MonoArray * D.24594;
  struct MonoArray * D.24595;
  long unsigned int D.24598;
  unsigned int D.24599;
  unsigned int D.24600;
  unsigned int D.24601;
  guint32 * D.24602;
  unsigned int D.24603;
  unsigned int D.24604;
  long unsigned int D.24605;
  long unsigned int D.24606;
  char * D.24607;
  unsigned int D.24608;
  unsigned int D.24609;
  long unsigned int D.24610;
  struct MonoDynamicTable * table;
  guint * values;
  int i;
  int is_object;
  int is_system;
  char * n;

  is_object = 0;
  is_system = 0;
  table = &assembly->tables[2];
  D.24466 = table->values;
  D.24467 = tb->table_idx;
  D.24468 = D.24467 * 6;
  D.24469 = (long unsigned int) D.24468;
  D.24470 = D.24469 * 4;
  values = D.24466 + D.24470;
  D.24471 = tb->attrs;
  *values = D.24471;
  D.24472 = tb->name;
  n = mono_string_to_utf8 (D.24472);
  D.24473 = strcmp (n, "Object");
  if (D.24473 == 0) goto <D.24474>; else goto <D.24475>;
  <D.24474>:
  is_object = is_object + 1;
  <D.24475>:
  D.24476 = values + 4;
  D.24477 = &assembly->sheap;
  D.24478 = string_heap_insert (D.24477, n);
  *D.24476 = D.24478;
  monoeg_g_free (n);
  D.24479 = tb->nspace;
  n = mono_string_to_utf8 (D.24479);
  D.24480 = strcmp (n, "System");
  if (D.24480 == 0) goto <D.24481>; else goto <D.24482>;
  <D.24481>:
  is_system = is_system + 1;
  <D.24482>:
  D.24483 = values + 8;
  D.24477 = &assembly->sheap;
  D.24484 = string_heap_insert (D.24477, n);
  *D.24483 = D.24484;
  monoeg_g_free (n);
  D.24488 = tb->parent;
  if (D.24488 != 0B) goto <D.24489>; else goto <D.24485>;
  <D.24489>:
  if (is_system == 0) goto <D.24486>; else goto <D.24490>;
  <D.24490>:
  if (is_object == 0) goto <D.24486>; else goto <D.24485>;
  <D.24486>:
  D.24471 = tb->attrs;
  D.24491 = D.24471 & 32;
  if (D.24491 == 0) goto <D.24492>; else goto <D.24485>;
  <D.24492>:
  D.24493 = values + 12;
  D.24488 = tb->parent;
  D.24494 = mono_reflection_type_get_handle (D.24488);
  D.24495 = mono_image_typedef_or_ref (assembly, D.24494);
  *D.24493 = D.24495;
  goto <D.24487>;
  <D.24485>:
  D.24493 = values + 12;
  *D.24493 = 0;
  <D.24487>:
  D.24496 = values + 16;
  D.24497 = assembly->tables[4].next_idx;
  *D.24496 = D.24497;
  D.24498 = values + 20;
  D.24499 = assembly->tables[6].next_idx;
  *D.24498 = D.24499;
  D.24471 = tb->attrs;
  D.24502 = D.24471 & 24;
  if (D.24502 != 0) goto <D.24503>; else goto <D.24504>;
  <D.24503>:
  D.24505 = tb->class_size;
  if (D.24505 > 0) goto <D.24500>; else goto <D.24506>;
  <D.24506>:
  D.24507 = tb->packing_size;
  if (D.24507 > 0) goto <D.24500>; else goto <D.24501>;
  <D.24500>:
  table = &assembly->tables[15];
  D.24508 = table->rows;
  D.24509 = D.24508 + 1;
  table->rows = D.24509;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  D.24466 = table->values;
  D.24508 = table->rows;
  D.24510 = D.24508 * 3;
  D.24511 = (long unsigned int) D.24510;
  D.24512 = D.24511 * 4;
  values = D.24466 + D.24512;
  D.24483 = values + 8;
  D.24467 = tb->table_idx;
  *D.24483 = D.24467;
  D.24476 = values + 4;
  D.24505 = tb->class_size;
  D.24513 = (unsigned int) D.24505;
  *D.24476 = D.24513;
  D.24507 = tb->packing_size;
  D.24514 = (unsigned int) D.24507;
  *values = D.24514;
  <D.24501>:
  <D.24504>:
  D.24515 = tb->interfaces;
  if (D.24515 != 0B) goto <D.24516>; else goto <D.24517>;
  <D.24516>:
  table = &assembly->tables[9];
  D.24508 = table->rows;
  i = (int) D.24508;
  D.24515 = tb->interfaces;
  D.24518 = mono_array_length (D.24515);
  D.24508 = table->rows;
  D.24519 = (unsigned int) D.24518;
  D.24520 = D.24508 + D.24519;
  table->rows = D.24520;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  D.24466 = table->values;
  D.24521 = i + 1;
  D.24522 = D.24521 * 2;
  D.24523 = (long unsigned int) D.24522;
  D.24524 = D.24523 * 4;
  values = D.24466 + D.24524;
  i = 0;
  goto <D.19851>;
  <D.19850>:
  {
    struct MonoReflectionType * iface;

    D.24515 = tb->interfaces;
    D.24525 = (long unsigned int) i;
    D.24526 = mono_array_addr_with_size (D.24515, 8, D.24525);
    iface = MEM[(void * *)D.24526];
    D.24467 = tb->table_idx;
    *values = D.24467;
    D.24476 = values + 4;
    D.24527 = mono_reflection_type_get_handle (iface);
    D.24528 = mono_image_typedef_or_ref (assembly, D.24527);
    *D.24476 = D.24528;
    values = values + 8;
  }
  i = i + 1;
  <D.19851>:
  D.24525 = (long unsigned int) i;
  D.24515 = tb->interfaces;
  D.24529 = mono_array_length (D.24515);
  if (D.24525 < D.24529) goto <D.19850>; else goto <D.19852>;
  <D.19852>:
  <D.24517>:
  D.24530 = tb->fields;
  if (D.24530 != 0B) goto <D.24531>; else goto <D.24532>;
  <D.24531>:
  table = &assembly->tables[4];
  D.24508 = table->rows;
  D.24533 = tb->num_fields;
  D.24534 = (unsigned int) D.24533;
  D.24535 = D.24508 + D.24534;
  table->rows = D.24535;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  i = 0;
  goto <D.19854>;
  <D.19853>:
  D.24530 = tb->fields;
  D.24525 = (long unsigned int) i;
  D.24536 = mono_array_addr_with_size (D.24530, 8, D.24525);
  D.24537 = MEM[(struct MonoReflectionFieldBuilder * *)D.24536];
  mono_image_get_field_info (D.24537, assembly);
  i = i + 1;
  <D.19854>:
  D.24533 = tb->num_fields;
  if (D.24533 > i) goto <D.19853>; else goto <D.19855>;
  <D.19855>:
  <D.24532>:
  D.24538 = tb->ctors;
  if (D.24538 != 0B) goto <D.24539>; else goto <D.24540>;
  <D.24539>:
  table = &assembly->tables[6];
  D.24538 = tb->ctors;
  D.24541 = mono_array_length (D.24538);
  D.24508 = table->rows;
  D.24542 = (unsigned int) D.24541;
  D.24543 = D.24508 + D.24542;
  table->rows = D.24543;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  i = 0;
  goto <D.19857>;
  <D.19856>:
  D.24538 = tb->ctors;
  D.24525 = (long unsigned int) i;
  D.24544 = mono_array_addr_with_size (D.24538, 8, D.24525);
  D.24545 = MEM[(struct MonoReflectionCtorBuilder * *)D.24544];
  mono_image_get_ctor_info (domain, D.24545, assembly);
  i = i + 1;
  <D.19857>:
  D.24525 = (long unsigned int) i;
  D.24538 = tb->ctors;
  D.24546 = mono_array_length (D.24538);
  if (D.24525 < D.24546) goto <D.19856>; else goto <D.19858>;
  <D.19858>:
  <D.24540>:
  D.24547 = tb->methods;
  if (D.24547 != 0B) goto <D.24548>; else goto <D.24549>;
  <D.24548>:
  table = &assembly->tables[6];
  D.24508 = table->rows;
  D.24550 = tb->num_methods;
  D.24551 = (unsigned int) D.24550;
  D.24552 = D.24508 + D.24551;
  table->rows = D.24552;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  i = 0;
  goto <D.19860>;
  <D.19859>:
  D.24547 = tb->methods;
  D.24525 = (long unsigned int) i;
  D.24553 = mono_array_addr_with_size (D.24547, 8, D.24525);
  D.24554 = MEM[(struct MonoReflectionMethodBuilder * *)D.24553];
  mono_image_get_method_info (D.24554, assembly);
  i = i + 1;
  <D.19860>:
  D.24550 = tb->num_methods;
  if (D.24550 > i) goto <D.19859>; else goto <D.19861>;
  <D.19861>:
  <D.24549>:
  D.24555 = tb->events;
  if (D.24555 != 0B) goto <D.24556>; else goto <D.24557>;
  <D.24556>:
  D.24555 = tb->events;
  D.24558 = mono_array_length (D.24555);
  if (D.24558 != 0) goto <D.24559>; else goto <D.24560>;
  <D.24559>:
  table = &assembly->tables[20];
  D.24555 = tb->events;
  D.24561 = mono_array_length (D.24555);
  D.24508 = table->rows;
  D.24562 = (unsigned int) D.24561;
  D.24563 = D.24508 + D.24562;
  table->rows = D.24563;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  table = &assembly->tables[18];
  D.24508 = table->rows;
  D.24509 = D.24508 + 1;
  table->rows = D.24509;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  D.24466 = table->values;
  D.24508 = table->rows;
  D.24564 = D.24508 * 2;
  D.24565 = (long unsigned int) D.24564;
  D.24566 = D.24565 * 4;
  values = D.24466 + D.24566;
  D.24467 = tb->table_idx;
  *values = D.24467;
  D.24476 = values + 4;
  D.24567 = assembly->tables[20].next_idx;
  *D.24476 = D.24567;
  i = 0;
  goto <D.19863>;
  <D.19862>:
  D.24555 = tb->events;
  D.24525 = (long unsigned int) i;
  D.24568 = mono_array_addr_with_size (D.24555, 8, D.24525);
  D.24569 = MEM[(struct MonoReflectionEventBuilder * *)D.24568];
  mono_image_get_event_info (D.24569, assembly);
  i = i + 1;
  <D.19863>:
  D.24525 = (long unsigned int) i;
  D.24555 = tb->events;
  D.24570 = mono_array_length (D.24555);
  if (D.24525 < D.24570) goto <D.19862>; else goto <D.19864>;
  <D.19864>:
  <D.24560>:
  <D.24557>:
  D.24571 = tb->properties;
  if (D.24571 != 0B) goto <D.24572>; else goto <D.24573>;
  <D.24572>:
  D.24571 = tb->properties;
  D.24574 = mono_array_length (D.24571);
  if (D.24574 != 0) goto <D.24575>; else goto <D.24576>;
  <D.24575>:
  table = &assembly->tables[23];
  D.24571 = tb->properties;
  D.24577 = mono_array_length (D.24571);
  D.24508 = table->rows;
  D.24578 = (unsigned int) D.24577;
  D.24579 = D.24508 + D.24578;
  table->rows = D.24579;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  table = &assembly->tables[21];
  D.24508 = table->rows;
  D.24509 = D.24508 + 1;
  table->rows = D.24509;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  D.24466 = table->values;
  D.24508 = table->rows;
  D.24564 = D.24508 * 2;
  D.24565 = (long unsigned int) D.24564;
  D.24566 = D.24565 * 4;
  values = D.24466 + D.24566;
  D.24467 = tb->table_idx;
  *values = D.24467;
  D.24476 = values + 4;
  D.24580 = assembly->tables[23].next_idx;
  *D.24476 = D.24580;
  i = 0;
  goto <D.19866>;
  <D.19865>:
  D.24571 = tb->properties;
  D.24525 = (long unsigned int) i;
  D.24581 = mono_array_addr_with_size (D.24571, 8, D.24525);
  D.24582 = MEM[(struct MonoReflectionPropertyBuilder * *)D.24581];
  mono_image_get_property_info (D.24582, assembly);
  i = i + 1;
  <D.19866>:
  D.24525 = (long unsigned int) i;
  D.24571 = tb->properties;
  D.24583 = mono_array_length (D.24571);
  if (D.24525 < D.24583) goto <D.19865>; else goto <D.19867>;
  <D.19867>:
  <D.24576>:
  <D.24573>:
  D.24584 = tb->generic_params;
  if (D.24584 != 0B) goto <D.24585>; else goto <D.24586>;
  <D.24585>:
  table = &assembly->tables[42];
  D.24584 = tb->generic_params;
  D.24587 = mono_array_length (D.24584);
  D.24508 = table->rows;
  D.24588 = (unsigned int) D.24587;
  D.24589 = D.24508 + D.24588;
  table->rows = D.24589;
  D.24508 = table->rows;
  alloc_table (table, D.24508);
  i = 0;
  goto <D.19870>;
  <D.19869>:
  {
    guint32 owner;

    D.24467 = tb->table_idx;
    owner = D.24467 << 1;
    D.24584 = tb->generic_params;
    D.24525 = (long unsigned int) i;
    D.24590 = mono_array_addr_with_size (D.24584, 8, D.24525);
    D.24591 = MEM[(struct MonoReflectionGenericParam * *)D.24590];
    mono_image_get_generic_param_info (D.24591, owner, assembly);
  }
  i = i + 1;
  <D.19870>:
  D.24525 = (long unsigned int) i;
  D.24584 = tb->generic_params;
  D.24592 = mono_array_length (D.24584);
  if (D.24525 < D.24592) goto <D.19869>; else goto <D.19871>;
  <D.19871>:
  <D.24586>:
  D.24467 = tb->table_idx;
  D.24593 = D.24467 | 33554432;
  D.24594 = tb->permissions;
  mono_image_add_decl_security (assembly, D.24593, D.24594);
  D.24595 = tb->subtypes;
  if (D.24595 != 0B) goto <D.24596>; else goto <D.24597>;
  <D.24596>:
  {
    struct MonoDynamicTable * ntable;

    ntable = &assembly->tables[41];
    D.24595 = tb->subtypes;
    D.24598 = mono_array_length (D.24595);
    D.24599 = ntable->rows;
    D.24600 = (unsigned int) D.24598;
    D.24601 = D.24599 + D.24600;
    ntable->rows = D.24601;
    D.24599 = ntable->rows;
    alloc_table (ntable, D.24599);
    D.24602 = ntable->values;
    D.24603 = ntable->next_idx;
    D.24604 = D.24603 * 2;
    D.24605 = (long unsigned int) D.24604;
    D.24606 = D.24605 * 4;
    values = D.24602 + D.24606;
    i = 0;
    goto <D.19875>;
    <D.19874>:
    {
      struct MonoReflectionTypeBuilder * subtype;

      D.24595 = tb->subtypes;
      D.24525 = (long unsigned int) i;
      D.24607 = mono_array_addr_with_size (D.24595, 8, D.24525);
      subtype = MEM[(struct MonoReflectionTypeBuilder * *)D.24607];
      D.24608 = subtype->table_idx;
      *values = D.24608;
      D.24476 = values + 4;
      D.24467 = tb->table_idx;
      *D.24476 = D.24467;
      values = values + 8;
      D.24603 = ntable->next_idx;
      D.24609 = D.24603 + 1;
      ntable->next_idx = D.24609;
    }
    i = i + 1;
    <D.19875>:
    D.24525 = (long unsigned int) i;
    D.24595 = tb->subtypes;
    D.24610 = mono_array_length (D.24595);
    if (D.24525 < D.24610) goto <D.19874>; else goto <D.19876>;
    <D.19876>:
  }
  <D.24597>:
}


mono_image_get_ctor_info (struct MonoDomain * domain, struct MonoReflectionCtorBuilder * mb, struct MonoDynamicImage * assembly)
{
  guint32 * D.24611;
  unsigned int D.24612;
  struct ReflectionMethodBuilder rmb;

  try
    {
      reflection_methodbuilder_from_ctor_builder (&rmb, mb);
      mono_image_basic_method (&rmb, assembly);
      D.24611 = rmb.table_idx;
      D.24612 = *D.24611;
      mb->table_idx = D.24612;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


reflection_methodbuilder_from_ctor_builder (struct ReflectionMethodBuilder * rmb, struct MonoReflectionCtorBuilder * mb)
{
  const char * iftmp.75;
  unsigned int D.24614;
  unsigned int D.24615;
  struct MonoReflectionILGen * D.24619;
  struct MonoDomain * D.24620;
  struct MonoClass * D.24621;
  struct MonoType * D.24622;
  struct MonoReflectionType * D.24623;
  struct MonoArray * D.24624;
  struct MonoArray * D.24625;
  unsigned int D.24626;
  unsigned int D.24627;
  struct MonoObject * D.24628;
  struct MonoDomain * D.24629;
  struct MonoString * D.24630;
  guint32 * D.24631;
  unsigned char D.24632;
  struct MonoArray * D.24633;
  struct MonoArray * D.24634;
  struct MonoArray * D.24635;
  struct MonoMethod * D.24636;
  const char * name;

  D.24614 = mb->attrs;
  D.24615 = D.24614 & 16;
  if (D.24615 != 0) goto <D.24616>; else goto <D.24617>;
  <D.24616>:
  iftmp.75 = ".cctor";
  goto <D.24618>;
  <D.24617>:
  iftmp.75 = ".ctor";
  <D.24618>:
  name = iftmp.75;
  memset (rmb, 0, 208);
  D.24619 = mb->ilgen;
  rmb->ilgen = D.24619;
  D.24620 = mono_domain_get ();
  D.24621 = mono_defaults.void_class;
  D.24622 = &D.24621->byval_arg;
  D.24623 = mono_type_get_object (D.24620, D.24622);
  rmb->rtype = D.24623;
  D.24624 = mb->parameters;
  rmb->parameters = D.24624;
  rmb->generic_params = 0B;
  rmb->generic_container = 0B;
  rmb->opt_types = 0B;
  D.24625 = mb->pinfo;
  rmb->pinfo = D.24625;
  D.24614 = mb->attrs;
  rmb->attrs = D.24614;
  D.24626 = mb->iattrs;
  rmb->iattrs = D.24626;
  D.24627 = mb->call_conv;
  rmb->call_conv = D.24627;
  rmb->code = 0B;
  D.24628 = mb->type;
  rmb->type = D.24628;
  D.24629 = mono_domain_get ();
  D.24630 = mono_string_new (D.24629, name);
  rmb->name = D.24630;
  D.24631 = &mb->table_idx;
  rmb->table_idx = D.24631;
  D.24632 = mb->init_locals;
  rmb->init_locals = D.24632;
  rmb->skip_visibility = 0;
  rmb->return_modreq = 0B;
  rmb->return_modopt = 0B;
  D.24633 = mb->param_modreq;
  rmb->param_modreq = D.24633;
  D.24634 = mb->param_modopt;
  rmb->param_modopt = D.24634;
  D.24635 = mb->permissions;
  rmb->permissions = D.24635;
  D.24636 = mb->mhandle;
  rmb->mhandle = D.24636;
  rmb->nrefs = 0;
  rmb->refs = 0B;
}


mono_image_get_event_info (struct MonoReflectionEventBuilder * eb, struct MonoDynamicImage * assembly)
{
  unsigned int D.24637;
  unsigned int D.24638;
  unsigned int D.24639;
  guint32 * D.24640;
  unsigned int D.24641;
  unsigned int D.24642;
  long unsigned int D.24643;
  long unsigned int D.24644;
  guint32 * D.24645;
  struct MonoDynamicStream * D.24646;
  struct MonoString * D.24647;
  unsigned int D.24648;
  unsigned int D.24649;
  guint32 * D.24650;
  struct MonoReflectionType * D.24651;
  struct MonoType * D.24652;
  unsigned int D.24653;
  struct MonoReflectionMethodBuilder * D.24654;
  struct MonoReflectionMethodBuilder * D.24657;
  struct MonoReflectionMethodBuilder * D.24660;
  unsigned int D.24663;
  unsigned int D.24664;
  unsigned int semaidx.76;
  unsigned int D.24668;
  unsigned int D.24669;
  long unsigned int D.24670;
  long unsigned int D.24671;
  unsigned int D.24672;
  unsigned int D.24673;
  unsigned int semaidx.77;
  unsigned int D.24677;
  unsigned int D.24678;
  unsigned int semaidx.78;
  unsigned int D.24682;
  unsigned int D.24683;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint num_methods;
  guint32 semaidx;

  num_methods = 0;
  table = &assembly->tables[20];
  D.24637 = table->next_idx;
  D.24638 = D.24637;
  D.24639 = D.24638 + 1;
  table->next_idx = D.24639;
  eb->table_idx = D.24638;
  D.24640 = table->values;
  D.24641 = eb->table_idx;
  D.24642 = D.24641 * 3;
  D.24643 = (long unsigned int) D.24642;
  D.24644 = D.24643 * 4;
  values = D.24640 + D.24644;
  D.24645 = values + 4;
  D.24646 = &assembly->sheap;
  D.24647 = eb->name;
  D.24648 = string_heap_insert_mstring (D.24646, D.24647);
  *D.24645 = D.24648;
  D.24649 = eb->attrs;
  *values = D.24649;
  D.24650 = values + 8;
  D.24651 = eb->type;
  D.24652 = mono_reflection_type_get_handle (D.24651);
  D.24653 = mono_image_typedef_or_ref (assembly, D.24652);
  *D.24650 = D.24653;
  D.24654 = eb->add_method;
  if (D.24654 != 0B) goto <D.24655>; else goto <D.24656>;
  <D.24655>:
  num_methods = num_methods + 1;
  <D.24656>:
  D.24657 = eb->remove_method;
  if (D.24657 != 0B) goto <D.24658>; else goto <D.24659>;
  <D.24658>:
  num_methods = num_methods + 1;
  <D.24659>:
  D.24660 = eb->raise_method;
  if (D.24660 != 0B) goto <D.24661>; else goto <D.24662>;
  <D.24661>:
  num_methods = num_methods + 1;
  <D.24662>:
  table = &assembly->tables[24];
  D.24663 = table->rows;
  D.24664 = D.24663 + num_methods;
  table->rows = D.24664;
  D.24663 = table->rows;
  alloc_table (table, D.24663);
  D.24654 = eb->add_method;
  if (D.24654 != 0B) goto <D.24665>; else goto <D.24666>;
  <D.24665>:
  D.24637 = table->next_idx;
  semaidx.76 = D.24637;
  D.24668 = semaidx.76 + 1;
  table->next_idx = D.24668;
  semaidx = semaidx.76;
  D.24640 = table->values;
  D.24669 = semaidx * 3;
  D.24670 = (long unsigned int) D.24669;
  D.24671 = D.24670 * 4;
  values = D.24640 + D.24671;
  *values = 8;
  D.24645 = values + 4;
  D.24654 = eb->add_method;
  D.24672 = D.24654->table_idx;
  *D.24645 = D.24672;
  D.24650 = values + 8;
  D.24641 = eb->table_idx;
  D.24673 = D.24641 << 1;
  *D.24650 = D.24673;
  <D.24666>:
  D.24657 = eb->remove_method;
  if (D.24657 != 0B) goto <D.24674>; else goto <D.24675>;
  <D.24674>:
  D.24637 = table->next_idx;
  semaidx.77 = D.24637;
  D.24677 = semaidx.77 + 1;
  table->next_idx = D.24677;
  semaidx = semaidx.77;
  D.24640 = table->values;
  D.24669 = semaidx * 3;
  D.24670 = (long unsigned int) D.24669;
  D.24671 = D.24670 * 4;
  values = D.24640 + D.24671;
  *values = 16;
  D.24645 = values + 4;
  D.24657 = eb->remove_method;
  D.24678 = D.24657->table_idx;
  *D.24645 = D.24678;
  D.24650 = values + 8;
  D.24641 = eb->table_idx;
  D.24673 = D.24641 << 1;
  *D.24650 = D.24673;
  <D.24675>:
  D.24660 = eb->raise_method;
  if (D.24660 != 0B) goto <D.24679>; else goto <D.24680>;
  <D.24679>:
  D.24637 = table->next_idx;
  semaidx.78 = D.24637;
  D.24682 = semaidx.78 + 1;
  table->next_idx = D.24682;
  semaidx = semaidx.78;
  D.24640 = table->values;
  D.24669 = semaidx * 3;
  D.24670 = (long unsigned int) D.24669;
  D.24671 = D.24670 * 4;
  values = D.24640 + D.24671;
  *values = 32;
  D.24645 = values + 4;
  D.24660 = eb->raise_method;
  D.24683 = D.24660->table_idx;
  *D.24645 = D.24683;
  D.24650 = values + 8;
  D.24641 = eb->table_idx;
  D.24673 = D.24641 << 1;
  *D.24650 = D.24673;
  <D.24680>:
}


mono_image_get_property_info (struct MonoReflectionPropertyBuilder * pb, struct MonoDynamicImage * assembly)
{
  unsigned int D.24684;
  unsigned int D.24685;
  unsigned int D.24686;
  int D.24687;
  guint32 * D.24688;
  int D.24689;
  int D.24690;
  long unsigned int D.24691;
  long unsigned int D.24692;
  guint32 * D.24693;
  struct MonoDynamicStream * D.24694;
  struct MonoString * D.24695;
  unsigned int D.24696;
  unsigned int D.24697;
  guint32 * D.24698;
  unsigned int D.24699;
  struct MonoReflectionMethodBuilder * D.24700;
  struct MonoReflectionMethodBuilder * D.24703;
  unsigned int D.24706;
  unsigned int D.24707;
  unsigned int semaidx.79;
  unsigned int D.24711;
  unsigned int D.24712;
  long unsigned int D.24713;
  long unsigned int D.24714;
  unsigned int D.24715;
  int D.24716;
  int D.24717;
  unsigned int D.24718;
  unsigned int semaidx.80;
  unsigned int D.24722;
  unsigned int D.24723;
  unsigned int D.24724;
  unsigned int D.24727;
  unsigned int D.24728;
  long unsigned int D.24729;
  long unsigned int D.24730;
  int D.24731;
  int D.24732;
  unsigned int D.24733;
  guint32 * D.24734;
  struct MonoObject * D.24735;
  unsigned int D.24736;
  unsigned int field_type.81;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint num_methods;
  guint32 semaidx;

  num_methods = 0;
  table = &assembly->tables[23];
  D.24684 = table->next_idx;
  D.24685 = D.24684;
  D.24686 = D.24685 + 1;
  table->next_idx = D.24686;
  D.24687 = (int) D.24685;
  pb->table_idx = D.24687;
  D.24688 = table->values;
  D.24689 = pb->table_idx;
  D.24690 = D.24689 * 3;
  D.24691 = (long unsigned int) D.24690;
  D.24692 = D.24691 * 4;
  values = D.24688 + D.24692;
  D.24693 = values + 4;
  D.24694 = &assembly->sheap;
  D.24695 = pb->name;
  D.24696 = string_heap_insert_mstring (D.24694, D.24695);
  *D.24693 = D.24696;
  D.24697 = pb->attrs;
  *values = D.24697;
  D.24698 = values + 8;
  D.24699 = property_encode_signature (assembly, pb);
  *D.24698 = D.24699;
  D.24700 = pb->get_method;
  if (D.24700 != 0B) goto <D.24701>; else goto <D.24702>;
  <D.24701>:
  num_methods = num_methods + 1;
  <D.24702>:
  D.24703 = pb->set_method;
  if (D.24703 != 0B) goto <D.24704>; else goto <D.24705>;
  <D.24704>:
  num_methods = num_methods + 1;
  <D.24705>:
  table = &assembly->tables[24];
  D.24706 = table->rows;
  D.24707 = D.24706 + num_methods;
  table->rows = D.24707;
  D.24706 = table->rows;
  alloc_table (table, D.24706);
  D.24700 = pb->get_method;
  if (D.24700 != 0B) goto <D.24708>; else goto <D.24709>;
  <D.24708>:
  D.24684 = table->next_idx;
  semaidx.79 = D.24684;
  D.24711 = semaidx.79 + 1;
  table->next_idx = D.24711;
  semaidx = semaidx.79;
  D.24688 = table->values;
  D.24712 = semaidx * 3;
  D.24713 = (long unsigned int) D.24712;
  D.24714 = D.24713 * 4;
  values = D.24688 + D.24714;
  *values = 2;
  D.24693 = values + 4;
  D.24700 = pb->get_method;
  D.24715 = D.24700->table_idx;
  *D.24693 = D.24715;
  D.24698 = values + 8;
  D.24689 = pb->table_idx;
  D.24716 = D.24689 << 1;
  D.24717 = D.24716 | 1;
  D.24718 = (unsigned int) D.24717;
  *D.24698 = D.24718;
  <D.24709>:
  D.24703 = pb->set_method;
  if (D.24703 != 0B) goto <D.24719>; else goto <D.24720>;
  <D.24719>:
  D.24684 = table->next_idx;
  semaidx.80 = D.24684;
  D.24722 = semaidx.80 + 1;
  table->next_idx = D.24722;
  semaidx = semaidx.80;
  D.24688 = table->values;
  D.24712 = semaidx * 3;
  D.24713 = (long unsigned int) D.24712;
  D.24714 = D.24713 * 4;
  values = D.24688 + D.24714;
  *values = 1;
  D.24693 = values + 4;
  D.24703 = pb->set_method;
  D.24723 = D.24703->table_idx;
  *D.24693 = D.24723;
  D.24698 = values + 8;
  D.24689 = pb->table_idx;
  D.24716 = D.24689 << 1;
  D.24717 = D.24716 | 1;
  D.24718 = (unsigned int) D.24717;
  *D.24698 = D.24718;
  <D.24720>:
  D.24697 = pb->attrs;
  D.24724 = D.24697 & 4096;
  if (D.24724 != 0) goto <D.24725>; else goto <D.24726>;
  <D.24725>:
  {
    guint32 field_type;

    try
      {
        field_type = 0;
        table = &assembly->tables[11];
        D.24706 = table->rows;
        D.24727 = D.24706 + 1;
        table->rows = D.24727;
        D.24706 = table->rows;
        alloc_table (table, D.24706);
        D.24688 = table->values;
        D.24706 = table->rows;
        D.24728 = D.24706 * 4;
        D.24729 = (long unsigned int) D.24728;
        D.24730 = D.24729 * 4;
        values = D.24688 + D.24730;
        D.24698 = values + 8;
        D.24689 = pb->table_idx;
        D.24731 = D.24689 << 2;
        D.24732 = D.24731 | 2;
        D.24733 = (unsigned int) D.24732;
        *D.24698 = D.24733;
        D.24734 = values + 12;
        D.24735 = pb->def_value;
        D.24736 = encode_constant (assembly, D.24735, &field_type);
        *D.24734 = D.24736;
        field_type.81 = field_type;
        *values = field_type.81;
        D.24693 = values + 4;
        *D.24693 = 0;
      }
    finally
      {
        field_type = {CLOBBER};
      }
  }
  <D.24726>:
}


property_encode_signature (struct MonoDynamicImage * assembly, struct MonoReflectionPropertyBuilder * fb)
{
  struct MonoArray * D.24740;
  long unsigned int D.24743;
  struct MonoArray * D.24748;
  long unsigned int D.24751;
  unsigned int D.24752;
  unsigned int D.24753;
  unsigned int D.24754;
  struct MonoObject * D.24760;
  long unsigned int D.24761;
  char * D.24762;
  long unsigned int D.24768;
  char * D.24769;
  struct MonoReflectionType * D.24770;
  char * D.24771;
  struct MonoObject * D.24772;
  guint32 D.24773;
  struct SigBuffer buf;
  guint32 nparams;
  struct MonoReflectionMethodBuilder * mb;
  struct MonoReflectionMethodBuilder * smb;
  guint32 idx;
  guint32 i;

  try
    {
      nparams = 0;
      mb = fb->get_method;
      smb = fb->set_method;
      if (mb != 0B) goto <D.24738>; else goto <D.24739>;
      <D.24738>:
      D.24740 = mb->parameters;
      if (D.24740 != 0B) goto <D.24741>; else goto <D.24742>;
      <D.24741>:
      D.24740 = mb->parameters;
      D.24743 = mono_array_length (D.24740);
      nparams = (guint32) D.24743;
      <D.24742>:
      <D.24739>:
      if (mb == 0B) goto <D.24744>; else goto <D.24745>;
      <D.24744>:
      if (smb != 0B) goto <D.24746>; else goto <D.24747>;
      <D.24746>:
      D.24748 = smb->parameters;
      if (D.24748 != 0B) goto <D.24749>; else goto <D.24750>;
      <D.24749>:
      D.24748 = smb->parameters;
      D.24751 = mono_array_length (D.24748);
      D.24752 = (unsigned int) D.24751;
      nparams = D.24752 + 4294967295;
      <D.24750>:
      <D.24747>:
      <D.24745>:
      sigbuffer_init (&buf, 32);
      D.24753 = fb->call_conv;
      D.24754 = D.24753 & 32;
      if (D.24754 != 0) goto <D.24755>; else goto <D.24756>;
      <D.24755>:
      sigbuffer_add_byte (&buf, 40);
      goto <D.24757>;
      <D.24756>:
      sigbuffer_add_byte (&buf, 8);
      <D.24757>:
      sigbuffer_add_value (&buf, nparams);
      if (mb != 0B) goto <D.24758>; else goto <D.24759>;
      <D.24758>:
      D.24760 = mb->rtype;
      encode_reflection_type (assembly, D.24760, &buf);
      i = 0;
      goto <D.19424>;
      <D.19423>:
      {
        struct MonoReflectionType * pt;

        D.24740 = mb->parameters;
        D.24761 = (long unsigned int) i;
        D.24762 = mono_array_addr_with_size (D.24740, 8, D.24761);
        pt = MEM[(struct MonoReflectionType * *)D.24762];
        encode_reflection_type (assembly, pt, &buf);
      }
      i = i + 1;
      <D.19424>:
      if (i < nparams) goto <D.19423>; else goto <D.19425>;
      <D.19425>:
      goto <D.24763>;
      <D.24759>:
      if (smb != 0B) goto <D.24766>; else goto <D.24764>;
      <D.24766>:
      D.24748 = smb->parameters;
      if (D.24748 != 0B) goto <D.24767>; else goto <D.24764>;
      <D.24767>:
      D.24748 = smb->parameters;
      D.24768 = (long unsigned int) nparams;
      D.24769 = mono_array_addr_with_size (D.24748, 8, D.24768);
      D.24770 = MEM[(struct MonoReflectionType * *)D.24769];
      encode_reflection_type (assembly, D.24770, &buf);
      i = 0;
      goto <D.19428>;
      <D.19427>:
      {
        struct MonoReflectionType * pt;

        D.24748 = smb->parameters;
        D.24761 = (long unsigned int) i;
        D.24771 = mono_array_addr_with_size (D.24748, 8, D.24761);
        pt = MEM[(struct MonoReflectionType * *)D.24771];
        encode_reflection_type (assembly, pt, &buf);
      }
      i = i + 1;
      <D.19428>:
      if (i < nparams) goto <D.19427>; else goto <D.19429>;
      <D.19429>:
      goto <D.24765>;
      <D.24764>:
      D.24772 = fb->type;
      encode_reflection_type (assembly, D.24772, &buf);
      <D.24765>:
      <D.24763>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.24773 = idx;
      return D.24773;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_add_cattrs (struct MonoDynamicImage * assembly, guint32 idx, guint32 type, struct MonoArray * cattrs)
{
  long unsigned int D.24778;
  unsigned int D.24779;
  unsigned int D.24780;
  guint32 * D.24781;
  unsigned int D.24782;
  unsigned int D.24783;
  long unsigned int D.24784;
  long unsigned int D.24785;
  long unsigned int D.24786;
  char * D.24787;
  struct MonoReflectionMethod * D.24788;
  unsigned int D.24789;
  struct MonoGHashTable * D.24790;
  long unsigned int D.24791;
  void * D.24792;
  guint32 * D.24793;
  struct MonoArray * D.24794;
  long unsigned int D.24795;
  unsigned int D.24796;
  char * p.82;
  guint32 * D.24798;
  long int p.83;
  long int blob_size.84;
  long int D.24801;
  int D.24802;
  char * D.24803;
  long unsigned int D.24804;
  int D.24805;
  unsigned int D.24806;
  unsigned int D.24807;
  struct MonoDynamicTable * table;
  struct MonoReflectionCustomAttr * cattr;
  guint32 * values;
  guint32 count;
  guint32 i;
  guint32 token;
  char blob_size[6];
  char * p;

  try
    {
      p = &blob_size;
      if (cattrs == 0B) goto <D.24776>; else goto <D.24777>;
      <D.24776>:
      return;
      <D.24777>:
      D.24778 = mono_array_length (cattrs);
      count = (guint32) D.24778;
      table = &assembly->tables[12];
      D.24779 = table->rows;
      D.24780 = D.24779 + count;
      table->rows = D.24780;
      D.24779 = table->rows;
      alloc_table (table, D.24779);
      D.24781 = table->values;
      D.24782 = table->next_idx;
      D.24783 = D.24782 * 3;
      D.24784 = (long unsigned int) D.24783;
      D.24785 = D.24784 * 4;
      values = D.24781 + D.24785;
      idx = idx << 5;
      idx = idx | type;
      i = 0;
      goto <D.19229>;
      <D.19228>:
      D.24786 = (long unsigned int) i;
      D.24787 = mono_array_addr_with_size (cattrs, 8, D.24786);
      cattr = MEM[(void * *)D.24787];
      *values = idx;
      D.24788 = cattr->ctor;
      token = mono_image_create_token (assembly, D.24788, 0, 0);
      type = token & 16777215;
      type = type << 3;
      D.24789 = token >> 24;
      switch (D.24789) <default: <D.19226>, case 6: <D.19223>, case 10: <D.19225>>
      <D.19223>:
      type = type | 2;
      D.24790 = assembly->remapped_tokens;
      D.24791 = (long unsigned int) token;
      D.24792 = (void *) D.24791;
      D.24788 = cattr->ctor;
      mono_g_hash_table_insert (D.24790, D.24792, D.24788);
      goto <D.19224>;
      <D.19225>:
      type = type | 3;
      goto <D.19224>;
      <D.19226>:
      monoeg_g_log (0B, 16, "got wrong token in custom attr");
      // predicted unlikely by continue predictor.
      goto <D.19227>;
      <D.19224>:
      D.24793 = values + 4;
      *D.24793 = type;
      p = &blob_size;
      D.24794 = cattr->data;
      D.24795 = mono_array_length (D.24794);
      D.24796 = (unsigned int) D.24795;
      p.82 = p;
      mono_metadata_encode_value (D.24796, p.82, &p);
      D.24798 = values + 8;
      p.82 = p;
      p.83 = (long int) p.82;
      blob_size.84 = (long int) &blob_size;
      D.24801 = p.83 - blob_size.84;
      D.24802 = (int) D.24801;
      D.24794 = cattr->data;
      D.24803 = mono_array_addr_with_size (D.24794, 1, 0);
      D.24794 = cattr->data;
      D.24804 = mono_array_length (D.24794);
      D.24805 = (int) D.24804;
      D.24806 = add_to_blob_cached (assembly, &blob_size, D.24802, D.24803, D.24805);
      *D.24798 = D.24806;
      values = values + 12;
      D.24782 = table->next_idx;
      D.24807 = D.24782 + 1;
      table->next_idx = D.24807;
      <D.19227>:
      i = i + 1;
      <D.19229>:
      if (i < count) goto <D.19228>; else goto <D.19230>;
      <D.19230>:
    }
  finally
    {
      blob_size = {CLOBBER};
      p = {CLOBBER};
    }
}


mono_image_add_decl_security (struct MonoDynamicImage * assembly, guint32 parent_token, struct MonoArray * permissions)
{
  long unsigned int D.24813;
  unsigned int D.24814;
  unsigned int D.24815;
  long unsigned int D.24816;
  guint32 * D.24817;
  unsigned int D.24818;
  unsigned int D.24819;
  long unsigned int D.24820;
  long unsigned int D.24821;
  unsigned int D.24822;
  unsigned int D.24823;
  guint32 * D.24824;
  guint32 * D.24825;
  struct MonoString * D.24826;
  unsigned int D.24827;
  unsigned int D.24828;
  long unsigned int D.24829;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 count;
  guint32 i;
  guint32 idx;
  struct MonoReflectionPermissionSet * perm;

  if (permissions == 0B) goto <D.24811>; else goto <D.24812>;
  <D.24811>:
  return;
  <D.24812>:
  D.24813 = mono_array_length (permissions);
  count = (guint32) D.24813;
  table = &assembly->tables[14];
  D.24814 = table->rows;
  D.24815 = D.24814 + count;
  table->rows = D.24815;
  D.24814 = table->rows;
  alloc_table (table, D.24814);
  i = 0;
  goto <D.19248>;
  <D.19247>:
  D.24816 = (long unsigned int) i;
  perm = mono_array_addr_with_size (permissions, 16, D.24816);
  D.24817 = table->values;
  D.24818 = table->next_idx;
  D.24819 = D.24818 * 3;
  D.24820 = (long unsigned int) D.24819;
  D.24821 = D.24820 * 4;
  values = D.24817 + D.24821;
  idx = parent_token & 16777215;
  idx = idx << 2;
  D.24822 = parent_token >> 24;
  switch (D.24822) <default: <D.19246>, case 2: <D.19242>, case 6: <D.19244>, case 32: <D.19245>>
  <D.19242>:
  idx = idx;
  goto <D.19243>;
  <D.19244>:
  idx = idx | 1;
  goto <D.19243>;
  <D.19245>:
  idx = idx | 2;
  goto <D.19243>;
  <D.19246>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 1363);
  <D.19243>:
  D.24823 = perm->action;
  *values = D.24823;
  D.24824 = values + 4;
  *D.24824 = idx;
  D.24825 = values + 8;
  D.24826 = perm->pset;
  D.24827 = add_mono_string_to_blob_cached (assembly, D.24826);
  *D.24825 = D.24827;
  D.24818 = table->next_idx;
  D.24828 = D.24818 + 1;
  table->next_idx = D.24828;
  i = i + 1;
  <D.19248>:
  D.24816 = (long unsigned int) i;
  D.24829 = mono_array_length (permissions);
  if (D.24816 < D.24829) goto <D.19247>; else goto <D.19249>;
  <D.19249>:
}


add_mono_string_to_blob_cached (struct MonoDynamicImage * assembly, struct MonoString * str)
{
  int D.24831;
  int D.24832;
  char * b.85;
  int D.24834;
  int D.24835;
  long unsigned int D.24836;
  int D.24837;
  long int b.86;
  long int blob_size.87;
  long int D.24840;
  int D.24841;
  int len.88;
  guint32 D.24843;
  char blob_size[64];
  char * b;
  guint32 idx;
  guint32 len;

  try
    {
      b = &blob_size;
      idx = 0;
      D.24831 = str->length;
      D.24832 = D.24831 * 2;
      len = (guint32) D.24832;
      b.85 = b;
      mono_metadata_encode_value (len, b.85, &b);
      {
        char * swapped;
        const char * p;

        D.24834 = mono_string_length (str);
        D.24835 = D.24834 * 2;
        D.24836 = (long unsigned int) D.24835;
        swapped = monoeg_malloc (D.24836);
        p = mono_string_chars (str);
        D.24837 = mono_string_length (str);
        swap_with_size (swapped, p, 2, D.24837);
        b.85 = b;
        b.86 = (long int) b.85;
        blob_size.87 = (long int) &blob_size;
        D.24840 = b.86 - blob_size.87;
        D.24841 = (int) D.24840;
        len.88 = (int) len;
        idx = add_to_blob_cached (assembly, &blob_size, D.24841, swapped, len.88);
        monoeg_g_free (swapped);
      }
      D.24843 = idx;
      return D.24843;
    }
  finally
    {
      blob_size = {CLOBBER};
      b = {CLOBBER};
    }
}


module_add_cattrs (struct MonoDynamicImage * assembly, struct MonoReflectionModuleBuilder * moduleb)
{
  unsigned int D.24846;
  struct MonoArray * D.24847;
  struct MonoArray * D.24848;
  long unsigned int D.24851;
  char * D.24852;
  unsigned int D.24853;
  struct MonoArray * D.24854;
  struct MonoArray * D.24855;
  long unsigned int D.24856;
  struct MonoArray * D.24857;
  char * D.24860;
  int D.24861;
  unsigned int D.24862;
  struct MonoArray * D.24863;
  long unsigned int D.24864;
  struct MonoArray * D.24865;
  char * D.24868;
  struct MonoReflectionTypeBuilder * D.24869;
  int D.24870;
  int i;

  D.24846 = moduleb->table_idx;
  D.24847 = moduleb->cattrs;
  mono_image_add_cattrs (assembly, D.24846, 7, D.24847);
  D.24848 = moduleb->global_methods;
  if (D.24848 != 0B) goto <D.24849>; else goto <D.24850>;
  <D.24849>:
  i = 0;
  goto <D.19936>;
  <D.19935>:
  {
    struct MonoReflectionMethodBuilder * mb;

    D.24848 = moduleb->global_methods;
    D.24851 = (long unsigned int) i;
    D.24852 = mono_array_addr_with_size (D.24848, 8, D.24851);
    mb = MEM[(struct MonoReflectionMethodBuilder * *)D.24852];
    D.24853 = mb->table_idx;
    D.24854 = mb->cattrs;
    mono_image_add_cattrs (assembly, D.24853, 0, D.24854);
    D.24855 = mb->pinfo;
    params_add_cattrs (assembly, D.24855);
  }
  i = i + 1;
  <D.19936>:
  D.24851 = (long unsigned int) i;
  D.24848 = moduleb->global_methods;
  D.24856 = mono_array_length (D.24848);
  if (D.24851 < D.24856) goto <D.19935>; else goto <D.19937>;
  <D.19937>:
  <D.24850>:
  D.24857 = moduleb->global_fields;
  if (D.24857 != 0B) goto <D.24858>; else goto <D.24859>;
  <D.24858>:
  i = 0;
  goto <D.19940>;
  <D.19939>:
  {
    struct MonoReflectionFieldBuilder * fb;

    D.24857 = moduleb->global_fields;
    D.24851 = (long unsigned int) i;
    D.24860 = mono_array_addr_with_size (D.24857, 8, D.24851);
    fb = MEM[(struct MonoReflectionFieldBuilder * *)D.24860];
    D.24861 = fb->table_idx;
    D.24862 = (unsigned int) D.24861;
    D.24863 = fb->cattrs;
    mono_image_add_cattrs (assembly, D.24862, 1, D.24863);
  }
  i = i + 1;
  <D.19940>:
  D.24851 = (long unsigned int) i;
  D.24857 = moduleb->global_fields;
  D.24864 = mono_array_length (D.24857);
  if (D.24851 < D.24864) goto <D.19939>; else goto <D.19941>;
  <D.19941>:
  <D.24859>:
  D.24865 = moduleb->types;
  if (D.24865 != 0B) goto <D.24866>; else goto <D.24867>;
  <D.24866>:
  i = 0;
  goto <D.19943>;
  <D.19942>:
  D.24865 = moduleb->types;
  D.24851 = (long unsigned int) i;
  D.24868 = mono_array_addr_with_size (D.24865, 8, D.24851);
  D.24869 = MEM[(struct MonoReflectionTypeBuilder * *)D.24868];
  type_add_cattrs (assembly, D.24869);
  i = i + 1;
  <D.19943>:
  D.24870 = moduleb->num_types;
  if (D.24870 > i) goto <D.19942>; else goto <D.19944>;
  <D.19944>:
  <D.24867>:
}


params_add_cattrs (struct MonoDynamicImage * assembly, struct MonoArray * pinfo)
{
  long unsigned int D.24873;
  char * D.24874;
  unsigned int D.24877;
  struct MonoArray * D.24878;
  long unsigned int D.24879;
  int i;

  if (pinfo == 0B) goto <D.24871>; else goto <D.24872>;
  <D.24871>:
  return;
  <D.24872>:
  i = 0;
  goto <D.19899>;
  <D.19898>:
  {
    struct MonoReflectionParamBuilder * pb;

    D.24873 = (long unsigned int) i;
    D.24874 = mono_array_addr_with_size (pinfo, 8, D.24873);
    pb = MEM[(struct MonoReflectionParamBuilder * *)D.24874];
    if (pb == 0B) goto <D.24875>; else goto <D.24876>;
    <D.24875>:
    // predicted unlikely by continue predictor.
    goto <D.19897>;
    <D.24876>:
    D.24877 = pb->table_idx;
    D.24878 = pb->cattrs;
    mono_image_add_cattrs (assembly, D.24877, 4, D.24878);
  }
  <D.19897>:
  i = i + 1;
  <D.19899>:
  D.24873 = (long unsigned int) i;
  D.24879 = mono_array_length (pinfo);
  if (D.24873 < D.24879) goto <D.19898>; else goto <D.19900>;
  <D.19900>:
}


type_add_cattrs (struct MonoDynamicImage * assembly, struct MonoReflectionTypeBuilder * tb)
{
  unsigned int D.24881;
  struct MonoArray * D.24882;
  struct MonoArray * D.24883;
  long unsigned int D.24886;
  char * D.24887;
  int D.24888;
  unsigned int D.24889;
  struct MonoArray * D.24890;
  int D.24891;
  struct MonoArray * D.24892;
  char * D.24895;
  unsigned int D.24896;
  struct MonoArray * D.24897;
  long unsigned int D.24898;
  struct MonoArray * D.24899;
  char * D.24902;
  int D.24903;
  unsigned int D.24904;
  struct MonoArray * D.24905;
  long unsigned int D.24906;
  struct MonoArray * D.24907;
  char * D.24910;
  unsigned int D.24911;
  struct MonoArray * D.24912;
  struct MonoArray * D.24913;
  long unsigned int D.24914;
  struct MonoArray * D.24915;
  char * D.24918;
  unsigned int D.24919;
  struct MonoArray * D.24920;
  struct MonoArray * D.24921;
  int D.24922;
  struct MonoArray * D.24923;
  char * D.24926;
  struct MonoReflectionTypeBuilder * D.24927;
  long unsigned int D.24928;
  int i;

  D.24881 = tb->table_idx;
  D.24882 = tb->cattrs;
  mono_image_add_cattrs (assembly, D.24881, 3, D.24882);
  D.24883 = tb->fields;
  if (D.24883 != 0B) goto <D.24884>; else goto <D.24885>;
  <D.24884>:
  i = 0;
  goto <D.19908>;
  <D.19907>:
  {
    struct MonoReflectionFieldBuilder * fb;

    D.24883 = tb->fields;
    D.24886 = (long unsigned int) i;
    D.24887 = mono_array_addr_with_size (D.24883, 8, D.24886);
    fb = MEM[(struct MonoReflectionFieldBuilder * *)D.24887];
    D.24888 = fb->table_idx;
    D.24889 = (unsigned int) D.24888;
    D.24890 = fb->cattrs;
    mono_image_add_cattrs (assembly, D.24889, 1, D.24890);
  }
  i = i + 1;
  <D.19908>:
  D.24891 = tb->num_fields;
  if (D.24891 > i) goto <D.19907>; else goto <D.19909>;
  <D.19909>:
  <D.24885>:
  D.24892 = tb->events;
  if (D.24892 != 0B) goto <D.24893>; else goto <D.24894>;
  <D.24893>:
  i = 0;
  goto <D.19912>;
  <D.19911>:
  {
    struct MonoReflectionEventBuilder * eb;

    D.24892 = tb->events;
    D.24886 = (long unsigned int) i;
    D.24895 = mono_array_addr_with_size (D.24892, 8, D.24886);
    eb = MEM[(struct MonoReflectionEventBuilder * *)D.24895];
    D.24896 = eb->table_idx;
    D.24897 = eb->cattrs;
    mono_image_add_cattrs (assembly, D.24896, 10, D.24897);
  }
  i = i + 1;
  <D.19912>:
  D.24886 = (long unsigned int) i;
  D.24892 = tb->events;
  D.24898 = mono_array_length (D.24892);
  if (D.24886 < D.24898) goto <D.19911>; else goto <D.19913>;
  <D.19913>:
  <D.24894>:
  D.24899 = tb->properties;
  if (D.24899 != 0B) goto <D.24900>; else goto <D.24901>;
  <D.24900>:
  i = 0;
  goto <D.19916>;
  <D.19915>:
  {
    struct MonoReflectionPropertyBuilder * pb;

    D.24899 = tb->properties;
    D.24886 = (long unsigned int) i;
    D.24902 = mono_array_addr_with_size (D.24899, 8, D.24886);
    pb = MEM[(struct MonoReflectionPropertyBuilder * *)D.24902];
    D.24903 = pb->table_idx;
    D.24904 = (unsigned int) D.24903;
    D.24905 = pb->cattrs;
    mono_image_add_cattrs (assembly, D.24904, 9, D.24905);
  }
  i = i + 1;
  <D.19916>:
  D.24886 = (long unsigned int) i;
  D.24899 = tb->properties;
  D.24906 = mono_array_length (D.24899);
  if (D.24886 < D.24906) goto <D.19915>; else goto <D.19917>;
  <D.19917>:
  <D.24901>:
  D.24907 = tb->ctors;
  if (D.24907 != 0B) goto <D.24908>; else goto <D.24909>;
  <D.24908>:
  i = 0;
  goto <D.19920>;
  <D.19919>:
  {
    struct MonoReflectionCtorBuilder * cb;

    D.24907 = tb->ctors;
    D.24886 = (long unsigned int) i;
    D.24910 = mono_array_addr_with_size (D.24907, 8, D.24886);
    cb = MEM[(struct MonoReflectionCtorBuilder * *)D.24910];
    D.24911 = cb->table_idx;
    D.24912 = cb->cattrs;
    mono_image_add_cattrs (assembly, D.24911, 0, D.24912);
    D.24913 = cb->pinfo;
    params_add_cattrs (assembly, D.24913);
  }
  i = i + 1;
  <D.19920>:
  D.24886 = (long unsigned int) i;
  D.24907 = tb->ctors;
  D.24914 = mono_array_length (D.24907);
  if (D.24886 < D.24914) goto <D.19919>; else goto <D.19921>;
  <D.19921>:
  <D.24909>:
  D.24915 = tb->methods;
  if (D.24915 != 0B) goto <D.24916>; else goto <D.24917>;
  <D.24916>:
  i = 0;
  goto <D.19924>;
  <D.19923>:
  {
    struct MonoReflectionMethodBuilder * mb;

    D.24915 = tb->methods;
    D.24886 = (long unsigned int) i;
    D.24918 = mono_array_addr_with_size (D.24915, 8, D.24886);
    mb = MEM[(struct MonoReflectionMethodBuilder * *)D.24918];
    D.24919 = mb->table_idx;
    D.24920 = mb->cattrs;
    mono_image_add_cattrs (assembly, D.24919, 0, D.24920);
    D.24921 = mb->pinfo;
    params_add_cattrs (assembly, D.24921);
  }
  i = i + 1;
  <D.19924>:
  D.24922 = tb->num_methods;
  if (D.24922 > i) goto <D.19923>; else goto <D.19925>;
  <D.19925>:
  <D.24917>:
  D.24923 = tb->subtypes;
  if (D.24923 != 0B) goto <D.24924>; else goto <D.24925>;
  <D.24924>:
  i = 0;
  goto <D.19927>;
  <D.19926>:
  D.24923 = tb->subtypes;
  D.24886 = (long unsigned int) i;
  D.24926 = mono_array_addr_with_size (D.24923, 8, D.24886);
  D.24927 = MEM[(struct MonoReflectionTypeBuilder * *)D.24926];
  type_add_cattrs (assembly, D.24927);
  i = i + 1;
  <D.19927>:
  D.24886 = (long unsigned int) i;
  D.24923 = tb->subtypes;
  D.24928 = mono_array_length (D.24923);
  if (D.24886 < D.24928) goto <D.19926>; else goto <D.19928>;
  <D.19928>:
  <D.24925>:
}


mono_image_add_methodimpl (struct MonoDynamicImage * assembly, struct MonoReflectionMethodBuilder * mb)
{
  struct MonoArray * D.24929;
  long unsigned int D.24932;
  char * D.24933;
  unsigned int D.24934;
  unsigned int D.24935;
  guint32 * D.24936;
  unsigned int D.24937;
  long unsigned int D.24938;
  long unsigned int D.24939;
  unsigned int D.24940;
  guint32 * D.24941;
  unsigned int D.24942;
  unsigned int D.24943;
  unsigned int D.24944;
  unsigned int D.24945;
  unsigned int D.24946;
  guint32 * D.24947;
  long unsigned int D.24948;
  struct MonoReflectionTypeBuilder * tb;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 tok;
  struct MonoReflectionMethod * m;
  int i;

  tb = mb->type;
  D.24929 = mb->override_methods;
  if (D.24929 == 0B) goto <D.24930>; else goto <D.24931>;
  <D.24930>:
  return;
  <D.24931>:
  i = 0;
  goto <D.19296>;
  <D.19295>:
  D.24929 = mb->override_methods;
  D.24932 = (long unsigned int) i;
  D.24933 = mono_array_addr_with_size (D.24929, 8, D.24932);
  m = MEM[(struct MonoReflectionMethod * *)D.24933];
  table = &assembly->tables[25];
  D.24934 = table->rows;
  D.24935 = D.24934 + 1;
  table->rows = D.24935;
  D.24934 = table->rows;
  alloc_table (table, D.24934);
  D.24936 = table->values;
  D.24934 = table->rows;
  D.24937 = D.24934 * 3;
  D.24938 = (long unsigned int) D.24937;
  D.24939 = D.24938 * 4;
  values = D.24936 + D.24939;
  D.24940 = tb->table_idx;
  *values = D.24940;
  D.24941 = values + 4;
  D.24942 = mb->table_idx;
  D.24943 = D.24942 << 1;
  *D.24941 = D.24943;
  tok = mono_image_create_token (assembly, m, 0, 0);
  D.24944 = tok >> 24;
  switch (D.24944) <default: <D.19294>, case 6: <D.19293>, case 10: <D.19291>>
  <D.19291>:
  D.24945 = tok << 1;
  D.24946 = D.24945 & 33554430;
  tok = D.24946 | 1;
  goto <D.19292>;
  <D.19293>:
  D.24945 = tok << 1;
  tok = D.24945 & 33554430;
  goto <D.19292>;
  <D.19294>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 1589);
  <D.19292>:
  D.24947 = values + 8;
  *D.24947 = tok;
  i = i + 1;
  <D.19296>:
  D.24932 = (long unsigned int) i;
  D.24929 = mb->override_methods;
  D.24948 = mono_array_length (D.24929);
  if (D.24932 < D.24948) goto <D.19295>; else goto <D.19297>;
  <D.19297>:
}


fixup_cattrs (struct MonoDynamicImage * assembly)
{
  guint32 * D.24950;
  unsigned int D.24951;
  unsigned int D.24952;
  long unsigned int D.24953;
  long unsigned int D.24954;
  unsigned int D.24955;
  struct MonoGHashTable * D.24958;
  long unsigned int D.24959;
  const void * D.24960;
  _Bool D.24961;
  long int D.24962;
  long int D.24963;
  struct MonoVTable * D.24966;
  struct MonoClass * D.24967;
  const char * D.24968;
  int D.24969;
  struct GHashTable * D.24972;
  void * D.24973;
  long int D.24974;
  guint32 * D.24975;
  unsigned int D.24976;
  unsigned int D.24977;
  int D.24979;
  void * D.24982;
  long int D.24983;
  unsigned int D.24984;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 type;
  guint32 i;
  guint32 idx;
  guint32 token;
  struct MonoObject * ctor;

  table = &assembly->tables[12];
  i = 0;
  goto <D.20194>;
  <D.20193>:
  D.24950 = table->values;
  D.24951 = i + 1;
  D.24952 = D.24951 * 3;
  D.24953 = (long unsigned int) D.24952;
  D.24954 = D.24953 * 4;
  values = D.24950 + D.24954;
  type = MEM[(guint32 *)values + 4B];
  D.24955 = type & 7;
  if (D.24955 == 2) goto <D.24956>; else goto <D.24957>;
  <D.24956>:
  idx = type >> 3;
  token = idx | 100663296;
  D.24958 = assembly->remapped_tokens;
  D.24959 = (long unsigned int) token;
  D.24960 = (const void *) D.24959;
  ctor = mono_g_hash_table_lookup (D.24958, D.24960);
  D.24961 = ctor == 0B;
  D.24962 = (long int) D.24961;
  D.24963 = __builtin_expect (D.24962, 0);
  if (D.24963 != 0) goto <D.24964>; else goto <D.24965>;
  <D.24964>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4337, "ctor");
  <D.24965>:
  D.24966 = ctor->vtable;
  D.24967 = D.24966->klass;
  D.24968 = D.24967->name;
  D.24969 = strcmp (D.24968, "MonoCMethod");
  if (D.24969 == 0) goto <D.24970>; else goto <D.24971>;
  <D.24970>:
  {
    struct MonoMethod * m;

    m = MEM[(struct MonoReflectionMethod *)ctor].method;
    D.24972 = assembly->method_to_table_idx;
    D.24973 = monoeg_g_hash_table_lookup (D.24972, m);
    D.24974 = (long int) D.24973;
    idx = (guint32) D.24974;
    D.24975 = values + 4;
    D.24976 = idx << 3;
    D.24977 = D.24976 | 2;
    *D.24975 = D.24977;
  }
  goto <D.24978>;
  <D.24971>:
  D.24966 = ctor->vtable;
  D.24967 = D.24966->klass;
  D.24968 = D.24967->name;
  D.24979 = strcmp (D.24968, "ConstructorBuilder");
  if (D.24979 == 0) goto <D.24980>; else goto <D.24981>;
  <D.24980>:
  {
    struct MonoMethod * m;

    m = MEM[(struct MonoReflectionCtorBuilder *)ctor].mhandle;
    D.24972 = assembly->method_to_table_idx;
    D.24982 = monoeg_g_hash_table_lookup (D.24972, m);
    D.24983 = (long int) D.24982;
    idx = (guint32) D.24983;
    D.24975 = values + 4;
    D.24976 = idx << 3;
    D.24977 = D.24976 | 2;
    *D.24975 = D.24977;
  }
  <D.24981>:
  <D.24978>:
  <D.24957>:
  i = i + 1;
  <D.20194>:
  D.24984 = table->rows;
  if (D.24984 > i) goto <D.20193>; else goto <D.20195>;
  <D.20195>:
}


__attribute__((visibility ("hidden")))
mono_image_insert_string (struct MonoReflectionModuleBuilder * module, struct MonoString * str)
{
  struct MonoDynamicImage * D.24985;
  int D.24988;
  int D.24991;
  int D.24992;
  int D.24993;
  unsigned int D.24994;
  char * b.89;
  struct MonoDynamicStream * D.24996;
  long int b.90;
  long int buf.91;
  long int D.24999;
  unsigned int D.25000;
  int D.25001;
  int D.25002;
  long unsigned int D.25003;
  int D.25004;
  unsigned int D.25005;
  unsigned int D.25007;
  unsigned int idx.92;
  unsigned int D.25009;
  struct MonoGHashTable * D.25010;
  unsigned int D.25011;
  long unsigned int D.25012;
  void * D.25013;
  guint32 D.25014;
  struct MonoDynamicImage * assembly;
  guint32 idx;
  char buf[16];
  char * b;

  try
    {
      b = &buf;
      D.24985 = module->dynamic_image;
      if (D.24985 == 0B) goto <D.24986>; else goto <D.24987>;
      <D.24986>:
      mono_image_module_basic_init (module);
      <D.24987>:
      assembly = module->dynamic_image;
      D.24988 = assembly->save;
      if (D.24988 != 0) goto <D.24989>; else goto <D.24990>;
      <D.24989>:
      D.24991 = str->length;
      D.24992 = D.24991 * 2;
      D.24993 = D.24992 | 1;
      D.24994 = (unsigned int) D.24993;
      b.89 = b;
      mono_metadata_encode_value (D.24994, b.89, &b);
      D.24996 = &assembly->us;
      b.89 = b;
      b.90 = (long int) b.89;
      buf.91 = (long int) &buf;
      D.24999 = b.90 - buf.91;
      D.25000 = (unsigned int) D.24999;
      idx = mono_image_add_stream_data (D.24996, &buf, D.25000);
      {
        char * swapped;
        const char * p;

        D.25001 = mono_string_length (str);
        D.25002 = D.25001 * 2;
        D.25003 = (long unsigned int) D.25002;
        swapped = monoeg_malloc (D.25003);
        p = mono_string_chars (str);
        D.25004 = mono_string_length (str);
        swap_with_size (swapped, p, 2, D.25004);
        D.24996 = &assembly->us;
        D.24991 = str->length;
        D.24992 = D.24991 * 2;
        D.25005 = (unsigned int) D.24992;
        mono_image_add_stream_data (D.24996, swapped, D.25005);
        monoeg_g_free (swapped);
      }
      D.24996 = &assembly->us;
      mono_image_add_stream_data (D.24996, "", 1);
      goto <D.25006>;
      <D.24990>:
      D.25007 = assembly->us.index;
      idx.92 = D.25007;
      D.25009 = idx.92 + 1;
      assembly->us.index = D.25009;
      idx = idx.92;
      <D.25006>:
      D.25010 = assembly->tokens;
      D.25011 = idx | 1879048192;
      D.25012 = (long unsigned int) D.25011;
      D.25013 = (void *) D.25012;
      mono_g_hash_table_insert (D.25010, D.25013, str);
      D.25014 = idx | 1879048192;
      return D.25014;
    }
  finally
    {
      buf = {CLOBBER};
      b = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_image_create_method_token (struct MonoDynamicImage * assembly, struct MonoObject * obj, struct MonoArray * opt_param_types)
{
  struct MonoVTable * D.25017;
  const char * D.25021;
  int D.25022;
  int D.25024;
  int iftmp.93;
  struct MonoMethodSignature * D.25030;
  short int D.25031;
  _Bool D.25032;
  long int D.25033;
  long int D.25034;
  long unsigned int D.25037;
  struct MonoImage * D.25038;
  short unsigned int D.25039;
  int D.25040;
  int D.25041;
  unsigned int D.25042;
  <unnamed-unsigned:1> D.25043;
  <unnamed-unsigned:1> D.25044;
  <unnamed-unsigned:6> D.25045;
  short unsigned int D.25046;
  short unsigned int D.25047;
  short unsigned int D.25048;
  short int D.25049;
  struct MonoType * D.25050;
  struct MonoType * D.25051;
  long unsigned int D.25052;
  char * D.25053;
  int D.25054;
  struct MonoType * D.25055;
  struct MonoClass * D.25056;
  struct MonoType * D.25057;
  unsigned int D.25058;
  _Bool D.25059;
  long int D.25060;
  long int D.25061;
  const char * D.25064;
  int D.25065;
  long unsigned int D.25068;
  int iftmp.94;
  struct MonoArray * D.25070;
  long unsigned int D.25073;
  int iftmp.95;
  struct MonoArray * D.25076;
  long unsigned int D.25079;
  int D.25081;
  unsigned int D.25082;
  unsigned int D.25083;
  unsigned int D.25084;
  _Bool D.25085;
  unsigned int D.25086;
  unsigned int D.25087;
  _Bool D.25088;
  unsigned char D.25089;
  <unnamed-unsigned:6> D.25090;
  short unsigned int D.25091;
  short unsigned int D.25092;
  short unsigned int D.25093;
  short unsigned int D.25094;
  short int D.25095;
  struct MonoReflectionType * D.25096;
  struct MonoType * D.25097;
  long unsigned int D.25098;
  char * D.25099;
  struct MonoType * D.25100;
  char * D.25101;
  int D.25102;
  struct MonoType * D.25103;
  unsigned int D.25104;
  _Bool D.25105;
  long int D.25106;
  long int D.25107;
  unsigned int D.25110;
  struct MonoString * D.25111;
  struct GHashTable * D.25113;
  long unsigned int D.25114;
  void * D.25115;
  struct MonoGHashTable * D.25116;
  guint32 D.25117;
  struct MonoClass * klass;
  guint32 token;
  struct MonoMethodSignature * sig;

  token = 0;
  D.25017 = obj->vtable;
  klass = D.25017->klass;
  D.25021 = klass->name;
  D.25022 = strcmp (D.25021, "MonoMethod");
  if (D.25022 == 0) goto <D.25018>; else goto <D.25023>;
  <D.25023>:
  D.25021 = klass->name;
  D.25024 = strcmp (D.25021, "MonoCMethod");
  if (D.25024 == 0) goto <D.25018>; else goto <D.25019>;
  <D.25018>:
  {
    struct MonoMethod * method;
    struct MonoMethodSignature * old;
    guint32 sig_token;
    guint32 parent;
    int nargs;
    int i;

    method = MEM[(struct MonoReflectionMethod *)obj].method;
    if (opt_param_types == 0B) goto <D.25026>; else goto <D.25029>;
    <D.25029>:
    D.25030 = mono_method_signature (method);
    D.25031 = D.25030->sentinelpos;
    if (D.25031 < 0) goto <D.25026>; else goto <D.25027>;
    <D.25026>:
    iftmp.93 = 1;
    goto <D.25028>;
    <D.25027>:
    iftmp.93 = 0;
    <D.25028>:
    D.25032 = iftmp.93 != 0;
    D.25033 = (long int) D.25032;
    D.25034 = __builtin_expect (D.25033, 0);
    if (D.25034 != 0) goto <D.25035>; else goto <D.25036>;
    <D.25035>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4813, "opt_param_types && (mono_method_signature (method)->sentinelpos >= 0)");
    <D.25036>:
    D.25037 = mono_array_length (opt_param_types);
    nargs = (int) D.25037;
    old = mono_method_signature (method);
    D.25038 = &assembly->image;
    D.25039 = old->param_count;
    D.25040 = (int) D.25039;
    D.25041 = D.25040 + nargs;
    D.25042 = (unsigned int) D.25041;
    sig = mono_metadata_signature_alloc (D.25038, D.25042);
    D.25043 = old->hasthis;
    sig->hasthis = D.25043;
    D.25044 = old->explicit_this;
    sig->explicit_this = D.25044;
    D.25045 = old->call_convention;
    sig->call_convention = D.25045;
    D.25046 = old->generic_param_count;
    sig->generic_param_count = D.25046;
    D.25039 = old->param_count;
    D.25047 = (short unsigned int) nargs;
    D.25048 = D.25039 + D.25047;
    sig->param_count = D.25048;
    D.25039 = old->param_count;
    D.25049 = (short int) D.25039;
    sig->sentinelpos = D.25049;
    D.25050 = old->ret;
    sig->ret = D.25050;
    i = 0;
    goto <D.20357>;
    <D.20356>:
    D.25051 = old->params[i];
    sig->params[i] = D.25051;
    i = i + 1;
    <D.20357>:
    D.25039 = old->param_count;
    D.25040 = (int) D.25039;
    if (D.25040 > i) goto <D.20356>; else goto <D.20358>;
    <D.20358>:
    i = 0;
    goto <D.20361>;
    <D.20360>:
    {
      struct MonoReflectionType * rt;

      D.25052 = (long unsigned int) i;
      D.25053 = mono_array_addr_with_size (opt_param_types, 8, D.25052);
      rt = MEM[(struct MonoReflectionType * *)D.25053];
      D.25039 = old->param_count;
      D.25040 = (int) D.25039;
      D.25054 = D.25040 + i;
      D.25055 = mono_reflection_type_get_handle (rt);
      sig->params[D.25054] = D.25055;
    }
    i = i + 1;
    <D.20361>:
    if (i < nargs) goto <D.20360>; else goto <D.20362>;
    <D.20362>:
    D.25056 = method->klass;
    D.25057 = &D.25056->byval_arg;
    parent = mono_image_typedef_or_ref (assembly, D.25057);
    D.25058 = parent & 3;
    D.25059 = D.25058 != 1;
    D.25060 = (long int) D.25059;
    D.25061 = __builtin_expect (D.25060, 0);
    if (D.25061 != 0) goto <D.25062>; else goto <D.25063>;
    <D.25062>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4836, "(parent & MONO_TYPEDEFORREF_MASK) == MONO_MEMBERREF_PARENT_TYPEREF");
    <D.25063>:
    parent = parent >> 2;
    parent = parent << 3;
    parent = parent | 1;
    sig_token = method_encode_signature (assembly, sig);
    D.25064 = method->name;
    token = mono_image_get_varargs_method_token (assembly, parent, D.25064, sig_token);
  }
  goto <D.25020>;
  <D.25019>:
  D.25021 = klass->name;
  D.25065 = strcmp (D.25021, "MethodBuilder");
  if (D.25065 == 0) goto <D.25066>; else goto <D.25067>;
  <D.25066>:
  {
    struct MonoReflectionMethodBuilder * mb;
    struct ReflectionMethodBuilder rmb;
    guint32 parent;
    guint32 sig_token;
    int nopt_args;
    int nparams;
    int ngparams;
    int i;
    char * name;

    try
      {
        mb = obj;
        reflection_methodbuilder_from_method_builder (&rmb, mb);
        rmb.opt_types = opt_param_types;
        D.25068 = mono_array_length (opt_param_types);
        nopt_args = (int) D.25068;
        D.25070 = rmb.parameters;
        if (D.25070 != 0B) goto <D.25071>; else goto <D.25072>;
        <D.25071>:
        D.25070 = rmb.parameters;
        D.25073 = mono_array_length (D.25070);
        iftmp.94 = (int) D.25073;
        goto <D.25074>;
        <D.25072>:
        iftmp.94 = 0;
        <D.25074>:
        nparams = iftmp.94;
        D.25076 = rmb.generic_params;
        if (D.25076 != 0B) goto <D.25077>; else goto <D.25078>;
        <D.25077>:
        D.25076 = rmb.generic_params;
        D.25079 = mono_array_length (D.25076);
        iftmp.95 = (int) D.25079;
        goto <D.25080>;
        <D.25078>:
        iftmp.95 = 0;
        <D.25080>:
        ngparams = iftmp.95;
        D.25038 = &assembly->image;
        D.25081 = nparams + nopt_args;
        D.25082 = (unsigned int) D.25081;
        sig = mono_metadata_signature_alloc (D.25038, D.25082);
        D.25083 = rmb.attrs;
        D.25084 = D.25083 & 16;
        D.25085 = D.25084 == 0;
        sig->hasthis = D.25085;
        D.25086 = rmb.call_conv;
        D.25087 = D.25086 & 64;
        D.25088 = D.25087 != 0;
        sig->explicit_this = D.25088;
        D.25086 = rmb.call_conv;
        D.25089 = (unsigned char) D.25086;
        D.25090 = (<unnamed-unsigned:6>) D.25089;
        sig->call_convention = D.25090;
        D.25091 = (short unsigned int) ngparams;
        sig->generic_param_count = D.25091;
        D.25092 = (short unsigned int) nparams;
        D.25093 = (short unsigned int) nopt_args;
        D.25094 = D.25092 + D.25093;
        sig->param_count = D.25094;
        D.25095 = (short int) nparams;
        sig->sentinelpos = D.25095;
        D.25096 = rmb.rtype;
        D.25097 = mono_reflection_type_get_handle (D.25096);
        sig->ret = D.25097;
        i = 0;
        goto <D.20374>;
        <D.20373>:
        {
          struct MonoReflectionType * rt;

          D.25070 = rmb.parameters;
          D.25098 = (long unsigned int) i;
          D.25099 = mono_array_addr_with_size (D.25070, 8, D.25098);
          rt = MEM[(struct MonoReflectionType * *)D.25099];
          D.25100 = mono_reflection_type_get_handle (rt);
          sig->params[i] = D.25100;
        }
        i = i + 1;
        <D.20374>:
        if (i < nparams) goto <D.20373>; else goto <D.20375>;
        <D.20375>:
        i = 0;
        goto <D.20378>;
        <D.20377>:
        {
          struct MonoReflectionType * rt;

          D.25098 = (long unsigned int) i;
          D.25101 = mono_array_addr_with_size (opt_param_types, 8, D.25098);
          rt = MEM[(struct MonoReflectionType * *)D.25101];
          D.25102 = nparams + i;
          D.25103 = mono_reflection_type_get_handle (rt);
          sig->params[D.25102] = D.25103;
        }
        i = i + 1;
        <D.20378>:
        if (i < nopt_args) goto <D.20377>; else goto <D.20379>;
        <D.20379>:
        sig_token = method_builder_encode_signature (assembly, &rmb);
        parent = mono_image_create_token (assembly, obj, 1, 1);
        D.25104 = parent >> 24;
        D.25105 = D.25104 != 6;
        D.25106 = (long int) D.25105;
        D.25107 = __builtin_expect (D.25106, 0);
        if (D.25107 != 0) goto <D.25108>; else goto <D.25109>;
        <D.25108>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4880, "mono_metadata_token_table (parent) == MONO_TABLE_METHOD");
        <D.25109>:
        D.25110 = parent << 3;
        parent = D.25110 & 134217720;
        parent = parent | 3;
        D.25111 = rmb.name;
        name = mono_string_to_utf8 (D.25111);
        token = mono_image_get_varargs_method_token (assembly, parent, name, sig_token);
        monoeg_g_free (name);
      }
    finally
      {
        rmb = {CLOBBER};
      }
  }
  goto <D.25112>;
  <D.25067>:
  D.25021 = klass->name;
  monoeg_g_log (0B, 4, "requested method token for %s\n", D.25021);
  <D.20380>:
  goto <D.20380>;
  <D.25112>:
  <D.25020>:
  D.25113 = assembly->vararg_aux_hash;
  D.25114 = (long unsigned int) token;
  D.25115 = (void *) D.25114;
  monoeg_g_hash_table_insert_replace (D.25113, D.25115, sig, 0);
  D.25116 = assembly->tokens;
  D.25114 = (long unsigned int) token;
  D.25115 = (void *) D.25114;
  mono_g_hash_table_insert (D.25116, D.25115, obj);
  D.25117 = token;
  return D.25117;
}


method_encode_signature (struct MonoDynamicImage * assembly, struct MonoMethodSignature * sig)
{
  short unsigned int D.25119;
  int D.25120;
  guint32 D.25123;
  <unnamed-unsigned:6> D.25124;
  long unsigned int D.25125;
  long unsigned int D.25126;
  short unsigned int D.25129;
  unsigned char D.25132;
  unsigned int D.25135;
  struct MonoType * D.25136;
  short int D.25137;
  int D.25138;
  struct MonoType * D.25141;
  unsigned int i.96;
  struct SigBuffer buf;
  int i;
  guint32 nparams;
  guint32 idx;

  try
    {
      D.25119 = sig->param_count;
      nparams = (guint32) D.25119;
      D.25120 = assembly->save;
      if (D.25120 == 0) goto <D.25121>; else goto <D.25122>;
      <D.25121>:
      D.25123 = 0;
      return D.25123;
      <D.25122>:
      sigbuffer_init (&buf, 32);
      D.25124 = sig->call_convention;
      idx = (guint32) D.25124;
      D.25125 = BIT_FIELD_REF <*sig, 64, 64>;
      D.25126 = D.25125 & 512;
      if (D.25126 != 0) goto <D.25127>; else goto <D.25128>;
      <D.25127>:
      idx = idx | 32;
      <D.25128>:
      D.25129 = sig->generic_param_count;
      if (D.25129 != 0) goto <D.25130>; else goto <D.25131>;
      <D.25130>:
      idx = idx | 16;
      <D.25131>:
      D.25132 = (unsigned char) idx;
      sigbuffer_add_byte (&buf, D.25132);
      D.25129 = sig->generic_param_count;
      if (D.25129 != 0) goto <D.25133>; else goto <D.25134>;
      <D.25133>:
      D.25129 = sig->generic_param_count;
      D.25135 = (unsigned int) D.25129;
      sigbuffer_add_value (&buf, D.25135);
      <D.25134>:
      sigbuffer_add_value (&buf, nparams);
      D.25136 = sig->ret;
      encode_type (assembly, D.25136, &buf);
      i = 0;
      goto <D.19056>;
      <D.19055>:
      D.25137 = sig->sentinelpos;
      D.25138 = (int) D.25137;
      if (D.25138 == i) goto <D.25139>; else goto <D.25140>;
      <D.25139>:
      sigbuffer_add_byte (&buf, 65);
      <D.25140>:
      D.25141 = sig->params[i];
      encode_type (assembly, D.25141, &buf);
      i = i + 1;
      <D.19056>:
      i.96 = (unsigned int) i;
      if (i.96 < nparams) goto <D.19055>; else goto <D.19057>;
      <D.19057>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.25123 = idx;
      return D.25123;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_get_varargs_method_token (struct MonoDynamicImage * assembly, guint32 original, const gchar * name, guint32 sig)
{
  int D.25145;
  unsigned int D.25148;
  unsigned int D.25149;
  guint32 * D.25150;
  unsigned int D.25151;
  unsigned int D.25152;
  long unsigned int D.25153;
  long unsigned int D.25154;
  guint32 * D.25155;
  struct MonoDynamicStream * D.25156;
  unsigned int D.25157;
  guint32 * D.25158;
  unsigned int D.25159;
  guint32 D.25160;
  struct MonoDynamicTable * table;
  guint32 token;
  guint32 * values;

  table = &assembly->tables[10];
  D.25145 = assembly->save;
  if (D.25145 != 0) goto <D.25146>; else goto <D.25147>;
  <D.25146>:
  D.25148 = table->rows;
  D.25149 = D.25148 + 1;
  alloc_table (table, D.25149);
  D.25150 = table->values;
  D.25151 = table->next_idx;
  D.25152 = D.25151 * 3;
  D.25153 = (long unsigned int) D.25152;
  D.25154 = D.25153 * 4;
  values = D.25150 + D.25154;
  *values = original;
  D.25155 = values + 4;
  D.25156 = &assembly->sheap;
  D.25157 = string_heap_insert (D.25156, name);
  *D.25155 = D.25157;
  D.25158 = values + 8;
  *D.25158 = sig;
  <D.25147>:
  D.25151 = table->next_idx;
  token = D.25151 | 167772160;
  D.25151 = table->next_idx;
  D.25159 = D.25151 + 1;
  table->next_idx = D.25159;
  D.25160 = token;
  return D.25160;
}


__attribute__((visibility ("hidden")))
mono_image_create_token (struct MonoDynamicImage * assembly, struct MonoObject * obj, gboolean create_open_instance, gboolean register_token)
{
  struct MonoVTable * D.25162;
  struct MonoImage * D.25165;
  struct MonoImage * D.25166;
  const char * D.25168;
  int D.25169;
  struct MonoException * D.25170;
  int D.25171;
  struct MonoReflectionModuleBuilder * D.25176;
  struct MonoDynamicImage * D.25177;
  struct MonoArray * D.25179;
  struct MonoArray * D.25181;
  unsigned int D.25183;
  int D.25185;
  struct MonoReflectionModuleBuilder * D.25190;
  struct MonoDynamicImage * D.25191;
  struct MonoArray * D.25193;
  unsigned int D.25195;
  int D.25197;
  struct MonoArray * D.25200;
  struct MonoReflectionModuleBuilder * D.25204;
  struct MonoDynamicImage * D.25205;
  int D.25208;
  int D.25209;
  struct MonoClassField * D.25211;
  int D.25213;
  struct MonoArray * D.25219;
  struct MonoReflectionModuleBuilder * D.25221;
  struct MonoDynamicImage * D.25222;
  unsigned int D.25225;
  unsigned int D.25227;
  int D.25229;
  int iftmp.97;
  struct MonoGenericContainer * D.25236;
  unsigned int D.25238;
  int D.25240;
  unsigned int D.25243;
  int D.25245;
  unsigned int D.25248;
  int D.25253;
  int D.25255;
  int D.25257;
  int D.25259;
  struct MonoMethod * D.25260;
  long unsigned int D.25261;
  long unsigned int D.25262;
  struct MonoClass * D.25271;
  struct MonoImage * D.25272;
  struct MonoImage * D.25273;
  struct MonoGenericClass * D.25275;
  long unsigned int D.25277;
  long unsigned int D.25278;
  unsigned int method_table_idx.98;
  unsigned int method_table_idx.99;
  int D.25284;
  struct MonoClassField * D.25289;
  struct MonoClass * D.25290;
  struct MonoImage * D.25291;
  int D.25293;
  unsigned int field_table_idx.100;
  unsigned int field_table_idx.101;
  int D.25298;
  int D.25302;
  unsigned int D.25305;
  int D.25307;
  unsigned int D.25310;
  int D.25312;
  int D.25316;
  int D.25320;
  int D.25327;
  int D.25329;
  int D.25331;
  struct MonoType * D.25332;
  unsigned int D.25333;
  guint32 D.25336;
  struct MonoClass * klass;
  guint32 token;

  token = 0;
  D.25162 = obj->vtable;
  klass = D.25162->klass;
  D.25165 = klass->image;
  D.25166 = mono_defaults.corlib;
  if (D.25165 != D.25166) goto <D.25163>; else goto <D.25167>;
  <D.25167>:
  D.25168 = klass->name;
  D.25169 = strcmp (D.25168, "TypeDelegator");
  if (D.25169 == 0) goto <D.25163>; else goto <D.25164>;
  <D.25163>:
  D.25170 = mono_get_exception_not_supported ("User defined subclasses of System.Type are not yet supported");
  mono_raise_exception (D.25170);
  <D.25164>:
  D.25168 = klass->name;
  D.25171 = strcmp (D.25168, "MethodBuilder");
  if (D.25171 == 0) goto <D.25172>; else goto <D.25173>;
  <D.25172>:
  {
    struct MonoReflectionMethodBuilder * mb;
    struct MonoReflectionTypeBuilder * tb;

    mb = obj;
    tb = mb->type;
    D.25176 = tb->module;
    D.25177 = D.25176->dynamic_image;
    if (D.25177 == assembly) goto <D.25178>; else goto <D.25174>;
    <D.25178>:
    D.25179 = tb->generic_params;
    if (D.25179 == 0B) goto <D.25180>; else goto <D.25174>;
    <D.25180>:
    D.25181 = mb->generic_params;
    if (D.25181 == 0B) goto <D.25182>; else goto <D.25174>;
    <D.25182>:
    D.25183 = mb->table_idx;
    token = D.25183 | 100663296;
    goto <D.25175>;
    <D.25174>:
    token = mono_image_get_methodbuilder_token (assembly, mb, create_open_instance);
    <D.25175>:
  }
  goto <D.25184>;
  <D.25173>:
  D.25168 = klass->name;
  D.25185 = strcmp (D.25168, "ConstructorBuilder");
  if (D.25185 == 0) goto <D.25186>; else goto <D.25187>;
  <D.25186>:
  {
    struct MonoReflectionCtorBuilder * mb;
    struct MonoReflectionTypeBuilder * tb;

    mb = obj;
    tb = mb->type;
    D.25190 = tb->module;
    D.25191 = D.25190->dynamic_image;
    if (D.25191 == assembly) goto <D.25192>; else goto <D.25188>;
    <D.25192>:
    D.25193 = tb->generic_params;
    if (D.25193 == 0B) goto <D.25194>; else goto <D.25188>;
    <D.25194>:
    D.25195 = mb->table_idx;
    token = D.25195 | 100663296;
    goto <D.25189>;
    <D.25188>:
    token = mono_image_get_ctorbuilder_token (assembly, mb);
    <D.25189>:
  }
  goto <D.25196>;
  <D.25187>:
  D.25168 = klass->name;
  D.25197 = strcmp (D.25168, "FieldBuilder");
  if (D.25197 == 0) goto <D.25198>; else goto <D.25199>;
  <D.25198>:
  {
    struct MonoReflectionFieldBuilder * fb;
    struct MonoReflectionTypeBuilder * tb;

    fb = obj;
    tb = fb->typeb;
    D.25200 = tb->generic_params;
    if (D.25200 != 0B) goto <D.25201>; else goto <D.25202>;
    <D.25201>:
    token = mono_image_get_generic_field_token (assembly, fb);
    goto <D.25203>;
    <D.25202>:
    D.25204 = tb->module;
    D.25205 = D.25204->dynamic_image;
    if (D.25205 == assembly) goto <D.25206>; else goto <D.25207>;
    <D.25206>:
    D.25208 = fb->table_idx;
    D.25209 = D.25208 | 67108864;
    token = (guint32) D.25209;
    goto <D.25210>;
    <D.25207>:
    D.25211 = fb->handle;
    token = mono_image_get_fieldref_token (assembly, fb, D.25211);
    <D.25210>:
    <D.25203>:
  }
  goto <D.25212>;
  <D.25199>:
  D.25168 = klass->name;
  D.25213 = strcmp (D.25168, "TypeBuilder");
  if (D.25213 == 0) goto <D.25214>; else goto <D.25215>;
  <D.25214>:
  {
    struct MonoReflectionTypeBuilder * tb;

    tb = obj;
    if (create_open_instance != 0) goto <D.25218>; else goto <D.25216>;
    <D.25218>:
    D.25219 = tb->generic_params;
    if (D.25219 != 0B) goto <D.25220>; else goto <D.25216>;
    <D.25220>:
    {
      struct MonoType * type;

      init_type_builder_generics (obj);
      type = mono_reflection_type_get_handle (obj);
      token = mono_image_typedef_or_ref_full (assembly, type, 1);
      token = mono_metadata_token_from_dor (token);
    }
    goto <D.25217>;
    <D.25216>:
    D.25221 = tb->module;
    D.25222 = D.25221->dynamic_image;
    if (D.25222 == assembly) goto <D.25223>; else goto <D.25224>;
    <D.25223>:
    D.25225 = tb->table_idx;
    token = D.25225 | 33554432;
    goto <D.25226>;
    <D.25224>:
    {
      struct MonoType * type;

      type = mono_reflection_type_get_handle (obj);
      D.25227 = mono_image_typedef_or_ref (assembly, type);
      token = mono_metadata_token_from_dor (D.25227);
    }
    <D.25226>:
    <D.25217>:
  }
  goto <D.25228>;
  <D.25215>:
  D.25168 = klass->name;
  D.25229 = strcmp (D.25168, "MonoType");
  if (D.25229 == 0) goto <D.25230>; else goto <D.25231>;
  <D.25230>:
  {
    struct MonoType * type;
    struct MonoClass * mc;

    type = mono_reflection_type_get_handle (obj);
    mc = mono_class_from_mono_type (type);
    D.25236 = mc->generic_container;
    if (D.25236 == 0B) goto <D.25233>; else goto <D.25237>;
    <D.25237>:
    if (create_open_instance != 0) goto <D.25233>; else goto <D.25234>;
    <D.25233>:
    iftmp.97 = 1;
    goto <D.25235>;
    <D.25234>:
    iftmp.97 = 0;
    <D.25235>:
    D.25238 = mono_image_typedef_or_ref_full (assembly, type, iftmp.97);
    token = mono_metadata_token_from_dor (D.25238);
  }
  goto <D.25239>;
  <D.25231>:
  D.25168 = klass->name;
  D.25240 = strcmp (D.25168, "GenericTypeParameterBuilder");
  if (D.25240 == 0) goto <D.25241>; else goto <D.25242>;
  <D.25241>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    D.25243 = mono_image_typedef_or_ref (assembly, type);
    token = mono_metadata_token_from_dor (D.25243);
  }
  goto <D.25244>;
  <D.25242>:
  D.25168 = klass->name;
  D.25245 = strcmp (D.25168, "MonoGenericClass");
  if (D.25245 == 0) goto <D.25246>; else goto <D.25247>;
  <D.25246>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    D.25248 = mono_image_typedef_or_ref (assembly, type);
    token = mono_metadata_token_from_dor (D.25248);
  }
  goto <D.25249>;
  <D.25247>:
  D.25168 = klass->name;
  D.25253 = strcmp (D.25168, "MonoCMethod");
  if (D.25253 == 0) goto <D.25250>; else goto <D.25254>;
  <D.25254>:
  D.25168 = klass->name;
  D.25255 = strcmp (D.25168, "MonoMethod");
  if (D.25255 == 0) goto <D.25250>; else goto <D.25256>;
  <D.25256>:
  D.25168 = klass->name;
  D.25257 = strcmp (D.25168, "MonoGenericMethod");
  if (D.25257 == 0) goto <D.25250>; else goto <D.25258>;
  <D.25258>:
  D.25168 = klass->name;
  D.25259 = strcmp (D.25168, "MonoGenericCMethod");
  if (D.25259 == 0) goto <D.25250>; else goto <D.25251>;
  <D.25250>:
  {
    struct MonoReflectionMethod * m;

    m = obj;
    D.25260 = m->method;
    D.25261 = BIT_FIELD_REF <*D.25260, 64, 256>;
    D.25262 = D.25261 & 2251799813685248;
    if (D.25262 != 0) goto <D.25263>; else goto <D.25264>;
    <D.25263>:
    if (create_open_instance != 0) goto <D.25265>; else goto <D.25266>;
    <D.25265>:
    D.25260 = m->method;
    token = mono_image_get_methodspec_token (assembly, D.25260);
    goto <D.25267>;
    <D.25266>:
    D.25260 = m->method;
    token = mono_image_get_inflated_method_token (assembly, D.25260);
    <D.25267>:
    goto <D.25268>;
    <D.25264>:
    D.25260 = m->method;
    D.25271 = D.25260->klass;
    D.25272 = D.25271->image;
    D.25273 = &assembly->image;
    if (D.25272 == D.25273) goto <D.25274>; else goto <D.25269>;
    <D.25274>:
    D.25260 = m->method;
    D.25271 = D.25260->klass;
    D.25275 = D.25271->generic_class;
    if (D.25275 == 0B) goto <D.25276>; else goto <D.25269>;
    <D.25276>:
    {
      static guint32 method_table_idx = 16777215;

      D.25260 = m->method;
      D.25271 = D.25260->klass;
      D.25277 = BIT_FIELD_REF <*D.25271, 64, 256>;
      D.25278 = D.25277 & 72057594037927936;
      if (D.25278 != 0) goto <D.25279>; else goto <D.25280>;
      <D.25279>:
      D.25260 = m->method;
      token = D.25260->token;
      goto <D.25281>;
      <D.25280>:
      method_table_idx.98 = method_table_idx;
      method_table_idx.99 = method_table_idx.98 + 4294967295;
      method_table_idx = method_table_idx.99;
      method_table_idx.98 = method_table_idx;
      token = method_table_idx.98 | 100663296;
      <D.25281>:
    }
    goto <D.25270>;
    <D.25269>:
    D.25260 = m->method;
    token = mono_image_get_methodref_token (assembly, D.25260, create_open_instance);
    <D.25270>:
    <D.25268>:
  }
  goto <D.25252>;
  <D.25251>:
  D.25168 = klass->name;
  D.25284 = strcmp (D.25168, "MonoField");
  if (D.25284 == 0) goto <D.25285>; else goto <D.25286>;
  <D.25285>:
  {
    struct MonoReflectionField * f;

    f = obj;
    D.25289 = f->field;
    D.25290 = D.25289->parent;
    D.25291 = D.25290->image;
    D.25273 = &assembly->image;
    if (D.25291 == D.25273) goto <D.25292>; else goto <D.25287>;
    <D.25292>:
    D.25289 = f->field;
    D.25293 = is_field_on_inst (D.25289);
    if (D.25293 == 0) goto <D.25294>; else goto <D.25287>;
    <D.25294>:
    {
      static guint32 field_table_idx = 16777215;

      field_table_idx.100 = field_table_idx;
      field_table_idx.101 = field_table_idx.100 + 4294967295;
      field_table_idx = field_table_idx.101;
      field_table_idx.100 = field_table_idx;
      token = field_table_idx.100 | 67108864;
    }
    goto <D.25288>;
    <D.25287>:
    D.25289 = f->field;
    token = mono_image_get_fieldref_token (assembly, f, D.25289);
    <D.25288>:
  }
  goto <D.25297>;
  <D.25286>:
  D.25168 = klass->name;
  D.25298 = strcmp (D.25168, "MonoArrayMethod");
  if (D.25298 == 0) goto <D.25299>; else goto <D.25300>;
  <D.25299>:
  {
    struct MonoReflectionArrayMethod * m;

    m = obj;
    token = mono_image_get_array_token (assembly, m);
  }
  goto <D.25301>;
  <D.25300>:
  D.25168 = klass->name;
  D.25302 = strcmp (D.25168, "SignatureHelper");
  if (D.25302 == 0) goto <D.25303>; else goto <D.25304>;
  <D.25303>:
  {
    struct MonoReflectionSigHelper * s;

    s = obj;
    D.25305 = mono_image_get_sighelper_token (assembly, s);
    token = D.25305 | 285212672;
  }
  goto <D.25306>;
  <D.25304>:
  D.25168 = klass->name;
  D.25307 = strcmp (D.25168, "EnumBuilder");
  if (D.25307 == 0) goto <D.25308>; else goto <D.25309>;
  <D.25308>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    D.25310 = mono_image_typedef_or_ref (assembly, type);
    token = mono_metadata_token_from_dor (D.25310);
  }
  goto <D.25311>;
  <D.25309>:
  D.25168 = klass->name;
  D.25312 = strcmp (D.25168, "FieldOnTypeBuilderInst");
  if (D.25312 == 0) goto <D.25313>; else goto <D.25314>;
  <D.25313>:
  {
    struct MonoReflectionFieldOnTypeBuilderInst * f;

    f = obj;
    token = mono_image_get_field_on_inst_token (assembly, f);
  }
  goto <D.25315>;
  <D.25314>:
  D.25168 = klass->name;
  D.25316 = strcmp (D.25168, "ConstructorOnTypeBuilderInst");
  if (D.25316 == 0) goto <D.25317>; else goto <D.25318>;
  <D.25317>:
  {
    struct MonoReflectionCtorOnTypeBuilderInst * c;

    c = obj;
    token = mono_image_get_ctor_on_inst_token (assembly, c, create_open_instance);
  }
  goto <D.25319>;
  <D.25318>:
  D.25168 = klass->name;
  D.25320 = strcmp (D.25168, "MethodOnTypeBuilderInst");
  if (D.25320 == 0) goto <D.25321>; else goto <D.25322>;
  <D.25321>:
  {
    struct MonoReflectionMethodOnTypeBuilderInst * m;

    m = obj;
    token = mono_image_get_method_on_inst_token (assembly, m, create_open_instance);
  }
  goto <D.25323>;
  <D.25322>:
  D.25327 = is_sre_array (klass);
  if (D.25327 != 0) goto <D.25324>; else goto <D.25328>;
  <D.25328>:
  D.25329 = is_sre_byref (klass);
  if (D.25329 != 0) goto <D.25324>; else goto <D.25330>;
  <D.25330>:
  D.25331 = is_sre_pointer (klass);
  if (D.25331 != 0) goto <D.25324>; else goto <D.25325>;
  <D.25324>:
  {
    struct MonoReflectionType * type;

    type = obj;
    D.25332 = mono_reflection_type_get_handle (type);
    D.25333 = mono_image_typedef_or_ref (assembly, D.25332);
    token = mono_metadata_token_from_dor (D.25333);
  }
  goto <D.25326>;
  <D.25325>:
  D.25168 = klass->name;
  monoeg_g_log (0B, 4, "requested token for %s\n", D.25168);
  <D.20413>:
  goto <D.20413>;
  <D.25326>:
  <D.25323>:
  <D.25319>:
  <D.25315>:
  <D.25311>:
  <D.25306>:
  <D.25301>:
  <D.25297>:
  <D.25252>:
  <D.25249>:
  <D.25244>:
  <D.25239>:
  <D.25228>:
  <D.25212>:
  <D.25196>:
  <D.25184>:
  if (register_token != 0) goto <D.25334>; else goto <D.25335>;
  <D.25334>:
  mono_image_register_token (assembly, token, obj);
  <D.25335>:
  D.25336 = token;
  return D.25336;
}


mono_image_get_methodbuilder_token (struct MonoDynamicImage * assembly, struct MonoReflectionMethodBuilder * mb, gboolean create_methodspec)
{
  struct MonoArray * D.25338;
  guint32 D.25343;
  struct MonoGHashTable * D.25344;
  void * D.25345;
  long int D.25346;
  long unsigned int D.25349;
  void * D.25350;
  guint32 token;

  D.25338 = mb->generic_params;
  if (D.25338 != 0B) goto <D.25339>; else goto <D.25340>;
  <D.25339>:
  if (create_methodspec != 0) goto <D.25341>; else goto <D.25342>;
  <D.25341>:
  D.25343 = mono_image_get_methodspec_token_for_generic_method_definition (assembly, mb);
  return D.25343;
  <D.25342>:
  <D.25340>:
  D.25344 = assembly->handleref_managed;
  D.25345 = mono_g_hash_table_lookup (D.25344, mb);
  D.25346 = (long int) D.25345;
  token = (guint32) D.25346;
  if (token != 0) goto <D.25347>; else goto <D.25348>;
  <D.25347>:
  D.25343 = token;
  return D.25343;
  <D.25348>:
  token = mono_image_get_methodref_token_for_methodbuilder (assembly, mb);
  D.25344 = assembly->handleref_managed;
  D.25349 = (long unsigned int) token;
  D.25350 = (void *) D.25349;
  mono_g_hash_table_insert (D.25344, mb, D.25350);
  D.25343 = token;
  return D.25343;
}


mono_image_get_methodspec_token_for_generic_method_definition (struct MonoDynamicImage * assembly, struct MonoReflectionMethodBuilder * mb)
{
  struct MonoGHashTable * D.25352;
  void * D.25353;
  long int D.25354;
  guint32 D.25357;
  unsigned int D.25358;
  unsigned int D.25359;
  unsigned int D.25360;
  int D.25361;
  unsigned int D.25364;
  unsigned int D.25365;
  guint32 * D.25366;
  unsigned int D.25367;
  unsigned int D.25368;
  long unsigned int D.25369;
  long unsigned int D.25370;
  guint32 * D.25371;
  unsigned int D.25372;
  unsigned int D.25373;
  long unsigned int D.25374;
  void * D.25375;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 token;
  guint32 mtoken;

  mtoken = 0;
  D.25352 = assembly->methodspec;
  D.25353 = mono_g_hash_table_lookup (D.25352, mb);
  D.25354 = (long int) D.25353;
  token = (guint32) D.25354;
  if (token != 0) goto <D.25355>; else goto <D.25356>;
  <D.25355>:
  D.25357 = token;
  return D.25357;
  <D.25356>:
  table = &assembly->tables[43];
  mtoken = mono_image_get_methodref_token_for_methodbuilder (assembly, mb);
  D.25358 = mtoken >> 24;
  switch (D.25358) <default: <D.19594>, case 6: <D.19593>, case 10: <D.19591>>
  <D.19591>:
  D.25359 = mtoken << 1;
  D.25360 = D.25359 & 33554430;
  mtoken = D.25360 | 1;
  goto <D.19592>;
  <D.19593>:
  D.25359 = mtoken << 1;
  mtoken = D.25359 & 33554430;
  goto <D.19592>;
  <D.19594>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 2637);
  <D.19592>:
  D.25361 = assembly->save;
  if (D.25361 != 0) goto <D.25362>; else goto <D.25363>;
  <D.25362>:
  D.25364 = table->rows;
  D.25365 = D.25364 + 1;
  alloc_table (table, D.25365);
  D.25366 = table->values;
  D.25367 = table->next_idx;
  D.25368 = D.25367 * 2;
  D.25369 = (long unsigned int) D.25368;
  D.25370 = D.25369 * 4;
  values = D.25366 + D.25370;
  *values = mtoken;
  D.25371 = values + 4;
  D.25372 = encode_generic_method_definition_sig (assembly, mb);
  *D.25371 = D.25372;
  <D.25363>:
  D.25367 = table->next_idx;
  token = D.25367 | 721420288;
  D.25367 = table->next_idx;
  D.25373 = D.25367 + 1;
  table->next_idx = D.25373;
  D.25352 = assembly->methodspec;
  D.25374 = (long unsigned int) token;
  D.25375 = (void *) D.25374;
  mono_g_hash_table_insert (D.25352, mb, D.25375);
  D.25357 = token;
  return D.25357;
}


encode_generic_method_definition_sig (struct MonoDynamicImage * assembly, struct MonoReflectionMethodBuilder * mb)
{
  struct MonoArray * D.25377;
  long unsigned int D.25378;
  int D.25379;
  guint32 D.25382;
  unsigned int i.102;
  struct SigBuffer buf;
  int i;
  guint32 nparams;
  guint32 idx;

  try
    {
      D.25377 = mb->generic_params;
      D.25378 = mono_array_length (D.25377);
      nparams = (guint32) D.25378;
      D.25379 = assembly->save;
      if (D.25379 == 0) goto <D.25380>; else goto <D.25381>;
      <D.25380>:
      D.25382 = 0;
      return D.25382;
      <D.25381>:
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 10);
      sigbuffer_add_value (&buf, nparams);
      i = 0;
      goto <D.19581>;
      <D.19580>:
      sigbuffer_add_value (&buf, 30);
      i.102 = (unsigned int) i;
      sigbuffer_add_value (&buf, i.102);
      i = i + 1;
      <D.19581>:
      i.102 = (unsigned int) i;
      if (i.102 < nparams) goto <D.19580>; else goto <D.19582>;
      <D.19582>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.25382 = idx;
      return D.25382;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_get_methodref_token_for_methodbuilder (struct MonoDynamicImage * assembly, struct MonoReflectionMethodBuilder * method)
{
  struct GHashTable * D.25386;
  void * D.25387;
  long int D.25388;
  guint32 D.25391;
  struct MonoString * D.25392;
  unsigned int D.25393;
  unsigned int D.25394;
  unsigned int D.25399;
  struct MonoArray * D.25400;
  struct MonoObject * D.25404;
  struct MonoType * D.25405;
  long unsigned int D.25406;
  void * D.25407;
  guint32 token;
  guint32 parent;
  guint32 sig;
  struct ReflectionMethodBuilder rmb;
  char * name;
  struct MonoReflectionTypeBuilder * tb;

  try
    {
      tb = method->type;
      D.25386 = assembly->handleref;
      D.25387 = monoeg_g_hash_table_lookup (D.25386, method);
      D.25388 = (long int) D.25387;
      token = (guint32) D.25388;
      if (token != 0) goto <D.25389>; else goto <D.25390>;
      <D.25389>:
      D.25391 = token;
      return D.25391;
      <D.25390>:
      D.25392 = method->name;
      name = mono_string_to_utf8 (D.25392);
      reflection_methodbuilder_from_method_builder (&rmb, method);
      D.25393 = rmb.call_conv;
      D.25394 = D.25393 & 4294967199;
      if (D.25394 != 0) goto <D.25395>; else goto <D.25396>;
      <D.25395>:
      D.25393 = rmb.call_conv;
      D.25394 = D.25393 & 4294967199;
      if (D.25394 != 5) goto <D.25397>; else goto <D.25398>;
      <D.25397>:
      D.25393 = rmb.call_conv;
      D.25399 = D.25393 & 96;
      rmb.call_conv = D.25399;
      <D.25398>:
      <D.25396>:
      sig = method_builder_encode_signature (assembly, &rmb);
      D.25400 = tb->generic_params;
      if (D.25400 != 0B) goto <D.25401>; else goto <D.25402>;
      <D.25401>:
      parent = create_generic_typespec (assembly, tb);
      goto <D.25403>;
      <D.25402>:
      D.25404 = rmb.type;
      D.25405 = mono_reflection_type_get_handle (D.25404);
      parent = mono_image_typedef_or_ref (assembly, D.25405);
      <D.25403>:
      token = mono_image_add_memberef_row (assembly, parent, name, sig);
      monoeg_g_free (name);
      D.25386 = assembly->handleref;
      D.25406 = (long unsigned int) token;
      D.25407 = (void *) D.25406;
      monoeg_g_hash_table_insert_replace (D.25386, method, D.25407, 0);
      D.25391 = token;
      return D.25391;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


create_generic_typespec (struct MonoDynamicImage * assembly, struct MonoReflectionTypeBuilder * tb)
{
  struct GHashTable * D.25410;
  void * D.25411;
  long int D.25412;
  guint32 D.25415;
  struct MonoArray * D.25416;
  _Bool D.25417;
  long int D.25418;
  long int D.25419;
  struct MonoGenericContainer * D.25422;
  struct MonoGenericContainer * D.25425;
  _Bool D.25426;
  long int D.25427;
  long int D.25428;
  unsigned char D.25431;
  unsigned int D.25432;
  struct MonoType * D.25433;
  unsigned int D.25434;
  long unsigned int D.25435;
  unsigned int count.103;
  long unsigned int D.25437;
  char * D.25438;
  struct MonoType * D.25439;
  int D.25440;
  unsigned int D.25443;
  unsigned int D.25444;
  guint32 * D.25445;
  unsigned int D.25446;
  long unsigned int D.25447;
  long unsigned int D.25448;
  unsigned int D.25449;
  long unsigned int D.25450;
  void * D.25451;
  unsigned int D.25452;
  struct MonoDynamicTable * table;
  struct MonoClass * klass;
  struct MonoType * type;
  guint32 * values;
  guint32 token;
  struct SigBuffer buf;
  int count;
  int i;

  try
    {
      type = mono_reflection_type_get_handle (tb);
      D.25410 = assembly->typespec;
      D.25411 = monoeg_g_hash_table_lookup (D.25410, type);
      D.25412 = (long int) D.25411;
      token = (guint32) D.25412;
      if (token != 0) goto <D.25413>; else goto <D.25414>;
      <D.25413>:
      D.25415 = token;
      return D.25415;
      <D.25414>:
      sigbuffer_init (&buf, 32);
      D.25416 = tb->generic_params;
      D.25417 = D.25416 == 0B;
      D.25418 = (long int) D.25417;
      D.25419 = __builtin_expect (D.25418, 0);
      if (D.25419 != 0) goto <D.25420>; else goto <D.25421>;
      <D.25420>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3096, "tb->generic_params");
      <D.25421>:
      klass = mono_class_from_mono_type (type);
      D.25422 = tb->generic_container;
      if (D.25422 != 0B) goto <D.25423>; else goto <D.25424>;
      <D.25423>:
      mono_reflection_create_generic_class (tb);
      <D.25424>:
      sigbuffer_add_value (&buf, 21);
      D.25425 = klass->generic_container;
      D.25426 = D.25425 == 0B;
      D.25427 = (long int) D.25426;
      D.25428 = __builtin_expect (D.25427, 0);
      if (D.25428 != 0) goto <D.25429>; else goto <D.25430>;
      <D.25429>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3103, "klass->generic_container");
      <D.25430>:
      D.25431 = klass->byval_arg.type;
      D.25432 = (unsigned int) D.25431;
      sigbuffer_add_value (&buf, D.25432);
      D.25433 = &klass->byval_arg;
      D.25434 = mono_image_typedef_or_ref_full (assembly, D.25433, 0);
      sigbuffer_add_value (&buf, D.25434);
      D.25416 = tb->generic_params;
      D.25435 = mono_array_length (D.25416);
      count = (int) D.25435;
      count.103 = (unsigned int) count;
      sigbuffer_add_value (&buf, count.103);
      i = 0;
      goto <D.19747>;
      <D.19746>:
      {
        struct MonoReflectionGenericParam * gparam;

        D.25416 = tb->generic_params;
        D.25437 = (long unsigned int) i;
        D.25438 = mono_array_addr_with_size (D.25416, 8, D.25437);
        gparam = MEM[(struct MonoReflectionGenericParam * *)D.25438];
        D.25439 = mono_reflection_type_get_handle (gparam);
        encode_type (assembly, D.25439, &buf);
      }
      i = i + 1;
      <D.19747>:
      if (i < count) goto <D.19746>; else goto <D.19748>;
      <D.19748>:
      table = &assembly->tables[27];
      D.25440 = assembly->save;
      if (D.25440 != 0) goto <D.25441>; else goto <D.25442>;
      <D.25441>:
      token = sigbuffer_add_to_blob_cached (assembly, &buf);
      D.25443 = table->rows;
      D.25444 = D.25443 + 1;
      alloc_table (table, D.25444);
      D.25445 = table->values;
      D.25446 = table->next_idx;
      D.25447 = (long unsigned int) D.25446;
      D.25448 = D.25447 * 4;
      values = D.25445 + D.25448;
      *values = token;
      <D.25442>:
      sigbuffer_free (&buf);
      D.25446 = table->next_idx;
      D.25449 = D.25446 << 2;
      token = D.25449 | 2;
      D.25410 = assembly->typespec;
      D.25450 = (long unsigned int) token;
      D.25451 = (void *) D.25450;
      monoeg_g_hash_table_insert_replace (D.25410, type, D.25451, 0);
      D.25446 = table->next_idx;
      D.25452 = D.25446 + 1;
      table->next_idx = D.25452;
      D.25415 = token;
      return D.25415;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_add_memberef_row (struct MonoDynamicImage * assembly, guint32 parent, const char * name, guint32 sig)
{
  unsigned int D.25455;
  guint32 D.25456;
  int D.25457;
  unsigned int D.25460;
  unsigned int D.25461;
  guint32 * D.25462;
  unsigned int D.25463;
  unsigned int D.25464;
  long unsigned int D.25465;
  long unsigned int D.25466;
  unsigned int D.25467;
  unsigned int D.25468;
  guint32 * D.25469;
  struct MonoDynamicStream * D.25470;
  unsigned int D.25471;
  guint32 * D.25472;
  unsigned int D.25473;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 token;
  guint32 pclass;

  D.25455 = parent & 3;
  switch (D.25455) <default: <D.19536>, case 0: <D.19535>, case 1: <D.19532>, case 2: <D.19534>>
  <D.19532>:
  pclass = 1;
  goto <D.19533>;
  <D.19534>:
  pclass = 4;
  goto <D.19533>;
  <D.19535>:
  pclass = 0;
  goto <D.19533>;
  <D.19536>:
  monoeg_g_log (0B, 16, "unknown typeref or def token 0x%08x for %s", parent, name);
  D.25456 = 0;
  return D.25456;
  <D.19533>:
  parent = parent >> 2;
  table = &assembly->tables[10];
  D.25457 = assembly->save;
  if (D.25457 != 0) goto <D.25458>; else goto <D.25459>;
  <D.25458>:
  D.25460 = table->rows;
  D.25461 = D.25460 + 1;
  alloc_table (table, D.25461);
  D.25462 = table->values;
  D.25463 = table->next_idx;
  D.25464 = D.25463 * 3;
  D.25465 = (long unsigned int) D.25464;
  D.25466 = D.25465 * 4;
  values = D.25462 + D.25466;
  D.25467 = parent << 3;
  D.25468 = D.25467 | pclass;
  *values = D.25468;
  D.25469 = values + 4;
  D.25470 = &assembly->sheap;
  D.25471 = string_heap_insert (D.25470, name);
  *D.25469 = D.25471;
  D.25472 = values + 8;
  *D.25472 = sig;
  <D.25459>:
  D.25463 = table->next_idx;
  token = D.25463 | 167772160;
  D.25463 = table->next_idx;
  D.25473 = D.25463 + 1;
  table->next_idx = D.25473;
  D.25456 = token;
  return D.25456;
}


mono_image_get_ctorbuilder_token (struct MonoDynamicImage * assembly, struct MonoReflectionCtorBuilder * mb)
{
  struct MonoGHashTable * D.25475;
  void * D.25476;
  long int D.25477;
  guint32 D.25480;
  struct MonoArray * D.25481;
  struct MonoType * D.25485;
  struct MonoString * D.25486;
  long unsigned int D.25487;
  void * D.25488;
  guint32 token;
  guint32 parent;
  guint32 sig;
  struct ReflectionMethodBuilder rmb;
  char * name;
  struct MonoReflectionTypeBuilder * tb;

  try
    {
      tb = mb->type;
      D.25475 = assembly->handleref_managed;
      D.25476 = mono_g_hash_table_lookup (D.25475, mb);
      D.25477 = (long int) D.25476;
      token = (guint32) D.25477;
      if (token != 0) goto <D.25478>; else goto <D.25479>;
      <D.25478>:
      D.25480 = token;
      return D.25480;
      <D.25479>:
      reflection_methodbuilder_from_ctor_builder (&rmb, mb);
      D.25481 = tb->generic_params;
      if (D.25481 != 0B) goto <D.25482>; else goto <D.25483>;
      <D.25482>:
      parent = create_generic_typespec (assembly, tb);
      goto <D.25484>;
      <D.25483>:
      D.25485 = mono_reflection_type_get_handle (tb);
      parent = mono_image_typedef_or_ref (assembly, D.25485);
      <D.25484>:
      D.25486 = rmb.name;
      name = mono_string_to_utf8 (D.25486);
      sig = method_builder_encode_signature (assembly, &rmb);
      token = mono_image_add_memberef_row (assembly, parent, name, sig);
      monoeg_g_free (name);
      D.25475 = assembly->handleref_managed;
      D.25487 = (long unsigned int) token;
      D.25488 = (void *) D.25487;
      mono_g_hash_table_insert (D.25475, mb, D.25488);
      D.25480 = token;
      return D.25480;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


mono_image_get_generic_field_token (struct MonoDynamicImage * assembly, struct MonoReflectionFieldBuilder * fb)
{
  struct MonoGHashTable * D.25491;
  void * D.25492;
  long int D.25493;
  guint32 D.25496;
  struct MonoReflectionType * D.25497;
  struct MonoType * D.25498;
  struct MonoString * D.25499;
  struct MonoObject * D.25500;
  struct MonoArray * D.25503;
  struct MonoArray * D.25505;
  unsigned int D.25506;
  _Bool D.25507;
  long int D.25508;
  long int D.25509;
  int D.25512;
  unsigned int D.25515;
  unsigned int D.25516;
  guint32 * D.25517;
  unsigned int D.25518;
  unsigned int D.25519;
  long unsigned int D.25520;
  long unsigned int D.25521;
  unsigned int D.25522;
  unsigned int D.25523;
  guint32 * D.25524;
  struct MonoDynamicStream * D.25525;
  unsigned int D.25526;
  guint32 * D.25527;
  unsigned int D.25528;
  long unsigned int D.25529;
  void * D.25530;
  struct MonoDynamicTable * table;
  struct MonoClass * klass;
  struct MonoType * custom;
  struct MonoType * type;
  guint32 * values;
  guint32 token;
  guint32 pclass;
  guint32 parent;
  guint32 sig;
  gchar * name;

  custom = 0B;
  D.25491 = assembly->handleref_managed;
  D.25492 = mono_g_hash_table_lookup (D.25491, fb);
  D.25493 = (long int) D.25492;
  token = (guint32) D.25493;
  if (token != 0) goto <D.25494>; else goto <D.25495>;
  <D.25494>:
  D.25496 = token;
  return D.25496;
  <D.25495>:
  D.25497 = fb->typeb;
  D.25498 = mono_reflection_type_get_handle (D.25497);
  klass = mono_class_from_mono_type (D.25498);
  D.25499 = fb->name;
  name = mono_string_to_utf8 (D.25499);
  D.25500 = fb->type;
  init_type_builder_generics (D.25500);
  D.25500 = fb->type;
  type = mono_reflection_type_get_handle (D.25500);
  D.25503 = fb->modreq;
  if (D.25503 != 0B) goto <D.25501>; else goto <D.25504>;
  <D.25504>:
  D.25505 = fb->modopt;
  if (D.25505 != 0B) goto <D.25501>; else goto <D.25502>;
  <D.25501>:
  D.25503 = fb->modreq;
  D.25505 = fb->modopt;
  custom = add_custom_modifiers (assembly, type, D.25503, D.25505);
  type = custom;
  <D.25502>:
  sig = fieldref_encode_signature (assembly, 0B, type);
  monoeg_g_free (custom);
  D.25497 = fb->typeb;
  parent = create_generic_typespec (assembly, D.25497);
  D.25506 = parent & 3;
  D.25507 = D.25506 != 2;
  D.25508 = (long int) D.25507;
  D.25509 = __builtin_expect (D.25508, 0);
  if (D.25509 != 0) goto <D.25510>; else goto <D.25511>;
  <D.25510>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3220, "(parent & MONO_TYPEDEFORREF_MASK) == MONO_TYPEDEFORREF_TYPESPEC");
  <D.25511>:
  pclass = 4;
  parent = parent >> 2;
  table = &assembly->tables[10];
  D.25512 = assembly->save;
  if (D.25512 != 0) goto <D.25513>; else goto <D.25514>;
  <D.25513>:
  D.25515 = table->rows;
  D.25516 = D.25515 + 1;
  alloc_table (table, D.25516);
  D.25517 = table->values;
  D.25518 = table->next_idx;
  D.25519 = D.25518 * 3;
  D.25520 = (long unsigned int) D.25519;
  D.25521 = D.25520 * 4;
  values = D.25517 + D.25521;
  D.25522 = parent << 3;
  D.25523 = D.25522 | pclass;
  *values = D.25523;
  D.25524 = values + 4;
  D.25525 = &assembly->sheap;
  D.25526 = string_heap_insert (D.25525, name);
  *D.25524 = D.25526;
  D.25527 = values + 8;
  *D.25527 = sig;
  <D.25514>:
  D.25518 = table->next_idx;
  token = D.25518 | 167772160;
  D.25518 = table->next_idx;
  D.25528 = D.25518 + 1;
  table->next_idx = D.25528;
  D.25491 = assembly->handleref_managed;
  D.25529 = (long unsigned int) token;
  D.25530 = (void *) D.25529;
  mono_g_hash_table_insert (D.25491, fb, D.25530);
  monoeg_g_free (name);
  D.25496 = token;
  return D.25496;
}


add_custom_modifiers (struct MonoDynamicImage * assembly, struct MonoType * type, struct MonoArray * modreq, struct MonoArray * modopt)
{
  long unsigned int D.25534;
  unsigned int D.25535;
  unsigned int count.104;
  unsigned int D.25537;
  long unsigned int D.25540;
  unsigned int D.25541;
  unsigned int D.25542;
  struct MonoType * D.25545;
  long unsigned int D.25546;
  long unsigned int D.25547;
  unsigned int D.25548;
  unsigned int D.25549;
  long unsigned int D.25550;
  unsigned char D.25551;
  <unnamed-unsigned:6> D.25552;
  long unsigned int D.25555;
  char * D.25556;
  void * D.25557;
  unsigned int D.25558;
  <unnamed-unsigned:31> D.25559;
  long unsigned int D.25560;
  char * D.25563;
  void * D.25564;
  unsigned int D.25565;
  <unnamed-unsigned:31> D.25566;
  long unsigned int D.25567;
  int i;
  int count;
  int len;
  int pos;
  struct MonoType * t;

  count = 0;
  if (modreq != 0B) goto <D.25532>; else goto <D.25533>;
  <D.25532>:
  D.25534 = mono_array_length (modreq);
  D.25535 = (unsigned int) D.25534;
  count.104 = (unsigned int) count;
  D.25537 = D.25535 + count.104;
  count = (int) D.25537;
  <D.25533>:
  if (modopt != 0B) goto <D.25538>; else goto <D.25539>;
  <D.25538>:
  D.25540 = mono_array_length (modopt);
  D.25541 = (unsigned int) D.25540;
  count.104 = (unsigned int) count;
  D.25542 = D.25541 + count.104;
  count = (int) D.25542;
  <D.25539>:
  if (count == 0) goto <D.25543>; else goto <D.25544>;
  <D.25543>:
  D.25545 = mono_metadata_type_dup (0B, type);
  return D.25545;
  <D.25544>:
  D.25546 = (long unsigned int) count;
  D.25547 = D.25546 + 3;
  D.25548 = (unsigned int) D.25547;
  D.25549 = D.25548 * 4;
  len = (int) D.25549;
  D.25550 = (long unsigned int) len;
  t = monoeg_malloc (D.25550);
  memcpy (t, type, 12);
  D.25551 = (unsigned char) count;
  D.25552 = (<unnamed-unsigned:6>) D.25551;
  t->num_mods = D.25552;
  pos = 0;
  if (modreq != 0B) goto <D.25553>; else goto <D.25554>;
  <D.25553>:
  i = 0;
  goto <D.19762>;
  <D.19761>:
  {
    struct MonoType * mod;

    D.25555 = (long unsigned int) i;
    D.25556 = mono_array_addr_with_size (modreq, 8, D.25555);
    D.25557 = MEM[(void * *)D.25556];
    mod = mono_reflection_type_get_handle (D.25557);
    t->modifiers[pos].required = 1;
    D.25558 = mono_image_typedef_or_ref (assembly, mod);
    D.25559 = (<unnamed-unsigned:31>) D.25558;
    t->modifiers[pos].token = D.25559;
    pos = pos + 1;
  }
  i = i + 1;
  <D.19762>:
  D.25555 = (long unsigned int) i;
  D.25560 = mono_array_length (modreq);
  if (D.25555 < D.25560) goto <D.19761>; else goto <D.19763>;
  <D.19763>:
  <D.25554>:
  if (modopt != 0B) goto <D.25561>; else goto <D.25562>;
  <D.25561>:
  i = 0;
  goto <D.19766>;
  <D.19765>:
  {
    struct MonoType * mod;

    D.25555 = (long unsigned int) i;
    D.25563 = mono_array_addr_with_size (modopt, 8, D.25555);
    D.25564 = MEM[(void * *)D.25563];
    mod = mono_reflection_type_get_handle (D.25564);
    t->modifiers[pos].required = 0;
    D.25565 = mono_image_typedef_or_ref (assembly, mod);
    D.25566 = (<unnamed-unsigned:31>) D.25565;
    t->modifiers[pos].token = D.25566;
    pos = pos + 1;
  }
  i = i + 1;
  <D.19766>:
  D.25555 = (long unsigned int) i;
  D.25567 = mono_array_length (modopt);
  if (D.25555 < D.25567) goto <D.19765>; else goto <D.19767>;
  <D.19767>:
  <D.25562>:
  D.25545 = t;
  return D.25545;
}


fieldref_encode_signature (struct MonoDynamicImage * assembly, struct MonoImage * field_image, struct MonoType * type)
{
  int D.25569;
  guint32 D.25572;
  long unsigned int D.25573;
  long unsigned int D.25574;
  <unnamed-unsigned:31> D.25579;
  unsigned int D.25580;
  _Bool D.25581;
  long int D.25582;
  long int D.25583;
  struct MonoType * D.25586;
  <unnamed-unsigned:1> D.25588;
  <unnamed-unsigned:6> D.25592;
  unsigned int D.25593;
  struct SigBuffer buf;
  guint32 idx;
  guint32 i;
  guint32 token;

  try
    {
      D.25569 = assembly->save;
      if (D.25569 == 0) goto <D.25570>; else goto <D.25571>;
      <D.25570>:
      D.25572 = 0;
      return D.25572;
      <D.25571>:
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 6);
      D.25573 = BIT_FIELD_REF <*type, 64, 64>;
      D.25574 = D.25573 & 1082331758592;
      if (D.25574 != 0) goto <D.25575>; else goto <D.25576>;
      <D.25575>:
      i = 0;
      goto <D.19339>;
      <D.19338>:
      if (field_image != 0B) goto <D.25577>; else goto <D.25578>;
      <D.25577>:
      {
        struct MonoClass * class;

        D.25579 = type->modifiers[i].token;
        D.25580 = (unsigned int) D.25579;
        class = mono_class_get (field_image, D.25580);
        D.25581 = class == 0B;
        D.25582 = (long int) D.25581;
        D.25583 = __builtin_expect (D.25582, 0);
        if (D.25583 != 0) goto <D.25584>; else goto <D.25585>;
        <D.25584>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 1706, "class");
        <D.25585>:
        D.25586 = &class->byval_arg;
        token = mono_image_typedef_or_ref (assembly, D.25586);
      }
      goto <D.25587>;
      <D.25578>:
      D.25579 = type->modifiers[i].token;
      token = (guint32) D.25579;
      <D.25587>:
      D.25588 = type->modifiers[i].required;
      if (D.25588 != 0) goto <D.25589>; else goto <D.25590>;
      <D.25589>:
      sigbuffer_add_byte (&buf, 31);
      goto <D.25591>;
      <D.25590>:
      sigbuffer_add_byte (&buf, 32);
      <D.25591>:
      sigbuffer_add_value (&buf, token);
      i = i + 1;
      <D.19339>:
      D.25592 = type->num_mods;
      D.25593 = (unsigned int) D.25592;
      if (D.25593 > i) goto <D.19338>; else goto <D.19340>;
      <D.19340>:
      <D.25576>:
      encode_type (assembly, type, &buf);
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.25572 = idx;
      return D.25572;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_get_methodspec_token (struct MonoDynamicImage * assembly, struct MonoMethod * method)
{
  struct GHashTable * D.25596;
  void * D.25597;
  long int D.25598;
  guint32 D.25601;
  long unsigned int D.25602;
  long unsigned int D.25603;
  _Bool D.25604;
  long int D.25605;
  long int D.25606;
  struct MonoMethod * D.25609;
  struct MonoMethodSignature * D.25610;
  short unsigned int D.25611;
  struct MonoMethodSignature * D.25615;
  struct MonoClass * D.25616;
  struct MonoType * D.25617;
  const char * D.25618;
  long unsigned int D.25619;
  void * D.25620;
  struct MonoMethodInflated * imethod;
  guint32 token;

  D.25596 = assembly->handleref;
  D.25597 = monoeg_g_hash_table_lookup (D.25596, method);
  D.25598 = (long int) D.25597;
  token = (guint32) D.25598;
  if (token != 0) goto <D.25599>; else goto <D.25600>;
  <D.25599>:
  D.25601 = token;
  return D.25601;
  <D.25600>:
  D.25602 = BIT_FIELD_REF <*method, 64, 256>;
  D.25603 = D.25602 & 2251799813685248;
  D.25604 = D.25603 == 0;
  D.25605 = (long int) D.25604;
  D.25606 = __builtin_expect (D.25605, 0);
  if (D.25606 != 0) goto <D.25607>; else goto <D.25608>;
  <D.25607>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3044, "method->is_inflated");
  <D.25608>:
  imethod = method;
  D.25609 = imethod->declaring;
  D.25610 = mono_method_signature (D.25609);
  D.25611 = D.25610->generic_param_count;
  if (D.25611 != 0) goto <D.25612>; else goto <D.25613>;
  <D.25612>:
  token = method_encode_methodspec (assembly, method);
  goto <D.25614>;
  <D.25613>:
  {
    guint32 sig;

    D.25609 = imethod->declaring;
    D.25615 = mono_method_signature (D.25609);
    sig = method_encode_signature (assembly, D.25615);
    D.25616 = method->klass;
    D.25617 = &D.25616->byval_arg;
    D.25618 = method->name;
    token = mono_image_get_memberref_token (assembly, D.25617, D.25618, sig);
  }
  <D.25614>:
  D.25596 = assembly->handleref;
  D.25619 = (long unsigned int) token;
  D.25620 = (void *) D.25619;
  monoeg_g_hash_table_insert_replace (D.25596, method, D.25620, 0);
  D.25601 = token;
  return D.25601;
}


method_encode_methodspec (struct MonoDynamicImage * assembly, struct MonoMethod * method)
{
  long unsigned int D.25622;
  long unsigned int D.25623;
  _Bool D.25624;
  long int D.25625;
  long int D.25626;
  struct MonoMethodSignature * D.25629;
  struct MonoClass * D.25630;
  struct MonoType * D.25631;
  const char * D.25632;
  struct MonoMethodSignature * D.25633;
  short unsigned int D.25634;
  guint32 D.25637;
  unsigned int D.25638;
  unsigned int D.25639;
  unsigned int D.25640;
  struct MonoGenericContext * D.25641;
  int D.25642;
  unsigned int D.25645;
  unsigned int D.25646;
  guint32 * D.25647;
  unsigned int D.25648;
  unsigned int D.25649;
  long unsigned int D.25650;
  long unsigned int D.25651;
  guint32 * D.25652;
  unsigned int D.25653;
  struct MonoDynamicTable * table;
  guint32 * values;
  guint32 token;
  guint32 mtoken;
  guint32 sig;
  struct MonoMethodInflated * imethod;
  struct MonoMethod * declaring;

  mtoken = 0;
  table = &assembly->tables[43];
  D.25622 = BIT_FIELD_REF <*method, 64, 256>;
  D.25623 = D.25622 & 2251799813685248;
  D.25624 = D.25623 == 0;
  D.25625 = (long int) D.25624;
  D.25626 = __builtin_expect (D.25625, 0);
  if (D.25626 != 0) goto <D.25627>; else goto <D.25628>;
  <D.25627>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2998, "method->is_inflated");
  <D.25628>:
  imethod = method;
  declaring = imethod->declaring;
  D.25629 = mono_method_signature (declaring);
  sig = method_encode_signature (assembly, D.25629);
  D.25630 = method->klass;
  D.25631 = &D.25630->byval_arg;
  D.25632 = declaring->name;
  mtoken = mono_image_get_memberref_token (assembly, D.25631, D.25632, sig);
  D.25633 = mono_method_signature (declaring);
  D.25634 = D.25633->generic_param_count;
  if (D.25634 == 0) goto <D.25635>; else goto <D.25636>;
  <D.25635>:
  D.25637 = mtoken;
  return D.25637;
  <D.25636>:
  D.25638 = mtoken >> 24;
  switch (D.25638) <default: <D.19718>, case 6: <D.19717>, case 10: <D.19715>>
  <D.19715>:
  D.25639 = mtoken << 1;
  D.25640 = D.25639 & 33554430;
  mtoken = D.25640 | 1;
  goto <D.19716>;
  <D.19717>:
  D.25639 = mtoken << 1;
  mtoken = D.25639 & 33554430;
  goto <D.19716>;
  <D.19718>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 3016);
  <D.19716>:
  D.25641 = mono_method_get_context (method);
  sig = encode_generic_method_sig (assembly, D.25641);
  D.25642 = assembly->save;
  if (D.25642 != 0) goto <D.25643>; else goto <D.25644>;
  <D.25643>:
  D.25645 = table->rows;
  D.25646 = D.25645 + 1;
  alloc_table (table, D.25646);
  D.25647 = table->values;
  D.25648 = table->next_idx;
  D.25649 = D.25648 * 2;
  D.25650 = (long unsigned int) D.25649;
  D.25651 = D.25650 * 4;
  values = D.25647 + D.25651;
  *values = mtoken;
  D.25652 = values + 4;
  *D.25652 = sig;
  <D.25644>:
  D.25648 = table->next_idx;
  token = D.25648 | 721420288;
  D.25648 = table->next_idx;
  D.25653 = D.25648 + 1;
  table->next_idx = D.25653;
  D.25637 = token;
  return D.25637;
}


encode_generic_method_sig (struct MonoDynamicImage * assembly, struct MonoGenericContext * context)
{
  struct MonoGenericInst * D.25655;
  <unnamed-unsigned:22> D.25656;
  int D.25657;
  guint32 D.25660;
  struct MonoType * D.25661;
  unsigned int i.105;
  struct SigBuffer buf;
  int i;
  guint32 nparams;
  guint32 idx;

  try
    {
      D.25655 = context->method_inst;
      D.25656 = D.25655->type_argc;
      nparams = (guint32) D.25656;
      D.25657 = assembly->save;
      if (D.25657 == 0) goto <D.25658>; else goto <D.25659>;
      <D.25658>:
      D.25660 = 0;
      return D.25660;
      <D.25659>:
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 10);
      sigbuffer_add_value (&buf, nparams);
      i = 0;
      goto <D.19702>;
      <D.19701>:
      D.25655 = context->method_inst;
      D.25661 = D.25655->type_argv[i];
      encode_type (assembly, D.25661, &buf);
      i = i + 1;
      <D.19702>:
      i.105 = (unsigned int) i;
      if (i.105 < nparams) goto <D.19701>; else goto <D.19703>;
      <D.19703>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.25660 = idx;
      return D.25660;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_get_memberref_token (struct MonoDynamicImage * assembly, struct MonoType * type, const char * name, guint32 sig)
{
  guint32 D.25665;
  guint32 parent;

  parent = mono_image_typedef_or_ref (assembly, type);
  D.25665 = mono_image_add_memberef_row (assembly, parent, name, sig);
  return D.25665;
}


mono_image_get_inflated_method_token (struct MonoDynamicImage * assembly, struct MonoMethod * m)
{
  struct MonoMethod * D.25667;
  struct MonoMethodSignature * D.25668;
  struct MonoClass * D.25669;
  struct MonoType * D.25670;
  const char * D.25671;
  guint32 D.25672;
  struct MonoMethodInflated * imethod;
  guint32 sig;
  guint32 token;

  imethod = m;
  D.25667 = imethod->declaring;
  D.25668 = mono_method_signature (D.25667);
  sig = method_encode_signature (assembly, D.25668);
  D.25669 = m->klass;
  D.25670 = &D.25669->byval_arg;
  D.25671 = m->name;
  token = mono_image_get_memberref_token (assembly, D.25670, D.25671, sig);
  D.25672 = token;
  return D.25672;
}


mono_image_get_methodref_token (struct MonoDynamicImage * assembly, struct MonoMethod * method, gboolean create_typespec)
{
  int iftmp.106;
  long unsigned int D.25678;
  long unsigned int D.25679;
  struct MonoClass * D.25681;
  struct MonoImage * D.25682;
  struct MonoImage * D.25683;
  struct GHashTable * D.25687;
  long int method.107;
  unsigned int D.25689;
  unsigned int D.25690;
  long unsigned int D.25691;
  const void * D.25692;
  void * D.25693;
  long int D.25694;
  guint32 D.25697;
  void * D.25698;
  long int D.25699;
  long unsigned int D.25704;
  _Bool D.25705;
  long int D.25706;
  long int D.25707;
  struct MonoMethodSignature * D.25712;
  long unsigned int D.25713;
  long unsigned int D.25714;
  struct MonoType * D.25719;
  const char * D.25720;
  unsigned int D.25721;
  long unsigned int D.25722;
  void * D.25723;
  unsigned int D.25726;
  _Bool D.25727;
  long int D.25728;
  long int D.25729;
  unsigned int D.25732;
  unsigned int D.25733;
  int D.25734;
  unsigned int D.25737;
  unsigned int D.25738;
  guint32 * D.25739;
  unsigned int D.25740;
  unsigned int D.25741;
  long unsigned int D.25742;
  long unsigned int D.25743;
  guint32 * D.25744;
  struct MonoGenericContainer * D.25745;
  struct MonoGenericContext * D.25746;
  unsigned int D.25747;
  unsigned int D.25748;
  void * D.25749;
  guint32 token;
  struct MonoMethodSignature * sig;

  if (create_typespec != 0) goto <D.25677>; else goto <D.25675>;
  <D.25677>:
  D.25678 = BIT_FIELD_REF <*method, 64, 256>;
  D.25679 = D.25678 & 4503599627370496;
  if (D.25679 != 0) goto <D.25680>; else goto <D.25675>;
  <D.25680>:
  D.25681 = method->klass;
  D.25682 = D.25681->image;
  D.25683 = &assembly->image;
  if (D.25682 != D.25683) goto <D.25684>; else goto <D.25675>;
  <D.25684>:
  iftmp.106 = 1;
  goto <D.25676>;
  <D.25675>:
  iftmp.106 = 0;
  <D.25676>:
  create_typespec = iftmp.106;
  if (create_typespec != 0) goto <D.25685>; else goto <D.25686>;
  <D.25685>:
  D.25687 = assembly->handleref;
  method.107 = (long int) method;
  D.25689 = (unsigned int) method.107;
  D.25690 = D.25689 + 1;
  D.25691 = (long unsigned int) D.25690;
  D.25692 = (const void *) D.25691;
  D.25693 = monoeg_g_hash_table_lookup (D.25687, D.25692);
  D.25694 = (long int) D.25693;
  token = (guint32) D.25694;
  if (token != 0) goto <D.25695>; else goto <D.25696>;
  <D.25695>:
  D.25697 = token;
  return D.25697;
  <D.25696>:
  <D.25686>:
  D.25687 = assembly->handleref;
  D.25698 = monoeg_g_hash_table_lookup (D.25687, method);
  D.25699 = (long int) D.25698;
  token = (guint32) D.25699;
  if (token != 0) goto <D.25700>; else goto <D.25701>;
  <D.25700>:
  if (create_typespec == 0) goto <D.25702>; else goto <D.25703>;
  <D.25702>:
  D.25697 = token;
  return D.25697;
  <D.25703>:
  <D.25701>:
  D.25678 = BIT_FIELD_REF <*method, 64, 256>;
  D.25704 = D.25678 & 2251799813685248;
  D.25705 = D.25704 != 0;
  D.25706 = (long int) D.25705;
  D.25707 = __builtin_expect (D.25706, 0);
  if (D.25707 != 0) goto <D.25708>; else goto <D.25709>;
  <D.25708>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2492, "!method->is_inflated");
  <D.25709>:
  if (token == 0) goto <D.25710>; else goto <D.25711>;
  <D.25710>:
  D.25712 = mono_method_signature (method);
  sig = mono_metadata_signature_dup (D.25712);
  D.25713 = BIT_FIELD_REF <*sig, 64, 64>;
  D.25714 = D.25713 & 64512;
  if (D.25714 != 0) goto <D.25715>; else goto <D.25716>;
  <D.25715>:
  D.25713 = BIT_FIELD_REF <*sig, 64, 64>;
  D.25714 = D.25713 & 64512;
  if (D.25714 != 5120) goto <D.25717>; else goto <D.25718>;
  <D.25717>:
  sig->call_convention = 0;
  <D.25718>:
  <D.25716>:
  D.25681 = method->klass;
  D.25719 = &D.25681->byval_arg;
  D.25720 = method->name;
  D.25721 = method_encode_signature (assembly, sig);
  token = mono_image_get_memberref_token (assembly, D.25719, D.25720, D.25721);
  monoeg_g_free (sig);
  D.25687 = assembly->handleref;
  D.25722 = (long unsigned int) token;
  D.25723 = (void *) D.25722;
  monoeg_g_hash_table_insert_replace (D.25687, method, D.25723, 0);
  <D.25711>:
  if (create_typespec != 0) goto <D.25724>; else goto <D.25725>;
  <D.25724>:
  {
    struct MonoDynamicTable * table;

    table = &assembly->tables[43];
    D.25726 = token >> 24;
    D.25727 = D.25726 != 10;
    D.25728 = (long int) D.25727;
    D.25729 = __builtin_expect (D.25728, 0);
    if (D.25729 != 0) goto <D.25730>; else goto <D.25731>;
    <D.25730>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2508, "mono_metadata_token_table (token) == MONO_TABLE_MEMBERREF");
    <D.25731>:
    D.25732 = token << 1;
    D.25733 = D.25732 & 33554430;
    token = D.25733 | 1;
    D.25734 = assembly->save;
    if (D.25734 != 0) goto <D.25735>; else goto <D.25736>;
    <D.25735>:
    {
      guint32 * values;

      D.25737 = table->rows;
      D.25738 = D.25737 + 1;
      alloc_table (table, D.25738);
      D.25739 = table->values;
      D.25740 = table->next_idx;
      D.25741 = D.25740 * 2;
      D.25742 = (long unsigned int) D.25741;
      D.25743 = D.25742 * 4;
      values = D.25739 + D.25743;
      *values = token;
      D.25744 = values + 4;
      D.25745 = mono_method_get_generic_container (method);
      D.25746 = &D.25745->context;
      D.25747 = encode_generic_method_sig (assembly, D.25746);
      *D.25744 = D.25747;
    }
    <D.25736>:
    D.25740 = table->next_idx;
    token = D.25740 | 721420288;
    D.25740 = table->next_idx;
    D.25748 = D.25740 + 1;
    table->next_idx = D.25748;
    D.25687 = assembly->handleref;
    method.107 = (long int) method;
    D.25689 = (unsigned int) method.107;
    D.25690 = D.25689 + 1;
    D.25691 = (long unsigned int) D.25690;
    D.25749 = (void *) D.25691;
    D.25722 = (long unsigned int) token;
    D.25723 = (void *) D.25722;
    monoeg_g_hash_table_insert_replace (D.25687, D.25749, D.25723, 0);
    D.25697 = token;
    return D.25697;
  }
  <D.25725>:
  D.25697 = token;
  return D.25697;
}


mono_image_get_fieldref_token (struct MonoDynamicImage * assembly, struct MonoObject * f, struct MonoClassField * field)
{
  _Bool D.25751;
  long int D.25752;
  long int D.25753;
  struct MonoClass * D.25756;
  _Bool D.25757;
  long int D.25758;
  long int D.25759;
  struct MonoGHashTable * D.25762;
  void * D.25763;
  long int D.25764;
  guint32 D.25767;
  struct MonoGenericClass * D.25770;
  struct MonoClass * D.25772;
  struct MonoClassField * D.25774;
  long int field.108;
  struct MonoClassField * D.25777;
  long int D.25778;
  long int D.25779;
  long int D.25780;
  long unsigned int D.25781;
  long unsigned int D.25782;
  struct MonoClassField * D.25783;
  int D.25784;
  struct MonoType * D.25788;
  const char * D.25789;
  struct MonoImage * D.25790;
  unsigned int D.25791;
  long unsigned int D.25792;
  void * D.25793;
  struct MonoType * type;
  guint32 token;

  D.25751 = field == 0B;
  D.25752 = (long int) D.25751;
  D.25753 = __builtin_expect (D.25752, 0);
  if (D.25753 != 0) goto <D.25754>; else goto <D.25755>;
  <D.25754>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2745, "field");
  <D.25755>:
  D.25756 = field->parent;
  D.25757 = D.25756 == 0B;
  D.25758 = (long int) D.25757;
  D.25759 = __builtin_expect (D.25758, 0);
  if (D.25759 != 0) goto <D.25760>; else goto <D.25761>;
  <D.25760>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2746, "field->parent");
  <D.25761>:
  D.25762 = assembly->handleref_managed;
  D.25763 = mono_g_hash_table_lookup (D.25762, f);
  D.25764 = (long int) D.25763;
  token = (guint32) D.25764;
  if (token != 0) goto <D.25765>; else goto <D.25766>;
  <D.25765>:
  D.25767 = token;
  return D.25767;
  <D.25766>:
  D.25756 = field->parent;
  D.25770 = D.25756->generic_class;
  if (D.25770 != 0B) goto <D.25771>; else goto <D.25768>;
  <D.25771>:
  D.25756 = field->parent;
  D.25770 = D.25756->generic_class;
  D.25772 = D.25770->container_class;
  if (D.25772 != 0B) goto <D.25773>; else goto <D.25768>;
  <D.25773>:
  D.25756 = field->parent;
  D.25770 = D.25756->generic_class;
  D.25772 = D.25770->container_class;
  D.25774 = D.25772->fields;
  if (D.25774 != 0B) goto <D.25775>; else goto <D.25768>;
  <D.25775>:
  {
    int index;

    field.108 = (long int) field;
    D.25756 = field->parent;
    D.25777 = D.25756->fields;
    D.25778 = (long int) D.25777;
    D.25779 = field.108 - D.25778;
    D.25780 = D.25779 /[ex] 32;
    index = (int) D.25780;
    D.25756 = field->parent;
    D.25770 = D.25756->generic_class;
    D.25772 = D.25770->container_class;
    D.25774 = D.25772->fields;
    D.25781 = (long unsigned int) index;
    D.25782 = D.25781 * 32;
    D.25783 = D.25774 + D.25782;
    type = mono_field_get_type (D.25783);
  }
  goto <D.25769>;
  <D.25768>:
  D.25784 = is_field_on_inst (field);
  if (D.25784 != 0) goto <D.25785>; else goto <D.25786>;
  <D.25785>:
  type = get_field_on_inst_generic_type (field);
  goto <D.25787>;
  <D.25786>:
  type = mono_field_get_type (field);
  <D.25787>:
  <D.25769>:
  D.25756 = field->parent;
  D.25788 = &D.25756->byval_arg;
  D.25789 = mono_field_get_name (field);
  D.25756 = field->parent;
  D.25790 = D.25756->image;
  D.25791 = fieldref_encode_signature (assembly, D.25790, type);
  token = mono_image_get_memberref_token (assembly, D.25788, D.25789, D.25791);
  D.25762 = assembly->handleref_managed;
  D.25792 = (long unsigned int) token;
  D.25793 = (void *) D.25792;
  mono_g_hash_table_insert (D.25762, f, D.25793);
  D.25767 = token;
  return D.25767;
}


get_field_on_inst_generic_type (struct MonoClassField * field)
{
  int D.25795;
  _Bool D.25796;
  long int D.25797;
  long int D.25798;
  struct MonoClass * D.25801;
  struct MonoClassField * D.25802;
  long int field.109;
  long int D.25806;
  long int D.25807;
  long int D.25808;
  int D.25809;
  long int D.25810;
  struct MonoType * D.25813;
  struct MonoType * * D.25814;
  long unsigned int D.25815;
  long unsigned int D.25816;
  struct MonoType * * D.25817;
  struct MonoGenericClass * D.25818;
  struct MonoClassField * D.25819;
  long int D.25822;
  long int D.25823;
  long int D.25824;
  unsigned int D.25825;
  long int D.25826;
  struct MonoClassField * D.25829;
  long unsigned int D.25830;
  struct MonoClassField * D.25831;
  struct MonoClass * class;
  struct MonoClass * gtd;
  struct MonoDynamicGenericClass * dgclass;
  int field_index;

  D.25795 = is_field_on_inst (field);
  D.25796 = D.25795 == 0;
  D.25797 = (long int) D.25796;
  D.25798 = __builtin_expect (D.25797, 0);
  if (D.25798 != 0) goto <D.25799>; else goto <D.25800>;
  <D.25799>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2717, "is_field_on_inst (field)");
  <D.25800>:
  D.25801 = field->parent;
  dgclass = D.25801->generic_class;
  D.25802 = dgclass->fields;
  if (D.25802 <= field) goto <D.25803>; else goto <D.25804>;
  <D.25803>:
  field.109 = (long int) field;
  D.25802 = dgclass->fields;
  D.25806 = (long int) D.25802;
  D.25807 = field.109 - D.25806;
  D.25808 = D.25807 /[ex] 32;
  D.25809 = dgclass->count_fields;
  D.25810 = (long int) D.25809;
  if (D.25808 < D.25810) goto <D.25811>; else goto <D.25812>;
  <D.25811>:
  field.109 = (long int) field;
  D.25802 = dgclass->fields;
  D.25806 = (long int) D.25802;
  D.25807 = field.109 - D.25806;
  D.25808 = D.25807 /[ex] 32;
  field_index = (int) D.25808;
  D.25814 = dgclass->field_generic_types;
  D.25815 = (long unsigned int) field_index;
  D.25816 = D.25815 * 8;
  D.25817 = D.25814 + D.25816;
  D.25813 = *D.25817;
  return D.25813;
  <D.25812>:
  <D.25804>:
  class = field->parent;
  D.25818 = class->generic_class;
  gtd = D.25818->container_class;
  D.25819 = class->fields;
  if (D.25819 <= field) goto <D.25820>; else goto <D.25821>;
  <D.25820>:
  field.109 = (long int) field;
  D.25819 = class->fields;
  D.25822 = (long int) D.25819;
  D.25823 = field.109 - D.25822;
  D.25824 = D.25823 /[ex] 32;
  D.25825 = class->field.count;
  D.25826 = (long int) D.25825;
  if (D.25824 < D.25826) goto <D.25827>; else goto <D.25828>;
  <D.25827>:
  field.109 = (long int) field;
  D.25819 = class->fields;
  D.25822 = (long int) D.25819;
  D.25823 = field.109 - D.25822;
  D.25824 = D.25823 /[ex] 32;
  field_index = (int) D.25824;
  D.25829 = gtd->fields;
  D.25815 = (long unsigned int) field_index;
  D.25830 = D.25815 * 32;
  D.25831 = D.25829 + D.25830;
  D.25813 = D.25831->type;
  return D.25813;
  <D.25828>:
  <D.25821>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 2734);
  D.25813 = 0B;
  return D.25813;
}


mono_image_get_array_token (struct MonoDynamicImage * assembly, struct MonoReflectionArrayMethod * m)
{
  struct MonoString * D.25833;
  struct MonoArray * D.25834;
  long unsigned int D.25835;
  long unsigned int D.25836;
  long unsigned int D.25837;
  long unsigned int D.25838;
  unsigned int D.25839;
  int D.25840;
  int D.25841;
  unsigned char D.25842;
  <unnamed-unsigned:6> D.25843;
  short unsigned int D.25844;
  struct MonoType * iftmp.110;
  struct MonoReflectionType * D.25846;
  struct MonoClass * D.25850;
  struct MonoReflectionType * D.25851;
  long unsigned int D.25852;
  char * D.25853;
  void * D.25854;
  struct MonoType * D.25855;
  char * D.25856;
  int D.25857;
  struct MonoType * D.25860;
  int D.25861;
  struct MonoMethodSignature * D.25864;
  int D.25865;
  unsigned int D.25868;
  unsigned int D.25869;
  guint32 D.25870;
  unsigned int D.25871;
  unsigned int D.25872;
  struct GList * D.25873;
  struct GList * D.25874;
  guint32 nparams;
  guint32 i;
  struct GList * tmp;
  char * name;
  struct MonoMethodSignature * sig;
  struct ArrayMethod * am;
  struct MonoType * mtype;

  D.25833 = m->name;
  name = mono_string_to_utf8 (D.25833);
  D.25834 = m->parameters;
  D.25835 = mono_array_length (D.25834);
  nparams = (guint32) D.25835;
  D.25836 = (long unsigned int) nparams;
  D.25837 = D.25836 + 2;
  D.25838 = D.25837 * 8;
  sig = monoeg_malloc0 (D.25838);
  sig->hasthis = 1;
  sig->sentinelpos = -1;
  D.25839 = m->call_conv;
  D.25840 = (int) D.25839;
  D.25841 = reflection_cc_to_file (D.25840);
  D.25842 = (unsigned char) D.25841;
  D.25843 = (<unnamed-unsigned:6>) D.25842;
  sig->call_convention = D.25843;
  D.25844 = (short unsigned int) nparams;
  sig->param_count = D.25844;
  D.25846 = m->ret;
  if (D.25846 != 0B) goto <D.25847>; else goto <D.25848>;
  <D.25847>:
  D.25846 = m->ret;
  iftmp.110 = mono_reflection_type_get_handle (D.25846);
  goto <D.25849>;
  <D.25848>:
  D.25850 = mono_defaults.void_class;
  iftmp.110 = &D.25850->byval_arg;
  <D.25849>:
  sig->ret = iftmp.110;
  D.25851 = m->parent;
  mtype = mono_reflection_type_get_handle (D.25851);
  i = 0;
  goto <D.19833>;
  <D.19832>:
  D.25834 = m->parameters;
  D.25852 = (long unsigned int) i;
  D.25853 = mono_array_addr_with_size (D.25834, 8, D.25852);
  D.25854 = MEM[(void * *)D.25853];
  D.25855 = mono_reflection_type_get_handle (D.25854);
  sig->params[i] = D.25855;
  i = i + 1;
  <D.19833>:
  if (i < nparams) goto <D.19832>; else goto <D.19834>;
  <D.19834>:
  tmp = assembly->array_methods;
  goto <D.19836>;
  <D.19835>:
  am = tmp->data;
  D.25856 = am->name;
  D.25857 = strcmp (name, D.25856);
  if (D.25857 == 0) goto <D.25858>; else goto <D.25859>;
  <D.25858>:
  D.25860 = am->parent;
  D.25861 = mono_metadata_type_equal (D.25860, mtype);
  if (D.25861 != 0) goto <D.25862>; else goto <D.25863>;
  <D.25862>:
  D.25864 = am->sig;
  D.25865 = mono_metadata_signature_equal (D.25864, sig);
  if (D.25865 != 0) goto <D.25866>; else goto <D.25867>;
  <D.25866>:
  monoeg_g_free (name);
  monoeg_g_free (sig);
  D.25868 = am->token;
  D.25869 = D.25868 & 16777215;
  m->table_idx = D.25869;
  D.25870 = am->token;
  return D.25870;
  <D.25867>:
  <D.25863>:
  <D.25859>:
  tmp = tmp->next;
  <D.19836>:
  if (tmp != 0B) goto <D.19835>; else goto <D.19837>;
  <D.19837>:
  am = monoeg_malloc0 (32);
  am->name = name;
  am->sig = sig;
  am->parent = mtype;
  D.25860 = am->parent;
  D.25871 = method_encode_signature (assembly, sig);
  D.25872 = mono_image_get_memberref_token (assembly, D.25860, name, D.25871);
  am->token = D.25872;
  D.25873 = assembly->array_methods;
  D.25874 = monoeg_g_list_prepend (D.25873, am);
  assembly->array_methods = D.25874;
  D.25868 = am->token;
  D.25869 = D.25868 & 16777215;
  m->table_idx = D.25869;
  D.25870 = am->token;
  return D.25870;
}


reflection_cc_to_file (int call_conv)
{
  int D.25876;
  int D.25877;

  D.25876 = call_conv & 3;
  switch (D.25876) <default: <D.19814>, case 0: <D.19811>, case 1: <D.19812>, case 2: <D.19813>>
  <D.19811>:
  <D.19812>:
  D.25877 = 0;
  return D.25877;
  <D.19813>:
  D.25877 = 5;
  return D.25877;
  <D.19814>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 3331);
  D.25877 = 0;
  return D.25877;
}


mono_image_get_sighelper_token (struct MonoDynamicImage * assembly, struct MonoReflectionSigHelper * helper)
{
  unsigned int D.25879;
  unsigned int idx.111;
  unsigned int D.25881;
  unsigned int D.25882;
  unsigned int D.25883;
  guint32 * D.25884;
  long unsigned int D.25885;
  long unsigned int D.25886;
  unsigned int D.25887;
  guint32 D.25888;
  guint32 idx;
  struct MonoDynamicTable * table;
  guint32 * values;

  table = &assembly->tables[17];
  D.25879 = table->next_idx;
  idx.111 = D.25879;
  D.25881 = idx.111 + 1;
  table->next_idx = D.25881;
  idx = idx.111;
  D.25882 = table->rows;
  D.25883 = D.25882 + 1;
  table->rows = D.25883;
  D.25882 = table->rows;
  alloc_table (table, D.25882);
  D.25884 = table->values;
  D.25885 = (long unsigned int) idx;
  D.25886 = D.25885 * 4;
  values = D.25884 + D.25886;
  D.25887 = mono_reflection_encode_sighelper (assembly, helper);
  *values = D.25887;
  D.25888 = idx;
  return D.25888;
}


mono_reflection_encode_sighelper (struct MonoDynamicImage * assembly, struct MonoReflectionSigHelper * helper)
{
  int D.25890;
  guint32 D.25893;
  unsigned int D.25894;
  _Bool D.25895;
  long int D.25896;
  long int D.25897;
  struct MonoArray * D.25900;
  long unsigned int D.25903;
  unsigned int D.25905;
  unsigned int D.25906;
  unsigned int D.25907;
  unsigned int D.25910;
  unsigned int D.25913;
  unsigned int D.25916;
  unsigned int D.25918;
  unsigned char D.25921;
  struct MonoReflectionType * D.25922;
  struct MonoArray * D.25923;
  long unsigned int D.25926;
  long unsigned int D.25927;
  char * D.25930;
  struct MonoArray * D.25931;
  long unsigned int D.25934;
  char * D.25937;
  char * D.25938;
  struct SigBuffer buf;
  guint32 nargs;
  guint32 size;
  guint32 i;
  guint32 idx;

  try
    {
      D.25890 = assembly->save;
      if (D.25890 == 0) goto <D.25891>; else goto <D.25892>;
      <D.25891>:
      D.25893 = 0;
      return D.25893;
      <D.25892>:
      D.25894 = helper->type;
      D.25895 = D.25894 != 2;
      D.25896 = (long int) D.25895;
      D.25897 = __builtin_expect (D.25896, 0);
      if (D.25897 != 0) goto <D.25898>; else goto <D.25899>;
      <D.25898>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 3254, "helper->type == 2");
      <D.25899>:
      D.25900 = helper->arguments;
      if (D.25900 != 0B) goto <D.25901>; else goto <D.25902>;
      <D.25901>:
      D.25900 = helper->arguments;
      D.25903 = mono_array_length (D.25900);
      nargs = (guint32) D.25903;
      goto <D.25904>;
      <D.25902>:
      nargs = 0;
      <D.25904>:
      D.25905 = nargs + 1;
      size = D.25905 * 10;
      sigbuffer_init (&buf, 32);
      D.25906 = helper->call_conv;
      D.25907 = D.25906 & 3;
      if (D.25907 == 3) goto <D.25908>; else goto <D.25909>;
      <D.25908>:
      helper->call_conv = 1;
      <D.25909>:
      D.25906 = helper->call_conv;
      D.25910 = D.25906 & 64;
      if (D.25910 != 0) goto <D.25911>; else goto <D.25912>;
      <D.25911>:
      D.25906 = helper->call_conv;
      D.25913 = D.25906 & 32;
      helper->call_conv = D.25913;
      <D.25912>:
      D.25906 = helper->call_conv;
      if (D.25906 == 0) goto <D.25914>; else goto <D.25915>;
      <D.25914>:
      D.25916 = helper->unmanaged_call_conv;
      idx = D.25916 + 4294967295;
      goto <D.25917>;
      <D.25915>:
      D.25906 = helper->call_conv;
      idx = D.25906 & 96;
      D.25906 = helper->call_conv;
      D.25918 = D.25906 & 2;
      if (D.25918 != 0) goto <D.25919>; else goto <D.25920>;
      <D.25919>:
      idx = idx + 5;
      <D.25920>:
      <D.25917>:
      D.25921 = (unsigned char) idx;
      sigbuffer_add_byte (&buf, D.25921);
      sigbuffer_add_value (&buf, nargs);
      D.25922 = helper->return_type;
      encode_reflection_type (assembly, D.25922, &buf);
      i = 0;
      goto <D.19799>;
      <D.19798>:
      {
        struct MonoArray * modreqs;
        struct MonoArray * modopts;
        struct MonoReflectionType * pt;

        modreqs = 0B;
        modopts = 0B;
        D.25923 = helper->modreqs;
        if (D.25923 != 0B) goto <D.25924>; else goto <D.25925>;
        <D.25924>:
        D.25926 = (long unsigned int) i;
        D.25923 = helper->modreqs;
        D.25927 = mono_array_length (D.25923);
        if (D.25926 < D.25927) goto <D.25928>; else goto <D.25929>;
        <D.25928>:
        D.25923 = helper->modreqs;
        D.25926 = (long unsigned int) i;
        D.25930 = mono_array_addr_with_size (D.25923, 8, D.25926);
        modreqs = MEM[(struct MonoArray * *)D.25930];
        <D.25929>:
        <D.25925>:
        D.25931 = helper->modopts;
        if (D.25931 != 0B) goto <D.25932>; else goto <D.25933>;
        <D.25932>:
        D.25926 = (long unsigned int) i;
        D.25931 = helper->modopts;
        D.25934 = mono_array_length (D.25931);
        if (D.25926 < D.25934) goto <D.25935>; else goto <D.25936>;
        <D.25935>:
        D.25931 = helper->modopts;
        D.25926 = (long unsigned int) i;
        D.25937 = mono_array_addr_with_size (D.25931, 8, D.25926);
        modopts = MEM[(struct MonoArray * *)D.25937];
        <D.25936>:
        <D.25933>:
        encode_custom_modifiers (assembly, modreqs, modopts, &buf);
        D.25900 = helper->arguments;
        D.25926 = (long unsigned int) i;
        D.25938 = mono_array_addr_with_size (D.25900, 8, D.25926);
        pt = MEM[(struct MonoReflectionType * *)D.25938];
        encode_reflection_type (assembly, pt, &buf);
      }
      i = i + 1;
      <D.19799>:
      if (i < nargs) goto <D.19798>; else goto <D.19800>;
      <D.19800>:
      idx = sigbuffer_add_to_blob_cached (assembly, &buf);
      sigbuffer_free (&buf);
      D.25893 = idx;
      return D.25893;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


mono_image_get_field_on_inst_token (struct MonoDynamicImage * assembly, struct MonoReflectionFieldOnTypeBuilderInst * f)
{
  struct MonoGHashTable * D.25941;
  void * D.25942;
  long int D.25943;
  guint32 D.25946;
  struct MonoObject * D.25947;
  struct MonoVTable * D.25948;
  struct MonoClass * D.25949;
  int D.25950;
  struct MonoReflectionGenericClass * D.25953;
  long unsigned int D.25954;
  signed long D.25955;
  _Bool D.25956;
  long int D.25957;
  long int D.25958;
  struct MonoString * D.25961;
  struct MonoType * D.25962;
  unsigned int D.25963;
  int D.25965;
  struct MonoClass * D.25968;
  struct MonoImage * D.25969;
  struct MonoType * D.25970;
  const char * D.25971;
  long unsigned int D.25973;
  void * D.25974;
  guint32 token;
  struct MonoClass * klass;
  struct MonoGenericClass * gclass;
  struct MonoDynamicGenericClass * dgclass;
  struct MonoType * type;
  char * name;

  D.25941 = assembly->handleref_managed;
  D.25942 = mono_g_hash_table_lookup (D.25941, f);
  D.25943 = (long int) D.25942;
  token = (guint32) D.25943;
  if (token != 0) goto <D.25944>; else goto <D.25945>;
  <D.25944>:
  D.25946 = token;
  return D.25946;
  <D.25945>:
  D.25947 = f->fb;
  D.25948 = D.25947->vtable;
  D.25949 = D.25948->klass;
  D.25950 = is_sre_field_builder (D.25949);
  if (D.25950 != 0) goto <D.25951>; else goto <D.25952>;
  <D.25951>:
  {
    struct MonoReflectionFieldBuilder * fb;

    fb = f->fb;
    D.25953 = f->inst;
    type = mono_reflection_type_get_handle (D.25953);
    klass = mono_class_from_mono_type (type);
    gclass = type->data.generic_class;
    D.25954 = BIT_FIELD_REF <*gclass, 64, 192>;
    D.25955 = (signed long) D.25954;
    D.25956 = D.25955 >= 0;
    D.25957 = (long int) D.25956;
    D.25958 = __builtin_expect (D.25957, 0);
    if (D.25958 != 0) goto <D.25959>; else goto <D.25960>;
    <D.25959>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2786, "gclass->is_dynamic");
    <D.25960>:
    dgclass = gclass;
    D.25961 = fb->name;
    name = mono_string_to_utf8 (D.25961);
    D.25962 = &klass->byval_arg;
    D.25963 = field_encode_signature (assembly, fb);
    token = mono_image_get_memberref_token (assembly, D.25962, name, D.25963);
    monoeg_g_free (name);
  }
  goto <D.25964>;
  <D.25952>:
  D.25947 = f->fb;
  D.25948 = D.25947->vtable;
  D.25949 = D.25948->klass;
  D.25965 = is_sr_mono_field (D.25949);
  if (D.25965 != 0) goto <D.25966>; else goto <D.25967>;
  <D.25966>:
  {
    guint32 sig;
    struct MonoClassField * field;

    D.25947 = f->fb;
    field = MEM[(struct MonoReflectionField *)D.25947].field;
    D.25953 = f->inst;
    type = mono_reflection_type_get_handle (D.25953);
    klass = mono_class_from_mono_type (type);
    D.25968 = field->parent;
    D.25969 = D.25968->image;
    D.25970 = field->type;
    sig = fieldref_encode_signature (assembly, D.25969, D.25970);
    D.25962 = &klass->byval_arg;
    D.25971 = field->name;
    token = mono_image_get_memberref_token (assembly, D.25962, D.25971, sig);
  }
  goto <D.25972>;
  <D.25967>:
  {
    char * name;

    D.25947 = f->fb;
    D.25948 = D.25947->vtable;
    D.25949 = D.25948->klass;
    name = mono_type_get_full_name (D.25949);
    monoeg_g_log (0B, 4, "mono_image_get_field_on_inst_token: don\'t know how to handle %s", name);
    <D.19643>:
    goto <D.19643>;
  }
  <D.25972>:
  <D.25964>:
  D.25941 = assembly->handleref_managed;
  D.25973 = (long unsigned int) token;
  D.25974 = (void *) D.25973;
  mono_g_hash_table_insert (D.25941, f, D.25974);
  D.25946 = token;
  return D.25946;
}


is_sre_field_builder (struct MonoClass * class)
{
  struct MonoClass * cached_class.112;
  gboolean D.25979;
  _Bool D.25980;
  int D.25981;
  const char * D.25984;
  int D.25985;
  const char * D.25988;
  int D.25989;

  {
    static struct MonoClass * cached_class;

    cached_class.112 = cached_class;
    if (cached_class.112 != 0B) goto <D.25977>; else goto <D.25978>;
    <D.25977>:
    cached_class.112 = cached_class;
    D.25980 = cached_class.112 == class;
    D.25979 = (gboolean) D.25980;
    return D.25979;
    <D.25978>:
    D.25981 = is_corlib_type (class);
    if (D.25981 != 0) goto <D.25982>; else goto <D.25983>;
    <D.25982>:
    D.25984 = class->name;
    D.25985 = strcmp ("FieldBuilder", D.25984);
    if (D.25985 == 0) goto <D.25986>; else goto <D.25987>;
    <D.25986>:
    D.25988 = class->name_space;
    D.25989 = strcmp ("System.Reflection.Emit", D.25988);
    if (D.25989 == 0) goto <D.25990>; else goto <D.25991>;
    <D.25990>:
    cached_class = class;
    D.25979 = 1;
    return D.25979;
    <D.25991>:
    <D.25987>:
    <D.25983>:
    D.25979 = 0;
    return D.25979;
  }
}


is_sr_mono_field (struct MonoClass * class)
{
  struct MonoClass * cached_class.113;
  gboolean D.25996;
  _Bool D.25997;
  int D.25998;
  const char * D.26001;
  int D.26002;
  const char * D.26005;
  int D.26006;

  {
    static struct MonoClass * cached_class;

    cached_class.113 = cached_class;
    if (cached_class.113 != 0B) goto <D.25994>; else goto <D.25995>;
    <D.25994>:
    cached_class.113 = cached_class;
    D.25997 = cached_class.113 == class;
    D.25996 = (gboolean) D.25997;
    return D.25996;
    <D.25995>:
    D.25998 = is_corlib_type (class);
    if (D.25998 != 0) goto <D.25999>; else goto <D.26000>;
    <D.25999>:
    D.26001 = class->name;
    D.26002 = strcmp ("MonoField", D.26001);
    if (D.26002 == 0) goto <D.26003>; else goto <D.26004>;
    <D.26003>:
    D.26005 = class->name_space;
    D.26006 = strcmp ("System.Reflection", D.26005);
    if (D.26006 == 0) goto <D.26007>; else goto <D.26008>;
    <D.26007>:
    cached_class = class;
    D.25996 = 1;
    return D.25996;
    <D.26008>:
    <D.26004>:
    <D.26000>:
    D.25996 = 0;
    return D.25996;
  }
}


mono_image_get_ctor_on_inst_token (struct MonoDynamicImage * assembly, struct MonoReflectionCtorOnTypeBuilderInst * c, gboolean create_methodspec)
{
  struct MonoGHashTable * D.26010;
  void * D.26011;
  long int D.26012;
  guint32 D.26015;
  struct MonoObject * D.26016;
  struct MonoVTable * D.26017;
  struct MonoClass * D.26018;
  int D.26019;
  struct MonoReflectionGenericClass * D.26022;
  long unsigned int D.26023;
  signed long D.26024;
  _Bool D.26025;
  long int D.26026;
  long int D.26027;
  struct MonoString * D.26030;
  struct MonoType * D.26031;
  int D.26033;
  struct MonoMethodSignature * D.26036;
  const char * D.26037;
  long unsigned int D.26039;
  void * D.26040;
  guint32 sig;
  guint32 token;
  struct MonoClass * klass;
  struct MonoGenericClass * gclass;
  struct MonoType * type;

  D.26010 = assembly->handleref_managed;
  D.26011 = mono_g_hash_table_lookup (D.26010, c);
  D.26012 = (long int) D.26011;
  token = (guint32) D.26012;
  if (token != 0) goto <D.26013>; else goto <D.26014>;
  <D.26013>:
  D.26015 = token;
  return D.26015;
  <D.26014>:
  D.26016 = c->cb;
  D.26017 = D.26016->vtable;
  D.26018 = D.26017->klass;
  D.26019 = is_sre_ctor_builder (D.26018);
  if (D.26019 != 0) goto <D.26020>; else goto <D.26021>;
  <D.26020>:
  {
    struct MonoReflectionCtorBuilder * cb;
    struct MonoDynamicGenericClass * dgclass;
    struct ReflectionMethodBuilder rmb;
    char * name;

    try
      {
        cb = c->cb;
        D.26022 = c->inst;
        type = mono_reflection_type_get_handle (D.26022);
        klass = mono_class_from_mono_type (type);
        gclass = type->data.generic_class;
        D.26023 = BIT_FIELD_REF <*gclass, 64, 192>;
        D.26024 = (signed long) D.26023;
        D.26025 = D.26024 >= 0;
        D.26026 = (long int) D.26025;
        D.26027 = __builtin_expect (D.26026, 0);
        if (D.26027 != 0) goto <D.26028>; else goto <D.26029>;
        <D.26028>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2835, "gclass->is_dynamic");
        <D.26029>:
        dgclass = gclass;
        reflection_methodbuilder_from_ctor_builder (&rmb, cb);
        D.26030 = rmb.name;
        name = mono_string_to_utf8 (D.26030);
        sig = method_builder_encode_signature (assembly, &rmb);
        D.26031 = &klass->byval_arg;
        token = mono_image_get_memberref_token (assembly, D.26031, name, sig);
        monoeg_g_free (name);
      }
    finally
      {
        rmb = {CLOBBER};
      }
  }
  goto <D.26032>;
  <D.26021>:
  D.26016 = c->cb;
  D.26017 = D.26016->vtable;
  D.26018 = D.26017->klass;
  D.26033 = is_sr_mono_cmethod (D.26018);
  if (D.26033 != 0) goto <D.26034>; else goto <D.26035>;
  <D.26034>:
  {
    struct MonoMethod * mm;

    D.26016 = c->cb;
    mm = MEM[(struct MonoReflectionMethod *)D.26016].method;
    D.26022 = c->inst;
    type = mono_reflection_type_get_handle (D.26022);
    klass = mono_class_from_mono_type (type);
    D.26036 = mono_method_signature (mm);
    sig = method_encode_signature (assembly, D.26036);
    D.26031 = &klass->byval_arg;
    D.26037 = mm->name;
    token = mono_image_get_memberref_token (assembly, D.26031, D.26037, sig);
  }
  goto <D.26038>;
  <D.26035>:
  {
    char * name;

    D.26016 = c->cb;
    D.26017 = D.26016->vtable;
    D.26018 = D.26017->klass;
    name = mono_type_get_full_name (D.26018);
    monoeg_g_log (0B, 4, "mono_image_get_method_on_inst_token: don\'t know how to handle %s", name);
    <D.19660>:
    goto <D.19660>;
  }
  <D.26038>:
  <D.26032>:
  D.26010 = assembly->handleref_managed;
  D.26039 = (long unsigned int) token;
  D.26040 = (void *) D.26039;
  mono_g_hash_table_insert (D.26010, c, D.26040);
  D.26015 = token;
  return D.26015;
}


is_sre_ctor_builder (struct MonoClass * class)
{
  struct MonoClass * cached_class.114;
  gboolean D.26045;
  _Bool D.26046;
  int D.26047;
  const char * D.26050;
  int D.26051;
  const char * D.26054;
  int D.26055;

  {
    static struct MonoClass * cached_class;

    cached_class.114 = cached_class;
    if (cached_class.114 != 0B) goto <D.26043>; else goto <D.26044>;
    <D.26043>:
    cached_class.114 = cached_class;
    D.26046 = cached_class.114 == class;
    D.26045 = (gboolean) D.26046;
    return D.26045;
    <D.26044>:
    D.26047 = is_corlib_type (class);
    if (D.26047 != 0) goto <D.26048>; else goto <D.26049>;
    <D.26048>:
    D.26050 = class->name;
    D.26051 = strcmp ("ConstructorBuilder", D.26050);
    if (D.26051 == 0) goto <D.26052>; else goto <D.26053>;
    <D.26052>:
    D.26054 = class->name_space;
    D.26055 = strcmp ("System.Reflection.Emit", D.26054);
    if (D.26055 == 0) goto <D.26056>; else goto <D.26057>;
    <D.26056>:
    cached_class = class;
    D.26045 = 1;
    return D.26045;
    <D.26057>:
    <D.26053>:
    <D.26049>:
    D.26045 = 0;
    return D.26045;
  }
}


is_sr_mono_cmethod (struct MonoClass * class)
{
  struct MonoClass * cached_class.115;
  gboolean D.26062;
  _Bool D.26063;
  int D.26064;
  const char * D.26067;
  int D.26068;
  const char * D.26071;
  int D.26072;

  {
    static struct MonoClass * cached_class;

    cached_class.115 = cached_class;
    if (cached_class.115 != 0B) goto <D.26060>; else goto <D.26061>;
    <D.26060>:
    cached_class.115 = cached_class;
    D.26063 = cached_class.115 == class;
    D.26062 = (gboolean) D.26063;
    return D.26062;
    <D.26061>:
    D.26064 = is_corlib_type (class);
    if (D.26064 != 0) goto <D.26065>; else goto <D.26066>;
    <D.26065>:
    D.26067 = class->name;
    D.26068 = strcmp ("MonoCMethod", D.26067);
    if (D.26068 == 0) goto <D.26069>; else goto <D.26070>;
    <D.26069>:
    D.26071 = class->name_space;
    D.26072 = strcmp ("System.Reflection", D.26071);
    if (D.26072 == 0) goto <D.26073>; else goto <D.26074>;
    <D.26073>:
    cached_class = class;
    D.26062 = 1;
    return D.26062;
    <D.26074>:
    <D.26070>:
    <D.26066>:
    D.26062 = 0;
    return D.26062;
  }
}


mono_image_get_method_on_inst_token (struct MonoDynamicImage * assembly, struct MonoReflectionMethodOnTypeBuilderInst * m, gboolean create_methodspec)
{
  struct MonoArray * D.26076;
  guint32 D.26082;
  struct MonoGHashTable * D.26083;
  void * D.26084;
  long int D.26085;
  struct MonoObject * D.26088;
  struct MonoVTable * D.26089;
  struct MonoClass * D.26090;
  int D.26091;
  struct MonoReflectionType * D.26094;
  long unsigned int D.26095;
  signed long D.26096;
  _Bool D.26097;
  long int D.26098;
  long int D.26099;
  struct MonoString * D.26102;
  struct MonoType * D.26103;
  int D.26105;
  struct MonoMethodSignature * D.26108;
  const char * D.26109;
  long unsigned int D.26111;
  void * D.26112;
  guint32 sig;
  guint32 token;
  struct MonoType * type;
  struct MonoClass * klass;

  token = 0;
  D.26076 = m->method_args;
  if (D.26076 != 0B) goto <D.26077>; else goto <D.26078>;
  <D.26077>:
  {
    struct MonoMethod * inflated;

    inflated = mono_reflection_method_on_tb_inst_get_handle (m);
    if (create_methodspec != 0) goto <D.26079>; else goto <D.26080>;
    <D.26079>:
    token = mono_image_get_methodspec_token (assembly, inflated);
    goto <D.26081>;
    <D.26080>:
    token = mono_image_get_inflated_method_token (assembly, inflated);
    <D.26081>:
    D.26082 = token;
    return D.26082;
  }
  <D.26078>:
  D.26083 = assembly->handleref_managed;
  D.26084 = mono_g_hash_table_lookup (D.26083, m);
  D.26085 = (long int) D.26084;
  token = (guint32) D.26085;
  if (token != 0) goto <D.26086>; else goto <D.26087>;
  <D.26086>:
  D.26082 = token;
  return D.26082;
  <D.26087>:
  D.26088 = m->mb;
  D.26089 = D.26088->vtable;
  D.26090 = D.26089->klass;
  D.26091 = is_sre_method_builder (D.26090);
  if (D.26091 != 0) goto <D.26092>; else goto <D.26093>;
  <D.26092>:
  {
    struct MonoReflectionMethodBuilder * mb;
    struct MonoGenericClass * gclass;
    struct ReflectionMethodBuilder rmb;
    char * name;

    try
      {
        mb = m->mb;
        D.26094 = m->inst;
        type = mono_reflection_type_get_handle (D.26094);
        klass = mono_class_from_mono_type (type);
        gclass = type->data.generic_class;
        D.26095 = BIT_FIELD_REF <*gclass, 64, 192>;
        D.26096 = (signed long) D.26095;
        D.26097 = D.26096 >= 0;
        D.26098 = (long int) D.26097;
        D.26099 = __builtin_expect (D.26098, 0);
        if (D.26099 != 0) goto <D.26100>; else goto <D.26101>;
        <D.26100>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 2934, "gclass->is_dynamic");
        <D.26101>:
        reflection_methodbuilder_from_method_builder (&rmb, mb);
        D.26102 = rmb.name;
        name = mono_string_to_utf8 (D.26102);
        sig = method_builder_encode_signature (assembly, &rmb);
        D.26103 = &klass->byval_arg;
        token = mono_image_get_memberref_token (assembly, D.26103, name, sig);
        monoeg_g_free (name);
      }
    finally
      {
        rmb = {CLOBBER};
      }
  }
  goto <D.26104>;
  <D.26093>:
  D.26088 = m->mb;
  D.26089 = D.26088->vtable;
  D.26090 = D.26089->klass;
  D.26105 = is_sr_mono_method (D.26090);
  if (D.26105 != 0) goto <D.26106>; else goto <D.26107>;
  <D.26106>:
  {
    struct MonoMethod * mm;

    D.26088 = m->mb;
    mm = MEM[(struct MonoReflectionMethod *)D.26088].method;
    D.26094 = m->inst;
    type = mono_reflection_type_get_handle (D.26094);
    klass = mono_class_from_mono_type (type);
    D.26108 = mono_method_signature (mm);
    sig = method_encode_signature (assembly, D.26108);
    D.26103 = &klass->byval_arg;
    D.26109 = mm->name;
    token = mono_image_get_memberref_token (assembly, D.26103, D.26109, sig);
  }
  goto <D.26110>;
  <D.26107>:
  {
    char * name;

    D.26088 = m->mb;
    D.26089 = D.26088->vtable;
    D.26090 = D.26089->klass;
    name = mono_type_get_full_name (D.26090);
    monoeg_g_log (0B, 4, "mono_image_get_method_on_inst_token: don\'t know how to handle %s", name);
    <D.19692>:
    goto <D.19692>;
  }
  <D.26110>:
  <D.26104>:
  D.26083 = assembly->handleref_managed;
  D.26111 = (long unsigned int) token;
  D.26112 = (void *) D.26111;
  mono_g_hash_table_insert (D.26083, m, D.26112);
  D.26082 = token;
  return D.26082;
}


mono_reflection_method_on_tb_inst_get_handle (struct MonoReflectionMethodOnTypeBuilderInst * m)
{
  struct MonoReflectionType * D.26114;
  struct MonoObject * D.26115;
  struct MonoArray * D.26116;
  struct MonoMethod * D.26119;
  long unsigned int D.26120;
  long unsigned int D.26121;
  long unsigned int D.26124;
  long unsigned int D.26125;
  long unsigned int D.26126;
  long unsigned int D.26127;
  char * D.26128;
  long unsigned int D.26129;
  long unsigned int D.26130;
  struct MonoType * * D.26131;
  struct MonoType * D.26132;
  struct MonoGenericInst * iftmp.116;
  struct MonoGenericClass * D.26134;
  struct MonoClass * klass;
  struct MonoGenericContext tmp_context;
  struct MonoType * * type_argv;
  struct MonoGenericInst * ginst;
  struct MonoMethod * method;
  struct MonoMethod * inflated;
  int count;
  int i;

  try
    {
      D.26114 = m->inst;
      init_type_builder_generics (D.26114);
      D.26114 = m->inst;
      D.26115 = m->mb;
      method = inflate_method (D.26114, D.26115);
      klass = method->klass;
      D.26116 = m->method_args;
      if (D.26116 == 0B) goto <D.26117>; else goto <D.26118>;
      <D.26117>:
      D.26119 = method;
      return D.26119;
      <D.26118>:
      D.26120 = BIT_FIELD_REF <*method, 64, 256>;
      D.26121 = D.26120 & 2251799813685248;
      if (D.26121 != 0) goto <D.26122>; else goto <D.26123>;
      <D.26122>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.26123>:
      D.26116 = m->method_args;
      D.26124 = mono_array_length (D.26116);
      count = (int) D.26124;
      D.26125 = (long unsigned int) count;
      D.26126 = D.26125 * 8;
      type_argv = monoeg_malloc0 (D.26126);
      i = 0;
      goto <D.19674>;
      <D.19673>:
      {
        struct MonoReflectionType * garg;

        D.26116 = m->method_args;
        D.26127 = (long unsigned int) i;
        D.26128 = mono_array_addr_with_size (D.26116, 8, D.26127);
        garg = MEM[(void * *)D.26128];
        D.26129 = (long unsigned int) i;
        D.26130 = D.26129 * 8;
        D.26131 = type_argv + D.26130;
        D.26132 = mono_reflection_type_get_handle (garg);
        *D.26131 = D.26132;
      }
      i = i + 1;
      <D.19674>:
      if (i < count) goto <D.19673>; else goto <D.19675>;
      <D.19675>:
      ginst = mono_metadata_get_generic_inst (count, type_argv);
      monoeg_g_free (type_argv);
      D.26134 = klass->generic_class;
      if (D.26134 != 0B) goto <D.26135>; else goto <D.26136>;
      <D.26135>:
      D.26134 = klass->generic_class;
      iftmp.116 = D.26134->context.class_inst;
      goto <D.26137>;
      <D.26136>:
      iftmp.116 = 0B;
      <D.26137>:
      tmp_context.class_inst = iftmp.116;
      tmp_context.method_inst = ginst;
      inflated = mono_class_inflate_generic_method (method, &tmp_context);
      D.26119 = inflated;
      return D.26119;
    }
  finally
    {
      tmp_context = {CLOBBER};
    }
}


inflate_method (struct MonoReflectionType * type, struct MonoObject * obj)
{
  struct MonoVTable * D.26140;
  int D.26141;
  struct MonoReflectionType * D.26144;
  struct MonoType * D.26145;
  int D.26147;
  struct MonoType * D.26150;
  struct MonoType * D.26152;
  struct MonoClass * D.26156;
  char * D.26157;
  struct MonoVTable * D.26158;
  struct MonoClass * D.26159;
  const char * D.26160;
  int D.26161;
  struct MonoMethod * D.26164;
  int D.26169;
  int D.26176;
  int D.26178;
  struct MonoMethod * D.26179;
  struct MonoType * D.26180;
  struct MonoClass * D.26181;
  struct MonoMethod * method;
  struct MonoClass * gklass;
  struct MonoClass * type_class;

  D.26140 = MEM[(struct MonoObject *)type].vtable;
  type_class = D.26140->klass;
  D.26141 = is_sre_generic_instance (type_class);
  if (D.26141 != 0) goto <D.26142>; else goto <D.26143>;
  <D.26142>:
  {
    struct MonoReflectionGenericClass * mgc;

    mgc = type;
    D.26144 = mgc->generic_type;
    D.26145 = mono_reflection_type_get_handle (D.26144);
    gklass = mono_class_from_mono_type (D.26145);
  }
  goto <D.26146>;
  <D.26143>:
  D.26147 = is_sre_type_builder (type_class);
  if (D.26147 != 0) goto <D.26148>; else goto <D.26149>;
  <D.26148>:
  D.26150 = mono_reflection_type_get_handle (type);
  gklass = mono_class_from_mono_type (D.26150);
  goto <D.26151>;
  <D.26149>:
  D.26152 = type->type;
  if (D.26152 != 0B) goto <D.26153>; else goto <D.26154>;
  <D.26153>:
  D.26152 = type->type;
  gklass = mono_class_from_mono_type (D.26152);
  gklass = mono_class_get_generic_type_definition (gklass);
  goto <D.26155>;
  <D.26154>:
  D.26140 = MEM[(struct MonoObject *)type].vtable;
  D.26156 = D.26140->klass;
  D.26157 = mono_type_get_full_name (D.26156);
  monoeg_g_log (0B, 4, "Can\'t handle type %s", D.26157);
  <D.22194>:
  goto <D.22194>;
  <D.26155>:
  <D.26151>:
  <D.26146>:
  D.26158 = obj->vtable;
  D.26159 = D.26158->klass;
  D.26160 = D.26159->name;
  D.26161 = strcmp (D.26160, "MethodBuilder");
  if (D.26161 == 0) goto <D.26162>; else goto <D.26163>;
  <D.26162>:
  D.26164 = MEM[(struct MonoReflectionMethodBuilder *)obj].mhandle;
  if (D.26164 != 0B) goto <D.26165>; else goto <D.26166>;
  <D.26165>:
  method = MEM[(struct MonoReflectionMethodBuilder *)obj].mhandle;
  goto <D.26167>;
  <D.26166>:
  method = methodbuilder_to_mono_method (gklass, obj);
  <D.26167>:
  goto <D.26168>;
  <D.26163>:
  D.26158 = obj->vtable;
  D.26159 = D.26158->klass;
  D.26160 = D.26159->name;
  D.26169 = strcmp (D.26160, "ConstructorBuilder");
  if (D.26169 == 0) goto <D.26170>; else goto <D.26171>;
  <D.26170>:
  method = ctorbuilder_to_mono_method (gklass, obj);
  goto <D.26172>;
  <D.26171>:
  D.26158 = obj->vtable;
  D.26159 = D.26158->klass;
  D.26160 = D.26159->name;
  D.26176 = strcmp (D.26160, "MonoMethod");
  if (D.26176 == 0) goto <D.26173>; else goto <D.26177>;
  <D.26177>:
  D.26158 = obj->vtable;
  D.26159 = D.26158->klass;
  D.26160 = D.26159->name;
  D.26178 = strcmp (D.26160, "MonoCMethod");
  if (D.26178 == 0) goto <D.26173>; else goto <D.26174>;
  <D.26173>:
  method = MEM[(struct MonoReflectionMethod *)obj].method;
  goto <D.26175>;
  <D.26174>:
  method = 0B;
  D.26158 = obj->vtable;
  D.26159 = D.26158->klass;
  D.26160 = D.26159->name;
  monoeg_g_log (0B, 4, "can\'t handle type %s", D.26160);
  <D.22195>:
  goto <D.22195>;
  <D.26175>:
  <D.26172>:
  <D.26168>:
  D.26180 = mono_reflection_type_get_handle (type);
  D.26181 = mono_class_from_mono_type (D.26180);
  D.26179 = inflate_mono_method (D.26181, method, obj);
  return D.26179;
}


is_sre_generic_instance (struct MonoClass * class)
{
  struct MonoClass * cached_class.117;
  gboolean D.26186;
  _Bool D.26187;
  int D.26188;
  const char * D.26191;
  int D.26192;
  const char * D.26195;
  int D.26196;

  {
    static struct MonoClass * cached_class;

    cached_class.117 = cached_class;
    if (cached_class.117 != 0B) goto <D.26184>; else goto <D.26185>;
    <D.26184>:
    cached_class.117 = cached_class;
    D.26187 = cached_class.117 == class;
    D.26186 = (gboolean) D.26187;
    return D.26186;
    <D.26185>:
    D.26188 = is_corlib_type (class);
    if (D.26188 != 0) goto <D.26189>; else goto <D.26190>;
    <D.26189>:
    D.26191 = class->name;
    D.26192 = strcmp ("MonoGenericClass", D.26191);
    if (D.26192 == 0) goto <D.26193>; else goto <D.26194>;
    <D.26193>:
    D.26195 = class->name_space;
    D.26196 = strcmp ("System.Reflection", D.26195);
    if (D.26196 == 0) goto <D.26197>; else goto <D.26198>;
    <D.26197>:
    cached_class = class;
    D.26186 = 1;
    return D.26186;
    <D.26198>:
    <D.26194>:
    <D.26190>:
    D.26186 = 0;
    return D.26186;
  }
}


methodbuilder_to_mono_method (struct MonoClass * klass, struct MonoReflectionMethodBuilder * mb)
{
  struct MonoImage * D.26200;
  struct MonoMethod * D.26201;
  struct MonoMethod * D.26202;
  struct MonoArray * D.26203;
  int D.26204;
  struct MonoGenericContainer * D.26207;
  struct MonoMethod * D.26210;
  struct ReflectionMethodBuilder rmb;
  struct MonoMethodSignature * sig;

  try
    {
      mono_loader_lock ();
      D.26200 = klass->image;
      sig = method_builder_to_signature (D.26200, mb);
      mono_loader_unlock ();
      reflection_methodbuilder_from_method_builder (&rmb, mb);
      D.26201 = reflection_methodbuilder_to_mono_method (klass, &rmb, sig);
      mb->mhandle = D.26201;
      D.26200 = klass->image;
      D.26202 = mb->mhandle;
      D.26203 = mb->cattrs;
      mono_save_custom_attrs (D.26200, D.26202, D.26203);
      D.26200 = klass->image;
      D.26204 = MEM[(struct MonoDynamicImage *)D.26200].save;
      if (D.26204 == 0) goto <D.26205>; else goto <D.26206>;
      <D.26205>:
      D.26207 = klass->generic_container;
      if (D.26207 == 0B) goto <D.26208>; else goto <D.26209>;
      <D.26208>:
      mb->ilgen = 0B;
      <D.26209>:
      <D.26206>:
      D.26210 = mb->mhandle;
      return D.26210;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


method_builder_to_signature (struct MonoImage * image, struct MonoReflectionMethodBuilder * method)
{
  struct MonoArray * D.26213;
  unsigned int D.26214;
  unsigned int D.26215;
  _Bool D.26216;
  struct MonoType * iftmp.118;
  struct MonoObject * D.26218;
  struct MonoClass * D.26222;
  short unsigned int iftmp.119;
  struct MonoArray * D.26224;
  long unsigned int D.26227;
  struct MonoMethodSignature * D.26229;
  struct MonoMethodSignature * sig;

  D.26213 = method->parameters;
  sig = parameters_to_signature (image, D.26213);
  D.26214 = method->attrs;
  D.26215 = D.26214 & 16;
  D.26216 = D.26215 == 0;
  sig->hasthis = D.26216;
  D.26218 = method->rtype;
  if (D.26218 != 0B) goto <D.26219>; else goto <D.26220>;
  <D.26219>:
  D.26218 = method->rtype;
  iftmp.118 = mono_reflection_type_get_handle (D.26218);
  goto <D.26221>;
  <D.26220>:
  D.26222 = mono_defaults.void_class;
  iftmp.118 = &D.26222->byval_arg;
  <D.26221>:
  sig->ret = iftmp.118;
  D.26224 = method->generic_params;
  if (D.26224 != 0B) goto <D.26225>; else goto <D.26226>;
  <D.26225>:
  D.26224 = method->generic_params;
  D.26227 = mono_array_length (D.26224);
  iftmp.119 = (short unsigned int) D.26227;
  goto <D.26228>;
  <D.26226>:
  iftmp.119 = 0;
  <D.26228>:
  sig->generic_param_count = iftmp.119;
  D.26229 = sig;
  return D.26229;
}


parameters_to_signature (struct MonoImage * image, struct MonoArray * parameters)
{
  int iftmp.120;
  long unsigned int D.26234;
  long unsigned int D.26236;
  long unsigned int D.26237;
  unsigned int D.26238;
  unsigned int D.26239;
  short unsigned int D.26240;
  long unsigned int D.26241;
  char * D.26242;
  void * D.26243;
  struct MonoType * D.26244;
  struct MonoMethodSignature * D.26245;
  struct MonoMethodSignature * sig;
  int count;
  int i;

  if (parameters != 0B) goto <D.26232>; else goto <D.26233>;
  <D.26232>:
  D.26234 = mono_array_length (parameters);
  iftmp.120 = (int) D.26234;
  goto <D.26235>;
  <D.26233>:
  iftmp.120 = 0;
  <D.26235>:
  count = iftmp.120;
  D.26236 = (long unsigned int) count;
  D.26237 = D.26236 + 2;
  D.26238 = (unsigned int) D.26237;
  D.26239 = D.26238 * 8;
  sig = image_g_malloc0 (image, D.26239);
  D.26240 = (short unsigned int) count;
  sig->param_count = D.26240;
  sig->sentinelpos = -1;
  i = 0;
  goto <D.21821>;
  <D.21820>:
  D.26241 = (long unsigned int) i;
  D.26242 = mono_array_addr_with_size (parameters, 8, D.26241);
  D.26243 = MEM[(void * *)D.26242];
  D.26244 = mono_reflection_type_get_handle (D.26243);
  sig->params[i] = D.26244;
  i = i + 1;
  <D.21821>:
  if (i < count) goto <D.21820>; else goto <D.21822>;
  <D.21822>:
  D.26245 = sig;
  return D.26245;
}


image_g_malloc0 (struct MonoImage * image, guint size)
{
  void * D.26249;
  long unsigned int D.26250;

  if (image != 0B) goto <D.26247>; else goto <D.26248>;
  <D.26247>:
  D.26249 = mono_image_alloc0 (image, size);
  return D.26249;
  <D.26248>:
  D.26250 = (long unsigned int) size;
  D.26249 = monoeg_malloc0 (D.26250);
  return D.26249;
}


reflection_methodbuilder_to_mono_method (struct MonoClass * klass, struct ReflectionMethodBuilder * rmb, struct MonoMethodSignature * sig)
{
  void * * D.26252;
  _Bool D.26253;
  struct MonoImage * iftmp.121;
  struct MonoGenericClass * D.26260;
  _Bool D.26261;
  long int D.26262;
  long int D.26263;
  long unsigned int D.26266;
  long unsigned int D.26267;
  unsigned char D.26271;
  <unnamed-unsigned:1> D.26272;
  unsigned int D.26273;
  short unsigned int D.26274;
  unsigned int D.26275;
  short unsigned int D.26276;
  struct MonoString * D.26277;
  char * D.26278;
  unsigned char D.26279;
  <unnamed-unsigned:1> D.26280;
  guint32 * D.26281;
  unsigned int D.26284;
  unsigned int D.26285;
  short unsigned int D.26286;
  int D.26287;
  int D.26288;
  struct MonoClass * D.26291;
  const char * D.26294;
  int D.26295;
  struct MonoMethodSignature * D.26298;
  short unsigned int D.26300;
  int D.26301;
  int D.26302;
  char * iftmp.122;
  struct MonoString * D.26306;
  int D.26310;
  _Bool D.26311;
  long int D.26312;
  long int D.26313;
  struct MonoString * D.26316;
  char * D.26317;
  int D.26318;
  _Bool D.26319;
  long int D.26320;
  long int D.26321;
  int D.26324;
  int D.26325;
  signed short D.26326;
  signed short iftmp.123;
  int D.26328;
  int D.26331;
  unsigned short D.26332;
  unsigned short D.26333;
  signed short D.26335;
  int D.26336;
  signed short D.26337;
  signed short D.26338;
  short unsigned int D.26339;
  struct MonoImage * D.26340;
  long unsigned int D.26341;
  long unsigned int D.26342;
  struct GHashTable * D.26345;
  struct MonoMethod * D.26346;
  int D.26347;
  int D.26350;
  struct MonoReflectionILGen * D.26353;
  struct MonoArray * D.26356;
  int D.26357;
  gint32 iftmp.124;
  struct MonoArray * D.26359;
  long unsigned int D.26362;
  struct MonoArray * D.26364;
  unsigned int D.26367;
  struct MonoArray * D.26369;
  long unsigned int D.26372;
  long unsigned int D.26374;
  long unsigned int D.26375;
  unsigned int D.26376;
  unsigned int D.26377;
  void * D.26378;
  const unsigned char * D.26379;
  long unsigned int D.26380;
  short unsigned int D.26381;
  <unnamed-unsigned:15> D.26382;
  unsigned char D.26383;
  <unnamed-unsigned:1> D.26384;
  short unsigned int D.26385;
  long unsigned int D.26386;
  char * D.26387;
  void * D.26388;
  struct MonoType * D.26389;
  struct MonoObject * D.26390;
  struct MonoType * D.26391;
  short unsigned int D.26392;
  <unnamed-unsigned:15> D.26393;
  unsigned int num_clauses.125;
  struct MonoExceptionClause * D.26397;
  struct MonoArray * D.26398;
  long unsigned int D.26401;
  _Bool D.26402;
  long int D.26403;
  long int D.26404;
  <unnamed-signed:31> D.26407;
  long unsigned int D.26408;
  unsigned int D.26409;
  unsigned int D.26410;
  void * D.26411;
  long unsigned int D.26412;
  char * D.26413;
  struct MonoType * D.26414;
  struct MonoGenericParamFull * D.26415;
  long unsigned int D.26416;
  long unsigned int D.26417;
  struct MonoGenericParamFull * D.26418;
  unsigned char D.26419;
  short unsigned int D.26422;
  int D.26423;
  struct MonoType * D.26426;
  struct MonoType * D.26427;
  long unsigned int D.26428;
  long unsigned int D.26429;
  struct MonoGenericParamFull * D.26430;
  short unsigned int D.26431;
  int D.26432;
  struct MonoGenericContainer * D.26433;
  struct MonoGenericInst * D.26436;
  struct MonoGenericInst * D.26437;
  unsigned int D.26440;
  unsigned int D.26441;
  unsigned int D.26442;
  long unsigned int D.26443;
  void * D.26444;
  sizetype D.26445;
  sizetype D.26446;
  sizetype D.26447;
  void * * D.26448;
  long unsigned int D.26449;
  long unsigned int D.26450;
  void * * D.26451;
  void * D.26452;
  unsigned int i.126;
  struct MonoArray * D.26454;
  struct MonoMethodSignature * D.26459;
  short unsigned int D.26460;
  int D.26461;
  int D.26462;
  long unsigned int D.26463;
  unsigned int D.26464;
  unsigned int D.26465;
  void * D.26466;
  char * D.26467;
  unsigned int D.26472;
  int D.26475;
  struct MonoType * D.26476;
  struct MonoType * D.26477;
  short unsigned int D.26478;
  unsigned int D.26479;
  uint8_t * * D.26482;
  int D.26485;
  long unsigned int D.26486;
  unsigned int D.26487;
  unsigned int D.26488;
  void * D.26489;
  unsigned int D.26490;
  void * D.26491;
  struct MonoObject * D.26492;
  char * D.26493;
  sizetype D.26494;
  const char * p2.127;
  long int p2.128;
  long int p.129;
  long int D.26498;
  unsigned int D.26499;
  long unsigned int D.26500;
  uint8_t * * D.26501;
  void * D.26502;
  uint32_t * D.26503;
  long unsigned int D.26504;
  uint32_t * D.26505;
  unsigned int def_type.130;
  uint8_t * D.26507;
  long unsigned int D.26508;
  struct MonoString * D.26509;
  char * * D.26512;
  char * * D.26513;
  char * D.26514;
  int D.26515;
  _Bool D.26516;
  long int D.26517;
  long int D.26518;
  struct MonoArray * D.26521;
  struct MonoCustomAttrInfo * * D.26524;
  void * D.26527;
  struct MonoCustomAttrInfo * * D.26528;
  struct MonoCustomAttrInfo * D.26529;
  char * D.26532;
  struct MonoReflectionMarshal * D.26535;
  short unsigned int D.26540;
  int D.26541;
  int D.26542;
  long unsigned int D.26543;
  unsigned int D.26544;
  unsigned int D.26545;
  int D.26546;
  long unsigned int D.26547;
  long unsigned int D.26548;
  struct MonoMarshalSpec * * D.26549;
  struct MonoAssembly * D.26550;
  struct MonoMarshalSpec * D.26551;
  long unsigned int D.26552;
  struct MonoError error;
  struct MonoMethod * m;
  struct MonoMethodWrapper * wrapperm;
  struct MonoMarshalSpec * * specs;
  struct MonoReflectionMethodAux * method_aux;
  struct MonoImage * image;
  gboolean dynamic;
  int i;

  try
    {
      mono_error_init (&error);
      D.26252 = rmb->refs;
      D.26253 = D.26252 != 0B;
      dynamic = (gboolean) D.26253;
      if (dynamic == 0) goto <D.26255>; else goto <D.26256>;
      <D.26255>:
      iftmp.121 = klass->image;
      goto <D.26257>;
      <D.26256>:
      iftmp.121 = 0B;
      <D.26257>:
      image = iftmp.121;
      if (dynamic == 0) goto <D.26258>; else goto <D.26259>;
      <D.26258>:
      D.26260 = klass->generic_class;
      D.26261 = D.26260 != 0B;
      D.26262 = (long int) D.26261;
      D.26263 = __builtin_expect (D.26262, 0);
      if (D.26263 != 0) goto <D.26264>; else goto <D.26265>;
      <D.26264>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10133, "!klass->generic_class");
      <D.26265>:
      <D.26259>:
      mono_loader_lock ();
      D.26266 = BIT_FIELD_REF <*rmb, 64, 448>;
      D.26267 = D.26266 & 35184372092928;
      if (D.26267 != 0) goto <D.26268>; else goto <D.26269>;
      <D.26268>:
      m = image_g_malloc0 (image, 56);
      goto <D.26270>;
      <D.26269>:
      m = image_g_malloc0 (image, 56);
      <D.26270>:
      wrapperm = m;
      D.26271 = (unsigned char) dynamic;
      D.26272 = (<unnamed-unsigned:1>) D.26271;
      m->dynamic = D.26272;
      m->slot = -1;
      D.26273 = rmb->attrs;
      D.26274 = (short unsigned int) D.26273;
      m->flags = D.26274;
      D.26275 = rmb->iattrs;
      D.26276 = (short unsigned int) D.26275;
      m->iflags = D.26276;
      D.26277 = rmb->name;
      D.26278 = mono_string_to_utf8_image_ignore (image, D.26277);
      m->name = D.26278;
      m->klass = klass;
      m->signature = sig;
      m->sre_method = 1;
      D.26279 = rmb->skip_visibility;
      D.26280 = (<unnamed-unsigned:1>) D.26279;
      m->skip_visibility = D.26280;
      D.26281 = rmb->table_idx;
      if (D.26281 != 0B) goto <D.26282>; else goto <D.26283>;
      <D.26282>:
      D.26281 = rmb->table_idx;
      D.26284 = *D.26281;
      D.26285 = D.26284 | 100663296;
      m->token = D.26285;
      <D.26283>:
      D.26286 = m->iflags;
      D.26287 = (int) D.26286;
      D.26288 = D.26287 & 4096;
      if (D.26288 != 0) goto <D.26289>; else goto <D.26290>;
      <D.26289>:
      D.26291 = mono_defaults.string_class;
      if (D.26291 == klass) goto <D.26292>; else goto <D.26293>;
      <D.26292>:
      D.26294 = m->name;
      D.26295 = strcmp (D.26294, ".ctor");
      if (D.26295 == 0) goto <D.26296>; else goto <D.26297>;
      <D.26296>:
      m->string_ctor = 1;
      <D.26297>:
      <D.26293>:
      D.26298 = m->signature;
      D.26298->pinvoke = 1;
      goto <D.26299>;
      <D.26290>:
      D.26300 = m->flags;
      D.26301 = (int) D.26300;
      D.26302 = D.26301 & 8192;
      if (D.26302 != 0) goto <D.26303>; else goto <D.26304>;
      <D.26303>:
      D.26298 = m->signature;
      D.26298->pinvoke = 1;
      method_aux = image_g_malloc0 (image, 56);
      D.26306 = rmb->dllentry;
      if (D.26306 != 0B) goto <D.26307>; else goto <D.26308>;
      <D.26307>:
      D.26306 = rmb->dllentry;
      iftmp.122 = mono_string_to_utf8_image (image, D.26306, &error);
      goto <D.26309>;
      <D.26308>:
      D.26294 = m->name;
      iftmp.122 = image_strdup (image, D.26294);
      <D.26309>:
      method_aux->dllentry = iftmp.122;
      D.26310 = mono_error_ok (&error);
      D.26311 = D.26310 == 0;
      D.26312 = (long int) D.26311;
      D.26313 = __builtin_expect (D.26312, 0);
      if (D.26313 != 0) goto <D.26314>; else goto <D.26315>;
      <D.26314>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10168, "mono_error_ok (&error)");
      <D.26315>:
      D.26316 = rmb->dll;
      D.26317 = mono_string_to_utf8_image (image, D.26316, &error);
      method_aux->dll = D.26317;
      D.26318 = mono_error_ok (&error);
      D.26319 = D.26318 == 0;
      D.26320 = (long int) D.26319;
      D.26321 = __builtin_expect (D.26320, 0);
      if (D.26321 != 0) goto <D.26322>; else goto <D.26323>;
      <D.26322>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10170, "mono_error_ok (&error)");
      <D.26323>:
      D.26324 = rmb->native_cc;
      D.26325 = D.26324 << 8;
      D.26326 = (signed short) D.26325;
      D.26328 = rmb->charset;
      if (D.26328 != 0) goto <D.26329>; else goto <D.26330>;
      <D.26329>:
      D.26328 = rmb->charset;
      D.26331 = D.26328 + -1;
      D.26332 = (unsigned short) D.26331;
      D.26333 = D.26332 * 2;
      iftmp.123 = (signed short) D.26333;
      goto <D.26334>;
      <D.26330>:
      iftmp.123 = 0;
      <D.26334>:
      D.26335 = D.26326 | iftmp.123;
      D.26336 = rmb->extra_flags;
      D.26337 = (signed short) D.26336;
      D.26338 = D.26335 | D.26337;
      D.26339 = (short unsigned int) D.26338;
      MEM[(struct MonoMethodPInvoke *)m].piflags = D.26339;
      D.26340 = klass->image;
      D.26341 = BIT_FIELD_REF <*D.26340, 64, 192>;
      D.26342 = D.26341 & 268435456;
      if (D.26342 != 0) goto <D.26343>; else goto <D.26344>;
      <D.26343>:
      D.26340 = klass->image;
      D.26345 = MEM[(struct MonoDynamicImage *)D.26340].method_aux_hash;
      monoeg_g_hash_table_insert_replace (D.26345, m, method_aux, 0);
      <D.26344>:
      mono_loader_unlock ();
      D.26346 = m;
      return D.26346;
      <D.26304>:
      D.26300 = m->flags;
      D.26301 = (int) D.26300;
      D.26347 = D.26301 & 1024;
      if (D.26347 == 0) goto <D.26348>; else goto <D.26349>;
      <D.26348>:
      D.26286 = m->iflags;
      D.26287 = (int) D.26286;
      D.26350 = D.26287 & 3;
      if (D.26350 == 0) goto <D.26351>; else goto <D.26352>;
      <D.26351>:
      {
        struct MonoMethodHeader * header;
        guint32 code_size;
        gint32 max_stack;
        gint32 i;
        gint32 num_locals;
        gint32 num_clauses;
        guint8 * code;

        num_locals = 0;
        num_clauses = 0;
        D.26353 = rmb->ilgen;
        if (D.26353 != 0B) goto <D.26354>; else goto <D.26355>;
        <D.26354>:
        D.26353 = rmb->ilgen;
        D.26356 = D.26353->code;
        code = mono_array_addr_with_size (D.26356, 1, 0);
        D.26353 = rmb->ilgen;
        D.26357 = D.26353->code_len;
        code_size = (guint32) D.26357;
        D.26353 = rmb->ilgen;
        max_stack = D.26353->max_stack;
        D.26353 = rmb->ilgen;
        D.26359 = D.26353->locals;
        if (D.26359 != 0B) goto <D.26360>; else goto <D.26361>;
        <D.26360>:
        D.26353 = rmb->ilgen;
        D.26359 = D.26353->locals;
        D.26362 = mono_array_length (D.26359);
        iftmp.124 = (gint32) D.26362;
        goto <D.26363>;
        <D.26361>:
        iftmp.124 = 0;
        <D.26363>:
        num_locals = iftmp.124;
        D.26353 = rmb->ilgen;
        D.26364 = D.26353->ex_handlers;
        if (D.26364 != 0B) goto <D.26365>; else goto <D.26366>;
        <D.26365>:
        D.26353 = rmb->ilgen;
        D.26367 = method_count_clauses (D.26353);
        num_clauses = (gint32) D.26367;
        <D.26366>:
        goto <D.26368>;
        <D.26355>:
        D.26369 = rmb->code;
        if (D.26369 != 0B) goto <D.26370>; else goto <D.26371>;
        <D.26370>:
        D.26369 = rmb->code;
        code = mono_array_addr_with_size (D.26369, 1, 0);
        D.26369 = rmb->code;
        D.26372 = mono_array_length (D.26369);
        code_size = (guint32) D.26372;
        max_stack = 8;
        goto <D.26373>;
        <D.26371>:
        code = 0B;
        code_size = 0;
        max_stack = 8;
        <D.26373>:
        <D.26368>:
        D.26374 = (long unsigned int) num_locals;
        D.26375 = D.26374 + 4;
        D.26376 = (unsigned int) D.26375;
        D.26377 = D.26376 * 8;
        header = image_g_malloc0 (image, D.26377);
        header->code_size = code_size;
        D.26378 = image_g_malloc (image, code_size);
        header->code = D.26378;
        D.26379 = header->code;
        D.26380 = (long unsigned int) code_size;
        memcpy (D.26379, code, D.26380);
        D.26381 = (short unsigned int) max_stack;
        D.26382 = (<unnamed-unsigned:15>) D.26381;
        header->max_stack = D.26382;
        D.26383 = rmb->init_locals;
        D.26384 = (<unnamed-unsigned:1>) D.26383;
        header->init_locals = D.26384;
        D.26385 = (short unsigned int) num_locals;
        header->num_locals = D.26385;
        i = 0;
        goto <D.22080>;
        <D.22079>:
        {
          struct MonoReflectionLocalBuilder * lb;

          D.26353 = rmb->ilgen;
          D.26359 = D.26353->locals;
          D.26386 = (long unsigned int) i;
          D.26387 = mono_array_addr_with_size (D.26359, 8, D.26386);
          lb = MEM[(struct MonoReflectionLocalBuilder * *)D.26387];
          D.26388 = image_g_malloc0 (image, 16);
          header->locals[i] = D.26388;
          D.26389 = header->locals[i];
          D.26390 = lb->type;
          D.26391 = mono_reflection_type_get_handle (D.26390);
          memcpy (D.26389, D.26391, 12);
        }
        i = i + 1;
        <D.22080>:
        if (i < num_locals) goto <D.22079>; else goto <D.22081>;
        <D.22081>:
        D.26392 = (short unsigned int) num_clauses;
        D.26393 = (<unnamed-unsigned:15>) D.26392;
        header->num_clauses = D.26393;
        if (num_clauses != 0) goto <D.26394>; else goto <D.26395>;
        <D.26394>:
        D.26340 = klass->image;
        D.26353 = rmb->ilgen;
        num_clauses.125 = (unsigned int) num_clauses;
        D.26397 = method_encode_clauses (image, D.26340, D.26353, num_clauses.125);
        header->clauses = D.26397;
        <D.26395>:
        wrapperm->header = header;
      }
      <D.26352>:
      <D.26349>:
      <D.26299>:
      D.26398 = rmb->generic_params;
      if (D.26398 != 0B) goto <D.26399>; else goto <D.26400>;
      <D.26399>:
      {
        int count;
        struct MonoGenericContainer * container;

        D.26398 = rmb->generic_params;
        D.26401 = mono_array_length (D.26398);
        count = (int) D.26401;
        container = rmb->generic_container;
        D.26402 = container == 0B;
        D.26403 = (long int) D.26402;
        D.26404 = __builtin_expect (D.26403, 0);
        if (D.26404 != 0) goto <D.26405>; else goto <D.26406>;
        <D.26405>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10239, "container");
        <D.26406>:
        D.26407 = (<unnamed-signed:31>) count;
        container->type_argc = D.26407;
        D.26408 = (long unsigned int) count;
        D.26409 = (unsigned int) D.26408;
        D.26410 = D.26409 * 56;
        D.26411 = image_g_malloc0 (image, D.26410);
        container->type_params = D.26411;
        container->owner.method = m;
        m->is_generic = 1;
        mono_method_set_generic_container (m, container);
        i = 0;
        goto <D.22087>;
        <D.22086>:
        {
          struct MonoReflectionGenericParam * gp;
          struct MonoGenericParamFull * param;

          D.26398 = rmb->generic_params;
          D.26412 = (long unsigned int) i;
          D.26413 = mono_array_addr_with_size (D.26398, 8, D.26412);
          gp = MEM[(struct MonoReflectionGenericParam * *)D.26413];
          D.26414 = mono_reflection_type_get_handle (gp);
          param = D.26414->data.generic_param;
          D.26415 = container->type_params;
          D.26416 = (long unsigned int) i;
          D.26417 = D.26416 * 56;
          D.26418 = D.26415 + D.26417;
          *D.26418 = *param;
        }
        i = i + 1;
        <D.22087>:
        if (i < count) goto <D.22086>; else goto <D.22088>;
        <D.22088>:
        i = 0;
        goto <D.22092>;
        <D.22091>:
        {
          struct MonoType * t;

          D.26298 = m->signature;
          t = D.26298->params[i];
          D.26419 = t->type;
          if (D.26419 == 30) goto <D.26420>; else goto <D.26421>;
          <D.26420>:
          {
            struct MonoGenericParam * gparam;

            gparam = t->data.generic_param;
            D.26422 = gparam->num;
            D.26423 = (int) D.26422;
            if (D.26423 < count) goto <D.26424>; else goto <D.26425>;
            <D.26424>:
            D.26298 = m->signature;
            D.26298 = m->signature;
            D.26426 = D.26298->params[i];
            D.26427 = mono_metadata_type_dup (image, D.26426);
            D.26298->params[i] = D.26427;
            D.26298 = m->signature;
            D.26426 = D.26298->params[i];
            D.26415 = container->type_params;
            D.26422 = gparam->num;
            D.26428 = (long unsigned int) D.26422;
            D.26429 = D.26428 * 56;
            D.26430 = D.26415 + D.26429;
            D.26426->data.generic_param = D.26430;
            <D.26425>:
          }
          <D.26421>:
        }
        i = i + 1;
        <D.22092>:
        D.26298 = m->signature;
        D.26431 = D.26298->param_count;
        D.26432 = (int) D.26431;
        if (D.26432 > i) goto <D.22091>; else goto <D.22093>;
        <D.22093>:
        D.26433 = klass->generic_container;
        if (D.26433 != 0B) goto <D.26434>; else goto <D.26435>;
        <D.26434>:
        D.26433 = klass->generic_container;
        container->parent = D.26433;
        D.26433 = klass->generic_container;
        D.26436 = D.26433->context.class_inst;
        container->context.class_inst = D.26436;
        <D.26435>:
        D.26437 = mono_get_shared_generic_inst (container);
        container->context.method_inst = D.26437;
      }
      <D.26400>:
      D.26252 = rmb->refs;
      if (D.26252 != 0B) goto <D.26438>; else goto <D.26439>;
      <D.26438>:
      {
        struct MonoMethodWrapper * mw;
        int i;
        void * * data;

        mw = m;
        m->wrapper_type = 17;
        D.26440 = rmb->nrefs;
        D.26441 = D.26440 + 1;
        D.26442 = D.26441 * 8;
        data = image_g_malloc (image, D.26442);
        mw->method_data = data;
        D.26440 = rmb->nrefs;
        D.26443 = (long unsigned int) D.26440;
        D.26444 = (void *) D.26443;
        *data = D.26444;
        i = 0;
        goto <D.22098>;
        <D.22097>:
        D.26445 = (sizetype) i;
        D.26446 = D.26445 + 1;
        D.26447 = D.26446 * 8;
        D.26448 = data + D.26447;
        D.26252 = rmb->refs;
        D.26449 = (long unsigned int) i;
        D.26450 = D.26449 * 8;
        D.26451 = D.26252 + D.26450;
        D.26452 = *D.26451;
        *D.26448 = D.26452;
        i = i + 1;
        <D.22098>:
        D.26440 = rmb->nrefs;
        i.126 = (unsigned int) i;
        if (D.26440 > i.126) goto <D.22097>; else goto <D.22099>;
        <D.22099>:
      }
      <D.26439>:
      method_aux = 0B;
      D.26454 = rmb->pinfo;
      if (D.26454 != 0B) goto <D.26455>; else goto <D.26456>;
      <D.26455>:
      if (method_aux == 0B) goto <D.26457>; else goto <D.26458>;
      <D.26457>:
      method_aux = image_g_malloc0 (image, 56);
      <D.26458>:
      D.26459 = mono_method_signature (m);
      D.26460 = D.26459->param_count;
      D.26461 = (int) D.26460;
      D.26462 = D.26461 + 1;
      D.26463 = (long unsigned int) D.26462;
      D.26464 = (unsigned int) D.26463;
      D.26465 = D.26464 * 8;
      D.26466 = image_g_malloc0 (image, D.26465);
      method_aux->param_names = D.26466;
      i = 0;
      goto <D.22108>;
      <D.22107>:
      {
        struct MonoReflectionParamBuilder * pb;

        D.26454 = rmb->pinfo;
        D.26412 = (long unsigned int) i;
        D.26467 = mono_array_addr_with_size (D.26454, 8, D.26412);
        pb = MEM[(struct MonoReflectionParamBuilder * *)D.26467];
        if (pb != 0B) goto <D.26468>; else goto <D.26469>;
        <D.26468>:
        if (i > 0) goto <D.26470>; else goto <D.26471>;
        <D.26470>:
        D.26472 = pb->attrs;
        if (D.26472 != 0) goto <D.26473>; else goto <D.26474>;
        <D.26473>:
        D.26298 = m->signature;
        D.26475 = i + -1;
        D.26340 = klass->image;
        D.26298 = m->signature;
        D.26475 = i + -1;
        D.26476 = D.26298->params[D.26475];
        D.26477 = mono_metadata_type_dup (D.26340, D.26476);
        D.26298->params[D.26475] = D.26477;
        D.26298 = m->signature;
        D.26475 = i + -1;
        D.26476 = D.26298->params[D.26475];
        D.26472 = pb->attrs;
        D.26478 = (short unsigned int) D.26472;
        D.26476->attrs = D.26478;
        <D.26474>:
        <D.26471>:
        D.26472 = pb->attrs;
        D.26479 = D.26472 & 4096;
        if (D.26479 != 0) goto <D.26480>; else goto <D.26481>;
        <D.26480>:
        {
          struct MonoDynamicImage * assembly;
          guint32 idx;
          guint32 def_type;
          guint32 len;
          char * p;
          const char * p2;

          try
            {
              D.26482 = method_aux->param_defaults;
              if (D.26482 == 0B) goto <D.26483>; else goto <D.26484>;
              <D.26483>:
              D.26298 = m->signature;
              D.26431 = D.26298->param_count;
              D.26432 = (int) D.26431;
              D.26485 = D.26432 + 1;
              D.26486 = (long unsigned int) D.26485;
              D.26487 = (unsigned int) D.26486;
              D.26488 = D.26487 * 8;
              D.26489 = image_g_malloc0 (image, D.26488);
              method_aux->param_defaults = D.26489;
              D.26298 = m->signature;
              D.26431 = D.26298->param_count;
              D.26432 = (int) D.26431;
              D.26485 = D.26432 + 1;
              D.26486 = (long unsigned int) D.26485;
              D.26487 = (unsigned int) D.26486;
              D.26490 = D.26487 * 4;
              D.26491 = image_g_malloc0 (image, D.26490);
              method_aux->param_default_types = D.26491;
              <D.26484>:
              assembly = klass->image;
              D.26492 = pb->def_value;
              idx = encode_constant (assembly, D.26492, &def_type);
              D.26493 = assembly->blob.data;
              D.26494 = (sizetype) idx;
              p = D.26493 + D.26494;
              len = mono_metadata_decode_blob_size (p, &p2);
              p2.127 = p2;
              p2.128 = (long int) p2.127;
              p.129 = (long int) p;
              D.26498 = p2.128 - p.129;
              D.26499 = (unsigned int) D.26498;
              len = D.26499 + len;
              D.26482 = method_aux->param_defaults;
              D.26416 = (long unsigned int) i;
              D.26500 = D.26416 * 8;
              D.26501 = D.26482 + D.26500;
              D.26502 = image_g_malloc (image, len);
              *D.26501 = D.26502;
              D.26503 = method_aux->param_default_types;
              D.26416 = (long unsigned int) i;
              D.26504 = D.26416 * 4;
              D.26505 = D.26503 + D.26504;
              def_type.130 = def_type;
              *D.26505 = def_type.130;
              D.26482 = method_aux->param_defaults;
              D.26416 = (long unsigned int) i;
              D.26500 = D.26416 * 8;
              D.26501 = D.26482 + D.26500;
              D.26507 = *D.26501;
              D.26508 = (long unsigned int) len;
              memcpy (D.26507, p, D.26508);
            }
          finally
            {
              def_type = {CLOBBER};
              p2 = {CLOBBER};
            }
        }
        <D.26481>:
        D.26509 = pb->name;
        if (D.26509 != 0B) goto <D.26510>; else goto <D.26511>;
        <D.26510>:
        D.26512 = method_aux->param_names;
        D.26416 = (long unsigned int) i;
        D.26500 = D.26416 * 8;
        D.26513 = D.26512 + D.26500;
        D.26509 = pb->name;
        D.26514 = mono_string_to_utf8_image (image, D.26509, &error);
        *D.26513 = D.26514;
        D.26515 = mono_error_ok (&error);
        D.26516 = D.26515 == 0;
        D.26517 = (long int) D.26516;
        D.26518 = __builtin_expect (D.26517, 0);
        if (D.26518 != 0) goto <D.26519>; else goto <D.26520>;
        <D.26519>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10331, "mono_error_ok (&error)");
        <D.26520>:
        <D.26511>:
        D.26521 = pb->cattrs;
        if (D.26521 != 0B) goto <D.26522>; else goto <D.26523>;
        <D.26522>:
        D.26524 = method_aux->param_cattr;
        if (D.26524 == 0B) goto <D.26525>; else goto <D.26526>;
        <D.26525>:
        D.26298 = m->signature;
        D.26431 = D.26298->param_count;
        D.26432 = (int) D.26431;
        D.26485 = D.26432 + 1;
        D.26486 = (long unsigned int) D.26485;
        D.26487 = (unsigned int) D.26486;
        D.26488 = D.26487 * 8;
        D.26527 = image_g_malloc0 (image, D.26488);
        method_aux->param_cattr = D.26527;
        <D.26526>:
        D.26524 = method_aux->param_cattr;
        D.26416 = (long unsigned int) i;
        D.26500 = D.26416 * 8;
        D.26528 = D.26524 + D.26500;
        D.26340 = klass->image;
        D.26521 = pb->cattrs;
        D.26529 = mono_custom_attrs_from_builders (image, D.26340, D.26521);
        *D.26528 = D.26529;
        <D.26523>:
        <D.26469>:
      }
      i = i + 1;
      <D.22108>:
      D.26298 = m->signature;
      D.26431 = D.26298->param_count;
      D.26432 = (int) D.26431;
      if (D.26432 >= i) goto <D.22107>; else goto <D.22109>;
      <D.22109>:
      <D.26456>:
      specs = 0B;
      D.26454 = rmb->pinfo;
      if (D.26454 != 0B) goto <D.26530>; else goto <D.26531>;
      <D.26530>:
      i = 0;
      goto <D.22112>;
      <D.22111>:
      {
        struct MonoReflectionParamBuilder * pb;

        D.26454 = rmb->pinfo;
        D.26412 = (long unsigned int) i;
        D.26532 = mono_array_addr_with_size (D.26454, 8, D.26412);
        pb = MEM[(struct MonoReflectionParamBuilder * *)D.26532];
        if (pb != 0B) goto <D.26533>; else goto <D.26534>;
        <D.26533>:
        D.26535 = pb->marshal_info;
        if (D.26535 != 0B) goto <D.26536>; else goto <D.26537>;
        <D.26536>:
        if (specs == 0B) goto <D.26538>; else goto <D.26539>;
        <D.26538>:
        D.26540 = sig->param_count;
        D.26541 = (int) D.26540;
        D.26542 = D.26541 + 1;
        D.26543 = (long unsigned int) D.26542;
        D.26544 = (unsigned int) D.26543;
        D.26545 = D.26544 * 8;
        specs = image_g_malloc0 (image, D.26545);
        <D.26539>:
        D.26546 = pb->position;
        D.26547 = (long unsigned int) D.26546;
        D.26548 = D.26547 * 8;
        D.26549 = specs + D.26548;
        D.26340 = klass->image;
        D.26550 = D.26340->assembly;
        D.26535 = pb->marshal_info;
        D.26551 = mono_marshal_spec_from_builder (image, D.26550, D.26535);
        *D.26549 = D.26551;
        <D.26537>:
        <D.26534>:
      }
      i = i + 1;
      <D.22112>:
      D.26412 = (long unsigned int) i;
      D.26454 = rmb->pinfo;
      D.26552 = mono_array_length (D.26454);
      if (D.26412 < D.26552) goto <D.22111>; else goto <D.22113>;
      <D.22113>:
      <D.26531>:
      if (specs != 0B) goto <D.26553>; else goto <D.26554>;
      <D.26553>:
      if (method_aux == 0B) goto <D.26555>; else goto <D.26556>;
      <D.26555>:
      method_aux = image_g_malloc0 (image, 56);
      <D.26556>:
      method_aux->param_marshall = specs;
      <D.26554>:
      D.26340 = klass->image;
      D.26341 = BIT_FIELD_REF <*D.26340, 64, 192>;
      D.26342 = D.26341 & 268435456;
      if (D.26342 != 0) goto <D.26557>; else goto <D.26558>;
      <D.26557>:
      if (method_aux != 0B) goto <D.26559>; else goto <D.26560>;
      <D.26559>:
      D.26340 = klass->image;
      D.26345 = MEM[(struct MonoDynamicImage *)D.26340].method_aux_hash;
      monoeg_g_hash_table_insert_replace (D.26345, m, method_aux, 0);
      <D.26560>:
      <D.26558>:
      mono_loader_unlock ();
      D.26346 = m;
      return D.26346;
    }
  finally
    {
      error = {CLOBBER};
    }
}


image_strdup (struct MonoImage * image, const char * s)
{
  char * D.26565;

  if (image != 0B) goto <D.26563>; else goto <D.26564>;
  <D.26563>:
  D.26565 = mono_image_strdup (image, s);
  return D.26565;
  <D.26564>:
  D.26565 = monoeg_strdup (s);
  return D.26565;
}


method_encode_clauses (struct MonoImage * image, struct MonoDynamicImage * assembly, struct MonoReflectionILGen * ilgen, guint32 num_clauses)
{
  unsigned int D.26567;
  struct MonoArray * D.26568;
  long unsigned int D.26569;
  unsigned int D.26570;
  unsigned int D.26571;
  long unsigned int D.26572;
  int D.26573;
  int D.26574;
  int D.26575;
  struct MonoArray * D.26576;
  long unsigned int D.26579;
  long unsigned int D.26580;
  long unsigned int D.26581;
  int D.26582;
  unsigned int D.26583;
  unsigned int D.26584;
  unsigned int D.26587;
  unsigned int D.26588;
  unsigned int D.26590;
  int D.26591;
  unsigned int D.26592;
  int D.26593;
  unsigned int D.26594;
  struct MonoObject * D.26595;
  struct MonoType * D.26598;
  struct MonoClass * D.26599;
  int D.26603;
  unsigned int D.26604;
  int D.26606;
  long unsigned int D.26607;
  struct MonoExceptionClause * D.26608;
  struct MonoExceptionClause * clauses;
  struct MonoExceptionClause * clause;
  struct MonoILExceptionInfo * ex_info;
  struct MonoILExceptionBlock * ex_block;
  guint32 finally_start;
  int i;
  int j;
  int clause_index;

  D.26567 = num_clauses * 32;
  clauses = image_g_malloc0 (image, D.26567);
  clause_index = 0;
  D.26568 = ilgen->ex_handlers;
  D.26569 = mono_array_length (D.26568);
  D.26570 = (unsigned int) D.26569;
  D.26571 = D.26570 + 4294967295;
  i = (int) D.26571;
  goto <D.19121>;
  <D.19120>:
  D.26568 = ilgen->ex_handlers;
  D.26572 = (long unsigned int) i;
  ex_info = mono_array_addr_with_size (D.26568, 24, D.26572);
  D.26573 = ex_info->start;
  D.26574 = ex_info->len;
  D.26575 = D.26573 + D.26574;
  finally_start = (guint32) D.26575;
  D.26576 = ex_info->handlers;
  if (D.26576 == 0B) goto <D.26577>; else goto <D.26578>;
  <D.26577>:
  // predicted unlikely by continue predictor.
  goto <D.19116>;
  <D.26578>:
  j = 0;
  goto <D.19118>;
  <D.19117>:
  D.26576 = ex_info->handlers;
  D.26579 = (long unsigned int) j;
  ex_block = mono_array_addr_with_size (D.26576, 24, D.26579);
  D.26580 = (long unsigned int) clause_index;
  D.26581 = D.26580 * 32;
  clause = clauses + D.26581;
  D.26582 = ex_block->type;
  D.26583 = (unsigned int) D.26582;
  clause->flags = D.26583;
  D.26573 = ex_info->start;
  D.26584 = (unsigned int) D.26573;
  clause->try_offset = D.26584;
  D.26582 = ex_block->type;
  if (D.26582 == 2) goto <D.26585>; else goto <D.26586>;
  <D.26585>:
  D.26573 = ex_info->start;
  D.26587 = (unsigned int) D.26573;
  D.26588 = finally_start - D.26587;
  clause->try_len = D.26588;
  goto <D.26589>;
  <D.26586>:
  D.26574 = ex_info->len;
  D.26590 = (unsigned int) D.26574;
  clause->try_len = D.26590;
  <D.26589>:
  D.26591 = ex_block->start;
  D.26592 = (unsigned int) D.26591;
  clause->handler_offset = D.26592;
  D.26593 = ex_block->len;
  D.26594 = (unsigned int) D.26593;
  clause->handler_len = D.26594;
  D.26595 = ex_block->extype;
  if (D.26595 != 0B) goto <D.26596>; else goto <D.26597>;
  <D.26596>:
  D.26595 = ex_block->extype;
  D.26598 = mono_reflection_type_get_handle (D.26595);
  D.26599 = mono_class_from_mono_type (D.26598);
  clause->data.catch_class = D.26599;
  goto <D.26600>;
  <D.26597>:
  D.26582 = ex_block->type;
  if (D.26582 == 1) goto <D.26601>; else goto <D.26602>;
  <D.26601>:
  D.26603 = ex_block->filter_offset;
  D.26604 = (unsigned int) D.26603;
  clause->data.filter_offset = D.26604;
  goto <D.26605>;
  <D.26602>:
  clause->data.filter_offset = 0;
  <D.26605>:
  <D.26600>:
  D.26591 = ex_block->start;
  D.26593 = ex_block->len;
  D.26606 = D.26591 + D.26593;
  finally_start = (guint32) D.26606;
  clause_index = clause_index + 1;
  j = j + 1;
  <D.19118>:
  D.26579 = (long unsigned int) j;
  D.26576 = ex_info->handlers;
  D.26607 = mono_array_length (D.26576);
  if (D.26579 < D.26607) goto <D.19117>; else goto <D.19119>;
  <D.19119>:
  <D.19116>:
  i = i + -1;
  <D.19121>:
  if (i >= 0) goto <D.19120>; else goto <D.19122>;
  <D.19122>:
  D.26608 = clauses;
  return D.26608;
}


image_g_malloc (struct MonoImage * image, guint size)
{
  void * D.26612;
  long unsigned int D.26613;

  if (image != 0B) goto <D.26610>; else goto <D.26611>;
  <D.26610>:
  D.26612 = mono_image_alloc (image, size);
  return D.26612;
  <D.26611>:
  D.26613 = (long unsigned int) size;
  D.26612 = monoeg_malloc (D.26613);
  return D.26612;
}


mono_custom_attrs_from_builders (struct MonoImage * alloc_img, struct MonoImage * image, struct MonoArray * cattrs)
{
  struct MonoCustomAttrInfo * D.26617;
  long unsigned int D.26618;
  long unsigned int D.26619;
  char * D.26620;
  int D.26621;
  long unsigned int D.26624;
  unsigned int D.26625;
  unsigned int D.26626;
  unsigned int D.26627;
  _Bool D.26628;
  int D.26629;
  char * D.26630;
  int D.26631;
  struct MonoArray * D.26634;
  long unsigned int D.26635;
  unsigned int D.26636;
  char * D.26637;
  long unsigned int D.26638;
  struct MonoReflectionMethod * D.26639;
  struct MonoMethod * D.26640;
  long unsigned int D.26641;
  unsigned int D.26642;
  int i;
  int index;
  int count;
  int not_visible;
  struct MonoCustomAttrInfo * ainfo;
  struct MonoReflectionCustomAttr * cattr;

  if (cattrs == 0B) goto <D.26615>; else goto <D.26616>;
  <D.26615>:
  D.26617 = 0B;
  return D.26617;
  <D.26616>:
  D.26618 = mono_array_length (cattrs);
  count = (int) D.26618;
  not_visible = 0;
  i = 0;
  goto <D.19193>;
  <D.19192>:
  D.26619 = (long unsigned int) i;
  D.26620 = mono_array_addr_with_size (cattrs, 8, D.26619);
  cattr = MEM[(void * *)D.26620];
  D.26621 = custom_attr_visible (image, cattr);
  if (D.26621 == 0) goto <D.26622>; else goto <D.26623>;
  <D.26622>:
  not_visible = not_visible + 1;
  <D.26623>:
  i = i + 1;
  <D.19193>:
  if (i < count) goto <D.19192>; else goto <D.19194>;
  <D.19194>:
  count = count - not_visible;
  D.26624 = (long unsigned int) count;
  D.26625 = (unsigned int) D.26624;
  D.26626 = D.26625 * 24;
  D.26627 = D.26626 + 16;
  ainfo = image_g_malloc0 (alloc_img, D.26627);
  ainfo->image = image;
  ainfo->num_attrs = count;
  D.26628 = alloc_img != 0B;
  D.26629 = (int) D.26628;
  ainfo->cached = D.26629;
  index = 0;
  i = 0;
  goto <D.19197>;
  <D.19196>:
  D.26619 = (long unsigned int) i;
  D.26630 = mono_array_addr_with_size (cattrs, 8, D.26619);
  cattr = MEM[(void * *)D.26630];
  D.26631 = custom_attr_visible (image, cattr);
  if (D.26631 != 0) goto <D.26632>; else goto <D.26633>;
  <D.26632>:
  {
    unsigned char * saved;

    D.26634 = cattr->data;
    D.26635 = mono_array_length (D.26634);
    D.26636 = (unsigned int) D.26635;
    saved = mono_image_alloc (image, D.26636);
    D.26634 = cattr->data;
    D.26637 = mono_array_addr_with_size (D.26634, 1, 0);
    D.26634 = cattr->data;
    D.26638 = mono_array_length (D.26634);
    memcpy (saved, D.26637, D.26638);
    D.26639 = cattr->ctor;
    D.26640 = D.26639->method;
    ainfo->attrs[index].ctor = D.26640;
    ainfo->attrs[index].data = saved;
    D.26634 = cattr->data;
    D.26641 = mono_array_length (D.26634);
    D.26642 = (unsigned int) D.26641;
    ainfo->attrs[index].data_size = D.26642;
    index = index + 1;
  }
  <D.26633>:
  i = i + 1;
  <D.19197>:
  if (i < count) goto <D.19196>; else goto <D.19198>;
  <D.19198>:
  D.26617 = ainfo;
  return D.26617;
}


custom_attr_visible (struct MonoImage * image, struct MonoReflectionCustomAttr * cattr)
{
  struct MonoReflectionMethod * D.26644;
  struct MonoMethod * D.26645;
  struct MonoClass * D.26648;
  struct MonoImage * D.26649;
  unsigned int D.26652;
  int D.26653;
  unsigned int visibility.131;
  unsigned int D.26655;
  gboolean D.26658;

  D.26644 = cattr->ctor;
  D.26645 = D.26644->method;
  if (D.26645 != 0B) goto <D.26646>; else goto <D.26647>;
  <D.26646>:
  D.26644 = cattr->ctor;
  D.26645 = D.26644->method;
  D.26648 = D.26645->klass;
  D.26649 = D.26648->image;
  if (D.26649 != image) goto <D.26650>; else goto <D.26651>;
  <D.26650>:
  {
    int visibility;

    D.26644 = cattr->ctor;
    D.26645 = D.26644->method;
    D.26648 = D.26645->klass;
    D.26652 = D.26648->flags;
    D.26653 = (int) D.26652;
    visibility = D.26653 & 7;
    visibility.131 = (unsigned int) visibility;
    D.26655 = visibility.131 + 4294967295;
    if (D.26655 > 1) goto <D.26656>; else goto <D.26657>;
    <D.26656>:
    D.26658 = 0;
    return D.26658;
    <D.26657>:
  }
  <D.26651>:
  <D.26647>:
  D.26658 = 1;
  return D.26658;
}


mono_marshal_spec_from_builder (struct MonoImage * image, struct MonoAssembly * assembly, struct MonoReflectionMarshal * minfo)
{
  int D.26660;
  <unnamed type> D.26661;
  int D.26662;
  <unnamed type> D.26663;
  unsigned char D.26664;
  int D.26667;
  short int D.26668;
  int D.26669;
  _Bool D.26670;
  short int D.26671;
  struct MonoObject * D.26673;
  struct MonoType * D.26676;
  char * D.26677;
  struct MonoString * D.26678;
  char * D.26681;
  struct MonoMarshalSpec * D.26682;
  struct MonoMarshalSpec * res;

  res = image_g_malloc0 (image, 24);
  D.26660 = minfo->type;
  D.26661 = (<unnamed type>) D.26660;
  res->native = D.26661;
  D.26660 = minfo->type;
  switch (D.26660) <default: <D.22043>, case 23: <D.22040>, case 30: <D.22041>, case 42: <D.22038>, case 44: <D.22042>>
  <D.22038>:
  D.26662 = minfo->eltype;
  D.26663 = (<unnamed type>) D.26662;
  res->data.array_data.elem_type = D.26663;
  D.26664 = minfo->has_size;
  if (D.26664 != 0) goto <D.26665>; else goto <D.26666>;
  <D.26665>:
  D.26667 = minfo->param_num;
  D.26668 = (short int) D.26667;
  res->data.array_data.param_num = D.26668;
  D.26669 = minfo->count;
  res->data.array_data.num_elem = D.26669;
  D.26667 = minfo->param_num;
  D.26670 = D.26667 != -1;
  D.26671 = (short int) D.26670;
  res->data.array_data.elem_mult = D.26671;
  goto <D.26672>;
  <D.26666>:
  res->data.array_data.param_num = -1;
  res->data.array_data.num_elem = -1;
  res->data.array_data.elem_mult = -1;
  <D.26672>:
  goto <D.22039>;
  <D.22040>:
  <D.22041>:
  D.26669 = minfo->count;
  res->data.array_data.num_elem = D.26669;
  goto <D.22039>;
  <D.22042>:
  D.26673 = minfo->marshaltyperef;
  if (D.26673 != 0B) goto <D.26674>; else goto <D.26675>;
  <D.26674>:
  D.26673 = minfo->marshaltyperef;
  D.26676 = mono_reflection_type_get_handle (D.26673);
  D.26677 = type_get_fully_qualified_name (D.26676);
  res->data.custom_data.custom_name = D.26677;
  <D.26675>:
  D.26678 = minfo->mcookie;
  if (D.26678 != 0B) goto <D.26679>; else goto <D.26680>;
  <D.26679>:
  D.26678 = minfo->mcookie;
  D.26681 = mono_string_to_utf8 (D.26678);
  res->data.custom_data.cookie = D.26681;
  <D.26680>:
  goto <D.22039>;
  <D.22043>:
  goto <D.22039>;
  <D.22039>:
  D.26682 = res;
  return D.26682;
}


mono_save_custom_attrs (struct MonoImage * image, void * obj, struct MonoArray * cattrs)
{
  long unsigned int D.26688;
  struct MonoCustomAttrInfo * ainfo;
  struct MonoCustomAttrInfo * tmp;

  if (cattrs == 0B) goto <D.26685>; else goto <D.26687>;
  <D.26687>:
  D.26688 = mono_array_length (cattrs);
  if (D.26688 == 0) goto <D.26685>; else goto <D.26686>;
  <D.26685>:
  return;
  <D.26686>:
  ainfo = mono_custom_attrs_from_builders (image, image, cattrs);
  mono_loader_lock ();
  tmp = mono_image_property_lookup (image, obj, 4096);
  if (tmp != 0B) goto <D.26689>; else goto <D.26690>;
  <D.26689>:
  mono_custom_attrs_free (tmp);
  <D.26690>:
  mono_image_property_insert (image, obj, 4096, ainfo);
  mono_loader_unlock ();
}


ctorbuilder_to_mono_method (struct MonoClass * klass, struct MonoReflectionCtorBuilder * mb)
{
  struct MonoImage * D.26692;
  struct MonoMethod * D.26693;
  struct MonoMethod * D.26694;
  struct MonoArray * D.26695;
  int D.26696;
  struct MonoGenericContainer * D.26699;
  struct MonoMethod * D.26702;
  struct ReflectionMethodBuilder rmb;
  struct MonoMethodSignature * sig;

  try
    {
      mono_loader_lock ();
      D.26692 = klass->image;
      sig = ctor_builder_to_signature (D.26692, mb);
      mono_loader_unlock ();
      reflection_methodbuilder_from_ctor_builder (&rmb, mb);
      D.26693 = reflection_methodbuilder_to_mono_method (klass, &rmb, sig);
      mb->mhandle = D.26693;
      D.26692 = klass->image;
      D.26694 = mb->mhandle;
      D.26695 = mb->cattrs;
      mono_save_custom_attrs (D.26692, D.26694, D.26695);
      D.26692 = klass->image;
      D.26696 = MEM[(struct MonoDynamicImage *)D.26692].save;
      if (D.26696 == 0) goto <D.26697>; else goto <D.26698>;
      <D.26697>:
      D.26699 = klass->generic_container;
      if (D.26699 == 0B) goto <D.26700>; else goto <D.26701>;
      <D.26700>:
      mb->ilgen = 0B;
      <D.26701>:
      <D.26698>:
      D.26702 = mb->mhandle;
      return D.26702;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


ctor_builder_to_signature (struct MonoImage * image, struct MonoReflectionCtorBuilder * ctor)
{
  struct MonoArray * D.26705;
  unsigned int D.26706;
  unsigned int D.26707;
  _Bool D.26708;
  struct MonoClass * D.26709;
  struct MonoType * D.26710;
  struct MonoMethodSignature * D.26711;
  struct MonoMethodSignature * sig;

  D.26705 = ctor->parameters;
  sig = parameters_to_signature (image, D.26705);
  D.26706 = ctor->attrs;
  D.26707 = D.26706 & 16;
  D.26708 = D.26707 == 0;
  sig->hasthis = D.26708;
  D.26709 = mono_defaults.void_class;
  D.26710 = &D.26709->byval_arg;
  sig->ret = D.26710;
  D.26711 = sig;
  return D.26711;
}


inflate_mono_method (struct MonoClass * klass, struct MonoMethod * method, struct MonoObject * obj)
{
  struct MonoGenericClass * D.26713;
  struct MonoMethod * D.26716;
  unsigned int D.26719;
  struct MonoMethod * * D.26721;
  long unsigned int D.26723;
  long unsigned int D.26724;
  struct MonoMethod * * D.26725;
  struct MonoMethod * D.26726;
  long unsigned int D.26727;
  long unsigned int D.26728;
  _Bool D.26729;
  long int D.26730;
  long int D.26731;
  struct MonoMethod * D.26734;
  unsigned int i.132;
  _Bool D.26737;
  long int D.26738;
  long int D.26739;
  long unsigned int D.26742;
  long unsigned int D.26743;
  struct MonoClass * D.26746;
  struct MonoImage * D.26747;
  long unsigned int D.26748;
  long unsigned int D.26749;
  struct MonoGHashTable * D.26752;
  struct MonoMethodInflated * imethod;
  struct MonoGenericContext * context;
  int i;

  D.26713 = klass->generic_class;
  if (D.26713 == 0B) goto <D.26714>; else goto <D.26715>;
  <D.26714>:
  D.26716 = method;
  return D.26716;
  <D.26715>:
  context = mono_class_get_context (klass);
  D.26719 = klass->method.count;
  if (D.26719 != 0) goto <D.26720>; else goto <D.26717>;
  <D.26720>:
  D.26721 = klass->methods;
  if (D.26721 != 0B) goto <D.26722>; else goto <D.26717>;
  <D.26722>:
  i = 0;
  goto <D.22184>;
  <D.22183>:
  D.26721 = klass->methods;
  D.26723 = (long unsigned int) i;
  D.26724 = D.26723 * 8;
  D.26725 = D.26721 + D.26724;
  D.26726 = *D.26725;
  D.26727 = BIT_FIELD_REF <*D.26726, 64, 256>;
  D.26728 = D.26727 & 2251799813685248;
  D.26729 = D.26728 == 0;
  D.26730 = (long int) D.26729;
  D.26731 = __builtin_expect (D.26730, 0);
  if (D.26731 != 0) goto <D.26732>; else goto <D.26733>;
  <D.26732>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10611, "klass->methods [i]->is_inflated");
  <D.26733>:
  D.26721 = klass->methods;
  D.26723 = (long unsigned int) i;
  D.26724 = D.26723 * 8;
  D.26725 = D.26721 + D.26724;
  D.26726 = *D.26725;
  D.26734 = MEM[(struct MonoMethodInflated *)D.26726].declaring;
  if (D.26734 == method) goto <D.22182>; else goto <D.26735>;
  <D.26735>:
  i = i + 1;
  <D.22184>:
  D.26719 = klass->method.count;
  i.132 = (unsigned int) i;
  if (D.26719 > i.132) goto <D.22183>; else goto <D.22182>;
  <D.22182>:
  D.26719 = klass->method.count;
  i.132 = (unsigned int) i;
  D.26737 = D.26719 <= i.132;
  D.26738 = (long int) D.26737;
  D.26739 = __builtin_expect (D.26738, 0);
  if (D.26739 != 0) goto <D.26740>; else goto <D.26741>;
  <D.26740>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10615, "i < klass->method.count");
  <D.26741>:
  D.26721 = klass->methods;
  D.26723 = (long unsigned int) i;
  D.26724 = D.26723 * 8;
  D.26725 = D.26721 + D.26724;
  imethod = *D.26725;
  goto <D.26718>;
  <D.26717>:
  imethod = mono_class_inflate_generic_method_full (method, klass, context);
  <D.26718>:
  D.26742 = BIT_FIELD_REF <*method, 64, 256>;
  D.26743 = D.26742 & 4503599627370496;
  if (D.26743 != 0) goto <D.26744>; else goto <D.26745>;
  <D.26744>:
  D.26746 = method->klass;
  D.26747 = D.26746->image;
  D.26748 = BIT_FIELD_REF <*D.26747, 64, 192>;
  D.26749 = D.26748 & 268435456;
  if (D.26749 != 0) goto <D.26750>; else goto <D.26751>;
  <D.26750>:
  {
    struct MonoDynamicImage * image;

    D.26746 = method->klass;
    image = D.26746->image;
    mono_image_lock (image);
    D.26752 = image->generic_def_objects;
    mono_g_hash_table_insert (D.26752, imethod, obj);
    mono_image_unlock (image);
  }
  <D.26751>:
  <D.26745>:
  D.26716 = imethod;
  return D.26716;
}


is_sre_method_builder (struct MonoClass * class)
{
  struct MonoClass * cached_class.133;
  gboolean D.26757;
  _Bool D.26758;
  int D.26759;
  const char * D.26762;
  int D.26763;
  const char * D.26766;
  int D.26767;

  {
    static struct MonoClass * cached_class;

    cached_class.133 = cached_class;
    if (cached_class.133 != 0B) goto <D.26755>; else goto <D.26756>;
    <D.26755>:
    cached_class.133 = cached_class;
    D.26758 = cached_class.133 == class;
    D.26757 = (gboolean) D.26758;
    return D.26757;
    <D.26756>:
    D.26759 = is_corlib_type (class);
    if (D.26759 != 0) goto <D.26760>; else goto <D.26761>;
    <D.26760>:
    D.26762 = class->name;
    D.26763 = strcmp ("MethodBuilder", D.26762);
    if (D.26763 == 0) goto <D.26764>; else goto <D.26765>;
    <D.26764>:
    D.26766 = class->name_space;
    D.26767 = strcmp ("System.Reflection.Emit", D.26766);
    if (D.26767 == 0) goto <D.26768>; else goto <D.26769>;
    <D.26768>:
    cached_class = class;
    D.26757 = 1;
    return D.26757;
    <D.26769>:
    <D.26765>:
    <D.26761>:
    D.26757 = 0;
    return D.26757;
  }
}


is_sr_mono_method (struct MonoClass * class)
{
  struct MonoClass * cached_class.134;
  gboolean D.26774;
  _Bool D.26775;
  int D.26776;
  const char * D.26779;
  int D.26780;
  const char * D.26783;
  int D.26784;

  {
    static struct MonoClass * cached_class;

    cached_class.134 = cached_class;
    if (cached_class.134 != 0B) goto <D.26772>; else goto <D.26773>;
    <D.26772>:
    cached_class.134 = cached_class;
    D.26775 = cached_class.134 == class;
    D.26774 = (gboolean) D.26775;
    return D.26774;
    <D.26773>:
    D.26776 = is_corlib_type (class);
    if (D.26776 != 0) goto <D.26777>; else goto <D.26778>;
    <D.26777>:
    D.26779 = class->name;
    D.26780 = strcmp ("MonoMethod", D.26779);
    if (D.26780 == 0) goto <D.26781>; else goto <D.26782>;
    <D.26781>:
    D.26783 = class->name_space;
    D.26784 = strcmp ("System.Reflection", D.26783);
    if (D.26784 == 0) goto <D.26785>; else goto <D.26786>;
    <D.26785>:
    cached_class = class;
    D.26774 = 1;
    return D.26774;
    <D.26786>:
    <D.26782>:
    <D.26778>:
    D.26774 = 0;
    return D.26774;
  }
}


is_sre_array (struct MonoClass * class)
{
  struct MonoClass * cached_class.135;
  gboolean D.26791;
  _Bool D.26792;
  int D.26793;
  const char * D.26796;
  int D.26797;
  const char * D.26800;
  int D.26801;

  {
    static struct MonoClass * cached_class;

    cached_class.135 = cached_class;
    if (cached_class.135 != 0B) goto <D.26789>; else goto <D.26790>;
    <D.26789>:
    cached_class.135 = cached_class;
    D.26792 = cached_class.135 == class;
    D.26791 = (gboolean) D.26792;
    return D.26791;
    <D.26790>:
    D.26793 = is_corlib_type (class);
    if (D.26793 != 0) goto <D.26794>; else goto <D.26795>;
    <D.26794>:
    D.26796 = class->name;
    D.26797 = strcmp ("ArrayType", D.26796);
    if (D.26797 == 0) goto <D.26798>; else goto <D.26799>;
    <D.26798>:
    D.26800 = class->name_space;
    D.26801 = strcmp ("System.Reflection.Emit", D.26800);
    if (D.26801 == 0) goto <D.26802>; else goto <D.26803>;
    <D.26802>:
    cached_class = class;
    D.26791 = 1;
    return D.26791;
    <D.26803>:
    <D.26799>:
    <D.26795>:
    D.26791 = 0;
    return D.26791;
  }
}


is_sre_byref (struct MonoClass * class)
{
  struct MonoClass * cached_class.136;
  gboolean D.26808;
  _Bool D.26809;
  int D.26810;
  const char * D.26813;
  int D.26814;
  const char * D.26817;
  int D.26818;

  {
    static struct MonoClass * cached_class;

    cached_class.136 = cached_class;
    if (cached_class.136 != 0B) goto <D.26806>; else goto <D.26807>;
    <D.26806>:
    cached_class.136 = cached_class;
    D.26809 = cached_class.136 == class;
    D.26808 = (gboolean) D.26809;
    return D.26808;
    <D.26807>:
    D.26810 = is_corlib_type (class);
    if (D.26810 != 0) goto <D.26811>; else goto <D.26812>;
    <D.26811>:
    D.26813 = class->name;
    D.26814 = strcmp ("ByRefType", D.26813);
    if (D.26814 == 0) goto <D.26815>; else goto <D.26816>;
    <D.26815>:
    D.26817 = class->name_space;
    D.26818 = strcmp ("System.Reflection.Emit", D.26817);
    if (D.26818 == 0) goto <D.26819>; else goto <D.26820>;
    <D.26819>:
    cached_class = class;
    D.26808 = 1;
    return D.26808;
    <D.26820>:
    <D.26816>:
    <D.26812>:
    D.26808 = 0;
    return D.26808;
  }
}


is_sre_pointer (struct MonoClass * class)
{
  struct MonoClass * cached_class.137;
  gboolean D.26825;
  _Bool D.26826;
  int D.26827;
  const char * D.26830;
  int D.26831;
  const char * D.26834;
  int D.26835;

  {
    static struct MonoClass * cached_class;

    cached_class.137 = cached_class;
    if (cached_class.137 != 0B) goto <D.26823>; else goto <D.26824>;
    <D.26823>:
    cached_class.137 = cached_class;
    D.26826 = cached_class.137 == class;
    D.26825 = (gboolean) D.26826;
    return D.26825;
    <D.26824>:
    D.26827 = is_corlib_type (class);
    if (D.26827 != 0) goto <D.26828>; else goto <D.26829>;
    <D.26828>:
    D.26830 = class->name;
    D.26831 = strcmp ("PointerType", D.26830);
    if (D.26831 == 0) goto <D.26832>; else goto <D.26833>;
    <D.26832>:
    D.26834 = class->name_space;
    D.26835 = strcmp ("System.Reflection.Emit", D.26834);
    if (D.26835 == 0) goto <D.26836>; else goto <D.26837>;
    <D.26836>:
    cached_class = class;
    D.26825 = 1;
    return D.26825;
    <D.26837>:
    <D.26833>:
    <D.26829>:
    D.26825 = 0;
    return D.26825;
  }
}


__attribute__((visibility ("hidden")))
mono_image_register_token (struct MonoDynamicImage * assembly, guint32 token, struct MonoObject * obj)
{
  struct MonoGHashTable * D.26839;
  long unsigned int D.26840;
  const void * D.26841;
  void * D.26845;
  struct MonoObject * prev;

  D.26839 = assembly->tokens;
  D.26840 = (long unsigned int) token;
  D.26841 = (const void *) D.26840;
  prev = mono_g_hash_table_lookup (D.26839, D.26841);
  if (prev != 0B) goto <D.26842>; else goto <D.26843>;
  <D.26842>:
  goto <D.26844>;
  <D.26843>:
  D.26839 = assembly->tokens;
  D.26840 = (long unsigned int) token;
  D.26845 = (void *) D.26840;
  mono_g_hash_table_insert (D.26839, D.26845, obj);
  <D.26844>:
}


__attribute__((visibility ("hidden")))
mono_dynamic_image_release_gc_roots (struct MonoDynamicImage * image)
{
  struct MonoGHashTable * * D.26846;
  struct MonoGHashTable * * D.26847;
  struct MonoGHashTable * * D.26848;
  struct MonoGHashTable * * D.26849;
  struct MonoGHashTable * * D.26850;
  struct MonoGHashTable * * D.26851;

  D.26846 = &image->token_fixups;
  release_hashtable (D.26846);
  D.26847 = &image->handleref_managed;
  release_hashtable (D.26847);
  D.26848 = &image->tokens;
  release_hashtable (D.26848);
  D.26849 = &image->remapped_tokens;
  release_hashtable (D.26849);
  D.26850 = &image->generic_def_objects;
  release_hashtable (D.26850);
  D.26851 = &image->methodspec;
  release_hashtable (D.26851);
}


release_hashtable (struct MonoGHashTable * * hash)
{
  struct MonoGHashTable * D.26852;

  D.26852 = *hash;
  if (D.26852 != 0B) goto <D.26853>; else goto <D.26854>;
  <D.26853>:
  D.26852 = *hash;
  mono_g_hash_table_destroy (D.26852);
  *hash = 0B;
  <D.26854>:
}


__attribute__((visibility ("hidden")))
mono_dynamic_image_free (struct MonoDynamicImage * image)
{
  struct MonoGHashTable * D.26855;
  struct GHashTable * D.26858;
  struct GHashTable * D.26861;
  struct GHashTable * D.26864;
  struct MonoGHashTable * D.26867;
  struct MonoGHashTable * D.26870;
  struct MonoGHashTable * D.26873;
  struct MonoGHashTable * D.26876;
  struct GHashTable * D.26879;
  struct GHashTable * D.26882;
  struct MonoMethodSignature * D.26885;
  char * D.26886;
  struct GList * D.26887;
  struct GPtrArray * D.26888;
  void * * D.26891;
  long unsigned int D.26892;
  long unsigned int D.26893;
  void * * D.26894;
  struct MonoReflectionGenericParam * * D.26895;
  unsigned int D.26896;
  unsigned int i.138;
  struct MonoGHashTable * D.26898;
  struct GHashTable * D.26901;
  struct GHashTable * D.26904;
  struct GHashTable * D.26907;
  struct GHashTable * D.26910;
  char * D.26913;
  char * D.26914;
  guint8 * D.26915;
  struct MonoDynamicStream * D.26918;
  struct MonoDynamicStream * D.26919;
  struct MonoDynamicStream * D.26920;
  struct MonoDynamicStream * D.26921;
  struct MonoDynamicStream * D.26922;
  struct MonoDynamicStream * D.26923;
  struct MonoDynamicStream * D.26924;
  guint32 * D.26925;
  struct MonoDynamicImage * di;
  struct GList * list;
  int i;

  di = image;
  D.26855 = di->methodspec;
  if (D.26855 != 0B) goto <D.26856>; else goto <D.26857>;
  <D.26856>:
  D.26855 = di->methodspec;
  mono_g_hash_table_destroy (D.26855);
  <D.26857>:
  D.26858 = di->typespec;
  if (D.26858 != 0B) goto <D.26859>; else goto <D.26860>;
  <D.26859>:
  D.26858 = di->typespec;
  monoeg_g_hash_table_destroy (D.26858);
  <D.26860>:
  D.26861 = di->typeref;
  if (D.26861 != 0B) goto <D.26862>; else goto <D.26863>;
  <D.26862>:
  D.26861 = di->typeref;
  monoeg_g_hash_table_destroy (D.26861);
  <D.26863>:
  D.26864 = di->handleref;
  if (D.26864 != 0B) goto <D.26865>; else goto <D.26866>;
  <D.26865>:
  D.26864 = di->handleref;
  monoeg_g_hash_table_destroy (D.26864);
  <D.26866>:
  D.26867 = di->handleref_managed;
  if (D.26867 != 0B) goto <D.26868>; else goto <D.26869>;
  <D.26868>:
  D.26867 = di->handleref_managed;
  mono_g_hash_table_destroy (D.26867);
  <D.26869>:
  D.26870 = di->tokens;
  if (D.26870 != 0B) goto <D.26871>; else goto <D.26872>;
  <D.26871>:
  D.26870 = di->tokens;
  mono_g_hash_table_destroy (D.26870);
  <D.26872>:
  D.26873 = di->remapped_tokens;
  if (D.26873 != 0B) goto <D.26874>; else goto <D.26875>;
  <D.26874>:
  D.26873 = di->remapped_tokens;
  mono_g_hash_table_destroy (D.26873);
  <D.26875>:
  D.26876 = di->generic_def_objects;
  if (D.26876 != 0B) goto <D.26877>; else goto <D.26878>;
  <D.26877>:
  D.26876 = di->generic_def_objects;
  mono_g_hash_table_destroy (D.26876);
  <D.26878>:
  D.26879 = di->blob_cache;
  if (D.26879 != 0B) goto <D.26880>; else goto <D.26881>;
  <D.26880>:
  D.26879 = di->blob_cache;
  monoeg_g_hash_table_foreach (D.26879, free_blob_cache_entry, 0B);
  D.26879 = di->blob_cache;
  monoeg_g_hash_table_destroy (D.26879);
  <D.26881>:
  D.26882 = di->standalonesig_cache;
  if (D.26882 != 0B) goto <D.26883>; else goto <D.26884>;
  <D.26883>:
  D.26882 = di->standalonesig_cache;
  monoeg_g_hash_table_destroy (D.26882);
  <D.26884>:
  list = di->array_methods;
  goto <D.20451>;
  <D.20450>:
  {
    struct ArrayMethod * am;

    am = list->data;
    D.26885 = am->sig;
    monoeg_g_free (D.26885);
    D.26886 = am->name;
    monoeg_g_free (D.26886);
    monoeg_g_free (am);
  }
  list = list->next;
  <D.20451>:
  if (list != 0B) goto <D.20450>; else goto <D.20452>;
  <D.20452>:
  D.26887 = di->array_methods;
  monoeg_g_list_free (D.26887);
  D.26888 = di->gen_params;
  if (D.26888 != 0B) goto <D.26889>; else goto <D.26890>;
  <D.26889>:
  i = 0;
  goto <D.20455>;
  <D.20454>:
  {
    struct GenericParamTableEntry * entry;

    D.26888 = di->gen_params;
    D.26891 = D.26888->pdata;
    D.26892 = (long unsigned int) i;
    D.26893 = D.26892 * 8;
    D.26894 = D.26891 + D.26893;
    entry = *D.26894;
    D.26895 = &entry->gparam;
    mono_gc_deregister_root (D.26895);
    monoeg_g_free (entry);
  }
  i = i + 1;
  <D.20455>:
  D.26888 = di->gen_params;
  D.26896 = D.26888->len;
  i.138 = (unsigned int) i;
  if (D.26896 > i.138) goto <D.20454>; else goto <D.20456>;
  <D.20456>:
  D.26888 = di->gen_params;
  monoeg_g_ptr_array_free (D.26888, 1);
  <D.26890>:
  D.26898 = di->token_fixups;
  if (D.26898 != 0B) goto <D.26899>; else goto <D.26900>;
  <D.26899>:
  D.26898 = di->token_fixups;
  mono_g_hash_table_destroy (D.26898);
  <D.26900>:
  D.26901 = di->method_to_table_idx;
  if (D.26901 != 0B) goto <D.26902>; else goto <D.26903>;
  <D.26902>:
  D.26901 = di->method_to_table_idx;
  monoeg_g_hash_table_destroy (D.26901);
  <D.26903>:
  D.26904 = di->field_to_table_idx;
  if (D.26904 != 0B) goto <D.26905>; else goto <D.26906>;
  <D.26905>:
  D.26904 = di->field_to_table_idx;
  monoeg_g_hash_table_destroy (D.26904);
  <D.26906>:
  D.26907 = di->method_aux_hash;
  if (D.26907 != 0B) goto <D.26908>; else goto <D.26909>;
  <D.26908>:
  D.26907 = di->method_aux_hash;
  monoeg_g_hash_table_destroy (D.26907);
  <D.26909>:
  D.26910 = di->vararg_aux_hash;
  if (D.26910 != 0B) goto <D.26911>; else goto <D.26912>;
  <D.26911>:
  D.26910 = di->vararg_aux_hash;
  monoeg_g_hash_table_destroy (D.26910);
  <D.26912>:
  D.26913 = di->strong_name;
  monoeg_g_free (D.26913);
  D.26914 = di->win32_res;
  monoeg_g_free (D.26914);
  D.26915 = di->public_key;
  if (D.26915 != 0B) goto <D.26916>; else goto <D.26917>;
  <D.26916>:
  D.26915 = di->public_key;
  monoeg_g_free (D.26915);
  <D.26917>:
  D.26918 = &di->sheap;
  mono_dynamic_stream_reset (D.26918);
  D.26919 = &di->code;
  mono_dynamic_stream_reset (D.26919);
  D.26920 = &di->resources;
  mono_dynamic_stream_reset (D.26920);
  D.26921 = &di->us;
  mono_dynamic_stream_reset (D.26921);
  D.26922 = &di->blob;
  mono_dynamic_stream_reset (D.26922);
  D.26923 = &di->tstream;
  mono_dynamic_stream_reset (D.26923);
  D.26924 = &di->guid;
  mono_dynamic_stream_reset (D.26924);
  i = 0;
  goto <D.20458>;
  <D.20457>:
  D.26925 = di->tables[i].values;
  monoeg_g_free (D.26925);
  i = i + 1;
  <D.20458>:
  if (i <= 44) goto <D.20457>; else goto <D.20459>;
  <D.20459>:
}


free_blob_cache_entry (void * key, void * val, void * user_data)
{
  monoeg_g_free (key);
}


__attribute__((visibility ("hidden")))
mono_image_basic_init (struct MonoReflectionAssemblyBuilder * assemblyb)
{
  struct MonoVTable * D.26926;
  struct MonoDynamicAssembly * D.26927;
  void * D.26930;
  struct MonoAssembly * D.26931;
  unsigned char D.26932;
  struct MonoString * D.26933;
  char * D.26934;
  struct MonoString * D.26935;
  char * D.26938;
  gchar * D.26940;
  struct MonoString * D.26941;
  char * * parts.139;
  char * D.26945;
  int D.26946;
  short unsigned int D.26947;
  char * * parts.140;
  char * D.26949;
  int D.26950;
  short unsigned int D.26951;
  uint16_t iftmp.141;
  char * D.26953;
  char * * parts.142;
  char * D.26957;
  int D.26958;
  uint16_t iftmp.143;
  int D.26963;
  unsigned int D.26966;
  _Bool D.26967;
  unsigned char D.26968;
  _Bool D.26969;
  unsigned char D.26970;
  struct MonoString * D.26971;
  char * D.26972;
  gchar * D.26973;
  char * D.26974;
  struct MonoImage * D.26975;
  struct MonoArray * D.26976;
  unsigned int D.26979;
  const char * D.26984;
  mono_byte[17] * D.26985;
  char * D.26986;
  long unsigned int D.26987;
  union mono_mutex_t * D.26988;
  _Bool D.26991;
  long int D.26992;
  long int D.26993;
  struct GSList * D.26996;
  struct GSList * D.26997;
  _Bool D.27000;
  long int D.27001;
  long int D.27002;
  struct MonoDomain * D.27005;
  struct MonoReflectionAssembly * D.27006;
  struct MonoDynamicAssembly * assembly;
  struct MonoDynamicImage * image;
  struct MonoDomain * domain;

  D.26926 = MEM[(struct MonoObject *)assemblyb].vtable;
  domain = D.26926->domain;
  D.26927 = assemblyb->dynamic_assembly;
  if (D.26927 != 0B) goto <D.26928>; else goto <D.26929>;
  <D.26928>:
  return;
  <D.26929>:
  D.26930 = monoeg_malloc0 (152);
  assemblyb->dynamic_assembly = D.26930;
  assembly = assemblyb->dynamic_assembly;
  D.26931 = &assembly->assembly;
  mono_profiler_assembly_event (D.26931, 0);
  assembly->assembly.ref_count = 1;
  assembly->assembly.dynamic = 1;
  D.26932 = assemblyb->corlib_internal;
  assembly->assembly.corlib_internal = D.26932;
  assemblyb->assembly.assembly = assembly;
  D.26933 = assemblyb->dir;
  D.26934 = mono_string_to_utf8 (D.26933);
  assembly->assembly.basedir = D.26934;
  D.26935 = assemblyb->culture;
  if (D.26935 != 0B) goto <D.26936>; else goto <D.26937>;
  <D.26936>:
  D.26935 = assemblyb->culture;
  D.26938 = mono_string_to_utf8 (D.26935);
  assembly->assembly.aname.culture = D.26938;
  goto <D.26939>;
  <D.26937>:
  D.26940 = monoeg_strdup ("");
  assembly->assembly.aname.culture = D.26940;
  <D.26939>:
  D.26941 = assemblyb->version;
  if (D.26941 != 0B) goto <D.26942>; else goto <D.26943>;
  <D.26942>:
  {
    char * vstr;
    char * * version;
    char * * parts;

    D.26941 = assemblyb->version;
    vstr = mono_string_to_utf8 (D.26941);
    version = monoeg_g_strsplit (vstr, ".", 4);
    parts = version;
    parts.139 = parts;
    parts = parts.139 + 8;
    D.26945 = *parts.139;
    D.26946 = atoi (D.26945);
    D.26947 = (short unsigned int) D.26946;
    assembly->assembly.aname.major = D.26947;
    parts.140 = parts;
    parts = parts.140 + 8;
    D.26949 = *parts.140;
    D.26950 = atoi (D.26949);
    D.26951 = (short unsigned int) D.26950;
    assembly->assembly.aname.minor = D.26951;
    D.26953 = *parts;
    if (D.26953 != 0B) goto <D.26954>; else goto <D.26955>;
    <D.26954>:
    parts.142 = parts;
    parts = parts.142 + 8;
    D.26957 = *parts.142;
    D.26958 = atoi (D.26957);
    iftmp.141 = (uint16_t) D.26958;
    goto <D.26959>;
    <D.26955>:
    iftmp.141 = 0;
    <D.26959>:
    assembly->assembly.aname.build = iftmp.141;
    D.26953 = *parts;
    if (D.26953 != 0B) goto <D.26961>; else goto <D.26962>;
    <D.26961>:
    D.26953 = *parts;
    D.26963 = atoi (D.26953);
    iftmp.143 = (uint16_t) D.26963;
    goto <D.26964>;
    <D.26962>:
    iftmp.143 = 0;
    <D.26964>:
    assembly->assembly.aname.revision = iftmp.143;
    monoeg_g_strfreev (version);
    monoeg_g_free (vstr);
  }
  goto <D.26965>;
  <D.26943>:
  assembly->assembly.aname.major = 0;
  assembly->assembly.aname.minor = 0;
  assembly->assembly.aname.build = 0;
  assembly->assembly.aname.revision = 0;
  <D.26965>:
  D.26966 = assemblyb->access;
  D.26967 = D.26966 != 2;
  D.26968 = (unsigned char) D.26967;
  assembly->run = D.26968;
  D.26966 = assemblyb->access;
  D.26969 = D.26966 != 1;
  D.26970 = (unsigned char) D.26969;
  assembly->save = D.26970;
  assembly->domain = domain;
  D.26971 = assemblyb->name;
  D.26972 = mono_string_to_utf8 (D.26971);
  D.26973 = monoeg_strdup ("RefEmit_YouForgotToDefineAModule");
  image = create_dynamic_mono_image (assembly, D.26972, D.26973);
  image->initial_image = 1;
  D.26974 = image->image.name;
  assembly->assembly.aname.name = D.26974;
  D.26975 = &image->image;
  assembly->assembly.image = D.26975;
  D.26976 = assemblyb->pktoken;
  if (D.26976 != 0B) goto <D.26977>; else goto <D.26978>;
  <D.26977>:
  D.26976 = assemblyb->pktoken;
  D.26979 = D.26976->max_length;
  if (D.26979 != 0) goto <D.26980>; else goto <D.26981>;
  <D.26980>:
  D.26976 = assemblyb->pktoken;
  D.26979 = D.26976->max_length;
  if (D.26979 != 16) goto <D.26982>; else goto <D.26983>;
  <D.26982>:
  D.26984 = assembly->assembly.aname.name;
  D.26976 = assemblyb->pktoken;
  D.26979 = D.26976->max_length;
  monoeg_g_log (0B, 4, "Public key token length invalid for assembly %s: %i", D.26984, D.26979);
  <D.20469>:
  goto <D.20469>;
  <D.26983>:
  D.26985 = &assembly->assembly.aname.public_key_token;
  D.26976 = assemblyb->pktoken;
  D.26986 = mono_array_addr_with_size (D.26976, 1, 0);
  D.26976 = assemblyb->pktoken;
  D.26979 = D.26976->max_length;
  D.26987 = (long unsigned int) D.26979;
  memcpy (D.26985, D.26986, D.26987);
  <D.26981>:
  <D.26978>:
  {
    int ret;

    D.26988 = &domain->assemblies_lock.mutex;
    ret = pthread_mutex_lock (D.26988);
    if (ret != 0) goto <D.26989>; else goto <D.26990>;
    <D.26989>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.26990>:
    D.26991 = ret != 0;
    D.26992 = (long int) D.26991;
    D.26993 = __builtin_expect (D.26992, 0);
    if (D.26993 != 0) goto <D.26994>; else goto <D.26995>;
    <D.26994>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5333, "ret == 0");
    <D.26995>:
  }
  D.26996 = domain->domain_assemblies;
  D.26997 = monoeg_g_slist_append (D.26996, assembly);
  domain->domain_assemblies = D.26997;
  {
    int ret;

    D.26988 = &domain->assemblies_lock.mutex;
    ret = pthread_mutex_unlock (D.26988);
    if (ret != 0) goto <D.26998>; else goto <D.26999>;
    <D.26998>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.26999>:
    D.27000 = ret != 0;
    D.27001 = (long int) D.27000;
    D.27002 = __builtin_expect (D.27001, 0);
    if (D.27002 != 0) goto <D.27003>; else goto <D.27004>;
    <D.27003>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5335, "ret == 0");
    <D.27004>:
  }
  D.26926 = MEM[(struct MonoObject *)assemblyb].vtable;
  D.27005 = D.26926->domain;
  D.27006 = &assemblyb->assembly;
  D.26931 = &assembly->assembly;
  register_assembly (D.27005, D.27006, D.26931);
  D.26931 = &assembly->assembly;
  mono_profiler_assembly_loaded (D.26931, 0);
  mono_assembly_invoke_load_hook (assembly);
}


__attribute__((__gnu_inline__, __pure__, __leaf__, __nothrow__))
atoi (const char * __nptr)
{
  int D.27008;
  long int D.27009;

  D.27009 = strtol (__nptr, 0B, 10);
  D.27008 = (int) D.27009;
  return D.27008;
}


create_dynamic_mono_image (struct MonoDynamicAssembly * assembly, char * assembly_name, char * module_name)
{
  const struct MonoRuntimeInfo * D.27011;
  const char[4] * D.27012;
  int D.27013;
  const struct MonoRuntimeInfo * D.27017;
  struct MonoImage * D.27018;
  char * D.27019;
  gchar * D.27020;
  void * D.27021;
  struct MonoAssembly * * D.27022;
  struct MonoGHashTable * D.27023;
  struct GHashTable * D.27024;
  struct GHashTable * D.27025;
  struct GHashTable * D.27026;
  struct GHashTable * D.27027;
  struct GHashTable * D.27028;
  struct MonoGHashTable * D.27029;
  struct MonoGHashTable * D.27030;
  struct MonoGHashTable * D.27031;
  struct MonoGHashTable * D.27032;
  struct GHashTable * D.27033;
  struct GHashTable * D.27034;
  struct GHashTable * D.27035;
  struct GPtrArray * D.27036;
  struct MonoGHashTable * D.27037;
  struct MonoDynamicStream * D.27038;
  struct MonoDynamicStream * D.27039;
  struct MonoDynamicStream * D.27040;
  unsigned int D.27041;
  unsigned int D.27042;
  unsigned int D.27043;
  unsigned int D.27044;
  unsigned int D.27045;
  unsigned char D.27046;
  unsigned char D.27047;
  int D.27048;
  unsigned char D.27049;
  int D.27050;
  struct MonoDynamicImage * D.27051;
  static const guchar entrycode[16] = {255, 37, 0};
  struct MonoDynamicImage * image;
  int i;
  const char * version;

  D.27011 = mono_get_runtime_info ();
  D.27012 = &D.27011->framework_version;
  D.27013 = strcmp (D.27012, "2.1");
  if (D.27013 == 0) goto <D.27014>; else goto <D.27015>;
  <D.27014>:
  version = "v2.0.50727";
  goto <D.27016>;
  <D.27015>:
  D.27017 = mono_get_runtime_info ();
  version = &D.27017->runtime_version;
  <D.27016>:
  image = monoeg_malloc0 (3176);
  D.27018 = &image->image;
  mono_profiler_module_event (D.27018, 0);
  image->image.name = assembly_name;
  D.27019 = image->image.name;
  image->image.assembly_name = D.27019;
  image->image.module_name = module_name;
  D.27020 = monoeg_strdup (version);
  image->image.version = D.27020;
  image->image.md_version_major = 1;
  image->image.md_version_minor = 1;
  image->image.dynamic = 1;
  D.27021 = monoeg_malloc0 (8);
  image->image.references = D.27021;
  D.27022 = image->image.references;
  *D.27022 = 0B;
  D.27018 = &image->image;
  mono_image_init (D.27018);
  D.27023 = mono_g_hash_table_new_type (mono_object_hash, 0B, 1);
  image->token_fixups = D.27023;
  D.27024 = monoeg_g_hash_table_new (0B, 0B);
  image->method_to_table_idx = D.27024;
  D.27025 = monoeg_g_hash_table_new (0B, 0B);
  image->field_to_table_idx = D.27025;
  D.27026 = monoeg_g_hash_table_new (0B, 0B);
  image->method_aux_hash = D.27026;
  D.27027 = monoeg_g_hash_table_new (0B, 0B);
  image->vararg_aux_hash = D.27027;
  D.27028 = monoeg_g_hash_table_new (0B, 0B);
  image->handleref = D.27028;
  D.27029 = mono_g_hash_table_new_type (mono_object_hash, 0B, 1);
  image->handleref_managed = D.27029;
  D.27030 = mono_g_hash_table_new_type (0B, 0B, 2);
  image->tokens = D.27030;
  D.27031 = mono_g_hash_table_new_type (0B, 0B, 2);
  image->generic_def_objects = D.27031;
  D.27032 = mono_g_hash_table_new_type (mono_object_hash, 0B, 1);
  image->methodspec = D.27032;
  D.27033 = monoeg_g_hash_table_new (mono_metadata_type_hash, mono_metadata_type_equal);
  image->typespec = D.27033;
  D.27034 = monoeg_g_hash_table_new (mono_metadata_type_hash, mono_metadata_type_equal);
  image->typeref = D.27034;
  D.27035 = monoeg_g_hash_table_new (mono_blob_entry_hash, mono_blob_entry_equal);
  image->blob_cache = D.27035;
  D.27036 = monoeg_g_ptr_array_new ();
  image->gen_params = D.27036;
  D.27037 = mono_g_hash_table_new_type (0B, 0B, 2);
  image->remapped_tokens = D.27037;
  D.27038 = &image->sheap;
  string_heap_init (D.27038);
  D.27039 = &image->us;
  mono_image_add_stream_data (D.27039, "", 1);
  add_to_blob_cached (image, "", 1, 0B, 0);
  D.27040 = &image->code;
  mono_image_add_stream_data (D.27040, &entrycode, 16);
  D.27040 = &image->code;
  D.27041 = mono_image_add_stream_zero (D.27040, 8);
  image->iat_offset = D.27041;
  D.27040 = &image->code;
  D.27042 = mono_image_add_stream_zero (D.27040, 40);
  image->idt_offset = D.27042;
  D.27040 = &image->code;
  D.27043 = mono_image_add_stream_zero (D.27040, 2);
  image->imp_names_offset = D.27043;
  D.27040 = &image->code;
  mono_image_add_stream_data (D.27040, "_CorExeMain", 12);
  D.27040 = &image->code;
  mono_image_add_stream_data (D.27040, "mscoree.dll", 12);
  D.27040 = &image->code;
  D.27044 = mono_image_add_stream_zero (D.27040, 8);
  image->ilt_offset = D.27044;
  D.27040 = &image->code;
  stream_data_align (D.27040);
  D.27040 = &image->code;
  D.27045 = mono_image_add_stream_zero (D.27040, 136);
  image->cli_header_offset = D.27045;
  i = 0;
  goto <D.20430>;
  <D.20429>:
  image->tables[i].next_idx = 1;
  D.27046 = table_sizes[i];
  image->tables[i].columns = D.27046;
  i = i + 1;
  <D.20430>:
  if (i <= 44) goto <D.20429>; else goto <D.20431>;
  <D.20431>:
  image->image.assembly = assembly;
  D.27047 = assembly->run;
  D.27048 = (int) D.27047;
  image->run = D.27048;
  D.27049 = assembly->save;
  D.27050 = (int) D.27049;
  image->save = D.27050;
  image->pe_kind = 1;
  image->machine = 332;
  D.27018 = &image->image;
  mono_profiler_module_loaded (D.27018, 0);
  D.27051 = image;
  return D.27051;
}


mono_blob_entry_equal (const char * str1, const char * str2)
{
  unsigned int D.27053;
  unsigned int D.27054;
  gboolean D.27057;
  const char * end1.144;
  const char * end2.145;
  long unsigned int D.27060;
  int D.27061;
  _Bool D.27062;
  int len;
  int len2;
  const char * end1;
  const char * end2;

  try
    {
      D.27053 = mono_metadata_decode_blob_size (str1, &end1);
      len = (int) D.27053;
      D.27054 = mono_metadata_decode_blob_size (str2, &end2);
      len2 = (int) D.27054;
      if (len != len2) goto <D.27055>; else goto <D.27056>;
      <D.27055>:
      D.27057 = 0;
      return D.27057;
      <D.27056>:
      end1.144 = end1;
      end2.145 = end2;
      D.27060 = (long unsigned int) len;
      D.27061 = memcmp (end1.144, end2.145, D.27060);
      D.27062 = D.27061 == 0;
      D.27057 = (gboolean) D.27062;
      return D.27057;
    }
  finally
    {
      end1 = {CLOBBER};
      end2 = {CLOBBER};
    }
}


mono_blob_entry_hash (const char * str)
{
  const char * str.146;
  sizetype D.27068;
  char D.27069;
  const char * str.147;
  unsigned int D.27071;
  unsigned int D.27072;
  unsigned int D.27073;
  int D.27074;
  guint len;
  guint h;
  const char * end;

  str.146 = str;
  len = mono_metadata_decode_blob_size (str.146, &str);
  if (len != 0) goto <D.27066>; else goto <D.27067>;
  <D.27066>:
  str.146 = str;
  D.27068 = (sizetype) len;
  end = str.146 + D.27068;
  str.146 = str;
  D.27069 = *str.146;
  h = (guint) D.27069;
  str.146 = str;
  str.147 = str.146 + 1;
  str = str.147;
  goto <D.18895>;
  <D.18894>:
  D.27071 = h << 5;
  D.27072 = D.27071 - h;
  str.146 = str;
  D.27069 = *str.146;
  D.27073 = (unsigned int) D.27069;
  h = D.27072 + D.27073;
  str.146 = str;
  str.147 = str.146 + 1;
  str = str.147;
  <D.18895>:
  str.146 = str;
  if (str.146 < end) goto <D.18894>; else goto <D.18896>;
  <D.18896>:
  D.27074 = (int) h;
  return D.27074;
  <D.27067>:
  D.27074 = 0;
  return D.27074;
}


string_heap_init (struct MonoDynamicStream * sh)
{
  void * D.27076;
  struct GHashTable * D.27077;

  sh->index = 0;
  sh->alloc_size = 4096;
  D.27076 = monoeg_malloc (4096);
  sh->data = D.27076;
  D.27077 = monoeg_g_hash_table_new_full (monoeg_g_str_hash, monoeg_g_str_equal, monoeg_g_free, 0B);
  sh->hash = D.27077;
  string_heap_insert (sh, "");
}


register_assembly (struct MonoDomain * domain, struct MonoReflectionAssembly * res, struct MonoAssembly * assembly)
{
  union mono_mutex_t * D.27078;
  _Bool D.27081;
  long int D.27082;
  long int D.27083;
  struct MonoGHashTable * D.27086;
  struct MonoGHashTable * D.27089;
  struct MonoMemPool * D.27092;
  _Bool D.27095;
  long int D.27096;
  long int D.27097;
  void * D.27100;

  {
    struct MonoReflectionAssembly * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = assembly;
        pe.refclass = 0B;
        {
          int ret;

          D.27078 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.27078);
          if (ret != 0) goto <D.27079>; else goto <D.27080>;
          <D.27079>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.27080>:
          D.27081 = ret != 0;
          D.27082 = (long int) D.27081;
          D.27083 = __builtin_expect (D.27082, 0);
          if (D.27083 != 0) goto <D.27084>; else goto <D.27085>;
          <D.27084>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6167, "ret == 0");
          <D.27085>:
        }
        D.27086 = domain->refobject_hash;
        if (D.27086 == 0B) goto <D.27087>; else goto <D.27088>;
        <D.27087>:
        D.27089 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.27089;
        <D.27088>:
        D.27086 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.27086, &pe);
        if (_obj == 0B) goto <D.27090>; else goto <D.27091>;
        <D.27090>:
        {
          struct ReflectedEntry * e;

          D.27092 = domain->mp;
          e = mono_mempool_alloc (D.27092, 16);
          e->item = assembly;
          e->refclass = 0B;
          D.27086 = domain->refobject_hash;
          mono_g_hash_table_insert (D.27086, e, res);
          _obj = res;
        }
        <D.27091>:
        {
          int ret;

          D.27078 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.27078);
          if (ret != 0) goto <D.27093>; else goto <D.27094>;
          <D.27093>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.27094>:
          D.27095 = ret != 0;
          D.27096 = (long int) D.27095;
          D.27097 = __builtin_expect (D.27096, 0);
          if (D.27097 != 0) goto <D.27098>; else goto <D.27099>;
          <D.27098>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6167, "ret == 0");
          <D.27099>:
        }
        D.27100 = _obj;
        return D.27100;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


reflected_equal (const void * a, const void * b)
{
  gboolean D.27103;
  int iftmp.148;
  void * D.27107;
  void * D.27108;
  struct MonoClass * D.27110;
  struct MonoClass * D.27111;
  const struct ReflectedEntry * ea;
  const struct ReflectedEntry * eb;

  ea = a;
  eb = b;
  D.27107 = ea->item;
  D.27108 = eb->item;
  if (D.27107 == D.27108) goto <D.27109>; else goto <D.27105>;
  <D.27109>:
  D.27110 = ea->refclass;
  D.27111 = eb->refclass;
  if (D.27110 == D.27111) goto <D.27112>; else goto <D.27105>;
  <D.27112>:
  iftmp.148 = 1;
  goto <D.27106>;
  <D.27105>:
  iftmp.148 = 0;
  <D.27106>:
  D.27103 = iftmp.148;
  return D.27103;
}


reflected_hash (const void * a)
{
  guint D.27114;
  void * D.27115;
  const struct ReflectedEntry * ea;

  ea = a;
  D.27115 = ea->item;
  D.27114 = mono_aligned_addr_hash (D.27115);
  return D.27114;
}


__attribute__((visibility ("hidden")))
mono_image_create_pefile (struct MonoReflectionModuleBuilder * mb, void * file)
{
  int D.27117;
  unsigned int D.27118;
  int D.27119;
  unsigned int D.27120;
  struct MonoDynamicAssembly * D.27121;
  struct MonoImage * D.27122;
  int D.27123;
  struct MonoArray * D.27126;
  long unsigned int D.27129;
  long unsigned int D.27130;
  char * D.27131;
  struct MonoArray * D.27132;
  long unsigned int D.27135;
  char * D.27136;
  long unsigned int D.27141;
  unsigned int D.27142;
  unsigned int D.27143;
  unsigned int D.27144;
  unsigned int D.27147;
  unsigned int D.27148;
  unsigned int D.27149;
  char * D.27150;
  sizetype D.27151;
  short unsigned int D.27152;
  short unsigned int D.27153;
  signed short D.27154;
  int D.27155;
  int D.27156;
  signed short D.27157;
  signed short D.27158;
  short unsigned int D.27159;
  short unsigned int D.27160;
  short unsigned int D.27161;
  signed short D.27162;
  int D.27163;
  int D.27164;
  signed short D.27165;
  signed short D.27166;
  short unsigned int D.27167;
  long int D.27168;
  unsigned int D.27169;
  unsigned int D.27170;
  long int D.27171;
  unsigned int D.27172;
  unsigned int D.27173;
  unsigned int D.27174;
  unsigned int D.27175;
  long int D.27176;
  unsigned int D.27177;
  unsigned int D.27178;
  unsigned int D.27179;
  unsigned int D.27180;
  long int D.27181;
  unsigned int D.27182;
  unsigned int D.27183;
  unsigned int D.27184;
  unsigned int D.27185;
  unsigned int D.27189;
  unsigned int D.27190;
  unsigned int D.27191;
  unsigned int D.27192;
  unsigned int D.27193;
  unsigned int D.27194;
  unsigned int D.27195;
  unsigned int D.27196;
  unsigned int D.27197;
  unsigned int D.27198;
  _Bool D.27199;
  long int D.27200;
  long int D.27201;
  unsigned int D.27204;
  unsigned int D.27205;
  unsigned int D.27206;
  unsigned int D.27207;
  unsigned int D.27208;
  unsigned int D.27209;
  unsigned int D.27210;
  unsigned int D.27211;
  unsigned int D.27212;
  unsigned int D.27213;
  unsigned int D.27214;
  unsigned int D.27215;
  unsigned int D.27216;
  unsigned int D.27217;
  unsigned int D.27218;
  unsigned int D.27219;
  unsigned int D.27220;
  unsigned int D.27221;
  unsigned int D.27222;
  unsigned int D.27223;
  unsigned int D.27224;
  unsigned int D.27225;
  unsigned int D.27226;
  unsigned int D.27227;
  unsigned int D.27228;
  unsigned int D.27229;
  unsigned int D.27230;
  unsigned int D.27231;
  short unsigned int kind.149;
  short unsigned int D.27236;
  signed short D.27237;
  int D.27238;
  int D.27239;
  signed short D.27240;
  signed short D.27241;
  short unsigned int D.27242;
  unsigned int D.27243;
  unsigned int D.27244;
  unsigned int D.27245;
  unsigned int D.27246;
  unsigned int D.27247;
  unsigned int D.27248;
  unsigned int D.27249;
  unsigned int D.27250;
  unsigned int D.27251;
  unsigned int D.27252;
  unsigned int D.27253;
  unsigned int D.27254;
  unsigned int D.27255;
  unsigned int D.27256;
  unsigned int D.27257;
  unsigned int D.27258;
  unsigned int D.27259;
  unsigned int D.27260;
  unsigned int D.27261;
  unsigned int D.27262;
  unsigned int D.27263;
  unsigned int D.27264;
  unsigned int D.27265;
  unsigned int D.27266;
  unsigned int D.27267;
  unsigned int D.27268;
  unsigned int D.27269;
  unsigned int D.27270;
  unsigned int D.27271;
  unsigned int D.27272;
  unsigned int D.27273;
  unsigned int D.27274;
  unsigned int D.27275;
  unsigned int D.27276;
  unsigned int D.27277;
  unsigned int D.27278;
  unsigned int D.27279;
  unsigned int D.27280;
  unsigned int D.27281;
  unsigned int D.27282;
  unsigned int D.27283;
  unsigned int D.27284;
  unsigned int D.27285;
  unsigned int D.27286;
  unsigned int D.27287;
  unsigned int D.27288;
  unsigned int D.27289;
  unsigned int D.27290;
  unsigned int D.27291;
  unsigned int D.27292;
  unsigned int D.27293;
  unsigned int D.27294;
  unsigned int D.27295;
  char * D.27298;
  unsigned int D.27299;
  sizetype D.27300;
  sizetype D.27301;
  char * D.27302;
  sizetype D.27304;
  unsigned int D.27305;
  unsigned int D.27306;
  unsigned int D.27307;
  unsigned int D.27308;
  unsigned int D.27309;
  unsigned int D.27310;
  unsigned int D.27311;
  unsigned int D.27312;
  unsigned int D.27313;
  unsigned int D.27314;
  unsigned int D.27315;
  unsigned int D.27316;
  unsigned int D.27317;
  unsigned int D.27318;
  unsigned int D.27319;
  unsigned int D.27320;
  unsigned int D.27321;
  unsigned int D.27322;
  unsigned int D.27323;
  unsigned int D.27324;
  unsigned int D.27325;
  sizetype D.27326;
  sizetype D.27327;
  unsigned int D.27328;
  unsigned int D.27329;
  unsigned int D.27330;
  unsigned int D.27331;
  unsigned int D.27332;
  unsigned int D.27333;
  unsigned int D.27334;
  unsigned int D.27335;
  unsigned int D.27336;
  unsigned int D.27337;
  sizetype D.27338;
  unsigned int D.27339;
  unsigned int D.27340;
  unsigned int D.27341;
  unsigned int D.27342;
  unsigned int D.27343;
  unsigned int D.27344;
  unsigned int D.27345;
  unsigned int D.27346;
  unsigned int D.27347;
  unsigned int D.27348;
  unsigned int D.27349;
  sizetype D.27350;
  guchar * p.150;
  unsigned char D.27352;
  guchar * p.151;
  unsigned int D.27354;
  unsigned char D.27355;
  guchar * p.152;
  unsigned int D.27357;
  unsigned char D.27358;
  guchar * p.153;
  unsigned int D.27360;
  unsigned char D.27361;
  sizetype D.27362;
  unsigned int D.27363;
  unsigned int D.27364;
  unsigned int D.27365;
  unsigned int D.27366;
  unsigned int D.27367;
  unsigned int D.27368;
  unsigned int D.27369;
  unsigned int D.27370;
  unsigned int D.27371;
  unsigned int D.27372;
  struct MonoReflectionMethod * D.27373;
  struct MonoVTable * D.27376;
  struct MonoClass * D.27377;
  const char * D.27378;
  int D.27379;
  struct GHashTable * D.27383;
  struct MonoMethod * D.27384;
  void * D.27385;
  long int D.27386;
  unsigned int D.27387;
  unsigned int D.27388;
  unsigned int D.27389;
  unsigned int D.27390;
  unsigned int D.27391;
  unsigned int D.27392;
  unsigned int D.27393;
  unsigned int D.27394;
  unsigned int D.27395;
  unsigned int D.27396;
  unsigned int D.27398;
  unsigned int D.27399;
  unsigned int D.27400;
  unsigned int D.27401;
  unsigned int D.27402;
  unsigned int D.27403;
  unsigned int D.27404;
  unsigned int D.27405;
  unsigned int D.27406;
  unsigned int D.27407;
  unsigned int D.27408;
  unsigned int D.27409;
  unsigned int D.27410;
  unsigned int D.27411;
  unsigned int D.27412;
  unsigned int D.27413;
  unsigned int D.27414;
  unsigned int D.27415;
  unsigned int D.27416;
  unsigned int D.27417;
  unsigned int D.27418;
  unsigned int D.27419;
  unsigned int D.27420;
  unsigned int D.27421;
  unsigned int D.27422;
  unsigned int D.27423;
  unsigned int D.27424;
  unsigned int D.27425;
  unsigned int D.27426;
  unsigned int D.27427;
  unsigned int D.27428;
  unsigned int D.27431;
  unsigned int D.27432;
  unsigned int D.27433;
  unsigned int D.27434;
  unsigned int D.27435;
  unsigned int D.27436;
  unsigned int D.27437;
  unsigned int D.27438;
  unsigned int D.27439;
  sizetype D.27440;
  char[8] * D.27443;
  const char[7] * D.27444;
  unsigned int D.27445;
  unsigned int D.27446;
  unsigned int D.27447;
  unsigned int D.27448;
  unsigned int D.27449;
  unsigned int D.27450;
  unsigned int D.27451;
  unsigned int D.27452;
  unsigned int D.27453;
  unsigned int D.27454;
  unsigned int D.27455;
  unsigned int D.27456;
  unsigned int D.27457;
  unsigned int D.27458;
  unsigned int D.27459;
  unsigned int D.27460;
  unsigned int D.27461;
  unsigned int D.27462;
  unsigned int D.27463;
  unsigned int D.27464;
  unsigned int D.27465;
  unsigned int D.27466;
  unsigned int D.27467;
  unsigned int D.27468;
  unsigned int D.27469;
  unsigned int D.27470;
  unsigned int D.27471;
  unsigned int D.27472;
  unsigned int D.27473;
  unsigned int D.27474;
  unsigned int D.27475;
  unsigned int D.27476;
  unsigned int D.27477;
  unsigned int D.27478;
  unsigned int D.27479;
  unsigned int D.27480;
  unsigned int D.27481;
  unsigned int D.27482;
  unsigned int D.27483;
  unsigned int D.27484;
  unsigned int D.27485;
  unsigned int D.27486;
  unsigned int D.27487;
  unsigned int D.27488;
  unsigned int D.27489;
  unsigned int D.27490;
  unsigned int D.27491;
  unsigned int D.27492;
  unsigned int D.27493;
  unsigned int D.27494;
  unsigned int D.27495;
  unsigned int D.27496;
  unsigned int D.27497;
  unsigned int D.27498;
  unsigned int D.27499;
  unsigned int D.27500;
  unsigned int D.27501;
  unsigned int D.27502;
  unsigned int D.27503;
  unsigned int D.27504;
  unsigned int D.27505;
  unsigned int D.27506;
  int D.27509;
  unsigned int D.27510;
  unsigned int D.27513;
  unsigned int D.27514;
  guchar * p.154;
  guchar * p.155;
  guchar * p.156;
  guchar * p.157;
  char * D.27519;
  char * D.27520;
  char * D.27521;
  unsigned int D.27524;
  unsigned int D.27525;
  unsigned int D.27526;
  unsigned int D.27527;
  unsigned int D.27528;
  unsigned int D.27529;
  unsigned int D.27530;
  unsigned int D.27531;
  unsigned int D.27532;
  char * D.27533;
  unsigned int D.27536;
  int file_offset.158;
  unsigned int D.27538;
  unsigned int D.27541;
  int D.27542;
  unsigned int D.27545;
  struct MonoDynamicStream * D.27546;
  struct MonoDynamicStream * D.27547;
  struct MonoDynamicStream * D.27548;
  struct MonoDynamicStream * D.27549;
  struct MonoDynamicStream * D.27550;
  struct GHashTable * D.27551;
  struct MonoMSDOSHeader * msdos;
  struct MonoDotNetHeader * header;
  struct MonoSectionTable * section;
  struct MonoCLIHeader * cli_header;
  guint32 size;
  guint32 image_size;
  guint32 virtual_base;
  guint32 text_offset;
  guint32 header_start;
  guint32 section_start;
  guint32 file_offset;
  guint32 virtual_offset;
  struct MonoDynamicImage * assembly;
  struct MonoReflectionAssemblyBuilder * assemblyb;
  struct MonoDynamicStream pefile_stream;
  struct MonoDynamicStream * pefile;
  int i;
  int nsections;
  guint32 * rva;
  guint32 value;
  guchar * p;
  static const unsigned char msheader[128] = {77, 90, 144, 0, 3, 0, 0, 0, 4, 0, 0, 0, 255, 255, 0, 0, 184, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 14, 31, 186, 14, 0, 180, 9, 205, 33, 184, 1, 76, 205, 33, 84, 104, 105, 115, 32, 112, 114, 111, 103, 114, 97, 109, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 114, 117, 110, 32, 105, 110, 32, 68, 79, 83, 32, 109, 111, 100, 101, 46, 13, 13, 10, 36, 0, 0, 0, 0, 0, 0, 0};

  try
    {
      pefile_stream = {};
      pefile = &pefile_stream;
      assemblyb = mb->assemblyb;
      mono_image_basic_init (assemblyb);
      assembly = mb->dynamic_image;
      D.27117 = assemblyb->pe_kind;
      D.27118 = (unsigned int) D.27117;
      assembly->pe_kind = D.27118;
      D.27119 = assemblyb->machine;
      D.27120 = (unsigned int) D.27119;
      assembly->machine = D.27120;
      D.27121 = assemblyb->dynamic_assembly;
      D.27122 = D.27121->assembly.image;
      D.27117 = assemblyb->pe_kind;
      D.27118 = (unsigned int) D.27117;
      MEM[(struct MonoDynamicImage *)D.27122].pe_kind = D.27118;
      D.27121 = assemblyb->dynamic_assembly;
      D.27122 = D.27121->assembly.image;
      D.27119 = assemblyb->machine;
      D.27120 = (unsigned int) D.27119;
      MEM[(struct MonoDynamicImage *)D.27122].machine = D.27120;
      mono_image_build_metadata (mb);
      D.27123 = mb->is_main;
      if (D.27123 != 0) goto <D.27124>; else goto <D.27125>;
      <D.27124>:
      D.27126 = assemblyb->resources;
      if (D.27126 != 0B) goto <D.27127>; else goto <D.27128>;
      <D.27127>:
      {
        int len;

        D.27126 = assemblyb->resources;
        D.27129 = mono_array_length (D.27126);
        len = (int) D.27129;
        i = 0;
        goto <D.20597>;
        <D.20596>:
        D.27126 = assemblyb->resources;
        D.27130 = (long unsigned int) i;
        D.27131 = mono_array_addr_with_size (D.27126, 40, D.27130);
        assembly_add_resource (mb, assembly, D.27131);
        i = i + 1;
        <D.20597>:
        if (i < len) goto <D.20596>; else goto <D.20598>;
        <D.20598>:
      }
      <D.27128>:
      <D.27125>:
      D.27132 = mb->resources;
      if (D.27132 != 0B) goto <D.27133>; else goto <D.27134>;
      <D.27133>:
      {
        int len;

        D.27132 = mb->resources;
        D.27135 = mono_array_length (D.27132);
        len = (int) D.27135;
        i = 0;
        goto <D.20601>;
        <D.20600>:
        D.27132 = mb->resources;
        D.27130 = (long unsigned int) i;
        D.27136 = mono_array_addr_with_size (D.27132, 40, D.27130);
        assembly_add_resource (mb, assembly, D.27136);
        i = i + 1;
        <D.20601>:
        if (i < len) goto <D.20600>; else goto <D.20602>;
        <D.20602>:
      }
      <D.27134>:
      build_compressed_metadata (assembly);
      D.27123 = mb->is_main;
      if (D.27123 != 0) goto <D.27137>; else goto <D.27138>;
      <D.27137>:
      assembly_add_win32_resources (assembly, assemblyb);
      <D.27138>:
      nsections = calc_section_size (assembly);
      if (0 != 0) goto <D.27139>; else goto <D.27140>;
      <D.27139>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5690, "sizeof (MonoMSDOSHeader) == sizeof (msheader)");
      <D.27140>:
      mono_image_add_stream_data (pefile, &msheader, 128);
      header_start = mono_image_add_stream_zero (pefile, 248);
      D.27141 = (long unsigned int) nsections;
      D.27142 = (unsigned int) D.27141;
      D.27143 = D.27142 * 40;
      section_start = mono_image_add_stream_zero (pefile, D.27143);
      D.27141 = (long unsigned int) nsections;
      D.27142 = (unsigned int) D.27141;
      D.27143 = D.27142 * 40;
      file_offset = D.27143 + section_start;
      virtual_offset = 8192;
      image_size = 0;
      i = 0;
      goto <D.20605>;
      <D.20604>:
      D.27144 = assembly->sections[i].size;
      if (D.27144 == 0) goto <D.27145>; else goto <D.27146>;
      <D.27145>:
      // predicted unlikely by continue predictor.
      goto <D.20603>;
      <D.27146>:
      file_offset = file_offset + 511;
      file_offset = file_offset & 4294966784;
      virtual_offset = virtual_offset + 8191;
      virtual_offset = virtual_offset & 4294959104;
      assembly->sections[i].offset = file_offset;
      assembly->sections[i].rva = virtual_offset;
      D.27144 = assembly->sections[i].size;
      file_offset = D.27144 + file_offset;
      D.27144 = assembly->sections[i].size;
      virtual_offset = D.27144 + virtual_offset;
      D.27144 = assembly->sections[i].size;
      D.27147 = D.27144 + 8191;
      D.27148 = D.27147 & 4294959104;
      image_size = D.27148 + image_size;
      <D.20603>:
      i = i + 1;
      <D.20605>:
      if (i <= 2) goto <D.20604>; else goto <D.20606>;
      <D.20606>:
      file_offset = file_offset + 511;
      file_offset = file_offset & 4294966784;
      D.27141 = (long unsigned int) nsections;
      D.27142 = (unsigned int) D.27141;
      D.27143 = D.27142 * 40;
      D.27149 = D.27143 + section_start;
      image_size = D.27149 + image_size;
      msdos = pefile->data;
      msdos->pe_offset = 2147483648;
      D.27150 = pefile->data;
      D.27151 = (sizetype) header_start;
      header = D.27150 + D.27151;
      header->pesig[0] = 80;
      header->pesig[1] = 69;
      D.27119 = assemblyb->machine;
      D.27152 = (short unsigned int) D.27119;
      D.27153 = D.27152 >> 8;
      D.27154 = (signed short) D.27153;
      D.27119 = assemblyb->machine;
      D.27152 = (short unsigned int) D.27119;
      D.27155 = (int) D.27152;
      D.27156 = D.27155 << 8;
      D.27157 = (signed short) D.27156;
      D.27158 = D.27154 | D.27157;
      D.27159 = (short unsigned int) D.27158;
      header->coff.coff_machine = D.27159;
      D.27160 = (short unsigned int) nsections;
      D.27161 = D.27160 >> 8;
      D.27162 = (signed short) D.27161;
      D.27160 = (short unsigned int) nsections;
      D.27163 = (int) D.27160;
      D.27164 = D.27163 << 8;
      D.27165 = (signed short) D.27164;
      D.27166 = D.27162 | D.27165;
      D.27167 = (short unsigned int) D.27166;
      header->coff.coff_sections = D.27167;
      D.27168 = time (0B);
      D.27169 = (unsigned int) D.27168;
      D.27170 = D.27169 << 24;
      D.27171 = time (0B);
      D.27172 = (unsigned int) D.27171;
      D.27173 = D.27172 >> 8;
      D.27174 = D.27173 & 65280;
      D.27175 = D.27170 | D.27174;
      D.27176 = time (0B);
      D.27177 = (unsigned int) D.27176;
      D.27178 = D.27177 << 8;
      D.27179 = D.27178 & 16711680;
      D.27180 = D.27175 | D.27179;
      D.27181 = time (0B);
      D.27182 = (unsigned int) D.27181;
      D.27183 = D.27182 >> 24;
      D.27184 = D.27180 | D.27183;
      header->coff.coff_time = D.27184;
      header->coff.coff_opt_header_size = 57344;
      D.27185 = assemblyb->pekind;
      if (D.27185 == 1) goto <D.27186>; else goto <D.27187>;
      <D.27186>:
      header->coff.coff_attributes = 3617;
      goto <D.27188>;
      <D.27187>:
      header->coff.coff_attributes = 3585;
      <D.27188>:
      virtual_base = 4194304;
      header->pe.pe_magic = 2817;
      header->pe.pe_major = 6;
      header->pe.pe_minor = 0;
      size = assembly->sections[0].size;
      size = size + 511;
      size = size & 4294966784;
      D.27189 = size << 24;
      D.27190 = size >> 8;
      D.27191 = D.27190 & 65280;
      D.27192 = D.27189 | D.27191;
      D.27193 = size << 8;
      D.27194 = D.27193 & 16711680;
      D.27195 = D.27192 | D.27194;
      D.27196 = size >> 24;
      D.27197 = D.27195 | D.27196;
      header->pe.pe_code_size = D.27197;
      size = assembly->sections[1].size;
      size = size + 511;
      size = size & 4294966784;
      D.27189 = size << 24;
      D.27190 = size >> 8;
      D.27191 = D.27190 & 65280;
      D.27192 = D.27189 | D.27191;
      D.27193 = size << 8;
      D.27194 = D.27193 & 16711680;
      D.27195 = D.27192 | D.27194;
      D.27196 = size >> 24;
      D.27197 = D.27195 | D.27196;
      header->pe.pe_data_size = D.27197;
      D.27198 = assembly->sections[0].rva;
      D.27199 = D.27198 != 8192;
      D.27200 = (long int) D.27199;
      D.27201 = __builtin_expect (D.27200, 0);
      if (D.27201 != 0) goto <D.27202>; else goto <D.27203>;
      <D.27202>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5758, "START_TEXT_RVA == assembly->sections [MONO_SECTION_TEXT].rva");
      <D.27203>:
      D.27198 = assembly->sections[0].rva;
      D.27204 = D.27198 << 24;
      D.27198 = assembly->sections[0].rva;
      D.27205 = D.27198 >> 8;
      D.27206 = D.27205 & 65280;
      D.27207 = D.27204 | D.27206;
      D.27198 = assembly->sections[0].rva;
      D.27208 = D.27198 << 8;
      D.27209 = D.27208 & 16711680;
      D.27210 = D.27207 | D.27209;
      D.27198 = assembly->sections[0].rva;
      D.27211 = D.27198 >> 24;
      D.27212 = D.27210 | D.27211;
      header->pe.pe_rva_code_base = D.27212;
      D.27213 = assembly->sections[1].rva;
      D.27214 = D.27213 << 24;
      D.27213 = assembly->sections[1].rva;
      D.27215 = D.27213 >> 8;
      D.27216 = D.27215 & 65280;
      D.27217 = D.27214 | D.27216;
      D.27213 = assembly->sections[1].rva;
      D.27218 = D.27213 << 8;
      D.27219 = D.27218 & 16711680;
      D.27220 = D.27217 | D.27219;
      D.27213 = assembly->sections[1].rva;
      D.27221 = D.27213 >> 24;
      D.27222 = D.27220 | D.27221;
      header->pe.pe_rva_data_base = D.27222;
      D.27198 = assembly->sections[0].rva;
      D.27204 = D.27198 << 24;
      D.27198 = assembly->sections[0].rva;
      D.27205 = D.27198 >> 8;
      D.27206 = D.27205 & 65280;
      D.27207 = D.27204 | D.27206;
      D.27198 = assembly->sections[0].rva;
      D.27208 = D.27198 << 8;
      D.27209 = D.27208 & 16711680;
      D.27210 = D.27207 | D.27209;
      D.27198 = assembly->sections[0].rva;
      D.27211 = D.27198 >> 24;
      D.27212 = D.27210 | D.27211;
      header->pe.pe_rva_entry_point = D.27212;
      D.27223 = virtual_base << 24;
      D.27224 = virtual_base >> 8;
      D.27225 = D.27224 & 65280;
      D.27226 = D.27223 | D.27225;
      D.27227 = virtual_base << 8;
      D.27228 = D.27227 & 16711680;
      D.27229 = D.27226 | D.27228;
      D.27230 = virtual_base >> 24;
      D.27231 = D.27229 | D.27230;
      header->nt.pe_image_base = D.27231;
      header->nt.pe_section_align = 2097152;
      header->nt.pe_file_alignment = 131072;
      header->nt.pe_os_major = 1024;
      header->nt.pe_os_minor = 0;
      header->nt.pe_subsys_major = 1024;
      size = section_start;
      size = size + 511;
      size = size & 4294966784;
      D.27189 = size << 24;
      D.27190 = size >> 8;
      D.27191 = D.27190 & 65280;
      D.27192 = D.27189 | D.27191;
      D.27193 = size << 8;
      D.27194 = D.27193 & 16711680;
      D.27195 = D.27192 | D.27194;
      D.27196 = size >> 24;
      D.27197 = D.27195 | D.27196;
      header->nt.pe_header_size = D.27197;
      size = image_size;
      size = size + 8191;
      size = size & 4294959104;
      D.27189 = size << 24;
      D.27190 = size >> 8;
      D.27191 = D.27190 & 65280;
      D.27192 = D.27189 | D.27191;
      D.27193 = size << 8;
      D.27194 = D.27193 & 16711680;
      D.27195 = D.27192 | D.27194;
      D.27196 = size >> 24;
      D.27197 = D.27195 | D.27196;
      header->nt.pe_image_size = D.27197;
      {
        short int kind;

        D.27185 = assemblyb->pekind;
        if (D.27185 == 3) goto <D.27232>; else goto <D.27233>;
        <D.27232>:
        kind = 2;
        goto <D.27234>;
        <D.27233>:
        kind = 3;
        <D.27234>:
        kind.149 = (short unsigned int) kind;
        D.27236 = kind.149 >> 8;
        D.27237 = (signed short) D.27236;
        kind.149 = (short unsigned int) kind;
        D.27238 = (int) kind.149;
        D.27239 = D.27238 << 8;
        D.27240 = (signed short) D.27239;
        D.27241 = D.27237 | D.27240;
        D.27242 = (short unsigned int) D.27241;
        header->nt.pe_subsys_required = D.27242;
      }
      header->nt.pe_stack_reserve = 4096;
      header->nt.pe_stack_commit = 1048576;
      header->nt.pe_heap_reserve = 4096;
      header->nt.pe_heap_commit = 1048576;
      header->nt.pe_loader_flags = 0;
      header->nt.pe_data_dir_count = 268435456;
      D.27243 = assembly->sections[1].size;
      D.27244 = D.27243 << 24;
      D.27243 = assembly->sections[1].size;
      D.27245 = D.27243 >> 8;
      D.27246 = D.27245 & 65280;
      D.27247 = D.27244 | D.27246;
      D.27243 = assembly->sections[1].size;
      D.27248 = D.27243 << 8;
      D.27249 = D.27248 & 16711680;
      D.27250 = D.27247 | D.27249;
      D.27243 = assembly->sections[1].size;
      D.27251 = D.27243 >> 24;
      D.27252 = D.27250 | D.27251;
      header->datadir.pe_resource_table.size = D.27252;
      D.27213 = assembly->sections[1].rva;
      D.27214 = D.27213 << 24;
      D.27213 = assembly->sections[1].rva;
      D.27215 = D.27213 >> 8;
      D.27216 = D.27215 & 65280;
      D.27217 = D.27214 | D.27216;
      D.27213 = assembly->sections[1].rva;
      D.27218 = D.27213 << 8;
      D.27219 = D.27218 & 16711680;
      D.27220 = D.27217 | D.27219;
      D.27213 = assembly->sections[1].rva;
      D.27221 = D.27213 >> 24;
      D.27222 = D.27220 | D.27221;
      header->datadir.pe_resource_table.rva = D.27222;
      D.27253 = assembly->sections[2].size;
      D.27254 = D.27253 << 24;
      D.27253 = assembly->sections[2].size;
      D.27255 = D.27253 >> 8;
      D.27256 = D.27255 & 65280;
      D.27257 = D.27254 | D.27256;
      D.27253 = assembly->sections[2].size;
      D.27258 = D.27253 << 8;
      D.27259 = D.27258 & 16711680;
      D.27260 = D.27257 | D.27259;
      D.27253 = assembly->sections[2].size;
      D.27261 = D.27253 >> 24;
      D.27262 = D.27260 | D.27261;
      header->datadir.pe_reloc_table.size = D.27262;
      D.27263 = assembly->sections[2].rva;
      D.27264 = D.27263 << 24;
      D.27263 = assembly->sections[2].rva;
      D.27265 = D.27263 >> 8;
      D.27266 = D.27265 & 65280;
      D.27267 = D.27264 | D.27266;
      D.27263 = assembly->sections[2].rva;
      D.27268 = D.27263 << 8;
      D.27269 = D.27268 & 16711680;
      D.27270 = D.27267 | D.27269;
      D.27263 = assembly->sections[2].rva;
      D.27271 = D.27263 >> 24;
      D.27272 = D.27270 | D.27271;
      header->datadir.pe_reloc_table.rva = D.27272;
      header->datadir.pe_cli_header.size = 1207959552;
      D.27273 = assembly->text_rva;
      D.27274 = assembly->cli_header_offset;
      D.27275 = D.27273 + D.27274;
      D.27276 = D.27275 << 24;
      D.27273 = assembly->text_rva;
      D.27274 = assembly->cli_header_offset;
      D.27275 = D.27273 + D.27274;
      D.27277 = D.27275 >> 8;
      D.27278 = D.27277 & 65280;
      D.27279 = D.27276 | D.27278;
      D.27273 = assembly->text_rva;
      D.27274 = assembly->cli_header_offset;
      D.27275 = D.27273 + D.27274;
      D.27280 = D.27275 << 8;
      D.27281 = D.27280 & 16711680;
      D.27282 = D.27279 | D.27281;
      D.27273 = assembly->text_rva;
      D.27274 = assembly->cli_header_offset;
      D.27275 = D.27273 + D.27274;
      D.27283 = D.27275 >> 24;
      D.27284 = D.27282 | D.27283;
      header->datadir.pe_cli_header.rva = D.27284;
      header->datadir.pe_iat.size = 134217728;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27287 = D.27286 << 24;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27288 = D.27286 >> 8;
      D.27289 = D.27288 & 65280;
      D.27290 = D.27287 | D.27289;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27291 = D.27286 << 8;
      D.27292 = D.27291 & 16711680;
      D.27293 = D.27290 | D.27292;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27294 = D.27286 >> 24;
      D.27295 = D.27293 | D.27294;
      header->datadir.pe_iat.rva = D.27295;
      D.27185 = assemblyb->pekind;
      if (D.27185 == 1) goto <D.27296>; else goto <D.27297>;
      <D.27296>:
      D.27298 = assembly->code.data;
      D.27299 = assembly->imp_names_offset;
      D.27300 = (sizetype) D.27299;
      D.27301 = D.27300 + 2;
      D.27302 = D.27298 + D.27301;
      memcpy (D.27302, "_CorDllMain", 12);
      goto <D.27303>;
      <D.27297>:
      D.27298 = assembly->code.data;
      D.27299 = assembly->imp_names_offset;
      D.27300 = (sizetype) D.27299;
      D.27301 = D.27300 + 2;
      D.27302 = D.27298 + D.27301;
      memcpy (D.27302, "_CorExeMain", 12);
      <D.27303>:
      D.27298 = assembly->code.data;
      D.27285 = assembly->iat_offset;
      D.27304 = (sizetype) D.27285;
      rva = D.27298 + D.27304;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27306 = D.27305 << 24;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27307 = D.27305 >> 8;
      D.27308 = D.27307 & 65280;
      D.27309 = D.27306 | D.27308;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27310 = D.27305 << 8;
      D.27311 = D.27310 & 16711680;
      D.27312 = D.27309 | D.27311;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27313 = D.27305 >> 24;
      D.27314 = D.27312 | D.27313;
      *rva = D.27314;
      header->datadir.pe_import_table.size = 1325400064;
      D.27273 = assembly->text_rva;
      D.27315 = assembly->idt_offset;
      D.27316 = D.27273 + D.27315;
      D.27317 = D.27316 << 24;
      D.27273 = assembly->text_rva;
      D.27315 = assembly->idt_offset;
      D.27316 = D.27273 + D.27315;
      D.27318 = D.27316 >> 8;
      D.27319 = D.27318 & 65280;
      D.27320 = D.27317 | D.27319;
      D.27273 = assembly->text_rva;
      D.27315 = assembly->idt_offset;
      D.27316 = D.27273 + D.27315;
      D.27321 = D.27316 << 8;
      D.27322 = D.27321 & 16711680;
      D.27323 = D.27320 | D.27322;
      D.27273 = assembly->text_rva;
      D.27315 = assembly->idt_offset;
      D.27316 = D.27273 + D.27315;
      D.27324 = D.27316 >> 24;
      D.27325 = D.27323 | D.27324;
      header->datadir.pe_import_table.rva = D.27325;
      D.27298 = assembly->code.data;
      D.27315 = assembly->idt_offset;
      D.27326 = (sizetype) D.27315;
      D.27327 = D.27326 + 12;
      rva = D.27298 + D.27327;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27328 = D.27305 + 14;
      D.27329 = D.27328 << 24;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27328 = D.27305 + 14;
      D.27330 = D.27328 >> 8;
      D.27331 = D.27330 & 65280;
      D.27332 = D.27329 | D.27331;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27328 = D.27305 + 14;
      D.27333 = D.27328 << 8;
      D.27334 = D.27333 & 16711680;
      D.27335 = D.27332 | D.27334;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      D.27305 = D.27273 + D.27299;
      D.27328 = D.27305 + 14;
      D.27336 = D.27328 >> 24;
      D.27337 = D.27335 | D.27336;
      *rva = D.27337;
      D.27298 = assembly->code.data;
      D.27315 = assembly->idt_offset;
      D.27326 = (sizetype) D.27315;
      D.27338 = D.27326 + 16;
      rva = D.27298 + D.27338;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27287 = D.27286 << 24;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27288 = D.27286 >> 8;
      D.27289 = D.27288 & 65280;
      D.27290 = D.27287 | D.27289;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27291 = D.27286 << 8;
      D.27292 = D.27291 & 16711680;
      D.27293 = D.27290 | D.27292;
      D.27273 = assembly->text_rva;
      D.27285 = assembly->iat_offset;
      D.27286 = D.27273 + D.27285;
      D.27294 = D.27286 >> 24;
      D.27295 = D.27293 | D.27294;
      *rva = D.27295;
      D.27298 = assembly->code.data;
      D.27315 = assembly->idt_offset;
      D.27326 = (sizetype) D.27315;
      rva = D.27298 + D.27326;
      D.27273 = assembly->text_rva;
      D.27339 = assembly->ilt_offset;
      D.27340 = D.27273 + D.27339;
      D.27341 = D.27340 << 24;
      D.27273 = assembly->text_rva;
      D.27339 = assembly->ilt_offset;
      D.27340 = D.27273 + D.27339;
      D.27342 = D.27340 >> 8;
      D.27343 = D.27342 & 65280;
      D.27344 = D.27341 | D.27343;
      D.27273 = assembly->text_rva;
      D.27339 = assembly->ilt_offset;
      D.27340 = D.27273 + D.27339;
      D.27345 = D.27340 << 8;
      D.27346 = D.27345 & 16711680;
      D.27347 = D.27344 | D.27346;
      D.27273 = assembly->text_rva;
      D.27339 = assembly->ilt_offset;
      D.27340 = D.27273 + D.27339;
      D.27348 = D.27340 >> 24;
      D.27349 = D.27347 | D.27348;
      *rva = D.27349;
      D.27298 = assembly->code.data;
      D.27339 = assembly->ilt_offset;
      D.27350 = (sizetype) D.27339;
      p = D.27298 + D.27350;
      D.27273 = assembly->text_rva;
      D.27299 = assembly->imp_names_offset;
      value = D.27273 + D.27299;
      p.150 = p;
      p = p.150 + 1;
      D.27352 = (unsigned char) value;
      *p.150 = D.27352;
      p.151 = p;
      p = p.151 + 1;
      D.27354 = value >> 8;
      D.27355 = (unsigned char) D.27354;
      *p.151 = D.27355;
      p.152 = p;
      p = p.152 + 1;
      D.27357 = value >> 16;
      D.27358 = (unsigned char) D.27357;
      *p.152 = D.27358;
      p.153 = p;
      p = p.153 + 1;
      D.27360 = value >> 24;
      D.27361 = (unsigned char) D.27360;
      *p.153 = D.27361;
      D.27298 = assembly->code.data;
      D.27274 = assembly->cli_header_offset;
      D.27362 = (sizetype) D.27274;
      cli_header = D.27298 + D.27362;
      cli_header->ch_size = 1207959552;
      cli_header->ch_runtime_major = 512;
      cli_header->ch_runtime_minor = 1280;
      D.27117 = assemblyb->pe_kind;
      D.27363 = (unsigned int) D.27117;
      D.27364 = D.27363 << 24;
      D.27117 = assemblyb->pe_kind;
      D.27363 = (unsigned int) D.27117;
      D.27365 = D.27363 >> 8;
      D.27366 = D.27365 & 65280;
      D.27367 = D.27364 | D.27366;
      D.27117 = assemblyb->pe_kind;
      D.27363 = (unsigned int) D.27117;
      D.27368 = D.27363 << 8;
      D.27369 = D.27368 & 16711680;
      D.27370 = D.27367 | D.27369;
      D.27117 = assemblyb->pe_kind;
      D.27363 = (unsigned int) D.27117;
      D.27371 = D.27363 >> 24;
      D.27372 = D.27370 | D.27371;
      cli_header->ch_flags = D.27372;
      D.27373 = assemblyb->entry_point;
      if (D.27373 != 0B) goto <D.27374>; else goto <D.27375>;
      <D.27374>:
      {
        guint32 table_idx;

        table_idx = 0;
        D.27373 = assemblyb->entry_point;
        D.27376 = D.27373->object.vtable;
        D.27377 = D.27376->klass;
        D.27378 = D.27377->name;
        D.27379 = strcmp (D.27378, "MethodBuilder");
        if (D.27379 == 0) goto <D.27380>; else goto <D.27381>;
        <D.27380>:
        {
          struct MonoReflectionMethodBuilder * methodb;

          methodb = assemblyb->entry_point;
          table_idx = methodb->table_idx;
        }
        goto <D.27382>;
        <D.27381>:
        D.27383 = assembly->method_to_table_idx;
        D.27373 = assemblyb->entry_point;
        D.27384 = D.27373->method;
        D.27385 = monoeg_g_hash_table_lookup (D.27383, D.27384);
        D.27386 = (long int) D.27385;
        table_idx = (guint32) D.27386;
        <D.27382>:
        D.27387 = table_idx << 24;
        D.27388 = table_idx >> 8;
        D.27389 = D.27388 & 65280;
        D.27390 = D.27387 | D.27389;
        D.27391 = table_idx << 8;
        D.27392 = D.27391 & 16711680;
        D.27393 = D.27390 | D.27392;
        D.27394 = table_idx >> 24;
        D.27395 = D.27393 | D.27394;
        D.27396 = D.27395 | 6;
        cli_header->ch_entry_point = D.27396;
      }
      goto <D.27397>;
      <D.27375>:
      cli_header->ch_entry_point = 0;
      <D.27397>:
      D.27273 = assembly->text_rva;
      D.27398 = assembly->code.index;
      text_offset = D.27273 + D.27398;
      D.27399 = text_offset << 24;
      D.27400 = text_offset >> 8;
      D.27401 = D.27400 & 65280;
      D.27402 = D.27399 | D.27401;
      D.27403 = text_offset << 8;
      D.27404 = D.27403 & 16711680;
      D.27405 = D.27402 | D.27404;
      D.27406 = text_offset >> 24;
      D.27407 = D.27405 | D.27406;
      cli_header->ch_resources.rva = D.27407;
      D.27408 = assembly->resources.index;
      D.27409 = D.27408 << 24;
      D.27408 = assembly->resources.index;
      D.27410 = D.27408 >> 8;
      D.27411 = D.27410 & 65280;
      D.27412 = D.27409 | D.27411;
      D.27408 = assembly->resources.index;
      D.27413 = D.27408 << 8;
      D.27414 = D.27413 & 16711680;
      D.27415 = D.27412 | D.27414;
      D.27408 = assembly->resources.index;
      D.27416 = D.27408 >> 24;
      D.27417 = D.27415 | D.27416;
      cli_header->ch_resources.size = D.27417;
      D.27408 = assembly->resources.index;
      text_offset = D.27408 + text_offset;
      D.27399 = text_offset << 24;
      D.27400 = text_offset >> 8;
      D.27401 = D.27400 & 65280;
      D.27402 = D.27399 | D.27401;
      D.27403 = text_offset << 8;
      D.27404 = D.27403 & 16711680;
      D.27405 = D.27402 | D.27404;
      D.27406 = text_offset >> 24;
      D.27407 = D.27405 | D.27406;
      cli_header->ch_metadata.rva = D.27407;
      D.27418 = assembly->meta_size;
      D.27419 = D.27418 << 24;
      D.27418 = assembly->meta_size;
      D.27420 = D.27418 >> 8;
      D.27421 = D.27420 & 65280;
      D.27422 = D.27419 | D.27421;
      D.27418 = assembly->meta_size;
      D.27423 = D.27418 << 8;
      D.27424 = D.27423 & 16711680;
      D.27425 = D.27422 | D.27424;
      D.27418 = assembly->meta_size;
      D.27426 = D.27418 >> 24;
      D.27427 = D.27425 | D.27426;
      cli_header->ch_metadata.size = D.27427;
      D.27418 = assembly->meta_size;
      text_offset = D.27418 + text_offset;
      D.27428 = assembly->strong_name_size;
      if (D.27428 != 0) goto <D.27429>; else goto <D.27430>;
      <D.27429>:
      D.27399 = text_offset << 24;
      D.27400 = text_offset >> 8;
      D.27401 = D.27400 & 65280;
      D.27402 = D.27399 | D.27401;
      D.27403 = text_offset << 8;
      D.27404 = D.27403 & 16711680;
      D.27405 = D.27402 | D.27404;
      D.27406 = text_offset >> 24;
      D.27407 = D.27405 | D.27406;
      cli_header->ch_strong_name.rva = D.27407;
      D.27428 = assembly->strong_name_size;
      D.27431 = D.27428 << 24;
      D.27428 = assembly->strong_name_size;
      D.27432 = D.27428 >> 8;
      D.27433 = D.27432 & 65280;
      D.27434 = D.27431 | D.27433;
      D.27428 = assembly->strong_name_size;
      D.27435 = D.27428 << 8;
      D.27436 = D.27435 & 16711680;
      D.27437 = D.27434 | D.27436;
      D.27428 = assembly->strong_name_size;
      D.27438 = D.27428 >> 24;
      D.27439 = D.27437 | D.27438;
      cli_header->ch_strong_name.size = D.27439;
      D.27428 = assembly->strong_name_size;
      text_offset = D.27428 + text_offset;
      <D.27430>:
      D.27150 = pefile->data;
      D.27440 = (sizetype) section_start;
      section = D.27150 + D.27440;
      i = 0;
      goto <D.20613>;
      <D.20612>:
      {
        static const char section_names[3][7] = {".text", ".rsrc", ".reloc"};

        D.27144 = assembly->sections[i].size;
        if (D.27144 == 0) goto <D.27441>; else goto <D.27442>;
        <D.27441>:
        // predicted unlikely by continue predictor.
        goto <D.20611>;
        <D.27442>:
        D.27443 = &section->st_name;
        D.27444 = &section_names[i];
        strcpy (D.27443, D.27444);
        D.27445 = assembly->sections[i].rva;
        D.27446 = D.27445 << 24;
        D.27445 = assembly->sections[i].rva;
        D.27447 = D.27445 >> 8;
        D.27448 = D.27447 & 65280;
        D.27449 = D.27446 | D.27448;
        D.27445 = assembly->sections[i].rva;
        D.27450 = D.27445 << 8;
        D.27451 = D.27450 & 16711680;
        D.27452 = D.27449 | D.27451;
        D.27445 = assembly->sections[i].rva;
        D.27453 = D.27445 >> 24;
        D.27454 = D.27452 | D.27453;
        section->st_virtual_address = D.27454;
        D.27144 = assembly->sections[i].size;
        D.27455 = D.27144 << 24;
        D.27144 = assembly->sections[i].size;
        D.27456 = D.27144 >> 8;
        D.27457 = D.27456 & 65280;
        D.27458 = D.27455 | D.27457;
        D.27144 = assembly->sections[i].size;
        D.27459 = D.27144 << 8;
        D.27460 = D.27459 & 16711680;
        D.27461 = D.27458 | D.27460;
        D.27144 = assembly->sections[i].size;
        D.27462 = D.27144 >> 24;
        D.27463 = D.27461 | D.27462;
        section->st_virtual_size = D.27463;
        D.27464 = section->st_virtual_size;
        D.27465 = D.27464 << 24;
        D.27464 = section->st_virtual_size;
        D.27466 = D.27464 >> 8;
        D.27467 = D.27466 & 65280;
        D.27468 = D.27465 | D.27467;
        D.27464 = section->st_virtual_size;
        D.27469 = D.27464 << 8;
        D.27470 = D.27469 & 16711680;
        D.27471 = D.27468 | D.27470;
        D.27464 = section->st_virtual_size;
        D.27472 = D.27464 >> 24;
        D.27473 = D.27471 | D.27472;
        D.27474 = D.27473 + 511;
        D.27475 = D.27474 << 24;
        D.27464 = section->st_virtual_size;
        D.27465 = D.27464 << 24;
        D.27464 = section->st_virtual_size;
        D.27466 = D.27464 >> 8;
        D.27467 = D.27466 & 65280;
        D.27468 = D.27465 | D.27467;
        D.27464 = section->st_virtual_size;
        D.27469 = D.27464 << 8;
        D.27470 = D.27469 & 16711680;
        D.27471 = D.27468 | D.27470;
        D.27464 = section->st_virtual_size;
        D.27472 = D.27464 >> 24;
        D.27473 = D.27471 | D.27472;
        D.27474 = D.27473 + 511;
        D.27476 = D.27474 >> 8;
        D.27477 = D.27476 & 65280;
        D.27478 = D.27475 | D.27477;
        D.27464 = section->st_virtual_size;
        D.27465 = D.27464 << 24;
        D.27464 = section->st_virtual_size;
        D.27466 = D.27464 >> 8;
        D.27467 = D.27466 & 65280;
        D.27468 = D.27465 | D.27467;
        D.27464 = section->st_virtual_size;
        D.27469 = D.27464 << 8;
        D.27470 = D.27469 & 16711680;
        D.27471 = D.27468 | D.27470;
        D.27464 = section->st_virtual_size;
        D.27472 = D.27464 >> 24;
        D.27473 = D.27471 | D.27472;
        D.27474 = D.27473 + 511;
        D.27479 = D.27474 << 8;
        D.27480 = D.27479 & 16711680;
        D.27481 = D.27478 | D.27480;
        D.27464 = section->st_virtual_size;
        D.27465 = D.27464 << 24;
        D.27464 = section->st_virtual_size;
        D.27466 = D.27464 >> 8;
        D.27467 = D.27466 & 65280;
        D.27468 = D.27465 | D.27467;
        D.27464 = section->st_virtual_size;
        D.27469 = D.27464 << 8;
        D.27470 = D.27469 & 16711680;
        D.27471 = D.27468 | D.27470;
        D.27464 = section->st_virtual_size;
        D.27472 = D.27464 >> 24;
        D.27473 = D.27471 | D.27472;
        D.27474 = D.27473 + 511;
        D.27482 = D.27474 >> 24;
        D.27483 = D.27481 | D.27482;
        section->st_raw_data_size = D.27483;
        D.27484 = section->st_raw_data_size;
        D.27485 = D.27484 & 16711679;
        section->st_raw_data_size = D.27485;
        D.27486 = assembly->sections[i].offset;
        D.27487 = D.27486 << 24;
        D.27486 = assembly->sections[i].offset;
        D.27488 = D.27486 >> 8;
        D.27489 = D.27488 & 65280;
        D.27490 = D.27487 | D.27489;
        D.27486 = assembly->sections[i].offset;
        D.27491 = D.27486 << 8;
        D.27492 = D.27491 & 16711680;
        D.27493 = D.27490 | D.27492;
        D.27486 = assembly->sections[i].offset;
        D.27494 = D.27486 >> 24;
        D.27495 = D.27493 | D.27494;
        section->st_raw_data_ptr = D.27495;
        D.27496 = assembly->sections[i].attrs;
        D.27497 = D.27496 << 24;
        D.27496 = assembly->sections[i].attrs;
        D.27498 = D.27496 >> 8;
        D.27499 = D.27498 & 65280;
        D.27500 = D.27497 | D.27499;
        D.27496 = assembly->sections[i].attrs;
        D.27501 = D.27496 << 8;
        D.27502 = D.27501 & 16711680;
        D.27503 = D.27500 | D.27502;
        D.27496 = assembly->sections[i].attrs;
        D.27504 = D.27496 >> 24;
        D.27505 = D.27503 | D.27504;
        section->st_flags = D.27505;
        section = section + 40;
      }
      <D.20611>:
      i = i + 1;
      <D.20613>:
      if (i <= 2) goto <D.20612>; else goto <D.20614>;
      <D.20614>:
      D.27150 = pefile->data;
      D.27506 = pefile->index;
      checked_write_file (file, D.27150, D.27506);
      mono_dynamic_stream_reset (pefile);
      i = 0;
      goto <D.20629>;
      <D.20628>:
      D.27144 = assembly->sections[i].size;
      if (D.27144 == 0) goto <D.27507>; else goto <D.27508>;
      <D.27507>:
      // predicted unlikely by continue predictor.
      goto <D.20615>;
      <D.27508>:
      D.27486 = assembly->sections[i].offset;
      D.27509 = (int) D.27486;
      D.27510 = SetFilePointer (file, D.27509, 0B, 0);
      if (D.27510 == 4294967295) goto <D.27511>; else goto <D.27512>;
      <D.27511>:
      D.27513 = GetLastError ();
      monoeg_g_log (0B, 4, "SetFilePointer returned %d\n", D.27513);
      <D.20616>:
      goto <D.20616>;
      <D.27512>:
      switch (i) <default: <D.20627>, case 0: <D.20617>, case 1: <D.20626>, case 2: <D.20619>>
      <D.20617>:
      D.27298 = assembly->code.data;
      p = D.27298 + 2;
      D.27273 = assembly->text_rva;
      D.27514 = D.27273 + virtual_base;
      D.27285 = assembly->iat_offset;
      value = D.27514 + D.27285;
      p.154 = p;
      p = p.154 + 1;
      D.27352 = (unsigned char) value;
      *p.154 = D.27352;
      p.155 = p;
      p = p.155 + 1;
      D.27354 = value >> 8;
      D.27355 = (unsigned char) D.27354;
      *p.155 = D.27355;
      p.156 = p;
      p = p.156 + 1;
      D.27357 = value >> 16;
      D.27358 = (unsigned char) D.27357;
      *p.156 = D.27358;
      p.157 = p;
      p = p.157 + 1;
      D.27360 = value >> 24;
      D.27361 = (unsigned char) D.27360;
      *p.157 = D.27361;
      D.27298 = assembly->code.data;
      D.27398 = assembly->code.index;
      checked_write_file (file, D.27298, D.27398);
      D.27519 = assembly->resources.data;
      D.27408 = assembly->resources.index;
      checked_write_file (file, D.27519, D.27408);
      D.27520 = assembly->image.raw_metadata;
      D.27418 = assembly->meta_size;
      checked_write_file (file, D.27520, D.27418);
      D.27521 = assembly->strong_name;
      D.27428 = assembly->strong_name_size;
      checked_write_file (file, D.27521, D.27428);
      D.27520 = assembly->image.raw_metadata;
      monoeg_g_free (D.27520);
      goto <D.20618>;
      <D.20619>:
      {
        typedef struct 
      {
        guint32 page_rva;
        guint32 block_size;
        guint16 type_and_offset;
        guint16 term;
      } struct struct 
      {
        guint32 page_rva;
        guint32 block_size;
        guint16 type_and_offset;
        guint16 term;
      };
        struct 
      {
        guint32 page_rva;
        guint32 block_size;
        guint16 type_and_offset;
        guint16 term;
      } reloc;

        try
          {
            if (0 != 0) goto <D.27522>; else goto <D.27523>;
            <D.27522>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5935, "sizeof (reloc) == 12");
            <D.27523>:
            D.27273 = assembly->text_rva;
            D.27524 = D.27273 << 24;
            D.27273 = assembly->text_rva;
            D.27525 = D.27273 >> 8;
            D.27526 = D.27525 & 65280;
            D.27527 = D.27524 | D.27526;
            D.27273 = assembly->text_rva;
            D.27528 = D.27273 << 8;
            D.27529 = D.27528 & 16711680;
            D.27530 = D.27527 | D.27529;
            D.27273 = assembly->text_rva;
            D.27531 = D.27273 >> 24;
            D.27532 = D.27530 | D.27531;
            reloc.page_rva = D.27532;
            reloc.block_size = 201326592;
            reloc.type_and_offset = 560;
            reloc.term = 0;
            checked_write_file (file, &reloc, 12);
            goto <D.20618>;
          }
        finally
          {
            reloc = {CLOBBER};
          }
      }
      <D.20626>:
      D.27533 = assembly->win32_res;
      if (D.27533 != 0B) goto <D.27534>; else goto <D.27535>;
      <D.27534>:
      D.27533 = assembly->win32_res;
      D.27533 = assembly->win32_res;
      D.27445 = assembly->sections[i].rva;
      fixup_resource_directory (D.27533, D.27533, D.27445);
      D.27533 = assembly->win32_res;
      D.27536 = assembly->win32_res_size;
      checked_write_file (file, D.27533, D.27536);
      <D.27535>:
      goto <D.20618>;
      <D.20627>:
      monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 5961);
      <D.20618>:
      <D.20615>:
      i = i + 1;
      <D.20629>:
      if (i <= 2) goto <D.20628>; else goto <D.20630>;
      <D.20630>:
      file_offset.158 = (int) file_offset;
      D.27538 = SetFilePointer (file, file_offset.158, 0B, 0);
      if (D.27538 == 4294967295) goto <D.27539>; else goto <D.27540>;
      <D.27539>:
      D.27541 = GetLastError ();
      monoeg_g_log (0B, 4, "SetFilePointer returned %d\n", D.27541);
      <D.20631>:
      goto <D.20631>;
      <D.27540>:
      D.27542 = SetEndOfFile (file);
      if (D.27542 == 0) goto <D.27543>; else goto <D.27544>;
      <D.27543>:
      D.27545 = GetLastError ();
      monoeg_g_log (0B, 4, "SetEndOfFile returned %d\n", D.27545);
      <D.20632>:
      goto <D.20632>;
      <D.27544>:
      D.27546 = &assembly->code;
      mono_dynamic_stream_reset (D.27546);
      D.27547 = &assembly->us;
      mono_dynamic_stream_reset (D.27547);
      D.27548 = &assembly->blob;
      mono_dynamic_stream_reset (D.27548);
      D.27549 = &assembly->guid;
      mono_dynamic_stream_reset (D.27549);
      D.27550 = &assembly->sheap;
      mono_dynamic_stream_reset (D.27550);
      D.27551 = assembly->blob_cache;
      monoeg_g_hash_table_foreach (D.27551, monoeg_g_free, 0B);
      D.27551 = assembly->blob_cache;
      monoeg_g_hash_table_destroy (D.27551);
      assembly->blob_cache = 0B;
    }
  finally
    {
      pefile_stream = {CLOBBER};
    }
}


assembly_add_resource (struct MonoReflectionModuleBuilder * mb, struct MonoDynamicImage * assembly, struct MonoReflectionResource * rsrc)
{
  struct MonoString * D.27554;
  unsigned int D.27557;
  unsigned int D.27558;
  guint32 * D.27559;
  unsigned int D.27560;
  unsigned int D.27561;
  long unsigned int D.27562;
  long unsigned int D.27563;
  guint32 * D.27564;
  struct MonoDynamicStream * D.27565;
  unsigned int D.27566;
  char * b.159;
  guint32 * D.27568;
  struct MonoDynamicStream * D.27569;
  long int b.160;
  long int blob_size.161;
  long int D.27572;
  unsigned int D.27573;
  unsigned int D.27574;
  unsigned int idx.162;
  unsigned int D.27576;
  struct MonoArray * D.27578;
  long unsigned int D.27581;
  char D.27583;
  unsigned int D.27584;
  char D.27585;
  unsigned int D.27586;
  char D.27587;
  unsigned int D.27588;
  char D.27589;
  struct MonoDynamicStream * D.27590;
  unsigned int D.27591;
  int D.27592;
  struct MonoDynamicTable * table;
  guint32 * values;
  char blob_size[6];
  guchar hash[20];
  char * b;
  char * name;
  char * sname;
  guint32 idx;
  guint32 offset;

  try
    {
      b = &blob_size;
      D.27554 = rsrc->filename;
      if (D.27554 != 0B) goto <D.27555>; else goto <D.27556>;
      <D.27555>:
      D.27554 = rsrc->filename;
      name = mono_string_to_utf8 (D.27554);
      sname = monoeg_g_path_get_basename (name);
      table = &assembly->tables[38];
      D.27557 = table->rows;
      D.27558 = D.27557 + 1;
      table->rows = D.27558;
      D.27557 = table->rows;
      alloc_table (table, D.27557);
      D.27559 = table->values;
      D.27560 = table->next_idx;
      D.27561 = D.27560 * 3;
      D.27562 = (long unsigned int) D.27561;
      D.27563 = D.27562 * 4;
      values = D.27559 + D.27563;
      *values = 1;
      D.27564 = values + 4;
      D.27565 = &assembly->sheap;
      D.27566 = string_heap_insert (D.27565, sname);
      *D.27564 = D.27566;
      monoeg_g_free (sname);
      mono_sha1_get_digest_from_file (name, &hash);
      b.159 = b;
      mono_metadata_encode_value (20, b.159, &b);
      D.27568 = values + 8;
      D.27569 = &assembly->blob;
      b.159 = b;
      b.160 = (long int) b.159;
      blob_size.161 = (long int) &blob_size;
      D.27572 = b.160 - blob_size.161;
      D.27573 = (unsigned int) D.27572;
      D.27574 = mono_image_add_stream_data (D.27569, &blob_size, D.27573);
      *D.27568 = D.27574;
      D.27569 = &assembly->blob;
      mono_image_add_stream_data (D.27569, &hash, 20);
      monoeg_g_free (name);
      D.27560 = table->next_idx;
      idx.162 = D.27560;
      D.27576 = idx.162 + 1;
      table->next_idx = D.27576;
      idx = idx.162;
      rsrc->offset = 0;
      idx = idx << 2;
      goto <D.27577>;
      <D.27556>:
      {
        char sizebuf[4];
        char * data;
        guint len;

        try
          {
            D.27578 = rsrc->data;
            if (D.27578 != 0B) goto <D.27579>; else goto <D.27580>;
            <D.27579>:
            D.27578 = rsrc->data;
            data = mono_array_addr_with_size (D.27578, 1, 0);
            D.27578 = rsrc->data;
            D.27581 = mono_array_length (D.27578);
            len = (guint) D.27581;
            goto <D.27582>;
            <D.27580>:
            data = 0B;
            len = 0;
            <D.27582>:
            offset = len;
            D.27583 = (char) offset;
            sizebuf[0] = D.27583;
            D.27584 = offset >> 8;
            D.27585 = (char) D.27584;
            sizebuf[1] = D.27585;
            D.27586 = offset >> 16;
            D.27587 = (char) D.27586;
            sizebuf[2] = D.27587;
            D.27588 = offset >> 24;
            D.27589 = (char) D.27588;
            sizebuf[3] = D.27589;
            D.27590 = &assembly->resources;
            D.27591 = mono_image_add_stream_data (D.27590, &sizebuf, 4);
            rsrc->offset = D.27591;
            D.27590 = &assembly->resources;
            mono_image_add_stream_data (D.27590, data, len);
            D.27592 = mb->is_main;
            if (D.27592 == 0) goto <D.27593>; else goto <D.27594>;
            <D.27593>:
            return;
            <D.27594>:
            idx = 0;
          }
        finally
          {
            sizebuf = {CLOBBER};
          }
      }
      <D.27577>:
      assembly_add_resource_manifest (mb, assembly, rsrc, idx);
    }
  finally
    {
      blob_size = {CLOBBER};
      hash = {CLOBBER};
      b = {CLOBBER};
    }
}


build_compressed_metadata (struct MonoDynamicImage * assembly)
{
  struct GPtrArray * D.27600;
  void * * D.27601;
  unsigned int D.27602;
  long unsigned int D.27603;
  long unsigned int D.27604;
  long unsigned int D.27605;
  void * * D.27606;
  unsigned int i.163;
  struct MonoDynamicStream * D.27608;
  struct MonoDynamicStream * D.27609;
  struct MonoDynamicStream * D.27610;
  struct MonoDynamicStream * D.27611;
  struct MonoDynamicStream * D.27612;
  unsigned int D.27613;
  _Bool D.27614;
  unsigned int D.27615;
  _Bool D.27616;
  unsigned int D.27617;
  _Bool D.27618;
  unsigned int D.27619;
  unsigned int D.27620;
  <unnamed-unsigned:24> D.27621;
  <unnamed-unsigned:24> D.27622;
  long unsigned int D.27625;
  guint32 * D.27626;
  int D.27627;
  unsigned char D.27628;
  unsigned char D.27629;
  int D.27630;
  int D.27631;
  int D.27632;
  unsigned int D.27633;
  unsigned int D.27634;
  long unsigned int D.27635;
  void * D.27636;
  unsigned char * p.164;
  unsigned char * p.165;
  unsigned char * p.166;
  unsigned char * p.167;
  guint16 * int16val.168;
  short int D.27642;
  short unsigned int D.27643;
  short unsigned int D.27644;
  signed short D.27645;
  int D.27646;
  int D.27647;
  signed short D.27648;
  signed short D.27649;
  short unsigned int D.27650;
  short int D.27651;
  short unsigned int D.27652;
  short unsigned int D.27653;
  signed short D.27654;
  int D.27655;
  int D.27656;
  signed short D.27657;
  signed short D.27658;
  short unsigned int D.27659;
  char * D.27660;
  long unsigned int D.27661;
  unsigned int D.27662;
  unsigned int D.27663;
  unsigned int D.27664;
  unsigned int D.27665;
  long unsigned int D.27666;
  unsigned int D.27667;
  unsigned int D.27668;
  unsigned int D.27669;
  unsigned int D.27670;
  unsigned int D.27671;
  long unsigned int D.27672;
  unsigned int D.27673;
  unsigned int D.27674;
  unsigned int D.27675;
  unsigned int D.27676;
  unsigned int D.27677;
  long unsigned int D.27678;
  unsigned int D.27679;
  unsigned int D.27680;
  unsigned int D.27681;
  unsigned int D.27682;
  unsigned int D.27683;
  long unsigned int D.27684;
  unsigned int D.27685;
  unsigned int D.27686;
  unsigned int D.27687;
  unsigned int D.27688;
  unsigned int D.27689;
  unsigned int D.27690;
  unsigned int D.27691;
  unsigned int D.27692;
  unsigned int D.27693;
  unsigned int D.27694;
  sizetype D.27695;
  long int p.169;
  char * D.27697;
  long int D.27698;
  long int D.27699;
  unsigned int D.27700;
  unsigned int D.27703;
  sizetype D.27704;
  guint16 * int16val.170;
  unsigned int D.27706;
  struct MonoDynamicStream * D.27707;
  guint32 * int32val.171;
  unsigned int D.27709;
  unsigned int D.27710;
  unsigned int D.27711;
  unsigned int D.27712;
  unsigned int D.27713;
  unsigned int D.27714;
  unsigned int D.27715;
  unsigned int D.27716;
  unsigned int D.27717;
  unsigned int D.27718;
  unsigned int D.27719;
  unsigned int D.27720;
  unsigned int D.27721;
  unsigned int D.27722;
  unsigned int D.27723;
  unsigned int D.27724;
  unsigned int D.27725;
  unsigned int D.27726;
  unsigned int D.27727;
  const char * D.27728;
  long unsigned int D.27729;
  long unsigned int D.27730;
  unsigned int D.27731;
  unsigned int D.27734;
  sizetype D.27735;
  unsigned int D.27736;
  long int D.27737;
  _Bool D.27738;
  long int D.27739;
  long int D.27740;
  sizetype D.27743;
  unsigned char * p.172;
  unsigned char * p.173;
  long unsigned int D.27746;
  long unsigned int D.27747;
  unsigned char D.27750;
  unsigned char D.27751;
  long unsigned int D.27752;
  unsigned char D.27755;
  long unsigned int D.27756;
  unsigned char D.27759;
  unsigned char * p.174;
  guint64 * int64val.175;
  unsigned int D.27762;
  unsigned int D.27763;
  unsigned int D.27764;
  unsigned int D.27765;
  unsigned int D.27766;
  unsigned int D.27767;
  unsigned int D.27768;
  unsigned int D.27769;
  unsigned int D.27770;
  unsigned int D.27771;
  long unsigned int D.27772;
  long unsigned int D.27773;
  long unsigned int D.27774;
  unsigned int D.27775;
  unsigned int D.27776;
  unsigned int D.27777;
  unsigned int D.27778;
  unsigned int D.27779;
  unsigned int D.27780;
  unsigned int D.27781;
  unsigned int D.27782;
  unsigned int D.27783;
  unsigned int D.27784;
  long unsigned int D.27785;
  long unsigned int D.27786;
  guint64 * int64val.176;
  unsigned int D.27788;
  unsigned int D.27789;
  unsigned int D.27790;
  unsigned int D.27791;
  unsigned int D.27792;
  unsigned int D.27793;
  unsigned int D.27794;
  unsigned int D.27795;
  unsigned int D.27796;
  unsigned int D.27797;
  unsigned int D.27798;
  long unsigned int D.27799;
  long unsigned int D.27800;
  long unsigned int D.27801;
  long unsigned int D.27802;
  unsigned int D.27803;
  unsigned int D.27804;
  unsigned int D.27805;
  unsigned int D.27806;
  unsigned int D.27807;
  unsigned int D.27808;
  unsigned int D.27809;
  unsigned int D.27810;
  unsigned int D.27811;
  unsigned int D.27812;
  long unsigned int D.27813;
  long unsigned int D.27814;
  guint32 * int32val.177;
  unsigned int D.27818;
  unsigned int D.27819;
  unsigned int D.27820;
  unsigned int D.27821;
  unsigned int D.27822;
  unsigned int D.27823;
  unsigned int D.27824;
  unsigned int D.27825;
  unsigned int D.27826;
  unsigned int D.27827;
  unsigned int D.27828;
  guint32 * D.27831;
  guint32 * D.27832;
  long unsigned int D.27833;
  guint32 * D.27836;
  guint32 * D.27841;
  unsigned char D.27850;
  unsigned int D.27851;
  unsigned int D.27852;
  int D.27855;
  guint32 * D.27856;
  int D.27857;
  long unsigned int D.27858;
  long unsigned int D.27859;
  int D.27860;
  unsigned int D.27861;
  unsigned int D.27862;
  unsigned int D.27863;
  unsigned char * p.178;
  long unsigned int D.27865;
  long unsigned int D.27866;
  guint32 * D.27867;
  unsigned int D.27868;
  unsigned char D.27869;
  unsigned char * p.179;
  unsigned char * p.180;
  unsigned int D.27872;
  unsigned char D.27873;
  unsigned char * p.181;
  unsigned char * p.182;
  unsigned char * p.183;
  unsigned int D.27877;
  unsigned char D.27878;
  unsigned char * p.184;
  unsigned int D.27880;
  unsigned char D.27881;
  const char * D.27882;
  long int D.27883;
  long int D.27884;
  long int D.27885;
  _Bool D.27886;
  long int D.27887;
  long int D.27888;
  unsigned int D.27891;
  unsigned int D.27892;
  _Bool D.27893;
  long int D.27894;
  long int D.27895;
  unsigned int D.27898;
  sizetype D.27899;
  char * D.27900;
  char * D.27901;
  long unsigned int D.27902;
  unsigned int D.27903;
  sizetype D.27904;
  char * D.27905;
  char * D.27906;
  long unsigned int D.27907;
  unsigned int D.27908;
  sizetype D.27909;
  char * D.27910;
  char * D.27911;
  long unsigned int D.27912;
  sizetype D.27913;
  char * D.27914;
  char * D.27915;
  long unsigned int D.27916;
  struct MonoDynamicTable * table;
  int i;
  guint64 valid_mask;
  guint64 sorted_mask;
  guint32 heapt_size;
  guint32 meta_size;
  guint32 table_offset;
  guint32 ntables;
  guint64 * int64val;
  guint32 * int32val;
  guint16 * int16val;
  struct MonoImage * meta;
  unsigned char * p;
  struct StreamDesc stream_desc[5];

  try
    {
      valid_mask = 0;
      heapt_size = 0;
      meta_size = 256;
      ntables = 0;
      D.27600 = assembly->gen_params;
      D.27601 = D.27600->pdata;
      D.27600 = assembly->gen_params;
      D.27602 = D.27600->len;
      D.27603 = (long unsigned int) D.27602;
      qsort (D.27601, D.27603, 8, compare_genericparam);
      i = 0;
      goto <D.20111>;
      <D.20110>:
      {
        struct GenericParamTableEntry * entry;

        D.27600 = assembly->gen_params;
        D.27601 = D.27600->pdata;
        D.27604 = (long unsigned int) i;
        D.27605 = D.27604 * 8;
        D.27606 = D.27601 + D.27605;
        entry = *D.27606;
        write_generic_param_entry (assembly, entry);
      }
      i = i + 1;
      <D.20111>:
      D.27600 = assembly->gen_params;
      D.27602 = D.27600->len;
      i.163 = (unsigned int) i;
      if (D.27602 > i.163) goto <D.20110>; else goto <D.20112>;
      <D.20112>:
      stream_desc[0].name = "#~";
      D.27608 = &assembly->tstream;
      stream_desc[0].stream = D.27608;
      stream_desc[1].name = "#Strings";
      D.27609 = &assembly->sheap;
      stream_desc[1].stream = D.27609;
      stream_desc[2].name = "#US";
      D.27610 = &assembly->us;
      stream_desc[2].stream = D.27610;
      stream_desc[3].name = "#Blob";
      D.27611 = &assembly->blob;
      stream_desc[3].stream = D.27611;
      stream_desc[4].name = "#GUID";
      D.27612 = &assembly->guid;
      stream_desc[4].stream = D.27612;
      sorted_mask = 6597925534208;
      meta = &assembly->image;
      D.27611 = &assembly->blob;
      pad_heap (D.27611);
      D.27612 = &assembly->guid;
      pad_heap (D.27612);
      D.27609 = &assembly->sheap;
      pad_heap (D.27609);
      D.27610 = &assembly->us;
      pad_heap (D.27610);
      D.27613 = assembly->blob.index;
      D.27614 = D.27613 > 65535;
      meta->idx_blob_wide = D.27614;
      D.27615 = assembly->guid.index;
      D.27616 = D.27615 > 65535;
      meta->idx_guid_wide = D.27616;
      D.27617 = assembly->sheap.index;
      D.27618 = D.27617 > 65535;
      meta->idx_string_wide = D.27618;
      D.27613 = assembly->blob.index;
      meta_size = D.27613 + meta_size;
      D.27615 = assembly->guid.index;
      meta_size = D.27615 + meta_size;
      D.27617 = assembly->sheap.index;
      meta_size = D.27617 + meta_size;
      D.27619 = assembly->us.index;
      meta_size = D.27619 + meta_size;
      i = 0;
      goto <D.20114>;
      <D.20113>:
      D.27620 = assembly->tables[i].rows;
      D.27621 = (<unnamed-unsigned:24>) D.27620;
      meta->tables[i].rows = D.27621;
      i = i + 1;
      <D.20114>:
      if (i <= 44) goto <D.20113>; else goto <D.20115>;
      <D.20115>:
      i = 0;
      goto <D.20118>;
      <D.20117>:
      D.27622 = meta->tables[i].rows;
      if (D.27622 == 0) goto <D.27623>; else goto <D.27624>;
      <D.27623>:
      // predicted unlikely by continue predictor.
      goto <D.20116>;
      <D.27624>:
      D.27625 = 1 << i;
      valid_mask = D.27625 | valid_mask;
      ntables = ntables + 1;
      D.27626 = &meta->tables[i].size_bitfield;
      D.27627 = mono_metadata_compute_size (meta, i, D.27626);
      D.27628 = (unsigned char) D.27627;
      meta->tables[i].row_size = D.27628;
      D.27629 = meta->tables[i].row_size;
      D.27630 = (int) D.27629;
      D.27622 = meta->tables[i].rows;
      D.27631 = (int) D.27622;
      D.27632 = D.27630 * D.27631;
      D.27633 = (unsigned int) D.27632;
      heapt_size = D.27633 + heapt_size;
      <D.20116>:
      i = i + 1;
      <D.20118>:
      if (i <= 44) goto <D.20117>; else goto <D.20119>;
      <D.20119>:
      heapt_size = heapt_size + 24;
      D.27634 = ntables * 4;
      heapt_size = D.27634 + heapt_size;
      heapt_size = heapt_size + 3;
      heapt_size = heapt_size & 4294967292;
      meta_size = meta_size + heapt_size;
      D.27635 = (long unsigned int) meta_size;
      D.27636 = monoeg_malloc0 (D.27635);
      meta->raw_metadata = D.27636;
      p = meta->raw_metadata;
      p.164 = p;
      p = p.164 + 1;
      *p.164 = 66;
      p.165 = p;
      p = p.165 + 1;
      *p.165 = 83;
      p.166 = p;
      p = p.166 + 1;
      *p.166 = 74;
      p.167 = p;
      p = p.167 + 1;
      *p.167 = 66;
      int16val = p;
      int16val.168 = int16val;
      int16val = int16val.168 + 2;
      D.27642 = meta->md_version_major;
      D.27643 = (short unsigned int) D.27642;
      D.27644 = D.27643 >> 8;
      D.27645 = (signed short) D.27644;
      D.27642 = meta->md_version_major;
      D.27643 = (short unsigned int) D.27642;
      D.27646 = (int) D.27643;
      D.27647 = D.27646 << 8;
      D.27648 = (signed short) D.27647;
      D.27649 = D.27645 | D.27648;
      D.27650 = (short unsigned int) D.27649;
      *int16val.168 = D.27650;
      D.27651 = meta->md_version_minor;
      D.27652 = (short unsigned int) D.27651;
      D.27653 = D.27652 >> 8;
      D.27654 = (signed short) D.27653;
      D.27651 = meta->md_version_minor;
      D.27652 = (short unsigned int) D.27651;
      D.27655 = (int) D.27652;
      D.27656 = D.27655 << 8;
      D.27657 = (signed short) D.27656;
      D.27658 = D.27654 | D.27657;
      D.27659 = (short unsigned int) D.27658;
      *int16val = D.27659;
      p = p + 8;
      int32val = p;
      D.27660 = meta->version;
      D.27661 = __strlen_g (D.27660);
      D.27662 = (unsigned int) D.27661;
      D.27663 = D.27662 + 3;
      D.27664 = D.27663 << 24;
      D.27665 = D.27664 & 4227858432;
      D.27660 = meta->version;
      D.27666 = __strlen_g (D.27660);
      D.27667 = (unsigned int) D.27666;
      D.27668 = D.27667 + 3;
      D.27669 = D.27668 >> 8;
      D.27670 = D.27669 & 65280;
      D.27671 = D.27665 | D.27670;
      D.27660 = meta->version;
      D.27672 = __strlen_g (D.27660);
      D.27673 = (unsigned int) D.27672;
      D.27674 = D.27673 + 3;
      D.27675 = D.27674 << 8;
      D.27676 = D.27675 & 16711680;
      D.27677 = D.27671 | D.27676;
      D.27660 = meta->version;
      D.27678 = __strlen_g (D.27660);
      D.27679 = (unsigned int) D.27678;
      D.27680 = D.27679 + 3;
      D.27681 = D.27680 >> 24;
      D.27682 = D.27681 & 255;
      D.27683 = D.27677 | D.27682;
      *int32val = D.27683;
      p = p + 4;
      D.27660 = meta->version;
      D.27660 = meta->version;
      D.27684 = __strlen_g (D.27660);
      memcpy (p, D.27660, D.27684);
      D.27685 = *int32val;
      D.27686 = D.27685 << 24;
      D.27685 = *int32val;
      D.27687 = D.27685 >> 8;
      D.27688 = D.27687 & 65280;
      D.27689 = D.27686 | D.27688;
      D.27685 = *int32val;
      D.27690 = D.27685 << 8;
      D.27691 = D.27690 & 16711680;
      D.27692 = D.27689 | D.27691;
      D.27685 = *int32val;
      D.27693 = D.27685 >> 24;
      D.27694 = D.27692 | D.27693;
      D.27695 = (sizetype) D.27694;
      p = p + D.27695;
      {
        guint32 __diff;

        p.169 = (long int) p;
        D.27697 = meta->raw_metadata;
        D.27698 = (long int) D.27697;
        D.27699 = p.169 - D.27698;
        __diff = (guint32) D.27699;
        D.27700 = __diff & 3;
        if (D.27700 != 0) goto <D.27701>; else goto <D.27702>;
        <D.27701>:
        D.27700 = __diff & 3;
        D.27703 = 4 - D.27700;
        D.27704 = (sizetype) D.27703;
        p = p + D.27704;
        <D.27702>:
      }
      int16val = p;
      int16val.170 = int16val;
      int16val = int16val.170 + 2;
      *int16val.170 = 0;
      *int16val = 1280;
      p = p + 4;
      p.169 = (long int) p;
      D.27697 = meta->raw_metadata;
      D.27698 = (long int) D.27697;
      D.27699 = p.169 - D.27698;
      D.27706 = (unsigned int) D.27699;
      table_offset = D.27706 + 80;
      table_offset = table_offset + 3;
      table_offset = table_offset & 4294967292;
      assembly->tstream.index = heapt_size;
      i = 0;
      goto <D.20123>;
      <D.20122>:
      int32val = p;
      D.27707 = stream_desc[i].stream;
      D.27707->offset = table_offset;
      int32val.171 = int32val;
      int32val = int32val.171 + 4;
      D.27709 = table_offset << 24;
      D.27710 = table_offset >> 8;
      D.27711 = D.27710 & 65280;
      D.27712 = D.27709 | D.27711;
      D.27713 = table_offset << 8;
      D.27714 = D.27713 & 16711680;
      D.27715 = D.27712 | D.27714;
      D.27716 = table_offset >> 24;
      D.27717 = D.27715 | D.27716;
      *int32val.171 = D.27717;
      D.27707 = stream_desc[i].stream;
      D.27718 = D.27707->index;
      D.27719 = D.27718 << 24;
      D.27707 = stream_desc[i].stream;
      D.27718 = D.27707->index;
      D.27720 = D.27718 >> 8;
      D.27721 = D.27720 & 65280;
      D.27722 = D.27719 | D.27721;
      D.27707 = stream_desc[i].stream;
      D.27718 = D.27707->index;
      D.27723 = D.27718 << 8;
      D.27724 = D.27723 & 16711680;
      D.27725 = D.27722 | D.27724;
      D.27707 = stream_desc[i].stream;
      D.27718 = D.27707->index;
      D.27726 = D.27718 >> 24;
      D.27727 = D.27725 | D.27726;
      *int32val = D.27727;
      D.27685 = *int32val;
      D.27686 = D.27685 << 24;
      D.27685 = *int32val;
      D.27687 = D.27685 >> 8;
      D.27688 = D.27687 & 65280;
      D.27689 = D.27686 | D.27688;
      D.27685 = *int32val;
      D.27690 = D.27685 << 8;
      D.27691 = D.27690 & 16711680;
      D.27692 = D.27689 | D.27691;
      D.27685 = *int32val;
      D.27693 = D.27685 >> 24;
      D.27694 = D.27692 | D.27693;
      table_offset = D.27694 + table_offset;
      table_offset = table_offset + 3;
      table_offset = table_offset & 4294967292;
      p = p + 8;
      D.27728 = stream_desc[i].name;
      strcpy (p, D.27728);
      D.27728 = stream_desc[i].name;
      D.27729 = __strlen_g (D.27728);
      D.27730 = D.27729 + 1;
      p = p + D.27730;
      {
        guint32 __diff;

        p.169 = (long int) p;
        D.27697 = meta->raw_metadata;
        D.27698 = (long int) D.27697;
        D.27699 = p.169 - D.27698;
        __diff = (guint32) D.27699;
        D.27731 = __diff & 3;
        if (D.27731 != 0) goto <D.27732>; else goto <D.27733>;
        <D.27732>:
        D.27731 = __diff & 3;
        D.27734 = 4 - D.27731;
        D.27735 = (sizetype) D.27734;
        p = p + D.27735;
        <D.27733>:
      }
      i = i + 1;
      <D.20123>:
      if (i <= 4) goto <D.20122>; else goto <D.20124>;
      <D.20124>:
      p.169 = (long int) p;
      D.27697 = meta->raw_metadata;
      D.27698 = (long int) D.27697;
      D.27699 = p.169 - D.27698;
      D.27736 = assembly->tstream.offset;
      D.27737 = (long int) D.27736;
      D.27738 = D.27699 >= D.27737;
      D.27739 = (long int) D.27738;
      D.27740 = __builtin_expect (D.27739, 0);
      if (D.27740 != 0) goto <D.27741>; else goto <D.27742>;
      <D.27741>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4106, "(p - (unsigned char*)meta->raw_metadata) < assembly->tstream.offset");
      <D.27742>:
      D.27697 = meta->raw_metadata;
      D.27736 = assembly->tstream.offset;
      D.27743 = (sizetype) D.27736;
      p = D.27697 + D.27743;
      int32val = p;
      *int32val = 0;
      p = p + 4;
      p.172 = p;
      p = p.172 + 1;
      *p.172 = 2;
      p.173 = p;
      p = p.173 + 1;
      *p.173 = 0;
      D.27746 = BIT_FIELD_REF <*meta, 64, 192>;
      D.27747 = D.27746 & 8388608;
      if (D.27747 != 0) goto <D.27748>; else goto <D.27749>;
      <D.27748>:
      D.27750 = *p;
      D.27751 = D.27750 | 1;
      *p = D.27751;
      <D.27749>:
      D.27746 = BIT_FIELD_REF <*meta, 64, 192>;
      D.27752 = D.27746 & 4194304;
      if (D.27752 != 0) goto <D.27753>; else goto <D.27754>;
      <D.27753>:
      D.27750 = *p;
      D.27755 = D.27750 | 2;
      *p = D.27755;
      <D.27754>:
      D.27746 = BIT_FIELD_REF <*meta, 64, 192>;
      D.27756 = D.27746 & 2097152;
      if (D.27756 != 0) goto <D.27757>; else goto <D.27758>;
      <D.27757>:
      D.27750 = *p;
      D.27759 = D.27750 | 4;
      *p = D.27759;
      <D.27758>:
      p = p + 1;
      p.174 = p;
      p = p.174 + 1;
      *p.174 = 1;
      int64val = p;
      int64val.175 = int64val;
      int64val = int64val.175 + 8;
      D.27762 = (unsigned int) valid_mask;
      D.27763 = D.27762 << 24;
      D.27762 = (unsigned int) valid_mask;
      D.27764 = D.27762 >> 8;
      D.27765 = D.27764 & 65280;
      D.27766 = D.27763 | D.27765;
      D.27762 = (unsigned int) valid_mask;
      D.27767 = D.27762 << 8;
      D.27768 = D.27767 & 16711680;
      D.27769 = D.27766 | D.27768;
      D.27762 = (unsigned int) valid_mask;
      D.27770 = D.27762 >> 24;
      D.27771 = D.27769 | D.27770;
      D.27772 = (long unsigned int) D.27771;
      D.27773 = D.27772 << 32;
      D.27774 = valid_mask >> 32;
      D.27775 = (unsigned int) D.27774;
      D.27776 = D.27775 << 24;
      D.27774 = valid_mask >> 32;
      D.27775 = (unsigned int) D.27774;
      D.27777 = D.27775 >> 8;
      D.27778 = D.27777 & 65280;
      D.27779 = D.27776 | D.27778;
      D.27774 = valid_mask >> 32;
      D.27775 = (unsigned int) D.27774;
      D.27780 = D.27775 << 8;
      D.27781 = D.27780 & 16711680;
      D.27782 = D.27779 | D.27781;
      D.27774 = valid_mask >> 32;
      D.27775 = (unsigned int) D.27774;
      D.27783 = D.27775 >> 24;
      D.27784 = D.27782 | D.27783;
      D.27785 = (long unsigned int) D.27784;
      D.27786 = D.27773 | D.27785;
      *int64val.175 = D.27786;
      int64val.176 = int64val;
      int64val = int64val.176 + 8;
      D.27762 = (unsigned int) valid_mask;
      D.27788 = (unsigned int) sorted_mask;
      D.27789 = D.27762 & D.27788;
      D.27790 = D.27789 << 24;
      D.27762 = (unsigned int) valid_mask;
      D.27788 = (unsigned int) sorted_mask;
      D.27789 = D.27762 & D.27788;
      D.27791 = D.27789 >> 8;
      D.27792 = D.27791 & 65280;
      D.27793 = D.27790 | D.27792;
      D.27762 = (unsigned int) valid_mask;
      D.27788 = (unsigned int) sorted_mask;
      D.27789 = D.27762 & D.27788;
      D.27794 = D.27789 << 8;
      D.27795 = D.27794 & 16711680;
      D.27796 = D.27793 | D.27795;
      D.27762 = (unsigned int) valid_mask;
      D.27788 = (unsigned int) sorted_mask;
      D.27789 = D.27762 & D.27788;
      D.27797 = D.27789 >> 24;
      D.27798 = D.27796 | D.27797;
      D.27799 = (long unsigned int) D.27798;
      D.27800 = D.27799 << 32;
      D.27801 = valid_mask & sorted_mask;
      D.27802 = D.27801 >> 32;
      D.27803 = (unsigned int) D.27802;
      D.27804 = D.27803 << 24;
      D.27801 = valid_mask & sorted_mask;
      D.27802 = D.27801 >> 32;
      D.27803 = (unsigned int) D.27802;
      D.27805 = D.27803 >> 8;
      D.27806 = D.27805 & 65280;
      D.27807 = D.27804 | D.27806;
      D.27801 = valid_mask & sorted_mask;
      D.27802 = D.27801 >> 32;
      D.27803 = (unsigned int) D.27802;
      D.27808 = D.27803 << 8;
      D.27809 = D.27808 & 16711680;
      D.27810 = D.27807 | D.27809;
      D.27801 = valid_mask & sorted_mask;
      D.27802 = D.27801 >> 32;
      D.27803 = (unsigned int) D.27802;
      D.27811 = D.27803 >> 24;
      D.27812 = D.27810 | D.27811;
      D.27813 = (long unsigned int) D.27812;
      D.27814 = D.27800 | D.27813;
      *int64val.176 = D.27814;
      p = p + 16;
      int32val = p;
      i = 0;
      goto <D.20127>;
      <D.20126>:
      D.27622 = meta->tables[i].rows;
      if (D.27622 == 0) goto <D.27815>; else goto <D.27816>;
      <D.27815>:
      // predicted unlikely by continue predictor.
      goto <D.20125>;
      <D.27816>:
      int32val.177 = int32val;
      int32val = int32val.177 + 4;
      D.27622 = meta->tables[i].rows;
      D.27818 = (unsigned int) D.27622;
      D.27819 = D.27818 << 24;
      D.27622 = meta->tables[i].rows;
      D.27818 = (unsigned int) D.27622;
      D.27820 = D.27818 >> 8;
      D.27821 = D.27820 & 65280;
      D.27822 = D.27819 | D.27821;
      D.27622 = meta->tables[i].rows;
      D.27818 = (unsigned int) D.27622;
      D.27823 = D.27818 << 8;
      D.27824 = D.27823 & 16711680;
      D.27825 = D.27822 | D.27824;
      D.27622 = meta->tables[i].rows;
      D.27818 = (unsigned int) D.27622;
      D.27826 = D.27818 >> 24;
      D.27827 = D.27825 | D.27826;
      *int32val.177 = D.27827;
      <D.20125>:
      i = i + 1;
      <D.20127>:
      if (i <= 44) goto <D.20126>; else goto <D.20128>;
      <D.20128>:
      p = int32val;
      table = &assembly->tables[11];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27829>; else goto <D.27830>;
      <D.27829>:
      D.27831 = table->values;
      D.27832 = D.27831 + 16;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27832, D.27833, 16, compare_constants);
      <D.27830>:
      table = &assembly->tables[24];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27834>; else goto <D.27835>;
      <D.27834>:
      D.27831 = table->values;
      D.27836 = D.27831 + 12;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27836, D.27833, 12, compare_semantics);
      <D.27835>:
      table = &assembly->tables[12];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27837>; else goto <D.27838>;
      <D.27837>:
      D.27831 = table->values;
      D.27836 = D.27831 + 12;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27836, D.27833, 12, compare_custom_attrs);
      <D.27838>:
      table = &assembly->tables[13];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27839>; else goto <D.27840>;
      <D.27839>:
      D.27831 = table->values;
      D.27841 = D.27831 + 8;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27841, D.27833, 8, compare_field_marshal);
      <D.27840>:
      table = &assembly->tables[41];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27842>; else goto <D.27843>;
      <D.27842>:
      D.27831 = table->values;
      D.27841 = D.27831 + 8;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27841, D.27833, 8, compare_nested);
      <D.27843>:
      table = &assembly->tables[14];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27844>; else goto <D.27845>;
      <D.27844>:
      D.27831 = table->values;
      D.27836 = D.27831 + 12;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27836, D.27833, 12, compare_declsecurity_attrs);
      <D.27845>:
      table = &assembly->tables[9];
      D.27828 = table->rows;
      if (D.27828 != 0) goto <D.27846>; else goto <D.27847>;
      <D.27846>:
      D.27831 = table->values;
      D.27841 = D.27831 + 8;
      D.27828 = table->rows;
      D.27833 = (long unsigned int) D.27828;
      qsort (D.27841, D.27833, 8, compare_interface_impl);
      <D.27847>:
      i = 0;
      goto <D.20147>;
      <D.20146>:
      {
        int row;
        int col;
        guint32 * values;
        guint32 bitfield;

        bitfield = meta->tables[i].size_bitfield;
        D.27622 = meta->tables[i].rows;
        if (D.27622 == 0) goto <D.27848>; else goto <D.27849>;
        <D.27848>:
        // predicted unlikely by continue predictor.
        goto <D.20133>;
        <D.27849>:
        D.27850 = assembly->tables[i].columns;
        D.27851 = (unsigned int) D.27850;
        D.27852 = bitfield >> 24;
        if (D.27851 != D.27852) goto <D.27853>; else goto <D.27854>;
        <D.27853>:
        D.27850 = assembly->tables[i].columns;
        D.27855 = (int) D.27850;
        D.27852 = bitfield >> 24;
        monoeg_g_log (0B, 4, "col count mismatch in %d: %d %d", i, D.27855, D.27852);
        <D.20134>:
        goto <D.20134>;
        <D.27854>:
        meta->tables[i].base = p;
        row = 1;
        goto <D.20144>;
        <D.20143>:
        D.27856 = assembly->tables[i].values;
        D.27850 = assembly->tables[i].columns;
        D.27855 = (int) D.27850;
        D.27857 = D.27855 * row;
        D.27858 = (long unsigned int) D.27857;
        D.27859 = D.27858 * 4;
        values = D.27856 + D.27859;
        col = 0;
        goto <D.20141>;
        <D.20140>:
        D.27860 = col * 2;
        D.27861 = bitfield >> D.27860;
        D.27862 = D.27861 & 3;
        D.27863 = D.27862 + 1;
        switch (D.27863) <default: <D.20139>, case 1: <D.20135>, case 2: <D.20137>, case 4: <D.20138>>
        <D.20135>:
        p.178 = p;
        p = p.178 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27869 = (unsigned char) D.27868;
        *p.178 = D.27869;
        goto <D.20136>;
        <D.20137>:
        p.179 = p;
        p = p.179 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27869 = (unsigned char) D.27868;
        *p.179 = D.27869;
        p.180 = p;
        p = p.180 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27872 = D.27868 >> 8;
        D.27873 = (unsigned char) D.27872;
        *p.180 = D.27873;
        goto <D.20136>;
        <D.20138>:
        p.181 = p;
        p = p.181 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27869 = (unsigned char) D.27868;
        *p.181 = D.27869;
        p.182 = p;
        p = p.182 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27872 = D.27868 >> 8;
        D.27873 = (unsigned char) D.27872;
        *p.182 = D.27873;
        p.183 = p;
        p = p.183 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27877 = D.27868 >> 16;
        D.27878 = (unsigned char) D.27877;
        *p.183 = D.27878;
        p.184 = p;
        p = p.184 + 1;
        D.27865 = (long unsigned int) col;
        D.27866 = D.27865 * 4;
        D.27867 = values + D.27866;
        D.27868 = *D.27867;
        D.27880 = D.27868 >> 24;
        D.27881 = (unsigned char) D.27880;
        *p.184 = D.27881;
        goto <D.20136>;
        <D.20139>:
        monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 4187);
        <D.20136>:
        col = col + 1;
        <D.20141>:
        D.27850 = assembly->tables[i].columns;
        D.27855 = (int) D.27850;
        if (D.27855 > col) goto <D.20140>; else goto <D.20142>;
        <D.20142>:
        row = row + 1;
        <D.20144>:
        D.27622 = meta->tables[i].rows;
        D.27631 = (int) D.27622;
        if (D.27631 >= row) goto <D.20143>; else goto <D.20145>;
        <D.20145>:
        p.169 = (long int) p;
        D.27882 = meta->tables[i].base;
        D.27883 = (long int) D.27882;
        D.27884 = p.169 - D.27883;
        D.27622 = meta->tables[i].rows;
        D.27631 = (int) D.27622;
        D.27629 = meta->tables[i].row_size;
        D.27630 = (int) D.27629;
        D.27632 = D.27631 * D.27630;
        D.27885 = (long int) D.27632;
        D.27886 = D.27884 != D.27885;
        D.27887 = (long int) D.27886;
        D.27888 = __builtin_expect (D.27887, 0);
        if (D.27888 != 0) goto <D.27889>; else goto <D.27890>;
        <D.27889>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4191, "(p - (const unsigned char*)meta->tables [i].base) == (meta->tables [i].rows * meta->tables [i].row_size)");
        <D.27890>:
      }
      <D.20133>:
      i = i + 1;
      <D.20147>:
      if (i <= 44) goto <D.20146>; else goto <D.20148>;
      <D.20148>:
      D.27891 = assembly->guid.offset;
      D.27615 = assembly->guid.index;
      D.27892 = D.27891 + D.27615;
      D.27893 = D.27892 >= meta_size;
      D.27894 = (long int) D.27893;
      D.27895 = __builtin_expect (D.27894, 0);
      if (D.27895 != 0) goto <D.27896>; else goto <D.27897>;
      <D.27896>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 4194, "assembly->guid.offset + assembly->guid.index < meta_size");
      <D.27897>:
      D.27697 = meta->raw_metadata;
      D.27898 = assembly->sheap.offset;
      D.27899 = (sizetype) D.27898;
      D.27900 = D.27697 + D.27899;
      D.27901 = assembly->sheap.data;
      D.27617 = assembly->sheap.index;
      D.27902 = (long unsigned int) D.27617;
      memcpy (D.27900, D.27901, D.27902);
      D.27697 = meta->raw_metadata;
      D.27903 = assembly->us.offset;
      D.27904 = (sizetype) D.27903;
      D.27905 = D.27697 + D.27904;
      D.27906 = assembly->us.data;
      D.27619 = assembly->us.index;
      D.27907 = (long unsigned int) D.27619;
      memcpy (D.27905, D.27906, D.27907);
      D.27697 = meta->raw_metadata;
      D.27908 = assembly->blob.offset;
      D.27909 = (sizetype) D.27908;
      D.27910 = D.27697 + D.27909;
      D.27911 = assembly->blob.data;
      D.27613 = assembly->blob.index;
      D.27912 = (long unsigned int) D.27613;
      memcpy (D.27910, D.27911, D.27912);
      D.27697 = meta->raw_metadata;
      D.27891 = assembly->guid.offset;
      D.27913 = (sizetype) D.27891;
      D.27914 = D.27697 + D.27913;
      D.27915 = assembly->guid.data;
      D.27615 = assembly->guid.index;
      D.27916 = (long unsigned int) D.27615;
      memcpy (D.27914, D.27915, D.27916);
      D.27891 = assembly->guid.offset;
      D.27615 = assembly->guid.index;
      D.27892 = D.27891 + D.27615;
      assembly->meta_size = D.27892;
    }
  finally
    {
      stream_desc = {CLOBBER};
    }
}


compare_interface_impl (const void * a, const void * b)
{
  unsigned int D.27917;
  unsigned int D.27918;
  unsigned int D.27919;
  int D.27922;
  const guint32 * D.27923;
  unsigned int D.27924;
  const guint32 * D.27925;
  unsigned int D.27926;
  unsigned int D.27927;
  const guint32 * a_values;
  const guint32 * b_values;
  int klass;

  a_values = a;
  b_values = b;
  D.27917 = *a_values;
  D.27918 = *b_values;
  D.27919 = D.27917 - D.27918;
  klass = (int) D.27919;
  if (klass != 0) goto <D.27920>; else goto <D.27921>;
  <D.27920>:
  D.27922 = klass;
  return D.27922;
  <D.27921>:
  D.27923 = a_values + 4;
  D.27924 = *D.27923;
  D.27925 = b_values + 4;
  D.27926 = *D.27925;
  D.27927 = D.27924 - D.27926;
  D.27922 = (int) D.27927;
  return D.27922;
}


compare_declsecurity_attrs (const void * a, const void * b)
{
  int D.27929;
  const guint32 * D.27930;
  unsigned int D.27931;
  const guint32 * D.27932;
  unsigned int D.27933;
  unsigned int D.27934;
  const guint32 * a_values;
  const guint32 * b_values;

  a_values = a;
  b_values = b;
  D.27930 = a_values + 4;
  D.27931 = *D.27930;
  D.27932 = b_values + 4;
  D.27933 = *D.27932;
  D.27934 = D.27931 - D.27933;
  D.27929 = (int) D.27934;
  return D.27929;
}


compare_nested (const void * a, const void * b)
{
  int D.27936;
  unsigned int D.27937;
  unsigned int D.27938;
  unsigned int D.27939;
  const guint32 * a_values;
  const guint32 * b_values;

  a_values = a;
  b_values = b;
  D.27937 = *a_values;
  D.27938 = *b_values;
  D.27939 = D.27937 - D.27938;
  D.27936 = (int) D.27939;
  return D.27936;
}


compare_field_marshal (const void * a, const void * b)
{
  int D.27941;
  unsigned int D.27942;
  unsigned int D.27943;
  unsigned int D.27944;
  const guint32 * a_values;
  const guint32 * b_values;

  a_values = a;
  b_values = b;
  D.27942 = *a_values;
  D.27943 = *b_values;
  D.27944 = D.27942 - D.27943;
  D.27941 = (int) D.27944;
  return D.27941;
}


compare_custom_attrs (const void * a, const void * b)
{
  int D.27946;
  unsigned int D.27947;
  unsigned int D.27948;
  unsigned int D.27949;
  const guint32 * a_values;
  const guint32 * b_values;

  a_values = a;
  b_values = b;
  D.27947 = *a_values;
  D.27948 = *b_values;
  D.27949 = D.27947 - D.27948;
  D.27946 = (int) D.27949;
  return D.27946;
}


compare_semantics (const void * a, const void * b)
{
  const guint32 * D.27951;
  unsigned int D.27952;
  const guint32 * D.27953;
  unsigned int D.27954;
  unsigned int D.27955;
  int D.27958;
  unsigned int D.27959;
  unsigned int D.27960;
  unsigned int D.27961;
  const guint32 * a_values;
  const guint32 * b_values;
  int assoc;

  a_values = a;
  b_values = b;
  D.27951 = a_values + 8;
  D.27952 = *D.27951;
  D.27953 = b_values + 8;
  D.27954 = *D.27953;
  D.27955 = D.27952 - D.27954;
  assoc = (int) D.27955;
  if (assoc != 0) goto <D.27956>; else goto <D.27957>;
  <D.27956>:
  D.27958 = assoc;
  return D.27958;
  <D.27957>:
  D.27959 = *a_values;
  D.27960 = *b_values;
  D.27961 = D.27959 - D.27960;
  D.27958 = (int) D.27961;
  return D.27958;
}


compare_constants (const void * a, const void * b)
{
  int D.27963;
  const guint32 * D.27964;
  unsigned int D.27965;
  const guint32 * D.27966;
  unsigned int D.27967;
  unsigned int D.27968;
  const guint32 * a_values;
  const guint32 * b_values;

  a_values = a;
  b_values = b;
  D.27964 = a_values + 8;
  D.27965 = *D.27964;
  D.27966 = b_values + 8;
  D.27967 = *D.27966;
  D.27968 = D.27965 - D.27967;
  D.27963 = (int) D.27968;
  return D.27963;
}


compare_genericparam (const void * a, const void * b)
{
  const struct GenericParamTableEntry * D.27970;
  unsigned int D.27971;
  const struct GenericParamTableEntry * D.27972;
  unsigned int D.27973;
  int D.27976;
  struct MonoReflectionGenericParam * D.27977;
  struct MonoType * D.27978;
  struct MonoGenericParam * D.27979;
  short unsigned int D.27980;
  int D.27981;
  struct MonoReflectionGenericParam * D.27982;
  struct MonoType * D.27983;
  struct MonoGenericParam * D.27984;
  short unsigned int D.27985;
  int D.27986;
  unsigned int D.27987;
  const struct GenericParamTableEntry * * a_entry;
  const struct GenericParamTableEntry * * b_entry;

  a_entry = a;
  b_entry = b;
  D.27970 = *b_entry;
  D.27971 = D.27970->owner;
  D.27972 = *a_entry;
  D.27973 = D.27972->owner;
  if (D.27971 == D.27973) goto <D.27974>; else goto <D.27975>;
  <D.27974>:
  D.27972 = *a_entry;
  D.27977 = D.27972->gparam;
  D.27978 = mono_reflection_type_get_handle (D.27977);
  D.27979 = D.27978->data.generic_param;
  D.27980 = D.27979->num;
  D.27981 = (int) D.27980;
  D.27970 = *b_entry;
  D.27982 = D.27970->gparam;
  D.27983 = mono_reflection_type_get_handle (D.27982);
  D.27984 = D.27983->data.generic_param;
  D.27985 = D.27984->num;
  D.27986 = (int) D.27985;
  D.27976 = D.27981 - D.27986;
  return D.27976;
  <D.27975>:
  D.27972 = *a_entry;
  D.27973 = D.27972->owner;
  D.27970 = *b_entry;
  D.27971 = D.27970->owner;
  D.27987 = D.27973 - D.27971;
  D.27976 = (int) D.27987;
  return D.27976;
}


write_generic_param_entry (struct MonoDynamicImage * assembly, struct GenericParamTableEntry * entry)
{
  unsigned int D.27989;
  unsigned int table_idx.185;
  unsigned int D.27991;
  guint32 * D.27992;
  unsigned int D.27993;
  long unsigned int D.27994;
  long unsigned int D.27995;
  struct MonoReflectionGenericParam * D.27996;
  struct MonoType * D.27997;
  guint32 * D.27998;
  unsigned int D.27999;
  guint32 * D.28000;
  unsigned int D.28001;
  short unsigned int D.28002;
  unsigned int D.28003;
  guint32 * D.28004;
  struct MonoDynamicStream * D.28005;
  struct MonoGenericParamInfo * iftmp.186;
  struct MonoGenericContainer * D.28007;
  const char * D.28011;
  unsigned int D.28012;
  struct MonoArray * D.28013;
  struct MonoDynamicTable * table;
  struct MonoGenericParam * param;
  guint32 * values;
  guint32 table_idx;

  table = &assembly->tables[42];
  D.27989 = table->next_idx;
  table_idx.185 = D.27989;
  D.27991 = table_idx.185 + 1;
  table->next_idx = D.27991;
  table_idx = table_idx.185;
  D.27992 = table->values;
  D.27993 = table_idx * 4;
  D.27994 = (long unsigned int) D.27993;
  D.27995 = D.27994 * 4;
  values = D.27992 + D.27995;
  D.27996 = entry->gparam;
  D.27997 = mono_reflection_type_get_handle (D.27996);
  param = D.27997->data.generic_param;
  D.27998 = values + 8;
  D.27999 = entry->owner;
  *D.27998 = D.27999;
  D.28000 = values + 4;
  D.27996 = entry->gparam;
  D.28001 = D.27996->attrs;
  *D.28000 = D.28001;
  D.28002 = param->num;
  D.28003 = (unsigned int) D.28002;
  *values = D.28003;
  D.28004 = values + 12;
  D.28005 = &assembly->sheap;
  D.28007 = param->owner;
  if (D.28007 != 0B) goto <D.28008>; else goto <D.28009>;
  <D.28008>:
  iftmp.186 = &MEM[(struct MonoGenericParamFull *)param].info;
  goto <D.28010>;
  <D.28009>:
  iftmp.186 = 0B;
  <D.28010>:
  D.28011 = iftmp.186->name;
  D.28012 = string_heap_insert (D.28005, D.28011);
  *D.28004 = D.28012;
  D.27996 = entry->gparam;
  D.28013 = D.27996->cattrs;
  mono_image_add_cattrs (assembly, table_idx, 19, D.28013);
  D.27996 = entry->gparam;
  encode_constraints (D.27996, table_idx, assembly);
}


encode_constraints (struct MonoReflectionGenericParam * gparam, guint32 owner, struct MonoDynamicImage * assembly)
{
  guint32 iftmp.187;
  struct MonoArray * D.28015;
  long unsigned int D.28018;
  unsigned int D.28020;
  unsigned int D.28021;
  struct MonoReflectionType * D.28022;
  unsigned int D.28025;
  unsigned int D.28028;
  unsigned int table_idx.188;
  unsigned int D.28030;
  guint32 * D.28031;
  unsigned int D.28032;
  long unsigned int D.28033;
  long unsigned int D.28034;
  guint32 * D.28035;
  struct MonoType * D.28036;
  unsigned int D.28037;
  long unsigned int D.28038;
  char * D.28039;
  unsigned int table_idx.189;
  unsigned int D.28041;
  struct MonoType * D.28042;
  unsigned int D.28043;
  struct MonoDynamicTable * table;
  guint32 num_constraints;
  guint32 i;
  guint32 * values;
  guint32 table_idx;

  table = &assembly->tables[44];
  D.28015 = gparam->iface_constraints;
  if (D.28015 != 0B) goto <D.28016>; else goto <D.28017>;
  <D.28016>:
  D.28015 = gparam->iface_constraints;
  D.28018 = mono_array_length (D.28015);
  iftmp.187 = (guint32) D.28018;
  goto <D.28019>;
  <D.28017>:
  iftmp.187 = 0;
  <D.28019>:
  num_constraints = iftmp.187;
  D.28020 = table->rows;
  D.28021 = D.28020 + num_constraints;
  table->rows = D.28021;
  D.28022 = gparam->base_type;
  if (D.28022 != 0B) goto <D.28023>; else goto <D.28024>;
  <D.28023>:
  D.28020 = table->rows;
  D.28025 = D.28020 + 1;
  table->rows = D.28025;
  <D.28024>:
  D.28020 = table->rows;
  alloc_table (table, D.28020);
  D.28022 = gparam->base_type;
  if (D.28022 != 0B) goto <D.28026>; else goto <D.28027>;
  <D.28026>:
  D.28028 = table->next_idx;
  table_idx.188 = D.28028;
  D.28030 = table_idx.188 + 1;
  table->next_idx = D.28030;
  table_idx = table_idx.188;
  D.28031 = table->values;
  D.28032 = table_idx * 2;
  D.28033 = (long unsigned int) D.28032;
  D.28034 = D.28033 * 4;
  values = D.28031 + D.28034;
  *values = owner;
  D.28035 = values + 4;
  D.28022 = gparam->base_type;
  D.28036 = mono_reflection_type_get_handle (D.28022);
  D.28037 = mono_image_typedef_or_ref (assembly, D.28036);
  *D.28035 = D.28037;
  <D.28027>:
  i = 0;
  goto <D.19459>;
  <D.19458>:
  {
    struct MonoReflectionType * constraint;

    D.28015 = gparam->iface_constraints;
    D.28038 = (long unsigned int) i;
    D.28039 = mono_array_addr_with_size (D.28015, 8, D.28038);
    constraint = MEM[(void * *)D.28039];
    D.28028 = table->next_idx;
    table_idx.189 = D.28028;
    D.28041 = table_idx.189 + 1;
    table->next_idx = D.28041;
    table_idx = table_idx.189;
    D.28031 = table->values;
    D.28032 = table_idx * 2;
    D.28033 = (long unsigned int) D.28032;
    D.28034 = D.28033 * 4;
    values = D.28031 + D.28034;
    *values = owner;
    D.28035 = values + 4;
    D.28042 = mono_reflection_type_get_handle (constraint);
    D.28043 = mono_image_typedef_or_ref (assembly, D.28042);
    *D.28035 = D.28043;
  }
  i = i + 1;
  <D.19459>:
  if (i < num_constraints) goto <D.19458>; else goto <D.19460>;
  <D.19460>:
}


pad_heap (struct MonoDynamicStream * sh)
{
  unsigned int D.28044;
  unsigned int D.28045;
  unsigned int D.28048;
  char * D.28049;
  sizetype D.28050;
  char * D.28051;
  long unsigned int D.28052;
  unsigned int sz.190;
  unsigned int D.28054;

  D.28044 = sh->index;
  D.28045 = D.28044 & 3;
  if (D.28045 != 0) goto <D.28046>; else goto <D.28047>;
  <D.28046>:
  {
    int sz;

    D.28044 = sh->index;
    D.28045 = D.28044 & 3;
    D.28048 = 4 - D.28045;
    sz = (int) D.28048;
    D.28049 = sh->data;
    D.28044 = sh->index;
    D.28050 = (sizetype) D.28044;
    D.28051 = D.28049 + D.28050;
    D.28052 = (long unsigned int) sz;
    memset (D.28051, 0, D.28052);
    D.28044 = sh->index;
    sz.190 = (unsigned int) sz;
    D.28054 = D.28044 + sz.190;
    sh->index = D.28054;
  }
  <D.28047>:
}


assembly_add_win32_resources (struct MonoDynamicImage * assembly, struct MonoReflectionAssemblyBuilder * assemblyb)
{
  struct MonoArray * D.28055;
  long unsigned int D.28058;
  struct MonoArray * D.28059;
  long unsigned int D.28060;
  unsigned int D.28061;
  long unsigned int D.28062;
  long unsigned int D.28063;
  long unsigned int D.28064;
  unsigned int D.28065;
  long unsigned int D.28066;
  char * p.191;
  long int p.192;
  long int buf.193;
  long int D.28070;
  long int D.28071;
  _Bool D.28072;
  long int D.28073;
  long int D.28074;
  long unsigned int D.28077;
  void * D.28078;
  unsigned int D.28079;
  char * D.28080;
  long unsigned int D.28081;
  char * buf;
  char * p;
  guint32 size;
  guint32 i;
  struct MonoReflectionWin32Resource * win32_res;
  struct ResTreeNode * tree;

  try
    {
      D.28055 = assemblyb->win32_resources;
      if (D.28055 == 0B) goto <D.28056>; else goto <D.28057>;
      <D.28056>:
      return;
      <D.28057>:
      D.28055 = assemblyb->win32_resources;
      tree = resource_tree_create (D.28055);
      size = 0;
      i = 0;
      goto <D.20547>;
      <D.20546>:
      D.28055 = assemblyb->win32_resources;
      D.28058 = (long unsigned int) i;
      win32_res = mono_array_addr_with_size (D.28055, 24, D.28058);
      D.28059 = win32_res->res_data;
      D.28060 = mono_array_length (D.28059);
      D.28061 = (unsigned int) D.28060;
      size = D.28061 + size;
      i = i + 1;
      <D.20547>:
      D.28058 = (long unsigned int) i;
      D.28055 = assemblyb->win32_resources;
      D.28062 = mono_array_length (D.28055);
      if (D.28058 < D.28062) goto <D.20546>; else goto <D.20548>;
      <D.20548>:
      D.28055 = assemblyb->win32_resources;
      D.28063 = mono_array_length (D.28055);
      D.28064 = D.28063 * 256;
      D.28065 = (unsigned int) D.28064;
      size = D.28065 + size;
      D.28066 = (long unsigned int) size;
      buf = monoeg_malloc (D.28066);
      p = buf;
      p.191 = p;
      p.191 = p;
      resource_tree_encode (tree, p.191, p.191, &p);
      p.191 = p;
      p.192 = (long int) p.191;
      buf.193 = (long int) buf;
      D.28070 = p.192 - buf.193;
      D.28071 = (long int) size;
      D.28072 = D.28070 > D.28071;
      D.28073 = (long int) D.28072;
      D.28074 = __builtin_expect (D.28073, 0);
      if (D.28074 != 0) goto <D.28075>; else goto <D.28076>;
      <D.28075>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5585, "p - buf <= size");
      <D.28076>:
      p.191 = p;
      p.192 = (long int) p.191;
      buf.193 = (long int) buf;
      D.28070 = p.192 - buf.193;
      D.28077 = (long unsigned int) D.28070;
      D.28078 = monoeg_malloc (D.28077);
      assembly->win32_res = D.28078;
      p.191 = p;
      p.192 = (long int) p.191;
      buf.193 = (long int) buf;
      D.28070 = p.192 - buf.193;
      D.28079 = (unsigned int) D.28070;
      assembly->win32_res_size = D.28079;
      D.28080 = assembly->win32_res;
      p.191 = p;
      p.192 = (long int) p.191;
      buf.193 = (long int) buf;
      D.28070 = p.192 - buf.193;
      D.28081 = (long unsigned int) D.28070;
      memcpy (D.28080, buf, D.28081);
      monoeg_g_free (buf);
      resource_tree_free (tree);
    }
  finally
    {
      p = {CLOBBER};
    }
}


resource_tree_create (struct MonoArray * win32_resources)
{
  long unsigned int D.28085;
  unsigned int D.28086;
  void * D.28087;
  unsigned int D.28088;
  unsigned int D.28089;
  struct GSList * D.28094;
  struct GSList * D.28095;
  unsigned int D.28096;
  struct GSList * D.28101;
  struct GSList * D.28102;
  struct GSList * D.28103;
  struct GSList * D.28104;
  long unsigned int D.28105;
  struct ResTreeNode * D.28106;
  struct ResTreeNode * tree;
  struct ResTreeNode * res_node;
  struct ResTreeNode * type_node;
  struct ResTreeNode * lang_node;
  struct GSList * l;
  int i;

  tree = monoeg_malloc0 (24);
  i = 0;
  goto <D.20506>;
  <D.20505>:
  {
    struct MonoReflectionWin32Resource * win32_res;

    D.28085 = (long unsigned int) i;
    win32_res = mono_array_addr_with_size (win32_resources, 24, D.28085);
    lang_node = monoeg_malloc0 (24);
    D.28086 = win32_res->lang_id;
    lang_node->id = D.28086;
    lang_node->win32_res = win32_res;
    type_node = 0B;
    l = tree->children;
    goto <D.20501>;
    <D.20500>:
    D.28087 = l->data;
    D.28088 = MEM[(struct ResTreeNode *)D.28087].id;
    D.28089 = win32_res->res_type;
    if (D.28088 == D.28089) goto <D.28090>; else goto <D.28091>;
    <D.28090>:
    type_node = l->data;
    goto <D.20499>;
    <D.28091>:
    l = l->next;
    <D.20501>:
    if (l != 0B) goto <D.20500>; else goto <D.20499>;
    <D.20499>:
    if (type_node == 0B) goto <D.28092>; else goto <D.28093>;
    <D.28092>:
    type_node = monoeg_malloc0 (24);
    D.28089 = win32_res->res_type;
    type_node->id = D.28089;
    D.28094 = tree->children;
    D.28095 = monoeg_g_slist_insert_sorted (D.28094, type_node, resource_tree_compare_by_id);
    tree->children = D.28095;
    <D.28093>:
    res_node = 0B;
    l = type_node->children;
    goto <D.20504>;
    <D.20503>:
    D.28087 = l->data;
    D.28088 = MEM[(struct ResTreeNode *)D.28087].id;
    D.28096 = win32_res->res_id;
    if (D.28088 == D.28096) goto <D.28097>; else goto <D.28098>;
    <D.28097>:
    res_node = l->data;
    goto <D.20502>;
    <D.28098>:
    l = l->next;
    <D.20504>:
    if (l != 0B) goto <D.20503>; else goto <D.20502>;
    <D.20502>:
    if (res_node == 0B) goto <D.28099>; else goto <D.28100>;
    <D.28099>:
    res_node = monoeg_malloc0 (24);
    D.28096 = win32_res->res_id;
    res_node->id = D.28096;
    D.28101 = type_node->children;
    D.28102 = monoeg_g_slist_append (D.28101, res_node);
    type_node->children = D.28102;
    <D.28100>:
    D.28103 = res_node->children;
    D.28104 = monoeg_g_slist_append (D.28103, lang_node);
    res_node->children = D.28104;
  }
  i = i + 1;
  <D.20506>:
  D.28085 = (long unsigned int) i;
  D.28105 = mono_array_length (win32_resources);
  if (D.28085 < D.28105) goto <D.20505>; else goto <D.20507>;
  <D.20507>:
  D.28106 = tree;
  return D.28106;
}


resource_tree_compare_by_id (const void * a, const void * b)
{
  int D.28108;
  unsigned int D.28109;
  unsigned int D.28110;
  unsigned int D.28111;
  struct ResTreeNode * t1;
  struct ResTreeNode * t2;

  t1 = a;
  t2 = b;
  D.28109 = t1->id;
  D.28110 = t2->id;
  D.28111 = D.28109 - D.28110;
  D.28108 = (int) D.28111;
  return D.28108;
}


resource_tree_encode (struct ResTreeNode * node, char * begin, char * p, char * * endbuf)
{
  char * p.194;
  long int p.195;
  long int begin.196;
  long int D.28122;
  unsigned int D.28123;
  struct GSList * D.28124;
  short unsigned int D.28125;
  short unsigned int D.28126;
  signed short D.28127;
  int D.28128;
  int D.28129;
  signed short D.28130;
  signed short D.28131;
  short unsigned int D.28132;
  char * p.197;
  long unsigned int D.28134;
  long unsigned int D.28135;
  char * p.198;
  struct MonoReflectionWin32Resource * D.28137;
  unsigned int D.28140;
  unsigned int D.28141;
  unsigned int D.28142;
  unsigned int D.28143;
  unsigned int D.28144;
  unsigned int D.28145;
  unsigned int D.28146;
  unsigned int D.28147;
  unsigned int D.28148;
  unsigned int D.28149;
  unsigned int D.28150;
  struct MonoArray * D.28151;
  long unsigned int D.28152;
  unsigned int D.28153;
  unsigned int D.28154;
  unsigned int D.28155;
  unsigned int D.28156;
  unsigned int D.28157;
  unsigned int D.28158;
  unsigned int D.28159;
  unsigned int D.28160;
  unsigned int D.28161;
  char * D.28162;
  long unsigned int D.28163;
  sizetype D.28164;
  char * p.199;
  unsigned int D.28167;
  unsigned int D.28168;
  unsigned int D.28169;
  unsigned int D.28170;
  unsigned int D.28171;
  unsigned int D.28172;
  unsigned int D.28173;
  unsigned int D.28174;
  unsigned int D.28175;
  unsigned int D.28176;
  unsigned int D.28177;
  unsigned int iftmp.200;
  struct MonoReflectionWin32Resource * D.28179;
  unsigned int D.28183;
  unsigned int D.28184;
  unsigned int D.28185;
  unsigned int D.28186;
  unsigned int iftmp.201;
  unsigned int D.28191;
  unsigned int D.28192;
  unsigned int D.28193;
  unsigned int D.28194;
  unsigned int iftmp.202;
  unsigned int D.28199;
  unsigned int D.28200;
  unsigned int D.28201;
  unsigned int D.28202;
  unsigned int iftmp.203;
  unsigned int D.28207;
  unsigned int D.28208;
  unsigned int D.28209;
  char * entries;
  struct MonoPEResourceDir dir;
  struct MonoPEResourceDirEntry dir_entry;
  struct MonoPEResourceDataEntry data_entry;
  struct GSList * l;
  guint32 res_id_entries;

  try
    {
      memset (&dir, 0, 16);
      memset (&dir_entry, 0, 8);
      memset (&data_entry, 0, 16);
      if (0 != 0) goto <D.28113>; else goto <D.28114>;
      <D.28113>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5486, "sizeof (dir) == 16");
      <D.28114>:
      if (0 != 0) goto <D.28115>; else goto <D.28116>;
      <D.28115>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5487, "sizeof (dir_entry) == 8");
      <D.28116>:
      if (0 != 0) goto <D.28117>; else goto <D.28118>;
      <D.28117>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5488, "sizeof (data_entry) == 16");
      <D.28118>:
      p.194 = p;
      p.195 = (long int) p.194;
      begin.196 = (long int) begin;
      D.28122 = p.195 - begin.196;
      D.28123 = (unsigned int) D.28122;
      node->offset = D.28123;
      D.28124 = node->children;
      res_id_entries = monoeg_g_slist_length (D.28124);
      D.28125 = (short unsigned int) res_id_entries;
      D.28126 = D.28125 >> 8;
      D.28127 = (signed short) D.28126;
      D.28125 = (short unsigned int) res_id_entries;
      D.28128 = (int) D.28125;
      D.28129 = D.28128 << 8;
      D.28130 = (signed short) D.28129;
      D.28131 = D.28127 | D.28130;
      D.28132 = (short unsigned int) D.28131;
      dir.res_id_entries = D.28132;
      p.194 = p;
      memcpy (p.194, &dir, 16);
      p.194 = p;
      p.197 = p.194 + 16;
      p = p.197;
      entries = p;
      p.194 = p;
      D.28134 = (long unsigned int) res_id_entries;
      D.28135 = D.28134 * 8;
      p.198 = p.194 + D.28135;
      p = p.198;
      l = node->children;
      goto <D.20523>;
      <D.20522>:
      {
        struct ResTreeNode * child;

        child = l->data;
        D.28137 = child->win32_res;
        if (D.28137 != 0B) goto <D.28138>; else goto <D.28139>;
        <D.28138>:
        {
          guint32 size;

          p.194 = p;
          p.195 = (long int) p.194;
          begin.196 = (long int) begin;
          D.28122 = p.195 - begin.196;
          D.28123 = (unsigned int) D.28122;
          child->offset = D.28123;
          p.194 = p;
          p.195 = (long int) p.194;
          begin.196 = (long int) begin;
          D.28122 = p.195 - begin.196;
          D.28140 = (unsigned int) D.28122;
          D.28141 = D.28140 + 16;
          D.28142 = D.28141 << 24;
          p.194 = p;
          p.195 = (long int) p.194;
          begin.196 = (long int) begin;
          D.28122 = p.195 - begin.196;
          D.28140 = (unsigned int) D.28122;
          D.28141 = D.28140 + 16;
          D.28143 = D.28141 >> 8;
          D.28144 = D.28143 & 65280;
          D.28145 = D.28142 | D.28144;
          p.194 = p;
          p.195 = (long int) p.194;
          begin.196 = (long int) begin;
          D.28122 = p.195 - begin.196;
          D.28140 = (unsigned int) D.28122;
          D.28141 = D.28140 + 16;
          D.28146 = D.28141 << 8;
          D.28147 = D.28146 & 16711680;
          D.28148 = D.28145 | D.28147;
          p.194 = p;
          p.195 = (long int) p.194;
          begin.196 = (long int) begin;
          D.28122 = p.195 - begin.196;
          D.28140 = (unsigned int) D.28122;
          D.28141 = D.28140 + 16;
          D.28149 = D.28141 >> 24;
          D.28150 = D.28148 | D.28149;
          data_entry.rde_data_offset = D.28150;
          D.28137 = child->win32_res;
          D.28151 = D.28137->res_data;
          D.28152 = mono_array_length (D.28151);
          size = (guint32) D.28152;
          D.28153 = size << 24;
          D.28154 = size >> 8;
          D.28155 = D.28154 & 65280;
          D.28156 = D.28153 | D.28155;
          D.28157 = size << 8;
          D.28158 = D.28157 & 16711680;
          D.28159 = D.28156 | D.28158;
          D.28160 = size >> 24;
          D.28161 = D.28159 | D.28160;
          data_entry.rde_size = D.28161;
          p.194 = p;
          memcpy (p.194, &data_entry, 16);
          p.194 = p;
          p.197 = p.194 + 16;
          p = p.197;
          p.194 = p;
          D.28137 = child->win32_res;
          D.28151 = D.28137->res_data;
          D.28162 = mono_array_addr_with_size (D.28151, 1, 0);
          D.28163 = (long unsigned int) size;
          memcpy (p.194, D.28162, D.28163);
          p.194 = p;
          D.28164 = (sizetype) size;
          p.199 = p.194 + D.28164;
          p = p.199;
        }
        goto <D.28166>;
        <D.28139>:
        p.194 = p;
        resource_tree_encode (child, begin, p.194, &p);
        <D.28166>:
      }
      l = l->next;
      <D.20523>:
      if (l != 0B) goto <D.20522>; else goto <D.20524>;
      <D.20524>:
      l = node->children;
      goto <D.20527>;
      <D.20526>:
      {
        struct ResTreeNode * child;

        child = l->data;
        D.28167 = child->id;
        D.28168 = D.28167 << 24;
        D.28167 = child->id;
        D.28169 = D.28167 >> 8;
        D.28170 = D.28169 & 65280;
        D.28171 = D.28168 | D.28170;
        D.28167 = child->id;
        D.28172 = D.28167 << 8;
        D.28173 = D.28172 & 16711680;
        D.28174 = D.28171 | D.28173;
        D.28167 = child->id;
        D.28175 = D.28167 >> 24;
        D.28176 = D.28175 & 127;
        D.28177 = D.28174 | D.28176;
        dir_entry.name = D.28177;
        D.28179 = child->win32_res;
        if (D.28179 == 0B) goto <D.28180>; else goto <D.28181>;
        <D.28180>:
        iftmp.200 = 2147483648;
        goto <D.28182>;
        <D.28181>:
        iftmp.200 = 0;
        <D.28182>:
        D.28183 = child->offset;
        D.28184 = D.28183 & 2147483647;
        D.28185 = iftmp.200 | D.28184;
        D.28186 = D.28185 << 24;
        D.28179 = child->win32_res;
        if (D.28179 == 0B) goto <D.28188>; else goto <D.28189>;
        <D.28188>:
        iftmp.201 = 2147483648;
        goto <D.28190>;
        <D.28189>:
        iftmp.201 = 0;
        <D.28190>:
        D.28183 = child->offset;
        D.28184 = D.28183 & 2147483647;
        D.28191 = iftmp.201 | D.28184;
        D.28192 = D.28191 >> 8;
        D.28193 = D.28192 & 65280;
        D.28194 = D.28186 | D.28193;
        D.28179 = child->win32_res;
        if (D.28179 == 0B) goto <D.28196>; else goto <D.28197>;
        <D.28196>:
        iftmp.202 = 2147483648;
        goto <D.28198>;
        <D.28197>:
        iftmp.202 = 0;
        <D.28198>:
        D.28183 = child->offset;
        D.28184 = D.28183 & 2147483647;
        D.28199 = iftmp.202 | D.28184;
        D.28200 = D.28199 << 8;
        D.28201 = D.28200 & 16711680;
        D.28202 = D.28194 | D.28201;
        D.28179 = child->win32_res;
        if (D.28179 == 0B) goto <D.28204>; else goto <D.28205>;
        <D.28204>:
        iftmp.203 = 2147483648;
        goto <D.28206>;
        <D.28205>:
        iftmp.203 = 0;
        <D.28206>:
        D.28183 = child->offset;
        D.28184 = D.28183 & 2147483647;
        D.28207 = iftmp.203 | D.28184;
        D.28208 = D.28207 >> 24;
        D.28209 = D.28202 | D.28208;
        dir_entry.dir = D.28209;
        memcpy (entries, &dir_entry, 8);
        entries = entries + 8;
      }
      l = l->next;
      <D.20527>:
      if (l != 0B) goto <D.20526>; else goto <D.20528>;
      <D.20528>:
      p.194 = p;
      *endbuf = p.194;
    }
  finally
    {
      dir = {CLOBBER};
      dir_entry = {CLOBBER};
      data_entry = {CLOBBER};
    }
}


resource_tree_free (struct ResTreeNode * node)
{
  void * D.28210;
  struct GSList * D.28211;
  struct GSList * list;

  list = node->children;
  goto <D.20534>;
  <D.20533>:
  D.28210 = list->data;
  resource_tree_free (D.28210);
  list = list->next;
  <D.20534>:
  if (list != 0B) goto <D.20533>; else goto <D.20535>;
  <D.20535>:
  D.28211 = node->children;
  monoeg_g_slist_free (D.28211);
  monoeg_g_free (node);
}


calc_section_size (struct MonoDynamicImage * assembly)
{
  struct MonoDynamicStream * D.28212;
  unsigned int D.28213;
  unsigned int D.28214;
  unsigned int D.28215;
  _Bool D.28216;
  long int D.28217;
  long int D.28218;
  unsigned int D.28221;
  unsigned int D.28222;
  unsigned int D.28223;
  struct MonoDynamicStream * D.28224;
  unsigned int D.28225;
  unsigned int D.28226;
  unsigned int D.28227;
  _Bool D.28228;
  long int D.28229;
  long int D.28230;
  unsigned int D.28233;
  unsigned int D.28234;
  unsigned int D.28235;
  unsigned int D.28236;
  char * D.28237;
  unsigned int D.28240;
  unsigned int D.28241;
  int D.28242;
  int nsections;

  nsections = 0;
  D.28212 = &assembly->code;
  D.28213 = assembly->code.index;
  D.28214 = D.28213 & 3;
  D.28215 = 4 - D.28214;
  mono_image_add_stream_zero (D.28212, D.28215);
  D.28213 = assembly->code.index;
  D.28214 = D.28213 & 3;
  D.28216 = D.28214 != 0;
  D.28217 = (long int) D.28216;
  D.28218 = __builtin_expect (D.28217, 0);
  if (D.28218 != 0) goto <D.28219>; else goto <D.28220>;
  <D.28219>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5355, "(assembly->code.index % 4) == 0");
  <D.28220>:
  D.28221 = assembly->meta_size;
  D.28222 = D.28221 + 3;
  assembly->meta_size = D.28222;
  D.28221 = assembly->meta_size;
  D.28223 = D.28221 & 4294967292;
  assembly->meta_size = D.28223;
  D.28224 = &assembly->resources;
  D.28225 = assembly->resources.index;
  D.28226 = D.28225 & 3;
  D.28227 = 4 - D.28226;
  mono_image_add_stream_zero (D.28224, D.28227);
  D.28225 = assembly->resources.index;
  D.28226 = D.28225 & 3;
  D.28228 = D.28226 != 0;
  D.28229 = (long int) D.28228;
  D.28230 = __builtin_expect (D.28229, 0);
  if (D.28230 != 0) goto <D.28231>; else goto <D.28232>;
  <D.28231>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 5359, "(assembly->resources.index % 4) == 0");
  <D.28232>:
  D.28221 = assembly->meta_size;
  D.28213 = assembly->code.index;
  D.28233 = D.28221 + D.28213;
  D.28225 = assembly->resources.index;
  D.28234 = D.28233 + D.28225;
  D.28235 = assembly->strong_name_size;
  D.28236 = D.28234 + D.28235;
  assembly->sections[0].size = D.28236;
  assembly->sections[0].attrs = 1610612768;
  nsections = nsections + 1;
  D.28237 = assembly->win32_res;
  if (D.28237 != 0B) goto <D.28238>; else goto <D.28239>;
  <D.28238>:
  {
    guint32 res_size;

    D.28240 = assembly->win32_res_size;
    D.28241 = D.28240 + 3;
    res_size = D.28241 & 4294967292;
    assembly->sections[1].size = res_size;
    assembly->sections[1].attrs = 1073741888;
    nsections = nsections + 1;
  }
  <D.28239>:
  assembly->sections[2].size = 12;
  assembly->sections[2].attrs = 1107296320;
  nsections = nsections + 1;
  D.28242 = nsections;
  return D.28242;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
strcpy (char * restrict __dest, const char * restrict __src)
{
  char * D.28244;
  long unsigned int D.28245;

  D.28245 = __builtin_object_size (__dest, 1);
  D.28244 = __builtin___strcpy_chk (__dest, __src, D.28245);
  return D.28244;
}


fixup_resource_directory (char * res_section, char * p, guint32 rva)
{
  unsigned int D.28247;
  unsigned int D.28248;
  unsigned int D.28249;
  unsigned int D.28250;
  unsigned int D.28251;
  unsigned int D.28252;
  unsigned int D.28253;
  unsigned int D.28254;
  unsigned int D.28255;
  unsigned int D.28256;
  sizetype D.28257;
  sizetype D.28258;
  signed int D.28259;
  unsigned int D.28263;
  unsigned int D.28264;
  unsigned int D.28265;
  unsigned int D.28266;
  unsigned int D.28267;
  unsigned int D.28268;
  unsigned int D.28269;
  unsigned int D.28270;
  unsigned int D.28271;
  unsigned int D.28272;
  unsigned int D.28273;
  unsigned int D.28274;
  unsigned int D.28275;
  unsigned int D.28276;
  unsigned int D.28277;
  unsigned int D.28278;
  unsigned int D.28279;
  unsigned int D.28280;
  unsigned int D.28281;
  unsigned int D.28282;
  short unsigned int D.28283;
  short unsigned int D.28284;
  int D.28285;
  int D.28286;
  int D.28287;
  int D.28288;
  int D.28289;
  short unsigned int D.28290;
  short unsigned int D.28291;
  int D.28292;
  int D.28293;
  int D.28294;
  int D.28295;
  int D.28296;
  int D.28297;
  struct MonoPEResourceDir * dir;
  int i;

  dir = p;
  p = p + 16;
  i = 0;
  goto <D.20560>;
  <D.20559>:
  {
    struct MonoPEResourceDirEntry * dir_entry;
    char * child;

    dir_entry = p;
    D.28247 = dir_entry->dir;
    D.28248 = D.28247 << 24;
    D.28247 = dir_entry->dir;
    D.28249 = D.28247 >> 8;
    D.28250 = D.28249 & 65280;
    D.28251 = D.28248 | D.28250;
    D.28247 = dir_entry->dir;
    D.28252 = D.28247 << 8;
    D.28253 = D.28252 & 16711680;
    D.28254 = D.28251 | D.28253;
    D.28247 = dir_entry->dir;
    D.28255 = D.28247 >> 24;
    D.28256 = D.28254 | D.28255;
    D.28257 = (sizetype) D.28256;
    D.28258 = D.28257 & 2147483647;
    child = res_section + D.28258;
    D.28247 = dir_entry->dir;
    D.28248 = D.28247 << 24;
    D.28247 = dir_entry->dir;
    D.28249 = D.28247 >> 8;
    D.28250 = D.28249 & 65280;
    D.28251 = D.28248 | D.28250;
    D.28247 = dir_entry->dir;
    D.28252 = D.28247 << 8;
    D.28253 = D.28252 & 16711680;
    D.28254 = D.28251 | D.28253;
    D.28247 = dir_entry->dir;
    D.28255 = D.28247 >> 24;
    D.28256 = D.28254 | D.28255;
    D.28259 = (signed int) D.28256;
    if (D.28259 < 0) goto <D.28260>; else goto <D.28261>;
    <D.28260>:
    fixup_resource_directory (res_section, child, rva);
    goto <D.28262>;
    <D.28261>:
    {
      struct MonoPEResourceDataEntry * data_entry;

      data_entry = child;
      D.28263 = data_entry->rde_data_offset;
      D.28264 = D.28263 << 24;
      D.28263 = data_entry->rde_data_offset;
      D.28265 = D.28263 >> 8;
      D.28266 = D.28265 & 65280;
      D.28267 = D.28264 | D.28266;
      D.28263 = data_entry->rde_data_offset;
      D.28268 = D.28263 << 8;
      D.28269 = D.28268 & 16711680;
      D.28270 = D.28267 | D.28269;
      D.28263 = data_entry->rde_data_offset;
      D.28271 = D.28263 >> 24;
      D.28272 = D.28270 | D.28271;
      D.28273 = D.28272 + rva;
      D.28274 = D.28273 << 24;
      D.28263 = data_entry->rde_data_offset;
      D.28264 = D.28263 << 24;
      D.28263 = data_entry->rde_data_offset;
      D.28265 = D.28263 >> 8;
      D.28266 = D.28265 & 65280;
      D.28267 = D.28264 | D.28266;
      D.28263 = data_entry->rde_data_offset;
      D.28268 = D.28263 << 8;
      D.28269 = D.28268 & 16711680;
      D.28270 = D.28267 | D.28269;
      D.28263 = data_entry->rde_data_offset;
      D.28271 = D.28263 >> 24;
      D.28272 = D.28270 | D.28271;
      D.28273 = D.28272 + rva;
      D.28275 = D.28273 >> 8;
      D.28276 = D.28275 & 65280;
      D.28277 = D.28274 | D.28276;
      D.28263 = data_entry->rde_data_offset;
      D.28264 = D.28263 << 24;
      D.28263 = data_entry->rde_data_offset;
      D.28265 = D.28263 >> 8;
      D.28266 = D.28265 & 65280;
      D.28267 = D.28264 | D.28266;
      D.28263 = data_entry->rde_data_offset;
      D.28268 = D.28263 << 8;
      D.28269 = D.28268 & 16711680;
      D.28270 = D.28267 | D.28269;
      D.28263 = data_entry->rde_data_offset;
      D.28271 = D.28263 >> 24;
      D.28272 = D.28270 | D.28271;
      D.28273 = D.28272 + rva;
      D.28278 = D.28273 << 8;
      D.28279 = D.28278 & 16711680;
      D.28280 = D.28277 | D.28279;
      D.28263 = data_entry->rde_data_offset;
      D.28264 = D.28263 << 24;
      D.28263 = data_entry->rde_data_offset;
      D.28265 = D.28263 >> 8;
      D.28266 = D.28265 & 65280;
      D.28267 = D.28264 | D.28266;
      D.28263 = data_entry->rde_data_offset;
      D.28268 = D.28263 << 8;
      D.28269 = D.28268 & 16711680;
      D.28270 = D.28267 | D.28269;
      D.28263 = data_entry->rde_data_offset;
      D.28271 = D.28263 >> 24;
      D.28272 = D.28270 | D.28271;
      D.28273 = D.28272 + rva;
      D.28281 = D.28273 >> 24;
      D.28282 = D.28280 | D.28281;
      data_entry->rde_data_offset = D.28282;
    }
    <D.28262>:
    p = p + 8;
  }
  i = i + 1;
  <D.20560>:
  D.28283 = dir->res_named_entries;
  D.28284 = D.28283 >> 8;
  D.28285 = (int) D.28284;
  D.28283 = dir->res_named_entries;
  D.28286 = (int) D.28283;
  D.28287 = D.28286 << 8;
  D.28288 = D.28287 & 65535;
  D.28289 = D.28285 | D.28288;
  D.28290 = dir->res_id_entries;
  D.28291 = D.28290 >> 8;
  D.28292 = (int) D.28291;
  D.28290 = dir->res_id_entries;
  D.28293 = (int) D.28290;
  D.28294 = D.28293 << 8;
  D.28295 = D.28294 & 65535;
  D.28296 = D.28292 | D.28295;
  D.28297 = D.28289 + D.28296;
  if (D.28297 > i) goto <D.20559>; else goto <D.20561>;
  <D.20561>:
}


checked_write_file (void * f, const void * buffer, guint32 numbytes)
{
  int D.28298;
  unsigned int D.28301;
  guint32 dummy;

  try
    {
      D.28298 = WriteFile (f, buffer, numbytes, &dummy, 0B);
      if (D.28298 == 0) goto <D.28299>; else goto <D.28300>;
      <D.28299>:
      D.28301 = GetLastError ();
      monoeg_g_log (0B, 4, "WriteFile returned %d\n", D.28301);
      <D.20568>:
      goto <D.20568>;
      <D.28300>:
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_image_load_module_dynamic (struct MonoReflectionAssemblyBuilder * ab, struct MonoString * fileName)
{
  <unnamed type> status.204;
  struct MonoAssembly * D.28308;
  struct MonoImage * D.28309;
  unsigned int D.28310;
  long unsigned int D.28311;
  long unsigned int D.28312;
  long unsigned int D.28313;
  struct MonoImage * * D.28314;
  long unsigned int D.28317;
  long unsigned int D.28318;
  gboolean * D.28319;
  long unsigned int D.28322;
  struct MonoImage * * D.28323;
  gboolean * D.28324;
  unsigned int D.28325;
  unsigned int D.28326;
  struct MonoException * D.28329;
  struct MonoReflectionModule * D.28330;
  struct MonoDomain * D.28331;
  char * name;
  struct MonoImage * image;
  MonoImageOpenStatus status;
  struct MonoDynamicAssembly * assembly;
  guint32 module_count;
  struct MonoImage * * new_modules;
  gboolean * new_modules_loaded;

  try
    {
      name = mono_string_to_utf8 (fileName);
      image = mono_image_open (name, &status);
      if (image == 0B) goto <D.28302>; else goto <D.28303>;
      <D.28302>:
      {
        struct MonoException * exc;

        status.204 = status;
        if (status.204 == 1) goto <D.28305>; else goto <D.28306>;
        <D.28305>:
        exc = mono_get_exception_file_not_found (fileName);
        goto <D.28307>;
        <D.28306>:
        exc = mono_get_exception_bad_image_format (name);
        <D.28307>:
        monoeg_g_free (name);
        mono_raise_exception (exc);
      }
      <D.28303>:
      monoeg_g_free (name);
      assembly = ab->dynamic_assembly;
      image->assembly = assembly;
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      module_count = D.28309->module_count;
      D.28310 = module_count + 1;
      D.28311 = (long unsigned int) D.28310;
      D.28312 = D.28311 * 8;
      new_modules = monoeg_malloc0 (D.28312);
      D.28310 = module_count + 1;
      D.28311 = (long unsigned int) D.28310;
      D.28313 = D.28311 * 4;
      new_modules_loaded = monoeg_malloc0 (D.28313);
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28314 = D.28309->modules;
      if (D.28314 != 0B) goto <D.28315>; else goto <D.28316>;
      <D.28315>:
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28314 = D.28309->modules;
      D.28317 = (long unsigned int) module_count;
      D.28318 = D.28317 * 8;
      memcpy (new_modules, D.28314, D.28318);
      <D.28316>:
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28319 = D.28309->modules_loaded;
      if (D.28319 != 0B) goto <D.28320>; else goto <D.28321>;
      <D.28320>:
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28319 = D.28309->modules_loaded;
      D.28317 = (long unsigned int) module_count;
      D.28322 = D.28317 * 4;
      memcpy (new_modules_loaded, D.28319, D.28322);
      <D.28321>:
      D.28317 = (long unsigned int) module_count;
      D.28318 = D.28317 * 8;
      D.28323 = new_modules + D.28318;
      *D.28323 = image;
      D.28317 = (long unsigned int) module_count;
      D.28322 = D.28317 * 4;
      D.28324 = new_modules_loaded + D.28322;
      *D.28324 = 1;
      mono_image_addref (image);
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28314 = D.28309->modules;
      monoeg_g_free (D.28314);
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28309->modules = new_modules;
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28309->modules_loaded = new_modules_loaded;
      D.28308 = image->assembly;
      D.28309 = D.28308->image;
      D.28325 = D.28309->module_count;
      D.28326 = D.28325 + 1;
      D.28309->module_count = D.28326;
      mono_assembly_load_references (image, &status);
      status.204 = status;
      if (status.204 != 0) goto <D.28327>; else goto <D.28328>;
      <D.28327>:
      mono_image_close (image);
      D.28329 = mono_get_exception_file_not_found (fileName);
      mono_raise_exception (D.28329);
      <D.28328>:
      D.28331 = mono_domain_get ();
      D.28330 = mono_module_get_object (D.28331, image);
      return D.28330;
    }
  finally
    {
      status = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_cleanup_domain (struct MonoDomain * domain)
{
  struct MonoGHashTable * D.28334;

  D.28334 = domain->refobject_hash;
  if (D.28334 != 0B) goto <D.28335>; else goto <D.28336>;
  <D.28335>:
  D.28334 = domain->refobject_hash;
  mono_g_hash_table_destroy (D.28334);
  domain->refobject_hash = 0B;
  <D.28336>:
}


__attribute__((visibility ("hidden")))
mono_image_module_basic_init (struct MonoReflectionModuleBuilder * moduleb)
{
  struct MonoString * D.28339;
  struct MonoString * D.28340;
  int D.28341;
  struct MonoDynamicAssembly * D.28344;
  struct MonoImage * D.28345;
  struct MonoVTable * D.28346;
  struct MonoDomain * D.28347;
  unsigned int D.28348;
  int D.28349;
  long unsigned int D.28350;
  long unsigned int D.28351;
  struct MonoImage * * D.28352;
  long unsigned int D.28355;
  long unsigned int D.28356;
  struct MonoImage * * D.28357;
  unsigned int D.28358;
  struct MonoDynamicImage * image;
  struct MonoReflectionAssemblyBuilder * ab;

  image = moduleb->dynamic_image;
  ab = moduleb->assemblyb;
  if (image == 0B) goto <D.28337>; else goto <D.28338>;
  <D.28337>:
  {
    struct MonoError error;
    int module_count;
    struct MonoImage * * new_modules;
    struct MonoImage * ass;
    char * name;
    char * fqname;

    try
      {
        D.28339 = ab->name;
        name = mono_string_to_utf8 (D.28339);
        D.28340 = moduleb->module.fqname;
        fqname = mono_string_to_utf8_checked (D.28340, &error);
        D.28341 = mono_error_ok (&error);
        if (D.28341 == 0) goto <D.28342>; else goto <D.28343>;
        <D.28342>:
        monoeg_g_free (name);
        mono_error_raise_exception (&error);
        <D.28343>:
        D.28344 = ab->dynamic_assembly;
        image = create_dynamic_mono_image (D.28344, name, fqname);
        D.28345 = &image->image;
        moduleb->module.image = D.28345;
        moduleb->dynamic_image = image;
        D.28346 = MEM[(struct MonoObject *)moduleb].vtable;
        D.28347 = D.28346->domain;
        register_module (D.28347, moduleb, image);
        D.28344 = ab->dynamic_assembly;
        ass = D.28344->assembly.image;
        D.28348 = ass->module_count;
        module_count = (int) D.28348;
        D.28349 = module_count + 1;
        D.28350 = (long unsigned int) D.28349;
        D.28351 = D.28350 * 8;
        new_modules = monoeg_malloc0 (D.28351);
        D.28352 = ass->modules;
        if (D.28352 != 0B) goto <D.28353>; else goto <D.28354>;
        <D.28353>:
        D.28352 = ass->modules;
        D.28355 = (long unsigned int) module_count;
        D.28356 = D.28355 * 8;
        memcpy (new_modules, D.28352, D.28356);
        <D.28354>:
        D.28355 = (long unsigned int) module_count;
        D.28356 = D.28355 * 8;
        D.28357 = new_modules + D.28356;
        D.28345 = &image->image;
        *D.28357 = D.28345;
        D.28345 = &image->image;
        mono_image_addref (D.28345);
        D.28352 = ass->modules;
        monoeg_g_free (D.28352);
        ass->modules = new_modules;
        D.28348 = ass->module_count;
        D.28358 = D.28348 + 1;
        ass->module_count = D.28358;
      }
    finally
      {
        error = {CLOBBER};
      }
  }
  <D.28338>:
}


register_module (struct MonoDomain * domain, struct MonoReflectionModuleBuilder * res, struct MonoDynamicImage * module)
{
  union mono_mutex_t * D.28359;
  _Bool D.28362;
  long int D.28363;
  long int D.28364;
  struct MonoGHashTable * D.28367;
  struct MonoGHashTable * D.28370;
  struct MonoMemPool * D.28373;
  _Bool D.28376;
  long int D.28377;
  long int D.28378;
  void * D.28381;

  {
    struct MonoReflectionModuleBuilder * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = module;
        pe.refclass = 0B;
        {
          int ret;

          D.28359 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28359);
          if (ret != 0) goto <D.28360>; else goto <D.28361>;
          <D.28360>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28361>:
          D.28362 = ret != 0;
          D.28363 = (long int) D.28362;
          D.28364 = __builtin_expect (D.28363, 0);
          if (D.28364 != 0) goto <D.28365>; else goto <D.28366>;
          <D.28365>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6173, "ret == 0");
          <D.28366>:
        }
        D.28367 = domain->refobject_hash;
        if (D.28367 == 0B) goto <D.28368>; else goto <D.28369>;
        <D.28368>:
        D.28370 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28370;
        <D.28369>:
        D.28367 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28367, &pe);
        if (_obj == 0B) goto <D.28371>; else goto <D.28372>;
        <D.28371>:
        {
          struct ReflectedEntry * e;

          D.28373 = domain->mp;
          e = mono_mempool_alloc (D.28373, 16);
          e->item = module;
          e->refclass = 0B;
          D.28367 = domain->refobject_hash;
          mono_g_hash_table_insert (D.28367, e, res);
          _obj = res;
        }
        <D.28372>:
        {
          int ret;

          D.28359 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28359);
          if (ret != 0) goto <D.28374>; else goto <D.28375>;
          <D.28374>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28375>:
          D.28376 = ret != 0;
          D.28377 = (long int) D.28376;
          D.28378 = __builtin_expect (D.28377, 0);
          if (D.28378 != 0) goto <D.28379>; else goto <D.28380>;
          <D.28379>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6173, "ret == 0");
          <D.28380>:
        }
        D.28381 = _obj;
        return D.28381;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


__attribute__((visibility ("hidden")))
mono_image_set_wrappers_type (struct MonoReflectionModuleBuilder * moduleb, struct MonoReflectionType * type)
{
  struct MonoType * D.28384;
  _Bool D.28385;
  long int D.28386;
  long int D.28387;
  struct MonoClass * D.28390;
  struct MonoDynamicImage * image;

  image = moduleb->dynamic_image;
  D.28384 = type->type;
  D.28385 = D.28384 == 0B;
  D.28386 = (long int) D.28385;
  D.28387 = __builtin_expect (D.28386, 0);
  if (D.28387 != 0) goto <D.28388>; else goto <D.28389>;
  <D.28388>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6226, "type->type");
  <D.28389>:
  D.28384 = type->type;
  D.28390 = mono_class_from_mono_type (D.28384);
  image->wrappers_type = D.28390;
}


mono_assembly_get_object (struct MonoDomain * domain, struct MonoAssembly * assembly)
{
  union mono_mutex_t * D.28391;
  _Bool D.28394;
  long int D.28395;
  long int D.28396;
  struct MonoGHashTable * D.28399;
  struct MonoGHashTable * D.28402;
  _Bool D.28407;
  long int D.28408;
  long int D.28409;
  struct MonoReflectionAssembly * D.28412;
  _Bool D.28415;
  long int D.28416;
  long int D.28417;
  struct MonoClass * assembly_type.205;
  struct MonoImage * D.28423;
  _Bool D.28426;
  long int D.28427;
  long int D.28428;
  _Bool D.28433;
  long int D.28434;
  long int D.28435;
  struct MonoGHashTable * D.28440;
  struct MonoMemPool * D.28443;
  _Bool D.28446;
  long int D.28447;
  long int D.28448;
  static struct MonoClass * assembly_type;
  struct MonoReflectionAssembly * res;

  {
    struct MonoReflectionAssembly * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = assembly;
        e.refclass = 0B;
        {
          int ret;

          D.28391 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28391);
          if (ret != 0) goto <D.28392>; else goto <D.28393>;
          <D.28392>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28393>:
          D.28394 = ret != 0;
          D.28395 = (long int) D.28394;
          D.28396 = __builtin_expect (D.28395, 0);
          if (D.28396 != 0) goto <D.28397>; else goto <D.28398>;
          <D.28397>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6245, "ret == 0");
          <D.28398>:
        }
        D.28399 = domain->refobject_hash;
        if (D.28399 == 0B) goto <D.28400>; else goto <D.28401>;
        <D.28400>:
        D.28402 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28402;
        <D.28401>:
        D.28399 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28399, &e);
        if (_obj != 0B) goto <D.28403>; else goto <D.28404>;
        <D.28403>:
        {
          int ret;

          D.28391 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28391);
          if (ret != 0) goto <D.28405>; else goto <D.28406>;
          <D.28405>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28406>:
          D.28407 = ret != 0;
          D.28408 = (long int) D.28407;
          D.28409 = __builtin_expect (D.28408, 0);
          if (D.28409 != 0) goto <D.28410>; else goto <D.28411>;
          <D.28410>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6245, "ret == 0");
          <D.28411>:
        }
        D.28412 = _obj;
        return D.28412;
        <D.28404>:
        {
          int ret;

          D.28391 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28391);
          if (ret != 0) goto <D.28413>; else goto <D.28414>;
          <D.28413>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28414>:
          D.28415 = ret != 0;
          D.28416 = (long int) D.28415;
          D.28417 = __builtin_expect (D.28416, 0);
          if (D.28417 != 0) goto <D.28418>; else goto <D.28419>;
          <D.28418>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6245, "ret == 0");
          <D.28419>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  assembly_type.205 = assembly_type;
  if (assembly_type.205 == 0B) goto <D.28421>; else goto <D.28422>;
  <D.28421>:
  {
    struct MonoClass * class;

    D.28423 = mono_defaults.corlib;
    class = mono_class_from_name (D.28423, "System.Reflection", "MonoAssembly");
    if (class == 0B) goto <D.28424>; else goto <D.28425>;
    <D.28424>:
    D.28423 = mono_defaults.corlib;
    class = mono_class_from_name (D.28423, "System.Reflection", "Assembly");
    <D.28425>:
    D.28426 = class == 0B;
    D.28427 = (long int) D.28426;
    D.28428 = __builtin_expect (D.28427, 0);
    if (D.28428 != 0) goto <D.28429>; else goto <D.28430>;
    <D.28429>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6250, "class");
    <D.28430>:
    assembly_type = class;
  }
  <D.28422>:
  assembly_type.205 = assembly_type;
  res = mono_object_new (domain, assembly_type.205);
  res->assembly = assembly;
  {
    struct MonoReflectionAssembly * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = assembly;
        pe.refclass = 0B;
        {
          int ret;

          D.28391 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28391);
          if (ret != 0) goto <D.28431>; else goto <D.28432>;
          <D.28431>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28432>:
          D.28433 = ret != 0;
          D.28434 = (long int) D.28433;
          D.28435 = __builtin_expect (D.28434, 0);
          if (D.28435 != 0) goto <D.28436>; else goto <D.28437>;
          <D.28436>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6256, "ret == 0");
          <D.28437>:
        }
        D.28399 = domain->refobject_hash;
        if (D.28399 == 0B) goto <D.28438>; else goto <D.28439>;
        <D.28438>:
        D.28440 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28440;
        <D.28439>:
        D.28399 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28399, &pe);
        if (_obj == 0B) goto <D.28441>; else goto <D.28442>;
        <D.28441>:
        {
          struct ReflectedEntry * e;

          D.28443 = domain->mp;
          e = mono_mempool_alloc (D.28443, 16);
          e->item = assembly;
          e->refclass = 0B;
          D.28399 = domain->refobject_hash;
          mono_g_hash_table_insert (D.28399, e, res);
          _obj = res;
        }
        <D.28442>:
        {
          int ret;

          D.28391 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28391);
          if (ret != 0) goto <D.28444>; else goto <D.28445>;
          <D.28444>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28445>:
          D.28446 = ret != 0;
          D.28447 = (long int) D.28446;
          D.28448 = __builtin_expect (D.28447, 0);
          if (D.28448 != 0) goto <D.28449>; else goto <D.28450>;
          <D.28449>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6256, "ret == 0");
          <D.28450>:
        }
        D.28412 = _obj;
        return D.28412;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


mono_module_get_object (struct MonoDomain * domain, struct MonoImage * image)
{
  union mono_mutex_t * D.28455;
  _Bool D.28458;
  long int D.28459;
  long int D.28460;
  struct MonoGHashTable * D.28463;
  struct MonoGHashTable * D.28466;
  _Bool D.28471;
  long int D.28472;
  long int D.28473;
  struct MonoReflectionModule * D.28476;
  _Bool D.28479;
  long int D.28480;
  long int D.28481;
  struct MonoClass * module_type.206;
  struct MonoImage * D.28487;
  _Bool D.28490;
  long int D.28491;
  long int D.28492;
  struct MonoReflectionAssembly * * D.28495;
  struct MonoAssembly * D.28496;
  struct MonoReflectionAssembly * D.28497;
  struct MonoString * * D.28498;
  char * D.28499;
  struct MonoString * D.28500;
  struct MonoString * * D.28501;
  struct MonoString * D.28502;
  struct MonoString * * D.28503;
  const char * D.28504;
  struct MonoString * D.28505;
  struct MonoImage * D.28506;
  struct MonoImage * * D.28510;
  long unsigned int D.28513;
  long unsigned int D.28514;
  struct MonoImage * * D.28515;
  struct MonoImage * D.28516;
  int D.28519;
  int D.28520;
  unsigned int D.28521;
  unsigned int D.28522;
  unsigned int i.207;
  unsigned int D.28524;
  _Bool D.28525;
  long int D.28526;
  long int D.28527;
  _Bool D.28532;
  long int D.28533;
  long int D.28534;
  struct MonoGHashTable * D.28539;
  struct MonoMemPool * D.28542;
  _Bool D.28545;
  long int D.28546;
  long int D.28547;
  static struct MonoClass * module_type;
  struct MonoReflectionModule * res;
  char * basename;

  {
    struct MonoReflectionModule * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = image;
        e.refclass = 0B;
        {
          int ret;

          D.28455 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28455);
          if (ret != 0) goto <D.28456>; else goto <D.28457>;
          <D.28456>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28457>:
          D.28458 = ret != 0;
          D.28459 = (long int) D.28458;
          D.28460 = __builtin_expect (D.28459, 0);
          if (D.28460 != 0) goto <D.28461>; else goto <D.28462>;
          <D.28461>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6268, "ret == 0");
          <D.28462>:
        }
        D.28463 = domain->refobject_hash;
        if (D.28463 == 0B) goto <D.28464>; else goto <D.28465>;
        <D.28464>:
        D.28466 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28466;
        <D.28465>:
        D.28463 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28463, &e);
        if (_obj != 0B) goto <D.28467>; else goto <D.28468>;
        <D.28467>:
        {
          int ret;

          D.28455 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28455);
          if (ret != 0) goto <D.28469>; else goto <D.28470>;
          <D.28469>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28470>:
          D.28471 = ret != 0;
          D.28472 = (long int) D.28471;
          D.28473 = __builtin_expect (D.28472, 0);
          if (D.28473 != 0) goto <D.28474>; else goto <D.28475>;
          <D.28474>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6268, "ret == 0");
          <D.28475>:
        }
        D.28476 = _obj;
        return D.28476;
        <D.28468>:
        {
          int ret;

          D.28455 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28455);
          if (ret != 0) goto <D.28477>; else goto <D.28478>;
          <D.28477>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28478>:
          D.28479 = ret != 0;
          D.28480 = (long int) D.28479;
          D.28481 = __builtin_expect (D.28480, 0);
          if (D.28481 != 0) goto <D.28482>; else goto <D.28483>;
          <D.28482>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6268, "ret == 0");
          <D.28483>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  module_type.206 = module_type;
  if (module_type.206 == 0B) goto <D.28485>; else goto <D.28486>;
  <D.28485>:
  {
    struct MonoClass * class;

    D.28487 = mono_defaults.corlib;
    class = mono_class_from_name (D.28487, "System.Reflection", "MonoModule");
    if (class == 0B) goto <D.28488>; else goto <D.28489>;
    <D.28488>:
    D.28487 = mono_defaults.corlib;
    class = mono_class_from_name (D.28487, "System.Reflection", "Module");
    <D.28489>:
    D.28490 = class == 0B;
    D.28491 = (long int) D.28490;
    D.28492 = __builtin_expect (D.28491, 0);
    if (D.28492 != 0) goto <D.28493>; else goto <D.28494>;
    <D.28493>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6273, "class");
    <D.28494>:
    module_type = class;
  }
  <D.28486>:
  module_type.206 = module_type;
  res = mono_object_new (domain, module_type.206);
  res->image = image;
  D.28495 = &res->assembly;
  D.28496 = image->assembly;
  D.28497 = mono_assembly_get_object (domain, D.28496);
  mono_gc_wbarrier_set_field (res, D.28495, D.28497);
  D.28498 = &res->fqname;
  D.28499 = image->name;
  D.28500 = mono_string_new (domain, D.28499);
  mono_gc_wbarrier_set_field (res, D.28498, D.28500);
  D.28499 = image->name;
  basename = monoeg_g_path_get_basename (D.28499);
  D.28501 = &res->name;
  D.28502 = mono_string_new (domain, basename);
  mono_gc_wbarrier_set_field (res, D.28501, D.28502);
  D.28503 = &res->scopename;
  D.28504 = image->module_name;
  D.28505 = mono_string_new (domain, D.28504);
  mono_gc_wbarrier_set_field (res, D.28503, D.28505);
  monoeg_g_free (basename);
  D.28496 = image->assembly;
  D.28506 = D.28496->image;
  if (D.28506 == image) goto <D.28507>; else goto <D.28508>;
  <D.28507>:
  res->token = 1;
  goto <D.28509>;
  <D.28508>:
  {
    int i;

    res->token = 0;
    D.28496 = image->assembly;
    D.28506 = D.28496->image;
    D.28510 = D.28506->modules;
    if (D.28510 != 0B) goto <D.28511>; else goto <D.28512>;
    <D.28511>:
    i = 0;
    goto <D.20740>;
    <D.20739>:
    D.28496 = image->assembly;
    D.28506 = D.28496->image;
    D.28510 = D.28506->modules;
    D.28513 = (long unsigned int) i;
    D.28514 = D.28513 * 8;
    D.28515 = D.28510 + D.28514;
    D.28516 = *D.28515;
    if (D.28516 == image) goto <D.28517>; else goto <D.28518>;
    <D.28517>:
    D.28519 = i + 1;
    D.28520 = D.28519 | 436207616;
    D.28521 = (unsigned int) D.28520;
    res->token = D.28521;
    <D.28518>:
    i = i + 1;
    <D.20740>:
    D.28496 = image->assembly;
    D.28506 = D.28496->image;
    D.28522 = D.28506->module_count;
    i.207 = (unsigned int) i;
    if (D.28522 > i.207) goto <D.20739>; else goto <D.20741>;
    <D.20741>:
    D.28524 = res->token;
    D.28525 = D.28524 == 0;
    D.28526 = (long int) D.28525;
    D.28527 = __builtin_expect (D.28526, 0);
    if (D.28527 != 0) goto <D.28528>; else goto <D.28529>;
    <D.28528>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6298, "res->token");
    <D.28529>:
    <D.28512>:
  }
  <D.28509>:
  {
    struct MonoReflectionModule * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = image;
        pe.refclass = 0B;
        {
          int ret;

          D.28455 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28455);
          if (ret != 0) goto <D.28530>; else goto <D.28531>;
          <D.28530>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28531>:
          D.28532 = ret != 0;
          D.28533 = (long int) D.28532;
          D.28534 = __builtin_expect (D.28533, 0);
          if (D.28534 != 0) goto <D.28535>; else goto <D.28536>;
          <D.28535>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6302, "ret == 0");
          <D.28536>:
        }
        D.28463 = domain->refobject_hash;
        if (D.28463 == 0B) goto <D.28537>; else goto <D.28538>;
        <D.28537>:
        D.28539 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28539;
        <D.28538>:
        D.28463 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28463, &pe);
        if (_obj == 0B) goto <D.28540>; else goto <D.28541>;
        <D.28540>:
        {
          struct ReflectedEntry * e;

          D.28542 = domain->mp;
          e = mono_mempool_alloc (D.28542, 16);
          e->item = image;
          e->refclass = 0B;
          D.28463 = domain->refobject_hash;
          mono_g_hash_table_insert (D.28463, e, res);
          _obj = res;
        }
        <D.28541>:
        {
          int ret;

          D.28455 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28455);
          if (ret != 0) goto <D.28543>; else goto <D.28544>;
          <D.28543>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28544>:
          D.28545 = ret != 0;
          D.28546 = (long int) D.28545;
          D.28547 = __builtin_expect (D.28546, 0);
          if (D.28547 != 0) goto <D.28548>; else goto <D.28549>;
          <D.28548>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6302, "ret == 0");
          <D.28549>:
        }
        D.28476 = _obj;
        return D.28476;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


mono_module_file_get_object (struct MonoDomain * domain, struct MonoImage * image, int table_index)
{
  struct MonoClass * module_type.208;
  struct MonoImage * D.28557;
  _Bool D.28560;
  long int D.28561;
  long int D.28562;
  <unnamed-unsigned:24> D.28565;
  int D.28566;
  _Bool D.28567;
  long int D.28568;
  long int D.28569;
  struct MonoReflectionAssembly * * D.28572;
  struct MonoAssembly * D.28573;
  struct MonoReflectionAssembly * D.28574;
  unsigned int D.28575;
  int i.209;
  int D.28577;
  struct MonoImage * * D.28580;
  long unsigned int D.28581;
  long unsigned int D.28582;
  struct MonoImage * * D.28583;
  struct MonoImage * D.28584;
  unsigned int D.28585;
  struct MonoString * * D.28586;
  struct MonoString * D.28587;
  struct MonoString * * D.28588;
  struct MonoString * D.28589;
  struct MonoString * * D.28590;
  struct MonoString * D.28591;
  unsigned int D.28592;
  _Bool D.28593;
  unsigned char D.28594;
  int D.28595;
  int D.28596;
  unsigned int D.28597;
  struct MonoReflectionModule * D.28598;
  static struct MonoClass * module_type;
  struct MonoReflectionModule * res;
  struct MonoTableInfo * table;
  guint32 cols[3];
  const char * name;
  guint32 i;
  guint32 name_idx;
  const char * val;

  try
    {
      module_type.208 = module_type;
      if (module_type.208 == 0B) goto <D.28555>; else goto <D.28556>;
      <D.28555>:
      {
        struct MonoClass * class;

        D.28557 = mono_defaults.corlib;
        class = mono_class_from_name (D.28557, "System.Reflection", "MonoModule");
        if (class == 0B) goto <D.28558>; else goto <D.28559>;
        <D.28558>:
        D.28557 = mono_defaults.corlib;
        class = mono_class_from_name (D.28557, "System.Reflection", "Module");
        <D.28559>:
        D.28560 = class == 0B;
        D.28561 = (long int) D.28560;
        D.28562 = __builtin_expect (D.28561, 0);
        if (D.28562 != 0) goto <D.28563>; else goto <D.28564>;
        <D.28563>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6320, "class");
        <D.28564>:
        module_type = class;
      }
      <D.28556>:
      module_type.208 = module_type;
      res = mono_object_new (domain, module_type.208);
      table = &image->tables[38];
      D.28565 = table->rows;
      D.28566 = (int) D.28565;
      D.28567 = D.28566 <= table_index;
      D.28568 = (long int) D.28567;
      D.28569 = __builtin_expect (D.28568, 0);
      if (D.28569 != 0) goto <D.28570>; else goto <D.28571>;
      <D.28570>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6326, "table_index < table->rows");
      <D.28571>:
      mono_metadata_decode_row (table, table_index, &cols, 3);
      res->image = 0B;
      D.28572 = &res->assembly;
      D.28573 = image->assembly;
      D.28574 = mono_assembly_get_object (domain, D.28573);
      mono_gc_wbarrier_set_field (res, D.28572, D.28574);
      D.28575 = cols[1];
      name = mono_metadata_string_heap (image, D.28575);
      table = &image->tables[26];
      i = 0;
      goto <D.20762>;
      <D.20761>:
      i.209 = (int) i;
      name_idx = mono_metadata_decode_row_col (table, i.209, 0);
      val = mono_metadata_string_heap (image, name_idx);
      D.28577 = strcmp (val, name);
      if (D.28577 == 0) goto <D.28578>; else goto <D.28579>;
      <D.28578>:
      D.28580 = image->modules;
      D.28581 = (long unsigned int) i;
      D.28582 = D.28581 * 8;
      D.28583 = D.28580 + D.28582;
      D.28584 = *D.28583;
      res->image = D.28584;
      <D.28579>:
      i = i + 1;
      <D.20762>:
      D.28565 = table->rows;
      D.28585 = (unsigned int) D.28565;
      if (D.28585 > i) goto <D.20761>; else goto <D.20763>;
      <D.20763>:
      D.28586 = &res->fqname;
      D.28587 = mono_string_new (domain, name);
      mono_gc_wbarrier_set_field (res, D.28586, D.28587);
      D.28588 = &res->name;
      D.28589 = mono_string_new (domain, name);
      mono_gc_wbarrier_set_field (res, D.28588, D.28589);
      D.28590 = &res->scopename;
      D.28591 = mono_string_new (domain, name);
      mono_gc_wbarrier_set_field (res, D.28590, D.28591);
      D.28592 = cols[0];
      D.28593 = D.28592 != 0;
      D.28594 = (unsigned char) D.28593;
      res->is_resource = D.28594;
      D.28595 = table_index + 1;
      D.28596 = D.28595 | 637534208;
      D.28597 = (unsigned int) D.28596;
      res->token = D.28597;
      D.28598 = res;
      return D.28598;
    }
  finally
    {
      cols = {CLOBBER};
    }
}


mono_type_get_object (struct MonoDomain * domain, struct MonoType * type)
{
  struct MonoType * iftmp.210;
  <unnamed-unsigned:1> D.28602;
  <unnamed-unsigned:1> D.28603;
  unsigned char D.28607;
  struct MonoObject * D.28610;
  struct MonoReflectionType * D.28613;
  struct MonoType * D.28614;
  struct MonoImage * D.28617;
  long unsigned int D.28618;
  long unsigned int D.28619;
  void * D.28624;
  union mono_mutex_t * D.28627;
  _Bool D.28630;
  long int D.28631;
  long int D.28632;
  struct MonoGHashTable * D.28635;
  struct MonoGHashTable * D.28638;
  _Bool D.28643;
  long int D.28644;
  long int D.28645;
  _Bool D.28652;
  long int D.28653;
  long int D.28654;
  struct MonoGenericClass * D.28659;
  long unsigned int D.28660;
  long unsigned int D.28661;
  struct MonoClass * D.28664;
  long unsigned int D.28665;
  long unsigned int D.28666;
  int D.28671;
  _Bool D.28676;
  long int D.28677;
  long int D.28678;
  struct MonoException * D.28681;
  void * D.28682;
  long unsigned int D.28685;
  long unsigned int D.28686;
  unsigned char D.28691;
  struct MonoGenericContainer * D.28695;
  long unsigned int D.28697;
  long unsigned int D.28698;
  struct MonoClass * D.28702;
  struct MonoClass * D.28703;
  long unsigned int D.28704;
  long unsigned int D.28705;
  struct MonoClass * D.28714;
  long unsigned int D.28715;
  long unsigned int D.28716;
  long unsigned int D.28721;
  long unsigned int D.28722;
  _Bool D.28727;
  long int D.28728;
  long int D.28729;
  struct MonoClass * D.28732;
  _Bool D.28737;
  long int D.28738;
  long int D.28739;
  struct MonoType * norm_type;
  struct MonoReflectionType * res;
  struct MonoClass * klass;

  klass = mono_class_from_mono_type (type);
  D.28602 = klass->byval_arg.byref;
  D.28603 = type->byref;
  if (D.28602 == D.28603) goto <D.28604>; else goto <D.28605>;
  <D.28604>:
  iftmp.210 = &klass->byval_arg;
  goto <D.28606>;
  <D.28605>:
  iftmp.210 = &klass->this_arg;
  <D.28606>:
  type = iftmp.210;
  D.28607 = type->type;
  if (D.28607 == 1) goto <D.28608>; else goto <D.28609>;
  <D.28608>:
  D.28610 = domain->typeof_void;
  if (D.28610 != 0B) goto <D.28611>; else goto <D.28612>;
  <D.28611>:
  D.28613 = domain->typeof_void;
  return D.28613;
  <D.28612>:
  <D.28609>:
  D.28614 = &klass->byval_arg;
  if (D.28614 == type) goto <D.28615>; else goto <D.28616>;
  <D.28615>:
  D.28617 = klass->image;
  D.28618 = BIT_FIELD_REF <*D.28617, 64, 192>;
  D.28619 = D.28618 & 268435456;
  if (D.28619 == 0) goto <D.28620>; else goto <D.28621>;
  <D.28620>:
  {
    struct MonoVTable * vtable;

    vtable = mono_class_try_get_vtable (domain, klass);
    if (vtable != 0B) goto <D.28622>; else goto <D.28623>;
    <D.28622>:
    D.28624 = vtable->type;
    if (D.28624 != 0B) goto <D.28625>; else goto <D.28626>;
    <D.28625>:
    D.28613 = vtable->type;
    return D.28613;
    <D.28626>:
    <D.28623>:
  }
  <D.28621>:
  <D.28616>:
  mono_loader_lock ();
  {
    int ret;

    D.28627 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.28627);
    if (ret != 0) goto <D.28628>; else goto <D.28629>;
    <D.28628>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.28629>:
    D.28630 = ret != 0;
    D.28631 = (long int) D.28630;
    D.28632 = __builtin_expect (D.28631, 0);
    if (D.28632 != 0) goto <D.28633>; else goto <D.28634>;
    <D.28633>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6462, "ret == 0");
    <D.28634>:
  }
  D.28635 = domain->type_hash;
  if (D.28635 == 0B) goto <D.28636>; else goto <D.28637>;
  <D.28636>:
  D.28638 = mono_g_hash_table_new_type (mono_metadata_type_hash, mono_metadata_type_equal, 2);
  domain->type_hash = D.28638;
  <D.28637>:
  D.28635 = domain->type_hash;
  res = mono_g_hash_table_lookup (D.28635, type);
  if (res != 0B) goto <D.28639>; else goto <D.28640>;
  <D.28639>:
  {
    int ret;

    D.28627 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.28627);
    if (ret != 0) goto <D.28641>; else goto <D.28642>;
    <D.28641>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.28642>:
    D.28643 = ret != 0;
    D.28644 = (long int) D.28643;
    D.28645 = __builtin_expect (D.28644, 0);
    if (D.28645 != 0) goto <D.28646>; else goto <D.28647>;
    <D.28646>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6467, "ret == 0");
    <D.28647>:
  }
  mono_loader_unlock ();
  D.28613 = res;
  return D.28613;
  <D.28640>:
  norm_type = mono_type_normalize (type);
  if (norm_type != type) goto <D.28648>; else goto <D.28649>;
  <D.28648>:
  res = mono_type_get_object (domain, norm_type);
  D.28635 = domain->type_hash;
  mono_g_hash_table_insert (D.28635, type, res);
  {
    int ret;

    D.28627 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.28627);
    if (ret != 0) goto <D.28650>; else goto <D.28651>;
    <D.28650>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.28651>:
    D.28652 = ret != 0;
    D.28653 = (long int) D.28652;
    D.28654 = __builtin_expect (D.28653, 0);
    if (D.28654 != 0) goto <D.28655>; else goto <D.28656>;
    <D.28655>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6483, "ret == 0");
    <D.28656>:
  }
  mono_loader_unlock ();
  D.28613 = res;
  return D.28613;
  <D.28649>:
  D.28607 = type->type;
  if (D.28607 == 21) goto <D.28657>; else goto <D.28658>;
  <D.28657>:
  D.28659 = type->data.generic_class;
  D.28660 = BIT_FIELD_REF <*D.28659, 64, 192>;
  D.28661 = D.28660 & 9223372036854775808;
  if (D.28661 != 0) goto <D.28662>; else goto <D.28663>;
  <D.28662>:
  D.28659 = type->data.generic_class;
  D.28664 = D.28659->container_class;
  D.28665 = BIT_FIELD_REF <*D.28664, 64, 256>;
  D.28666 = D.28665 & 72057594037927936;
  if (D.28666 == 0) goto <D.28667>; else goto <D.28668>;
  <D.28667>:
  if (1 != 0) goto <D.28669>; else goto <D.28670>;
  <D.28669>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6490, "0");
  <D.28670>:
  <D.28668>:
  <D.28663>:
  <D.28658>:
  D.28671 = verify_safe_for_managed_space (type);
  if (D.28671 == 0) goto <D.28672>; else goto <D.28673>;
  <D.28672>:
  {
    int ret;

    D.28627 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.28627);
    if (ret != 0) goto <D.28674>; else goto <D.28675>;
    <D.28674>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.28675>:
    D.28676 = ret != 0;
    D.28677 = (long int) D.28676;
    D.28678 = __builtin_expect (D.28677, 0);
    if (D.28678 != 0) goto <D.28679>; else goto <D.28680>;
    <D.28679>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6493, "ret == 0");
    <D.28680>:
  }
  mono_loader_unlock ();
  D.28681 = mono_get_exception_invalid_operation ("This type cannot be propagated to managed space");
  mono_raise_exception (D.28681);
  <D.28673>:
  D.28682 = mono_class_get_ref_info (klass);
  if (D.28682 != 0B) goto <D.28683>; else goto <D.28684>;
  <D.28683>:
  D.28685 = BIT_FIELD_REF <*klass, 64, 256>;
  D.28686 = D.28685 & 72057594037927936;
  if (D.28686 == 0) goto <D.28687>; else goto <D.28688>;
  <D.28687>:
  {
    gboolean is_type_done;

    is_type_done = 1;
    D.28691 = klass->byval_arg.type;
    if (D.28691 == 30) goto <D.28689>; else goto <D.28692>;
    <D.28692>:
    D.28691 = klass->byval_arg.type;
    if (D.28691 == 19) goto <D.28689>; else goto <D.28690>;
    <D.28689>:
    {
      struct MonoGenericParam * gparam;

      gparam = klass->byval_arg.data.generic_param;
      D.28695 = gparam->owner;
      if (D.28695 != 0B) goto <D.28696>; else goto <D.28693>;
      <D.28696>:
      D.28695 = gparam->owner;
      D.28697 = BIT_FIELD_REF <*D.28695, 64, 256>;
      D.28698 = D.28697 & 4294967296;
      if (D.28698 != 0) goto <D.28699>; else goto <D.28693>;
      <D.28699>:
      {
        struct MonoMethod * method;

        D.28695 = gparam->owner;
        method = D.28695->owner.method;
        if (method != 0B) goto <D.28700>; else goto <D.28701>;
        <D.28700>:
        D.28702 = method->klass;
        D.28703 = mono_class_get_generic_type_definition (D.28702);
        D.28704 = BIT_FIELD_REF <*D.28703, 64, 256>;
        D.28705 = D.28704 & 72057594037927936;
        if (D.28705 != 0) goto <D.28706>; else goto <D.28707>;
        <D.28706>:
        is_type_done = 0;
        <D.28707>:
        <D.28701>:
      }
      goto <D.28694>;
      <D.28693>:
      D.28695 = gparam->owner;
      if (D.28695 != 0B) goto <D.28708>; else goto <D.28709>;
      <D.28708>:
      D.28695 = gparam->owner;
      D.28697 = BIT_FIELD_REF <*D.28695, 64, 256>;
      D.28698 = D.28697 & 4294967296;
      if (D.28698 == 0) goto <D.28710>; else goto <D.28711>;
      <D.28710>:
      {
        struct MonoClass * klass;

        D.28695 = gparam->owner;
        klass = D.28695->owner.klass;
        if (klass != 0B) goto <D.28712>; else goto <D.28713>;
        <D.28712>:
        D.28714 = mono_class_get_generic_type_definition (klass);
        D.28715 = BIT_FIELD_REF <*D.28714, 64, 256>;
        D.28716 = D.28715 & 72057594037927936;
        if (D.28716 != 0) goto <D.28717>; else goto <D.28718>;
        <D.28717>:
        is_type_done = 0;
        <D.28718>:
        <D.28713>:
      }
      <D.28711>:
      <D.28709>:
      <D.28694>:
    }
    <D.28690>:
    if (is_type_done != 0) goto <D.28719>; else goto <D.28720>;
    <D.28719>:
    D.28721 = BIT_FIELD_REF <*type, 64, 64>;
    D.28722 = D.28721 & 8589934592;
    if (D.28722 == 0) goto <D.28723>; else goto <D.28724>;
    <D.28723>:
    {
      int ret;

      D.28627 = &domain->lock.mutex;
      ret = pthread_mutex_unlock (D.28627);
      if (ret != 0) goto <D.28725>; else goto <D.28726>;
      <D.28725>:
      monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
      <D.28726>:
      D.28727 = ret != 0;
      D.28728 = (long int) D.28727;
      D.28729 = __builtin_expect (D.28728, 0);
      if (D.28729 != 0) goto <D.28730>; else goto <D.28731>;
      <D.28730>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6521, "ret == 0");
      <D.28731>:
    }
    mono_loader_unlock ();
    D.28613 = mono_class_get_ref_info (klass);
    return D.28613;
    <D.28724>:
    <D.28720>:
  }
  <D.28688>:
  <D.28684>:
  D.28732 = mono_defaults.monotype_class;
  res = mono_object_new_pinned (domain, D.28732);
  res->type = type;
  D.28635 = domain->type_hash;
  mono_g_hash_table_insert (D.28635, type, res);
  D.28607 = type->type;
  if (D.28607 == 1) goto <D.28733>; else goto <D.28734>;
  <D.28733>:
  domain->typeof_void = res;
  <D.28734>:
  {
    int ret;

    D.28627 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.28627);
    if (ret != 0) goto <D.28735>; else goto <D.28736>;
    <D.28735>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.28736>:
    D.28737 = ret != 0;
    D.28738 = (long int) D.28737;
    D.28739 = __builtin_expect (D.28738, 0);
    if (D.28739 != 0) goto <D.28740>; else goto <D.28741>;
    <D.28740>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6534, "ret == 0");
    <D.28741>:
  }
  mono_loader_unlock ();
  D.28613 = res;
  return D.28613;
}


mono_type_normalize (struct MonoType * type)
{
  unsigned char D.28743;
  struct MonoType * D.28746;
  long unsigned int D.28747;
  long unsigned int D.28748;
  <unnamed-unsigned:22> D.28751;
  long unsigned int D.28752;
  long unsigned int D.28753;
  unsigned char D.28756;
  struct MonoGenericParam * D.28758;
  short unsigned int D.28759;
  int D.28760;
  struct MonoGenericContainer * D.28762;
  long unsigned int D.28763;
  long unsigned int D.28764;
  struct MonoType * * D.28765;
  int D.28768;
  struct MonoType * iftmp.211;
  <unnamed-unsigned:1> D.28772;
  <unnamed-unsigned:1> D.28773;
  <unnamed-unsigned:1> D.28779;
  int D.28780;
  struct MonoType * iftmp.212;
  <unnamed-unsigned:1> D.28782;
  int i;
  struct MonoGenericClass * gclass;
  struct MonoGenericInst * ginst;
  struct MonoClass * gtd;
  struct MonoGenericContainer * gcontainer;
  struct MonoType * * argv;
  gboolean is_denorm_gtd;
  gboolean requires_rebind;

  argv = 0B;
  is_denorm_gtd = 1;
  requires_rebind = 0;
  D.28743 = type->type;
  if (D.28743 != 21) goto <D.28744>; else goto <D.28745>;
  <D.28744>:
  D.28746 = type;
  return D.28746;
  <D.28745>:
  gclass = type->data.generic_class;
  ginst = gclass->context.class_inst;
  D.28747 = BIT_FIELD_REF <*ginst, 64, 0>;
  D.28748 = D.28747 & 512;
  if (D.28748 == 0) goto <D.28749>; else goto <D.28750>;
  <D.28749>:
  D.28746 = type;
  return D.28746;
  <D.28750>:
  gtd = gclass->container_class;
  gcontainer = gtd->generic_container;
  D.28751 = ginst->type_argc;
  D.28752 = (long unsigned int) D.28751;
  D.28753 = D.28752 * 8;
  argv = __builtin_alloca (D.28753);
  i = 0;
  goto <D.20783>;
  <D.20782>:
  {
    struct MonoType * t;
    struct MonoType * norm;

    t = ginst->type_argv[i];
    D.28756 = t->type;
    if (D.28756 != 19) goto <D.28754>; else goto <D.28757>;
    <D.28757>:
    D.28758 = t->data.generic_param;
    D.28759 = D.28758->num;
    D.28760 = (int) D.28759;
    if (D.28760 != i) goto <D.28754>; else goto <D.28761>;
    <D.28761>:
    D.28758 = t->data.generic_param;
    D.28762 = D.28758->owner;
    if (D.28762 != gcontainer) goto <D.28754>; else goto <D.28755>;
    <D.28754>:
    is_denorm_gtd = 0;
    <D.28755>:
    norm = mono_type_normalize (t);
    D.28763 = (long unsigned int) i;
    D.28764 = D.28763 * 8;
    D.28765 = argv + D.28764;
    *D.28765 = norm;
    if (norm != t) goto <D.28766>; else goto <D.28767>;
    <D.28766>:
    requires_rebind = 1;
    <D.28767>:
  }
  i = i + 1;
  <D.20783>:
  D.28751 = ginst->type_argc;
  D.28768 = (int) D.28751;
  if (D.28768 > i) goto <D.20782>; else goto <D.20784>;
  <D.20784>:
  if (is_denorm_gtd != 0) goto <D.28769>; else goto <D.28770>;
  <D.28769>:
  D.28772 = type->byref;
  D.28773 = gtd->byval_arg.byref;
  if (D.28772 == D.28773) goto <D.28774>; else goto <D.28775>;
  <D.28774>:
  iftmp.211 = &gtd->byval_arg;
  goto <D.28776>;
  <D.28775>:
  iftmp.211 = &gtd->this_arg;
  <D.28776>:
  D.28746 = iftmp.211;
  return D.28746;
  <D.28770>:
  if (requires_rebind != 0) goto <D.28777>; else goto <D.28778>;
  <D.28777>:
  {
    struct MonoClass * klass;

    D.28751 = ginst->type_argc;
    D.28768 = (int) D.28751;
    D.28779 = gclass->is_dynamic;
    D.28780 = (int) D.28779;
    klass = mono_class_bind_generic_parameters (gtd, D.28768, argv, D.28780);
    D.28772 = type->byref;
    D.28782 = klass->byval_arg.byref;
    if (D.28772 == D.28782) goto <D.28783>; else goto <D.28784>;
    <D.28783>:
    iftmp.212 = &klass->byval_arg;
    goto <D.28785>;
    <D.28784>:
    iftmp.212 = &klass->this_arg;
    <D.28785>:
    D.28746 = iftmp.212;
    return D.28746;
  }
  <D.28778>:
  D.28746 = type;
  return D.28746;
}


verify_safe_for_managed_space (struct MonoType * type)
{
  unsigned char D.28787;
  int D.28788;
  gboolean D.28789;

  D.28787 = type->type;
  D.28788 = (int) D.28787;
  switch (D.28788) <default: <D.28790>, case 19: <D.20767>, case 30: <D.20768>>
  <D.20767>:
  <D.20768>:
  D.28789 = 1;
  return D.28789;
  <D.28790>:
  D.28789 = 1;
  return D.28789;
}


mono_method_get_object (struct MonoDomain * domain, struct MonoMethod * method, struct MonoClass * refclass)
{
  long unsigned int D.28792;
  long unsigned int D.28793;
  union mono_mutex_t * D.28796;
  _Bool D.28799;
  long int D.28800;
  long int D.28801;
  struct MonoGHashTable * D.28804;
  struct MonoGHashTable * D.28807;
  _Bool D.28812;
  long int D.28813;
  long int D.28814;
  struct MonoReflectionMethod * D.28817;
  _Bool D.28820;
  long int D.28821;
  long int D.28822;
  const char * D.28828;
  char D.28829;
  int D.28831;
  int D.28833;
  struct MonoClass * System_Reflection_MonoGenericCMethod.213;
  struct MonoImage * D.28837;
  struct MonoClass * System_Reflection_MonoGenericCMethod.214;
  struct MonoClass * System_Reflection_MonoGenericMethod.215;
  struct MonoClass * System_Reflection_MonoGenericMethod.216;
  struct MonoString * * D.28843;
  struct MonoString * D.28844;
  struct MonoReflectionType * * D.28845;
  struct MonoType * D.28846;
  struct MonoReflectionType * D.28847;
  _Bool D.28850;
  long int D.28851;
  long int D.28852;
  struct MonoGHashTable * D.28857;
  struct MonoMemPool * D.28860;
  _Bool D.28863;
  long int D.28864;
  long int D.28865;
  _Bool D.28872;
  long int D.28873;
  long int D.28874;
  struct MonoGHashTable * D.28879;
  _Bool D.28884;
  long int D.28885;
  long int D.28886;
  _Bool D.28891;
  long int D.28892;
  long int D.28893;
  int D.28900;
  int D.28902;
  struct MonoClass * System_Reflection_MonoCMethod.217;
  struct MonoClass * System_Reflection_MonoCMethod.218;
  struct MonoClass * System_Reflection_MonoMethod.219;
  struct MonoClass * System_Reflection_MonoMethod.220;
  struct MonoReflectionType * * D.28911;
  struct MonoReflectionType * D.28912;
  _Bool D.28915;
  long int D.28916;
  long int D.28917;
  struct MonoGHashTable * D.28922;
  _Bool D.28927;
  long int D.28928;
  long int D.28929;
  static struct MonoClass * System_Reflection_MonoMethod = 0B;
  static struct MonoClass * System_Reflection_MonoCMethod = 0B;
  static struct MonoClass * System_Reflection_MonoGenericMethod = 0B;
  static struct MonoClass * System_Reflection_MonoGenericCMethod = 0B;
  struct MonoClass * klass;
  struct MonoReflectionMethod * ret;

  D.28792 = BIT_FIELD_REF <*method, 64, 256>;
  D.28793 = D.28792 & 2251799813685248;
  if (D.28793 != 0) goto <D.28794>; else goto <D.28795>;
  <D.28794>:
  {
    struct MonoReflectionGenericMethod * gret;

    refclass = method->klass;
    {
      struct MonoReflectionMethod * _obj;
      struct ReflectedEntry e;

      try
        {
          e.item = method;
          e.refclass = refclass;
          {
            int ret;

            D.28796 = &domain->lock.mutex;
            ret = pthread_mutex_lock (D.28796);
            if (ret != 0) goto <D.28797>; else goto <D.28798>;
            <D.28797>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
            <D.28798>:
            D.28799 = ret != 0;
            D.28800 = (long int) D.28799;
            D.28801 = __builtin_expect (D.28800, 0);
            if (D.28801 != 0) goto <D.28802>; else goto <D.28803>;
            <D.28802>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6565, "ret == 0");
            <D.28803>:
          }
          D.28804 = domain->refobject_hash;
          if (D.28804 == 0B) goto <D.28805>; else goto <D.28806>;
          <D.28805>:
          D.28807 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
          domain->refobject_hash = D.28807;
          <D.28806>:
          D.28804 = domain->refobject_hash;
          _obj = mono_g_hash_table_lookup (D.28804, &e);
          if (_obj != 0B) goto <D.28808>; else goto <D.28809>;
          <D.28808>:
          {
            int ret;

            D.28796 = &domain->lock.mutex;
            ret = pthread_mutex_unlock (D.28796);
            if (ret != 0) goto <D.28810>; else goto <D.28811>;
            <D.28810>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
            <D.28811>:
            D.28812 = ret != 0;
            D.28813 = (long int) D.28812;
            D.28814 = __builtin_expect (D.28813, 0);
            if (D.28814 != 0) goto <D.28815>; else goto <D.28816>;
            <D.28815>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6565, "ret == 0");
            <D.28816>:
          }
          D.28817 = _obj;
          return D.28817;
          <D.28809>:
          {
            int ret;

            D.28796 = &domain->lock.mutex;
            ret = pthread_mutex_unlock (D.28796);
            if (ret != 0) goto <D.28818>; else goto <D.28819>;
            <D.28818>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
            <D.28819>:
            D.28820 = ret != 0;
            D.28821 = (long int) D.28820;
            D.28822 = __builtin_expect (D.28821, 0);
            if (D.28822 != 0) goto <D.28823>; else goto <D.28824>;
            <D.28823>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6565, "ret == 0");
            <D.28824>:
          }
        }
      finally
        {
          e = {CLOBBER};
        }
    }
    D.28828 = method->name;
    D.28829 = *D.28828;
    if (D.28829 == 46) goto <D.28830>; else goto <D.28825>;
    <D.28830>:
    D.28828 = method->name;
    D.28831 = strcmp (D.28828, ".ctor");
    if (D.28831 == 0) goto <D.28826>; else goto <D.28832>;
    <D.28832>:
    D.28828 = method->name;
    D.28833 = strcmp (D.28828, ".cctor");
    if (D.28833 == 0) goto <D.28826>; else goto <D.28825>;
    <D.28826>:
    System_Reflection_MonoGenericCMethod.213 = System_Reflection_MonoGenericCMethod;
    if (System_Reflection_MonoGenericCMethod.213 == 0B) goto <D.28835>; else goto <D.28836>;
    <D.28835>:
    D.28837 = mono_defaults.corlib;
    System_Reflection_MonoGenericCMethod.214 = mono_class_from_name (D.28837, "System.Reflection", "MonoGenericCMethod");
    System_Reflection_MonoGenericCMethod = System_Reflection_MonoGenericCMethod.214;
    <D.28836>:
    klass = System_Reflection_MonoGenericCMethod;
    goto <D.28827>;
    <D.28825>:
    System_Reflection_MonoGenericMethod.215 = System_Reflection_MonoGenericMethod;
    if (System_Reflection_MonoGenericMethod.215 == 0B) goto <D.28840>; else goto <D.28841>;
    <D.28840>:
    D.28837 = mono_defaults.corlib;
    System_Reflection_MonoGenericMethod.216 = mono_class_from_name (D.28837, "System.Reflection", "MonoGenericMethod");
    System_Reflection_MonoGenericMethod = System_Reflection_MonoGenericMethod.216;
    <D.28841>:
    klass = System_Reflection_MonoGenericMethod;
    <D.28827>:
    gret = mono_object_new (domain, klass);
    gret->method.method = method;
    D.28843 = &gret->method.name;
    D.28828 = method->name;
    D.28844 = mono_string_new (domain, D.28828);
    mono_gc_wbarrier_set_field (gret, D.28843, D.28844);
    D.28845 = &gret->method.reftype;
    D.28846 = &refclass->byval_arg;
    D.28847 = mono_type_get_object (domain, D.28846);
    mono_gc_wbarrier_set_field (gret, D.28845, D.28847);
    {
      struct MonoReflectionMethod * _obj;
      struct ReflectedEntry pe;

      try
        {
          pe.item = method;
          pe.refclass = refclass;
          {
            int ret;

            D.28796 = &domain->lock.mutex;
            ret = pthread_mutex_lock (D.28796);
            if (ret != 0) goto <D.28848>; else goto <D.28849>;
            <D.28848>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
            <D.28849>:
            D.28850 = ret != 0;
            D.28851 = (long int) D.28850;
            D.28852 = __builtin_expect (D.28851, 0);
            if (D.28852 != 0) goto <D.28853>; else goto <D.28854>;
            <D.28853>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6579, "ret == 0");
            <D.28854>:
          }
          D.28804 = domain->refobject_hash;
          if (D.28804 == 0B) goto <D.28855>; else goto <D.28856>;
          <D.28855>:
          D.28857 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
          domain->refobject_hash = D.28857;
          <D.28856>:
          D.28804 = domain->refobject_hash;
          _obj = mono_g_hash_table_lookup (D.28804, &pe);
          if (_obj == 0B) goto <D.28858>; else goto <D.28859>;
          <D.28858>:
          {
            struct ReflectedEntry * e;

            D.28860 = domain->mp;
            e = mono_mempool_alloc (D.28860, 16);
            e->item = method;
            e->refclass = refclass;
            D.28804 = domain->refobject_hash;
            mono_g_hash_table_insert (D.28804, e, gret);
            _obj = gret;
          }
          <D.28859>:
          {
            int ret;

            D.28796 = &domain->lock.mutex;
            ret = pthread_mutex_unlock (D.28796);
            if (ret != 0) goto <D.28861>; else goto <D.28862>;
            <D.28861>:
            monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
            <D.28862>:
            D.28863 = ret != 0;
            D.28864 = (long int) D.28863;
            D.28865 = __builtin_expect (D.28864, 0);
            if (D.28865 != 0) goto <D.28866>; else goto <D.28867>;
            <D.28866>:
            monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6579, "ret == 0");
            <D.28867>:
          }
          D.28817 = _obj;
          return D.28817;
        }
      finally
        {
          pe = {CLOBBER};
        }
    }
  }
  <D.28795>:
  if (refclass == 0B) goto <D.28868>; else goto <D.28869>;
  <D.28868>:
  refclass = method->klass;
  <D.28869>:
  {
    struct MonoReflectionMethod * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = method;
        e.refclass = refclass;
        {
          int ret;

          D.28796 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28796);
          if (ret != 0) goto <D.28870>; else goto <D.28871>;
          <D.28870>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28871>:
          D.28872 = ret != 0;
          D.28873 = (long int) D.28872;
          D.28874 = __builtin_expect (D.28873, 0);
          if (D.28874 != 0) goto <D.28875>; else goto <D.28876>;
          <D.28875>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6585, "ret == 0");
          <D.28876>:
        }
        D.28804 = domain->refobject_hash;
        if (D.28804 == 0B) goto <D.28877>; else goto <D.28878>;
        <D.28877>:
        D.28879 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28879;
        <D.28878>:
        D.28804 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28804, &e);
        if (_obj != 0B) goto <D.28880>; else goto <D.28881>;
        <D.28880>:
        {
          int ret;

          D.28796 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28796);
          if (ret != 0) goto <D.28882>; else goto <D.28883>;
          <D.28882>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28883>:
          D.28884 = ret != 0;
          D.28885 = (long int) D.28884;
          D.28886 = __builtin_expect (D.28885, 0);
          if (D.28886 != 0) goto <D.28887>; else goto <D.28888>;
          <D.28887>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6585, "ret == 0");
          <D.28888>:
        }
        D.28817 = _obj;
        return D.28817;
        <D.28881>:
        {
          int ret;

          D.28796 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28796);
          if (ret != 0) goto <D.28889>; else goto <D.28890>;
          <D.28889>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28890>:
          D.28891 = ret != 0;
          D.28892 = (long int) D.28891;
          D.28893 = __builtin_expect (D.28892, 0);
          if (D.28893 != 0) goto <D.28894>; else goto <D.28895>;
          <D.28894>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6585, "ret == 0");
          <D.28895>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  D.28828 = method->name;
  D.28829 = *D.28828;
  if (D.28829 == 46) goto <D.28899>; else goto <D.28896>;
  <D.28899>:
  D.28828 = method->name;
  D.28900 = strcmp (D.28828, ".ctor");
  if (D.28900 == 0) goto <D.28897>; else goto <D.28901>;
  <D.28901>:
  D.28828 = method->name;
  D.28902 = strcmp (D.28828, ".cctor");
  if (D.28902 == 0) goto <D.28897>; else goto <D.28896>;
  <D.28897>:
  System_Reflection_MonoCMethod.217 = System_Reflection_MonoCMethod;
  if (System_Reflection_MonoCMethod.217 == 0B) goto <D.28904>; else goto <D.28905>;
  <D.28904>:
  D.28837 = mono_defaults.corlib;
  System_Reflection_MonoCMethod.218 = mono_class_from_name (D.28837, "System.Reflection", "MonoCMethod");
  System_Reflection_MonoCMethod = System_Reflection_MonoCMethod.218;
  <D.28905>:
  klass = System_Reflection_MonoCMethod;
  goto <D.28898>;
  <D.28896>:
  System_Reflection_MonoMethod.219 = System_Reflection_MonoMethod;
  if (System_Reflection_MonoMethod.219 == 0B) goto <D.28908>; else goto <D.28909>;
  <D.28908>:
  D.28837 = mono_defaults.corlib;
  System_Reflection_MonoMethod.220 = mono_class_from_name (D.28837, "System.Reflection", "MonoMethod");
  System_Reflection_MonoMethod = System_Reflection_MonoMethod.220;
  <D.28909>:
  klass = System_Reflection_MonoMethod;
  <D.28898>:
  ret = mono_object_new (domain, klass);
  ret->method = method;
  D.28911 = &ret->reftype;
  D.28846 = &refclass->byval_arg;
  D.28912 = mono_type_get_object (domain, D.28846);
  mono_gc_wbarrier_set_field (ret, D.28911, D.28912);
  {
    struct MonoReflectionMethod * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = method;
        pe.refclass = refclass;
        {
          int ret;

          D.28796 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28796);
          if (ret != 0) goto <D.28913>; else goto <D.28914>;
          <D.28913>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28914>:
          D.28915 = ret != 0;
          D.28916 = (long int) D.28915;
          D.28917 = __builtin_expect (D.28916, 0);
          if (D.28917 != 0) goto <D.28918>; else goto <D.28919>;
          <D.28918>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6599, "ret == 0");
          <D.28919>:
        }
        D.28804 = domain->refobject_hash;
        if (D.28804 == 0B) goto <D.28920>; else goto <D.28921>;
        <D.28920>:
        D.28922 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28922;
        <D.28921>:
        D.28804 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28804, &pe);
        if (_obj == 0B) goto <D.28923>; else goto <D.28924>;
        <D.28923>:
        {
          struct ReflectedEntry * e;

          D.28860 = domain->mp;
          e = mono_mempool_alloc (D.28860, 16);
          e->item = method;
          e->refclass = refclass;
          D.28804 = domain->refobject_hash;
          mono_g_hash_table_insert (D.28804, e, ret);
          _obj = ret;
        }
        <D.28924>:
        {
          int ret;

          D.28796 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28796);
          if (ret != 0) goto <D.28925>; else goto <D.28926>;
          <D.28925>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28926>:
          D.28927 = ret != 0;
          D.28928 = (long int) D.28927;
          D.28929 = __builtin_expect (D.28928, 0);
          if (D.28929 != 0) goto <D.28930>; else goto <D.28931>;
          <D.28930>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6599, "ret == 0");
          <D.28931>:
        }
        D.28817 = _obj;
        return D.28817;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


__attribute__((visibility ("hidden")))
mono_method_clear_object (struct MonoDomain * domain, struct MonoMethod * method)
{
  long unsigned int D.28939;
  long unsigned int D.28940;
  _Bool D.28941;
  long int D.28942;
  long int D.28943;
  struct MonoMethodSignature * * D.28946;
  struct MonoClass * klass;

  D.28939 = BIT_FIELD_REF <*method, 64, 256>;
  D.28940 = D.28939 & 18014398509481984;
  D.28941 = D.28940 == 0;
  D.28942 = (long int) D.28941;
  D.28943 = __builtin_expect (D.28942, 0);
  if (D.28943 != 0) goto <D.28944>; else goto <D.28945>;
  <D.28944>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6611, "method->dynamic");
  <D.28945>:
  klass = method->klass;
  goto <D.20842>;
  <D.20841>:
  clear_cached_object (domain, method, klass);
  klass = klass->parent;
  <D.20842>:
  if (klass != 0B) goto <D.20841>; else goto <D.20843>;
  <D.20843>:
  D.28946 = &method->signature;
  clear_cached_object (domain, D.28946, 0B);
  klass = method->klass;
  goto <D.20845>;
  <D.20844>:
  D.28946 = &method->signature;
  clear_cached_object (domain, D.28946, klass);
  klass = klass->parent;
  <D.20845>:
  if (klass != 0B) goto <D.20844>; else goto <D.20846>;
  <D.20846>:
}


clear_cached_object (struct MonoDomain * domain, void * o, struct MonoClass * klass)
{
  union mono_mutex_t * D.28947;
  _Bool D.28950;
  long int D.28951;
  long int D.28952;
  struct MonoGHashTable * D.28955;
  int D.28958;
  _Bool D.28963;
  long int D.28964;
  long int D.28965;

  {
    int ret;

    D.28947 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.28947);
    if (ret != 0) goto <D.28948>; else goto <D.28949>;
    <D.28948>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.28949>:
    D.28950 = ret != 0;
    D.28951 = (long int) D.28950;
    D.28952 = __builtin_expect (D.28951, 0);
    if (D.28952 != 0) goto <D.28953>; else goto <D.28954>;
    <D.28953>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6127, "ret == 0");
    <D.28954>:
  }
  D.28955 = domain->refobject_hash;
  if (D.28955 != 0B) goto <D.28956>; else goto <D.28957>;
  <D.28956>:
  {
    struct ReflectedEntry pe;
    void * orig_pe;
    void * orig_value;

    try
      {
        pe.item = o;
        pe.refclass = klass;
        D.28955 = domain->refobject_hash;
        D.28958 = mono_g_hash_table_lookup_extended (D.28955, &pe, &orig_pe, &orig_value);
        if (D.28958 != 0) goto <D.28959>; else goto <D.28960>;
        <D.28959>:
        D.28955 = domain->refobject_hash;
        mono_g_hash_table_remove (D.28955, &pe);
        <D.28960>:
      }
    finally
      {
        pe = {CLOBBER};
        orig_pe = {CLOBBER};
        orig_value = {CLOBBER};
      }
  }
  <D.28957>:
  {
    int ret;

    D.28947 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.28947);
    if (ret != 0) goto <D.28961>; else goto <D.28962>;
    <D.28961>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.28962>:
    D.28963 = ret != 0;
    D.28964 = (long int) D.28963;
    D.28965 = __builtin_expect (D.28964, 0);
    if (D.28965 != 0) goto <D.28966>; else goto <D.28967>;
    <D.28966>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6139, "ret == 0");
    <D.28967>:
  }
}


mono_field_get_object (struct MonoDomain * domain, struct MonoClass * klass, struct MonoClassField * field)
{
  union mono_mutex_t * D.28968;
  _Bool D.28971;
  long int D.28972;
  long int D.28973;
  struct MonoGHashTable * D.28976;
  struct MonoGHashTable * D.28979;
  _Bool D.28984;
  long int D.28985;
  long int D.28986;
  struct MonoReflectionField * D.28989;
  _Bool D.28992;
  long int D.28993;
  long int D.28994;
  struct MonoClass * monofield_klass.221;
  struct MonoImage * D.29000;
  struct MonoClass * monofield_klass.222;
  struct MonoString * * D.29002;
  const char * D.29003;
  struct MonoString * D.29004;
  int D.29005;
  struct MonoType * D.29008;
  short unsigned int D.29009;
  unsigned int D.29010;
  struct MonoReflectionType * * D.29011;
  struct MonoType * D.29012;
  struct MonoReflectionType * D.29013;
  struct MonoReflectionType * D.29017;
  unsigned int D.29018;
  _Bool D.29021;
  long int D.29022;
  long int D.29023;
  struct MonoGHashTable * D.29028;
  struct MonoMemPool * D.29031;
  _Bool D.29034;
  long int D.29035;
  long int D.29036;
  struct MonoReflectionField * res;
  static struct MonoClass * monofield_klass;

  {
    struct MonoReflectionField * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = field;
        e.refclass = klass;
        {
          int ret;

          D.28968 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28968);
          if (ret != 0) goto <D.28969>; else goto <D.28970>;
          <D.28969>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.28970>:
          D.28971 = ret != 0;
          D.28972 = (long int) D.28971;
          D.28973 = __builtin_expect (D.28972, 0);
          if (D.28973 != 0) goto <D.28974>; else goto <D.28975>;
          <D.28974>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6642, "ret == 0");
          <D.28975>:
        }
        D.28976 = domain->refobject_hash;
        if (D.28976 == 0B) goto <D.28977>; else goto <D.28978>;
        <D.28977>:
        D.28979 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.28979;
        <D.28978>:
        D.28976 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28976, &e);
        if (_obj != 0B) goto <D.28980>; else goto <D.28981>;
        <D.28980>:
        {
          int ret;

          D.28968 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28968);
          if (ret != 0) goto <D.28982>; else goto <D.28983>;
          <D.28982>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28983>:
          D.28984 = ret != 0;
          D.28985 = (long int) D.28984;
          D.28986 = __builtin_expect (D.28985, 0);
          if (D.28986 != 0) goto <D.28987>; else goto <D.28988>;
          <D.28987>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6642, "ret == 0");
          <D.28988>:
        }
        D.28989 = _obj;
        return D.28989;
        <D.28981>:
        {
          int ret;

          D.28968 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28968);
          if (ret != 0) goto <D.28990>; else goto <D.28991>;
          <D.28990>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.28991>:
          D.28992 = ret != 0;
          D.28993 = (long int) D.28992;
          D.28994 = __builtin_expect (D.28993, 0);
          if (D.28994 != 0) goto <D.28995>; else goto <D.28996>;
          <D.28995>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6642, "ret == 0");
          <D.28996>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  monofield_klass.221 = monofield_klass;
  if (monofield_klass.221 == 0B) goto <D.28998>; else goto <D.28999>;
  <D.28998>:
  D.29000 = mono_defaults.corlib;
  monofield_klass.222 = mono_class_from_name (D.29000, "System.Reflection", "MonoField");
  monofield_klass = monofield_klass.222;
  <D.28999>:
  monofield_klass.221 = monofield_klass;
  res = mono_object_new (domain, monofield_klass.221);
  res->klass = klass;
  res->field = field;
  D.29002 = &res->name;
  D.29003 = mono_field_get_name (field);
  D.29004 = mono_string_new (domain, D.29003);
  mono_gc_wbarrier_set_field (res, D.29002, D.29004);
  D.29005 = is_field_on_inst (field);
  if (D.29005 != 0) goto <D.29006>; else goto <D.29007>;
  <D.29006>:
  D.29008 = get_field_on_inst_generic_type (field);
  D.29009 = D.29008->attrs;
  D.29010 = (unsigned int) D.29009;
  res->attrs = D.29010;
  D.29011 = &res->type;
  D.29012 = field->type;
  D.29013 = mono_type_get_object (domain, D.29012);
  mono_gc_wbarrier_set_field (res, D.29011, D.29013);
  goto <D.29014>;
  <D.29007>:
  D.29012 = field->type;
  if (D.29012 != 0B) goto <D.29015>; else goto <D.29016>;
  <D.29015>:
  D.29011 = &res->type;
  D.29012 = field->type;
  D.29017 = mono_type_get_object (domain, D.29012);
  mono_gc_wbarrier_set_field (res, D.29011, D.29017);
  <D.29016>:
  D.29018 = mono_field_get_flags (field);
  res->attrs = D.29018;
  <D.29014>:
  {
    struct MonoReflectionField * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = field;
        pe.refclass = klass;
        {
          int ret;

          D.28968 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.28968);
          if (ret != 0) goto <D.29019>; else goto <D.29020>;
          <D.29019>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29020>:
          D.29021 = ret != 0;
          D.29022 = (long int) D.29021;
          D.29023 = __builtin_expect (D.29022, 0);
          if (D.29023 != 0) goto <D.29024>; else goto <D.29025>;
          <D.29024>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6658, "ret == 0");
          <D.29025>:
        }
        D.28976 = domain->refobject_hash;
        if (D.28976 == 0B) goto <D.29026>; else goto <D.29027>;
        <D.29026>:
        D.29028 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29028;
        <D.29027>:
        D.28976 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.28976, &pe);
        if (_obj == 0B) goto <D.29029>; else goto <D.29030>;
        <D.29029>:
        {
          struct ReflectedEntry * e;

          D.29031 = domain->mp;
          e = mono_mempool_alloc (D.29031, 16);
          e->item = field;
          e->refclass = klass;
          D.28976 = domain->refobject_hash;
          mono_g_hash_table_insert (D.28976, e, res);
          _obj = res;
        }
        <D.29030>:
        {
          int ret;

          D.28968 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.28968);
          if (ret != 0) goto <D.29032>; else goto <D.29033>;
          <D.29032>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29033>:
          D.29034 = ret != 0;
          D.29035 = (long int) D.29034;
          D.29036 = __builtin_expect (D.29035, 0);
          if (D.29036 != 0) goto <D.29037>; else goto <D.29038>;
          <D.29037>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6658, "ret == 0");
          <D.29038>:
        }
        D.28989 = _obj;
        return D.28989;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


mono_property_get_object (struct MonoDomain * domain, struct MonoClass * klass, struct MonoProperty * property)
{
  union mono_mutex_t * D.29043;
  _Bool D.29046;
  long int D.29047;
  long int D.29048;
  struct MonoGHashTable * D.29051;
  struct MonoGHashTable * D.29054;
  _Bool D.29059;
  long int D.29060;
  long int D.29061;
  struct MonoReflectionProperty * D.29064;
  _Bool D.29067;
  long int D.29068;
  long int D.29069;
  struct MonoClass * monoproperty_klass.223;
  struct MonoImage * D.29075;
  struct MonoClass * monoproperty_klass.224;
  _Bool D.29079;
  long int D.29080;
  long int D.29081;
  struct MonoGHashTable * D.29086;
  struct MonoMemPool * D.29089;
  _Bool D.29092;
  long int D.29093;
  long int D.29094;
  struct MonoReflectionProperty * res;
  static struct MonoClass * monoproperty_klass;

  {
    struct MonoReflectionProperty * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = property;
        e.refclass = klass;
        {
          int ret;

          D.29043 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29043);
          if (ret != 0) goto <D.29044>; else goto <D.29045>;
          <D.29044>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29045>:
          D.29046 = ret != 0;
          D.29047 = (long int) D.29046;
          D.29048 = __builtin_expect (D.29047, 0);
          if (D.29048 != 0) goto <D.29049>; else goto <D.29050>;
          <D.29049>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6676, "ret == 0");
          <D.29050>:
        }
        D.29051 = domain->refobject_hash;
        if (D.29051 == 0B) goto <D.29052>; else goto <D.29053>;
        <D.29052>:
        D.29054 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29054;
        <D.29053>:
        D.29051 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29051, &e);
        if (_obj != 0B) goto <D.29055>; else goto <D.29056>;
        <D.29055>:
        {
          int ret;

          D.29043 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29043);
          if (ret != 0) goto <D.29057>; else goto <D.29058>;
          <D.29057>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29058>:
          D.29059 = ret != 0;
          D.29060 = (long int) D.29059;
          D.29061 = __builtin_expect (D.29060, 0);
          if (D.29061 != 0) goto <D.29062>; else goto <D.29063>;
          <D.29062>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6676, "ret == 0");
          <D.29063>:
        }
        D.29064 = _obj;
        return D.29064;
        <D.29056>:
        {
          int ret;

          D.29043 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29043);
          if (ret != 0) goto <D.29065>; else goto <D.29066>;
          <D.29065>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29066>:
          D.29067 = ret != 0;
          D.29068 = (long int) D.29067;
          D.29069 = __builtin_expect (D.29068, 0);
          if (D.29069 != 0) goto <D.29070>; else goto <D.29071>;
          <D.29070>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6676, "ret == 0");
          <D.29071>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  monoproperty_klass.223 = monoproperty_klass;
  if (monoproperty_klass.223 == 0B) goto <D.29073>; else goto <D.29074>;
  <D.29073>:
  D.29075 = mono_defaults.corlib;
  monoproperty_klass.224 = mono_class_from_name (D.29075, "System.Reflection", "MonoProperty");
  monoproperty_klass = monoproperty_klass.224;
  <D.29074>:
  monoproperty_klass.223 = monoproperty_klass;
  res = mono_object_new (domain, monoproperty_klass.223);
  res->klass = klass;
  res->property = property;
  {
    struct MonoReflectionProperty * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = property;
        pe.refclass = klass;
        {
          int ret;

          D.29043 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29043);
          if (ret != 0) goto <D.29077>; else goto <D.29078>;
          <D.29077>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29078>:
          D.29079 = ret != 0;
          D.29080 = (long int) D.29079;
          D.29081 = __builtin_expect (D.29080, 0);
          if (D.29081 != 0) goto <D.29082>; else goto <D.29083>;
          <D.29082>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6682, "ret == 0");
          <D.29083>:
        }
        D.29051 = domain->refobject_hash;
        if (D.29051 == 0B) goto <D.29084>; else goto <D.29085>;
        <D.29084>:
        D.29086 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29086;
        <D.29085>:
        D.29051 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29051, &pe);
        if (_obj == 0B) goto <D.29087>; else goto <D.29088>;
        <D.29087>:
        {
          struct ReflectedEntry * e;

          D.29089 = domain->mp;
          e = mono_mempool_alloc (D.29089, 16);
          e->item = property;
          e->refclass = klass;
          D.29051 = domain->refobject_hash;
          mono_g_hash_table_insert (D.29051, e, res);
          _obj = res;
        }
        <D.29088>:
        {
          int ret;

          D.29043 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29043);
          if (ret != 0) goto <D.29090>; else goto <D.29091>;
          <D.29090>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29091>:
          D.29092 = ret != 0;
          D.29093 = (long int) D.29092;
          D.29094 = __builtin_expect (D.29093, 0);
          if (D.29094 != 0) goto <D.29095>; else goto <D.29096>;
          <D.29095>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6682, "ret == 0");
          <D.29096>:
        }
        D.29064 = _obj;
        return D.29064;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


mono_event_get_object (struct MonoDomain * domain, struct MonoClass * klass, struct MonoEvent * event)
{
  union mono_mutex_t * D.29101;
  _Bool D.29104;
  long int D.29105;
  long int D.29106;
  struct MonoGHashTable * D.29109;
  struct MonoGHashTable * D.29112;
  _Bool D.29117;
  long int D.29118;
  long int D.29119;
  struct MonoReflectionEvent * D.29122;
  _Bool D.29125;
  long int D.29126;
  long int D.29127;
  struct MonoClass * monoevent_klass.225;
  struct MonoImage * D.29133;
  struct MonoClass * monoevent_klass.226;
  _Bool D.29137;
  long int D.29138;
  long int D.29139;
  struct MonoGHashTable * D.29144;
  struct MonoMemPool * D.29147;
  _Bool D.29150;
  long int D.29151;
  long int D.29152;
  struct MonoReflectionEvent * res;
  struct MonoReflectionMonoEvent * mono_event;
  static struct MonoClass * monoevent_klass;

  {
    struct MonoReflectionEvent * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = event;
        e.refclass = klass;
        {
          int ret;

          D.29101 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29101);
          if (ret != 0) goto <D.29102>; else goto <D.29103>;
          <D.29102>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29103>:
          D.29104 = ret != 0;
          D.29105 = (long int) D.29104;
          D.29106 = __builtin_expect (D.29105, 0);
          if (D.29106 != 0) goto <D.29107>; else goto <D.29108>;
          <D.29107>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6701, "ret == 0");
          <D.29108>:
        }
        D.29109 = domain->refobject_hash;
        if (D.29109 == 0B) goto <D.29110>; else goto <D.29111>;
        <D.29110>:
        D.29112 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29112;
        <D.29111>:
        D.29109 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29109, &e);
        if (_obj != 0B) goto <D.29113>; else goto <D.29114>;
        <D.29113>:
        {
          int ret;

          D.29101 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29101);
          if (ret != 0) goto <D.29115>; else goto <D.29116>;
          <D.29115>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29116>:
          D.29117 = ret != 0;
          D.29118 = (long int) D.29117;
          D.29119 = __builtin_expect (D.29118, 0);
          if (D.29119 != 0) goto <D.29120>; else goto <D.29121>;
          <D.29120>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6701, "ret == 0");
          <D.29121>:
        }
        D.29122 = _obj;
        return D.29122;
        <D.29114>:
        {
          int ret;

          D.29101 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29101);
          if (ret != 0) goto <D.29123>; else goto <D.29124>;
          <D.29123>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29124>:
          D.29125 = ret != 0;
          D.29126 = (long int) D.29125;
          D.29127 = __builtin_expect (D.29126, 0);
          if (D.29127 != 0) goto <D.29128>; else goto <D.29129>;
          <D.29128>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6701, "ret == 0");
          <D.29129>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  monoevent_klass.225 = monoevent_klass;
  if (monoevent_klass.225 == 0B) goto <D.29131>; else goto <D.29132>;
  <D.29131>:
  D.29133 = mono_defaults.corlib;
  monoevent_klass.226 = mono_class_from_name (D.29133, "System.Reflection", "MonoEvent");
  monoevent_klass = monoevent_klass.226;
  <D.29132>:
  monoevent_klass.225 = monoevent_klass;
  mono_event = mono_object_new (domain, monoevent_klass.225);
  mono_event->klass = klass;
  mono_event->event = event;
  res = mono_event;
  {
    struct MonoReflectionEvent * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = event;
        pe.refclass = klass;
        {
          int ret;

          D.29101 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29101);
          if (ret != 0) goto <D.29135>; else goto <D.29136>;
          <D.29135>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29136>:
          D.29137 = ret != 0;
          D.29138 = (long int) D.29137;
          D.29139 = __builtin_expect (D.29138, 0);
          if (D.29139 != 0) goto <D.29140>; else goto <D.29141>;
          <D.29140>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6708, "ret == 0");
          <D.29141>:
        }
        D.29109 = domain->refobject_hash;
        if (D.29109 == 0B) goto <D.29142>; else goto <D.29143>;
        <D.29142>:
        D.29144 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29144;
        <D.29143>:
        D.29109 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29109, &pe);
        if (_obj == 0B) goto <D.29145>; else goto <D.29146>;
        <D.29145>:
        {
          struct ReflectedEntry * e;

          D.29147 = domain->mp;
          e = mono_mempool_alloc (D.29147, 16);
          e->item = event;
          e->refclass = klass;
          D.29109 = domain->refobject_hash;
          mono_g_hash_table_insert (D.29109, e, res);
          _obj = res;
        }
        <D.29146>:
        {
          int ret;

          D.29101 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29101);
          if (ret != 0) goto <D.29148>; else goto <D.29149>;
          <D.29148>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29149>:
          D.29150 = ret != 0;
          D.29151 = (long int) D.29150;
          D.29152 = __builtin_expect (D.29151, 0);
          if (D.29152 != 0) goto <D.29153>; else goto <D.29154>;
          <D.29153>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6708, "ret == 0");
          <D.29154>:
        }
        D.29122 = _obj;
        return D.29122;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
}


__attribute__((visibility ("hidden")))
mono_param_get_objects_internal (struct MonoDomain * domain, struct MonoMethod * method, struct MonoClass * refclass)
{
  struct MonoClass * System_Reflection_ParameterInfo_array.227;
  struct MonoImage * D.29162;
  int D.29165;
  short unsigned int D.29168;
  struct MonoArray * D.29171;
  struct MonoVTable * D.29172;
  struct MonoMethodSignature * * D.29173;
  union mono_mutex_t * D.29174;
  _Bool D.29177;
  long int D.29178;
  long int D.29179;
  struct MonoGHashTable * D.29182;
  struct MonoGHashTable * D.29185;
  _Bool D.29190;
  long int D.29191;
  long int D.29192;
  _Bool D.29197;
  long int D.29198;
  long int D.29199;
  long unsigned int D.29202;
  long unsigned int D.29203;
  int D.29204;
  int D.29205;
  long unsigned int D.29206;
  long unsigned int D.29207;
  struct MonoVTable * D.29208;
  long unsigned int D.29209;
  struct MonoClass * System_Reflection_ParameterInfo.228;
  struct MonoReflectionType * * D.29211;
  struct MonoType * D.29212;
  struct MonoReflectionType * D.29213;
  struct MonoObject * * D.29214;
  struct MonoString * * D.29215;
  long unsigned int D.29216;
  long unsigned int D.29217;
  char * * D.29218;
  char * D.29219;
  struct MonoString * D.29220;
  short unsigned int D.29221;
  unsigned int D.29222;
  unsigned int D.29223;
  unsigned int D.29224;
  unsigned int D.29227;
  struct MonoObject * * D.29230;
  struct MonoObject * D.29231;
  struct MonoObject * D.29233;
  long unsigned int D.29237;
  long unsigned int D.29240;
  guint32 * D.29241;
  unsigned int D.29242;
  unsigned char D.29243;
  struct MonoClass * D.29246;
  unsigned char D.29250;
  struct MonoClass * D.29252;
  long unsigned int D.29253;
  long unsigned int D.29254;
  struct MonoClass * D.29256;
  struct MonoClass * D.29257;
  char * * D.29258;
  char * D.29259;
  struct MonoObject * D.29260;
  struct MonoObject * D.29263;
  struct MonoObject * D.29268;
  struct MonoObject * D.29270;
  sizetype D.29271;
  sizetype D.29272;
  sizetype D.29273;
  struct MonoMarshalSpec * * D.29274;
  struct MonoMarshalSpec * D.29275;
  struct MonoObject * * D.29278;
  struct MonoClass * D.29279;
  struct MonoReflectionMarshalAsAttribute * D.29280;
  long unsigned int D.29281;
  struct MonoMethodSignature * D.29282;
  short unsigned int D.29283;
  struct MonoMarshalSpec * * D.29284;
  struct MonoMarshalSpec * D.29285;
  _Bool D.29290;
  long int D.29291;
  long int D.29292;
  struct MonoGHashTable * D.29297;
  struct MonoMemPool * D.29300;
  _Bool D.29303;
  long int D.29304;
  long int D.29305;
  static struct MonoClass * System_Reflection_ParameterInfo;
  static struct MonoClass * System_Reflection_ParameterInfo_array;
  struct MonoError error;
  struct MonoArray * res;
  struct MonoReflectionMethod * member;
  struct MonoReflectionParameter * param;
  char * * names;
  char * * blobs;
  guint32 * types;
  struct MonoType * type;
  struct MonoObject * dbnull;
  struct MonoObject * missing;
  struct MonoMarshalSpec * * mspecs;
  struct MonoMethodSignature * sig;
  struct MonoVTable * pinfo_vtable;
  int i;

  try
    {
      res = 0B;
      member = 0B;
      param = 0B;
      blobs = 0B;
      types = 0B;
      type = 0B;
      dbnull = 0B;
      missing = 0B;
      System_Reflection_ParameterInfo_array.227 = System_Reflection_ParameterInfo_array;
      if (System_Reflection_ParameterInfo_array.227 == 0B) goto <D.29160>; else goto <D.29161>;
      <D.29160>:
      {
        struct MonoClass * klass;

        D.29162 = mono_defaults.corlib;
        klass = mono_class_from_name (D.29162, "System.Reflection", "MonoParameterInfo");
        if (klass == 0B) goto <D.29163>; else goto <D.29164>;
        <D.29163>:
        D.29162 = mono_defaults.corlib;
        klass = mono_class_from_name (D.29162, "System.Reflection", "ParameterInfo");
        <D.29164>:
        mono_memory_barrier ();
        System_Reflection_ParameterInfo = klass;
        klass = mono_array_class_get (klass, 1);
        mono_memory_barrier ();
        System_Reflection_ParameterInfo_array = klass;
      }
      <D.29161>:
      sig = mono_method_signature_checked (method, &error);
      D.29165 = mono_error_ok (&error);
      if (D.29165 == 0) goto <D.29166>; else goto <D.29167>;
      <D.29166>:
      mono_error_raise_exception (&error);
      <D.29167>:
      D.29168 = sig->param_count;
      if (D.29168 == 0) goto <D.29169>; else goto <D.29170>;
      <D.29169>:
      System_Reflection_ParameterInfo_array.227 = System_Reflection_ParameterInfo_array;
      D.29172 = mono_class_vtable (domain, System_Reflection_ParameterInfo_array.227);
      D.29171 = mono_array_new_specific (D.29172, 0);
      return D.29171;
      <D.29170>:
      {
        struct MonoArray * _obj;
        struct ReflectedEntry e;

        try
          {
            D.29173 = &method->signature;
            e.item = D.29173;
            e.refclass = refclass;
            {
              int ret;

              D.29174 = &domain->lock.mutex;
              ret = pthread_mutex_lock (D.29174);
              if (ret != 0) goto <D.29175>; else goto <D.29176>;
              <D.29175>:
              monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
              <D.29176>:
              D.29177 = ret != 0;
              D.29178 = (long int) D.29177;
              D.29179 = __builtin_expect (D.29178, 0);
              if (D.29179 != 0) goto <D.29180>; else goto <D.29181>;
              <D.29180>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6808, "ret == 0");
              <D.29181>:
            }
            D.29182 = domain->refobject_hash;
            if (D.29182 == 0B) goto <D.29183>; else goto <D.29184>;
            <D.29183>:
            D.29185 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
            domain->refobject_hash = D.29185;
            <D.29184>:
            D.29182 = domain->refobject_hash;
            _obj = mono_g_hash_table_lookup (D.29182, &e);
            if (_obj != 0B) goto <D.29186>; else goto <D.29187>;
            <D.29186>:
            {
              int ret;

              D.29174 = &domain->lock.mutex;
              ret = pthread_mutex_unlock (D.29174);
              if (ret != 0) goto <D.29188>; else goto <D.29189>;
              <D.29188>:
              monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
              <D.29189>:
              D.29190 = ret != 0;
              D.29191 = (long int) D.29190;
              D.29192 = __builtin_expect (D.29191, 0);
              if (D.29192 != 0) goto <D.29193>; else goto <D.29194>;
              <D.29193>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6808, "ret == 0");
              <D.29194>:
            }
            D.29171 = _obj;
            return D.29171;
            <D.29187>:
            {
              int ret;

              D.29174 = &domain->lock.mutex;
              ret = pthread_mutex_unlock (D.29174);
              if (ret != 0) goto <D.29195>; else goto <D.29196>;
              <D.29195>:
              monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
              <D.29196>:
              D.29197 = ret != 0;
              D.29198 = (long int) D.29197;
              D.29199 = __builtin_expect (D.29198, 0);
              if (D.29199 != 0) goto <D.29200>; else goto <D.29201>;
              <D.29200>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6808, "ret == 0");
              <D.29201>:
            }
          }
        finally
          {
            e = {CLOBBER};
          }
      }
      member = mono_method_get_object (domain, method, refclass);
      D.29168 = sig->param_count;
      D.29202 = (long unsigned int) D.29168;
      D.29203 = D.29202 * 8;
      names = monoeg_malloc (D.29203);
      mono_method_get_param_names (method, names);
      D.29168 = sig->param_count;
      D.29204 = (int) D.29168;
      D.29205 = D.29204 + 1;
      D.29206 = (long unsigned int) D.29205;
      D.29207 = D.29206 * 8;
      mspecs = monoeg_malloc (D.29207);
      mono_method_get_marshal_info (method, mspecs);
      System_Reflection_ParameterInfo_array.227 = System_Reflection_ParameterInfo_array;
      D.29208 = mono_class_vtable (domain, System_Reflection_ParameterInfo_array.227);
      D.29168 = sig->param_count;
      D.29209 = (long unsigned int) D.29168;
      res = mono_array_new_specific (D.29208, D.29209);
      System_Reflection_ParameterInfo.228 = System_Reflection_ParameterInfo;
      pinfo_vtable = mono_class_vtable (domain, System_Reflection_ParameterInfo.228);
      i = 0;
      goto <D.20942>;
      <D.20941>:
      param = mono_object_new_specific (pinfo_vtable);
      D.29211 = &param->ClassImpl;
      D.29212 = sig->params[i];
      D.29213 = mono_type_get_object (domain, D.29212);
      mono_gc_wbarrier_set_field (param, D.29211, D.29213);
      D.29214 = &param->MemberImpl;
      mono_gc_wbarrier_set_field (param, D.29214, member);
      D.29215 = &param->NameImpl;
      D.29216 = (long unsigned int) i;
      D.29217 = D.29216 * 8;
      D.29218 = names + D.29217;
      D.29219 = *D.29218;
      D.29220 = mono_string_new (domain, D.29219);
      mono_gc_wbarrier_set_field (param, D.29215, D.29220);
      param->PositionImpl = i;
      D.29212 = sig->params[i];
      D.29221 = D.29212->attrs;
      D.29222 = (unsigned int) D.29221;
      param->AttrsImpl = D.29222;
      D.29223 = param->AttrsImpl;
      D.29224 = D.29223 & 4096;
      if (D.29224 == 0) goto <D.29225>; else goto <D.29226>;
      <D.29225>:
      D.29223 = param->AttrsImpl;
      D.29227 = D.29223 & 16;
      if (D.29227 != 0) goto <D.29228>; else goto <D.29229>;
      <D.29228>:
      D.29230 = &param->DefaultValueImpl;
      D.29231 = get_reflection_missing (domain, &missing);
      mono_gc_wbarrier_set_field (param, D.29230, D.29231);
      goto <D.29232>;
      <D.29229>:
      D.29230 = &param->DefaultValueImpl;
      D.29233 = get_dbnull (domain, &dbnull);
      mono_gc_wbarrier_set_field (param, D.29230, D.29233);
      <D.29232>:
      goto <D.29234>;
      <D.29226>:
      if (blobs == 0B) goto <D.29235>; else goto <D.29236>;
      <D.29235>:
      D.29168 = sig->param_count;
      D.29202 = (long unsigned int) D.29168;
      D.29203 = D.29202 * 8;
      blobs = monoeg_malloc0 (D.29203);
      D.29168 = sig->param_count;
      D.29202 = (long unsigned int) D.29168;
      D.29237 = D.29202 * 4;
      types = monoeg_malloc0 (D.29237);
      get_default_param_value_blobs (method, blobs, types);
      <D.29236>:
      if (type == 0B) goto <D.29238>; else goto <D.29239>;
      <D.29238>:
      type = monoeg_malloc0 (16);
      <D.29239>:
      D.29216 = (long unsigned int) i;
      D.29240 = D.29216 * 4;
      D.29241 = types + D.29240;
      D.29242 = *D.29241;
      D.29243 = (unsigned char) D.29242;
      type->type = D.29243;
      type->data.klass = 0B;
      D.29216 = (long unsigned int) i;
      D.29240 = D.29216 * 4;
      D.29241 = types + D.29240;
      D.29242 = *D.29241;
      if (D.29242 == 18) goto <D.29244>; else goto <D.29245>;
      <D.29244>:
      D.29246 = mono_defaults.object_class;
      type->data.klass = D.29246;
      goto <D.29247>;
      <D.29245>:
      D.29212 = sig->params[i];
      D.29250 = D.29212->type;
      if (D.29250 == 17) goto <D.29251>; else goto <D.29248>;
      <D.29251>:
      D.29212 = sig->params[i];
      D.29252 = D.29212->data.klass;
      D.29253 = BIT_FIELD_REF <*D.29252, 64, 256>;
      D.29254 = D.29253 & 576460752303423488;
      if (D.29254 != 0) goto <D.29255>; else goto <D.29248>;
      <D.29255>:
      type->type = 17;
      D.29212 = sig->params[i];
      D.29256 = mono_class_from_mono_type (D.29212);
      type->data.klass = D.29256;
      goto <D.29249>;
      <D.29248>:
      D.29257 = mono_class_from_mono_type (type);
      type->data.klass = D.29257;
      <D.29249>:
      <D.29247>:
      D.29230 = &param->DefaultValueImpl;
      D.29216 = (long unsigned int) i;
      D.29217 = D.29216 * 8;
      D.29258 = blobs + D.29217;
      D.29259 = *D.29258;
      D.29260 = mono_get_object_from_blob (domain, type, D.29259);
      mono_gc_wbarrier_set_field (param, D.29230, D.29260);
      D.29216 = (long unsigned int) i;
      D.29240 = D.29216 * 4;
      D.29241 = types + D.29240;
      D.29242 = *D.29241;
      if (D.29242 != 18) goto <D.29261>; else goto <D.29262>;
      <D.29261>:
      D.29263 = param->DefaultValueImpl;
      if (D.29263 == 0B) goto <D.29264>; else goto <D.29265>;
      <D.29264>:
      D.29223 = param->AttrsImpl;
      D.29227 = D.29223 & 16;
      if (D.29227 != 0) goto <D.29266>; else goto <D.29267>;
      <D.29266>:
      D.29230 = &param->DefaultValueImpl;
      D.29268 = get_reflection_missing (domain, &missing);
      mono_gc_wbarrier_set_field (param, D.29230, D.29268);
      goto <D.29269>;
      <D.29267>:
      D.29230 = &param->DefaultValueImpl;
      D.29270 = get_dbnull (domain, &dbnull);
      mono_gc_wbarrier_set_field (param, D.29230, D.29270);
      <D.29269>:
      <D.29265>:
      <D.29262>:
      <D.29234>:
      D.29271 = (sizetype) i;
      D.29272 = D.29271 + 1;
      D.29273 = D.29272 * 8;
      D.29274 = mspecs + D.29273;
      D.29275 = *D.29274;
      if (D.29275 != 0B) goto <D.29276>; else goto <D.29277>;
      <D.29276>:
      D.29278 = &param->MarshalAsImpl;
      D.29279 = method->klass;
      D.29271 = (sizetype) i;
      D.29272 = D.29271 + 1;
      D.29273 = D.29272 * 8;
      D.29274 = mspecs + D.29273;
      D.29275 = *D.29274;
      D.29280 = mono_reflection_marshal_as_attribute_from_marshal_spec (domain, D.29279, D.29275);
      mono_gc_wbarrier_set_field (param, D.29278, D.29280);
      <D.29277>:
      {
        void * * __p;

        D.29281 = (long unsigned int) i;
        __p = mono_array_addr_with_size (res, 8, D.29281);
        mono_gc_wbarrier_set_arrayref (res, __p, param);
      }
      i = i + 1;
      <D.20942>:
      D.29168 = sig->param_count;
      D.29204 = (int) D.29168;
      if (D.29204 > i) goto <D.20941>; else goto <D.20943>;
      <D.20943>:
      monoeg_g_free (names);
      monoeg_g_free (blobs);
      monoeg_g_free (types);
      monoeg_g_free (type);
      D.29282 = mono_method_signature (method);
      D.29283 = D.29282->param_count;
      i = (int) D.29283;
      goto <D.20945>;
      <D.20944>:
      D.29216 = (long unsigned int) i;
      D.29217 = D.29216 * 8;
      D.29284 = mspecs + D.29217;
      D.29285 = *D.29284;
      if (D.29285 != 0B) goto <D.29286>; else goto <D.29287>;
      <D.29286>:
      D.29216 = (long unsigned int) i;
      D.29217 = D.29216 * 8;
      D.29284 = mspecs + D.29217;
      D.29285 = *D.29284;
      mono_metadata_free_marshal_spec (D.29285);
      <D.29287>:
      i = i + -1;
      <D.20945>:
      if (i >= 0) goto <D.20944>; else goto <D.20946>;
      <D.20946>:
      monoeg_g_free (mspecs);
      {
        struct MonoArray * _obj;
        struct ReflectedEntry pe;

        try
          {
            D.29173 = &method->signature;
            pe.item = D.29173;
            pe.refclass = refclass;
            {
              int ret;

              D.29174 = &domain->lock.mutex;
              ret = pthread_mutex_lock (D.29174);
              if (ret != 0) goto <D.29288>; else goto <D.29289>;
              <D.29288>:
              monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
              <D.29289>:
              D.29290 = ret != 0;
              D.29291 = (long int) D.29290;
              D.29292 = __builtin_expect (D.29291, 0);
              if (D.29292 != 0) goto <D.29293>; else goto <D.29294>;
              <D.29293>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6882, "ret == 0");
              <D.29294>:
            }
            D.29182 = domain->refobject_hash;
            if (D.29182 == 0B) goto <D.29295>; else goto <D.29296>;
            <D.29295>:
            D.29297 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
            domain->refobject_hash = D.29297;
            <D.29296>:
            D.29182 = domain->refobject_hash;
            _obj = mono_g_hash_table_lookup (D.29182, &pe);
            if (_obj == 0B) goto <D.29298>; else goto <D.29299>;
            <D.29298>:
            {
              struct ReflectedEntry * e;

              D.29300 = domain->mp;
              e = mono_mempool_alloc (D.29300, 16);
              D.29173 = &method->signature;
              e->item = D.29173;
              e->refclass = refclass;
              D.29182 = domain->refobject_hash;
              mono_g_hash_table_insert (D.29182, e, res);
              _obj = res;
            }
            <D.29299>:
            {
              int ret;

              D.29174 = &domain->lock.mutex;
              ret = pthread_mutex_unlock (D.29174);
              if (ret != 0) goto <D.29301>; else goto <D.29302>;
              <D.29301>:
              monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
              <D.29302>:
              D.29303 = ret != 0;
              D.29304 = (long int) D.29303;
              D.29305 = __builtin_expect (D.29304, 0);
              if (D.29305 != 0) goto <D.29306>; else goto <D.29307>;
              <D.29306>:
              monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6882, "ret == 0");
              <D.29307>:
            }
            D.29171 = _obj;
            return D.29171;
          }
        finally
          {
            pe = {CLOBBER};
          }
      }
    }
  finally
    {
      error = {CLOBBER};
      dbnull = {CLOBBER};
      missing = {CLOBBER};
    }
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


get_default_param_value_blobs (struct MonoMethod * method, char * * blobs, guint32 * types)
{
  short unsigned int D.29313;
  struct MonoImage * D.29316;
  long unsigned int D.29317;
  long unsigned int D.29318;
  long unsigned int D.29321;
  long unsigned int D.29322;
  struct MonoClass * D.29325;
  struct MonoImage * D.29326;
  struct GHashTable * D.29327;
  uint8_t * * D.29330;
  uint8_t * * D.29333;
  long unsigned int D.29334;
  long unsigned int D.29335;
  uint32_t * D.29336;
  uint32_t * D.29337;
  long unsigned int D.29338;
  unsigned int D.29339;
  unsigned int D.29340;
  _Bool D.29341;
  long int D.29342;
  long int D.29343;
  int D.29346;
  <unnamed-unsigned:24> D.29347;
  int D.29348;
  <unnamed-unsigned:24> D.29352;
  int D.29353;
  int D.29354;
  unsigned int D.29355;
  int D.29356;
  unsigned int D.29357;
  unsigned int D.29358;
  unsigned int D.29361;
  unsigned int D.29362;
  unsigned int D.29365;
  int D.29366;
  unsigned int D.29367;
  long unsigned int D.29368;
  long unsigned int D.29369;
  char * * D.29370;
  unsigned int D.29371;
  const char * D.29372;
  long unsigned int D.29373;
  guint32 * D.29374;
  unsigned int D.29375;
  guint32 param_index;
  guint32 i;
  guint32 lastp;
  guint32 crow;
  guint32 param_cols[3];
  guint32 const_cols[4];
  gint32 idx;
  struct MonoClass * klass;
  struct MonoImage * image;
  struct MonoMethodSignature * methodsig;
  struct MonoTableInfo * constt;
  struct MonoTableInfo * methodt;
  struct MonoTableInfo * paramt;

  try
    {
      crow = 0;
      klass = method->klass;
      image = klass->image;
      methodsig = mono_method_signature (method);
      D.29313 = methodsig->param_count;
      if (D.29313 == 0) goto <D.29314>; else goto <D.29315>;
      <D.29314>:
      return;
      <D.29315>:
      mono_class_init (klass);
      D.29316 = klass->image;
      D.29317 = BIT_FIELD_REF <*D.29316, 64, 192>;
      D.29318 = D.29317 & 268435456;
      if (D.29318 != 0) goto <D.29319>; else goto <D.29320>;
      <D.29319>:
      {
        struct MonoReflectionMethodAux * aux;

        D.29321 = BIT_FIELD_REF <*method, 64, 256>;
        D.29322 = D.29321 & 2251799813685248;
        if (D.29322 != 0) goto <D.29323>; else goto <D.29324>;
        <D.29323>:
        method = MEM[(struct MonoMethodInflated *)method].declaring;
        <D.29324>:
        D.29325 = method->klass;
        D.29326 = D.29325->image;
        D.29327 = MEM[(struct MonoDynamicImage *)D.29326].method_aux_hash;
        aux = monoeg_g_hash_table_lookup (D.29327, method);
        if (aux != 0B) goto <D.29328>; else goto <D.29329>;
        <D.29328>:
        D.29330 = aux->param_defaults;
        if (D.29330 != 0B) goto <D.29331>; else goto <D.29332>;
        <D.29331>:
        D.29330 = aux->param_defaults;
        D.29333 = D.29330 + 8;
        D.29313 = methodsig->param_count;
        D.29334 = (long unsigned int) D.29313;
        D.29335 = D.29334 * 8;
        memcpy (blobs, D.29333, D.29335);
        D.29336 = aux->param_default_types;
        D.29337 = D.29336 + 4;
        D.29313 = methodsig->param_count;
        D.29334 = (long unsigned int) D.29313;
        D.29338 = D.29334 * 4;
        memcpy (types, D.29337, D.29338);
        <D.29332>:
        <D.29329>:
        return;
      }
      <D.29320>:
      D.29316 = klass->image;
      methodt = &D.29316->tables[6];
      D.29316 = klass->image;
      paramt = &D.29316->tables[8];
      constt = &image->tables[11];
      D.29339 = mono_method_get_index (method);
      D.29340 = D.29339 + 4294967295;
      idx = (gint32) D.29340;
      D.29341 = idx == -1;
      D.29342 = (long int) D.29341;
      D.29343 = __builtin_expect (D.29342, 0);
      if (D.29343 != 0) goto <D.29344>; else goto <D.29345>;
      <D.29344>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7061, "idx != -1");
      <D.29345>:
      param_index = mono_metadata_decode_row_col (methodt, idx, 5);
      D.29346 = idx + 1;
      D.29347 = methodt->rows;
      D.29348 = (int) D.29347;
      if (D.29346 < D.29348) goto <D.29349>; else goto <D.29350>;
      <D.29349>:
      D.29346 = idx + 1;
      lastp = mono_metadata_decode_row_col (methodt, D.29346, 5);
      goto <D.29351>;
      <D.29350>:
      D.29352 = paramt->rows;
      D.29353 = (int) D.29352;
      D.29354 = D.29353 + 1;
      lastp = (guint32) D.29354;
      <D.29351>:
      i = param_index;
      goto <D.21031>;
      <D.21030>:
      {
        guint32 paramseq;

        D.29355 = i + 4294967295;
        D.29356 = (int) D.29355;
        mono_metadata_decode_row (paramt, D.29356, &param_cols, 3);
        paramseq = param_cols[1];
        D.29357 = param_cols[0];
        D.29358 = D.29357 & 4096;
        if (D.29358 == 0) goto <D.29359>; else goto <D.29360>;
        <D.29359>:
        // predicted unlikely by continue predictor.
        goto <D.21029>;
        <D.29360>:
        D.29361 = i | 134217728;
        D.29362 = crow + 1;
        crow = mono_metadata_get_constant_index (image, D.29361, D.29362);
        if (crow == 0) goto <D.29363>; else goto <D.29364>;
        <D.29363>:
        // predicted unlikely by continue predictor.
        goto <D.21029>;
        <D.29364>:
        D.29365 = crow + 4294967295;
        D.29366 = (int) D.29365;
        mono_metadata_decode_row (constt, D.29366, &const_cols, 4);
        D.29367 = paramseq + 4294967295;
        D.29368 = (long unsigned int) D.29367;
        D.29369 = D.29368 * 8;
        D.29370 = blobs + D.29369;
        D.29371 = const_cols[3];
        D.29372 = mono_metadata_blob_heap (image, D.29371);
        *D.29370 = D.29372;
        D.29367 = paramseq + 4294967295;
        D.29368 = (long unsigned int) D.29367;
        D.29373 = D.29368 * 4;
        D.29374 = types + D.29373;
        D.29375 = const_cols[0];
        *D.29374 = D.29375;
      }
      <D.21029>:
      i = i + 1;
      <D.21031>:
      if (i < lastp) goto <D.21030>; else goto <D.21032>;
      <D.21032>:
      return;
    }
  finally
    {
      param_cols = {CLOBBER};
      const_cols = {CLOBBER};
    }
}


get_reflection_missing (struct MonoDomain * domain, struct MonoObject * * reflection_missing)
{
  struct MonoObject * D.29378;
  struct MonoObject * D.29381;
  struct MonoObject * D.29382;

  D.29378 = *reflection_missing;
  if (D.29378 == 0B) goto <D.29379>; else goto <D.29380>;
  <D.29379>:
  D.29381 = mono_get_reflection_missing_object (domain);
  *reflection_missing = D.29381;
  <D.29380>:
  D.29382 = *reflection_missing;
  return D.29382;
}


mono_get_reflection_missing_object (struct MonoDomain * domain)
{
  struct MonoClassField * missing_value_field.229;
  struct MonoImage * D.29387;
  struct MonoClassField * missing_value_field.230;
  _Bool D.29389;
  long int D.29390;
  long int D.29391;
  _Bool D.29394;
  long int D.29395;
  long int D.29396;
  struct MonoObject * D.29399;
  struct MonoObject * obj;
  static struct MonoClassField * missing_value_field = 0B;

  missing_value_field.229 = missing_value_field;
  if (missing_value_field.229 == 0B) goto <D.29385>; else goto <D.29386>;
  <D.29385>:
  {
    struct MonoClass * missing_klass;

    D.29387 = mono_defaults.corlib;
    missing_klass = mono_class_from_name (D.29387, "System.Reflection", "Missing");
    mono_class_init (missing_klass);
    missing_value_field.230 = mono_class_get_field_from_name (missing_klass, "Value");
    missing_value_field = missing_value_field.230;
    missing_value_field.229 = missing_value_field;
    D.29389 = missing_value_field.229 == 0B;
    D.29390 = (long int) D.29389;
    D.29391 = __builtin_expect (D.29390, 0);
    if (D.29391 != 0) goto <D.29392>; else goto <D.29393>;
    <D.29392>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6732, "missing_value_field");
    <D.29393>:
  }
  <D.29386>:
  missing_value_field.229 = missing_value_field;
  obj = mono_field_get_value_object (domain, missing_value_field.229, 0B);
  D.29394 = obj == 0B;
  D.29395 = (long int) D.29394;
  D.29396 = __builtin_expect (D.29395, 0);
  if (D.29396 != 0) goto <D.29397>; else goto <D.29398>;
  <D.29397>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6735, "obj");
  <D.29398>:
  D.29399 = obj;
  return D.29399;
}


get_dbnull (struct MonoDomain * domain, struct MonoObject * * dbnull)
{
  struct MonoObject * D.29401;
  struct MonoObject * D.29404;
  struct MonoObject * D.29405;

  D.29401 = *dbnull;
  if (D.29401 == 0B) goto <D.29402>; else goto <D.29403>;
  <D.29402>:
  D.29404 = mono_get_dbnull_object (domain);
  *dbnull = D.29404;
  <D.29403>:
  D.29405 = *dbnull;
  return D.29405;
}


mono_param_get_objects (struct MonoDomain * domain, struct MonoMethod * method)
{
  struct MonoArray * D.29407;

  D.29407 = mono_param_get_objects_internal (domain, method, 0B);
  return D.29407;
}


mono_method_body_get_object (struct MonoDomain * domain, struct MonoMethod * method)
{
  long unsigned int D.29409;
  long unsigned int D.29410;
  struct MonoException * D.29413;
  struct MonoClass * System_Reflection_MethodBody.231;
  struct MonoImage * D.29417;
  struct MonoClass * System_Reflection_MethodBody.232;
  struct MonoClass * System_Reflection_LocalVariableInfo.233;
  struct MonoClass * System_Reflection_LocalVariableInfo.234;
  struct MonoClass * System_Reflection_ExceptionHandlingClause.235;
  struct MonoClass * System_Reflection_ExceptionHandlingClause.236;
  union mono_mutex_t * D.29427;
  _Bool D.29430;
  long int D.29431;
  long int D.29432;
  struct MonoGHashTable * D.29435;
  struct MonoGHashTable * D.29438;
  _Bool D.29443;
  long int D.29444;
  long int D.29445;
  struct MonoReflectionMethodBody * D.29448;
  _Bool D.29451;
  long int D.29452;
  long int D.29453;
  short unsigned int D.29458;
  unsigned int D.29459;
  unsigned int D.29460;
  short unsigned int D.29462;
  unsigned int D.29463;
  unsigned int D.29464;
  struct MonoClass * D.29465;
  long unsigned int D.29466;
  long unsigned int D.29467;
  struct MonoTableInfo * D.29470;
  unsigned int D.29471;
  unsigned int D.29472;
  unsigned int D.29473;
  int D.29474;
  int D.29475;
  unsigned int D.29476;
  unsigned int D.29477;
  unsigned int D.29478;
  unsigned int D.29479;
  unsigned int D.29480;
  unsigned int D.29481;
  unsigned int D.29482;
  unsigned int D.29483;
  unsigned int D.29484;
  <unnamed-unsigned:1> D.29486;
  unsigned char D.29487;
  <unnamed-unsigned:15> D.29488;
  unsigned int D.29489;
  struct MonoArray * * D.29490;
  struct MonoClass * D.20982;
  struct MonoClass * tmp_klass.237;
  struct MonoClass * D.29494;
  struct MonoClass * tmp_klass.238;
  _Bool D.29496;
  long int D.29497;
  long int D.29498;
  struct MonoVTable * D.29501;
  unsigned int D.29502;
  long unsigned int D.29503;
  struct MonoArray * D.29504;
  struct MonoArray * D.29505;
  char * D.29506;
  const unsigned char * D.29507;
  long unsigned int D.29508;
  struct MonoArray * * D.29509;
  struct MonoClass * D.20984;
  struct MonoClass * tmp_klass.239;
  struct MonoClass * tmp_klass.240;
  _Bool D.29514;
  long int D.29515;
  long int D.29516;
  struct MonoVTable * D.29519;
  short unsigned int D.29520;
  long unsigned int D.29521;
  struct MonoArray * D.29522;
  struct MonoReflectionType * * D.29523;
  struct MonoType * D.29524;
  struct MonoReflectionType * D.29525;
  <unnamed-unsigned:1> D.29526;
  unsigned char D.29527;
  short unsigned int D.29528;
  struct MonoArray * D.29529;
  long unsigned int D.29530;
  int D.29531;
  struct MonoArray * * D.29532;
  struct MonoClass * D.20991;
  struct MonoClass * tmp_klass.241;
  struct MonoClass * tmp_klass.242;
  _Bool D.29537;
  long int D.29538;
  long int D.29539;
  struct MonoVTable * D.29542;
  <unnamed-unsigned:15> D.29543;
  long unsigned int D.29544;
  struct MonoArray * D.29545;
  struct MonoExceptionClause * D.29546;
  long unsigned int D.29547;
  long unsigned int D.29548;
  unsigned int D.29549;
  int D.29550;
  unsigned int D.29551;
  int D.29552;
  unsigned int D.29553;
  int D.29554;
  unsigned int D.29555;
  int D.29556;
  unsigned int D.29557;
  int D.29558;
  unsigned int D.29561;
  int D.29562;
  struct MonoClass * D.29564;
  struct MonoObject * * D.29567;
  struct MonoDomain * D.29568;
  struct MonoType * D.29569;
  struct MonoReflectionType * D.29570;
  struct MonoArray * D.29571;
  int D.29572;
  _Bool D.29575;
  long int D.29576;
  long int D.29577;
  struct MonoGHashTable * D.29582;
  struct MonoMemPool * D.29585;
  _Bool D.29588;
  long int D.29589;
  long int D.29590;
  static struct MonoClass * System_Reflection_MethodBody = 0B;
  static struct MonoClass * System_Reflection_LocalVariableInfo = 0B;
  static struct MonoClass * System_Reflection_ExceptionHandlingClause = 0B;
  struct MonoReflectionMethodBody * ret;
  struct MonoMethodHeader * header;
  struct MonoImage * image;
  guint32 method_rva;
  guint32 local_var_sig_token;
  char * ptr;
  unsigned char format;
  unsigned char flags;
  int i;

  D.29409 = BIT_FIELD_REF <*method, 64, 256>;
  D.29410 = D.29409 & 18014398509481984;
  if (D.29410 != 0) goto <D.29411>; else goto <D.29412>;
  <D.29411>:
  D.29413 = mono_get_exception_invalid_operation (0B);
  mono_raise_exception (D.29413);
  <D.29412>:
  System_Reflection_MethodBody.231 = System_Reflection_MethodBody;
  if (System_Reflection_MethodBody.231 == 0B) goto <D.29415>; else goto <D.29416>;
  <D.29415>:
  D.29417 = mono_defaults.corlib;
  System_Reflection_MethodBody.232 = mono_class_from_name (D.29417, "System.Reflection", "MethodBody");
  System_Reflection_MethodBody = System_Reflection_MethodBody.232;
  <D.29416>:
  System_Reflection_LocalVariableInfo.233 = System_Reflection_LocalVariableInfo;
  if (System_Reflection_LocalVariableInfo.233 == 0B) goto <D.29420>; else goto <D.29421>;
  <D.29420>:
  D.29417 = mono_defaults.corlib;
  System_Reflection_LocalVariableInfo.234 = mono_class_from_name (D.29417, "System.Reflection", "LocalVariableInfo");
  System_Reflection_LocalVariableInfo = System_Reflection_LocalVariableInfo.234;
  <D.29421>:
  System_Reflection_ExceptionHandlingClause.235 = System_Reflection_ExceptionHandlingClause;
  if (System_Reflection_ExceptionHandlingClause.235 == 0B) goto <D.29424>; else goto <D.29425>;
  <D.29424>:
  D.29417 = mono_defaults.corlib;
  System_Reflection_ExceptionHandlingClause.236 = mono_class_from_name (D.29417, "System.Reflection", "ExceptionHandlingClause");
  System_Reflection_ExceptionHandlingClause = System_Reflection_ExceptionHandlingClause.236;
  <D.29425>:
  {
    struct MonoReflectionMethodBody * _obj;
    struct ReflectedEntry e;

    try
      {
        e.item = method;
        e.refclass = 0B;
        {
          int ret;

          D.29427 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29427);
          if (ret != 0) goto <D.29428>; else goto <D.29429>;
          <D.29428>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29429>:
          D.29430 = ret != 0;
          D.29431 = (long int) D.29430;
          D.29432 = __builtin_expect (D.29431, 0);
          if (D.29432 != 0) goto <D.29433>; else goto <D.29434>;
          <D.29433>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6923, "ret == 0");
          <D.29434>:
        }
        D.29435 = domain->refobject_hash;
        if (D.29435 == 0B) goto <D.29436>; else goto <D.29437>;
        <D.29436>:
        D.29438 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29438;
        <D.29437>:
        D.29435 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29435, &e);
        if (_obj != 0B) goto <D.29439>; else goto <D.29440>;
        <D.29439>:
        {
          int ret;

          D.29427 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29427);
          if (ret != 0) goto <D.29441>; else goto <D.29442>;
          <D.29441>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29442>:
          D.29443 = ret != 0;
          D.29444 = (long int) D.29443;
          D.29445 = __builtin_expect (D.29444, 0);
          if (D.29445 != 0) goto <D.29446>; else goto <D.29447>;
          <D.29446>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6923, "ret == 0");
          <D.29447>:
        }
        D.29448 = _obj;
        return D.29448;
        <D.29440>:
        {
          int ret;

          D.29427 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29427);
          if (ret != 0) goto <D.29449>; else goto <D.29450>;
          <D.29449>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29450>:
          D.29451 = ret != 0;
          D.29452 = (long int) D.29451;
          D.29453 = __builtin_expect (D.29452, 0);
          if (D.29453 != 0) goto <D.29454>; else goto <D.29455>;
          <D.29454>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6923, "ret == 0");
          <D.29455>:
        }
      }
    finally
      {
        e = {CLOBBER};
      }
  }
  D.29458 = method->flags;
  D.29459 = (unsigned int) D.29458;
  D.29460 = D.29459 & 9216;
  if (D.29460 != 0) goto <D.29456>; else goto <D.29461>;
  <D.29461>:
  D.29462 = method->iflags;
  D.29463 = (unsigned int) D.29462;
  D.29464 = D.29463 & 4099;
  if (D.29464 != 0) goto <D.29456>; else goto <D.29457>;
  <D.29456>:
  D.29448 = 0B;
  return D.29448;
  <D.29457>:
  D.29465 = method->klass;
  image = D.29465->image;
  header = mono_method_get_header (method);
  D.29466 = BIT_FIELD_REF <*image, 64, 192>;
  D.29467 = D.29466 & 268435456;
  if (D.29467 == 0) goto <D.29468>; else goto <D.29469>;
  <D.29468>:
  D.29470 = &image->tables[6];
  D.29471 = method->token;
  D.29472 = D.29471 & 16777215;
  D.29473 = D.29472 + 4294967295;
  D.29474 = (int) D.29473;
  method_rva = mono_metadata_decode_row_col (D.29470, D.29474, 0);
  ptr = mono_image_rva_map (image, method_rva);
  flags = MEM[(const unsigned char *)ptr];
  format = flags & 3;
  D.29475 = (int) format;
  switch (D.29475) <default: <D.20980>, case 2: <D.20977>, case 3: <D.20979>>
  <D.20977>:
  local_var_sig_token = 0;
  goto <D.20978>;
  <D.20979>:
  ptr = ptr + 2;
  ptr = ptr + 2;
  ptr = ptr + 4;
  D.29476 = MEM[(const guint32 *)ptr];
  D.29477 = D.29476 << 24;
  D.29476 = MEM[(const guint32 *)ptr];
  D.29478 = D.29476 >> 8;
  D.29479 = D.29478 & 65280;
  D.29480 = D.29477 | D.29479;
  D.29476 = MEM[(const guint32 *)ptr];
  D.29481 = D.29476 << 8;
  D.29482 = D.29481 & 16711680;
  D.29483 = D.29480 | D.29482;
  D.29476 = MEM[(const guint32 *)ptr];
  D.29484 = D.29476 >> 24;
  local_var_sig_token = D.29483 | D.29484;
  goto <D.20978>;
  <D.20980>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 6951);
  <D.20978>:
  goto <D.29485>;
  <D.29469>:
  local_var_sig_token = 0;
  <D.29485>:
  System_Reflection_MethodBody.231 = System_Reflection_MethodBody;
  ret = mono_object_new (domain, System_Reflection_MethodBody.231);
  D.29486 = header->init_locals;
  D.29487 = (unsigned char) D.29486;
  ret->init_locals = D.29487;
  D.29488 = header->max_stack;
  D.29489 = (unsigned int) D.29488;
  ret->max_stack = D.29489;
  ret->local_var_sig_token = local_var_sig_token;
  D.29490 = &ret->il;
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.237 = tmp_klass;
      if (tmp_klass.237 == 0B) goto <D.29492>; else goto <D.29493>;
      <D.29492>:
      D.29494 = mono_defaults.byte_class;
      tmp_klass.238 = mono_array_class_get (D.29494, 1);
      tmp_klass = tmp_klass.238;
      tmp_klass.237 = tmp_klass;
      D.29496 = tmp_klass.237 == 0B;
      D.29497 = (long int) D.29496;
      D.29498 = __builtin_expect (D.29497, 0);
      if (D.29498 != 0) goto <D.29499>; else goto <D.29500>;
      <D.29499>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6961, "tmp_klass");
      <D.29500>:
      <D.29493>:
    }
    D.20982 = tmp_klass;
  }
  D.29501 = mono_class_vtable (domain, D.20982);
  D.29502 = header->code_size;
  D.29503 = (long unsigned int) D.29502;
  D.29504 = mono_array_new_specific (D.29501, D.29503);
  mono_gc_wbarrier_set_field (ret, D.29490, D.29504);
  D.29505 = ret->il;
  D.29506 = mono_array_addr_with_size (D.29505, 1, 0);
  D.29507 = header->code;
  D.29502 = header->code_size;
  D.29508 = (long unsigned int) D.29502;
  memcpy (D.29506, D.29507, D.29508);
  D.29509 = &ret->locals;
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.239 = tmp_klass;
      if (tmp_klass.239 == 0B) goto <D.29511>; else goto <D.29512>;
      <D.29511>:
      System_Reflection_LocalVariableInfo.233 = System_Reflection_LocalVariableInfo;
      tmp_klass.240 = mono_array_class_get (System_Reflection_LocalVariableInfo.233, 1);
      tmp_klass = tmp_klass.240;
      tmp_klass.239 = tmp_klass;
      D.29514 = tmp_klass.239 == 0B;
      D.29515 = (long int) D.29514;
      D.29516 = __builtin_expect (D.29515, 0);
      if (D.29516 != 0) goto <D.29517>; else goto <D.29518>;
      <D.29517>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6965, "tmp_klass");
      <D.29518>:
      <D.29512>:
    }
    D.20984 = tmp_klass;
  }
  D.29519 = mono_class_vtable (domain, D.20984);
  D.29520 = header->num_locals;
  D.29521 = (long unsigned int) D.29520;
  D.29522 = mono_array_new_specific (D.29519, D.29521);
  mono_gc_wbarrier_set_field (ret, D.29509, D.29522);
  i = 0;
  goto <D.20988>;
  <D.20987>:
  {
    struct MonoReflectionLocalVariableInfo * info;

    System_Reflection_LocalVariableInfo.233 = System_Reflection_LocalVariableInfo;
    info = mono_object_new (domain, System_Reflection_LocalVariableInfo.233);
    D.29523 = &info->local_type;
    D.29524 = header->locals[i];
    D.29525 = mono_type_get_object (domain, D.29524);
    mono_gc_wbarrier_set_field (info, D.29523, D.29525);
    D.29524 = header->locals[i];
    D.29526 = D.29524->pinned;
    D.29527 = (unsigned char) D.29526;
    info->is_pinned = D.29527;
    D.29528 = (short unsigned int) i;
    info->local_index = D.29528;
    {
      void * * __p;

      D.29529 = ret->locals;
      D.29530 = (long unsigned int) i;
      __p = mono_array_addr_with_size (D.29529, 8, D.29530);
      D.29529 = ret->locals;
      mono_gc_wbarrier_set_arrayref (D.29529, __p, info);
    }
  }
  i = i + 1;
  <D.20988>:
  D.29520 = header->num_locals;
  D.29531 = (int) D.29520;
  if (D.29531 > i) goto <D.20987>; else goto <D.20989>;
  <D.20989>:
  D.29532 = &ret->clauses;
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.241 = tmp_klass;
      if (tmp_klass.241 == 0B) goto <D.29534>; else goto <D.29535>;
      <D.29534>:
      System_Reflection_ExceptionHandlingClause.235 = System_Reflection_ExceptionHandlingClause;
      tmp_klass.242 = mono_array_class_get (System_Reflection_ExceptionHandlingClause.235, 1);
      tmp_klass = tmp_klass.242;
      tmp_klass.241 = tmp_klass;
      D.29537 = tmp_klass.241 == 0B;
      D.29538 = (long int) D.29537;
      D.29539 = __builtin_expect (D.29538, 0);
      if (D.29539 != 0) goto <D.29540>; else goto <D.29541>;
      <D.29540>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6975, "tmp_klass");
      <D.29541>:
      <D.29535>:
    }
    D.20991 = tmp_klass;
  }
  D.29542 = mono_class_vtable (domain, D.20991);
  D.29543 = header->num_clauses;
  D.29544 = (long unsigned int) D.29543;
  D.29545 = mono_array_new_specific (D.29542, D.29544);
  mono_gc_wbarrier_set_field (ret, D.29532, D.29545);
  i = 0;
  goto <D.20996>;
  <D.20995>:
  {
    struct MonoReflectionExceptionHandlingClause * info;
    struct MonoExceptionClause * clause;

    System_Reflection_ExceptionHandlingClause.235 = System_Reflection_ExceptionHandlingClause;
    info = mono_object_new (domain, System_Reflection_ExceptionHandlingClause.235);
    D.29546 = header->clauses;
    D.29547 = (long unsigned int) i;
    D.29548 = D.29547 * 32;
    clause = D.29546 + D.29548;
    D.29549 = clause->flags;
    D.29550 = (int) D.29549;
    info->flags = D.29550;
    D.29551 = clause->try_offset;
    D.29552 = (int) D.29551;
    info->try_offset = D.29552;
    D.29553 = clause->try_len;
    D.29554 = (int) D.29553;
    info->try_length = D.29554;
    D.29555 = clause->handler_offset;
    D.29556 = (int) D.29555;
    info->handler_offset = D.29556;
    D.29557 = clause->handler_len;
    D.29558 = (int) D.29557;
    info->handler_length = D.29558;
    D.29549 = clause->flags;
    if (D.29549 == 1) goto <D.29559>; else goto <D.29560>;
    <D.29559>:
    D.29561 = clause->data.filter_offset;
    D.29562 = (int) D.29561;
    info->filter_offset = D.29562;
    goto <D.29563>;
    <D.29560>:
    D.29564 = clause->data.catch_class;
    if (D.29564 != 0B) goto <D.29565>; else goto <D.29566>;
    <D.29565>:
    D.29567 = &info->catch_type;
    D.29568 = mono_domain_get ();
    D.29564 = clause->data.catch_class;
    D.29569 = &D.29564->byval_arg;
    D.29570 = mono_type_get_object (D.29568, D.29569);
    mono_gc_wbarrier_set_field (info, D.29567, D.29570);
    <D.29566>:
    <D.29563>:
    {
      void * * __p;

      D.29571 = ret->clauses;
      D.29530 = (long unsigned int) i;
      __p = mono_array_addr_with_size (D.29571, 8, D.29530);
      D.29571 = ret->clauses;
      mono_gc_wbarrier_set_arrayref (D.29571, __p, info);
    }
  }
  i = i + 1;
  <D.20996>:
  D.29543 = header->num_clauses;
  D.29572 = (int) D.29543;
  if (D.29572 > i) goto <D.20995>; else goto <D.20997>;
  <D.20997>:
  mono_metadata_free_mh (header);
  {
    struct MonoReflectionMethodBody * _obj;
    struct ReflectedEntry pe;

    try
      {
        pe.item = method;
        pe.refclass = 0B;
        {
          int ret;

          D.29427 = &domain->lock.mutex;
          ret = pthread_mutex_lock (D.29427);
          if (ret != 0) goto <D.29573>; else goto <D.29574>;
          <D.29573>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
          <D.29574>:
          D.29575 = ret != 0;
          D.29576 = (long int) D.29575;
          D.29577 = __builtin_expect (D.29576, 0);
          if (D.29577 != 0) goto <D.29578>; else goto <D.29579>;
          <D.29578>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6994, "ret == 0");
          <D.29579>:
        }
        D.29435 = domain->refobject_hash;
        if (D.29435 == 0B) goto <D.29580>; else goto <D.29581>;
        <D.29580>:
        D.29582 = mono_g_hash_table_new_type (reflected_hash, reflected_equal, 2);
        domain->refobject_hash = D.29582;
        <D.29581>:
        D.29435 = domain->refobject_hash;
        _obj = mono_g_hash_table_lookup (D.29435, &pe);
        if (_obj == 0B) goto <D.29583>; else goto <D.29584>;
        <D.29583>:
        {
          struct ReflectedEntry * e;

          D.29585 = domain->mp;
          e = mono_mempool_alloc (D.29585, 16);
          e->item = method;
          e->refclass = 0B;
          D.29435 = domain->refobject_hash;
          mono_g_hash_table_insert (D.29435, e, ret);
          _obj = ret;
        }
        <D.29584>:
        {
          int ret;

          D.29427 = &domain->lock.mutex;
          ret = pthread_mutex_unlock (D.29427);
          if (ret != 0) goto <D.29586>; else goto <D.29587>;
          <D.29586>:
          monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
          <D.29587>:
          D.29588 = ret != 0;
          D.29589 = (long int) D.29588;
          D.29590 = __builtin_expect (D.29589, 0);
          if (D.29590 != 0) goto <D.29591>; else goto <D.29592>;
          <D.29591>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 6994, "ret == 0");
          <D.29592>:
        }
        D.29448 = _obj;
        return D.29448;
      }
    finally
      {
        pe = {CLOBBER};
      }
  }
  D.29448 = ret;
  return D.29448;
}


mono_get_dbnull_object (struct MonoDomain * domain)
{
  struct MonoClassField * dbnull_value_field.243;
  struct MonoImage * D.29600;
  struct MonoClassField * dbnull_value_field.244;
  _Bool D.29602;
  long int D.29603;
  long int D.29604;
  _Bool D.29607;
  long int D.29608;
  long int D.29609;
  struct MonoObject * D.29612;
  struct MonoObject * obj;
  static struct MonoClassField * dbnull_value_field = 0B;

  dbnull_value_field.243 = dbnull_value_field;
  if (dbnull_value_field.243 == 0B) goto <D.29598>; else goto <D.29599>;
  <D.29598>:
  {
    struct MonoClass * dbnull_klass;

    D.29600 = mono_defaults.corlib;
    dbnull_klass = mono_class_from_name (D.29600, "System", "DBNull");
    mono_class_init (dbnull_klass);
    dbnull_value_field.244 = mono_class_get_field_from_name (dbnull_klass, "Value");
    dbnull_value_field = dbnull_value_field.244;
    dbnull_value_field.243 = dbnull_value_field;
    D.29602 = dbnull_value_field.243 == 0B;
    D.29603 = (long int) D.29602;
    D.29604 = __builtin_expect (D.29603, 0);
    if (D.29604 != 0) goto <D.29605>; else goto <D.29606>;
    <D.29605>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7017, "dbnull_value_field");
    <D.29606>:
  }
  <D.29599>:
  dbnull_value_field.243 = dbnull_value_field;
  obj = mono_field_get_value_object (domain, dbnull_value_field.243, 0B);
  D.29607 = obj == 0B;
  D.29608 = (long int) D.29607;
  D.29609 = __builtin_expect (D.29608, 0);
  if (D.29609 != 0) goto <D.29610>; else goto <D.29611>;
  <D.29610>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7020, "obj");
  <D.29611>:
  D.29612 = obj;
  return D.29612;
}


__attribute__((visibility ("hidden")))
mono_get_object_from_blob (struct MonoDomain * domain, struct MonoType * type, const char * blob)
{
  struct MonoObject * D.29616;
  long unsigned int D.29617;
  long unsigned int D.29618;
  struct MonoObject * object.245;
  struct MonoObject * object.246;
  long unsigned int D.29623;
  unsigned char D.29627;
  <unnamed type> D.29628;
  int D.29629;
  void * retval;
  struct MonoClass * klass;
  struct MonoObject * object;
  struct MonoType * basetype;

  try
    {
      basetype = type;
      if (blob == 0B) goto <D.29614>; else goto <D.29615>;
      <D.29614>:
      D.29616 = 0B;
      return D.29616;
      <D.29615>:
      klass = mono_class_from_mono_type (type);
      D.29617 = BIT_FIELD_REF <*klass, 64, 256>;
      D.29618 = D.29617 & 1152921504606846976;
      if (D.29618 != 0) goto <D.29619>; else goto <D.29620>;
      <D.29619>:
      object.245 = mono_object_new (domain, klass);
      object = object.245;
      object.246 = object;
      retval = object.246 + 16;
      D.29617 = BIT_FIELD_REF <*klass, 64, 256>;
      D.29623 = D.29617 & 576460752303423488;
      if (D.29623 != 0) goto <D.29624>; else goto <D.29625>;
      <D.29624>:
      basetype = mono_class_enum_basetype (klass);
      <D.29625>:
      goto <D.29626>;
      <D.29620>:
      retval = &object;
      <D.29626>:
      D.29627 = basetype->type;
      D.29628 = (<unnamed type>) D.29627;
      D.29629 = mono_get_constant_value_from_blob (domain, D.29628, blob, retval);
      if (D.29629 == 0) goto <D.29630>; else goto <D.29631>;
      <D.29630>:
      D.29616 = object;
      return D.29616;
      <D.29631>:
      D.29616 = 0B;
      return D.29616;
    }
  finally
    {
      object = {CLOBBER};
    }
}


mono_reflection_parse_type (char * name, struct MonoTypeNameParse * info)
{
  int D.29634;

  D.29634 = _mono_reflection_parse_type (name, 0B, 0, info);
  return D.29634;
}


_mono_reflection_parse_type (char * name, char * * endptr, gboolean is_recursed, struct MonoTypeNameParse * info)
{
  struct MonoAssemblyName * D.29636;
  char * D.29637;
  char * p.247;
  char * p.248;
  char D.29640;
  int D.29641;
  struct GList * D.29642;
  struct GList * D.29643;
  char * D.29644;
  char * D.29648;
  int D.29658;
  struct GList * D.29659;
  struct GList * D.29660;
  char * p.249;
  char * p.250;
  struct GList * D.29663;
  char * p.251;
  char * p.252;
  char * p.253;
  char * p.254;
  struct GList * D.29680;
  char * p.255;
  char * p.256;
  char D.29684;
  long unsigned int D.29687;
  void * D.29688;
  struct GList * D.29689;
  struct GPtrArray * D.29692;
  struct GPtrArray * D.29693;
  int D.29696;
  char * p.257;
  char * p.258;
  char * p.259;
  char * p.260;
  const short unsigned int * * D.29712;
  const short unsigned int * D.29713;
  char D.29714;
  long unsigned int D.29715;
  long unsigned int D.29716;
  const short unsigned int * D.29717;
  short unsigned int D.29718;
  int D.29719;
  int D.29720;
  struct MonoAssemblyName * D.29726;
  int D.29727;
  char * p.261;
  char * p.262;
  char * p.263;
  char * p.264;
  char * p.265;
  char * p.266;
  char * p.267;
  char * p.268;
  long unsigned int D.29746;
  long unsigned int D.29747;
  const short unsigned int * D.29748;
  short unsigned int D.29749;
  int D.29750;
  int D.29751;
  int D.29756;
  const char * D.29759;
  char D.29764;
  char * start;
  char * p;
  char * w;
  char * last_point;
  char * startn;
  int in_modifiers;
  int isbyref;
  int rank;
  void end = <<< error >>>;

  try
    {
      in_modifiers = 0;
      isbyref = 0;
      rank = 0;
      w = name;
      p = w;
      start = p;
      D.29636 = &info->assembly;
      memset (D.29636, 0, 80);
      info->name_space = 0B;
      D.29637 = info->name_space;
      info->name = D.29637;
      info->nested = 0B;
      info->modifiers = 0B;
      info->type_arguments = 0B;
      last_point = 0B;
      goto <D.21090>;
      <D.21089>:
      p.247 = p;
      p.248 = p.247 + 1;
      p = p.248;
      start = start + 1;
      w = w + 1;
      name = name + 1;
      <D.21090>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 32) goto <D.21089>; else goto <D.21091>;
      <D.21091>:
      goto <D.21104>;
      <D.21103>:
      p.247 = p;
      D.29640 = *p.247;
      D.29641 = (int) D.29640;
      switch (D.29641) <default: <D.21101>, case 38: <D.21096>, case 42: <D.21097>, case 43: <D.21092>, case 44: <D.21099>, case 46: <D.21094>, case 91: <D.21098>, case 92: <D.21095>, case 93: <D.21100>>
      <D.21092>:
      p.247 = p;
      *p.247 = 0;
      p.247 = p;
      startn = p.247 + 1;
      D.29642 = info->nested;
      D.29643 = monoeg_g_list_append (D.29642, startn);
      info->nested = D.29643;
      D.29644 = info->name;
      if (D.29644 != 0B) goto <D.21093>; else goto <D.29645>;
      <D.29645>:
      if (last_point != 0B) goto <D.29646>; else goto <D.29647>;
      <D.29646>:
      info->name_space = start;
      *last_point = 0;
      D.29648 = last_point + 1;
      info->name = D.29648;
      goto <D.29649>;
      <D.29647>:
      info->name_space = "";
      info->name = start;
      <D.29649>:
      goto <D.21093>;
      <D.21094>:
      last_point = p;
      goto <D.21093>;
      <D.21095>:
      p.247 = p;
      p.248 = p.247 + 1;
      p = p.248;
      goto <D.21093>;
      <D.21096>:
      <D.21097>:
      <D.21098>:
      <D.21099>:
      <D.21100>:
      in_modifiers = 1;
      goto <D.21093>;
      <D.21101>:
      goto <D.21093>;
      <D.21093>:
      if (in_modifiers != 0) goto <D.21102>; else goto <D.29650>;
      <D.29650>:
      p.247 = p;
      p.248 = p.247 + 1;
      p = p.248;
      <D.21104>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 != 0) goto <D.21103>; else goto <D.21102>;
      <D.21102>:
      D.29644 = info->name;
      if (D.29644 == 0B) goto <D.29651>; else goto <D.29652>;
      <D.29651>:
      if (last_point != 0B) goto <D.29653>; else goto <D.29654>;
      <D.29653>:
      info->name_space = start;
      *last_point = 0;
      D.29648 = last_point + 1;
      info->name = D.29648;
      goto <D.29655>;
      <D.29654>:
      info->name_space = "";
      info->name = start;
      <D.29655>:
      <D.29652>:
      goto <D.21133>;
      <D.21132>:
      p.247 = p;
      D.29640 = *p.247;
      D.29641 = (int) D.29640;
      switch (D.29641) <default: <D.21130>, case 38: <D.21105>, case 42: <D.21107>, case 44: <D.21126>, case 91: <D.21108>, case 93: <D.21124>>
      <D.21105>:
      if (isbyref != 0) goto <D.29656>; else goto <D.29657>;
      <D.29656>:
      D.29658 = 0;
      return D.29658;
      <D.29657>:
      isbyref = 1;
      D.29659 = info->modifiers;
      D.29660 = monoeg_g_list_append (D.29659, 0B);
      info->modifiers = D.29660;
      p.247 = p;
      p.249 = p.247;
      p.250 = p.249 + 1;
      p = p.250;
      *p.249 = 0;
      goto <D.21106>;
      <D.21107>:
      D.29659 = info->modifiers;
      D.29663 = monoeg_g_list_append (D.29659, -1B);
      info->modifiers = D.29663;
      p.247 = p;
      p.251 = p.247;
      p.252 = p.251 + 1;
      p = p.252;
      *p.251 = 0;
      goto <D.21106>;
      <D.21108>:
      p.247 = p;
      p.253 = p.247;
      p.254 = p.253 + 1;
      p = p.254;
      *p.253 = 0;
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 0) goto <D.29668>; else goto <D.29669>;
      <D.29668>:
      D.29658 = 0;
      return D.29658;
      <D.29669>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 44) goto <D.29670>; else goto <D.29672>;
      <D.29672>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 42) goto <D.29670>; else goto <D.29673>;
      <D.29673>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 93) goto <D.29670>; else goto <D.29671>;
      <D.29670>:
      rank = 1;
      goto <D.21111>;
      <D.21110>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 93) goto <D.21109>; else goto <D.29674>;
      <D.29674>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 44) goto <D.29675>; else goto <D.29676>;
      <D.29675>:
      rank = rank + 1;
      goto <D.29677>;
      <D.29676>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 42) goto <D.29678>; else goto <D.29679>;
      <D.29678>:
      D.29659 = info->modifiers;
      D.29680 = monoeg_g_list_append (D.29659, -2B);
      info->modifiers = D.29680;
      goto <D.29681>;
      <D.29679>:
      D.29658 = 0;
      return D.29658;
      <D.29681>:
      <D.29677>:
      p.247 = p;
      p.248 = p.247 + 1;
      p = p.248;
      <D.21111>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 != 0) goto <D.21110>; else goto <D.21109>;
      <D.21109>:
      p.247 = p;
      p.255 = p.247;
      p.256 = p.255 + 1;
      p = p.256;
      D.29684 = *p.255;
      if (D.29684 != 93) goto <D.29685>; else goto <D.29686>;
      <D.29685>:
      D.29658 = 0;
      return D.29658;
      <D.29686>:
      D.29659 = info->modifiers;
      D.29687 = (long unsigned int) rank;
      D.29688 = (void *) D.29687;
      D.29689 = monoeg_g_list_append (D.29659, D.29688);
      info->modifiers = D.29689;
      goto <D.21121>;
      <D.29671>:
      if (rank != 0) goto <D.29690>; else goto <D.29691>;
      <D.29690>:
      D.29658 = 0;
      return D.29658;
      <D.29691>:
      D.29692 = monoeg_g_ptr_array_new ();
      info->type_arguments = D.29692;
      goto <D.21123>;
      <D.21122>:
      {
        struct MonoTypeNameParse * subinfo;
        gboolean fqname;

        subinfo = monoeg_malloc0 (120);
        fqname = 0;
        D.29693 = info->type_arguments;
        monoeg_g_ptr_array_add (D.29693, subinfo);
        p.247 = p;
        D.29640 = *p.247;
        if (D.29640 == 91) goto <D.29694>; else goto <D.29695>;
        <D.29694>:
        p.247 = p;
        p.248 = p.247 + 1;
        p = p.248;
        fqname = 1;
        <D.29695>:
        p.247 = p;
        D.29696 = _mono_reflection_parse_type (p.247, &p, 1, subinfo);
        if (D.29696 == 0) goto <D.29697>; else goto <D.29698>;
        <D.29697>:
        D.29658 = 0;
        return D.29658;
        <D.29698>:
        if (fqname != 0) goto <D.29701>; else goto <D.29699>;
        <D.29701>:
        p.247 = p;
        D.29640 = *p.247;
        if (D.29640 != 93) goto <D.29702>; else goto <D.29699>;
        <D.29702>:
        {
          char * aname;

          p.247 = p;
          D.29640 = *p.247;
          if (D.29640 != 44) goto <D.29703>; else goto <D.29704>;
          <D.29703>:
          D.29658 = 0;
          return D.29658;
          <D.29704>:
          p.247 = p;
          p.257 = p.247;
          p.258 = p.257 + 1;
          p = p.258;
          *p.257 = 0;
          aname = p;
          goto <D.21116>;
          <D.21115>:
          p.247 = p;
          p.248 = p.247 + 1;
          p = p.248;
          <D.21116>:
          p.247 = p;
          D.29640 = *p.247;
          if (D.29640 != 0) goto <D.29707>; else goto <D.21117>;
          <D.29707>:
          p.247 = p;
          D.29640 = *p.247;
          if (D.29640 != 93) goto <D.21115>; else goto <D.21117>;
          <D.21117>:
          p.247 = p;
          D.29640 = *p.247;
          if (D.29640 != 93) goto <D.29708>; else goto <D.29709>;
          <D.29708>:
          D.29658 = 0;
          return D.29658;
          <D.29709>:
          p.247 = p;
          p.259 = p.247;
          p.260 = p.259 + 1;
          p = p.260;
          *p.259 = 0;
          goto <D.21118>;
          <D.21120>:
          D.29712 = __ctype_b_loc ();
          D.29713 = *D.29712;
          D.29714 = *aname;
          D.29715 = (long unsigned int) D.29714;
          D.29716 = D.29715 * 2;
          D.29717 = D.29713 + D.29716;
          D.29718 = *D.29717;
          D.29719 = (int) D.29718;
          D.29720 = D.29719 & 32;
          if (D.29720 != 0) goto <D.29721>; else goto <D.29722>;
          <D.29721>:
          aname = aname + 1;
          // predicted unlikely by continue predictor.
          goto <D.21118>;
          <D.29722>:
          goto <D.21119>;
          <D.21118>:
          D.29714 = *aname;
          if (D.29714 != 0) goto <D.21120>; else goto <D.21119>;
          <D.21119>:
          D.29714 = *aname;
          if (D.29714 == 0) goto <D.29723>; else goto <D.29725>;
          <D.29725>:
          D.29726 = &subinfo->assembly;
          D.29727 = assembly_name_to_aname (D.29726, aname);
          if (D.29727 == 0) goto <D.29723>; else goto <D.29724>;
          <D.29723>:
          D.29658 = 0;
          return D.29658;
          <D.29724>:
        }
        goto <D.29700>;
        <D.29699>:
        if (fqname != 0) goto <D.29728>; else goto <D.29729>;
        <D.29728>:
        p.247 = p;
        D.29640 = *p.247;
        if (D.29640 == 93) goto <D.29730>; else goto <D.29731>;
        <D.29730>:
        p.247 = p;
        p.261 = p.247;
        p.262 = p.261 + 1;
        p = p.262;
        *p.261 = 0;
        <D.29731>:
        <D.29729>:
        <D.29700>:
        p.247 = p;
        D.29640 = *p.247;
        if (D.29640 == 93) goto <D.29734>; else goto <D.29735>;
        <D.29734>:
        p.247 = p;
        p.263 = p.247;
        p.264 = p.263 + 1;
        p = p.264;
        *p.263 = 0;
        goto <D.21121>;
        <D.29735>:
        p.247 = p;
        D.29640 = *p.247;
        if (D.29640 == 0) goto <D.29738>; else goto <D.29739>;
        <D.29738>:
        D.29658 = 0;
        return D.29658;
        <D.29739>:
        p.247 = p;
        p.265 = p.247;
        p.266 = p.265 + 1;
        p = p.266;
        *p.265 = 0;
      }
      <D.21123>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 != 0) goto <D.21122>; else goto <D.21121>;
      <D.21121>:
      goto <D.21106>;
      <D.21124>:
      if (is_recursed != 0) goto end; else goto <D.29742>;
      <D.29742>:
      D.29658 = 0;
      return D.29658;
      <D.21126>:
      if (is_recursed != 0) goto end; else goto <D.29743>;
      <D.29743>:
      p.247 = p;
      p.267 = p.247;
      p.268 = p.267 + 1;
      p = p.268;
      *p.267 = 0;
      goto <D.21127>;
      <D.21129>:
      D.29712 = __ctype_b_loc ();
      D.29713 = *D.29712;
      p.247 = p;
      D.29640 = *p.247;
      D.29746 = (long unsigned int) D.29640;
      D.29747 = D.29746 * 2;
      D.29748 = D.29713 + D.29747;
      D.29749 = *D.29748;
      D.29750 = (int) D.29749;
      D.29751 = D.29750 & 32;
      if (D.29751 != 0) goto <D.29752>; else goto <D.29753>;
      <D.29752>:
      p.247 = p;
      p.248 = p.247 + 1;
      p = p.248;
      // predicted unlikely by continue predictor.
      goto <D.21127>;
      <D.29753>:
      goto <D.21128>;
      <D.21127>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 != 0) goto <D.21129>; else goto <D.21128>;
      <D.21128>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 == 0) goto <D.29754>; else goto <D.29755>;
      <D.29754>:
      D.29658 = 0;
      return D.29658;
      <D.29755>:
      D.29636 = &info->assembly;
      p.247 = p;
      D.29756 = assembly_name_to_aname (D.29636, p.247);
      if (D.29756 == 0) goto <D.29757>; else goto <D.29758>;
      <D.29757>:
      D.29658 = 0;
      return D.29658;
      <D.29758>:
      goto <D.21106>;
      <D.21130>:
      D.29658 = 0;
      return D.29658;
      <D.21106>:
      D.29759 = info->assembly.name;
      if (D.29759 != 0B) goto <D.21131>; else goto <D.29760>;
      <D.29760>:
      <D.21133>:
      p.247 = p;
      D.29640 = *p.247;
      if (D.29640 != 0) goto <D.21132>; else goto <D.21131>;
      <D.21131>:
      end:
      D.29644 = info->name;
      if (D.29644 == 0B) goto <D.29761>; else goto <D.29763>;
      <D.29763>:
      D.29644 = info->name;
      D.29764 = *D.29644;
      if (D.29764 == 0) goto <D.29761>; else goto <D.29762>;
      <D.29761>:
      D.29658 = 0;
      return D.29658;
      <D.29762>:
      if (endptr != 0B) goto <D.29765>; else goto <D.29766>;
      <D.29765>:
      p.247 = p;
      *endptr = p.247;
      <D.29766>:
      D.29658 = 1;
      return D.29658;
    }
  finally
    {
      p = {CLOBBER};
    }
}


assembly_name_to_aname (struct MonoAssemblyName * assembly, char * p)
{
  mono_byte[17] * D.29770;
  char D.29771;
  const short unsigned int * * D.29775;
  const short unsigned int * D.29776;
  long unsigned int D.29777;
  long unsigned int D.29778;
  const short unsigned int * D.29779;
  short unsigned int D.29780;
  int D.29781;
  int D.29782;
  int D.29789;
  int D.29794;
  char * s.269;
  char * s.270;
  char * s.271;
  char * s.272;
  char D.29801;
  long unsigned int D.29803;
  long unsigned int D.29804;
  const short unsigned int * D.29805;
  short unsigned int D.29806;
  int D.29807;
  int D.29808;
  int D.29812;
  long unsigned int D.29814;
  short unsigned int D.29815;
  char * s.273;
  long unsigned int D.29820;
  short unsigned int D.29821;
  long unsigned int D.29825;
  short unsigned int D.29826;
  long unsigned int D.29830;
  short unsigned int D.29831;
  int D.29837;
  int D.29839;
  int D.29846;
  _Bool iftmp.274;
  long unsigned int D.29849;
  int D.29852;
  int D.29854;
  long int p.275;
  long int start.276;
  long int D.29861;
  unsigned int D.29862;
  unsigned int D.29863;
  long unsigned int D.29866;
  char * p.277;
  int found_sep;
  char * s;
  gboolean quoted;

  try
    {
      quoted = 0;
      memset (assembly, 0, 80);
      assembly->culture = "";
      D.29770 = &assembly->public_key_token;
      memset (D.29770, 0, 17);
      D.29771 = *p;
      if (D.29771 == 34) goto <D.29772>; else goto <D.29773>;
      <D.29772>:
      quoted = 1;
      p = p + 1;
      <D.29773>:
      assembly->name = p;
      goto <D.21050>;
      <D.21049>:
      p = p + 1;
      <D.21050>:
      D.29771 = *p;
      if (D.29771 != 0) goto <D.29774>; else goto <D.21051>;
      <D.29774>:
      D.29775 = __ctype_b_loc ();
      D.29776 = *D.29775;
      D.29771 = *p;
      D.29777 = (long unsigned int) D.29771;
      D.29778 = D.29777 * 2;
      D.29779 = D.29776 + D.29778;
      D.29780 = *D.29779;
      D.29781 = (int) D.29780;
      D.29782 = D.29781 & 2048;
      if (D.29782 != 0) goto <D.21049>; else goto <D.29783>;
      <D.29783>:
      D.29771 = *p;
      if (D.29771 == 46) goto <D.21049>; else goto <D.29784>;
      <D.29784>:
      D.29771 = *p;
      if (D.29771 == 45) goto <D.21049>; else goto <D.29785>;
      <D.29785>:
      D.29771 = *p;
      if (D.29771 == 95) goto <D.21049>; else goto <D.29786>;
      <D.29786>:
      D.29771 = *p;
      if (D.29771 == 36) goto <D.21049>; else goto <D.29787>;
      <D.29787>:
      D.29771 = *p;
      if (D.29771 == 64) goto <D.21049>; else goto <D.29788>;
      <D.29788>:
      D.29775 = __ctype_b_loc ();
      D.29776 = *D.29775;
      D.29771 = *p;
      D.29777 = (long unsigned int) D.29771;
      D.29778 = D.29777 * 2;
      D.29779 = D.29776 + D.29778;
      D.29780 = *D.29779;
      D.29781 = (int) D.29780;
      D.29789 = D.29781 & 32;
      if (D.29789 != 0) goto <D.21049>; else goto <D.21051>;
      <D.21051>:
      if (quoted != 0) goto <D.29790>; else goto <D.29791>;
      <D.29790>:
      D.29771 = *p;
      if (D.29771 != 34) goto <D.29792>; else goto <D.29793>;
      <D.29792>:
      D.29794 = 1;
      return D.29794;
      <D.29793>:
      *p = 0;
      p = p + 1;
      <D.29791>:
      D.29771 = *p;
      if (D.29771 != 44) goto <D.29795>; else goto <D.29796>;
      <D.29795>:
      D.29794 = 1;
      return D.29794;
      <D.29796>:
      *p = 0;
      s.269 = p + 18446744073709551615;
      s = s.269;
      goto <D.21053>;
      <D.21052>:
      s.270 = s;
      s.271 = s.270;
      s.272 = s.271 + 18446744073709551615;
      s = s.272;
      *s.271 = 0;
      <D.21053>:
      s.270 = s;
      D.29801 = *s.270;
      if (D.29801 != 0) goto <D.29802>; else goto <D.21054>;
      <D.29802>:
      D.29775 = __ctype_b_loc ();
      D.29776 = *D.29775;
      s.270 = s;
      D.29801 = *s.270;
      D.29803 = (long unsigned int) D.29801;
      D.29804 = D.29803 * 2;
      D.29805 = D.29776 + D.29804;
      D.29806 = *D.29805;
      D.29807 = (int) D.29806;
      D.29808 = D.29807 & 32;
      if (D.29808 != 0) goto <D.21052>; else goto <D.21054>;
      <D.21054>:
      p = p + 1;
      goto <D.21056>;
      <D.21055>:
      p = p + 1;
      <D.21056>:
      D.29775 = __ctype_b_loc ();
      D.29776 = *D.29775;
      D.29771 = *p;
      D.29777 = (long unsigned int) D.29771;
      D.29778 = D.29777 * 2;
      D.29779 = D.29776 + D.29778;
      D.29780 = *D.29779;
      D.29781 = (int) D.29780;
      D.29789 = D.29781 & 32;
      if (D.29789 != 0) goto <D.21055>; else goto <D.21057>;
      <D.21057>:
      goto <D.21073>;
      <D.21072>:
      D.29771 = *p;
      if (D.29771 == 86) goto <D.29811>; else goto <D.29809>;
      <D.29811>:
      D.29812 = monoeg_g_ascii_strncasecmp (p, "Version=", 8);
      if (D.29812 == 0) goto <D.29813>; else goto <D.29809>;
      <D.29813>:
      p = p + 8;
      D.29814 = strtoul (p, &s, 10);
      D.29815 = (short unsigned int) D.29814;
      assembly->major = D.29815;
      s.270 = s;
      if (s.270 == p) goto <D.29816>; else goto <D.29818>;
      <D.29818>:
      s.270 = s;
      D.29801 = *s.270;
      if (D.29801 != 46) goto <D.29816>; else goto <D.29817>;
      <D.29816>:
      D.29794 = 1;
      return D.29794;
      <D.29817>:
      s.270 = s;
      s.273 = s.270 + 1;
      s = s.273;
      p = s;
      D.29820 = strtoul (p, &s, 10);
      D.29821 = (short unsigned int) D.29820;
      assembly->minor = D.29821;
      s.270 = s;
      if (s.270 == p) goto <D.29822>; else goto <D.29824>;
      <D.29824>:
      s.270 = s;
      D.29801 = *s.270;
      if (D.29801 != 46) goto <D.29822>; else goto <D.29823>;
      <D.29822>:
      D.29794 = 1;
      return D.29794;
      <D.29823>:
      s.270 = s;
      s.273 = s.270 + 1;
      s = s.273;
      p = s;
      D.29825 = strtoul (p, &s, 10);
      D.29826 = (short unsigned int) D.29825;
      assembly->build = D.29826;
      s.270 = s;
      if (s.270 == p) goto <D.29827>; else goto <D.29829>;
      <D.29829>:
      s.270 = s;
      D.29801 = *s.270;
      if (D.29801 != 46) goto <D.29827>; else goto <D.29828>;
      <D.29827>:
      D.29794 = 1;
      return D.29794;
      <D.29828>:
      s.270 = s;
      s.273 = s.270 + 1;
      s = s.273;
      p = s;
      D.29830 = strtoul (p, &s, 10);
      D.29831 = (short unsigned int) D.29830;
      assembly->revision = D.29831;
      s.270 = s;
      if (s.270 == p) goto <D.29832>; else goto <D.29833>;
      <D.29832>:
      D.29794 = 1;
      return D.29794;
      <D.29833>:
      p = s;
      goto <D.29810>;
      <D.29809>:
      D.29771 = *p;
      if (D.29771 == 67) goto <D.29836>; else goto <D.29834>;
      <D.29836>:
      D.29837 = monoeg_g_ascii_strncasecmp (p, "Culture=", 8);
      if (D.29837 == 0) goto <D.29838>; else goto <D.29834>;
      <D.29838>:
      p = p + 8;
      D.29839 = monoeg_g_ascii_strncasecmp (p, "neutral", 7);
      if (D.29839 == 0) goto <D.29840>; else goto <D.29841>;
      <D.29840>:
      assembly->culture = "";
      p = p + 7;
      goto <D.29842>;
      <D.29841>:
      assembly->culture = p;
      goto <D.21059>;
      <D.21058>:
      p = p + 1;
      <D.21059>:
      D.29771 = *p;
      if (D.29771 != 0) goto <D.29843>; else goto <D.21060>;
      <D.29843>:
      D.29771 = *p;
      if (D.29771 != 44) goto <D.21058>; else goto <D.21060>;
      <D.21060>:
      <D.29842>:
      goto <D.29835>;
      <D.29834>:
      D.29771 = *p;
      if (D.29771 == 80) goto <D.29845>; else goto <D.29844>;
      <D.29845>:
      D.29846 = monoeg_g_ascii_strncasecmp (p, "PublicKeyToken=", 15);
      if (D.29846 == 0) goto <D.29847>; else goto <D.29844>;
      <D.29847>:
      p = p + 15;
      D.29849 = __strlen_g ("null");
      if (D.29849 <= 3) goto <D.29850>; else goto <D.29851>;
      <D.29850>:
      D.29852 = strcmp (p, "null");
      iftmp.274 = D.29852 == 0;
      goto <D.29853>;
      <D.29851>:
      D.29854 = strncmp (p, "null", 4);
      iftmp.274 = D.29854 == 0;
      <D.29853>:
      if (iftmp.274 != 0) goto <D.29855>; else goto <D.29856>;
      <D.29855>:
      p = p + 4;
      goto <D.29857>;
      <D.29856>:
      {
        int len;
        gchar * start;

        start = p;
        goto <D.21064>;
        <D.21063>:
        p = p + 1;
        <D.21064>:
        D.29771 = *p;
        if (D.29771 != 0) goto <D.29858>; else goto <D.21065>;
        <D.29858>:
        D.29771 = *p;
        if (D.29771 != 44) goto <D.21063>; else goto <D.21065>;
        <D.21065>:
        p.275 = (long int) p;
        start.276 = (long int) start;
        D.29861 = p.275 - start.276;
        D.29862 = (unsigned int) D.29861;
        D.29863 = D.29862 + 1;
        len = (int) D.29863;
        if (len > 17) goto <D.29864>; else goto <D.29865>;
        <D.29864>:
        len = 17;
        <D.29865>:
        D.29770 = &assembly->public_key_token;
        D.29866 = (long unsigned int) len;
        monoeg_g_strlcpy (D.29770, start, D.29866);
      }
      <D.29857>:
      goto <D.21068>;
      <D.29844>:
      goto <D.21067>;
      <D.21066>:
      p = p + 1;
      <D.21067>:
      D.29771 = *p;
      if (D.29771 != 0) goto <D.29867>; else goto <D.21068>;
      <D.29867>:
      D.29771 = *p;
      if (D.29771 != 44) goto <D.21066>; else goto <D.21068>;
      <D.21068>:
      <D.29835>:
      <D.29810>:
      found_sep = 0;
      goto <D.21069>;
      <D.21070>:
      p.277 = p;
      p = p.277 + 1;
      *p.277 = 0;
      found_sep = 1;
      // predicted unlikely by continue predictor.
      goto <D.21069>;
      <D.21069>:
      D.29775 = __ctype_b_loc ();
      D.29776 = *D.29775;
      D.29771 = *p;
      D.29777 = (long unsigned int) D.29771;
      D.29778 = D.29777 * 2;
      D.29779 = D.29776 + D.29778;
      D.29780 = *D.29779;
      D.29781 = (int) D.29780;
      D.29789 = D.29781 & 32;
      if (D.29789 != 0) goto <D.21070>; else goto <D.29869>;
      <D.29869>:
      D.29771 = *p;
      if (D.29771 == 44) goto <D.21070>; else goto <D.21071>;
      <D.21071>:
      if (found_sep == 0) goto <D.29870>; else goto <D.29871>;
      <D.29870>:
      D.29794 = 1;
      return D.29794;
      <D.29871>:
      <D.21073>:
      D.29771 = *p;
      if (D.29771 != 0) goto <D.21072>; else goto <D.21074>;
      <D.21074>:
      D.29794 = 0;
      return D.29794;
    }
  finally
    {
      s = {CLOBBER};
    }
}


mono_reflection_get_type (struct MonoImage * image, struct MonoTypeNameParse * info, gboolean ignorecase, gboolean * type_resolve)
{
  struct MonoType * D.29874;

  D.29874 = mono_reflection_get_type_with_rootimage (image, image, info, ignorecase, type_resolve);
  return D.29874;
}


mono_reflection_get_type_with_rootimage (struct MonoImage * rootimage, struct MonoImage * image, struct MonoTypeNameParse * info, gboolean ignorecase, gboolean * type_resolve)
{
  long unsigned int D.29879;
  long unsigned int D.29880;
  struct MonoAssembly * D.29882;
  struct MonoType * D.29885;
  struct MonoDomain * D.29886;
  int D.29887;
  int D.29892;
  char * D.29897;
  char D.29899;
  char * D.29901;
  void * D.29902;
  struct MonoDomain * D.29903;
  char * D.29904;
  struct MonoAssembly * D.29907;
  unsigned char D.29908;
  struct MonoImage * D.29912;
  struct MonoType * type;
  struct MonoReflectionAssembly * assembly;
  struct GString * fullName;
  struct GList * mod;

  if (image != 0B) goto <D.29878>; else goto <D.29876>;
  <D.29878>:
  D.29879 = BIT_FIELD_REF <*image, 64, 192>;
  D.29880 = D.29879 & 268435456;
  if (D.29880 != 0) goto <D.29881>; else goto <D.29876>;
  <D.29881>:
  D.29882 = image->assembly;
  type = mono_reflection_get_type_internal_dynamic (rootimage, D.29882, info, ignorecase);
  goto <D.29877>;
  <D.29876>:
  type = mono_reflection_get_type_internal (rootimage, image, info, ignorecase);
  <D.29877>:
  if (type != 0B) goto <D.29883>; else goto <D.29884>;
  <D.29883>:
  D.29885 = type;
  return D.29885;
  <D.29884>:
  D.29886 = mono_domain_get ();
  D.29887 = mono_domain_has_type_resolve (D.29886);
  if (D.29887 == 0) goto <D.29888>; else goto <D.29889>;
  <D.29888>:
  D.29885 = 0B;
  return D.29885;
  <D.29889>:
  if (type_resolve != 0B) goto <D.29890>; else goto <D.29891>;
  <D.29890>:
  D.29892 = *type_resolve;
  if (D.29892 != 0) goto <D.29893>; else goto <D.29894>;
  <D.29893>:
  D.29885 = 0B;
  return D.29885;
  <D.29894>:
  *type_resolve = 1;
  <D.29891>:
  fullName = monoeg_g_string_new ("");
  D.29897 = info->name_space;
  if (D.29897 != 0B) goto <D.29898>; else goto <D.29895>;
  <D.29898>:
  D.29897 = info->name_space;
  D.29899 = *D.29897;
  if (D.29899 != 0) goto <D.29900>; else goto <D.29895>;
  <D.29900>:
  D.29897 = info->name_space;
  D.29901 = info->name;
  monoeg_g_string_printf (fullName, "%s.%s", D.29897, D.29901);
  goto <D.29896>;
  <D.29895>:
  D.29901 = info->name;
  monoeg_g_string_printf (fullName, "%s", D.29901);
  <D.29896>:
  mod = info->nested;
  goto <D.21211>;
  <D.21210>:
  D.29902 = mod->data;
  monoeg_g_string_append_printf (fullName, "+%s", D.29902);
  mod = mod->next;
  <D.21211>:
  if (mod != 0B) goto <D.21210>; else goto <D.21212>;
  <D.21212>:
  D.29903 = mono_domain_get ();
  D.29904 = fullName->str;
  assembly = mono_domain_try_type_resolve (D.29903, D.29904, 0B);
  if (assembly != 0B) goto <D.29905>; else goto <D.29906>;
  <D.29905>:
  D.29907 = assembly->assembly;
  D.29908 = D.29907->dynamic;
  if (D.29908 != 0) goto <D.29909>; else goto <D.29910>;
  <D.29909>:
  D.29907 = assembly->assembly;
  type = mono_reflection_get_type_internal_dynamic (rootimage, D.29907, info, ignorecase);
  goto <D.29911>;
  <D.29910>:
  D.29907 = assembly->assembly;
  D.29912 = D.29907->image;
  type = mono_reflection_get_type_internal (rootimage, D.29912, info, ignorecase);
  <D.29911>:
  <D.29906>:
  monoeg_g_string_free (fullName, 1);
  D.29885 = type;
  return D.29885;
}


mono_reflection_get_type_internal_dynamic (struct MonoImage * rootimage, struct MonoAssembly * assembly, struct MonoTypeNameParse * info, gboolean ignorecase)
{
  unsigned char D.29914;
  _Bool D.29915;
  long int D.29916;
  long int D.29917;
  struct MonoDomain * D.29920;
  struct MonoArray * D.29921;
  long unsigned int D.29924;
  char * D.29925;
  struct MonoDynamicImage * D.29926;
  struct MonoImage * D.29927;
  long unsigned int D.29929;
  struct MonoArray * D.29932;
  char * D.29935;
  struct MonoImage * D.29936;
  long unsigned int D.29938;
  struct MonoType * D.29939;
  struct MonoReflectionAssemblyBuilder * abuilder;
  struct MonoType * type;
  int i;

  D.29914 = assembly->dynamic;
  D.29915 = D.29914 == 0;
  D.29916 = (long int) D.29915;
  D.29917 = __builtin_expect (D.29916, 0);
  if (D.29917 != 0) goto <D.29918>; else goto <D.29919>;
  <D.29918>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7574, "assembly->dynamic");
  <D.29919>:
  D.29920 = MEM[(struct MonoDynamicAssembly *)assembly].domain;
  abuilder = mono_assembly_get_object (D.29920, assembly);
  type = 0B;
  D.29921 = abuilder->modules;
  if (D.29921 != 0B) goto <D.29922>; else goto <D.29923>;
  <D.29922>:
  i = 0;
  goto <D.21194>;
  <D.21193>:
  {
    struct MonoReflectionModuleBuilder * mb;

    D.29921 = abuilder->modules;
    D.29924 = (long unsigned int) i;
    D.29925 = mono_array_addr_with_size (D.29921, 8, D.29924);
    mb = MEM[(struct MonoReflectionModuleBuilder * *)D.29925];
    D.29926 = mb->dynamic_image;
    D.29927 = &D.29926->image;
    type = mono_reflection_get_type_internal (rootimage, D.29927, info, ignorecase);
    if (type != 0B) goto <D.21192>; else goto <D.29928>;
    <D.29928>:
  }
  i = i + 1;
  <D.21194>:
  D.29924 = (long unsigned int) i;
  D.29921 = abuilder->modules;
  D.29929 = mono_array_length (D.29921);
  if (D.29924 < D.29929) goto <D.21193>; else goto <D.21192>;
  <D.21192>:
  <D.29923>:
  if (type == 0B) goto <D.29930>; else goto <D.29931>;
  <D.29930>:
  D.29932 = abuilder->loaded_modules;
  if (D.29932 != 0B) goto <D.29933>; else goto <D.29934>;
  <D.29933>:
  i = 0;
  goto <D.21198>;
  <D.21197>:
  {
    struct MonoReflectionModule * mod;

    D.29932 = abuilder->loaded_modules;
    D.29924 = (long unsigned int) i;
    D.29935 = mono_array_addr_with_size (D.29932, 8, D.29924);
    mod = MEM[(struct MonoReflectionModule * *)D.29935];
    D.29936 = mod->image;
    type = mono_reflection_get_type_internal (rootimage, D.29936, info, ignorecase);
    if (type != 0B) goto <D.21196>; else goto <D.29937>;
    <D.29937>:
  }
  i = i + 1;
  <D.21198>:
  D.29924 = (long unsigned int) i;
  D.29932 = abuilder->loaded_modules;
  D.29938 = mono_array_length (D.29932);
  if (D.29924 < D.29938) goto <D.21197>; else goto <D.21196>;
  <D.21196>:
  <D.29934>:
  <D.29931>:
  D.29939 = type;
  return D.29939;
}


mono_reflection_get_type_internal (struct MonoImage * rootimage, struct MonoImage * image, struct MonoTypeNameParse * info, gboolean ignorecase)
{
  char * D.29945;
  char * D.29946;
  struct MonoType * D.29950;
  const char * D.29953;
  void * D.29954;
  int D.29955;
  int D.29958;
  struct GPtrArray * D.29963;
  unsigned int D.29966;
  long unsigned int D.29967;
  long unsigned int D.29968;
  void * * D.29969;
  long unsigned int D.29970;
  long unsigned int D.29971;
  void * * D.29972;
  struct MonoType * * D.29973;
  struct MonoType * D.29974;
  struct MonoType * D.29975;
  unsigned int i.278;
  struct MonoDomain * D.29979;
  struct MonoType * D.29980;
  int D.29981;
  long int D.29984;
  unsigned int modval.279;
  struct MonoClass * klass;
  struct GList * mod;
  int modval;
  gboolean bounded;

  bounded = 0;
  if (image == 0B) goto <D.29941>; else goto <D.29942>;
  <D.29941>:
  image = mono_defaults.corlib;
  <D.29942>:
  if (ignorecase != 0) goto <D.29943>; else goto <D.29944>;
  <D.29943>:
  D.29945 = info->name_space;
  D.29946 = info->name;
  klass = mono_class_from_name_case (image, D.29945, D.29946);
  goto <D.29947>;
  <D.29944>:
  D.29945 = info->name_space;
  D.29946 = info->name;
  klass = mono_class_from_name (image, D.29945, D.29946);
  <D.29947>:
  if (klass == 0B) goto <D.29948>; else goto <D.29949>;
  <D.29948>:
  D.29950 = 0B;
  return D.29950;
  <D.29949>:
  mod = info->nested;
  goto <D.21164>;
  <D.21163>:
  {
    void * iter;
    struct MonoClass * parent;

    try
      {
        iter = 0B;
        parent = klass;
        mono_class_init (parent);
        goto <D.21161>;
        <D.21160>:
        if (ignorecase != 0) goto <D.29951>; else goto <D.29952>;
        <D.29951>:
        D.29953 = klass->name;
        D.29954 = mod->data;
        D.29955 = monoeg_ascii_strcasecmp (D.29953, D.29954);
        if (D.29955 == 0) goto <D.21159>; else goto <D.29956>;
        <D.29956>:
        goto <D.29957>;
        <D.29952>:
        D.29953 = klass->name;
        D.29954 = mod->data;
        D.29958 = strcmp (D.29953, D.29954);
        if (D.29958 == 0) goto <D.21159>; else goto <D.29959>;
        <D.29959>:
        <D.29957>:
        <D.21161>:
        klass = mono_class_get_nested_types (parent, &iter);
        if (klass != 0B) goto <D.21160>; else goto <D.21159>;
        <D.21159>:
        if (klass == 0B) goto <D.21162>; else goto <D.29960>;
        <D.29960>:
      }
    finally
      {
        iter = {CLOBBER};
      }
  }
  mod = mod->next;
  <D.21164>:
  if (mod != 0B) goto <D.21163>; else goto <D.21162>;
  <D.21162>:
  if (klass == 0B) goto <D.29961>; else goto <D.29962>;
  <D.29961>:
  D.29950 = 0B;
  return D.29950;
  <D.29962>:
  D.29963 = info->type_arguments;
  if (D.29963 != 0B) goto <D.29964>; else goto <D.29965>;
  <D.29964>:
  {
    struct MonoType * * type_args;
    struct MonoReflectionType * the_type;
    struct MonoType * instance;
    int i;

    D.29963 = info->type_arguments;
    D.29966 = D.29963->len;
    D.29967 = (long unsigned int) D.29966;
    D.29968 = D.29967 * 8;
    type_args = monoeg_malloc0 (D.29968);
    i = 0;
    goto <D.21171>;
    <D.21170>:
    {
      struct MonoTypeNameParse * subinfo;

      D.29963 = info->type_arguments;
      D.29969 = D.29963->pdata;
      D.29970 = (long unsigned int) i;
      D.29971 = D.29970 * 8;
      D.29972 = D.29969 + D.29971;
      subinfo = *D.29972;
      D.29970 = (long unsigned int) i;
      D.29971 = D.29970 * 8;
      D.29973 = type_args + D.29971;
      D.29974 = _mono_reflection_get_type_from_info (subinfo, rootimage, ignorecase);
      *D.29973 = D.29974;
      D.29970 = (long unsigned int) i;
      D.29971 = D.29970 * 8;
      D.29973 = type_args + D.29971;
      D.29975 = *D.29973;
      if (D.29975 == 0B) goto <D.29976>; else goto <D.29977>;
      <D.29976>:
      monoeg_g_free (type_args);
      D.29950 = 0B;
      return D.29950;
      <D.29977>:
    }
    i = i + 1;
    <D.21171>:
    D.29963 = info->type_arguments;
    D.29966 = D.29963->len;
    i.278 = (unsigned int) i;
    if (D.29966 > i.278) goto <D.21170>; else goto <D.21172>;
    <D.21172>:
    D.29979 = mono_domain_get ();
    D.29980 = &klass->byval_arg;
    the_type = mono_type_get_object (D.29979, D.29980);
    D.29963 = info->type_arguments;
    D.29966 = D.29963->len;
    D.29981 = (int) D.29966;
    instance = mono_reflection_bind_generic_parameters (the_type, D.29981, type_args);
    monoeg_g_free (type_args);
    if (instance == 0B) goto <D.29982>; else goto <D.29983>;
    <D.29982>:
    D.29950 = 0B;
    return D.29950;
    <D.29983>:
    klass = mono_class_from_mono_type (instance);
  }
  <D.29965>:
  mod = info->modifiers;
  goto <D.21174>;
  <D.21173>:
  D.29954 = mod->data;
  D.29984 = (long int) D.29954;
  modval = (int) D.29984;
  if (modval == 0) goto <D.29985>; else goto <D.29986>;
  <D.29985>:
  D.29950 = &klass->this_arg;
  return D.29950;
  <D.29986>:
  if (modval == -1) goto <D.29987>; else goto <D.29988>;
  <D.29987>:
  D.29980 = &klass->byval_arg;
  klass = mono_ptr_class_get (D.29980);
  goto <D.29989>;
  <D.29988>:
  if (modval == -2) goto <D.29990>; else goto <D.29991>;
  <D.29990>:
  bounded = 1;
  goto <D.29992>;
  <D.29991>:
  modval.279 = (unsigned int) modval;
  klass = mono_bounded_array_class_get (klass, modval.279, bounded);
  <D.29992>:
  <D.29989>:
  mod = mod->next;
  <D.21174>:
  if (mod != 0B) goto <D.21173>; else goto <D.21175>;
  <D.21175>:
  D.29950 = &klass->byval_arg;
  return D.29950;
}


_mono_reflection_get_type_from_info (struct MonoTypeNameParse * info, struct MonoImage * image, gboolean ignorecase)
{
  const char * D.29997;
  struct MonoAssemblyName * D.30000;
  struct MonoAssembly * D.30005;
  struct MonoAssemblyName * D.30008;
  int D.30009;
  struct MonoType * D.30016;
  struct MonoImage * D.30024;
  gboolean type_resolve;
  struct MonoType * type;
  struct MonoImage * rootimage;

  try
    {
      type_resolve = 0;
      rootimage = image;
      D.29997 = info->assembly.name;
      if (D.29997 != 0B) goto <D.29998>; else goto <D.29999>;
      <D.29998>:
      {
        struct MonoAssembly * assembly;

        D.30000 = &info->assembly;
        assembly = mono_assembly_loaded (D.30000);
        if (assembly == 0B) goto <D.30001>; else goto <D.30002>;
        <D.30001>:
        if (image != 0B) goto <D.30003>; else goto <D.30004>;
        <D.30003>:
        D.30005 = image->assembly;
        if (D.30005 != 0B) goto <D.30006>; else goto <D.30007>;
        <D.30006>:
        D.30000 = &info->assembly;
        D.30005 = image->assembly;
        D.30008 = &D.30005->aname;
        D.30009 = mono_assembly_names_equal (D.30000, D.30008);
        if (D.30009 != 0) goto <D.30010>; else goto <D.30011>;
        <D.30010>:
        assembly = image->assembly;
        <D.30011>:
        <D.30007>:
        <D.30004>:
        <D.30002>:
        if (assembly == 0B) goto <D.30012>; else goto <D.30013>;
        <D.30012>:
        D.30000 = &info->assembly;
        assembly = mono_assembly_load (D.30000, 0B, 0B);
        if (assembly == 0B) goto <D.30014>; else goto <D.30015>;
        <D.30014>:
        D.30016 = 0B;
        return D.30016;
        <D.30015>:
        <D.30013>:
        image = assembly->image;
      }
      goto <D.30017>;
      <D.29999>:
      if (image == 0B) goto <D.30018>; else goto <D.30019>;
      <D.30018>:
      image = mono_defaults.corlib;
      <D.30019>:
      <D.30017>:
      type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve);
      if (type == 0B) goto <D.30020>; else goto <D.30021>;
      <D.30020>:
      D.29997 = info->assembly.name;
      if (D.29997 == 0B) goto <D.30022>; else goto <D.30023>;
      <D.30022>:
      D.30024 = mono_defaults.corlib;
      if (D.30024 != image) goto <D.30025>; else goto <D.30026>;
      <D.30025>:
      image = mono_defaults.corlib;
      type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve);
      <D.30026>:
      <D.30023>:
      <D.30021>:
      D.30016 = type;
      return D.30016;
    }
  finally
    {
      type_resolve = {CLOBBER};
    }
}


mono_reflection_free_type_info (struct MonoTypeNameParse * info)
{
  struct GList * D.30029;
  struct GList * D.30030;
  struct GPtrArray * D.30031;
  void * * D.30034;
  long unsigned int D.30035;
  long unsigned int D.30036;
  void * * D.30037;
  unsigned int D.30038;
  unsigned int i.280;

  D.30029 = info->modifiers;
  monoeg_g_list_free (D.30029);
  D.30030 = info->nested;
  monoeg_g_list_free (D.30030);
  D.30031 = info->type_arguments;
  if (D.30031 != 0B) goto <D.30032>; else goto <D.30033>;
  <D.30032>:
  {
    int i;

    i = 0;
    goto <D.21219>;
    <D.21218>:
    {
      struct MonoTypeNameParse * subinfo;

      D.30031 = info->type_arguments;
      D.30034 = D.30031->pdata;
      D.30035 = (long unsigned int) i;
      D.30036 = D.30035 * 8;
      D.30037 = D.30034 + D.30036;
      subinfo = *D.30037;
      mono_reflection_free_type_info (subinfo);
      monoeg_g_free (subinfo);
    }
    i = i + 1;
    <D.21219>:
    D.30031 = info->type_arguments;
    D.30038 = D.30031->len;
    i.280 = (unsigned int) i;
    if (D.30038 > i.280) goto <D.21218>; else goto <D.21220>;
    <D.21220>:
    D.30031 = info->type_arguments;
    monoeg_g_ptr_array_free (D.30031, 1);
  }
  <D.30033>:
}


mono_reflection_type_from_name (char * name, struct MonoImage * image)
{
  int D.30040;
  struct MonoType * D.30043;
  struct MonoType * type;
  struct MonoTypeNameParse info;
  char * tmp;

  try
    {
      type = 0B;
      tmp = monoeg_strdup (name);
      D.30040 = mono_reflection_parse_type (tmp, &info);
      if (D.30040 != 0) goto <D.30041>; else goto <D.30042>;
      <D.30041>:
      type = _mono_reflection_get_type_from_info (&info, image, 0);
      <D.30042>:
      monoeg_g_free (tmp);
      mono_reflection_free_type_info (&info);
      D.30043 = type;
      return D.30043;
    }
  finally
    {
      info = {CLOBBER};
    }
}


mono_reflection_get_token (struct MonoObject * obj)
{
  struct MonoVTable * D.30046;
  const char * D.30047;
  int D.30048;
  unsigned int D.30051;
  int D.30053;
  unsigned int D.30056;
  int D.30058;
  int D.30061;
  int D.30062;
  int D.30064;
  unsigned int D.30067;
  int D.30069;
  int D.30072;
  struct MonoException * D.30075;
  int D.30080;
  int D.30082;
  int D.30084;
  int D.30086;
  struct MonoMethod * D.30087;
  long unsigned int D.30088;
  long unsigned int D.30089;
  uint32_t D.30092;
  struct MonoMethod * D.30093;
  int D.30094;
  struct MonoClassField * D.30097;
  int D.30098;
  struct MonoClass * D.30101;
  long int D.30102;
  struct MonoClassField * D.30103;
  long int D.30104;
  long int D.30105;
  long int D.30106;
  int iftmp.281;
  int D.30112;
  _Bool D.30113;
  long int D.30114;
  long int D.30115;
  struct MonoObject * * D.30118;
  long unsigned int D.30119;
  long unsigned int D.30120;
  struct MonoObject * * D.30121;
  int D.30123;
  struct MonoProperty * D.30126;
  int D.30128;
  struct MonoEvent * D.30131;
  int D.30136;
  int D.30138;
  struct MonoObject * D.30139;
  struct MonoVTable * D.30140;
  int D.30141;
  _Bool D.30142;
  long int D.30143;
  long int D.30144;
  struct MonoMethod * D.30147;
  int D.30148;
  int D.30152;
  int D.30154;
  int D.30158;
  int D.30160;
  const char * D.30161;
  struct MonoClass * klass;
  guint32 token;

  token = 0;
  D.30046 = obj->vtable;
  klass = D.30046->klass;
  D.30047 = klass->name;
  D.30048 = strcmp (D.30047, "MethodBuilder");
  if (D.30048 == 0) goto <D.30049>; else goto <D.30050>;
  <D.30049>:
  {
    struct MonoReflectionMethodBuilder * mb;

    mb = obj;
    D.30051 = mb->table_idx;
    token = D.30051 | 100663296;
  }
  goto <D.30052>;
  <D.30050>:
  D.30047 = klass->name;
  D.30053 = strcmp (D.30047, "ConstructorBuilder");
  if (D.30053 == 0) goto <D.30054>; else goto <D.30055>;
  <D.30054>:
  {
    struct MonoReflectionCtorBuilder * mb;

    mb = obj;
    D.30056 = mb->table_idx;
    token = D.30056 | 100663296;
  }
  goto <D.30057>;
  <D.30055>:
  D.30047 = klass->name;
  D.30058 = strcmp (D.30047, "FieldBuilder");
  if (D.30058 == 0) goto <D.30059>; else goto <D.30060>;
  <D.30059>:
  {
    struct MonoReflectionFieldBuilder * fb;

    fb = obj;
    D.30061 = fb->table_idx;
    D.30062 = D.30061 | 67108864;
    token = (guint32) D.30062;
  }
  goto <D.30063>;
  <D.30060>:
  D.30047 = klass->name;
  D.30064 = strcmp (D.30047, "TypeBuilder");
  if (D.30064 == 0) goto <D.30065>; else goto <D.30066>;
  <D.30065>:
  {
    struct MonoReflectionTypeBuilder * tb;

    tb = obj;
    D.30067 = tb->table_idx;
    token = D.30067 | 33554432;
  }
  goto <D.30068>;
  <D.30066>:
  D.30047 = klass->name;
  D.30069 = strcmp (D.30047, "MonoType");
  if (D.30069 == 0) goto <D.30070>; else goto <D.30071>;
  <D.30070>:
  {
    struct MonoType * type;
    struct MonoClass * mc;

    type = mono_reflection_type_get_handle (obj);
    mc = mono_class_from_mono_type (type);
    D.30072 = mono_class_init (mc);
    if (D.30072 == 0) goto <D.30073>; else goto <D.30074>;
    <D.30073>:
    D.30075 = mono_class_get_exception_for_failure (mc);
    mono_raise_exception (D.30075);
    <D.30074>:
    token = mc->type_token;
  }
  goto <D.30076>;
  <D.30071>:
  D.30047 = klass->name;
  D.30080 = strcmp (D.30047, "MonoCMethod");
  if (D.30080 == 0) goto <D.30077>; else goto <D.30081>;
  <D.30081>:
  D.30047 = klass->name;
  D.30082 = strcmp (D.30047, "MonoMethod");
  if (D.30082 == 0) goto <D.30077>; else goto <D.30083>;
  <D.30083>:
  D.30047 = klass->name;
  D.30084 = strcmp (D.30047, "MonoGenericMethod");
  if (D.30084 == 0) goto <D.30077>; else goto <D.30085>;
  <D.30085>:
  D.30047 = klass->name;
  D.30086 = strcmp (D.30047, "MonoGenericCMethod");
  if (D.30086 == 0) goto <D.30077>; else goto <D.30078>;
  <D.30077>:
  {
    struct MonoReflectionMethod * m;

    m = obj;
    D.30087 = m->method;
    D.30088 = BIT_FIELD_REF <*D.30087, 64, 256>;
    D.30089 = D.30088 & 2251799813685248;
    if (D.30089 != 0) goto <D.30090>; else goto <D.30091>;
    <D.30090>:
    {
      struct MonoMethodInflated * inflated;

      inflated = m->method;
      D.30093 = inflated->declaring;
      D.30092 = D.30093->token;
      return D.30092;
    }
    <D.30091>:
    D.30087 = m->method;
    token = D.30087->token;
  }
  goto <D.30079>;
  <D.30078>:
  D.30047 = klass->name;
  D.30094 = strcmp (D.30047, "MonoField");
  if (D.30094 == 0) goto <D.30095>; else goto <D.30096>;
  <D.30095>:
  {
    struct MonoReflectionField * f;

    f = obj;
    D.30097 = f->field;
    D.30098 = is_field_on_inst (D.30097);
    if (D.30098 != 0) goto <D.30099>; else goto <D.30100>;
    <D.30099>:
    {
      struct MonoDynamicGenericClass * dgclass;
      int field_index;
      struct MonoObject * obj;

      D.30097 = f->field;
      D.30101 = D.30097->parent;
      dgclass = D.30101->generic_class;
      D.30097 = f->field;
      D.30102 = (long int) D.30097;
      D.30103 = dgclass->fields;
      D.30104 = (long int) D.30103;
      D.30105 = D.30102 - D.30104;
      D.30106 = D.30105 /[ex] 32;
      field_index = (int) D.30106;
      if (field_index < 0) goto <D.30108>; else goto <D.30111>;
      <D.30111>:
      D.30112 = dgclass->count_fields;
      if (D.30112 <= field_index) goto <D.30108>; else goto <D.30109>;
      <D.30108>:
      iftmp.281 = 1;
      goto <D.30110>;
      <D.30109>:
      iftmp.281 = 0;
      <D.30110>:
      D.30113 = iftmp.281 != 0;
      D.30114 = (long int) D.30113;
      D.30115 = __builtin_expect (D.30114, 0);
      if (D.30115 != 0) goto <D.30116>; else goto <D.30117>;
      <D.30116>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7752, "field_index >= 0 && field_index < dgclass->count_fields");
      <D.30117>:
      D.30118 = dgclass->field_objects;
      D.30119 = (long unsigned int) field_index;
      D.30120 = D.30119 * 8;
      D.30121 = D.30118 + D.30120;
      obj = *D.30121;
      D.30092 = mono_reflection_get_token (obj);
      return D.30092;
    }
    <D.30100>:
    D.30097 = f->field;
    token = mono_class_get_field_token (D.30097);
  }
  goto <D.30122>;
  <D.30096>:
  D.30047 = klass->name;
  D.30123 = strcmp (D.30047, "MonoProperty");
  if (D.30123 == 0) goto <D.30124>; else goto <D.30125>;
  <D.30124>:
  {
    struct MonoReflectionProperty * p;

    p = obj;
    D.30126 = p->property;
    token = mono_class_get_property_token (D.30126);
  }
  goto <D.30127>;
  <D.30125>:
  D.30047 = klass->name;
  D.30128 = strcmp (D.30047, "MonoEvent");
  if (D.30128 == 0) goto <D.30129>; else goto <D.30130>;
  <D.30129>:
  {
    struct MonoReflectionMonoEvent * p;

    p = obj;
    D.30131 = p->event;
    token = mono_class_get_event_token (D.30131);
  }
  goto <D.30132>;
  <D.30130>:
  D.30047 = klass->name;
  D.30136 = strcmp (D.30047, "ParameterInfo");
  if (D.30136 == 0) goto <D.30133>; else goto <D.30137>;
  <D.30137>:
  D.30047 = klass->name;
  D.30138 = strcmp (D.30047, "MonoParameterInfo");
  if (D.30138 == 0) goto <D.30133>; else goto <D.30134>;
  <D.30133>:
  {
    struct MonoReflectionParameter * p;
    struct MonoClass * member_class;

    p = obj;
    D.30139 = p->MemberImpl;
    D.30140 = D.30139->vtable;
    member_class = D.30140->klass;
    D.30141 = mono_class_is_reflection_method_or_constructor (member_class);
    D.30142 = D.30141 == 0;
    D.30143 = (long int) D.30142;
    D.30144 = __builtin_expect (D.30143, 0);
    if (D.30144 != 0) goto <D.30145>; else goto <D.30146>;
    <D.30145>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7768, "mono_class_is_reflection_method_or_constructor (member_class)");
    <D.30146>:
    D.30139 = p->MemberImpl;
    D.30147 = MEM[(struct MonoReflectionMethod *)D.30139].method;
    D.30148 = p->PositionImpl;
    token = mono_method_get_param_token (D.30147, D.30148);
  }
  goto <D.30135>;
  <D.30134>:
  D.30047 = klass->name;
  D.30152 = strcmp (D.30047, "Module");
  if (D.30152 == 0) goto <D.30149>; else goto <D.30153>;
  <D.30153>:
  D.30047 = klass->name;
  D.30154 = strcmp (D.30047, "MonoModule");
  if (D.30154 == 0) goto <D.30149>; else goto <D.30150>;
  <D.30149>:
  {
    struct MonoReflectionModule * m;

    m = obj;
    token = m->token;
  }
  goto <D.30151>;
  <D.30150>:
  D.30047 = klass->name;
  D.30158 = strcmp (D.30047, "Assembly");
  if (D.30158 == 0) goto <D.30155>; else goto <D.30159>;
  <D.30159>:
  D.30047 = klass->name;
  D.30160 = strcmp (D.30047, "MonoAssembly");
  if (D.30160 == 0) goto <D.30155>; else goto <D.30156>;
  <D.30155>:
  token = 536870913;
  goto <D.30157>;
  <D.30156>:
  {
    gchar * msg;
    struct MonoException * ex;

    D.30161 = klass->name_space;
    D.30047 = klass->name;
    msg = monoeg_g_strdup_printf ("MetadataToken is not supported for type \'%s.%s\'", D.30161, D.30047);
    ex = mono_get_exception_not_implemented (msg);
    monoeg_g_free (msg);
    mono_raise_exception (ex);
  }
  <D.30157>:
  <D.30151>:
  <D.30135>:
  <D.30132>:
  <D.30127>:
  <D.30122>:
  <D.30079>:
  <D.30076>:
  <D.30068>:
  <D.30063>:
  <D.30057>:
  <D.30052>:
  D.30092 = token;
  return D.30092;
}


__attribute__((visibility ("hidden")))
mono_reflection_create_custom_attr_data_args (struct MonoImage * image, struct MonoMethod * method, const guchar * data, guint32 len, struct MonoArray * * typed_args, struct MonoArray * * named_args, struct CattrNamedArg * * named_arg_info, struct MonoError * error)
{
  int D.30163;
  struct MonoClass * D.30166;
  const char * p.282;
  short unsigned int D.30171;
  short unsigned int D.30172;
  int D.30173;
  int D.30174;
  int D.30175;
  int D.30176;
  int D.30177;
  struct MonoClass * D.30178;
  struct MonoMethodSignature * D.30179;
  short unsigned int D.30180;
  long unsigned int D.30181;
  const char * p.283;
  struct MonoMethodSignature * D.30183;
  struct MonoType * D.30184;
  struct MonoObject * iftmp.284;
  struct MonoMethodSignature * D.30186;
  struct MonoType * D.30187;
  int D.30188;
  struct MonoMethodSignature * D.30191;
  struct MonoType * D.30192;
  struct MonoClass * D.30193;
  long unsigned int D.30195;
  struct MonoMethodSignature * D.30196;
  struct MonoType * D.30197;
  int D.30198;
  struct MonoMethodSignature * D.30201;
  short unsigned int D.30202;
  unsigned int D.30203;
  const char * named.285;
  short unsigned int D.30205;
  short unsigned int D.30206;
  int D.30207;
  int D.30208;
  int D.30209;
  int D.30210;
  int D.30211;
  struct MonoClass * D.30212;
  long unsigned int D.30213;
  const char * named.286;
  long unsigned int D.30215;
  long unsigned int D.30216;
  const char * named.287;
  const char * named.288;
  const char * named.289;
  const char * named.290;
  const char * named.291;
  const char * named.292;
  unsigned int D.30227;
  sizetype D.30228;
  const guchar * D.30229;
  sizetype D.30230;
  const guchar * D.30231;
  long unsigned int D.30233;
  long unsigned int D.30234;
  long unsigned int named.293;
  int D.30237;
  long unsigned int D.30238;
  long unsigned int D.30239;
  char * D.30240;
  const char * named.294;
  unsigned int D.30242;
  sizetype D.30243;
  const guchar * D.30244;
  long unsigned int D.30246;
  long unsigned int D.30247;
  int D.30249;
  long unsigned int D.30250;
  long unsigned int D.30251;
  char * D.30252;
  const char * named.295;
  long unsigned int D.30256;
  long unsigned int D.30257;
  struct CattrNamedArg * D.30258;
  struct MonoType * D.30259;
  struct MonoObject * iftmp.296;
  int D.30261;
  struct MonoClass * D.30264;
  long unsigned int D.30266;
  int D.30267;
  struct MonoType * iftmp.297;
  struct MonoMethod * D.30274;
  struct MonoMethodSignature * D.30277;
  struct MonoMethod * D.30279;
  struct MonoMethodSignature * D.30280;
  struct MonoMethodSignature * D.30281;
  short unsigned int D.30282;
  int D.30283;
  int D.30284;
  struct MonoObject * iftmp.298;
  int D.30286;
  struct MonoClass * D.30289;
  int D.30291;
  struct MonoArray * typedargs;
  struct MonoArray * namedargs;
  struct MonoClass * attrklass;
  struct MonoDomain * domain;
  const char * p;
  const char * named;
  guint32 i;
  guint32 j;
  guint32 num_named;
  struct CattrNamedArg * arginfo;
  void fail = <<< error >>>;

  try
    {
      p = data;
      arginfo = 0B;
      *typed_args = 0B;
      *named_args = 0B;
      *named_arg_info = 0B;
      mono_error_init (error);
      D.30163 = mono_verifier_verify_cattr_content (image, method, data, len, 0B);
      if (D.30163 == 0) goto <D.30164>; else goto <D.30165>;
      <D.30164>:
      mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
      return;
      <D.30165>:
      D.30166 = method->klass;
      mono_class_init (D.30166);
      domain = mono_domain_get ();
      if (len <= 1) goto <D.30167>; else goto <D.30169>;
      <D.30169>:
      p.282 = p;
      D.30171 = MEM[(const guint16 *)p.282];
      D.30172 = D.30171 >> 8;
      D.30173 = (int) D.30172;
      p.282 = p;
      D.30171 = MEM[(const guint16 *)p.282];
      D.30174 = (int) D.30171;
      D.30175 = D.30174 << 8;
      D.30176 = D.30175 & 65535;
      D.30177 = D.30173 | D.30176;
      if (D.30177 != 1) goto <D.30167>; else goto <D.30168>;
      <D.30167>:
      return;
      <D.30168>:
      D.30178 = mono_get_object_class ();
      D.30179 = mono_method_signature (method);
      D.30180 = D.30179->param_count;
      D.30181 = (long unsigned int) D.30180;
      typedargs = mono_array_new (domain, D.30178, D.30181);
      p.282 = p;
      p.283 = p.282 + 2;
      p = p.283;
      i = 0;
      goto <D.21494>;
      <D.21493>:
      {
        struct MonoObject * obj;
        void * val;

        D.30183 = mono_method_signature (method);
        D.30184 = D.30183->params[i];
        p.282 = p;
        val = load_cattr_value (image, D.30184, p.282, &p);
        D.30186 = mono_method_signature (method);
        D.30187 = D.30186->params[i];
        D.30188 = type_is_reference (D.30187);
        if (D.30188 == 0) goto <D.30189>; else goto <D.30190>;
        <D.30189>:
        D.30191 = mono_method_signature (method);
        D.30192 = D.30191->params[i];
        D.30193 = mono_class_from_mono_type (D.30192);
        iftmp.284 = mono_value_box (domain, D.30193, val);
        goto <D.30194>;
        <D.30190>:
        iftmp.284 = val;
        <D.30194>:
        obj = iftmp.284;
        {
          void * * __p;

          D.30195 = (long unsigned int) i;
          __p = mono_array_addr_with_size (typedargs, 8, D.30195);
          mono_gc_wbarrier_set_arrayref (typedargs, __p, obj);
        }
        D.30196 = mono_method_signature (method);
        D.30197 = D.30196->params[i];
        D.30198 = type_is_reference (D.30197);
        if (D.30198 == 0) goto <D.30199>; else goto <D.30200>;
        <D.30199>:
        monoeg_g_free (val);
        <D.30200>:
      }
      i = i + 1;
      <D.21494>:
      D.30201 = mono_method_signature (method);
      D.30202 = D.30201->param_count;
      D.30203 = (unsigned int) D.30202;
      if (D.30203 > i) goto <D.21493>; else goto <D.21495>;
      <D.21495>:
      p.282 = p;
      named = p.282;
      named.285 = named;
      D.30205 = MEM[(const guint16 *)named.285];
      D.30206 = D.30205 >> 8;
      D.30207 = (int) D.30206;
      named.285 = named;
      D.30205 = MEM[(const guint16 *)named.285];
      D.30208 = (int) D.30205;
      D.30209 = D.30208 << 8;
      D.30210 = D.30209 & 65535;
      D.30211 = D.30207 | D.30210;
      num_named = (guint32) D.30211;
      D.30212 = mono_get_object_class ();
      D.30213 = (long unsigned int) num_named;
      namedargs = mono_array_new (domain, D.30212, D.30213);
      named.285 = named;
      named.286 = named.285 + 2;
      named = named.286;
      attrklass = method->klass;
      D.30215 = (long unsigned int) num_named;
      D.30216 = D.30215 * 24;
      arginfo = monoeg_malloc0 (D.30216);
      *named_arg_info = arginfo;
      j = 0;
      goto <D.21513>;
      <D.21512>:
      {
        gint name_len;
        char * name;
        char named_type;
        char data_type;

        named.285 = named;
        named.287 = named.285;
        named.288 = named.287 + 1;
        named = named.288;
        named_type = *named.287;
        named.285 = named;
        named.289 = named.285;
        named.290 = named.289 + 1;
        named = named.290;
        data_type = *named.289;
        if (data_type == 29) goto <D.30221>; else goto <D.30222>;
        <D.30221>:
        named.285 = named;
        named.291 = named.285;
        named.292 = named.291 + 1;
        named = named.292;
        data_type = *named.291;
        <D.30222>:
        if (data_type == 85) goto <D.30225>; else goto <D.30226>;
        <D.30225>:
        {
          gint type_len;
          char * type_name;

          named.285 = named;
          D.30227 = mono_metadata_decode_blob_size (named.285, &named);
          type_len = (gint) D.30227;
          named.285 = named;
          D.30228 = (sizetype) type_len;
          D.30229 = named.285 + D.30228;
          D.30230 = (sizetype) len;
          D.30231 = data + D.30230;
          if (D.30229 > D.30231) goto fail; else goto <D.30232>;
          <D.30232>:
          D.30233 = (long unsigned int) type_len;
          D.30234 = ~D.30233;
          named.285 = named;
          named.293 = (long unsigned int) named.285;
          if (D.30234 < named.293) goto fail; else goto <D.30236>;
          <D.30236>:
          D.30237 = type_len + 1;
          D.30238 = (long unsigned int) D.30237;
          type_name = monoeg_malloc (D.30238);
          named.285 = named;
          D.30239 = (long unsigned int) type_len;
          memcpy (type_name, named.285, D.30239);
          D.30228 = (sizetype) type_len;
          D.30240 = type_name + D.30228;
          *D.30240 = 0;
          named.285 = named;
          D.30228 = (sizetype) type_len;
          named.294 = named.285 + D.30228;
          named = named.294;
          monoeg_g_free (type_name);
        }
        <D.30226>:
        named.285 = named;
        D.30242 = mono_metadata_decode_blob_size (named.285, &named);
        name_len = (gint) D.30242;
        named.285 = named;
        D.30243 = (sizetype) name_len;
        D.30244 = named.285 + D.30243;
        D.30230 = (sizetype) len;
        D.30231 = data + D.30230;
        if (D.30244 > D.30231) goto fail; else goto <D.30245>;
        <D.30245>:
        D.30246 = (long unsigned int) name_len;
        D.30247 = ~D.30246;
        named.285 = named;
        named.293 = (long unsigned int) named.285;
        if (D.30247 < named.293) goto fail; else goto <D.30248>;
        <D.30248>:
        D.30249 = name_len + 1;
        D.30250 = (long unsigned int) D.30249;
        name = monoeg_malloc (D.30250);
        named.285 = named;
        D.30251 = (long unsigned int) name_len;
        memcpy (name, named.285, D.30251);
        D.30243 = (sizetype) name_len;
        D.30252 = name + D.30243;
        *D.30252 = 0;
        named.285 = named;
        D.30243 = (sizetype) name_len;
        named.295 = named.285 + D.30243;
        named = named.295;
        if (named_type == 83) goto <D.30254>; else goto <D.30255>;
        <D.30254>:
        {
          struct MonoObject * obj;
          struct MonoClassField * field;
          void * val;

          field = mono_class_get_field_from_name (attrklass, name);
          D.30256 = (long unsigned int) j;
          D.30257 = D.30256 * 24;
          D.30258 = arginfo + D.30257;
          D.30259 = field->type;
          D.30258->type = D.30259;
          D.30256 = (long unsigned int) j;
          D.30257 = D.30256 * 24;
          D.30258 = arginfo + D.30257;
          D.30258->field = field;
          D.30259 = field->type;
          named.285 = named;
          val = load_cattr_value (image, D.30259, named.285, &named);
          D.30259 = field->type;
          D.30261 = type_is_reference (D.30259);
          if (D.30261 == 0) goto <D.30262>; else goto <D.30263>;
          <D.30262>:
          D.30259 = field->type;
          D.30264 = mono_class_from_mono_type (D.30259);
          iftmp.296 = mono_value_box (domain, D.30264, val);
          goto <D.30265>;
          <D.30263>:
          iftmp.296 = val;
          <D.30265>:
          obj = iftmp.296;
          {
            void * * __p;

            D.30266 = (long unsigned int) j;
            __p = mono_array_addr_with_size (namedargs, 8, D.30266);
            mono_gc_wbarrier_set_arrayref (namedargs, __p, obj);
          }
          D.30259 = field->type;
          D.30267 = type_is_reference (D.30259);
          if (D.30267 == 0) goto <D.30268>; else goto <D.30269>;
          <D.30268>:
          monoeg_g_free (val);
          <D.30269>:
        }
        goto <D.30270>;
        <D.30255>:
        if (named_type == 84) goto <D.30271>; else goto <D.30272>;
        <D.30271>:
        {
          struct MonoObject * obj;
          struct MonoType * prop_type;
          struct MonoProperty * prop;
          void * val;

          prop = mono_class_get_property_from_name (attrklass, name);
          D.30274 = prop->get;
          if (D.30274 != 0B) goto <D.30275>; else goto <D.30276>;
          <D.30275>:
          D.30274 = prop->get;
          D.30277 = mono_method_signature (D.30274);
          iftmp.297 = D.30277->ret;
          goto <D.30278>;
          <D.30276>:
          D.30279 = prop->set;
          D.30280 = mono_method_signature (D.30279);
          D.30279 = prop->set;
          D.30281 = mono_method_signature (D.30279);
          D.30282 = D.30281->param_count;
          D.30283 = (int) D.30282;
          D.30284 = D.30283 + -1;
          iftmp.297 = D.30280->params[D.30284];
          <D.30278>:
          prop_type = iftmp.297;
          D.30256 = (long unsigned int) j;
          D.30257 = D.30256 * 24;
          D.30258 = arginfo + D.30257;
          D.30258->type = prop_type;
          D.30256 = (long unsigned int) j;
          D.30257 = D.30256 * 24;
          D.30258 = arginfo + D.30257;
          D.30258->prop = prop;
          named.285 = named;
          val = load_cattr_value (image, prop_type, named.285, &named);
          D.30286 = type_is_reference (prop_type);
          if (D.30286 == 0) goto <D.30287>; else goto <D.30288>;
          <D.30287>:
          D.30289 = mono_class_from_mono_type (prop_type);
          iftmp.298 = mono_value_box (domain, D.30289, val);
          goto <D.30290>;
          <D.30288>:
          iftmp.298 = val;
          <D.30290>:
          obj = iftmp.298;
          {
            void * * __p;

            D.30266 = (long unsigned int) j;
            __p = mono_array_addr_with_size (namedargs, 8, D.30266);
            mono_gc_wbarrier_set_arrayref (namedargs, __p, obj);
          }
          D.30291 = type_is_reference (prop_type);
          if (D.30291 == 0) goto <D.30292>; else goto <D.30293>;
          <D.30292>:
          monoeg_g_free (val);
          <D.30293>:
        }
        <D.30272>:
        <D.30270>:
        monoeg_g_free (name);
      }
      j = j + 1;
      <D.21513>:
      if (j < num_named) goto <D.21512>; else goto <D.21514>;
      <D.21514>:
      *typed_args = typedargs;
      *named_args = namedargs;
      return;
      fail:
      mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
      monoeg_g_free (arginfo);
      *named_arg_info = 0B;
    }
  finally
    {
      p = {CLOBBER};
      named = {CLOBBER};
    }
}


load_cattr_value (struct MonoImage * image, struct MonoType * t, const char * p, const char * * end)
{
  unsigned char D.30297;
  const char * p.299;
  char D.30299;
  const char * p.303;
  void * D.30301;
  short unsigned int D.30302;
  short unsigned int D.30303;
  signed short D.30304;
  int D.30305;
  int D.30306;
  signed short D.30307;
  signed short D.30308;
  short unsigned int D.30309;
  const char * p.308;
  unsigned int D.30311;
  unsigned int D.30312;
  unsigned int D.30313;
  unsigned int D.30314;
  unsigned int D.30315;
  unsigned int D.30316;
  unsigned int D.30317;
  unsigned int D.30318;
  unsigned int D.30319;
  unsigned int D.30320;
  const char * p.305;
  long unsigned int D.30322;
  unsigned int D.30323;
  unsigned int D.30324;
  unsigned int D.30325;
  unsigned int D.30326;
  unsigned int D.30327;
  unsigned int D.30328;
  unsigned int D.30329;
  unsigned int D.30330;
  unsigned int D.30331;
  unsigned int D.30332;
  long unsigned int D.30333;
  long unsigned int D.30334;
  long unsigned int D.30335;
  unsigned int D.30336;
  unsigned int D.30337;
  unsigned int D.30338;
  unsigned int D.30339;
  unsigned int D.30340;
  unsigned int D.30341;
  unsigned int D.30342;
  unsigned int D.30343;
  unsigned int D.30344;
  unsigned int D.30345;
  long unsigned int D.30346;
  long unsigned int D.30347;
  const char * p.311;
  double D.30349;
  struct MonoClass * D.30350;
  long unsigned int D.30351;
  long unsigned int D.30352;
  struct MonoType * D.30355;
  unsigned char D.30356;
  struct MonoImage * D.30357;
  int D.30358;
  const char * D.30361;
  int D.30362;
  const char * D.30365;
  int D.30366;
  const char * D.30369;
  unsigned int D.30372;
  sizetype D.30373;
  const char * p.304;
  struct MonoDomain * D.30375;
  unsigned int slen.300;
  unsigned int D.30379;
  int D.30380;
  unsigned int D.30381;
  char * D.30382;
  struct MonoDomain * D.30387;
  const char * p.301;
  const char * p.302;
  unsigned char D.30403;
  unsigned int D.30406;
  char * D.30407;
  char D.30411;
  int D.30415;
  struct MonoType * D.30416;
  struct MonoDomain * D.30417;
  long unsigned int D.30418;
  long unsigned int D.30419;
  _Bool D.30420;
  long int D.30421;
  long int D.30422;
  void * D.30425;
  int D.30426;
  long unsigned int D.30427;
  struct MonoDomain * D.30430;
  long unsigned int D.30431;
  unsigned char D.30432;
  long unsigned int D.30435;
  long unsigned int D.30436;
  struct MonoType * D.30439;
  unsigned char D.30440;
  const char * p.306;
  const char * p.307;
  long unsigned int D.30443;
  double val.309;
  double val.310;
  struct MonoType * D.30446;
  int slen;
  int type;
  struct MonoClass * tklass;
  void handle_enum = <<< error >>>;
  void handle_type = <<< error >>>;

  D.30297 = t->type;
  type = (int) D.30297;
  tklass = t->data.klass;
  handle_enum:
  switch (type) <default: <D.21366>, case 2: <D.21273>, case 3: <D.21275>, case 4: <D.21272>, case 5: <D.21271>, case 6: <D.21277>, case 7: <D.21276>, case 8: <D.21281>, case 9: <D.21280>, case 10: <D.21286>, case 11: <D.21285>, case 12: <D.21279>, case 13: <D.21288>, case 14: <D.21295>, case 17: <D.21291>, case 18: <D.21296>, case 24: <D.21284>, case 25: <D.21283>, case 28: <D.21300>, case 29: <D.21312>>
  <D.21271>:
  <D.21272>:
  <D.21273>:
  {
    MonoBoolean * bval;

    bval = monoeg_malloc (1);
    p.299 = p;
    D.30299 = *p.299;
    *bval = D.30299;
    p.299 = p;
    p.303 = p.299 + 1;
    *end = p.303;
    D.30301 = bval;
    return D.30301;
  }
  <D.21275>:
  <D.21276>:
  <D.21277>:
  {
    guint16 * val;

    val = monoeg_malloc (2);
    p.299 = p;
    D.30302 = MEM[(const guint16 *)p.299];
    D.30303 = D.30302 >> 8;
    D.30304 = (signed short) D.30303;
    p.299 = p;
    D.30302 = MEM[(const guint16 *)p.299];
    D.30305 = (int) D.30302;
    D.30306 = D.30305 << 8;
    D.30307 = (signed short) D.30306;
    D.30308 = D.30304 | D.30307;
    D.30309 = (short unsigned int) D.30308;
    *val = D.30309;
    p.299 = p;
    p.308 = p.299 + 2;
    *end = p.308;
    D.30301 = val;
    return D.30301;
  }
  <D.21279>:
  <D.21280>:
  <D.21281>:
  {
    guint32 * val;

    val = monoeg_malloc (4);
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30312 = D.30311 << 24;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30313 = D.30311 >> 8;
    D.30314 = D.30313 & 65280;
    D.30315 = D.30312 | D.30314;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30316 = D.30311 << 8;
    D.30317 = D.30316 & 16711680;
    D.30318 = D.30315 | D.30317;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30319 = D.30311 >> 24;
    D.30320 = D.30318 | D.30319;
    *val = D.30320;
    p.299 = p;
    p.305 = p.299 + 4;
    *end = p.305;
    D.30301 = val;
    return D.30301;
  }
  <D.21283>:
  <D.21284>:
  <D.21285>:
  <D.21286>:
  {
    guint64 * val;

    val = monoeg_malloc (8);
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30323 = (unsigned int) D.30322;
    D.30324 = D.30323 << 24;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30323 = (unsigned int) D.30322;
    D.30325 = D.30323 >> 8;
    D.30326 = D.30325 & 65280;
    D.30327 = D.30324 | D.30326;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30323 = (unsigned int) D.30322;
    D.30328 = D.30323 << 8;
    D.30329 = D.30328 & 16711680;
    D.30330 = D.30327 | D.30329;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30323 = (unsigned int) D.30322;
    D.30331 = D.30323 >> 24;
    D.30332 = D.30330 | D.30331;
    D.30333 = (long unsigned int) D.30332;
    D.30334 = D.30333 << 32;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30335 = D.30322 >> 32;
    D.30336 = (unsigned int) D.30335;
    D.30337 = D.30336 << 24;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30335 = D.30322 >> 32;
    D.30336 = (unsigned int) D.30335;
    D.30338 = D.30336 >> 8;
    D.30339 = D.30338 & 65280;
    D.30340 = D.30337 | D.30339;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30335 = D.30322 >> 32;
    D.30336 = (unsigned int) D.30335;
    D.30341 = D.30336 << 8;
    D.30342 = D.30341 & 16711680;
    D.30343 = D.30340 | D.30342;
    p.299 = p;
    D.30322 = MEM[(const guint64 *)p.299];
    D.30335 = D.30322 >> 32;
    D.30336 = (unsigned int) D.30335;
    D.30344 = D.30336 >> 24;
    D.30345 = D.30343 | D.30344;
    D.30346 = (long unsigned int) D.30345;
    D.30347 = D.30334 | D.30346;
    *val = D.30347;
    p.299 = p;
    p.311 = p.299 + 8;
    *end = p.311;
    D.30301 = val;
    return D.30301;
  }
  <D.21288>:
  {
    double * val;

    val = monoeg_malloc (8);
    {
      union mono_rdouble mf;

      try
        {
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30323 = (unsigned int) D.30322;
          D.30324 = D.30323 << 24;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30323 = (unsigned int) D.30322;
          D.30325 = D.30323 >> 8;
          D.30326 = D.30325 & 65280;
          D.30327 = D.30324 | D.30326;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30323 = (unsigned int) D.30322;
          D.30328 = D.30323 << 8;
          D.30329 = D.30328 & 16711680;
          D.30330 = D.30327 | D.30329;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30323 = (unsigned int) D.30322;
          D.30331 = D.30323 >> 24;
          D.30332 = D.30330 | D.30331;
          D.30333 = (long unsigned int) D.30332;
          D.30334 = D.30333 << 32;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30335 = D.30322 >> 32;
          D.30336 = (unsigned int) D.30335;
          D.30337 = D.30336 << 24;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30335 = D.30322 >> 32;
          D.30336 = (unsigned int) D.30335;
          D.30338 = D.30336 >> 8;
          D.30339 = D.30338 & 65280;
          D.30340 = D.30337 | D.30339;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30335 = D.30322 >> 32;
          D.30336 = (unsigned int) D.30335;
          D.30341 = D.30336 << 8;
          D.30342 = D.30341 & 16711680;
          D.30343 = D.30340 | D.30342;
          p.299 = p;
          D.30322 = MEM[(const guint64 *)p.299];
          D.30335 = D.30322 >> 32;
          D.30336 = (unsigned int) D.30335;
          D.30344 = D.30336 >> 24;
          D.30345 = D.30343 | D.30344;
          D.30346 = (long unsigned int) D.30345;
          D.30347 = D.30334 | D.30346;
          mf.ival = D.30347;
          D.30349 = mf.fval;
          *val = D.30349;
        }
      finally
        {
          mf = {CLOBBER};
        }
    }
    p.299 = p;
    p.311 = p.299 + 8;
    *end = p.311;
    D.30301 = val;
    return D.30301;
  }
  <D.21291>:
  D.30350 = t->data.klass;
  D.30351 = BIT_FIELD_REF <*D.30350, 64, 256>;
  D.30352 = D.30351 & 576460752303423488;
  if (D.30352 != 0) goto <D.30353>; else goto <D.30354>;
  <D.30353>:
  D.30350 = t->data.klass;
  D.30355 = mono_class_enum_basetype (D.30350);
  D.30356 = D.30355->type;
  type = (int) D.30356;
  goto handle_enum;
  <D.30354>:
  {
    struct MonoClass * k;

    k = t->data.klass;
    D.30357 = k->image;
    D.30358 = mono_is_corlib_image (D.30357);
    if (D.30358 != 0) goto <D.30359>; else goto <D.30360>;
    <D.30359>:
    D.30361 = k->name_space;
    D.30362 = strcmp (D.30361, "System");
    if (D.30362 == 0) goto <D.30363>; else goto <D.30364>;
    <D.30363>:
    D.30365 = k->name;
    D.30366 = strcmp (D.30365, "DateTime");
    if (D.30366 == 0) goto <D.30367>; else goto <D.30368>;
    <D.30367>:
    {
      guint64 * val;

      val = monoeg_malloc (8);
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30324 = D.30323 << 24;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30325 = D.30323 >> 8;
      D.30326 = D.30325 & 65280;
      D.30327 = D.30324 | D.30326;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30328 = D.30323 << 8;
      D.30329 = D.30328 & 16711680;
      D.30330 = D.30327 | D.30329;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30331 = D.30323 >> 24;
      D.30332 = D.30330 | D.30331;
      D.30333 = (long unsigned int) D.30332;
      D.30334 = D.30333 << 32;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30337 = D.30336 << 24;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30338 = D.30336 >> 8;
      D.30339 = D.30338 & 65280;
      D.30340 = D.30337 | D.30339;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30341 = D.30336 << 8;
      D.30342 = D.30341 & 16711680;
      D.30343 = D.30340 | D.30342;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30344 = D.30336 >> 24;
      D.30345 = D.30343 | D.30344;
      D.30346 = (long unsigned int) D.30345;
      D.30347 = D.30334 | D.30346;
      *val = D.30347;
      p.299 = p;
      p.311 = p.299 + 8;
      *end = p.311;
      D.30301 = val;
      return D.30301;
    }
    <D.30368>:
    <D.30364>:
    <D.30360>:
  }
  D.30350 = t->data.klass;
  D.30369 = D.30350->name;
  monoeg_g_log (0B, 4, "generic valutype %s not handled in custom attr value decoding", D.30369);
  <D.21294>:
  goto <D.21294>;
  <D.21295>:
  p.299 = p;
  D.30299 = *p.299;
  if (D.30299 == 255) goto <D.30370>; else goto <D.30371>;
  <D.30370>:
  p.299 = p;
  p.303 = p.299 + 1;
  *end = p.303;
  D.30301 = 0B;
  return D.30301;
  <D.30371>:
  p.299 = p;
  D.30372 = mono_metadata_decode_value (p.299, &p);
  slen = (int) D.30372;
  p.299 = p;
  D.30373 = (sizetype) slen;
  p.304 = p.299 + D.30373;
  *end = p.304;
  D.30375 = mono_domain_get ();
  p.299 = p;
  slen.300 = (unsigned int) slen;
  D.30301 = mono_string_new_len (D.30375, p.299, slen.300);
  return D.30301;
  <D.21296>:
  {
    char * n;
    struct MonoType * t;

    p.299 = p;
    D.30299 = *p.299;
    if (D.30299 == 255) goto <D.30377>; else goto <D.30378>;
    <D.30377>:
    p.299 = p;
    p.303 = p.299 + 1;
    *end = p.303;
    D.30301 = 0B;
    return D.30301;
    <D.30378>:
    handle_type:
    p.299 = p;
    D.30379 = mono_metadata_decode_value (p.299, &p);
    slen = (int) D.30379;
    p.299 = p;
    D.30380 = slen + 1;
    D.30381 = (unsigned int) D.30380;
    n = monoeg_g_memdup (p.299, D.30381);
    D.30373 = (sizetype) slen;
    D.30382 = n + D.30373;
    *D.30382 = 0;
    t = mono_reflection_type_from_name (n, image);
    if (t == 0B) goto <D.30383>; else goto <D.30384>;
    <D.30383>:
    monoeg_g_log (0B, 16, "Cannot load type \'%s\'", n);
    <D.30384>:
    monoeg_g_free (n);
    p.299 = p;
    D.30373 = (sizetype) slen;
    p.304 = p.299 + D.30373;
    *end = p.304;
    if (t != 0B) goto <D.30385>; else goto <D.30386>;
    <D.30385>:
    D.30387 = mono_domain_get ();
    D.30301 = mono_type_get_object (D.30387, t);
    return D.30301;
    <D.30386>:
    D.30301 = 0B;
    return D.30301;
  }
  <D.21300>:
  {
    char subt;
    struct MonoObject * obj;
    struct MonoClass * subc;
    void * val;

    p.299 = p;
    p.301 = p.299;
    p.302 = p.301 + 1;
    p = p.302;
    subt = *p.301;
    subc = 0B;
    if (subt == 80) goto handle_type; else goto <D.30390>;
    <D.30390>:
    if (subt == 14) goto <D.30391>; else goto <D.30392>;
    <D.30391>:
    type = 14;
    goto handle_enum;
    <D.30392>:
    if (subt == 29) goto <D.30393>; else goto <D.30394>;
    <D.30393>:
    {
      struct MonoType simple_type;
      int etype;

      try
        {
          simple_type = {};
          p.299 = p;
          D.30299 = *p.299;
          etype = (int) D.30299;
          p.299 = p;
          p.303 = p.299 + 1;
          p = p.303;
          type = 29;
          if (etype == 80) goto <D.30395>; else goto <D.30396>;
          <D.30395>:
          tklass = mono_defaults.systemtype_class;
          goto <D.30397>;
          <D.30396>:
          if (etype == 85) goto <D.30398>; else goto <D.30399>;
          <D.30398>:
          p.299 = p;
          tklass = load_cattr_enum_type (image, p.299, &p);
          goto <D.30400>;
          <D.30399>:
          if (etype == 81) goto <D.30401>; else goto <D.30402>;
          <D.30401>:
          etype = 28;
          <D.30402>:
          D.30403 = (unsigned char) etype;
          simple_type.type = D.30403;
          tklass = mono_class_from_mono_type (&simple_type);
          <D.30400>:
          <D.30397>:
          goto handle_enum;
        }
      finally
        {
          simple_type = {CLOBBER};
        }
    }
    <D.30394>:
    if (subt == 85) goto <D.30404>; else goto <D.30405>;
    <D.30404>:
    {
      char * n;
      struct MonoType * t;

      p.299 = p;
      D.30406 = mono_metadata_decode_value (p.299, &p);
      slen = (int) D.30406;
      p.299 = p;
      D.30380 = slen + 1;
      D.30381 = (unsigned int) D.30380;
      n = monoeg_g_memdup (p.299, D.30381);
      D.30373 = (sizetype) slen;
      D.30407 = n + D.30373;
      *D.30407 = 0;
      t = mono_reflection_type_from_name (n, image);
      if (t == 0B) goto <D.30408>; else goto <D.30409>;
      <D.30408>:
      monoeg_g_log (0B, 4, "Cannot load type \'%s\'", n);
      <D.21309>:
      goto <D.21309>;
      <D.30409>:
      monoeg_g_free (n);
      p.299 = p;
      D.30373 = (sizetype) slen;
      p.304 = p.299 + D.30373;
      p = p.304;
      subc = mono_class_from_mono_type (t);
    }
    goto <D.30410>;
    <D.30405>:
    D.30411 = subt + 254;
    if (D.30411 <= 11) goto <D.30412>; else goto <D.30413>;
    <D.30412>:
    {
      struct MonoType simple_type;

      try
        {
          simple_type = {};
          simple_type.type = subt;
          subc = mono_class_from_mono_type (&simple_type);
        }
      finally
        {
          simple_type = {CLOBBER};
        }
    }
    goto <D.30414>;
    <D.30413>:
    D.30415 = (int) subt;
    monoeg_g_log (0B, 4, "Unknown type 0x%02x for object type encoding in custom attr", D.30415);
    <D.21311>:
    goto <D.21311>;
    <D.30414>:
    <D.30410>:
    D.30416 = &subc->byval_arg;
    p.299 = p;
    val = load_cattr_value (image, D.30416, p.299, end);
    D.30417 = mono_domain_get ();
    obj = mono_object_new (D.30417, subc);
    D.30418 = BIT_FIELD_REF <*subc, 64, 256>;
    D.30419 = D.30418 & 68719476736;
    D.30420 = D.30419 != 0;
    D.30421 = (long int) D.30420;
    D.30422 = __builtin_expect (D.30421, 0);
    if (D.30422 != 0) goto <D.30423>; else goto <D.30424>;
    <D.30423>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 7953, "!subc->has_references");
    <D.30424>:
    D.30425 = obj + 16;
    D.30426 = mono_class_value_size (subc, 0B);
    D.30427 = (long unsigned int) D.30426;
    mono_gc_memmove_atomic (D.30425, val, D.30427);
    monoeg_g_free (val);
    D.30301 = obj;
    return D.30301;
  }
  <D.21312>:
  {
    struct MonoArray * arr;
    guint32 i;
    guint32 alen;
    guint32 basetype;

    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30312 = D.30311 << 24;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30313 = D.30311 >> 8;
    D.30314 = D.30313 & 65280;
    D.30315 = D.30312 | D.30314;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30316 = D.30311 << 8;
    D.30317 = D.30316 & 16711680;
    D.30318 = D.30315 | D.30317;
    p.299 = p;
    D.30311 = MEM[(const guint32 *)p.299];
    D.30319 = D.30311 >> 24;
    alen = D.30318 | D.30319;
    p.299 = p;
    p.305 = p.299 + 4;
    p = p.305;
    if (alen == 4294967295) goto <D.30428>; else goto <D.30429>;
    <D.30428>:
    p.299 = p;
    *end = p.299;
    D.30301 = 0B;
    return D.30301;
    <D.30429>:
    D.30430 = mono_domain_get ();
    D.30431 = (long unsigned int) alen;
    arr = mono_array_new (D.30430, tklass, D.30431);
    D.30432 = tklass->byval_arg.type;
    basetype = (guint32) D.30432;
    if (basetype == 17) goto <D.30433>; else goto <D.30434>;
    <D.30433>:
    D.30435 = BIT_FIELD_REF <*tklass, 64, 256>;
    D.30436 = D.30435 & 576460752303423488;
    if (D.30436 != 0) goto <D.30437>; else goto <D.30438>;
    <D.30437>:
    D.30439 = mono_class_enum_basetype (tklass);
    D.30440 = D.30439->type;
    basetype = (guint32) D.30440;
    <D.30438>:
    <D.30434>:
    switch (basetype) <default: <D.21364>, case 2: <D.21319>, case 3: <D.21326>, case 4: <D.21318>, case 5: <D.21317>, case 6: <D.21328>, case 7: <D.21327>, case 8: <D.21336>, case 9: <D.21335>, case 10: <D.21350>, case 11: <D.21349>, case 12: <D.21334>, case 13: <D.21342>, case 14: <D.21358>, case 18: <D.21356>, case 28: <D.21357>>
    <D.21317>:
    <D.21318>:
    <D.21319>:
    i = 0;
    goto <D.21323>;
    <D.21322>:
    {
      MonoBoolean val;

      p.299 = p;
      p.306 = p.299;
      p.307 = p.306 + 1;
      p = p.307;
      val = *p.306;
      {
        MonoBoolean * __p;

        D.30443 = (long unsigned int) i;
        __p = mono_array_addr_with_size (arr, 1, D.30443);
        *__p = val;
      }
    }
    i = i + 1;
    <D.21323>:
    if (i < alen) goto <D.21322>; else goto <D.21324>;
    <D.21324>:
    goto <D.21325>;
    <D.21326>:
    <D.21327>:
    <D.21328>:
    i = 0;
    goto <D.21332>;
    <D.21331>:
    {
      guint16 val;

      p.299 = p;
      D.30302 = MEM[(const guint16 *)p.299];
      D.30303 = D.30302 >> 8;
      D.30304 = (signed short) D.30303;
      p.299 = p;
      D.30302 = MEM[(const guint16 *)p.299];
      D.30305 = (int) D.30302;
      D.30306 = D.30305 << 8;
      D.30307 = (signed short) D.30306;
      D.30308 = D.30304 | D.30307;
      val = (guint16) D.30308;
      {
        guint16 * __p;

        D.30443 = (long unsigned int) i;
        __p = mono_array_addr_with_size (arr, 2, D.30443);
        *__p = val;
      }
      p.299 = p;
      p.308 = p.299 + 2;
      p = p.308;
    }
    i = i + 1;
    <D.21332>:
    if (i < alen) goto <D.21331>; else goto <D.21333>;
    <D.21333>:
    goto <D.21325>;
    <D.21334>:
    <D.21335>:
    <D.21336>:
    i = 0;
    goto <D.21340>;
    <D.21339>:
    {
      guint32 val;

      p.299 = p;
      D.30311 = MEM[(const guint32 *)p.299];
      D.30312 = D.30311 << 24;
      p.299 = p;
      D.30311 = MEM[(const guint32 *)p.299];
      D.30313 = D.30311 >> 8;
      D.30314 = D.30313 & 65280;
      D.30315 = D.30312 | D.30314;
      p.299 = p;
      D.30311 = MEM[(const guint32 *)p.299];
      D.30316 = D.30311 << 8;
      D.30317 = D.30316 & 16711680;
      D.30318 = D.30315 | D.30317;
      p.299 = p;
      D.30311 = MEM[(const guint32 *)p.299];
      D.30319 = D.30311 >> 24;
      val = D.30318 | D.30319;
      {
        guint32 * __p;

        D.30443 = (long unsigned int) i;
        __p = mono_array_addr_with_size (arr, 4, D.30443);
        *__p = val;
      }
      p.299 = p;
      p.305 = p.299 + 4;
      p = p.305;
    }
    i = i + 1;
    <D.21340>:
    if (i < alen) goto <D.21339>; else goto <D.21341>;
    <D.21341>:
    goto <D.21325>;
    <D.21342>:
    i = 0;
    goto <D.21347>;
    <D.21346>:
    {
      double val;

      try
        {
          {
            union mono_rdouble mf;

            try
              {
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30323 = (unsigned int) D.30322;
                D.30324 = D.30323 << 24;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30323 = (unsigned int) D.30322;
                D.30325 = D.30323 >> 8;
                D.30326 = D.30325 & 65280;
                D.30327 = D.30324 | D.30326;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30323 = (unsigned int) D.30322;
                D.30328 = D.30323 << 8;
                D.30329 = D.30328 & 16711680;
                D.30330 = D.30327 | D.30329;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30323 = (unsigned int) D.30322;
                D.30331 = D.30323 >> 24;
                D.30332 = D.30330 | D.30331;
                D.30333 = (long unsigned int) D.30332;
                D.30334 = D.30333 << 32;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30335 = D.30322 >> 32;
                D.30336 = (unsigned int) D.30335;
                D.30337 = D.30336 << 24;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30335 = D.30322 >> 32;
                D.30336 = (unsigned int) D.30335;
                D.30338 = D.30336 >> 8;
                D.30339 = D.30338 & 65280;
                D.30340 = D.30337 | D.30339;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30335 = D.30322 >> 32;
                D.30336 = (unsigned int) D.30335;
                D.30341 = D.30336 << 8;
                D.30342 = D.30341 & 16711680;
                D.30343 = D.30340 | D.30342;
                p.299 = p;
                D.30322 = MEM[(const guint64 *)p.299];
                D.30335 = D.30322 >> 32;
                D.30336 = (unsigned int) D.30335;
                D.30344 = D.30336 >> 24;
                D.30345 = D.30343 | D.30344;
                D.30346 = (long unsigned int) D.30345;
                D.30347 = D.30334 | D.30346;
                mf.ival = D.30347;
                val.309 = mf.fval;
                val = val.309;
              }
            finally
              {
                mf = {CLOBBER};
              }
          }
          {
            double * __p;

            D.30443 = (long unsigned int) i;
            __p = mono_array_addr_with_size (arr, 8, D.30443);
            val.310 = val;
            *__p = val.310;
          }
          p.299 = p;
          p.311 = p.299 + 8;
          p = p.311;
        }
      finally
        {
          val = {CLOBBER};
        }
    }
    i = i + 1;
    <D.21347>:
    if (i < alen) goto <D.21346>; else goto <D.21348>;
    <D.21348>:
    goto <D.21325>;
    <D.21349>:
    <D.21350>:
    i = 0;
    goto <D.21354>;
    <D.21353>:
    {
      guint64 val;

      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30324 = D.30323 << 24;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30325 = D.30323 >> 8;
      D.30326 = D.30325 & 65280;
      D.30327 = D.30324 | D.30326;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30328 = D.30323 << 8;
      D.30329 = D.30328 & 16711680;
      D.30330 = D.30327 | D.30329;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30323 = (unsigned int) D.30322;
      D.30331 = D.30323 >> 24;
      D.30332 = D.30330 | D.30331;
      D.30333 = (long unsigned int) D.30332;
      D.30334 = D.30333 << 32;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30337 = D.30336 << 24;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30338 = D.30336 >> 8;
      D.30339 = D.30338 & 65280;
      D.30340 = D.30337 | D.30339;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30341 = D.30336 << 8;
      D.30342 = D.30341 & 16711680;
      D.30343 = D.30340 | D.30342;
      p.299 = p;
      D.30322 = MEM[(const guint64 *)p.299];
      D.30335 = D.30322 >> 32;
      D.30336 = (unsigned int) D.30335;
      D.30344 = D.30336 >> 24;
      D.30345 = D.30343 | D.30344;
      D.30346 = (long unsigned int) D.30345;
      val = D.30334 | D.30346;
      {
        guint64 * __p;

        D.30443 = (long unsigned int) i;
        __p = mono_array_addr_with_size (arr, 8, D.30443);
        *__p = val;
      }
      p.299 = p;
      p.311 = p.299 + 8;
      p = p.311;
    }
    i = i + 1;
    <D.21354>:
    if (i < alen) goto <D.21353>; else goto <D.21355>;
    <D.21355>:
    goto <D.21325>;
    <D.21356>:
    <D.21357>:
    <D.21358>:
    i = 0;
    goto <D.21362>;
    <D.21361>:
    {
      struct MonoObject * item;

      D.30446 = &tklass->byval_arg;
      p.299 = p;
      item = load_cattr_value (image, D.30446, p.299, &p);
      {
        void * * __p;

        D.30443 = (long unsigned int) i;
        __p = mono_array_addr_with_size (arr, 8, D.30443);
        mono_gc_wbarrier_set_arrayref (arr, __p, item);
      }
    }
    i = i + 1;
    <D.21362>:
    if (i < alen) goto <D.21361>; else goto <D.21363>;
    <D.21363>:
    goto <D.21325>;
    <D.21364>:
    monoeg_g_log (0B, 4, "Type 0x%02x not handled in custom attr array decoding", basetype);
    <D.21365>:
    goto <D.21365>;
    <D.21325>:
    p.299 = p;
    *end = p.299;
    D.30301 = arr;
    return D.30301;
  }
  <D.21366>:
  monoeg_g_log (0B, 4, "Type 0x%02x not handled in custom attr value decoding", type);
  <D.21367>:
  goto <D.21367>;
  D.30301 = 0B;
  return D.30301;
}


load_cattr_enum_type (struct MonoImage * image, const char * p, const char * * end)
{
  const char * p.312;
  unsigned int D.30450;
  int D.30451;
  unsigned int D.30452;
  sizetype D.30453;
  char * D.30454;
  const char * p.313;
  struct MonoClass * D.30458;
  char * n;
  struct MonoType * t;
  int slen;

  p.312 = p;
  D.30450 = mono_metadata_decode_value (p.312, &p);
  slen = (int) D.30450;
  p.312 = p;
  D.30451 = slen + 1;
  D.30452 = (unsigned int) D.30451;
  n = monoeg_g_memdup (p.312, D.30452);
  D.30453 = (sizetype) slen;
  D.30454 = n + D.30453;
  *D.30454 = 0;
  t = mono_reflection_type_from_name (n, image);
  if (t == 0B) goto <D.30455>; else goto <D.30456>;
  <D.30455>:
  monoeg_g_log (0B, 4, "Cannot load type \'%s\'", n);
  <D.21260>:
  goto <D.21260>;
  <D.30456>:
  monoeg_g_free (n);
  p.312 = p;
  D.30453 = (sizetype) slen;
  p.313 = p.312 + D.30453;
  p = p.313;
  p.312 = p;
  *end = p.312;
  D.30458 = mono_class_from_mono_type (t);
  return D.30458;
}


type_is_reference (struct MonoType * type)
{
  unsigned char D.30460;
  int D.30461;
  gboolean D.30462;

  D.30460 = type->type;
  D.30461 = (int) D.30460;
  switch (D.30461) <default: <D.21404>, case 2: <D.21389>, case 3: <D.21390>, case 4: <D.21394>, case 5: <D.21393>, case 6: <D.21396>, case 7: <D.21395>, case 8: <D.21398>, case 9: <D.21397>, case 10: <D.21400>, case 11: <D.21399>, case 12: <D.21402>, case 13: <D.21401>, case 17: <D.21403>, case 24: <D.21392>, case 25: <D.21391>>
  <D.21389>:
  <D.21390>:
  <D.21391>:
  <D.21392>:
  <D.21393>:
  <D.21394>:
  <D.21395>:
  <D.21396>:
  <D.21397>:
  <D.21398>:
  <D.21399>:
  <D.21400>:
  <D.21401>:
  <D.21402>:
  <D.21403>:
  D.30462 = 0;
  return D.30462;
  <D.21404>:
  D.30462 = 1;
  return D.30462;
}


__attribute__((visibility ("hidden")))
mono_reflection_resolve_custom_attribute_data (struct MonoReflectionMethod * ref_method, struct MonoReflectionAssembly * assembly, void * data, guint32 len, struct MonoArray * * ctor_args, struct MonoArray * * named_args)
{
  struct MonoAssembly * D.30466;
  struct MonoVTable * D.30467;
  struct MonoClass * D.30468;
  int D.30469;
  struct MonoException * D.30472;
  int D.30473;
  struct MonoLoaderError * D.30476;
  struct MonoLoaderError * D.30479;
  struct MonoException * D.30480;
  struct MonoArray * typedargs.314;
  struct MonoArray * namedargs.315;
  struct CattrNamedArg * arginfo.316;
  long unsigned int D.30487;
  char * D.30488;
  struct MonoMethodSignature * D.30489;
  struct MonoType * D.30490;
  struct MonoMethodSignature * D.30491;
  short unsigned int D.30492;
  int D.30493;
  char * D.30494;
  long unsigned int D.30495;
  long unsigned int D.30496;
  struct CattrNamedArg * D.30497;
  struct MonoProperty * D.30498;
  struct MonoClassField * D.30502;
  struct MonoType * D.30503;
  long unsigned int D.30504;
  struct MonoDomain * domain;
  struct MonoArray * typedargs;
  struct MonoArray * namedargs;
  struct MonoImage * image;
  struct MonoMethod * method;
  struct CattrNamedArg * arginfo;
  struct MonoError error;
  int i;

  try
    {
      arginfo = 0B;
      *ctor_args = 0B;
      *named_args = 0B;
      if (len == 0) goto <D.30464>; else goto <D.30465>;
      <D.30464>:
      return;
      <D.30465>:
      D.30466 = assembly->assembly;
      image = D.30466->image;
      method = ref_method->method;
      D.30467 = MEM[(struct MonoObject *)ref_method].vtable;
      domain = D.30467->domain;
      D.30468 = method->klass;
      D.30469 = mono_class_init (D.30468);
      if (D.30469 == 0) goto <D.30470>; else goto <D.30471>;
      <D.30470>:
      D.30468 = method->klass;
      D.30472 = mono_class_get_exception_for_failure (D.30468);
      mono_raise_exception (D.30472);
      <D.30471>:
      mono_reflection_create_custom_attr_data_args (image, method, data, len, &typedargs, &namedargs, &arginfo, &error);
      D.30473 = mono_error_ok (&error);
      if (D.30473 == 0) goto <D.30474>; else goto <D.30475>;
      <D.30474>:
      mono_error_raise_exception (&error);
      <D.30475>:
      D.30476 = mono_loader_get_last_error ();
      if (D.30476 != 0B) goto <D.30477>; else goto <D.30478>;
      <D.30477>:
      D.30479 = mono_loader_get_last_error ();
      D.30480 = mono_loader_error_prepare_exception (D.30479);
      mono_raise_exception (D.30480);
      <D.30478>:
      typedargs.314 = typedargs;
      if (typedargs.314 == 0B) goto <D.30481>; else goto <D.30484>;
      <D.30484>:
      namedargs.315 = namedargs;
      if (namedargs.315 == 0B) goto <D.30481>; else goto <D.30482>;
      <D.30481>:
      arginfo.316 = arginfo;
      monoeg_g_free (arginfo.316);
      return;
      <D.30482>:
      i = 0;
      goto <D.21535>;
      <D.21534>:
      {
        struct MonoObject * obj;
        struct MonoObject * typedarg;

        typedargs.314 = typedargs;
        D.30487 = (long unsigned int) i;
        D.30488 = mono_array_addr_with_size (typedargs.314, 8, D.30487);
        obj = MEM[(struct MonoObject * *)D.30488];
        D.30489 = mono_method_signature (method);
        D.30490 = D.30489->params[i];
        typedarg = create_cattr_typed_arg (D.30490, obj);
        {
          void * * __p;

          typedargs.314 = typedargs;
          D.30487 = (long unsigned int) i;
          __p = mono_array_addr_with_size (typedargs.314, 8, D.30487);
          typedargs.314 = typedargs;
          mono_gc_wbarrier_set_arrayref (typedargs.314, __p, typedarg);
        }
      }
      i = i + 1;
      <D.21535>:
      D.30491 = mono_method_signature (method);
      D.30492 = D.30491->param_count;
      D.30493 = (int) D.30492;
      if (D.30493 > i) goto <D.21534>; else goto <D.21536>;
      <D.21536>:
      i = 0;
      goto <D.21543>;
      <D.21542>:
      {
        struct MonoObject * obj;
        struct MonoObject * typedarg;
        struct MonoObject * namedarg;
        struct MonoObject * minfo;

        namedargs.315 = namedargs;
        D.30487 = (long unsigned int) i;
        D.30494 = mono_array_addr_with_size (namedargs.315, 8, D.30487);
        obj = MEM[(struct MonoObject * *)D.30494];
        arginfo.316 = arginfo;
        D.30495 = (long unsigned int) i;
        D.30496 = D.30495 * 24;
        D.30497 = arginfo.316 + D.30496;
        D.30498 = D.30497->prop;
        if (D.30498 != 0B) goto <D.30499>; else goto <D.30500>;
        <D.30499>:
        arginfo.316 = arginfo;
        D.30495 = (long unsigned int) i;
        D.30496 = D.30495 * 24;
        D.30497 = arginfo.316 + D.30496;
        D.30498 = D.30497->prop;
        minfo = mono_property_get_object (domain, 0B, D.30498);
        goto <D.30501>;
        <D.30500>:
        arginfo.316 = arginfo;
        D.30495 = (long unsigned int) i;
        D.30496 = D.30495 * 24;
        D.30497 = arginfo.316 + D.30496;
        D.30502 = D.30497->field;
        minfo = mono_field_get_object (domain, 0B, D.30502);
        <D.30501>:
        arginfo.316 = arginfo;
        D.30495 = (long unsigned int) i;
        D.30496 = D.30495 * 24;
        D.30497 = arginfo.316 + D.30496;
        D.30503 = D.30497->type;
        typedarg = create_cattr_typed_arg (D.30503, obj);
        namedarg = create_cattr_named_arg (minfo, typedarg);
        {
          void * * __p;

          namedargs.315 = namedargs;
          D.30487 = (long unsigned int) i;
          __p = mono_array_addr_with_size (namedargs.315, 8, D.30487);
          namedargs.315 = namedargs;
          mono_gc_wbarrier_set_arrayref (namedargs.315, __p, namedarg);
        }
      }
      i = i + 1;
      <D.21543>:
      D.30487 = (long unsigned int) i;
      namedargs.315 = namedargs;
      D.30504 = mono_array_length (namedargs.315);
      if (D.30487 < D.30504) goto <D.21542>; else goto <D.21544>;
      <D.21544>:
      typedargs.314 = typedargs;
      *ctor_args = typedargs.314;
      namedargs.315 = namedargs;
      *named_args = namedargs.315;
      arginfo.316 = arginfo;
      monoeg_g_free (arginfo.316);
    }
  finally
    {
      typedargs = {CLOBBER};
      namedargs = {CLOBBER};
      arginfo = {CLOBBER};
      error = {CLOBBER};
    }
}


create_cattr_typed_arg (struct MonoType * t, struct MonoObject * val)
{
  struct MonoClass * klass.317;
  struct MonoImage * D.30511;
  struct MonoClass * klass.318;
  struct MonoMethod * ctor.319;
  struct MonoMethod * ctor.320;
  struct MonoDomain * D.30517;
  struct MonoReflectionType * D.30518;
  struct MonoDomain * D.30519;
  struct MonoObject * D.30520;
  static struct MonoClass * klass;
  static struct MonoMethod * ctor;
  struct MonoObject * retval;
  void * params[2];
  void * unboxed;

  try
    {
      klass.317 = klass;
      if (klass.317 == 0B) goto <D.30509>; else goto <D.30510>;
      <D.30509>:
      D.30511 = mono_defaults.corlib;
      klass.318 = mono_class_from_name (D.30511, "System.Reflection", "CustomAttributeTypedArgument");
      klass = klass.318;
      <D.30510>:
      ctor.319 = ctor;
      if (ctor.319 == 0B) goto <D.30514>; else goto <D.30515>;
      <D.30514>:
      klass.317 = klass;
      ctor.320 = mono_class_get_method_from_name (klass.317, ".ctor", 2);
      ctor = ctor.320;
      <D.30515>:
      D.30517 = mono_domain_get ();
      D.30518 = mono_type_get_object (D.30517, t);
      params[0] = D.30518;
      params[1] = val;
      D.30519 = mono_domain_get ();
      klass.317 = klass;
      retval = mono_object_new (D.30519, klass.317);
      unboxed = mono_object_unbox (retval);
      ctor.319 = ctor;
      mono_runtime_invoke (ctor.319, unboxed, &params, 0B);
      D.30520 = retval;
      return D.30520;
    }
  finally
    {
      params = {CLOBBER};
    }
}


create_cattr_named_arg (void * minfo, struct MonoObject * typedarg)
{
  struct MonoClass * klass.321;
  struct MonoImage * D.30526;
  struct MonoClass * klass.322;
  struct MonoMethod * ctor.323;
  struct MonoMethod * ctor.324;
  struct MonoDomain * D.30532;
  struct MonoObject * D.30533;
  static struct MonoClass * klass;
  static struct MonoMethod * ctor;
  struct MonoObject * retval;
  void * unboxed;
  void * params[2];

  try
    {
      klass.321 = klass;
      if (klass.321 == 0B) goto <D.30524>; else goto <D.30525>;
      <D.30524>:
      D.30526 = mono_defaults.corlib;
      klass.322 = mono_class_from_name (D.30526, "System.Reflection", "CustomAttributeNamedArgument");
      klass = klass.322;
      <D.30525>:
      ctor.323 = ctor;
      if (ctor.323 == 0B) goto <D.30529>; else goto <D.30530>;
      <D.30529>:
      klass.321 = klass;
      ctor.324 = mono_class_get_method_from_name (klass.321, ".ctor", 2);
      ctor = ctor.324;
      <D.30530>:
      params[0] = minfo;
      params[1] = typedarg;
      D.30532 = mono_domain_get ();
      klass.321 = klass;
      retval = mono_object_new (D.30532, klass.321);
      unboxed = mono_object_unbox (retval);
      ctor.323 = ctor;
      mono_runtime_invoke (ctor.323, unboxed, &params, 0B);
      D.30533 = retval;
      return D.30533;
    }
  finally
    {
      params = {CLOBBER};
    }
}


mono_custom_attrs_construct (struct MonoCustomAttrInfo * cinfo)
{
  struct MonoArray * D.30536;
  struct MonoError error;

  try
    {
      D.30536 = mono_custom_attrs_construct_by_type (cinfo, 0B, &error);
      return D.30536;
    }
  finally
    {
      error = {CLOBBER};
    }
}


mono_custom_attrs_construct_by_type (struct MonoCustomAttrInfo * cinfo, struct MonoClass * attr_klass, struct MonoError * error)
{
  struct MonoMethod * D.30542;
  struct MonoClass * D.30543;
  int D.30544;
  int D.30545;
  struct MonoDomain * D.30546;
  struct MonoClass * D.21566;
  struct MonoClass * tmp_klass.325;
  struct MonoClass * D.30550;
  struct MonoClass * tmp_klass.326;
  _Bool D.30552;
  long int D.30553;
  long int D.30554;
  struct MonoVTable * D.30557;
  long unsigned int D.30558;
  struct MonoException * D.30561;
  int D.30565;
  struct MonoImage * D.30566;
  const mono_byte * D.30567;
  unsigned int D.30568;
  int D.30569;
  struct MonoArray * D.30572;
  struct MonoArray * result;
  struct MonoObject * attr;
  int i;
  int n;

  mono_error_init (error);
  n = 0;
  i = 0;
  goto <D.21563>;
  <D.21562>:
  if (attr_klass == 0B) goto <D.30539>; else goto <D.30541>;
  <D.30541>:
  D.30542 = cinfo->attrs[i].ctor;
  D.30543 = D.30542->klass;
  D.30544 = mono_class_is_assignable_from (attr_klass, D.30543);
  if (D.30544 != 0) goto <D.30539>; else goto <D.30540>;
  <D.30539>:
  n = n + 1;
  <D.30540>:
  i = i + 1;
  <D.21563>:
  D.30545 = cinfo->num_attrs;
  if (D.30545 > i) goto <D.21562>; else goto <D.21564>;
  <D.21564>:
  D.30546 = mono_domain_get ();
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.325 = tmp_klass;
      if (tmp_klass.325 == 0B) goto <D.30548>; else goto <D.30549>;
      <D.30548>:
      D.30550 = mono_defaults.attribute_class;
      tmp_klass.326 = mono_array_class_get (D.30550, 1);
      tmp_klass = tmp_klass.326;
      tmp_klass.325 = tmp_klass;
      D.30552 = tmp_klass.325 == 0B;
      D.30553 = (long int) D.30552;
      D.30554 = __builtin_expect (D.30553, 0);
      if (D.30554 != 0) goto <D.30555>; else goto <D.30556>;
      <D.30555>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 8491, "tmp_klass");
      <D.30556>:
      <D.30549>:
    }
    D.21566 = tmp_klass;
  }
  D.30557 = mono_class_vtable (D.30546, D.21566);
  D.30558 = (long unsigned int) n;
  result = mono_array_new_specific (D.30557, D.30558);
  n = 0;
  i = 0;
  goto <D.21569>;
  <D.21568>:
  D.30542 = cinfo->attrs[i].ctor;
  if (D.30542 == 0B) goto <D.30559>; else goto <D.30560>;
  <D.30559>:
  D.30561 = mono_get_exception_type_load (0B, 0B);
  mono_raise_exception (D.30561);
  <D.30560>:
  if (attr_klass == 0B) goto <D.30562>; else goto <D.30564>;
  <D.30564>:
  D.30542 = cinfo->attrs[i].ctor;
  D.30543 = D.30542->klass;
  D.30565 = mono_class_is_assignable_from (attr_klass, D.30543);
  if (D.30565 != 0) goto <D.30562>; else goto <D.30563>;
  <D.30562>:
  D.30566 = cinfo->image;
  D.30542 = cinfo->attrs[i].ctor;
  D.30567 = cinfo->attrs[i].data;
  D.30568 = cinfo->attrs[i].data_size;
  attr = create_custom_attr (D.30566, D.30542, D.30567, D.30568, error);
  D.30569 = mono_error_ok (error);
  if (D.30569 == 0) goto <D.30570>; else goto <D.30571>;
  <D.30570>:
  D.30572 = result;
  return D.30572;
  <D.30571>:
  {
    void * * __p;

    D.30558 = (long unsigned int) n;
    __p = mono_array_addr_with_size (result, 8, D.30558);
    mono_gc_wbarrier_set_arrayref (result, __p, attr);
  }
  n = n + 1;
  <D.30563>:
  i = i + 1;
  <D.21569>:
  D.30545 = cinfo->num_attrs;
  if (D.30545 > i) goto <D.21568>; else goto <D.21570>;
  <D.21570>:
  D.30572 = result;
  return D.30572;
}


create_custom_attr (struct MonoImage * image, struct MonoMethod * method, const guchar * data, guint32 len, struct MonoError * error)
{
  struct MonoClass * D.30574;
  int D.30575;
  struct MonoObject * D.30578;
  struct MonoDomain * D.30581;
  const char * p.327;
  short unsigned int D.30586;
  short unsigned int D.30587;
  int D.30588;
  int D.30589;
  int D.30590;
  int D.30591;
  int D.30592;
  short unsigned int D.30593;
  long unsigned int D.30597;
  long unsigned int D.30598;
  const char * p.328;
  long unsigned int D.30600;
  long unsigned int D.30601;
  void * * D.30602;
  struct MonoMethodSignature * D.30603;
  struct MonoType * D.30604;
  void * D.30605;
  struct MonoMethodSignature * D.30606;
  short unsigned int D.30607;
  unsigned int D.30608;
  struct MonoDomain * D.30609;
  struct MonoMethodSignature * D.30610;
  const char * named.329;
  short unsigned int D.30612;
  short unsigned int D.30613;
  int D.30614;
  int D.30615;
  int D.30616;
  int D.30617;
  int D.30618;
  const char * named.330;
  const char * named.331;
  const char * named.332;
  const char * named.333;
  const char * named.334;
  const char * named.335;
  const char * named.336;
  unsigned int D.30630;
  int D.30631;
  long unsigned int D.30632;
  long unsigned int D.30633;
  sizetype D.30634;
  char * D.30635;
  const char * named.337;
  unsigned int D.30637;
  int D.30638;
  long unsigned int D.30639;
  long unsigned int D.30640;
  sizetype D.30641;
  char * D.30642;
  const char * named.338;
  struct MonoVTable * D.30646;
  struct MonoClass * D.30647;
  struct MonoType * D.30648;
  int D.30649;
  struct MonoType * iftmp.339;
  struct MonoMethod * D.30656;
  struct MonoMethodSignature * D.30659;
  struct MonoMethod * D.30661;
  struct MonoMethodSignature * D.30662;
  struct MonoMethodSignature * D.30663;
  short unsigned int D.30664;
  int D.30665;
  int D.30666;
  void * D.30667;
  int D.30668;
  void * D.30671;
  const char * p;
  const char * named;
  guint32 i;
  guint32 j;
  guint32 num_named;
  struct MonoObject * attr;
  void * params_buf[32];
  void * * params;
  struct MonoMethodSignature * sig;

  try
    {
      p = data;
      mono_error_init (error);
      D.30574 = method->klass;
      mono_class_init (D.30574);
      D.30575 = mono_verifier_verify_cattr_content (image, method, data, len, 0B);
      if (D.30575 == 0) goto <D.30576>; else goto <D.30577>;
      <D.30576>:
      mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
      D.30578 = 0B;
      return D.30578;
      <D.30577>:
      if (len == 0) goto <D.30579>; else goto <D.30580>;
      <D.30579>:
      D.30581 = mono_domain_get ();
      D.30574 = method->klass;
      attr = mono_object_new (D.30581, D.30574);
      mono_runtime_invoke (method, attr, 0B, 0B);
      D.30578 = attr;
      return D.30578;
      <D.30580>:
      if (len <= 1) goto <D.30582>; else goto <D.30584>;
      <D.30584>:
      p.327 = p;
      D.30586 = MEM[(const guint16 *)p.327];
      D.30587 = D.30586 >> 8;
      D.30588 = (int) D.30587;
      p.327 = p;
      D.30586 = MEM[(const guint16 *)p.327];
      D.30589 = (int) D.30586;
      D.30590 = D.30589 << 8;
      D.30591 = D.30590 & 65535;
      D.30592 = D.30588 | D.30591;
      if (D.30592 != 1) goto <D.30582>; else goto <D.30583>;
      <D.30582>:
      D.30578 = 0B;
      return D.30578;
      <D.30583>:
      sig = mono_method_signature (method);
      D.30593 = sig->param_count;
      if (D.30593 <= 31) goto <D.30594>; else goto <D.30595>;
      <D.30594>:
      params = &params_buf;
      goto <D.30596>;
      <D.30595>:
      D.30593 = sig->param_count;
      D.30597 = (long unsigned int) D.30593;
      D.30598 = D.30597 * 8;
      params = mono_gc_alloc_fixed (D.30598, 0B);
      <D.30596>:
      p.327 = p;
      p.328 = p.327 + 2;
      p = p.328;
      i = 0;
      goto <D.21454>;
      <D.21453>:
      D.30600 = (long unsigned int) i;
      D.30601 = D.30600 * 8;
      D.30602 = params + D.30601;
      D.30603 = mono_method_signature (method);
      D.30604 = D.30603->params[i];
      p.327 = p;
      D.30605 = load_cattr_value (image, D.30604, p.327, &p);
      *D.30602 = D.30605;
      i = i + 1;
      <D.21454>:
      D.30606 = mono_method_signature (method);
      D.30607 = D.30606->param_count;
      D.30608 = (unsigned int) D.30607;
      if (D.30608 > i) goto <D.21453>; else goto <D.21455>;
      <D.21455>:
      p.327 = p;
      named = p.327;
      D.30609 = mono_domain_get ();
      D.30574 = method->klass;
      attr = mono_object_new (D.30609, D.30574);
      mono_runtime_invoke (method, attr, params, 0B);
      D.30610 = method->signature;
      free_param_data (D.30610, params);
      named.329 = named;
      D.30612 = MEM[(const guint16 *)named.329];
      D.30613 = D.30612 >> 8;
      D.30614 = (int) D.30613;
      named.329 = named;
      D.30612 = MEM[(const guint16 *)named.329];
      D.30615 = (int) D.30612;
      D.30616 = D.30615 << 8;
      D.30617 = D.30616 & 65535;
      D.30618 = D.30614 | D.30617;
      num_named = (guint32) D.30618;
      named.329 = named;
      named.330 = named.329 + 2;
      named = named.330;
      j = 0;
      goto <D.21468>;
      <D.21467>:
      {
        gint name_len;
        char * name;
        char named_type;
        char data_type;

        named.329 = named;
        named.331 = named.329;
        named.332 = named.331 + 1;
        named = named.332;
        named_type = *named.331;
        named.329 = named;
        named.333 = named.329;
        named.334 = named.333 + 1;
        named = named.334;
        data_type = *named.333;
        if (data_type == 29) goto <D.30624>; else goto <D.30625>;
        <D.30624>:
        named.329 = named;
        named.335 = named.329;
        named.336 = named.335 + 1;
        named = named.336;
        data_type = *named.335;
        <D.30625>:
        if (data_type == 85) goto <D.30628>; else goto <D.30629>;
        <D.30628>:
        {
          gint type_len;
          char * type_name;

          named.329 = named;
          D.30630 = mono_metadata_decode_blob_size (named.329, &named);
          type_len = (gint) D.30630;
          D.30631 = type_len + 1;
          D.30632 = (long unsigned int) D.30631;
          type_name = monoeg_malloc (D.30632);
          named.329 = named;
          D.30633 = (long unsigned int) type_len;
          memcpy (type_name, named.329, D.30633);
          D.30634 = (sizetype) type_len;
          D.30635 = type_name + D.30634;
          *D.30635 = 0;
          named.329 = named;
          D.30634 = (sizetype) type_len;
          named.337 = named.329 + D.30634;
          named = named.337;
          monoeg_g_free (type_name);
        }
        <D.30629>:
        named.329 = named;
        D.30637 = mono_metadata_decode_blob_size (named.329, &named);
        name_len = (gint) D.30637;
        D.30638 = name_len + 1;
        D.30639 = (long unsigned int) D.30638;
        name = monoeg_malloc (D.30639);
        named.329 = named;
        D.30640 = (long unsigned int) name_len;
        memcpy (name, named.329, D.30640);
        D.30641 = (sizetype) name_len;
        D.30642 = name + D.30641;
        *D.30642 = 0;
        named.329 = named;
        D.30641 = (sizetype) name_len;
        named.338 = named.329 + D.30641;
        named = named.338;
        if (named_type == 83) goto <D.30644>; else goto <D.30645>;
        <D.30644>:
        {
          struct MonoClassField * field;
          void * val;

          D.30646 = attr->vtable;
          D.30647 = D.30646->klass;
          field = mono_class_get_field_from_name (D.30647, name);
          D.30648 = field->type;
          named.329 = named;
          val = load_cattr_value (image, D.30648, named.329, &named);
          mono_field_set_value (attr, field, val);
          D.30648 = field->type;
          D.30649 = type_is_reference (D.30648);
          if (D.30649 == 0) goto <D.30650>; else goto <D.30651>;
          <D.30650>:
          monoeg_g_free (val);
          <D.30651>:
        }
        goto <D.30652>;
        <D.30645>:
        if (named_type == 84) goto <D.30653>; else goto <D.30654>;
        <D.30653>:
        {
          struct MonoProperty * prop;
          void * pparams[1];
          struct MonoType * prop_type;

          try
            {
              D.30646 = attr->vtable;
              D.30647 = D.30646->klass;
              prop = mono_class_get_property_from_name (D.30647, name);
              D.30656 = prop->get;
              if (D.30656 != 0B) goto <D.30657>; else goto <D.30658>;
              <D.30657>:
              D.30656 = prop->get;
              D.30659 = mono_method_signature (D.30656);
              iftmp.339 = D.30659->ret;
              goto <D.30660>;
              <D.30658>:
              D.30661 = prop->set;
              D.30662 = mono_method_signature (D.30661);
              D.30661 = prop->set;
              D.30663 = mono_method_signature (D.30661);
              D.30664 = D.30663->param_count;
              D.30665 = (int) D.30664;
              D.30666 = D.30665 + -1;
              iftmp.339 = D.30662->params[D.30666];
              <D.30660>:
              prop_type = iftmp.339;
              named.329 = named;
              D.30667 = load_cattr_value (image, prop_type, named.329, &named);
              pparams[0] = D.30667;
              mono_property_set_value (prop, attr, &pparams, 0B);
              D.30668 = type_is_reference (prop_type);
              if (D.30668 == 0) goto <D.30669>; else goto <D.30670>;
              <D.30669>:
              D.30671 = pparams[0];
              monoeg_g_free (D.30671);
              <D.30670>:
            }
          finally
            {
              pparams = {CLOBBER};
            }
        }
        <D.30654>:
        <D.30652>:
        monoeg_g_free (name);
      }
      j = j + 1;
      <D.21468>:
      if (j < num_named) goto <D.21467>; else goto <D.21469>;
      <D.21469>:
      if (&params_buf != params) goto <D.30672>; else goto <D.30673>;
      <D.30672>:
      mono_gc_free_fixed (params);
      <D.30673>:
      D.30578 = attr;
      return D.30578;
    }
  finally
    {
      p = {CLOBBER};
      named = {CLOBBER};
      params_buf = {CLOBBER};
    }
}


free_param_data (struct MonoMethodSignature * sig, void * * params)
{
  struct MonoType * D.30676;
  int D.30677;
  long unsigned int D.30680;
  long unsigned int D.30681;
  void * * D.30682;
  void * D.30683;
  short unsigned int D.30684;
  int D.30685;
  int i;

  i = 0;
  goto <D.21411>;
  <D.21410>:
  D.30676 = sig->params[i];
  D.30677 = type_is_reference (D.30676);
  if (D.30677 == 0) goto <D.30678>; else goto <D.30679>;
  <D.30678>:
  D.30680 = (long unsigned int) i;
  D.30681 = D.30680 * 8;
  D.30682 = params + D.30681;
  D.30683 = *D.30682;
  monoeg_g_free (D.30683);
  <D.30679>:
  i = i + 1;
  <D.21411>:
  D.30684 = sig->param_count;
  D.30685 = (int) D.30684;
  if (D.30685 > i) goto <D.21410>; else goto <D.21412>;
  <D.21412>:
}


mono_custom_attrs_from_index (struct MonoImage * image, guint32 idx)
{
  struct MonoCustomAttrInfo * D.30688;
  int i.340;
  unsigned int D.30690;
  long unsigned int D.30692;
  void * D.30693;
  <unnamed-unsigned:24> D.30694;
  unsigned int D.30695;
  long unsigned int D.30698;
  long unsigned int D.30699;
  long unsigned int D.30700;
  int len.341;
  void * D.30702;
  long int D.30703;
  int D.30704;
  unsigned int D.30705;
  unsigned int D.30706;
  struct MonoMethod * D.30707;
  struct MonoMethod * D.30708;
  char * D.30711;
  unsigned int D.30712;
  int D.30713;
  const char * data.342;
  const char * data.343;
  unsigned int D.30718;
  guint32 mtoken;
  guint32 i;
  guint32 len;
  guint32 cols[3];
  struct MonoTableInfo * ca;
  struct MonoCustomAttrInfo * ainfo;
  struct GList * tmp;
  struct GList * list;
  const char * data;

  try
    {
      list = 0B;
      ca = &image->tables[12];
      i = mono_metadata_custom_attrs_from_index (image, idx);
      if (i == 0) goto <D.30686>; else goto <D.30687>;
      <D.30686>:
      D.30688 = 0B;
      return D.30688;
      <D.30687>:
      i = i + 4294967295;
      goto <D.21600>;
      <D.21599>:
      i.340 = (int) i;
      D.30690 = mono_metadata_decode_row_col (ca, i.340, 0);
      if (D.30690 != idx) goto <D.21598>; else goto <D.30691>;
      <D.30691>:
      D.30692 = (long unsigned int) i;
      D.30693 = (void *) D.30692;
      list = monoeg_g_list_prepend (list, D.30693);
      i = i + 1;
      <D.21600>:
      D.30694 = ca->rows;
      D.30695 = (unsigned int) D.30694;
      if (D.30695 > i) goto <D.21599>; else goto <D.21598>;
      <D.21598>:
      len = monoeg_g_list_length (list);
      if (len == 0) goto <D.30696>; else goto <D.30697>;
      <D.30696>:
      D.30688 = 0B;
      return D.30688;
      <D.30697>:
      D.30698 = (long unsigned int) len;
      D.30699 = D.30698 * 24;
      D.30700 = D.30699 + 16;
      ainfo = monoeg_malloc0 (D.30700);
      len.341 = (int) len;
      ainfo->num_attrs = len.341;
      ainfo->image = image;
      i = 0;
      tmp = list;
      goto <D.21607>;
      <D.21606>:
      D.30702 = tmp->data;
      D.30703 = (long int) D.30702;
      D.30704 = (int) D.30703;
      mono_metadata_decode_row (ca, D.30704, &cols, 3);
      D.30705 = cols[1];
      mtoken = D.30705 >> 3;
      D.30705 = cols[1];
      D.30706 = D.30705 & 7;
      switch (D.30706) <default: <D.21604>, case 2: <D.21601>, case 3: <D.21603>>
      <D.21601>:
      mtoken = mtoken | 100663296;
      goto <D.21602>;
      <D.21603>:
      mtoken = mtoken | 167772160;
      goto <D.21602>;
      <D.21604>:
      D.30705 = cols[1];
      monoeg_g_log (0B, 4, "Unknown table for custom attr type %08x", D.30705);
      <D.21605>:
      goto <D.21605>;
      <D.21602>:
      D.30707 = mono_get_method (image, mtoken, 0B);
      ainfo->attrs[i].ctor = D.30707;
      D.30708 = ainfo->attrs[i].ctor;
      if (D.30708 == 0B) goto <D.30709>; else goto <D.30710>;
      <D.30709>:
      D.30711 = image->name;
      monoeg_g_log (0B, 16, "Can\'t find custom attr constructor image: %s mtoken: 0x%08x", D.30711, mtoken);
      monoeg_g_list_free (list);
      monoeg_g_free (ainfo);
      D.30688 = 0B;
      return D.30688;
      <D.30710>:
      D.30712 = cols[2];
      D.30713 = mono_verifier_verify_cattr_blob (image, D.30712, 0B);
      if (D.30713 == 0) goto <D.30714>; else goto <D.30715>;
      <D.30714>:
      D.30711 = image->name;
      monoeg_g_log (0B, 16, "Invalid custom attribute blob on image %s for index %x", D.30711, idx);
      monoeg_g_list_free (list);
      monoeg_g_free (ainfo);
      D.30688 = 0B;
      return D.30688;
      <D.30715>:
      D.30712 = cols[2];
      data.342 = mono_metadata_blob_heap (image, D.30712);
      data = data.342;
      data.343 = data;
      D.30718 = mono_metadata_decode_value (data.343, &data);
      ainfo->attrs[i].data_size = D.30718;
      data.343 = data;
      ainfo->attrs[i].data = data.343;
      i = i + 1;
      tmp = tmp->next;
      <D.21607>:
      if (i < len) goto <D.21606>; else goto <D.21608>;
      <D.21608>:
      monoeg_g_list_free (list);
      D.30688 = ainfo;
      return D.30688;
    }
  finally
    {
      cols = {CLOBBER};
      data = {CLOBBER};
    }
}


mono_custom_attrs_from_method (struct MonoMethod * method)
{
  long unsigned int D.30721;
  long unsigned int D.30722;
  long unsigned int D.30727;
  struct MonoClass * D.30729;
  struct MonoImage * D.30730;
  long unsigned int D.30731;
  long unsigned int D.30732;
  struct MonoCustomAttrInfo * D.30733;
  unsigned int D.30734;
  guint32 idx;

  D.30721 = BIT_FIELD_REF <*method, 64, 256>;
  D.30722 = D.30721 & 2251799813685248;
  if (D.30722 != 0) goto <D.30723>; else goto <D.30724>;
  <D.30723>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.30724>:
  D.30721 = BIT_FIELD_REF <*method, 64, 256>;
  D.30727 = D.30721 & 18014398509481984;
  if (D.30727 != 0) goto <D.30725>; else goto <D.30728>;
  <D.30728>:
  D.30729 = method->klass;
  D.30730 = D.30729->image;
  D.30731 = BIT_FIELD_REF <*D.30730, 64, 192>;
  D.30732 = D.30731 & 268435456;
  if (D.30732 != 0) goto <D.30725>; else goto <D.30726>;
  <D.30725>:
  D.30729 = method->klass;
  D.30730 = D.30729->image;
  D.30733 = lookup_custom_attr (D.30730, method);
  return D.30733;
  <D.30726>:
  D.30734 = method->token;
  if (D.30734 == 0) goto <D.30735>; else goto <D.30736>;
  <D.30735>:
  D.30733 = 0B;
  return D.30733;
  <D.30736>:
  idx = mono_method_get_index (method);
  idx = idx << 5;
  idx = idx;
  D.30729 = method->klass;
  D.30730 = D.30729->image;
  D.30733 = mono_custom_attrs_from_index (D.30730, idx);
  return D.30733;
}


lookup_custom_attr (struct MonoImage * image, void * member)
{
  struct MonoCustomAttrInfo * D.30740;
  int D.30741;
  long unsigned int D.30742;
  unsigned int D.30743;
  unsigned int D.30744;
  unsigned int D.30745;
  struct MonoCustomAttrInfo * res;

  res = mono_image_property_lookup (image, member, 4096);
  if (res == 0B) goto <D.30738>; else goto <D.30739>;
  <D.30738>:
  D.30740 = 0B;
  return D.30740;
  <D.30739>:
  D.30741 = res->num_attrs;
  D.30742 = (long unsigned int) D.30741;
  D.30743 = (unsigned int) D.30742;
  D.30744 = D.30743 * 24;
  D.30745 = D.30744 + 16;
  res = monoeg_g_memdup (res, D.30745);
  res->cached = 0;
  D.30740 = res;
  return D.30740;
}


mono_custom_attrs_from_class (struct MonoClass * klass)
{
  struct MonoGenericClass * D.30747;
  struct MonoImage * D.30750;
  long unsigned int D.30751;
  long unsigned int D.30752;
  struct MonoCustomAttrInfo * D.30755;
  unsigned char D.30759;
  int D.30761;
  unsigned int D.30762;
  unsigned int D.30763;
  guint32 idx;

  D.30747 = klass->generic_class;
  if (D.30747 != 0B) goto <D.30748>; else goto <D.30749>;
  <D.30748>:
  D.30747 = klass->generic_class;
  klass = D.30747->container_class;
  <D.30749>:
  D.30750 = klass->image;
  D.30751 = BIT_FIELD_REF <*D.30750, 64, 192>;
  D.30752 = D.30751 & 268435456;
  if (D.30752 != 0) goto <D.30753>; else goto <D.30754>;
  <D.30753>:
  D.30750 = klass->image;
  D.30755 = lookup_custom_attr (D.30750, klass);
  return D.30755;
  <D.30754>:
  D.30759 = klass->byval_arg.type;
  if (D.30759 == 19) goto <D.30756>; else goto <D.30760>;
  <D.30760>:
  D.30759 = klass->byval_arg.type;
  if (D.30759 == 30) goto <D.30756>; else goto <D.30757>;
  <D.30756>:
  D.30761 = klass->sizes.generic_param_token;
  D.30762 = (unsigned int) D.30761;
  idx = D.30762 & 16777215;
  idx = idx << 5;
  idx = idx | 19;
  goto <D.30758>;
  <D.30757>:
  D.30763 = klass->type_token;
  idx = D.30763 & 16777215;
  idx = idx << 5;
  idx = idx | 3;
  <D.30758>:
  D.30750 = klass->image;
  D.30755 = mono_custom_attrs_from_index (D.30750, idx);
  return D.30755;
}


mono_custom_attrs_from_assembly (struct MonoAssembly * assembly)
{
  struct MonoImage * D.30765;
  long unsigned int D.30766;
  long unsigned int D.30767;
  struct MonoCustomAttrInfo * D.30770;
  guint32 idx;

  D.30765 = assembly->image;
  D.30766 = BIT_FIELD_REF <*D.30765, 64, 192>;
  D.30767 = D.30766 & 268435456;
  if (D.30767 != 0) goto <D.30768>; else goto <D.30769>;
  <D.30768>:
  D.30765 = assembly->image;
  D.30770 = lookup_custom_attr (D.30765, assembly);
  return D.30770;
  <D.30769>:
  idx = 1;
  idx = idx << 5;
  idx = idx | 14;
  D.30765 = assembly->image;
  D.30770 = mono_custom_attrs_from_index (D.30765, idx);
  return D.30770;
}


mono_custom_attrs_from_property (struct MonoClass * klass, struct MonoProperty * property)
{
  struct MonoImage * D.30772;
  long unsigned int D.30773;
  long unsigned int D.30774;
  struct MonoCustomAttrInfo * D.30777;
  guint32 idx;

  D.30772 = klass->image;
  D.30773 = BIT_FIELD_REF <*D.30772, 64, 192>;
  D.30774 = D.30773 & 268435456;
  if (D.30774 != 0) goto <D.30775>; else goto <D.30776>;
  <D.30775>:
  property = mono_metadata_get_corresponding_property_from_generic_type_definition (property);
  D.30772 = klass->image;
  D.30777 = lookup_custom_attr (D.30772, property);
  return D.30777;
  <D.30776>:
  idx = find_property_index (klass, property);
  idx = idx << 5;
  idx = idx | 9;
  D.30772 = klass->image;
  D.30777 = mono_custom_attrs_from_index (D.30772, idx);
  return D.30777;
}


find_property_index (struct MonoClass * klass, struct MonoProperty * property)
{
  struct MonoClassExt * D.30779;
  struct MonoProperty * D.30780;
  long unsigned int D.30781;
  long unsigned int D.30782;
  struct MonoProperty * D.30783;
  guint32 D.30786;
  unsigned int D.30787;
  unsigned int i.344;
  unsigned int D.30789;
  unsigned int D.30790;
  int i;

  i = 0;
  goto <D.21427>;
  <D.21426>:
  D.30779 = klass->ext;
  D.30780 = D.30779->properties;
  D.30781 = (long unsigned int) i;
  D.30782 = D.30781 * 40;
  D.30783 = D.30780 + D.30782;
  if (D.30783 == property) goto <D.30784>; else goto <D.30785>;
  <D.30784>:
  D.30779 = klass->ext;
  D.30787 = D.30779->property.first;
  i.344 = (unsigned int) i;
  D.30789 = D.30787 + i.344;
  D.30786 = D.30789 + 1;
  return D.30786;
  <D.30785>:
  i = i + 1;
  <D.21427>:
  D.30779 = klass->ext;
  D.30790 = D.30779->property.count;
  i.344 = (unsigned int) i;
  if (D.30790 > i.344) goto <D.21426>; else goto <D.21428>;
  <D.21428>:
  D.30786 = 0;
  return D.30786;
}


mono_custom_attrs_from_event (struct MonoClass * klass, struct MonoEvent * event)
{
  struct MonoImage * D.30792;
  long unsigned int D.30793;
  long unsigned int D.30794;
  struct MonoCustomAttrInfo * D.30797;
  guint32 idx;

  D.30792 = klass->image;
  D.30793 = BIT_FIELD_REF <*D.30792, 64, 192>;
  D.30794 = D.30793 & 268435456;
  if (D.30794 != 0) goto <D.30795>; else goto <D.30796>;
  <D.30795>:
  event = mono_metadata_get_corresponding_event_from_generic_type_definition (event);
  D.30792 = klass->image;
  D.30797 = lookup_custom_attr (D.30792, event);
  return D.30797;
  <D.30796>:
  idx = find_event_index (klass, event);
  idx = idx << 5;
  idx = idx | 10;
  D.30792 = klass->image;
  D.30797 = mono_custom_attrs_from_index (D.30792, idx);
  return D.30797;
}


find_event_index (struct MonoClass * klass, struct MonoEvent * event)
{
  struct MonoClassExt * D.30799;
  struct MonoEvent * D.30800;
  long unsigned int D.30801;
  long unsigned int D.30802;
  struct MonoEvent * D.30803;
  guint32 D.30806;
  unsigned int D.30807;
  unsigned int i.345;
  unsigned int D.30809;
  unsigned int D.30810;
  int i;

  i = 0;
  goto <D.21435>;
  <D.21434>:
  D.30799 = klass->ext;
  D.30800 = D.30799->events;
  D.30801 = (long unsigned int) i;
  D.30802 = D.30801 * 56;
  D.30803 = D.30800 + D.30802;
  if (D.30803 == event) goto <D.30804>; else goto <D.30805>;
  <D.30804>:
  D.30799 = klass->ext;
  D.30807 = D.30799->event.first;
  i.345 = (unsigned int) i;
  D.30809 = D.30807 + i.345;
  D.30806 = D.30809 + 1;
  return D.30806;
  <D.30805>:
  i = i + 1;
  <D.21435>:
  D.30799 = klass->ext;
  D.30810 = D.30799->event.count;
  i.345 = (unsigned int) i;
  if (D.30810 > i.345) goto <D.21434>; else goto <D.21436>;
  <D.21436>:
  D.30806 = 0;
  return D.30806;
}


mono_custom_attrs_from_field (struct MonoClass * klass, struct MonoClassField * field)
{
  struct MonoImage * D.30812;
  long unsigned int D.30813;
  long unsigned int D.30814;
  struct MonoCustomAttrInfo * D.30817;
  guint32 idx;

  D.30812 = klass->image;
  D.30813 = BIT_FIELD_REF <*D.30812, 64, 192>;
  D.30814 = D.30813 & 268435456;
  if (D.30814 != 0) goto <D.30815>; else goto <D.30816>;
  <D.30815>:
  field = mono_metadata_get_corresponding_field_from_generic_type_definition (field);
  D.30812 = klass->image;
  D.30817 = lookup_custom_attr (D.30812, field);
  return D.30817;
  <D.30816>:
  idx = find_field_index (klass, field);
  idx = idx << 5;
  idx = idx | 1;
  D.30812 = klass->image;
  D.30817 = mono_custom_attrs_from_index (D.30812, idx);
  return D.30817;
}


find_field_index (struct MonoClass * klass, struct MonoClassField * field)
{
  struct MonoClassField * D.30819;
  long unsigned int D.30820;
  long unsigned int D.30821;
  struct MonoClassField * D.30822;
  guint32 D.30825;
  unsigned int D.30826;
  unsigned int i.346;
  unsigned int D.30828;
  unsigned int D.30829;
  int i;

  i = 0;
  goto <D.21419>;
  <D.21418>:
  D.30819 = klass->fields;
  D.30820 = (long unsigned int) i;
  D.30821 = D.30820 * 32;
  D.30822 = D.30819 + D.30821;
  if (D.30822 == field) goto <D.30823>; else goto <D.30824>;
  <D.30823>:
  D.30826 = klass->field.first;
  i.346 = (unsigned int) i;
  D.30828 = D.30826 + i.346;
  D.30825 = D.30828 + 1;
  return D.30825;
  <D.30824>:
  i = i + 1;
  <D.21419>:
  D.30829 = klass->field.count;
  i.346 = (unsigned int) i;
  if (D.30829 > i.346) goto <D.21418>; else goto <D.21420>;
  <D.21420>:
  D.30825 = 0;
  return D.30825;
}


mono_custom_attrs_from_param (struct MonoMethod * method, guint32 param)
{
  long unsigned int D.30831;
  long unsigned int D.30832;
  struct MonoClass * D.30835;
  struct MonoImage * D.30836;
  long unsigned int D.30837;
  long unsigned int D.30838;
  struct GHashTable * D.30841;
  struct MonoCustomAttrInfo * * D.30845;
  struct MonoCustomAttrInfo * D.30846;
  long unsigned int D.30847;
  long unsigned int D.30848;
  struct MonoCustomAttrInfo * * D.30849;
  int D.30852;
  long unsigned int D.30853;
  unsigned int D.30854;
  unsigned int D.30855;
  unsigned int D.30856;
  long unsigned int D.30857;
  long unsigned int D.30858;
  unsigned int D.30861;
  int D.30862;
  <unnamed-unsigned:24> D.30863;
  unsigned int D.30864;
  int D.30867;
  int D.30868;
  int method_index.347;
  unsigned int D.30871;
  int D.30872;
  struct MonoTableInfo * ca;
  guint32 i;
  guint32 idx;
  guint32 method_index;
  guint32 param_list;
  guint32 param_last;
  guint32 param_pos;
  guint32 found;
  struct MonoImage * image;
  struct MonoReflectionMethodAux * aux;

  D.30831 = BIT_FIELD_REF <*method, 64, 256>;
  D.30832 = D.30831 & 2251799813685248;
  if (D.30832 != 0) goto <D.30833>; else goto <D.30834>;
  <D.30833>:
  method = MEM[(struct MonoMethodInflated *)method].declaring;
  <D.30834>:
  D.30835 = method->klass;
  D.30836 = D.30835->image;
  D.30837 = BIT_FIELD_REF <*D.30836, 64, 192>;
  D.30838 = D.30837 & 268435456;
  if (D.30838 != 0) goto <D.30839>; else goto <D.30840>;
  <D.30839>:
  {
    struct MonoCustomAttrInfo * res;
    struct MonoCustomAttrInfo * ainfo;
    int size;

    D.30835 = method->klass;
    D.30836 = D.30835->image;
    D.30841 = MEM[(struct MonoDynamicImage *)D.30836].method_aux_hash;
    aux = monoeg_g_hash_table_lookup (D.30841, method);
    if (aux == 0B) goto <D.30842>; else goto <D.30844>;
    <D.30844>:
    D.30845 = aux->param_cattr;
    if (D.30845 == 0B) goto <D.30842>; else goto <D.30843>;
    <D.30842>:
    D.30846 = 0B;
    return D.30846;
    <D.30843>:
    D.30845 = aux->param_cattr;
    D.30847 = (long unsigned int) param;
    D.30848 = D.30847 * 8;
    D.30849 = D.30845 + D.30848;
    ainfo = *D.30849;
    if (ainfo == 0B) goto <D.30850>; else goto <D.30851>;
    <D.30850>:
    D.30846 = 0B;
    return D.30846;
    <D.30851>:
    D.30852 = ainfo->num_attrs;
    D.30853 = (long unsigned int) D.30852;
    D.30854 = (unsigned int) D.30853;
    D.30855 = D.30854 * 24;
    D.30856 = D.30855 + 16;
    size = (int) D.30856;
    D.30857 = (long unsigned int) size;
    res = monoeg_malloc0 (D.30857);
    D.30858 = (long unsigned int) size;
    memcpy (res, ainfo, D.30858);
    D.30846 = res;
    return D.30846;
  }
  <D.30840>:
  D.30835 = method->klass;
  image = D.30835->image;
  method_index = mono_method_get_index (method);
  if (method_index == 0) goto <D.30859>; else goto <D.30860>;
  <D.30859>:
  D.30846 = 0B;
  return D.30846;
  <D.30860>:
  ca = &image->tables[6];
  D.30861 = method_index + 4294967295;
  D.30862 = (int) D.30861;
  param_list = mono_metadata_decode_row_col (ca, D.30862, 5);
  D.30863 = ca->rows;
  D.30864 = (unsigned int) D.30863;
  if (D.30864 == method_index) goto <D.30865>; else goto <D.30866>;
  <D.30865>:
  ca = &image->tables[8];
  D.30863 = ca->rows;
  D.30867 = (int) D.30863;
  D.30868 = D.30867 + 1;
  param_last = (guint32) D.30868;
  goto <D.30869>;
  <D.30866>:
  method_index.347 = (int) method_index;
  param_last = mono_metadata_decode_row_col (ca, method_index.347, 5);
  ca = &image->tables[8];
  <D.30869>:
  found = 0;
  i = param_list;
  goto <D.21659>;
  <D.21658>:
  D.30871 = i + 4294967295;
  D.30872 = (int) D.30871;
  param_pos = mono_metadata_decode_row_col (ca, D.30872, 1);
  if (param_pos == param) goto <D.30873>; else goto <D.30874>;
  <D.30873>:
  found = 1;
  goto <D.21657>;
  <D.30874>:
  i = i + 1;
  <D.21659>:
  if (i < param_last) goto <D.21658>; else goto <D.21657>;
  <D.21657>:
  if (found == 0) goto <D.30875>; else goto <D.30876>;
  <D.30875>:
  D.30846 = 0B;
  return D.30846;
  <D.30876>:
  idx = i;
  idx = idx << 5;
  idx = idx | 4;
  D.30846 = mono_custom_attrs_from_index (image, idx);
  return D.30846;
}


mono_custom_attrs_has_attr (struct MonoCustomAttrInfo * ainfo, struct MonoClass * attr_klass)
{
  struct MonoMethod * D.30878;
  int D.30882;
  unsigned int D.30884;
  unsigned int D.30885;
  unsigned char D.30887;
  int D.30889;
  mono_bool D.30890;
  int D.30891;
  int i;
  struct MonoClass * klass;

  i = 0;
  goto <D.21667>;
  <D.21666>:
  D.30878 = ainfo->attrs[i].ctor;
  klass = D.30878->klass;
  D.30882 = mono_class_has_parent (klass, attr_klass);
  if (D.30882 != 0) goto <D.30879>; else goto <D.30883>;
  <D.30883>:
  D.30884 = attr_klass->flags;
  D.30885 = D.30884 & 32;
  if (D.30885 != 0) goto <D.30880>; else goto <D.30886>;
  <D.30886>:
  D.30887 = attr_klass->byval_arg.type;
  if (D.30887 == 19) goto <D.30880>; else goto <D.30888>;
  <D.30888>:
  D.30887 = attr_klass->byval_arg.type;
  if (D.30887 == 30) goto <D.30880>; else goto <D.30881>;
  <D.30880>:
  D.30889 = mono_class_is_assignable_from (attr_klass, klass);
  if (D.30889 != 0) goto <D.30879>; else goto <D.30881>;
  <D.30879>:
  D.30890 = 1;
  return D.30890;
  <D.30881>:
  i = i + 1;
  <D.21667>:
  D.30891 = ainfo->num_attrs;
  if (D.30891 > i) goto <D.21666>; else goto <D.21668>;
  <D.21668>:
  D.30890 = 0;
  return D.30890;
}


mono_class_has_parent (struct MonoClass * klass, struct MonoClass * parent)
{
  struct MonoClass * * D.30893;
  _Bool D.30894;
  long int D.30895;
  long int D.30896;
  struct MonoClass * * D.30899;
  _Bool D.30900;
  long int D.30901;
  long int D.30902;
  gboolean D.30905;

  D.30893 = klass->supertypes;
  D.30894 = D.30893 == 0B;
  D.30895 = (long int) D.30894;
  D.30896 = __builtin_expect (D.30895, 0);
  if (D.30896 != 0) goto <D.30897>; else goto <D.30898>;
  <D.30897>:
  mono_class_setup_supertypes (klass);
  <D.30898>:
  D.30899 = parent->supertypes;
  D.30900 = D.30899 == 0B;
  D.30901 = (long int) D.30900;
  D.30902 = __builtin_expect (D.30901, 0);
  if (D.30902 != 0) goto <D.30903>; else goto <D.30904>;
  <D.30903>:
  mono_class_setup_supertypes (parent);
  <D.30904>:
  D.30905 = mono_class_has_parent_fast (klass, parent);
  return D.30905;
}


mono_class_has_parent_fast (struct MonoClass * klass, struct MonoClass * parent)
{
  gboolean D.30907;
  int iftmp.348;
  short unsigned int D.30911;
  short unsigned int D.30912;
  struct MonoClass * * D.30914;
  long unsigned int D.30915;
  long unsigned int D.30916;
  sizetype D.30917;
  struct MonoClass * * D.30918;
  struct MonoClass * D.30919;

  D.30911 = klass->idepth;
  D.30912 = parent->idepth;
  if (D.30911 >= D.30912) goto <D.30913>; else goto <D.30909>;
  <D.30913>:
  D.30914 = klass->supertypes;
  D.30912 = parent->idepth;
  D.30915 = (long unsigned int) D.30912;
  D.30916 = D.30915 * 8;
  D.30917 = D.30916 + 18446744073709551608;
  D.30918 = D.30914 + D.30917;
  D.30919 = *D.30918;
  if (D.30919 == parent) goto <D.30920>; else goto <D.30909>;
  <D.30920>:
  iftmp.348 = 1;
  goto <D.30910>;
  <D.30909>:
  iftmp.348 = 0;
  <D.30910>:
  D.30907 = iftmp.348;
  return D.30907;
}


mono_custom_attrs_get_attr (struct MonoCustomAttrInfo * ainfo, struct MonoClass * attr_klass)
{
  struct MonoMethod * D.30922;
  int D.30923;
  int D.30926;
  struct MonoObject * D.30929;
  long unsigned int D.30932;
  char * D.30933;
  int i;
  int attr_index;
  struct MonoClass * klass;
  struct MonoArray * attrs;

  attr_index = -1;
  i = 0;
  goto <D.21679>;
  <D.21678>:
  D.30922 = ainfo->attrs[i].ctor;
  klass = D.30922->klass;
  D.30923 = mono_class_has_parent (klass, attr_klass);
  if (D.30923 != 0) goto <D.30924>; else goto <D.30925>;
  <D.30924>:
  attr_index = i;
  goto <D.21677>;
  <D.30925>:
  i = i + 1;
  <D.21679>:
  D.30926 = ainfo->num_attrs;
  if (D.30926 > i) goto <D.21678>; else goto <D.21677>;
  <D.21677>:
  if (attr_index == -1) goto <D.30927>; else goto <D.30928>;
  <D.30927>:
  D.30929 = 0B;
  return D.30929;
  <D.30928>:
  attrs = mono_custom_attrs_construct (ainfo);
  if (attrs != 0B) goto <D.30930>; else goto <D.30931>;
  <D.30930>:
  D.30932 = (long unsigned int) attr_index;
  D.30933 = mono_array_addr_with_size (attrs, 8, D.30932);
  D.30929 = MEM[(struct MonoObject * *)D.30933];
  return D.30929;
  <D.30931>:
  D.30929 = 0B;
  return D.30929;
}


mono_reflection_get_custom_attrs_info (struct MonoObject * obj)
{
  struct MonoVTable * D.30935;
  struct MonoClass * D.30936;
  const char * D.30943;
  int D.30944;
  int D.30946;
  struct MonoAssembly * D.30947;
  int D.30951;
  int D.30953;
  struct MonoImage * D.30954;
  int D.30955;
  struct MonoProperty * D.30958;
  struct MonoClass * D.30959;
  int D.30961;
  struct MonoEvent * D.30964;
  struct MonoClass * D.30965;
  int D.30967;
  struct MonoClassField * D.30970;
  struct MonoClass * D.30971;
  int D.30976;
  int D.30978;
  struct MonoMethod * D.30979;
  int D.30983;
  int D.30985;
  struct MonoMethod * D.30986;
  int D.30990;
  int D.30992;
  struct MonoObject * D.30993;
  struct MonoVTable * D.30994;
  int D.30995;
  struct MonoMethod * D.30998;
  int D.30999;
  int D.31000;
  unsigned int D.31001;
  int D.31003;
  struct MonoProperty * D.31006;
  _Bool D.31009;
  long int D.31010;
  long int D.31011;
  int D.31015;
  int D.31019;
  struct MonoObject * D.31022;
  struct MonoVTable * D.31023;
  struct MonoClass * D.31024;
  int D.31025;
  int D.31029;
  char * D.31033;
  int D.31035;
  struct MonoAssembly * D.31038;
  struct MonoImage * D.31039;
  struct MonoArray * D.31040;
  int D.31042;
  struct MonoReflectionModuleBuilder * D.31045;
  struct MonoDynamicImage * D.31046;
  struct MonoImage * D.31047;
  struct MonoArray * D.31048;
  int D.31050;
  struct MonoDynamicImage * D.31053;
  struct MonoImage * D.31054;
  struct MonoArray * D.31055;
  int D.31057;
  struct MonoMethod * D.31060;
  struct MonoClass * D.31061;
  struct MonoImage * D.31062;
  struct MonoArray * D.31063;
  int D.31065;
  struct MonoMethod * D.31068;
  struct MonoClass * D.31069;
  struct MonoImage * D.31070;
  struct MonoArray * D.31071;
  int D.31073;
  struct MonoReflectionType * D.31076;
  struct MonoReflectionModuleBuilder * D.31077;
  struct MonoDynamicImage * D.31078;
  struct MonoImage * D.31079;
  struct MonoArray * D.31080;
  int D.31082;
  struct MonoReflectionType * D.31085;
  struct MonoCustomAttrInfo * D.31087;
  struct MonoClass * klass;
  struct MonoCustomAttrInfo * cinfo;

  cinfo = 0B;
  D.30935 = obj->vtable;
  klass = D.30935->klass;
  D.30936 = mono_defaults.monotype_class;
  if (D.30936 == klass) goto <D.30937>; else goto <D.30938>;
  <D.30937>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    klass = mono_class_from_mono_type (type);
    cinfo = mono_custom_attrs_from_class (klass);
  }
  goto <D.30939>;
  <D.30938>:
  D.30943 = klass->name;
  D.30944 = strcmp ("Assembly", D.30943);
  if (D.30944 == 0) goto <D.30940>; else goto <D.30945>;
  <D.30945>:
  D.30943 = klass->name;
  D.30946 = strcmp ("MonoAssembly", D.30943);
  if (D.30946 == 0) goto <D.30940>; else goto <D.30941>;
  <D.30940>:
  {
    struct MonoReflectionAssembly * rassembly;

    rassembly = obj;
    D.30947 = rassembly->assembly;
    cinfo = mono_custom_attrs_from_assembly (D.30947);
  }
  goto <D.30942>;
  <D.30941>:
  D.30943 = klass->name;
  D.30951 = strcmp ("Module", D.30943);
  if (D.30951 == 0) goto <D.30948>; else goto <D.30952>;
  <D.30952>:
  D.30943 = klass->name;
  D.30953 = strcmp ("MonoModule", D.30943);
  if (D.30953 == 0) goto <D.30948>; else goto <D.30949>;
  <D.30948>:
  {
    struct MonoReflectionModule * module;

    module = obj;
    D.30954 = module->image;
    cinfo = mono_custom_attrs_from_module (D.30954);
  }
  goto <D.30950>;
  <D.30949>:
  D.30943 = klass->name;
  D.30955 = strcmp ("MonoProperty", D.30943);
  if (D.30955 == 0) goto <D.30956>; else goto <D.30957>;
  <D.30956>:
  {
    struct MonoReflectionProperty * rprop;

    rprop = obj;
    D.30958 = rprop->property;
    D.30959 = D.30958->parent;
    D.30958 = rprop->property;
    cinfo = mono_custom_attrs_from_property (D.30959, D.30958);
  }
  goto <D.30960>;
  <D.30957>:
  D.30943 = klass->name;
  D.30961 = strcmp ("MonoEvent", D.30943);
  if (D.30961 == 0) goto <D.30962>; else goto <D.30963>;
  <D.30962>:
  {
    struct MonoReflectionMonoEvent * revent;

    revent = obj;
    D.30964 = revent->event;
    D.30965 = D.30964->parent;
    D.30964 = revent->event;
    cinfo = mono_custom_attrs_from_event (D.30965, D.30964);
  }
  goto <D.30966>;
  <D.30963>:
  D.30943 = klass->name;
  D.30967 = strcmp ("MonoField", D.30943);
  if (D.30967 == 0) goto <D.30968>; else goto <D.30969>;
  <D.30968>:
  {
    struct MonoReflectionField * rfield;

    rfield = obj;
    D.30970 = rfield->field;
    D.30971 = D.30970->parent;
    D.30970 = rfield->field;
    cinfo = mono_custom_attrs_from_field (D.30971, D.30970);
  }
  goto <D.30972>;
  <D.30969>:
  D.30943 = klass->name;
  D.30976 = strcmp ("MonoMethod", D.30943);
  if (D.30976 == 0) goto <D.30973>; else goto <D.30977>;
  <D.30977>:
  D.30943 = klass->name;
  D.30978 = strcmp ("MonoCMethod", D.30943);
  if (D.30978 == 0) goto <D.30973>; else goto <D.30974>;
  <D.30973>:
  {
    struct MonoReflectionMethod * rmethod;

    rmethod = obj;
    D.30979 = rmethod->method;
    cinfo = mono_custom_attrs_from_method (D.30979);
  }
  goto <D.30975>;
  <D.30974>:
  D.30943 = klass->name;
  D.30983 = strcmp ("MonoGenericMethod", D.30943);
  if (D.30983 == 0) goto <D.30980>; else goto <D.30984>;
  <D.30984>:
  D.30943 = klass->name;
  D.30985 = strcmp ("MonoGenericCMethod", D.30943);
  if (D.30985 == 0) goto <D.30980>; else goto <D.30981>;
  <D.30980>:
  {
    struct MonoReflectionMethod * rmethod;

    rmethod = obj;
    D.30986 = rmethod->method;
    cinfo = mono_custom_attrs_from_method (D.30986);
  }
  goto <D.30982>;
  <D.30981>:
  D.30943 = klass->name;
  D.30990 = strcmp ("ParameterInfo", D.30943);
  if (D.30990 == 0) goto <D.30987>; else goto <D.30991>;
  <D.30991>:
  D.30943 = klass->name;
  D.30992 = strcmp ("MonoParameterInfo", D.30943);
  if (D.30992 == 0) goto <D.30987>; else goto <D.30988>;
  <D.30987>:
  {
    struct MonoReflectionParameter * param;
    struct MonoClass * member_class;

    param = obj;
    D.30993 = param->MemberImpl;
    D.30994 = D.30993->vtable;
    member_class = D.30994->klass;
    D.30995 = mono_class_is_reflection_method_or_constructor (member_class);
    if (D.30995 != 0) goto <D.30996>; else goto <D.30997>;
    <D.30996>:
    {
      struct MonoReflectionMethod * rmethod;

      rmethod = param->MemberImpl;
      D.30998 = rmethod->method;
      D.30999 = param->PositionImpl;
      D.31000 = D.30999 + 1;
      D.31001 = (unsigned int) D.31000;
      cinfo = mono_custom_attrs_from_param (D.30998, D.31001);
    }
    goto <D.31002>;
    <D.30997>:
    D.31003 = is_sr_mono_property (member_class);
    if (D.31003 != 0) goto <D.31004>; else goto <D.31005>;
    <D.31004>:
    {
      struct MonoReflectionProperty * prop;
      struct MonoMethod * method;

      prop = param->MemberImpl;
      D.31006 = prop->property;
      method = D.31006->get;
      if (method == 0B) goto <D.31007>; else goto <D.31008>;
      <D.31007>:
      D.31006 = prop->property;
      method = D.31006->set;
      <D.31008>:
      D.31009 = method == 0B;
      D.31010 = (long int) D.31009;
      D.31011 = __builtin_expect (D.31010, 0);
      if (D.31011 != 0) goto <D.31012>; else goto <D.31013>;
      <D.31012>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 8889, "method");
      <D.31013>:
      D.30999 = param->PositionImpl;
      D.31000 = D.30999 + 1;
      D.31001 = (unsigned int) D.31000;
      cinfo = mono_custom_attrs_from_param (method, D.31001);
    }
    goto <D.31014>;
    <D.31005>:
    D.31015 = is_sre_method_on_tb_inst (member_class);
    if (D.31015 != 0) goto <D.31016>; else goto <D.31017>;
    <D.31016>:
    {
      struct MonoMethod * method;

      D.30993 = param->MemberImpl;
      method = mono_reflection_method_on_tb_inst_get_handle (D.30993);
      D.30999 = param->PositionImpl;
      D.31000 = D.30999 + 1;
      D.31001 = (unsigned int) D.31000;
      cinfo = mono_custom_attrs_from_param (method, D.31001);
    }
    goto <D.31018>;
    <D.31017>:
    D.31019 = is_sre_ctor_on_tb_inst (member_class);
    if (D.31019 != 0) goto <D.31020>; else goto <D.31021>;
    <D.31020>:
    {
      struct MonoReflectionCtorOnTypeBuilderInst * c;
      struct MonoMethod * method;

      c = param->MemberImpl;
      method = 0B;
      D.31022 = c->cb;
      D.31023 = D.31022->vtable;
      D.31024 = D.31023->klass;
      D.31025 = is_sre_ctor_builder (D.31024);
      if (D.31025 != 0) goto <D.31026>; else goto <D.31027>;
      <D.31026>:
      D.31022 = c->cb;
      method = MEM[(struct MonoReflectionCtorBuilder *)D.31022].mhandle;
      goto <D.31028>;
      <D.31027>:
      D.31022 = c->cb;
      D.31023 = D.31022->vtable;
      D.31024 = D.31023->klass;
      D.31029 = is_sr_mono_cmethod (D.31024);
      if (D.31029 != 0) goto <D.31030>; else goto <D.31031>;
      <D.31030>:
      D.31022 = c->cb;
      method = MEM[(struct MonoReflectionMethod *)D.31022].method;
      goto <D.31032>;
      <D.31031>:
      D.31033 = mono_type_get_full_name (member_class);
      monoeg_g_log (0B, 4, "mono_reflection_get_custom_attrs_info:: can\'t handle a CTBI with base_method of type %s", D.31033);
      <D.21701>:
      goto <D.21701>;
      <D.31032>:
      <D.31028>:
      D.30999 = param->PositionImpl;
      D.31000 = D.30999 + 1;
      D.31001 = (unsigned int) D.31000;
      cinfo = mono_custom_attrs_from_param (method, D.31001);
    }
    goto <D.31034>;
    <D.31021>:
    {
      char * type_name;
      char * msg;
      struct MonoException * ex;

      type_name = mono_type_get_full_name (member_class);
      msg = monoeg_g_strdup_printf ("Custom attributes on a ParamInfo with member %s are not supported", type_name);
      ex = mono_get_exception_not_supported (msg);
      monoeg_g_free (type_name);
      monoeg_g_free (msg);
      mono_raise_exception (ex);
    }
    <D.31034>:
    <D.31018>:
    <D.31014>:
    <D.31002>:
  }
  goto <D.30989>;
  <D.30988>:
  D.30943 = klass->name;
  D.31035 = strcmp ("AssemblyBuilder", D.30943);
  if (D.31035 == 0) goto <D.31036>; else goto <D.31037>;
  <D.31036>:
  {
    struct MonoReflectionAssemblyBuilder * assemblyb;

    assemblyb = obj;
    D.31038 = assemblyb->assembly.assembly;
    D.31039 = D.31038->image;
    D.31040 = assemblyb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31039, D.31040);
  }
  goto <D.31041>;
  <D.31037>:
  D.30943 = klass->name;
  D.31042 = strcmp ("TypeBuilder", D.30943);
  if (D.31042 == 0) goto <D.31043>; else goto <D.31044>;
  <D.31043>:
  {
    struct MonoReflectionTypeBuilder * tb;

    tb = obj;
    D.31045 = tb->module;
    D.31046 = D.31045->dynamic_image;
    D.31047 = &D.31046->image;
    D.31048 = tb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31047, D.31048);
  }
  goto <D.31049>;
  <D.31044>:
  D.30943 = klass->name;
  D.31050 = strcmp ("ModuleBuilder", D.30943);
  if (D.31050 == 0) goto <D.31051>; else goto <D.31052>;
  <D.31051>:
  {
    struct MonoReflectionModuleBuilder * mb;

    mb = obj;
    D.31053 = mb->dynamic_image;
    D.31054 = &D.31053->image;
    D.31055 = mb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31054, D.31055);
  }
  goto <D.31056>;
  <D.31052>:
  D.30943 = klass->name;
  D.31057 = strcmp ("ConstructorBuilder", D.30943);
  if (D.31057 == 0) goto <D.31058>; else goto <D.31059>;
  <D.31058>:
  {
    struct MonoReflectionCtorBuilder * cb;

    cb = obj;
    D.31060 = cb->mhandle;
    D.31061 = D.31060->klass;
    D.31062 = D.31061->image;
    D.31063 = cb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31062, D.31063);
  }
  goto <D.31064>;
  <D.31059>:
  D.30943 = klass->name;
  D.31065 = strcmp ("MethodBuilder", D.30943);
  if (D.31065 == 0) goto <D.31066>; else goto <D.31067>;
  <D.31066>:
  {
    struct MonoReflectionMethodBuilder * mb;

    mb = obj;
    D.31068 = mb->mhandle;
    D.31069 = D.31068->klass;
    D.31070 = D.31069->image;
    D.31071 = mb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31070, D.31071);
  }
  goto <D.31072>;
  <D.31067>:
  D.30943 = klass->name;
  D.31073 = strcmp ("FieldBuilder", D.30943);
  if (D.31073 == 0) goto <D.31074>; else goto <D.31075>;
  <D.31074>:
  {
    struct MonoReflectionFieldBuilder * fb;

    fb = obj;
    D.31076 = fb->typeb;
    D.31077 = MEM[(struct MonoReflectionTypeBuilder *)D.31076].module;
    D.31078 = D.31077->dynamic_image;
    D.31079 = &D.31078->image;
    D.31080 = fb->cattrs;
    cinfo = mono_custom_attrs_from_builders (0B, D.31079, D.31080);
  }
  goto <D.31081>;
  <D.31075>:
  D.30943 = klass->name;
  D.31082 = strcmp ("MonoGenericClass", D.30943);
  if (D.31082 == 0) goto <D.31083>; else goto <D.31084>;
  <D.31083>:
  {
    struct MonoReflectionGenericClass * gclass;

    gclass = obj;
    D.31085 = gclass->generic_type;
    cinfo = mono_reflection_get_custom_attrs_info (D.31085);
  }
  goto <D.31086>;
  <D.31084>:
  D.30943 = klass->name;
  monoeg_g_log (0B, 4, "get custom attrs not yet supported for %s", D.30943);
  <D.21712>:
  goto <D.21712>;
  <D.31086>:
  <D.31081>:
  <D.31072>:
  <D.31064>:
  <D.31056>:
  <D.31049>:
  <D.31041>:
  <D.30989>:
  <D.30982>:
  <D.30975>:
  <D.30972>:
  <D.30966>:
  <D.30960>:
  <D.30950>:
  <D.30942>:
  <D.30939>:
  D.31087 = cinfo;
  return D.31087;
}


mono_custom_attrs_from_module (struct MonoImage * image)
{
  long unsigned int D.31089;
  long unsigned int D.31090;
  struct MonoCustomAttrInfo * D.31093;
  guint32 idx;

  D.31089 = BIT_FIELD_REF <*image, 64, 192>;
  D.31090 = D.31089 & 268435456;
  if (D.31090 != 0) goto <D.31091>; else goto <D.31092>;
  <D.31091>:
  D.31093 = lookup_custom_attr (image, image);
  return D.31093;
  <D.31092>:
  idx = 1;
  idx = idx << 5;
  idx = idx | 7;
  D.31093 = mono_custom_attrs_from_index (image, idx);
  return D.31093;
}


is_sr_mono_property (struct MonoClass * class)
{
  struct MonoClass * cached_class.349;
  gboolean D.31098;
  _Bool D.31099;
  int D.31100;
  const char * D.31103;
  int D.31104;
  const char * D.31107;
  int D.31108;

  {
    static struct MonoClass * cached_class;

    cached_class.349 = cached_class;
    if (cached_class.349 != 0B) goto <D.31096>; else goto <D.31097>;
    <D.31096>:
    cached_class.349 = cached_class;
    D.31099 = cached_class.349 == class;
    D.31098 = (gboolean) D.31099;
    return D.31098;
    <D.31097>:
    D.31100 = is_corlib_type (class);
    if (D.31100 != 0) goto <D.31101>; else goto <D.31102>;
    <D.31101>:
    D.31103 = class->name;
    D.31104 = strcmp ("MonoProperty", D.31103);
    if (D.31104 == 0) goto <D.31105>; else goto <D.31106>;
    <D.31105>:
    D.31107 = class->name_space;
    D.31108 = strcmp ("System.Reflection", D.31107);
    if (D.31108 == 0) goto <D.31109>; else goto <D.31110>;
    <D.31109>:
    cached_class = class;
    D.31098 = 1;
    return D.31098;
    <D.31110>:
    <D.31106>:
    <D.31102>:
    D.31098 = 0;
    return D.31098;
  }
}


is_sre_method_on_tb_inst (struct MonoClass * class)
{
  struct MonoClass * cached_class.350;
  gboolean D.31115;
  _Bool D.31116;
  int D.31117;
  const char * D.31120;
  int D.31121;
  const char * D.31124;
  int D.31125;

  {
    static struct MonoClass * cached_class;

    cached_class.350 = cached_class;
    if (cached_class.350 != 0B) goto <D.31113>; else goto <D.31114>;
    <D.31113>:
    cached_class.350 = cached_class;
    D.31116 = cached_class.350 == class;
    D.31115 = (gboolean) D.31116;
    return D.31115;
    <D.31114>:
    D.31117 = is_corlib_type (class);
    if (D.31117 != 0) goto <D.31118>; else goto <D.31119>;
    <D.31118>:
    D.31120 = class->name;
    D.31121 = strcmp ("MethodOnTypeBuilderInst", D.31120);
    if (D.31121 == 0) goto <D.31122>; else goto <D.31123>;
    <D.31122>:
    D.31124 = class->name_space;
    D.31125 = strcmp ("System.Reflection.Emit", D.31124);
    if (D.31125 == 0) goto <D.31126>; else goto <D.31127>;
    <D.31126>:
    cached_class = class;
    D.31115 = 1;
    return D.31115;
    <D.31127>:
    <D.31123>:
    <D.31119>:
    D.31115 = 0;
    return D.31115;
  }
}


is_sre_ctor_on_tb_inst (struct MonoClass * class)
{
  struct MonoClass * cached_class.351;
  gboolean D.31132;
  _Bool D.31133;
  int D.31134;
  const char * D.31137;
  int D.31138;
  const char * D.31141;
  int D.31142;

  {
    static struct MonoClass * cached_class;

    cached_class.351 = cached_class;
    if (cached_class.351 != 0B) goto <D.31130>; else goto <D.31131>;
    <D.31130>:
    cached_class.351 = cached_class;
    D.31133 = cached_class.351 == class;
    D.31132 = (gboolean) D.31133;
    return D.31132;
    <D.31131>:
    D.31134 = is_corlib_type (class);
    if (D.31134 != 0) goto <D.31135>; else goto <D.31136>;
    <D.31135>:
    D.31137 = class->name;
    D.31138 = strcmp ("ConstructorOnTypeBuilderInst", D.31137);
    if (D.31138 == 0) goto <D.31139>; else goto <D.31140>;
    <D.31139>:
    D.31141 = class->name_space;
    D.31142 = strcmp ("System.Reflection.Emit", D.31141);
    if (D.31142 == 0) goto <D.31143>; else goto <D.31144>;
    <D.31143>:
    cached_class = class;
    D.31132 = 1;
    return D.31132;
    <D.31144>:
    <D.31140>:
    <D.31136>:
    D.31132 = 0;
    return D.31132;
  }
}


mono_reflection_get_custom_attrs_by_type (struct MonoObject * obj, struct MonoClass * attr_klass, struct MonoError * error)
{
  int D.31148;
  struct MonoLoaderError * D.31152;
  struct MonoArray * D.31155;
  struct MonoDomain * D.31156;
  struct MonoClass * D.21721;
  struct MonoClass * tmp_klass.352;
  struct MonoClass * D.31160;
  struct MonoClass * tmp_klass.353;
  _Bool D.31162;
  long int D.31163;
  long int D.31164;
  struct MonoVTable * D.31167;
  struct MonoArray * result;
  struct MonoCustomAttrInfo * cinfo;

  mono_error_init (error);
  cinfo = mono_reflection_get_custom_attrs_info (obj);
  if (cinfo != 0B) goto <D.31146>; else goto <D.31147>;
  <D.31146>:
  result = mono_custom_attrs_construct_by_type (cinfo, attr_klass, error);
  D.31148 = cinfo->cached;
  if (D.31148 == 0) goto <D.31149>; else goto <D.31150>;
  <D.31149>:
  mono_custom_attrs_free (cinfo);
  <D.31150>:
  goto <D.31151>;
  <D.31147>:
  D.31152 = mono_loader_get_last_error ();
  if (D.31152 != 0B) goto <D.31153>; else goto <D.31154>;
  <D.31153>:
  D.31155 = 0B;
  return D.31155;
  <D.31154>:
  D.31156 = mono_domain_get ();
  {
    static struct MonoClass * tmp_klass;

    {
      tmp_klass.352 = tmp_klass;
      if (tmp_klass.352 == 0B) goto <D.31158>; else goto <D.31159>;
      <D.31158>:
      D.31160 = mono_defaults.attribute_class;
      tmp_klass.353 = mono_array_class_get (D.31160, 1);
      tmp_klass = tmp_klass.353;
      tmp_klass.352 = tmp_klass;
      D.31162 = tmp_klass.352 == 0B;
      D.31163 = (long int) D.31162;
      D.31164 = __builtin_expect (D.31163, 0);
      if (D.31164 != 0) goto <D.31165>; else goto <D.31166>;
      <D.31165>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 8971, "tmp_klass");
      <D.31166>:
      <D.31159>:
    }
    D.21721 = tmp_klass;
  }
  D.31167 = mono_class_vtable (D.31156, D.21721);
  result = mono_array_new_specific (D.31167, 0);
  <D.31151>:
  D.31155 = result;
  return D.31155;
}


mono_reflection_get_custom_attrs (struct MonoObject * obj)
{
  struct MonoArray * D.31169;
  struct MonoError error;

  try
    {
      D.31169 = mono_reflection_get_custom_attrs_by_type (obj, 0B, &error);
      return D.31169;
    }
  finally
    {
      error = {CLOBBER};
    }
}


mono_reflection_get_custom_attrs_data (struct MonoObject * obj)
{
  int D.31174;
  struct MonoDomain * D.31178;
  struct MonoClass * D.31179;
  struct MonoArray * D.31180;
  struct MonoArray * result;
  struct MonoCustomAttrInfo * cinfo;

  cinfo = mono_reflection_get_custom_attrs_info (obj);
  if (cinfo != 0B) goto <D.31172>; else goto <D.31173>;
  <D.31172>:
  result = mono_custom_attrs_data_construct (cinfo);
  D.31174 = cinfo->cached;
  if (D.31174 == 0) goto <D.31175>; else goto <D.31176>;
  <D.31175>:
  mono_custom_attrs_free (cinfo);
  <D.31176>:
  goto <D.31177>;
  <D.31173>:
  D.31178 = mono_domain_get ();
  D.31179 = mono_defaults.customattribute_data_class;
  result = mono_array_new (D.31178, D.31179, 0);
  <D.31177>:
  D.31180 = result;
  return D.31180;
}


mono_custom_attrs_data_construct (struct MonoCustomAttrInfo * cinfo)
{
  struct MonoDomain * D.31182;
  struct MonoClass * D.31183;
  int D.31184;
  long unsigned int D.31185;
  struct MonoImage * D.31186;
  struct MonoCustomAttrEntry * D.31187;
  long unsigned int D.31188;
  struct MonoArray * D.31189;
  struct MonoArray * result;
  struct MonoObject * attr;
  int i;

  D.31182 = mono_domain_get ();
  D.31183 = mono_defaults.customattribute_data_class;
  D.31184 = cinfo->num_attrs;
  D.31185 = (long unsigned int) D.31184;
  result = mono_array_new (D.31182, D.31183, D.31185);
  i = 0;
  goto <D.21583>;
  <D.21582>:
  D.31186 = cinfo->image;
  D.31187 = &cinfo->attrs[i];
  attr = create_custom_attr_data (D.31186, D.31187);
  {
    void * * __p;

    D.31188 = (long unsigned int) i;
    __p = mono_array_addr_with_size (result, 8, D.31188);
    mono_gc_wbarrier_set_arrayref (result, __p, attr);
  }
  i = i + 1;
  <D.21583>:
  D.31184 = cinfo->num_attrs;
  if (D.31184 > i) goto <D.21582>; else goto <D.21584>;
  <D.21584>:
  D.31189 = result;
  return D.31189;
}


create_custom_attr_data (struct MonoImage * image, struct MonoCustomAttrEntry * cattr)
{
  struct MonoAssembly * D.31191;
  _Bool D.31192;
  long int D.31193;
  long int D.31194;
  struct MonoMethod * ctor.354;
  struct MonoClass * D.31200;
  struct MonoMethod * ctor.355;
  struct MonoMethod * D.31202;
  struct MonoReflectionMethod * D.31203;
  struct MonoReflectionAssembly * D.31204;
  const mono_byte * * D.31205;
  uint32_t * D.31206;
  struct MonoObject * D.31207;
  static struct MonoMethod * ctor;
  struct MonoDomain * domain;
  struct MonoObject * attr;
  void * params[4];

  try
    {
      D.31191 = image->assembly;
      D.31192 = D.31191 == 0B;
      D.31193 = (long int) D.31192;
      D.31194 = __builtin_expect (D.31193, 0);
      if (D.31194 != 0) goto <D.31195>; else goto <D.31196>;
      <D.31195>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 8461, "image->assembly");
      <D.31196>:
      ctor.354 = ctor;
      if (ctor.354 == 0B) goto <D.31198>; else goto <D.31199>;
      <D.31198>:
      D.31200 = mono_defaults.customattribute_data_class;
      ctor.355 = mono_class_get_method_from_name (D.31200, ".ctor", 4);
      ctor = ctor.355;
      <D.31199>:
      domain = mono_domain_get ();
      D.31200 = mono_defaults.customattribute_data_class;
      attr = mono_object_new (domain, D.31200);
      D.31202 = cattr->ctor;
      D.31203 = mono_method_get_object (domain, D.31202, 0B);
      params[0] = D.31203;
      D.31191 = image->assembly;
      D.31204 = mono_assembly_get_object (domain, D.31191);
      params[1] = D.31204;
      D.31205 = &cattr->data;
      params[2] = D.31205;
      D.31206 = &cattr->data_size;
      params[3] = D.31206;
      ctor.354 = ctor;
      mono_runtime_invoke (ctor.354, attr, &params, 0B);
      D.31207 = attr;
      return D.31207;
    }
  finally
    {
      params = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_type_get_handle (struct MonoReflectionType * ref)
{
  struct MonoType * D.31212;
  struct MonoType * D.31213;
  int D.31216;
  int D.31222;
  struct MonoVTable * D.31225;
  int D.31226;
  struct MonoReflectionType * D.31229;
  _Bool D.31230;
  long int D.31231;
  long int D.31232;
  int D.31235;
  struct MonoClass * D.31238;
  struct MonoClass * D.31239;
  struct MonoClass * D.31241;
  unsigned int D.31242;
  struct MonoClass * D.31243;
  int D.31244;
  struct MonoReflectionType * D.31247;
  _Bool D.31248;
  long int D.31249;
  long int D.31250;
  struct MonoClass * D.31253;
  int D.31254;
  struct MonoReflectionType * D.31257;
  _Bool D.31258;
  long int D.31259;
  long int D.31260;
  struct MonoClass * D.31263;
  int D.31264;
  struct MonoArray * D.31267;
  long unsigned int D.31268;
  long unsigned int D.31269;
  long unsigned int D.31270;
  long unsigned int D.31271;
  char * D.31272;
  long unsigned int D.31273;
  long unsigned int D.31274;
  struct MonoType * * D.31275;
  struct MonoType * D.31276;
  struct MonoType * D.31277;
  struct MonoReflectionType * D.31280;
  _Bool D.31281;
  long int D.31282;
  long int D.31283;
  struct MonoClass * D.31286;
  struct MonoType * D.31287;
  char * D.31288;
  struct MonoClass * class;

  if (ref == 0B) goto <D.31210>; else goto <D.31211>;
  <D.31210>:
  D.31212 = 0B;
  return D.31212;
  <D.31211>:
  D.31213 = ref->type;
  if (D.31213 != 0B) goto <D.31214>; else goto <D.31215>;
  <D.31214>:
  D.31212 = ref->type;
  return D.31212;
  <D.31215>:
  D.31216 = is_usertype (ref);
  if (D.31216 != 0) goto <D.31217>; else goto <D.31218>;
  <D.31217>:
  ref = mono_reflection_type_get_underlying_system_type (ref);
  if (ref == 0B) goto <D.31219>; else goto <D.31221>;
  <D.31221>:
  D.31222 = is_usertype (ref);
  if (D.31222 != 0) goto <D.31219>; else goto <D.31220>;
  <D.31219>:
  D.31212 = 0B;
  return D.31212;
  <D.31220>:
  D.31213 = ref->type;
  if (D.31213 != 0B) goto <D.31223>; else goto <D.31224>;
  <D.31223>:
  D.31212 = ref->type;
  return D.31212;
  <D.31224>:
  <D.31218>:
  D.31225 = MEM[(struct MonoObject *)ref].vtable;
  class = D.31225->klass;
  D.31226 = is_sre_array (class);
  if (D.31226 != 0) goto <D.31227>; else goto <D.31228>;
  <D.31227>:
  {
    struct MonoType * res;
    struct MonoReflectionArrayType * sre_array;
    struct MonoType * base;

    sre_array = ref;
    D.31229 = sre_array->element_type;
    base = mono_reflection_type_get_handle (D.31229);
    D.31230 = base == 0B;
    D.31231 = (long int) D.31230;
    D.31232 = __builtin_expect (D.31231, 0);
    if (D.31232 != 0) goto <D.31233>; else goto <D.31234>;
    <D.31233>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9133, "base");
    <D.31234>:
    D.31235 = sre_array->rank;
    if (D.31235 == 0) goto <D.31236>; else goto <D.31237>;
    <D.31236>:
    D.31238 = mono_class_from_mono_type (base);
    D.31239 = mono_array_class_get (D.31238, 1);
    res = &D.31239->byval_arg;
    goto <D.31240>;
    <D.31237>:
    D.31241 = mono_class_from_mono_type (base);
    D.31235 = sre_array->rank;
    D.31242 = (unsigned int) D.31235;
    D.31243 = mono_bounded_array_class_get (D.31241, D.31242, 1);
    res = &D.31243->byval_arg;
    <D.31240>:
    sre_array->type.type = res;
    D.31212 = res;
    return D.31212;
  }
  <D.31228>:
  D.31244 = is_sre_byref (class);
  if (D.31244 != 0) goto <D.31245>; else goto <D.31246>;
  <D.31245>:
  {
    struct MonoType * res;
    struct MonoReflectionDerivedType * sre_byref;
    struct MonoType * base;

    sre_byref = ref;
    D.31247 = sre_byref->element_type;
    base = mono_reflection_type_get_handle (D.31247);
    D.31248 = base == 0B;
    D.31249 = (long int) D.31248;
    D.31250 = __builtin_expect (D.31249, 0);
    if (D.31250 != 0) goto <D.31251>; else goto <D.31252>;
    <D.31251>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9144, "base");
    <D.31252>:
    D.31253 = mono_class_from_mono_type (base);
    res = &D.31253->this_arg;
    sre_byref->type.type = res;
    D.31212 = res;
    return D.31212;
  }
  <D.31246>:
  D.31254 = is_sre_pointer (class);
  if (D.31254 != 0) goto <D.31255>; else goto <D.31256>;
  <D.31255>:
  {
    struct MonoType * res;
    struct MonoReflectionDerivedType * sre_pointer;
    struct MonoType * base;

    sre_pointer = ref;
    D.31257 = sre_pointer->element_type;
    base = mono_reflection_type_get_handle (D.31257);
    D.31258 = base == 0B;
    D.31259 = (long int) D.31258;
    D.31260 = __builtin_expect (D.31259, 0);
    if (D.31260 != 0) goto <D.31261>; else goto <D.31262>;
    <D.31261>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9152, "base");
    <D.31262>:
    D.31263 = mono_ptr_class_get (base);
    res = &D.31263->byval_arg;
    sre_pointer->type.type = res;
    D.31212 = res;
    return D.31212;
  }
  <D.31256>:
  D.31264 = is_sre_generic_instance (class);
  if (D.31264 != 0) goto <D.31265>; else goto <D.31266>;
  <D.31265>:
  {
    struct MonoType * res;
    struct MonoType * * types;
    struct MonoReflectionGenericClass * gclass;
    int i;
    int count;

    gclass = ref;
    D.31267 = gclass->type_arguments;
    D.31268 = mono_array_length (D.31267);
    count = (int) D.31268;
    D.31269 = (long unsigned int) count;
    D.31270 = D.31269 * 8;
    types = monoeg_malloc0 (D.31270);
    i = 0;
    goto <D.21799>;
    <D.21798>:
    {
      struct MonoReflectionType * t;

      D.31267 = gclass->type_arguments;
      D.31271 = (long unsigned int) i;
      D.31272 = mono_array_addr_with_size (D.31267, 8, D.31271);
      t = MEM[(void * *)D.31272];
      D.31273 = (long unsigned int) i;
      D.31274 = D.31273 * 8;
      D.31275 = types + D.31274;
      D.31276 = mono_reflection_type_get_handle (t);
      *D.31275 = D.31276;
      D.31273 = (long unsigned int) i;
      D.31274 = D.31273 * 8;
      D.31275 = types + D.31274;
      D.31277 = *D.31275;
      if (D.31277 == 0B) goto <D.31278>; else goto <D.31279>;
      <D.31278>:
      monoeg_g_free (types);
      D.31212 = 0B;
      return D.31212;
      <D.31279>:
    }
    i = i + 1;
    <D.21799>:
    if (i < count) goto <D.21798>; else goto <D.21800>;
    <D.21800>:
    D.31280 = gclass->generic_type;
    res = mono_reflection_bind_generic_parameters (D.31280, count, types);
    monoeg_g_free (types);
    D.31281 = res == 0B;
    D.31282 = (long int) D.31281;
    D.31283 = __builtin_expect (D.31282, 0);
    if (D.31283 != 0) goto <D.31284>; else goto <D.31285>;
    <D.31284>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9174, "res");
    <D.31285>:
    gclass->type.type = res;
    D.31212 = res;
    return D.31212;
  }
  <D.31266>:
  D.31225 = MEM[(struct MonoObject *)ref].vtable;
  D.31286 = D.31225->klass;
  D.31287 = &D.31286->byval_arg;
  D.31288 = mono_type_full_name (D.31287);
  monoeg_g_log (0B, 4, "Cannot handle corlib user type %s", D.31288);
  <D.21801>:
  goto <D.21801>;
  D.31212 = 0B;
  return D.31212;
}


__attribute__((visibility ("hidden")))
mono_reflection_create_unmanaged_type (struct MonoReflectionType * type)
{
  mono_reflection_type_get_handle (type);
}


__attribute__((visibility ("hidden")))
mono_reflection_register_with_runtime (struct MonoReflectionType * type)
{
  struct MonoVTable * D.31290;
  struct MonoException * D.31293;
  union mono_mutex_t * D.31294;
  _Bool D.31297;
  long int D.31298;
  long int D.31299;
  struct MonoImage * D.31302;
  long unsigned int D.31303;
  long unsigned int D.31304;
  struct MonoGHashTable * D.31308;
  struct MonoGHashTable * D.31311;
  _Bool D.31314;
  long int D.31315;
  long int D.31316;
  struct MonoType * res;
  struct MonoDomain * domain;
  struct MonoClass * class;

  res = mono_reflection_type_get_handle (type);
  D.31290 = MEM[(struct MonoObject *)type].vtable;
  domain = D.31290->domain;
  if (res == 0B) goto <D.31291>; else goto <D.31292>;
  <D.31291>:
  D.31293 = mono_get_exception_argument (0B, "Invalid generic instantiation, one or more arguments are not proper user types");
  mono_raise_exception (D.31293);
  <D.31292>:
  class = mono_class_from_mono_type (res);
  mono_loader_lock ();
  {
    int ret;

    D.31294 = &domain->lock.mutex;
    ret = pthread_mutex_lock (D.31294);
    if (ret != 0) goto <D.31295>; else goto <D.31296>;
    <D.31295>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
    <D.31296>:
    D.31297 = ret != 0;
    D.31298 = (long int) D.31297;
    D.31299 = __builtin_expect (D.31298, 0);
    if (D.31299 != 0) goto <D.31300>; else goto <D.31301>;
    <D.31300>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9204, "ret == 0");
    <D.31301>:
  }
  D.31302 = class->image;
  D.31303 = BIT_FIELD_REF <*D.31302, 64, 192>;
  D.31304 = D.31303 & 268435456;
  if (D.31304 == 0) goto <D.31305>; else goto <D.31306>;
  <D.31305>:
  mono_class_setup_supertypes (class);
  goto <D.31307>;
  <D.31306>:
  D.31308 = domain->type_hash;
  if (D.31308 == 0B) goto <D.31309>; else goto <D.31310>;
  <D.31309>:
  D.31311 = mono_g_hash_table_new_type (mono_metadata_type_hash, mono_metadata_type_equal, 2);
  domain->type_hash = D.31311;
  <D.31310>:
  D.31308 = domain->type_hash;
  mono_g_hash_table_insert (D.31308, res, type);
  <D.31307>:
  {
    int ret;

    D.31294 = &domain->lock.mutex;
    ret = pthread_mutex_unlock (D.31294);
    if (ret != 0) goto <D.31312>; else goto <D.31313>;
    <D.31312>:
    monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
    <D.31313>:
    D.31314 = ret != 0;
    D.31315 = (long int) D.31314;
    D.31316 = __builtin_expect (D.31315, 0);
    if (D.31316 != 0) goto <D.31317>; else goto <D.31318>;
    <D.31317>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9214, "ret == 0");
    <D.31318>:
  }
  mono_loader_unlock ();
}


__attribute__((visibility ("hidden")))
mono_class_is_reflection_method_or_constructor (struct MonoClass * class)
{
  gboolean D.31319;
  int iftmp.356;
  int D.31324;
  int D.31326;
  int D.31328;
  int D.31330;

  D.31324 = is_sr_mono_method (class);
  if (D.31324 != 0) goto <D.31321>; else goto <D.31325>;
  <D.31325>:
  D.31326 = is_sr_mono_cmethod (class);
  if (D.31326 != 0) goto <D.31321>; else goto <D.31327>;
  <D.31327>:
  D.31328 = is_sr_mono_generic_method (class);
  if (D.31328 != 0) goto <D.31321>; else goto <D.31329>;
  <D.31329>:
  D.31330 = is_sr_mono_generic_cmethod (class);
  if (D.31330 != 0) goto <D.31321>; else goto <D.31322>;
  <D.31321>:
  iftmp.356 = 1;
  goto <D.31323>;
  <D.31322>:
  iftmp.356 = 0;
  <D.31323>:
  D.31319 = iftmp.356;
  return D.31319;
}


is_sr_mono_generic_method (struct MonoClass * class)
{
  struct MonoClass * cached_class.357;
  gboolean D.31335;
  _Bool D.31336;
  int D.31337;
  const char * D.31340;
  int D.31341;
  const char * D.31344;
  int D.31345;

  {
    static struct MonoClass * cached_class;

    cached_class.357 = cached_class;
    if (cached_class.357 != 0B) goto <D.31333>; else goto <D.31334>;
    <D.31333>:
    cached_class.357 = cached_class;
    D.31336 = cached_class.357 == class;
    D.31335 = (gboolean) D.31336;
    return D.31335;
    <D.31334>:
    D.31337 = is_corlib_type (class);
    if (D.31337 != 0) goto <D.31338>; else goto <D.31339>;
    <D.31338>:
    D.31340 = class->name;
    D.31341 = strcmp ("MonoGenericMethod", D.31340);
    if (D.31341 == 0) goto <D.31342>; else goto <D.31343>;
    <D.31342>:
    D.31344 = class->name_space;
    D.31345 = strcmp ("System.Reflection", D.31344);
    if (D.31345 == 0) goto <D.31346>; else goto <D.31347>;
    <D.31346>:
    cached_class = class;
    D.31335 = 1;
    return D.31335;
    <D.31347>:
    <D.31343>:
    <D.31339>:
    D.31335 = 0;
    return D.31335;
  }
}


is_sr_mono_generic_cmethod (struct MonoClass * class)
{
  struct MonoClass * cached_class.358;
  gboolean D.31352;
  _Bool D.31353;
  int D.31354;
  const char * D.31357;
  int D.31358;
  const char * D.31361;
  int D.31362;

  {
    static struct MonoClass * cached_class;

    cached_class.358 = cached_class;
    if (cached_class.358 != 0B) goto <D.31350>; else goto <D.31351>;
    <D.31350>:
    cached_class.358 = cached_class;
    D.31353 = cached_class.358 == class;
    D.31352 = (gboolean) D.31353;
    return D.31352;
    <D.31351>:
    D.31354 = is_corlib_type (class);
    if (D.31354 != 0) goto <D.31355>; else goto <D.31356>;
    <D.31355>:
    D.31357 = class->name;
    D.31358 = strcmp ("MonoGenericCMethod", D.31357);
    if (D.31358 == 0) goto <D.31359>; else goto <D.31360>;
    <D.31359>:
    D.31361 = class->name_space;
    D.31362 = strcmp ("System.Reflection", D.31361);
    if (D.31362 == 0) goto <D.31363>; else goto <D.31364>;
    <D.31363>:
    cached_class = class;
    D.31352 = 1;
    return D.31352;
    <D.31364>:
    <D.31360>:
    <D.31356>:
    D.31352 = 0;
    return D.31352;
  }
}


mono_reflection_get_custom_attrs_blob (struct MonoReflectionAssembly * assembly, struct MonoObject * ctor, struct MonoArray * ctorArgs, struct MonoArray * properties, struct MonoArray * propValues, struct MonoArray * fields, struct MonoArray * fieldValues)
{
  struct MonoVTable * D.31366;
  struct MonoClass * D.31367;
  const char * D.31368;
  int D.31369;
  struct MonoMethod * D.31373;
  long unsigned int D.31374;
  short unsigned int D.31375;
  long unsigned int D.31376;
  _Bool D.31377;
  long int D.31378;
  long int D.31379;
  unsigned int buflen.359;
  long unsigned int D.31383;
  void * buffer.360;
  char * buffer.361;
  char * p.362;
  char * p.363;
  char * p.364;
  char * p.365;
  char * p.366;
  long unsigned int D.31391;
  char * D.31392;
  struct MonoAssembly * D.31393;
  struct MonoType * D.31394;
  unsigned int D.31395;
  long unsigned int D.31398;
  unsigned int D.31399;
  long unsigned int D.31402;
  unsigned int D.31403;
  char * p.367;
  char * p.368;
  char D.31406;
  char * p.369;
  char * p.370;
  unsigned int D.31409;
  char D.31410;
  char * D.31413;
  char * p.371;
  char * p.372;
  struct MonoType * ptype.373;
  char * pname.374;
  char * D.31418;
  void * D.31419;
  long unsigned int D.31420;
  char * D.31423;
  char * p.375;
  char * p.376;
  struct MonoType * ftype.377;
  char * fname.378;
  char * D.31428;
  void * D.31429;
  long unsigned int D.31430;
  long int p.379;
  long int buffer.380;
  long int D.31433;
  long int D.31434;
  _Bool D.31435;
  long int D.31436;
  long int D.31437;
  unsigned int buflen.381;
  struct MonoDomain * D.31441;
  struct MonoClass * D.31442;
  long unsigned int D.31443;
  char * p.382;
  long unsigned int D.31445;
  int D.31446;
  struct MonoArray * D.31449;
  struct MonoArray * result;
  struct MonoMethodSignature * sig;
  struct MonoObject * arg;
  char * buffer;
  char * p;
  guint32 buflen;
  guint32 i;

  try
    {
      D.31366 = ctor->vtable;
      D.31367 = D.31366->klass;
      D.31368 = D.31367->name;
      D.31369 = strcmp (D.31368, "MonoCMethod");
      if (D.31369 != 0) goto <D.31370>; else goto <D.31371>;
      <D.31370>:
      sig = ctor_builder_to_signature (0B, ctor);
      goto <D.31372>;
      <D.31371>:
      D.31373 = MEM[(struct MonoReflectionMethod *)ctor].method;
      sig = mono_method_signature (D.31373);
      <D.31372>:
      D.31374 = mono_array_length (ctorArgs);
      D.31375 = sig->param_count;
      D.31376 = (long unsigned int) D.31375;
      D.31377 = D.31374 != D.31376;
      D.31378 = (long int) D.31377;
      D.31379 = __builtin_expect (D.31378, 0);
      if (D.31379 != 0) goto <D.31380>; else goto <D.31381>;
      <D.31380>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9719, "mono_array_length (ctorArgs) == sig->param_count");
      <D.31381>:
      buflen = 256;
      buflen.359 = buflen;
      D.31383 = (long unsigned int) buflen.359;
      buffer.360 = monoeg_malloc (D.31383);
      buffer = buffer.360;
      buffer.361 = buffer;
      p = buffer.361;
      p.362 = p;
      p.363 = p.362;
      p.364 = p.363 + 1;
      p = p.364;
      *p.363 = 1;
      p.362 = p;
      p.365 = p.362;
      p.366 = p.365 + 1;
      p = p.366;
      *p.365 = 0;
      i = 0;
      goto <D.21989>;
      <D.21988>:
      D.31391 = (long unsigned int) i;
      D.31392 = mono_array_addr_with_size (ctorArgs, 8, D.31391);
      arg = MEM[(struct MonoObject * *)D.31392];
      D.31393 = assembly->assembly;
      buffer.361 = buffer;
      p.362 = p;
      D.31394 = sig->params[i];
      encode_cattr_value (D.31393, buffer.361, p.362, &buffer, &p, &buflen, D.31394, arg, 0B);
      i = i + 1;
      <D.21989>:
      D.31375 = sig->param_count;
      D.31395 = (unsigned int) D.31375;
      if (D.31395 > i) goto <D.21988>; else goto <D.21990>;
      <D.21990>:
      i = 0;
      if (properties != 0B) goto <D.31396>; else goto <D.31397>;
      <D.31396>:
      D.31398 = mono_array_length (properties);
      D.31399 = (unsigned int) D.31398;
      i = D.31399 + i;
      <D.31397>:
      if (fields != 0B) goto <D.31400>; else goto <D.31401>;
      <D.31400>:
      D.31402 = mono_array_length (fields);
      D.31403 = (unsigned int) D.31402;
      i = D.31403 + i;
      <D.31401>:
      p.362 = p;
      p.367 = p.362;
      p.368 = p.367 + 1;
      p = p.368;
      D.31406 = (char) i;
      *p.367 = D.31406;
      p.362 = p;
      p.369 = p.362;
      p.370 = p.369 + 1;
      p = p.370;
      D.31409 = i >> 8;
      D.31410 = (char) D.31409;
      *p.369 = D.31410;
      if (properties != 0B) goto <D.31411>; else goto <D.31412>;
      <D.31411>:
      {
        struct MonoObject * prop;

        i = 0;
        goto <D.21995>;
        <D.21994>:
        {
          struct MonoType * ptype;
          char * pname;

          try
            {
              D.31391 = (long unsigned int) i;
              D.31413 = mono_array_addr_with_size (properties, 8, D.31391);
              prop = MEM[(void * *)D.31413];
              get_prop_name_and_type (prop, &pname, &ptype);
              p.362 = p;
              p.371 = p.362;
              p.372 = p.371 + 1;
              p = p.372;
              *p.371 = 84;
              buffer.361 = buffer;
              p.362 = p;
              ptype.373 = ptype;
              pname.374 = pname;
              D.31391 = (long unsigned int) i;
              D.31418 = mono_array_addr_with_size (propValues, 8, D.31391);
              D.31419 = MEM[(void * *)D.31418];
              encode_named_val (assembly, buffer.361, p.362, &buffer, &p, &buflen, ptype.373, pname.374, D.31419);
              pname.374 = pname;
              monoeg_g_free (pname.374);
            }
          finally
            {
              ptype = {CLOBBER};
              pname = {CLOBBER};
            }
        }
        i = i + 1;
        <D.21995>:
        D.31391 = (long unsigned int) i;
        D.31420 = mono_array_length (properties);
        if (D.31391 < D.31420) goto <D.21994>; else goto <D.21996>;
        <D.21996>:
      }
      <D.31412>:
      if (fields != 0B) goto <D.31421>; else goto <D.31422>;
      <D.31421>:
      {
        struct MonoObject * field;

        i = 0;
        goto <D.22001>;
        <D.22000>:
        {
          struct MonoType * ftype;
          char * fname;

          try
            {
              D.31391 = (long unsigned int) i;
              D.31423 = mono_array_addr_with_size (fields, 8, D.31391);
              field = MEM[(void * *)D.31423];
              get_field_name_and_type (field, &fname, &ftype);
              p.362 = p;
              p.375 = p.362;
              p.376 = p.375 + 1;
              p = p.376;
              *p.375 = 83;
              buffer.361 = buffer;
              p.362 = p;
              ftype.377 = ftype;
              fname.378 = fname;
              D.31391 = (long unsigned int) i;
              D.31428 = mono_array_addr_with_size (fieldValues, 8, D.31391);
              D.31429 = MEM[(void * *)D.31428];
              encode_named_val (assembly, buffer.361, p.362, &buffer, &p, &buflen, ftype.377, fname.378, D.31429);
              fname.378 = fname;
              monoeg_g_free (fname.378);
            }
          finally
            {
              ftype = {CLOBBER};
              fname = {CLOBBER};
            }
        }
        i = i + 1;
        <D.22001>:
        D.31391 = (long unsigned int) i;
        D.31430 = mono_array_length (fields);
        if (D.31391 < D.31430) goto <D.22000>; else goto <D.22002>;
        <D.22002>:
      }
      <D.31422>:
      p.362 = p;
      p.379 = (long int) p.362;
      buffer.361 = buffer;
      buffer.380 = (long int) buffer.361;
      D.31433 = p.379 - buffer.380;
      buflen.359 = buflen;
      D.31434 = (long int) buflen.359;
      D.31435 = D.31433 > D.31434;
      D.31436 = (long int) D.31435;
      D.31437 = __builtin_expect (D.31436, 0);
      if (D.31437 != 0) goto <D.31438>; else goto <D.31439>;
      <D.31438>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9764, "p - buffer <= buflen");
      <D.31439>:
      p.362 = p;
      p.379 = (long int) p.362;
      buffer.361 = buffer;
      buffer.380 = (long int) buffer.361;
      D.31433 = p.379 - buffer.380;
      buflen.381 = (unsigned int) D.31433;
      buflen = buflen.381;
      D.31441 = mono_domain_get ();
      D.31442 = mono_defaults.byte_class;
      buflen.359 = buflen;
      D.31443 = (long unsigned int) buflen.359;
      result = mono_array_new (D.31441, D.31442, D.31443);
      p.382 = mono_array_addr_with_size (result, 1, 0);
      p = p.382;
      p.362 = p;
      buffer.361 = buffer;
      buflen.359 = buflen;
      D.31445 = (long unsigned int) buflen.359;
      memcpy (p.362, buffer.361, D.31445);
      buffer.361 = buffer;
      monoeg_g_free (buffer.361);
      D.31366 = ctor->vtable;
      D.31367 = D.31366->klass;
      D.31368 = D.31367->name;
      D.31446 = strcmp (D.31368, "MonoCMethod");
      if (D.31446 != 0) goto <D.31447>; else goto <D.31448>;
      <D.31447>:
      monoeg_g_free (sig);
      <D.31448>:
      D.31449 = result;
      return D.31449;
    }
  finally
    {
      buffer = {CLOBBER};
      p = {CLOBBER};
      buflen = {CLOBBER};
    }
}


encode_cattr_value (struct MonoAssembly * assembly, char * buffer, char * p, char * * retbuffer, char * * retp, guint32 * buflen, struct MonoType * type, struct MonoObject * arg, char * argval)
{
  char * p.383;
  long int p.384;
  char * buffer.385;
  long int buffer.386;
  long int D.31456;
  long int D.31457;
  unsigned int D.31458;
  long int D.31459;
  unsigned int D.31462;
  long unsigned int D.31463;
  sizetype D.31464;
  char * p.387;
  unsigned char D.31468;
  char * p.388;
  char * p.389;
  char D.31471;
  char * p.390;
  char * p.391;
  char * p.392;
  struct MonoClass * D.31475;
  long unsigned int D.31476;
  long unsigned int D.31477;
  struct MonoType * D.31480;
  unsigned char D.31481;
  const char * D.31482;
  char * p.393;
  char * p.394;
  long unsigned int D.31487;
  long int D.31488;
  long int D.31489;
  unsigned int D.31492;
  char * p.395;
  long unsigned int D.31494;
  sizetype D.31495;
  char * p.396;
  char * p.397;
  char * p.398;
  struct MonoType * D.31501;
  long unsigned int D.31502;
  long int D.31503;
  long int D.31504;
  unsigned int D.31507;
  char * p.399;
  long unsigned int D.31509;
  sizetype D.31510;
  char * p.400;
  char * p.401;
  char * p.402;
  char * p.403;
  char * p.404;
  char * p.405;
  char * p.406;
  char * p.407;
  char * p.408;
  long unsigned int D.31522;
  char * p.409;
  char * p.410;
  char D.31525;
  char * p.411;
  char * p.412;
  int D.31528;
  char D.31529;
  char * p.413;
  char * p.414;
  int D.31532;
  char D.31533;
  char * p.415;
  char * p.416;
  unsigned int len.417;
  unsigned int D.31537;
  char D.31538;
  struct MonoVTable * D.31539;
  struct MonoClass * D.31540;
  struct MonoClass * D.31545;
  long unsigned int D.31547;
  long unsigned int D.31548;
  struct MonoType * D.31550;
  sizetype D.31551;
  long unsigned int D.31553;
  long unsigned int D.31554;
  struct MonoType * D.31557;
  sizetype D.31558;
  long unsigned int D.31559;
  char * D.31560;
  struct MonoObject * D.31561;
  char * p.418;
  char * p.419;
  char * p.420;
  char * p.421;
  struct MonoClass * D.31568;
  struct MonoObject * D.31569;
  char * p.422;
  char * p.423;
  long unsigned int D.31574;
  long unsigned int D.31575;
  char * p.424;
  char * p.425;
  struct MonoClass * D.31581;
  char * p.426;
  char * p.427;
  unsigned char D.31586;
  char * p.428;
  char * p.429;
  struct MonoClass * D.31591;
  unsigned char D.31592;
  char * p.430;
  char * p.431;
  char * p.432;
  char * p.433;
  struct MonoType * D.31600;
  unsigned char D.31601;
  unsigned char D.31602;
  char * p.434;
  char * p.435;
  char D.31607;
  struct MonoType * D.31608;
  long unsigned int D.31609;
  long int D.31610;
  long int D.31611;
  unsigned int D.31614;
  char * p.436;
  long unsigned int D.31616;
  sizetype D.31617;
  char * p.437;
  struct MonoType * D.31619;
  unsigned char D.31620;
  MonoTypeEnum simple_type;
  void handle_enum = <<< error >>>;
  void handle_type = <<< error >>>;

  p.383 = p;
  p.384 = (long int) p.383;
  buffer.385 = buffer;
  buffer.386 = (long int) buffer.385;
  D.31456 = p.384 - buffer.386;
  D.31457 = D.31456 + 10;
  D.31458 = *buflen;
  D.31459 = (long int) D.31458;
  if (D.31457 >= D.31459) goto <D.31460>; else goto <D.31461>;
  <D.31460>:
  {
    char * newbuf;

    D.31458 = *buflen;
    D.31462 = D.31458 * 2;
    *buflen = D.31462;
    buffer.385 = buffer;
    D.31458 = *buflen;
    D.31463 = (long unsigned int) D.31458;
    newbuf = monoeg_realloc (buffer.385, D.31463);
    p.383 = p;
    p.384 = (long int) p.383;
    buffer.385 = buffer;
    buffer.386 = (long int) buffer.385;
    D.31456 = p.384 - buffer.386;
    D.31464 = (sizetype) D.31456;
    p.387 = newbuf + D.31464;
    p = p.387;
    buffer = newbuf;
  }
  <D.31461>:
  if (argval == 0B) goto <D.31466>; else goto <D.31467>;
  <D.31466>:
  argval = arg + 16;
  <D.31467>:
  D.31468 = type->type;
  simple_type = (MonoTypeEnum) D.31468;
  handle_enum:
  switch (simple_type) <default: <D.21948>, case 2: <D.21901>, case 3: <D.21905>, case 4: <D.21903>, case 5: <D.21902>, case 6: <D.21907>, case 7: <D.21906>, case 8: <D.21909>, case 9: <D.21908>, case 10: <D.21913>, case 11: <D.21912>, case 12: <D.21910>, case 13: <D.21911>, case 14: <D.21915>, case 17: <D.21914>, case 18: <D.21919>, case 28: <D.21942>, case 29: <D.21924>>
  <D.21901>:
  <D.21902>:
  <D.21903>:
  p.383 = p;
  p.388 = p.383;
  p.389 = p.388 + 1;
  p = p.389;
  D.31471 = *argval;
  *p.388 = D.31471;
  goto <D.21904>;
  <D.21905>:
  <D.21906>:
  <D.21907>:
  p.383 = p;
  swap_with_size (p.383, argval, 2, 1);
  p.383 = p;
  p.390 = p.383 + 2;
  p = p.390;
  goto <D.21904>;
  <D.21908>:
  <D.21909>:
  <D.21910>:
  p.383 = p;
  swap_with_size (p.383, argval, 4, 1);
  p.383 = p;
  p.391 = p.383 + 4;
  p = p.391;
  goto <D.21904>;
  <D.21911>:
  p.383 = p;
  swap_with_size (p.383, argval, 8, 1);
  p.383 = p;
  p.392 = p.383 + 8;
  p = p.392;
  goto <D.21904>;
  <D.21912>:
  <D.21913>:
  p.383 = p;
  swap_with_size (p.383, argval, 8, 1);
  p.383 = p;
  p.392 = p.383 + 8;
  p = p.392;
  goto <D.21904>;
  <D.21914>:
  D.31475 = type->data.klass;
  D.31476 = BIT_FIELD_REF <*D.31475, 64, 256>;
  D.31477 = D.31476 & 576460752303423488;
  if (D.31477 != 0) goto <D.31478>; else goto <D.31479>;
  <D.31478>:
  D.31475 = type->data.klass;
  D.31480 = mono_class_enum_basetype (D.31475);
  D.31481 = D.31480->type;
  simple_type = (MonoTypeEnum) D.31481;
  goto handle_enum;
  <D.31479>:
  D.31475 = type->data.klass;
  D.31482 = D.31475->name;
  monoeg_g_log (0B, 16, "generic valutype %s not handled in custom attr value decoding", D.31482);
  goto <D.21904>;
  <D.21915>:
  {
    char * str;
    guint32 slen;

    if (arg == 0B) goto <D.31483>; else goto <D.31484>;
    <D.31483>:
    p.383 = p;
    p.393 = p.383;
    p.394 = p.393 + 1;
    p = p.394;
    *p.393 = 255;
    goto <D.21904>;
    <D.31484>:
    str = mono_string_to_utf8 (arg);
    D.31487 = __strlen_g (str);
    slen = (guint32) D.31487;
    p.383 = p;
    p.384 = (long int) p.383;
    buffer.385 = buffer;
    buffer.386 = (long int) buffer.385;
    D.31456 = p.384 - buffer.386;
    D.31457 = D.31456 + 10;
    D.31488 = (long int) slen;
    D.31489 = D.31457 + D.31488;
    D.31458 = *buflen;
    D.31459 = (long int) D.31458;
    if (D.31489 >= D.31459) goto <D.31490>; else goto <D.31491>;
    <D.31490>:
    {
      char * newbuf;

      D.31458 = *buflen;
      D.31462 = D.31458 * 2;
      *buflen = D.31462;
      D.31458 = *buflen;
      D.31492 = D.31458 + slen;
      *buflen = D.31492;
      buffer.385 = buffer;
      D.31458 = *buflen;
      D.31463 = (long unsigned int) D.31458;
      newbuf = monoeg_realloc (buffer.385, D.31463);
      p.383 = p;
      p.384 = (long int) p.383;
      buffer.385 = buffer;
      buffer.386 = (long int) buffer.385;
      D.31456 = p.384 - buffer.386;
      D.31464 = (sizetype) D.31456;
      p.395 = newbuf + D.31464;
      p = p.395;
      buffer = newbuf;
    }
    <D.31491>:
    p.383 = p;
    mono_metadata_encode_value (slen, p.383, &p);
    p.383 = p;
    D.31494 = (long unsigned int) slen;
    memcpy (p.383, str, D.31494);
    p.383 = p;
    D.31495 = (sizetype) slen;
    p.396 = p.383 + D.31495;
    p = p.396;
    monoeg_g_free (str);
    goto <D.21904>;
  }
  <D.21919>:
  {
    char * str;
    guint32 slen;

    if (arg == 0B) goto <D.31497>; else goto <D.31498>;
    <D.31497>:
    p.383 = p;
    p.397 = p.383;
    p.398 = p.397 + 1;
    p = p.398;
    *p.397 = 255;
    goto <D.21904>;
    <D.31498>:
    handle_type:
    D.31501 = mono_reflection_type_get_handle (arg);
    str = type_get_qualified_name (D.31501, 0B);
    D.31502 = __strlen_g (str);
    slen = (guint32) D.31502;
    p.383 = p;
    p.384 = (long int) p.383;
    buffer.385 = buffer;
    buffer.386 = (long int) buffer.385;
    D.31456 = p.384 - buffer.386;
    D.31457 = D.31456 + 10;
    D.31503 = (long int) slen;
    D.31504 = D.31457 + D.31503;
    D.31458 = *buflen;
    D.31459 = (long int) D.31458;
    if (D.31504 >= D.31459) goto <D.31505>; else goto <D.31506>;
    <D.31505>:
    {
      char * newbuf;

      D.31458 = *buflen;
      D.31462 = D.31458 * 2;
      *buflen = D.31462;
      D.31458 = *buflen;
      D.31507 = D.31458 + slen;
      *buflen = D.31507;
      buffer.385 = buffer;
      D.31458 = *buflen;
      D.31463 = (long unsigned int) D.31458;
      newbuf = monoeg_realloc (buffer.385, D.31463);
      p.383 = p;
      p.384 = (long int) p.383;
      buffer.385 = buffer;
      buffer.386 = (long int) buffer.385;
      D.31456 = p.384 - buffer.386;
      D.31464 = (sizetype) D.31456;
      p.399 = newbuf + D.31464;
      p = p.399;
      buffer = newbuf;
    }
    <D.31506>:
    p.383 = p;
    mono_metadata_encode_value (slen, p.383, &p);
    p.383 = p;
    D.31509 = (long unsigned int) slen;
    memcpy (p.383, str, D.31509);
    p.383 = p;
    D.31510 = (sizetype) slen;
    p.400 = p.383 + D.31510;
    p = p.400;
    monoeg_g_free (str);
    goto <D.21904>;
  }
  <D.21924>:
  {
    int len;
    int i;
    struct MonoClass * eclass;
    struct MonoClass * arg_eclass;

    if (arg == 0B) goto <D.31512>; else goto <D.31513>;
    <D.31512>:
    p.383 = p;
    p.401 = p.383;
    p.402 = p.401 + 1;
    p = p.402;
    *p.401 = 255;
    p.383 = p;
    p.403 = p.383;
    p.404 = p.403 + 1;
    p = p.404;
    *p.403 = 255;
    p.383 = p;
    p.405 = p.383;
    p.406 = p.405 + 1;
    p = p.406;
    *p.405 = 255;
    p.383 = p;
    p.407 = p.383;
    p.408 = p.407 + 1;
    p = p.408;
    *p.407 = 255;
    goto <D.21904>;
    <D.31513>:
    D.31522 = mono_array_length (arg);
    len = (int) D.31522;
    p.383 = p;
    p.409 = p.383;
    p.410 = p.409 + 1;
    p = p.410;
    D.31525 = (char) len;
    *p.409 = D.31525;
    p.383 = p;
    p.411 = p.383;
    p.412 = p.411 + 1;
    p = p.412;
    D.31528 = len >> 8;
    D.31529 = (char) D.31528;
    *p.411 = D.31529;
    p.383 = p;
    p.413 = p.383;
    p.414 = p.413 + 1;
    p = p.414;
    D.31532 = len >> 16;
    D.31533 = (char) D.31532;
    *p.413 = D.31533;
    p.383 = p;
    p.415 = p.383;
    p.416 = p.415 + 1;
    p = p.416;
    len.417 = (unsigned int) len;
    D.31537 = len.417 >> 24;
    D.31538 = (char) D.31537;
    *p.415 = D.31538;
    p.383 = p;
    *retp = p.383;
    buffer.385 = buffer;
    *retbuffer = buffer.385;
    eclass = type->data.klass;
    D.31539 = arg->vtable;
    D.31540 = D.31539->klass;
    arg_eclass = D.31540->element_class;
    if (eclass == 0B) goto <D.31541>; else goto <D.31542>;
    <D.31541>:
    eclass = mono_defaults.object_class;
    <D.31542>:
    D.31545 = mono_defaults.object_class;
    if (D.31545 == eclass) goto <D.31546>; else goto <D.31543>;
    <D.31546>:
    D.31547 = BIT_FIELD_REF <*arg_eclass, 64, 256>;
    D.31548 = D.31547 & 1152921504606846976;
    if (D.31548 != 0) goto <D.31549>; else goto <D.31543>;
    <D.31549>:
    {
      char * elptr;
      int elsize;

      elptr = mono_array_addr_with_size (arg, 1, 0);
      elsize = mono_class_array_element_size (arg_eclass);
      i = 0;
      goto <D.21932>;
      <D.21931>:
      buffer.385 = buffer;
      p.383 = p;
      D.31550 = &arg_eclass->byval_arg;
      encode_cattr_value (assembly, buffer.385, p.383, &buffer, &p, buflen, D.31550, 0B, elptr);
      D.31551 = (sizetype) elsize;
      elptr = elptr + D.31551;
      i = i + 1;
      <D.21932>:
      if (i < len) goto <D.21931>; else goto <D.21933>;
      <D.21933>:
    }
    goto <D.31544>;
    <D.31543>:
    D.31553 = BIT_FIELD_REF <*eclass, 64, 256>;
    D.31554 = D.31553 & 1152921504606846976;
    if (D.31554 != 0) goto <D.31555>; else goto <D.31552>;
    <D.31555>:
    D.31547 = BIT_FIELD_REF <*arg_eclass, 64, 256>;
    D.31548 = D.31547 & 1152921504606846976;
    if (D.31548 != 0) goto <D.31556>; else goto <D.31552>;
    <D.31556>:
    {
      char * elptr;
      int elsize;

      elptr = mono_array_addr_with_size (arg, 1, 0);
      elsize = mono_class_array_element_size (eclass);
      i = 0;
      goto <D.21937>;
      <D.21936>:
      buffer.385 = buffer;
      p.383 = p;
      D.31557 = &eclass->byval_arg;
      encode_cattr_value (assembly, buffer.385, p.383, &buffer, &p, buflen, D.31557, 0B, elptr);
      D.31558 = (sizetype) elsize;
      elptr = elptr + D.31558;
      i = i + 1;
      <D.21937>:
      if (i < len) goto <D.21936>; else goto <D.21938>;
      <D.21938>:
    }
    goto <D.21941>;
    <D.31552>:
    i = 0;
    goto <D.21940>;
    <D.21939>:
    buffer.385 = buffer;
    p.383 = p;
    D.31557 = &eclass->byval_arg;
    D.31559 = (long unsigned int) i;
    D.31560 = mono_array_addr_with_size (arg, 8, D.31559);
    D.31561 = MEM[(struct MonoObject * *)D.31560];
    encode_cattr_value (assembly, buffer.385, p.383, &buffer, &p, buflen, D.31557, D.31561, 0B);
    i = i + 1;
    <D.21940>:
    if (i < len) goto <D.21939>; else goto <D.21941>;
    <D.21941>:
    <D.31544>:
    goto <D.21904>;
  }
  <D.21942>:
  {
    struct MonoClass * klass;
    char * str;
    guint32 slen;

    if (arg == 0B) goto <D.31562>; else goto <D.31563>;
    <D.31562>:
    p.383 = p;
    p.418 = p.383;
    p.419 = p.418 + 1;
    p = p.419;
    *p.418 = 14;
    p.383 = p;
    p.420 = p.383;
    p.421 = p.420 + 1;
    p = p.421;
    *p.420 = 255;
    goto <D.21904>;
    <D.31563>:
    D.31539 = arg->vtable;
    klass = D.31539->klass;
    D.31568 = mono_defaults.systemtype_class;
    D.31569 = mono_object_isinst (arg, D.31568);
    if (D.31569 != 0B) goto <D.31570>; else goto <D.31571>;
    <D.31570>:
    p.383 = p;
    p.422 = p.383;
    p.423 = p.422 + 1;
    p = p.423;
    *p.422 = 80;
    goto handle_type;
    <D.31571>:
    D.31574 = BIT_FIELD_REF <*klass, 64, 256>;
    D.31575 = D.31574 & 576460752303423488;
    if (D.31575 != 0) goto <D.31576>; else goto <D.31577>;
    <D.31576>:
    p.383 = p;
    p.424 = p.383;
    p.425 = p.424 + 1;
    p = p.425;
    *p.424 = 85;
    goto <D.31580>;
    <D.31577>:
    D.31581 = mono_defaults.string_class;
    if (D.31581 == klass) goto <D.31582>; else goto <D.31583>;
    <D.31582>:
    simple_type = 14;
    p.383 = p;
    p.426 = p.383;
    p.427 = p.426 + 1;
    p = p.427;
    *p.426 = 14;
    goto handle_enum;
    <D.31583>:
    D.31586 = klass->rank;
    if (D.31586 == 1) goto <D.31587>; else goto <D.31588>;
    <D.31587>:
    p.383 = p;
    p.428 = p.383;
    p.429 = p.428 + 1;
    p = p.429;
    *p.428 = 29;
    D.31591 = klass->element_class;
    D.31592 = D.31591->byval_arg.type;
    if (D.31592 == 28) goto <D.31593>; else goto <D.31594>;
    <D.31593>:
    p.383 = p;
    p.430 = p.383;
    p.431 = p.430 + 1;
    p = p.431;
    *p.430 = 81;
    goto <D.31597>;
    <D.31594>:
    p.383 = p;
    p.432 = p.383;
    p.433 = p.432 + 1;
    p = p.433;
    D.31591 = klass->element_class;
    D.31592 = D.31591->byval_arg.type;
    *p.432 = D.31592;
    <D.31597>:
    buffer.385 = buffer;
    p.383 = p;
    D.31600 = &klass->byval_arg;
    encode_cattr_value (assembly, buffer.385, p.383, &buffer, &p, buflen, D.31600, arg, 0B);
    goto <D.21904>;
    <D.31588>:
    D.31601 = klass->byval_arg.type;
    D.31602 = D.31601 + 254;
    if (D.31602 <= 11) goto <D.31603>; else goto <D.31604>;
    <D.31603>:
    p.383 = p;
    p.434 = p.383;
    p.435 = p.434 + 1;
    p = p.435;
    D.31601 = klass->byval_arg.type;
    simple_type = (MonoTypeEnum) D.31601;
    D.31607 = (char) simple_type;
    *p.434 = D.31607;
    goto handle_enum;
    <D.31604>:
    monoeg_g_log (0B, 4, "unhandled type in custom attr");
    <D.21946>:
    goto <D.21946>;
    <D.31580>:
    D.31608 = mono_class_get_type (klass);
    str = type_get_qualified_name (D.31608, 0B);
    D.31609 = __strlen_g (str);
    slen = (guint32) D.31609;
    p.383 = p;
    p.384 = (long int) p.383;
    buffer.385 = buffer;
    buffer.386 = (long int) buffer.385;
    D.31456 = p.384 - buffer.386;
    D.31457 = D.31456 + 10;
    D.31610 = (long int) slen;
    D.31611 = D.31457 + D.31610;
    D.31458 = *buflen;
    D.31459 = (long int) D.31458;
    if (D.31611 >= D.31459) goto <D.31612>; else goto <D.31613>;
    <D.31612>:
    {
      char * newbuf;

      D.31458 = *buflen;
      D.31462 = D.31458 * 2;
      *buflen = D.31462;
      D.31458 = *buflen;
      D.31614 = D.31458 + slen;
      *buflen = D.31614;
      buffer.385 = buffer;
      D.31458 = *buflen;
      D.31463 = (long unsigned int) D.31458;
      newbuf = monoeg_realloc (buffer.385, D.31463);
      p.383 = p;
      p.384 = (long int) p.383;
      buffer.385 = buffer;
      buffer.386 = (long int) buffer.385;
      D.31456 = p.384 - buffer.386;
      D.31464 = (sizetype) D.31456;
      p.436 = newbuf + D.31464;
      p = p.436;
      buffer = newbuf;
    }
    <D.31613>:
    p.383 = p;
    mono_metadata_encode_value (slen, p.383, &p);
    p.383 = p;
    D.31616 = (long unsigned int) slen;
    memcpy (p.383, str, D.31616);
    p.383 = p;
    D.31617 = (sizetype) slen;
    p.437 = p.383 + D.31617;
    p = p.437;
    monoeg_g_free (str);
    D.31619 = mono_class_enum_basetype (klass);
    D.31620 = D.31619->type;
    simple_type = (MonoTypeEnum) D.31620;
    goto handle_enum;
  }
  <D.21948>:
  monoeg_g_log (0B, 4, "type 0x%02x not yet supported in custom attr encoder", simple_type);
  <D.21949>:
  goto <D.21949>;
  <D.21904>:
  p.383 = p;
  *retp = p.383;
  buffer.385 = buffer;
  *retbuffer = buffer.385;
}


type_get_qualified_name (struct MonoType * type, struct MonoAssembly * ass)
{
  char * D.31623;
  struct MonoImage * D.31624;
  unsigned char D.31627;
  struct MonoGenericClass * D.31631;
  struct MonoGenericContainer * D.31633;
  struct MonoClass * klass;
  struct MonoAssembly * ta;

  klass = mono_class_from_mono_type (type);
  if (klass == 0B) goto <D.31621>; else goto <D.31622>;
  <D.31621>:
  D.31623 = mono_type_get_name_full (type, 1);
  return D.31623;
  <D.31622>:
  D.31624 = klass->image;
  ta = D.31624->assembly;
  D.31627 = ta->dynamic;
  if (D.31627 != 0) goto <D.31625>; else goto <D.31628>;
  <D.31628>:
  if (ta == ass) goto <D.31625>; else goto <D.31626>;
  <D.31625>:
  D.31631 = klass->generic_class;
  if (D.31631 != 0B) goto <D.31629>; else goto <D.31632>;
  <D.31632>:
  D.31633 = klass->generic_container;
  if (D.31633 != 0B) goto <D.31629>; else goto <D.31630>;
  <D.31629>:
  D.31623 = mono_type_get_name_full (type, 2);
  return D.31623;
  <D.31630>:
  D.31623 = mono_type_get_name_full (type, 1);
  return D.31623;
  <D.31626>:
  D.31623 = mono_type_get_name_full (type, 3);
  return D.31623;
}


get_prop_name_and_type (struct MonoObject * prop, char * * name, struct MonoType * * type)
{
  struct MonoVTable * D.31635;
  const char * D.31636;
  int D.31637;
  struct MonoString * D.31640;
  char * D.31641;
  struct MonoObject * D.31642;
  struct MonoType * D.31643;
  struct MonoProperty * D.31645;
  const char * D.31646;
  gchar * D.31647;
  struct MonoMethod * D.31648;
  struct MonoMethodSignature * D.31651;
  struct MonoType * D.31652;
  struct MonoMethod * D.31654;
  struct MonoMethodSignature * D.31655;
  struct MonoMethodSignature * D.31656;
  short unsigned int D.31657;
  int D.31658;
  int D.31659;
  struct MonoType * D.31660;
  struct MonoClass * klass;

  D.31635 = prop->vtable;
  klass = D.31635->klass;
  D.31636 = klass->name;
  D.31637 = strcmp (D.31636, "PropertyBuilder");
  if (D.31637 == 0) goto <D.31638>; else goto <D.31639>;
  <D.31638>:
  {
    struct MonoReflectionPropertyBuilder * pb;

    pb = prop;
    D.31640 = pb->name;
    D.31641 = mono_string_to_utf8 (D.31640);
    *name = D.31641;
    D.31642 = pb->type;
    D.31643 = mono_reflection_type_get_handle (D.31642);
    *type = D.31643;
  }
  goto <D.31644>;
  <D.31639>:
  {
    struct MonoReflectionProperty * p;

    p = prop;
    D.31645 = p->property;
    D.31646 = D.31645->name;
    D.31647 = monoeg_strdup (D.31646);
    *name = D.31647;
    D.31645 = p->property;
    D.31648 = D.31645->get;
    if (D.31648 != 0B) goto <D.31649>; else goto <D.31650>;
    <D.31649>:
    D.31645 = p->property;
    D.31648 = D.31645->get;
    D.31651 = mono_method_signature (D.31648);
    D.31652 = D.31651->ret;
    *type = D.31652;
    goto <D.31653>;
    <D.31650>:
    D.31645 = p->property;
    D.31654 = D.31645->set;
    D.31655 = mono_method_signature (D.31654);
    D.31645 = p->property;
    D.31654 = D.31645->set;
    D.31656 = mono_method_signature (D.31654);
    D.31657 = D.31656->param_count;
    D.31658 = (int) D.31657;
    D.31659 = D.31658 + -1;
    D.31660 = D.31655->params[D.31659];
    *type = D.31660;
    <D.31653>:
  }
  <D.31644>:
}


get_field_name_and_type (struct MonoObject * field, char * * name, struct MonoType * * type)
{
  struct MonoVTable * D.31661;
  const char * D.31662;
  int D.31663;
  struct MonoString * D.31666;
  char * D.31667;
  struct MonoObject * D.31668;
  struct MonoType * D.31669;
  struct MonoClassField * D.31671;
  const char * D.31672;
  gchar * D.31673;
  struct MonoType * D.31674;
  struct MonoClass * klass;

  D.31661 = field->vtable;
  klass = D.31661->klass;
  D.31662 = klass->name;
  D.31663 = strcmp (D.31662, "FieldBuilder");
  if (D.31663 == 0) goto <D.31664>; else goto <D.31665>;
  <D.31664>:
  {
    struct MonoReflectionFieldBuilder * fb;

    fb = field;
    D.31666 = fb->name;
    D.31667 = mono_string_to_utf8 (D.31666);
    *name = D.31667;
    D.31668 = fb->type;
    D.31669 = mono_reflection_type_get_handle (D.31668);
    *type = D.31669;
  }
  goto <D.31670>;
  <D.31665>:
  {
    struct MonoReflectionField * f;

    f = field;
    D.31671 = f->field;
    D.31672 = mono_field_get_name (D.31671);
    D.31673 = monoeg_strdup (D.31672);
    *name = D.31673;
    D.31671 = f->field;
    D.31674 = D.31671->type;
    *type = D.31674;
  }
  <D.31670>:
}


encode_named_val (struct MonoReflectionAssembly * assembly, char * buffer, char * p, char * * retbuffer, char * * retp, guint32 * buflen, struct MonoType * type, char * name, struct MonoObject * value)
{
  unsigned char D.31677;
  struct MonoClass * D.31679;
  long unsigned int D.31680;
  long unsigned int D.31681;
  long unsigned int D.31683;
  struct MonoType * D.31688;
  long unsigned int D.31689;
  long unsigned int D.31690;
  unsigned int D.31691;
  unsigned int len.438;
  unsigned int D.31693;
  char * p.439;
  long int p.440;
  char * buffer.441;
  long int buffer.442;
  long int D.31698;
  long int D.31699;
  long int D.31700;
  long int D.31701;
  unsigned int D.31702;
  long int D.31703;
  unsigned int D.31706;
  unsigned int len.443;
  unsigned int D.31708;
  long unsigned int D.31709;
  sizetype D.31710;
  char * p.444;
  long unsigned int D.31712;
  unsigned int len.445;
  long unsigned int D.31714;
  sizetype D.31715;
  char * p.446;
  struct MonoAssembly * D.31717;
  int len;

  D.31677 = type->type;
  if (D.31677 == 17) goto <D.31678>; else goto <D.31675>;
  <D.31678>:
  D.31679 = type->data.klass;
  D.31680 = BIT_FIELD_REF <*D.31679, 64, 256>;
  D.31681 = D.31680 & 576460752303423488;
  if (D.31681 != 0) goto <D.31682>; else goto <D.31675>;
  <D.31682>:
  {
    char * str;

    str = type_get_qualified_name (type, 0B);
    D.31683 = __strlen_g (str);
    len = (int) D.31683;
    monoeg_g_free (str);
  }
  goto <D.31676>;
  <D.31675>:
  D.31677 = type->type;
  if (D.31677 == 29) goto <D.31686>; else goto <D.31684>;
  <D.31686>:
  D.31679 = type->data.klass;
  D.31680 = BIT_FIELD_REF <*D.31679, 64, 256>;
  D.31681 = D.31680 & 576460752303423488;
  if (D.31681 != 0) goto <D.31687>; else goto <D.31684>;
  <D.31687>:
  {
    char * str;

    D.31679 = type->data.klass;
    D.31688 = &D.31679->byval_arg;
    str = type_get_qualified_name (D.31688, 0B);
    D.31689 = __strlen_g (str);
    len = (int) D.31689;
    monoeg_g_free (str);
  }
  goto <D.31685>;
  <D.31684>:
  len = 0;
  <D.31685>:
  <D.31676>:
  D.31690 = __strlen_g (name);
  D.31691 = (unsigned int) D.31690;
  len.438 = (unsigned int) len;
  D.31693 = D.31691 + len.438;
  len = (int) D.31693;
  p.439 = p;
  p.440 = (long int) p.439;
  buffer.441 = buffer;
  buffer.442 = (long int) buffer.441;
  D.31698 = p.440 - buffer.442;
  D.31699 = D.31698 + 20;
  D.31700 = (long int) len;
  D.31701 = D.31699 + D.31700;
  D.31702 = *buflen;
  D.31703 = (long int) D.31702;
  if (D.31701 >= D.31703) goto <D.31704>; else goto <D.31705>;
  <D.31704>:
  {
    char * newbuf;

    D.31702 = *buflen;
    D.31706 = D.31702 * 2;
    *buflen = D.31706;
    D.31702 = *buflen;
    len.443 = (unsigned int) len;
    D.31708 = D.31702 + len.443;
    *buflen = D.31708;
    buffer.441 = buffer;
    D.31702 = *buflen;
    D.31709 = (long unsigned int) D.31702;
    newbuf = monoeg_realloc (buffer.441, D.31709);
    p.439 = p;
    p.440 = (long int) p.439;
    buffer.441 = buffer;
    buffer.442 = (long int) buffer.441;
    D.31698 = p.440 - buffer.442;
    D.31710 = (sizetype) D.31698;
    p.444 = newbuf + D.31710;
    p = p.444;
    buffer = newbuf;
  }
  <D.31705>:
  p.439 = p;
  encode_field_or_prop_type (type, p.439, &p);
  D.31712 = __strlen_g (name);
  len = (int) D.31712;
  len.445 = (unsigned int) len;
  p.439 = p;
  mono_metadata_encode_value (len.445, p.439, &p);
  p.439 = p;
  D.31714 = (long unsigned int) len;
  memcpy (p.439, name, D.31714);
  p.439 = p;
  D.31715 = (sizetype) len;
  p.446 = p.439 + D.31715;
  p = p.446;
  D.31717 = assembly->assembly;
  buffer.441 = buffer;
  p.439 = p;
  encode_cattr_value (D.31717, buffer.441, p.439, &buffer, &p, buflen, type, value, 0B);
  p.439 = p;
  *retp = p.439;
  buffer.441 = buffer;
  *retbuffer = buffer.441;
}


encode_field_or_prop_type (struct MonoType * type, char * p, char * * retp)
{
  unsigned char D.31720;
  struct MonoClass * D.31722;
  long unsigned int D.31723;
  long unsigned int D.31724;
  long unsigned int D.31726;
  char * p.447;
  char * p.448;
  char * p.449;
  unsigned int slen.450;
  long unsigned int D.31731;
  sizetype D.31732;
  char * p.451;
  char * p.452;
  char * p.453;
  char * p.454;
  char * p.455;
  unsigned int D.31744;
  struct MonoType * D.31747;

  D.31720 = type->type;
  if (D.31720 == 17) goto <D.31721>; else goto <D.31718>;
  <D.31721>:
  D.31722 = type->data.klass;
  D.31723 = BIT_FIELD_REF <*D.31722, 64, 256>;
  D.31724 = D.31723 & 576460752303423488;
  if (D.31724 != 0) goto <D.31725>; else goto <D.31718>;
  <D.31725>:
  {
    char * str;
    int slen;

    str = type_get_qualified_name (type, 0B);
    D.31726 = __strlen_g (str);
    slen = (int) D.31726;
    p.447 = p;
    p.448 = p.447;
    p.449 = p.448 + 1;
    p = p.449;
    *p.448 = 85;
    slen.450 = (unsigned int) slen;
    p.447 = p;
    mono_metadata_encode_value (slen.450, p.447, &p);
    p.447 = p;
    D.31731 = (long unsigned int) slen;
    memcpy (p.447, str, D.31731);
    p.447 = p;
    D.31732 = (sizetype) slen;
    p.451 = p.447 + D.31732;
    p = p.451;
    monoeg_g_free (str);
  }
  goto <D.31719>;
  <D.31718>:
  D.31720 = type->type;
  if (D.31720 == 28) goto <D.31734>; else goto <D.31735>;
  <D.31734>:
  p.447 = p;
  p.452 = p.447;
  p.453 = p.452 + 1;
  p = p.453;
  *p.452 = 81;
  goto <D.31738>;
  <D.31735>:
  D.31720 = type->type;
  if (D.31720 == 18) goto <D.31739>; else goto <D.31740>;
  <D.31739>:
  p.447 = p;
  p.454 = p.447;
  p.455 = p.454 + 1;
  p = p.455;
  *p.454 = 80;
  goto <D.31743>;
  <D.31740>:
  D.31720 = type->type;
  D.31744 = (unsigned int) D.31720;
  p.447 = p;
  mono_metadata_encode_value (D.31744, p.447, &p);
  D.31720 = type->type;
  if (D.31720 == 29) goto <D.31745>; else goto <D.31746>;
  <D.31745>:
  D.31722 = type->data.klass;
  D.31747 = &D.31722->byval_arg;
  p.447 = p;
  encode_field_or_prop_type (D.31747, p.447, &p);
  <D.31746>:
  <D.31743>:
  <D.31738>:
  <D.31719>:
  p.447 = p;
  *retp = p.447;
}


__attribute__((visibility ("hidden")))
mono_reflection_setup_internal_class (struct MonoReflectionTypeBuilder * tb)
{
  struct MonoObject * D.31748;
  struct MonoReflectionType * D.31749;
  struct MonoVTable * D.31752;
  struct MonoClass * D.31753;
  const char * D.31754;
  int D.31755;
  struct MonoType * D.31758;
  struct MonoType * D.31760;
  struct MonoType * D.31762;
  struct MonoReflectionModuleBuilder * D.31765;
  struct MonoDynamicImage * D.31766;
  struct MonoImage * D.31767;
  struct MonoImage * D.31768;
  struct MonoString * D.31769;
  char * D.31770;
  int D.31771;
  struct MonoString * D.31773;
  char * D.31774;
  int D.31775;
  unsigned int D.31777;
  unsigned int D.31778;
  unsigned int D.31779;
  void * D.31780;
  struct MonoReflectionType * D.31783;
  const char * D.31786;
  const char * D.31787;
  void * D.31789;
  _Bool D.31790;
  long int D.31791;
  long int D.31792;
  struct MonoGHashTable * D.31795;
  long unsigned int D.31796;
  void * D.31797;
  int D.31801;
  int D.31804;
  struct MonoClass * D.31807;
  int D.31812;
  int D.31814;
  int D.31815;
  int D.31817;
  int D.31818;
  int D.31820;
  struct MonoType * D.31821;
  struct MonoType * D.31824;
  _Bool D.31825;
  long int D.31826;
  long int D.31827;
  struct MonoType * D.31830;
  struct MonoClass * D.31831;
  struct MonoError error;
  struct MonoClass * klass;
  struct MonoClass * parent;
  void failure = <<< error >>>;

  try
    {
      D.31748 = tb->parent;
      D.31749 = mono_reflection_type_resolve_user_types (D.31748);
      tb->parent = D.31749;
      mono_loader_lock ();
      D.31748 = tb->parent;
      if (D.31748 != 0B) goto <D.31750>; else goto <D.31751>;
      <D.31750>:
      D.31748 = tb->parent;
      D.31752 = D.31748->vtable;
      D.31753 = D.31752->klass;
      D.31754 = D.31753->name;
      D.31755 = strcmp (D.31754, "TypeBuilder");
      if (D.31755 == 0) goto <D.31756>; else goto <D.31757>;
      <D.31756>:
      D.31748 = tb->parent;
      D.31758 = mono_reflection_type_get_handle (D.31748);
      parent = D.31758->data.klass;
      goto <D.31759>;
      <D.31757>:
      D.31748 = tb->parent;
      D.31760 = mono_reflection_type_get_handle (D.31748);
      parent = mono_class_from_mono_type (D.31760);
      <D.31759>:
      goto <D.31761>;
      <D.31751>:
      parent = 0B;
      <D.31761>:
      D.31762 = tb->type.type;
      if (D.31762 != 0B) goto <D.31763>; else goto <D.31764>;
      <D.31763>:
      D.31762 = tb->type.type;
      klass = mono_class_from_mono_type (D.31762);
      klass->parent = 0B;
      klass->supertypes = 0B;
      mono_class_setup_parent (klass, parent);
      mono_class_setup_mono_type (klass);
      mono_loader_unlock ();
      return;
      <D.31764>:
      D.31765 = tb->module;
      D.31766 = D.31765->dynamic_image;
      D.31767 = &D.31766->image;
      klass = mono_image_alloc0 (D.31767, 272);
      D.31765 = tb->module;
      D.31766 = D.31765->dynamic_image;
      D.31767 = &D.31766->image;
      klass->image = D.31767;
      klass->inited = 1;
      D.31768 = klass->image;
      D.31769 = tb->name;
      D.31770 = mono_string_to_utf8_image (D.31768, D.31769, &error);
      klass->name = D.31770;
      D.31771 = mono_error_ok (&error);
      if (D.31771 == 0) goto failure; else goto <D.31772>;
      <D.31772>:
      D.31768 = klass->image;
      D.31773 = tb->nspace;
      D.31774 = mono_string_to_utf8_image (D.31768, D.31773, &error);
      klass->name_space = D.31774;
      D.31775 = mono_error_ok (&error);
      if (D.31775 == 0) goto failure; else goto <D.31776>;
      <D.31776>:
      D.31777 = tb->table_idx;
      D.31778 = D.31777 | 33554432;
      klass->type_token = D.31778;
      D.31779 = tb->attrs;
      klass->flags = D.31779;
      mono_profiler_class_event (klass, 0);
      klass->element_class = klass;
      D.31780 = mono_class_get_ref_info (klass);
      if (D.31780 == 0B) goto <D.31781>; else goto <D.31782>;
      <D.31781>:
      mono_class_set_ref_info (klass, tb);
      D.31783 = tb->nesting_type;
      if (D.31783 == 0B) goto <D.31784>; else goto <D.31785>;
      <D.31784>:
      D.31768 = klass->image;
      D.31786 = klass->name_space;
      D.31787 = klass->name;
      D.31777 = tb->table_idx;
      mono_image_add_to_name_cache (D.31768, D.31786, D.31787, D.31777);
      <D.31785>:
      mono_image_append_class_to_reflection_info_set (klass);
      goto <D.31788>;
      <D.31782>:
      D.31789 = mono_class_get_ref_info (klass);
      D.31790 = D.31789 != tb;
      D.31791 = (long int) D.31790;
      D.31792 = __builtin_expect (D.31791, 0);
      if (D.31792 != 0) goto <D.31793>; else goto <D.31794>;
      <D.31793>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9854, "mono_class_get_ref_info (klass) == tb");
      <D.31794>:
      <D.31788>:
      D.31765 = tb->module;
      D.31766 = D.31765->dynamic_image;
      D.31795 = D.31766->tokens;
      D.31777 = tb->table_idx;
      D.31778 = D.31777 | 33554432;
      D.31796 = (long unsigned int) D.31778;
      D.31797 = (void *) D.31796;
      mono_g_hash_table_insert (D.31795, D.31797, tb);
      if (parent != 0B) goto <D.31798>; else goto <D.31799>;
      <D.31798>:
      mono_class_setup_parent (klass, parent);
      goto <D.31800>;
      <D.31799>:
      D.31787 = klass->name;
      D.31801 = strcmp (D.31787, "Object");
      if (D.31801 == 0) goto <D.31802>; else goto <D.31803>;
      <D.31802>:
      D.31786 = klass->name_space;
      D.31804 = strcmp (D.31786, "System");
      if (D.31804 == 0) goto <D.31805>; else goto <D.31806>;
      <D.31805>:
      {
        const char * old_n;

        old_n = klass->name;
        klass->name = "BuildingObject";
        D.31807 = mono_defaults.object_class;
        mono_class_setup_parent (klass, D.31807);
        klass->name = old_n;
      }
      <D.31806>:
      <D.31803>:
      <D.31800>:
      D.31787 = klass->name;
      D.31812 = strcmp (D.31787, "ValueType");
      if (D.31812 == 0) goto <D.31813>; else goto <D.31808>;
      <D.31813>:
      D.31786 = klass->name_space;
      D.31814 = strcmp (D.31786, "System");
      if (D.31814 == 0) goto <D.31809>; else goto <D.31808>;
      <D.31808>:
      D.31787 = klass->name;
      D.31815 = strcmp (D.31787, "Object");
      if (D.31815 == 0) goto <D.31816>; else goto <D.31810>;
      <D.31816>:
      D.31786 = klass->name_space;
      D.31817 = strcmp (D.31786, "System");
      if (D.31817 == 0) goto <D.31809>; else goto <D.31810>;
      <D.31810>:
      D.31787 = klass->name;
      D.31818 = strcmp (D.31787, "Enum");
      if (D.31818 == 0) goto <D.31819>; else goto <D.31811>;
      <D.31819>:
      D.31786 = klass->name_space;
      D.31820 = strcmp (D.31786, "System");
      if (D.31820 == 0) goto <D.31809>; else goto <D.31811>;
      <D.31809>:
      klass->instance_size = 16;
      klass->size_inited = 1;
      mono_class_setup_vtable_general (klass, 0B, 0, 0B);
      <D.31811>:
      mono_class_setup_mono_type (klass);
      mono_class_setup_supertypes (klass);
      D.31821 = &klass->byval_arg;
      tb->type.type = D.31821;
      D.31783 = tb->nesting_type;
      if (D.31783 != 0B) goto <D.31822>; else goto <D.31823>;
      <D.31822>:
      D.31783 = tb->nesting_type;
      D.31824 = D.31783->type;
      D.31825 = D.31824 == 0B;
      D.31826 = (long int) D.31825;
      D.31827 = __builtin_expect (D.31826, 0);
      if (D.31827 != 0) goto <D.31828>; else goto <D.31829>;
      <D.31828>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9889, "tb->nesting_type->type");
      <D.31829>:
      D.31783 = tb->nesting_type;
      D.31830 = mono_reflection_type_get_handle (D.31783);
      D.31831 = mono_class_from_mono_type (D.31830);
      klass->nested_in = D.31831;
      <D.31823>:
      mono_profiler_class_loaded (klass, 0);
      mono_loader_unlock ();
      return;
      failure:
      mono_loader_unlock ();
      mono_error_raise_exception (&error);
    }
  finally
    {
      error = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_setup_generic_class (struct MonoReflectionTypeBuilder * tb)
{

}


__attribute__((visibility ("hidden")))
mono_reflection_create_generic_class (struct MonoReflectionTypeBuilder * tb)
{
  struct MonoType * D.31835;
  int iftmp.456;
  struct MonoArray * D.31837;
  long unsigned int D.31840;
  struct MonoGenericContainer * D.31844;
  int iftmp.457;
  struct MonoGenericContainer * D.31850;
  struct MonoClass * D.31852;
  _Bool D.31853;
  long int D.31854;
  long int D.31855;
  struct MonoImage * D.31858;
  void * D.31859;
  <unnamed-signed:31> D.31860;
  long unsigned int D.31861;
  unsigned int D.31862;
  unsigned int D.31863;
  void * D.31864;
  long unsigned int D.31865;
  char * D.31866;
  struct MonoType * D.31867;
  struct MonoGenericParamFull * D.31868;
  long unsigned int D.31869;
  long unsigned int D.31870;
  struct MonoGenericParamFull * D.31871;
  unsigned int D.31872;
  short unsigned int D.31873;
  struct MonoGenericContainer * D.31874;
  _Bool D.31875;
  long int D.31876;
  long int D.31877;
  struct MonoGenericInst * D.31880;
  struct MonoClass * klass;
  int count;
  int i;

  D.31835 = tb->type.type;
  klass = mono_class_from_mono_type (D.31835);
  D.31837 = tb->generic_params;
  if (D.31837 != 0B) goto <D.31838>; else goto <D.31839>;
  <D.31838>:
  D.31837 = tb->generic_params;
  D.31840 = mono_array_length (D.31837);
  iftmp.456 = (int) D.31840;
  goto <D.31841>;
  <D.31839>:
  iftmp.456 = 0;
  <D.31841>:
  count = iftmp.456;
  D.31844 = klass->generic_container;
  if (D.31844 != 0B) goto <D.31842>; else goto <D.31845>;
  <D.31845>:
  if (count == 0) goto <D.31842>; else goto <D.31843>;
  <D.31842>:
  return;
  <D.31843>:
  D.31850 = tb->generic_container;
  if (D.31850 == 0B) goto <D.31847>; else goto <D.31851>;
  <D.31851>:
  D.31850 = tb->generic_container;
  D.31852 = D.31850->owner.klass;
  if (D.31852 != klass) goto <D.31847>; else goto <D.31848>;
  <D.31847>:
  iftmp.457 = 1;
  goto <D.31849>;
  <D.31848>:
  iftmp.457 = 0;
  <D.31849>:
  D.31853 = iftmp.457 != 0;
  D.31854 = (long int) D.31853;
  D.31855 = __builtin_expect (D.31854, 0);
  if (D.31855 != 0) goto <D.31856>; else goto <D.31857>;
  <D.31856>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9937, "tb->generic_container && (tb->generic_container->owner.klass == klass)");
  <D.31857>:
  D.31858 = klass->image;
  D.31859 = mono_image_alloc0 (D.31858, 56);
  klass->generic_container = D.31859;
  D.31844 = klass->generic_container;
  D.31844->owner.klass = klass;
  D.31844 = klass->generic_container;
  D.31860 = (<unnamed-signed:31>) count;
  D.31844->type_argc = D.31860;
  D.31844 = klass->generic_container;
  D.31858 = klass->image;
  D.31861 = (long unsigned int) count;
  D.31862 = (unsigned int) D.31861;
  D.31863 = D.31862 * 56;
  D.31864 = mono_image_alloc0 (D.31858, D.31863);
  D.31844->type_params = D.31864;
  klass->is_generic = 1;
  i = 0;
  goto <D.22023>;
  <D.22022>:
  {
    struct MonoReflectionGenericParam * gparam;
    struct MonoGenericParamFull * param;

    D.31837 = tb->generic_params;
    D.31865 = (long unsigned int) i;
    D.31866 = mono_array_addr_with_size (D.31837, 8, D.31865);
    gparam = MEM[(void * *)D.31866];
    D.31867 = mono_reflection_type_get_handle (gparam);
    param = D.31867->data.generic_param;
    D.31844 = klass->generic_container;
    D.31868 = D.31844->type_params;
    D.31869 = (long unsigned int) i;
    D.31870 = D.31869 * 56;
    D.31871 = D.31868 + D.31870;
    *D.31871 = *param;
    D.31844 = klass->generic_container;
    D.31868 = D.31844->type_params;
    D.31869 = (long unsigned int) i;
    D.31870 = D.31869 * 56;
    D.31871 = D.31868 + D.31870;
    D.31844 = klass->generic_container;
    D.31871->param.owner = D.31844;
    D.31844 = klass->generic_container;
    D.31868 = D.31844->type_params;
    D.31869 = (long unsigned int) i;
    D.31870 = D.31869 * 56;
    D.31871 = D.31868 + D.31870;
    D.31871->info.pklass = 0B;
    D.31844 = klass->generic_container;
    D.31868 = D.31844->type_params;
    D.31869 = (long unsigned int) i;
    D.31870 = D.31869 * 56;
    D.31871 = D.31868 + D.31870;
    D.31872 = gparam->attrs;
    D.31873 = (short unsigned int) D.31872;
    D.31871->info.flags = D.31873;
    D.31844 = klass->generic_container;
    D.31868 = D.31844->type_params;
    D.31869 = (long unsigned int) i;
    D.31870 = D.31869 * 56;
    D.31871 = D.31868 + D.31870;
    D.31874 = D.31871->param.owner;
    D.31875 = D.31874 == 0B;
    D.31876 = (long int) D.31875;
    D.31877 = __builtin_expect (D.31876, 0);
    if (D.31877 != 0) goto <D.31878>; else goto <D.31879>;
    <D.31878>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9956, "klass->generic_container->type_params [i].param.owner");
    <D.31879>:
  }
  i = i + 1;
  <D.22023>:
  if (i < count) goto <D.22022>; else goto <D.22024>;
  <D.22024>:
  D.31844 = klass->generic_container;
  D.31844 = klass->generic_container;
  D.31880 = mono_get_shared_generic_inst (D.31844);
  D.31844->context.class_inst = D.31880;
}


__attribute__((visibility ("hidden")))
mono_reflection_create_internal_class (struct MonoReflectionTypeBuilder * tb)
{
  struct MonoType * D.31882;
  long unsigned int D.31883;
  long unsigned int D.31884;
  struct MonoType * D.31887;
  struct MonoArray * D.31890;
  _Bool D.31891;
  long int D.31892;
  long int D.31893;
  long unsigned int D.31896;
  _Bool D.31897;
  long int D.31898;
  long int D.31899;
  char * D.31902;
  struct MonoObject * D.31903;
  struct MonoType * D.31904;
  int D.31905;
  struct MonoClass * D.31908;
  struct MonoClass * D.31909;
  struct MonoClass * D.31912;
  int D.31913;
  struct MonoClass * klass;

  D.31882 = tb->type.type;
  klass = mono_class_from_mono_type (D.31882);
  mono_loader_lock ();
  D.31883 = BIT_FIELD_REF <*klass, 64, 256>;
  D.31884 = D.31883 & 576460752303423488;
  if (D.31884 != 0) goto <D.31885>; else goto <D.31886>;
  <D.31885>:
  D.31887 = mono_class_enum_basetype (klass);
  if (D.31887 == 0B) goto <D.31888>; else goto <D.31889>;
  <D.31888>:
  {
    struct MonoReflectionFieldBuilder * fb;
    struct MonoClass * ec;
    struct MonoType * enum_basetype;

    D.31890 = tb->fields;
    D.31891 = D.31890 == 0B;
    D.31892 = (long int) D.31891;
    D.31893 = __builtin_expect (D.31892, 0);
    if (D.31893 != 0) goto <D.31894>; else goto <D.31895>;
    <D.31894>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9983, "tb->fields != NULL");
    <D.31895>:
    D.31890 = tb->fields;
    D.31896 = mono_array_length (D.31890);
    D.31897 = D.31896 == 0;
    D.31898 = (long int) D.31897;
    D.31899 = __builtin_expect (D.31898, 0);
    if (D.31899 != 0) goto <D.31900>; else goto <D.31901>;
    <D.31900>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 9984, "mono_array_length (tb->fields) >= 1");
    <D.31901>:
    D.31890 = tb->fields;
    D.31902 = mono_array_addr_with_size (D.31890, 8, 0);
    fb = MEM[(struct MonoReflectionFieldBuilder * *)D.31902];
    D.31903 = fb->type;
    D.31904 = mono_reflection_type_get_handle (D.31903);
    D.31905 = mono_type_is_valid_enum_basetype (D.31904);
    if (D.31905 == 0) goto <D.31906>; else goto <D.31907>;
    <D.31906>:
    mono_loader_unlock ();
    return;
    <D.31907>:
    D.31903 = fb->type;
    enum_basetype = mono_reflection_type_get_handle (D.31903);
    D.31908 = mono_class_from_mono_type (enum_basetype);
    klass->element_class = D.31908;
    D.31909 = klass->element_class;
    if (D.31909 == 0B) goto <D.31910>; else goto <D.31911>;
    <D.31910>:
    D.31912 = mono_class_from_mono_type (enum_basetype);
    klass->element_class = D.31912;
    <D.31911>:
    ec = default_class_from_mono_type (enum_basetype);
    D.31913 = ec->instance_size;
    klass->instance_size = D.31913;
    klass->size_inited = 1;
    mono_class_setup_vtable_general (klass, 0B, 0, 0B);
  }
  <D.31889>:
  <D.31886>:
  mono_loader_unlock ();
}


default_class_from_mono_type (struct MonoType * type)
{
  unsigned char D.31915;
  int D.31916;
  struct MonoClass * D.31917;

  D.31915 = type->type;
  D.31916 = (int) D.31915;
  switch (D.31916) <default: <D.18969>, case 1: <D.18953>, case 2: <D.18954>, case 3: <D.18955>, case 4: <D.18956>, case 5: <D.18957>, case 6: <D.18958>, case 7: <D.18959>, case 8: <D.18960>, case 9: <D.18961>, case 10: <D.18964>, case 11: <D.18965>, case 12: <D.18966>, case 13: <D.18967>, case 14: <D.18968>, case 24: <D.18962>, case 25: <D.18963>, case 28: <D.18952>>
  <D.18952>:
  D.31917 = mono_defaults.object_class;
  return D.31917;
  <D.18953>:
  D.31917 = mono_defaults.void_class;
  return D.31917;
  <D.18954>:
  D.31917 = mono_defaults.boolean_class;
  return D.31917;
  <D.18955>:
  D.31917 = mono_defaults.char_class;
  return D.31917;
  <D.18956>:
  D.31917 = mono_defaults.sbyte_class;
  return D.31917;
  <D.18957>:
  D.31917 = mono_defaults.byte_class;
  return D.31917;
  <D.18958>:
  D.31917 = mono_defaults.int16_class;
  return D.31917;
  <D.18959>:
  D.31917 = mono_defaults.uint16_class;
  return D.31917;
  <D.18960>:
  D.31917 = mono_defaults.int32_class;
  return D.31917;
  <D.18961>:
  D.31917 = mono_defaults.uint32_class;
  return D.31917;
  <D.18962>:
  D.31917 = mono_defaults.int_class;
  return D.31917;
  <D.18963>:
  D.31917 = mono_defaults.uint_class;
  return D.31917;
  <D.18964>:
  D.31917 = mono_defaults.int64_class;
  return D.31917;
  <D.18965>:
  D.31917 = mono_defaults.uint64_class;
  return D.31917;
  <D.18966>:
  D.31917 = mono_defaults.single_class;
  return D.31917;
  <D.18967>:
  D.31917 = mono_defaults.double_class;
  return D.31917;
  <D.18968>:
  D.31917 = mono_defaults.string_class;
  return D.31917;
  <D.18969>:
  D.31915 = type->type;
  D.31916 = (int) D.31915;
  monoeg_g_log (0B, 16, "default_class_from_mono_type: implement me 0x%02x\n", D.31916);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 616);
  D.31917 = 0B;
  return D.31917;
}


__attribute__((visibility ("hidden")))
mono_reflection_marshal_as_attribute_from_marshal_spec (struct MonoDomain * domain, struct MonoClass * klass, struct MonoMarshalSpec * spec)
{
  struct MonoClass * System_Reflection_Emit_MarshalAsAttribute.458;
  struct MonoImage * D.31922;
  struct MonoClass * System_Reflection_Emit_MarshalAsAttribute.459;
  _Bool D.31924;
  long int D.31925;
  long int D.31926;
  <unnamed type> D.31929;
  unsigned int D.31930;
  <unnamed type> D.31931;
  int D.31932;
  short int D.31933;
  char * D.31936;
  struct MonoImage * D.31939;
  struct MonoReflectionType * * D.31942;
  struct MonoReflectionType * D.31943;
  struct MonoString * * D.31944;
  struct MonoString * D.31945;
  char * D.31946;
  struct MonoString * * D.31949;
  struct MonoString * D.31950;
  struct MonoReflectionMarshalAsAttribute * D.31951;
  static struct MonoClass * System_Reflection_Emit_MarshalAsAttribute;
  struct MonoReflectionMarshalAsAttribute * minfo;
  struct MonoType * mtype;

  System_Reflection_Emit_MarshalAsAttribute.458 = System_Reflection_Emit_MarshalAsAttribute;
  if (System_Reflection_Emit_MarshalAsAttribute.458 == 0B) goto <D.31920>; else goto <D.31921>;
  <D.31920>:
  D.31922 = mono_defaults.corlib;
  System_Reflection_Emit_MarshalAsAttribute.459 = mono_class_from_name (D.31922, "System.Runtime.InteropServices", "MarshalAsAttribute");
  System_Reflection_Emit_MarshalAsAttribute = System_Reflection_Emit_MarshalAsAttribute.459;
  System_Reflection_Emit_MarshalAsAttribute.458 = System_Reflection_Emit_MarshalAsAttribute;
  D.31924 = System_Reflection_Emit_MarshalAsAttribute.458 == 0B;
  D.31925 = (long int) D.31924;
  D.31926 = __builtin_expect (D.31925, 0);
  if (D.31926 != 0) goto <D.31927>; else goto <D.31928>;
  <D.31927>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10070, "System_Reflection_Emit_MarshalAsAttribute");
  <D.31928>:
  <D.31921>:
  System_Reflection_Emit_MarshalAsAttribute.458 = System_Reflection_Emit_MarshalAsAttribute;
  minfo = mono_object_new (domain, System_Reflection_Emit_MarshalAsAttribute.458);
  D.31929 = spec->native;
  minfo->utype = D.31929;
  D.31930 = minfo->utype;
  switch (D.31930) <default: <D.22057>, case 23: <D.22054>, case 30: <D.22055>, case 42: <D.22052>, case 44: <D.22056>>
  <D.22052>:
  D.31931 = spec->data.array_data.elem_type;
  minfo->array_subtype = D.31931;
  D.31932 = spec->data.array_data.num_elem;
  minfo->size_const = D.31932;
  D.31933 = spec->data.array_data.param_num;
  if (D.31933 != -1) goto <D.31934>; else goto <D.31935>;
  <D.31934>:
  D.31933 = spec->data.array_data.param_num;
  minfo->size_param_index = D.31933;
  <D.31935>:
  goto <D.22053>;
  <D.22054>:
  <D.22055>:
  D.31932 = spec->data.array_data.num_elem;
  minfo->size_const = D.31932;
  goto <D.22053>;
  <D.22056>:
  D.31936 = spec->data.custom_data.custom_name;
  if (D.31936 != 0B) goto <D.31937>; else goto <D.31938>;
  <D.31937>:
  D.31936 = spec->data.custom_data.custom_name;
  D.31939 = klass->image;
  mtype = mono_reflection_type_from_name (D.31936, D.31939);
  if (mtype != 0B) goto <D.31940>; else goto <D.31941>;
  <D.31940>:
  D.31942 = &minfo->marshal_type_ref;
  D.31943 = mono_type_get_object (domain, mtype);
  mono_gc_wbarrier_set_field (minfo, D.31942, D.31943);
  <D.31941>:
  D.31944 = &minfo->marshal_type;
  D.31936 = spec->data.custom_data.custom_name;
  D.31945 = mono_string_new (domain, D.31936);
  mono_gc_wbarrier_set_field (minfo, D.31944, D.31945);
  <D.31938>:
  D.31946 = spec->data.custom_data.cookie;
  if (D.31946 != 0B) goto <D.31947>; else goto <D.31948>;
  <D.31947>:
  D.31949 = &minfo->marshal_cookie;
  D.31946 = spec->data.custom_data.cookie;
  D.31950 = mono_string_new (domain, D.31946);
  mono_gc_wbarrier_set_field (minfo, D.31949, D.31950);
  <D.31948>:
  goto <D.22053>;
  <D.22057>:
  goto <D.22053>;
  <D.22053>:
  D.31951 = minfo;
  return D.31951;
}


__attribute__((visibility ("hidden")))
mono_reflection_bind_generic_parameters (struct MonoReflectionType * type, int type_argc, struct MonoType * * types)
{
  struct MonoVTable * D.31954;
  struct MonoClass * D.31955;
  int D.31956;
  int D.31960;
  struct MonoVTable * D.31963;
  struct MonoClass * D.31964;
  int D.31965;
  struct MonoGenericContainer * D.31970;
  struct MonoType * D.31973;
  struct MonoGenericContainer * D.31974;
  struct MonoType * D.31977;
  long unsigned int D.31978;
  long unsigned int D.31979;
  struct MonoClass * klass;
  struct MonoReflectionTypeBuilder * tb;
  gboolean is_dynamic;
  struct MonoDomain * domain;
  struct MonoClass * geninst;

  tb = 0B;
  is_dynamic = 0;
  mono_loader_lock ();
  D.31954 = MEM[(struct MonoObject *)type].vtable;
  domain = D.31954->domain;
  D.31954 = MEM[(struct MonoObject *)type].vtable;
  D.31955 = D.31954->klass;
  D.31956 = is_sre_type_builder (D.31955);
  if (D.31956 != 0) goto <D.31957>; else goto <D.31958>;
  <D.31957>:
  tb = type;
  is_dynamic = 1;
  goto <D.31959>;
  <D.31958>:
  D.31954 = MEM[(struct MonoObject *)type].vtable;
  D.31955 = D.31954->klass;
  D.31960 = is_sre_generic_instance (D.31955);
  if (D.31960 != 0) goto <D.31961>; else goto <D.31962>;
  <D.31961>:
  {
    struct MonoReflectionGenericClass * rgi;
    struct MonoReflectionType * gtd;

    rgi = type;
    gtd = rgi->generic_type;
    D.31963 = MEM[(struct MonoObject *)gtd].vtable;
    D.31964 = D.31963->klass;
    D.31965 = is_sre_type_builder (D.31964);
    if (D.31965 != 0) goto <D.31966>; else goto <D.31967>;
    <D.31966>:
    tb = gtd;
    is_dynamic = 1;
    <D.31967>:
  }
  <D.31962>:
  <D.31959>:
  if (tb != 0B) goto <D.31968>; else goto <D.31969>;
  <D.31968>:
  D.31970 = tb->generic_container;
  if (D.31970 != 0B) goto <D.31971>; else goto <D.31972>;
  <D.31971>:
  mono_reflection_create_generic_class (tb);
  <D.31972>:
  <D.31969>:
  D.31973 = mono_reflection_type_get_handle (type);
  klass = mono_class_from_mono_type (D.31973);
  D.31974 = klass->generic_container;
  if (D.31974 == 0B) goto <D.31975>; else goto <D.31976>;
  <D.31975>:
  mono_loader_unlock ();
  D.31977 = 0B;
  return D.31977;
  <D.31976>:
  D.31978 = BIT_FIELD_REF <*klass, 64, 256>;
  D.31979 = D.31978 & 72057594037927936;
  if (D.31979 != 0) goto <D.31980>; else goto <D.31981>;
  <D.31980>:
  tb = mono_class_get_ref_info (klass);
  is_dynamic = 1;
  <D.31981>:
  mono_loader_unlock ();
  geninst = mono_class_bind_generic_parameters (klass, type_argc, types, is_dynamic);
  D.31977 = &geninst->byval_arg;
  return D.31977;
}


__attribute__((visibility ("hidden")))
mono_class_bind_generic_parameters (struct MonoClass * klass, int type_argc, struct MonoType * * types, gboolean is_dynamic)
{
  struct MonoGenericContainer * D.31983;
  _Bool D.31984;
  long int D.31985;
  long int D.31986;
  struct MonoClass * D.31989;
  struct MonoGenericClass * gclass;
  struct MonoGenericInst * inst;

  D.31983 = klass->generic_container;
  D.31984 = D.31983 == 0B;
  D.31985 = (long int) D.31984;
  D.31986 = __builtin_expect (D.31985, 0);
  if (D.31986 != 0) goto <D.31987>; else goto <D.31988>;
  <D.31987>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10507, "klass->generic_container");
  <D.31988>:
  inst = mono_metadata_get_generic_inst (type_argc, types);
  gclass = mono_metadata_lookup_generic_class (klass, inst, is_dynamic);
  D.31989 = mono_generic_class_get_class (gclass);
  return D.31989;
}


__attribute__((visibility ("hidden")))
mono_reflection_bind_generic_method_parameters (struct MonoReflectionMethod * rmethod, struct MonoArray * types)
{
  struct MonoVTable * D.31991;
  struct MonoClass * D.31992;
  const char * D.31993;
  int D.31994;
  struct MonoType * D.31997;
  long unsigned int D.31999;
  long unsigned int D.32000;
  struct MonoMethodSignature * D.32003;
  short unsigned int D.32004;
  long unsigned int D.32005;
  long unsigned int D.32006;
  struct MonoReflectionMethod * D.32009;
  long unsigned int D.32010;
  long unsigned int D.32011;
  long unsigned int D.32012;
  char * D.32013;
  long unsigned int D.32014;
  long unsigned int D.32015;
  struct MonoType * * D.32016;
  struct MonoType * D.32017;
  struct MonoGenericInst * iftmp.460;
  struct MonoGenericClass * D.32019;
  struct MonoClass * D.32023;
  struct MonoImage * D.32024;
  long unsigned int D.32025;
  long unsigned int D.32026;
  struct MonoGHashTable * D.32029;
  int D.32030;
  struct MonoException * D.32033;
  struct MonoVTable * D.32034;
  struct MonoDomain * D.32035;
  struct MonoClass * klass;
  struct MonoMethod * method;
  struct MonoMethod * inflated;
  struct MonoMethodInflated * imethod;
  struct MonoGenericContext tmp_context;
  struct MonoGenericInst * ginst;
  struct MonoType * * type_argv;
  int count;
  int i;

  try
    {
      D.31991 = rmethod->object.vtable;
      D.31992 = D.31991->klass;
      D.31993 = D.31992->name;
      D.31994 = strcmp (D.31993, "MethodBuilder");
      if (D.31994 == 0) goto <D.31995>; else goto <D.31996>;
      <D.31995>:
      {
        struct MonoReflectionMethodBuilder * mb;
        struct MonoReflectionTypeBuilder * tb;
        struct MonoClass * klass;

        mb = 0B;
        mb = rmethod;
        tb = mb->type;
        D.31997 = mono_reflection_type_get_handle (tb);
        klass = mono_class_from_mono_type (D.31997);
        method = methodbuilder_to_mono_method (klass, mb);
      }
      goto <D.31998>;
      <D.31996>:
      method = rmethod->method;
      <D.31998>:
      klass = method->klass;
      D.31999 = BIT_FIELD_REF <*method, 64, 256>;
      D.32000 = D.31999 & 2251799813685248;
      if (D.32000 != 0) goto <D.32001>; else goto <D.32002>;
      <D.32001>:
      method = MEM[(struct MonoMethodInflated *)method].declaring;
      <D.32002>:
      D.32003 = mono_method_signature (method);
      D.32004 = D.32003->generic_param_count;
      count = (int) D.32004;
      D.32005 = (long unsigned int) count;
      D.32006 = mono_array_length (types);
      if (D.32005 != D.32006) goto <D.32007>; else goto <D.32008>;
      <D.32007>:
      D.32009 = 0B;
      return D.32009;
      <D.32008>:
      D.32010 = (long unsigned int) count;
      D.32011 = D.32010 * 8;
      type_argv = monoeg_malloc0 (D.32011);
      i = 0;
      goto <D.22171>;
      <D.22170>:
      {
        struct MonoReflectionType * garg;

        D.32012 = (long unsigned int) i;
        D.32013 = mono_array_addr_with_size (types, 8, D.32012);
        garg = MEM[(void * *)D.32013];
        D.32014 = (long unsigned int) i;
        D.32015 = D.32014 * 8;
        D.32016 = type_argv + D.32015;
        D.32017 = mono_reflection_type_get_handle (garg);
        *D.32016 = D.32017;
      }
      i = i + 1;
      <D.22171>:
      if (i < count) goto <D.22170>; else goto <D.22172>;
      <D.22172>:
      ginst = mono_metadata_get_generic_inst (count, type_argv);
      monoeg_g_free (type_argv);
      D.32019 = klass->generic_class;
      if (D.32019 != 0B) goto <D.32020>; else goto <D.32021>;
      <D.32020>:
      D.32019 = klass->generic_class;
      iftmp.460 = D.32019->context.class_inst;
      goto <D.32022>;
      <D.32021>:
      iftmp.460 = 0B;
      <D.32022>:
      tmp_context.class_inst = iftmp.460;
      tmp_context.method_inst = ginst;
      inflated = mono_class_inflate_generic_method (method, &tmp_context);
      imethod = inflated;
      D.32023 = method->klass;
      D.32024 = D.32023->image;
      D.32025 = BIT_FIELD_REF <*D.32024, 64, 192>;
      D.32026 = D.32025 & 268435456;
      if (D.32026 != 0) goto <D.32027>; else goto <D.32028>;
      <D.32027>:
      {
        struct MonoDynamicImage * image;

        D.32023 = method->klass;
        image = D.32023->image;
        mono_image_lock (image);
        D.32029 = image->generic_def_objects;
        mono_g_hash_table_insert (D.32029, imethod, rmethod);
        mono_image_unlock (image);
      }
      <D.32028>:
      D.32030 = mono_verifier_is_method_valid_generic_instantiation (inflated);
      if (D.32030 == 0) goto <D.32031>; else goto <D.32032>;
      <D.32031>:
      D.32033 = mono_get_exception_argument ("typeArguments", "Invalid generic arguments");
      mono_raise_exception (D.32033);
      <D.32032>:
      D.32034 = MEM[(struct MonoObject *)rmethod].vtable;
      D.32035 = D.32034->domain;
      D.32009 = mono_method_get_object (D.32035, inflated, 0B);
      return D.32009;
    }
  finally
    {
      tmp_context = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_generic_class_initialize (struct MonoReflectionGenericClass * type, struct MonoArray * fields)
{
  unsigned char D.32038;
  _Bool D.32039;
  long int D.32040;
  long int D.32041;
  long unsigned int D.32044;
  long unsigned int D.32045;
  unsigned int D.32048;
  int iftmp.461;
  long unsigned int D.32054;
  struct MonoImageSet * D.32056;
  int D.32057;
  long unsigned int D.32058;
  unsigned int D.32059;
  unsigned int D.32060;
  void * D.32061;
  unsigned int D.32062;
  void * D.32063;
  void * D.32064;
  long unsigned int D.32065;
  char * D.32066;
  struct MonoVTable * D.32067;
  struct MonoClass * D.32068;
  const char * D.32069;
  int D.32070;
  int D.32074;
  struct MonoClassField * D.32078;
  long unsigned int D.32079;
  long unsigned int D.32080;
  struct MonoClassField * D.32081;
  struct MonoType * D.32082;
  struct MonoGenericContext * D.32083;
  struct MonoType * D.32084;
  struct MonoType * * D.32085;
  long unsigned int D.32086;
  struct MonoType * * D.32087;
  int D.32088;
  struct MonoObject * * D.32093;
  struct MonoObject * * D.32094;
  void * D.32095;
  const char * D.32099;
  char * D.32100;
  struct MonoGenericClass * gclass;
  struct MonoDynamicGenericClass * dgclass;
  struct MonoClass * klass;
  struct MonoClass * gklass;
  struct MonoType * gtype;
  int i;

  gtype = mono_reflection_type_get_handle (type);
  klass = mono_class_from_mono_type (gtype);
  D.32038 = gtype->type;
  D.32039 = D.32038 != 21;
  D.32040 = (long int) D.32039;
  D.32041 = __builtin_expect (D.32040, 0);
  if (D.32041 != 0) goto <D.32042>; else goto <D.32043>;
  <D.32042>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10682, "gtype->type == MONO_TYPE_GENERICINST");
  <D.32043>:
  gclass = gtype->data.generic_class;
  D.32044 = BIT_FIELD_REF <*gclass, 64, 192>;
  D.32045 = D.32044 & 9223372036854775808;
  if (D.32045 == 0) goto <D.32046>; else goto <D.32047>;
  <D.32046>:
  return;
  <D.32047>:
  dgclass = gclass;
  D.32048 = dgclass->initialized;
  if (D.32048 != 0) goto <D.32049>; else goto <D.32050>;
  <D.32049>:
  return;
  <D.32050>:
  gklass = gclass->container_class;
  mono_class_init (gklass);
  if (fields != 0B) goto <D.32052>; else goto <D.32053>;
  <D.32052>:
  D.32054 = mono_array_length (fields);
  iftmp.461 = (int) D.32054;
  goto <D.32055>;
  <D.32053>:
  iftmp.461 = 0;
  <D.32055>:
  dgclass->count_fields = iftmp.461;
  D.32056 = gclass->owner;
  D.32057 = dgclass->count_fields;
  D.32058 = (long unsigned int) D.32057;
  D.32059 = (unsigned int) D.32058;
  D.32060 = D.32059 * 32;
  D.32061 = mono_image_set_alloc0 (D.32056, D.32060);
  dgclass->fields = D.32061;
  D.32056 = gclass->owner;
  D.32057 = dgclass->count_fields;
  D.32058 = (long unsigned int) D.32057;
  D.32059 = (unsigned int) D.32058;
  D.32062 = D.32059 * 8;
  D.32063 = mono_image_set_alloc0 (D.32056, D.32062);
  dgclass->field_objects = D.32063;
  D.32056 = gclass->owner;
  D.32057 = dgclass->count_fields;
  D.32058 = (long unsigned int) D.32057;
  D.32059 = (unsigned int) D.32058;
  D.32062 = D.32059 * 8;
  D.32064 = mono_image_set_alloc0 (D.32056, D.32062);
  dgclass->field_generic_types = D.32064;
  i = 0;
  goto <D.22210>;
  <D.22209>:
  {
    struct MonoObject * obj;
    struct MonoClassField * field;
    struct MonoClassField * inflated_field;

    D.32065 = (long unsigned int) i;
    D.32066 = mono_array_addr_with_size (fields, 8, D.32065);
    obj = MEM[(void * *)D.32066];
    inflated_field = 0B;
    D.32067 = obj->vtable;
    D.32068 = D.32067->klass;
    D.32069 = D.32068->name;
    D.32070 = strcmp (D.32069, "FieldBuilder");
    if (D.32070 == 0) goto <D.32071>; else goto <D.32072>;
    <D.32071>:
    field = fieldbuilder_to_mono_class_field (klass, obj);
    inflated_field = field;
    goto <D.32073>;
    <D.32072>:
    D.32067 = obj->vtable;
    D.32068 = D.32067->klass;
    D.32069 = D.32068->name;
    D.32074 = strcmp (D.32069, "MonoField");
    if (D.32074 == 0) goto <D.32075>; else goto <D.32076>;
    <D.32075>:
    field = MEM[(struct MonoReflectionField *)obj].field;
    goto <D.32077>;
    <D.32076>:
    field = 0B;
    monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 10712);
    <D.32077>:
    <D.32073>:
    D.32078 = dgclass->fields;
    D.32079 = (long unsigned int) i;
    D.32080 = D.32079 * 32;
    D.32081 = D.32078 + D.32080;
    *D.32081 = *field;
    D.32078 = dgclass->fields;
    D.32079 = (long unsigned int) i;
    D.32080 = D.32079 * 32;
    D.32081 = D.32078 + D.32080;
    D.32081->parent = klass;
    D.32078 = dgclass->fields;
    D.32079 = (long unsigned int) i;
    D.32080 = D.32079 * 32;
    D.32081 = D.32078 + D.32080;
    D.32082 = field->type;
    D.32083 = mono_generic_class_get_context (dgclass);
    D.32084 = mono_class_inflate_generic_type (D.32082, D.32083);
    D.32081->type = D.32084;
    D.32085 = dgclass->field_generic_types;
    D.32079 = (long unsigned int) i;
    D.32086 = D.32079 * 8;
    D.32087 = D.32085 + D.32086;
    D.32082 = field->type;
    *D.32087 = D.32082;
    D.32088 = mono_gc_is_moving ();
    if (D.32088 != 0) goto <D.32089>; else goto <D.32090>;
    <D.32089>:
    if (0 != 0) goto <D.32091>; else goto <D.32092>;
    <D.32091>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10720, "sizeof (dgclass->field_objects [i]) == sizeof (MonoObject*)");
    <D.32092>:
    D.32093 = dgclass->field_objects;
    D.32079 = (long unsigned int) i;
    D.32086 = D.32079 * 8;
    D.32094 = D.32093 + D.32086;
    D.32095 = mono_gc_make_root_descr_all_refs (1);
    mono_gc_register_root (D.32094, 8, D.32095);
    <D.32090>:
    D.32093 = dgclass->field_objects;
    D.32079 = (long unsigned int) i;
    D.32086 = D.32079 * 8;
    D.32094 = D.32093 + D.32086;
    *D.32094 = obj;
    if (inflated_field != 0B) goto <D.32096>; else goto <D.32097>;
    <D.32096>:
    monoeg_g_free (inflated_field);
    goto <D.32098>;
    <D.32097>:
    D.32078 = dgclass->fields;
    D.32079 = (long unsigned int) i;
    D.32080 = D.32079 * 32;
    D.32081 = D.32078 + D.32080;
    D.32056 = gclass->owner;
    D.32078 = dgclass->fields;
    D.32079 = (long unsigned int) i;
    D.32080 = D.32079 * 32;
    D.32081 = D.32078 + D.32080;
    D.32099 = D.32081->name;
    D.32100 = mono_image_set_strdup (D.32056, D.32099);
    D.32081->name = D.32100;
    <D.32098>:
  }
  i = i + 1;
  <D.22210>:
  D.32057 = dgclass->count_fields;
  if (D.32057 > i) goto <D.22209>; else goto <D.22211>;
  <D.22211>:
  dgclass->initialized = 1;
}


fieldbuilder_to_mono_class_field (struct MonoClass * klass, struct MonoReflectionFieldBuilder * fb)
{
  struct MonoImage * D.32102;
  struct MonoString * D.32103;
  char * D.32104;
  int D.32105;
  _Bool D.32106;
  long int D.32107;
  long int D.32108;
  unsigned int D.32114;
  struct MonoArray * D.32116;
  struct MonoArray * D.32118;
  struct MonoObject * D.32119;
  struct MonoType * D.32120;
  struct MonoType * D.32121;
  struct MonoType * D.32122;
  short unsigned int D.32123;
  long unsigned int D.32124;
  long unsigned int D.32125;
  _Bool D.32126;
  long int D.32127;
  long int D.32128;
  struct MonoType * D.32131;
  struct MonoType * D.32132;
  int D.32133;
  struct MonoArray * D.32136;
  struct MonoClassField * D.32137;
  struct MonoClassField * field;
  struct MonoType * custom;
  struct MonoError error;

  try
    {
      field = monoeg_malloc0 (32);
      D.32102 = klass->image;
      D.32103 = fb->name;
      D.32104 = mono_string_to_utf8_image (D.32102, D.32103, &error);
      field->name = D.32104;
      D.32105 = mono_error_ok (&error);
      D.32106 = D.32105 == 0;
      D.32107 = (long int) D.32106;
      D.32108 = __builtin_expect (D.32107, 0);
      if (D.32108 != 0) goto <D.32109>; else goto <D.32110>;
      <D.32109>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10427, "mono_error_ok (&error)");
      <D.32110>:
      D.32114 = fb->attrs;
      if (D.32114 != 0) goto <D.32111>; else goto <D.32115>;
      <D.32115>:
      D.32116 = fb->modreq;
      if (D.32116 != 0B) goto <D.32111>; else goto <D.32117>;
      <D.32117>:
      D.32118 = fb->modopt;
      if (D.32118 != 0B) goto <D.32111>; else goto <D.32112>;
      <D.32111>:
      D.32119 = fb->type;
      D.32120 = mono_reflection_type_get_handle (D.32119);
      D.32121 = mono_metadata_type_dup (0B, D.32120);
      field->type = D.32121;
      D.32122 = field->type;
      D.32114 = fb->attrs;
      D.32123 = (short unsigned int) D.32114;
      D.32122->attrs = D.32123;
      D.32102 = klass->image;
      D.32124 = BIT_FIELD_REF <*D.32102, 64, 192>;
      D.32125 = D.32124 & 268435456;
      D.32126 = D.32125 == 0;
      D.32127 = (long int) D.32126;
      D.32128 = __builtin_expect (D.32127, 0);
      if (D.32128 != 0) goto <D.32129>; else goto <D.32130>;
      <D.32129>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10432, "klass->image->dynamic");
      <D.32130>:
      D.32102 = klass->image;
      D.32122 = field->type;
      D.32116 = fb->modreq;
      D.32118 = fb->modopt;
      custom = add_custom_modifiers (D.32102, D.32122, D.32116, D.32118);
      D.32122 = field->type;
      monoeg_g_free (D.32122);
      D.32102 = klass->image;
      D.32131 = mono_metadata_type_dup (D.32102, custom);
      field->type = D.32131;
      monoeg_g_free (custom);
      goto <D.32113>;
      <D.32112>:
      D.32119 = fb->type;
      D.32132 = mono_reflection_type_get_handle (D.32119);
      field->type = D.32132;
      <D.32113>:
      D.32133 = fb->offset;
      if (D.32133 != -1) goto <D.32134>; else goto <D.32135>;
      <D.32134>:
      D.32133 = fb->offset;
      field->offset = D.32133;
      <D.32135>:
      field->parent = klass;
      D.32102 = klass->image;
      D.32136 = fb->cattrs;
      mono_save_custom_attrs (D.32102, field, D.32136);
      D.32137 = field;
      return D.32137;
    }
  finally
    {
      error = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_free_dynamic_generic_class (struct MonoGenericClass * gclass)
{
  long unsigned int D.32140;
  signed long D.32141;
  _Bool D.32142;
  long int D.32143;
  long int D.32144;
  struct MonoClassField * D.32147;
  long unsigned int D.32148;
  long unsigned int D.32149;
  struct MonoType * D.32150;
  int D.32151;
  struct MonoObject * * D.32154;
  long unsigned int D.32155;
  struct MonoObject * * D.32156;
  int D.32157;
  struct MonoDynamicGenericClass * dgclass;
  int i;

  D.32140 = BIT_FIELD_REF <*gclass, 64, 192>;
  D.32141 = (signed long) D.32140;
  D.32142 = D.32141 >= 0;
  D.32143 = (long int) D.32142;
  D.32144 = __builtin_expect (D.32143, 0);
  if (D.32144 != 0) goto <D.32145>; else goto <D.32146>;
  <D.32145>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10739, "gclass->is_dynamic");
  <D.32146>:
  dgclass = gclass;
  i = 0;
  goto <D.22219>;
  <D.22218>:
  {
    struct MonoClassField * field;

    D.32147 = dgclass->fields;
    D.32148 = (long unsigned int) i;
    D.32149 = D.32148 * 32;
    field = D.32147 + D.32149;
    D.32150 = field->type;
    mono_metadata_free_type (D.32150);
    D.32151 = mono_gc_is_moving ();
    if (D.32151 != 0) goto <D.32152>; else goto <D.32153>;
    <D.32152>:
    D.32154 = dgclass->field_objects;
    D.32148 = (long unsigned int) i;
    D.32155 = D.32148 * 8;
    D.32156 = D.32154 + D.32155;
    mono_gc_deregister_root (D.32156);
    <D.32153>:
  }
  i = i + 1;
  <D.22219>:
  D.32157 = dgclass->count_fields;
  if (D.32157 > i) goto <D.22218>; else goto <D.22220>;
  <D.22220>:
}


__attribute__((visibility ("hidden")))
mono_reflection_get_dynamic_overrides (struct MonoClass * klass, struct MonoMethod * * * overrides, int * num_overrides)
{
  struct MonoImage * D.32158;
  long unsigned int D.32159;
  long unsigned int D.32160;
  _Bool D.32161;
  long int D.32162;
  long int D.32163;
  void * D.32166;
  void * D.32169;
  struct MonoVTable * D.32170;
  struct MonoClass * D.32171;
  const char * D.32172;
  int D.32173;
  _Bool D.32174;
  long int D.32175;
  long int D.32176;
  struct MonoArray * D.32179;
  long unsigned int D.32182;
  char * D.32183;
  struct MonoArray * D.32184;
  long unsigned int D.32187;
  unsigned int D.32188;
  unsigned int onum.462;
  unsigned int D.32190;
  int D.32191;
  int D.32194;
  long unsigned int D.32195;
  long unsigned int D.32196;
  void * D.32197;
  char * D.32198;
  struct MonoArray * D.32199;
  long unsigned int D.32202;
  char * D.32203;
  struct MonoMethod * * D.32204;
  struct MonoMethod * * D.32205;
  struct MonoMethod * D.32206;
  sizetype D.32207;
  sizetype D.32208;
  sizetype D.32209;
  struct MonoMethod * * D.32210;
  struct MonoMethod * D.32211;
  _Bool D.32212;
  long int D.32213;
  long int D.32214;
  long unsigned int D.32217;
  struct MonoReflectionTypeBuilder * tb;
  int i;
  int j;
  int onum;
  struct MonoReflectionMethod * m;

  *overrides = 0B;
  *num_overrides = 0;
  D.32158 = klass->image;
  D.32159 = BIT_FIELD_REF <*D.32158, 64, 192>;
  D.32160 = D.32159 & 268435456;
  D.32161 = D.32160 == 0;
  D.32162 = (long int) D.32161;
  D.32163 = __builtin_expect (D.32162, 0);
  if (D.32163 != 0) goto <D.32164>; else goto <D.32165>;
  <D.32164>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10948, "klass->image->dynamic");
  <D.32165>:
  D.32166 = mono_class_get_ref_info (klass);
  if (D.32166 == 0B) goto <D.32167>; else goto <D.32168>;
  <D.32167>:
  return;
  <D.32168>:
  D.32169 = mono_class_get_ref_info (klass);
  D.32170 = MEM[(struct MonoObject *)D.32169].vtable;
  D.32171 = D.32170->klass;
  D.32172 = D.32171->name;
  D.32173 = strcmp (D.32172, "TypeBuilder");
  D.32174 = D.32173 != 0;
  D.32175 = (long int) D.32174;
  D.32176 = __builtin_expect (D.32175, 0);
  if (D.32176 != 0) goto <D.32177>; else goto <D.32178>;
  <D.32177>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10953, "strcmp (((MonoObject*)mono_class_get_ref_info (klass))->vtable->klass->name, \"TypeBuilder\") == 0");
  <D.32178>:
  tb = mono_class_get_ref_info (klass);
  onum = 0;
  D.32179 = tb->methods;
  if (D.32179 != 0B) goto <D.32180>; else goto <D.32181>;
  <D.32180>:
  i = 0;
  goto <D.22291>;
  <D.22290>:
  {
    struct MonoReflectionMethodBuilder * mb;

    D.32179 = tb->methods;
    D.32182 = (long unsigned int) i;
    D.32183 = mono_array_addr_with_size (D.32179, 8, D.32182);
    mb = MEM[(struct MonoReflectionMethodBuilder * *)D.32183];
    D.32184 = mb->override_methods;
    if (D.32184 != 0B) goto <D.32185>; else goto <D.32186>;
    <D.32185>:
    D.32184 = mb->override_methods;
    D.32187 = mono_array_length (D.32184);
    D.32188 = (unsigned int) D.32187;
    onum.462 = (unsigned int) onum;
    D.32190 = D.32188 + onum.462;
    onum = (int) D.32190;
    <D.32186>:
  }
  i = i + 1;
  <D.22291>:
  D.32191 = tb->num_methods;
  if (D.32191 > i) goto <D.22290>; else goto <D.22292>;
  <D.22292>:
  <D.32181>:
  if (onum != 0) goto <D.32192>; else goto <D.32193>;
  <D.32192>:
  D.32194 = onum * 2;
  D.32195 = (long unsigned int) D.32194;
  D.32196 = D.32195 * 8;
  D.32197 = monoeg_malloc0 (D.32196);
  *overrides = D.32197;
  onum = 0;
  i = 0;
  goto <D.22298>;
  <D.22297>:
  {
    struct MonoReflectionMethodBuilder * mb;

    D.32179 = tb->methods;
    D.32182 = (long unsigned int) i;
    D.32198 = mono_array_addr_with_size (D.32179, 8, D.32182);
    mb = MEM[(struct MonoReflectionMethodBuilder * *)D.32198];
    D.32199 = mb->override_methods;
    if (D.32199 != 0B) goto <D.32200>; else goto <D.32201>;
    <D.32200>:
    j = 0;
    goto <D.22295>;
    <D.22294>:
    D.32199 = mb->override_methods;
    D.32202 = (long unsigned int) j;
    D.32203 = mono_array_addr_with_size (D.32199, 8, D.32202);
    m = MEM[(struct MonoReflectionMethod * *)D.32203];
    D.32204 = *overrides;
    D.32194 = onum * 2;
    D.32195 = (long unsigned int) D.32194;
    D.32196 = D.32195 * 8;
    D.32205 = D.32204 + D.32196;
    D.32206 = mono_reflection_method_get_handle (m);
    *D.32205 = D.32206;
    D.32204 = *overrides;
    D.32194 = onum * 2;
    D.32207 = (sizetype) D.32194;
    D.32208 = D.32207 + 1;
    D.32209 = D.32208 * 8;
    D.32210 = D.32204 + D.32209;
    D.32211 = mb->mhandle;
    *D.32210 = D.32211;
    D.32211 = mb->mhandle;
    D.32212 = D.32211 == 0B;
    D.32213 = (long int) D.32212;
    D.32214 = __builtin_expect (D.32213, 0);
    if (D.32214 != 0) goto <D.32215>; else goto <D.32216>;
    <D.32215>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 10981, "mb->mhandle");
    <D.32216>:
    onum = onum + 1;
    j = j + 1;
    <D.22295>:
    D.32202 = (long unsigned int) j;
    D.32199 = mb->override_methods;
    D.32217 = mono_array_length (D.32199);
    if (D.32202 < D.32217) goto <D.22294>; else goto <D.22296>;
    <D.22296>:
    <D.32201>:
  }
  i = i + 1;
  <D.22298>:
  D.32191 = tb->num_methods;
  if (D.32191 > i) goto <D.22297>; else goto <D.22299>;
  <D.22299>:
  <D.32193>:
  *num_overrides = onum;
}


mono_reflection_method_get_handle (struct MonoObject * method)
{
  struct MonoVTable * D.32219;
  int D.32222;
  int D.32224;
  struct MonoMethod * D.32225;
  int D.32226;
  int D.32229;
  struct MonoArray * D.32232;
  struct MonoReflectionType * D.32236;
  struct MonoObject * D.32237;
  struct MonoVTable * D.32238;
  struct MonoClass * D.32239;
  int D.32240;
  int D.32244;
  char * D.32248;
  const char * D.32249;
  const char * D.32250;
  struct MonoClass * class;

  D.32219 = method->vtable;
  class = D.32219->klass;
  D.32222 = is_sr_mono_method (class);
  if (D.32222 != 0) goto <D.32220>; else goto <D.32223>;
  <D.32223>:
  D.32224 = is_sr_mono_generic_method (class);
  if (D.32224 != 0) goto <D.32220>; else goto <D.32221>;
  <D.32220>:
  {
    struct MonoReflectionMethod * sr_method;

    sr_method = method;
    D.32225 = sr_method->method;
    return D.32225;
  }
  <D.32221>:
  D.32226 = is_sre_method_builder (class);
  if (D.32226 != 0) goto <D.32227>; else goto <D.32228>;
  <D.32227>:
  {
    struct MonoReflectionMethodBuilder * mb;

    mb = method;
    D.32225 = mb->mhandle;
    return D.32225;
  }
  <D.32228>:
  D.32229 = is_sre_method_on_tb_inst (class);
  if (D.32229 != 0) goto <D.32230>; else goto <D.32231>;
  <D.32230>:
  {
    struct MonoReflectionMethodOnTypeBuilderInst * m;
    struct MonoMethod * result;

    m = method;
    D.32232 = m->method_args;
    if (D.32232 != 0B) goto <D.32233>; else goto <D.32234>;
    <D.32233>:
    result = mono_reflection_method_on_tb_inst_get_handle (m);
    goto <D.32235>;
    <D.32234>:
    {
      struct MonoType * type;
      struct MonoClass * inflated_klass;
      struct MonoMethod * mono_method;

      D.32236 = m->inst;
      type = mono_reflection_type_get_handle (D.32236);
      inflated_klass = mono_class_from_mono_type (type);
      D.32237 = m->mb;
      D.32238 = D.32237->vtable;
      D.32239 = D.32238->klass;
      D.32240 = is_sre_method_builder (D.32239);
      if (D.32240 != 0) goto <D.32241>; else goto <D.32242>;
      <D.32241>:
      D.32237 = m->mb;
      mono_method = MEM[(struct MonoReflectionMethodBuilder *)D.32237].mhandle;
      goto <D.32243>;
      <D.32242>:
      D.32237 = m->mb;
      D.32238 = D.32237->vtable;
      D.32239 = D.32238->klass;
      D.32244 = is_sr_mono_method (D.32239);
      if (D.32244 != 0) goto <D.32245>; else goto <D.32246>;
      <D.32245>:
      D.32237 = m->mb;
      mono_method = MEM[(struct MonoReflectionMethod *)D.32237].method;
      goto <D.32247>;
      <D.32246>:
      D.32237 = m->mb;
      D.32238 = D.32237->vtable;
      D.32239 = D.32238->klass;
      D.32248 = mono_type_get_full_name (D.32239);
      monoeg_g_log (0B, 4, "resolve_object:: can\'t handle a MTBI with base_method of type %s", D.32248);
      <D.22277>:
      goto <D.22277>;
      <D.32247>:
      <D.32243>:
      D.32237 = m->mb;
      result = inflate_mono_method (inflated_klass, mono_method, D.32237);
    }
    <D.32235>:
    D.32225 = result;
    return D.32225;
  }
  <D.32231>:
  D.32249 = class->name_space;
  D.32250 = class->name;
  monoeg_g_log (0B, 4, "Can\'t handle methods of type %s:%s", D.32249, D.32250);
  <D.22278>:
  goto <D.22278>;
  D.32225 = 0B;
  return D.32225;
}


__attribute__((visibility ("hidden")))
mono_reflection_event_builder_get_event_info (struct MonoReflectionTypeBuilder * tb, struct MonoReflectionEventBuilder * eb)
{
  struct MonoType * D.32252;
  unsigned int D.32253;
  struct MonoString * D.32254;
  char * D.32255;
  struct MonoReflectionMethodBuilder * D.32256;
  struct MonoMethod * D.32259;
  struct MonoReflectionMethodBuilder * D.32260;
  struct MonoMethod * D.32263;
  struct MonoReflectionMethodBuilder * D.32264;
  struct MonoMethod * D.32267;
  struct MonoArray * D.32268;
  long unsigned int D.32271;
  long unsigned int D.32272;
  long unsigned int D.32273;
  void * D.32274;
  long unsigned int D.32275;
  char * D.32276;
  struct MonoMethod * * D.32277;
  long unsigned int D.32278;
  long unsigned int D.32279;
  struct MonoMethod * * D.32280;
  struct MonoMethod * D.32281;
  long unsigned int D.32282;
  struct MonoReflectionEvent * D.32283;
  struct MonoVTable * D.32284;
  struct MonoDomain * D.32285;
  struct MonoEvent * event;
  struct MonoClass * klass;

  event = monoeg_malloc0 (56);
  D.32252 = mono_reflection_type_get_handle (tb);
  klass = mono_class_from_mono_type (D.32252);
  event->parent = klass;
  D.32253 = eb->attrs;
  event->attrs = D.32253;
  D.32254 = eb->name;
  D.32255 = mono_string_to_utf8 (D.32254);
  event->name = D.32255;
  D.32256 = eb->add_method;
  if (D.32256 != 0B) goto <D.32257>; else goto <D.32258>;
  <D.32257>:
  D.32256 = eb->add_method;
  D.32259 = D.32256->mhandle;
  event->add = D.32259;
  <D.32258>:
  D.32260 = eb->remove_method;
  if (D.32260 != 0B) goto <D.32261>; else goto <D.32262>;
  <D.32261>:
  D.32260 = eb->remove_method;
  D.32263 = D.32260->mhandle;
  event->remove = D.32263;
  <D.32262>:
  D.32264 = eb->raise_method;
  if (D.32264 != 0B) goto <D.32265>; else goto <D.32266>;
  <D.32265>:
  D.32264 = eb->raise_method;
  D.32267 = D.32264->mhandle;
  event->raise = D.32267;
  <D.32266>:
  D.32268 = eb->other_methods;
  if (D.32268 != 0B) goto <D.32269>; else goto <D.32270>;
  <D.32269>:
  {
    int j;

    D.32268 = eb->other_methods;
    D.32271 = mono_array_length (D.32268);
    D.32272 = D.32271 + 1;
    D.32273 = D.32272 * 8;
    D.32274 = monoeg_malloc0 (D.32273);
    event->other = D.32274;
    j = 0;
    goto <D.22349>;
    <D.22348>:
    {
      struct MonoReflectionMethodBuilder * mb;

      D.32268 = eb->other_methods;
      D.32275 = (long unsigned int) j;
      D.32276 = mono_array_addr_with_size (D.32268, 8, D.32275);
      mb = MEM[(struct MonoReflectionMethodBuilder * *)D.32276];
      D.32277 = event->other;
      D.32278 = (long unsigned int) j;
      D.32279 = D.32278 * 8;
      D.32280 = D.32277 + D.32279;
      D.32281 = mb->mhandle;
      *D.32280 = D.32281;
    }
    j = j + 1;
    <D.22349>:
    D.32275 = (long unsigned int) j;
    D.32268 = eb->other_methods;
    D.32282 = mono_array_length (D.32268);
    if (D.32275 < D.32282) goto <D.22348>; else goto <D.22350>;
    <D.22350>:
  }
  <D.32270>:
  D.32284 = MEM[(struct MonoObject *)tb].vtable;
  D.32285 = D.32284->domain;
  D.32283 = mono_event_get_object (D.32285, klass, event);
  return D.32283;
}


__attribute__((visibility ("hidden")))
mono_reflection_create_runtime_class (struct MonoReflectionTypeBuilder * tb)
{
  struct MonoVTable * D.32287;
  struct MonoType * D.32288;
  struct MonoObject * D.32289;
  struct MonoReflectionType * D.32290;
  struct MonoArray * D.32291;
  struct MonoArray * D.32292;
  long unsigned int D.32295;
  char * D.32296;
  struct MonoObject * D.32299;
  struct MonoReflectionType * D.32300;
  struct MonoArray * D.32301;
  struct MonoArray * D.32302;
  struct MonoReflectionMarshal * D.32303;
  struct MonoObject * D.32306;
  struct MonoReflectionType * D.32309;
  long unsigned int D.32310;
  struct MonoArray * D.32311;
  char * D.32314;
  struct MonoObject * D.32317;
  struct MonoReflectionType * D.32318;
  struct MonoArray * D.32319;
  struct MonoArray * D.32320;
  struct MonoArray * D.32321;
  struct MonoArray * D.32322;
  long unsigned int D.32325;
  char * D.32326;
  struct MonoArray * D.32327;
  long unsigned int D.32328;
  struct MonoArray * D.32329;
  char * D.32332;
  struct MonoArray * D.32333;
  long unsigned int D.32334;
  long unsigned int D.32335;
  struct MonoArray * D.32336;
  char * D.32339;
  struct MonoArray * D.32342;
  struct MonoArray * D.32343;
  char * D.32346;
  struct MonoArray * D.32347;
  long unsigned int D.32348;
  struct MonoArray * D.32349;
  char * D.32352;
  struct MonoArray * D.32353;
  long unsigned int D.32354;
  long unsigned int D.32355;
  struct MonoImage * D.32356;
  struct MonoArray * D.32357;
  union mono_mutex_t * D.32358;
  _Bool D.32361;
  long int D.32362;
  long int D.32363;
  long unsigned int D.32366;
  long unsigned int D.32367;
  _Bool D.32372;
  long int D.32373;
  long int D.32374;
  struct MonoReflectionType * D.32377;
  struct MonoDomain * D.32378;
  struct MonoType * D.32379;
  unsigned int D.32380;
  struct MonoClass * D.32381;
  long unsigned int D.32382;
  struct MonoArray * D.32385;
  char * D.32388;
  struct MonoClassExt * D.32389;
  struct GList * D.32390;
  struct MonoType * D.32391;
  struct MonoClass * D.32392;
  struct GList * D.32393;
  long unsigned int D.32394;
  long unsigned int D.32397;
  long unsigned int D.32398;
  int D.32401;
  unsigned char D.32402;
  <unnamed-unsigned:1> D.32403;
  <unnamed-unsigned:1> D.32404;
  <unnamed-unsigned:1> D.32405;
  int D.32407;
  int D.32409;
  int D.32411;
  struct MonoGHashTable * D.32413;
  struct MonoGenericContainer * D.32416;
  _Bool D.32421;
  long int D.32422;
  long int D.32423;
  int D.32428;
  struct MonoString * D.32431;
  struct MonoException * D.32432;
  _Bool D.32433;
  long int D.32434;
  long int D.32435;
  _Bool D.32440;
  long int D.32441;
  long int D.32442;
  struct MonoError error;
  struct MonoClass * klass;
  struct MonoDomain * domain;
  struct MonoReflectionType * res;
  int i;
  int j;
  void failure = <<< error >>>;

  try
    {
      D.32287 = MEM[(struct MonoObject *)tb].vtable;
      domain = D.32287->domain;
      D.32288 = tb->type.type;
      klass = mono_class_from_mono_type (D.32288);
      D.32289 = tb->parent;
      D.32290 = mono_reflection_type_resolve_user_types (D.32289);
      tb->parent = D.32290;
      D.32291 = tb->interfaces;
      check_array_for_usertypes (D.32291);
      D.32292 = tb->fields;
      if (D.32292 != 0B) goto <D.32293>; else goto <D.32294>;
      <D.32293>:
      i = 0;
      goto <D.22395>;
      <D.22394>:
      {
        struct MonoReflectionFieldBuilder * fb;

        D.32292 = tb->fields;
        D.32295 = (long unsigned int) i;
        D.32296 = mono_array_addr_with_size (D.32292, 8, D.32295);
        fb = MEM[(void * *)D.32296];
        if (fb != 0B) goto <D.32297>; else goto <D.32298>;
        <D.32297>:
        D.32299 = fb->type;
        D.32300 = mono_reflection_type_resolve_user_types (D.32299);
        fb->type = D.32300;
        D.32301 = fb->modreq;
        check_array_for_usertypes (D.32301);
        D.32302 = fb->modopt;
        check_array_for_usertypes (D.32302);
        D.32303 = fb->marshal_info;
        if (D.32303 != 0B) goto <D.32304>; else goto <D.32305>;
        <D.32304>:
        D.32303 = fb->marshal_info;
        D.32306 = D.32303->marshaltyperef;
        if (D.32306 != 0B) goto <D.32307>; else goto <D.32308>;
        <D.32307>:
        D.32303 = fb->marshal_info;
        D.32303 = fb->marshal_info;
        D.32306 = D.32303->marshaltyperef;
        D.32309 = mono_reflection_type_resolve_user_types (D.32306);
        D.32303->marshaltyperef = D.32309;
        <D.32308>:
        <D.32305>:
        <D.32298>:
      }
      i = i + 1;
      <D.22395>:
      D.32295 = (long unsigned int) i;
      D.32292 = tb->fields;
      D.32310 = mono_array_length (D.32292);
      if (D.32295 < D.32310) goto <D.22394>; else goto <D.22396>;
      <D.22396>:
      <D.32294>:
      D.32311 = tb->methods;
      if (D.32311 != 0B) goto <D.32312>; else goto <D.32313>;
      <D.32312>:
      i = 0;
      goto <D.22405>;
      <D.22404>:
      {
        struct MonoReflectionMethodBuilder * mb;

        D.32311 = tb->methods;
        D.32295 = (long unsigned int) i;
        D.32314 = mono_array_addr_with_size (D.32311, 8, D.32295);
        mb = MEM[(void * *)D.32314];
        if (mb != 0B) goto <D.32315>; else goto <D.32316>;
        <D.32315>:
        D.32317 = mb->rtype;
        D.32318 = mono_reflection_type_resolve_user_types (D.32317);
        mb->rtype = D.32318;
        D.32319 = mb->return_modreq;
        check_array_for_usertypes (D.32319);
        D.32320 = mb->return_modopt;
        check_array_for_usertypes (D.32320);
        D.32321 = mb->parameters;
        check_array_for_usertypes (D.32321);
        D.32322 = mb->param_modreq;
        if (D.32322 != 0B) goto <D.32323>; else goto <D.32324>;
        <D.32323>:
        j = 0;
        goto <D.22399>;
        <D.22398>:
        D.32322 = mb->param_modreq;
        D.32325 = (long unsigned int) j;
        D.32326 = mono_array_addr_with_size (D.32322, 8, D.32325);
        D.32327 = MEM[(struct MonoArray * *)D.32326];
        check_array_for_usertypes (D.32327);
        j = j + 1;
        <D.22399>:
        D.32325 = (long unsigned int) j;
        D.32322 = mb->param_modreq;
        D.32328 = mono_array_length (D.32322);
        if (D.32325 < D.32328) goto <D.22398>; else goto <D.22400>;
        <D.22400>:
        <D.32324>:
        D.32329 = mb->param_modopt;
        if (D.32329 != 0B) goto <D.32330>; else goto <D.32331>;
        <D.32330>:
        j = 0;
        goto <D.22402>;
        <D.22401>:
        D.32329 = mb->param_modopt;
        D.32325 = (long unsigned int) j;
        D.32332 = mono_array_addr_with_size (D.32329, 8, D.32325);
        D.32333 = MEM[(struct MonoArray * *)D.32332];
        check_array_for_usertypes (D.32333);
        j = j + 1;
        <D.22402>:
        D.32325 = (long unsigned int) j;
        D.32329 = mb->param_modopt;
        D.32334 = mono_array_length (D.32329);
        if (D.32325 < D.32334) goto <D.22401>; else goto <D.22403>;
        <D.22403>:
        <D.32331>:
        <D.32316>:
      }
      i = i + 1;
      <D.22405>:
      D.32295 = (long unsigned int) i;
      D.32311 = tb->methods;
      D.32335 = mono_array_length (D.32311);
      if (D.32295 < D.32335) goto <D.22404>; else goto <D.22406>;
      <D.22406>:
      <D.32313>:
      D.32336 = tb->ctors;
      if (D.32336 != 0B) goto <D.32337>; else goto <D.32338>;
      <D.32337>:
      i = 0;
      goto <D.22415>;
      <D.22414>:
      {
        struct MonoReflectionCtorBuilder * mb;

        D.32336 = tb->ctors;
        D.32295 = (long unsigned int) i;
        D.32339 = mono_array_addr_with_size (D.32336, 8, D.32295);
        mb = MEM[(void * *)D.32339];
        if (mb != 0B) goto <D.32340>; else goto <D.32341>;
        <D.32340>:
        D.32342 = mb->parameters;
        check_array_for_usertypes (D.32342);
        D.32343 = mb->param_modreq;
        if (D.32343 != 0B) goto <D.32344>; else goto <D.32345>;
        <D.32344>:
        j = 0;
        goto <D.22409>;
        <D.22408>:
        D.32343 = mb->param_modreq;
        D.32325 = (long unsigned int) j;
        D.32346 = mono_array_addr_with_size (D.32343, 8, D.32325);
        D.32347 = MEM[(struct MonoArray * *)D.32346];
        check_array_for_usertypes (D.32347);
        j = j + 1;
        <D.22409>:
        D.32325 = (long unsigned int) j;
        D.32343 = mb->param_modreq;
        D.32348 = mono_array_length (D.32343);
        if (D.32325 < D.32348) goto <D.22408>; else goto <D.22410>;
        <D.22410>:
        <D.32345>:
        D.32349 = mb->param_modopt;
        if (D.32349 != 0B) goto <D.32350>; else goto <D.32351>;
        <D.32350>:
        j = 0;
        goto <D.22412>;
        <D.22411>:
        D.32349 = mb->param_modopt;
        D.32325 = (long unsigned int) j;
        D.32352 = mono_array_addr_with_size (D.32349, 8, D.32325);
        D.32353 = MEM[(struct MonoArray * *)D.32352];
        check_array_for_usertypes (D.32353);
        j = j + 1;
        <D.22412>:
        D.32325 = (long unsigned int) j;
        D.32349 = mb->param_modopt;
        D.32354 = mono_array_length (D.32349);
        if (D.32325 < D.32354) goto <D.22411>; else goto <D.22413>;
        <D.22413>:
        <D.32351>:
        <D.32341>:
      }
      i = i + 1;
      <D.22415>:
      D.32295 = (long unsigned int) i;
      D.32336 = tb->ctors;
      D.32355 = mono_array_length (D.32336);
      if (D.32295 < D.32355) goto <D.22414>; else goto <D.22416>;
      <D.22416>:
      <D.32338>:
      D.32356 = klass->image;
      D.32357 = tb->cattrs;
      mono_save_custom_attrs (D.32356, klass, D.32357);
      mono_loader_lock ();
      {
        int ret;

        D.32358 = &domain->lock.mutex;
        ret = pthread_mutex_lock (D.32358);
        if (ret != 0) goto <D.32359>; else goto <D.32360>;
        <D.32359>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_lock result %d", ret);
        <D.32360>:
        D.32361 = ret != 0;
        D.32362 = (long int) D.32361;
        D.32363 = __builtin_expect (D.32362, 0);
        if (D.32363 != 0) goto <D.32364>; else goto <D.32365>;
        <D.32364>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11312, "ret == 0");
        <D.32365>:
      }
      D.32366 = BIT_FIELD_REF <*klass, 64, 256>;
      D.32367 = D.32366 & 72057594037927936;
      if (D.32367 != 0) goto <D.32368>; else goto <D.32369>;
      <D.32368>:
      {
        int ret;

        D.32358 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.32358);
        if (ret != 0) goto <D.32370>; else goto <D.32371>;
        <D.32370>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.32371>:
        D.32372 = ret != 0;
        D.32373 = (long int) D.32372;
        D.32374 = __builtin_expect (D.32373, 0);
        if (D.32374 != 0) goto <D.32375>; else goto <D.32376>;
        <D.32375>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11314, "ret == 0");
        <D.32376>:
      }
      mono_loader_unlock ();
      D.32287 = MEM[(struct MonoObject *)tb].vtable;
      D.32378 = D.32287->domain;
      D.32379 = &klass->byval_arg;
      D.32377 = mono_type_get_object (D.32378, D.32379);
      return D.32377;
      <D.32369>:
      D.32380 = tb->attrs;
      klass->flags = D.32380;
      klass->has_cctor = 1;
      klass->has_finalize = 1;
      klass->has_finalize_inited = 1;
      klass->supertypes = 0B;
      D.32381 = klass->parent;
      mono_class_setup_parent (klass, D.32381);
      mono_class_setup_mono_type (klass);
      D.32366 = BIT_FIELD_REF <*klass, 64, 256>;
      D.32382 = D.32366 & 576460752303423488;
      if (D.32382 == 0) goto <D.32383>; else goto <D.32384>;
      <D.32383>:
      ensure_runtime_vtable (klass);
      <D.32384>:
      D.32385 = tb->subtypes;
      if (D.32385 != 0B) goto <D.32386>; else goto <D.32387>;
      <D.32386>:
      i = 0;
      goto <D.22421>;
      <D.22420>:
      {
        struct MonoReflectionTypeBuilder * subtb;

        D.32385 = tb->subtypes;
        D.32295 = (long unsigned int) i;
        D.32388 = mono_array_addr_with_size (D.32385, 8, D.32295);
        subtb = MEM[(struct MonoReflectionTypeBuilder * *)D.32388];
        mono_class_alloc_ext (klass);
        D.32389 = klass->ext;
        D.32356 = klass->image;
        D.32389 = klass->ext;
        D.32390 = D.32389->nested_classes;
        D.32391 = mono_reflection_type_get_handle (subtb);
        D.32392 = mono_class_from_mono_type (D.32391);
        D.32393 = g_list_prepend_image (D.32356, D.32390, D.32392);
        D.32389->nested_classes = D.32393;
      }
      i = i + 1;
      <D.22421>:
      D.32295 = (long unsigned int) i;
      D.32385 = tb->subtypes;
      D.32394 = mono_array_length (D.32385);
      if (D.32295 < D.32394) goto <D.22420>; else goto <D.22422>;
      <D.22422>:
      <D.32387>:
      klass->nested_classes_inited = 1;
      D.32381 = klass->parent;
      if (D.32381 != 0B) goto <D.32395>; else goto <D.32396>;
      <D.32395>:
      D.32381 = klass->parent;
      D.32397 = BIT_FIELD_REF <*D.32381, 64, 256>;
      D.32398 = D.32397 & 2305843009213693952;
      if (D.32398 == 0) goto <D.32399>; else goto <D.32400>;
      <D.32399>:
      D.32381 = klass->parent;
      mono_class_init (D.32381);
      <D.32400>:
      D.32381 = klass->parent;
      D.32401 = D.32381->instance_size;
      klass->instance_size = D.32401;
      klass->sizes.class_size = 0;
      D.32381 = klass->parent;
      D.32402 = D.32381->min_align;
      klass->min_align = D.32402;
      D.32403 = klass->has_references;
      D.32381 = klass->parent;
      D.32404 = D.32381->has_references;
      D.32405 = D.32403 | D.32404;
      klass->has_references = D.32405;
      goto <D.32406>;
      <D.32396>:
      klass->instance_size = 16;
      klass->min_align = 1;
      <D.32406>:
      typebuilder_setup_fields (klass, &error);
      D.32407 = mono_error_ok (&error);
      if (D.32407 == 0) goto failure; else goto <D.32408>;
      <D.32408>:
      typebuilder_setup_properties (klass, &error);
      D.32409 = mono_error_ok (&error);
      if (D.32409 == 0) goto failure; else goto <D.32410>;
      <D.32410>:
      typebuilder_setup_events (klass, &error);
      D.32411 = mono_error_ok (&error);
      if (D.32411 == 0) goto failure; else goto <D.32412>;
      <D.32412>:
      klass->wastypebuilder = 1;
      D.32413 = domain->type_hash;
      if (D.32413 != 0B) goto <D.32414>; else goto <D.32415>;
      <D.32414>:
      D.32416 = klass->generic_container;
      if (D.32416 != 0B) goto <D.32417>; else goto <D.32418>;
      <D.32417>:
      D.32413 = domain->type_hash;
      mono_g_hash_table_foreach_remove (D.32413, remove_instantiations_of_and_ensure_contents, klass);
      <D.32418>:
      <D.32415>:
      {
        int ret;

        D.32358 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.32358);
        if (ret != 0) goto <D.32419>; else goto <D.32420>;
        <D.32419>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.32420>:
        D.32421 = ret != 0;
        D.32422 = (long int) D.32421;
        D.32423 = __builtin_expect (D.32422, 0);
        if (D.32423 != 0) goto <D.32424>; else goto <D.32425>;
        <D.32424>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11398, "ret == 0");
        <D.32425>:
      }
      mono_loader_unlock ();
      D.32366 = BIT_FIELD_REF <*klass, 64, 256>;
      D.32382 = D.32366 & 576460752303423488;
      if (D.32382 != 0) goto <D.32426>; else goto <D.32427>;
      <D.32426>:
      D.32428 = mono_class_is_valid_enum (klass);
      if (D.32428 == 0) goto <D.32429>; else goto <D.32430>;
      <D.32429>:
      mono_class_set_failure (klass, 7, 0B);
      D.32431 = tb->name;
      D.32432 = mono_get_exception_type_load (D.32431, 0B);
      mono_raise_exception (D.32432);
      <D.32430>:
      <D.32427>:
      D.32287 = MEM[(struct MonoObject *)tb].vtable;
      D.32378 = D.32287->domain;
      D.32379 = &klass->byval_arg;
      res = mono_type_get_object (D.32378, D.32379);
      D.32433 = res == tb;
      D.32434 = (long int) D.32433;
      D.32435 = __builtin_expect (D.32434, 0);
      if (D.32435 != 0) goto <D.32436>; else goto <D.32437>;
      <D.32436>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11407, "res != (MonoReflectionType*)tb");
      <D.32437>:
      D.32377 = res;
      return D.32377;
      failure:
      mono_class_set_failure (klass, 7, 0B);
      klass->wastypebuilder = 1;
      {
        int ret;

        D.32358 = &domain->lock.mutex;
        ret = pthread_mutex_unlock (D.32358);
        if (ret != 0) goto <D.32438>; else goto <D.32439>;
        <D.32438>:
        monoeg_g_log (0B, 16, "Bad call to mono_mutex_unlock result %d", ret);
        <D.32439>:
        D.32440 = ret != 0;
        D.32441 = (long int) D.32440;
        D.32442 = __builtin_expect (D.32441, 0);
        if (D.32442 != 0) goto <D.32443>; else goto <D.32444>;
        <D.32443>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11414, "ret == 0");
        <D.32444>:
      }
      mono_loader_unlock ();
      mono_error_raise_exception (&error);
      D.32377 = 0B;
      return D.32377;
    }
  finally
    {
      error = {CLOBBER};
    }
}


remove_instantiations_of_and_ensure_contents (void * key, void * value, void * user_data)
{
  unsigned char D.32448;
  struct MonoGenericClass * D.32450;
  struct MonoClass * D.32451;
  struct MonoClass * D.32453;
  gboolean D.32454;
  struct MonoType * type;
  struct MonoClass * klass;

  type = key;
  klass = user_data;
  D.32448 = type->type;
  if (D.32448 == 21) goto <D.32449>; else goto <D.32447>;
  <D.32449>:
  D.32450 = type->data.generic_class;
  D.32451 = D.32450->container_class;
  if (D.32451 == klass) goto <D.32452>; else goto <D.32447>;
  <D.32452>:
  D.32453 = mono_class_from_mono_type (type);
  fix_partial_generic_class (D.32453);
  D.32454 = 1;
  return D.32454;
  <D.32447>:
  D.32454 = 0;
  return D.32454;
}


fix_partial_generic_class (struct MonoClass * klass)
{
  struct MonoGenericClass * D.32456;
  long unsigned int D.32457;
  long unsigned int D.32458;
  struct MonoClass * D.32461;
  struct MonoClass * D.32462;
  struct MonoType * D.32465;
  struct MonoGenericContext * D.32466;
  int D.32467;
  long unsigned int D.32473;
  long unsigned int D.32474;
  unsigned int D.32477;
  unsigned int D.32480;
  unsigned int D.32481;
  struct MonoImage * D.32484;
  unsigned int D.32485;
  unsigned int D.32486;
  void * D.32487;
  struct MonoMethod * * D.32488;
  long unsigned int D.32489;
  long unsigned int D.32490;
  struct MonoMethod * * D.32491;
  struct MonoMethod * * D.32492;
  struct MonoMethod * * D.32493;
  struct MonoMethod * D.32494;
  struct MonoGenericContext * D.32495;
  struct MonoMethod * D.32496;
  unsigned int i.463;
  short unsigned int D.32498;
  short unsigned int D.32501;
  unsigned int D.32504;
  unsigned int D.32505;
  void * D.32506;
  struct MonoClass * * D.32507;
  struct MonoClass * * D.32508;
  struct MonoClass * D.32509;
  struct MonoType * D.32510;
  struct MonoGenericContext * D.32511;
  struct MonoClass * * D.32512;
  struct MonoClass * * D.32513;
  struct MonoClass * D.32514;
  struct MonoClass * D.32515;
  int D.32516;
  unsigned int D.32517;
  unsigned int D.32518;
  unsigned int D.32521;
  void * D.32522;
  struct MonoClassField * D.32523;
  long unsigned int D.32524;
  struct MonoClassField * D.32525;
  struct MonoClassField * D.32526;
  struct MonoClassField * D.32527;
  struct MonoType * D.32528;
  struct MonoGenericContext * D.32529;
  struct MonoType * D.32530;
  struct MonoClass * gklass;
  struct MonoDynamicGenericClass * dgclass;
  int i;

  D.32456 = klass->generic_class;
  gklass = D.32456->container_class;
  D.32457 = BIT_FIELD_REF <*klass, 64, 256>;
  D.32458 = D.32457 & 72057594037927936;
  if (D.32458 != 0) goto <D.32459>; else goto <D.32460>;
  <D.32459>:
  return;
  <D.32460>:
  dgclass = klass->generic_class;
  D.32461 = klass->parent;
  D.32462 = gklass->parent;
  if (D.32461 != D.32462) goto <D.32463>; else goto <D.32464>;
  <D.32463>:
  {
    struct MonoError error;
    struct MonoType * parent_type;

    try
      {
        D.32462 = gklass->parent;
        D.32465 = &D.32462->byval_arg;
        D.32456 = klass->generic_class;
        D.32466 = &D.32456->context;
        parent_type = mono_class_inflate_generic_type_checked (D.32465, D.32466, &error);
        D.32467 = mono_error_ok (&error);
        if (D.32467 != 0) goto <D.32468>; else goto <D.32469>;
        <D.32468>:
        {
          struct MonoClass * parent;

          parent = mono_class_from_mono_type (parent_type);
          mono_metadata_free_type (parent_type);
          D.32461 = klass->parent;
          if (D.32461 != parent) goto <D.32470>; else goto <D.32471>;
          <D.32470>:
          klass->supertypes = 0B;
          mono_class_setup_parent (klass, parent);
          <D.32471>:
        }
        goto <D.32472>;
        <D.32469>:
        mono_class_set_failure (klass, 7, 0B);
        mono_error_cleanup (&error);
        D.32473 = BIT_FIELD_REF <*gklass, 64, 256>;
        D.32474 = D.32473 & 72057594037927936;
        if (D.32474 != 0) goto <D.32475>; else goto <D.32476>;
        <D.32475>:
        klass->wastypebuilder = 1;
        <D.32476>:
        return;
        <D.32472>:
      }
    finally
      {
        error = {CLOBBER};
      }
  }
  <D.32464>:
  D.32477 = dgclass->initialized;
  if (D.32477 == 0) goto <D.32478>; else goto <D.32479>;
  <D.32478>:
  return;
  <D.32479>:
  D.32480 = klass->method.count;
  D.32481 = gklass->method.count;
  if (D.32480 != D.32481) goto <D.32482>; else goto <D.32483>;
  <D.32482>:
  D.32481 = gklass->method.count;
  klass->method.count = D.32481;
  D.32484 = klass->image;
  D.32480 = klass->method.count;
  D.32485 = D.32480 + 1;
  D.32486 = D.32485 * 8;
  D.32487 = mono_image_alloc (D.32484, D.32486);
  klass->methods = D.32487;
  i = 0;
  goto <D.22231>;
  <D.22230>:
  D.32488 = klass->methods;
  D.32489 = (long unsigned int) i;
  D.32490 = D.32489 * 8;
  D.32491 = D.32488 + D.32490;
  D.32492 = gklass->methods;
  D.32489 = (long unsigned int) i;
  D.32490 = D.32489 * 8;
  D.32493 = D.32492 + D.32490;
  D.32494 = *D.32493;
  D.32495 = mono_class_get_context (klass);
  D.32496 = mono_class_inflate_generic_method_full (D.32494, klass, D.32495);
  *D.32491 = D.32496;
  i = i + 1;
  <D.22231>:
  D.32480 = klass->method.count;
  i.463 = (unsigned int) i;
  if (D.32480 > i.463) goto <D.22230>; else goto <D.22232>;
  <D.22232>:
  <D.32483>:
  D.32498 = klass->interface_count;
  if (D.32498 != 0) goto <D.32499>; else goto <D.32500>;
  <D.32499>:
  D.32498 = klass->interface_count;
  D.32501 = gklass->interface_count;
  if (D.32498 != D.32501) goto <D.32502>; else goto <D.32503>;
  <D.32502>:
  D.32501 = gklass->interface_count;
  klass->interface_count = D.32501;
  D.32484 = klass->image;
  D.32501 = gklass->interface_count;
  D.32504 = (unsigned int) D.32501;
  D.32505 = D.32504 * 8;
  D.32506 = mono_image_alloc (D.32484, D.32505);
  klass->interfaces = D.32506;
  klass->interfaces_packed = 0B;
  i = 0;
  goto <D.22235>;
  <D.22234>:
  {
    struct MonoType * iface_type;

    D.32507 = gklass->interfaces;
    D.32489 = (long unsigned int) i;
    D.32490 = D.32489 * 8;
    D.32508 = D.32507 + D.32490;
    D.32509 = *D.32508;
    D.32510 = &D.32509->byval_arg;
    D.32511 = mono_class_get_context (klass);
    iface_type = mono_class_inflate_generic_type (D.32510, D.32511);
    D.32512 = klass->interfaces;
    D.32489 = (long unsigned int) i;
    D.32490 = D.32489 * 8;
    D.32513 = D.32512 + D.32490;
    D.32514 = mono_class_from_mono_type (iface_type);
    *D.32513 = D.32514;
    mono_metadata_free_type (iface_type);
    D.32512 = klass->interfaces;
    D.32489 = (long unsigned int) i;
    D.32490 = D.32489 * 8;
    D.32513 = D.32512 + D.32490;
    D.32515 = *D.32513;
    ensure_runtime_vtable (D.32515);
  }
  i = i + 1;
  <D.22235>:
  D.32501 = gklass->interface_count;
  D.32516 = (int) D.32501;
  if (D.32516 > i) goto <D.22234>; else goto <D.22236>;
  <D.22236>:
  klass->interfaces_inited = 1;
  <D.32503>:
  <D.32500>:
  D.32517 = klass->field.count;
  D.32518 = gklass->field.count;
  if (D.32517 != D.32518) goto <D.32519>; else goto <D.32520>;
  <D.32519>:
  D.32518 = gklass->field.count;
  klass->field.count = D.32518;
  D.32484 = klass->image;
  D.32517 = klass->field.count;
  D.32521 = D.32517 * 32;
  D.32522 = image_g_malloc0 (D.32484, D.32521);
  klass->fields = D.32522;
  i = 0;
  goto <D.22238>;
  <D.22237>:
  D.32523 = klass->fields;
  D.32489 = (long unsigned int) i;
  D.32524 = D.32489 * 32;
  D.32525 = D.32523 + D.32524;
  D.32526 = gklass->fields;
  D.32489 = (long unsigned int) i;
  D.32524 = D.32489 * 32;
  D.32527 = D.32526 + D.32524;
  *D.32525 = *D.32527;
  D.32523 = klass->fields;
  D.32489 = (long unsigned int) i;
  D.32524 = D.32489 * 32;
  D.32525 = D.32523 + D.32524;
  D.32525->parent = klass;
  D.32523 = klass->fields;
  D.32489 = (long unsigned int) i;
  D.32524 = D.32489 * 32;
  D.32525 = D.32523 + D.32524;
  D.32526 = gklass->fields;
  D.32489 = (long unsigned int) i;
  D.32524 = D.32489 * 32;
  D.32527 = D.32526 + D.32524;
  D.32528 = D.32527->type;
  D.32529 = mono_class_get_context (klass);
  D.32530 = mono_class_inflate_generic_type (D.32528, D.32529);
  D.32525->type = D.32530;
  i = i + 1;
  <D.22238>:
  D.32517 = klass->field.count;
  i.463 = (unsigned int) i;
  if (D.32517 > i.463) goto <D.22237>; else goto <D.22239>;
  <D.22239>:
  <D.32520>:
  D.32473 = BIT_FIELD_REF <*gklass, 64, 256>;
  D.32474 = D.32473 & 72057594037927936;
  if (D.32474 != 0) goto <D.32531>; else goto <D.32532>;
  <D.32531>:
  klass->wastypebuilder = 1;
  <D.32532>:
  return;
}


check_array_for_usertypes (struct MonoArray * arr)
{
  long unsigned int D.32538;
  char * D.32539;
  long unsigned int D.32540;
  int i;

  if (arr == 0B) goto <D.32536>; else goto <D.32537>;
  <D.32536>:
  return;
  <D.32537>:
  i = 0;
  goto <D.22382>;
  <D.22381>:
  {
    struct MonoReflectionType * __type;

    D.32538 = (long unsigned int) i;
    D.32539 = mono_array_addr_with_size (arr, 8, D.32538);
    __type = MEM[(struct MonoReflectionType * *)D.32539];
    __type = mono_reflection_type_resolve_user_types (__type);
    {
      struct MonoReflectionType * * __p;

      D.32538 = (long unsigned int) i;
      __p = mono_array_addr_with_size (arr, 8, D.32538);
      *__p = __type;
    }
  }
  i = i + 1;
  <D.22382>:
  D.32538 = (long unsigned int) i;
  D.32540 = mono_array_length (arr);
  if (D.32538 < D.32540) goto <D.22381>; else goto <D.22383>;
  <D.22383>:
}


ensure_runtime_vtable (struct MonoClass * klass)
{
  struct MonoImage * D.32545;
  long unsigned int D.32546;
  long unsigned int D.32547;
  struct MonoGenericClass * D.32550;
  long unsigned int D.32551;
  long unsigned int D.32552;
  struct MonoClass * D.32553;
  int iftmp.464;
  struct MonoArray * D.32559;
  long unsigned int D.32562;
  int D.32564;
  unsigned int num.465;
  long unsigned int D.32566;
  unsigned int D.32567;
  unsigned int D.32568;
  void * D.32569;
  int iftmp.466;
  long unsigned int D.32573;
  struct MonoMethod * * D.32575;
  long unsigned int D.32576;
  long unsigned int D.32577;
  struct MonoMethod * * D.32578;
  long unsigned int D.32579;
  char * D.32580;
  struct MonoReflectionCtorBuilder * D.32581;
  struct MonoMethod * D.32582;
  int j.467;
  long unsigned int D.32584;
  long unsigned int D.32585;
  struct MonoMethod * * D.32586;
  struct MonoArray * D.32587;
  char * D.32588;
  struct MonoReflectionMethodBuilder * D.32589;
  struct MonoMethod * D.32590;
  struct MonoArray * D.32591;
  long unsigned int D.32594;
  short unsigned int D.32595;
  short unsigned int D.32596;
  unsigned int D.32597;
  unsigned int D.32598;
  void * D.32599;
  char * D.32600;
  void * D.32601;
  struct MonoClass * * D.32602;
  struct MonoClass * * D.32603;
  struct MonoClass * D.32604;
  struct MonoClass * D.32605;
  int D.32606;
  unsigned int D.32610;
  unsigned int D.32611;
  short unsigned int D.32614;
  int D.32615;
  int D.32616;
  int slot_num.468;
  short int D.32620;
  unsigned int D.32621;
  unsigned int i.469;
  struct MonoReflectionTypeBuilder * tb;
  int i;
  int num;
  int j;

  tb = mono_class_get_ref_info (klass);
  D.32545 = klass->image;
  D.32546 = BIT_FIELD_REF <*D.32545, 64, 192>;
  D.32547 = D.32546 & 268435456;
  if (D.32547 == 0) goto <D.32542>; else goto <D.32548>;
  <D.32548>:
  if (tb == 0B) goto <D.32549>; else goto <D.32543>;
  <D.32549>:
  D.32550 = klass->generic_class;
  if (D.32550 == 0B) goto <D.32542>; else goto <D.32543>;
  <D.32543>:
  D.32551 = BIT_FIELD_REF <*klass, 64, 256>;
  D.32552 = D.32551 & 72057594037927936;
  if (D.32552 != 0) goto <D.32542>; else goto <D.32544>;
  <D.32542>:
  return;
  <D.32544>:
  D.32553 = klass->parent;
  if (D.32553 != 0B) goto <D.32554>; else goto <D.32555>;
  <D.32554>:
  D.32553 = klass->parent;
  ensure_runtime_vtable (D.32553);
  <D.32555>:
  if (tb != 0B) goto <D.32556>; else goto <D.32557>;
  <D.32556>:
  D.32559 = tb->ctors;
  if (D.32559 != 0B) goto <D.32560>; else goto <D.32561>;
  <D.32560>:
  D.32559 = tb->ctors;
  D.32562 = mono_array_length (D.32559);
  iftmp.464 = (int) D.32562;
  goto <D.32563>;
  <D.32561>:
  iftmp.464 = 0;
  <D.32563>:
  num = iftmp.464;
  D.32564 = tb->num_methods;
  num = D.32564 + num;
  num.465 = (unsigned int) num;
  klass->method.count = num.465;
  D.32545 = klass->image;
  D.32566 = (long unsigned int) num;
  D.32567 = (unsigned int) D.32566;
  D.32568 = D.32567 * 8;
  D.32569 = mono_image_alloc (D.32545, D.32568);
  klass->methods = D.32569;
  D.32559 = tb->ctors;
  if (D.32559 != 0B) goto <D.32571>; else goto <D.32572>;
  <D.32571>:
  D.32559 = tb->ctors;
  D.32573 = mono_array_length (D.32559);
  iftmp.466 = (int) D.32573;
  goto <D.32574>;
  <D.32572>:
  iftmp.466 = 0;
  <D.32574>:
  num = iftmp.466;
  i = 0;
  goto <D.22252>;
  <D.22251>:
  D.32575 = klass->methods;
  D.32576 = (long unsigned int) i;
  D.32577 = D.32576 * 8;
  D.32578 = D.32575 + D.32577;
  D.32559 = tb->ctors;
  D.32579 = (long unsigned int) i;
  D.32580 = mono_array_addr_with_size (D.32559, 8, D.32579);
  D.32581 = MEM[(struct MonoReflectionCtorBuilder * *)D.32580];
  D.32582 = ctorbuilder_to_mono_method (klass, D.32581);
  *D.32578 = D.32582;
  i = i + 1;
  <D.22252>:
  if (i < num) goto <D.22251>; else goto <D.22253>;
  <D.22253>:
  num = tb->num_methods;
  j = i;
  i = 0;
  goto <D.22255>;
  <D.22254>:
  D.32575 = klass->methods;
  j.467 = j;
  j = j.467 + 1;
  D.32584 = (long unsigned int) j.467;
  D.32585 = D.32584 * 8;
  D.32586 = D.32575 + D.32585;
  D.32587 = tb->methods;
  D.32579 = (long unsigned int) i;
  D.32588 = mono_array_addr_with_size (D.32587, 8, D.32579);
  D.32589 = MEM[(struct MonoReflectionMethodBuilder * *)D.32588];
  D.32590 = methodbuilder_to_mono_method (klass, D.32589);
  *D.32586 = D.32590;
  i = i + 1;
  <D.22255>:
  if (i < num) goto <D.22254>; else goto <D.22256>;
  <D.22256>:
  D.32591 = tb->interfaces;
  if (D.32591 != 0B) goto <D.32592>; else goto <D.32593>;
  <D.32592>:
  D.32591 = tb->interfaces;
  D.32594 = mono_array_length (D.32591);
  D.32595 = (short unsigned int) D.32594;
  klass->interface_count = D.32595;
  D.32545 = klass->image;
  D.32596 = klass->interface_count;
  D.32597 = (unsigned int) D.32596;
  D.32598 = D.32597 * 8;
  D.32599 = mono_image_alloc (D.32545, D.32598);
  klass->interfaces = D.32599;
  i = 0;
  goto <D.22259>;
  <D.22258>:
  {
    struct MonoType * iface;

    D.32591 = tb->interfaces;
    D.32579 = (long unsigned int) i;
    D.32600 = mono_array_addr_with_size (D.32591, 8, D.32579);
    D.32601 = MEM[(void * *)D.32600];
    iface = mono_reflection_type_get_handle (D.32601);
    D.32602 = klass->interfaces;
    D.32576 = (long unsigned int) i;
    D.32577 = D.32576 * 8;
    D.32603 = D.32602 + D.32577;
    D.32604 = mono_class_from_mono_type (iface);
    *D.32603 = D.32604;
    D.32602 = klass->interfaces;
    D.32576 = (long unsigned int) i;
    D.32577 = D.32576 * 8;
    D.32603 = D.32602 + D.32577;
    D.32605 = *D.32603;
    ensure_runtime_vtable (D.32605);
  }
  i = i + 1;
  <D.22259>:
  D.32596 = klass->interface_count;
  D.32606 = (int) D.32596;
  if (D.32606 > i) goto <D.22258>; else goto <D.22260>;
  <D.22260>:
  klass->interfaces_inited = 1;
  <D.32593>:
  goto <D.32607>;
  <D.32557>:
  D.32550 = klass->generic_class;
  if (D.32550 != 0B) goto <D.32608>; else goto <D.32609>;
  <D.32608>:
  ensure_generic_class_runtime_vtable (klass);
  <D.32609>:
  <D.32607>:
  D.32610 = klass->flags;
  D.32611 = D.32610 & 32;
  if (D.32611 != 0) goto <D.32612>; else goto <D.32613>;
  <D.32612>:
  {
    int slot_num;

    slot_num = 0;
    i = 0;
    goto <D.22264>;
    <D.22263>:
    {
      struct MonoMethod * im;

      D.32575 = klass->methods;
      D.32576 = (long unsigned int) i;
      D.32577 = D.32576 * 8;
      D.32578 = D.32575 + D.32577;
      im = *D.32578;
      D.32614 = im->flags;
      D.32615 = (int) D.32614;
      D.32616 = D.32615 & 16;
      if (D.32616 == 0) goto <D.32617>; else goto <D.32618>;
      <D.32617>:
      slot_num.468 = slot_num;
      slot_num = slot_num.468 + 1;
      D.32620 = (short int) slot_num.468;
      im->slot = D.32620;
      <D.32618>:
    }
    i = i + 1;
    <D.22264>:
    D.32621 = klass->method.count;
    i.469 = (unsigned int) i;
    if (D.32621 > i.469) goto <D.22263>; else goto <D.22265>;
    <D.22265>:
    klass->interfaces_packed = 0B;
    mono_class_setup_interface_offsets (klass);
    mono_class_setup_interface_id (klass);
  }
  <D.32613>:
}


ensure_generic_class_runtime_vtable (struct MonoClass * klass)
{
  struct MonoGenericClass * D.32624;
  struct MonoClass * gklass;

  D.32624 = klass->generic_class;
  gklass = D.32624->container_class;
  ensure_runtime_vtable (gklass);
  fix_partial_generic_class (klass);
}


typebuilder_setup_fields (struct MonoClass * klass, struct MonoError * error)
{
  int D.32625;
  unsigned int D.32626;
  int D.32627;
  int D.32630;
  unsigned int D.32631;
  unsigned int D.32632;
  const char * D.32635;
  unsigned char D.32636;
  <unnamed-unsigned:4> D.32637;
  int D.32638;
  int D.32639;
  unsigned int D.32640;
  unsigned int D.32643;
  unsigned int D.32644;
  int D.32645;
  unsigned int D.32646;
  void * D.32647;
  struct MonoClassExt * D.32648;
  unsigned int D.32649;
  void * D.32650;
  struct MonoArray * D.32651;
  long unsigned int D.32652;
  char * D.32653;
  struct MonoClassField * D.32654;
  long unsigned int D.32655;
  long unsigned int D.32656;
  struct MonoString * D.32657;
  char * D.32658;
  int D.32659;
  unsigned int D.32662;
  struct MonoImage * D.32665;
  struct MonoObject * D.32666;
  struct MonoType * D.32667;
  struct MonoType * D.32668;
  struct MonoType * D.32669;
  short unsigned int D.32670;
  struct MonoType * D.32672;
  unsigned int D.32673;
  unsigned int D.32678;
  struct MonoFieldDefaultValue * D.32679;
  long unsigned int D.32680;
  struct MonoFieldDefaultValue * D.32681;
  int D.32682;
  struct MonoArray * D.32685;
  long unsigned int D.32686;
  long unsigned int D.32687;
  short unsigned int D.32690;
  int D.32691;
  int D.32692;
  struct MonoClass * D.32695;
  struct MonoClass * D.32696;
  struct MonoObject * D.32697;
  short unsigned int D.32700;
  MonoTypeEnum * D.32701;
  char * D.32702;
  sizetype D.32703;
  const char * p2.470;
  long int p2.471;
  long int p.472;
  long int D.32707;
  unsigned int D.32708;
  void * D.32709;
  const char * D.32710;
  long unsigned int D.32711;
  unsigned int i.473;
  struct MonoReflectionTypeBuilder * tb;
  struct MonoReflectionFieldBuilder * fb;
  struct MonoClassField * field;
  struct MonoImage * image;
  const char * p;
  const char * p2;
  int i;
  guint32 len;
  guint32 idx;
  guint32 real_size;

  try
    {
      tb = mono_class_get_ref_info (klass);
      image = klass->image;
      real_size = 0;
      D.32625 = tb->num_fields;
      D.32626 = (unsigned int) D.32625;
      klass->field.count = D.32626;
      klass->field.first = 0;
      mono_error_init (error);
      D.32627 = tb->class_size;
      if (D.32627 != 0) goto <D.32628>; else goto <D.32629>;
      <D.32628>:
      D.32630 = tb->packing_size;
      D.32631 = (unsigned int) D.32630;
      D.32632 = D.32631 & 4294967280;
      if (D.32632 != 0) goto <D.32633>; else goto <D.32634>;
      <D.32633>:
      {
        char * err_msg;

        D.32635 = klass->name;
        D.32630 = tb->packing_size;
        err_msg = monoeg_g_strdup_printf ("Could not load struct \'%s\' with packing size %d >= 16", D.32635, D.32630);
        mono_class_set_failure (klass, 7, err_msg);
        return;
      }
      <D.32634>:
      D.32630 = tb->packing_size;
      D.32636 = (unsigned char) D.32630;
      D.32637 = (<unnamed-unsigned:4>) D.32636;
      klass->packing_size = D.32637;
      D.32638 = klass->instance_size;
      D.32627 = tb->class_size;
      D.32639 = D.32638 + D.32627;
      real_size = (guint32) D.32639;
      <D.32629>:
      D.32640 = klass->field.count;
      if (D.32640 == 0) goto <D.32641>; else goto <D.32642>;
      <D.32641>:
      D.32638 = klass->instance_size;
      D.32643 = (unsigned int) D.32638;
      D.32644 = MAX_EXPR <D.32643, real_size>;
      D.32645 = (int) D.32644;
      klass->instance_size = D.32645;
      return;
      <D.32642>:
      D.32640 = klass->field.count;
      D.32646 = D.32640 * 32;
      D.32647 = image_g_malloc0 (image, D.32646);
      klass->fields = D.32647;
      mono_class_alloc_ext (klass);
      D.32648 = klass->ext;
      D.32640 = klass->field.count;
      D.32649 = D.32640 * 16;
      D.32650 = image_g_malloc0 (image, D.32649);
      D.32648->field_def_values = D.32650;
      klass->size_inited = 1;
      i = 0;
      goto <D.22321>;
      <D.22320>:
      {
        struct MonoArray * rva_data;

        D.32651 = tb->fields;
        D.32652 = (long unsigned int) i;
        D.32653 = mono_array_addr_with_size (D.32651, 8, D.32652);
        fb = MEM[(void * *)D.32653];
        D.32654 = klass->fields;
        D.32655 = (long unsigned int) i;
        D.32656 = D.32655 * 32;
        field = D.32654 + D.32656;
        D.32657 = fb->name;
        D.32658 = mono_string_to_utf8_image (image, D.32657, error);
        field->name = D.32658;
        D.32659 = mono_error_ok (error);
        if (D.32659 == 0) goto <D.32660>; else goto <D.32661>;
        <D.32660>:
        return;
        <D.32661>:
        D.32662 = fb->attrs;
        if (D.32662 != 0) goto <D.32663>; else goto <D.32664>;
        <D.32663>:
        D.32665 = klass->image;
        D.32666 = fb->type;
        D.32667 = mono_reflection_type_get_handle (D.32666);
        D.32668 = mono_metadata_type_dup (D.32665, D.32667);
        field->type = D.32668;
        D.32669 = field->type;
        D.32662 = fb->attrs;
        D.32670 = (short unsigned int) D.32662;
        D.32669->attrs = D.32670;
        goto <D.32671>;
        <D.32664>:
        D.32666 = fb->type;
        D.32672 = mono_reflection_type_get_handle (D.32666);
        field->type = D.32672;
        <D.32671>:
        D.32662 = fb->attrs;
        D.32673 = D.32662 & 256;
        if (D.32673 != 0) goto <D.32674>; else goto <D.32675>;
        <D.32674>:
        rva_data = fb->rva_data;
        if (rva_data != 0B) goto <D.32676>; else goto <D.32677>;
        <D.32676>:
        {
          char * base;
          size_t size;
          char * data;

          base = mono_array_addr_with_size (rva_data, 1, 0);
          size = mono_array_length (rva_data);
          D.32665 = klass->image;
          D.32678 = (unsigned int) size;
          data = mono_image_alloc (D.32665, D.32678);
          memcpy (data, base, size);
          D.32648 = klass->ext;
          D.32679 = D.32648->field_def_values;
          D.32655 = (long unsigned int) i;
          D.32680 = D.32655 * 16;
          D.32681 = D.32679 + D.32680;
          D.32681->data = data;
        }
        <D.32677>:
        <D.32675>:
        D.32682 = fb->offset;
        if (D.32682 != -1) goto <D.32683>; else goto <D.32684>;
        <D.32683>:
        D.32682 = fb->offset;
        field->offset = D.32682;
        <D.32684>:
        field->parent = klass;
        fb->handle = field;
        D.32665 = klass->image;
        D.32685 = fb->cattrs;
        mono_save_custom_attrs (D.32665, field, D.32685);
        D.32686 = BIT_FIELD_REF <*klass, 64, 256>;
        D.32687 = D.32686 & 576460752303423488;
        if (D.32687 != 0) goto <D.32688>; else goto <D.32689>;
        <D.32688>:
        D.32669 = field->type;
        D.32690 = D.32669->attrs;
        D.32691 = (int) D.32690;
        D.32692 = D.32691 & 16;
        if (D.32692 == 0) goto <D.32693>; else goto <D.32694>;
        <D.32693>:
        D.32669 = field->type;
        D.32695 = mono_class_from_mono_type (D.32669);
        klass->element_class = D.32695;
        D.32696 = klass->element_class;
        klass->cast_class = D.32696;
        <D.32694>:
        <D.32689>:
        D.32697 = fb->def_value;
        if (D.32697 != 0B) goto <D.32698>; else goto <D.32699>;
        <D.32698>:
        {
          struct MonoDynamicImage * assembly;

          assembly = klass->image;
          D.32669 = field->type;
          D.32669 = field->type;
          D.32690 = D.32669->attrs;
          D.32700 = D.32690 | 32768;
          D.32669->attrs = D.32700;
          D.32697 = fb->def_value;
          D.32648 = klass->ext;
          D.32679 = D.32648->field_def_values;
          D.32655 = (long unsigned int) i;
          D.32680 = D.32655 * 16;
          D.32681 = D.32679 + D.32680;
          D.32701 = &D.32681->def_type;
          idx = encode_constant (assembly, D.32697, D.32701);
          D.32702 = assembly->blob.data;
          D.32703 = (sizetype) idx;
          p = D.32702 + D.32703;
          len = mono_metadata_decode_blob_size (p, &p2);
          p2.470 = p2;
          p2.471 = (long int) p2.470;
          p.472 = (long int) p;
          D.32707 = p2.471 - p.472;
          D.32708 = (unsigned int) D.32707;
          len = D.32708 + len;
          D.32648 = klass->ext;
          D.32679 = D.32648->field_def_values;
          D.32655 = (long unsigned int) i;
          D.32680 = D.32655 * 16;
          D.32681 = D.32679 + D.32680;
          D.32709 = mono_image_alloc (image, len);
          D.32681->data = D.32709;
          D.32648 = klass->ext;
          D.32679 = D.32648->field_def_values;
          D.32655 = (long unsigned int) i;
          D.32680 = D.32655 * 16;
          D.32681 = D.32679 + D.32680;
          D.32710 = D.32681->data;
          D.32711 = (long unsigned int) len;
          memcpy (D.32710, p, D.32711);
        }
        <D.32699>:
      }
      i = i + 1;
      <D.22321>:
      D.32640 = klass->field.count;
      i.473 = (unsigned int) i;
      if (D.32640 > i.473) goto <D.22320>; else goto <D.22322>;
      <D.22322>:
      D.32638 = klass->instance_size;
      D.32643 = (unsigned int) D.32638;
      D.32644 = MAX_EXPR <D.32643, real_size>;
      D.32645 = (int) D.32644;
      klass->instance_size = D.32645;
      mono_class_layout_fields (klass);
    }
  finally
    {
      p2 = {CLOBBER};
    }
}


typebuilder_setup_properties (struct MonoClass * klass, struct MonoError * error)
{
  struct MonoClassExt * D.32716;
  void * D.32719;
  guint32 iftmp.474;
  struct MonoArray * D.32721;
  long unsigned int D.32724;
  unsigned int D.32726;
  unsigned int D.32727;
  long unsigned int D.32728;
  char * D.32729;
  long unsigned int D.32730;
  long unsigned int D.32731;
  struct MonoProperty * D.32732;
  unsigned int D.32733;
  struct MonoString * D.32734;
  char * D.32735;
  int D.32736;
  struct MonoReflectionMethodBuilder * D.32739;
  struct MonoMethod * D.32742;
  struct MonoReflectionMethodBuilder * D.32743;
  struct MonoMethod * D.32746;
  struct MonoImage * D.32747;
  struct MonoArray * D.32748;
  struct MonoObject * D.32749;
  struct MonoFieldDefaultValue * D.32752;
  unsigned int D.32755;
  void * D.32756;
  unsigned int D.32757;
  unsigned int D.32758;
  long unsigned int D.32759;
  struct MonoFieldDefaultValue * D.32760;
  MonoTypeEnum * D.32761;
  char * D.32762;
  sizetype D.32763;
  const char * p2.475;
  long int p2.476;
  long int p.477;
  long int D.32767;
  unsigned int D.32768;
  void * D.32769;
  const char * D.32770;
  long unsigned int D.32771;
  unsigned int i.478;
  struct MonoReflectionTypeBuilder * tb;
  struct MonoReflectionPropertyBuilder * pb;
  struct MonoImage * image;
  struct MonoProperty * properties;
  int i;

  tb = mono_class_get_ref_info (klass);
  image = klass->image;
  mono_error_init (error);
  D.32716 = klass->ext;
  if (D.32716 == 0B) goto <D.32717>; else goto <D.32718>;
  <D.32717>:
  D.32719 = image_g_malloc0 (image, 64);
  klass->ext = D.32719;
  <D.32718>:
  D.32716 = klass->ext;
  D.32721 = tb->properties;
  if (D.32721 != 0B) goto <D.32722>; else goto <D.32723>;
  <D.32722>:
  D.32721 = tb->properties;
  D.32724 = mono_array_length (D.32721);
  iftmp.474 = (guint32) D.32724;
  goto <D.32725>;
  <D.32723>:
  iftmp.474 = 0;
  <D.32725>:
  D.32716->property.count = iftmp.474;
  D.32716 = klass->ext;
  D.32716->property.first = 0;
  D.32716 = klass->ext;
  D.32726 = D.32716->property.count;
  D.32727 = D.32726 * 40;
  properties = image_g_malloc0 (image, D.32727);
  D.32716 = klass->ext;
  D.32716->properties = properties;
  i = 0;
  goto <D.22338>;
  <D.22337>:
  D.32721 = tb->properties;
  D.32728 = (long unsigned int) i;
  D.32729 = mono_array_addr_with_size (D.32721, 8, D.32728);
  pb = MEM[(struct MonoReflectionPropertyBuilder * *)D.32729];
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32732->parent = klass;
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32733 = pb->attrs;
  D.32732->attrs = D.32733;
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32734 = pb->name;
  D.32735 = mono_string_to_utf8_image (image, D.32734, error);
  D.32732->name = D.32735;
  D.32736 = mono_error_ok (error);
  if (D.32736 == 0) goto <D.32737>; else goto <D.32738>;
  <D.32737>:
  return;
  <D.32738>:
  D.32739 = pb->get_method;
  if (D.32739 != 0B) goto <D.32740>; else goto <D.32741>;
  <D.32740>:
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32739 = pb->get_method;
  D.32742 = D.32739->mhandle;
  D.32732->get = D.32742;
  <D.32741>:
  D.32743 = pb->set_method;
  if (D.32743 != 0B) goto <D.32744>; else goto <D.32745>;
  <D.32744>:
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32743 = pb->set_method;
  D.32746 = D.32743->mhandle;
  D.32732->set = D.32746;
  <D.32745>:
  D.32747 = klass->image;
  D.32730 = (long unsigned int) i;
  D.32731 = D.32730 * 40;
  D.32732 = properties + D.32731;
  D.32748 = pb->cattrs;
  mono_save_custom_attrs (D.32747, D.32732, D.32748);
  D.32749 = pb->def_value;
  if (D.32749 != 0B) goto <D.32750>; else goto <D.32751>;
  <D.32750>:
  {
    guint32 len;
    guint32 idx;
    const char * p;
    const char * p2;
    struct MonoDynamicImage * assembly;

    try
      {
        assembly = klass->image;
        D.32716 = klass->ext;
        D.32752 = D.32716->prop_def_values;
        if (D.32752 == 0B) goto <D.32753>; else goto <D.32754>;
        <D.32753>:
        D.32716 = klass->ext;
        D.32716 = klass->ext;
        D.32726 = D.32716->property.count;
        D.32755 = D.32726 * 16;
        D.32756 = image_g_malloc0 (image, D.32755);
        D.32716->prop_def_values = D.32756;
        <D.32754>:
        D.32730 = (long unsigned int) i;
        D.32731 = D.32730 * 40;
        D.32732 = properties + D.32731;
        D.32730 = (long unsigned int) i;
        D.32731 = D.32730 * 40;
        D.32732 = properties + D.32731;
        D.32757 = D.32732->attrs;
        D.32758 = D.32757 | 4096;
        D.32732->attrs = D.32758;
        D.32749 = pb->def_value;
        D.32716 = klass->ext;
        D.32752 = D.32716->prop_def_values;
        D.32730 = (long unsigned int) i;
        D.32759 = D.32730 * 16;
        D.32760 = D.32752 + D.32759;
        D.32761 = &D.32760->def_type;
        idx = encode_constant (assembly, D.32749, D.32761);
        D.32762 = assembly->blob.data;
        D.32763 = (sizetype) idx;
        p = D.32762 + D.32763;
        len = mono_metadata_decode_blob_size (p, &p2);
        p2.475 = p2;
        p2.476 = (long int) p2.475;
        p.477 = (long int) p;
        D.32767 = p2.476 - p.477;
        D.32768 = (unsigned int) D.32767;
        len = D.32768 + len;
        D.32716 = klass->ext;
        D.32752 = D.32716->prop_def_values;
        D.32730 = (long unsigned int) i;
        D.32759 = D.32730 * 16;
        D.32760 = D.32752 + D.32759;
        D.32769 = mono_image_alloc (image, len);
        D.32760->data = D.32769;
        D.32716 = klass->ext;
        D.32752 = D.32716->prop_def_values;
        D.32730 = (long unsigned int) i;
        D.32759 = D.32730 * 16;
        D.32760 = D.32752 + D.32759;
        D.32770 = D.32760->data;
        D.32771 = (long unsigned int) len;
        memcpy (D.32770, p, D.32771);
      }
    finally
      {
        p2 = {CLOBBER};
      }
  }
  <D.32751>:
  i = i + 1;
  <D.22338>:
  D.32716 = klass->ext;
  D.32726 = D.32716->property.count;
  i.478 = (unsigned int) i;
  if (D.32726 > i.478) goto <D.22337>; else goto <D.22339>;
  <D.22339>:
}


typebuilder_setup_events (struct MonoClass * klass, struct MonoError * error)
{
  struct MonoClassExt * D.32774;
  void * D.32777;
  guint32 iftmp.479;
  struct MonoArray * D.32779;
  long unsigned int D.32782;
  unsigned int D.32784;
  unsigned int D.32785;
  long unsigned int D.32786;
  char * D.32787;
  long unsigned int D.32788;
  long unsigned int D.32789;
  struct MonoEvent * D.32790;
  unsigned int D.32791;
  struct MonoString * D.32792;
  char * D.32793;
  int D.32794;
  struct MonoReflectionMethodBuilder * D.32797;
  struct MonoMethod * D.32800;
  struct MonoReflectionMethodBuilder * D.32801;
  struct MonoMethod * D.32804;
  struct MonoReflectionMethodBuilder * D.32805;
  struct MonoMethod * D.32808;
  struct MonoArray * D.32809;
  long unsigned int D.32812;
  long unsigned int D.32813;
  unsigned int D.32814;
  unsigned int D.32815;
  void * D.32816;
  long unsigned int D.32817;
  char * D.32818;
  struct MonoMethod * * D.32819;
  long unsigned int D.32820;
  long unsigned int D.32821;
  struct MonoMethod * * D.32822;
  struct MonoMethod * D.32823;
  long unsigned int D.32824;
  struct MonoImage * D.32825;
  struct MonoArray * D.32826;
  unsigned int i.480;
  struct MonoReflectionTypeBuilder * tb;
  struct MonoReflectionEventBuilder * eb;
  struct MonoImage * image;
  struct MonoEvent * events;
  int i;

  tb = mono_class_get_ref_info (klass);
  image = klass->image;
  mono_error_init (error);
  D.32774 = klass->ext;
  if (D.32774 == 0B) goto <D.32775>; else goto <D.32776>;
  <D.32775>:
  D.32777 = image_g_malloc0 (image, 64);
  klass->ext = D.32777;
  <D.32776>:
  D.32774 = klass->ext;
  D.32779 = tb->events;
  if (D.32779 != 0B) goto <D.32780>; else goto <D.32781>;
  <D.32780>:
  D.32779 = tb->events;
  D.32782 = mono_array_length (D.32779);
  iftmp.479 = (guint32) D.32782;
  goto <D.32783>;
  <D.32781>:
  iftmp.479 = 0;
  <D.32783>:
  D.32774->event.count = iftmp.479;
  D.32774 = klass->ext;
  D.32774->event.first = 0;
  D.32774 = klass->ext;
  D.32784 = D.32774->event.count;
  D.32785 = D.32784 * 56;
  events = image_g_malloc0 (image, D.32785);
  D.32774 = klass->ext;
  D.32774->events = events;
  i = 0;
  goto <D.22366>;
  <D.22365>:
  D.32779 = tb->events;
  D.32786 = (long unsigned int) i;
  D.32787 = mono_array_addr_with_size (D.32779, 8, D.32786);
  eb = MEM[(struct MonoReflectionEventBuilder * *)D.32787];
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32790->parent = klass;
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32791 = eb->attrs;
  D.32790->attrs = D.32791;
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32792 = eb->name;
  D.32793 = mono_string_to_utf8_image (image, D.32792, error);
  D.32790->name = D.32793;
  D.32794 = mono_error_ok (error);
  if (D.32794 == 0) goto <D.32795>; else goto <D.32796>;
  <D.32795>:
  return;
  <D.32796>:
  D.32797 = eb->add_method;
  if (D.32797 != 0B) goto <D.32798>; else goto <D.32799>;
  <D.32798>:
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32797 = eb->add_method;
  D.32800 = D.32797->mhandle;
  D.32790->add = D.32800;
  <D.32799>:
  D.32801 = eb->remove_method;
  if (D.32801 != 0B) goto <D.32802>; else goto <D.32803>;
  <D.32802>:
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32801 = eb->remove_method;
  D.32804 = D.32801->mhandle;
  D.32790->remove = D.32804;
  <D.32803>:
  D.32805 = eb->raise_method;
  if (D.32805 != 0B) goto <D.32806>; else goto <D.32807>;
  <D.32806>:
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32805 = eb->raise_method;
  D.32808 = D.32805->mhandle;
  D.32790->raise = D.32808;
  <D.32807>:
  D.32809 = eb->other_methods;
  if (D.32809 != 0B) goto <D.32810>; else goto <D.32811>;
  <D.32810>:
  {
    int j;

    D.32788 = (long unsigned int) i;
    D.32789 = D.32788 * 56;
    D.32790 = events + D.32789;
    D.32809 = eb->other_methods;
    D.32812 = mono_array_length (D.32809);
    D.32813 = D.32812 + 1;
    D.32814 = (unsigned int) D.32813;
    D.32815 = D.32814 * 8;
    D.32816 = image_g_malloc0 (image, D.32815);
    D.32790->other = D.32816;
    j = 0;
    goto <D.22363>;
    <D.22362>:
    {
      struct MonoReflectionMethodBuilder * mb;

      D.32809 = eb->other_methods;
      D.32817 = (long unsigned int) j;
      D.32818 = mono_array_addr_with_size (D.32809, 8, D.32817);
      mb = MEM[(struct MonoReflectionMethodBuilder * *)D.32818];
      D.32788 = (long unsigned int) i;
      D.32789 = D.32788 * 56;
      D.32790 = events + D.32789;
      D.32819 = D.32790->other;
      D.32820 = (long unsigned int) j;
      D.32821 = D.32820 * 8;
      D.32822 = D.32819 + D.32821;
      D.32823 = mb->mhandle;
      *D.32822 = D.32823;
    }
    j = j + 1;
    <D.22363>:
    D.32817 = (long unsigned int) j;
    D.32809 = eb->other_methods;
    D.32824 = mono_array_length (D.32809);
    if (D.32817 < D.32824) goto <D.22362>; else goto <D.22364>;
    <D.22364>:
  }
  <D.32811>:
  D.32825 = klass->image;
  D.32788 = (long unsigned int) i;
  D.32789 = D.32788 * 56;
  D.32790 = events + D.32789;
  D.32826 = eb->cattrs;
  mono_save_custom_attrs (D.32825, D.32790, D.32826);
  i = i + 1;
  <D.22366>:
  D.32774 = klass->ext;
  D.32784 = D.32774->event.count;
  i.480 = (unsigned int) i;
  if (D.32784 > i.480) goto <D.22365>; else goto <D.22367>;
  <D.22367>:
}


__attribute__((visibility ("hidden")))
mono_reflection_initialize_generic_parameter (struct MonoReflectionGenericParam * gparam)
{
  struct MonoReflectionTypeBuilder * D.32829;
  struct MonoReflectionModuleBuilder * D.32830;
  struct MonoDynamicImage * D.32831;
  struct MonoString * D.32832;
  char * D.32833;
  int D.32834;
  _Bool D.32835;
  long int D.32836;
  long int D.32837;
  unsigned int D.32840;
  short unsigned int D.32841;
  struct MonoReflectionMethodBuilder * D.32842;
  struct MonoGenericContainer * D.32845;
  struct MonoType * D.32848;
  struct MonoImage * D.32849;
  void * D.32850;
  struct MonoGenericContainer * D.32854;
  struct MonoType * D.32857;
  struct MonoImage * D.32858;
  void * D.32859;
  _Bool D.32860;
  int D.32861;
  struct MonoType * D.32862;
  struct MonoGenericParamFull * param;
  struct MonoImage * image;
  struct MonoClass * pklass;
  struct MonoError error;

  try
    {
      D.32829 = gparam->tbuilder;
      D.32830 = D.32829->module;
      D.32831 = D.32830->dynamic_image;
      image = &D.32831->image;
      param = mono_image_alloc0 (image, 56);
      D.32832 = gparam->name;
      D.32833 = mono_string_to_utf8_image (image, D.32832, &error);
      param->info.name = D.32833;
      D.32834 = mono_error_ok (&error);
      D.32835 = D.32834 == 0;
      D.32836 = (long int) D.32835;
      D.32837 = __builtin_expect (D.32836, 0);
      if (D.32837 != 0) goto <D.32838>; else goto <D.32839>;
      <D.32838>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11435, "mono_error_ok (&error)");
      <D.32839>:
      D.32840 = gparam->index;
      D.32841 = (short unsigned int) D.32840;
      param->param.num = D.32841;
      D.32842 = gparam->mbuilder;
      if (D.32842 != 0B) goto <D.32843>; else goto <D.32844>;
      <D.32843>:
      D.32842 = gparam->mbuilder;
      D.32845 = D.32842->generic_container;
      if (D.32845 == 0B) goto <D.32846>; else goto <D.32847>;
      <D.32846>:
      {
        struct MonoReflectionTypeBuilder * tb;
        struct MonoClass * klass;

        D.32842 = gparam->mbuilder;
        tb = D.32842->type;
        D.32848 = mono_reflection_type_get_handle (tb);
        klass = mono_class_from_mono_type (D.32848);
        D.32842 = gparam->mbuilder;
        D.32849 = klass->image;
        D.32850 = mono_image_alloc0 (D.32849, 56);
        D.32842->generic_container = D.32850;
        D.32842 = gparam->mbuilder;
        D.32845 = D.32842->generic_container;
        D.32845->is_method = -1;
        D.32842 = gparam->mbuilder;
        D.32845 = D.32842->generic_container;
        D.32849 = klass->image;
        D.32845->image = D.32849;
      }
      <D.32847>:
      D.32842 = gparam->mbuilder;
      D.32845 = D.32842->generic_container;
      param->param.owner = D.32845;
      goto <D.32851>;
      <D.32844>:
      D.32829 = gparam->tbuilder;
      if (D.32829 != 0B) goto <D.32852>; else goto <D.32853>;
      <D.32852>:
      D.32829 = gparam->tbuilder;
      D.32854 = D.32829->generic_container;
      if (D.32854 == 0B) goto <D.32855>; else goto <D.32856>;
      <D.32855>:
      {
        struct MonoClass * klass;

        D.32829 = gparam->tbuilder;
        D.32857 = mono_reflection_type_get_handle (D.32829);
        klass = mono_class_from_mono_type (D.32857);
        D.32829 = gparam->tbuilder;
        D.32858 = klass->image;
        D.32859 = mono_image_alloc0 (D.32858, 56);
        D.32829->generic_container = D.32859;
        D.32829 = gparam->tbuilder;
        D.32854 = D.32829->generic_container;
        D.32854->owner.klass = klass;
      }
      <D.32856>:
      D.32829 = gparam->tbuilder;
      D.32854 = D.32829->generic_container;
      param->param.owner = D.32854;
      <D.32853>:
      <D.32851>:
      D.32842 = gparam->mbuilder;
      D.32860 = D.32842 != 0B;
      D.32861 = (int) D.32860;
      pklass = mono_class_from_generic_parameter (param, image, D.32861);
      D.32862 = &pklass->byval_arg;
      gparam->type.type = D.32862;
      mono_class_set_ref_info (pklass, gparam);
      mono_image_append_class_to_reflection_info_set (pklass);
    }
  finally
    {
      error = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_sighelper_get_signature_local (struct MonoReflectionSigHelper * sig)
{
  struct MonoDynamicImage * iftmp.481;
  guint32 iftmp.482;
  struct MonoArray * D.32868;
  long unsigned int D.32871;
  long unsigned int D.32875;
  char * D.32876;
  char * D.32877;
  long int D.32878;
  char * D.32879;
  long int D.32880;
  long int D.32881;
  struct MonoDomain * D.32882;
  struct MonoClass * D.32883;
  long unsigned int D.32884;
  char * D.32885;
  long unsigned int D.32886;
  struct MonoArray * D.32887;
  struct MonoReflectionModuleBuilder * module;
  struct MonoDynamicImage * assembly;
  guint32 na;
  guint32 buflen;
  guint32 i;
  struct MonoArray * result;
  struct SigBuffer buf;

  try
    {
      module = sig->module;
      if (module != 0B) goto <D.32864>; else goto <D.32865>;
      <D.32864>:
      iftmp.481 = module->dynamic_image;
      goto <D.32866>;
      <D.32865>:
      iftmp.481 = 0B;
      <D.32866>:
      assembly = iftmp.481;
      D.32868 = sig->arguments;
      if (D.32868 != 0B) goto <D.32869>; else goto <D.32870>;
      <D.32869>:
      D.32868 = sig->arguments;
      D.32871 = mono_array_length (D.32868);
      iftmp.482 = (guint32) D.32871;
      goto <D.32872>;
      <D.32870>:
      iftmp.482 = 0;
      <D.32872>:
      na = iftmp.482;
      D.32868 = sig->arguments;
      check_array_for_usertypes (D.32868);
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 7);
      sigbuffer_add_value (&buf, na);
      if (assembly != 0B) goto <D.32873>; else goto <D.32874>;
      <D.32873>:
      i = 0;
      goto <D.22448>;
      <D.22447>:
      {
        struct MonoReflectionType * type;

        D.32868 = sig->arguments;
        D.32875 = (long unsigned int) i;
        D.32876 = mono_array_addr_with_size (D.32868, 8, D.32875);
        type = MEM[(struct MonoReflectionType * *)D.32876];
        encode_reflection_type (assembly, type, &buf);
      }
      i = i + 1;
      <D.22448>:
      if (i < na) goto <D.22447>; else goto <D.22449>;
      <D.22449>:
      <D.32874>:
      D.32877 = buf.p;
      D.32878 = (long int) D.32877;
      D.32879 = buf.buf;
      D.32880 = (long int) D.32879;
      D.32881 = D.32878 - D.32880;
      buflen = (guint32) D.32881;
      D.32882 = mono_domain_get ();
      D.32883 = mono_defaults.byte_class;
      D.32884 = (long unsigned int) buflen;
      result = mono_array_new (D.32882, D.32883, D.32884);
      D.32885 = mono_array_addr_with_size (result, 1, 0);
      D.32879 = buf.buf;
      D.32886 = (long unsigned int) buflen;
      memcpy (D.32885, D.32879, D.32886);
      sigbuffer_free (&buf);
      D.32887 = result;
      return D.32887;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_sighelper_get_signature_field (struct MonoReflectionSigHelper * sig)
{
  struct MonoReflectionModuleBuilder * D.32890;
  guint32 iftmp.483;
  struct MonoArray * D.32892;
  long unsigned int D.32895;
  long unsigned int D.32897;
  char * D.32898;
  char * D.32899;
  long int D.32900;
  char * D.32901;
  long int D.32902;
  long int D.32903;
  struct MonoDomain * D.32904;
  struct MonoClass * D.32905;
  long unsigned int D.32906;
  char * D.32907;
  long unsigned int D.32908;
  struct MonoArray * D.32909;
  struct MonoDynamicImage * assembly;
  guint32 na;
  guint32 buflen;
  guint32 i;
  struct MonoArray * result;
  struct SigBuffer buf;

  try
    {
      D.32890 = sig->module;
      assembly = D.32890->dynamic_image;
      D.32892 = sig->arguments;
      if (D.32892 != 0B) goto <D.32893>; else goto <D.32894>;
      <D.32893>:
      D.32892 = sig->arguments;
      D.32895 = mono_array_length (D.32892);
      iftmp.483 = (guint32) D.32895;
      goto <D.32896>;
      <D.32894>:
      iftmp.483 = 0;
      <D.32896>:
      na = iftmp.483;
      D.32892 = sig->arguments;
      check_array_for_usertypes (D.32892);
      sigbuffer_init (&buf, 32);
      sigbuffer_add_value (&buf, 6);
      i = 0;
      goto <D.22461>;
      <D.22460>:
      {
        struct MonoReflectionType * type;

        D.32892 = sig->arguments;
        D.32897 = (long unsigned int) i;
        D.32898 = mono_array_addr_with_size (D.32892, 8, D.32897);
        type = MEM[(struct MonoReflectionType * *)D.32898];
        encode_reflection_type (assembly, type, &buf);
      }
      i = i + 1;
      <D.22461>:
      if (i < na) goto <D.22460>; else goto <D.22462>;
      <D.22462>:
      D.32899 = buf.p;
      D.32900 = (long int) D.32899;
      D.32901 = buf.buf;
      D.32902 = (long int) D.32901;
      D.32903 = D.32900 - D.32902;
      buflen = (guint32) D.32903;
      D.32904 = mono_domain_get ();
      D.32905 = mono_defaults.byte_class;
      D.32906 = (long unsigned int) buflen;
      result = mono_array_new (D.32904, D.32905, D.32906);
      D.32907 = mono_array_addr_with_size (result, 1, 0);
      D.32901 = buf.buf;
      D.32908 = (long unsigned int) buflen;
      memcpy (D.32907, D.32901, D.32908);
      sigbuffer_free (&buf);
      D.32909 = result;
      return D.32909;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_reflection_create_dynamic_method (struct MonoReflectionDynamicMethod * mb)
{
  int D.32912;
  struct MonoException * D.32915;
  struct MonoReferenceQueue * D.32920;
  int D.32921;
  unsigned int D.32922;
  int D.32923;
  long unsigned int D.32924;
  long unsigned int D.32925;
  void * D.32926;
  struct MonoArray * D.32927;
  long unsigned int D.32928;
  char * D.32929;
  struct MonoVTable * D.32930;
  struct MonoClass * D.32931;
  const char * D.32932;
  int D.32933;
  struct MonoMethod * D.32936;
  struct GSList * D.32940;
  struct GSList * D.32941;
  struct MonoClass * handle_class.484;
  struct MonoReflectionModule * D.32944;
  struct MonoImage * D.32945;
  <unnamed type> D.32949;
  struct MonoClass * handle_class.485;
  void * * D.32955;
  long unsigned int D.32956;
  long unsigned int D.32957;
  void * * D.32958;
  sizetype D.32959;
  sizetype D.32960;
  sizetype D.32961;
  void * * D.32962;
  struct MonoClass * iftmp.486;
  struct MonoReflectionType * D.32964;
  struct MonoType * D.32967;
  struct MonoDomain * D.32969;
  int D.32970;
  struct MonoMethod * D.32973;
  _Bool D.32974;
  long int D.32975;
  long int D.32976;
  void * * D.32979;
  void * D.32980;
  int D.32983;
  sizetype D.32984;
  sizetype D.32985;
  sizetype D.32986;
  void * * D.32987;
  void * D.32988;
  struct MonoMethod * D.32991;
  void * D.32992;
  long int D.32993;
  unsigned int D.32994;
  unsigned int i.487;
  struct GSList * D.32996;
  struct MonoReferenceQueue * queue;
  struct MonoMethod * handle;
  struct DynamicMethodReleaseData * release_data;
  struct ReflectionMethodBuilder rmb;
  struct MonoMethodSignature * sig;
  struct MonoClass * klass;
  struct GSList * l;
  int i;

  try
    {
      D.32912 = mono_runtime_is_shutting_down ();
      if (D.32912 != 0) goto <D.32913>; else goto <D.32914>;
      <D.32913>:
      D.32915 = mono_get_exception_invalid_operation ("");
      mono_raise_exception (D.32915);
      <D.32914>:
      queue = dynamic_method_queue;
      if (queue == 0B) goto <D.32916>; else goto <D.32917>;
      <D.32916>:
      mono_loader_lock ();
      queue = dynamic_method_queue;
      if (queue == 0B) goto <D.32918>; else goto <D.32919>;
      <D.32918>:
      D.32920 = mono_gc_reference_queue_new (free_dynamic_method);
      dynamic_method_queue = D.32920;
      queue = dynamic_method_queue;
      <D.32919>:
      mono_loader_unlock ();
      <D.32917>:
      sig = dynamic_method_to_signature (mb);
      reflection_methodbuilder_from_dynamic_method (&rmb, mb);
      D.32921 = mb->nrefs;
      D.32922 = (unsigned int) D.32921;
      rmb.nrefs = D.32922;
      D.32921 = mb->nrefs;
      D.32923 = D.32921 + 1;
      D.32924 = (long unsigned int) D.32923;
      D.32925 = D.32924 * 8;
      D.32926 = monoeg_malloc0 (D.32925);
      rmb.refs = D.32926;
      i = 0;
      goto <D.22489>;
      <D.22488>:
      {
        struct MonoClass * handle_class;
        void * ref;
        struct MonoObject * obj;

        try
          {
            D.32927 = mb->refs;
            D.32928 = (long unsigned int) i;
            D.32929 = mono_array_addr_with_size (D.32927, 8, D.32928);
            obj = MEM[(struct MonoObject * *)D.32929];
            D.32930 = obj->vtable;
            D.32931 = D.32930->klass;
            D.32932 = D.32931->name;
            D.32933 = strcmp (D.32932, "DynamicMethod");
            if (D.32933 == 0) goto <D.32934>; else goto <D.32935>;
            <D.32934>:
            {
              struct MonoReflectionDynamicMethod * method;

              method = obj;
              D.32936 = method->mhandle;
              if (D.32936 != 0B) goto <D.32937>; else goto <D.32938>;
              <D.32937>:
              ref = method->mhandle;
              goto <D.32939>;
              <D.32938>:
              ref = method;
              D.32940 = method->referenced_by;
              D.32941 = monoeg_g_slist_append (D.32940, mb);
              method->referenced_by = D.32941;
              <D.32939>:
              handle_class.484 = mono_defaults.methodhandle_class;
              handle_class = handle_class.484;
            }
            goto <D.32943>;
            <D.32935>:
            {
              struct MonoException * ex;

              ex = 0B;
              D.32944 = mb->module;
              D.32945 = D.32944->image;
              ref = resolve_object (D.32945, obj, &handle_class, 0B);
              if (ref == 0B) goto <D.32946>; else goto <D.32947>;
              <D.32946>:
              ex = mono_get_exception_type_load (0B, 0B);
              goto <D.32948>;
              <D.32947>:
              D.32949 = mono_security_get_mode ();
              if (D.32949 == 1) goto <D.32950>; else goto <D.32951>;
              <D.32950>:
              handle_class.485 = handle_class;
              ex = mono_security_core_clr_ensure_dynamic_method_resolved_object (ref, handle_class.485);
              <D.32951>:
              <D.32948>:
              if (ex != 0B) goto <D.32953>; else goto <D.32954>;
              <D.32953>:
              D.32955 = rmb.refs;
              monoeg_g_free (D.32955);
              mono_raise_exception (ex);
              return;
              <D.32954>:
            }
            <D.32943>:
            D.32955 = rmb.refs;
            D.32956 = (long unsigned int) i;
            D.32957 = D.32956 * 8;
            D.32958 = D.32955 + D.32957;
            *D.32958 = ref;
            D.32955 = rmb.refs;
            D.32959 = (sizetype) i;
            D.32960 = D.32959 + 1;
            D.32961 = D.32960 * 8;
            D.32962 = D.32955 + D.32961;
            handle_class.485 = handle_class;
            *D.32962 = handle_class.485;
          }
        finally
          {
            handle_class = {CLOBBER};
          }
      }
      i = i + 2;
      <D.22489>:
      D.32921 = mb->nrefs;
      if (D.32921 > i) goto <D.22488>; else goto <D.22490>;
      <D.22490>:
      D.32964 = mb->owner;
      if (D.32964 != 0B) goto <D.32965>; else goto <D.32966>;
      <D.32965>:
      D.32964 = mb->owner;
      D.32967 = mono_reflection_type_get_handle (D.32964);
      iftmp.486 = mono_class_from_mono_type (D.32967);
      goto <D.32968>;
      <D.32966>:
      iftmp.486 = mono_defaults.object_class;
      <D.32968>:
      klass = iftmp.486;
      handle = reflection_methodbuilder_to_mono_method (klass, &rmb, sig);
      mb->mhandle = handle;
      release_data = monoeg_malloc (16);
      release_data->handle = handle;
      D.32969 = mono_object_get_domain (mb);
      release_data->domain = D.32969;
      D.32970 = mono_gc_reference_queue_add (queue, mb, release_data);
      if (D.32970 == 0) goto <D.32971>; else goto <D.32972>;
      <D.32971>:
      monoeg_g_free (release_data);
      <D.32972>:
      l = mb->referenced_by;
      goto <D.22498>;
      <D.22497>:
      {
        struct MonoReflectionDynamicMethod * method;
        struct MonoMethodWrapper * wrapper;
        void * * data;

        method = l->data;
        wrapper = method->mhandle;
        D.32973 = method->mhandle;
        D.32974 = D.32973 == 0B;
        D.32975 = (long int) D.32974;
        D.32976 = __builtin_expect (D.32975, 0);
        if (D.32976 != 0) goto <D.32977>; else goto <D.32978>;
        <D.32977>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11637, "method->mhandle");
        <D.32978>:
        data = wrapper->method_data;
        i = 0;
        goto <D.22495>;
        <D.22494>:
        D.32959 = (sizetype) i;
        D.32960 = D.32959 + 1;
        D.32961 = D.32960 * 8;
        D.32979 = data + D.32961;
        D.32980 = *D.32979;
        if (D.32980 == mb) goto <D.32981>; else goto <D.32982>;
        <D.32981>:
        D.32983 = i + 1;
        D.32984 = (sizetype) D.32983;
        D.32985 = D.32984 + 1;
        D.32986 = D.32985 * 8;
        D.32987 = data + D.32986;
        D.32988 = *D.32987;
        handle_class.484 = mono_defaults.methodhandle_class;
        if (D.32988 == handle_class.484) goto <D.32989>; else goto <D.32990>;
        <D.32989>:
        D.32959 = (sizetype) i;
        D.32960 = D.32959 + 1;
        D.32961 = D.32960 * 8;
        D.32979 = data + D.32961;
        D.32991 = mb->mhandle;
        *D.32979 = D.32991;
        <D.32990>:
        <D.32982>:
        i = i + 2;
        <D.22495>:
        D.32992 = *data;
        D.32993 = (long int) D.32992;
        D.32994 = (unsigned int) D.32993;
        i.487 = (unsigned int) i;
        if (D.32994 > i.487) goto <D.22494>; else goto <D.22496>;
        <D.22496>:
      }
      l = l->next;
      <D.22498>:
      if (l != 0B) goto <D.22497>; else goto <D.22499>;
      <D.22499>:
      D.32996 = mb->referenced_by;
      monoeg_g_slist_free (D.32996);
      D.32955 = rmb.refs;
      monoeg_g_free (D.32955);
      mb->ilgen = 0B;
    }
  finally
    {
      rmb = {CLOBBER};
    }
}


free_dynamic_method (void * dynamic_method)
{
  struct MonoDomain * D.33002;
  struct MonoMethod * D.33003;
  struct DynamicMethodReleaseData * data;

  data = dynamic_method;
  D.33002 = data->domain;
  D.33003 = data->handle;
  mono_runtime_free_method (D.33002, D.33003);
  monoeg_g_free (data);
}


dynamic_method_to_signature (struct MonoReflectionDynamicMethod * method)
{
  struct MonoArray * D.33004;
  unsigned int D.33005;
  unsigned int D.33006;
  _Bool D.33007;
  struct MonoType * iftmp.488;
  struct MonoReflectionType * D.33009;
  struct MonoClass * D.33013;
  struct MonoMethodSignature * D.33014;
  struct MonoMethodSignature * sig;

  D.33004 = method->parameters;
  sig = parameters_to_signature (0B, D.33004);
  D.33005 = method->attrs;
  D.33006 = D.33005 & 16;
  D.33007 = D.33006 == 0;
  sig->hasthis = D.33007;
  D.33009 = method->rtype;
  if (D.33009 != 0B) goto <D.33010>; else goto <D.33011>;
  <D.33010>:
  D.33009 = method->rtype;
  iftmp.488 = mono_reflection_type_get_handle (D.33009);
  goto <D.33012>;
  <D.33011>:
  D.33013 = mono_defaults.void_class;
  iftmp.488 = &D.33013->byval_arg;
  <D.33012>:
  sig->ret = iftmp.488;
  sig->generic_param_count = 0;
  D.33014 = sig;
  return D.33014;
}


reflection_methodbuilder_from_dynamic_method (struct ReflectionMethodBuilder * rmb, struct MonoReflectionDynamicMethod * mb)
{
  struct MonoReflectionILGen * D.33016;
  struct MonoReflectionType * D.33017;
  struct MonoArray * D.33018;
  unsigned int D.33019;
  unsigned int D.33020;
  struct MonoReflectionType * D.33021;
  struct MonoString * D.33022;
  unsigned char D.33023;
  unsigned char D.33024;
  struct MonoMethod * D.33025;

  memset (rmb, 0, 208);
  D.33016 = mb->ilgen;
  rmb->ilgen = D.33016;
  D.33017 = mb->rtype;
  rmb->rtype = D.33017;
  D.33018 = mb->parameters;
  rmb->parameters = D.33018;
  rmb->generic_params = 0B;
  rmb->generic_container = 0B;
  rmb->opt_types = 0B;
  rmb->pinfo = 0B;
  D.33019 = mb->attrs;
  rmb->attrs = D.33019;
  rmb->iattrs = 0;
  D.33020 = mb->call_conv;
  rmb->call_conv = D.33020;
  rmb->code = 0B;
  D.33021 = mb->owner;
  rmb->type = D.33021;
  D.33022 = mb->name;
  rmb->name = D.33022;
  rmb->table_idx = 0B;
  D.33023 = mb->init_locals;
  rmb->init_locals = D.33023;
  D.33024 = mb->skip_visibility;
  rmb->skip_visibility = D.33024;
  rmb->return_modreq = 0B;
  rmb->return_modopt = 0B;
  rmb->param_modreq = 0B;
  rmb->param_modopt = 0B;
  rmb->permissions = 0B;
  D.33025 = mb->mhandle;
  rmb->mhandle = D.33025;
  rmb->nrefs = 0;
  rmb->refs = 0B;
}


resolve_object (struct MonoImage * image, struct MonoObject * obj, struct MonoClass * * handle_class, struct MonoGenericContext * context)
{
  struct MonoVTable * D.33026;
  struct MonoClass * D.33027;
  const char * D.33028;
  int D.33029;
  struct MonoClass * D.33032;
  _Bool D.33033;
  long int D.33034;
  long int D.33035;
  int D.33039;
  int D.33042;
  struct MonoException * D.33045;
  struct MonoClass * D.33049;
  int D.33056;
  int D.33058;
  int D.33060;
  int D.33062;
  struct MonoClass * D.33065;
  int D.33068;
  struct MonoDomain * D.33073;
  int D.33077;
  struct MonoDomain * D.33082;
  int D.33086;
  struct MonoClass * D.33089;
  struct MonoType * D.33092;
  const char * D.33093;
  const char * D.33094;
  int D.33095;
  int iftmp.489;
  int D.33102;
  _Bool D.33103;
  long int D.33104;
  long int D.33105;
  struct MonoClass * D.33109;
  int D.33113;
  struct MonoDomain * D.33118;
  struct MonoClassField * D.33119;
  struct MonoClass * D.33122;
  struct MonoGenericContainer * D.33123;
  struct MonoType * D.33126;
  const char * D.33127;
  int D.33131;
  long unsigned int D.33134;
  long unsigned int D.33135;
  struct MonoDomain * D.33139;
  int D.33143;
  struct MonoArray * D.33146;
  long unsigned int D.33149;
  unsigned int nargs.490;
  unsigned int D.33152;
  unsigned int D.33153;
  _Bool D.33154;
  unsigned int D.33155;
  _Bool D.33156;
  unsigned int D.33157;
  unsigned char D.33160;
  unsigned char D.33161;
  <unnamed-unsigned:6> D.33162;
  unsigned int D.33164;
  short unsigned int D.33168;
  struct MonoReflectionType * D.33169;
  struct MonoType * D.33170;
  long unsigned int D.33171;
  char * D.33172;
  void * D.33173;
  struct MonoType * D.33174;
  int D.33176;
  struct MonoMethod * D.33179;
  _Bool D.33180;
  long int D.33181;
  long int D.33182;
  int D.33186;
  int D.33192;
  int D.33198;
  struct MonoObject * D.33201;
  struct MonoVTable * D.33202;
  struct MonoClass * D.33203;
  int D.33204;
  int D.33208;
  char * D.33212;
  struct MonoReflectionGenericClass * D.33213;
  struct MonoType * D.33214;
  const char * D.33215;
  struct MonoClass * D.33216;
  int D.33220;
  struct MonoReflectionGenericClass * D.33223;
  struct MonoType * D.33224;
  struct MonoObject * D.33225;
  struct MonoVTable * D.33226;
  struct MonoClass * D.33227;
  int D.33228;
  int D.33232;
  char * D.33236;
  int D.33238;
  struct MonoArray * D.33241;
  struct MonoReflectionType * D.33247;
  struct MonoType * D.33248;
  struct MonoObject * D.33249;
  struct MonoVTable * D.33250;
  struct MonoClass * D.33251;
  int D.33252;
  int D.33256;
  char * D.33260;
  int D.33262;
  struct MonoReflectionType * D.33265;
  struct MonoString * D.33266;
  const char * D.33267;
  int D.33268;
  _Bool D.33270;
  long int D.33271;
  long int D.33272;
  struct MonoClass * D.33279;
  int D.33280;
  struct MonoClass * D.33282;
  int D.33283;
  struct MonoClass * D.33285;
  int D.33286;
  void * D.33290;
  void * result;

  result = 0B;
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33029 = strcmp (D.33028, "String");
  if (D.33029 == 0) goto <D.33030>; else goto <D.33031>;
  <D.33030>:
  result = mono_string_intern (obj);
  D.33032 = mono_defaults.string_class;
  *handle_class = D.33032;
  D.33033 = result == 0B;
  D.33034 = (long int) D.33033;
  D.33035 = __builtin_expect (D.33034, 0);
  if (D.33035 != 0) goto <D.33036>; else goto <D.33037>;
  <D.33036>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11751, "result");
  <D.33037>:
  goto <D.33038>;
  <D.33031>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33039 = strcmp (D.33028, "MonoType");
  if (D.33039 == 0) goto <D.33040>; else goto <D.33041>;
  <D.33040>:
  {
    struct MonoType * type;
    struct MonoClass * mc;

    type = mono_reflection_type_get_handle (obj);
    mc = mono_class_from_mono_type (type);
    D.33042 = mono_class_init (mc);
    if (D.33042 == 0) goto <D.33043>; else goto <D.33044>;
    <D.33043>:
    D.33045 = mono_class_get_exception_for_failure (mc);
    mono_raise_exception (D.33045);
    <D.33044>:
    if (context != 0B) goto <D.33046>; else goto <D.33047>;
    <D.33046>:
    {
      struct MonoType * inflated;

      inflated = mono_class_inflate_generic_type (type, context);
      result = mono_class_from_mono_type (inflated);
      mono_metadata_free_type (inflated);
    }
    goto <D.33048>;
    <D.33047>:
    result = mono_class_from_mono_type (type);
    <D.33048>:
    D.33049 = mono_defaults.typehandle_class;
    *handle_class = D.33049;
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33050>; else goto <D.33051>;
    <D.33050>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11766, "result");
    <D.33051>:
  }
  goto <D.33052>;
  <D.33041>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33056 = strcmp (D.33028, "MonoMethod");
  if (D.33056 == 0) goto <D.33053>; else goto <D.33057>;
  <D.33057>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33058 = strcmp (D.33028, "MonoCMethod");
  if (D.33058 == 0) goto <D.33053>; else goto <D.33059>;
  <D.33059>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33060 = strcmp (D.33028, "MonoGenericCMethod");
  if (D.33060 == 0) goto <D.33053>; else goto <D.33061>;
  <D.33061>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33062 = strcmp (D.33028, "MonoGenericMethod");
  if (D.33062 == 0) goto <D.33053>; else goto <D.33054>;
  <D.33053>:
  result = MEM[(struct MonoReflectionMethod *)obj].method;
  if (context != 0B) goto <D.33063>; else goto <D.33064>;
  <D.33063>:
  result = mono_class_inflate_generic_method (result, context);
  <D.33064>:
  D.33065 = mono_defaults.methodhandle_class;
  *handle_class = D.33065;
  D.33033 = result == 0B;
  D.33034 = (long int) D.33033;
  D.33035 = __builtin_expect (D.33034, 0);
  if (D.33035 != 0) goto <D.33066>; else goto <D.33067>;
  <D.33066>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11775, "result");
  <D.33067>:
  goto <D.33055>;
  <D.33054>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33068 = strcmp (D.33028, "MethodBuilder");
  if (D.33068 == 0) goto <D.33069>; else goto <D.33070>;
  <D.33069>:
  {
    struct MonoReflectionMethodBuilder * mb;

    mb = obj;
    result = mb->mhandle;
    if (result == 0B) goto <D.33071>; else goto <D.33072>;
    <D.33071>:
    {
      struct MonoReflectionTypeBuilder * tb;

      tb = mb->type;
      D.33073 = mono_domain_get ();
      mono_domain_try_type_resolve (D.33073, 0B, tb);
      result = mb->mhandle;
    }
    <D.33072>:
    if (context != 0B) goto <D.33074>; else goto <D.33075>;
    <D.33074>:
    result = mono_class_inflate_generic_method (result, context);
    <D.33075>:
    D.33065 = mono_defaults.methodhandle_class;
    *handle_class = D.33065;
  }
  goto <D.33076>;
  <D.33070>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33077 = strcmp (D.33028, "ConstructorBuilder");
  if (D.33077 == 0) goto <D.33078>; else goto <D.33079>;
  <D.33078>:
  {
    struct MonoReflectionCtorBuilder * cb;

    cb = obj;
    result = cb->mhandle;
    if (result == 0B) goto <D.33080>; else goto <D.33081>;
    <D.33080>:
    {
      struct MonoReflectionTypeBuilder * tb;

      tb = cb->type;
      D.33082 = mono_domain_get ();
      mono_domain_try_type_resolve (D.33082, 0B, tb);
      result = cb->mhandle;
    }
    <D.33081>:
    if (context != 0B) goto <D.33083>; else goto <D.33084>;
    <D.33083>:
    result = mono_class_inflate_generic_method (result, context);
    <D.33084>:
    D.33065 = mono_defaults.methodhandle_class;
    *handle_class = D.33065;
  }
  goto <D.33085>;
  <D.33079>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33086 = strcmp (D.33028, "MonoField");
  if (D.33086 == 0) goto <D.33087>; else goto <D.33088>;
  <D.33087>:
  {
    struct MonoClassField * field;

    field = MEM[(struct MonoReflectionField *)obj].field;
    D.33089 = field->parent;
    ensure_complete_type (D.33089);
    if (context != 0B) goto <D.33090>; else goto <D.33091>;
    <D.33090>:
    {
      struct MonoType * inflated;
      struct MonoClass * class;
      struct MonoClassField * inflated_field;
      void * iter;

      try
        {
          D.33089 = field->parent;
          D.33092 = &D.33089->byval_arg;
          inflated = mono_class_inflate_generic_type (D.33092, context);
          class = mono_class_from_mono_type (inflated);
          iter = 0B;
          mono_metadata_free_type (inflated);
          goto <D.22551>;
          <D.22550>:
          D.33093 = field->name;
          D.33094 = inflated_field->name;
          D.33095 = strcmp (D.33093, D.33094);
          if (D.33095 == 0) goto <D.22549>; else goto <D.33096>;
          <D.33096>:
          <D.22551>:
          inflated_field = mono_class_get_fields (class, &iter);
          if (inflated_field != 0B) goto <D.22550>; else goto <D.22549>;
          <D.22549>:
          if (inflated_field == 0B) goto <D.33098>; else goto <D.33101>;
          <D.33101>:
          D.33093 = field->name;
          D.33094 = inflated_field->name;
          D.33102 = strcmp (D.33093, D.33094);
          if (D.33102 != 0) goto <D.33098>; else goto <D.33099>;
          <D.33098>:
          iftmp.489 = 1;
          goto <D.33100>;
          <D.33099>:
          iftmp.489 = 0;
          <D.33100>:
          D.33103 = iftmp.489 != 0;
          D.33104 = (long int) D.33103;
          D.33105 = __builtin_expect (D.33104, 0);
          if (D.33105 != 0) goto <D.33106>; else goto <D.33107>;
          <D.33106>:
          monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11825, "inflated_field && !strcmp (field->name, inflated_field->name)");
          <D.33107>:
          result = inflated_field;
        }
      finally
        {
          iter = {CLOBBER};
        }
    }
    goto <D.33108>;
    <D.33091>:
    result = field;
    <D.33108>:
    D.33109 = mono_defaults.fieldhandle_class;
    *handle_class = D.33109;
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33110>; else goto <D.33111>;
    <D.33110>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11831, "result");
    <D.33111>:
  }
  goto <D.33112>;
  <D.33088>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33113 = strcmp (D.33028, "FieldBuilder");
  if (D.33113 == 0) goto <D.33114>; else goto <D.33115>;
  <D.33114>:
  {
    struct MonoReflectionFieldBuilder * fb;

    fb = obj;
    result = fb->handle;
    if (result == 0B) goto <D.33116>; else goto <D.33117>;
    <D.33116>:
    {
      struct MonoReflectionTypeBuilder * tb;

      tb = fb->typeb;
      D.33118 = mono_domain_get ();
      mono_domain_try_type_resolve (D.33118, 0B, tb);
      result = fb->handle;
    }
    <D.33117>:
    D.33119 = fb->handle;
    if (D.33119 != 0B) goto <D.33120>; else goto <D.33121>;
    <D.33120>:
    D.33119 = fb->handle;
    D.33122 = D.33119->parent;
    D.33123 = D.33122->generic_container;
    if (D.33123 != 0B) goto <D.33124>; else goto <D.33125>;
    <D.33124>:
    {
      struct MonoClass * klass;
      struct MonoType * type;
      struct MonoClass * inflated;

      D.33119 = fb->handle;
      klass = D.33119->parent;
      D.33126 = &klass->byval_arg;
      type = mono_class_inflate_generic_type (D.33126, context);
      inflated = mono_class_from_mono_type (type);
      D.33119 = fb->handle;
      D.33127 = mono_field_get_name (D.33119);
      result = mono_class_get_field_from_name (inflated, D.33127);
      D.33033 = result == 0B;
      D.33034 = (long int) D.33033;
      D.33035 = __builtin_expect (D.33034, 0);
      if (D.33035 != 0) goto <D.33128>; else goto <D.33129>;
      <D.33128>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11849, "result");
      <D.33129>:
      mono_metadata_free_type (type);
    }
    <D.33125>:
    <D.33121>:
    D.33109 = mono_defaults.fieldhandle_class;
    *handle_class = D.33109;
  }
  goto <D.33130>;
  <D.33115>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33131 = strcmp (D.33028, "TypeBuilder");
  if (D.33131 == 0) goto <D.33132>; else goto <D.33133>;
  <D.33132>:
  {
    struct MonoReflectionTypeBuilder * tb;
    struct MonoType * type;
    struct MonoClass * klass;

    tb = obj;
    type = mono_reflection_type_get_handle (tb);
    klass = type->data.klass;
    D.33134 = BIT_FIELD_REF <*klass, 64, 256>;
    D.33135 = D.33134 & 72057594037927936;
    if (D.33135 != 0) goto <D.33136>; else goto <D.33137>;
    <D.33136>:
    result = klass;
    goto <D.33138>;
    <D.33137>:
    D.33139 = mono_domain_get ();
    mono_domain_try_type_resolve (D.33139, 0B, tb);
    result = type->data.klass;
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33140>; else goto <D.33141>;
    <D.33140>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11866, "result");
    <D.33141>:
    <D.33138>:
    D.33049 = mono_defaults.typehandle_class;
    *handle_class = D.33049;
  }
  goto <D.33142>;
  <D.33133>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33143 = strcmp (D.33028, "SignatureHelper");
  if (D.33143 == 0) goto <D.33144>; else goto <D.33145>;
  <D.33144>:
  {
    struct MonoReflectionSigHelper * helper;
    struct MonoMethodSignature * sig;
    int nargs;
    int i;

    helper = obj;
    D.33146 = helper->arguments;
    if (D.33146 != 0B) goto <D.33147>; else goto <D.33148>;
    <D.33147>:
    D.33146 = helper->arguments;
    D.33149 = mono_array_length (D.33146);
    nargs = (int) D.33149;
    goto <D.33150>;
    <D.33148>:
    nargs = 0;
    <D.33150>:
    nargs.490 = (unsigned int) nargs;
    sig = mono_metadata_signature_alloc (image, nargs.490);
    D.33152 = helper->call_conv;
    D.33153 = D.33152 & 64;
    D.33154 = D.33153 != 0;
    sig->explicit_this = D.33154;
    D.33152 = helper->call_conv;
    D.33155 = D.33152 & 32;
    D.33156 = D.33155 != 0;
    sig->hasthis = D.33156;
    D.33157 = helper->unmanaged_call_conv;
    if (D.33157 != 0) goto <D.33158>; else goto <D.33159>;
    <D.33158>:
    D.33157 = helper->unmanaged_call_conv;
    D.33160 = (unsigned char) D.33157;
    D.33161 = D.33160 + 255;
    D.33162 = (<unnamed-unsigned:6>) D.33161;
    sig->call_convention = D.33162;
    sig->pinvoke = 1;
    goto <D.33163>;
    <D.33159>:
    D.33152 = helper->call_conv;
    D.33164 = D.33152 & 2;
    if (D.33164 != 0) goto <D.33165>; else goto <D.33166>;
    <D.33165>:
    sig->call_convention = 5;
    goto <D.33167>;
    <D.33166>:
    sig->call_convention = 0;
    <D.33167>:
    <D.33163>:
    D.33168 = (short unsigned int) nargs;
    sig->param_count = D.33168;
    D.33169 = helper->return_type;
    D.33170 = D.33169->type;
    sig->ret = D.33170;
    i = 0;
    goto <D.22565>;
    <D.22564>:
    D.33146 = helper->arguments;
    D.33171 = (long unsigned int) i;
    D.33172 = mono_array_addr_with_size (D.33146, 8, D.33171);
    D.33173 = MEM[(void * *)D.33172];
    D.33174 = mono_reflection_type_get_handle (D.33173);
    sig->params[i] = D.33174;
    i = i + 1;
    <D.22565>:
    if (i < nargs) goto <D.22564>; else goto <D.22566>;
    <D.22566>:
    result = sig;
    *handle_class = 0B;
  }
  goto <D.33175>;
  <D.33145>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33176 = strcmp (D.33028, "DynamicMethod");
  if (D.33176 == 0) goto <D.33177>; else goto <D.33178>;
  <D.33177>:
  {
    struct MonoReflectionDynamicMethod * method;

    method = obj;
    D.33179 = method->mhandle;
    D.33180 = D.33179 == 0B;
    D.33181 = (long int) D.33180;
    D.33182 = __builtin_expect (D.33181, 0);
    if (D.33182 != 0) goto <D.33183>; else goto <D.33184>;
    <D.33183>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11903, "method->mhandle");
    <D.33184>:
    result = method->mhandle;
    D.33065 = mono_defaults.methodhandle_class;
    *handle_class = D.33065;
  }
  goto <D.33185>;
  <D.33178>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33186 = strcmp (D.33028, "GenericTypeParameterBuilder");
  if (D.33186 == 0) goto <D.33187>; else goto <D.33188>;
  <D.33187>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    type = mono_class_inflate_generic_type (type, context);
    result = mono_class_from_mono_type (type);
    D.33049 = mono_defaults.typehandle_class;
    *handle_class = D.33049;
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33189>; else goto <D.33190>;
    <D.33189>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11911, "result");
    <D.33190>:
    mono_metadata_free_type (type);
  }
  goto <D.33191>;
  <D.33188>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33192 = strcmp (D.33028, "MonoGenericClass");
  if (D.33192 == 0) goto <D.33193>; else goto <D.33194>;
  <D.33193>:
  {
    struct MonoType * type;

    type = mono_reflection_type_get_handle (obj);
    type = mono_class_inflate_generic_type (type, context);
    result = mono_class_from_mono_type (type);
    D.33049 = mono_defaults.typehandle_class;
    *handle_class = D.33049;
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33195>; else goto <D.33196>;
    <D.33195>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11918, "result");
    <D.33196>:
    mono_metadata_free_type (type);
  }
  goto <D.33197>;
  <D.33194>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33198 = strcmp (D.33028, "FieldOnTypeBuilderInst");
  if (D.33198 == 0) goto <D.33199>; else goto <D.33200>;
  <D.33199>:
  {
    struct MonoReflectionFieldOnTypeBuilderInst * f;
    struct MonoClass * inflated;
    struct MonoType * type;
    struct MonoClassField * field;

    f = obj;
    D.33201 = f->fb;
    D.33202 = D.33201->vtable;
    D.33203 = D.33202->klass;
    D.33204 = is_sre_field_builder (D.33203);
    if (D.33204 != 0) goto <D.33205>; else goto <D.33206>;
    <D.33205>:
    D.33201 = f->fb;
    field = MEM[(struct MonoReflectionFieldBuilder *)D.33201].handle;
    goto <D.33207>;
    <D.33206>:
    D.33201 = f->fb;
    D.33202 = D.33201->vtable;
    D.33203 = D.33202->klass;
    D.33208 = is_sr_mono_field (D.33203);
    if (D.33208 != 0) goto <D.33209>; else goto <D.33210>;
    <D.33209>:
    D.33201 = f->fb;
    field = MEM[(struct MonoReflectionField *)D.33201].field;
    goto <D.33211>;
    <D.33210>:
    D.33201 = f->fb;
    D.33202 = D.33201->vtable;
    D.33203 = D.33202->klass;
    D.33212 = mono_type_get_full_name (D.33203);
    monoeg_g_log (0B, 4, "resolve_object:: can\'t handle a FTBI with base_method of type %s", D.33212);
    <D.22574>:
    goto <D.22574>;
    <D.33211>:
    <D.33207>:
    D.33213 = f->inst;
    D.33214 = mono_reflection_type_get_handle (D.33213);
    type = mono_class_inflate_generic_type (D.33214, context);
    inflated = mono_class_from_mono_type (type);
    D.33215 = mono_field_get_name (field);
    field = mono_class_get_field_from_name (inflated, D.33215);
    result = field;
    D.33216 = field->parent;
    ensure_complete_type (D.33216);
    D.33033 = result == 0B;
    D.33034 = (long int) D.33033;
    D.33035 = __builtin_expect (D.33034, 0);
    if (D.33035 != 0) goto <D.33217>; else goto <D.33218>;
    <D.33217>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11938, "result");
    <D.33218>:
    mono_metadata_free_type (type);
    D.33109 = mono_defaults.fieldhandle_class;
    *handle_class = D.33109;
  }
  goto <D.33219>;
  <D.33200>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33220 = strcmp (D.33028, "ConstructorOnTypeBuilderInst");
  if (D.33220 == 0) goto <D.33221>; else goto <D.33222>;
  <D.33221>:
  {
    struct MonoReflectionCtorOnTypeBuilderInst * c;
    struct MonoType * type;
    struct MonoClass * inflated_klass;
    struct MonoMethod * method;

    c = obj;
    D.33223 = c->inst;
    D.33224 = mono_reflection_type_get_handle (D.33223);
    type = mono_class_inflate_generic_type (D.33224, context);
    inflated_klass = mono_class_from_mono_type (type);
    D.33225 = c->cb;
    D.33226 = D.33225->vtable;
    D.33227 = D.33226->klass;
    D.33228 = is_sre_ctor_builder (D.33227);
    if (D.33228 != 0) goto <D.33229>; else goto <D.33230>;
    <D.33229>:
    D.33225 = c->cb;
    method = MEM[(struct MonoReflectionCtorBuilder *)D.33225].mhandle;
    goto <D.33231>;
    <D.33230>:
    D.33225 = c->cb;
    D.33226 = D.33225->vtable;
    D.33227 = D.33226->klass;
    D.33232 = is_sr_mono_cmethod (D.33227);
    if (D.33232 != 0) goto <D.33233>; else goto <D.33234>;
    <D.33233>:
    D.33225 = c->cb;
    method = MEM[(struct MonoReflectionMethod *)D.33225].method;
    goto <D.33235>;
    <D.33234>:
    D.33225 = c->cb;
    D.33226 = D.33225->vtable;
    D.33227 = D.33226->klass;
    D.33236 = mono_type_get_full_name (D.33227);
    monoeg_g_log (0B, 4, "resolve_object:: can\'t handle a CTBI with base_method of type %s", D.33236);
    <D.22579>:
    goto <D.22579>;
    <D.33235>:
    <D.33231>:
    D.33225 = c->cb;
    result = inflate_mono_method (inflated_klass, method, D.33225);
    D.33065 = mono_defaults.methodhandle_class;
    *handle_class = D.33065;
    mono_metadata_free_type (type);
  }
  goto <D.33237>;
  <D.33222>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33238 = strcmp (D.33028, "MethodOnTypeBuilderInst");
  if (D.33238 == 0) goto <D.33239>; else goto <D.33240>;
  <D.33239>:
  {
    struct MonoReflectionMethodOnTypeBuilderInst * m;

    m = obj;
    D.33241 = m->method_args;
    if (D.33241 != 0B) goto <D.33242>; else goto <D.33243>;
    <D.33242>:
    result = mono_reflection_method_on_tb_inst_get_handle (m);
    if (context != 0B) goto <D.33244>; else goto <D.33245>;
    <D.33244>:
    result = mono_class_inflate_generic_method (result, context);
    <D.33245>:
    goto <D.33246>;
    <D.33243>:
    {
      struct MonoType * type;
      struct MonoClass * inflated_klass;
      struct MonoMethod * method;

      D.33247 = m->inst;
      D.33248 = mono_reflection_type_get_handle (D.33247);
      type = mono_class_inflate_generic_type (D.33248, context);
      inflated_klass = mono_class_from_mono_type (type);
      D.33249 = m->mb;
      D.33250 = D.33249->vtable;
      D.33251 = D.33250->klass;
      D.33252 = is_sre_method_builder (D.33251);
      if (D.33252 != 0) goto <D.33253>; else goto <D.33254>;
      <D.33253>:
      D.33249 = m->mb;
      method = MEM[(struct MonoReflectionMethodBuilder *)D.33249].mhandle;
      goto <D.33255>;
      <D.33254>:
      D.33249 = m->mb;
      D.33250 = D.33249->vtable;
      D.33251 = D.33250->klass;
      D.33256 = is_sr_mono_method (D.33251);
      if (D.33256 != 0) goto <D.33257>; else goto <D.33258>;
      <D.33257>:
      D.33249 = m->mb;
      method = MEM[(struct MonoReflectionMethod *)D.33249].method;
      goto <D.33259>;
      <D.33258>:
      D.33249 = m->mb;
      D.33250 = D.33249->vtable;
      D.33251 = D.33250->klass;
      D.33260 = mono_type_get_full_name (D.33251);
      monoeg_g_log (0B, 4, "resolve_object:: can\'t handle a MTBI with base_method of type %s", D.33260);
      <D.22584>:
      goto <D.22584>;
      <D.33259>:
      <D.33255>:
      D.33249 = m->mb;
      result = inflate_mono_method (inflated_klass, method, D.33249);
      mono_metadata_free_type (type);
    }
    <D.33246>:
    D.33065 = mono_defaults.methodhandle_class;
    *handle_class = D.33065;
  }
  goto <D.33261>;
  <D.33240>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  D.33262 = strcmp (D.33028, "MonoArrayMethod");
  if (D.33262 == 0) goto <D.33263>; else goto <D.33264>;
  <D.33263>:
  {
    struct MonoReflectionArrayMethod * m;
    struct MonoType * mtype;
    struct MonoClass * klass;
    struct MonoMethod * method;
    void * iter;
    char * name;

    try
      {
        m = obj;
        D.33265 = m->parent;
        mtype = mono_reflection_type_get_handle (D.33265);
        klass = mono_class_from_mono_type (mtype);
        D.33266 = m->name;
        name = mono_string_to_utf8 (D.33266);
        iter = 0B;
        goto <D.22593>;
        <D.22592>:
        D.33267 = method->name;
        D.33268 = strcmp (D.33267, name);
        if (D.33268 == 0) goto <D.22591>; else goto <D.33269>;
        <D.33269>:
        <D.22593>:
        method = mono_class_get_methods (klass, &iter);
        if (method != 0B) goto <D.22592>; else goto <D.22591>;
        <D.22591>:
        monoeg_g_free (name);
        D.33270 = method == 0B;
        D.33271 = (long int) D.33270;
        D.33272 = __builtin_expect (D.33271, 0);
        if (D.33272 != 0) goto <D.33273>; else goto <D.33274>;
        <D.33273>:
        monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12001, "method");
        <D.33274>:
        result = method;
        D.33065 = mono_defaults.methodhandle_class;
        *handle_class = D.33065;
      }
    finally
      {
        iter = {CLOBBER};
      }
  }
  goto <D.33275>;
  <D.33264>:
  D.33279 = mono_object_get_class (obj);
  D.33280 = is_sre_array (D.33279);
  if (D.33280 != 0) goto <D.33276>; else goto <D.33281>;
  <D.33281>:
  D.33282 = mono_object_get_class (obj);
  D.33283 = is_sre_byref (D.33282);
  if (D.33283 != 0) goto <D.33276>; else goto <D.33284>;
  <D.33284>:
  D.33285 = mono_object_get_class (obj);
  D.33286 = is_sre_pointer (D.33285);
  if (D.33286 != 0) goto <D.33276>; else goto <D.33277>;
  <D.33276>:
  {
    struct MonoReflectionType * ref_type;
    struct MonoType * type;

    ref_type = obj;
    type = mono_reflection_type_get_handle (ref_type);
    if (context != 0B) goto <D.33287>; else goto <D.33288>;
    <D.33287>:
    {
      struct MonoType * inflated;

      inflated = mono_class_inflate_generic_type (type, context);
      result = mono_class_from_mono_type (inflated);
      mono_metadata_free_type (inflated);
    }
    goto <D.33289>;
    <D.33288>:
    result = mono_class_from_mono_type (type);
    <D.33289>:
    D.33049 = mono_defaults.typehandle_class;
    *handle_class = D.33049;
  }
  goto <D.33278>;
  <D.33277>:
  D.33026 = obj->vtable;
  D.33027 = D.33026->klass;
  D.33028 = D.33027->name;
  monoeg_g_print ("%s\n", D.33028);
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 12022);
  <D.33278>:
  <D.33275>:
  <D.33261>:
  <D.33237>:
  <D.33219>:
  <D.33197>:
  <D.33191>:
  <D.33185>:
  <D.33175>:
  <D.33142>:
  <D.33130>:
  <D.33112>:
  <D.33085>:
  <D.33076>:
  <D.33055>:
  <D.33052>:
  <D.33038>:
  D.33290 = result;
  return D.33290;
}


ensure_complete_type (struct MonoClass * klass)
{
  struct MonoImage * D.33292;
  long unsigned int D.33293;
  long unsigned int D.33294;
  long unsigned int D.33297;
  long unsigned int D.33298;
  void * D.33301;
  struct MonoDomain * D.33304;
  struct MonoGenericClass * D.33305;
  struct MonoType * D.33308;
  struct MonoClass * D.33309;
  <unnamed-unsigned:22> D.33310;
  int D.33311;

  D.33292 = klass->image;
  D.33293 = BIT_FIELD_REF <*D.33292, 64, 192>;
  D.33294 = D.33293 & 268435456;
  if (D.33294 != 0) goto <D.33295>; else goto <D.33296>;
  <D.33295>:
  D.33297 = BIT_FIELD_REF <*klass, 64, 256>;
  D.33298 = D.33297 & 72057594037927936;
  if (D.33298 == 0) goto <D.33299>; else goto <D.33300>;
  <D.33299>:
  D.33301 = mono_class_get_ref_info (klass);
  if (D.33301 != 0B) goto <D.33302>; else goto <D.33303>;
  <D.33302>:
  {
    struct MonoReflectionTypeBuilder * tb;

    tb = mono_class_get_ref_info (klass);
    D.33304 = mono_domain_get ();
    mono_domain_try_type_resolve (D.33304, 0B, tb);
  }
  <D.33303>:
  <D.33300>:
  <D.33296>:
  D.33305 = klass->generic_class;
  if (D.33305 != 0B) goto <D.33306>; else goto <D.33307>;
  <D.33306>:
  {
    struct MonoGenericInst * inst;
    int i;

    D.33305 = klass->generic_class;
    inst = D.33305->context.class_inst;
    i = 0;
    goto <D.22528>;
    <D.22527>:
    D.33308 = inst->type_argv[i];
    D.33309 = mono_class_from_mono_type (D.33308);
    ensure_complete_type (D.33309);
    i = i + 1;
    <D.22528>:
    D.33310 = inst->type_argc;
    D.33311 = (int) D.33310;
    if (D.33311 > i) goto <D.22527>; else goto <D.22529>;
    <D.22529>:
  }
  <D.33307>:
}


__attribute__((visibility ("hidden")))
mono_reflection_is_valid_dynamic_token (struct MonoDynamicImage * image, guint32 token)
{
  gboolean D.33312;
  struct MonoGHashTable * D.33313;
  long unsigned int D.33314;
  const void * D.33315;
  void * D.33316;
  _Bool D.33317;

  D.33313 = image->tokens;
  D.33314 = (long unsigned int) token;
  D.33315 = (const void *) D.33314;
  D.33316 = mono_g_hash_table_lookup (D.33313, D.33315);
  D.33317 = D.33316 != 0B;
  D.33312 = (gboolean) D.33317;
  return D.33312;
}


__attribute__((visibility ("hidden")))
mono_reflection_lookup_signature (struct MonoImage * image, struct MonoMethod * method, guint32 token)
{
  long unsigned int D.33319;
  long unsigned int D.33320;
  _Bool D.33321;
  long int D.33322;
  long int D.33323;
  struct GHashTable * D.33326;
  long unsigned int D.33327;
  const void * D.33328;
  struct MonoMethodSignature * D.33331;
  struct MonoMethodSignature * sig;

  D.33319 = BIT_FIELD_REF <*image, 64, 192>;
  D.33320 = D.33319 & 268435456;
  D.33321 = D.33320 == 0;
  D.33322 = (long int) D.33321;
  D.33323 = __builtin_expect (D.33322, 0);
  if (D.33323 != 0) goto <D.33324>; else goto <D.33325>;
  <D.33324>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 11672, "image->dynamic");
  <D.33325>:
  D.33326 = MEM[(struct MonoDynamicImage *)image].vararg_aux_hash;
  D.33327 = (long unsigned int) token;
  D.33328 = (const void *) D.33327;
  sig = monoeg_g_hash_table_lookup (D.33326, D.33328);
  if (sig != 0B) goto <D.33329>; else goto <D.33330>;
  <D.33329>:
  D.33331 = sig;
  return D.33331;
  <D.33330>:
  D.33331 = mono_method_signature (method);
  return D.33331;
}


__attribute__((visibility ("hidden")))
mono_reflection_lookup_dynamic_token (struct MonoImage * image, guint32 token, gboolean valid_token, struct MonoClass * * handle_class, struct MonoGenericContext * context)
{
  struct MonoGHashTable * D.33333;
  long unsigned int D.33334;
  const void * D.33335;
  void * D.33340;
  struct MonoDynamicImage * assembly;
  struct MonoObject * obj;
  struct MonoClass * klass;

  try
    {
      assembly = image;
      mono_loader_lock ();
      D.33333 = assembly->tokens;
      D.33334 = (long unsigned int) token;
      D.33335 = (const void *) D.33334;
      obj = mono_g_hash_table_lookup (D.33333, D.33335);
      mono_loader_unlock ();
      if (obj == 0B) goto <D.33336>; else goto <D.33337>;
      <D.33336>:
      if (valid_token != 0) goto <D.33338>; else goto <D.33339>;
      <D.33338>:
      monoeg_g_log (0B, 4, "Could not find required dynamic token 0x%08x", token);
      <D.22520>:
      goto <D.22520>;
      <D.33339>:
      D.33340 = 0B;
      return D.33340;
      <D.33337>:
      if (handle_class == 0B) goto <D.33341>; else goto <D.33342>;
      <D.33341>:
      handle_class = &klass;
      <D.33342>:
      D.33340 = resolve_object (image, obj, handle_class, context);
      return D.33340;
    }
  finally
    {
      klass = {CLOBBER};
    }
}


mono_declsec_flags_from_method (struct MonoMethod * method)
{
  short unsigned int D.33345;
  int D.33346;
  int D.33347;
  uint32_t D.33350;
  struct MonoClass * D.33351;
  struct MonoImage * D.33352;

  D.33345 = method->flags;
  D.33346 = (int) D.33345;
  D.33347 = D.33346 & 16384;
  if (D.33347 != 0) goto <D.33348>; else goto <D.33349>;
  <D.33348>:
  {
    guint32 idx;

    idx = mono_method_get_index (method);
    idx = idx << 2;
    idx = idx | 1;
    D.33351 = method->klass;
    D.33352 = D.33351->image;
    D.33350 = mono_declsec_get_flags (D.33352, idx);
    return D.33350;
  }
  <D.33349>:
  D.33350 = 0;
  return D.33350;
}


mono_declsec_get_flags (struct MonoImage * image, guint32 token)
{
  unsigned int D.33354;
  guint32 D.33357;
  unsigned int D.33358;
  unsigned int D.33360;
  unsigned int D.33363;
  <unnamed-unsigned:24> D.33365;
  int D.33366;
  int index;
  struct MonoTableInfo * t;
  guint32 result;
  guint32 action;
  int i;

  D.33354 = mono_metadata_declsec_from_index (image, token);
  index = (int) D.33354;
  t = &image->tables[14];
  result = 0;
  if (index < 0) goto <D.33355>; else goto <D.33356>;
  <D.33355>:
  D.33357 = 0;
  return D.33357;
  <D.33356>:
  i = index;
  goto <D.22610>;
  <D.22609>:
  {
    guint32 cols[3];

    try
      {
        mono_metadata_decode_row (t, i, &cols, 3);
        D.33358 = cols[1];
        if (D.33358 != token) goto <D.22608>; else goto <D.33359>;
        <D.33359>:
        action = cols[0];
        D.33360 = action + 4294967295;
        if (D.33360 <= 17) goto <D.33361>; else goto <D.33362>;
        <D.33361>:
        D.33363 = declsec_flags_map[action];
        result = D.33363 | result;
        goto <D.33364>;
        <D.33362>:
        monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "reflection.c", 12239);
        <D.33364>:
      }
    finally
      {
        cols = {CLOBBER};
      }
  }
  i = i + 1;
  <D.22610>:
  D.33365 = t->rows;
  D.33366 = (int) D.33365;
  if (D.33366 > i) goto <D.22609>; else goto <D.22608>;
  <D.22608>:
  D.33357 = result;
  return D.33357;
}


mono_declsec_flags_from_class (struct MonoClass * klass)
{
  unsigned int D.33370;
  unsigned int D.33371;
  struct MonoClassExt * D.33376;
  unsigned int D.33378;
  unsigned int D.33379;
  struct MonoImage * D.33380;
  unsigned int D.33381;
  uint32_t D.33382;

  D.33370 = klass->flags;
  D.33371 = D.33370 & 262144;
  if (D.33371 != 0) goto <D.33372>; else goto <D.33373>;
  <D.33372>:
  D.33376 = klass->ext;
  if (D.33376 == 0B) goto <D.33374>; else goto <D.33377>;
  <D.33377>:
  D.33376 = klass->ext;
  D.33378 = D.33376->declsec_flags;
  if (D.33378 == 0) goto <D.33374>; else goto <D.33375>;
  <D.33374>:
  {
    guint32 idx;

    D.33379 = klass->type_token;
    idx = D.33379 & 16777215;
    idx = idx << 2;
    idx = idx;
    mono_loader_lock ();
    mono_class_alloc_ext (klass);
    mono_loader_unlock ();
    D.33376 = klass->ext;
    D.33380 = klass->image;
    D.33381 = mono_declsec_get_flags (D.33380, idx);
    D.33376->declsec_flags = D.33381;
  }
  <D.33375>:
  D.33376 = klass->ext;
  D.33382 = D.33376->declsec_flags;
  return D.33382;
  <D.33373>:
  D.33382 = 0;
  return D.33382;
}


mono_declsec_flags_from_assembly (struct MonoAssembly * assembly)
{
  uint32_t D.33384;
  struct MonoImage * D.33385;
  guint32 idx;

  idx = 1;
  idx = idx << 2;
  idx = idx | 2;
  D.33385 = assembly->image;
  D.33384 = mono_declsec_get_flags (D.33385, idx);
  return D.33384;
}


mono_declsec_get_demands (struct MonoMethod * method, struct MonoDeclSecurityActions * demands)
{
  struct MonoClass * D.33387;
  struct MonoImage * D.33388;
  long unsigned int D.33389;
  long unsigned int D.33390;
  MonoBoolean D.33393;
  long unsigned int D.33396;
  long unsigned int D.33397;
  short unsigned int D.33401;
  int D.33402;
  int D.33403;
  unsigned int D.33406;
  unsigned char D.33411;
  guint32 mask;
  MonoBoolean result;
  guint32 flags;

  mask = 135170;
  result = 0;
  D.33387 = method->klass;
  D.33388 = D.33387->image;
  D.33389 = BIT_FIELD_REF <*D.33388, 64, 3392>;
  D.33390 = D.33389 & 18446742974197923840;
  if (D.33390 == 0) goto <D.33391>; else goto <D.33392>;
  <D.33391>:
  D.33393 = 0;
  return D.33393;
  <D.33392>:
  D.33396 = BIT_FIELD_REF <*method, 64, 256>;
  D.33397 = D.33396 & 4467570830351532032;
  if (D.33397 == 864691128455135232) goto <D.33394>; else goto <D.33398>;
  <D.33398>:
  D.33396 = BIT_FIELD_REF <*method, 64, 256>;
  D.33397 = D.33396 & 4467570830351532032;
  if (D.33397 == 1008806316530991104) goto <D.33394>; else goto <D.33395>;
  <D.33394>:
  method = mono_marshal_method_from_wrapper (method);
  if (method == 0B) goto <D.33399>; else goto <D.33400>;
  <D.33399>:
  D.33393 = 0;
  return D.33393;
  <D.33400>:
  <D.33395>:
  D.33401 = method->flags;
  D.33402 = (int) D.33401;
  D.33403 = D.33402 & 16384;
  if (D.33403 != 0) goto <D.33404>; else goto <D.33405>;
  <D.33404>:
  D.33387 = method->klass;
  mono_class_init (D.33387);
  memset (demands, 0, 48);
  result = mono_declsec_get_method_demands_params (method, demands, 2, 13, 18);
  <D.33405>:
  D.33387 = method->klass;
  flags = mono_declsec_flags_from_class (D.33387);
  D.33406 = flags & mask;
  if (D.33406 != 0) goto <D.33407>; else goto <D.33408>;
  <D.33407>:
  if (result == 0) goto <D.33409>; else goto <D.33410>;
  <D.33409>:
  D.33387 = method->klass;
  mono_class_init (D.33387);
  memset (demands, 0, 48);
  <D.33410>:
  D.33387 = method->klass;
  D.33411 = mono_declsec_get_class_demands_params (D.33387, demands, 2, 13, 18);
  result = D.33411 | result;
  <D.33408>:
  D.33393 = result;
  return D.33393;
}


mono_declsec_get_method_demands_params (struct MonoMethod * method, struct MonoDeclSecurityActions * demands, guint32 id_std, guint32 id_noncas, guint32 id_choice)
{
  MonoBoolean D.33413;
  struct MonoClass * D.33414;
  struct MonoImage * D.33415;
  guint32 idx;

  idx = mono_method_get_index (method);
  idx = idx << 2;
  idx = idx | 1;
  D.33414 = method->klass;
  D.33415 = D.33414->image;
  D.33413 = fill_actions_from_index (D.33415, idx, demands, id_std, id_noncas, id_choice);
  return D.33413;
}


fill_actions_from_index (struct MonoImage * image, guint32 token, struct MonoDeclSecurityActions * actions, guint32 id_std, guint32 id_noncas, guint32 id_choice)
{
  unsigned int D.33417;
  unsigned int D.33418;
  MonoBoolean D.33421;
  unsigned int D.33422;
  char * D.33425;
  unsigned int D.33428;
  const char * blob.491;
  const char * blob.492;
  const char * D.33431;
  unsigned int D.33432;
  char * D.33436;
  const char * blob.493;
  const char * blob.494;
  const char * D.33441;
  unsigned int D.33442;
  char * D.33446;
  const char * blob.495;
  const char * blob.496;
  const char * D.33451;
  unsigned int D.33452;
  <unnamed-unsigned:24> D.33453;
  int D.33454;
  MonoBoolean result;
  struct MonoTableInfo * t;
  guint32 cols[3];
  int index;
  int i;

  try
    {
      result = 0;
      D.33417 = mono_metadata_declsec_from_index (image, token);
      index = (int) D.33417;
      t = &image->tables[14];
      i = index;
      goto <D.22640>;
      <D.22639>:
      mono_metadata_decode_row (t, i, &cols, 3);
      D.33418 = cols[1];
      if (D.33418 != token) goto <D.33419>; else goto <D.33420>;
      <D.33419>:
      D.33421 = result;
      return D.33421;
      <D.33420>:
      D.33422 = cols[0];
      if (D.33422 == id_std) goto <D.33423>; else goto <D.33424>;
      <D.33423>:
      D.33425 = actions->demand.blob;
      if (D.33425 == 0B) goto <D.33426>; else goto <D.33427>;
      <D.33426>:
      {
        const char * blob;

        try
          {
            D.33428 = cols[2];
            blob.491 = mono_metadata_blob_heap (image, D.33428);
            blob = blob.491;
            D.33428 = cols[2];
            actions->demand.index = D.33428;
            blob.492 = blob;
            D.33431 = blob.492 + 2;
            actions->demand.blob = D.33431;
            blob.492 = blob;
            D.33432 = mono_metadata_decode_blob_size (blob.492, &blob);
            actions->demand.size = D.33432;
            result = 1;
          }
        finally
          {
            blob = {CLOBBER};
          }
      }
      <D.33427>:
      goto <D.33433>;
      <D.33424>:
      D.33422 = cols[0];
      if (D.33422 == id_noncas) goto <D.33434>; else goto <D.33435>;
      <D.33434>:
      D.33436 = actions->noncasdemand.blob;
      if (D.33436 == 0B) goto <D.33437>; else goto <D.33438>;
      <D.33437>:
      {
        const char * blob;

        try
          {
            D.33428 = cols[2];
            blob.493 = mono_metadata_blob_heap (image, D.33428);
            blob = blob.493;
            D.33428 = cols[2];
            actions->noncasdemand.index = D.33428;
            blob.494 = blob;
            D.33441 = blob.494 + 2;
            actions->noncasdemand.blob = D.33441;
            blob.494 = blob;
            D.33442 = mono_metadata_decode_blob_size (blob.494, &blob);
            actions->noncasdemand.size = D.33442;
            result = 1;
          }
        finally
          {
            blob = {CLOBBER};
          }
      }
      <D.33438>:
      goto <D.33443>;
      <D.33435>:
      D.33422 = cols[0];
      if (D.33422 == id_choice) goto <D.33444>; else goto <D.33445>;
      <D.33444>:
      D.33446 = actions->demandchoice.blob;
      if (D.33446 == 0B) goto <D.33447>; else goto <D.33448>;
      <D.33447>:
      {
        const char * blob;

        try
          {
            D.33428 = cols[2];
            blob.495 = mono_metadata_blob_heap (image, D.33428);
            blob = blob.495;
            D.33428 = cols[2];
            actions->demandchoice.index = D.33428;
            blob.496 = blob;
            D.33451 = blob.496 + 2;
            actions->demandchoice.blob = D.33451;
            blob.496 = blob;
            D.33452 = mono_metadata_decode_blob_size (blob.496, &blob);
            actions->demandchoice.size = D.33452;
            result = 1;
          }
        finally
          {
            blob = {CLOBBER};
          }
      }
      <D.33448>:
      <D.33445>:
      <D.33443>:
      <D.33433>:
      i = i + 1;
      <D.22640>:
      D.33453 = t->rows;
      D.33454 = (int) D.33453;
      if (D.33454 > i) goto <D.22639>; else goto <D.22641>;
      <D.22641>:
      D.33421 = result;
      return D.33421;
    }
  finally
    {
      cols = {CLOBBER};
    }
}


mono_declsec_get_class_demands_params (struct MonoClass * klass, struct MonoDeclSecurityActions * demands, guint32 id_std, guint32 id_noncas, guint32 id_choice)
{
  unsigned int D.33457;
  MonoBoolean D.33458;
  struct MonoImage * D.33459;
  guint32 idx;

  D.33457 = klass->type_token;
  idx = D.33457 & 16777215;
  idx = idx << 2;
  idx = idx;
  D.33459 = klass->image;
  D.33458 = fill_actions_from_index (D.33459, idx, demands, id_std, id_noncas, id_choice);
  return D.33458;
}


mono_declsec_get_linkdemands (struct MonoMethod * method, struct MonoDeclSecurityActions * klass, struct MonoDeclSecurityActions * cmethod)
{
  struct MonoClass * D.33461;
  struct MonoImage * D.33462;
  long unsigned int D.33463;
  long unsigned int D.33464;
  MonoBoolean D.33467;
  long unsigned int D.33470;
  long unsigned int D.33471;
  short unsigned int D.33475;
  int D.33476;
  int D.33477;
  unsigned int D.33480;
  unsigned char D.33483;
  MonoBoolean result;
  guint32 flags;

  result = 0;
  D.33461 = method->klass;
  D.33462 = D.33461->image;
  D.33463 = BIT_FIELD_REF <*D.33462, 64, 3392>;
  D.33464 = D.33463 & 18446742974197923840;
  if (D.33464 == 0) goto <D.33465>; else goto <D.33466>;
  <D.33465>:
  D.33467 = 0;
  return D.33467;
  <D.33466>:
  D.33470 = BIT_FIELD_REF <*method, 64, 256>;
  D.33471 = D.33470 & 4467570830351532032;
  if (D.33471 == 864691128455135232) goto <D.33468>; else goto <D.33472>;
  <D.33472>:
  D.33470 = BIT_FIELD_REF <*method, 64, 256>;
  D.33471 = D.33470 & 4467570830351532032;
  if (D.33471 == 1008806316530991104) goto <D.33468>; else goto <D.33469>;
  <D.33468>:
  method = mono_marshal_method_from_wrapper (method);
  if (method == 0B) goto <D.33473>; else goto <D.33474>;
  <D.33473>:
  D.33467 = 0;
  return D.33467;
  <D.33474>:
  <D.33469>:
  memset (cmethod, 0, 48);
  memset (klass, 0, 48);
  D.33475 = method->flags;
  D.33476 = (int) D.33475;
  D.33477 = D.33476 & 16384;
  if (D.33477 != 0) goto <D.33478>; else goto <D.33479>;
  <D.33478>:
  D.33461 = method->klass;
  mono_class_init (D.33461);
  result = mono_declsec_get_method_demands_params (method, cmethod, 6, 14, 16);
  <D.33479>:
  D.33461 = method->klass;
  flags = mono_declsec_flags_from_class (D.33461);
  D.33480 = flags & 40992;
  if (D.33480 != 0) goto <D.33481>; else goto <D.33482>;
  <D.33481>:
  D.33461 = method->klass;
  mono_class_init (D.33461);
  D.33461 = method->klass;
  D.33483 = mono_declsec_get_class_demands_params (D.33461, klass, 6, 14, 16);
  result = D.33483 | result;
  <D.33482>:
  D.33467 = result;
  return D.33467;
}


mono_declsec_get_inheritdemands_class (struct MonoClass * klass, struct MonoDeclSecurityActions * demands)
{
  struct MonoImage * D.33485;
  long unsigned int D.33486;
  long unsigned int D.33487;
  MonoBoolean D.33490;
  unsigned int D.33491;
  unsigned char D.33494;
  MonoBoolean result;
  guint32 flags;

  result = 0;
  D.33485 = klass->image;
  D.33486 = BIT_FIELD_REF <*D.33485, 64, 3392>;
  D.33487 = D.33486 & 18446742974197923840;
  if (D.33487 == 0) goto <D.33488>; else goto <D.33489>;
  <D.33488>:
  D.33490 = 0;
  return D.33490;
  <D.33489>:
  flags = mono_declsec_flags_from_class (klass);
  D.33491 = flags & 81984;
  if (D.33491 != 0) goto <D.33492>; else goto <D.33493>;
  <D.33492>:
  mono_class_init (klass);
  memset (demands, 0, 48);
  D.33494 = mono_declsec_get_class_demands_params (klass, demands, 7, 15, 17);
  result = D.33494 | result;
  <D.33493>:
  D.33490 = result;
  return D.33490;
}


mono_declsec_get_inheritdemands_method (struct MonoMethod * method, struct MonoDeclSecurityActions * demands)
{
  struct MonoClass * D.33496;
  struct MonoImage * D.33497;
  long unsigned int D.33498;
  long unsigned int D.33499;
  MonoBoolean D.33502;
  long unsigned int D.33505;
  long unsigned int D.33506;
  short unsigned int D.33510;
  int D.33511;
  int D.33512;

  D.33496 = method->klass;
  D.33497 = D.33496->image;
  D.33498 = BIT_FIELD_REF <*D.33497, 64, 3392>;
  D.33499 = D.33498 & 18446742974197923840;
  if (D.33499 == 0) goto <D.33500>; else goto <D.33501>;
  <D.33500>:
  D.33502 = 0;
  return D.33502;
  <D.33501>:
  D.33505 = BIT_FIELD_REF <*method, 64, 256>;
  D.33506 = D.33505 & 4467570830351532032;
  if (D.33506 == 864691128455135232) goto <D.33503>; else goto <D.33507>;
  <D.33507>:
  D.33505 = BIT_FIELD_REF <*method, 64, 256>;
  D.33506 = D.33505 & 4467570830351532032;
  if (D.33506 == 1008806316530991104) goto <D.33503>; else goto <D.33504>;
  <D.33503>:
  method = mono_marshal_method_from_wrapper (method);
  if (method == 0B) goto <D.33508>; else goto <D.33509>;
  <D.33508>:
  D.33502 = 0;
  return D.33502;
  <D.33509>:
  <D.33504>:
  D.33510 = method->flags;
  D.33511 = (int) D.33510;
  D.33512 = D.33511 & 16384;
  if (D.33512 != 0) goto <D.33513>; else goto <D.33514>;
  <D.33513>:
  D.33496 = method->klass;
  mono_class_init (D.33496);
  memset (demands, 0, 48);
  D.33502 = mono_declsec_get_method_demands_params (method, demands, 7, 15, 17);
  return D.33502;
  <D.33514>:
  D.33502 = 0;
  return D.33502;
}


mono_declsec_get_method_action (struct MonoMethod * method, guint32 action, struct MonoDeclSecurityEntry * entry)
{
  short unsigned int D.33516;
  int D.33517;
  int D.33518;
  MonoBoolean D.33521;
  struct MonoClass * D.33522;
  struct MonoImage * D.33523;

  D.33516 = method->flags;
  D.33517 = (int) D.33516;
  D.33518 = D.33517 & 16384;
  if (D.33518 != 0) goto <D.33519>; else goto <D.33520>;
  <D.33519>:
  {
    guint32 idx;

    idx = mono_method_get_index (method);
    idx = idx << 2;
    idx = idx | 1;
    D.33522 = method->klass;
    D.33523 = D.33522->image;
    D.33521 = get_declsec_action (D.33523, idx, action, entry);
    return D.33521;
  }
  <D.33520>:
  D.33521 = 0;
  return D.33521;
}


get_declsec_action (struct MonoImage * image, guint32 token, guint32 action, struct MonoDeclSecurityEntry * entry)
{
  unsigned int D.33525;
  MonoBoolean D.33528;
  unsigned int D.33529;
  unsigned int D.33532;
  unsigned int D.33535;
  const char * metadata.497;
  const char * metadata.498;
  const char * D.33538;
  unsigned int D.33539;
  <unnamed-unsigned:24> D.33540;
  int D.33541;
  guint32 cols[3];
  struct MonoTableInfo * t;
  int i;
  int index;

  try
    {
      D.33525 = mono_metadata_declsec_from_index (image, token);
      index = (int) D.33525;
      if (index == -1) goto <D.33526>; else goto <D.33527>;
      <D.33526>:
      D.33528 = 0;
      return D.33528;
      <D.33527>:
      t = &image->tables[14];
      i = index;
      goto <D.22694>;
      <D.22693>:
      mono_metadata_decode_row (t, i, &cols, 3);
      D.33529 = cols[1];
      if (D.33529 != token) goto <D.33530>; else goto <D.33531>;
      <D.33530>:
      D.33528 = 0;
      return D.33528;
      <D.33531>:
      D.33532 = cols[0];
      if (D.33532 == action) goto <D.33533>; else goto <D.33534>;
      <D.33533>:
      {
        const char * metadata;

        try
          {
            D.33535 = cols[2];
            metadata.497 = mono_metadata_blob_heap (image, D.33535);
            metadata = metadata.497;
            metadata.498 = metadata;
            D.33538 = metadata.498 + 2;
            entry->blob = D.33538;
            metadata.498 = metadata;
            D.33539 = mono_metadata_decode_blob_size (metadata.498, &metadata);
            entry->size = D.33539;
            D.33528 = 1;
            return D.33528;
          }
        finally
          {
            metadata = {CLOBBER};
          }
      }
      <D.33534>:
      i = i + 1;
      <D.22694>:
      D.33540 = t->rows;
      D.33541 = (int) D.33540;
      if (D.33541 > i) goto <D.22693>; else goto <D.22695>;
      <D.22695>:
      D.33528 = 0;
      return D.33528;
    }
  finally
    {
      cols = {CLOBBER};
    }
}


mono_declsec_get_class_action (struct MonoClass * klass, guint32 action, struct MonoDeclSecurityEntry * entry)
{
  unsigned int D.33545;
  unsigned int D.33546;
  unsigned int D.33549;
  MonoBoolean D.33550;
  struct MonoImage * D.33551;
  guint32 flags;

  flags = mono_declsec_flags_from_class (klass);
  D.33545 = declsec_flags_map[action];
  D.33546 = D.33545 & flags;
  if (D.33546 != 0) goto <D.33547>; else goto <D.33548>;
  <D.33547>:
  {
    guint32 idx;

    D.33549 = klass->type_token;
    idx = D.33549 & 16777215;
    idx = idx << 2;
    idx = idx;
    D.33551 = klass->image;
    D.33550 = get_declsec_action (D.33551, idx, action, entry);
    return D.33550;
  }
  <D.33548>:
  D.33550 = 0;
  return D.33550;
}


mono_declsec_get_assembly_action (struct MonoAssembly * assembly, guint32 action, struct MonoDeclSecurityEntry * entry)
{
  MonoBoolean D.33553;
  struct MonoImage * D.33554;
  guint32 idx;

  idx = 1;
  idx = idx << 2;
  idx = idx | 2;
  D.33554 = assembly->image;
  D.33553 = get_declsec_action (D.33554, idx, action, entry);
  return D.33553;
}


__attribute__((visibility ("hidden")))
mono_reflection_call_is_assignable_to (struct MonoClass * klass, struct MonoClass * oklass)
{
  struct MonoClass * System_Reflection_Emit_TypeBuilder.499;
  struct MonoImage * D.33559;
  struct MonoClass * System_Reflection_Emit_TypeBuilder.500;
  _Bool D.33561;
  long int D.33562;
  long int D.33563;
  struct MonoMethod * method.501;
  struct MonoMethod * method.502;
  _Bool D.33570;
  long int D.33571;
  long int D.33572;
  void * D.33575;
  _Bool D.33576;
  long int D.33577;
  long int D.33578;
  void * D.33581;
  struct MonoVTable * D.33582;
  struct MonoClass * D.33583;
  const char * D.33584;
  int D.33585;
  _Bool D.33586;
  long int D.33587;
  long int D.33588;
  struct MonoDomain * D.33591;
  struct MonoType * D.33592;
  struct MonoReflectionType * D.33593;
  void * D.33594;
  struct MonoObject * exc.503;
  gboolean D.33598;
  void * D.33599;
  unsigned char D.33600;
  struct MonoObject * res;
  struct MonoObject * exc;
  void * params[1];
  static struct MonoClass * System_Reflection_Emit_TypeBuilder = 0B;
  static struct MonoMethod * method = 0B;

  try
    {
      System_Reflection_Emit_TypeBuilder.499 = System_Reflection_Emit_TypeBuilder;
      if (System_Reflection_Emit_TypeBuilder.499 == 0B) goto <D.33557>; else goto <D.33558>;
      <D.33557>:
      D.33559 = mono_defaults.corlib;
      System_Reflection_Emit_TypeBuilder.500 = mono_class_from_name (D.33559, "System.Reflection.Emit", "TypeBuilder");
      System_Reflection_Emit_TypeBuilder = System_Reflection_Emit_TypeBuilder.500;
      System_Reflection_Emit_TypeBuilder.499 = System_Reflection_Emit_TypeBuilder;
      D.33561 = System_Reflection_Emit_TypeBuilder.499 == 0B;
      D.33562 = (long int) D.33561;
      D.33563 = __builtin_expect (D.33562, 0);
      if (D.33563 != 0) goto <D.33564>; else goto <D.33565>;
      <D.33564>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12621, "System_Reflection_Emit_TypeBuilder");
      <D.33565>:
      <D.33558>:
      method.501 = method;
      if (method.501 == 0B) goto <D.33567>; else goto <D.33568>;
      <D.33567>:
      System_Reflection_Emit_TypeBuilder.499 = System_Reflection_Emit_TypeBuilder;
      method.502 = mono_class_get_method_from_name (System_Reflection_Emit_TypeBuilder.499, "IsAssignableTo", 1);
      method = method.502;
      method.501 = method;
      D.33570 = method.501 == 0B;
      D.33571 = (long int) D.33570;
      D.33572 = __builtin_expect (D.33571, 0);
      if (D.33572 != 0) goto <D.33573>; else goto <D.33574>;
      <D.33573>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12625, "method");
      <D.33574>:
      <D.33568>:
      D.33575 = mono_class_get_ref_info (klass);
      D.33576 = D.33575 == 0B;
      D.33577 = (long int) D.33576;
      D.33578 = __builtin_expect (D.33577, 0);
      if (D.33578 != 0) goto <D.33579>; else goto <D.33580>;
      <D.33579>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12632, "mono_class_get_ref_info (klass)");
      <D.33580>:
      D.33581 = mono_class_get_ref_info (klass);
      D.33582 = MEM[(struct MonoObject *)D.33581].vtable;
      D.33583 = D.33582->klass;
      D.33584 = D.33583->name;
      D.33585 = strcmp (D.33584, "TypeBuilder");
      D.33586 = D.33585 != 0;
      D.33587 = (long int) D.33586;
      D.33588 = __builtin_expect (D.33587, 0);
      if (D.33588 != 0) goto <D.33589>; else goto <D.33590>;
      <D.33589>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12633, "!strcmp (((MonoObject*)(mono_class_get_ref_info (klass)))->vtable->klass->name, \"TypeBuilder\")");
      <D.33590>:
      D.33591 = mono_domain_get ();
      D.33592 = &oklass->byval_arg;
      D.33593 = mono_type_get_object (D.33591, D.33592);
      params[0] = D.33593;
      method.501 = method;
      D.33594 = mono_class_get_ref_info (klass);
      res = mono_runtime_invoke (method.501, D.33594, &params, &exc);
      exc.503 = exc;
      if (exc.503 != 0B) goto <D.33596>; else goto <D.33597>;
      <D.33596>:
      D.33598 = 0;
      return D.33598;
      <D.33597>:
      D.33599 = mono_object_unbox (res);
      D.33600 = MEM[(MonoBoolean *)D.33599];
      D.33598 = (gboolean) D.33600;
      return D.33598;
    }
  finally
    {
      exc = {CLOBBER};
      params = {CLOBBER};
    }
}


mono_reflection_type_get_type (struct MonoReflectionType * reftype)
{
  _Bool D.33603;
  long int D.33604;
  long int D.33605;
  struct MonoType * D.33608;

  D.33603 = reftype == 0B;
  D.33604 = (long int) D.33603;
  D.33605 = __builtin_expect (D.33604, 0);
  if (D.33605 != 0) goto <D.33606>; else goto <D.33607>;
  <D.33606>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "reflection.c", 12653, "reftype");
  <D.33607>:
  D.33608 = mono_reflection_type_get_handle (reftype);
  return D.33608;
}


