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.17277;
  struct MonoGHashTable * hash;

  hash = mono_g_hash_table_new (hash_func, key_equal_func);
  hash->gc_type = type;
  if (type > 3) goto <D.17269>; else goto <D.17270>;
  <D.17269>:
  monoeg_g_log (0B, 4, "wrong type for gc hashtable");
  <D.17081>:
  goto <D.17081>;
  <D.17270>:
  table_hash_descr.0 = table_hash_descr;
  if (table_hash_descr.0 == 0B) goto <D.17272>; else goto <D.17273>;
  <D.17272>:
  table_hash_descr.1 = mono_gc_make_root_descr_user (mono_g_hash_mark);
  table_hash_descr = table_hash_descr.1;
  <D.17273>:
  if (type != 0) goto <D.17275>; else goto <D.17276>;
  <D.17275>:
  table_hash_descr.0 = table_hash_descr;
  mono_gc_register_root_wbarrier (hash, 40, table_hash_descr.0);
  <D.17276>:
  D.17277 = hash;
  return D.17277;
}


mono_g_hash_mark (void * addr, void (*MonoGCMarkFunc) (void * *) mark_func)
{
  <unnamed type> D.17279;
  struct Slot * * D.17282;
  unsigned int i.2;
  unsigned int D.17284;
  struct Slot * * D.17285;
  void * D.17286;
  void * * D.17289;
  int D.17290;
  void * D.17294;
  void * * D.17297;
  struct MonoGHashTable * table;
  struct Slot * node;
  int i;

  table = addr;
  D.17279 = table->gc_type;
  if (D.17279 == 1) goto <D.17280>; else goto <D.17281>;
  <D.17280>:
  i = 0;
  goto <D.17254>;
  <D.17253>:
  D.17282 = table->table;
  i.2 = (unsigned int) i;
  D.17284 = i.2 * 4;
  D.17285 = D.17282 + D.17284;
  node = *D.17285;
  goto <D.17251>;
  <D.17250>:
  D.17286 = node->key;
  if (D.17286 != 0B) goto <D.17287>; else goto <D.17288>;
  <D.17287>:
  D.17289 = &node->key;
  mark_func (D.17289);
  <D.17288>:
  node = node->next;
  <D.17251>:
  if (node != 0B) goto <D.17250>; else goto <D.17252>;
  <D.17252>:
  i = i + 1;
  <D.17254>:
  D.17290 = table->table_size;
  if (D.17290 > i) goto <D.17253>; else goto <D.17255>;
  <D.17255>:
  goto <D.17291>;
  <D.17281>:
  D.17279 = table->gc_type;
  if (D.17279 == 2) goto <D.17292>; else goto <D.17293>;
  <D.17292>:
  i = 0;
  goto <D.17260>;
  <D.17259>:
  D.17282 = table->table;
  i.2 = (unsigned int) i;
  D.17284 = i.2 * 4;
  D.17285 = D.17282 + D.17284;
  node = *D.17285;
  goto <D.17257>;
  <D.17256>:
  D.17294 = node->value;
  if (D.17294 != 0B) goto <D.17295>; else goto <D.17296>;
  <D.17295>:
  D.17297 = &node->value;
  mark_func (D.17297);
  <D.17296>:
  node = node->next;
  <D.17257>:
  if (node != 0B) goto <D.17256>; else goto <D.17258>;
  <D.17258>:
  i = i + 1;
  <D.17260>:
  D.17290 = table->table_size;
  if (D.17290 > i) goto <D.17259>; else goto <D.17261>;
  <D.17261>:
  goto <D.17298>;
  <D.17293>:
  D.17279 = table->gc_type;
  if (D.17279 == 3) goto <D.17299>; else goto <D.17300>;
  <D.17299>:
  i = 0;
  goto <D.17266>;
  <D.17265>:
  D.17282 = table->table;
  i.2 = (unsigned int) i;
  D.17284 = i.2 * 4;
  D.17285 = D.17282 + D.17284;
  node = *D.17285;
  goto <D.17263>;
  <D.17262>:
  D.17286 = node->key;
  if (D.17286 != 0B) goto <D.17301>; else goto <D.17302>;
  <D.17301>:
  D.17289 = &node->key;
  mark_func (D.17289);
  <D.17302>:
  D.17294 = node->value;
  if (D.17294 != 0B) goto <D.17303>; else goto <D.17304>;
  <D.17303>:
  D.17297 = &node->value;
  mark_func (D.17297);
  <D.17304>:
  node = node->next;
  <D.17263>:
  if (node != 0B) goto <D.17262>; else goto <D.17264>;
  <D.17264>:
  i = i + 1;
  <D.17266>:
  D.17290 = table->table_size;
  if (D.17290 > i) goto <D.17265>; else goto <D.17267>;
  <D.17267>:
  <D.17300>:
  <D.17298>:
  <D.17291>:
}


mono_g_hash_table_new (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func)
{
  unsigned int D.17309;
  int D.17310;
  int D.17311;
  unsigned int D.17312;
  unsigned int D.17313;
  void * D.17314;
  struct MonoGHashTable * D.17315;
  struct MonoGHashTable * hash;

  if (hash_func == 0B) goto <D.17305>; else goto <D.17306>;
  <D.17305>:
  hash_func = monoeg_g_direct_hash;
  <D.17306>:
  if (key_equal_func == 0B) goto <D.17307>; else goto <D.17308>;
  <D.17307>:
  key_equal_func = monoeg_g_direct_equal;
  <D.17308>:
  hash = monoeg_malloc0 (40);
  hash->hash_func = hash_func;
  hash->key_equal_func = key_equal_func;
  D.17309 = monoeg_g_spaced_primes_closest (1);
  D.17310 = (int) D.17309;
  hash->table_size = D.17310;
  D.17311 = hash->table_size;
  D.17312 = (unsigned int) D.17311;
  D.17313 = D.17312 * 4;
  D.17314 = monoeg_malloc0 (D.17313);
  hash->table = D.17314;
  D.17311 = hash->table_size;
  hash->last_rehash = D.17311;
  D.17315 = hash;
  return D.17315;
}


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.17319;
  struct MonoGHashTable * hash;

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


mono_g_hash_table_size (struct MonoGHashTable * hash)
{
  guint D.17323;
  int D.17324;

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


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

  try
    {
      D.17326 = mono_g_hash_table_lookup_extended (hash, key, &orig_key, &value);
      if (D.17326 != 0) goto <D.17327>; else goto <D.17328>;
      <D.17327>:
      D.17329 = value;
      return D.17329;
      <D.17328>:
      D.17329 = 0B;
      return D.17329;
    }
  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.17334;
  guint (*<Te57>) (const void *) D.17335;
  unsigned int D.17336;
  int D.17337;
  unsigned int D.17338;
  struct Slot * * D.17339;
  unsigned int D.17340;
  struct Slot * * D.17341;
  void * D.17342;
  int D.17343;
  void * D.17346;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  guint hashcode;

  if (hash == 0B) goto <D.17332>; else goto <D.17333>;
  <D.17332>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 273, "hash != NULL");
  D.17334 = 0;
  return D.17334;
  <D.17333>:
  equal = hash->key_equal_func;
  D.17335 = hash->hash_func;
  D.17336 = D.17335 (key);
  D.17337 = hash->table_size;
  D.17338 = (unsigned int) D.17337;
  hashcode = D.17336 % D.17338;
  D.17339 = hash->table;
  D.17340 = hashcode * 4;
  D.17341 = D.17339 + D.17340;
  s = *D.17341;
  goto <D.17141>;
  <D.17140>:
  D.17342 = s->key;
  D.17343 = equal (D.17342, key);
  if (D.17343 != 0) goto <D.17344>; else goto <D.17345>;
  <D.17344>:
  D.17342 = s->key;
  *orig_key = D.17342;
  D.17346 = s->value;
  *value = D.17346;
  D.17334 = 1;
  return D.17334;
  <D.17345>:
  s = s->next;
  <D.17141>:
  if (s != 0B) goto <D.17140>; else goto <D.17142>;
  <D.17142>:
  D.17334 = 0;
  return D.17334;
}


mono_g_hash_table_foreach (struct MonoGHashTable * hash, void (*GHFunc) (void *, void *, void *) func, void * user_data)
{
  struct Slot * * D.17352;
  unsigned int i.3;
  unsigned int D.17354;
  struct Slot * * D.17355;
  void * D.17356;
  void * D.17357;
  int D.17358;
  int i;

  if (hash == 0B) goto <D.17348>; else goto <D.17349>;
  <D.17348>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 293, "hash != NULL");
  return;
  <D.17349>:
  if (func == 0B) goto <D.17350>; else goto <D.17351>;
  <D.17350>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 294, "func != NULL");
  return;
  <D.17351>:
  i = 0;
  goto <D.17154>;
  <D.17153>:
  {
    struct Slot * s;

    D.17352 = hash->table;
    i.3 = (unsigned int) i;
    D.17354 = i.3 * 4;
    D.17355 = D.17352 + D.17354;
    s = *D.17355;
    goto <D.17151>;
    <D.17150>:
    D.17356 = s->value;
    D.17357 = s->key;
    func (D.17357, D.17356, user_data);
    s = s->next;
    <D.17151>:
    if (s != 0B) goto <D.17150>; else goto <D.17152>;
    <D.17152>:
  }
  i = i + 1;
  <D.17154>:
  D.17358 = hash->table_size;
  if (D.17358 > i) goto <D.17153>; else goto <D.17155>;
  <D.17155>:
}


mono_g_hash_table_find (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) predicate, void * user_data)
{
  void * D.17362;
  struct Slot * * D.17365;
  unsigned int i.4;
  unsigned int D.17367;
  struct Slot * * D.17368;
  void * D.17369;
  void * D.17370;
  int D.17371;
  int D.17374;
  int i;

  if (hash == 0B) goto <D.17360>; else goto <D.17361>;
  <D.17360>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 309, "hash != NULL");
  D.17362 = 0B;
  return D.17362;
  <D.17361>:
  if (predicate == 0B) goto <D.17363>; else goto <D.17364>;
  <D.17363>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 310, "predicate != NULL");
  D.17362 = 0B;
  return D.17362;
  <D.17364>:
  i = 0;
  goto <D.17167>;
  <D.17166>:
  {
    struct Slot * s;

    D.17365 = hash->table;
    i.4 = (unsigned int) i;
    D.17367 = i.4 * 4;
    D.17368 = D.17365 + D.17367;
    s = *D.17368;
    goto <D.17164>;
    <D.17163>:
    D.17369 = s->value;
    D.17370 = s->key;
    D.17371 = predicate (D.17370, D.17369, user_data);
    if (D.17371 != 0) goto <D.17372>; else goto <D.17373>;
    <D.17372>:
    D.17362 = s->value;
    return D.17362;
    <D.17373>:
    s = s->next;
    <D.17164>:
    if (s != 0B) goto <D.17163>; else goto <D.17165>;
    <D.17165>:
  }
  i = i + 1;
  <D.17167>:
  D.17374 = hash->table_size;
  if (D.17374 > i) goto <D.17166>; else goto <D.17168>;
  <D.17168>:
  D.17362 = 0B;
  return D.17362;
}


mono_g_hash_table_remove (struct MonoGHashTable * hash, const void * key)
{
  gboolean D.17378;
  guint (*<Te57>) (const void *) D.17379;
  unsigned int D.17380;
  int D.17381;
  unsigned int D.17382;
  struct Slot * * D.17383;
  unsigned int D.17384;
  struct Slot * * D.17385;
  void * D.17386;
  int D.17387;
  void (*<Tdab>) (void *) D.17390;
  void (*<Tdab>) (void *) D.17393;
  void * D.17396;
  struct Slot * D.17399;
  int D.17401;
  int D.17402;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  struct Slot * last;
  guint hashcode;

  if (hash == 0B) goto <D.17376>; else goto <D.17377>;
  <D.17376>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 329, "hash != NULL");
  D.17378 = 0;
  return D.17378;
  <D.17377>:
  equal = hash->key_equal_func;
  D.17379 = hash->hash_func;
  D.17380 = D.17379 (key);
  D.17381 = hash->table_size;
  D.17382 = (unsigned int) D.17381;
  hashcode = D.17380 % D.17382;
  last = 0B;
  D.17383 = hash->table;
  D.17384 = hashcode * 4;
  D.17385 = D.17383 + D.17384;
  s = *D.17385;
  goto <D.17178>;
  <D.17177>:
  D.17386 = s->key;
  D.17387 = equal (D.17386, key);
  if (D.17387 != 0) goto <D.17388>; else goto <D.17389>;
  <D.17388>:
  D.17390 = hash->key_destroy_func;
  if (D.17390 != 0B) goto <D.17391>; else goto <D.17392>;
  <D.17391>:
  D.17390 = hash->key_destroy_func;
  D.17386 = s->key;
  D.17390 (D.17386);
  <D.17392>:
  D.17393 = hash->value_destroy_func;
  if (D.17393 != 0B) goto <D.17394>; else goto <D.17395>;
  <D.17394>:
  D.17393 = hash->value_destroy_func;
  D.17396 = s->value;
  D.17393 (D.17396);
  <D.17395>:
  if (last == 0B) goto <D.17397>; else goto <D.17398>;
  <D.17397>:
  D.17383 = hash->table;
  D.17384 = hashcode * 4;
  D.17385 = D.17383 + D.17384;
  D.17399 = s->next;
  *D.17385 = D.17399;
  goto <D.17400>;
  <D.17398>:
  D.17399 = s->next;
  last->next = D.17399;
  <D.17400>:
  free_slot (hash, s);
  D.17401 = hash->in_use;
  D.17402 = D.17401 + -1;
  hash->in_use = D.17402;
  D.17378 = 1;
  return D.17378;
  <D.17389>:
  last = s;
  s = s->next;
  <D.17178>:
  if (s != 0B) goto <D.17177>; else goto <D.17179>;
  <D.17179>:
  D.17378 = 0;
  return D.17378;
}


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

  D.17404 = hash->gc_type;
  if (D.17404 == 0) goto <D.17405>; else goto <D.17406>;
  <D.17405>:
  mono_gc_free_fixed (slot);
  goto <D.17407>;
  <D.17406>:
  monoeg_g_free (slot);
  <D.17407>:
}


mono_g_hash_table_foreach_remove (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) func, void * user_data)
{
  guint D.17410;
  struct Slot * * D.17413;
  unsigned int i.5;
  unsigned int D.17415;
  struct Slot * * D.17416;
  void * D.17417;
  void * D.17418;
  int D.17419;
  void (*<Tdab>) (void *) D.17422;
  void (*<Tdab>) (void *) D.17425;
  struct Slot * D.17430;
  int D.17432;
  int D.17433;
  int D.17435;
  int i;
  int count;

  count = 0;
  if (hash == 0B) goto <D.17408>; else goto <D.17409>;
  <D.17408>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 359, "hash != NULL");
  D.17410 = 0;
  return D.17410;
  <D.17409>:
  if (func == 0B) goto <D.17411>; else goto <D.17412>;
  <D.17411>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 360, "func != NULL");
  D.17410 = 0;
  return D.17410;
  <D.17412>:
  i = 0;
  goto <D.17194>;
  <D.17193>:
  {
    struct Slot * s;
    struct Slot * last;

    last = 0B;
    D.17413 = hash->table;
    i.5 = (unsigned int) i;
    D.17415 = i.5 * 4;
    D.17416 = D.17413 + D.17415;
    s = *D.17416;
    goto <D.17191>;
    <D.17190>:
    D.17417 = s->value;
    D.17418 = s->key;
    D.17419 = func (D.17418, D.17417, user_data);
    if (D.17419 != 0) goto <D.17420>; else goto <D.17421>;
    <D.17420>:
    {
      struct Slot * n;

      D.17422 = hash->key_destroy_func;
      if (D.17422 != 0B) goto <D.17423>; else goto <D.17424>;
      <D.17423>:
      D.17422 = hash->key_destroy_func;
      D.17418 = s->key;
      D.17422 (D.17418);
      <D.17424>:
      D.17425 = hash->value_destroy_func;
      if (D.17425 != 0B) goto <D.17426>; else goto <D.17427>;
      <D.17426>:
      D.17425 = hash->value_destroy_func;
      D.17417 = s->value;
      D.17425 (D.17417);
      <D.17427>:
      if (last == 0B) goto <D.17428>; else goto <D.17429>;
      <D.17428>:
      D.17413 = hash->table;
      i.5 = (unsigned int) i;
      D.17415 = i.5 * 4;
      D.17416 = D.17413 + D.17415;
      D.17430 = s->next;
      *D.17416 = D.17430;
      n = s->next;
      goto <D.17431>;
      <D.17429>:
      D.17430 = s->next;
      last->next = D.17430;
      n = last->next;
      <D.17431>:
      free_slot (hash, s);
      D.17432 = hash->in_use;
      D.17433 = D.17432 + -1;
      hash->in_use = D.17433;
      count = count + 1;
      s = n;
    }
    goto <D.17434>;
    <D.17421>:
    last = s;
    s = s->next;
    <D.17434>:
    <D.17191>:
    if (s != 0B) goto <D.17190>; else goto <D.17192>;
    <D.17192>:
  }
  i = i + 1;
  <D.17194>:
  D.17435 = hash->table_size;
  if (D.17435 > i) goto <D.17193>; else goto <D.17195>;
  <D.17195>:
  if (count > 0) goto <D.17436>; else goto <D.17437>;
  <D.17436>:
  rehash (hash);
  <D.17437>:
  D.17410 = (guint) count;
  return D.17410;
}


rehash (struct MonoGHashTable * hash)
{
  int D.17439;
  int D.17440;
  int D.17441;
  double D.17442;
  double D.17443;
  int D.17444;
  int D.17445;
  double D.17446;
  _Bool D.17447;
  _Bool D.17448;
  unsigned int D.17451;
  unsigned int D.17452;
  int D.17453;
  int D.17454;
  unsigned int D.17455;
  unsigned int D.17456;
  void * D.17457;
  int diff;
  struct RehashData data;
  void * old_table;

  try
    {
      D.17439 = hash->last_rehash;
      D.17440 = hash->in_use;
      D.17441 = D.17439 - D.17440;
      diff = ABS_EXPR <D.17441>;
      D.17442 = (double) diff;
      D.17443 = D.17442 * 7.5e-1;
      D.17444 = hash->table_size;
      D.17445 = D.17444 * 2;
      D.17446 = (double) D.17445;
      D.17447 = D.17443 > D.17446;
      D.17448 = ~D.17447;
      if (D.17448 != 0) goto <D.17449>; else goto <D.17450>;
      <D.17449>:
      return;
      <D.17450>:
      data.hash = hash;
      D.17440 = hash->in_use;
      D.17451 = (unsigned int) D.17440;
      D.17452 = monoeg_g_spaced_primes_closest (D.17451);
      D.17453 = (int) D.17452;
      data.new_size = D.17453;
      D.17454 = data.new_size;
      D.17455 = (unsigned int) D.17454;
      D.17456 = D.17455 * 4;
      D.17457 = monoeg_malloc0 (D.17456);
      data.table = D.17457;
      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.17461;
  int D.17462;
  struct Slot * * D.17463;
  unsigned int i.6;
  unsigned int D.17465;
  struct Slot * * D.17466;
  guint (*<Te57>) (const void *) D.17467;
  void * D.17468;
  unsigned int D.17469;
  unsigned int D.17470;
  struct Slot * * D.17471;
  unsigned int D.17472;
  struct Slot * * D.17473;
  struct Slot * D.17474;
  void * D.17475;
  struct RehashData * data;
  struct MonoGHashTable * hash;
  int current_size;
  int i;
  struct Slot * * table;

  data = _data;
  hash = data->hash;
  D.17461 = hash->table_size;
  hash->last_rehash = D.17461;
  current_size = hash->table_size;
  D.17462 = data->new_size;
  hash->table_size = D.17462;
  table = hash->table;
  D.17463 = data->table;
  hash->table = D.17463;
  i = 0;
  goto <D.17114>;
  <D.17113>:
  {
    struct Slot * s;
    struct Slot * next;

    i.6 = (unsigned int) i;
    D.17465 = i.6 * 4;
    D.17466 = table + D.17465;
    s = *D.17466;
    goto <D.17111>;
    <D.17110>:
    {
      guint hashcode;

      D.17467 = hash->hash_func;
      D.17468 = s->key;
      D.17469 = D.17467 (D.17468);
      D.17461 = hash->table_size;
      D.17470 = (unsigned int) D.17461;
      hashcode = D.17469 % D.17470;
      next = s->next;
      D.17471 = hash->table;
      D.17472 = hashcode * 4;
      D.17473 = D.17471 + D.17472;
      D.17474 = *D.17473;
      s->next = D.17474;
      D.17471 = hash->table;
      D.17472 = hashcode * 4;
      D.17473 = D.17471 + D.17472;
      *D.17473 = s;
    }
    s = next;
    <D.17111>:
    if (s != 0B) goto <D.17110>; else goto <D.17112>;
    <D.17112>:
  }
  i = i + 1;
  <D.17114>:
  if (i < current_size) goto <D.17113>; else goto <D.17115>;
  <D.17115>:
  D.17475 = table;
  return D.17475;
}


mono_g_hash_table_destroy (struct MonoGHashTable * hash)
{
  struct Slot * * D.17479;
  unsigned int i.7;
  unsigned int D.17481;
  struct Slot * * D.17482;
  void (*<Tdab>) (void *) D.17483;
  void * D.17486;
  void (*<Tdab>) (void *) D.17487;
  void * D.17490;
  int D.17491;
  int i;

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

    D.17479 = hash->table;
    i.7 = (unsigned int) i;
    D.17481 = i.7 * 4;
    D.17482 = D.17479 + D.17481;
    s = *D.17482;
    goto <D.17203>;
    <D.17202>:
    next = s->next;
    D.17483 = hash->key_destroy_func;
    if (D.17483 != 0B) goto <D.17484>; else goto <D.17485>;
    <D.17484>:
    D.17483 = hash->key_destroy_func;
    D.17486 = s->key;
    D.17483 (D.17486);
    <D.17485>:
    D.17487 = hash->value_destroy_func;
    if (D.17487 != 0B) goto <D.17488>; else goto <D.17489>;
    <D.17488>:
    D.17487 = hash->value_destroy_func;
    D.17490 = s->value;
    D.17487 (D.17490);
    <D.17489>:
    free_slot (hash, s);
    s = next;
    <D.17203>:
    if (s != 0B) goto <D.17202>; else goto <D.17204>;
    <D.17204>:
  }
  i = i + 1;
  <D.17206>:
  D.17491 = hash->table_size;
  if (D.17491 > i) goto <D.17205>; else goto <D.17207>;
  <D.17207>:
  D.17479 = hash->table;
  monoeg_g_free (D.17479);
  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.17495;
  int D.17496;
  guint (*<Te57>) (const void *) D.17499;
  unsigned int D.17500;
  int D.17501;
  unsigned int D.17502;
  struct Slot * * D.17503;
  unsigned int D.17504;
  struct Slot * * D.17505;
  void * D.17506;
  int D.17507;
  void (*<Tdab>) (void *) D.17512;
  void (*<Tdab>) (void *) D.17515;
  void * D.17518;
  struct Slot * D.17519;
  int D.17520;
  guint hashcode;
  struct Slot * s;
  gboolean (*GEqualFunc) (const void *, const void *) equal;

  if (hash == 0B) goto <D.17493>; else goto <D.17494>;
  <D.17493>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 431, "hash != NULL");
  return;
  <D.17494>:
  equal = hash->key_equal_func;
  D.17495 = hash->in_use;
  D.17496 = hash->threshold;
  if (D.17495 >= D.17496) goto <D.17497>; else goto <D.17498>;
  <D.17497>:
  rehash (hash);
  <D.17498>:
  D.17499 = hash->hash_func;
  D.17500 = D.17499 (key);
  D.17501 = hash->table_size;
  D.17502 = (unsigned int) D.17501;
  hashcode = D.17500 % D.17502;
  D.17503 = hash->table;
  D.17504 = hashcode * 4;
  D.17505 = D.17503 + D.17504;
  s = *D.17505;
  goto <D.17218>;
  <D.17217>:
  D.17506 = s->key;
  D.17507 = equal (D.17506, key);
  if (D.17507 != 0) goto <D.17508>; else goto <D.17509>;
  <D.17508>:
  if (replace != 0) goto <D.17510>; else goto <D.17511>;
  <D.17510>:
  D.17512 = hash->key_destroy_func;
  if (D.17512 != 0B) goto <D.17513>; else goto <D.17514>;
  <D.17513>:
  D.17512 = hash->key_destroy_func;
  D.17506 = s->key;
  D.17512 (D.17506);
  <D.17514>:
  s->key = key;
  <D.17511>:
  D.17515 = hash->value_destroy_func;
  if (D.17515 != 0B) goto <D.17516>; else goto <D.17517>;
  <D.17516>:
  D.17515 = hash->value_destroy_func;
  D.17518 = s->value;
  D.17515 (D.17518);
  <D.17517>:
  s->value = value;
  return;
  <D.17509>:
  s = s->next;
  <D.17218>:
  if (s != 0B) goto <D.17217>; else goto <D.17219>;
  <D.17219>:
  s = new_slot (hash);
  s->key = key;
  s->value = value;
  D.17503 = hash->table;
  D.17504 = hashcode * 4;
  D.17505 = D.17503 + D.17504;
  D.17519 = *D.17505;
  s->next = D.17519;
  D.17503 = hash->table;
  D.17504 = hashcode * 4;
  D.17505 = D.17503 + D.17504;
  *D.17505 = s;
  D.17495 = hash->in_use;
  D.17520 = D.17495 + 1;
  hash->in_use = D.17520;
}


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

  D.17522 = hash->gc_type;
  if (D.17522 == 0) goto <D.17523>; else goto <D.17524>;
  <D.17523>:
  D.17525 = mono_gc_alloc_fixed (12, 0B);
  return D.17525;
  <D.17524>:
  D.17525 = monoeg_malloc (12);
  return D.17525;
}


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.17527;
  unsigned int i.8;
  unsigned int D.17529;
  struct Slot * * D.17530;
  int D.17531;
  int D.17532;
  int i;
  int chain_size;
  int max_chain_size;
  struct Slot * node;

  max_chain_size = 0;
  i = 0;
  goto <D.17241>;
  <D.17240>:
  chain_size = 0;
  D.17527 = table->table;
  i.8 = (unsigned int) i;
  D.17529 = i.8 * 4;
  D.17530 = D.17527 + D.17529;
  node = *D.17530;
  goto <D.17238>;
  <D.17237>:
  chain_size = chain_size + 1;
  node = node->next;
  <D.17238>:
  if (node != 0B) goto <D.17237>; else goto <D.17239>;
  <D.17239>:
  max_chain_size = MAX_EXPR <chain_size, max_chain_size>;
  i = i + 1;
  <D.17241>:
  D.17531 = table->table_size;
  if (D.17531 > i) goto <D.17240>; else goto <D.17242>;
  <D.17242>:
  D.17531 = table->table_size;
  D.17532 = table->in_use;
  printf ("Size: %d Table Size: %d Max Chain Length: %d\n", D.17532, D.17531, max_chain_size);
}


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

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


