GC_has_other_debug_info (char * p)
{
  long unsigned int ohdr.0;
  long unsigned int body.1;
  long unsigned int D.4657;
  long unsigned int D.4658;
  GC_bool D.4660;
  long unsigned int D.4661;
  long unsigned int D.4664;
  long unsigned int D.4665;
  long unsigned int D.4668;
  sizetype D.4669;
  sizetype D.4670;
  word * D.4671;
  long unsigned int D.4672;
  long unsigned int D.4673;
  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.4657 = ohdr.0 ^ body.1;
  D.4658 = D.4657 & 4294963200;
  if (D.4658 != 0) goto <D.4653>; else goto <D.4659>;
  <D.4659>:
  if (sz <= 19) goto <D.4653>; else goto <D.4654>;
  <D.4653>:
  D.4660 = 0;
  return D.4660;
  <D.4654>:
  D.4661 = ohdr->oh_sz;
  if (D.4661 == sz) goto <D.4662>; else goto <D.4663>;
  <D.4662>:
  D.4660 = 0;
  return D.4660;
  <D.4663>:
  D.4664 = ohdr->oh_sf;
  body.1 = (long unsigned int) body;
  D.4665 = body.1 ^ 4275891659;
  if (D.4664 == D.4665) goto <D.4666>; else goto <D.4667>;
  <D.4666>:
  D.4660 = 1;
  return D.4660;
  <D.4667>:
  D.4668 = sz >> 2;
  D.4669 = D.4668 + 1073741823;
  D.4670 = D.4669 * 4;
  D.4671 = ohdr + D.4670;
  D.4672 = *D.4671;
  body.1 = (long unsigned int) body;
  D.4673 = body.1 ^ 3168718319;
  if (D.4672 == D.4673) goto <D.4674>; else goto <D.4675>;
  <D.4674>:
  D.4660 = 1;
  return D.4660;
  <D.4675>:
  D.4660 = 0;
  return D.4660;
}


GC_store_debug_info (char * p, word sz, const char * string, word integer)
{
  int D.4677;
  long unsigned int result.2;
  long unsigned int D.4681;
  unsigned int D.4682;
  unsigned int D.4683;
  sizetype D.4684;
  sizetype D.4685;
  word * D.4686;
  long unsigned int D.4687;
  long unsigned int D.4688;
  long unsigned int D.4689;
  word * D.4690;
  long unsigned int D.4691;
  long unsigned int D.4692;
  char * D.4693;
  register word * result;

  result = p + 16;
  D.4677 = _test_and_set (&GC_allocate_lock, 1);
  if (D.4677 != 0) goto <D.4678>; else goto <D.4679>;
  <D.4678>:
  GC_lock ();
  <D.4679>:
  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.4681 = result.2 ^ 4275891659;
  MEM[(struct oh *)p].oh_sf = D.4681;
  D.4682 = GC_size (p);
  D.4683 = D.4682 >> 2;
  D.4684 = D.4683 + 1073741823;
  D.4685 = D.4684 * 4;
  D.4686 = p + D.4685;
  D.4687 = sz + 3;
  D.4688 = D.4687 >> 2;
  D.4689 = D.4688 * 4;
  D.4690 = result + D.4689;
  result.2 = (long unsigned int) result;
  D.4691 = result.2 ^ 3168718319;
  *D.4690 = D.4691;
  D.4692 = *D.4690;
  *D.4686 = D.4692;
  GC_clear (&GC_allocate_lock);
  D.4693 = result;
  return D.4693;
}


_test_and_set (int * __p, int __v)
{
  int D.4695;
  int __r;
  int __t;

  __asm__ __volatile__("/* Inline test and set */
.set	push
	.set	mips2
	sync
	1:
	ll	%0,%3
	move	%1,%4
	beq	%0,%4,2f
	sc	%1,%2
	beqz	%1,1b
sync
	.set	pop
	2:
	/* End test and set */" : "=&r" __r, "=&r" __t, "=m" *__p : "m" *__p, "r" __v : "memory");
  D.4695 = __r;
  return D.4695;
}


GC_clear (volatile unsigned int * addr)
{
  __asm__ __volatile__(" " :  :  : "memory");
  *addr = 0;
}


GC_check_annotated_obj (struct oh * ohdr)
{
  long unsigned int D.4697;
  int GC_all_interior_pointers.3;
  long unsigned int GC_all_interior_pointers.4;
  long unsigned int D.4700;
  long unsigned int D.4701;
  char * D.4704;
  long unsigned int D.4705;
  long unsigned int body.5;
  long unsigned int D.4707;
  long unsigned int D.4710;
  sizetype D.4711;
  sizetype D.4712;
  word * D.4713;
  long unsigned int D.4714;
  long unsigned int D.4715;
  long unsigned int D.4718;
  long unsigned int D.4719;
  long unsigned int D.4720;
  word * D.4721;
  long unsigned int D.4722;
  register char * body;
  register word gc_sz;

  body = ohdr + 16;
  gc_sz = GC_size (ohdr);
  D.4697 = 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.4700 = D.4697 - GC_all_interior_pointers.4;
  D.4701 = D.4700 + 20;
  if (D.4701 > gc_sz) goto <D.4702>; else goto <D.4703>;
  <D.4702>:
  D.4704 = &ohdr->oh_sz;
  return D.4704;
  <D.4703>:
  D.4705 = ohdr->oh_sf;
  body.5 = (long unsigned int) body;
  D.4707 = body.5 ^ 4275891659;
  if (D.4705 != D.4707) goto <D.4708>; else goto <D.4709>;
  <D.4708>:
  D.4704 = &ohdr->oh_sf;
  return D.4704;
  <D.4709>:
  D.4710 = gc_sz >> 2;
  D.4711 = D.4710 + 1073741823;
  D.4712 = D.4711 * 4;
  D.4713 = ohdr + D.4712;
  D.4714 = *D.4713;
  body.5 = (long unsigned int) body;
  D.4715 = body.5 ^ 3168718319;
  if (D.4714 != D.4715) goto <D.4716>; else goto <D.4717>;
  <D.4716>:
  D.4710 = gc_sz >> 2;
  D.4711 = D.4710 + 1073741823;
  D.4712 = D.4711 * 4;
  D.4704 = ohdr + D.4712;
  return D.4704;
  <D.4717>:
  D.4697 = ohdr->oh_sz;
  D.4718 = D.4697 + 3;
  D.4719 = D.4718 >> 2;
  D.4720 = D.4719 * 4;
  D.4721 = body + D.4720;
  D.4722 = *D.4721;
  body.5 = (long unsigned int) body;
  D.4715 = body.5 ^ 3168718319;
  if (D.4722 != D.4715) goto <D.4723>; else goto <D.4724>;
  <D.4723>:
  D.4697 = ohdr->oh_sz;
  D.4718 = D.4697 + 3;
  D.4719 = D.4718 >> 2;
  D.4720 = D.4719 * 4;
  D.4704 = body + D.4720;
  return D.4704;
  <D.4724>:
  D.4704 = 0B;
  return D.4704;
}


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.4726;
  void (*<T74f>) (void *, char *) D.4728;
  void * D.4730;
  int D.4731;
  long unsigned int D.4733;
  long int D.4734;
  struct hdr * hhdr;
  char buffer[41];
  int kind;

  try
    {
      hhdr = GC_find_header (p);
      D.4726 = hhdr->hb_obj_kind;
      kind = (int) D.4726;
      D.4728 = GC_describe_type_fns[kind];
      if (D.4728 != 0B) goto <D.4729>; else goto <D.4727>;
      <D.4729>:
      D.4730 = GC_base (p);
      D.4731 = GC_is_marked (D.4730);
      if (D.4731 != 0) goto <D.4732>; else goto <D.4727>;
      <D.4732>:
      buffer[40] = 0;
      D.4728 = GC_describe_type_fns[kind];
      D.4728 (p, &buffer);
      GC_err_puts (&buffer);
      goto <D.4457>;
      <D.4727>:
      switch (kind) <default: <D.4462>, case 0: <D.4456>, case 1: <D.4458>, case 2: <D.4459>, case 3: <D.4460>, case 4: <D.4461>>
      <D.4456>:
      GC_err_puts ("PTRFREE");
      goto <D.4457>;
      <D.4458>:
      GC_err_puts ("NORMAL");
      goto <D.4457>;
      <D.4459>:
      GC_err_puts ("UNCOLLECTABLE");
      goto <D.4457>;
      <D.4460>:
      GC_err_puts ("ATOMIC UNCOLLECTABLE");
      goto <D.4457>;
      <D.4461>:
      GC_err_puts ("STUBBORN");
      goto <D.4457>;
      <D.4462>:
      D.4733 = hhdr->hb_descr;
      D.4734 = (long int) D.4733;
      GC_err_printf ("kind %ld, descr 0x%lx", kind, D.4734, 0, 0, 0, 0);
      <D.4457>:
    }
  finally
    {
      buffer = {CLOBBER};
    }
}


GC_print_obj (char * p)
{
  long unsigned int ohdr.6;
  long unsigned int D.4736;
  long int D.4737;
  const char * D.4738;
  long unsigned int D.4739;
  long int D.4740;
  long unsigned int D.4741;
  long int D.4742;
  char * D.4743;
  register struct oh * ohdr;

  ohdr = GC_base (p);
  ohdr.6 = (long unsigned int) ohdr;
  D.4736 = ohdr.6 + 16;
  D.4737 = (long int) D.4736;
  GC_err_printf ("0x%lx (", D.4737, 0, 0, 0, 0, 0);
  D.4738 = ohdr->oh_string;
  GC_err_puts (D.4738);
  D.4739 = ohdr->oh_int;
  D.4740 = (long int) D.4739;
  D.4741 = ohdr->oh_sz;
  D.4742 = (long int) D.4741;
  GC_err_printf (":%ld, sz=%ld, ", D.4740, D.4742, 0, 0, 0, 0);
  D.4743 = ohdr + 16;
  GC_print_type (D.4743);
  GC_err_puts (")\n");
}


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

  D.4744 = GC_has_other_debug_info (p);
  if (D.4744 != 0) goto <D.4745>; else goto <D.4746>;
  <D.4745>:
  GC_print_obj (p);
  goto <D.4747>;
  <D.4746>:
  GC_default_print_heap_obj_proc (p);
  <D.4747>:
}


GC_print_smashed_obj (char * p, char * clobbered_addr)
{
  long int clobbered_addr.7;
  long int p.8;
  word * D.4753;
  const char * D.4755;
  unsigned int D.4756;
  int GC_all_interior_pointers.9;
  unsigned int GC_all_interior_pointers.10;
  unsigned int D.4759;
  unsigned int D.4760;
  long int D.4761;
  char D.4762;
  long unsigned int D.4766;
  long int D.4767;
  long unsigned int D.4768;
  long int D.4769;
  register struct oh * ohdr;

  ohdr = GC_base (p);
  clobbered_addr.7 = (long int) clobbered_addr;
  p.8 = (long int) p;
  GC_err_printf ("0x%lx in object at 0x%lx(", clobbered_addr.7, p.8, 0, 0, 0, 0);
  D.4753 = &ohdr->oh_sz;
  if (D.4753 >= clobbered_addr) goto <D.4750>; else goto <D.4754>;
  <D.4754>:
  D.4755 = ohdr->oh_string;
  if (D.4755 == 0B) goto <D.4750>; else goto <D.4751>;
  <D.4750>:
  D.4756 = 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.4759 = D.4756 + GC_all_interior_pointers.10;
  D.4760 = D.4759 + 4294967276;
  D.4761 = (long int) D.4760;
  GC_err_printf ("<smashed>, appr. sz = %ld)\n", D.4761, 0, 0, 0, 0, 0);
  goto <D.4752>;
  <D.4751>:
  D.4755 = ohdr->oh_string;
  D.4762 = *D.4755;
  if (D.4762 == 0) goto <D.4763>; else goto <D.4764>;
  <D.4763>:
  GC_err_puts ("EMPTY(smashed?)");
  goto <D.4765>;
  <D.4764>:
  D.4755 = ohdr->oh_string;
  GC_err_puts (D.4755);
  <D.4765>:
  D.4766 = ohdr->oh_int;
  D.4767 = (long int) D.4766;
  D.4768 = ohdr->oh_sz;
  D.4769 = (long int) D.4768;
  GC_err_printf (":%ld, sz=%ld)\n", D.4767, D.4769, 0, 0, 0, 0);
  <D.4752>:
}


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

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


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.4773;
  unsigned int D.4774;
  long int lb.13;
  void * D.4778;
  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.4773 = lb - GC_all_interior_pointers.12;
  D.4774 = D.4773 + 20;
  result = GC_malloc (D.4774);
  if (result == 0B) goto <D.4775>; else goto <D.4776>;
  <D.4775>:
  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.4778 = 0B;
  return D.4778;
  <D.4776>:
  GC_debugging_started.14 = GC_debugging_started;
  if (GC_debugging_started.14 == 0) goto <D.4780>; else goto <D.4781>;
  <D.4780>:
  GC_start_debugging ();
  <D.4781>:
  i.15 = (long unsigned int) i;
  D.4778 = GC_store_debug_info (result, lb, s, i.15);
  return D.4778;
}


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.4786;
  unsigned int D.4787;
  long int lb.18;
  void * D.4791;
  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.4786 = lb - GC_all_interior_pointers.17;
  D.4787 = D.4786 + 20;
  result = GC_malloc_ignore_off_page (D.4787);
  if (result == 0B) goto <D.4788>; else goto <D.4789>;
  <D.4788>:
  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.4791 = 0B;
  return D.4791;
  <D.4789>:
  GC_debugging_started.19 = GC_debugging_started;
  if (GC_debugging_started.19 == 0) goto <D.4793>; else goto <D.4794>;
  <D.4793>:
  GC_start_debugging ();
  <D.4794>:
  i.20 = (long unsigned int) i;
  D.4791 = GC_store_debug_info (result, lb, s, i.20);
  return D.4791;
}


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.4799;
  unsigned int D.4800;
  long int lb.23;
  void * D.4804;
  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.4799 = lb - GC_all_interior_pointers.22;
  D.4800 = D.4799 + 20;
  result = GC_malloc_atomic_ignore_off_page (D.4800);
  if (result == 0B) goto <D.4801>; else goto <D.4802>;
  <D.4801>:
  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.4804 = 0B;
  return D.4804;
  <D.4802>:
  GC_debugging_started.24 = GC_debugging_started;
  if (GC_debugging_started.24 == 0) goto <D.4806>; else goto <D.4807>;
  <D.4806>:
  GC_start_debugging ();
  <D.4807>:
  i.25 = (long unsigned int) i;
  D.4804 = GC_store_debug_info (result, lb, s, i.25);
  return D.4804;
}


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

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


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.4814;
  unsigned int D.4815;
  long int lb.28;
  void * D.4819;
  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.4814 = lb - GC_all_interior_pointers.27;
  D.4815 = D.4814 + 20;
  result = GC_malloc_atomic (D.4815);
  if (result == 0B) goto <D.4816>; else goto <D.4817>;
  <D.4816>:
  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.4819 = 0B;
  return D.4819;
  <D.4817>:
  GC_debugging_started.29 = GC_debugging_started;
  if (GC_debugging_started.29 == 0) goto <D.4821>; else goto <D.4822>;
  <D.4821>:
  GC_start_debugging ();
  <D.4822>:
  i.30 = (long unsigned int) i;
  D.4819 = GC_store_debug_info (result, lb, s, i.30);
  return D.4819;
}


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

  D.4825 = lb + 20;
  result = GC_malloc_uncollectable (D.4825);
  if (result == 0B) goto <D.4826>; else goto <D.4827>;
  <D.4826>:
  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.4829 = 0B;
  return D.4829;
  <D.4827>:
  GC_debugging_started.32 = GC_debugging_started;
  if (GC_debugging_started.32 == 0) goto <D.4831>; else goto <D.4832>;
  <D.4831>:
  GC_start_debugging ();
  <D.4832>:
  i.33 = (long unsigned int) i;
  D.4829 = GC_store_debug_info (result, lb, s, i.33);
  return D.4829;
}


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

  D.4835 = lb + 20;
  result = GC_malloc_atomic_uncollectable (D.4835);
  if (result == 0B) goto <D.4836>; else goto <D.4837>;
  <D.4836>:
  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.4839 = 0B;
  return D.4839;
  <D.4837>:
  GC_debugging_started.35 = GC_debugging_started;
  if (GC_debugging_started.35 == 0) goto <D.4841>; else goto <D.4842>;
  <D.4841>:
  GC_start_debugging ();
  <D.4842>:
  i.36 = (long unsigned int) i;
  D.4839 = GC_store_debug_info (result, lb, s, i.36);
  return D.4839;
}


GC_debug_free (void * p)
{
  long int p.37;
  int p.38;
  int base.39;
  int D.4852;
  long unsigned int D.4858;
  unsigned int D.4859;
  unsigned int D.4863;
  int GC_find_leak.40;
  long unsigned int p.41;
  long unsigned int D.4869;
  struct bottom_index * D.4870;
  long unsigned int D.4871;
  long unsigned int D.4872;
  unsigned char D.4873;
  long unsigned int D.4881;
  unsigned int D.4882;
  word * D.4883;
  register void * base;
  register char * clobbered;

  if (p == 0B) goto <D.4845>; else goto <D.4846>;
  <D.4845>:
  return;
  <D.4846>:
  base = GC_base (p);
  if (base == 0B) goto <D.4847>; else goto <D.4848>;
  <D.4847>:
  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.4848>:
  p.38 = (int) p;
  base.39 = (int) base;
  D.4852 = p.38 - base.39;
  if (D.4852 != 16) goto <D.4853>; else goto <D.4854>;
  <D.4853>:
  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.4855>;
  <D.4854>:
  clobbered = GC_check_annotated_obj (base);
  if (clobbered != 0B) goto <D.4856>; else goto <D.4857>;
  <D.4856>:
  D.4858 = MEM[(struct oh *)base].oh_sz;
  D.4859 = GC_size (base);
  if (D.4858 == D.4859) goto <D.4860>; else goto <D.4861>;
  <D.4860>:
  GC_err_puts ("GC_debug_free: found previously deallocated (?) object at ");
  goto <D.4862>;
  <D.4861>:
  GC_err_puts ("GC_debug_free: found smashed location at ");
  <D.4862>:
  GC_print_smashed_obj (p, clobbered);
  <D.4857>:
  D.4863 = GC_size (base);
  MEM[(struct oh *)base].oh_sz = D.4863;
  <D.4855>:
  GC_find_leak.40 = GC_find_leak;
  if (GC_find_leak.40 != 0) goto <D.4865>; else goto <D.4866>;
  <D.4865>:
  GC_free (base);
  goto <D.4867>;
  <D.4866>:
  {
    register struct hdr * hhdr;
    GC_bool uncollectable;

    p.41 = (long unsigned int) p;
    D.4869 = p.41 >> 22;
    D.4870 = GC_arrays._top_index[D.4869];
    p.41 = (long unsigned int) p;
    D.4871 = p.41 >> 12;
    D.4872 = D.4871 & 1023;
    hhdr = D.4870->index[D.4872];
    uncollectable = 0;
    D.4873 = hhdr->hb_obj_kind;
    if (D.4873 == 2) goto <D.4874>; else goto <D.4875>;
    <D.4874>:
    uncollectable = 1;
    <D.4875>:
    D.4873 = hhdr->hb_obj_kind;
    if (D.4873 == 3) goto <D.4876>; else goto <D.4877>;
    <D.4876>:
    uncollectable = 1;
    <D.4877>:
    if (uncollectable != 0) goto <D.4878>; else goto <D.4879>;
    <D.4878>:
    GC_free (base);
    goto <D.4880>;
    <D.4879>:
    {
      size_t i;
      size_t obj_sz;

      D.4881 = hhdr->hb_sz;
      obj_sz = D.4881 + 4294967292;
      i = 0;
      goto <D.4544>;
      <D.4543>:
      D.4882 = i * 4;
      D.4883 = p + D.4882;
      *D.4883 = 3735928559;
      i = i + 1;
      <D.4544>:
      if (i < obj_sz) goto <D.4543>; else goto <D.4545>;
      <D.4545>:
    }
    <D.4880>:
  }
  <D.4867>:
}


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

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


GC_debug_realloc (void * p, size_t lb, const char * s, int i)
{
  void * D.4888;
  long int p.42;
  int p.43;
  int base.44;
  int D.4894;
  long unsigned int base.45;
  long unsigned int D.4898;
  struct bottom_index * D.4899;
  long unsigned int D.4900;
  long unsigned int D.4901;
  unsigned char D.4902;
  int D.4903;
  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.4886>; else goto <D.4887>;
  <D.4886>:
  D.4888 = GC_debug_malloc (lb, s, i);
  return D.4888;
  <D.4887>:
  if (base == 0B) goto <D.4889>; else goto <D.4890>;
  <D.4889>:
  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.4890>:
  p.43 = (int) p;
  base.44 = (int) base;
  D.4894 = p.43 - base.44;
  if (D.4894 != 16) goto <D.4895>; else goto <D.4896>;
  <D.4895>:
  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.4888 = GC_realloc (p, lb);
  return D.4888;
  <D.4896>:
  base.45 = (long unsigned int) base;
  D.4898 = base.45 >> 22;
  D.4899 = GC_arrays._top_index[D.4898];
  base.45 = (long unsigned int) base;
  D.4900 = base.45 >> 12;
  D.4901 = D.4900 & 1023;
  hhdr = D.4899->index[D.4901];
  D.4902 = hhdr->hb_obj_kind;
  D.4903 = (int) D.4902;
  switch (D.4903) <default: <D.4568>, case 0: <D.4565>, case 1: <D.4563>, case 2: <D.4566>, case 3: <D.4567>>
  <D.4563>:
  result = GC_debug_malloc (lb, s, i);
  goto <D.4564>;
  <D.4565>:
  result = GC_debug_malloc_atomic (lb, s, i);
  goto <D.4564>;
  <D.4566>:
  result = GC_debug_malloc_uncollectable (lb, s, i);
  goto <D.4564>;
  <D.4567>:
  result = GC_debug_malloc_atomic_uncollectable (lb, s, i);
  goto <D.4564>;
  <D.4568>:
  GC_err_puts ("GC_debug_realloc: encountered bad kind\n");
  GC_abort ("bad kind");
  <D.4564>:
  clobbered = GC_check_annotated_obj (base);
  if (clobbered != 0B) goto <D.4904>; else goto <D.4905>;
  <D.4904>:
  GC_err_puts ("GC_debug_realloc: found smashed location at ");
  GC_print_smashed_obj (p, clobbered);
  <D.4905>:
  old_sz = MEM[(struct oh *)base].oh_sz;
  if (old_sz < copy_sz) goto <D.4906>; else goto <D.4907>;
  <D.4906>:
  copy_sz = old_sz;
  <D.4907>:
  if (result == 0B) goto <D.4908>; else goto <D.4909>;
  <D.4908>:
  D.4888 = 0B;
  return D.4888;
  <D.4909>:
  memcpy (result, p, copy_sz);
  GC_debug_free (p);
  D.4888 = result;
  return D.4888;
}


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

  D.4912 = __builtin_object_size (__dest, 0);
  D.4911 = __builtin___memcpy_chk (__dest, __src, __len, D.4912);
  return D.4911;
}


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.4915>; else goto <D.4916>;
  <D.4915>:
  GC_n_smashed.46 = GC_n_smashed;
  GC_n_smashed.47 = GC_n_smashed.46 + 1;
  GC_n_smashed = GC_n_smashed.47;
  <D.4916>:
  GC_have_errors = 1;
}


GC_print_all_smashed_proc ()
{
  unsigned int GC_n_smashed.48;
  char * D.4921;
  void * D.4922;
  unsigned int i;

  GC_n_smashed.48 = GC_n_smashed;
  if (GC_n_smashed.48 == 0) goto <D.4919>; else goto <D.4920>;
  <D.4919>:
  return;
  <D.4920>:
  GC_err_puts ("GC_check_heap_block: found smashed heap objects:\n");
  i = 0;
  goto <D.4578>;
  <D.4577>:
  D.4921 = GC_smashed[i];
  D.4922 = GC_base (D.4921);
  D.4921 = GC_smashed[i];
  GC_print_smashed_obj (D.4922, D.4921);
  GC_smashed[i] = 0B;
  i = i + 1;
  <D.4578>:
  GC_n_smashed.48 = GC_n_smashed;
  if (i < GC_n_smashed.48) goto <D.4577>; else goto <D.4579>;
  <D.4579>:
  GC_n_smashed = 0;
}


GC_check_heap_block (struct hblk * hbp, word dummy)
{
  long unsigned int hbp.49;
  long unsigned int D.4925;
  struct bottom_index * D.4926;
  long unsigned int D.4927;
  long unsigned int D.4928;
  long unsigned int D.4932;
  long unsigned int D.4933;
  long unsigned int D.4934;
  int D.4935;
  long unsigned int D.4936;
  int D.4937;
  long unsigned int D.4938;
  long unsigned int D.4939;
  int D.4942;
  long unsigned int word_no.50;
  long unsigned int D.4948;
  long unsigned int D.4949;
  register struct hblkhdr * hhdr;
  register word sz;
  register int word_no;
  register word * p;
  register word * plim;

  hbp.49 = (long unsigned int) hbp;
  D.4925 = hbp.49 >> 22;
  D.4926 = GC_arrays._top_index[D.4925];
  hbp.49 = (long unsigned int) hbp;
  D.4927 = hbp.49 >> 12;
  D.4928 = D.4927 & 1023;
  hhdr = D.4926->index[D.4928];
  sz = hhdr->hb_sz;
  p = &hbp->hb_body;
  word_no = 0;
  if (sz > 512) goto <D.4929>; else goto <D.4930>;
  <D.4929>:
  plim = p;
  goto <D.4931>;
  <D.4930>:
  hbp.49 = (long unsigned int) hbp;
  D.4932 = sz << 2;
  D.4933 = hbp.49 - D.4932;
  D.4934 = D.4933 + 4096;
  plim = (word *) D.4934;
  <D.4931>:
  goto <D.4591>;
  <D.4590>:
  D.4935 = word_no >> 5;
  D.4936 = hhdr->hb_marks[D.4935];
  D.4937 = word_no & 31;
  D.4938 = D.4936 >> D.4937;
  D.4939 = D.4938 & 1;
  if (D.4939 != 0) goto <D.4940>; else goto <D.4941>;
  <D.4940>:
  D.4942 = GC_has_other_debug_info (p);
  if (D.4942 != 0) goto <D.4943>; else goto <D.4944>;
  <D.4943>:
  {
    char * clobbered;

    clobbered = GC_check_annotated_obj (p);
    if (clobbered != 0B) goto <D.4945>; else goto <D.4946>;
    <D.4945>:
    GC_add_smashed (clobbered);
    <D.4946>:
  }
  <D.4944>:
  <D.4941>:
  word_no.50 = (long unsigned int) word_no;
  D.4948 = word_no.50 + sz;
  word_no = (int) D.4948;
  D.4949 = sz * 4;
  p = p + D.4949;
  <D.4591>:
  if (p <= plim) goto <D.4590>; else goto <D.4592>;
  <D.4592>:
}


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.4950;
  struct closure * result;

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


GC_debug_invoke_finalizer (void * obj, void * data)
{
  void (*<T30f>) (void *, void *) D.4952;
  void * D.4953;
  void * D.4954;
  register struct closure * cl;

  cl = data;
  D.4952 = cl->cl_fn;
  D.4953 = obj + 16;
  D.4954 = cl->cl_data;
  D.4952 (D.4953, D.4954);
}


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.4959;
  long int obj.53;
  void * D.4966;
  void (*<T30f>) (void *, void *) my_old_fn.54;
  void * my_old_cd.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.4955>; else goto <D.4956>;
      <D.4955>:
      return;
      <D.4956>:
      obj.51 = (int) obj;
      base.52 = (int) base;
      D.4959 = obj.51 - base.52;
      if (D.4959 != 16) goto <D.4960>; else goto <D.4961>;
      <D.4960>:
      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.4961>:
      if (fn == 0B) goto <D.4963>; else goto <D.4964>;
      <D.4963>:
      GC_register_finalizer (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.4965>;
      <D.4964>:
      D.4966 = GC_make_closure (fn, cd);
      GC_register_finalizer (base, GC_debug_invoke_finalizer, D.4966, &my_old_fn, &my_old_cd);
      <D.4965>:
      my_old_fn.54 = my_old_fn;
      my_old_cd.55 = my_old_cd;
      store_old (obj, my_old_fn.54, my_old_cd.55, 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 (*<T30f>) (void *, void *) D.4980;
  void * D.4983;

  if (my_old_fn != 0B) goto <D.4972>; else goto <D.4973>;
  <D.4972>:
  if (my_old_fn != GC_debug_invoke_finalizer) goto <D.4974>; else goto <D.4975>;
  <D.4974>:
  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.4977>;
  <D.4975>:
  if (ofn != 0B) goto <D.4978>; else goto <D.4979>;
  <D.4978>:
  D.4980 = my_old_cd->cl_fn;
  *ofn = D.4980;
  <D.4979>:
  if (ocd != 0B) goto <D.4981>; else goto <D.4982>;
  <D.4981>:
  D.4983 = my_old_cd->cl_data;
  *ocd = D.4983;
  <D.4982>:
  <D.4977>:
  goto <D.4984>;
  <D.4973>:
  if (ofn != 0B) goto <D.4985>; else goto <D.4986>;
  <D.4985>:
  *ofn = 0B;
  <D.4986>:
  if (ocd != 0B) goto <D.4987>; else goto <D.4988>;
  <D.4987>:
  *ocd = 0B;
  <D.4988>:
  <D.4984>:
}


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.4993;
  long int obj.59;
  void * D.5000;
  void (*<T30f>) (void *, void *) my_old_fn.60;
  void * my_old_cd.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.4989>; else goto <D.4990>;
      <D.4989>:
      return;
      <D.4990>:
      obj.57 = (int) obj;
      base.58 = (int) base;
      D.4993 = obj.57 - base.58;
      if (D.4993 != 16) goto <D.4994>; else goto <D.4995>;
      <D.4994>:
      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.4995>:
      if (fn == 0B) goto <D.4997>; else goto <D.4998>;
      <D.4997>:
      GC_register_finalizer_no_order (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.4999>;
      <D.4998>:
      D.5000 = GC_make_closure (fn, cd);
      GC_register_finalizer_no_order (base, GC_debug_invoke_finalizer, D.5000, &my_old_fn, &my_old_cd);
      <D.4999>:
      my_old_fn.60 = my_old_fn;
      my_old_cd.61 = my_old_cd;
      store_old (obj, my_old_fn.60, my_old_cd.61, 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.5010;
  long int obj.64;
  void * D.5017;
  void (*<T30f>) (void *, void *) my_old_fn.65;
  void * my_old_cd.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.5006>; else goto <D.5007>;
      <D.5006>:
      return;
      <D.5007>:
      obj.62 = (int) obj;
      base.63 = (int) base;
      D.5010 = obj.62 - base.63;
      if (D.5010 != 16) goto <D.5011>; else goto <D.5012>;
      <D.5011>:
      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.5012>:
      if (fn == 0B) goto <D.5014>; else goto <D.5015>;
      <D.5014>:
      GC_register_finalizer_ignore_self (base, 0B, 0B, &my_old_fn, &my_old_cd);
      goto <D.5016>;
      <D.5015>:
      D.5017 = GC_make_closure (fn, cd);
      GC_register_finalizer_ignore_self (base, GC_debug_invoke_finalizer, D.5017, &my_old_fn, &my_old_cd);
      <D.5016>:
      my_old_fn.65 = my_old_fn;
      my_old_cd.66 = my_old_cd;
      store_old (obj, my_old_fn.65, my_old_cd.66, ofn, ocd);
    }
  finally
    {
      my_old_fn = {CLOBBER};
      my_old_cd = {CLOBBER};
    }
}


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

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


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

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


