sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.17397;
  long int D.17398;
  long int D.17399;
  _Bool D.17402;
  long int D.17403;
  long int D.17404;
  int D.17407;
  _Bool D.17411;
  long int D.17412;
  long int D.17413;
  int slot;

  type.0 = (unsigned int) type;
  D.17397 = type.0 > 29;
  D.17398 = (long int) D.17397;
  D.17399 = __builtin_expect (D.17398, 0);
  if (D.17399 != 0) goto <D.17400>; else goto <D.17401>;
  <D.17400>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.17401>:
  slot = index_for_size (size);
  D.17402 = slot < 0;
  D.17403 = (long int) D.17402;
  D.17404 = __builtin_expect (D.17403, 0);
  if (D.17404 != 0) goto <D.17405>; else goto <D.17406>;
  <D.17405>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.17406>:
  D.17407 = fixed_type_allocator_indexes[type];
  if (D.17407 == -1) goto <D.17408>; else goto <D.17409>;
  <D.17408>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.17410>;
  <D.17409>:
  D.17407 = fixed_type_allocator_indexes[type];
  D.17411 = D.17407 != slot;
  D.17412 = (long int) D.17411;
  D.17413 = __builtin_expect (D.17412, 0);
  if (D.17413 != 0) goto <D.17414>; else goto <D.17415>;
  <D.17414>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.17415>:
  <D.17410>:
}


index_for_size (size_t size)
{
  int D.17416;
  unsigned int D.17417;
  int D.17420;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.17313>;
  <D.17312>:
  D.17416 = allocator_sizes[slot];
  D.17417 = (unsigned int) D.17416;
  if (D.17417 >= size) goto <D.17418>; else goto <D.17419>;
  <D.17418>:
  D.17420 = slot;
  return D.17420;
  <D.17419>:
  slot = slot + 1;
  <D.17313>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.17312>; else goto <D.17314>;
  <D.17314>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.17420 = -1;
  return D.17420;
}


sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.17423;
  unsigned int D.17424;
  const char * D.17429;
  struct MonoLockFreeAllocator * D.17431;
  const char * D.17434;
  void * D.17435;
  int index;
  void * p;

  D.17423 = 8184;
  D.17424 = (unsigned int) D.17423;
  if (D.17424 < size) goto <D.17425>; else goto <D.17426>;
  <D.17425>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.17427>; else goto <D.17428>;
  <D.17427>:
  D.17429 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17429);
  <D.17428>:
  goto <D.17430>;
  <D.17426>:
  index = index_for_size (size);
  D.17431 = &allocators[index];
  p = mono_lock_free_alloc (D.17431);
  if (p == 0B) goto <D.17432>; else goto <D.17433>;
  <D.17432>:
  D.17434 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17434);
  <D.17433>:
  memset (p, 0, size);
  <D.17430>:
  D.17435 = p;
  return D.17435;
}


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

  switch (type) <default: <D.17354>, case 0: <D.17324>, case 1: <D.17325>, case 2: <D.17326>, case 3: <D.17327>, case 4: <D.17328>, case 5: <D.17329>, case 6: <D.17330>, case 7: <D.17331>, case 8: <D.17332>, case 9: <D.17333>, case 10: <D.17334>, case 11: <D.17335>, case 12: <D.17336>, case 13: <D.17337>, case 14: <D.17338>, case 15: <D.17339>, case 16: <D.17340>, case 17: <D.17341>, case 18: <D.17342>, case 19: <D.17343>, case 20: <D.17344>, case 21: <D.17345>, case 22: <D.17346>, case 23: <D.17347>, case 24: <D.17348>, case 25: <D.17349>, case 26: <D.17350>, case 27: <D.17351>, case 28: <D.17352>, case 29: <D.17353>>
  <D.17324>:
  D.17437 = "pin-queue";
  return D.17437;
  <D.17325>:
  D.17437 = "fragment";
  return D.17437;
  <D.17326>:
  D.17437 = "section";
  return D.17437;
  <D.17327>:
  D.17437 = "scan-starts";
  return D.17437;
  <D.17328>:
  D.17437 = "fin-table";
  return D.17437;
  <D.17329>:
  D.17437 = "finalize-entry";
  return D.17437;
  <D.17330>:
  D.17437 = "finalize-ready-entry";
  return D.17437;
  <D.17331>:
  D.17437 = "dislink-table";
  return D.17437;
  <D.17332>:
  D.17437 = "dislink";
  return D.17437;
  <D.17333>:
  D.17437 = "roots-table";
  return D.17437;
  <D.17334>:
  D.17437 = "root-record";
  return D.17437;
  <D.17335>:
  D.17437 = "statistics";
  return D.17437;
  <D.17336>:
  D.17437 = "pinned-class";
  return D.17437;
  <D.17337>:
  D.17437 = "remset-class";
  return D.17437;
  <D.17338>:
  D.17437 = "gray-queue";
  return D.17437;
  <D.17339>:
  D.17437 = "marksweep-tables";
  return D.17437;
  <D.17340>:
  D.17437 = "marksweep-block-info";
  return D.17437;
  <D.17341>:
  D.17437 = "marksweep-block-info-sort";
  return D.17437;
  <D.17342>:
  D.17437 = "ephemeron-link";
  return D.17437;
  <D.17343>:
  D.17437 = "worker-data";
  return D.17437;
  <D.17344>:
  D.17437 = "worker-job-data";
  return D.17437;
  <D.17345>:
  D.17437 = "bridge-data";
  return D.17437;
  <D.17346>:
  D.17437 = "bridge-hash-table";
  return D.17437;
  <D.17347>:
  D.17437 = "bridge-hash-table-entry";
  return D.17437;
  <D.17348>:
  D.17437 = "bridge-alive-hash-table";
  return D.17437;
  <D.17349>:
  D.17437 = "bridge-alive-hash-table-entry";
  return D.17437;
  <D.17350>:
  D.17437 = "job-queue-entry";
  return D.17437;
  <D.17351>:
  D.17437 = "toggleref-data";
  return D.17437;
  <D.17352>:
  D.17437 = "cardtable-mod-union";
  return D.17437;
  <D.17353>:
  D.17437 = "binary-protocol";
  return D.17437;
  <D.17354>:
  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.17441;
  int D.17446;
  void * D.17448;
  unsigned int D.17449;

  D.17441 = __builtin_constant_p (__len);
  if (D.17441 != 0) goto <D.17442>; else goto <D.17443>;
  <D.17442>:
  if (__len == 0) goto <D.17444>; else goto <D.17445>;
  <D.17444>:
  D.17446 = __builtin_constant_p (__ch);
  if (D.17446 == 0) goto <D.17439>; else goto <D.17447>;
  <D.17447>:
  if (__ch != 0) goto <D.17439>; else goto <D.17440>;
  <D.17439>:
  __warn_memset_zero_len ();
  D.17448 = __dest;
  return D.17448;
  <D.17440>:
  <D.17445>:
  <D.17443>:
  D.17449 = __builtin_object_size (__dest, 0);
  D.17448 = __builtin___memset_chk (__dest, __ch, __len, D.17449);
  return D.17448;
}


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

  if (addr == 0B) goto <D.17451>; else goto <D.17452>;
  <D.17451>:
  return;
  <D.17452>:
  D.17453 = 8184;
  D.17454 = (unsigned int) D.17453;
  if (D.17454 < size) goto <D.17455>; else goto <D.17456>;
  <D.17455>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.17457>;
  <D.17456>:
  mono_lock_free_free (addr);
  <D.17457>:
}


sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.17460;
  long int D.17461;
  long int D.17462;
  struct MonoLockFreeAllocator * D.17465;
  unsigned int size.3;
  void * D.17467;
  int index;
  int size;
  void * p;

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


sgen_free_internal (void * addr, int type)
{
  unsigned int index.4;
  _Bool D.17472;
  long int D.17473;
  long int D.17474;
  int index;

  if (addr == 0B) goto <D.17469>; else goto <D.17470>;
  <D.17469>:
  return;
  <D.17470>:
  index = fixed_type_allocator_indexes[type];
  index.4 = (unsigned int) index;
  D.17472 = index.4 > 29;
  D.17473 = (long int) D.17472;
  D.17474 = __builtin_expect (D.17473, 0);
  if (D.17474 != 0) goto <D.17475>; else goto <D.17476>;
  <D.17475>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17476>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.17477>; else goto <D.17478>;
  <D.17477>:
  {
    int size;

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


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

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


sgen_init_internal_allocator ()
{
  int D.17482;
  unsigned int D.17483;
  struct MonoLockFreeAllocSizeClass * D.17484;
  struct MonoLockFreeAllocator * D.17485;
  unsigned int i.5;
  int i;

  i = 0;
  goto <D.17390>;
  <D.17389>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.17390>:
  if (i <= 29) goto <D.17389>; else goto <D.17391>;
  <D.17391>:
  i = 0;
  goto <D.17393>;
  <D.17392>:
  D.17482 = allocator_sizes[i];
  D.17483 = (unsigned int) D.17482;
  D.17484 = &size_classes[i];
  mono_lock_free_allocator_init_size_class (D.17484, D.17483);
  D.17484 = &size_classes[i];
  D.17485 = &allocators[i];
  mono_lock_free_allocator_init_allocator (D.17485, D.17484);
  i = i + 1;
  <D.17393>:
  i.5 = (unsigned int) i;
  if (i.5 <= 29) goto <D.17392>; else goto <D.17394>;
  <D.17394>:
}


