sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.17760;
  long int D.17761;
  long int D.17762;
  _Bool D.17765;
  long int D.17766;
  long int D.17767;
  int D.17770;
  _Bool D.17774;
  long int D.17775;
  long int D.17776;
  int slot;

  type.0 = (unsigned int) type;
  D.17760 = type.0 > 29;
  D.17761 = (long int) D.17760;
  D.17762 = __builtin_expect (D.17761, 0);
  if (D.17762 != 0) goto <D.17763>; else goto <D.17764>;
  <D.17763>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.17764>:
  slot = index_for_size (size);
  D.17765 = slot < 0;
  D.17766 = (long int) D.17765;
  D.17767 = __builtin_expect (D.17766, 0);
  if (D.17767 != 0) goto <D.17768>; else goto <D.17769>;
  <D.17768>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.17769>:
  D.17770 = fixed_type_allocator_indexes[type];
  if (D.17770 == -1) goto <D.17771>; else goto <D.17772>;
  <D.17771>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.17773>;
  <D.17772>:
  D.17770 = fixed_type_allocator_indexes[type];
  D.17774 = D.17770 != slot;
  D.17775 = (long int) D.17774;
  D.17776 = __builtin_expect (D.17775, 0);
  if (D.17776 != 0) goto <D.17777>; else goto <D.17778>;
  <D.17777>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.17778>:
  <D.17773>:
}


index_for_size (size_t size)
{
  int D.17779;
  long unsigned int D.17780;
  int D.17783;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.17676>;
  <D.17675>:
  D.17779 = allocator_sizes[slot];
  D.17780 = (long unsigned int) D.17779;
  if (D.17780 >= size) goto <D.17781>; else goto <D.17782>;
  <D.17781>:
  D.17783 = slot;
  return D.17783;
  <D.17782>:
  slot = slot + 1;
  <D.17676>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.17675>; else goto <D.17677>;
  <D.17677>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.17783 = -1;
  return D.17783;
}


sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.17786;
  long unsigned int D.17787;
  const char * D.17792;
  struct MonoLockFreeAllocator * D.17794;
  const char * D.17797;
  void * D.17798;
  int index;
  void * p;

  D.17786 = 8184;
  D.17787 = (long unsigned int) D.17786;
  if (D.17787 < size) goto <D.17788>; else goto <D.17789>;
  <D.17788>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.17790>; else goto <D.17791>;
  <D.17790>:
  D.17792 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17792);
  <D.17791>:
  goto <D.17793>;
  <D.17789>:
  index = index_for_size (size);
  D.17794 = &allocators[index];
  p = mono_lock_free_alloc (D.17794);
  if (p == 0B) goto <D.17795>; else goto <D.17796>;
  <D.17795>:
  D.17797 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17797);
  <D.17796>:
  memset (p, 0, size);
  <D.17793>:
  D.17798 = p;
  return D.17798;
}


description_for_type (int type)
{
  const char * D.17800;

  switch (type) <default: <D.17717>, case 0: <D.17687>, case 1: <D.17688>, case 2: <D.17689>, case 3: <D.17690>, case 4: <D.17691>, case 5: <D.17692>, case 6: <D.17693>, case 7: <D.17694>, case 8: <D.17695>, case 9: <D.17696>, case 10: <D.17697>, case 11: <D.17698>, case 12: <D.17699>, case 13: <D.17700>, case 14: <D.17701>, case 15: <D.17702>, case 16: <D.17703>, case 17: <D.17704>, case 18: <D.17705>, case 19: <D.17706>, case 20: <D.17707>, case 21: <D.17708>, case 22: <D.17709>, case 23: <D.17710>, case 24: <D.17711>, case 25: <D.17712>, case 26: <D.17713>, case 27: <D.17714>, case 28: <D.17715>, case 29: <D.17716>>
  <D.17687>:
  D.17800 = "pin-queue";
  return D.17800;
  <D.17688>:
  D.17800 = "fragment";
  return D.17800;
  <D.17689>:
  D.17800 = "section";
  return D.17800;
  <D.17690>:
  D.17800 = "scan-starts";
  return D.17800;
  <D.17691>:
  D.17800 = "fin-table";
  return D.17800;
  <D.17692>:
  D.17800 = "finalize-entry";
  return D.17800;
  <D.17693>:
  D.17800 = "finalize-ready-entry";
  return D.17800;
  <D.17694>:
  D.17800 = "dislink-table";
  return D.17800;
  <D.17695>:
  D.17800 = "dislink";
  return D.17800;
  <D.17696>:
  D.17800 = "roots-table";
  return D.17800;
  <D.17697>:
  D.17800 = "root-record";
  return D.17800;
  <D.17698>:
  D.17800 = "statistics";
  return D.17800;
  <D.17699>:
  D.17800 = "pinned-class";
  return D.17800;
  <D.17700>:
  D.17800 = "remset-class";
  return D.17800;
  <D.17701>:
  D.17800 = "gray-queue";
  return D.17800;
  <D.17702>:
  D.17800 = "marksweep-tables";
  return D.17800;
  <D.17703>:
  D.17800 = "marksweep-block-info";
  return D.17800;
  <D.17704>:
  D.17800 = "marksweep-block-info-sort";
  return D.17800;
  <D.17705>:
  D.17800 = "ephemeron-link";
  return D.17800;
  <D.17706>:
  D.17800 = "worker-data";
  return D.17800;
  <D.17707>:
  D.17800 = "worker-job-data";
  return D.17800;
  <D.17708>:
  D.17800 = "bridge-data";
  return D.17800;
  <D.17709>:
  D.17800 = "bridge-hash-table";
  return D.17800;
  <D.17710>:
  D.17800 = "bridge-hash-table-entry";
  return D.17800;
  <D.17711>:
  D.17800 = "bridge-alive-hash-table";
  return D.17800;
  <D.17712>:
  D.17800 = "bridge-alive-hash-table-entry";
  return D.17800;
  <D.17713>:
  D.17800 = "job-queue-entry";
  return D.17800;
  <D.17714>:
  D.17800 = "toggleref-data";
  return D.17800;
  <D.17715>:
  D.17800 = "cardtable-mod-union";
  return D.17800;
  <D.17716>:
  D.17800 = "binary-protocol";
  return D.17800;
  <D.17717>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 115);
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.17804;
  int D.17809;
  void * D.17811;
  long unsigned int D.17812;

  D.17804 = __builtin_constant_p (__len);
  if (D.17804 != 0) goto <D.17805>; else goto <D.17806>;
  <D.17805>:
  if (__len == 0) goto <D.17807>; else goto <D.17808>;
  <D.17807>:
  D.17809 = __builtin_constant_p (__ch);
  if (D.17809 == 0) goto <D.17802>; else goto <D.17810>;
  <D.17810>:
  if (__ch != 0) goto <D.17802>; else goto <D.17803>;
  <D.17802>:
  __warn_memset_zero_len ();
  D.17811 = __dest;
  return D.17811;
  <D.17803>:
  <D.17808>:
  <D.17806>:
  D.17812 = __builtin_object_size (__dest, 0);
  D.17811 = __builtin___memset_chk (__dest, __ch, __len, D.17812);
  return D.17811;
}


sgen_free_internal_dynamic (void * addr, size_t size, int type)
{
  int D.17816;
  long unsigned int D.17817;

  if (addr == 0B) goto <D.17814>; else goto <D.17815>;
  <D.17814>:
  return;
  <D.17815>:
  D.17816 = 8184;
  D.17817 = (long unsigned int) D.17816;
  if (D.17817 < size) goto <D.17818>; else goto <D.17819>;
  <D.17818>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.17820>;
  <D.17819>:
  mono_lock_free_free (addr);
  <D.17820>:
}


sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.17823;
  long int D.17824;
  long int D.17825;
  struct MonoLockFreeAllocator * D.17828;
  long unsigned int D.17829;
  void * D.17830;
  int index;
  int size;
  void * p;

  index = fixed_type_allocator_indexes[type];
  size = allocator_sizes[index];
  index.2 = (unsigned int) index;
  D.17823 = index.2 > 29;
  D.17824 = (long int) D.17823;
  D.17825 = __builtin_expect (D.17824, 0);
  if (D.17825 != 0) goto <D.17826>; else goto <D.17827>;
  <D.17826>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 162, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17827>:
  D.17828 = &allocators[index];
  p = mono_lock_free_alloc (D.17828);
  D.17829 = (long unsigned int) size;
  memset (p, 0, D.17829);
  D.17830 = p;
  return D.17830;
}


sgen_free_internal (void * addr, int type)
{
  unsigned int index.3;
  _Bool D.17835;
  long int D.17836;
  long int D.17837;
  int index;

  if (addr == 0B) goto <D.17832>; else goto <D.17833>;
  <D.17832>:
  return;
  <D.17833>:
  index = fixed_type_allocator_indexes[type];
  index.3 = (unsigned int) index;
  D.17835 = index.3 > 29;
  D.17836 = (long int) D.17835;
  D.17837 = __builtin_expect (D.17836, 0);
  if (D.17837 != 0) goto <D.17838>; else goto <D.17839>;
  <D.17838>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17839>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.17840>; else goto <D.17841>;
  <D.17840>:
  {
    int size;

    size = allocator_sizes[index];
  }
  <D.17841>:
}


sgen_dump_internal_mem_usage (struct FILE * heap_dump_file)
{

}


sgen_report_internal_mem_usage ()
{
  printf ("not implemented yet\n");
}


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

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


sgen_init_internal_allocator ()
{
  int D.17845;
  unsigned int D.17846;
  struct MonoLockFreeAllocSizeClass * D.17847;
  struct MonoLockFreeAllocator * D.17848;
  unsigned int i.4;
  int i;

  i = 0;
  goto <D.17753>;
  <D.17752>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.17753>:
  if (i <= 29) goto <D.17752>; else goto <D.17754>;
  <D.17754>:
  i = 0;
  goto <D.17756>;
  <D.17755>:
  D.17845 = allocator_sizes[i];
  D.17846 = (unsigned int) D.17845;
  D.17847 = &size_classes[i];
  mono_lock_free_allocator_init_size_class (D.17847, D.17846);
  D.17847 = &size_classes[i];
  D.17848 = &allocators[i];
  mono_lock_free_allocator_init_allocator (D.17848, D.17847);
  i = i + 1;
  <D.17756>:
  i.4 = (unsigned int) i;
  if (i.4 <= 29) goto <D.17755>; else goto <D.17757>;
  <D.17757>:
}


