__attribute__((visibility ("hidden")))
sgen_register_fixed_internal_mem_type (int type, size_t size)
{
  unsigned int type.0;
  _Bool D.17904;
  long int D.17905;
  long int D.17906;
  _Bool D.17909;
  long int D.17910;
  long int D.17911;
  int D.17914;
  _Bool D.17918;
  long int D.17919;
  long int D.17920;
  int slot;

  type.0 = (unsigned int) type;
  D.17904 = type.0 > 29;
  D.17905 = (long int) D.17904;
  D.17906 = __builtin_expect (D.17905, 0);
  if (D.17906 != 0) goto <D.17907>; else goto <D.17908>;
  <D.17907>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 69, "type >= 0 && type < INTERNAL_MEM_MAX");
  <D.17908>:
  slot = index_for_size (size);
  D.17909 = slot < 0;
  D.17910 = (long int) D.17909;
  D.17911 = __builtin_expect (D.17910, 0);
  if (D.17911 != 0) goto <D.17912>; else goto <D.17913>;
  <D.17912>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 72, "slot >= 0");
  <D.17913>:
  D.17914 = fixed_type_allocator_indexes[type];
  if (D.17914 == -1) goto <D.17915>; else goto <D.17916>;
  <D.17915>:
  fixed_type_allocator_indexes[type] = slot;
  goto <D.17917>;
  <D.17916>:
  D.17914 = fixed_type_allocator_indexes[type];
  D.17918 = D.17914 != slot;
  D.17919 = (long int) D.17918;
  D.17920 = __builtin_expect (D.17919, 0);
  if (D.17920 != 0) goto <D.17921>; else goto <D.17922>;
  <D.17921>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 77, "fixed_type_allocator_indexes [type] == slot");
  <D.17922>:
  <D.17917>:
}


index_for_size (size_t size)
{
  int D.17923;
  long unsigned int D.17924;
  int D.17927;
  unsigned int slot.1;
  int slot;

  slot = 0;
  goto <D.17820>;
  <D.17819>:
  D.17923 = allocator_sizes[slot];
  D.17924 = (long unsigned int) D.17923;
  if (D.17924 >= size) goto <D.17925>; else goto <D.17926>;
  <D.17925>:
  D.17927 = slot;
  return D.17927;
  <D.17926>:
  slot = slot + 1;
  <D.17820>:
  slot.1 = (unsigned int) slot;
  if (slot.1 <= 29) goto <D.17819>; else goto <D.17821>;
  <D.17821>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 54);
  D.17927 = -1;
  return D.17927;
}


__attribute__((visibility ("hidden")))
sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure)
{
  int D.17930;
  long unsigned int D.17931;
  const char * D.17936;
  struct MonoLockFreeAllocator * D.17938;
  const char * D.17941;
  void * D.17942;
  int index;
  void * p;

  D.17930 = 8184;
  D.17931 = (long unsigned int) D.17930;
  if (D.17931 < size) goto <D.17932>; else goto <D.17933>;
  <D.17932>:
  p = sgen_alloc_os_memory (size, 2, 0B);
  if (p == 0B) goto <D.17934>; else goto <D.17935>;
  <D.17934>:
  D.17936 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17936);
  <D.17935>:
  goto <D.17937>;
  <D.17933>:
  index = index_for_size (size);
  D.17938 = &allocators[index];
  p = mono_lock_free_alloc (D.17938);
  if (p == 0B) goto <D.17939>; else goto <D.17940>;
  <D.17939>:
  D.17941 = description_for_type (type);
  sgen_assert_memory_alloc (0B, size, D.17941);
  <D.17940>:
  memset (p, 0, size);
  <D.17937>:
  D.17942 = p;
  return D.17942;
}


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

  switch (type) <default: <D.17861>, case 0: <D.17831>, case 1: <D.17832>, case 2: <D.17833>, case 3: <D.17834>, case 4: <D.17835>, case 5: <D.17836>, case 6: <D.17837>, case 7: <D.17838>, case 8: <D.17839>, case 9: <D.17840>, case 10: <D.17841>, case 11: <D.17842>, case 12: <D.17843>, case 13: <D.17844>, case 14: <D.17845>, case 15: <D.17846>, case 16: <D.17847>, case 17: <D.17848>, case 18: <D.17849>, case 19: <D.17850>, case 20: <D.17851>, case 21: <D.17852>, case 22: <D.17853>, case 23: <D.17854>, case 24: <D.17855>, case 25: <D.17856>, case 26: <D.17857>, case 27: <D.17858>, case 28: <D.17859>, case 29: <D.17860>>
  <D.17831>:
  D.17944 = "pin-queue";
  return D.17944;
  <D.17832>:
  D.17944 = "fragment";
  return D.17944;
  <D.17833>:
  D.17944 = "section";
  return D.17944;
  <D.17834>:
  D.17944 = "scan-starts";
  return D.17944;
  <D.17835>:
  D.17944 = "fin-table";
  return D.17944;
  <D.17836>:
  D.17944 = "finalize-entry";
  return D.17944;
  <D.17837>:
  D.17944 = "finalize-ready-entry";
  return D.17944;
  <D.17838>:
  D.17944 = "dislink-table";
  return D.17944;
  <D.17839>:
  D.17944 = "dislink";
  return D.17944;
  <D.17840>:
  D.17944 = "roots-table";
  return D.17944;
  <D.17841>:
  D.17944 = "root-record";
  return D.17944;
  <D.17842>:
  D.17944 = "statistics";
  return D.17944;
  <D.17843>:
  D.17944 = "pinned-class";
  return D.17944;
  <D.17844>:
  D.17944 = "remset-class";
  return D.17944;
  <D.17845>:
  D.17944 = "gray-queue";
  return D.17944;
  <D.17846>:
  D.17944 = "marksweep-tables";
  return D.17944;
  <D.17847>:
  D.17944 = "marksweep-block-info";
  return D.17944;
  <D.17848>:
  D.17944 = "marksweep-block-info-sort";
  return D.17944;
  <D.17849>:
  D.17944 = "ephemeron-link";
  return D.17944;
  <D.17850>:
  D.17944 = "worker-data";
  return D.17944;
  <D.17851>:
  D.17944 = "worker-job-data";
  return D.17944;
  <D.17852>:
  D.17944 = "bridge-data";
  return D.17944;
  <D.17853>:
  D.17944 = "bridge-hash-table";
  return D.17944;
  <D.17854>:
  D.17944 = "bridge-hash-table-entry";
  return D.17944;
  <D.17855>:
  D.17944 = "bridge-alive-hash-table";
  return D.17944;
  <D.17856>:
  D.17944 = "bridge-alive-hash-table-entry";
  return D.17944;
  <D.17857>:
  D.17944 = "job-queue-entry";
  return D.17944;
  <D.17858>:
  D.17944 = "toggleref-data";
  return D.17944;
  <D.17859>:
  D.17944 = "cardtable-mod-union";
  return D.17944;
  <D.17860>:
  D.17944 = "binary-protocol";
  return D.17944;
  <D.17861>:
  monoeg_assertion_message ("* Assertion: should not be reached at %s:%d\n", "sgen-internal.c", 115);
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memset (void * __dest, int __ch, size_t __len)
{
  void * D.17946;
  long unsigned int D.17947;

  D.17947 = __builtin_object_size (__dest, 0);
  D.17946 = __builtin___memset_chk (__dest, __ch, __len, D.17947);
  return D.17946;
}


__attribute__((visibility ("hidden")))
sgen_free_internal_dynamic (void * addr, size_t size, int type)
{
  int D.17951;
  long unsigned int D.17952;

  if (addr == 0B) goto <D.17949>; else goto <D.17950>;
  <D.17949>:
  return;
  <D.17950>:
  D.17951 = 8184;
  D.17952 = (long unsigned int) D.17951;
  if (D.17952 < size) goto <D.17953>; else goto <D.17954>;
  <D.17953>:
  sgen_free_os_memory (addr, size, 0);
  goto <D.17955>;
  <D.17954>:
  mono_lock_free_free (addr);
  <D.17955>:
}


__attribute__((visibility ("hidden")))
sgen_alloc_internal (int type)
{
  unsigned int index.2;
  _Bool D.17958;
  long int D.17959;
  long int D.17960;
  struct MonoLockFreeAllocator * D.17963;
  long unsigned int D.17964;
  void * D.17965;
  int index;
  int size;
  void * p;

  index = fixed_type_allocator_indexes[type];
  size = allocator_sizes[index];
  index.2 = (unsigned int) index;
  D.17958 = index.2 > 29;
  D.17959 = (long int) D.17958;
  D.17960 = __builtin_expect (D.17959, 0);
  if (D.17960 != 0) goto <D.17961>; else goto <D.17962>;
  <D.17961>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 162, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17962>:
  D.17963 = &allocators[index];
  p = mono_lock_free_alloc (D.17963);
  D.17964 = (long unsigned int) size;
  memset (p, 0, D.17964);
  D.17965 = p;
  return D.17965;
}


__attribute__((visibility ("hidden")))
sgen_free_internal (void * addr, int type)
{
  unsigned int index.3;
  _Bool D.17970;
  long int D.17971;
  long int D.17972;
  int index;

  if (addr == 0B) goto <D.17967>; else goto <D.17968>;
  <D.17967>:
  return;
  <D.17968>:
  index = fixed_type_allocator_indexes[type];
  index.3 = (unsigned int) index;
  D.17970 = index.3 > 29;
  D.17971 = (long int) D.17970;
  D.17972 = __builtin_expect (D.17971, 0);
  if (D.17972 != 0) goto <D.17973>; else goto <D.17974>;
  <D.17973>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "sgen-internal.c", 180, "index >= 0 && index < NUM_ALLOCATORS");
  <D.17974>:
  mono_lock_free_free (addr);
  if (0 != 0) goto <D.17975>; else goto <D.17976>;
  <D.17975>:
  {
    int size;

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


__attribute__((visibility ("hidden")))
sgen_dump_internal_mem_usage (struct FILE * heap_dump_file)
{

}


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


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
printf (const char * restrict __fmt)
{
  int D.17978;

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


__attribute__((visibility ("hidden")))
sgen_init_internal_allocator ()
{
  struct MonoLockFreeAllocSizeClass * D.17980;
  int D.17981;
  unsigned int D.17982;
  struct MonoLockFreeAllocator * D.17983;
  unsigned int i.4;
  int i;

  i = 0;
  goto <D.17897>;
  <D.17896>:
  fixed_type_allocator_indexes[i] = -1;
  i = i + 1;
  <D.17897>:
  if (i <= 29) goto <D.17896>; else goto <D.17898>;
  <D.17898>:
  i = 0;
  goto <D.17900>;
  <D.17899>:
  D.17980 = &size_classes[i];
  D.17981 = allocator_sizes[i];
  D.17982 = (unsigned int) D.17981;
  mono_lock_free_allocator_init_size_class (D.17980, D.17982);
  D.17983 = &allocators[i];
  D.17980 = &size_classes[i];
  mono_lock_free_allocator_init_allocator (D.17983, D.17980);
  i = i + 1;
  <D.17900>:
  i.4 = (unsigned int) i;
  if (i.4 <= 29) goto <D.17899>; else goto <D.17901>;
  <D.17901>:
}


