mono_property_hash_new ()
{
  struct GHashTable * D.4658;
  struct MonoPropertyHash * D.4659;
  struct MonoPropertyHash * hash;

  hash = monoeg_malloc0 (4);
  D.4658 = monoeg_g_hash_table_new (0B, 0B);
  hash->hashes = D.4658;
  D.4659 = hash;
  return D.4659;
}


mono_property_hash_destroy (struct MonoPropertyHash * hash)
{
  struct GHashTable * D.4661;

  D.4661 = hash->hashes;
  monoeg_g_hash_table_foreach (D.4661, free_hash, 0B);
  D.4661 = hash->hashes;
  monoeg_g_hash_table_destroy (D.4661);
  monoeg_g_free (hash);
}


free_hash (void * key, void * value, void * user_data)
{
  struct GHashTable * hash;

  hash = value;
  monoeg_g_hash_table_destroy (hash);
}


mono_property_hash_insert (struct MonoPropertyHash * hash, void * object, guint32 property, void * value)
{
  struct GHashTable * D.4662;
  const void * property.0;
  void * property.1;
  struct GHashTable * prop_hash;

  D.4662 = hash->hashes;
  property.0 = (const void *) property;
  prop_hash = monoeg_g_hash_table_lookup (D.4662, property.0);
  if (prop_hash == 0B) goto <D.4664>; else goto <D.4665>;
  <D.4664>:
  prop_hash = monoeg_g_hash_table_new (0B, 0B);
  D.4662 = hash->hashes;
  property.1 = (void *) property;
  monoeg_g_hash_table_insert_replace (D.4662, property.1, prop_hash, 0);
  <D.4665>:
  monoeg_g_hash_table_insert_replace (prop_hash, object, value, 0);
}


mono_property_hash_remove_object (struct MonoPropertyHash * hash, void * object)
{
  struct GHashTable * D.4667;

  D.4667 = hash->hashes;
  monoeg_g_hash_table_foreach (D.4667, remove_object, object);
}


remove_object (void * key, void * value, void * user_data)
{
  struct GHashTable * prop_hash;

  prop_hash = value;
  monoeg_g_hash_table_remove (prop_hash, user_data);
}


mono_property_hash_lookup (struct MonoPropertyHash * hash, void * object, guint32 property)
{
  struct GHashTable * D.4668;
  const void * property.2;
  void * D.4672;
  struct GHashTable * prop_hash;

  D.4668 = hash->hashes;
  property.2 = (const void *) property;
  prop_hash = monoeg_g_hash_table_lookup (D.4668, property.2);
  if (prop_hash == 0B) goto <D.4670>; else goto <D.4671>;
  <D.4670>:
  D.4672 = 0B;
  return D.4672;
  <D.4671>:
  D.4672 = monoeg_g_hash_table_lookup (prop_hash, object);
  return D.4672;
}


