// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/xmalloc.c
// Function: xmalloc_dump_leaks
int
xmalloc_dump_leaks(void)
{
  int i;
  int num_leaks = 0;
  int leaked_bytes = 0;
  hashTableItem *item;

  xmalloc_init();

  for (i = 0; i < TABLE_SIZE; i++)
    {
      item = xmalloc_table->table[i];
      while (item != NULL)
	{
	  printf("%s:%d: %s: %d bytes at %p not freed\n",
		 item->file, item->line, item->func, item->bytes, item->ptr);
	  num_leaks++;
	  leaked_bytes += item->bytes;
	  item = item->next;
	}
    }
  if (num_leaks == 0)
    printf("No memory leaks.\n");
  else
    printf("%d unfreed memory chuncks, total %d unfreed bytes.\n",
	   num_leaks, leaked_bytes);
  printf("Peak memory consumption %d bytes (%.1f kB, %.1f MB) in %d blocks ",
	 xmalloc_peak, (double)xmalloc_peak / 1024,
	 (double)xmalloc_peak / (1024*1024), xmalloc_peak_blocks);
  printf("(average ");
  if (xmalloc_peak_blocks)
    printf("%d", ((xmalloc_peak + xmalloc_peak_blocks / 2)
		  / xmalloc_peak_blocks));
  else
    printf("N/A");
  printf(" bytes per block).\n");

  return num_leaks;
}

// Assembly:
subq $0x28, %rsp
movl $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
callq 0x4c41d0
movl $0x0, 0x24(%rsp)
cmpl $0x100, 0x24(%rsp)      # imm = 0x100
jge 0x4c4345
movq 0x143f62(%rip), %rax    # 0x608218
movq (%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x4c4333
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %edx
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rax
movl 0x8(%rax), %r8d
movq 0x10(%rsp), %rax
movq (%rax), %r9
leaq 0xbbcf8(%rip), %rdi     # 0x57fff9
movb $0x0, %al
callq 0x2f300
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x4c42c7
jmp 0x4c4335
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x4c42a1
cmpl $0x0, 0x20(%rsp)
jne 0x4c435c
leaq 0xbbccb(%rip), %rdi     # 0x58001e
movb $0x0, %al
callq 0x2f300
jmp 0x4c4372
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %edx
leaq 0xbbcc5(%rip), %rdi     # 0x580030
movb $0x0, %al
callq 0x2f300
movl 0x143ea8(%rip), %esi    # 0x608220
cvtsi2sdl 0x143ea0(%rip), %xmm0 # 0x608220
movsd 0x4cdc0(%rip), %xmm1    # 0x511148
divsd %xmm1, %xmm0
cvtsi2sdl 0x143e8c(%rip), %xmm1 # 0x608220
movsd 0x454dc(%rip), %xmm2    # 0x509878
divsd %xmm2, %xmm1
movl 0x143e7e(%rip), %edx    # 0x608224
leaq 0xbbcb7(%rip), %rdi     # 0x580064
movb $0x2, %al
callq 0x2f300
leaq 0xbbceb(%rip), %rdi     # 0x5800a6
movb $0x0, %al
callq 0x2f300
cmpl $0x0, 0x143e5b(%rip)    # 0x608224
je 0x4c4404
movl 0x143e4f(%rip), %eax    # 0x608220
movl %eax, 0xc(%rsp)
movl 0x143e49(%rip), %eax    # 0x608224
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xc(%rsp), %eax
addl %ecx, %eax
cltd
idivl 0x143e32(%rip)          # 0x608224
movl %eax, %esi
leaq 0xb5ff4(%rip), %rdi     # 0x57a3ef
movb $0x0, %al
callq 0x2f300
jmp 0x4c4412
leaq 0xbbca5(%rip), %rdi     # 0x5800b0
movb $0x0, %al
callq 0x2f300
leaq 0xbbc9b(%rip), %rdi     # 0x5800b4
movb $0x0, %al
callq 0x2f300
movl 0x20(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)