#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ pA(char *);
void debug_heap(void) {
  pA("junkApi_putConstString('heap_socket[');");
  pA("junkApi_putStringDec('\\1', heap_socket, 11, 1);");
  pA("junkApi_putConstString('], heap_base[');");
  pA("junkApi_putStringDec('\\1', heap_base, 11, 1);");
  pA("junkApi_putConstString('], heap_offset[');");
  pA("junkApi_putStringDec('\\1', heap_offset, 11, 1);");
  pA("junkApi_putConstString(']\\n');");
}


x86 assembly (clang, -O0):
<debug_heap>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <pA@plt>
lea    0xf01(%rip),%rdi
call   1030 <pA@plt>
lea    0xf25(%rip),%rdi
call   1030 <pA@plt>
lea    0xf42(%rip),%rdi
call   1030 <pA@plt>
lea    0xf64(%rip),%rdi
call   1030 <pA@plt>
lea    0xf83(%rip),%rdi
call   1030 <pA@plt>
lea    0xfa7(%rip),%rdi
call   1030 <pA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_heap>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <pA@plt>
lea    0xf04(%rip),%rdi
call   1030 <pA@plt>
lea    0xf28(%rip),%rdi
call   1030 <pA@plt>
lea    0xf45(%rip),%rdi
call   1030 <pA@plt>
lea    0xf67(%rip),%rdi
call   1030 <pA@plt>
lea    0xf86(%rip),%rdi
call   1030 <pA@plt>
lea    0xfaa(%rip),%rdi
pop    %rax
jmp    1030 <pA@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"junkApi_putConstString('heap_socket[');\00"
@.str.1 = [48 x i8] c"junkApi_putStringDec('\\1', heap_socket, 11, 1);\00"
@.str.2 = [41 x i8] c"junkApi_putConstString('], heap_base[');\00"
@.str.3 = [46 x i8] c"junkApi_putStringDec('\\1', heap_base, 11, 1);\00"
@.str.4 = [43 x i8] c"junkApi_putConstString('], heap_offset[');\00"
@.str.5 = [48 x i8] c"junkApi_putStringDec('\\1', heap_offset, 11, 1);\00"
@.str.6 = [31 x i8] c"junkApi_putConstString(']\\n');\00"
define void @debug_heap() {
%1 = call i32 @pA(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @pA(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @pA(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @pA(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @pA(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @pA(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @pA(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"junkApi_putConstString('heap_socket[');\00"
@.str.1 = [48 x i8] c"junkApi_putStringDec('\\1', heap_socket, 11, 1);\00"
@.str.2 = [41 x i8] c"junkApi_putConstString('], heap_base[');\00"
@.str.3 = [46 x i8] c"junkApi_putStringDec('\\1', heap_base, 11, 1);\00"
@.str.4 = [43 x i8] c"junkApi_putConstString('], heap_offset[');\00"
@.str.5 = [48 x i8] c"junkApi_putStringDec('\\1', heap_offset, 11, 1);\00"
@.str.6 = [31 x i8] c"junkApi_putConstString(']\\n');\00"
define void @debug_heap() {
%1 = tail call i32 @pA(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pA(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @pA(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @pA(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @pA(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @pA(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @pA(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
ret void
}