xunge/DecIR huggingface dataset:
int range(int x, int lo, int hi) {
  return (unsigned int)(x - lo) <= (unsigned int)(hi - lo);
}


x86 assembly (clang, -O0):
<range>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range>:
sub    %esi,%edi
sub    %esi,%edx
xor    %eax,%eax
cmp    %edx,%edi
setbe  %al
ret

LLVM IR (-O0):
define i32 @range(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
%13 = icmp ule i32 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @range(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %1
%5 = sub nsw i32 %2, %1
%6 = icmp ule i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int __infer_nondet_int();
int isatty(int fildes) {
  int ret;
  ret = __infer_nondet_int();
  if (ret < 0 || ret > 1)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1139 <isatty+0x29>
cmpl   $0x1,-0x8(%rbp)
jle    1143 <isatty+0x33>
jmp    113e <isatty+0x2e>
jmp    113e <isatty+0x2e>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
cmp    $0x2,%eax
jb     1122 <isatty+0x12>
nopl   (%rax)
jmp    1120 <isatty+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = icmp ugt i32 %2, 1
br i1 %3, label %4, label %5
4: ; preds = %1, %4
br label %4
5: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ body_of_program();
int /*<<< orphan*/ register_handler();
void test(void) {
  register_handler();
  body_of_program();
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1040 <register_handler@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <body_of_program@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 (...) @register_handler()
%2 = call i32 (...) @body_of_program()
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @register_handler()
%2 = tail call i32 (...) @body_of_program()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  int num = 1;
  while (num <= 100)
    printf("%d -", num++);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114c <main+0x3c>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%esi
lea    0xee1(%rip),%rbx
nop
lea    0x1(%rsi),%ebp
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %ebp,%esi
cmp    $0x65,%ebp
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d -\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d -\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = icmp eq i32 %3, 101
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
AR0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (p0[10000000]) = (p1[x1]); }


x86 assembly (clang, -O0):
<AR0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,2),%cx
mov    -0x18(%rbp),%rax
mov    %cx,0x1312d00(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0RX1>:
movslq %ecx,%rax
movzwl (%r9,%rax,2),%eax
mov    %ax,0x1312d00(%r8)
01
ret

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

LLVM IR (-O2):
define i32 @AR0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture writeonly %4, i16* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i16, i16* %5, i64 %7
%9 = load i16, i16* %8
%10 = getelementptr inbounds i16, i16* %4, i64 10000000
store i16 %9, i16* %10
ret i32 undef
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int file_exists(char *filename) {
  struct stat buffer;
  return (stat(filename, &buffer) == 0);
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_004(int a, int c, int b, int d) { return a + (c & 1) + b; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
and    $0x1,%esi
lea    (%rsi,%rdi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_004(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 = and i32 %10, 1
%12 = add nsw i32 %9, %11
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_004(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %1, 1
%6 = add nsw i32 %5, %0
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Type definitions */
typedef int __int64_t;

/* Variables and functions */
__int64_t power2BF_I(int n) {
  __int64_t pow = 1;
  while (0 < n--) {
    pow <<= n;
  }
  return pow;
}


x86 assembly (clang, -O0):
<power2BF_I>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmp    %ecx,%eax
jge    1133 <power2BF_I+0x33>
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <power2BF_I+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power2BF_I>:
add    $0x1,%edi
mov    $0x1,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%eax
lea    -0x2(%rdi),%ecx
shl    %cl,%edx
add    $0xffffffff,%edi
test   %edi,%edi
jg     1110 <power2BF_I+0x10>
ret

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

LLVM IR (-O2):
define i32 @power2BF_I(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 1, %1 ], [ %7, %2 ]
%5 = add nsw i32 %3, -1
%6 = icmp sgt i32 %3, 0
%7 = shl i32 %4, %5
br i1 %6, label %2, label %8
8: ; preds = %2
ret i32 %4
}
int get_bits(unsigned long mask) {
  register int i;
  for (i = 0; mask; mask >>= 1)
    if (mask & 1)
      i++;
  return i;
}


x86 assembly (clang, -O0):
<get_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <get_bits+0x4b>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1135 <get_bits+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <get_bits+0x3a>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <get_bits+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bits>:
xor    %eax,%eax
test   %rdi,%rdi
je     1123 <get_bits+0x23>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <get_bits+0x10>
ret

LLVM IR (-O0):
define i32 @get_bits(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i64, i64* %2
%9 = and i64 %8, 1
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %7
br label %15
15: ; preds = %14
%16 = load i64, i64* %2
%17 = lshr i64 %16, 1
store i64 %17, i64* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @get_bits(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %9, %3 ], [ %0, %1 ]
%6 = trunc i64 %5 to i32
%7 = and i32 %6, 1
%8 = add nuw nsw i32 %7, %4
%9 = lshr i64 %5, 1
%10 = icmp ult i64 %5, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
double quadfrac(double s0, double s1, double s2, double pf) {
  double tmp =
      s0 + (pf / 2.) * (pf * (s0 - 2. * s1 + s2) - 3. * s0 + 4. * s1 - s2);
  return tmp;
}


x86 assembly (clang, -O0):
<quadfrac>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xee6(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  -0x20(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
subsd  %xmm2,%xmm4
addsd  -0x18(%rbp),%xmm4
movsd  0xeb6(%rip),%xmm2
mulsd  -0x8(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
movsd  -0x10(%rbp),%xmm2
movsd  0xe7d(%rip),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
subsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadfrac>:
movsd  0xef8(%rip),%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm1,%xmm5
addsd  %xmm1,%xmm5
movapd %xmm0,%xmm6
subsd  %xmm5,%xmm6
addsd  %xmm2,%xmm6
movsd  0xee0(%rip),%xmm5
mulsd  %xmm0,%xmm5
mulsd  %xmm3,%xmm6
addsd  %xmm5,%xmm6
mulsd  0xed4(%rip),%xmm1
addsd  %xmm1,%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm4,%xmm6
addsd  %xmm6,%xmm0
ret

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

LLVM IR (-O2):
define double @quadfrac(double %0, double %1, double %2, double %3) {
%5 = fmul double %3, 5.000000e-01
%6 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double %0)
%7 = fadd double %6, %2
%8 = fmul double %0, -3.000000e+00
%9 = tail call double @llvm.fmuladd.f64(double %3, double %7, double %8)
%10 = tail call double @llvm.fmuladd.f64(double %1, double 4.000000e+00, double %9)
%11 = fsub double %10, %2
%12 = tail call double @llvm.fmuladd.f64(double %5, double %11, double %0)
ret double %12
}
/* Variables and functions */
int asnSkipFile(int);
int asnReadNullL(void) { return asnSkipFile(1); }


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

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

LLVM IR (-O0):
define i32 @asnReadNullL() {
%1 = call i32 @asnSkipFile(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @asnReadNullL() {
%1 = tail call i32 @asnSkipFile(i32 1)
ret i32 %1
}
struct aufs_inode *AUFS_I(struct inode *inode) {
  return (struct aufs_inode *)inode;
}


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

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

LLVM IR (-O0):
%struct.aufs_inode = type opaque
%struct.inode = type opaque
define %struct.aufs_inode* @AUFS_I(%struct.inode* %0) {
%2 = alloca %struct.inode*
store %struct.inode* %0, %struct.inode** %2
%3 = load %struct.inode*, %struct.inode** %2
%4 = bitcast %struct.inode* %3 to %struct.aufs_inode*
ret %struct.aufs_inode* %4
}

LLVM IR (-O2):
%struct.aufs_inode = type opaque
%struct.inode = type opaque
define %struct.aufs_inode* @AUFS_I(%struct.inode* readnone %0) {
%2 = bitcast %struct.inode* %0 to %struct.aufs_inode*
ret %struct.aufs_inode* %2
}
/* Variables and functions */
int /*<<< orphan*/ _f_setword(unsigned char *, unsigned short);
unsigned char *_setword(unsigned short num, unsigned char *ptr) {
  _f_setword(ptr, num);
  return ptr + 2;
}


x86 assembly (clang, -O0):
<_setword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movzwl -0x2(%rbp),%esi
call   1030 <_f_setword@plt>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_setword>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
mov    %rbx,%rdi
call   1030 <_f_setword@plt>
add    $0x2,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_setword(i16 zeroext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
store i16 %0, i16* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i16, i16* %3
%7 = call i32 @_f_setword(i8* %5, i16 zeroext %6)
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 2
ret i8* %9
}

LLVM IR (-O2):
define i8* @_setword(i16 zeroext %0, i8* %1) {
%3 = tail call i32 @_f_setword(i8* %1, i16 zeroext %0)
%4 = getelementptr inbounds i8, i8* %1, i64 2
ret i8* %4
}
const char *vercmp_nondigit_end(const char *v) {
  while (*v != '\0' && (*v < '0' || *v > '9')) {
    v++;
  }
  return v;
}


x86 assembly (clang, -O0):
<vercmp_nondigit_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <vercmp_nondigit_end+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x30,%ecx
mov    %al,-0xa(%rbp)
jl     1142 <vercmp_nondigit_end+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setg   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <vercmp_nondigit_end+0x58>
jmp    1169 <vercmp_nondigit_end+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <vercmp_nondigit_end+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vercmp_nondigit_end>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1124 <vercmp_nondigit_end+0x24>
add    $0xc6,%cl
cmp    $0xf6,%cl
jb     1110 <vercmp_nondigit_end+0x10>
ret

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

LLVM IR (-O2):
define i8* @vercmp_nondigit_end(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %9, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = add i8 %4, -58
%7 = icmp ult i8 %6, -10
%8 = and i1 %5, %7
%9 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %8, label %2, label %10
10: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int readlink(char *, char *, int);
int main() {
  char buf[1024];
  ssize_t len;
  if ((len = readlink("/modules/pass1", buf, sizeof(buf) - 1)) != -1)
    buf[len] = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x3ff,%edx
call   1030 <readlink@plt>
mov    %eax,-0x414(%rbp)
cmp    $0xffffffff,%eax
je     1158 <main+0x48>
movslq -0x414(%rbp),%rax
movb   $0x0,-0x410(%rbp,%rax,1)
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x408,%rsp
lea    0xee2(%rip),%rdi
mov    %rsp,%rsi
mov    $0x3ff,%edx
call   1030 <readlink@plt>
cmp    $0xffffffff,%eax
je     1136 <main+0x26>
cltq
movb   $0x0,(%rsp,%rax,1)
xor    %eax,%eax
add    $0x408,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/modules/pass1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4, i32 1023)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %7, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"/modules/pass1\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2, i32 1023)
%4 = icmp eq i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %6
store i8 0, i8* %7
br label %8
8: ; preds = %5, %0
ret i32 0
}
int __attribute__((regparm(2))) f1(int x, int y) { return x * 3 + y; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x3,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
lea    (%rdi,%rdi,2),%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 3
%4 = add nsw i32 %3, %1
ret i32 %4
}
long long int f_n_in(void) { return 1; }


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

x86 assembly (clang, -O2):
<f_n_in>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @f_n_in() {
ret i64 1
}

LLVM IR (-O2):
define i64 @f_n_in() {
ret i64 1
}
/* Type definitions */
struct stat {
  scalar_t__ st_atime;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int stat(char *, struct stat *);
int get_timestamp(char *file) {
  struct stat fs;
  if (stat(file, &fs) == -1) {
    perror("stat");
    exit(EXIT_FAILURE);
  }
  return (int)fs.st_atime;
}


x86 assembly (clang, -O0):
<get_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    116c <get_timestamp+0x3c>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timestamp>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
je     1143 <get_timestamp+0x13>
mov    (%rsp),%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [5 x i8] c"stat\00"
@EXIT_FAILURE = global i32 0
define i32 @get_timestamp(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
%12 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [5 x i8] c"stat\00"
@EXIT_FAILURE = global i32 0
define i32 @get_timestamp(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
ret i32 %13
}
/* Variables and functions */
int execve(char *, char **, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *arg[] = {"randombadpath", 0};
  int res = execve("/randombadpath", arg, 0);
  printf("Execve returned with %d\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeb0(%rip),%rdi
xor    %edx,%edx
call   1040 <execve@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeca(%rip),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <execve@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"randombadpath\00"
@__const.main.arg = [2 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [15 x i8] c"/randombadpath\00"
@.str.2 = [25 x i8] c"Execve returned with %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%6 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"randombadpath\00"
@__const.main.arg = [2 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [15 x i8] c"/randombadpath\00"
@.str.2 = [25 x i8] c"Execve returned with %d\0A\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %3, i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
float CLOCKS_PER_SEC;
scalar_t__ clock();
float getTime(clock_t startTime) {
  return (float)(clock() - startTime) / CLOCKS_PER_SEC;
}


x86 assembly (clang, -O0):
<getTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x8(%rbp),%rax
cvtsi2ss %rax,%xmm0
mov    0x2eb5(%rip),%rax
divss  (%rax),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTime>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
cvtsi2ss %rax,%xmm0
mov    0x2ebe(%rip),%rax
divss  (%rax),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global float 0.000000e+00
define float @getTime(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @clock()
%4 = load i64, i64* %2
%5 = sub nsw i64 %3, %4
%6 = sitofp i64 %5 to float
%7 = load float, float* @CLOCKS_PER_SEC
%8 = fdiv float %6, %7
ret float %8
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global float 0.000000e+00
define float @getTime(i64 %0) {
%2 = tail call i64 (...) @clock()
%3 = sub nsw i64 %2, %0
%4 = sitofp i64 %3 to float
%5 = load float, float* @CLOCKS_PER_SEC
%6 = fdiv float %4, %5
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ SOCK_DGRAM;
int svc_socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/);
int svcudp_socket(u_long number) {
  return svc_socket(number, SOCK_DGRAM, IPPROTO_UDP, FALSE);
}


x86 assembly (clang, -O0):
<svcudp_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
call   1030 <svc_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svcudp_socket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    0x2eaf(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <svc_socket@plt>

LLVM IR (-O0):
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@FALSE = global i32 0
define i32 @svcudp_socket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SOCK_DGRAM
%5 = load i32, i32* @IPPROTO_UDP
%6 = load i32, i32* @FALSE
%7 = call i32 @svc_socket(i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@FALSE = global i32 0
define i32 @svcudp_socket(i32 %0) {
%2 = load i32, i32* @SOCK_DGRAM
%3 = load i32, i32* @IPPROTO_UDP
%4 = load i32, i32* @FALSE
%5 = tail call i32 @svc_socket(i32 %0, i32 %2, i32 %3, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ XImage;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XImage(void) {
  XImage *_p = (XImage *)malloc(sizeof(XImage));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XImage+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XImage>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XImage+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XImage() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XImage() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void usage() { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xfe() {
  Assert_real((isalpha(254) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              1275, ("isalpha should be 0 for 0xfe"));
}


x86 assembly (clang, -O0):
<t_isalpha_0xfe>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfe,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4fb,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0xfe>:
push   %rax
mov    $0xfe,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4fb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xfe\00"
define void @t_isalpha_0xfe() {
%1 = call i64 @isalpha(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xfe\00"
define void @t_isalpha_0xfe() {
%1 = tail call i64 @isalpha(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int executeHandleMessage(void *, char *, int);
unsigned int assertEvent(void *handle, char *message) {
  return executeHandleMessage(handle, message, 2);
}


x86 assembly (clang, -O0):
<assertEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <executeHandleMessage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertEvent>:
mov    $0x2,%edx
jmp    1030 <executeHandleMessage@plt>

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

LLVM IR (-O2):
define i32 @assertEvent(i8* %0, i8* %1) {
%3 = tail call i32 @executeHandleMessage(i8* %0, i8* %1, i32 2)
ret i32 %3
}
f(char *x) { *x = 'x'; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x78,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movb   $0x78,(%rdi)
ret

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
store i8 120, i8* %4
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i8* nocapture writeonly %0) {
store i8 120, i8* %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x35() {
  Assert_real((isgraph(53)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              270, ("isgraph should be 1 for 5"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x35>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x10e,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x35>:
push   %rax
mov    $0x35,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x10e,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 5\00"
define void @t_isgraph_0x35() {
%1 = call i32 @isgraph(i32 53)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 5\00"
define void @t_isgraph_0x35() {
%1 = tail call i32 @isgraph(i32 53)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int createID(int seed) { return seed + 1; }


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

x86 assembly (clang, -O2):
<createID>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @createID(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @createID(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int unlink(char *);
int hyper_unlink(char *hyper_path) { return unlink(hyper_path); }


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

x86 assembly (clang, -O2):
<hyper_unlink>:
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define i32 @hyper_unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @unlink(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @hyper_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void pr_B2_low(FILE *fp, bool bl) {
  fprintf(fp, "CC:B2 transmit power ≥ 70 W:%s\n", ((bl) ? "Yes" : "No"));
}


x86 assembly (clang, -O0):
<pr_B2_low>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xef9(%rip),%rdx
lea    0xeee(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_B2_low>:
test   %esi,%esi
lea    0xf0d(%rip),%rax
lea    0xf02(%rip),%rdx
cmove  %rax,%rdx
lea    0xed5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"CC:B2 transmit power \E2\89\A5 70 W:%s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define void @pr_B2_low(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"CC:B2 transmit power \E2\89\A5 70 W:%s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define void @pr_B2_low(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int ceil_dbl_to_int(double x) {
  const double truncation = (int)x;
  return truncation + (truncation < x);
}


x86 assembly (clang, -O0):
<ceil_dbl_to_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
ucomisd %xmm2,%xmm1
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_dbl_to_int>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
movapd %xmm1,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xee7(%rip),%xmm0
andpd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @ceil_dbl_to_int(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* %3
%9 = load double, double* %2
%10 = fcmp olt double %8, %9
%11 = zext i1 %10 to i32
%12 = sitofp i32 %11 to double
%13 = fadd double %7, %12
%14 = fptosi double %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @ceil_dbl_to_int(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp olt double %3, %0
%5 = uitofp i1 %4 to double
%6 = fadd double %3, %5
%7 = fptosi double %6 to i32
ret i32 %7
}
void pci_set_of_node(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_set_of_node(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ sn3218a_led_state_fb(int);
int /*<<< orphan*/ sn3218a_led_take_bg(int);
int /*<<< orphan*/ sn3218a_led_take_fg(int);
void sn3218a_led_toggle_fb(int led) {
  if (sn3218a_led_state_fb(led))
    sn3218a_led_take_bg(led);
  else
    sn3218a_led_take_fg(led);
}


x86 assembly (clang, -O0):
<sn3218a_led_toggle_fb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sn3218a_led_state_fb@plt>
cmp    $0x0,%rax
je     115a <sn3218a_led_toggle_fb+0x2a>
mov    -0x4(%rbp),%edi
call   1030 <sn3218a_led_take_bg@plt>
jmp    1162 <sn3218a_led_toggle_fb+0x32>
mov    -0x4(%rbp),%edi
call   1050 <sn3218a_led_take_fg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sn3218a_led_toggle_fb>:
push   %rbx
mov    %edi,%ebx
call   1040 <sn3218a_led_state_fb@plt>
mov    %ebx,%edi
test   %rax,%rax
je     1145 <sn3218a_led_toggle_fb+0x15>
pop    %rbx
jmp    1030 <sn3218a_led_take_bg@plt>
pop    %rbx
jmp    1050 <sn3218a_led_take_fg@plt>

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

LLVM IR (-O2):
define void @sn3218a_led_toggle_fb(i32 %0) {
%2 = tail call i64 @sn3218a_led_state_fb(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @sn3218a_led_take_bg(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @sn3218a_led_take_fg(i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int min_jumps(int *, int);
int test_min_jumps() {
  int input[] = {1, 3, 5, 8, 9, 2, 6, 7, 6, 8};
  return 3 == min_jumps(input, 11);
}


x86 assembly (clang, -O0):
<test_min_jumps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1030 <min_jumps@plt>
mov    %eax,%ecx
mov    $0x3,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_min_jumps>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xb,%esi
call   1030 <min_jumps@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_min_jumps.input = [10 x i32] [i32 1, i32 3, i32 5, i32 8, i32 9, i32 2, i32 6, i32 7, i32 6, i32 8]
define i32 @test_min_jumps() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @min_jumps(i32* %3, i32 11)
%5 = icmp eq i32 3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@__const.test_min_jumps.input = [10 x i32] [i32 1, i32 3, i32 5, i32 8, i32 9, i32 2, i32 6, i32 7, i32 6, i32 8]
define i32 @test_min_jumps() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @min_jumps(i32* %3, i32 11)
%5 = icmp eq i32 %4, 3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char *piece_quoted(char *, char, char *, int, char);
char *piece_double_quoted(char *destination, char delimiter, char *source,
                          int offset) {
  return piece_quoted(destination, delimiter, source, offset, '"');
}


x86 assembly (clang, -O0):
<piece_double_quoted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x22,%r8d
movsbl %al,%esi
call   1030 <piece_quoted@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_double_quoted>:
mov    $0x22,%r8d
jmp    1030 <piece_quoted@plt>

LLVM IR (-O0):
define i8* @piece_double_quoted(i8* %0, i8 signext %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8, i8* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i8* @piece_quoted(i8* %9, i8 signext %10, i8* %11, i32 %12, i8 signext 34)
ret i8* %13
}

LLVM IR (-O2):
define i8* @piece_double_quoted(i8* %0, i8 signext %1, i8* %2, i32 %3) {
%5 = tail call i8* @piece_quoted(i8* %0, i8 signext %1, i8* %2, i32 %3, i8 signext 34)
ret i8* %5
}