xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float fahrenheit, celsius;
  printf("Enter fahrenheit temperture: ");
  scanf("%f", &fahrenheit);
  celsius = (fahrenheit - 32.0f) * (5.0f / 9.0f);
  printf("Celsius equivalent: %.2f\n", celsius);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xeaa(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe9a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
addss  0xeb2(%rip),%xmm0
mulss  0xeae(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter fahrenheit temperture: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [26 x i8] c"Celsius equivalent: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fsub float %6, 3.200000e+01
%8 = fmul float %7, 0x3FE1C71C80000000
store float %8, float* %3
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter fahrenheit temperture: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [26 x i8] c"Celsius equivalent: %.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fadd float %5, -3.200000e+01
%7 = fmul float %6, 0x3FE1C71C80000000
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
void ini(char ar2[19][19]) {
  int i, j;
  for (i = 0; i < 19; i++)
    for (j = 0; j < 19; j++)
      ar2[i][j] = ' ';
}


x86 assembly (clang, -O0):
<ini>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x13,-0xc(%rbp)
jge    1162 <ini+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x13,-0x10(%rbp)
jge    114f <ini+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x13,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <ini+0x20>
jmp    1154 <ini+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ini+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini>:
push   %rax
mov    $0x169,%edx
mov    $0x20,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ini([19 x i8]* %0) {
%2 = alloca [19 x i8]*
%3 = alloca i32
%4 = alloca i32
store [19 x i8]* %0, [19 x i8]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 19
br i1 %7, label %8, label %27
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %20, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 19
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load [19 x i8]*, [19 x i8]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [19 x i8], [19 x i8]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [19 x i8], [19 x i8]* %16, i64 0, i64 %18
store i8 32, i8* %19
br label %20
20: ; preds = %12
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %9
23: ; preds = %9
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ini([19 x i8]* nocapture writeonly %0) {
%2 = getelementptr [19 x i8], [19 x i8]* %0, i64 0, i64 0
ret void
}
printlinkedlisttofile() {}


x86 assembly (clang, -O0):
<printlinkedlisttofile>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @printlinkedlisttofile() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free2a(int **);
int **malloc2a(int, int);
int main() {
  int **ret = malloc2a(3, 4);
  free2a(ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <malloc2a@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free2a@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <malloc2a@plt>
mov    %rax,%rdi
call   1030 <free2a@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32**
store i32 0, i32* %1
%3 = call i32** @malloc2a(i32 3, i32 4)
store i32** %3, i32*** %2
%4 = load i32**, i32*** %2
%5 = call i32 @free2a(i32** %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32** @malloc2a(i32 3, i32 4)
%2 = tail call i32 @free2a(i32** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEif_icmpeq(int, int /*<<< orphan*/ *);
void code_if_icmpeq(int label) { appendCODE(makeCODEif_icmpeq(label, NULL)); }


x86 assembly (clang, -O0):
<code_if_icmpeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEif_icmpeq@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @code_if_icmpeq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEif_icmpeq(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_if_icmpeq(i32 %0) {
%2 = tail call i32 @makeCODEif_icmpeq(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
void BN_GF2m_mod_sqr(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_GF2m_mod_sqr() {
ret void
}
extern void do_asm(struct s *x) {
  asm volatile("call ___checkme" : : "c"(x) : "memory");
}


x86 assembly (clang, -O0):
<do_asm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
call   1030 <___checkme@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_asm>:
mov    %rdi,%rcx
call   1030 <___checkme@plt>
ret

LLVM IR (-O0):
%struct.s = type opaque
define void @do_asm(%struct.s* %0) {
%2 = alloca %struct.s*
store %struct.s* %0, %struct.s** %2
%3 = load %struct.s*, %struct.s** %2
ret void
}

LLVM IR (-O2):
%struct.s = type opaque
define void @do_asm(%struct.s* %0) {
tail call void asm sideeffect "call ___checkme", "{cx},~{memory},~{dirflag},~{fpsr},~{flags}"(%struct.s* %0)
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_now(void) {
  struct timeval time;
  if (gettimeofday(&time, NULL))
    return 0.0;
  return (double)time.tv_sec + (1.0e-6 * (double)time.tv_usec);
}


x86 assembly (clang, -O0):
<time_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113c <time_now+0x2c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115d <time_now+0x4d>
cvtsi2sdq -0x10(%rbp),%xmm1
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
je     112d <time_now+0x1d>
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xebd(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @time_now() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store double 0.000000e+00, double* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %12, double %9)
store double %13, double* %1
br label %14
14: ; preds = %6, %5
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @time_now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
br label %13
13: ; preds = %0, %5
%14 = phi double [ %12, %5 ], [ 0.000000e+00, %0 ]
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ SYS_exit;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int);
void _exit(int status) { syscall(SYS_exit, status); }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
mov    %edi,%esi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>

LLVM IR (-O0):
@SYS_exit = global i32 0
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_exit
%4 = load i32, i32* %2
%5 = call i32 @syscall(i32 %3, i32 %4)
unreachable
}

LLVM IR (-O2):
@SYS_exit = global i32 0
define void @_exit(i32 %0) {
%2 = load i32, i32* @SYS_exit
%3 = tail call i32 @syscall(i32 %2, i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pic_send_EOI_normal(int);
void isr_irq_12() { pic_send_EOI_normal(12); }


x86 assembly (clang, -O0):
<isr_irq_12>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
call   1030 <pic_send_EOI_normal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isr_irq_12>:
mov    $0xc,%edi
jmp    1030 <pic_send_EOI_normal@plt>

LLVM IR (-O0):
define void @isr_irq_12() {
%1 = call i32 @pic_send_EOI_normal(i32 12)
ret void
}

LLVM IR (-O2):
define void @isr_irq_12() {
%1 = tail call i32 @pic_send_EOI_normal(i32 12)
ret void
}
void doCalibrate() {}


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

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

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

LLVM IR (-O2):
define void @doCalibrate() {
ret void
}
_Complex long double test_ctanhl(_Complex long double x) {
  return __builtin_ctanhl(x);
}


x86 assembly (clang, -O0):
<test_ctanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <ctanhl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ctanhl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <ctanhl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_ctanhl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_ctanhl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr,
          "Usage:\n"
          "  %s [options] iface ipaddr\n"
          "\n"
          "Options:\n"
          "  -w timeout: set timeout in seconds (decimals allowed)\n"
          "  -m macaddr: send ARP to macaddr instead of broadcast, in "
          "hex-colon format\n",
          prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [178 x i8] c"Usage:\0A %s [options] iface ipaddr\0A\0AOptions:\0A -w timeout: set timeout in seconds (decimals allowed)\0A -m macaddr: send ARP to macaddr instead of broadcast, in hex-colon format\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [178 x i8] c"Usage:\0A %s [options] iface ipaddr\0A\0AOptions:\0A -w timeout: set timeout in seconds (decimals allowed)\0A -m macaddr: send ARP to macaddr instead of broadcast, in hex-colon format\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENET_Receive_DriverIRQHandler();
__attribute__((weak)) void ENET_Receive_IRQHandler(void) {
  ENET_Receive_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<ENET_Receive_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ENET_Receive_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENET_Receive_IRQHandler>:
xor    %eax,%eax
jmp    1030 <ENET_Receive_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @ENET_Receive_IRQHandler() {
%1 = call i32 (...) @ENET_Receive_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ENET_Receive_IRQHandler() {
%1 = tail call i32 (...) @ENET_Receive_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay();
int /*<<< orphan*/ outb(int, int);
void select_cmos_register(char no) {
  outb(0x70, (0x80) | no);
  delay();
}


x86 assembly (clang, -O0):
<select_cmos_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%esi
or     $0x80,%esi
mov    $0x70,%edi
call   1030 <outb@plt>
mov    $0x0,%al
call   1040 <delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<select_cmos_register>:
push   %rax
mov    %edi,%esi
or     $0x80,%esi
mov    $0x70,%edi
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <delay@plt>

LLVM IR (-O0):
define void @select_cmos_register(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = or i32 128, %4
%6 = call i32 @outb(i32 112, i32 %5)
%7 = call i32 (...) @delay()
ret void
}

LLVM IR (-O2):
define void @select_cmos_register(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = or i32 %2, 128
%4 = tail call i32 @outb(i32 112, i32 %3)
%5 = tail call i32 (...) @delay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CAN0_DriverIRQHandler();
__attribute__((weak)) void CAN0_Error_IRQHandler(void) {
  CAN0_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<CAN0_Error_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CAN0_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CAN0_Error_IRQHandler>:
xor    %eax,%eax
jmp    1030 <CAN0_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @CAN0_Error_IRQHandler() {
%1 = call i32 (...) @CAN0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @CAN0_Error_IRQHandler() {
%1 = tail call i32 (...) @CAN0_DriverIRQHandler()
ret void
}
void fd_sync_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @fd_sync_initialize() {
ret void
}
/* Variables and functions */
int multiply(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", multiply(4, 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <multiply@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <multiply@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @multiply(i32 4, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void addon_sms_command(char *cmd, char *arg, const char *phone) {}


x86 assembly (clang, -O0):
<addon_sms_command>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @addon_sms_command(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @addon_sms_command(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void signal_handler(int signal_number) {}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
ret void
}
/* Variables and functions */
long long output_param(char *, int, int, char *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/);
long long dump_Write_Completion(char *buffer, int length, int offset) {
  long long complete_size =
      output_param(buffer, offset, 8, "Complete_size", NULL, 0);
  return complete_size;
}


x86 assembly (clang, -O0):
<dump_Write_Completion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    $0x8,%edx
lea    0xecb(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <output_param@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_Write_Completion>:
lea    0xee9(%rip),%rcx
mov    %edx,%esi
mov    $0x8,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <output_param@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Complete_size\00"
define i64 @dump_Write_Completion(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i64 @output_param(i8* %8, i32 %9, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* null, i32 0)
store i64 %10, i64* %7
%11 = load i64, i64* %7
ret i64 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"Complete_size\00"
define i64 @dump_Write_Completion(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @output_param(i8* %0, i32 %2, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* null, i32 0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationSettingsBank1Handle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void StabilizationSettingsBank1Updated() {
  UAVObjUpdated(StabilizationSettingsBank1Handle());
}


x86 assembly (clang, -O0):
<StabilizationSettingsBank1Updated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StabilizationSettingsBank1Handle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StabilizationSettingsBank1Updated>:
push   %rax
xor    %eax,%eax
call   1030 <StabilizationSettingsBank1Handle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @StabilizationSettingsBank1Updated() {
%1 = call i32 (...) @StabilizationSettingsBank1Handle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationSettingsBank1Updated() {
%1 = tail call i32 (...) @StabilizationSettingsBank1Handle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void f(int x, int y) {
  if (x > y) {
    {
      while (x > 3)
        if (y == 2)
          x++;
      if (y == 2)
        x++;
      else {
        if (y == 4) {
          x++;
        } else {
          y++;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1180 <f+0x80>
jmp    111b <f+0x1b>
cmpl   $0x3,-0x4(%rbp)
jle    113d <f+0x3d>
cmpl   $0x2,-0x8(%rbp)
jne    1138 <f+0x38>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <f+0x1b>
cmpl   $0x2,-0x8(%rbp)
jne    1155 <f+0x55>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <f+0x7b>
cmpl   $0x4,-0x8(%rbp)
jne    116d <f+0x6d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <f+0x76>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117b <f+0x7b>
jmp    1180 <f+0x80>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %36
8: ; preds = %2
br label %9
9: ; preds = %18, %8
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 3
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %12
br label %9
19: ; preds = %9
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 2
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %35
25: ; preds = %19
%26 = load i32, i32* %4
%27 = icmp eq i32 %26, 4
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %34
31: ; preds = %25
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %34
34: ; preds = %31, %28
br label %35
35: ; preds = %34, %22
br label %36
36: ; preds = %35, %2
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sminsorted(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sminsorted(N, x, stride);
  printf("min: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_sminsorted@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_sminsorted@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"min: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sminsorted(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"min: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sminsorted(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ list_digits(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num;
  printf("\nEnter an integer > ");
  scanf("%d", &num);
  list_digits(num);
  printf("\nThat's all, have a nice day!\n");
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1060 <list_digits@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [31 x i8] c"\0AThat's all, have a nice day!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @list_digits(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [30 x i8] c"\0AThat's all, have a nice day!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @list_digits(i32 %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned int vied_bit_clear_bit(unsigned int value, unsigned int lsb) {
  return value & (~(1 << lsb));
}


x86 assembly (clang, -O0):
<vied_bit_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vied_bit_clear_bit>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @vied_bit_clear_bit(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 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @vied_bit_clear_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
long smileMath_roundToNextPowOf2(long);
long smileMath_floorToNextPowOf2(long x) {
  long y = smileMath_roundToNextPowOf2(x);
  if (y > x)
    y /= 2;
  return y;
}


x86 assembly (clang, -O0):
<smileMath_floorToNextPowOf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <smileMath_roundToNextPowOf2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jle    1149 <smileMath_floorToNextPowOf2+0x39>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smileMath_floorToNextPowOf2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <smileMath_roundToNextPowOf2@plt>
cmp    %rbx,%rax
jle    112e <smileMath_floorToNextPowOf2+0x1e>
mov    %rax,%rcx
shr    $0x3f,%rcx
add    %rax,%rcx
sar    %rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @smileMath_floorToNextPowOf2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @smileMath_roundToNextPowOf2(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %2
%8 = icmp sgt i64 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i64, i64* %3
%11 = sdiv i64 %10, 2
store i64 %11, i64* %3
br label %12
12: ; preds = %9, %1
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @smileMath_floorToNextPowOf2(i64 %0) {
%2 = tail call i64 @smileMath_roundToNextPowOf2(i64 %0)
%3 = icmp sgt i64 %2, %0
%4 = sdiv i64 %2, 2
%5 = select i1 %3, i64 %4, i64 %2
ret i64 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t load24bit(void *data, int pos) {
  return (((uint32_t)((uint8_t *)data)[3 * pos]) << 8) |
         (((uint32_t)((uint8_t *)data)[3 * pos + 1]) << 16) |
         (((uint32_t)((uint8_t *)data)[3 * pos + 2]) << 24);
}


x86 assembly (clang, -O0):
<load24bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3,-0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
imul   $0x3,-0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,8),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
imul   $0x3,-0xc(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,8),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load24bit>:
lea    (%rsi,%rsi,2),%eax
cltq
mov    (%rdi,%rax,8),%ecx
mov    0x8(%rdi,%rax,8),%edx
shl    $0x8,%ecx
shl    $0x10,%edx
or     %ecx,%edx
mov    0x10(%rdi,%rax,8),%eax
shl    $0x18,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @load24bit(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 = bitcast i8* %5 to i64*
%7 = load i32, i32* %4
%8 = mul nsw i32 3, %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %6, i64 %9
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to i64*
%16 = load i32, i32* %4
%17 = mul nsw i32 3, %16
%18 = add nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i64, i64* %15, i64 %19
%21 = load i64, i64* %20
%22 = trunc i64 %21 to i32
%23 = shl i32 %22, 16
%24 = or i32 %13, %23
%25 = load i8*, i8** %3
%26 = bitcast i8* %25 to i64*
%27 = load i32, i32* %4
%28 = mul nsw i32 3, %27
%29 = add nsw i32 %28, 2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i64, i64* %26, i64 %30
%32 = load i64, i64* %31
%33 = trunc i64 %32 to i32
%34 = shl i32 %33, 24
%35 = or i32 %24, %34
ret i32 %35
}

LLVM IR (-O2):
define i32 @load24bit(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i64*
%4 = mul nsw i32 %1, 3
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* %3, i64 %5
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = add nsw i32 %4, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %3, i64 %11
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 16
%16 = or i32 %15, %9
%17 = add nsw i32 %4, 2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i64, i64* %3, i64 %18
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = shl i32 %21, 24
%23 = or i32 %16, %22
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int sysconf(int /*<<< orphan*/);
int default_chunk_sz() {
  static int page_sz;
  if (!page_sz) {
    page_sz = sysconf(_SC_PAGESIZE);
    page_sz -= 64;
  }
  return page_sz;
}


x86 assembly (clang, -O0):
<default_chunk_sz>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1144 <default_chunk_sz+0x34>
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %eax,0x2ef7(%rip)
mov    0x2ef1(%rip),%eax
sub    $0x40,%eax
mov    %eax,0x2ee8(%rip)
mov    0x2ee2(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_chunk_sz>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     111d <default_chunk_sz+0xd>
pop    %rcx
ret
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
add    $0xffffffc0,%eax
mov    %eax,0x2ef8(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@default_chunk_sz.page_sz = internal global i32 0
@_SC_PAGESIZE = global i32 0
define i32 @default_chunk_sz() {
%1 = load i32, i32* @default_chunk_sz.page_sz
%2 = icmp ne i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = load i32, i32* @_SC_PAGESIZE
%5 = call i32 @sysconf(i32 %4)
store i32 %5, i32* @default_chunk_sz.page_sz
%6 = load i32, i32* @default_chunk_sz.page_sz
%7 = sub nsw i32 %6, 64
store i32 %7, i32* @default_chunk_sz.page_sz
br label %8
8: ; preds = %3, %0
%9 = load i32, i32* @default_chunk_sz.page_sz
ret i32 %9
}

LLVM IR (-O2):
@default_chunk_sz.page_sz = internal unnamed_addr global i32 0
@_SC_PAGESIZE = global i32 0
define i32 @default_chunk_sz() {
%1 = load i32, i32* @default_chunk_sz.page_sz
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i32, i32* @_SC_PAGESIZE
%5 = tail call i32 @sysconf(i32 %4)
%6 = add nsw i32 %5, -64
store i32 %6, i32* @default_chunk_sz.page_sz
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ %6, %3 ], [ %1, %0 ]
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int main(void) {
  static const uint64_t one = (uint64_t)1;
  if ((uint8_t)1 == *((uint8_t *)&one))
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%eax
cmp    0xee9(%rip),%rax
jne    1129 <main+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1130 <main+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@main.one = internal constant i32 1
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i64, i64* bitcast (i32* @main.one to i64*)
%3 = icmp eq i64 1, %2
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ time;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
unsigned long get_XKeyReleasedEvent_time(void *_p) {
  return (unsigned long)((XKeyReleasedEvent *)_p)->time;
}


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

x86 assembly (clang, -O2):
<get_XKeyReleasedEvent_time>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XKeyReleasedEvent_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XKeyReleasedEvent_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("gensig <primary> <base> <proc_name> <proc_vaddr> <proc_size>\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"gensig <primary> <base> <proc_name> <proc_vaddr> <proc_size>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [61 x i8] c"gensig <primary> <base> <proc_name> <proc_vaddr> <proc_size>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc(int, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundmpx_fputc(int c,
                                                              FILE *stream) {
  return fputc(c, stream);
}


x86 assembly (clang, -O0):
<softboundmpx_fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_fputc>:
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_fputc(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 @fputc(i32 %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define weak i32 @softboundmpx_fputc(i32 %0, i32* %1) {
%3 = tail call i32 @fputc(i32 %0, i32* %1)
ret i32 %3
}
void *mpo_memset(void *s, int c, unsigned int n) {
  unsigned int u = 0;
  unsigned char *ptr = (unsigned char *)s;
  for (u = 0; u < n; u++) {
    ptr[u] = c;
  }
  return s;
}


x86 assembly (clang, -O0):
<mpo_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    114d <mpo_memset+0x4d>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1124 <mpo_memset+0x24>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpo_memset>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1122 <mpo_memset+0x12>
mov    %edx,%edx
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mpo_memset(i8* returned writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %5, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void PrintAppInfo(void) {
  printf("%s version %s\n", "OpenCL Memory Benchmark", "0.1");
}


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

x86 assembly (clang, -O2):
<PrintAppInfo>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
lea    0xf02(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [24 x i8] c"OpenCL Memory Benchmark\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @PrintAppInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [24 x i8] c"OpenCL Memory Benchmark\00"
@.str.2 = [4 x i8] c"0.1\00"
define void @PrintAppInfo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_45() {
  Assert_real((isqrt(45) == 6),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              230, ("Integer square root of 45 should be 6"));
}


x86 assembly (clang, -O0):
<t_sqrt_45>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1030 <isqrt@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0xe6,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_45>:
push   %rax
mov    $0x2d,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0xe6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 45 should be 6\00"
define void @t_sqrt_45() {
%1 = call i32 @isqrt(i32 45)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 45 should be 6\00"
define void @t_sqrt_45() {
%1 = tail call i32 @isqrt(i32 45)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}