sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.17377;
  long int D.17378;
  long int D.17379;
  _Bool D.17382;
  long int D.17383;
  long int D.17384;
  int D.17387;
  _Bool D.17391;
  long int D.17392;
  long int D.17393;
  int slot;

  type.0 = (unsigned int) type;
  D.17377 = type.0 > 29;
  D.17378 = (long int) D.17377;
  D.17379 = __builtin_expect (D.17378, 0);
  if (D.17379 != 0) goto <D.17380>; else goto <D.17381>;
  <D.17380>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.17381>:
  slot = index_for_size (size);
  D.17382 = slot < 0;
  D.17383 = (long int) D.17382;
  D.17384 = __builtin_expect (D.17383, 0);
  if (D.17384 != 0) goto <D.17385>; else goto <D.17386>;
  <D.17385>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.17386>:
  D.17387 = fixed_type_allocator_indexes[type];
  if (D.17387 == -1) goto <D.17388>; else goto <D.17389>;
  <D.17388>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.17390>;
  <D.17389>:
  D.17387 = fixed_type_allocator_indexes[type];
  D.17391 = D.17387 != slot;
  D.17392 = (long int) D.17391;
  D.17393 = __builtin_expect (D.17392, 0);
  if (D.17393 != 0) goto <D.17394>; else goto <D.17395>;
  <D.17394>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.17395>:
  <D.17390>:
}


index_for_size (size_t size)
{
  int D.17396;
  unsigned int D.17397;
  int D.17400;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.17293>;
  <D.17292>:
  D.17396 = allocator_sizes[slot];
  D.17397 = (unsigned int) D.17396;
  if (D.17397 >= size) goto <D.17398>; else goto <D.17399>;
  <D.17398>:
  D.17400 = slot;
  return D.17400;
  <D.17399>:
  slot = slot + 1;
  <D.17293>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.17292>; else goto <D.17294>;
  <D.17294>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.17400 = -1;
  return D.17400;
}


sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.17403;
  unsigned int D.17404;
  const char * D.17409;
  struct MonoLockFreeAllocator * D.17411;
  const char * D.17414;
  void * D.17415;
  int index;
  void * p;

  D.17403 = 8184;
  D.17404 = (unsigned int) D.17403;
  if (D.17404 < size) goto <D.17405>; else goto <D.17406>;
  <D.17405>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.17407>; else goto <D.17408>;
  <D.17407>:
  D.17409 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17409);
  <D.17408>:
  goto <D.17410>;
  <D.17406>:
  index = index_for_size (size);
  D.17411 = &allocators[index];
  p = mono_lock_free_alloc (D.17411);
  if (p == 0B) goto <D.17412>; else goto <D.17413>;
  <D.17412>:
  D.17414 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17414);
  <D.17413>:
  memset (p, 0, size);
  <D.17410>:
  D.17415 = p;
  return D.17415;
}


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

  switch (type) <default: <D.17334>, case 0: <D.17304>, case 1: <D.17305>, case 2: <D.17306>, case 3: <D.17307>, case 4: <D.17308>, case 5: <D.17309>, case 6: <D.17310>, case 7: <D.17311>, case 8: <D.17312>, case 9: <D.17313>, case 10: <D.17314>, case 11: <D.17315>, case 12: <D.17316>, case 13: <D.17317>, case 14: <D.17318>, case 15: <D.17319>, case 16: <D.17320>, case 17: <D.17321>, case 18: <D.17322>, case 19: <D.17323>, case 20: <D.17324>, case 21: <D.17325>, case 22: <D.17326>, case 23: <D.17327>, case 24: <D.17328>, case 25: <D.17329>, case 26: <D.17330>, case 27: <D.17331>, case 28: <D.17332>, case 29: <D.17333>>
  <D.17304>:
  D.17417 = "pin-queue";
  return D.17417;
  <D.17305>:
  D.17417 = "fragment";
  return D.17417;
  <D.17306>:
  D.17417 = "section";
  return D.17417;
  <D.17307>:
  D.17417 = "scan-starts";
  return D.17417;
  <D.17308>:
  D.17417 = "fin-table";
  return D.17417;
  <D.17309>:
  D.17417 = "finalize-entry";
  return D.17417;
  <D.17310>:
  D.17417 = "finalize-ready-entry";
  return D.17417;
  <D.17311>:
  D.17417 = "dislink-table";
  return D.17417;
  <D.17312>:
  D.17417 = "dislink";
  return D.17417;
  <D.17313>:
  D.17417 = "roots-table";
  return D.17417;
  <D.17314>:
  D.17417 = "root-record";
  return D.17417;
  <D.17315>:
  D.17417 = "statistics";
  return D.17417;
  <D.17316>:
  D.17417 = "pinned-class";
  return D.17417;
  <D.17317>:
  D.17417 = "remset-class";
  return D.17417;
  <D.17318>:
  D.17417 = "gray-queue";
  return D.17417;
  <D.17319>:
  D.17417 = "marksweep-tables";
  return D.17417;
  <D.17320>:
  D.17417 = "marksweep-block-info";
  return D.17417;
  <D.17321>:
  D.17417 = "marksweep-block-info-sort";
  return D.17417;
  <D.17322>:
  D.17417 = "ephemeron-link";
  return D.17417;
  <D.17323>:
  D.17417 = "worker-data";
  return D.17417;
  <D.17324>:
  D.17417 = "worker-job-data";
  return D.17417;
  <D.17325>:
  D.17417 = "bridge-data";
  return D.17417;
  <D.17326>:
  D.17417 = "bridge-hash-table";
  return D.17417;
  <D.17327>:
  D.17417 = "bridge-hash-table-entry";
  return D.17417;
  <D.17328>:
  D.17417 = "bridge-alive-hash-table";
  return D.17417;
  <D.17329>:
  D.17417 = "bridge-alive-hash-table-entry";
  return D.17417;
  <D.17330>:
  D.17417 = "job-queue-entry";
  return D.17417;
  <D.17331>:
  D.17417 = "toggleref-data";
  return D.17417;
  <D.17332>:
  D.17417 = "cardtable-mod-union";
  return D.17417;
  <D.17333>:
  D.17417 = "binary-protocol";
  return D.17417;
  <D.17334>:
  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.17421;
  int D.17426;
  void * D.17428;
  unsigned int D.17429;

  D.17421 = __builtin_constant_p (__len);
  if (D.17421 != 0) goto <D.17422>; else goto <D.17423>;
  <D.17422>:
  if (__len == 0) goto <D.17424>; else goto <D.17425>;
  <D.17424>:
  D.17426 = __builtin_constant_p (__ch);
  if (D.17426 == 0) goto <D.17419>; else goto <D.17427>;
  <D.17427>:
  if (__ch != 0) goto <D.17419>; else goto <D.17420>;
  <D.17419>:
  __warn_memset_zero_len ();
  D.17428 = __dest;
  return D.17428;
  <D.17420>:
  <D.17425>:
  <D.17423>:
  D.17429 = __builtin_object_size (__dest, 0);
  D.17428 = __builtin___memset_chk (__dest, __ch, __len, D.17429);
  return D.17428;
}


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

  if (addr == 0B) goto <D.17431>; else goto <D.17432>;
  <D.17431>:
  return;
  <D.17432>:
  D.17433 = 8184;
  D.17434 = (unsigned int) D.17433;
  if (D.17434 < size) goto <D.17435>; else goto <D.17436>;
  <D.17435>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.17437>;
  <D.17436>:
  mono_lock_free_free (addr);
  <D.17437>:
}


sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.17440;
  long int D.17441;
  long int D.17442;
  struct MonoLockFreeAllocator * D.17445;
  unsigned int size.3;
  void * D.17447;
  int index;
  int size;
  void * p;

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


sgen_free_internal (void * addr, int type)
{
  unsigned int index.4;
  _Bool D.17452;
  long int D.17453;
  long int D.17454;
  int index;

  if (addr == 0B) goto <D.17449>; else goto <D.17450>;
  <D.17449>:
  return;
  <D.17450>:
  index = fixed_type_allocator_indexes[type];
  index.4 = (unsigned int) index;
  D.17452 = index.4 > 29;
  D.17453 = (long int) D.17452;
  D.17454 = __builtin_expect (D.17453, 0);
  if (D.17454 != 0) goto <D.17455>; else goto <D.17456>;
  <D.17455>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17456>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.17457>; else goto <D.17458>;
  <D.17457>:
  {
    int size;

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


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

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


sgen_init_internal_allocator ()
{
  struct MonoLockFreeAllocSizeClass * D.17462;
  int D.17463;
  unsigned int D.17464;
  struct MonoLockFreeAllocator * D.17465;
  unsigned int i.5;
  int i;

  i = 0;
  goto <D.17370>;
  <D.17369>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.17370>:
  if (i <= 29) goto <D.17369>; else goto <D.17371>;
  <D.17371>:
  i = 0;
  goto <D.17373>;
  <D.17372>:
  D.17462 = &size_classes[i];
  D.17463 = allocator_sizes[i];
  D.17464 = (unsigned int) D.17463;
  mono_lock_free_allocator_init_size_class (D.17462, D.17464);
  D.17465 = &allocators[i];
  D.17462 = &size_classes[i];
  mono_lock_free_allocator_init_allocator (D.17465, D.17462);
  i = i + 1;
  <D.17373>:
  i.5 = (unsigned int) i;
  if (i.5 <= 29) goto <D.17372>; else goto <D.17374>;
  <D.17374>:
}


