xunge/DecIR huggingface dataset:
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int get_mode(int pi, unsigned gpio) {
  return pigpio_command(pi, 1, gpio, 0, 1);
}


x86 assembly (clang, -O0):
<get_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%r8d
xor    %ecx,%ecx
mov    %r8d,%esi
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mode>:
mov    %esi,%edx
mov    $0x1,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @get_mode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @pigpio_command(i32 %5, i32 1, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_mode(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 1, i32 %1, i32 0, i32 1)
ret i32 %3
}
void foo_2_1_2_1_2_2_1_1_2() {}


x86 assembly (clang, -O0):
<foo_2_1_2_1_2_2_1_1_2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_2_1_2_1_2_2_1_1_2>:
ret

LLVM IR (-O0):
define void @foo_2_1_2_1_2_2_1_1_2() {
ret void
}

LLVM IR (-O2):
define void @foo_2_1_2_1_2_2_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
int /*<<< orphan*/ ft_putstr(char *);
char **ft_strsplit(char *, char);
int size_of_2d_array(char **);
void deal_denial(char *path) {
  char **s;
  s = ft_strsplit(path, '/');
  ft_putstr("ls: ");
  ft_putstr(s[size_of_2d_array(s) - 1]);
  ft_putstr(": Permission denied\n");
  free(s);
}


x86 assembly (clang, -O0):
<deal_denial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1060 <ft_strsplit@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9b(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <size_of_2d_array@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <ft_putstr@plt>
lea    0xe6e(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deal_denial>:
push   %rbx
mov    $0x2f,%esi
call   1060 <ft_strsplit@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    %rbx,%rdi
call   1040 <size_of_2d_array@plt>
cltq
mov    -0x8(%rbx,%rax,8),%rdi
call   1050 <ft_putstr@plt>
lea    0xe90(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ls: \00"
@.str.1 = [21 x i8] c": Permission denied\0A\00"
define void @deal_denial(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8** @ft_strsplit(i8* %4, i8 signext 47)
store i8** %5, i8*** %3
%6 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = load i8**, i8*** %3
%8 = load i8**, i8*** %3
%9 = call i32 @size_of_2d_array(i8** %8)
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8*, i8** %7, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @ft_putstr(i8* %13)
%15 = call i32 @ft_putstr(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%16 = load i8**, i8*** %3
%17 = call i32 @free(i8** %16)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"ls: \00"
@.str.1 = [21 x i8] c": Permission denied\0A\00"
define void @deal_denial(i8* %0) {
%2 = tail call i8** @ft_strsplit(i8* %0, i8 signext 47)
%3 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @size_of_2d_array(i8** %2)
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8*, i8** %2, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i32 @ft_putstr(i8* %8)
%10 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @free(i8** %2)
ret void
}
/* Variables and functions */
double pow(int, double);
double test_func_4(double x) { return pow(2, x) - 3 * x; }


x86 assembly (clang, -O0):
<test_func_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xec4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_4>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  0xed3(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @test_func_4(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(i32 2, double %3)
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %5, double %4)
ret double %6
}

LLVM IR (-O2):
define double @test_func_4(double %0) {
%2 = tail call double @pow(i32 2, double %0)
%3 = tail call double @llvm.fmuladd.f64(double %0, double -3.000000e+00, double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Terminal_begin_raw_mode();
int /*<<< orphan*/ Terminal_clear_screen(int);
int /*<<< orphan*/ Terminal_reset_cursor(int /*<<< orphan*/);
void init_screen(void) {
  Terminal_begin_raw_mode();
  Terminal_reset_cursor(0);
  Terminal_clear_screen(1);
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <Terminal_begin_raw_mode@plt>
xor    %edi,%edi
call   1040 <Terminal_reset_cursor@plt>
mov    $0x1,%edi
call   1030 <Terminal_clear_screen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %rax
xor    %eax,%eax
call   1050 <Terminal_begin_raw_mode@plt>
xor    %edi,%edi
call   1040 <Terminal_reset_cursor@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <Terminal_clear_screen@plt>

LLVM IR (-O0):
define void @init_screen() {
%1 = call i32 (...) @Terminal_begin_raw_mode()
%2 = call i32 @Terminal_reset_cursor(i32 0)
%3 = call i32 @Terminal_clear_screen(i32 1)
ret void
}

LLVM IR (-O2):
define void @init_screen() {
%1 = tail call i32 (...) @Terminal_begin_raw_mode()
%2 = tail call i32 @Terminal_reset_cursor(i32 0)
%3 = tail call i32 @Terminal_clear_screen(i32 1)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
unsigned int get(unsigned int val) {
  uint64_t result;
  result = val;
  result *= (335544323);
  result += (65536);
  result %= (1000000007);
  return (unsigned int)result;
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x14000003,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3b9aca07,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
imul   $0x14000003,%edi,%eax
add    $0x10000,%eax
cltq
imul   $0x44b82f99,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x3c,%rcx
add    %edx,%ecx
imul   $0x3b9aca07,%ecx,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 335544323
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 65536
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = srem i32 %9, 1000000007
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @get(i32 %0) {
%2 = mul nsw i32 %0, 335544323
%3 = add nsw i32 %2, 65536
%4 = srem i32 %3, 1000000007
ret i32 %4
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
double sin(double);
int sinval(int freq, int rate, int ampl, int p) {
  int16_t v;
  v = ((double)ampl * 0x7fff / 100) *
      sin((double)p / rate * freq * (2 * 3.141592653589793));
  return v;
}


x86 assembly (clang, -O0):
<sinval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xedf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9b(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinval>:
push   %rax
cvtsi2sd %edx,%xmm0
mulsd  0xee3(%rip),%xmm0
divsd  0xee3(%rip),%xmm0
movsd  %xmm0,(%rsp)
cvtsi2sd %ecx,%xmm1
cvtsi2sd %esi,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xec7(%rip),%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sinval(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = sitofp i32 %10 to double
%12 = fmul double %11, 3.276700e+04
%13 = fdiv double %12, 1.000000e+02
%14 = load i32, i32* %8
%15 = sitofp i32 %14 to double
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to double
%18 = fdiv double %15, %17
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to double
%21 = fmul double %18, %20
%22 = fmul double %21, 0x401921FB54442D18
%23 = call double @sin(double %22)
%24 = fmul double %13, %23
%25 = fptosi double %24 to i32
store i32 %25, i32* %9
%26 = load i32, i32* %9
ret i32 %26
}

LLVM IR (-O2):
define i32 @sinval(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sitofp i32 %2 to double
%6 = fmul double %5, 3.276700e+04
%7 = fdiv double %6, 1.000000e+02
%8 = sitofp i32 %3 to double
%9 = sitofp i32 %1 to double
%10 = fdiv double %8, %9
%11 = sitofp i32 %0 to double
%12 = fmul double %10, %11
%13 = fmul double %12, 0x401921FB54442D18
%14 = tail call double @sin(double %13)
%15 = fmul double %7, %14
%16 = fptosi double %15 to i32
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void sigint(void) { print("^C catched!\n\r"); }


x86 assembly (clang, -O0):
<sigint>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigint>:
lea    0xee9(%rip),%rdi
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"^C catched!\0A\0D\00"
define void @sigint() {
%1 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"^C catched!\0A\0D\00"
define void @sigint() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _cb_print(void *, scalar_t__ *, scalar_t__ *,
                             int /*<<< orphan*/);
uint64_t cb_print(void *p) {
  uint64_t n_nodes = 0, n_objs = 0;
  _cb_print(p, &n_nodes, &n_objs, 0);
  return n_objs - 2;
}


x86 assembly (clang, -O0):
<cb_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <_cb_print@plt>
mov    -0x18(%rbp),%rax
sub    $0x2,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_print>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %ecx,%ecx
call   1030 <_cb_print@plt>
mov    0x8(%rsp),%rax
add    $0xfffffffffffffffe,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @cb_print(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
store i64 0, i64* %4
%5 = load i8*, i8** %2
%6 = call i32 @_cb_print(i8* %5, i64* %3, i64* %4, i32 0)
%7 = load i64, i64* %4
%8 = sub nsw i64 %7, 2
ret i64 %8
}

LLVM IR (-O2):
define i64 @cb_print(i8* %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = call i32 @_cb_print(i8* %0, i64* %2, i64* %3, i32 0)
%7 = load i64, i64* %3
%8 = add nsw i64 %7, -2
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ west_fill(int);
void west_fill_test(void **state) {
  assert_int_equal(west_fill(0x80ul), 0x00000000000000FFul);
}


x86 assembly (clang, -O0):
<west_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x80,%edi
call   1030 <west_fill@plt>
mov    %eax,%edi
mov    $0xff,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<west_fill_test>:
push   %rax
mov    $0x80,%edi
call   1030 <west_fill@plt>
mov    %eax,%edi
mov    $0xff,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @west_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @west_fill(i32 128)
%4 = call i32 @assert_int_equal(i32 %3, i32 255)
ret void
}

LLVM IR (-O2):
define void @west_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @west_fill(i32 128)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 255)
ret void
}
void sendImage() {}


x86 assembly (clang, -O0):
<sendImage>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendImage>:
ret

LLVM IR (-O0):
define void @sendImage() {
ret void
}

LLVM IR (-O2):
define void @sendImage() {
ret void
}
float Sleef_cbrtf_u35(float x) { return __builtin_cbrtf(x); }


x86 assembly (clang, -O0):
<Sleef_cbrtf_u35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cbrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_cbrtf_u35>:
jmp    1030 <cbrtf@plt>

LLVM IR (-O0):
define float @Sleef_cbrtf_u35(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @cbrtf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_cbrtf_u35(float %0) {
%2 = tail call float @cbrtf(float %0)
ret float %2
}
/* Variables and functions */
int cpu_gettotalcpu();
int /*<<< orphan*/ cpuintrf_exit_cpu(int);
void cpuexec_exit(void) {
  int cpunum;
  for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
    cpuintrf_exit_cpu(cpunum);
}


x86 assembly (clang, -O0):
<cpuexec_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <cpu_gettotalcpu@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
jge    115f <cpuexec_exit+0x3f>
mov    -0x4(%rbp),%edi
call   1030 <cpuintrf_exit_cpu@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <cpuexec_exit+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuexec_exit>:
push   %rbx
xor    %eax,%eax
call   1040 <cpu_gettotalcpu@plt>
test   %eax,%eax
jle    1145 <cpuexec_exit+0x25>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %ebx,%edi
call   1030 <cpuintrf_exit_cpu@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <cpu_gettotalcpu@plt>
cmp    %eax,%ebx
jl     1130 <cpuexec_exit+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @cpuexec_exit() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = call i32 (...) @cpu_gettotalcpu()
%5 = icmp slt i32 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i32, i32* %1
%8 = call i32 @cpuintrf_exit_cpu(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @cpuexec_exit() {
%1 = tail call i32 (...) @cpu_gettotalcpu()
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ 0, %0 ]
%5 = tail call i32 @cpuintrf_exit_cpu(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = tail call i32 (...) @cpu_gettotalcpu()
%8 = icmp slt i32 %6, %7
br i1 %8, label %3, label %9
9: ; preds = %3, %0
ret void
}
int fix_mul(int a, int b) { return (int)((long long)a * (long long)b >> 13); }


x86 assembly (clang, -O0):
<fix_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
sar    $0xd,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_mul>:
movslq %edi,%rcx
movslq %esi,%rax
imul   %rcx,%rax
shr    $0xd,%rax
ret

LLVM IR (-O0):
define i32 @fix_mul(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul nsw i64 %6, %8
%10 = ashr i64 %9, 13
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @fix_mul(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = sext i32 %1 to i64
%5 = mul nsw i64 %4, %3
%6 = lshr i64 %5, 13
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
char *strchr_rev(const char *s, int ch, const char *start) {
  while (*s != ch) {
    if (s == start)
      return NULL;
    s--;
  }
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchr_rev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
je     114b <strchr_rev+0x4b>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    113a <strchr_rev+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1153 <strchr_rev+0x53>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <strchr_rev+0xf>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr_rev>:
mov    %rdi,%rax
movsbl (%rdi),%ecx
cmp    %esi,%ecx
je     1121 <strchr_rev+0x21>
nopw   0x0(%rax,%rax,1)
cmp    %rdx,%rax
je     1122 <strchr_rev+0x22>
movsbl -0x1(%rax),%ecx
add    $0xffffffffffffffff,%rax
cmp    %esi,%ecx
jne    1110 <strchr_rev+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @strchr_rev(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
br label %8
8: ; preds = %19, %3
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i32, i32* %6
%13 = icmp ne i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %8
%15 = load i8*, i8** %5
%16 = load i8*, i8** %7
%17 = icmp eq i8* %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i8* null, i8** %4
br label %24
19: ; preds = %14
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i32 -1
store i8* %21, i8** %5
br label %8
22: ; preds = %8
%23 = load i8*, i8** %5
store i8* %23, i8** %4
br label %24
24: ; preds = %22, %18
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
define i8* @strchr_rev(i8* %0, i32 %1, i8* readnone %2) {
%4 = load i8, i8* %0
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, %1
br i1 %6, label %15, label %7
7: ; preds = %3, %10
%8 = phi i8* [ %11, %10 ], [ %0, %3 ]
%9 = icmp eq i8* %8, %2
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = getelementptr inbounds i8, i8* %8, i64 -1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, %1
br i1 %14, label %15, label %7
15: ; preds = %7, %10, %3
%16 = phi i8* [ %0, %3 ], [ %11, %10 ], [ null, %7 ]
ret i8* %16
}
void out_str_dec(fmt, str, n) const char fmt[], str[];
int n;
{
  printf(fmt, str, n);
  out_line_count(fmt);
  out_line_count(str);
}


x86 assembly (clang, -O0):
<out_str_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <out_line_count@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <out_line_count@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_str_dec>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <out_line_count@plt>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <out_line_count@plt>

LLVM IR (-O0):
define void @out_str_dec(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %11)
%13 = load i8*, i8** %5
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %13)
ret void
}

LLVM IR (-O2):
define void @out_str_dec(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1, i32 %2)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %0)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %1)
ret void
}
void g_value_set_param() {}


x86 assembly (clang, -O0):
<g_value_set_param>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_value_set_param>:
ret

LLVM IR (-O0):
define void @g_value_set_param() {
ret void
}

LLVM IR (-O2):
define void @g_value_set_param() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (x > 0 && y < 0) {
    x = x + y;
    y--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1173 <main+0x63>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %20
14: ; preds = %12
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, -1
store i32 %19, i32* %3
br label %6
20: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
struct xxxid_stats_arr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _arr_free(struct xxxid_stats_arr *, int);
void arr_free(struct xxxid_stats_arr *pa) { _arr_free(pa, 1); }


x86 assembly (clang, -O0):
<arr_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <_arr_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arr_free>:
mov    $0x1,%esi
jmp    1030 <_arr_free@plt>

LLVM IR (-O0):
%struct.xxxid_stats_arr = type { i32 }
define void @arr_free(%struct.xxxid_stats_arr* %0) {
%2 = alloca %struct.xxxid_stats_arr*
store %struct.xxxid_stats_arr* %0, %struct.xxxid_stats_arr** %2
%3 = load %struct.xxxid_stats_arr*, %struct.xxxid_stats_arr** %2
%4 = call i32 @_arr_free(%struct.xxxid_stats_arr* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.xxxid_stats_arr = type { i32 }
define void @arr_free(%struct.xxxid_stats_arr* %0) {
%2 = tail call i32 @_arr_free(%struct.xxxid_stats_arr* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int rec(int);
int main() {
  int res = 0;
  res = rec(3);
  res = res + rec(3);
  res = res + rec(3);
  res = res + rec(3);
  assert(res == 12);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ebx
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    $0x3,%edi
call   1040 <rec@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %edi,%edi
cmp    $0xc,%ebp
sete   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @rec(i32 3)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @rec(i32 3)
%6 = add nsw i32 %4, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @rec(i32 3)
%9 = add nsw i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @rec(i32 3)
%12 = add nsw i32 %10, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 12
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rec(i32 3)
%2 = tail call i32 @rec(i32 3)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @rec(i32 3)
%5 = add nsw i32 %3, %4
%6 = tail call i32 @rec(i32 3)
%7 = add nsw i32 %5, %6
%8 = icmp eq i32 %7, 12
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret i32 %7
}
char *copy(s)
char *s;
{
  char *new;
  new = (char *)malloc((int)strlen(s) + 1);
  strcpy(new, s);
  return (new);
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @copy(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 32
%4 = add i64 %3, 4294967296
%5 = ashr exact i64 %4, 32
%6 = tail call i8* @malloc(i64 %5)
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %0)
ret i8* %6
}
void syslog(int priority, const char *message, ...) {
  priority++;
  message++;
  return;
}


x86 assembly (clang, -O0):
<syslog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<syslog>:
ret

LLVM IR (-O0):
define void @syslog(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %4
ret void
}

LLVM IR (-O2):
define void @syslog(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rgb_copy(void const *, void *, int, int, int, int, int);
void rbg888_copy(const void *psrc, void *pdst, int sw, int sh, int dw, int dh) {
  rgb_copy(psrc, pdst, sw, sh, dw, dh, 24);
}


x86 assembly (clang, -O0):
<rbg888_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
movl   $0x18,(%rsp)
call   1030 <rgb_copy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rbg888_copy>:
push   %rax
movl   $0x18,(%rsp)
call   1030 <rgb_copy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @rbg888_copy(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @rgb_copy(i8* %13, i8* %14, i32 %15, i32 %16, i32 %17, i32 %18, i32 24)
ret void
}

LLVM IR (-O2):
define void @rbg888_copy(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @rgb_copy(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 24)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ct_init_test(int, char **);
int /*<<< orphan*/ __ct_run_test();
int main(int argc, char **argv) {
  __ct_init_test(argc, argv);
  __ct_run_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <__ct_init_test@plt>
mov    $0x0,%al
call   1030 <__ct_run_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <__ct_init_test@plt>
xor    %eax,%eax
call   1030 <__ct_run_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @__ct_init_test(i32 %6, i8** %7)
%9 = call i32 (...) @__ct_run_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @__ct_init_test(i32 %0, i8** %1)
%4 = tail call i32 (...) @__ct_run_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ DISPLAYTEXT_it;
void DISPLAYTEXT_free(ASN1_STRING *a) {
  ASN1_item_free((ASN1_VALUE *)a, &DISPLAYTEXT_it);
}


x86 assembly (clang, -O0):
<DISPLAYTEXT_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rsi
call   1030 <ASN1_item_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DISPLAYTEXT_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@DISPLAYTEXT_it = global i32 0
define void @DISPLAYTEXT_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @DISPLAYTEXT_it)
ret void
}

LLVM IR (-O2):
@DISPLAYTEXT_it = global i32 0
define void @DISPLAYTEXT_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @DISPLAYTEXT_it)
ret void
}
/* Variables and functions */
unsigned long get_sp(void) { __asm__("movl %esp,%eax"); }


x86 assembly (clang, -O0):
<get_sp>:
push   %rbp
mov    %rsp,%rbp
mov    %esp,%eax
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sp>:
mov    %esp,%eax
ret

LLVM IR (-O0):
define i64 @get_sp() {
%1 = alloca i64
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @get_sp() {
tail call void asm sideeffect "movl %esp,%eax", "~{dirflag},~{fpsr},~{flags}"()
ret i64 undef
}
/* Type definitions */
struct ip_address {
  int dummy;
};

/* Variables and functions */
int IFNAMSIZ;
int get_ip_device(struct ip_address const *, char *);
int is_ip_local(const struct ip_address *ip) {
  char dev_name[IFNAMSIZ];
  return get_ip_device(ip, dev_name);
}


x86 assembly (clang, -O0):
<is_ip_local>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_ip_device@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ip_local>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
call   1030 <get_ip_device@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
%struct.ip_address = type { i32 }
@IFNAMSIZ = global i32 0
define i32 @is_ip_local(%struct.ip_address* %0) {
%2 = alloca %struct.ip_address*
%3 = alloca i8*
%4 = alloca i64
store %struct.ip_address* %0, %struct.ip_address** %2
%5 = load i32, i32* @IFNAMSIZ
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8, i64 %6
store i64 %6, i64* %4
%9 = load %struct.ip_address*, %struct.ip_address** %2
%10 = call i32 @get_ip_device(%struct.ip_address* %9, i8* %8)
%11 = load i8*, i8** %3
ret i32 %10
}

LLVM IR (-O2):
%struct.ip_address = type { i32 }
@IFNAMSIZ = global i32 0
define i32 @is_ip_local(%struct.ip_address* %0) {
%2 = load i32, i32* @IFNAMSIZ
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @get_ip_device(%struct.ip_address* %0, i8* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void SetReplaceMode() { WRITETEST("\033[4l"); }


x86 assembly (clang, -O0):
<SetReplaceMode>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <WRITETEST@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetReplaceMode>:
lea    0xee9(%rip),%rdi
jmp    1030 <WRITETEST@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[4l\00"
define void @SetReplaceMode() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[4l\00"
define void @SetReplaceMode() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ box_unsigned_4(int /*<<< orphan*/);
int /*<<< orphan*/ dpop();
int /*<<< orphan*/ float_bits(int /*<<< orphan*/);
int /*<<< orphan*/ untag_float(int /*<<< orphan*/);
void primitive_float_bits(void) {
  box_unsigned_4(float_bits(untag_float(dpop())));
}


x86 assembly (clang, -O0):
<primitive_float_bits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float@plt>
mov    %eax,%edi
call   1030 <float_bits@plt>
mov    %eax,%edi
call   1060 <box_unsigned_4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_bits>:
push   %rax
xor    %eax,%eax
call   1040 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float@plt>
mov    %eax,%edi
call   1030 <float_bits@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <box_unsigned_4@plt>

LLVM IR (-O0):
define void @primitive_float_bits() {
%1 = call i32 (...) @dpop()
%2 = call i32 @untag_float(i32 %1)
%3 = call i32 @float_bits(i32 %2)
%4 = call i32 @box_unsigned_4(i32 %3)
ret void
}

LLVM IR (-O2):
define void @primitive_float_bits() {
%1 = tail call i32 (...) @dpop()
%2 = tail call i32 @untag_float(i32 %1)
%3 = tail call i32 @float_bits(i32 %2)
%4 = tail call i32 @box_unsigned_4(i32 %3)
ret void
}
/* Type definitions */
struct diskfree_query {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ syscall2(int, unsigned int);
void diskfree(struct diskfree_query *query) {
  syscall2(522, (unsigned int)query);
}


x86 assembly (clang, -O0):
<diskfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    $0x20a,%edi
call   1030 <syscall2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diskfree>:
mov    %rdi,%rsi
mov    $0x20a,%edi
jmp    1030 <syscall2@plt>

LLVM IR (-O0):
%struct.diskfree_query = type { i32 }
define void @diskfree(%struct.diskfree_query* %0) {
%2 = alloca %struct.diskfree_query*
store %struct.diskfree_query* %0, %struct.diskfree_query** %2
%3 = load %struct.diskfree_query*, %struct.diskfree_query** %2
%4 = ptrtoint %struct.diskfree_query* %3 to i32
%5 = call i32 @syscall2(i32 522, i32 %4)
ret void
}

LLVM IR (-O2):
%struct.diskfree_query = type { i32 }
define void @diskfree(%struct.diskfree_query* %0) {
%2 = ptrtoint %struct.diskfree_query* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @syscall2(i32 522, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void vtkParse_FreePath(char *filepath) {
  if (filepath) {
    free(filepath);
  }
}


x86 assembly (clang, -O0):
<vtkParse_FreePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <vtkParse_FreePath+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vtkParse_FreePath>:
test   %rdi,%rdi
je     111a <vtkParse_FreePath+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @vtkParse_FreePath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @vtkParse_FreePath(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ allocator_always_fail();
int /*<<< orphan*/ allocator_free(int /*<<< orphan*/, int /*<<< orphan*/);
void _ensure_allocator_always_fail_free_copes_with_null_address(void) {
  allocator_free(0, allocator_always_fail());
}


x86 assembly (clang, -O0):
<_ensure_allocator_always_fail_free_copes_with_null_address>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <allocator_always_fail@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1030 <allocator_free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ensure_allocator_always_fail_free_copes_with_null_address>:
push   %rax
xor    %eax,%eax
call   1040 <allocator_always_fail@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <allocator_free@plt>

LLVM IR (-O0):
define void @_ensure_allocator_always_fail_free_copes_with_null_address() {
%1 = call i32 (...) @allocator_always_fail()
%2 = call i32 @allocator_free(i32 0, i32 %1)
ret void
}

LLVM IR (-O2):
define void @_ensure_allocator_always_fail_free_copes_with_null_address() {
%1 = tail call i32 (...) @allocator_always_fail()
%2 = tail call i32 @allocator_free(i32 0, i32 %1)
ret void
}
void gtk_tree_row_reference_new_proxy() {}


x86 assembly (clang, -O0):
<gtk_tree_row_reference_new_proxy>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_tree_row_reference_new_proxy>:
ret

LLVM IR (-O0):
define void @gtk_tree_row_reference_new_proxy() {
ret void
}

LLVM IR (-O2):
define void @gtk_tree_row_reference_new_proxy() {
ret void
}
void gtk_table_get_homogeneous() {}


x86 assembly (clang, -O0):
<gtk_table_get_homogeneous>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_table_get_homogeneous>:
ret

LLVM IR (-O0):
define void @gtk_table_get_homogeneous() {
ret void
}

LLVM IR (-O2):
define void @gtk_table_get_homogeneous() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nthFib(int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int nth;
  scanf("%d", &nth);
  nthFib(nth);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <nthFib@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <nthFib@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @nthFib(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @nthFib(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: test_myjoin %PID\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: test_myjoin %PID\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: test_myjoin %PID\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR81_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMR81_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <U_WMRNOTIMPLEMENTED_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMR81_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR81_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR81_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tokenise(char *);
int main() {
  char *test = "select mycol from test where city = \"Auckland\" ; ";
  tokenise(test);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <tokenise@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <tokenise@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"select mycol from test where city = \22Auckland\22 ; \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @tokenise(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"select mycol from test where city = \22Auckland\22 ; \00"
define i32 @main() {
%1 = tail call i32 @tokenise(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void closeHTMLBody() { printf("</p>%s\n", "</body></html>"); }


x86 assembly (clang, -O0):
<closeHTMLBody>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeHTMLBody>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"</p>%s\0A\00"
@.str.1 = [15 x i8] c"</body></html>\00"
define void @closeHTMLBody() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"</p>%s\0A\00"
@.str.1 = [15 x i8] c"</body></html>\00"
define void @closeHTMLBody() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}