GC_init_gcj_malloc (int mp_index, void * mp)
{
  int D.5426;
  int GC_gcj_malloc_initialized.0;
  char * D.5432;
  _Bool D.5433;
  int GC_print_stats.1;
  struct GC_ms_entry * (*<T88e>) (GC_word *, struct GC_ms_entry *, struct GC_ms_entry *, GC_word) mp.2;
  long unsigned int D.5440;
  long unsigned int GC_n_mark_procs.3;
  void * * GC_gcjobjfreelist.4;
  char * * GC_gcjobjfreelist.5;
  int GC_gcj_kind.6;
  int GC_gcj_kind.7;
  int GC_gcj_kind.8;
  void * * GC_gcjdebugobjfreelist.9;
  char * * GC_gcjdebugobjfreelist.10;
  int D.5457;
  int D.5458;
  int D.5459;
  long unsigned int D.5460;
  int GC_gcj_debug_kind.11;
  register int i;
  GC_bool ignore_gcj_info;

  GC_init ();
  D.5426 = GC_test_and_set (&GC_allocate_lock);
  if (D.5426 != 0) goto <D.5427>; else goto <D.5428>;
  <D.5427>:
  GC_lock ();
  <D.5428>:
  GC_gcj_malloc_initialized.0 = GC_gcj_malloc_initialized;
  if (GC_gcj_malloc_initialized.0 != 0) goto <D.5430>; else goto <D.5431>;
  <D.5430>:
  GC_clear (&GC_allocate_lock);
  return;
  <D.5431>:
  GC_gcj_malloc_initialized = 1;
  D.5432 = getenv ("GC_IGNORE_GCJ_INFO");
  D.5433 = D.5432 != 0B;
  ignore_gcj_info = (GC_bool) D.5433;
  GC_print_stats.1 = GC_print_stats;
  if (GC_print_stats.1 != 0) goto <D.5435>; else goto <D.5436>;
  <D.5435>:
  if (ignore_gcj_info != 0) goto <D.5437>; else goto <D.5438>;
  <D.5437>:
  GC_printf ("Gcj-style type information is disabled!\n", 0, 0, 0, 0, 0, 0);
  <D.5438>:
  <D.5436>:
  mp.2 = (struct GC_ms_entry * (*<T88e>) (GC_word *, struct GC_ms_entry *, struct GC_ms_entry *, GC_word)) mp;
  GC_arrays._mark_procs[mp_index] = mp.2;
  D.5440 = (long unsigned int) mp_index;
  GC_n_mark_procs.3 = GC_n_mark_procs;
  if (D.5440 >= GC_n_mark_procs.3) goto <D.5442>; else goto <D.5443>;
  <D.5442>:
  GC_abort ("GC_init_gcj_malloc: bad index");
  <D.5443>:
  GC_gcjobjfreelist.4 = GC_new_free_list_inner ();
  GC_gcjobjfreelist = GC_gcjobjfreelist.4;
  if (ignore_gcj_info != 0) goto <D.5445>; else goto <D.5446>;
  <D.5445>:
  GC_gcjobjfreelist.5 = GC_gcjobjfreelist;
  GC_gcj_kind.6 = GC_new_kind_inner (GC_gcjobjfreelist.5, 0, 1, 1);
  GC_gcj_kind = GC_gcj_kind.6;
  goto <D.5449>;
  <D.5446>:
  GC_gcjobjfreelist.5 = GC_gcjobjfreelist;
  GC_gcj_kind.7 = GC_new_kind_inner (GC_gcjobjfreelist.5, 18446744073709551595, 0, 1);
  GC_gcj_kind = GC_gcj_kind.7;
  <D.5449>:
  if (ignore_gcj_info != 0) goto <D.5451>; else goto <D.5452>;
  <D.5451>:
  GC_gcj_kind.8 = GC_gcj_kind;
  GC_gcj_debug_kind = GC_gcj_kind.8;
  GC_gcjobjfreelist.5 = GC_gcjobjfreelist;
  GC_gcjdebugobjfreelist = GC_gcjobjfreelist.5;
  goto <D.5454>;
  <D.5452>:
  GC_gcjdebugobjfreelist.9 = GC_new_free_list_inner ();
  GC_gcjdebugobjfreelist = GC_gcjdebugobjfreelist.9;
  GC_gcjdebugobjfreelist.10 = GC_gcjdebugobjfreelist;
  D.5457 = mp_index | 64;
  D.5458 = D.5457 << 2;
  D.5459 = D.5458 | 2;
  D.5460 = (long unsigned int) D.5459;
  GC_gcj_debug_kind.11 = GC_new_kind_inner (GC_gcjdebugobjfreelist.10, D.5460, 0, 1);
  GC_gcj_debug_kind = GC_gcj_debug_kind.11;
  <D.5454>:
  GC_clear (&GC_allocate_lock);
}


GC_test_and_set (volatile unsigned int * addr)
{
  int D.5463;
  int oldval;
  int temp;

  temp = 1;
  __asm__ __volatile__("1:	lwarx %0,0,%1
	cmpwi %0, 0
	bne 2f
	stwcx. %2,0,%1
	bne- 1b
	sync
2:	
" : "=&r" oldval : "r" addr, "r" temp : "memory", "cr0");
  D.5463 = oldval;
  return D.5463;
}


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


GC_gcj_malloc (size_t lb, void * ptr_to_struct_containing_descr)
{
  int GC_all_interior_pointers.12;
  long unsigned int D.5466;
  long unsigned int D.5467;
  _Bool D.5468;
  long int D.5469;
  long int D.5470;
  unsigned int D.5473;
  char * * GC_gcjobjfreelist.13;
  long unsigned int D.5475;
  int D.5476;
  _Bool D.5479;
  long int D.5480;
  long int D.5481;
  int GC_gcj_kind.14;
  char * D.5485;
  void * D.5488;
  void * (*<T398>) (size_t) GC_oom_fn.15;
  char * D.5491;
  long unsigned int D.5492;
  long unsigned int D.5493;
  int D.5495;
  char * D.5498;
  register char * op;
  register char * * opp;
  register word lw;

  GC_all_interior_pointers.12 = GC_all_interior_pointers;
  D.5466 = (long unsigned int) GC_all_interior_pointers.12;
  D.5467 = 2048 - D.5466;
  D.5468 = D.5467 >= lb;
  D.5469 = (long int) D.5468;
  D.5470 = __builtin_expect (D.5469, 1);
  if (D.5470 != 0) goto <D.5471>; else goto <D.5472>;
  <D.5471>:
  D.5473 = GC_arrays._size_map[lb];
  lw = (word) D.5473;
  GC_gcjobjfreelist.13 = GC_gcjobjfreelist;
  D.5475 = lw * 8;
  opp = GC_gcjobjfreelist.13 + D.5475;
  D.5476 = GC_test_and_set (&GC_allocate_lock);
  if (D.5476 != 0) goto <D.5477>; else goto <D.5478>;
  <D.5477>:
  GC_lock ();
  <D.5478>:
  op = *opp;
  D.5479 = op == 0B;
  D.5480 = (long int) D.5479;
  D.5481 = __builtin_expect (D.5480, 0);
  if (D.5481 != 0) goto <D.5482>; else goto <D.5483>;
  <D.5482>:
  maybe_finalize ();
  GC_gcj_kind.14 = GC_gcj_kind;
  D.5485 = GC_generic_malloc_inner (lb, GC_gcj_kind.14);
  op = GC_clear_stack (D.5485);
  if (op == 0B) goto <D.5486>; else goto <D.5487>;
  <D.5486>:
  GC_clear (&GC_allocate_lock);
  GC_oom_fn.15 = GC_oom_fn;
  D.5488 = GC_oom_fn.15 (lb);
  return D.5488;
  <D.5487>:
  D.5473 = GC_arrays._size_map[lb];
  lw = (word) D.5473;
  goto <D.5490>;
  <D.5483>:
  D.5491 = MEM[(char * *)op];
  *opp = D.5491;
  D.5492 = GC_arrays._words_allocd;
  D.5493 = D.5492 + lw;
  GC_arrays._words_allocd = D.5493;
  <D.5490>:
  MEM[(void * *)op] = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  goto <D.5494>;
  <D.5472>:
  D.5495 = GC_test_and_set (&GC_allocate_lock);
  if (D.5495 != 0) goto <D.5496>; else goto <D.5497>;
  <D.5496>:
  GC_lock ();
  <D.5497>:
  maybe_finalize ();
  GC_gcj_kind.14 = GC_gcj_kind;
  D.5498 = GC_generic_malloc_inner (lb, GC_gcj_kind.14);
  op = GC_clear_stack (D.5498);
  if (op == 0B) goto <D.5499>; else goto <D.5500>;
  <D.5499>:
  GC_clear (&GC_allocate_lock);
  GC_oom_fn.15 = GC_oom_fn;
  D.5488 = GC_oom_fn.15 (lb);
  return D.5488;
  <D.5500>:
  MEM[(void * *)op] = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  <D.5494>:
  D.5488 = op;
  return D.5488;
}


maybe_finalize ()
{
  int last_finalized_no.16;
  long unsigned int D.5503;
  long unsigned int GC_gc_no.17;
  int GC_is_initialized.18;
  int last_finalized_no.19;
  int D.5511;
  static int last_finalized_no = 0;

  last_finalized_no.16 = last_finalized_no;
  D.5503 = (long unsigned int) last_finalized_no.16;
  GC_gc_no.17 = GC_gc_no;
  if (D.5503 == GC_gc_no.17) goto <D.5505>; else goto <D.5506>;
  <D.5505>:
  return;
  <D.5506>:
  GC_is_initialized.18 = GC_is_initialized;
  if (GC_is_initialized.18 == 0) goto <D.5508>; else goto <D.5509>;
  <D.5508>:
  return;
  <D.5509>:
  GC_clear (&GC_allocate_lock);
  GC_notify_or_invoke_finalizers ();
  GC_gc_no.17 = GC_gc_no;
  last_finalized_no.19 = (int) GC_gc_no.17;
  last_finalized_no = last_finalized_no.19;
  D.5511 = GC_test_and_set (&GC_allocate_lock);
  if (D.5511 != 0) goto <D.5512>; else goto <D.5513>;
  <D.5512>:
  GC_lock ();
  <D.5513>:
}


GC_debug_gcj_malloc (size_t lb, void * ptr_to_struct_containing_descr, const char * s, int i)
{
  int D.5515;
  int GC_all_interior_pointers.20;
  long unsigned int D.5519;
  long unsigned int D.5520;
  long unsigned int D.5521;
  int GC_gcj_debug_kind.21;
  long int lb.22;
  long int ptr_to_struct_containing_descr.23;
  long int D.5527;
  void * D.5528;
  void * (*<T398>) (size_t) GC_oom_fn.24;
  void * * D.5530;
  int GC_debugging_started.25;
  long unsigned int D.5534;
  void * result;

  D.5515 = GC_test_and_set (&GC_allocate_lock);
  if (D.5515 != 0) goto <D.5516>; else goto <D.5517>;
  <D.5516>:
  GC_lock ();
  <D.5517>:
  maybe_finalize ();
  GC_all_interior_pointers.20 = GC_all_interior_pointers;
  D.5519 = (long unsigned int) GC_all_interior_pointers.20;
  D.5520 = lb - D.5519;
  D.5521 = D.5520 + 40;
  GC_gcj_debug_kind.21 = GC_gcj_debug_kind;
  result = GC_generic_malloc_inner (D.5521, GC_gcj_debug_kind.21);
  if (result == 0B) goto <D.5523>; else goto <D.5524>;
  <D.5523>:
  GC_clear (&GC_allocate_lock);
  lb.22 = (long int) lb;
  ptr_to_struct_containing_descr.23 = (long int) ptr_to_struct_containing_descr;
  GC_err_printf ("GC_debug_gcj_malloc(%ld, 0x%lx) returning NIL (", lb.22, ptr_to_struct_containing_descr.23, 0, 0, 0, 0);
  GC_err_puts (s);
  D.5527 = (long int) i;
  GC_err_printf (":%ld)\n", D.5527, 0, 0, 0, 0, 0);
  GC_oom_fn.24 = GC_oom_fn;
  D.5528 = GC_oom_fn.24 (lb);
  return D.5528;
  <D.5524>:
  D.5530 = result + 32;
  *D.5530 = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  GC_debugging_started.25 = GC_debugging_started;
  if (GC_debugging_started.25 == 0) goto <D.5532>; else goto <D.5533>;
  <D.5532>:
  {
    extern int GC_start_debugging ();

    GC_start_debugging ();
  }
  <D.5533>:
  D.5534 = (long unsigned int) i;
  D.5528 = GC_store_debug_info (result, lb, s, D.5534);
  return D.5528;
}


GC_gcj_fast_malloc (size_t lw, void * ptr_to_struct_containing_descr)
{
  char * * GC_gcjobjfreelist.26;
  long unsigned int D.5537;
  int D.5538;
  _Bool D.5541;
  long int D.5542;
  long int D.5543;
  int GC_gcj_kind.27;
  char * D.5547;
  void * D.5550;
  void * (*<T398>) (size_t) GC_oom_fn.28;
  long unsigned int D.5552;
  char * D.5554;
  long unsigned int D.5555;
  long unsigned int D.5556;
  char * op;
  char * * opp;

  GC_gcjobjfreelist.26 = GC_gcjobjfreelist;
  D.5537 = lw * 8;
  opp = GC_gcjobjfreelist.26 + D.5537;
  D.5538 = GC_test_and_set (&GC_allocate_lock);
  if (D.5538 != 0) goto <D.5539>; else goto <D.5540>;
  <D.5539>:
  GC_lock ();
  <D.5540>:
  op = *opp;
  D.5541 = op == 0B;
  D.5542 = (long int) D.5541;
  D.5543 = __builtin_expect (D.5542, 0);
  if (D.5543 != 0) goto <D.5544>; else goto <D.5545>;
  <D.5544>:
  maybe_finalize ();
  GC_gcj_kind.27 = GC_gcj_kind;
  D.5547 = GC_generic_malloc_words_small_inner (lw, GC_gcj_kind.27);
  op = GC_clear_stack (D.5547);
  if (op == 0B) goto <D.5548>; else goto <D.5549>;
  <D.5548>:
  GC_clear (&GC_allocate_lock);
  GC_oom_fn.28 = GC_oom_fn;
  D.5552 = lw << 3;
  D.5550 = GC_oom_fn.28 (D.5552);
  return D.5550;
  <D.5549>:
  goto <D.5553>;
  <D.5545>:
  D.5554 = MEM[(char * *)op];
  *opp = D.5554;
  D.5555 = GC_arrays._words_allocd;
  D.5556 = D.5555 + lw;
  GC_arrays._words_allocd = D.5556;
  <D.5553>:
  MEM[(void * *)op] = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  D.5550 = op;
  return D.5550;
}


GC_debug_gcj_fast_malloc (size_t lw, void * ptr_to_struct_containing_descr, const char * s, int i)
{
  int D.5558;
  int GC_all_interior_pointers.29;
  long unsigned int D.5562;
  long unsigned int D.5563;
  long unsigned int D.5564;
  int GC_gcj_debug_kind.30;
  long int lw.31;
  long int ptr_to_struct_containing_descr.32;
  long int D.5570;
  void * D.5571;
  void * (*<T398>) (size_t) GC_oom_fn.33;
  long unsigned int D.5573;
  void * * D.5574;
  int GC_debugging_started.34;
  long unsigned int D.5578;
  void * result;
  size_t lb;

  lb = lw << 3;
  D.5558 = GC_test_and_set (&GC_allocate_lock);
  if (D.5558 != 0) goto <D.5559>; else goto <D.5560>;
  <D.5559>:
  GC_lock ();
  <D.5560>:
  maybe_finalize ();
  GC_all_interior_pointers.29 = GC_all_interior_pointers;
  D.5562 = (long unsigned int) GC_all_interior_pointers.29;
  D.5563 = lb - D.5562;
  D.5564 = D.5563 + 40;
  GC_gcj_debug_kind.30 = GC_gcj_debug_kind;
  result = GC_generic_malloc_inner (D.5564, GC_gcj_debug_kind.30);
  if (result == 0B) goto <D.5566>; else goto <D.5567>;
  <D.5566>:
  GC_clear (&GC_allocate_lock);
  lw.31 = (long int) lw;
  ptr_to_struct_containing_descr.32 = (long int) ptr_to_struct_containing_descr;
  GC_err_printf ("GC_debug_gcj_fast_malloc(%ld, 0x%lx) returning NIL (", lw.31, ptr_to_struct_containing_descr.32, 0, 0, 0, 0);
  GC_err_puts (s);
  D.5570 = (long int) i;
  GC_err_printf (":%ld)\n", D.5570, 0, 0, 0, 0, 0);
  GC_oom_fn.33 = GC_oom_fn;
  D.5573 = lw << 3;
  D.5571 = GC_oom_fn.33 (D.5573);
  return D.5571;
  <D.5567>:
  D.5574 = result + 32;
  *D.5574 = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  GC_debugging_started.34 = GC_debugging_started;
  if (GC_debugging_started.34 == 0) goto <D.5576>; else goto <D.5577>;
  <D.5576>:
  {
    extern int GC_start_debugging ();

    GC_start_debugging ();
  }
  <D.5577>:
  D.5578 = (long unsigned int) i;
  D.5571 = GC_store_debug_info (result, lb, s, D.5578);
  return D.5571;
}


GC_gcj_malloc_ignore_off_page (size_t lb, void * ptr_to_struct_containing_descr)
{
  int GC_all_interior_pointers.35;
  long unsigned int D.5581;
  long unsigned int D.5582;
  unsigned int D.5585;
  char * * GC_gcjobjfreelist.36;
  long unsigned int D.5587;
  int D.5588;
  int GC_gcj_kind.37;
  char * D.5594;
  char * D.5596;
  long unsigned int D.5597;
  long unsigned int D.5598;
  int D.5600;
  char * D.5603;
  void * D.5606;
  register char * op;
  register char * * opp;
  register word lw;

  GC_all_interior_pointers.35 = GC_all_interior_pointers;
  D.5581 = (long unsigned int) GC_all_interior_pointers.35;
  D.5582 = 2048 - D.5581;
  if (D.5582 >= lb) goto <D.5583>; else goto <D.5584>;
  <D.5583>:
  D.5585 = GC_arrays._size_map[lb];
  lw = (word) D.5585;
  GC_gcjobjfreelist.36 = GC_gcjobjfreelist;
  D.5587 = lw * 8;
  opp = GC_gcjobjfreelist.36 + D.5587;
  D.5588 = GC_test_and_set (&GC_allocate_lock);
  if (D.5588 != 0) goto <D.5589>; else goto <D.5590>;
  <D.5589>:
  GC_lock ();
  <D.5590>:
  op = *opp;
  if (op == 0B) goto <D.5591>; else goto <D.5592>;
  <D.5591>:
  maybe_finalize ();
  GC_gcj_kind.37 = GC_gcj_kind;
  D.5594 = GC_generic_malloc_inner_ignore_off_page (lb, GC_gcj_kind.37);
  op = GC_clear_stack (D.5594);
  D.5585 = GC_arrays._size_map[lb];
  lw = (word) D.5585;
  goto <D.5595>;
  <D.5592>:
  D.5596 = MEM[(char * *)op];
  *opp = D.5596;
  D.5597 = GC_arrays._words_allocd;
  D.5598 = D.5597 + lw;
  GC_arrays._words_allocd = D.5598;
  <D.5595>:
  MEM[(void * *)op] = ptr_to_struct_containing_descr;
  GC_clear (&GC_allocate_lock);
  goto <D.5599>;
  <D.5584>:
  D.5600 = GC_test_and_set (&GC_allocate_lock);
  if (D.5600 != 0) goto <D.5601>; else goto <D.5602>;
  <D.5601>:
  GC_lock ();
  <D.5602>:
  maybe_finalize ();
  GC_gcj_kind.37 = GC_gcj_kind;
  D.5603 = GC_generic_malloc_inner_ignore_off_page (lb, GC_gcj_kind.37);
  op = GC_clear_stack (D.5603);
  if (op != 0B) goto <D.5604>; else goto <D.5605>;
  <D.5604>:
  MEM[(void * *)op] = ptr_to_struct_containing_descr;
  <D.5605>:
  GC_clear (&GC_allocate_lock);
  <D.5599>:
  D.5606 = op;
  return D.5606;
}


