GC_has_other_debug_info (char * p)
{
  long unsigned int ohdr.0;
  long unsigned int body.1;
  long unsigned int D.4721;
  long unsigned int D.4722;
  GC_bool D.4724;
  long unsigned int D.4725;
  long unsigned int D.4728;
  long unsigned int D.4729;
  long unsigned int D.4732;
  sizetype D.4733;
  sizetype D.4734;
  word * D.4735;
  long unsigned int D.4736;
  long unsigned int D.4737;
  register struct oh * ohdr;
  register char * body;
  register word sz;

  ohdr = p;
  body = ohdr + 16;
  sz = GC_size (ohdr);
  ohdr.0 = (long unsigned int) ohdr;
  body.1 = (long unsigned int) body;
  D.4721 = ohdr.0 ^ body.1;
  D.4722 = D.4721 & 4294963200;
  if (D.4722 != 0) goto <D.4717>; else goto <D.4723>;
  <D.4723>:
  if (sz <= 19) goto <D.4717>; else goto <D.4718>;
  <D.4717>:
  D.4724 = 0;
  return D.4724;
  <D.4718>:
  D.4725 = ohdr->oh_sz;
  if (D.4725 == sz) goto <D.4726>; else goto <D.4727>;
  <D.4726>:
  D.4724 = 0;
  return D.4724;
  <D.4727>:
  D.4728 = ohdr->oh_sf;
  body.1 = (long unsigned int) body;
  D.4729 = body.1 ^ 4275891659;
  if (D.4728 == D.4729) goto <D.4730>; else goto <D.4731>;
  <D.4730>:
  D.4724 = 1;
  return D.4724;
  <D.4731>:
  D.4732 = sz >> 2;
  D.4733 = D.4732 + 1073741823;
  D.4734 = D.4733 * 4;
  D.4735 = ohdr + D.4734;
  D.4736 = *D.4735;
  body.1 = (long unsigned int) body;
  D.4737 = body.1 ^ 3168718319;
  if (D.4736 == D.4737) goto <D.4738>; else goto <D.4739>;
  <D.4738>:
  D.4724 = 1;
  return D.4724;
  <D.4739>:
  D.4724 = 0;
  return D.4724;
}


GC_store_debug_info (char * p, word sz, const char * string, word integer)
{
  int D.4741;
  long unsigned int result.2;
  long unsigned int D.4745;
  unsigned int D.4746;
  unsigned int D.4747;
  sizetype D.4748;
  sizetype D.4749;
  word * D.4750;
  long unsigned int D.4751;
  long unsigned int D.4752;
  long unsigned int D.4753;
  word * D.4754;
  long unsigned int D.4755;
  long unsigned int D.4756;
  char * D.4757;
  register word * result;

  result = p + 16;
  D.4741 = pthread_mutex_trylock (&GC_allocate_ml);
  if (D.4741 != 0) goto <D.4742>; else goto <D.4743>;
  <D.4742>:
  GC_lock ();
  <D.4743>:
  MEM[(struct oh *)p].oh_string = string;
  MEM[(struct oh *)p].oh_int = integer;
  MEM[(struct oh *)p].oh_sz = sz;
  result.2 = (long unsigned int) result;
  D.4745 = result.2 ^ 4275891659;
  MEM[(struct oh *)p].oh_sf = D.4745;
  D.4746 = GC_size (p);
  D.4747 = D.4746 >> 2;
  D.4748 = D.4747 + 1073741823;
  D.4749 = D.4748 * 4;
  D.4750 = p + D.4749;
  D.4751 = sz + 3;
  D.4752 = D.4751 >> 2;
  D.4753 = D.4752 * 4;
  D.4754 = result + D.4753;
  result.2 = (long unsigned int) result;
  D.4755 = result.2 ^ 3168718319;
  *D.4754 = D.4755;
  D.4756 = *D.4754;
  *D.4750 = D.4756;
  pthread_mutex_unlock (&GC_allocate_ml);
  D.4757 = result;
  return D.4757;
}


GC_check_annotated_obj (struct oh * ohdr)
{
  long unsigned int D.4759;
  int GC_all_interior_pointers.3;
  long unsigned int GC_all_interior_pointers.4;
  long unsigned int D.4762;
  long unsigned int D.4763;
  char * D.4766;
  long unsigned int D.4767;
  long unsigned int body.5;
  long unsigned int D.4769;
  long unsigned int D.4772;
  sizetype D.4773;
  sizetype D.4774;
  word * D.4775;
  long unsigned int D.4776;
  long unsigned int D.4777;
  long unsigned int D.4780;
  long unsigned int D.4781;
  long unsigned int D.4782;
  word * D.4783;
  long unsigned int D.4784;
  register char * body;
  register word gc_sz;

  body = ohdr + 16;
  gc_sz = GC_size (ohdr);
  D.4759 = ohdr->oh_sz;
  GC_all_interior_pointers.3 = GC_all_interior_pointers;
  GC_all_interior_pointers.4 = (long unsigned int) GC_all_interior_pointers.3;
  D.4762 = D.4759 - GC_all_interior_pointers.4;
  D.4763 = D.4762 + 20;
  if (D.4763 > gc_sz) goto <D.4764>; else goto <D.4765>;
  <D.4764>:
  D.4766 = &ohdr->oh_sz;
  return D.4766;
  <D.4765>:
  D.4767 = ohdr->oh_sf;
  body.5 = (long unsigned int) body;
  D.4769 = body.5 ^ 4275891659;
  if (D.4767 != D.4769) goto <D.4770>; else goto <D.4771>;
  <D.4770>:
  D.4766 = &ohdr->oh_sf;
  return D.4766;
  <D.4771>:
  D.4772 = gc_sz >> 2;
  D.4773 = D.4772 + 1073741823;
  D.4774 = D.4773 * 4;
  D.4775 = ohdr + D.4774;
  D.4776 = *D.4775;
  body.5 = (long unsigned int) body;
  D.4777 = body.5 ^ 3168718319;
  if (D.4776 != D.4777) goto <D.4778>; else goto <D.4779>;
  <D.4778>:
  D.4772 = gc_sz >> 2;
  D.4773 = D.4772 + 1073741823;
  D.4774 = D.4773 * 4;
  D.4766 = ohdr + D.4774;
  return D.4766;
  <D.4779>:
  D.4759 = ohdr->oh_sz;
  D.4780 = D.4759 + 3;
  D.4781 = D.4780 >> 2;
  D.4782 = D.4781 * 4;
  D.4783 = body + D.4782;
  D.4784 = *D.4783;
  body.5 = (long unsigned int) body;
  D.4777 = body.5 ^ 3168718319;
  if (D.4784 != D.4777) goto <D.4785>; else goto <D.4786>;
  <D.4785>:
  D.4759 = ohdr->oh_sz;
  D.4780 = D.4759 + 3;
  D.4781 = D.4780 >> 2;
  D.4782 = D.4781 * 4;
  D.4766 = body + D.4782;
  return D.4766;
  <D.4786>:
  D.4766 = 0B;
  return D.4766;
}


GC_register_describe_type_fn (int kind, void (*GC_describe_type_fn) (void *, char *) fn)
{
  GC_describe_type_fns[kind] = fn;
}


GC_print_type (char * p)
{
  unsigned char D.4788;
  void (*<T788>) (void *, char *) D.4790;
  void * D.4792;
  int D.4793;
  long unsigned int D.4795;
  long int D.4796;
  struct hdr * hhdr;
  char buffer[41];
  int kind;

  try
    {
      hhdr = GC_find_header (p);
      D.4788 = hhdr->hb_obj_kind;
      kind = (int) D.4788;
      D.4790 = GC_describe_type_fns[kind];
      if (D.4790 != 0B) goto <D.4791>; else goto <D.4789>;
      <D.4791>:
      D.4792 = GC_base (p);
      D.4793 = GC_is_marked (D.4792);
      if (D.4793 != 0) goto <D.4794>; else goto <D.4789>;
      <D.4794>:
      buffer[40] = 0;
      D.4790 = GC_describe_type_fns[kind];
      D.4790 (p, &buffer);
      GC_err_puts (&buffer);
      goto <D.4521>;
      <D.4789>:
      switch (kind) <default: <D.4526>, case 0: <D.4520>, case 1: <D.4522>, case 2: <D.4523>, case 3: <D.4524>, case 4: <D.4525>>
      <D.4520>:
      GC_err_puts ("PTRFREE");
      goto <D.4521>;
      <D.4522>:
      GC_err_puts ("NORMAL");
      goto <D.4521>;
      <D.4523>:
      GC_err_puts ("UNCOLLECTABLE");
      goto <D.4521>;
      <D.4524>:
      GC_err_puts ("ATOMIC UNCOLLECTABLE");
      goto <D.4521>;
      <D.4525>:
      GC_err_puts ("STUBBORN");
      goto <D.4521>;
      <D.4526>:
      D.4795 = hhdr->hb_descr;
      D.4796 = (long int) D.4795;
      GC_err_printf ("kind %ld, descr 0x%lx", kind, D.4796, 0, 0, 0, 0);
      <D.4521>:
    }
  finally
    {
      buffer = {CLOBBER};
    }
}


GC_print_obj (char * p)
{
  long unsigned int ohdr.6;
  long unsigned int D.4798;
  long int D.4799;
  const char * D.4800;
  long unsigned int D.4801;
  long int D.4802;
  long unsigned int D.4803;
  long int D.4804;
  char * D.4805;
  register struct oh * ohdr;

  ohdr = GC_base (p);
  ohdr.6 = (long unsigned int) ohdr;
  D.4798 = ohdr.6 + 16;
  D.4799 = (long int) D.4798;
  GC_err_printf ("0x%lx (", D.4799, 0, 0, 0, 0, 0);
  D.4800 = ohdr->oh_string;
  GC_err_puts (D.4800);
  D.4801 = ohdr->oh_sz;
  D.4802 = (long int) D.4801;
  D.4803 = ohdr->oh_int;
  D.4804 = (long int) D.4803;
  GC_err_printf (":%ld, sz=%ld, ", D.4804, D.4802, 0, 0, 0, 0);
  D.4805 = ohdr + 16;
  GC_print_type (D.4805);
  GC_err_puts (")\n");
}


GC_debug_print_heap_obj_proc (char * p)
{
  int D.4806;

  D.4806 = GC_has_other_debug_info (p);
  if (D.4806 != 0) goto <D.4807>; else goto <D.4808>;
  <D.4807>:
  GC_print_obj (p);
  goto <D.4809>;
  <D.4808>:
  GC_default_print_heap_obj_proc (p);
  <D.4809>:
}


GC_print_smashed_obj (char * p, char * clobbered_addr)
{
  long int p.7;
  long int clobbered_addr.8;
  word * D.4815;
  const char * D.4817;
  unsigned int D.4818;
  int GC_all_interior_pointers.9;
  unsigned int GC_all_interior_pointers.10;
  unsigned int D.4821;
  unsigned int D.4822;
  long int D.4823;
  char D.4824;
  long unsigned int D.4828;
  long int D.4829;
  long unsigned int D.4830;
  long int D.4831;
  register struct oh * ohdr;

  ohdr = GC_base (p);
  p.7 = (long int) p;
  clobbered_addr.8 = (long int) clobbered_addr;
  GC_err_printf ("0x%lx in object at 0x%lx(", clobbered_addr.8, p.7, 0, 0, 0, 0);
  D.4815 = &ohdr->oh_sz;
  if (D.4815 >= clobbered_addr) goto <D.4812>; else goto <D.4816>;
  <D.4816>:
  D.4817 = ohdr->oh_string;
  if (D.4817 == 0B) goto <D.4812>; else goto <D.4813>;
  <D.4812>:
  D.4818 = GC_size (ohdr);
  GC_all_interior_pointers.9 = GC_all_interior_pointers;
  GC_all_interior_pointers.10 = (unsigned int) GC_all_interior_pointers.9;
  D.4821 = D.4818 + GC_all_interior_pointers.10;
  D.4822 = D.4821 + 4294967276;
  D.4823 = (long int) D.4822;
  GC_err_printf ("<smashed>, appr. sz = %ld)\n", D.4823, 0, 0, 0, 0, 0);
  goto <D.4814>;
  <D.4813>:
  D.4817 = ohdr->oh_string;
  D.4824 = *D.4817;
  if (D.4824 == 0) goto <D.4825>; else goto <D.4826>;
  <D.4825>:
  GC_err_puts ("EMPTY(smashed?)");
  goto <D.4827>;
  <D.4826>:
  D.4817 = ohdr->oh_string;
  GC_err_puts (D.4817);
  <D.4827>:
  D.4828 = ohdr->oh_sz;
  D.4829 = (long int) D.4828;
  D.4830 = ohdr->oh_int;
  D.4831 = (long int) D.4830;
  GC_err_printf (":%ld, sz=%ld)\n", D.4831, D.4829, 0, 0, 0, 0);
  <D.4814>:
}


GC_do_nothing ()
{

}


GC_start_debugging ()
{
  GC_check_heap = GC_check_heap_proc;
  GC_print_all_smashed = GC_print_all_smashed_proc;
  GC_print_heap_obj = GC_debug_print_heap_obj_proc;
  GC_debugging_started = 1;
  GC_register_displacement (16);
}


GC_debug_register_displacement (GC_word offset)
{
  long unsigned int D.4832;

  GC_register_displacement (offset);
  D.4832 = offset + 16;
  GC_register_displacement (D.4832);
}


GC_debug_malloc (size_t lb, const char * s, int i)
{
  int GC_all_interior_pointers.11;
  unsigned int GC_all_interior_pointers.12;
  unsigned int D.4835;
  unsigned int D.4836;
  long int lb.13;
  void * D.4840;
  int GC_debugging_started.14;
  long unsigned int i.15;
  void * result;

  GC_all_interior_pointers.11 = GC_all_interior_pointers;
  GC_all_interior_pointers.12 = (unsigned int) GC_all_interior_pointers.11;
  D.4835 = lb - GC_all_interior_pointers.12;
  D.4836 = D.4835 + 20;
  result = GC_malloc (D.4836);
  if (result == 0B) goto <D.4837>; else goto <D.4838>;
  <D.4837>:
  lb.13 = (long int) lb;
  GC_err_printf ("GC_debug_malloc(%ld) returning NIL (", lb.13, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4840 = 0B;
  return D.4840;
  <D.4838>:
  GC_debugging_started.14 = GC_debugging_started;
  if (GC_debugging_started.14 == 0) goto <D.4842>; else goto <D.4843>;
  <D.4842>:
  GC_start_debugging ();
  <D.4843>:
  i.15 = (long unsigned int) i;
  D.4840 = GC_store_debug_info (result, lb, s, i.15);
  return D.4840;
}


GC_debug_malloc_ignore_off_page (size_t lb, const char * s, int i)
{
  int GC_all_interior_pointers.16;
  unsigned int GC_all_interior_pointers.17;
  unsigned int D.4848;
  unsigned int D.4849;
  long int lb.18;
  void * D.4853;
  int GC_debugging_started.19;
  long unsigned int i.20;
  void * result;

  GC_all_interior_pointers.16 = GC_all_interior_pointers;
  GC_all_interior_pointers.17 = (unsigned int) GC_all_interior_pointers.16;
  D.4848 = lb - GC_all_interior_pointers.17;
  D.4849 = D.4848 + 20;
  result = GC_malloc_ignore_off_page (D.4849);
  if (result == 0B) goto <D.4850>; else goto <D.4851>;
  <D.4850>:
  lb.18 = (long int) lb;
  GC_err_printf ("GC_debug_malloc_ignore_off_page(%ld) returning NIL (", lb.18, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4853 = 0B;
  return D.4853;
  <D.4851>:
  GC_debugging_started.19 = GC_debugging_started;
  if (GC_debugging_started.19 == 0) goto <D.4855>; else goto <D.4856>;
  <D.4855>:
  GC_start_debugging ();
  <D.4856>:
  i.20 = (long unsigned int) i;
  D.4853 = GC_store_debug_info (result, lb, s, i.20);
  return D.4853;
}


GC_debug_malloc_atomic_ignore_off_page (size_t lb, const char * s, int i)
{
  int GC_all_interior_pointers.21;
  unsigned int GC_all_interior_pointers.22;
  unsigned int D.4861;
  unsigned int D.4862;
  long int lb.23;
  void * D.4866;
  int GC_debugging_started.24;
  long unsigned int i.25;
  void * result;

  GC_all_interior_pointers.21 = GC_all_interior_pointers;
  GC_all_interior_pointers.22 = (unsigned int) GC_all_interior_pointers.21;
  D.4861 = lb - GC_all_interior_pointers.22;
  D.4862 = D.4861 + 20;
  result = GC_malloc_atomic_ignore_off_page (D.4862);
  if (result == 0B) goto <D.4863>; else goto <D.4864>;
  <D.4863>:
  lb.23 = (long int) lb;
  GC_err_printf ("GC_debug_malloc_atomic_ignore_off_page(%ld) returning NIL (", lb.23, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4866 = 0B;
  return D.4866;
  <D.4864>:
  GC_debugging_started.24 = GC_debugging_started;
  if (GC_debugging_started.24 == 0) goto <D.4868>; else goto <D.4869>;
  <D.4868>:
  GC_start_debugging ();
  <D.4869>:
  i.25 = (long unsigned int) i;
  D.4866 = GC_store_debug_info (result, lb, s, i.25);
  return D.4866;
}


GC_debug_malloc_stubborn (size_t lb, const char * s, int i)
{
  void * D.4872;

  D.4872 = GC_debug_malloc (lb, s, i);
  return D.4872;
}


GC_debug_change_stubborn (void * p)
{

}


GC_debug_end_stubborn_change (void * p)
{

}


GC_debug_malloc_atomic (size_t lb, const char * s, int i)
{
  int GC_all_interior_pointers.26;
  unsigned int GC_all_interior_pointers.27;
  unsigned int D.4876;
  unsigned int D.4877;
  long int lb.28;
  void * D.4881;
  int GC_debugging_started.29;
  long unsigned int i.30;
  void * result;

  GC_all_interior_pointers.26 = GC_all_interior_pointers;
  GC_all_interior_pointers.27 = (unsigned int) GC_all_interior_pointers.26;
  D.4876 = lb - GC_all_interior_pointers.27;
  D.4877 = D.4876 + 20;
  result = GC_malloc_atomic (D.4877);
  if (result == 0B) goto <D.4878>; else goto <D.4879>;
  <D.4878>:
  lb.28 = (long int) lb;
  GC_err_printf ("GC_debug_malloc_atomic(%ld) returning NIL (", lb.28, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4881 = 0B;
  return D.4881;
  <D.4879>:
  GC_debugging_started.29 = GC_debugging_started;
  if (GC_debugging_started.29 == 0) goto <D.4883>; else goto <D.4884>;
  <D.4883>:
  GC_start_debugging ();
  <D.4884>:
  i.30 = (long unsigned int) i;
  D.4881 = GC_store_debug_info (result, lb, s, i.30);
  return D.4881;
}


GC_debug_malloc_uncollectable (size_t lb, const char * s, int i)
{
  unsigned int D.4887;
  long int lb.31;
  void * D.4891;
  int GC_debugging_started.32;
  long unsigned int i.33;
  void * result;

  D.4887 = lb + 20;
  result = GC_malloc_uncollectable (D.4887);
  if (result == 0B) goto <D.4888>; else goto <D.4889>;
  <D.4888>:
  lb.31 = (long int) lb;
  GC_err_printf ("GC_debug_malloc_uncollectable(%ld) returning NIL (", lb.31, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4891 = 0B;
  return D.4891;
  <D.4889>:
  GC_debugging_started.32 = GC_debugging_started;
  if (GC_debugging_started.32 == 0) goto <D.4893>; else goto <D.4894>;
  <D.4893>:
  GC_start_debugging ();
  <D.4894>:
  i.33 = (long unsigned int) i;
  D.4891 = GC_store_debug_info (result, lb, s, i.33);
  return D.4891;
}


GC_debug_malloc_atomic_uncollectable (size_t lb, const char * s, int i)
{
  unsigned int D.4897;
  long int lb.34;
  void * D.4901;
  int GC_debugging_started.35;
  long unsigned int i.36;
  void * result;

  D.4897 = lb + 20;
  result = GC_malloc_atomic_uncollectable (D.4897);
  if (result == 0B) goto <D.4898>; else goto <D.4899>;
  <D.4898>:
  lb.34 = (long int) lb;
  GC_err_printf ("GC_debug_malloc_atomic_uncollectable(%ld) returning NIL (", lb.34, 0, 0, 0, 0, 0);
  GC_err_puts (s);
  GC_err_printf (":%ld)\n", i, 0, 0, 0, 0, 0);
  D.4901 = 0B;
  return D.4901;
  <D.4899>:
  GC_debugging_started.35 = GC_debugging_started;
  if (GC_debugging_started.35 == 0) goto <D.4903>; else goto <D.4904>;
  <D.4903>:
  GC_start_debugging ();
  <D.4904>:
  i.36 = (long unsigned int) i;
  D.4901 = GC_store_debug_info (result, lb, s, i.36);
  return D.4901;
}


GC_debug_free (void * p)
{
  long int p.37;
  int p.38;
  int base.39;
  int D.4914;
  long unsigned int D.4920;
  unsigned int D.4921;
  unsigned int D.4925;
  int GC_find_leak.40;
  long unsigned int p.41;
  long unsigned int D.4931;
  struct bottom_index * D.4932;
  long unsigned int D.4933;
  long unsigned int D.4934;
  unsigned char D.4935;
  long unsigned int D.4943;
  unsigned int D.4944;
  word * D.4945;
  register void * base;
  register char * clobbered;

  if (p == 0B) goto <D.4907>; else goto <D.4908>;
  <D.4907>:
  return;
  <D.4908>:
  base = GC_base (p);
  if (base == 0B) goto <D.4909>; else goto <D.4910>;
  <D.4909>:
  p.37 = (long int) p;
  GC_err_printf ("Attempt to free invalid pointer %lx\n", p.37, 0, 0, 0, 0, 0);
  GC_abort ("free(invalid pointer)");
  <D.4910>:
  p.38 = (int) p;
  base.39 = (int) base;
  D.4914 = p.38 - base.39;
  if (D.4914 != 16) goto <D.4915>; else goto <D.4916>;
  <D.4915>:
  p.37 = (long int) p;
  GC_err_printf ("GC_debug_free called on pointer %lx wo debugging info\n", p.37, 0, 0, 0, 0, 0);
  goto <D.4917>;
  <D.4916>:
  clobbered = GC_check_annotated_obj (base);
  if (clobbered != 0B) goto <D.4918>; else goto <D.4919>;
  <D.4918>:
  D.4920 = MEM[(struct oh *)base].oh_sz;
  D.4921 = GC_size (base);
  if (D.4920 == D.4921) goto <D.4922>; else goto <D.4923>;
  <D.4922>:
  GC_err_puts ("GC_debug_free: found previously deallocated (?) object at ");
  goto <D.4924>;
  <D.4923>:
  GC_err_puts ("GC_debug_free: found smashed location at ");
  <D.4924>:
  GC_print_smashed_obj (p, clobbered);
  <D.4919>:
  D.4925 = GC_size (base);
  MEM[(struct oh *)base].oh_sz = D.4925;
  <D.4917>:
  GC_find_leak.40 = GC_find_leak;
  if (GC_find_leak.40 != 0) goto <D.4927>; else goto <D.4928>;
  <D.4927>:
  GC_free (base);
  goto <D.4929>;
  <D.4928>:
  {
    register struct hdr * hhdr;
    GC_bool uncollectable;

    p.41 = (long unsigned int) p;
    D.4931 = p.41 >> 22;
    D.4932 = GC_arrays._top_index[D.4931];
    p.41 = (long unsigned int) p;
    D.4933 = p.41 >> 12;
    D.4934 = D.4933 & 1023;
    hhdr = D.4932->index[D.4934];
    uncollectable = 0;
    D.4935 = hhdr->hb_obj_kind;
    if (D.4935 == 2) goto <D.4936>; else goto <D.4937>;
    <D.4936>:
    uncollectable = 1;
    <D.4937>:
    D.4935 = hhdr->hb_obj_kind;
    if (D.4935 == 3) goto <D.4938>; else goto <D.4939>;
    <D.4938>:
    uncollectable = 1;
    <D.4939>:
    if (uncollectable != 0) goto <D.4940>; else goto <D.4941>;
    <D.4940>:
    GC_free (base);
    goto <D.4942>;
    <D.4941>:
    {
      size_t i;
      size_t obj_sz;

      D.4943 = hhdr->hb_sz;
      obj_sz = D.4943 + 4294967292;
      i = 0;
      goto <D.4608>;
      <D.4607>:
      D.4944 = i * 4;
      D.4945 = p + D.4944;
      *D.4945 = 3735928559;
      i = i + 1;
      <D.4608>:
      if (i < obj_sz) goto <D.4607>; else goto <D.4609>;
      <D.4609>:
    }
    <D.4942>:
  }
  <D.4929>:
}


GC_debug_free_inner (void * p)
{
  void * D.4947;

  D.4947 = GC_base (p);
  GC_free_inner (D.4947);
}


GC_debug_realloc (void * p, size_t lb, const char * s, int i)
{
  void * D.4950;
  long int p.42;
  int p.43;
  int base.44;
  int D.4956;
  long unsigned int base.45;
  long unsigned int D.4960;
  struct bottom_index * D.4961;
  long unsigned int D.4962;
  long unsigned int D.4963;
  unsigned char D.4964;
  int D.4965;
  register void * base;
  register char * clobbered;
  register void * result;
  register size_t copy_sz;
  register size_t old_sz;
  register struct hdr * hhdr;

  base = GC_base (p);
  copy_sz = lb;
  if (p == 0B) goto <D.4948>; else goto <D.4949>;
  <D.4948>:
  D.4950 = GC_debug_malloc (lb, s, i);
  return D.4950;
  <D.4949>:
  if (base == 0B) goto <D.4951>; else goto <D.4952>;
  <D.4951>:
  p.42 = (long int) p;
  GC_err_printf ("Attempt to reallocate invalid pointer %lx\n", p.42, 0, 0, 0, 0, 0);
  GC_abort ("realloc(invalid pointer)");
  <D.4952>:
  p.43 = (int) p;
  base.44 = (int) base;
  D.4956 = p.43 - base.44;
  if (D.4956 != 16) goto <D.4957>; else goto <D.4958>;
  <D.4957>:
  p.42 = (long int) p;
  GC_err_printf ("GC_debug_realloc called on pointer %lx wo debugging info\n", p.42, 0, 0, 0, 0, 0);
  D.4950 = GC_realloc (p, lb);
  return D.4950;
  <D.4958>:
  base.45 = (long unsigned int) base;
  D.4960 = base.45 >> 22;
  D.4961 = GC_arrays._top_index[D.4960];
  base.45 = (long unsigned int) base;
  D.4962 = base.45 >> 12;
  D.4963 = D.4962 & 1023;
  hhdr = D.4961->index[D.4963];
  D.4964 = hhdr->hb_obj_kind;
  D.4965 = (int) D.4964;
  switch (D.4965) <default: <D.4632>, case 0: <D.4629>, case 1: <D.4627>, case 2: <D.4630>, case 3: <D.4631>>
  <D.4627>:
  result = GC_debug_malloc (lb, s, i);
  goto <D.4628>;
  <D.4629>:
  result = GC_debug_malloc_atomic (lb, s, i);
  goto <D.4628>;
  <D.4630>:
  result = GC_debug_malloc_uncollectable (lb, s, i);
  goto <D.4628>;
  <D.4631>:
  result = GC_debug_malloc_atomic_uncollectable (lb, s, i);
  goto <D.4628>;
  <D.4632>:
  GC_err_puts ("GC_debug_realloc: encountered bad kind\n");
  GC_abort ("bad kind");
  <D.4628>:
  clobbered = GC_check_annotated_obj (base);
  if (clobbered != 0B) goto <D.4966>; else goto <D.4967>;
  <D.4966>:
  GC_err_puts ("GC_debug_realloc: found smashed location at ");
  GC_print_smashed_obj (p, clobbered);
  <D.4967>:
  old_sz = MEM[(struct oh *)base].oh_sz;
  if (old_sz < copy_sz) goto <D.4968>; else goto <D.4969>;
  <D.4968>:
  copy_sz = old_sz;
  <D.4969>:
  if (result == 0B) goto <D.4970>; else goto <D.4971>;
  <D.4970>:
  D.4950 = 0B;
  return D.4950;
  <D.4971>:
  memcpy (result, p, copy_sz);
  GC_debug_free (p);
  D.4950 = result;
  return D.4950;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.4973;
  unsigned int D.4974;

  D.4974 = __builtin_object_size (__dest, 0);
  D.4973 = __builtin___memcpy_chk (__dest, __src, __len, D.4974);
  return D.4973;
}


GC_add_smashed (char * smashed)
{
  unsigned int GC_n_smashed.46;
  unsigned int GC_n_smashed.47;

  GC_n_smashed.46 = GC_n_smashed;
  GC_smashed[GC_n_smashed.46] = smashed;
  GC_n_smashed.46 = GC_n_smashed;
  if (GC_n_smashed.46 <= 18) goto <D.4977>; else goto <D.4978>;
  <D.4977>:
  GC_n_smashed.46 = GC_n_smashed;
  GC_n_smashed.47 = GC_n_smashed.46 + 1;
  GC_n_smashed = GC_n_smashed.47;
  <D.4978>:
  GC_have_errors = 1;
}


GC_print_all_smashed_proc ()
{
  unsigned int GC_n_smashed.48;
  char * D.4983;
  void * D.4984;
  unsigned int i;

  GC_n_smashed.48 = GC_n_smashed;
  if (GC_n_smashed.48 == 0) goto <D.4981>; else goto <D.4982>;
  <D.4981>:
  return;
  <D.4982>:
  GC_err_puts ("GC_check_heap_block: found smashed heap objects:\n");
  i = 0;
  goto <D.4642>;
  <D.4641>:
  D.4983 = GC_smashed[i];
  D.4983 = GC_smashed[i];
  D.4984 = GC_base (D.4983);
  GC_print_smashed_obj (D.4984, D.4983);
  GC_smashed[i] = 0B;
  i = i + 1;
  <D.4642>:
  GC_n_smashed.48 = GC_n_smashed;
  if (i < GC_n_smashed.48) goto <D.4641>; else goto <D.4643>;
  <D.4643>:
  GC_n_smashed = 0;
}


GC_check_heap_block (struct hblk * hbp, word dummy)
{
  long unsigned int hbp.49;
  long unsigned int D.4987;
  struct bottom_index * D.4988;
  long unsigned int D.4989;
  long unsigned int D.4990;
  long unsigned int D.4994;
  long unsigned int D.4995;
  long unsigned int D.4996;
  int D.4997;
  long unsigned int D.4998;
  int D.4999;
  long unsigned int D.5000;
  long unsigned int D.5001;
  int D.5004;
  long unsigned int word_no.50;
  long unsigned int D.5010;
  long unsigned int D.5011;
  register struct hblkhdr * hhdr;
  register word sz;
  register int word_no;
  register word * p;
  register word * plim;

  hbp.49 = (long unsigned int) hbp;
  D.4987 = hbp.49 >> 22;
  D.4988 = GC_arrays._top_index[D.4987];
  hbp.49 = (long unsigned int) hbp;
  D.4989 = hbp.49 >> 12;
  D.4990 = D.4989 & 1023;
  hhdr = D.4988->index[D.4990];
  sz = hhdr->hb_sz;
  p = &hbp->hb_body;
  word_no = 0;
  if (sz > 512) goto <D.4991>; else goto <D.4992>;
  <D.4991>:
  plim = p;
  goto <D.4993>;
  <D.4992>:
  hbp.49 = (long unsigned int) hbp;
  D.4994 = sz << 2;
  D.4995 = hbp.49 - D.4994;
  D.4996 = D.4995 + 4096;
  plim = (word *) D.4996;
  <D.4993>:
  goto <D.4655>;
  <D.4654>:
  D.4997 = word_no >> 5;
  D.4998 = hhdr->hb_marks[D.4997];
  D.4999 = word_no & 31;
  D.5000 = D.4998 >> D.4999;
  D.5001 = D.5000 & 1;
  if (D.5001 != 0) goto <D.5002>; else goto <D.5003>;
  <D.5002>:
  D.5004 = GC_has_other_debug_info (p);
  if (D.5004 != 0) goto <D.5005>; else goto <D.5006>;
  <D.5005>:
  {
    char * clobbered;

    clobbered = GC_check_annotated_obj (p);
    if (clobbered != 0B) goto <D.5007>; else goto <D.5008>;
    <D.5007>:
    GC_add_smashed (clobbered);
    <D.5008>:
  }
  <D.5006>:
  <D.5003>:
  word_no.50 = (long unsigned int) word_no;
  D.5010 = word_no.50 + sz;
  word_no = (int) D.5010;
  D.5011 = sz * 4;
  p = p + D.5011;
  <D.4655>:
  if (p <= plim) goto <D.4654>; else goto <D.4656>;
  <D.4656>:
}


GC_check_heap_proc ()
{
  GC_apply_to_all_blocks (GC_check_heap_block, 0);
}


GC_make_closure (void (*GC_finalization_proc) (void *, void *) fn, void * data)
{
  void * D.5012;
  struct closure * result;

  result = GC_malloc (8);
  result->cl_fn = fn;
  result->cl_data = data;
  D.5012 = result;
  return D.5012;
}


GC_debug_invoke_finalizer (void * obj, void * data)
{
  void (*<T31f>) (void *, void *) D.5014;
  void * D.5015;
  void * D.5016;
  register struct closure * cl;

  cl = data;
  D.5014 = cl->cl_fn;
  D.5015 = cl->cl_data;
  D.5016 = obj + 16;
  D.5014 (D.5016, D.5015);
}


GC_debug_register_finalizer (void * obj, void (*GC_finalization_proc) (void *, void *) fn, void * cd, void (*GC_finalization_proc) (void *, void *) * ofn, void * * ocd)
{
  int obj.51;
  int base.52;
  int D.5021;
  long int obj.53;
  void * D.5028;
  void * my_old_cd.54;
  void (*<T31f>) (void *, void *) my_old_fn.55;
  void (*GC_finalization_proc) (void *, void *) my_old_fn;
  void * my_old_cd;
  char * base;

  try
    {
      base = GC_base (obj);
      if (base == 0B) goto <D.5017>; else goto <D.5018>;
      <D.5017>:
      return;
      <D.5018>:
      obj.51 = (int) obj;
      base.52 = (int) base;
      D.5021 = obj.51 - base.52;
      if (D.5021 != 16) goto <D.5022>; else goto <D.5023>;
      <D.5022>:
      obj.53 = (long int) obj;
      GC_err_printf ("GC_debug_register_finalizer called with non-base-pointer 0x%lx\n", obj.53, 0, 0, 0, 0, 0);
      <D.5023>:
      if (fn == 0B) goto <D.5025>; else goto <D.5026>;
      <D.5025>:
      GC_register_finalizer (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.5027>;
      <D.5026>:
      D.5028 = GC_make_closure (fn, cd);
      GC_register_finalizer (base, GC_debug_invoke_finalizer, D.5028, &my_old_fn, &my_old_cd);
      <D.5027>:
      my_old_cd.54 = my_old_cd;
      my_old_fn.55 = my_old_fn;
      store_old (obj, my_old_fn.55, my_old_cd.54, ofn, ocd);
    }
  finally
    {
      my_old_fn = {CLOBBER};
      my_old_cd = {CLOBBER};
    }
}


store_old (void * obj, void (*GC_finalization_proc) (void *, void *) my_old_fn, struct closure * my_old_cd, void (*GC_finalization_proc) (void *, void *) * ofn, void * * ocd)
{
  long int obj.56;
  void (*<T31f>) (void *, void *) D.5042;
  void * D.5045;

  if (my_old_fn != 0B) goto <D.5034>; else goto <D.5035>;
  <D.5034>:
  if (my_old_fn != GC_debug_invoke_finalizer) goto <D.5036>; else goto <D.5037>;
  <D.5036>:
  obj.56 = (long int) obj;
  GC_err_printf ("Debuggable object at 0x%lx had non-debug finalizer.\n", obj.56, 0, 0, 0, 0, 0);
  goto <D.5039>;
  <D.5037>:
  if (ofn != 0B) goto <D.5040>; else goto <D.5041>;
  <D.5040>:
  D.5042 = my_old_cd->cl_fn;
  *ofn = D.5042;
  <D.5041>:
  if (ocd != 0B) goto <D.5043>; else goto <D.5044>;
  <D.5043>:
  D.5045 = my_old_cd->cl_data;
  *ocd = D.5045;
  <D.5044>:
  <D.5039>:
  goto <D.5046>;
  <D.5035>:
  if (ofn != 0B) goto <D.5047>; else goto <D.5048>;
  <D.5047>:
  *ofn = 0B;
  <D.5048>:
  if (ocd != 0B) goto <D.5049>; else goto <D.5050>;
  <D.5049>:
  *ocd = 0B;
  <D.5050>:
  <D.5046>:
}


GC_debug_register_finalizer_no_order (void * obj, void (*GC_finalization_proc) (void *, void *) fn, void * cd, void (*GC_finalization_proc) (void *, void *) * ofn, void * * ocd)
{
  int obj.57;
  int base.58;
  int D.5055;
  long int obj.59;
  void * D.5062;
  void * my_old_cd.60;
  void (*<T31f>) (void *, void *) my_old_fn.61;
  void (*GC_finalization_proc) (void *, void *) my_old_fn;
  void * my_old_cd;
  char * base;

  try
    {
      base = GC_base (obj);
      if (base == 0B) goto <D.5051>; else goto <D.5052>;
      <D.5051>:
      return;
      <D.5052>:
      obj.57 = (int) obj;
      base.58 = (int) base;
      D.5055 = obj.57 - base.58;
      if (D.5055 != 16) goto <D.5056>; else goto <D.5057>;
      <D.5056>:
      obj.59 = (long int) obj;
      GC_err_printf ("GC_debug_register_finalizer_no_order called with non-base-pointer 0x%lx\n", obj.59, 0, 0, 0, 0, 0);
      <D.5057>:
      if (fn == 0B) goto <D.5059>; else goto <D.5060>;
      <D.5059>:
      GC_register_finalizer_no_order (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.5061>;
      <D.5060>:
      D.5062 = GC_make_closure (fn, cd);
      GC_register_finalizer_no_order (base, GC_debug_invoke_finalizer, D.5062, &my_old_fn, &my_old_cd);
      <D.5061>:
      my_old_cd.60 = my_old_cd;
      my_old_fn.61 = my_old_fn;
      store_old (obj, my_old_fn.61, my_old_cd.60, ofn, ocd);
    }
  finally
    {
      my_old_fn = {CLOBBER};
      my_old_cd = {CLOBBER};
    }
}


GC_debug_register_finalizer_ignore_self (void * obj, void (*GC_finalization_proc) (void *, void *) fn, void * cd, void (*GC_finalization_proc) (void *, void *) * ofn, void * * ocd)
{
  int obj.62;
  int base.63;
  int D.5072;
  long int obj.64;
  void * D.5079;
  void * my_old_cd.65;
  void (*<T31f>) (void *, void *) my_old_fn.66;
  void (*GC_finalization_proc) (void *, void *) my_old_fn;
  void * my_old_cd;
  char * base;

  try
    {
      base = GC_base (obj);
      if (base == 0B) goto <D.5068>; else goto <D.5069>;
      <D.5068>:
      return;
      <D.5069>:
      obj.62 = (int) obj;
      base.63 = (int) base;
      D.5072 = obj.62 - base.63;
      if (D.5072 != 16) goto <D.5073>; else goto <D.5074>;
      <D.5073>:
      obj.64 = (long int) obj;
      GC_err_printf ("GC_debug_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n", obj.64, 0, 0, 0, 0, 0);
      <D.5074>:
      if (fn == 0B) goto <D.5076>; else goto <D.5077>;
      <D.5076>:
      GC_register_finalizer_ignore_self (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.5078>;
      <D.5077>:
      D.5079 = GC_make_closure (fn, cd);
      GC_register_finalizer_ignore_self (base, GC_debug_invoke_finalizer, D.5079, &my_old_fn, &my_old_cd);
      <D.5078>:
      my_old_cd.65 = my_old_cd;
      my_old_fn.66 = my_old_fn;
      store_old (obj, my_old_fn.66, my_old_cd.65, ofn, ocd);
    }
  finally
    {
      my_old_fn = {CLOBBER};
      my_old_cd = {CLOBBER};
    }
}


GC_debug_malloc_replacement (size_t lb)
{
  void * D.5085;

  D.5085 = GC_debug_malloc (lb, "unknown", 0);
  return D.5085;
}


GC_debug_realloc_replacement (void * p, size_t lb)
{
  void * D.5087;

  D.5087 = GC_debug_realloc (p, lb, "unknown", 0);
  return D.5087;
}


