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

  hash = mono_g_hash_table_new (hash_func, key_equal_func);
  hash->gc_type = type;
  if (type > 3) goto <D.17529>; else goto <D.17530>;
  <D.17529>:
  monoeg_g_log (0B, 4, "wrong type for gc hashtable");
  <D.17341>:
  goto <D.17341>;
  <D.17530>:
  table_hash_descr.0 = table_hash_descr;
  if (table_hash_descr.0 == 0B) goto <D.17532>; else goto <D.17533>;
  <D.17532>:
  table_hash_descr.1 = mono_gc_make_root_descr_user (mono_g_hash_mark);
  table_hash_descr = table_hash_descr.1;
  <D.17533>:
  if (type != 0) goto <D.17535>; else goto <D.17536>;
  <D.17535>:
  table_hash_descr.0 = table_hash_descr;
  mono_gc_register_root_wbarrier (hash, 64, table_hash_descr.0);
  <D.17536>:
  D.17537 = hash;
  return D.17537;
}


mono_g_hash_mark (void * addr, void (*MonoGCMarkFunc) (void * *) mark_func)
{
  <unnamed type> D.17539;
  struct Slot * * D.17542;
  long unsigned int D.17543;
  long unsigned int D.17544;
  struct Slot * * D.17545;
  void * D.17546;
  void * * D.17549;
  int D.17550;
  void * D.17554;
  void * * D.17557;
  struct MonoGHashTable * table;
  struct Slot * node;
  int i;

  table = addr;
  D.17539 = table->gc_type;
  if (D.17539 == 1) goto <D.17540>; else goto <D.17541>;
  <D.17540>:
  i = 0;
  goto <D.17514>;
  <D.17513>:
  D.17542 = table->table;
  D.17543 = (long unsigned int) i;
  D.17544 = D.17543 * 8;
  D.17545 = D.17542 + D.17544;
  node = *D.17545;
  goto <D.17511>;
  <D.17510>:
  D.17546 = node->key;
  if (D.17546 != 0B) goto <D.17547>; else goto <D.17548>;
  <D.17547>:
  D.17549 = &node->key;
  mark_func (D.17549);
  <D.17548>:
  node = node->next;
  <D.17511>:
  if (node != 0B) goto <D.17510>; else goto <D.17512>;
  <D.17512>:
  i = i + 1;
  <D.17514>:
  D.17550 = table->table_size;
  if (D.17550 > i) goto <D.17513>; else goto <D.17515>;
  <D.17515>:
  goto <D.17551>;
  <D.17541>:
  D.17539 = table->gc_type;
  if (D.17539 == 2) goto <D.17552>; else goto <D.17553>;
  <D.17552>:
  i = 0;
  goto <D.17520>;
  <D.17519>:
  D.17542 = table->table;
  D.17543 = (long unsigned int) i;
  D.17544 = D.17543 * 8;
  D.17545 = D.17542 + D.17544;
  node = *D.17545;
  goto <D.17517>;
  <D.17516>:
  D.17554 = node->value;
  if (D.17554 != 0B) goto <D.17555>; else goto <D.17556>;
  <D.17555>:
  D.17557 = &node->value;
  mark_func (D.17557);
  <D.17556>:
  node = node->next;
  <D.17517>:
  if (node != 0B) goto <D.17516>; else goto <D.17518>;
  <D.17518>:
  i = i + 1;
  <D.17520>:
  D.17550 = table->table_size;
  if (D.17550 > i) goto <D.17519>; else goto <D.17521>;
  <D.17521>:
  goto <D.17558>;
  <D.17553>:
  D.17539 = table->gc_type;
  if (D.17539 == 3) goto <D.17559>; else goto <D.17560>;
  <D.17559>:
  i = 0;
  goto <D.17526>;
  <D.17525>:
  D.17542 = table->table;
  D.17543 = (long unsigned int) i;
  D.17544 = D.17543 * 8;
  D.17545 = D.17542 + D.17544;
  node = *D.17545;
  goto <D.17523>;
  <D.17522>:
  D.17546 = node->key;
  if (D.17546 != 0B) goto <D.17561>; else goto <D.17562>;
  <D.17561>:
  D.17549 = &node->key;
  mark_func (D.17549);
  <D.17562>:
  D.17554 = node->value;
  if (D.17554 != 0B) goto <D.17563>; else goto <D.17564>;
  <D.17563>:
  D.17557 = &node->value;
  mark_func (D.17557);
  <D.17564>:
  node = node->next;
  <D.17523>:
  if (node != 0B) goto <D.17522>; else goto <D.17524>;
  <D.17524>:
  i = i + 1;
  <D.17526>:
  D.17550 = table->table_size;
  if (D.17550 > i) goto <D.17525>; else goto <D.17527>;
  <D.17527>:
  <D.17560>:
  <D.17558>:
  <D.17551>:
}


mono_g_hash_table_new (guint (*GHashFunc) (const void *) hash_func, gboolean (*GEqualFunc) (const void *, const void *) key_equal_func)
{
  unsigned int D.17569;
  int D.17570;
  int D.17571;
  long unsigned int D.17572;
  long unsigned int D.17573;
  void * D.17574;
  struct MonoGHashTable * D.17575;
  struct MonoGHashTable * hash;

  if (hash_func == 0B) goto <D.17565>; else goto <D.17566>;
  <D.17565>:
  hash_func = monoeg_g_direct_hash;
  <D.17566>:
  if (key_equal_func == 0B) goto <D.17567>; else goto <D.17568>;
  <D.17567>:
  key_equal_func = monoeg_g_direct_equal;
  <D.17568>:
  hash = monoeg_malloc0 (64);
  hash->hash_func = hash_func;
  hash->key_equal_func = key_equal_func;
  D.17569 = monoeg_g_spaced_primes_closest (1);
  D.17570 = (int) D.17569;
  hash->table_size = D.17570;
  D.17571 = hash->table_size;
  D.17572 = (long unsigned int) D.17571;
  D.17573 = D.17572 * 8;
  D.17574 = monoeg_malloc0 (D.17573);
  hash->table = D.17574;
  D.17571 = hash->table_size;
  hash->last_rehash = D.17571;
  D.17575 = hash;
  return D.17575;
}


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

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


mono_g_hash_table_size (struct MonoGHashTable * hash)
{
  guint D.17583;
  int D.17584;

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


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

  try
    {
      D.17586 = mono_g_hash_table_lookup_extended (hash, key, &orig_key, &value);
      if (D.17586 != 0) goto <D.17587>; else goto <D.17588>;
      <D.17587>:
      D.17589 = value;
      return D.17589;
      <D.17588>:
      D.17589 = 0B;
      return D.17589;
    }
  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.17594;
  guint (*<Te71>) (const void *) D.17595;
  unsigned int D.17596;
  int D.17597;
  unsigned int D.17598;
  struct Slot * * D.17599;
  long unsigned int D.17600;
  long unsigned int D.17601;
  struct Slot * * D.17602;
  void * D.17603;
  int D.17604;
  void * D.17607;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  guint hashcode;

  if (hash == 0B) goto <D.17592>; else goto <D.17593>;
  <D.17592>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 273, "hash != NULL");
  D.17594 = 0;
  return D.17594;
  <D.17593>:
  equal = hash->key_equal_func;
  D.17595 = hash->hash_func;
  D.17596 = D.17595 (key);
  D.17597 = hash->table_size;
  D.17598 = (unsigned int) D.17597;
  hashcode = D.17596 % D.17598;
  D.17599 = hash->table;
  D.17600 = (long unsigned int) hashcode;
  D.17601 = D.17600 * 8;
  D.17602 = D.17599 + D.17601;
  s = *D.17602;
  goto <D.17401>;
  <D.17400>:
  D.17603 = s->key;
  D.17604 = equal (D.17603, key);
  if (D.17604 != 0) goto <D.17605>; else goto <D.17606>;
  <D.17605>:
  D.17603 = s->key;
  *orig_key = D.17603;
  D.17607 = s->value;
  *value = D.17607;
  D.17594 = 1;
  return D.17594;
  <D.17606>:
  s = s->next;
  <D.17401>:
  if (s != 0B) goto <D.17400>; else goto <D.17402>;
  <D.17402>:
  D.17594 = 0;
  return D.17594;
}


mono_g_hash_table_foreach (struct MonoGHashTable * hash, void (*GHFunc) (void *, void *, void *) func, void * user_data)
{
  struct Slot * * D.17613;
  long unsigned int D.17614;
  long unsigned int D.17615;
  struct Slot * * D.17616;
  void * D.17617;
  void * D.17618;
  int D.17619;
  int i;

  if (hash == 0B) goto <D.17609>; else goto <D.17610>;
  <D.17609>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 293, "hash != NULL");
  return;
  <D.17610>:
  if (func == 0B) goto <D.17611>; else goto <D.17612>;
  <D.17611>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 294, "func != NULL");
  return;
  <D.17612>:
  i = 0;
  goto <D.17414>;
  <D.17413>:
  {
    struct Slot * s;

    D.17613 = hash->table;
    D.17614 = (long unsigned int) i;
    D.17615 = D.17614 * 8;
    D.17616 = D.17613 + D.17615;
    s = *D.17616;
    goto <D.17411>;
    <D.17410>:
    D.17617 = s->value;
    D.17618 = s->key;
    func (D.17618, D.17617, user_data);
    s = s->next;
    <D.17411>:
    if (s != 0B) goto <D.17410>; else goto <D.17412>;
    <D.17412>:
  }
  i = i + 1;
  <D.17414>:
  D.17619 = hash->table_size;
  if (D.17619 > i) goto <D.17413>; else goto <D.17415>;
  <D.17415>:
}


mono_g_hash_table_find (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) predicate, void * user_data)
{
  void * D.17623;
  struct Slot * * D.17626;
  long unsigned int D.17627;
  long unsigned int D.17628;
  struct Slot * * D.17629;
  void * D.17630;
  void * D.17631;
  int D.17632;
  int D.17635;
  int i;

  if (hash == 0B) goto <D.17621>; else goto <D.17622>;
  <D.17621>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 309, "hash != NULL");
  D.17623 = 0B;
  return D.17623;
  <D.17622>:
  if (predicate == 0B) goto <D.17624>; else goto <D.17625>;
  <D.17624>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 310, "predicate != NULL");
  D.17623 = 0B;
  return D.17623;
  <D.17625>:
  i = 0;
  goto <D.17427>;
  <D.17426>:
  {
    struct Slot * s;

    D.17626 = hash->table;
    D.17627 = (long unsigned int) i;
    D.17628 = D.17627 * 8;
    D.17629 = D.17626 + D.17628;
    s = *D.17629;
    goto <D.17424>;
    <D.17423>:
    D.17630 = s->value;
    D.17631 = s->key;
    D.17632 = predicate (D.17631, D.17630, user_data);
    if (D.17632 != 0) goto <D.17633>; else goto <D.17634>;
    <D.17633>:
    D.17623 = s->value;
    return D.17623;
    <D.17634>:
    s = s->next;
    <D.17424>:
    if (s != 0B) goto <D.17423>; else goto <D.17425>;
    <D.17425>:
  }
  i = i + 1;
  <D.17427>:
  D.17635 = hash->table_size;
  if (D.17635 > i) goto <D.17426>; else goto <D.17428>;
  <D.17428>:
  D.17623 = 0B;
  return D.17623;
}


mono_g_hash_table_remove (struct MonoGHashTable * hash, const void * key)
{
  gboolean D.17639;
  guint (*<Te71>) (const void *) D.17640;
  unsigned int D.17641;
  int D.17642;
  unsigned int D.17643;
  struct Slot * * D.17644;
  long unsigned int D.17645;
  long unsigned int D.17646;
  struct Slot * * D.17647;
  void * D.17648;
  int D.17649;
  void (*<Tdc5>) (void *) D.17652;
  void (*<Tdc5>) (void *) D.17655;
  void * D.17658;
  struct Slot * D.17661;
  int D.17663;
  int D.17664;
  gboolean (*GEqualFunc) (const void *, const void *) equal;
  struct Slot * s;
  struct Slot * last;
  guint hashcode;

  if (hash == 0B) goto <D.17637>; else goto <D.17638>;
  <D.17637>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 329, "hash != NULL");
  D.17639 = 0;
  return D.17639;
  <D.17638>:
  equal = hash->key_equal_func;
  D.17640 = hash->hash_func;
  D.17641 = D.17640 (key);
  D.17642 = hash->table_size;
  D.17643 = (unsigned int) D.17642;
  hashcode = D.17641 % D.17643;
  last = 0B;
  D.17644 = hash->table;
  D.17645 = (long unsigned int) hashcode;
  D.17646 = D.17645 * 8;
  D.17647 = D.17644 + D.17646;
  s = *D.17647;
  goto <D.17438>;
  <D.17437>:
  D.17648 = s->key;
  D.17649 = equal (D.17648, key);
  if (D.17649 != 0) goto <D.17650>; else goto <D.17651>;
  <D.17650>:
  D.17652 = hash->key_destroy_func;
  if (D.17652 != 0B) goto <D.17653>; else goto <D.17654>;
  <D.17653>:
  D.17652 = hash->key_destroy_func;
  D.17648 = s->key;
  D.17652 (D.17648);
  <D.17654>:
  D.17655 = hash->value_destroy_func;
  if (D.17655 != 0B) goto <D.17656>; else goto <D.17657>;
  <D.17656>:
  D.17655 = hash->value_destroy_func;
  D.17658 = s->value;
  D.17655 (D.17658);
  <D.17657>:
  if (last == 0B) goto <D.17659>; else goto <D.17660>;
  <D.17659>:
  D.17644 = hash->table;
  D.17645 = (long unsigned int) hashcode;
  D.17646 = D.17645 * 8;
  D.17647 = D.17644 + D.17646;
  D.17661 = s->next;
  *D.17647 = D.17661;
  goto <D.17662>;
  <D.17660>:
  D.17661 = s->next;
  last->next = D.17661;
  <D.17662>:
  free_slot (hash, s);
  D.17663 = hash->in_use;
  D.17664 = D.17663 + -1;
  hash->in_use = D.17664;
  D.17639 = 1;
  return D.17639;
  <D.17651>:
  last = s;
  s = s->next;
  <D.17438>:
  if (s != 0B) goto <D.17437>; else goto <D.17439>;
  <D.17439>:
  D.17639 = 0;
  return D.17639;
}


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

  D.17666 = hash->gc_type;
  if (D.17666 == 0) goto <D.17667>; else goto <D.17668>;
  <D.17667>:
  mono_gc_free_fixed (slot);
  goto <D.17669>;
  <D.17668>:
  monoeg_g_free (slot);
  <D.17669>:
}


mono_g_hash_table_foreach_remove (struct MonoGHashTable * hash, gboolean (*GHRFunc) (void *, void *, void *) func, void * user_data)
{
  guint D.17672;
  struct Slot * * D.17675;
  long unsigned int D.17676;
  long unsigned int D.17677;
  struct Slot * * D.17678;
  void * D.17679;
  void * D.17680;
  int D.17681;
  void (*<Tdc5>) (void *) D.17684;
  void (*<Tdc5>) (void *) D.17687;
  struct Slot * D.17692;
  int D.17694;
  int D.17695;
  int D.17697;
  int i;
  int count;

  count = 0;
  if (hash == 0B) goto <D.17670>; else goto <D.17671>;
  <D.17670>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 359, "hash != NULL");
  D.17672 = 0;
  return D.17672;
  <D.17671>:
  if (func == 0B) goto <D.17673>; else goto <D.17674>;
  <D.17673>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 360, "func != NULL");
  D.17672 = 0;
  return D.17672;
  <D.17674>:
  i = 0;
  goto <D.17454>;
  <D.17453>:
  {
    struct Slot * s;
    struct Slot * last;

    last = 0B;
    D.17675 = hash->table;
    D.17676 = (long unsigned int) i;
    D.17677 = D.17676 * 8;
    D.17678 = D.17675 + D.17677;
    s = *D.17678;
    goto <D.17451>;
    <D.17450>:
    D.17679 = s->value;
    D.17680 = s->key;
    D.17681 = func (D.17680, D.17679, user_data);
    if (D.17681 != 0) goto <D.17682>; else goto <D.17683>;
    <D.17682>:
    {
      struct Slot * n;

      D.17684 = hash->key_destroy_func;
      if (D.17684 != 0B) goto <D.17685>; else goto <D.17686>;
      <D.17685>:
      D.17684 = hash->key_destroy_func;
      D.17680 = s->key;
      D.17684 (D.17680);
      <D.17686>:
      D.17687 = hash->value_destroy_func;
      if (D.17687 != 0B) goto <D.17688>; else goto <D.17689>;
      <D.17688>:
      D.17687 = hash->value_destroy_func;
      D.17679 = s->value;
      D.17687 (D.17679);
      <D.17689>:
      if (last == 0B) goto <D.17690>; else goto <D.17691>;
      <D.17690>:
      D.17675 = hash->table;
      D.17676 = (long unsigned int) i;
      D.17677 = D.17676 * 8;
      D.17678 = D.17675 + D.17677;
      D.17692 = s->next;
      *D.17678 = D.17692;
      n = s->next;
      goto <D.17693>;
      <D.17691>:
      D.17692 = s->next;
      last->next = D.17692;
      n = last->next;
      <D.17693>:
      free_slot (hash, s);
      D.17694 = hash->in_use;
      D.17695 = D.17694 + -1;
      hash->in_use = D.17695;
      count = count + 1;
      s = n;
    }
    goto <D.17696>;
    <D.17683>:
    last = s;
    s = s->next;
    <D.17696>:
    <D.17451>:
    if (s != 0B) goto <D.17450>; else goto <D.17452>;
    <D.17452>:
  }
  i = i + 1;
  <D.17454>:
  D.17697 = hash->table_size;
  if (D.17697 > i) goto <D.17453>; else goto <D.17455>;
  <D.17455>:
  if (count > 0) goto <D.17698>; else goto <D.17699>;
  <D.17698>:
  rehash (hash);
  <D.17699>:
  D.17672 = (guint) count;
  return D.17672;
}


rehash (struct MonoGHashTable * hash)
{
  int D.17701;
  int D.17702;
  int D.17703;
  double D.17704;
  double D.17705;
  int D.17706;
  int D.17707;
  double D.17708;
  _Bool D.17709;
  _Bool D.17710;
  unsigned int D.17713;
  unsigned int D.17714;
  int D.17715;
  int D.17716;
  long unsigned int D.17717;
  long unsigned int D.17718;
  void * D.17719;
  int diff;
  struct RehashData data;
  void * old_table;

  try
    {
      D.17701 = hash->last_rehash;
      D.17702 = hash->in_use;
      D.17703 = D.17701 - D.17702;
      diff = ABS_EXPR <D.17703>;
      D.17704 = (double) diff;
      D.17705 = D.17704 * 7.5e-1;
      D.17706 = hash->table_size;
      D.17707 = D.17706 * 2;
      D.17708 = (double) D.17707;
      D.17709 = D.17705 > D.17708;
      D.17710 = ~D.17709;
      if (D.17710 != 0) goto <D.17711>; else goto <D.17712>;
      <D.17711>:
      return;
      <D.17712>:
      data.hash = hash;
      D.17702 = hash->in_use;
      D.17713 = (unsigned int) D.17702;
      D.17714 = monoeg_g_spaced_primes_closest (D.17713);
      D.17715 = (int) D.17714;
      data.new_size = D.17715;
      D.17716 = data.new_size;
      D.17717 = (long unsigned int) D.17716;
      D.17718 = D.17717 * 8;
      D.17719 = monoeg_malloc0 (D.17718);
      data.table = D.17719;
      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.17723;
  int D.17724;
  struct Slot * * D.17725;
  long unsigned int D.17726;
  long unsigned int D.17727;
  struct Slot * * D.17728;
  guint (*<Te71>) (const void *) D.17729;
  void * D.17730;
  unsigned int D.17731;
  unsigned int D.17732;
  struct Slot * * D.17733;
  long unsigned int D.17734;
  long unsigned int D.17735;
  struct Slot * * D.17736;
  struct Slot * D.17737;
  void * D.17738;
  struct RehashData * data;
  struct MonoGHashTable * hash;
  int current_size;
  int i;
  struct Slot * * table;

  data = _data;
  hash = data->hash;
  D.17723 = hash->table_size;
  hash->last_rehash = D.17723;
  current_size = hash->table_size;
  D.17724 = data->new_size;
  hash->table_size = D.17724;
  table = hash->table;
  D.17725 = data->table;
  hash->table = D.17725;
  i = 0;
  goto <D.17374>;
  <D.17373>:
  {
    struct Slot * s;
    struct Slot * next;

    D.17726 = (long unsigned int) i;
    D.17727 = D.17726 * 8;
    D.17728 = table + D.17727;
    s = *D.17728;
    goto <D.17371>;
    <D.17370>:
    {
      guint hashcode;

      D.17729 = hash->hash_func;
      D.17730 = s->key;
      D.17731 = D.17729 (D.17730);
      D.17723 = hash->table_size;
      D.17732 = (unsigned int) D.17723;
      hashcode = D.17731 % D.17732;
      next = s->next;
      D.17733 = hash->table;
      D.17734 = (long unsigned int) hashcode;
      D.17735 = D.17734 * 8;
      D.17736 = D.17733 + D.17735;
      D.17737 = *D.17736;
      s->next = D.17737;
      D.17733 = hash->table;
      D.17734 = (long unsigned int) hashcode;
      D.17735 = D.17734 * 8;
      D.17736 = D.17733 + D.17735;
      *D.17736 = s;
    }
    s = next;
    <D.17371>:
    if (s != 0B) goto <D.17370>; else goto <D.17372>;
    <D.17372>:
  }
  i = i + 1;
  <D.17374>:
  if (i < current_size) goto <D.17373>; else goto <D.17375>;
  <D.17375>:
  D.17738 = table;
  return D.17738;
}


mono_g_hash_table_destroy (struct MonoGHashTable * hash)
{
  struct Slot * * D.17742;
  long unsigned int D.17743;
  long unsigned int D.17744;
  struct Slot * * D.17745;
  void (*<Tdc5>) (void *) D.17746;
  void * D.17749;
  void (*<Tdc5>) (void *) D.17750;
  void * D.17753;
  int D.17754;
  int i;

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

    D.17742 = hash->table;
    D.17743 = (long unsigned int) i;
    D.17744 = D.17743 * 8;
    D.17745 = D.17742 + D.17744;
    s = *D.17745;
    goto <D.17463>;
    <D.17462>:
    next = s->next;
    D.17746 = hash->key_destroy_func;
    if (D.17746 != 0B) goto <D.17747>; else goto <D.17748>;
    <D.17747>:
    D.17746 = hash->key_destroy_func;
    D.17749 = s->key;
    D.17746 (D.17749);
    <D.17748>:
    D.17750 = hash->value_destroy_func;
    if (D.17750 != 0B) goto <D.17751>; else goto <D.17752>;
    <D.17751>:
    D.17750 = hash->value_destroy_func;
    D.17753 = s->value;
    D.17750 (D.17753);
    <D.17752>:
    free_slot (hash, s);
    s = next;
    <D.17463>:
    if (s != 0B) goto <D.17462>; else goto <D.17464>;
    <D.17464>:
  }
  i = i + 1;
  <D.17466>:
  D.17754 = hash->table_size;
  if (D.17754 > i) goto <D.17465>; else goto <D.17467>;
  <D.17467>:
  D.17742 = hash->table;
  monoeg_g_free (D.17742);
  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.17758;
  int D.17759;
  guint (*<Te71>) (const void *) D.17762;
  unsigned int D.17763;
  int D.17764;
  unsigned int D.17765;
  struct Slot * * D.17766;
  long unsigned int D.17767;
  long unsigned int D.17768;
  struct Slot * * D.17769;
  void * D.17770;
  int D.17771;
  void (*<Tdc5>) (void *) D.17776;
  void (*<Tdc5>) (void *) D.17779;
  void * D.17782;
  struct Slot * D.17783;
  int D.17784;
  guint hashcode;
  struct Slot * s;
  gboolean (*GEqualFunc) (const void *, const void *) equal;

  if (hash == 0B) goto <D.17756>; else goto <D.17757>;
  <D.17756>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "mono-hash.c", 431, "hash != NULL");
  return;
  <D.17757>:
  equal = hash->key_equal_func;
  D.17758 = hash->in_use;
  D.17759 = hash->threshold;
  if (D.17758 >= D.17759) goto <D.17760>; else goto <D.17761>;
  <D.17760>:
  rehash (hash);
  <D.17761>:
  D.17762 = hash->hash_func;
  D.17763 = D.17762 (key);
  D.17764 = hash->table_size;
  D.17765 = (unsigned int) D.17764;
  hashcode = D.17763 % D.17765;
  D.17766 = hash->table;
  D.17767 = (long unsigned int) hashcode;
  D.17768 = D.17767 * 8;
  D.17769 = D.17766 + D.17768;
  s = *D.17769;
  goto <D.17478>;
  <D.17477>:
  D.17770 = s->key;
  D.17771 = equal (D.17770, key);
  if (D.17771 != 0) goto <D.17772>; else goto <D.17773>;
  <D.17772>:
  if (replace != 0) goto <D.17774>; else goto <D.17775>;
  <D.17774>:
  D.17776 = hash->key_destroy_func;
  if (D.17776 != 0B) goto <D.17777>; else goto <D.17778>;
  <D.17777>:
  D.17776 = hash->key_destroy_func;
  D.17770 = s->key;
  D.17776 (D.17770);
  <D.17778>:
  s->key = key;
  <D.17775>:
  D.17779 = hash->value_destroy_func;
  if (D.17779 != 0B) goto <D.17780>; else goto <D.17781>;
  <D.17780>:
  D.17779 = hash->value_destroy_func;
  D.17782 = s->value;
  D.17779 (D.17782);
  <D.17781>:
  s->value = value;
  return;
  <D.17773>:
  s = s->next;
  <D.17478>:
  if (s != 0B) goto <D.17477>; else goto <D.17479>;
  <D.17479>:
  s = new_slot (hash);
  s->key = key;
  s->value = value;
  D.17766 = hash->table;
  D.17767 = (long unsigned int) hashcode;
  D.17768 = D.17767 * 8;
  D.17769 = D.17766 + D.17768;
  D.17783 = *D.17769;
  s->next = D.17783;
  D.17766 = hash->table;
  D.17767 = (long unsigned int) hashcode;
  D.17768 = D.17767 * 8;
  D.17769 = D.17766 + D.17768;
  *D.17769 = s;
  D.17758 = hash->in_use;
  D.17784 = D.17758 + 1;
  hash->in_use = D.17784;
}


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

  D.17786 = hash->gc_type;
  if (D.17786 == 0) goto <D.17787>; else goto <D.17788>;
  <D.17787>:
  D.17789 = mono_gc_alloc_fixed (24, 0B);
  return D.17789;
  <D.17788>:
  D.17789 = monoeg_malloc (24);
  return D.17789;
}


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.17791;
  long unsigned int D.17792;
  long unsigned int D.17793;
  struct Slot * * D.17794;
  int D.17795;
  int D.17796;
  int i;
  int chain_size;
  int max_chain_size;
  struct Slot * node;

  max_chain_size = 0;
  i = 0;
  goto <D.17501>;
  <D.17500>:
  chain_size = 0;
  D.17791 = table->table;
  D.17792 = (long unsigned int) i;
  D.17793 = D.17792 * 8;
  D.17794 = D.17791 + D.17793;
  node = *D.17794;
  goto <D.17498>;
  <D.17497>:
  chain_size = chain_size + 1;
  node = node->next;
  <D.17498>:
  if (node != 0B) goto <D.17497>; else goto <D.17499>;
  <D.17499>:
  max_chain_size = MAX_EXPR <chain_size, max_chain_size>;
  i = i + 1;
  <D.17501>:
  D.17795 = table->table_size;
  if (D.17795 > i) goto <D.17500>; else goto <D.17502>;
  <D.17502>:
  D.17795 = table->table_size;
  D.17796 = table->in_use;
  printf ("Size: %d Table Size: %d Max Chain Length: %d\n", D.17796, D.17795, max_chain_size);
}


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

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


