xunge/DecIR huggingface dataset:
int lqtvq_fmax(int x, int y) { return ((x > y) ? x : y); }


x86 assembly (clang, -O0):
<lqtvq_fmax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <lqtvq_fmax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <lqtvq_fmax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lqtvq_fmax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @lqtvq_fmax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
struct szl_obj {
  int dummy;
};
struct szl_interp {
  int dummy;
};

/* Variables and functions */
scalar_t__ szl_str_to_float(struct szl_interp *, struct szl_obj *);
scalar_t__ szl_wstr_to_str(struct szl_interp *, struct szl_obj *);
int szl_wstr_to_float(struct szl_interp *interp, struct szl_obj *obj) {
  return szl_wstr_to_str(interp, obj) && szl_str_to_float(interp, obj);
}


x86 assembly (clang, -O0):
<szl_wstr_to_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <szl_wstr_to_str@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <szl_wstr_to_float+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <szl_str_to_float@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<szl_wstr_to_float>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <szl_wstr_to_str@plt>
test   %rax,%rax
je     114c <szl_wstr_to_float+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <szl_str_to_float@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <szl_wstr_to_float+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_wstr_to_float(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = alloca %struct.szl_interp*
%4 = alloca %struct.szl_obj*
store %struct.szl_interp* %0, %struct.szl_interp** %3
store %struct.szl_obj* %1, %struct.szl_obj** %4
%5 = load %struct.szl_interp*, %struct.szl_interp** %3
%6 = load %struct.szl_obj*, %struct.szl_obj** %4
%7 = call i64 @szl_wstr_to_str(%struct.szl_interp* %5, %struct.szl_obj* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.szl_interp*, %struct.szl_interp** %3
%11 = load %struct.szl_obj*, %struct.szl_obj** %4
%12 = call i64 @szl_str_to_float(%struct.szl_interp* %10, %struct.szl_obj* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_wstr_to_float(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = tail call i64 @szl_wstr_to_str(%struct.szl_interp* %0, %struct.szl_obj* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @szl_str_to_float(%struct.szl_interp* %0, %struct.szl_obj* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
void vtime_account_irq_enter(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @vtime_account_irq_enter(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t h265hvcc_get_level_idc(const uint8_t *p) { return p[12]; }


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

x86 assembly (clang, -O2):
<h265hvcc_get_level_idc>:
mov    0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @h265hvcc_get_level_idc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 12
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @h265hvcc_get_level_idc(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 12
%3 = load i32, i32* %2
ret i32 %3
}
int islower(int a) { return (96 < a && a < 123) ? 1 : 0; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x60,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1124 <islower+0x24>
cmpl   $0x7b,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 96, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 123
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_usb_nr();
int wrap_get_usb_nr(struct activity *a) {
  int n = 0;
  if ((n = get_usb_nr()) > 0) {
    if (n > 65536)
      return 65536;
    else
      return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wrap_get_usb_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_usb_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    115a <wrap_get_usb_nr+0x4a>
cmpl   $0x10000,-0x14(%rbp)
jle    114f <wrap_get_usb_nr+0x3f>
movl   $0x10000,-0x4(%rbp)
jmp    1161 <wrap_get_usb_nr+0x51>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <wrap_get_usb_nr+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_usb_nr>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <get_usb_nr@plt>
cmp    $0x10000,%eax
mov    $0x10000,%ecx
cmovge %ecx,%eax
test   %eax,%eax
cmovs  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_usb_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 0, i32* %4
%5 = call i32 (...) @get_usb_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 65536
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 65536, i32* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_usb_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_usb_nr()
%3 = icmp slt i32 %2, 65536
%4 = select i1 %3, i32 %2, i32 65536
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
/* Variables and functions */
int foo(int);
int bar(int i) { return foo(i); }


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 @foo(i32 %0)
ret i32 %2
}
int is_empty(const char *str) { return !str || !*str; }


x86 assembly (clang, -O0):
<is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1127 <is_empty+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_empty>:
test   %rdi,%rdi
je     110e <is_empty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ true, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_empty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
double vnorm(x)
struct v *x;
{
  return (viprod(x, x));
}


x86 assembly (clang, -O0):
<vnorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <viprod@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnorm>:
push   %rax
mov    %rdi,%rsi
xor    %eax,%eax
call   1030 <viprod@plt>
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.v = type opaque
define double @vnorm(%struct.v* %0) {
%2 = alloca %struct.v*
store %struct.v* %0, %struct.v** %2
%3 = load %struct.v*, %struct.v** %2
%4 = load %struct.v*, %struct.v** %2
%5 = call i32 (%struct.v*, %struct.v*, ...) bitcast (i32 (...)* @viprod to i32 (%struct.v*, %struct.v*, ...)*)(%struct.v* %3, %struct.v* %4)
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
%struct.v = type opaque
define double @vnorm(%struct.v* %0) {
%2 = tail call i32 (%struct.v*, %struct.v*, ...) bitcast (i32 (...)* @viprod to i32 (%struct.v*, %struct.v*, ...)*)(%struct.v* %0, %struct.v* %0)
%3 = sitofp i32 %2 to double
ret double %3
}
/* Variables and functions */
double cos(int /*<<< orphan*/);
int /*<<< orphan*/ deg_to_rad(double);
double d_cos(double deg) { return (cos(deg_to_rad(deg))); }


x86 assembly (clang, -O0):
<d_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <deg_to_rad@plt>
mov    %eax,%edi
call   1040 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_cos>:
push   %rax
call   1030 <deg_to_rad@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <cos@plt>

LLVM IR (-O0):
define double @d_cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @deg_to_rad(double %3)
%5 = call double @cos(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @d_cos(double %0) {
%2 = tail call i32 @deg_to_rad(double %0)
%3 = tail call double @cos(i32 %2)
ret double %3
}
/* Variables and functions */
int bit_population_count(unsigned int);
int bit_num_trailing_zeros2(unsigned int n) {
  return (bit_population_count((n & -n) - 1));
}


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

x86 assembly (clang, -O2):
<bit_num_trailing_zeros2>:
mov    %edi,%eax
neg    %eax
and    %eax,%edi
add    $0xffffffff,%edi
jmp    1030 <bit_population_count@plt>

LLVM IR (-O0):
define i32 @bit_num_trailing_zeros2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 0, %4
%6 = and i32 %3, %5
%7 = sub i32 %6, 1
%8 = call i32 @bit_population_count(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @bit_num_trailing_zeros2(i32 %0) {
%2 = sub i32 0, %0
%3 = and i32 %2, %0
%4 = add i32 %3, -1
%5 = tail call i32 @bit_population_count(i32 %4)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void PWMOutputInvert(uint32_t ui32Base, uint32_t ui32PWMOutBits, bool bInvert) {
  ;

  ;
  if (bInvert == true) {
    (*((volatile uint32_t *)(ui32Base + 0x0000000C))) |= ui32PWMOutBits;
  } else {
    (*((volatile uint32_t *)(ui32Base + 0x0000000C))) &= ~(ui32PWMOutBits);
  }
}


x86 assembly (clang, -O0):
<PWMOutputInvert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1131 <PWMOutputInvert+0x31>
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0xc(%rax)
jmp    1148 <PWMOutputInvert+0x48>
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMOutputInvert>:
mov    %rdi,-0x10(%rsp)
mov    %rsi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
cmp    $0x1,%edx
jne    111e <PWMOutputInvert+0x1e>
mov    -0x10(%rsp),%rcx
or     %rax,0xc(%rcx)
ret
not    %rax
mov    -0x10(%rsp),%rcx
and    %rax,0xc(%rcx)
ret

LLVM IR (-O0):
define void @PWMOutputInvert(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store volatile i64 %0, i64* %4
store volatile i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load volatile i64, i64* %5
%11 = load volatile i64, i64* %4
%12 = add nsw i64 %11, 12
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = or i64 %14, %10
store volatile i64 %15, i64* %13
br label %24
16: ; preds = %3
%17 = load volatile i64, i64* %5
%18 = xor i64 %17, -1
%19 = load volatile i64, i64* %4
%20 = add nsw i64 %19, 12
%21 = inttoptr i64 %20 to i64*
%22 = load volatile i64, i64* %21
%23 = and i64 %22, %18
store volatile i64 %23, i64* %21
br label %24
24: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @PWMOutputInvert(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %4
store volatile i64 %1, i64* %5
%6 = icmp eq i32 %2, 1
%7 = load volatile i64, i64* %5
br i1 %6, label %8, label %14
8: ; preds = %3
%9 = load volatile i64, i64* %4
%10 = add nsw i64 %9, 12
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %7
store volatile i64 %13, i64* %11
br label %21
14: ; preds = %3
%15 = xor i64 %7, -1
%16 = load volatile i64, i64* %4
%17 = add nsw i64 %16, 12
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = and i64 %19, %15
store volatile i64 %20, i64* %18
br label %21
21: ; preds = %14, %8
ret void
}
void test_very_wide_line_2(void) {}


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

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

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

LLVM IR (-O2):
define void @test_very_wide_line_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int unlink(char *);
int main(void) {
  int result;
  result = unlink("test1.txt");
  if (result < 0) {
    printf("unlink test1.txt failed!\n");
    return -1;
  } else {
    printf("unlink test1.txt success!\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1160 <main+0x40>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <main+0x53>
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <unlink@plt>
mov    %eax,%ebx
test   %eax,%eax
lea    0xeec(%rip),%rax
lea    0xecb(%rip),%rdi
cmovs  %rax,%rdi
sar    $0x1f,%ebx
call   1040 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"test1.txt\00"
@.str.1 = [26 x i8] c"unlink test1.txt failed!\0A\00"
@.str.2 = [27 x i8] c"unlink test1.txt success!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [10 x i8] c"test1.txt\00"
@str = [26 x i8] c"unlink test1.txt success!\00"
@str.3 = [25 x i8] c"unlink test1.txt failed!\00"
define i32 @main() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0)
%4 = ashr i32 %1, 31
%5 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ good_echo();
int main() {
  good_echo();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @good_echo()
ret i32 0
}
double interp_6(double phim2, double phim1, double phi, double phip1,
                double phip2, double phip3) {
  return ((37.0 / 60.0) * (phi + phip1) - (2.0 / 15.0) * (phim1 + phip2) +
          (1.0 / 60.0) * (phim2 + phip3));
}


x86 assembly (clang, -O0):
<interp_6>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  -0x28(%rbp),%xmm2
movsd  0xed2(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xe85(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_6>:
addsd  %xmm4,%xmm1
mulsd  0xef4(%rip),%xmm1
addsd  %xmm3,%xmm2
mulsd  0xef0(%rip),%xmm2
addsd  %xmm1,%xmm2
addsd  %xmm5,%xmm0
mulsd  0xee8(%rip),%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @interp_6(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %9
%14 = load double, double* %10
%15 = fadd double %13, %14
%16 = load double, double* %8
%17 = load double, double* %11
%18 = fadd double %16, %17
%19 = fmul double 0x3FC1111111111111, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double 0x3FE3BBBBBBBBBBBC, double %15, double %20)
%22 = load double, double* %7
%23 = load double, double* %12
%24 = fadd double %22, %23
%25 = call double @llvm.fmuladd.f64(double 0x3F91111111111111, double %24, double %21)
ret double %25
}

LLVM IR (-O2):
define double @interp_6(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fadd double %2, %3
%8 = fadd double %1, %4
%9 = fmul double %8, 0xBFC1111111111111
%10 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FE3BBBBBBBBBBBC, double %9)
%11 = fadd double %0, %5
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3F91111111111111, double %10)
ret double %12
}
/* Variables and functions */
void *realloc(void *, int);
void *jdns_realloc(void *p, int size) { return realloc(p, size); }


x86 assembly (clang, -O0):
<jdns_realloc>:
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 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jdns_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @jdns_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int __futex(void volatile *, int, int, struct timespec const *);
int __futex_wait_ex(volatile void *ftx, bool shared, int value,
                    const struct timespec *timeout) {
  return __futex(ftx, shared ? 0 : (0 | 128), value, timeout);
}


x86 assembly (clang, -O0):
<__futex_wait_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x80,%esi
xor    %eax,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <__futex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__futex_wait_ex>:
xor    %eax,%eax
test   %esi,%esi
sete   %al
shl    $0x7,%eax
mov    %eax,%esi
jmp    1030 <__futex@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @__futex_wait_ex(i8* %0, i32 %1, i32 %2, %struct.timespec* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.timespec*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.timespec* %3, %struct.timespec** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 128
%14 = load i32, i32* %7
%15 = load %struct.timespec*, %struct.timespec** %8
%16 = call i32 @__futex(i8* %9, i32 %13, i32 %14, %struct.timespec* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @__futex_wait_ex(i8* %0, i32 %1, i32 %2, %struct.timespec* %3) {
%5 = icmp eq i32 %1, 0
%6 = select i1 %5, i32 128, i32 0
%7 = tail call i32 @__futex(i8* %0, i32 %6, i32 %2, %struct.timespec* %3)
ret i32 %7
}
/* Variables and functions */
int log(int);
int /*<<< orphan*/ printf(char *, char);
void printElement(int value) {
  char character = 'A';
  int offset = log(value) / log(2);
  printf("%c ", character + offset);
}


x86 assembly (clang, -O0):
<printElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <log@plt>
mov    %eax,-0x10(%rbp)
mov    $0x2,%edi
call   1040 <log@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
add    -0xc(%rbp),%eax
lea    0xea3(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printElement>:
push   %rbx
call   1040 <log@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
add    $0x41,%al
movsbl %al,%esi
lea    0xebb(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%c \00"
define void @printElement(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i32 %0, i32* %2
store i8 65, i8* %3
%5 = load i32, i32* %2
%6 = call i32 @log(i32 %5)
%7 = call i32 @log(i32 2)
%8 = sdiv i32 %6, %7
store i32 %8, i32* %4
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
%13 = trunc i32 %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %13)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
define void @printElement(i32 %0) {
%2 = tail call i32 @log(i32 %0)
%3 = tail call i32 @log(i32 2)
%4 = sdiv i32 %2, %3
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 65
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret void
}
/* Variables and functions */
int strlen(unsigned char *);
int /*<<< orphan*/ vdp_gotoxy(unsigned char, unsigned char);
int /*<<< orphan*/ vdp_putstring(unsigned char *);
void printCenter(unsigned char y, unsigned char *msg) {
  unsigned char x;
  x = 16 - strlen(msg) / 2;
  vdp_gotoxy(x, y);
  vdp_putstring(msg);
}


x86 assembly (clang, -O0):
<printCenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x10,%eax
sub    %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
movzbl %al,%edi
movzbl -0x1(%rbp),%esi
call   1050 <vdp_gotoxy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <vdp_putstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCenter>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
shr    %ecx
mov    $0x10,%al
sub    %cl,%al
movzbl %al,%edi
mov    %ebp,%esi
call   1050 <vdp_gotoxy@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <vdp_putstring@plt>

LLVM IR (-O0):
define void @printCenter(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = sdiv i32 %7, 2
%9 = sub nsw i32 16, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %5
%11 = load i8, i8* %5
%12 = load i8, i8* %3
%13 = call i32 @vdp_gotoxy(i8 zeroext %11, i8 zeroext %12)
%14 = load i8*, i8** %4
%15 = call i32 @vdp_putstring(i8* %14)
ret void
}

LLVM IR (-O2):
define void @printCenter(i8 zeroext %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = sdiv i32 %3, -2
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 16
%7 = tail call i32 @vdp_gotoxy(i8 zeroext %6, i8 zeroext %0)
%8 = tail call i32 @vdp_putstring(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *progname) {
  printf("%s, a simple program to create or enter linux network namespaces\n",
         progname);
  printf("\n\nSimply invoke it and a shell will be created in a new network "
         "namespace.\n");
  printf("    Options:\n");
  printf("      -h display this message.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf48(%rip),%rdi
call   1030 <puts@plt>
lea    0xf49(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"%s, a simple program to create or enter linux network namespaces\0A\00"
@.str.1 = [76 x i8] c"\0A\0ASimply invoke it and a shell will be created in a new network namespace.\0A\00"
@.str.2 = [14 x i8] c" Options:\0A\00"
@.str.3 = [32 x i8] c" -h display this message.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"%s, a simple program to create or enter linux network namespaces\0A\00"
@str = [75 x i8] c"\0A\0ASimply invoke it and a shell will be created in a new network namespace.\00"
@str.4 = [13 x i8] c" Options:\00"
@str.5 = [31 x i8] c" -h display this message.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int write(int, char *, int);
int main() {
  if (write(1, "here is some data\n", 18) != 18)
    write(2, "there is not 18 character\n", 27);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0x12,%edx
call   1030 <write@plt>
cmp    $0x12,%eax
je     1164 <main+0x44>
mov    $0x2,%edi
lea    0xeb9(%rip),%rsi
mov    $0x1b,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x12,%edx
call   1030 <write@plt>
cmp    $0x12,%eax
je     1152 <main+0x32>
lea    0xed0(%rip),%rsi
mov    $0x2,%edi
mov    $0x1b,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"here is some data\0A\00"
@.str.1 = [27 x i8] c"there is not 18 character\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%3 = icmp ne i32 %2, 18
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @write(i32 2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 27)
br label %6
6: ; preds = %4, %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"here is some data\0A\00"
@.str.1 = [27 x i8] c"there is not 18 character\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%2 = icmp eq i32 %1, 18
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 27)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int __VERIFIER_nondet_int();
scalar_t__ alloca(int);
int /*<<< orphan*/ insertionSort(int *, int);
int main() {
  int array_size = __VERIFIER_nondet_int();
  if (array_size < 1 || array_size >= 2147483647 / sizeof(int)) {
    array_size = 1;
  }
  int *a = (int *)alloca(array_size * sizeof(int));
  insertionSort(a, array_size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1163 <main+0x33>
movslq -0x8(%rbp),%rax
cmp    $0x1fffffff,%rax
jb     116a <main+0x3a>
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
lea    -0x1fffffff(%rax),%ecx
cmp    $0xe0000002,%ecx
mov    $0x1,%ebx
cmovae %eax,%ebx
lea    0x0(,%rbx,4),%edi
call   1030 <alloca@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %11, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = icmp uge i64 %9, 536870911
br i1 %10, label %11, label %12
11: ; preds = %7, %0
store i32 1, i32* %2
br label %12
12: ; preds = %11, %7
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i64 @alloca(i32 %16)
%18 = inttoptr i64 %17 to i32*
store i32* %18, i32** %3
%19 = load i32*, i32** %3
%20 = load i32, i32* %2
%21 = call i32 @insertionSort(i32* %19, i32 %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = add i32 %1, -536870911
%3 = icmp ult i32 %2, -536870910
%4 = select i1 %3, i32 1, i32 %1
%5 = shl nuw nsw i32 %4, 2
%6 = tail call i64 @alloca(i32 %5)
%7 = inttoptr i64 %6 to i32*
%8 = tail call i32 @insertionSort(i32* %7, i32 %4)
ret i32 0
}
void WideTimer4A_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @WideTimer4A_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(void *);
void cleanup_func(void *p) { puts(p); }


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

x86 assembly (clang, -O2):
<cleanup_func>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @cleanup_func(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
int cmp(const void *left, const void *right) {
  int l = 0;
  int r = 0;
  l = *(int *)left;
  r = *(int *)right;
  if (l < r)
    return (-1);
  if (l > r)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1144 <cmp+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <cmp+0x63>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    115c <cmp+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <cmp+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int __fixsfsi(float a __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__fixsfsi(float %0) {
ret i32 0
}
void g_cclosure_marshal_VOID__FLOAT() {}


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

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

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

LLVM IR (-O2):
define void @g_cclosure_marshal_VOID__FLOAT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void CloseClientSocket(int sock_client) {
  if (sock_client < 0)
    return;
  close(sock_client);
  sock_client = -1;
}


x86 assembly (clang, -O0):
<CloseClientSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112a <CloseClientSocket+0x1a>
jmp    1139 <CloseClientSocket+0x29>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseClientSocket>:
test   %edi,%edi
js     1119 <CloseClientSocket+0x9>
jmp    1030 <close@plt>
ret

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

LLVM IR (-O2):
define void @CloseClientSocket(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
unsigned int strtoul(char const *, char **, int);
char *FormatExternalParseNatural(const char *format, unsigned *value) {
  char *endPtr = (char *)format;
  unsigned ret = strtoul(format, &endPtr, 10);
  if (value)
    *value = ret;
  return endPtr;
}


x86 assembly (clang, -O0):
<FormatExternalParseNatural>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1151 <FormatExternalParseNatural+0x41>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FormatExternalParseNatural>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
test   %rbx,%rbx
je     1133 <FormatExternalParseNatural+0x23>
mov    %eax,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @FormatExternalParseNatural(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %3
%9 = call i32 @strtoul(i8* %8, i8** %5, i32 10)
store i32 %9, i32* %6
%10 = load i32*, i32** %4
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %6
%14 = load i32*, i32** %4
store i32 %13, i32* %14
br label %15
15: ; preds = %12, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @FormatExternalParseNatural(i8* %0, i32* writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* %0, i8** %3
%5 = call i32 @strtoul(i8* %0, i8** %3, i32 10)
%6 = icmp eq i32* %1, null
br i1 %6, label %8, label %7
7: ; preds = %2
store i32 %5, i32* %1
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
ret i8* %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t Function1Uint32(uint32_t x) { return x + 42; }


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

x86 assembly (clang, -O2):
<Function1Uint32>:
lea    0x2a(%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @Function1Uint32(i64 %0) {
%2 = add nsw i64 %0, 42
ret i64 %2
}
/* Variables and functions */
int PAPI_stop_counters(long long *, int);
void PAPIF_STOP_COUNTERS(long long *values, int *array_len, int *check) {
  *check = PAPI_stop_counters(values, *array_len);
}


x86 assembly (clang, -O0):
<PAPIF_STOP_COUNTERS>:
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),%rax
mov    (%rax),%esi
call   1030 <PAPI_stop_counters@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_STOP_COUNTERS>:
push   %rbx
mov    %rdx,%rbx
mov    (%rsi),%esi
call   1030 <PAPI_stop_counters@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_STOP_COUNTERS(i64* %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @PAPI_stop_counters(i64* %0, i32 %4)
store i32 %5, i32* %2
ret void
}
unsigned int pathCmp(char *path, char *cmp) {
  while (*cmp)
    if (*(path++) != *(cmp++))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<pathCmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <pathCmp+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <pathCmp+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <pathCmp+0x5d>
jmp    110c <pathCmp+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathCmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1127 <pathCmp+0x27>
lea    0x1(%rax),%rdx
cmp    %cl,(%rdi,%rax,1)
mov    %rdx,%rax
je     1110 <pathCmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @pathCmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %11, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %10, %6
br i1 %12, label %3, label %13
13: ; preds = %3, %8
%14 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/"
             "LibFontConfig/src/fc-cache/.libs/lt-fc-cache.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf51(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf6c(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

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/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-cache/.libs/lt-fc-cache.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

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/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-cache/.libs/lt-fc-cache.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}