mono_g_hash_table_new_type (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func, MonoGHashGCType type)
{
  void * table_hash_descr.0;
  void * table_hash_descr.1;
  struct MonoGHashTable * D.18075;
  struct MonoGHashTable * hash;

  hash = mono_g_hash_table_new (hash_func, key_equal_func);
  hash->gc_type = type;
  if (type > 3) goto <D.18067>; else goto <D.18068>;
  <D.18067>:
  monoeg_g_log (0B, 4, "wrong type for gc hashtable");
  <D.17879>:
  goto <D.17879>;
  <D.18068>:
  table_hash_descr.0 = table_hash_descr;
  if (table_hash_descr.0 == 0B) goto <D.18070>; else goto <D.18071>;
  <D.18070>:
  table_hash_descr.1 = mono_gc_make_root_descr_user (mono_g_hash_mark);
  table_hash_descr = table_hash_descr.1;
  <D.18071>:
  if (type != 0) goto <D.18073>; else goto <D.18074>;
  <D.18073>:
  table_hash_descr.0 = table_hash_descr;
  mono_gc_register_root_wbarrier (hash, 64, table_hash_descr.0);
  <D.18074>:
  D.18075 = hash;
  return D.18075;
}


mono_g_hash_mark (void * addr, void (*MonoGCMarkFunc) (void * *) mark_func)
{
  <unnamed type> D.18077;
  struct Slot * * D.18080;
  long unsigned int D.18081;
  long unsigned int D.18082;
  struct Slot * * D.18083;
  void * D.18084;
  void * * D.18087;
  int D.18088;
  void * D.18092;
  void * * D.18095;
  struct MonoGHashTable * table;
  struct Slot * node;
  int i;

  table = addr;
  D.18077 = table->gc_type;
  if (D.18077 == 1) goto <D.18078>; else goto <D.18079>;
  <D.18078>:
  i = 0;
  goto <D.18052>;
  <D.18051>:
  D.18080 = table->table;
  D.18081 = (long unsigned int) i;
  D.18082 = D.18081 * 8;
  D.18083 = D.18080 + D.18082;
  node = *D.18083;
  goto <D.18049>;
  <D.18048>:
  D.18084 = node->key;
  if (D.18084 != 0B) goto <D.18085>; else goto <D.18086>;
  <D.18085>:
  D.18087 = &node->key;
  mark_func (D.18087);
  <D.18086>:
  node = node->next;
  <D.18049>:
  if (node != 0B) goto <D.18048>; else goto <D.18050>;
  <D.18050>:
  i = i + 1;
  <D.18052>:
  D.18088 = table->table_size;
  if (D.18088 > i) goto <D.18051>; else goto <D.18053>;
  <D.18053>:
  goto <D.18089>;
  <D.18079>:
  D.18077 = table->gc_type;
  if (D.18077 == 2) goto <D.18090>; else goto <D.18091>;
  <D.18090>:
  i = 0;
  goto <D.18058>;
  <D.18057>:
  D.18080 = table->table;
  D.18081 = (long unsigned int) i;
  D.18082 = D.18081 * 8;
  D.18083 = D.18080 + D.18082;
  node = *D.18083;
  goto <D.18055>;
  <D.18054>:
  D.18092 = node->value;
  if (D.18092 != 0B) goto <D.18093>; else goto <D.18094>;
  <D.18093>:
  D.18095 = &node->value;
  mark_func (D.18095);
  <D.18094>:
  node = node->next;
  <D.18055>:
  if (node != 0B) goto <D.18054>; else goto <D.18056>;
  <D.18056>:
  i = i + 1;
  <D.18058>:
  D.18088 = table->table_size;
  if (D.18088 > i) goto <D.18057>; else goto <D.18059>;
  <D.18059>:
  goto <D.18096>;
  <D.18091>:
  D.18077 = table->gc_type;
  if (D.18077 == 3) goto <D.18097>; else goto <D.18098>;
  <D.18097>:
  i = 0;
  goto <D.18064>;
  <D.18063>:
  D.18080 = table->table;
  D.18081 = (long unsigned int) i;
  D.18082 = D.18081 * 8;
  D.18083 = D.18080 + D.18082;
  node = *D.18083;
  goto <D.18061>;
  <D.18060>:
  D.18084 = node->key;
  if (D.18084 != 0B) goto <D.18099>; else goto <D.18100>;
  <D.18099>:
  D.18087 = &node->key;
  mark_func (D.18087);
  <D.18100>:
  D.18092 = node->value;
  if (D.18092 != 0B) goto <D.18101>; else goto <D.18102>;
  <D.18101>:
  D.18095 = &node->value;
  mark_func (D.18095);
  <D.18102>:
  node = node->next;
  <D.18061>:
  if (node != 0B) goto <D.18060>; else goto <D.18062>;
  <D.18062>:
  i = i + 1;
  <D.18064>:
  D.18088 = table->table_size;
  if (D.18088 > i) goto <D.18063>; else goto <D.18065>;
  <D.18065>:
  <D.18098>:
  <D.18096>:
  <D.18089>:
}


mono_g_hash_table_new (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func)
{
  unsigned int D.18107;
  int D.18108;
  int D.18109;
  long unsigned int D.18110;
  long unsigned int D.18111;
  void * D.18112;
  struct MonoGHashTable * D.18113;
  struct MonoGHashTable * hash;

  if (hash_func == 0B) goto <D.18103>; else goto <D.18104>;
  <D.18103>:
  hash_func = monoeg_g_direct_hash;
  <D.18104>:
  if (key_equal_func == 0B) goto <D.18105>; else goto <D.18106>;
  <D.18105>:
  key_equal_func = monoeg_g_direct_equal;
  <D.18106>:
  hash = monoeg_malloc0 (64);
  hash->hash_func = hash_func;
  hash->key_equal_func = key_equal_func;
  D.18107 = monoeg_g_spaced_primes_closest (1);
  D.18108 = (int) D.18107;
  hash->table_size = D.18108;
  D.18109 = hash->table_size;
  D.18110 = (long unsigned int) D.18109;
  D.18111 = D.18110 * 8;
  D.18112 = monoeg_malloc0 (D.18111);
  hash->table = D.18112;
  D.18109 = hash->table_size;
  hash->last_rehash = D.18109;
  D.18113 = hash;
  return D.18113;
}


mono_g_hash_table_new_full (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func, void (*GDestroyNotify) (void *) key_destroy_func, void (*GDestroyNotify) (void *) value_destroy_func)
{
  struct MonoGHashTable * D.18117;
  struct MonoGHashTable * hash;

  hash = mono_g_hash_table_new (hash_func, key_equal_func);
  if (hash == 0B) goto <D.18115>; else goto <D.18116>;
  <D.18115>:
  D.18117 = 0B;
  return D.18117;
  <D.18116>:
  hash->key_destroy_func = key_destroy_func;
  hash->value_destroy_func = value_destroy_func;
  D.18117 = hash;
  return D.18117;
}


mono_g_hash_table_size (struct MonoGHashTable * hash)
{
  guint D.18121;
  int D.18122;

  if (hash == 0B) goto <D.18119>; else goto <D.18120>;
  <D.18119>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 250, "hash != NULL");
  D.18121 = 0;
  return D.18121;
  <D.18120>:
  D.18122 = hash->in_use;
  D.18121 = (guint) D.18122;
  return D.18121;
}


mono_g_hash_table_lookup (struct MonoGHashTable * hash, const void * key)
{
  int D.18124;
  void * D.18127;
  void * orig_key;
  void * value;

  try
    {
      D.18124 = mono_g_hash_table_lookup_extended (hash, key, &orig_key, &value);
      if (D.18124 != 0) goto <D.18125>; else goto <D.18126>;
      <D.18125>:
      D.18127 = value;
      return D.18127;
      <D.18126>:
      D.18127 = 0B;
      return D.18127;
    }
  finally
    {
      orig_key = {CLOBBER};
      value = {CLOBBER};
    }
}


mono_g_hash_table_lookup_extended (struct MonoGHashTable * hash, const void * key, void * * orig_key, void * * value)
{
  gboolean D.18132;
  guint (*<Te9d>) (const void *) D.18133;
  unsigned int D.18134;
  int D.18135;
  unsigned int D.18136;
  struct Slot * * D.18137;
  long unsigned int D.18138;
  long unsigned int D.18139;
  struct Slot * * D.18140;
  void * D.18141;
  int D.18142;
  void * D.18145;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  guint hashcode;

  if (hash == 0B) goto <D.18130>; else goto <D.18131>;
  <D.18130>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 273, "hash != NULL");
  D.18132 = 0;
  return D.18132;
  <D.18131>:
  equal = hash->key_equal_func;
  D.18133 = hash->hash_func;
  D.18134 = D.18133 (key);
  D.18135 = hash->table_size;
  D.18136 = (unsigned int) D.18135;
  hashcode = D.18134 % D.18136;
  D.18137 = hash->table;
  D.18138 = (long unsigned int) hashcode;
  D.18139 = D.18138 * 8;
  D.18140 = D.18137 + D.18139;
  s = *D.18140;
  goto <D.17939>;
  <D.17938>:
  D.18141 = s->key;
  D.18142 = equal (D.18141, key);
  if (D.18142 != 0) goto <D.18143>; else goto <D.18144>;
  <D.18143>:
  D.18141 = s->key;
  *orig_key = D.18141;
  D.18145 = s->value;
  *value = D.18145;
  D.18132 = 1;
  return D.18132;
  <D.18144>:
  s = s->next;
  <D.17939>:
  if (s != 0B) goto <D.17938>; else goto <D.17940>;
  <D.17940>:
  D.18132 = 0;
  return D.18132;
}


mono_g_hash_table_foreach (struct MonoGHashTable * hash, void (*GHFunc) (void *, void *, void *) func, void * user_data)
{
  struct Slot * * D.18151;
  long unsigned int D.18152;
  long unsigned int D.18153;
  struct Slot * * D.18154;
  void * D.18155;
  void * D.18156;
  int D.18157;
  int i;

  if (hash == 0B) goto <D.18147>; else goto <D.18148>;
  <D.18147>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 293, "hash != NULL");
  return;
  <D.18148>:
  if (func == 0B) goto <D.18149>; else goto <D.18150>;
  <D.18149>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 294, "func != NULL");
  return;
  <D.18150>:
  i = 0;
  goto <D.17952>;
  <D.17951>:
  {
    struct Slot * s;

    D.18151 = hash->table;
    D.18152 = (long unsigned int) i;
    D.18153 = D.18152 * 8;
    D.18154 = D.18151 + D.18153;
    s = *D.18154;
    goto <D.17949>;
    <D.17948>:
    D.18155 = s->key;
    D.18156 = s->value;
    func (D.18155, D.18156, user_data);
    s = s->next;
    <D.17949>:
    if (s != 0B) goto <D.17948>; else goto <D.17950>;
    <D.17950>:
  }
  i = i + 1;
  <D.17952>:
  D.18157 = hash->table_size;
  if (D.18157 > i) goto <D.17951>; else goto <D.17953>;
  <D.17953>:
}


mono_g_hash_table_find (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) predicate, void * user_data)
{
  void * D.18161;
  struct Slot * * D.18164;
  long unsigned int D.18165;
  long unsigned int D.18166;
  struct Slot * * D.18167;
  void * D.18168;
  void * D.18169;
  int D.18170;
  int D.18173;
  int i;

  if (hash == 0B) goto <D.18159>; else goto <D.18160>;
  <D.18159>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 309, "hash != NULL");
  D.18161 = 0B;
  return D.18161;
  <D.18160>:
  if (predicate == 0B) goto <D.18162>; else goto <D.18163>;
  <D.18162>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 310, "predicate != NULL");
  D.18161 = 0B;
  return D.18161;
  <D.18163>:
  i = 0;
  goto <D.17965>;
  <D.17964>:
  {
    struct Slot * s;

    D.18164 = hash->table;
    D.18165 = (long unsigned int) i;
    D.18166 = D.18165 * 8;
    D.18167 = D.18164 + D.18166;
    s = *D.18167;
    goto <D.17962>;
    <D.17961>:
    D.18168 = s->key;
    D.18169 = s->value;
    D.18170 = predicate (D.18168, D.18169, user_data);
    if (D.18170 != 0) goto <D.18171>; else goto <D.18172>;
    <D.18171>:
    D.18161 = s->value;
    return D.18161;
    <D.18172>:
    s = s->next;
    <D.17962>:
    if (s != 0B) goto <D.17961>; else goto <D.17963>;
    <D.17963>:
  }
  i = i + 1;
  <D.17965>:
  D.18173 = hash->table_size;
  if (D.18173 > i) goto <D.17964>; else goto <D.17966>;
  <D.17966>:
  D.18161 = 0B;
  return D.18161;
}


mono_g_hash_table_remove (struct MonoGHashTable * hash, const void * key)
{
  gboolean D.18177;
  guint (*<Te9d>) (const void *) D.18178;
  unsigned int D.18179;
  int D.18180;
  unsigned int D.18181;
  struct Slot * * D.18182;
  long unsigned int D.18183;
  long unsigned int D.18184;
  struct Slot * * D.18185;
  void * D.18186;
  int D.18187;
  void (*<Tdf1>) (void *) D.18190;
  void (*<Tdf1>) (void *) D.18193;
  void * D.18196;
  struct Slot * D.18199;
  int D.18201;
  int D.18202;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  struct Slot * last;
  guint hashcode;

  if (hash == 0B) goto <D.18175>; else goto <D.18176>;
  <D.18175>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 329, "hash != NULL");
  D.18177 = 0;
  return D.18177;
  <D.18176>:
  equal = hash->key_equal_func;
  D.18178 = hash->hash_func;
  D.18179 = D.18178 (key);
  D.18180 = hash->table_size;
  D.18181 = (unsigned int) D.18180;
  hashcode = D.18179 % D.18181;
  last = 0B;
  D.18182 = hash->table;
  D.18183 = (long unsigned int) hashcode;
  D.18184 = D.18183 * 8;
  D.18185 = D.18182 + D.18184;
  s = *D.18185;
  goto <D.17976>;
  <D.17975>:
  D.18186 = s->key;
  D.18187 = equal (D.18186, key);
  if (D.18187 != 0) goto <D.18188>; else goto <D.18189>;
  <D.18188>:
  D.18190 = hash->key_destroy_func;
  if (D.18190 != 0B) goto <D.18191>; else goto <D.18192>;
  <D.18191>:
  D.18190 = hash->key_destroy_func;
  D.18186 = s->key;
  D.18190 (D.18186);
  <D.18192>:
  D.18193 = hash->value_destroy_func;
  if (D.18193 != 0B) goto <D.18194>; else goto <D.18195>;
  <D.18194>:
  D.18193 = hash->value_destroy_func;
  D.18196 = s->value;
  D.18193 (D.18196);
  <D.18195>:
  if (last == 0B) goto <D.18197>; else goto <D.18198>;
  <D.18197>:
  D.18182 = hash->table;
  D.18183 = (long unsigned int) hashcode;
  D.18184 = D.18183 * 8;
  D.18185 = D.18182 + D.18184;
  D.18199 = s->next;
  *D.18185 = D.18199;
  goto <D.18200>;
  <D.18198>:
  D.18199 = s->next;
  last->next = D.18199;
  <D.18200>:
  free_slot (hash, s);
  D.18201 = hash->in_use;
  D.18202 = D.18201 + -1;
  hash->in_use = D.18202;
  D.18177 = 1;
  return D.18177;
  <D.18189>:
  last = s;
  s = s->next;
  <D.17976>:
  if (s != 0B) goto <D.17975>; else goto <D.17977>;
  <D.17977>:
  D.18177 = 0;
  return D.18177;
}


free_slot (struct MonoGHashTable * hash, struct Slot * slot)
{
  <unnamed type> D.18204;

  D.18204 = hash->gc_type;
  if (D.18204 == 0) goto <D.18205>; else goto <D.18206>;
  <D.18205>:
  mono_gc_free_fixed (slot);
  goto <D.18207>;
  <D.18206>:
  monoeg_g_free (slot);
  <D.18207>:
}


mono_g_hash_table_foreach_remove (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) func, void * user_data)
{
  guint D.18210;
  struct Slot * * D.18213;
  long unsigned int D.18214;
  long unsigned int D.18215;
  struct Slot * * D.18216;
  void * D.18217;
  void * D.18218;
  int D.18219;
  void (*<Tdf1>) (void *) D.18222;
  void (*<Tdf1>) (void *) D.18225;
  struct Slot * D.18230;
  int D.18232;
  int D.18233;
  int D.18235;
  int i;
  int count;

  count = 0;
  if (hash == 0B) goto <D.18208>; else goto <D.18209>;
  <D.18208>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 359, "hash != NULL");
  D.18210 = 0;
  return D.18210;
  <D.18209>:
  if (func == 0B) goto <D.18211>; else goto <D.18212>;
  <D.18211>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 360, "func != NULL");
  D.18210 = 0;
  return D.18210;
  <D.18212>:
  i = 0;
  goto <D.17992>;
  <D.17991>:
  {
    struct Slot * s;
    struct Slot * last;

    last = 0B;
    D.18213 = hash->table;
    D.18214 = (long unsigned int) i;
    D.18215 = D.18214 * 8;
    D.18216 = D.18213 + D.18215;
    s = *D.18216;
    goto <D.17989>;
    <D.17988>:
    D.18217 = s->key;
    D.18218 = s->value;
    D.18219 = func (D.18217, D.18218, user_data);
    if (D.18219 != 0) goto <D.18220>; else goto <D.18221>;
    <D.18220>:
    {
      struct Slot * n;

      D.18222 = hash->key_destroy_func;
      if (D.18222 != 0B) goto <D.18223>; else goto <D.18224>;
      <D.18223>:
      D.18222 = hash->key_destroy_func;
      D.18217 = s->key;
      D.18222 (D.18217);
      <D.18224>:
      D.18225 = hash->value_destroy_func;
      if (D.18225 != 0B) goto <D.18226>; else goto <D.18227>;
      <D.18226>:
      D.18225 = hash->value_destroy_func;
      D.18218 = s->value;
      D.18225 (D.18218);
      <D.18227>:
      if (last == 0B) goto <D.18228>; else goto <D.18229>;
      <D.18228>:
      D.18213 = hash->table;
      D.18214 = (long unsigned int) i;
      D.18215 = D.18214 * 8;
      D.18216 = D.18213 + D.18215;
      D.18230 = s->next;
      *D.18216 = D.18230;
      n = s->next;
      goto <D.18231>;
      <D.18229>:
      D.18230 = s->next;
      last->next = D.18230;
      n = last->next;
      <D.18231>:
      free_slot (hash, s);
      D.18232 = hash->in_use;
      D.18233 = D.18232 + -1;
      hash->in_use = D.18233;
      count = count + 1;
      s = n;
    }
    goto <D.18234>;
    <D.18221>:
    last = s;
    s = s->next;
    <D.18234>:
    <D.17989>:
    if (s != 0B) goto <D.17988>; else goto <D.17990>;
    <D.17990>:
  }
  i = i + 1;
  <D.17992>:
  D.18235 = hash->table_size;
  if (D.18235 > i) goto <D.17991>; else goto <D.17993>;
  <D.17993>:
  if (count > 0) goto <D.18236>; else goto <D.18237>;
  <D.18236>:
  rehash (hash);
  <D.18237>:
  D.18210 = (guint) count;
  return D.18210;
}


rehash (struct MonoGHashTable * hash)
{
  int D.18239;
  int D.18240;
  int D.18241;
  double D.18242;
  double D.18243;
  int D.18244;
  int D.18245;
  double D.18246;
  _Bool D.18247;
  _Bool D.18248;
  unsigned int D.18251;
  unsigned int D.18252;
  int D.18253;
  int D.18254;
  long unsigned int D.18255;
  long unsigned int D.18256;
  void * D.18257;
  int diff;
  struct RehashData data;
  void * old_table;

  try
    {
      D.18239 = hash->last_rehash;
      D.18240 = hash->in_use;
      D.18241 = D.18239 - D.18240;
      diff = ABS_EXPR <D.18241>;
      D.18242 = (double) diff;
      D.18243 = D.18242 * 7.5e-1;
      D.18244 = hash->table_size;
      D.18245 = D.18244 * 2;
      D.18246 = (double) D.18245;
      D.18247 = D.18243 > D.18246;
      D.18248 = ~D.18247;
      if (D.18248 != 0) goto <D.18249>; else goto <D.18250>;
      <D.18249>:
      return;
      <D.18250>:
      data.hash = hash;
      D.18240 = hash->in_use;
      D.18251 = (unsigned int) D.18240;
      D.18252 = monoeg_g_spaced_primes_closest (D.18251);
      D.18253 = (int) D.18252;
      data.new_size = D.18253;
      D.18254 = data.new_size;
      D.18255 = (long unsigned int) D.18254;
      D.18256 = D.18255 * 8;
      D.18257 = monoeg_malloc0 (D.18256);
      data.table = D.18257;
      old_table = mono_gc_invoke_with_gc_lock (do_rehash, &data);
      monoeg_g_free (old_table);
    }
  finally
    {
      data = {CLOBBER};
    }
}


do_rehash (void * _data)
{
  int D.18261;
  int D.18262;
  struct Slot * * D.18263;
  long unsigned int D.18264;
  long unsigned int D.18265;
  struct Slot * * D.18266;
  guint (*<Te9d>) (const void *) D.18267;
  void * D.18268;
  unsigned int D.18269;
  unsigned int D.18270;
  struct Slot * * D.18271;
  long unsigned int D.18272;
  long unsigned int D.18273;
  struct Slot * * D.18274;
  struct Slot * D.18275;
  void * D.18276;
  struct RehashData * data;
  struct MonoGHashTable * hash;
  int current_size;
  int i;
  struct Slot * * table;

  data = _data;
  hash = data->hash;
  D.18261 = hash->table_size;
  hash->last_rehash = D.18261;
  current_size = hash->table_size;
  D.18262 = data->new_size;
  hash->table_size = D.18262;
  table = hash->table;
  D.18263 = data->table;
  hash->table = D.18263;
  i = 0;
  goto <D.17912>;
  <D.17911>:
  {
    struct Slot * s;
    struct Slot * next;

    D.18264 = (long unsigned int) i;
    D.18265 = D.18264 * 8;
    D.18266 = table + D.18265;
    s = *D.18266;
    goto <D.17909>;
    <D.17908>:
    {
      guint hashcode;

      D.18267 = hash->hash_func;
      D.18268 = s->key;
      D.18269 = D.18267 (D.18268);
      D.18261 = hash->table_size;
      D.18270 = (unsigned int) D.18261;
      hashcode = D.18269 % D.18270;
      next = s->next;
      D.18271 = hash->table;
      D.18272 = (long unsigned int) hashcode;
      D.18273 = D.18272 * 8;
      D.18274 = D.18271 + D.18273;
      D.18275 = *D.18274;
      s->next = D.18275;
      D.18271 = hash->table;
      D.18272 = (long unsigned int) hashcode;
      D.18273 = D.18272 * 8;
      D.18274 = D.18271 + D.18273;
      *D.18274 = s;
    }
    s = next;
    <D.17909>:
    if (s != 0B) goto <D.17908>; else goto <D.17910>;
    <D.17910>:
  }
  i = i + 1;
  <D.17912>:
  if (i < current_size) goto <D.17911>; else goto <D.17913>;
  <D.17913>:
  D.18276 = table;
  return D.18276;
}


mono_g_hash_table_destroy (struct MonoGHashTable * hash)
{
  struct Slot * * D.18280;
  long unsigned int D.18281;
  long unsigned int D.18282;
  struct Slot * * D.18283;
  void (*<Tdf1>) (void *) D.18284;
  void * D.18287;
  void (*<Tdf1>) (void *) D.18288;
  void * D.18291;
  int D.18292;
  int i;

  if (hash == 0B) goto <D.18278>; else goto <D.18279>;
  <D.18278>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 401, "hash != NULL");
  return;
  <D.18279>:
  mono_gc_deregister_root (hash);
  i = 0;
  goto <D.18004>;
  <D.18003>:
  {
    struct Slot * s;
    struct Slot * next;

    D.18280 = hash->table;
    D.18281 = (long unsigned int) i;
    D.18282 = D.18281 * 8;
    D.18283 = D.18280 + D.18282;
    s = *D.18283;
    goto <D.18001>;
    <D.18000>:
    next = s->next;
    D.18284 = hash->key_destroy_func;
    if (D.18284 != 0B) goto <D.18285>; else goto <D.18286>;
    <D.18285>:
    D.18284 = hash->key_destroy_func;
    D.18287 = s->key;
    D.18284 (D.18287);
    <D.18286>:
    D.18288 = hash->value_destroy_func;
    if (D.18288 != 0B) goto <D.18289>; else goto <D.18290>;
    <D.18289>:
    D.18288 = hash->value_destroy_func;
    D.18291 = s->value;
    D.18288 (D.18291);
    <D.18290>:
    free_slot (hash, s);
    s = next;
    <D.18001>:
    if (s != 0B) goto <D.18000>; else goto <D.18002>;
    <D.18002>:
  }
  i = i + 1;
  <D.18004>:
  D.18292 = hash->table_size;
  if (D.18292 > i) goto <D.18003>; else goto <D.18005>;
  <D.18005>:
  D.18280 = hash->table;
  monoeg_g_free (D.18280);
  monoeg_g_free (hash);
}


mono_g_hash_table_insert (struct MonoGHashTable * h, void * k, void * v)
{
  mono_g_hash_table_insert_replace (h, k, v, 0);
}


mono_g_hash_table_insert_replace (struct MonoGHashTable * hash, void * key, void * value, gboolean replace)
{
  int D.18296;
  int D.18297;
  guint (*<Te9d>) (const void *) D.18300;
  unsigned int D.18301;
  int D.18302;
  unsigned int D.18303;
  struct Slot * * D.18304;
  long unsigned int D.18305;
  long unsigned int D.18306;
  struct Slot * * D.18307;
  void * D.18308;
  int D.18309;
  void (*<Tdf1>) (void *) D.18314;
  void (*<Tdf1>) (void *) D.18317;
  void * D.18320;
  struct Slot * D.18321;
  int D.18322;
  guint hashcode;
  struct Slot * s;
  gboolean (*GEqualFunc) (const void *, const void *) equal;

  if (hash == 0B) goto <D.18294>; else goto <D.18295>;
  <D.18294>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 431, "hash != NULL");
  return;
  <D.18295>:
  equal = hash->key_equal_func;
  D.18296 = hash->in_use;
  D.18297 = hash->threshold;
  if (D.18296 >= D.18297) goto <D.18298>; else goto <D.18299>;
  <D.18298>:
  rehash (hash);
  <D.18299>:
  D.18300 = hash->hash_func;
  D.18301 = D.18300 (key);
  D.18302 = hash->table_size;
  D.18303 = (unsigned int) D.18302;
  hashcode = D.18301 % D.18303;
  D.18304 = hash->table;
  D.18305 = (long unsigned int) hashcode;
  D.18306 = D.18305 * 8;
  D.18307 = D.18304 + D.18306;
  s = *D.18307;
  goto <D.18016>;
  <D.18015>:
  D.18308 = s->key;
  D.18309 = equal (D.18308, key);
  if (D.18309 != 0) goto <D.18310>; else goto <D.18311>;
  <D.18310>:
  if (replace != 0) goto <D.18312>; else goto <D.18313>;
  <D.18312>:
  D.18314 = hash->key_destroy_func;
  if (D.18314 != 0B) goto <D.18315>; else goto <D.18316>;
  <D.18315>:
  D.18314 = hash->key_destroy_func;
  D.18308 = s->key;
  D.18314 (D.18308);
  <D.18316>:
  s->key = key;
  <D.18313>:
  D.18317 = hash->value_destroy_func;
  if (D.18317 != 0B) goto <D.18318>; else goto <D.18319>;
  <D.18318>:
  D.18317 = hash->value_destroy_func;
  D.18320 = s->value;
  D.18317 (D.18320);
  <D.18319>:
  s->value = value;
  return;
  <D.18311>:
  s = s->next;
  <D.18016>:
  if (s != 0B) goto <D.18015>; else goto <D.18017>;
  <D.18017>:
  s = new_slot (hash);
  s->key = key;
  s->value = value;
  D.18304 = hash->table;
  D.18305 = (long unsigned int) hashcode;
  D.18306 = D.18305 * 8;
  D.18307 = D.18304 + D.18306;
  D.18321 = *D.18307;
  s->next = D.18321;
  D.18304 = hash->table;
  D.18305 = (long unsigned int) hashcode;
  D.18306 = D.18305 * 8;
  D.18307 = D.18304 + D.18306;
  *D.18307 = s;
  D.18296 = hash->in_use;
  D.18322 = D.18296 + 1;
  hash->in_use = D.18322;
}


new_slot (struct MonoGHashTable * hash)
{
  <unnamed type> D.18324;
  struct Slot * D.18327;

  D.18324 = hash->gc_type;
  if (D.18324 == 0) goto <D.18325>; else goto <D.18326>;
  <D.18325>:
  D.18327 = mono_gc_alloc_fixed (24, 0B);
  return D.18327;
  <D.18326>:
  D.18327 = monoeg_malloc (24);
  return D.18327;
}


mono_g_hash_table_replace (struct MonoGHashTable * h, void * k, void * v)
{
  mono_g_hash_table_insert_replace (h, k, v, 1);
}


mono_g_hash_table_print_stats (struct MonoGHashTable * table)
{
  struct Slot * * D.18329;
  long unsigned int D.18330;
  long unsigned int D.18331;
  struct Slot * * D.18332;
  int D.18333;
  int D.18334;
  int i;
  int chain_size;
  int max_chain_size;
  struct Slot * node;

  max_chain_size = 0;
  i = 0;
  goto <D.18039>;
  <D.18038>:
  chain_size = 0;
  D.18329 = table->table;
  D.18330 = (long unsigned int) i;
  D.18331 = D.18330 * 8;
  D.18332 = D.18329 + D.18331;
  node = *D.18332;
  goto <D.18036>;
  <D.18035>:
  chain_size = chain_size + 1;
  node = node->next;
  <D.18036>:
  if (node != 0B) goto <D.18035>; else goto <D.18037>;
  <D.18037>:
  max_chain_size = MAX_EXPR <chain_size, max_chain_size>;
  i = i + 1;
  <D.18039>:
  D.18333 = table->table_size;
  if (D.18333 > i) goto <D.18038>; else goto <D.18040>;
  <D.18040>:
  D.18334 = table->in_use;
  D.18333 = table->table_size;
  printf ("Size: %d Table Size: %d Max Chain Length: %d\n", D.18334, D.18333, max_chain_size);
}


printf (const char * restrict __fmt)
{
  int D.18335;

  D.18335 = __printf_chk (1, __fmt, __builtin_va_arg_pack ());
  return D.18335;
}


