GC_default_oom_fn (size_t bytes_requested)
{
  void * D.6355;

  D.6355 = 0B;
  return D.6355;
}


GC_project2 (void * arg1, void * arg2)
{
  void * D.6357;

  D.6357 = arg2;
  return D.6357;
}


GC_init_size_map ()
{
  int GC_all_interior_pointers.0;
  unsigned int GC_all_interior_pointers.1;
  unsigned int D.6361;
  unsigned int D.6362;
  unsigned int D.6363;
  unsigned int D.6364;
  unsigned int D.6365;
  unsigned int D.6366;
  unsigned int D.6367;
  unsigned int D.6368;
  unsigned int D.6369;
  unsigned int D.6370;
  register unsigned int i;

  i = 0;
  goto <D.5252>;
  <D.5251>:
  GC_arrays._size_map[i] = 2;
  i = i + 1;
  <D.5252>:
  if (i <= 3) goto <D.5251>; else goto <D.5253>;
  <D.5253>:
  GC_arrays._size_map[4] = 2;
  i = 5;
  goto <D.5255>;
  <D.5254>:
  GC_all_interior_pointers.0 = GC_all_interior_pointers;
  GC_all_interior_pointers.1 = (unsigned int) GC_all_interior_pointers.0;
  D.6361 = i + GC_all_interior_pointers.1;
  D.6362 = D.6361 + 7;
  D.6363 = D.6362 >> 2;
  D.6364 = D.6363 & 4294967294;
  GC_arrays._size_map[i] = D.6364;
  i = i + 1;
  <D.5255>:
  if (i <= 32) goto <D.5254>; else goto <D.5256>;
  <D.5256>:
  i = 33;
  goto <D.5258>;
  <D.5257>:
  GC_all_interior_pointers.0 = GC_all_interior_pointers;
  GC_all_interior_pointers.1 = (unsigned int) GC_all_interior_pointers.0;
  D.6361 = GC_all_interior_pointers.1 + i;
  D.6365 = D.6361 + 3;
  D.6366 = D.6365 >> 2;
  D.6367 = D.6366 + 1;
  D.6368 = D.6367 & 4294967294;
  GC_arrays._size_map[i] = D.6368;
  i = i + 1;
  <D.5258>:
  if (i <= 64) goto <D.5257>; else goto <D.5259>;
  <D.5259>:
  i = 65;
  goto <D.5261>;
  <D.5260>:
  GC_all_interior_pointers.0 = GC_all_interior_pointers;
  GC_all_interior_pointers.1 = (unsigned int) GC_all_interior_pointers.0;
  D.6361 = GC_all_interior_pointers.1 + i;
  D.6365 = D.6361 + 3;
  D.6366 = D.6365 >> 2;
  D.6369 = D.6366 + 3;
  D.6370 = D.6369 & 4294967292;
  GC_arrays._size_map[i] = D.6370;
  i = i + 1;
  <D.5261>:
  if (i <= 128) goto <D.5260>; else goto <D.5262>;
  <D.5262>:
}


GC_extend_size_map (word i)
{
  int GC_all_interior_pointers.2;
  long unsigned int GC_all_interior_pointers.3;
  long unsigned int D.6373;
  long unsigned int D.6374;
  long unsigned int D.6375;
  long unsigned int D.6376;
  unsigned int D.6377;
  unsigned int D.6380;
  long unsigned int D.6382;
  long unsigned int D.6383;
  long unsigned int D.6384;
  word orig_word_sz;
  word word_sz;
  register word byte_sz;
  word smaller_than_i;
  word much_smaller_than_i;
  register word low_limit;
  register word j;

  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  GC_all_interior_pointers.3 = (long unsigned int) GC_all_interior_pointers.2;
  D.6373 = GC_all_interior_pointers.3 + i;
  D.6374 = D.6373 + 3;
  orig_word_sz = D.6374 >> 2;
  word_sz = orig_word_sz;
  byte_sz = word_sz << 2;
  D.6375 = byte_sz >> 3;
  smaller_than_i = byte_sz - D.6375;
  D.6376 = byte_sz >> 2;
  much_smaller_than_i = byte_sz - D.6376;
  D.6377 = GC_arrays._size_map[smaller_than_i];
  if (D.6377 == 0) goto <D.6378>; else goto <D.6379>;
  <D.6378>:
  low_limit = much_smaller_than_i;
  goto <D.5274>;
  <D.5273>:
  low_limit = low_limit + 1;
  <D.5274>:
  D.6380 = GC_arrays._size_map[low_limit];
  if (D.6380 != 0) goto <D.5273>; else goto <D.5275>;
  <D.5275>:
  goto <D.6381>;
  <D.6379>:
  low_limit = smaller_than_i + 1;
  goto <D.5277>;
  <D.5276>:
  low_limit = low_limit + 1;
  <D.5277>:
  D.6380 = GC_arrays._size_map[low_limit];
  if (D.6380 != 0) goto <D.5276>; else goto <D.5278>;
  <D.5278>:
  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  GC_all_interior_pointers.3 = (long unsigned int) GC_all_interior_pointers.2;
  D.6382 = GC_all_interior_pointers.3 + low_limit;
  D.6383 = D.6382 + 3;
  word_sz = D.6383 >> 2;
  D.6384 = word_sz >> 3;
  word_sz = D.6384 + word_sz;
  if (word_sz < orig_word_sz) goto <D.6385>; else goto <D.6386>;
  <D.6385>:
  word_sz = orig_word_sz;
  <D.6386>:
  <D.6381>:
  word_sz = word_sz + 1;
  word_sz = word_sz & 4294967294;
  if (word_sz > 512) goto <D.6387>; else goto <D.6388>;
  <D.6387>:
  word_sz = 512;
  <D.6388>:
  {
    size_t number_of_objs;

    number_of_objs = 1024 / word_sz;
    word_sz = 1024 / number_of_objs;
    word_sz = word_sz & 4294967294;
  }
  byte_sz = word_sz << 2;
  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.2 != 0) goto <D.6389>; else goto <D.6390>;
  <D.6389>:
  GC_all_interior_pointers.2 = GC_all_interior_pointers;
  GC_all_interior_pointers.3 = (long unsigned int) GC_all_interior_pointers.2;
  byte_sz = byte_sz - GC_all_interior_pointers.3;
  <D.6390>:
  j = low_limit;
  goto <D.5281>;
  <D.5280>:
  GC_arrays._size_map[j] = word_sz;
  j = j + 1;
  <D.5281>:
  if (j <= byte_sz) goto <D.5280>; else goto <D.5282>;
  <D.5282>:
}


GC_clear_stack_inner (char * arg, word limit)
{
  long unsigned int dummy.4;
  char * D.6394;
  word dummy[213];

  try
    {
      memset (&dummy, 0, 852);
      dummy.4 = (long unsigned int) &dummy;
      if (dummy.4 > limit) goto <D.6392>; else goto <D.6393>;
      <D.6392>:
      GC_clear_stack_inner (arg, limit);
      <D.6393>:
      dummy.4 = (long unsigned int) &dummy;
      GC_noop1 (dummy.4);
      D.6394 = arg;
      return D.6394;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.6399;
  int D.6404;
  void * D.6406;
  unsigned int D.6407;

  D.6399 = __builtin_constant_p (__len);
  if (D.6399 != 0) goto <D.6400>; else goto <D.6401>;
  <D.6400>:
  if (__len == 0) goto <D.6402>; else goto <D.6403>;
  <D.6402>:
  D.6404 = __builtin_constant_p (__ch);
  if (D.6404 == 0) goto <D.6397>; else goto <D.6405>;
  <D.6405>:
  if (__ch != 0) goto <D.6397>; else goto <D.6398>;
  <D.6397>:
  __warn_memset_zero_len ();
  D.6406 = __dest;
  return D.6406;
  <D.6398>:
  <D.6403>:
  <D.6401>:
  D.6407 = __builtin_object_size (__dest, 0);
  D.6406 = __builtin___memset_chk (__dest, __ch, __len, D.6407);
  return D.6406;
}


GC_clear_stack (char * arg)
{
  char * D.6409;
  unsigned int random_no.5;
  unsigned int random_no.6;
  unsigned int D.6412;
  char * D.6415;
  register word sp;
  word dummy[256];
  static unsigned int random_no = 0;
  register word limit;

  try
    {
      D.6409 = GC_approx_sp ();
      sp = (word) D.6409;
      random_no.5 = random_no;
      random_no.6 = random_no.5 + 1;
      random_no = random_no.6;
      random_no.5 = random_no;
      D.6412 = random_no.5 % 13;
      if (D.6412 == 0) goto <D.6413>; else goto <D.6414>;
      <D.6413>:
      limit = sp;
      limit = limit + 4294959104;
      limit = limit & 4294967280;
      D.6415 = GC_clear_stack_inner (arg, limit);
      return D.6415;
      <D.6414>:
      memset (&dummy, 0, 1024);
      D.6415 = arg;
      return D.6415;
    }
  finally
    {
      dummy = {CLOBBER};
    }
}


GC_base (void * p)
{
  int GC_is_initialized.7;
  void * D.6421;
  long unsigned int D.6422;
  long unsigned int D.6423;
  long unsigned int D.6424;
  long unsigned int D.6425;
  long unsigned int candidate_hdr.8;
  long unsigned int D.6429;
  sizetype D.6430;
  long unsigned int h.9;
  long unsigned int D.6432;
  struct bottom_index * D.6433;
  long unsigned int D.6434;
  long unsigned int D.6435;
  map_entry_type * D.6436;
  map_entry_type * GC_invalid_map.10;
  int r.11;
  long unsigned int D.6441;
  sizetype offset.12;
  map_entry_type * D.6443;
  unsigned char D.6444;
  int D.6447;
  long int D.6448;
  long unsigned int D.6449;
  long int D.6450;
  long unsigned int D.6451;
  struct hblk * D.6452;
  long unsigned int D.6453;
  long unsigned int sz.13;
  long unsigned int p.14;
  register word r;
  register struct hblk * h;
  register struct bottom_index * bi;
  register struct hdr * candidate_hdr;
  register word limit;

  r = (word) p;
  GC_is_initialized.7 = GC_is_initialized;
  if (GC_is_initialized.7 == 0) goto <D.6419>; else goto <D.6420>;
  <D.6419>:
  D.6421 = 0B;
  return D.6421;
  <D.6420>:
  D.6422 = r & 4294963200;
  h = (struct hblk *) D.6422;
  D.6423 = r >> 22;
  bi = GC_arrays._top_index[D.6423];
  D.6424 = r >> 12;
  D.6425 = D.6424 & 1023;
  candidate_hdr = bi->index[D.6425];
  if (candidate_hdr == 0B) goto <D.6426>; else goto <D.6427>;
  <D.6426>:
  D.6421 = 0B;
  return D.6421;
  <D.6427>:
  goto <D.5308>;
  <D.5307>:
  candidate_hdr.8 = (long unsigned int) candidate_hdr;
  D.6429 = candidate_hdr.8 * 4096;
  D.6430 = -D.6429;
  h = h + D.6430;
  r = (word) h;
  h.9 = (long unsigned int) h;
  D.6432 = h.9 >> 22;
  D.6433 = GC_arrays._top_index[D.6432];
  h.9 = (long unsigned int) h;
  D.6434 = h.9 >> 12;
  D.6435 = D.6434 & 1023;
  candidate_hdr = D.6433->index[D.6435];
  <D.5308>:
  candidate_hdr.8 = (long unsigned int) candidate_hdr;
  if (candidate_hdr.8 <= 4095) goto <D.5307>; else goto <D.5309>;
  <D.5309>:
  D.6436 = candidate_hdr->hb_map;
  GC_invalid_map.10 = GC_invalid_map;
  if (D.6436 == GC_invalid_map.10) goto <D.6438>; else goto <D.6439>;
  <D.6438>:
  D.6421 = 0B;
  return D.6421;
  <D.6439>:
  r = r & 4294967292;
  {
    register int offset;
    register signed_word sz;
    register signed_word map_entry;

    r.11 = (int) r;
    offset = r.11 & 4095;
    D.6441 = candidate_hdr->hb_sz;
    sz = (signed_word) D.6441;
    D.6436 = candidate_hdr->hb_map;
    offset.12 = (sizetype) offset;
    D.6443 = D.6436 + offset.12;
    D.6444 = *D.6443;
    map_entry = (signed_word) D.6444;
    if (map_entry > 253) goto <D.6445>; else goto <D.6446>;
    <D.6445>:
    D.6447 = offset >> 2;
    map_entry = D.6447 % sz;
    <D.6446>:
    D.6448 = map_entry << 2;
    D.6449 = (long unsigned int) D.6448;
    r = r - D.6449;
    D.6450 = sz << 2;
    D.6451 = (long unsigned int) D.6450;
    limit = D.6451 + r;
    D.6452 = h + 4096;
    D.6453 = (long unsigned int) D.6452;
    if (D.6453 < limit) goto <D.6454>; else goto <D.6455>;
    <D.6454>:
    sz.13 = (long unsigned int) sz;
    if (sz.13 <= 1024) goto <D.6457>; else goto <D.6458>;
    <D.6457>:
    D.6421 = 0B;
    return D.6421;
    <D.6458>:
    <D.6455>:
    p.14 = (long unsigned int) p;
    if (p.14 >= limit) goto <D.6460>; else goto <D.6461>;
    <D.6460>:
    D.6421 = 0B;
    return D.6421;
    <D.6461>:
  }
  D.6421 = (void *) r;
  return D.6421;
}


GC_size (void * p)
{
  long unsigned int p.15;
  long unsigned int D.6464;
  struct bottom_index * D.6465;
  long unsigned int D.6466;
  long unsigned int D.6467;
  long unsigned int D.6468;
  long unsigned int D.6469;
  size_t D.6470;
  register int sz;
  register struct hdr * hhdr;

  p.15 = (long unsigned int) p;
  D.6464 = p.15 >> 22;
  D.6465 = GC_arrays._top_index[D.6464];
  p.15 = (long unsigned int) p;
  D.6466 = p.15 >> 12;
  D.6467 = D.6466 & 1023;
  hhdr = D.6465->index[D.6467];
  D.6468 = hhdr->hb_sz;
  D.6469 = D.6468 << 2;
  sz = (int) D.6469;
  D.6470 = (size_t) sz;
  return D.6470;
}


GC_get_heap_size ()
{
  size_t D.6472;

  D.6472 = GC_arrays._heapsize;
  return D.6472;
}


GC_get_free_bytes ()
{
  size_t D.6474;

  D.6474 = GC_arrays._large_free_bytes;
  return D.6474;
}


GC_get_bytes_since_gc ()
{
  size_t D.6476;
  long unsigned int D.6477;

  D.6477 = GC_arrays._words_allocd;
  D.6476 = D.6477 << 2;
  return D.6476;
}


GC_get_total_bytes ()
{
  size_t D.6479;
  long unsigned int D.6480;
  long unsigned int D.6481;
  long unsigned int D.6482;

  D.6480 = GC_arrays._words_allocd;
  D.6481 = GC_arrays._words_allocd_before_gc;
  D.6482 = D.6480 + D.6481;
  D.6479 = D.6482 << 2;
  return D.6479;
}


GC_get_suspend_signal ()
{
  int D.6484;

  D.6484 = 30;
  return D.6484;
}


GC_init ()
{
  int D.6486;

  D.6486 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6486 != 0) goto <D.6487>; else goto <D.6488>;
  <D.6487>:
  GC_lock ();
  <D.6488>:
  GC_init_inner ();
  pthread_mutex_unlock (&GC_allocate_ml);
  {
    extern void GC_init_parallel (void);

    GC_init_parallel ();
  }
}


GC_exit_check ()
{
  GC_gcollect ();
}


GC_init_inner ()
{
  int GC_is_initialized.16;
  char * D.6492;
  char * D.6495;
  char * D.6498;
  char * D.6501;
  char * D.6504;
  char * D.6507;
  char * D.6510;
  void (*<T800>) (char *, GC_word) GC_current_warn_proc.17;
  long unsigned int time_limit.18;
  int GC_all_interior_pointers.19;
  char * GC_stackbottom.20;
  char * GC_stackbottom.21;
  int D.6533;
  int D.6538;
  long unsigned int sz_str.22;
  long int D.6544;
  long unsigned int D.6545;
  long unsigned int sz_str.23;
  long unsigned int GC_max_retries.24;
  int D.6552;
  int D.6555;
  char * D.6558;
  int GC_dump_regularly.25;
  int GC_dont_precollect.26;
  int GC_incremental.27;
  word initial_heap_sz;

  initial_heap_sz = 16;
  GC_is_initialized.16 = GC_is_initialized;
  if (GC_is_initialized.16 != 0) goto <D.6490>; else goto <D.6491>;
  <D.6490>:
  return;
  <D.6491>:
  D.6492 = getenv ("GC_PRINT_STATS");
  if (D.6492 != 0B) goto <D.6493>; else goto <D.6494>;
  <D.6493>:
  GC_print_stats = 1;
  <D.6494>:
  D.6495 = getenv ("GC_DUMP_REGULARLY");
  if (D.6495 != 0B) goto <D.6496>; else goto <D.6497>;
  <D.6496>:
  GC_dump_regularly = 1;
  <D.6497>:
  D.6498 = getenv ("GC_FIND_LEAK");
  if (D.6498 != 0B) goto <D.6499>; else goto <D.6500>;
  <D.6499>:
  GC_find_leak = 1;
  atexit (GC_exit_check);
  <D.6500>:
  D.6501 = getenv ("GC_ALL_INTERIOR_POINTERS");
  if (D.6501 != 0B) goto <D.6502>; else goto <D.6503>;
  <D.6502>:
  GC_all_interior_pointers = 1;
  <D.6503>:
  D.6504 = getenv ("GC_DONT_GC");
  if (D.6504 != 0B) goto <D.6505>; else goto <D.6506>;
  <D.6505>:
  GC_dont_gc = 1;
  <D.6506>:
  D.6507 = getenv ("GC_PRINT_BACK_HEIGHT");
  if (D.6507 != 0B) goto <D.6508>; else goto <D.6509>;
  <D.6508>:
  GC_print_back_height = 1;
  <D.6509>:
  D.6510 = getenv ("GC_NO_BLACKLIST_WARNING");
  if (D.6510 != 0B) goto <D.6511>; else goto <D.6512>;
  <D.6511>:
  GC_large_alloc_warn_interval = 2147483647;
  <D.6512>:
  {
    char * time_limit_string;

    time_limit_string = getenv ("GC_PAUSE_TIME_TARGET");
    if (time_limit_string != 0B) goto <D.6513>; else goto <D.6514>;
    <D.6513>:
    {
      long int time_limit;

      time_limit = atol (time_limit_string);
      if (time_limit <= 4) goto <D.6515>; else goto <D.6516>;
      <D.6515>:
      GC_current_warn_proc.17 = GC_current_warn_proc;
      GC_current_warn_proc.17 ("GC Warning: GC_PAUSE_TIME_TARGET environment variable value too small or bad syntax: Ignoring\n", 0);
      goto <D.6518>;
      <D.6516>:
      time_limit.18 = (long unsigned int) time_limit;
      GC_time_limit = time_limit.18;
      <D.6518>:
    }
    <D.6514>:
  }
  {
    char * interval_string;

    interval_string = getenv ("GC_LARGE_ALLOC_WARN_INTERVAL");
    if (interval_string != 0B) goto <D.6520>; else goto <D.6521>;
    <D.6520>:
    {
      long int interval;

      interval = atol (interval_string);
      if (interval <= 0) goto <D.6522>; else goto <D.6523>;
      <D.6522>:
      GC_current_warn_proc.17 = GC_current_warn_proc;
      GC_current_warn_proc.17 ("GC Warning: GC_LARGE_ALLOC_WARN_INTERVAL environment variable has bad value: Ignoring\n", 0);
      goto <D.6524>;
      <D.6523>:
      GC_large_alloc_warn_interval = interval;
      <D.6524>:
    }
    <D.6521>:
  }
  maybe_install_looping_handler ();
  GC_all_interior_pointers.19 = GC_all_interior_pointers;
  if (GC_all_interior_pointers.19 != 0) goto <D.6526>; else goto <D.6527>;
  <D.6526>:
  GC_obj_kinds[1].ok_descriptor = 4294967292;
  <D.6527>:
  GC_setpagesize ();
  GC_exclude_static_roots (&GC_arrays, &MEM[(void *)&GC_arrays + 47736B]);
  GC_exclude_static_roots (&GC_obj_kinds, &MEM[(void *)&GC_obj_kinds + 320B]);
  GC_init_linux_data_start ();
  GC_thr_init ();
  GC_stackbottom.20 = GC_stackbottom;
  if (GC_stackbottom.20 == 0B) goto <D.6529>; else goto <D.6530>;
  <D.6529>:
  GC_stackbottom.21 = GC_get_stack_base ();
  GC_stackbottom = GC_stackbottom.21;
  goto <D.6532>;
  <D.6530>:
  <D.6532>:
  D.6533 = GC_register_main_static_data ();
  if (D.6533 != 0) goto <D.6534>; else goto <D.6535>;
  <D.6534>:
  GC_register_data_segments ();
  <D.6535>:
  GC_init_headers ();
  GC_bl_init ();
  GC_mark_init ();
  {
    char * sz_str;

    sz_str = getenv ("GC_INITIAL_HEAP_SIZE");
    if (sz_str != 0B) goto <D.6536>; else goto <D.6537>;
    <D.6536>:
    D.6538 = atoi (sz_str);
    initial_heap_sz = (word) D.6538;
    if (initial_heap_sz <= 65536) goto <D.6539>; else goto <D.6540>;
    <D.6539>:
    GC_current_warn_proc.17 = GC_current_warn_proc;
    sz_str.22 = (long unsigned int) sz_str;
    GC_current_warn_proc.17 ("GC Warning: Bad initial heap size %s - ignoring it.\n", sz_str.22);
    <D.6540>:
    initial_heap_sz = initial_heap_sz >> 12;
    <D.6537>:
  }
  {
    char * sz_str;

    sz_str = getenv ("GC_MAXIMUM_HEAP_SIZE");
    if (sz_str != 0B) goto <D.6542>; else goto <D.6543>;
    <D.6542>:
    {
      word max_heap_sz;

      D.6544 = atol (sz_str);
      max_heap_sz = (word) D.6544;
      D.6545 = initial_heap_sz * 4096;
      if (D.6545 > max_heap_sz) goto <D.6546>; else goto <D.6547>;
      <D.6546>:
      GC_current_warn_proc.17 = GC_current_warn_proc;
      sz_str.23 = (long unsigned int) sz_str;
      GC_current_warn_proc.17 ("GC Warning: Bad maximum heap size %s - ignoring it.\n", sz_str.23);
      <D.6547>:
      GC_max_retries.24 = GC_max_retries;
      if (GC_max_retries.24 == 0) goto <D.6550>; else goto <D.6551>;
      <D.6550>:
      GC_max_retries = 2;
      <D.6551>:
      GC_set_max_heap_size (max_heap_sz);
    }
    <D.6543>:
  }
  D.6552 = GC_expand_hp_inner (initial_heap_sz);
  if (D.6552 == 0) goto <D.6553>; else goto <D.6554>;
  <D.6553>:
  GC_err_puts ("Can\'t start up: not enough memory\n");
  exit (1);
  <D.6554>:
  D.6555 = GC_add_map_entry (0);
  if (D.6555 == 0) goto <D.6556>; else goto <D.6557>;
  <D.6556>:
  GC_err_puts ("Can\'t start up: not enough memory\n");
  exit (1);
  <D.6557>:
  GC_register_displacement_inner (0);
  GC_init_size_map ();
  D.6558 = getenv ("GC_ENABLE_INCREMENTAL");
  if (D.6558 != 0B) goto <D.6559>; else goto <D.6560>;
  <D.6559>:
  GC_setpagesize ();
  GC_dirty_init ();
  GC_incremental = 1;
  <D.6560>:
  GC_dump_regularly.25 = GC_dump_regularly;
  if (GC_dump_regularly.25 != 0) goto <D.6562>; else goto <D.6563>;
  <D.6562>:
  GC_dump ();
  <D.6563>:
  GC_dont_precollect.26 = GC_dont_precollect;
  if (GC_dont_precollect.26 == 0) goto <D.6564>; else goto <D.6567>;
  <D.6567>:
  GC_incremental.27 = GC_incremental;
  if (GC_incremental.27 != 0) goto <D.6564>; else goto <D.6565>;
  <D.6564>:
  GC_try_to_collect_inner (GC_never_stop_func);
  <D.6565>:
  GC_is_initialized = 1;
}


maybe_install_looping_handler ()
{
  int installed_looping_handler.28;
  char * D.6573;

  installed_looping_handler.28 = installed_looping_handler;
  if (installed_looping_handler.28 == 0) goto <D.6571>; else goto <D.6572>;
  <D.6571>:
  D.6573 = getenv ("GC_LOOP_ON_ABORT");
  if (D.6573 != 0B) goto <D.6574>; else goto <D.6575>;
  <D.6574>:
  GC_set_and_save_fault_handler (looping_handler);
  installed_looping_handler = 1;
  <D.6575>:
  <D.6572>:
}


looping_handler (int sig)
{
  GC_err_printf ("Caught signal %d: looping in handler\n", sig, 0, 0, 0, 0, 0);
  <D.5346>:
  goto <D.5346>;
}


atoi (const char * __nptr)
{
  int D.6576;

  D.6576 = strtol (__nptr, 0B, 10);
  return D.6576;
}


atol (const char * __nptr)
{
  long int D.6578;

  D.6578 = strtol (__nptr, 0B, 10);
  return D.6578;
}


GC_enable_incremental ()
{
  int GC_find_leak.29;
  int D.6583;
  int GC_incremental.30;
  int GC_is_initialized.31;
  int GC_dont_gc.32;
  long unsigned int D.6596;
  void out = <<< error >>>;

  GC_find_leak.29 = GC_find_leak;
  if (GC_find_leak.29 == 0) goto <D.6581>; else goto <D.6582>;
  <D.6581>:
  D.6583 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6583 != 0) goto <D.6584>; else goto <D.6585>;
  <D.6584>:
  GC_lock ();
  <D.6585>:
  GC_incremental.30 = GC_incremental;
  if (GC_incremental.30 != 0) goto out; else goto <D.6587>;
  <D.6587>:
  GC_setpagesize ();
  if (0 != 0) goto out; else goto <D.6588>;
  <D.6588>:
  maybe_install_looping_handler ();
  GC_dirty_init ();
  GC_is_initialized.31 = GC_is_initialized;
  if (GC_is_initialized.31 == 0) goto <D.6590>; else goto <D.6591>;
  <D.6590>:
  GC_init_inner ();
  <D.6591>:
  GC_incremental.30 = GC_incremental;
  if (GC_incremental.30 != 0) goto out; else goto <D.6592>;
  <D.6592>:
  GC_dont_gc.32 = GC_dont_gc;
  if (GC_dont_gc.32 != 0) goto <D.6594>; else goto <D.6595>;
  <D.6594>:
  pthread_mutex_unlock (&GC_allocate_ml);
  return;
  <D.6595>:
  D.6596 = GC_arrays._words_allocd;
  if (D.6596 != 0) goto <D.6597>; else goto <D.6598>;
  <D.6597>:
  GC_try_to_collect_inner (GC_never_stop_func);
  <D.6598>:
  GC_read_dirty ();
  GC_incremental = 1;
  out:
  pthread_mutex_unlock (&GC_allocate_ml);
  <D.6582>:
}


GC_write (int fd, const char * buf, size_t len)
{
  unsigned int bytes_written.33;
  unsigned int D.6601;
  sizetype bytes_written.34;
  const void * D.6603;
  int D.6606;
  register int bytes_written;
  register int result;

  bytes_written = 0;
  goto <D.6274>;
  <D.6273>:
  bytes_written.33 = (unsigned int) bytes_written;
  D.6601 = len - bytes_written.33;
  bytes_written.34 = (sizetype) bytes_written;
  D.6603 = buf + bytes_written.34;
  result = write (fd, D.6603, D.6601);
  if (result == -1) goto <D.6604>; else goto <D.6605>;
  <D.6604>:
  D.6606 = result;
  return D.6606;
  <D.6605>:
  bytes_written = bytes_written + result;
  <D.6274>:
  bytes_written.33 = (unsigned int) bytes_written;
  if (bytes_written.33 < len) goto <D.6273>; else goto <D.6275>;
  <D.6275>:
  D.6606 = bytes_written;
  return D.6606;
}


GC_printf (const char * format, long int a, long int b, long int c, long int d, long int e, long int f)
{
  int GC_quiet.35;
  char D.6611;
  unsigned int D.6614;
  int GC_stdout.36;
  int D.6616;
  char buf[1025];

  try
    {
      GC_quiet.35 = GC_quiet;
      if (GC_quiet.35 != 0) goto <D.6609>; else goto <D.6610>;
      <D.6609>:
      return;
      <D.6610>:
      buf[1024] = 21;
      sprintf (&buf, format, a, b, c, d, e, f);
      D.6611 = buf[1024];
      if (D.6611 != 21) goto <D.6612>; else goto <D.6613>;
      <D.6612>:
      GC_abort ("GC_printf clobbered stack");
      <D.6613>:
      D.6614 = strlen (&buf);
      GC_stdout.36 = GC_stdout;
      D.6616 = GC_write (GC_stdout.36, &buf, D.6614);
      if (D.6616 < 0) goto <D.6617>; else goto <D.6618>;
      <D.6617>:
      GC_abort ("write to stdout failed");
      <D.6618>:
    }
  finally
    {
      buf = {CLOBBER};
    }
}


sprintf (char * restrict __s, const char * restrict __fmt)
{
  int D.6622;
  unsigned int D.6623;

  D.6623 = __builtin_object_size (__s, 1);
  D.6622 = __builtin___sprintf_chk (__s, 1, D.6623, __fmt, __builtin_va_arg_pack ());
  return D.6622;
}


GC_err_printf (const char * format, long int a, long int b, long int c, long int d, long int e, long int f)
{
  char D.6625;
  unsigned int D.6628;
  int GC_stderr.37;
  int D.6630;
  char buf[1025];

  try
    {
      buf[1024] = 21;
      sprintf (&buf, format, a, b, c, d, e, f);
      D.6625 = buf[1024];
      if (D.6625 != 21) goto <D.6626>; else goto <D.6627>;
      <D.6626>:
      GC_abort ("GC_err_printf clobbered stack");
      <D.6627>:
      D.6628 = strlen (&buf);
      GC_stderr.37 = GC_stderr;
      D.6630 = GC_write (GC_stderr.37, &buf, D.6628);
      if (D.6630 < 0) goto <D.6631>; else goto <D.6632>;
      <D.6631>:
      GC_abort ("write to stderr failed");
      <D.6632>:
    }
  finally
    {
      buf = {CLOBBER};
    }
}


GC_err_puts (const char * s)
{
  unsigned int D.6633;
  int GC_stderr.38;
  int D.6635;

  D.6633 = strlen (s);
  GC_stderr.38 = GC_stderr;
  D.6635 = GC_write (GC_stderr.38, s, D.6633);
  if (D.6635 < 0) goto <D.6636>; else goto <D.6637>;
  <D.6636>:
  GC_abort ("write to stderr failed");
  <D.6637>:
}


GC_err_write (const char * buf, size_t len)
{
  int GC_stderr.39;
  int D.6639;

  GC_stderr.39 = GC_stderr;
  D.6639 = GC_write (GC_stderr.39, buf, len);
  if (D.6639 < 0) goto <D.6640>; else goto <D.6641>;
  <D.6640>:
  GC_abort ("write to stderr failed");
  <D.6641>:
}


GC_default_warn_proc (char * msg, GC_word arg)
{
  long int arg.40;

  arg.40 = (long int) arg;
  GC_err_printf (msg, arg.40, 0, 0, 0, 0, 0);
}


GC_set_warn_proc (void (*GC_warn_proc) (char *, GC_word) p)
{
  int D.6643;
  void (*GC_warn_proc) (char *, GC_word) D.6646;
  void (*GC_warn_proc) (char *, GC_word) result;

  D.6643 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6643 != 0) goto <D.6644>; else goto <D.6645>;
  <D.6644>:
  GC_lock ();
  <D.6645>:
  result = GC_current_warn_proc;
  GC_current_warn_proc = p;
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6646 = result;
  return D.6646;
}


GC_set_free_space_divisor (GC_word value)
{
  GC_word D.6648;
  GC_word old;

  old = GC_free_space_divisor;
  GC_free_space_divisor = value;
  D.6648 = old;
  return D.6648;
}


GC_abort (const char * msg)
{
  long int msg.41;
  char * D.6651;

  msg.41 = (long int) msg;
  GC_err_printf ("%s\n", msg.41, 0, 0, 0, 0, 0);
  D.6651 = getenv ("GC_LOOP_ON_ABORT");
  if (D.6651 != 0B) goto <D.6652>; else goto <D.6653>;
  <D.6652>:
  <D.6319>:
  goto <D.6319>;
  <D.6653>:
  abort ();
}


GC_enable ()
{
  int D.6654;
  int GC_dont_gc.42;
  int GC_dont_gc.43;

  D.6654 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6654 != 0) goto <D.6655>; else goto <D.6656>;
  <D.6655>:
  GC_lock ();
  <D.6656>:
  GC_dont_gc.42 = GC_dont_gc;
  GC_dont_gc.43 = GC_dont_gc.42 + -1;
  GC_dont_gc = GC_dont_gc.43;
  pthread_mutex_unlock (&GC_allocate_ml);
}


GC_disable ()
{
  int D.6659;
  int GC_dont_gc.44;
  int GC_dont_gc.45;

  D.6659 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6659 != 0) goto <D.6660>; else goto <D.6661>;
  <D.6660>:
  GC_lock ();
  <D.6661>:
  GC_dont_gc.44 = GC_dont_gc;
  GC_dont_gc.45 = GC_dont_gc.44 + 1;
  GC_dont_gc = GC_dont_gc.45;
  pthread_mutex_unlock (&GC_allocate_ml);
}


GC_new_free_list_inner ()
{
  void * * D.6666;
  void * result;

  result = GC_generic_malloc_inner (2052, 0);
  if (result == 0B) goto <D.6664>; else goto <D.6665>;
  <D.6664>:
  GC_abort ("Failed to allocate freelist for new kind");
  <D.6665>:
  memset (result, 0, 2052);
  D.6666 = result;
  return D.6666;
}


GC_new_free_list ()
{
  int D.6668;
  void * * D.6671;
  void * result;

  D.6668 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6668 != 0) goto <D.6669>; else goto <D.6670>;
  <D.6669>:
  GC_lock ();
  <D.6670>:
  result = GC_new_free_list_inner ();
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6671 = result;
  return D.6671;
}


GC_new_kind_inner (void * * fl, GC_word descr, int adjust, int clear)
{
  int GC_n_kinds.46;
  int GC_n_kinds.47;
  int GC_n_kinds.48;
  int D.6678;
  int result;

  GC_n_kinds.46 = GC_n_kinds;
  GC_n_kinds.47 = GC_n_kinds.46;
  GC_n_kinds.48 = GC_n_kinds.47 + 1;
  GC_n_kinds = GC_n_kinds.48;
  result = GC_n_kinds.47;
  GC_n_kinds.46 = GC_n_kinds;
  if (GC_n_kinds.46 > 16) goto <D.6676>; else goto <D.6677>;
  <D.6676>:
  GC_abort ("Too many kinds");
  <D.6677>:
  GC_obj_kinds[result].ok_freelist = fl;
  GC_obj_kinds[result].ok_reclaim_list = 0B;
  GC_obj_kinds[result].ok_descriptor = descr;
  GC_obj_kinds[result].ok_relocate_descr = adjust;
  GC_obj_kinds[result].ok_init = clear;
  D.6678 = result;
  return D.6678;
}


GC_new_kind (void * * fl, GC_word descr, int adjust, int clear)
{
  int D.6680;
  int D.6683;
  int result;

  D.6680 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6680 != 0) goto <D.6681>; else goto <D.6682>;
  <D.6681>:
  GC_lock ();
  <D.6682>:
  result = GC_new_kind_inner (fl, descr, adjust, clear);
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6683 = result;
  return D.6683;
}


GC_new_proc_inner (struct GC_ms_entry * (*GC_mark_proc) (GC_word *, struct GC_ms_entry *, struct GC_ms_entry *, GC_word) proc)
{
  long unsigned int GC_n_mark_procs.49;
  long unsigned int GC_n_mark_procs.50;
  long unsigned int GC_n_mark_procs.51;
  int D.6690;
  int result;

  GC_n_mark_procs.49 = GC_n_mark_procs;
  GC_n_mark_procs.50 = GC_n_mark_procs.49;
  GC_n_mark_procs.51 = GC_n_mark_procs.50 + 1;
  GC_n_mark_procs = GC_n_mark_procs.51;
  result = (int) GC_n_mark_procs.50;
  GC_n_mark_procs.49 = GC_n_mark_procs;
  if (GC_n_mark_procs.49 > 64) goto <D.6688>; else goto <D.6689>;
  <D.6688>:
  GC_abort ("Too many mark procedures");
  <D.6689>:
  GC_arrays._mark_procs[result] = proc;
  D.6690 = result;
  return D.6690;
}


GC_new_proc (struct GC_ms_entry * (*GC_mark_proc) (GC_word *, struct GC_ms_entry *, struct GC_ms_entry *, GC_word) proc)
{
  int D.6692;
  int D.6695;
  int result;

  D.6692 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.6692 != 0) goto <D.6693>; else goto <D.6694>;
  <D.6693>:
  GC_lock ();
  <D.6694>:
  result = GC_new_proc_inner (proc);
  pthread_mutex_unlock (&GC_allocate_ml);
  D.6695 = result;
  return D.6695;
}


GC_dump ()
{
  GC_printf ("***Static roots:\n", 0, 0, 0, 0, 0, 0);
  GC_print_static_roots ();
  GC_printf ("\n***Heap sections:\n", 0, 0, 0, 0, 0, 0);
  GC_print_heap_sects ();
  GC_printf ("\n***Free blocks:\n", 0, 0, 0, 0, 0, 0);
  GC_print_hblkfreelist ();
  GC_printf ("\n***Blocks in use:\n", 0, 0, 0, 0, 0, 0);
  GC_print_block_list ();
  GC_printf ("\n***Finalization statistics:\n", 0, 0, 0, 0, 0, 0);
  GC_print_finalization_stats ();
}


