sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.19962;
  long int D.19963;
  long int D.19964;
  _Bool D.19967;
  long int D.19968;
  long int D.19969;
  int D.19972;
  _Bool D.19976;
  long int D.19977;
  long int D.19978;
  int slot;

  type.0 = (unsigned int) type;
  D.19962 = type.0 > 29;
  D.19963 = (long int) D.19962;
  D.19964 = __builtin_expect (D.19963, 0);
  if (D.19964 != 0) goto <D.19965>; else goto <D.19966>;
  <D.19965>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.19966>:
  slot = index_for_size (size);
  D.19967 = slot < 0;
  D.19968 = (long int) D.19967;
  D.19969 = __builtin_expect (D.19968, 0);
  if (D.19969 != 0) goto <D.19970>; else goto <D.19971>;
  <D.19970>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.19971>:
  D.19972 = fixed_type_allocator_indexes[type];
  if (D.19972 == -1) goto <D.19973>; else goto <D.19974>;
  <D.19973>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.19975>;
  <D.19974>:
  D.19972 = fixed_type_allocator_indexes[type];
  D.19976 = D.19972 != slot;
  D.19977 = (long int) D.19976;
  D.19978 = __builtin_expect (D.19977, 0);
  if (D.19978 != 0) goto <D.19979>; else goto <D.19980>;
  <D.19979>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.19980>:
  <D.19975>:
}


index_for_size (size_t size)
{
  int D.19981;
  unsigned int D.19982;
  int D.19985;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.19876>;
  <D.19875>:
  D.19981 = allocator_sizes[slot];
  D.19982 = (unsigned int) D.19981;
  if (D.19982 >= size) goto <D.19983>; else goto <D.19984>;
  <D.19983>:
  D.19985 = slot;
  return D.19985;
  <D.19984>:
  slot = slot + 1;
  <D.19876>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.19875>; else goto <D.19877>;
  <D.19877>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.19985 = -1;
  return D.19985;
}


sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.19988;
  unsigned int D.19989;
  const char * D.19994;
  struct MonoLockFreeAllocator * D.19996;
  const char * D.19999;
  void * D.20000;
  int index;
  void * p;

  D.19988 = 8184;
  D.19989 = (unsigned int) D.19988;
  if (D.19989 < size) goto <D.19990>; else goto <D.19991>;
  <D.19990>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.19992>; else goto <D.19993>;
  <D.19992>:
  D.19994 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.19994);
  <D.19993>:
  goto <D.19995>;
  <D.19991>:
  index = index_for_size (size);
  D.19996 = &allocators[index];
  p = mono_lock_free_alloc (D.19996);
  if (p == 0B) goto <D.19997>; else goto <D.19998>;
  <D.19997>:
  D.19999 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.19999);
  <D.19998>:
  memset (p, 0, size);
  <D.19995>:
  D.20000 = p;
  return D.20000;
}


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

  switch (type) <default: <D.19917>, case 0: <D.19887>, case 1: <D.19888>, case 2: <D.19889>, case 3: <D.19890>, case 4: <D.19891>, case 5: <D.19892>, case 6: <D.19893>, case 7: <D.19894>, case 8: <D.19895>, case 9: <D.19896>, case 10: <D.19897>, case 11: <D.19898>, case 12: <D.19899>, case 13: <D.19900>, case 14: <D.19901>, case 15: <D.19902>, case 16: <D.19903>, case 17: <D.19904>, case 18: <D.19905>, case 19: <D.19906>, case 20: <D.19907>, case 21: <D.19908>, case 22: <D.19909>, case 23: <D.19910>, case 24: <D.19911>, case 25: <D.19912>, case 26: <D.19913>, case 27: <D.19914>, case 28: <D.19915>, case 29: <D.19916>>
  <D.19887>:
  D.20002 = "pin-queue";
  return D.20002;
  <D.19888>:
  D.20002 = "fragment";
  return D.20002;
  <D.19889>:
  D.20002 = "section";
  return D.20002;
  <D.19890>:
  D.20002 = "scan-starts";
  return D.20002;
  <D.19891>:
  D.20002 = "fin-table";
  return D.20002;
  <D.19892>:
  D.20002 = "finalize-entry";
  return D.20002;
  <D.19893>:
  D.20002 = "finalize-ready-entry";
  return D.20002;
  <D.19894>:
  D.20002 = "dislink-table";
  return D.20002;
  <D.19895>:
  D.20002 = "dislink";
  return D.20002;
  <D.19896>:
  D.20002 = "roots-table";
  return D.20002;
  <D.19897>:
  D.20002 = "root-record";
  return D.20002;
  <D.19898>:
  D.20002 = "statistics";
  return D.20002;
  <D.19899>:
  D.20002 = "pinned-class";
  return D.20002;
  <D.19900>:
  D.20002 = "remset-class";
  return D.20002;
  <D.19901>:
  D.20002 = "gray-queue";
  return D.20002;
  <D.19902>:
  D.20002 = "marksweep-tables";
  return D.20002;
  <D.19903>:
  D.20002 = "marksweep-block-info";
  return D.20002;
  <D.19904>:
  D.20002 = "marksweep-block-info-sort";
  return D.20002;
  <D.19905>:
  D.20002 = "ephemeron-link";
  return D.20002;
  <D.19906>:
  D.20002 = "worker-data";
  return D.20002;
  <D.19907>:
  D.20002 = "worker-job-data";
  return D.20002;
  <D.19908>:
  D.20002 = "bridge-data";
  return D.20002;
  <D.19909>:
  D.20002 = "bridge-hash-table";
  return D.20002;
  <D.19910>:
  D.20002 = "bridge-hash-table-entry";
  return D.20002;
  <D.19911>:
  D.20002 = "bridge-alive-hash-table";
  return D.20002;
  <D.19912>:
  D.20002 = "bridge-alive-hash-table-entry";
  return D.20002;
  <D.19913>:
  D.20002 = "job-queue-entry";
  return D.20002;
  <D.19914>:
  D.20002 = "toggleref-data";
  return D.20002;
  <D.19915>:
  D.20002 = "cardtable-mod-union";
  return D.20002;
  <D.19916>:
  D.20002 = "binary-protocol";
  return D.20002;
  <D.19917>:
  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.20006;
  int D.20011;
  void * D.20013;
  unsigned int D.20014;

  D.20006 = __builtin_constant_p (__len);
  if (D.20006 != 0) goto <D.20007>; else goto <D.20008>;
  <D.20007>:
  if (__len == 0) goto <D.20009>; else goto <D.20010>;
  <D.20009>:
  D.20011 = __builtin_constant_p (__ch);
  if (D.20011 == 0) goto <D.20004>; else goto <D.20012>;
  <D.20012>:
  if (__ch != 0) goto <D.20004>; else goto <D.20005>;
  <D.20004>:
  __warn_memset_zero_len ();
  D.20013 = __dest;
  return D.20013;
  <D.20005>:
  <D.20010>:
  <D.20008>:
  D.20014 = __builtin_object_size (__dest, 0);
  D.20013 = __builtin___memset_chk (__dest, __ch, __len, D.20014);
  return D.20013;
}


sgen_free_internal_dynamic (void * addr, size_t size, int type)
{
  int D.20018;
  unsigned int D.20019;

  if (addr == 0B) goto <D.20016>; else goto <D.20017>;
  <D.20016>:
  return;
  <D.20017>:
  D.20018 = 8184;
  D.20019 = (unsigned int) D.20018;
  if (D.20019 < size) goto <D.20020>; else goto <D.20021>;
  <D.20020>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.20022>;
  <D.20021>:
  mono_lock_free_free (addr);
  <D.20022>:
}


sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.20025;
  long int D.20026;
  long int D.20027;
  struct MonoLockFreeAllocator * D.20030;
  unsigned int size.3;
  void * D.20032;
  int index;
  int size;
  void * p;

  index = fixed_type_allocator_indexes[type];
  size = allocator_sizes[index];
  index.2 = (unsigned int) index;
  D.20025 = index.2 > 29;
  D.20026 = (long int) D.20025;
  D.20027 = __builtin_expect (D.20026, 0);
  if (D.20027 != 0) goto <D.20028>; else goto <D.20029>;
  <D.20028>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 162, "index >= 0 && index < NUM_ALLOCATORS");
  <D.20029>:
  D.20030 = &allocators[index];
  p = mono_lock_free_alloc (D.20030);
  size.3 = (unsigned int) size;
  memset (p, 0, size.3);
  D.20032 = p;
  return D.20032;
}


sgen_free_internal (void * addr, int type)
{
  unsigned int index.4;
  _Bool D.20037;
  long int D.20038;
  long int D.20039;
  int index;

  if (addr == 0B) goto <D.20034>; else goto <D.20035>;
  <D.20034>:
  return;
  <D.20035>:
  index = fixed_type_allocator_indexes[type];
  index.4 = (unsigned int) index;
  D.20037 = index.4 > 29;
  D.20038 = (long int) D.20037;
  D.20039 = __builtin_expect (D.20038, 0);
  if (D.20039 != 0) goto <D.20040>; else goto <D.20041>;
  <D.20040>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.20041>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.20042>; else goto <D.20043>;
  <D.20042>:
  {
    int size;

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


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.20045;

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


sgen_init_internal_allocator ()
{
  struct MonoLockFreeAllocSizeClass * D.20047;
  int D.20048;
  unsigned int D.20049;
  struct MonoLockFreeAllocator * D.20050;
  unsigned int i.5;
  int i;

  i = 0;
  goto <D.19953>;
  <D.19952>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.19953>:
  if (i <= 29) goto <D.19952>; else goto <D.19954>;
  <D.19954>:
  i = 0;
  goto <D.19956>;
  <D.19955>:
  D.20047 = &size_classes[i];
  D.20048 = allocator_sizes[i];
  D.20049 = (unsigned int) D.20048;
  mono_lock_free_allocator_init_size_class (D.20047, D.20049);
  D.20050 = &allocators[i];
  D.20047 = &size_classes[i];
  mono_lock_free_allocator_init_allocator (D.20050, D.20047);
  i = i + 1;
  <D.19956>:
  i.5 = (unsigned int) i;
  if (i.5 <= 29) goto <D.19955>; else goto <D.19957>;
  <D.19957>:
}


