xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ atan2l(long double, long double);
int /*<<< orphan*/ link_failure_atan2l();
void test_atan2l(long double ld1, long double ld2) {
  if (atan2l(ld1, ld2) != atan2l(ld1, ld2))
    link_failure_atan2l();
}


x86 assembly (clang, -O0):
<test_atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <atan2l@plt>
mov    %rax,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <atan2l@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1175 <test_atan2l+0x55>
mov    $0x0,%al
call   1030 <link_failure_atan2l@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_atan2l>:
push   %rbx
sub    $0x40,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x34(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1040 <atan2l@plt>
mov    %rax,%rbx
fldt   0x28(%rsp)
fstpt  0x10(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1040 <atan2l@plt>
cmp    %rax,%rbx
jne    1167 <test_atan2l+0x47>
add    $0x40,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
jmp    1030 <link_failure_atan2l@plt>

LLVM IR (-O0):
define void @test_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @atan2l(x86_fp80 %5, x86_fp80 %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = load x86_fp80, x86_fp80* %4
%10 = call i64 @atan2l(x86_fp80 %8, x86_fp80 %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_atan2l()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @atan2l(x86_fp80 %0, x86_fp80 %1)
%4 = tail call i64 @atan2l(x86_fp80 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_atan2l()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DumpBytes(unsigned char *, int);
void EmitB(unsigned char b) { DumpBytes(&b, 1); }


x86 assembly (clang, -O0):
<EmitB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <DumpBytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EmitB>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <DumpBytes@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @EmitB(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @DumpBytes(i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @EmitB(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @DumpBytes(i8* %2, i32 1)
ret void
}
int test_imm_9Bint8_mem(signed char *val) {
  return ((*val) & (0x9B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Bint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x9b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Bint8_mem>:
testb  $0x9b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Bint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 155
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_9Bint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -101
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void writeln(int i) { printf("%d\n", i); }


x86 assembly (clang, -O0):
<writeln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeln>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @writeln(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void testDefaultUnreachable(int arg) {
  if (arg > 10) {
    switch (arg) {
    case 0x80000000 ... 9:
      clang_analyzer_warnIfReached();
      break;
    case 10 ... 0x7fffffff:
      clang_analyzer_warnIfReached();
      clang_analyzer_eval(arg > 10);
      break;
    default:
      clang_analyzer_warnIfReached();
    }
  }
}


x86 assembly (clang, -O0):
<testDefaultUnreachable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    11a5 <testDefaultUnreachable+0x85>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1183 <testDefaultUnreachable+0x63>
mov    $0x0,%al
call   1040 <clang_analyzer_warnIfReached@plt>
jmp    11a0 <testDefaultUnreachable+0x80>
mov    -0x8(%rbp),%eax
sub    $0x80000000,%eax
cmp    $0x80000009,%eax
jbe    1140 <testDefaultUnreachable+0x20>
jmp    1199 <testDefaultUnreachable+0x79>
mov    $0x0,%al
call   1040 <clang_analyzer_warnIfReached@plt>
cmpl   $0xa,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <clang_analyzer_eval@plt>
jmp    11a0 <testDefaultUnreachable+0x80>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
cmp    $0x7ffffff5,%eax
jbe    1164 <testDefaultUnreachable+0x44>
jmp    114c <testDefaultUnreachable+0x2c>
mov    $0x0,%al
call   1040 <clang_analyzer_warnIfReached@plt>
jmp    11a5 <testDefaultUnreachable+0x85>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testDefaultUnreachable>:
cmp    $0xb,%edi
jl     113a <testDefaultUnreachable+0x1a>
push   %rax
xor    %eax,%eax
call   1040 <clang_analyzer_warnIfReached@plt>
mov    $0x1,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <clang_analyzer_eval@plt>
ret

LLVM IR (-O0):
define void @testDefaultUnreachable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
br i1 %4, label %5, label %24
5: ; preds = %1
%6 = load i32, i32* %2
switch i32 %6, label %18 [
]
7: ; preds = %9
%8 = call i32 (...) @clang_analyzer_warnIfReached()
br label %23
9: ; preds = %18
%10 = sub i32 %6, -2147483648
%11 = icmp ule i32 %10, -2147483639
br i1 %11, label %7, label %21
12: ; preds = %18
%13 = call i32 (...) @clang_analyzer_warnIfReached()
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 10
%16 = zext i1 %15 to i32
%17 = call i32 (i32, ...) bitcast (i32 (...)* @clang_analyzer_eval to i32 (i32, ...)*)(i32 %16)
br label %23
18: ; preds = %5
%19 = sub i32 %6, 10
%20 = icmp ule i32 %19, 2147483637
br i1 %20, label %12, label %9
21: ; preds = %9
%22 = call i32 (...) @clang_analyzer_warnIfReached()
br label %23
23: ; preds = %21, %12, %7
br label %24
24: ; preds = %23, %1
ret void
}

LLVM IR (-O2):
define void @testDefaultUnreachable(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @clang_analyzer_warnIfReached()
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @clang_analyzer_eval to i32 (i32, ...)*)(i32 1)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayLine(size_t);
void displayTriangle(size_t nbLines) {
  size_t i;
  for (i = 0; i <= nbLines; i++)
    displayLine(i);
}


x86 assembly (clang, -O0):
<displayTriangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
ja     114c <displayTriangle+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <displayLine@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <displayTriangle+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayTriangle>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <displayLine@plt>
add    $0x1,%rbx
cmp    %r14,%rbx
jbe    1120 <displayTriangle+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @displayTriangle(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %11, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ule i64 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i64, i64* %3
%10 = call i32 @displayLine(i64 %9)
br label %11
11: ; preds = %8
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @displayTriangle(i64 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @displayLine(i64 %3)
%5 = add i64 %3, 1
%6 = icmp ugt i64 %5, %0
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}
int ExistRoot(double a, double b) {
  if (a * b > 0)
    return 0;
  if (a * b < 0)
    return 1;
  else
    return 255;
}


x86 assembly (clang, -O0):
<ExistRoot>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1131 <ExistRoot+0x31>
movl   $0x0,-0x4(%rbp)
jmp    115b <ExistRoot+0x5b>
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1154 <ExistRoot+0x54>
movl   $0x1,-0x4(%rbp)
jmp    115b <ExistRoot+0x5b>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExistRoot>:
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
mov    $0x1,%eax
mov    $0xff,%ecx
cmova  %eax,%ecx
xor    %eax,%eax
ucomisd %xmm1,%xmm0
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ExistRoot(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fmul double %6, %7
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %18
11: ; preds = %2
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fmul double %12, %13
%15 = fcmp olt double %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 1, i32* %3
br label %18
17: ; preds = %11
store i32 255, i32* %3
br label %18
18: ; preds = %17, %16, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ExistRoot(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fcmp ogt double %3, 0.000000e+00
%5 = fcmp olt double %3, 0.000000e+00
%6 = select i1 %5, i32 1, i32 255
%7 = select i1 %4, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
double llz_roundf(double);
int llz_rintf(double x) {
  double xx;
  xx = llz_roundf(x);
  if (xx > 2147483647)
    return 2147483647;
  else if (xx < (-2147483647 - 1))
    return (-2147483647 - 1);
  else
    return (int)xx;
}


x86 assembly (clang, -O0):
<llz_rintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <llz_roundf@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    114f <llz_rintf+0x3f>
movl   $0x7fffffff,-0x4(%rbp)
jmp    1176 <llz_rintf+0x66>
movsd  0xeb1(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    116e <llz_rintf+0x5e>
movl   $0x80000000,-0x4(%rbp)
jmp    1176 <llz_rintf+0x66>
cvttsd2si -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llz_rintf>:
push   %rax
call   1030 <llz_roundf@plt>
mov    $0x7fffffff,%eax
ucomisd 0xedd(%rip),%xmm0
ja     113c <llz_rintf+0x2c>
mov    $0x80000000,%eax
movsd  0xed6(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     113c <llz_rintf+0x2c>
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @llz_rintf(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call double @llz_roundf(double %5)
store double %6, double* %4
%7 = load double, double* %4
%8 = fcmp ogt double %7, 0x41DFFFFFFFC00000
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 2147483647, i32* %2
br label %17
10: ; preds = %1
%11 = load double, double* %4
%12 = fcmp olt double %11, 0xC1E0000000000000
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 -2147483648, i32* %2
br label %17
14: ; preds = %10
%15 = load double, double* %4
%16 = fptosi double %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %13, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @llz_rintf(double %0) {
%2 = tail call double @llz_roundf(double %0)
%3 = fcmp ogt double %2, 0x41DFFFFFFFC00000
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = fcmp olt double %2, 0xC1E0000000000000
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = fptosi double %2 to i32
br label %8
8: ; preds = %4, %1, %6
%9 = phi i32 [ %7, %6 ], [ 2147483647, %1 ], [ -2147483648, %4 ]
ret i32 %9
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvaddnwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvaddnwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvaddnwstr+0x2a>
jmp    1170 <cmd_mvaddnwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvaddnwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvaddnwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvaddnwstr(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvaddnwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
unsigned short read_le16(unsigned char *in) {
  unsigned short result = 0;
  result |= (unsigned short)in[0];
  result |= (unsigned short)in[1] << 8;
  return result;
}


x86 assembly (clang, -O0):
<read_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzwl %ax,%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
movzwl %ax,%ecx
shl    $0x8,%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_le16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @read_le16(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
store i16 0, i16* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = zext i16 %7 to i32
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = or i32 %10, %8
%12 = trunc i32 %11 to i16
store i16 %12, i16* %3
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = zext i8 %15 to i16
%17 = zext i16 %16 to i32
%18 = shl i32 %17, 8
%19 = load i16, i16* %3
%20 = zext i16 %19 to i32
%21 = or i32 %20, %18
%22 = trunc i32 %21 to i16
store i16 %22, i16* %3
%23 = load i16, i16* %3
ret i16 %23
}

LLVM IR (-O2):
define zeroext i16 @read_le16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = or i16 %7, %3
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void message_short_help(void) {
  puts("Usage: wham [-b beta] [-m min] [-M max] [-n bins] [-e tol] [-I iter]\n"
       "            [-s step] [-p period] [-i input] [-qhHvV]");
}


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

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

LLVM IR (-O0):
@.str = [123 x i8] c"Usage: wham [-b beta] [-m min] [-M max] [-n bins] [-e tol] [-I iter]\0A [-s step] [-p period] [-i input] [-qhHvV]\00"
define void @message_short_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [123 x i8] c"Usage: wham [-b beta] [-m min] [-M max] [-n bins] [-e tol] [-I iter]\0A [-s step] [-p period] [-i input] [-qhHvV]\00"
define void @message_short_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}
void cache_cleanup_old_items() {}


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

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

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

LLVM IR (-O2):
define void @cache_cleanup_old_items() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main() {
  for (int i = 0; i < 1; ++i) {
    foo();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
ret i32 0
}
unsigned char safe_sub_func_int_s_s(int si1, unsigned char si2) {
  return si1 ^ si2 & -si2 ^ si2 ?: si1 - si2;
}


x86 assembly (clang, -O0):
<safe_sub_func_int_s_s>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
movzbl -0x5(%rbp),%ecx
movzbl -0x5(%rbp),%esi
xor    %edx,%edx
sub    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
movzbl -0x5(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     113d <safe_sub_func_int_s_s+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1149 <safe_sub_func_int_s_s+0x49>
mov    -0x4(%rbp),%eax
movzbl -0x5(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_sub_func_int_s_s>:
mov    %esi,%ecx
neg    %ecx
and    %esi,%ecx
mov    %esi,%eax
xor    %edi,%eax
xor    %ecx,%eax
sub    %esi,%edi
test   %eax,%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @safe_sub_func_int_s_s(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = sub nsw i32 0, %9
%11 = and i32 %7, %10
%12 = xor i32 %5, %11
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %2
br label %23
18: ; preds = %2
%19 = load i32, i32* %3
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = sub nsw i32 %19, %21
br label %23
23: ; preds = %18, %17
%24 = phi i32 [ %15, %17 ], [ %22, %18 ]
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @safe_sub_func_int_s_s(i32 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = sub nsw i32 0, %3
%5 = and i32 %3, %4
%6 = xor i32 %3, %0
%7 = xor i32 %6, %5
%8 = icmp eq i32 %7, 0
%9 = sub nsw i32 %0, %3
%10 = select i1 %8, i32 %9, i32 %7
%11 = trunc i32 %10 to i8
ret i8 %11
}
/* Variables and functions */
char getchar();
char getch_(int echo) {
  char ch;
  ch = getchar();
  return ch;
}


x86 assembly (clang, -O0):
<getch_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @getch_(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %3
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getch_(i32 %0) {
%2 = tail call signext i8 (...) @getchar()
ret i8 %2
}
/* Variables and functions */
float expf(float);
float sinhf(float x) {
  x = expf(x);
  return ((x - (1.0 / x)) / 2.0);
}


x86 assembly (clang, -O0):
<sinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <expf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec2(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinhf>:
push   %rax
call   1030 <expf@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xed6(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sinhf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @expf(float %3)
store float %4, float* %2
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fdiv double 1.000000e+00, %8
%10 = fsub double %6, %9
%11 = fdiv double %10, 2.000000e+00
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @sinhf(float %0) {
%2 = tail call float @expf(float %0)
%3 = fpext float %2 to double
%4 = fdiv double 1.000000e+00, %3
%5 = fsub double %3, %4
%6 = fmul double %5, 5.000000e-01
%7 = fptrunc double %6 to float
ret float %7
}
/* Type definitions */
struct strbuf {
  int dummy;
};

/* Variables and functions */
int strbuf_append_char(struct strbuf *, char);
int strbuf_null_terminate(struct strbuf *strbuf) {
  return strbuf_append_char(strbuf, '\0');
}


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

x86 assembly (clang, -O2):
<strbuf_null_terminate>:
xor    %esi,%esi
jmp    1030 <strbuf_append_char@plt>

LLVM IR (-O0):
%struct.strbuf = type { i32 }
define i32 @strbuf_null_terminate(%struct.strbuf* %0) {
%2 = alloca %struct.strbuf*
store %struct.strbuf* %0, %struct.strbuf** %2
%3 = load %struct.strbuf*, %struct.strbuf** %2
%4 = call i32 @strbuf_append_char(%struct.strbuf* %3, i8 signext 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.strbuf = type { i32 }
define i32 @strbuf_null_terminate(%struct.strbuf* %0) {
%2 = tail call i32 @strbuf_append_char(%struct.strbuf* %0, i8 signext 0)
ret i32 %2
}
__attribute__((always_)) int pm_generic_runtime_idle(struct device *dev) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @pm_generic_runtime_idle(%struct.device* %0) {
%2 = alloca %struct.device*
store %struct.device* %0, %struct.device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @pm_generic_runtime_idle(%struct.device* nocapture readnone %0) {
ret i32 0
}
int myrand(unsigned long *next) {
  *next = *next * 1103515245 + 12345;
  return ((unsigned)(*next / 65536) % 32768);
}


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%rcx
add    $0x3039,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x10,%rax
and    $0x7fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrand>:
imul   $0x41c64e6d,(%rdi),%rax
add    $0x3039,%rax
mov    %rax,(%rdi)
shr    $0x10,%eax
and    $0x7fff,%eax
ret

LLVM IR (-O0):
define i32 @myrand(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = mul i64 %4, 1103515245
%6 = add i64 %5, 12345
%7 = load i64*, i64** %2
store i64 %6, i64* %7
%8 = load i64*, i64** %2
%9 = load i64, i64* %8
%10 = udiv i64 %9, 65536
%11 = trunc i64 %10 to i32
%12 = urem i32 %11, 32768
ret i32 %12
}

LLVM IR (-O2):
define i32 @myrand(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = mul i64 %2, 1103515245
%4 = add i64 %3, 12345
store i64 %4, i64* %0
%5 = trunc i64 %4 to i32
%6 = lshr i32 %5, 16
%7 = and i32 %6, 32767
ret i32 %7
}
int Atm128AlarmAsyncP$0$TimerAsync$compareBusy(void) {
  int __nesc_result;
  __nesc_result = HplAtm128Timer0AsyncP$TimerAsync$compareBusy();
  return __nesc_result;
}


x86 assembly (clang, -O0):
<Atm128AlarmAsyncP$0$TimerAsync$compareBusy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <HplAtm128Timer0AsyncP$TimerAsync$compareBusy@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Atm128AlarmAsyncP$0$TimerAsync$compareBusy>:
xor    %eax,%eax
jmp    1030 <HplAtm128Timer0AsyncP$TimerAsync$compareBusy@plt>

LLVM IR (-O0):
define i32 @"Atm128AlarmAsyncP$0$TimerAsync$compareBusy"() {
%1 = alloca i32
%2 = call i32 (...) @"HplAtm128Timer0AsyncP$TimerAsync$compareBusy"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @"Atm128AlarmAsyncP$0$TimerAsync$compareBusy"() {
%1 = tail call i32 (...) @"HplAtm128Timer0AsyncP$TimerAsync$compareBusy"()
ret i32 %1
}
/* Variables and functions */
scalar_t__ less_than(int, int);
void l1_symbolic_widened_Bad(int n) {
  int a[n];
  for (int i = n; less_than(i, 2 * n); i++) {
    a[i] = 0;
  }
}


x86 assembly (clang, -O0):
<l1_symbolic_widened_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
call   1030 <less_than@plt>
cmp    $0x0,%rax
je     117d <l1_symbolic_widened_Bad+0x6d>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1148 <l1_symbolic_widened_Bad+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_symbolic_widened_Bad>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <less_than@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1120 <l1_symbolic_widened_Bad+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @l1_symbolic_widened_Bad(i32 %0) {
%2 = shl nsw i32 %0, 1
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %7, %3 ]
%5 = tail call i64 @less_than(i32 %4, i32 %2)
%6 = icmp eq i64 %5, 0
%7 = add nsw i32 %4, 1
br i1 %6, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_ft(int akm) { return !!(akm & (BIT(6) | BIT(5))); }


x86 assembly (clang, -O0):
<wpa_key_mgmt_ft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    %eax,-0xc(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_ft>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 6)
%5 = call i32 @BIT(i32 5)
%6 = or i32 %4, %5
%7 = and i32 %3, %6
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = tail call i32 @BIT(i32 6)
%3 = tail call i32 @BIT(i32 5)
%4 = or i32 %3, %2
%5 = and i32 %4, %0
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ print_float_in_binary(float);
int /*<<< orphan*/ print_int_in_binary(int);
int /*<<< orphan*/ printf(char *);
void test_signed_i2f_32(int a_i) {
  printf("0001_1_");
  print_int_in_binary(a_i);
  printf("\n");
  printf("0010_0_");
  float f = (float)a_i;
  print_float_in_binary(f);
  printf("\n");
}


x86 assembly (clang, -O0):
<test_signed_i2f_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <print_int_in_binary@plt>
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <print_float_in_binary@plt>
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_signed_i2f_32>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
call   1050 <printf@plt>
mov    %ebx,%edi
call   1040 <print_int_in_binary@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea1(%rip),%rdi
call   1050 <printf@plt>
cvtsi2ss %ebx,%xmm0
call   1060 <print_float_in_binary@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"0001_1_\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [8 x i8] c"0010_0_\00"
define void @test_signed_i2f_32(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @print_int_in_binary(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
store float %10, float* %3
%11 = load float, float* %3
%12 = call i32 @print_float_in_binary(float %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"0001_1_\00"
@.str.2 = [8 x i8] c"0010_0_\00"
define void @test_signed_i2f_32(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_int_in_binary(i32 %0)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%6 = sitofp i32 %0 to float
%7 = tail call i32 @print_float_in_binary(float %6)
%8 = tail call i32 @putchar(i32 10)
ret void
}
int main(int argc, char **argv) {
  for (;;) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1112 <main+0x12>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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
br label %6
6: ; preds = %6, %2
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
void enterIeee802154SysPatch(void) {}


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

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

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

LLVM IR (-O2):
define void @enterIeee802154SysPatch() {
ret void
}
void todo(void) {}


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

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

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

LLVM IR (-O2):
define void @todo() {
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int BinaryTreeSize(struct node *);
int power(int, int);
int heightOfBT(struct node *root) {
  int size = BinaryTreeSize(root);
  int i = 0, sum = 0;
  while (1) {
    sum = sum + power(2, i);
    if (size <= sum) {
      return i;
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<heightOfBT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <BinaryTreeSize@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    $0x2,%edi
call   1030 <power@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1178 <heightOfBT+0x58>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <heightOfBT+0x26>

x86 assembly (clang, -O2):
<heightOfBT>:
push   %rbp
push   %r14
push   %rbx
call   1040 <BinaryTreeSize@plt>
mov    %eax,%r14d
xor    %ebx,%ebx
mov    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebp
mov    $0x2,%edi
mov    %ebp,%esi
call   1030 <power@plt>
add    %eax,%ebx
cmp    %ebx,%r14d
jg     1140 <heightOfBT+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @heightOfBT(%struct.node* %0) {
%2 = alloca %struct.node*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.node* %0, %struct.node** %2
%6 = load %struct.node*, %struct.node** %2
%7 = call i32 @BinaryTreeSize(%struct.node* %6)
store i32 %7, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %1, %18
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @power(i32 2, i32 %10)
%12 = add nsw i32 %9, %11
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %5
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %8
%17 = load i32, i32* %4
ret i32 %17
18: ; preds = %8
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %8
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @heightOfBT(%struct.node* %0) {
%2 = tail call i32 @BinaryTreeSize(%struct.node* %0)
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ 0, %1 ], [ %9, %3 ]
%5 = phi i32 [ 0, %1 ], [ %7, %3 ]
%6 = tail call i32 @power(i32 2, i32 %4)
%7 = add nsw i32 %6, %5
%8 = icmp sgt i32 %2, %7
%9 = add nuw nsw i32 %4, 1
br i1 %8, label %3, label %10
10: ; preds = %3
ret i32 %4
}
int git_libgit2_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @git_libgit2_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @git_libgit2_init() {
ret i32 0
}
void PCM_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<PCM_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <PCM_IRQHandler+0x9>
jmp    1109 <PCM_IRQHandler+0x9>

x86 assembly (clang, -O2):
<PCM_IRQHandler>:
jmp    1100 <PCM_IRQHandler>

LLVM IR (-O0):
define void @PCM_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @PCM_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ copy(char *, char *);
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  char string[1000];
  while ((len = getline(line, 1000)) > 0) {
    copy(string, line);
    printf("String: %s", string);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    118a <main+0x5a>
lea    -0x7e0(%rbp),%rdi
lea    -0x3f0(%rbp),%rsi
call   1040 <copy@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x7e0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1187 <main+0x57>
lea    0x3f0(%rsp),%r14
mov    %rsp,%rbx
lea    0xea1(%rip),%r15
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <copy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"String: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
store i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = call i32 @getline(i8* %6, i32 1000)
store i32 %7, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%12 = call i32 @copy(i8* %10, i8* %11)
%13 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %5
15: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"String: %s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @getline(i8* %3, i32 1000)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = call i32 @copy(i8* %4, i8* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i32 @getline(i8* %3, i32 1000)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_ScreenUp(void) { WriteInstruction("call scru"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"call scru\00"
define void @CR_ScreenUp() {
%1 = call i32 @WriteInstruction(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"call scru\00"
define void @CR_ScreenUp() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
void __attribute__((stdcall)) GetSystemInfo(void *sys_info) {
  sys_info = sys_info;
  return;
}


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

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

LLVM IR (-O0):
define void @GetSystemInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
ret void
}

LLVM IR (-O2):
define void @GetSystemInfo(i8* nocapture %0) {
ret void
}
int sumOfFib2(n) {
  int sum = 0;
  if (n <= 1)
    return n;
  return (fib(n + 2) - 1);
}


x86 assembly (clang, -O0):
<sumOfFib2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1137 <sumOfFib2+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <sumOfFib2+0x3a>
mov    -0x8(%rbp),%edi
add    $0x2,%edi
mov    $0x0,%al
call   1030 <fib@plt>
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumOfFib2>:
mov    %edi,%eax
cmp    $0x2,%edi
jl     112b <sumOfFib2+0x1b>
push   %rax
add    $0x2,%eax
mov    %eax,%edi
xor    %eax,%eax
call   1030 <fib@plt>
add    $0xffffffff,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @sumOfFib2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %14
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 2
%12 = call i32 (i32, ...) bitcast (i32 (...)* @fib to i32 (i32, ...)*)(i32 %11)
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %9, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @sumOfFib2(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nuw nsw i32 %0, 2
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @fib to i32 (i32, ...)*)(i32 %4)
%6 = add nsw i32 %5, -1
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ %0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int readUInt8(int /*<<< orphan*/ *);
unsigned long readUInt32(FILE *f) {
  return (unsigned long)(readUInt8(f) + (readUInt8(f) << 8) +
                         (readUInt8(f) << 16) + (readUInt8(f) << 24));
}


x86 assembly (clang, -O0):
<readUInt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readUInt8@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readUInt8@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readUInt8@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readUInt8@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x18,%ecx
add    %ecx,%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readUInt32>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <readUInt8@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <readUInt8@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    %r14d,%ebp
mov    %r15,%rdi
call   1030 <readUInt8@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1030 <readUInt8@plt>
shl    $0x18,%eax
add    %ebx,%eax
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @readUInt32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @readUInt8(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @readUInt8(i32* %5)
%7 = shl i32 %6, 8
%8 = add nsw i32 %4, %7
%9 = load i32*, i32** %2
%10 = call i32 @readUInt8(i32* %9)
%11 = shl i32 %10, 16
%12 = add nsw i32 %8, %11
%13 = load i32*, i32** %2
%14 = call i32 @readUInt8(i32* %13)
%15 = shl i32 %14, 24
%16 = add nsw i32 %12, %15
%17 = sext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @readUInt32(i32* %0) {
%2 = tail call i32 @readUInt8(i32* %0)
%3 = tail call i32 @readUInt8(i32* %0)
%4 = shl i32 %3, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @readUInt8(i32* %0)
%7 = shl i32 %6, 16
%8 = add nsw i32 %5, %7
%9 = tail call i32 @readUInt8(i32* %0)
%10 = shl i32 %9, 24
%11 = add nsw i32 %8, %10
%12 = sext i32 %11 to i64
ret i64 %12
}
void logical_clock_reset_overflow_period(
    struct task_clock_group_info *group_info, int id) {}


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

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

LLVM IR (-O0):
%struct.task_clock_group_info = type opaque
define void @logical_clock_reset_overflow_period(%struct.task_clock_group_info* %0, i32 %1) {
%3 = alloca %struct.task_clock_group_info*
%4 = alloca i32
store %struct.task_clock_group_info* %0, %struct.task_clock_group_info** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.task_clock_group_info = type opaque
define void @logical_clock_reset_overflow_period(%struct.task_clock_group_info* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  OpenSSL_add_all_algorithms();
  exit(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    $0x0,%al
call   1030 <OpenSSL_add_all_algorithms@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <OpenSSL_add_all_algorithms@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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 = call i32 (...) @OpenSSL_add_all_algorithms()
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%4 = tail call i32 @exit(i32 0)
unreachable
}