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 * D.17936;
  struct MonoGHashTable * D.17939;
  struct MonoGHashTable * hash;

  hash = mono_g_hash_table_new (hash_func, key_equal_func);
  hash->gc_type = type;
  if (type > 3) goto <D.17931>; else goto <D.17932>;
  <D.17931>:
  monoeg_g_log (0B, 4, "wrong type for gc hashtable");
  <D.17743>:
  goto <D.17743>;
  <D.17932>:
  table_hash_descr.0 = table_hash_descr;
  if (table_hash_descr.0 == 0B) goto <D.17934>; else goto <D.17935>;
  <D.17934>:
  D.17936 = mono_gc_make_root_descr_user (mono_g_hash_mark);
  table_hash_descr = D.17936;
  <D.17935>:
  if (type != 0) goto <D.17937>; else goto <D.17938>;
  <D.17937>:
  table_hash_descr.0 = table_hash_descr;
  mono_gc_register_root_wbarrier (hash, 64, table_hash_descr.0);
  <D.17938>:
  D.17939 = hash;
  return D.17939;
}


mono_g_hash_mark (void * addr, void (*MonoGCMarkFunc) (void * *) mark_func)
{
  <unnamed type> D.17941;
  struct Slot * * D.17944;
  long unsigned int D.17945;
  long unsigned int D.17946;
  struct Slot * * D.17947;
  void * D.17948;
  void * * D.17951;
  int D.17952;
  void * D.17956;
  void * * D.17959;
  struct MonoGHashTable * table;
  struct Slot * node;
  int i;

  table = addr;
  D.17941 = table->gc_type;
  if (D.17941 == 1) goto <D.17942>; else goto <D.17943>;
  <D.17942>:
  i = 0;
  goto <D.17916>;
  <D.17915>:
  D.17944 = table->table;
  D.17945 = (long unsigned int) i;
  D.17946 = D.17945 * 8;
  D.17947 = D.17944 + D.17946;
  node = *D.17947;
  goto <D.17913>;
  <D.17912>:
  D.17948 = node->key;
  if (D.17948 != 0B) goto <D.17949>; else goto <D.17950>;
  <D.17949>:
  D.17951 = &node->key;
  mark_func (D.17951);
  <D.17950>:
  node = node->next;
  <D.17913>:
  if (node != 0B) goto <D.17912>; else goto <D.17914>;
  <D.17914>:
  i = i + 1;
  <D.17916>:
  D.17952 = table->table_size;
  if (D.17952 > i) goto <D.17915>; else goto <D.17917>;
  <D.17917>:
  goto <D.17953>;
  <D.17943>:
  D.17941 = table->gc_type;
  if (D.17941 == 2) goto <D.17954>; else goto <D.17955>;
  <D.17954>:
  i = 0;
  goto <D.17922>;
  <D.17921>:
  D.17944 = table->table;
  D.17945 = (long unsigned int) i;
  D.17946 = D.17945 * 8;
  D.17947 = D.17944 + D.17946;
  node = *D.17947;
  goto <D.17919>;
  <D.17918>:
  D.17956 = node->value;
  if (D.17956 != 0B) goto <D.17957>; else goto <D.17958>;
  <D.17957>:
  D.17959 = &node->value;
  mark_func (D.17959);
  <D.17958>:
  node = node->next;
  <D.17919>:
  if (node != 0B) goto <D.17918>; else goto <D.17920>;
  <D.17920>:
  i = i + 1;
  <D.17922>:
  D.17952 = table->table_size;
  if (D.17952 > i) goto <D.17921>; else goto <D.17923>;
  <D.17923>:
  goto <D.17960>;
  <D.17955>:
  D.17941 = table->gc_type;
  if (D.17941 == 3) goto <D.17961>; else goto <D.17962>;
  <D.17961>:
  i = 0;
  goto <D.17928>;
  <D.17927>:
  D.17944 = table->table;
  D.17945 = (long unsigned int) i;
  D.17946 = D.17945 * 8;
  D.17947 = D.17944 + D.17946;
  node = *D.17947;
  goto <D.17925>;
  <D.17924>:
  D.17948 = node->key;
  if (D.17948 != 0B) goto <D.17963>; else goto <D.17964>;
  <D.17963>:
  D.17951 = &node->key;
  mark_func (D.17951);
  <D.17964>:
  D.17956 = node->value;
  if (D.17956 != 0B) goto <D.17965>; else goto <D.17966>;
  <D.17965>:
  D.17959 = &node->value;
  mark_func (D.17959);
  <D.17966>:
  node = node->next;
  <D.17925>:
  if (node != 0B) goto <D.17924>; else goto <D.17926>;
  <D.17926>:
  i = i + 1;
  <D.17928>:
  D.17952 = table->table_size;
  if (D.17952 > i) goto <D.17927>; else goto <D.17929>;
  <D.17929>:
  <D.17962>:
  <D.17960>:
  <D.17953>:
}


mono_g_hash_table_new (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func)
{
  unsigned int D.17971;
  int D.17972;
  int D.17973;
  long unsigned int D.17974;
  long unsigned int D.17975;
  void * D.17976;
  struct MonoGHashTable * D.17977;
  struct MonoGHashTable * hash;

  if (hash_func == 0B) goto <D.17967>; else goto <D.17968>;
  <D.17967>:
  hash_func = monoeg_g_direct_hash;
  <D.17968>:
  if (key_equal_func == 0B) goto <D.17969>; else goto <D.17970>;
  <D.17969>:
  key_equal_func = monoeg_g_direct_equal;
  <D.17970>:
  hash = monoeg_malloc0 (64);
  hash->hash_func = hash_func;
  hash->key_equal_func = key_equal_func;
  D.17971 = monoeg_g_spaced_primes_closest (1);
  D.17972 = (int) D.17971;
  hash->table_size = D.17972;
  D.17973 = hash->table_size;
  D.17974 = (long unsigned int) D.17973;
  D.17975 = D.17974 * 8;
  D.17976 = monoeg_malloc0 (D.17975);
  hash->table = D.17976;
  D.17973 = hash->table_size;
  hash->last_rehash = D.17973;
  D.17977 = hash;
  return D.17977;
}


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

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


mono_g_hash_table_size (struct MonoGHashTable * hash)
{
  guint D.17985;
  int D.17986;

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


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

  try
    {
      D.17988 = mono_g_hash_table_lookup_extended (hash, key, &orig_key, &value);
      if (D.17988 != 0) goto <D.17989>; else goto <D.17990>;
      <D.17989>:
      D.17991 = value;
      return D.17991;
      <D.17990>:
      D.17991 = 0B;
      return D.17991;
    }
  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.17996;
  guint (*<Tfe2>) (const void *) D.17997;
  unsigned int D.17998;
  int D.17999;
  unsigned int D.18000;
  struct Slot * * D.18001;
  long unsigned int D.18002;
  long unsigned int D.18003;
  struct Slot * * D.18004;
  void * D.18005;
  int D.18006;
  void * D.18009;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  guint hashcode;

  if (hash == 0B) goto <D.17994>; else goto <D.17995>;
  <D.17994>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 273, "hash != NULL");
  D.17996 = 0;
  return D.17996;
  <D.17995>:
  equal = hash->key_equal_func;
  D.17997 = hash->hash_func;
  D.17998 = D.17997 (key);
  D.17999 = hash->table_size;
  D.18000 = (unsigned int) D.17999;
  hashcode = D.17998 % D.18000;
  D.18001 = hash->table;
  D.18002 = (long unsigned int) hashcode;
  D.18003 = D.18002 * 8;
  D.18004 = D.18001 + D.18003;
  s = *D.18004;
  goto <D.17803>;
  <D.17802>:
  D.18005 = s->key;
  D.18006 = equal (D.18005, key);
  if (D.18006 != 0) goto <D.18007>; else goto <D.18008>;
  <D.18007>:
  D.18005 = s->key;
  *orig_key = D.18005;
  D.18009 = s->value;
  *value = D.18009;
  D.17996 = 1;
  return D.17996;
  <D.18008>:
  s = s->next;
  <D.17803>:
  if (s != 0B) goto <D.17802>; else goto <D.17804>;
  <D.17804>:
  D.17996 = 0;
  return D.17996;
}


mono_g_hash_table_foreach (struct MonoGHashTable * hash, void (*GHFunc) (void *, void *, void *) func, void * user_data)
{
  struct Slot * * D.18015;
  long unsigned int D.18016;
  long unsigned int D.18017;
  struct Slot * * D.18018;
  void * D.18019;
  void * D.18020;
  int D.18021;
  int i;

  if (hash == 0B) goto <D.18011>; else goto <D.18012>;
  <D.18011>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 293, "hash != NULL");
  return;
  <D.18012>:
  if (func == 0B) goto <D.18013>; else goto <D.18014>;
  <D.18013>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 294, "func != NULL");
  return;
  <D.18014>:
  i = 0;
  goto <D.17816>;
  <D.17815>:
  {
    struct Slot * s;

    D.18015 = hash->table;
    D.18016 = (long unsigned int) i;
    D.18017 = D.18016 * 8;
    D.18018 = D.18015 + D.18017;
    s = *D.18018;
    goto <D.17813>;
    <D.17812>:
    D.18019 = s->key;
    D.18020 = s->value;
    func (D.18019, D.18020, user_data);
    s = s->next;
    <D.17813>:
    if (s != 0B) goto <D.17812>; else goto <D.17814>;
    <D.17814>:
  }
  i = i + 1;
  <D.17816>:
  D.18021 = hash->table_size;
  if (D.18021 > i) goto <D.17815>; else goto <D.17817>;
  <D.17817>:
}


mono_g_hash_table_find (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) predicate, void * user_data)
{
  void * D.18025;
  struct Slot * * D.18028;
  long unsigned int D.18029;
  long unsigned int D.18030;
  struct Slot * * D.18031;
  void * D.18032;
  void * D.18033;
  int D.18034;
  int D.18037;
  int i;

  if (hash == 0B) goto <D.18023>; else goto <D.18024>;
  <D.18023>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 309, "hash != NULL");
  D.18025 = 0B;
  return D.18025;
  <D.18024>:
  if (predicate == 0B) goto <D.18026>; else goto <D.18027>;
  <D.18026>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 310, "predicate != NULL");
  D.18025 = 0B;
  return D.18025;
  <D.18027>:
  i = 0;
  goto <D.17829>;
  <D.17828>:
  {
    struct Slot * s;

    D.18028 = hash->table;
    D.18029 = (long unsigned int) i;
    D.18030 = D.18029 * 8;
    D.18031 = D.18028 + D.18030;
    s = *D.18031;
    goto <D.17826>;
    <D.17825>:
    D.18032 = s->key;
    D.18033 = s->value;
    D.18034 = predicate (D.18032, D.18033, user_data);
    if (D.18034 != 0) goto <D.18035>; else goto <D.18036>;
    <D.18035>:
    D.18025 = s->value;
    return D.18025;
    <D.18036>:
    s = s->next;
    <D.17826>:
    if (s != 0B) goto <D.17825>; else goto <D.17827>;
    <D.17827>:
  }
  i = i + 1;
  <D.17829>:
  D.18037 = hash->table_size;
  if (D.18037 > i) goto <D.17828>; else goto <D.17830>;
  <D.17830>:
  D.18025 = 0B;
  return D.18025;
}


mono_g_hash_table_remove (struct MonoGHashTable * hash, const void * key)
{
  gboolean D.18041;
  guint (*<Tfe2>) (const void *) D.18042;
  unsigned int D.18043;
  int D.18044;
  unsigned int D.18045;
  struct Slot * * D.18046;
  long unsigned int D.18047;
  long unsigned int D.18048;
  struct Slot * * D.18049;
  void * D.18050;
  int D.18051;
  void (*<Tf36>) (void *) D.18054;
  void (*<Tf36>) (void *) D.18057;
  void * D.18060;
  struct Slot * D.18063;
  int D.18065;
  int D.18066;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  struct Slot * last;
  guint hashcode;

  if (hash == 0B) goto <D.18039>; else goto <D.18040>;
  <D.18039>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 329, "hash != NULL");
  D.18041 = 0;
  return D.18041;
  <D.18040>:
  equal = hash->key_equal_func;
  D.18042 = hash->hash_func;
  D.18043 = D.18042 (key);
  D.18044 = hash->table_size;
  D.18045 = (unsigned int) D.18044;
  hashcode = D.18043 % D.18045;
  last = 0B;
  D.18046 = hash->table;
  D.18047 = (long unsigned int) hashcode;
  D.18048 = D.18047 * 8;
  D.18049 = D.18046 + D.18048;
  s = *D.18049;
  goto <D.17840>;
  <D.17839>:
  D.18050 = s->key;
  D.18051 = equal (D.18050, key);
  if (D.18051 != 0) goto <D.18052>; else goto <D.18053>;
  <D.18052>:
  D.18054 = hash->key_destroy_func;
  if (D.18054 != 0B) goto <D.18055>; else goto <D.18056>;
  <D.18055>:
  D.18054 = hash->key_destroy_func;
  D.18050 = s->key;
  D.18054 (D.18050);
  <D.18056>:
  D.18057 = hash->value_destroy_func;
  if (D.18057 != 0B) goto <D.18058>; else goto <D.18059>;
  <D.18058>:
  D.18057 = hash->value_destroy_func;
  D.18060 = s->value;
  D.18057 (D.18060);
  <D.18059>:
  if (last == 0B) goto <D.18061>; else goto <D.18062>;
  <D.18061>:
  D.18046 = hash->table;
  D.18047 = (long unsigned int) hashcode;
  D.18048 = D.18047 * 8;
  D.18049 = D.18046 + D.18048;
  D.18063 = s->next;
  *D.18049 = D.18063;
  goto <D.18064>;
  <D.18062>:
  D.18063 = s->next;
  last->next = D.18063;
  <D.18064>:
  free_slot (hash, s);
  D.18065 = hash->in_use;
  D.18066 = D.18065 + -1;
  hash->in_use = D.18066;
  D.18041 = 1;
  return D.18041;
  <D.18053>:
  last = s;
  s = s->next;
  <D.17840>:
  if (s != 0B) goto <D.17839>; else goto <D.17841>;
  <D.17841>:
  D.18041 = 0;
  return D.18041;
}


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

  D.18068 = hash->gc_type;
  if (D.18068 == 0) goto <D.18069>; else goto <D.18070>;
  <D.18069>:
  mono_gc_free_fixed (slot);
  goto <D.18071>;
  <D.18070>:
  monoeg_g_free (slot);
  <D.18071>:
}


mono_g_hash_table_foreach_remove (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) func, void * user_data)
{
  guint D.18074;
  struct Slot * * D.18077;
  long unsigned int D.18078;
  long unsigned int D.18079;
  struct Slot * * D.18080;
  void * D.18081;
  void * D.18082;
  int D.18083;
  void (*<Tf36>) (void *) D.18086;
  void (*<Tf36>) (void *) D.18089;
  struct Slot * D.18094;
  int D.18096;
  int D.18097;
  int D.18099;
  int i;
  int count;

  count = 0;
  if (hash == 0B) goto <D.18072>; else goto <D.18073>;
  <D.18072>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 359, "hash != NULL");
  D.18074 = 0;
  return D.18074;
  <D.18073>:
  if (func == 0B) goto <D.18075>; else goto <D.18076>;
  <D.18075>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 360, "func != NULL");
  D.18074 = 0;
  return D.18074;
  <D.18076>:
  i = 0;
  goto <D.17856>;
  <D.17855>:
  {
    struct Slot * s;
    struct Slot * last;

    last = 0B;
    D.18077 = hash->table;
    D.18078 = (long unsigned int) i;
    D.18079 = D.18078 * 8;
    D.18080 = D.18077 + D.18079;
    s = *D.18080;
    goto <D.17853>;
    <D.17852>:
    D.18081 = s->key;
    D.18082 = s->value;
    D.18083 = func (D.18081, D.18082, user_data);
    if (D.18083 != 0) goto <D.18084>; else goto <D.18085>;
    <D.18084>:
    {
      struct Slot * n;

      D.18086 = hash->key_destroy_func;
      if (D.18086 != 0B) goto <D.18087>; else goto <D.18088>;
      <D.18087>:
      D.18086 = hash->key_destroy_func;
      D.18081 = s->key;
      D.18086 (D.18081);
      <D.18088>:
      D.18089 = hash->value_destroy_func;
      if (D.18089 != 0B) goto <D.18090>; else goto <D.18091>;
      <D.18090>:
      D.18089 = hash->value_destroy_func;
      D.18082 = s->value;
      D.18089 (D.18082);
      <D.18091>:
      if (last == 0B) goto <D.18092>; else goto <D.18093>;
      <D.18092>:
      D.18077 = hash->table;
      D.18078 = (long unsigned int) i;
      D.18079 = D.18078 * 8;
      D.18080 = D.18077 + D.18079;
      D.18094 = s->next;
      *D.18080 = D.18094;
      n = s->next;
      goto <D.18095>;
      <D.18093>:
      D.18094 = s->next;
      last->next = D.18094;
      n = last->next;
      <D.18095>:
      free_slot (hash, s);
      D.18096 = hash->in_use;
      D.18097 = D.18096 + -1;
      hash->in_use = D.18097;
      count = count + 1;
      s = n;
    }
    goto <D.18098>;
    <D.18085>:
    last = s;
    s = s->next;
    <D.18098>:
    <D.17853>:
    if (s != 0B) goto <D.17852>; else goto <D.17854>;
    <D.17854>:
  }
  i = i + 1;
  <D.17856>:
  D.18099 = hash->table_size;
  if (D.18099 > i) goto <D.17855>; else goto <D.17857>;
  <D.17857>:
  if (count > 0) goto <D.18100>; else goto <D.18101>;
  <D.18100>:
  rehash (hash);
  <D.18101>:
  D.18074 = (guint) count;
  return D.18074;
}


rehash (struct MonoGHashTable * hash)
{
  int D.18103;
  int D.18104;
  int D.18105;
  double D.18106;
  double D.18107;
  int D.18108;
  int D.18109;
  double D.18110;
  _Bool D.18111;
  _Bool D.18112;
  unsigned int D.18115;
  unsigned int D.18116;
  int D.18117;
  int D.18118;
  long unsigned int D.18119;
  long unsigned int D.18120;
  void * D.18121;
  int diff;
  struct RehashData data;
  void * old_table;

  try
    {
      D.18103 = hash->last_rehash;
      D.18104 = hash->in_use;
      D.18105 = D.18103 - D.18104;
      diff = ABS_EXPR <D.18105>;
      D.18106 = (double) diff;
      D.18107 = D.18106 * 7.5e-1;
      D.18108 = hash->table_size;
      D.18109 = D.18108 * 2;
      D.18110 = (double) D.18109;
      D.18111 = D.18107 > D.18110;
      D.18112 = ~D.18111;
      if (D.18112 != 0) goto <D.18113>; else goto <D.18114>;
      <D.18113>:
      return;
      <D.18114>:
      data.hash = hash;
      D.18104 = hash->in_use;
      D.18115 = (unsigned int) D.18104;
      D.18116 = monoeg_g_spaced_primes_closest (D.18115);
      D.18117 = (int) D.18116;
      data.new_size = D.18117;
      D.18118 = data.new_size;
      D.18119 = (long unsigned int) D.18118;
      D.18120 = D.18119 * 8;
      D.18121 = monoeg_malloc0 (D.18120);
      data.table = D.18121;
      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.18125;
  int D.18126;
  struct Slot * * D.18127;
  long unsigned int D.18128;
  long unsigned int D.18129;
  struct Slot * * D.18130;
  guint (*<Tfe2>) (const void *) D.18131;
  void * D.18132;
  unsigned int D.18133;
  unsigned int D.18134;
  struct Slot * * D.18135;
  long unsigned int D.18136;
  long unsigned int D.18137;
  struct Slot * * D.18138;
  struct Slot * D.18139;
  void * D.18140;
  struct RehashData * data;
  struct MonoGHashTable * hash;
  int current_size;
  int i;
  struct Slot * * table;

  data = _data;
  hash = data->hash;
  D.18125 = hash->table_size;
  hash->last_rehash = D.18125;
  current_size = hash->table_size;
  D.18126 = data->new_size;
  hash->table_size = D.18126;
  table = hash->table;
  D.18127 = data->table;
  hash->table = D.18127;
  i = 0;
  goto <D.17776>;
  <D.17775>:
  {
    struct Slot * s;
    struct Slot * next;

    D.18128 = (long unsigned int) i;
    D.18129 = D.18128 * 8;
    D.18130 = table + D.18129;
    s = *D.18130;
    goto <D.17773>;
    <D.17772>:
    {
      guint hashcode;

      D.18131 = hash->hash_func;
      D.18132 = s->key;
      D.18133 = D.18131 (D.18132);
      D.18125 = hash->table_size;
      D.18134 = (unsigned int) D.18125;
      hashcode = D.18133 % D.18134;
      next = s->next;
      D.18135 = hash->table;
      D.18136 = (long unsigned int) hashcode;
      D.18137 = D.18136 * 8;
      D.18138 = D.18135 + D.18137;
      D.18139 = *D.18138;
      s->next = D.18139;
      D.18135 = hash->table;
      D.18136 = (long unsigned int) hashcode;
      D.18137 = D.18136 * 8;
      D.18138 = D.18135 + D.18137;
      *D.18138 = s;
    }
    s = next;
    <D.17773>:
    if (s != 0B) goto <D.17772>; else goto <D.17774>;
    <D.17774>:
  }
  i = i + 1;
  <D.17776>:
  if (i < current_size) goto <D.17775>; else goto <D.17777>;
  <D.17777>:
  D.18140 = table;
  return D.18140;
}


mono_g_hash_table_destroy (struct MonoGHashTable * hash)
{
  struct Slot * * D.18144;
  long unsigned int D.18145;
  long unsigned int D.18146;
  struct Slot * * D.18147;
  void (*<Tf36>) (void *) D.18148;
  void * D.18151;
  void (*<Tf36>) (void *) D.18152;
  void * D.18155;
  int D.18156;
  int i;

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

    D.18144 = hash->table;
    D.18145 = (long unsigned int) i;
    D.18146 = D.18145 * 8;
    D.18147 = D.18144 + D.18146;
    s = *D.18147;
    goto <D.17865>;
    <D.17864>:
    next = s->next;
    D.18148 = hash->key_destroy_func;
    if (D.18148 != 0B) goto <D.18149>; else goto <D.18150>;
    <D.18149>:
    D.18148 = hash->key_destroy_func;
    D.18151 = s->key;
    D.18148 (D.18151);
    <D.18150>:
    D.18152 = hash->value_destroy_func;
    if (D.18152 != 0B) goto <D.18153>; else goto <D.18154>;
    <D.18153>:
    D.18152 = hash->value_destroy_func;
    D.18155 = s->value;
    D.18152 (D.18155);
    <D.18154>:
    free_slot (hash, s);
    s = next;
    <D.17865>:
    if (s != 0B) goto <D.17864>; else goto <D.17866>;
    <D.17866>:
  }
  i = i + 1;
  <D.17868>:
  D.18156 = hash->table_size;
  if (D.18156 > i) goto <D.17867>; else goto <D.17869>;
  <D.17869>:
  D.18144 = hash->table;
  monoeg_g_free (D.18144);
  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.18160;
  int D.18161;
  guint (*<Tfe2>) (const void *) D.18164;
  unsigned int D.18165;
  int D.18166;
  unsigned int D.18167;
  struct Slot * * D.18168;
  long unsigned int D.18169;
  long unsigned int D.18170;
  struct Slot * * D.18171;
  void * D.18172;
  int D.18173;
  void (*<Tf36>) (void *) D.18178;
  void (*<Tf36>) (void *) D.18181;
  void * D.18184;
  struct Slot * D.18185;
  int D.18186;
  guint hashcode;
  struct Slot * s;
  gboolean (*GEqualFunc) (const void *, const void *) equal;

  if (hash == 0B) goto <D.18158>; else goto <D.18159>;
  <D.18158>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 431, "hash != NULL");
  return;
  <D.18159>:
  equal = hash->key_equal_func;
  D.18160 = hash->in_use;
  D.18161 = hash->threshold;
  if (D.18160 >= D.18161) goto <D.18162>; else goto <D.18163>;
  <D.18162>:
  rehash (hash);
  <D.18163>:
  D.18164 = hash->hash_func;
  D.18165 = D.18164 (key);
  D.18166 = hash->table_size;
  D.18167 = (unsigned int) D.18166;
  hashcode = D.18165 % D.18167;
  D.18168 = hash->table;
  D.18169 = (long unsigned int) hashcode;
  D.18170 = D.18169 * 8;
  D.18171 = D.18168 + D.18170;
  s = *D.18171;
  goto <D.17880>;
  <D.17879>:
  D.18172 = s->key;
  D.18173 = equal (D.18172, key);
  if (D.18173 != 0) goto <D.18174>; else goto <D.18175>;
  <D.18174>:
  if (replace != 0) goto <D.18176>; else goto <D.18177>;
  <D.18176>:
  D.18178 = hash->key_destroy_func;
  if (D.18178 != 0B) goto <D.18179>; else goto <D.18180>;
  <D.18179>:
  D.18178 = hash->key_destroy_func;
  D.18172 = s->key;
  D.18178 (D.18172);
  <D.18180>:
  s->key = key;
  <D.18177>:
  D.18181 = hash->value_destroy_func;
  if (D.18181 != 0B) goto <D.18182>; else goto <D.18183>;
  <D.18182>:
  D.18181 = hash->value_destroy_func;
  D.18184 = s->value;
  D.18181 (D.18184);
  <D.18183>:
  s->value = value;
  return;
  <D.18175>:
  s = s->next;
  <D.17880>:
  if (s != 0B) goto <D.17879>; else goto <D.17881>;
  <D.17881>:
  s = new_slot (hash);
  s->key = key;
  s->value = value;
  D.18168 = hash->table;
  D.18169 = (long unsigned int) hashcode;
  D.18170 = D.18169 * 8;
  D.18171 = D.18168 + D.18170;
  D.18185 = *D.18171;
  s->next = D.18185;
  D.18168 = hash->table;
  D.18169 = (long unsigned int) hashcode;
  D.18170 = D.18169 * 8;
  D.18171 = D.18168 + D.18170;
  *D.18171 = s;
  D.18160 = hash->in_use;
  D.18186 = D.18160 + 1;
  hash->in_use = D.18186;
}


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

  D.18188 = hash->gc_type;
  if (D.18188 == 0) goto <D.18189>; else goto <D.18190>;
  <D.18189>:
  D.18191 = mono_gc_alloc_fixed (24, 0B);
  return D.18191;
  <D.18190>:
  D.18191 = monoeg_malloc (24);
  return D.18191;
}


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.18193;
  long unsigned int D.18194;
  long unsigned int D.18195;
  struct Slot * * D.18196;
  int D.18197;
  int D.18198;
  int i;
  int chain_size;
  int max_chain_size;
  struct Slot * node;

  max_chain_size = 0;
  i = 0;
  goto <D.17903>;
  <D.17902>:
  chain_size = 0;
  D.18193 = table->table;
  D.18194 = (long unsigned int) i;
  D.18195 = D.18194 * 8;
  D.18196 = D.18193 + D.18195;
  node = *D.18196;
  goto <D.17900>;
  <D.17899>:
  chain_size = chain_size + 1;
  node = node->next;
  <D.17900>:
  if (node != 0B) goto <D.17899>; else goto <D.17901>;
  <D.17901>:
  max_chain_size = MAX_EXPR <chain_size, max_chain_size>;
  i = i + 1;
  <D.17903>:
  D.18197 = table->table_size;
  if (D.18197 > i) goto <D.17902>; else goto <D.17904>;
  <D.17904>:
  D.18198 = table->in_use;
  D.18197 = table->table_size;
  printf ("Size: %d Table Size: %d Max Chain Length: %d\n", D.18198, D.18197, max_chain_size);
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
printf (const char * restrict __fmt)
{
  int D.18199;

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


