xunge/DecIR huggingface dataset:
/* Variables and functions */
char *stb_strrchr2(char *s, char x, char y) {
  char *r = NULL;
  for (; *s; ++s)
    if (*s == x || *s == y)
      r = s;
  return r;
}


x86 assembly (clang, -O0):
<stb_strrchr2>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116c <stb_strrchr2+0x6c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
je     114e <stb_strrchr2+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jne    1156 <stb_strrchr2+0x56>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    115b <stb_strrchr2+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111b <stb_strrchr2+0x1b>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_strrchr2>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1129 <stb_strrchr2+0x29>
nopl   0x0(%rax,%rax,1)
cmp    %dl,%cl
cmove  %rdi,%rax
cmp    %sil,%cl
cmove  %rdi,%rax
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <stb_strrchr2+0x10>
ret

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

LLVM IR (-O2):
define i8* @stb_strrchr2(i8* %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %15, %6 ], [ %4, %3 ]
%8 = phi i8* [ %13, %6 ], [ null, %3 ]
%9 = phi i8* [ %14, %6 ], [ %0, %3 ]
%10 = icmp eq i8 %7, %1
%11 = icmp eq i8 %7, %2
%12 = or i1 %10, %11
%13 = select i1 %12, i8* %9, i8* %8
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %6, %3
%18 = phi i8* [ null, %3 ], [ %13, %6 ]
ret i8* %18
}
void ub_constant_arithmetic() {
  int INT_MIN = 0xffffffff;
  int INT_MAX = 0x7fffffff;
  INT_MAX + 1;
  INT_MAX + -1;
  -INT_MIN;
  -INT_MAX - 2;
  INT_MAX *INT_MAX;
  INT_MIN *INT_MIN;
  1 / 0;
  INT_MIN / -1;
  1 % 0;
  INT_MIN % -1;
  1.0 / 0.0;
}


x86 assembly (clang, -O0):
<ub_constant_arithmetic>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ub_constant_arithmetic() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
store i32 2147483647, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = add nsw i32 %5, -1
%7 = load i32, i32* %1
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %2
%10 = sub nsw i32 0, %9
%11 = sub nsw i32 %10, 2
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %1
%16 = load i32, i32* %1
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %1
%19 = sdiv i32 %18, -1
%20 = load i32, i32* %1
%21 = srem i32 %20, -1
ret void
}

LLVM IR (-O2):
define void @ub_constant_arithmetic() {
ret void
}
/* Variables and functions */
int gettid();
int main(void) { return gettid(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <gettid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gettid()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gettid()
ret i32 %1
}
/* Variables and functions */
int execl(char *, char *, char *, char *, char *);
int _doCmd_pure(char *cmd, size_t cmdlen) {
  char *ins = cmd + cmdlen;
  return execl("/bin/bash", "/bin/bash", "-c", cmd, (char *)NULL);
}


x86 assembly (clang, -O0):
<_doCmd_pure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xec9(%rip),%rsi
lea    0xecc(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1030 <execl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_doCmd_pure>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xee9(%rip),%rdx
mov    %rdi,%rsi
xor    %r8d,%r8d
jmp    1030 <execl@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [3 x i8] c"-c\00"
define i32 @_doCmd_pure(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %5
%9 = load i8*, i8** %3
%10 = call i32 @execl(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* null)
ret i32 %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [3 x i8] c"-c\00"
define i32 @_doCmd_pure(i8* %0, i64 %1) {
%3 = tail call i32 @execl(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* null)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ LONG_MAX;
scalar_t__ read_e2_timers(scalar_t__);
scalar_t__ read_neutrino_timers(scalar_t__);
int /*<<< orphan*/ write_wakeup_file(scalar_t__);
time_t read_timers_utc(time_t curTime) {
  time_t wakeupTime = LONG_MAX;
  wakeupTime = read_e2_timers(curTime);
  if (wakeupTime == LONG_MAX)
    wakeupTime = read_neutrino_timers(curTime);
  write_wakeup_file(wakeupTime);
  return wakeupTime;
}


x86 assembly (clang, -O0):
<read_timers_utc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <read_e2_timers@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2e7e(%rip),%rcx
cmp    (%rcx),%rax
jne    1178 <read_timers_utc+0x48>
mov    -0x8(%rbp),%rdi
call   1030 <read_neutrino_timers@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <write_wakeup_file@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_timers_utc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <read_e2_timers@plt>
mov    %rax,%rbx
mov    0x2e9a(%rip),%rax
cmp    (%rax),%rbx
jne    1156 <read_timers_utc+0x26>
mov    %r14,%rdi
call   1030 <read_neutrino_timers@plt>
mov    %rax,%rbx
mov    %rbx,%rdi
call   1040 <write_wakeup_file@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LONG_MAX = global i64 0
define i64 @read_timers_utc(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* @LONG_MAX
store i64 %4, i64* %3
%5 = load i64, i64* %2
%6 = call i64 @read_e2_timers(i64 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = load i64, i64* @LONG_MAX
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i64, i64* %2
%12 = call i64 @read_neutrino_timers(i64 %11)
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %3
%15 = call i32 @write_wakeup_file(i64 %14)
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
@LONG_MAX = global i64 0
define i64 @read_timers_utc(i64 %0) {
%2 = tail call i64 @read_e2_timers(i64 %0)
%3 = load i64, i64* @LONG_MAX
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i64 @read_neutrino_timers(i64 %0)
br label %7
7: ; preds = %5, %1
%8 = phi i64 [ %6, %5 ], [ %2, %1 ]
%9 = tail call i32 @write_wakeup_file(i64 %8)
ret i64 %8
}
/* Variables and functions */
double sqrt(double);
double area_of_triangle(double a, double b, double c) {
  double s, area;
  s = (a + b + c) / 2;
  area = sqrt(s * (s - a) * (s - b) * (s - c));
  return area;
}


x86 assembly (clang, -O0):
<area_of_triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<area_of_triangle>:
movapd %xmm0,%xmm3
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
mulsd  0xedc(%rip),%xmm0
movapd %xmm0,%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
mulsd  %xmm4,%xmm3
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <area_of_triangle+0x43>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @area_of_triangle(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fadd double %9, %10
%12 = load double, double* %6
%13 = fadd double %11, %12
%14 = fdiv double %13, 2.000000e+00
store double %14, double* %7
%15 = load double, double* %7
%16 = load double, double* %7
%17 = load double, double* %4
%18 = fsub double %16, %17
%19 = fmul double %15, %18
%20 = load double, double* %7
%21 = load double, double* %5
%22 = fsub double %20, %21
%23 = fmul double %19, %22
%24 = load double, double* %7
%25 = load double, double* %6
%26 = fsub double %24, %25
%27 = fmul double %23, %26
%28 = call double @sqrt(double %27)
store double %28, double* %8
%29 = load double, double* %8
ret double %29
}

LLVM IR (-O2):
define double @area_of_triangle(double %0, double %1, double %2) {
%4 = fadd double %0, %1
%5 = fadd double %4, %2
%6 = fmul double %5, 5.000000e-01
%7 = fsub double %6, %0
%8 = fmul double %6, %7
%9 = fsub double %6, %1
%10 = fmul double %9, %8
%11 = fsub double %6, %2
%12 = fmul double %11, %10
%13 = tail call double @sqrt(double %12)
ret double %13
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t bound_uint32(uint32_t val, uint32_t min, uint32_t max) {
  return val < min ? min : (val > max ? max : val);
}


x86 assembly (clang, -O0):
<bound_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <bound_uint32+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <bound_uint32+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <bound_uint32+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <bound_uint32+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_uint32>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @bound_uint32(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i64, i64* %5
br label %22
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i64, i64* %6
br label %20
18: ; preds = %12
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %16
%21 = phi i64 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i64 [ %11, %10 ], [ %21, %20 ]
ret i64 %23
}

LLVM IR (-O2):
define i64 @bound_uint32(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
void cmov2(x, y) float x, y;
{ cmov(x, y, 0.0); }


x86 assembly (clang, -O0):
<cmov2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm1,-0x10(%rbp)
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1030 <cmov@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmov2>:
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <cmov@plt>

LLVM IR (-O0):
define void @cmov2(double %0, double %1) {
%3 = alloca float
%4 = alloca float
%5 = fptrunc double %0 to float
%6 = fptrunc double %1 to float
store float %5, float* %3
store float %6, float* %4
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = load float, float* %4
%10 = fpext float %9 to double
%11 = call i32 (double, double, double, ...) bitcast (i32 (...)* @cmov to i32 (double, double, double, ...)*)(double %8, double %10, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @cmov2(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fpext float %3 to double
%6 = fpext float %4 to double
%7 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cmov to i32 (double, double, double, ...)*)(double %5, double %6, double 0.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void my_ioctl(int i) { foo(1); }


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

x86 assembly (clang, -O2):
<my_ioctl>:
mov    $0x1,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define void @my_ioctl(i32 %0) {
%2 = tail call i32 @foo(i32 1)
ret void
}
/* Variables and functions */
bool nrf52_errata_88(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_88() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_linux_file_name(char *);
int /*<<< orphan*/ tcp_lp_register();
void module_register(void) {
  tcp_lp_register();
  set_linux_file_name("tcp_lp.c");
}


x86 assembly (clang, -O0):
<module_register>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tcp_lp_register@plt>
lea    0xece(%rip),%rdi
call   1040 <set_linux_file_name@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_register>:
push   %rax
xor    %eax,%eax
call   1030 <tcp_lp_register@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <set_linux_file_name@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"tcp_lp.c\00"
define void @module_register() {
%1 = call i32 (...) @tcp_lp_register()
%2 = call i32 @set_linux_file_name(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"tcp_lp.c\00"
define void @module_register() {
%1 = tail call i32 (...) @tcp_lp_register()
%2 = tail call i32 @set_linux_file_name(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
void cpuidle_coupled_unregister_device(struct cpuidle_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.cpuidle_device = type opaque
define void @cpuidle_coupled_unregister_device(%struct.cpuidle_device* nocapture %0) {
ret void
}
double dijametar(double radius) { return 2 * radius; }


x86 assembly (clang, -O0):
<dijametar>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dijametar>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @dijametar(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 2.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @dijametar(double %0) {
%2 = fmul double %0, 2.000000e+00
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ min32u(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t min4x32u(uint32_t a, uint32_t b, uint32_t c, uint32_t d) {
  return min32u(min32u(a, b), min32u(c, d));
}


x86 assembly (clang, -O0):
<min4x32u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <min32u@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <min32u@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <min32u@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min4x32u>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
call   1030 <min32u@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <min32u@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <min32u@plt>

LLVM IR (-O0):
define i32 @min4x32u(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @min32u(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @min32u(i32 %12, i32 %13)
%15 = call i32 @min32u(i32 %11, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @min4x32u(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @min32u(i32 %0, i32 %1)
%6 = tail call i32 @min32u(i32 %2, i32 %3)
%7 = tail call i32 @min32u(i32 %5, i32 %6)
ret i32 %7
}
/* Variables and functions */
unsigned long i2c_SetSpeed(int, int, unsigned long);
unsigned long i2c1_SetSpeed(int mode, unsigned long bps) {
  return i2c_SetSpeed(1, mode, bps);
}


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

x86 assembly (clang, -O2):
<i2c1_SetSpeed>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <i2c_SetSpeed@plt>

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

LLVM IR (-O2):
define i64 @i2c1_SetSpeed(i32 %0, i64 %1) {
%3 = tail call i64 @i2c_SetSpeed(i32 1, i32 %0, i64 %1)
ret i64 %3
}
void TestBitArray() {}


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

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

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

LLVM IR (-O2):
define void @TestBitArray() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ max_heapify(int *, int, int);
void build_max_heap(int *array, int size) {
  int i;
  for (i = (int)(size / 2) - 1; i >= 0; i--) {
    max_heapify(array, i, size);
  }
}


x86 assembly (clang, -O0):
<build_max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <build_max_heap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <build_max_heap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_max_heap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1145 <build_max_heap+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%esi
mov    %r14,%rdi
mov    %ebp,%edx
call   1030 <max_heapify@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <build_max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @max_heapify(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %5, %4 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @max_heapify(i32* %0, i32 %8, i32 %1)
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}
double multiplier(t)
double t;
{ return (20.55 / t); }


x86 assembly (clang, -O0):
<multiplier>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplier>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @multiplier(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 2.055000e+01, %3
ret double %4
}

LLVM IR (-O2):
define double @multiplier(double %0) {
%2 = fdiv double 2.055000e+01, %0
ret double %2
}
void g_node_children_foreach() {}


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

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

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

LLVM IR (-O2):
define void @g_node_children_foreach() {
ret void
}
void ubi_debugging_exit_dev(struct ubi_device *ubi) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubi_device = type opaque
define void @ubi_debugging_exit_dev(%struct.ubi_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long);
char strlen(char *);
char *fifoFilename(unsigned long current, char *name) {
  sprintf(name + 1, "%lu", current);
  name[0] = 'A' + strlen(name + 1) - 1;
  return name;
}


x86 assembly (clang, -O0):
<fifoFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <strlen@plt>
movsbl %al,%eax
add    $0x41,%eax
sub    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifoFilename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rdx
lea    0x1(%rsi),%r14
lea    0xecb(%rip),%rsi
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    $0x40,%al
mov    %al,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
define i8* @fifoFilename(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i64, i64* %3
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call signext i8 @strlen(i8* %10)
%12 = sext i8 %11 to i32
%13 = add nsw i32 65, %12
%14 = sub nsw i32 %13, 1
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 %15, i8* %17
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i8* @fifoFilename(i64 %0, i8* returned %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = tail call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = tail call signext i8 @strlen(i8* %3)
%6 = add i8 %5, 64
store i8 %6, i8* %1
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ msg_print(char *, long);
long os_time();
long decode_seed_time() {
  long t;
  t = os_time();
  msg_print("seed time: %ld", t);
  return t;
}


x86 assembly (clang, -O0):
<decode_seed_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <os_time@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <msg_print@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_seed_time>:
push   %rbx
xor    %eax,%eax
call   1040 <os_time@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <msg_print@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"seed time: %ld\00"
define i64 @decode_seed_time() {
%1 = alloca i64
%2 = call i64 (...) @os_time()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @msg_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = load i64, i64* %1
ret i64 %5
}

LLVM IR (-O2):
@.str = [15 x i8] c"seed time: %ld\00"
define i64 @decode_seed_time() {
%1 = tail call i64 (...) @os_time()
%2 = tail call i32 @msg_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i64 %1
}
int intel_msic_is_current_sense_enabled(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @intel_msic_is_current_sense_enabled() {
ret i32 0
}
int test_imm_ECuint8_reg(unsigned char val) {
  return ((val) & (-0xEC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ECuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff14,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ECuint8_reg>:
test   $0x14,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ECuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 20
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
long Jul(long);
long Date_dif(long d1, long d2) { return Jul(d1) - Jul(d2); }


x86 assembly (clang, -O0):
<Date_dif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Jul@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Jul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Date_dif>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <Jul@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <Jul@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @Date_dif(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i64 @Jul(i64 %5)
%7 = load i64, i64* %4
%8 = call i64 @Jul(i64 %7)
%9 = sub nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @Date_dif(i64 %0, i64 %1) {
%3 = tail call i64 @Jul(i64 %0)
%4 = tail call i64 @Jul(i64 %1)
%5 = sub nsw i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int baz(int x, char **y) {
  if (x != 56)
    abort();
  if (**y != 'a')
    abort();
  return 26;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x38,-0x4(%rbp)
je     1130 <baz+0x20>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
je     114a <baz+0x3a>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1a,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
push   %rax
cmp    $0x38,%edi
jne    1125 <baz+0x15>
mov    (%rsi),%rax
cmpb   $0x61,(%rax)
jne    1125 <baz+0x15>
mov    $0x1a,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @baz(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 = icmp ne i32 %5, 56
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = load i8**, i8*** %4
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 97
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %9
ret i32 26
}

LLVM IR (-O2):
define i32 @baz(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 56
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 97
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %6
ret i32 26
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
void main() {
  int i;
  for (i = 0; i != 1000000; i++) {
    __VERIFIER_assert(i <= 1000000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
je     114e <main+0x3e>
cmpl   $0xf4240,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf4240,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 1000000
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 1000000
%8 = zext i1 %7 to i32
%9 = call i32 @__VERIFIER_assert(i32 %8)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @__VERIFIER_assert(i32 1)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 1000000
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
int setup(void *context) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setup(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int strncmp(char const *, char const *, size_t);
__attribute__((__weak__, __always___)) int
softboundcets_strncmp(const char *s1, const char *s2, size_t n) {
  return strncmp(s1, s2, n);
}


x86 assembly (clang, -O0):
<softboundcets_strncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strncmp>:
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
define weak i32 @softboundcets_strncmp(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @strncmp(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define weak i32 @softboundcets_strncmp(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
double exp(double);
double exponent(double x) {
  x = exp(-1.0 * x);
  return x;
}


x86 assembly (clang, -O0):
<exponent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponent>:
xorps  0xee9(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @exponent(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double -1.000000e+00, %3
%5 = call double @exp(double %4)
store double %5, double* %2
%6 = load double, double* %2
ret double %6
}

LLVM IR (-O2):
define double @exponent(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
ret double %3
}
void pit_init() {}


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

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

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

LLVM IR (-O2):
define void @pit_init() {
ret void
}
int acpi_is_wakeup_s3(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @acpi_is_wakeup_s3() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
size_t fread(int *, int, int, int /*<<< orphan*/ *);
void read_int(FILE *fp, int *i) {
  size_t read = fread(i, sizeof(*i), 1, fp);
  if (read != 1) {
    exit(12);
  }
}


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
je     1160 <read_int+0x40>
mov    $0xc,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%rax
jne    113e <read_int+0x1e>
pop    %rax
ret
mov    $0xc,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @read_int(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @fread(i32* %1, i32 4, i32 1, i32* %0)
%4 = icmp eq i64 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 12)
unreachable
7: ; preds = %2
ret void
}
void foo216(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo216(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int stream_open(int /*<<< orphan*/ **, int /*<<< orphan*/, char *, char *);
int streams_open(FILE **stream_in, char *in_filename, FILE **stream_out,
                 char *out_filename) {
  return (stream_open(stream_in, stdin, in_filename, "r") +
          stream_open(stream_out, stdout, out_filename, "w"));
}


x86 assembly (clang, -O0):
<streams_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
lea    0xec0(%rip),%rcx
call   1030 <stream_open@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
lea    0xea2(%rip),%rcx
call   1030 <stream_open@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streams_open>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rcx
call   1030 <stream_open@plt>
mov    %eax,%ebp
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rcx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <stream_open@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c"r\00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"w\00"
define i32 @streams_open(i32** %0, i8* %1, i32** %2, i8* %3) {
%5 = alloca i32**
%6 = alloca i8*
%7 = alloca i32**
%8 = alloca i8*
store i32** %0, i32*** %5
store i8* %1, i8** %6
store i32** %2, i32*** %7
store i8* %3, i8** %8
%9 = load i32**, i32*** %5
%10 = load i32, i32* @stdin
%11 = load i8*, i8** %6
%12 = call i32 @stream_open(i32** %9, i32 %10, i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = load i32**, i32*** %7
%14 = load i32, i32* @stdout
%15 = load i8*, i8** %8
%16 = call i32 @stream_open(i32** %13, i32 %14, i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = add nsw i32 %12, %16
ret i32 %17
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c"r\00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"w\00"
define i32 @streams_open(i32** %0, i8* %1, i32** %2, i8* %3) {
%5 = load i32, i32* @stdin
%6 = tail call i32 @stream_open(i32** %0, i32 %5, i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @stream_open(i32** %2, i32 %7, i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = add nsw i32 %8, %6
ret i32 %9
}
/* Variables and functions */
unsigned int _MM_GET_FLUSH_ZERO_MODE();
unsigned int test_MM_GET_FLUSH_ZERO_MODE() { return _MM_GET_FLUSH_ZERO_MODE(); }


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

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

LLVM IR (-O0):
define i32 @test_MM_GET_FLUSH_ZERO_MODE() {
%1 = call i32 (...) @_MM_GET_FLUSH_ZERO_MODE()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_MM_GET_FLUSH_ZERO_MODE() {
%1 = tail call i32 (...) @_MM_GET_FLUSH_ZERO_MODE()
ret i32 %1
}
/* Type definitions */
struct pt_regs {
  int dummy;
};

/* Variables and functions */
int do_signal(struct pt_regs *, int);
int l4x_do_signal(struct pt_regs *regs, int syscall) {
  return do_signal(regs, syscall);
}


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

x86 assembly (clang, -O2):
<l4x_do_signal>:
jmp    1030 <do_signal@plt>

LLVM IR (-O0):
%struct.pt_regs = type { i32 }
define i32 @l4x_do_signal(%struct.pt_regs* %0, i32 %1) {
%3 = alloca %struct.pt_regs*
%4 = alloca i32
store %struct.pt_regs* %0, %struct.pt_regs** %3
store i32 %1, i32* %4
%5 = load %struct.pt_regs*, %struct.pt_regs** %3
%6 = load i32, i32* %4
%7 = call i32 @do_signal(%struct.pt_regs* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.pt_regs = type { i32 }
define i32 @l4x_do_signal(%struct.pt_regs* %0, i32 %1) {
%3 = tail call i32 @do_signal(%struct.pt_regs* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void warning(const char *str) { fprintf(stderr, "Warning: %s\n", str); }


x86 assembly (clang, -O0):
<warning>:
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):
<warning>:
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 = [13 x i8] c"Warning: %s\0A\00"
define void @warning(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 ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"Warning: %s\0A\00"
define void @warning(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ scansysdir(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
char *bdevname(dev_t dev, char *buf) {
  char sysdir[512];
  strcpy(sysdir, "/sys/block");
  if (!scansysdir(buf, sysdir, dev))
    return NULL;
  return buf;
}


x86 assembly (clang, -O0):
<bdevname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x220(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    -0x220(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <scansysdir@plt>
cmp    $0x0,%eax
jne    116e <bdevname+0x4e>
movq   $0x0,-0x8(%rbp)
jmp    1176 <bdevname+0x56>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdevname>:
push   %rbp
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <scansysdir@plt>
xor    %ecx,%ecx
test   %eax,%eax
cmovne %rbx,%rcx
mov    %rcx,%rax
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"/sys/block\00"
define i8* @bdevname(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [512 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %5
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%11 = load i32, i32* %4
%12 = call i32 @scansysdir(i8* %9, i8* %10, i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %2
store i8* null, i8** %3
br label %17
15: ; preds = %2
%16 = load i8*, i8** %5
store i8* %16, i8** %3
br label %17
17: ; preds = %15, %14
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [11 x i8] c"/sys/block\00"
define i8* @bdevname(i32 %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scansysdir(i8* %1, i8* %4, i32 %0)
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* null, i8* %1
ret i8* %8
}