sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.18290;
  long int D.18291;
  long int D.18292;
  _Bool D.18295;
  long int D.18296;
  long int D.18297;
  int D.18300;
  _Bool D.18304;
  long int D.18305;
  long int D.18306;
  int slot;

  type.0 = (unsigned int) type;
  D.18290 = type.0 > 29;
  D.18291 = (long int) D.18290;
  D.18292 = __builtin_expect (D.18291, 0);
  if (D.18292 != 0) goto <D.18293>; else goto <D.18294>;
  <D.18293>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.18294>:
  slot = index_for_size (size);
  D.18295 = slot < 0;
  D.18296 = (long int) D.18295;
  D.18297 = __builtin_expect (D.18296, 0);
  if (D.18297 != 0) goto <D.18298>; else goto <D.18299>;
  <D.18298>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.18299>:
  D.18300 = fixed_type_allocator_indexes[type];
  if (D.18300 == -1) goto <D.18301>; else goto <D.18302>;
  <D.18301>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.18303>;
  <D.18302>:
  D.18300 = fixed_type_allocator_indexes[type];
  D.18304 = D.18300 != slot;
  D.18305 = (long int) D.18304;
  D.18306 = __builtin_expect (D.18305, 0);
  if (D.18306 != 0) goto <D.18307>; else goto <D.18308>;
  <D.18307>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.18308>:
  <D.18303>:
}


index_for_size (size_t size)
{
  int D.18309;
  long unsigned int D.18310;
  int D.18313;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.18206>;
  <D.18205>:
  D.18309 = allocator_sizes[slot];
  D.18310 = (long unsigned int) D.18309;
  if (D.18310 >= size) goto <D.18311>; else goto <D.18312>;
  <D.18311>:
  D.18313 = slot;
  return D.18313;
  <D.18312>:
  slot = slot + 1;
  <D.18206>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.18205>; else goto <D.18207>;
  <D.18207>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.18313 = -1;
  return D.18313;
}


sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.18316;
  long unsigned int D.18317;
  const char * D.18322;
  struct MonoLockFreeAllocator * D.18324;
  const char * D.18327;
  void * D.18328;
  int index;
  void * p;

  D.18316 = 8184;
  D.18317 = (long unsigned int) D.18316;
  if (D.18317 < size) goto <D.18318>; else goto <D.18319>;
  <D.18318>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.18320>; else goto <D.18321>;
  <D.18320>:
  D.18322 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.18322);
  <D.18321>:
  goto <D.18323>;
  <D.18319>:
  index = index_for_size (size);
  D.18324 = &allocators[index];
  p = mono_lock_free_alloc (D.18324);
  if (p == 0B) goto <D.18325>; else goto <D.18326>;
  <D.18325>:
  D.18327 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.18327);
  <D.18326>:
  memset (p, 0, size);
  <D.18323>:
  D.18328 = p;
  return D.18328;
}


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

  switch (type) <default: <D.18247>, case 0: <D.18217>, case 1: <D.18218>, case 2: <D.18219>, case 3: <D.18220>, case 4: <D.18221>, case 5: <D.18222>, case 6: <D.18223>, case 7: <D.18224>, case 8: <D.18225>, case 9: <D.18226>, case 10: <D.18227>, case 11: <D.18228>, case 12: <D.18229>, case 13: <D.18230>, case 14: <D.18231>, case 15: <D.18232>, case 16: <D.18233>, case 17: <D.18234>, case 18: <D.18235>, case 19: <D.18236>, case 20: <D.18237>, case 21: <D.18238>, case 22: <D.18239>, case 23: <D.18240>, case 24: <D.18241>, case 25: <D.18242>, case 26: <D.18243>, case 27: <D.18244>, case 28: <D.18245>, case 29: <D.18246>>
  <D.18217>:
  D.18330 = "pin-queue";
  return D.18330;
  <D.18218>:
  D.18330 = "fragment";
  return D.18330;
  <D.18219>:
  D.18330 = "section";
  return D.18330;
  <D.18220>:
  D.18330 = "scan-starts";
  return D.18330;
  <D.18221>:
  D.18330 = "fin-table";
  return D.18330;
  <D.18222>:
  D.18330 = "finalize-entry";
  return D.18330;
  <D.18223>:
  D.18330 = "finalize-ready-entry";
  return D.18330;
  <D.18224>:
  D.18330 = "dislink-table";
  return D.18330;
  <D.18225>:
  D.18330 = "dislink";
  return D.18330;
  <D.18226>:
  D.18330 = "roots-table";
  return D.18330;
  <D.18227>:
  D.18330 = "root-record";
  return D.18330;
  <D.18228>:
  D.18330 = "statistics";
  return D.18330;
  <D.18229>:
  D.18330 = "pinned-class";
  return D.18330;
  <D.18230>:
  D.18330 = "remset-class";
  return D.18330;
  <D.18231>:
  D.18330 = "gray-queue";
  return D.18330;
  <D.18232>:
  D.18330 = "marksweep-tables";
  return D.18330;
  <D.18233>:
  D.18330 = "marksweep-block-info";
  return D.18330;
  <D.18234>:
  D.18330 = "marksweep-block-info-sort";
  return D.18330;
  <D.18235>:
  D.18330 = "ephemeron-link";
  return D.18330;
  <D.18236>:
  D.18330 = "worker-data";
  return D.18330;
  <D.18237>:
  D.18330 = "worker-job-data";
  return D.18330;
  <D.18238>:
  D.18330 = "bridge-data";
  return D.18330;
  <D.18239>:
  D.18330 = "bridge-hash-table";
  return D.18330;
  <D.18240>:
  D.18330 = "bridge-hash-table-entry";
  return D.18330;
  <D.18241>:
  D.18330 = "bridge-alive-hash-table";
  return D.18330;
  <D.18242>:
  D.18330 = "bridge-alive-hash-table-entry";
  return D.18330;
  <D.18243>:
  D.18330 = "job-queue-entry";
  return D.18330;
  <D.18244>:
  D.18330 = "toggleref-data";
  return D.18330;
  <D.18245>:
  D.18330 = "cardtable-mod-union";
  return D.18330;
  <D.18246>:
  D.18330 = "binary-protocol";
  return D.18330;
  <D.18247>:
  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.18334;
  int D.18339;
  void * D.18341;
  long unsigned int D.18342;

  D.18334 = __builtin_constant_p (__len);
  if (D.18334 != 0) goto <D.18335>; else goto <D.18336>;
  <D.18335>:
  if (__len == 0) goto <D.18337>; else goto <D.18338>;
  <D.18337>:
  D.18339 = __builtin_constant_p (__ch);
  if (D.18339 == 0) goto <D.18332>; else goto <D.18340>;
  <D.18340>:
  if (__ch != 0) goto <D.18332>; else goto <D.18333>;
  <D.18332>:
  __warn_memset_zero_len ();
  D.18341 = __dest;
  return D.18341;
  <D.18333>:
  <D.18338>:
  <D.18336>:
  D.18342 = __builtin_object_size (__dest, 0);
  D.18341 = __builtin___memset_chk (__dest, __ch, __len, D.18342);
  return D.18341;
}


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

  if (addr == 0B) goto <D.18344>; else goto <D.18345>;
  <D.18344>:
  return;
  <D.18345>:
  D.18346 = 8184;
  D.18347 = (long unsigned int) D.18346;
  if (D.18347 < size) goto <D.18348>; else goto <D.18349>;
  <D.18348>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.18350>;
  <D.18349>:
  mono_lock_free_free (addr);
  <D.18350>:
}


sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.18353;
  long int D.18354;
  long int D.18355;
  struct MonoLockFreeAllocator * D.18358;
  long unsigned int D.18359;
  void * D.18360;
  int index;
  int size;
  void * p;

  index = fixed_type_allocator_indexes[type];
  size = allocator_sizes[index];
  index.2 = (unsigned int) index;
  D.18353 = index.2 > 29;
  D.18354 = (long int) D.18353;
  D.18355 = __builtin_expect (D.18354, 0);
  if (D.18355 != 0) goto <D.18356>; else goto <D.18357>;
  <D.18356>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 162, "index >= 0 && index < NUM_ALLOCATORS");
  <D.18357>:
  D.18358 = &allocators[index];
  p = mono_lock_free_alloc (D.18358);
  D.18359 = (long unsigned int) size;
  memset (p, 0, D.18359);
  D.18360 = p;
  return D.18360;
}


sgen_free_internal (void * addr, int type)
{
  unsigned int index.3;
  _Bool D.18365;
  long int D.18366;
  long int D.18367;
  int index;

  if (addr == 0B) goto <D.18362>; else goto <D.18363>;
  <D.18362>:
  return;
  <D.18363>:
  index = fixed_type_allocator_indexes[type];
  index.3 = (unsigned int) index;
  D.18365 = index.3 > 29;
  D.18366 = (long int) D.18365;
  D.18367 = __builtin_expect (D.18366, 0);
  if (D.18367 != 0) goto <D.18368>; else goto <D.18369>;
  <D.18368>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.18369>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.18370>; else goto <D.18371>;
  <D.18370>:
  {
    int size;

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


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

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


sgen_init_internal_allocator ()
{
  struct MonoLockFreeAllocSizeClass * D.18375;
  int D.18376;
  unsigned int D.18377;
  struct MonoLockFreeAllocator * D.18378;
  unsigned int i.4;
  int i;

  i = 0;
  goto <D.18283>;
  <D.18282>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.18283>:
  if (i <= 29) goto <D.18282>; else goto <D.18284>;
  <D.18284>:
  i = 0;
  goto <D.18286>;
  <D.18285>:
  D.18375 = &size_classes[i];
  D.18376 = allocator_sizes[i];
  D.18377 = (unsigned int) D.18376;
  mono_lock_free_allocator_init_size_class (D.18375, D.18377);
  D.18378 = &allocators[i];
  D.18375 = &size_classes[i];
  mono_lock_free_allocator_init_allocator (D.18378, D.18375);
  i = i + 1;
  <D.18286>:
  i.4 = (unsigned int) i;
  if (i.4 <= 29) goto <D.18285>; else goto <D.18287>;
  <D.18287>:
}


