mono_property_hash_new ()
{
  struct GHashTable * D.4638;
  struct MonoPropertyHash * D.4639;
  struct MonoPropertyHash * hash;

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


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

  D.4641 = hash->hashes;
  monoeg_g_hash_table_foreach (D.4641, free_hash, 0B);
  D.4641 = hash->hashes;
  monoeg_g_hash_table_destroy (D.4641);
  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)
{
  const void * property.0;
  struct GHashTable * D.4643;
  void * property.1;
  struct GHashTable * prop_hash;

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


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

  D.4647 = hash->hashes;
  monoeg_g_hash_table_foreach (D.4647, 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)
{
  const void * property.2;
  struct GHashTable * D.4649;
  void * D.4652;
  struct GHashTable * prop_hash;

  property.2 = (const void *) property;
  D.4649 = hash->hashes;
  prop_hash = monoeg_g_hash_table_lookup (D.4649, property.2);
  if (prop_hash == 0B) goto <D.4650>; else goto <D.4651>;
  <D.4650>:
  D.4652 = 0B;
  return D.4652;
  <D.4651>:
  D.4652 = monoeg_g_hash_table_lookup (prop_hash, object);
  return D.4652;
}


