xunge/DecIR huggingface dataset:
int adv(int vez) { return ((-1) * vez); }


x86 assembly (clang, -O0):
<adv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xffffffff,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adv>:
mov    %edi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @adv(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
OP(dd, af) {
  illegal_1();
  op_af();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_af@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_af()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_af()
ret i32 undef
}
int test_imm_01uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x01 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_01uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_01uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4294967296
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ff_hevc_put_hevc_epel_hv48_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv48_10_avx2() {
ret void
}
/* Variables and functions */
scalar_t__ is_attr_name(char const);
char *__skip_attr_name(const char *s) {
  while (is_attr_name(*s))
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<__skip_attr_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_attr_name@plt>
cmp    $0x0,%rax
je     1143 <__skip_attr_name+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <__skip_attr_name+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__skip_attr_name>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <is_attr_name@plt>
test   %rax,%rax
jne    1120 <__skip_attr_name+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @__skip_attr_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @is_attr_name(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @__skip_attr_name(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @is_attr_name(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int keycode;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
void set_XKeyReleasedEvent_keycode(void *_p, unsigned _v) {
  ((XKeyReleasedEvent *)_p)->keycode = (unsigned)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyReleasedEvent_keycode>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeyReleasedEvent_keycode(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void main() { unsigned char i = 0; }


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
store i8 0, i8* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
int *falloc_fails() {
  static int result = 0;
  return &result;
}


x86 assembly (clang, -O0):
<falloc_fails>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f19(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<falloc_fails>:
lea    0x2f1d(%rip),%rax
ret

LLVM IR (-O0):
@falloc_fails.result = internal global i32 0
define i32* @falloc_fails() {
ret i32* @falloc_fails.result
}

LLVM IR (-O2):
@falloc_fails.result = internal global i32 0
define i32* @falloc_fails() {
ret i32* @falloc_fails.result
}
void dd_pbl_ios_testflight_session_start(const char *key) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_testflight_session_start(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int main(int argc, const char *argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("The argument %i is %s.\n", i, argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"The argument %i is %s.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"The argument %i is %s.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  long int x = 0x7FFFFFFFL;
  assert(x > 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x7fffffff,-0x8(%rbp)
7f
cmpq   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i64
store i64 2147483647, i64* %1
%2 = load i64, i64* %1
%3 = icmp sgt i64 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
bool mpu6000SpiDetect(void) { return true; }


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

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

LLVM IR (-O0):
define i32 @mpu6000SpiDetect() {
ret i32 1
}

LLVM IR (-O2):
define i32 @mpu6000SpiDetect() {
ret i32 1
}
long long ssuz() { return 0xffffffff7fff0000LL; }


x86 assembly (clang, -O0):
<ssuz>:
push   %rbp
mov    %rsp,%rbp
movabs $0xffffffff7fff0000,%rax
ff ff ff
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssuz>:
movabs $0xffffffff7fff0000,%rax
ff ff ff
ret

LLVM IR (-O0):
define i64 @ssuz() {
ret i64 -2147549184
}

LLVM IR (-O2):
define i64 @ssuz() {
ret i64 -2147549184
}
void shutdown_gpio(void) {}


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

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

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

LLVM IR (-O2):
define void @shutdown_gpio() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *clean_free(char *ptr) {
  if (ptr) {
    free(ptr);
    ptr = NULL;
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<clean_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <clean_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_free>:
test   %rdi,%rdi
je     111f <clean_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @clean_free(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 %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
br label %8
8: ; preds = %5, %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @clean_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x;
  int y;
  if (!(y > 0 || x > 0))
    return 0;
  while (x + y <= -2) {
    if (x > 0)
      x++;
    else
      y++;
  }
  assert(x > 0 || y > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     113f <main+0x2f>
cmpl   $0x0,-0x8(%rbp)
jg     113f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    11a6 <main+0x96>
jmp    1144 <main+0x34>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0xfffffffe,%eax
jg     1179 <main+0x69>
cmpl   $0x0,-0x8(%rbp)
jle    116b <main+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <main+0x64>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <main+0x34>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     1192 <main+0x82>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6
store i32 0, i32* %1
br label %36
10: ; preds = %6, %0
br label %11
11: ; preds = %25, %10
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
%15 = icmp sle i32 %14, -2
br i1 %15, label %16, label %26
16: ; preds = %11
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %25
22: ; preds = %16
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %25
25: ; preds = %22, %19
br label %11
26: ; preds = %11
%27 = load i32, i32* %2
%28 = icmp sgt i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %3
%31 = icmp sgt i32 %30, 0
br label %32
32: ; preds = %29, %26
%33 = phi i1 [ true, %26 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
store i32 0, i32* %1
br label %36
36: ; preds = %32, %9
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clearScreen() {
  int i;
  for (i = 0; i < 99; i++) {
    printf("\n");
  }
  return;
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x63,-0x4(%rbp)
jge    1143 <clearScreen+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <clearScreen+0xf>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @clearScreen() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 10)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 99
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
int system(char *);
int mkdir_p(const char *path) {
  char cmd[PATH_MAX * 2];
  snprintf(cmd, PATH_MAX * 2, "mkdir -p %s", path);
  return system(cmd);
}


x86 assembly (clang, -O0):
<mkdir_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
shl    $0x1,%esi
mov    -0x8(%rbp),%rcx
lea    0xe8f(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <system@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_p>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rdi,%rcx
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
add    %esi,%esi
mov    %rsp,%rbx
lea    0xf(%rsi),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xeb4(%rip),%rdx
mov    %rbx,%rdi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@.str = [12 x i8] c"mkdir -p %s\00"
define i32 @mkdir_p(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i32, i32* @PATH_MAX
%6 = mul nsw i32 %5, 2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = load i32, i32* @PATH_MAX
%11 = mul nsw i32 %10, 2
%12 = load i8*, i8** %2
%13 = call i32 @snprintf(i8* %9, i32 %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @system(i8* %9)
%15 = load i8*, i8** %3
ret i32 %14
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@.str = [12 x i8] c"mkdir -p %s\00"
define i32 @mkdir_p(i8* %0) {
%2 = load i32, i32* @PATH_MAX
%3 = shl nsw i32 %2, 1
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @snprintf(i8* %5, i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = call i32 @system(i8* %5)
ret i32 %7
}
int queue_zone_wlock_show(void *data, struct seq_file *m) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.seq_file = type opaque
define i32 @queue_zone_wlock_show(i8* nocapture readnone %0, %struct.seq_file* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int func(int *);
int main() {
  int i;
  i = func(&i);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <func@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @func(i32* %1)
ret i32 0
}
indreg0regx1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*p0) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0regx1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1147 <indreg0regx1+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <indreg0regx1+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0regx1>:
movslq %esi,%rax
movsd  (%rcx,%rax,8),%xmm0
xor    %eax,%eax
ucomisd (%rdx),%xmm0
setae  %al
ret

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

LLVM IR (-O2):
define i32 @indreg0regx1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5) {
%7 = load double, double* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds double, double* %5, i64 %8
%10 = load double, double* %9
%11 = fcmp ole double %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int utos2(unsigned int value) {
  return (value & 0x8000) ? -(signed)(value ^ 0xffff) - 1 : value;
}


x86 assembly (clang, -O0):
<utos2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     1130 <utos2+0x30>
mov    -0x4(%rbp),%ecx
xor    $0xffff,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <utos2+0x36>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utos2>:
mov    %edi,%eax
xor    $0xffff0000,%eax
test   $0x8000,%edi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @utos2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 32768
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = xor i32 %7, 65535
%9 = sub nsw i32 0, %8
%10 = sub nsw i32 %9, 1
br label %13
11: ; preds = %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %6
%14 = phi i32 [ %10, %6 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @utos2(i32 %0) {
%2 = and i32 %0, 32768
%3 = icmp eq i32 %2, 0
%4 = xor i32 %0, -65536
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int rec_is_nul_term(int recsize) { return recsize == 255; }


x86 assembly (clang, -O0):
<rec_is_nul_term>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec_is_nul_term>:
xor    %eax,%eax
cmp    $0xff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @rec_is_nul_term(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 255
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @rec_is_nul_term(i32 %0) {
%2 = icmp eq i32 %0, 255
%3 = zext i1 %2 to i32
ret i32 %3
}
long long r8(void *x) { return *(long long *)(x + 32760); }


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

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

LLVM IR (-O0):
define i64 @r8(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32760
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @r8(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32760
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
unsigned long get__PIO_PCx(void *base, int pin) {
  unsigned long result = 0;
  int i;
  for (i = 0; i <= 2; i++)
    result |= ((readl(base + (0x20 + (i)*0x10)) >> pin) & 0x1) << i;
  return result;
}


x86 assembly (clang, -O0):
<get__PIO_PCx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jg     1176 <get__PIO_PCx+0x66>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%eax
shl    $0x4,%eax
add    $0x20,%eax
cltq
add    %rax,%rdi
mov    $0x0,%al
call   1030 <readl@plt>
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    -0x1c(%rbp),%ecx
shl    %cl,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <get__PIO_PCx+0x1e>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get__PIO_PCx>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
add    $0x20,%rdi
xor    %eax,%eax
call   1030 <readl@plt>
mov    %eax,%ebp
mov    %r14d,%ecx
shr    %cl,%ebp
and    $0x1,%ebp
lea    0x30(%rbx),%rdi
xor    %eax,%eax
call   1030 <readl@plt>
mov    %r14d,%ecx
shr    %cl,%eax
and    $0x1,%eax
lea    0x0(%rbp,%rax,2),%ebp
add    $0x40,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <readl@plt>
mov    %r14d,%ecx
shr    %cl,%eax
and    $0x1,%eax
lea    0x0(%rbp,%rax,4),%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @get__PIO_PCx(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 0, i64* %5
store i32 0, i32* %6
br label %7
7: ; preds = %26, %2
%8 = load i32, i32* %6
%9 = icmp sle i32 %8, 2
br i1 %9, label %10, label %29
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 16
%14 = add nsw i32 32, %13
%15 = sext i32 %14 to i64
%16 = getelementptr i8, i8* %11, i64 %15
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @readl to i32 (i8*, ...)*)(i8* %16)
%18 = load i32, i32* %4
%19 = ashr i32 %17, %18
%20 = and i32 %19, 1
%21 = load i32, i32* %6
%22 = shl i32 %20, %21
%23 = sext i32 %22 to i64
%24 = load i64, i64* %5
%25 = or i64 %24, %23
store i64 %25, i64* %5
br label %26
26: ; preds = %10
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %7
29: ; preds = %7
%30 = load i64, i64* %5
ret i64 %30
}

LLVM IR (-O2):
define i64 @get__PIO_PCx(i8* %0, i32 %1) {
%3 = getelementptr i8, i8* %0, i64 32
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @readl to i32 (i8*, ...)*)(i8* %3)
%5 = lshr i32 %4, %1
%6 = and i32 %5, 1
%7 = getelementptr i8, i8* %0, i64 48
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @readl to i32 (i8*, ...)*)(i8* %7)
%9 = lshr i32 %8, %1
%10 = shl i32 %9, 1
%11 = and i32 %10, 2
%12 = or i32 %6, %11
%13 = getelementptr i8, i8* %0, i64 64
%14 = tail call i32 (i8*, ...) bitcast (i32 (...)* @readl to i32 (i8*, ...)*)(i8* %13)
%15 = lshr i32 %14, %1
%16 = shl i32 %15, 2
%17 = and i32 %16, 4
%18 = or i32 %12, %17
%19 = zext i32 %18 to i64
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ RB_POWER_OFF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
int /*<<< orphan*/ shutdown();
void inthandler(int sig) {
  shutdown();
  reboot(RB_POWER_OFF);
  exit(0);
}


x86 assembly (clang, -O0):
<inthandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <shutdown@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1050 <reboot@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<inthandler>:
push   %rax
xor    %eax,%eax
call   1030 <shutdown@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1050 <reboot@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@RB_POWER_OFF = global i32 0
define void @inthandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @shutdown()
%4 = load i32, i32* @RB_POWER_OFF
%5 = call i32 @reboot(i32 %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@RB_POWER_OFF = global i32 0
define void @inthandler(i32 %0) {
%2 = tail call i32 (...) @shutdown()
%3 = load i32, i32* @RB_POWER_OFF
%4 = tail call i32 @reboot(i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
int align(int x) { return (x % 2) == 0 ? x : x + 1; }


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1126 <align+0x26>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    112f <align+0x2f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
mov    %edi,%eax
and    $0x1,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @align(i32 %0) {
%2 = and i32 %0, 1
%3 = add nsw i32 %2, %0
ret i32 %3
}
psoct(an) {
  register int n, sign;
  sign = 0;
  if ((n = an) < 0) {
    n = -n;
    sign = '-';
  }
  printf("%c%o", sign, n);
}


x86 assembly (clang, -O0):
<psoct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1140 <psoct+0x30>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x2d,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psoct>:
mov    %edi,%esi
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
sar    $0x1f,%esi
and    $0x2d,%esi
lea    0xeda(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%c%o\00"
define i32 @psoct(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %3, i32 %0
%5 = select i1 %2, i32 45, i32 0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %4)
ret i32 undef
}
/* Variables and functions */
int argTwoNotNull(int *, int *);
int f(int *arr, int *arr2) { return argTwoNotNull(arr, arr2); }


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <argTwoNotNull@plt>

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

LLVM IR (-O2):
define i32 @f(i32* %0, i32* %1) {
%3 = tail call i32 @argTwoNotNull(i32* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ DH;
typedef int /*<<< orphan*/ BN_MONT_CTX;
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int deadcafe_bn_mod_exp(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                        int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int deadcafe_dh_bn_mod_exp(const DH *dh __attribute__((unused)), BIGNUM *r,
                           const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
                           BN_CTX *ctx __attribute__((unused)),
                           BN_MONT_CTX *m_ctx __attribute__((unused))) {
  return deadcafe_bn_mod_exp(r, a, p, m);
}


x86 assembly (clang, -O0):
<deadcafe_dh_bn_mod_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <deadcafe_bn_mod_exp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deadcafe_dh_bn_mod_exp>:
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1030 <deadcafe_bn_mod_exp@plt>

LLVM IR (-O0):
define i32 @deadcafe_dh_bn_mod_exp(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store i32* %0, i32** %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @deadcafe_bn_mod_exp(i32* %15, i32* %16, i32* %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @deadcafe_dh_bn_mod_exp(i32* nocapture readnone %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* nocapture readnone %5, i32* nocapture readnone %6) {
%8 = tail call i32 @deadcafe_bn_mod_exp(i32* %1, i32* %2, i32* %3, i32* %4)
ret i32 %8
}
/* Type definitions */
struct kernel_sigset_t {
  int dummy;
};

/* Variables and functions */
int sys_rt_sigsuspend(struct kernel_sigset_t const *, int);
int sys_sigsuspend(const struct kernel_sigset_t *set) {
  return sys_rt_sigsuspend(set, (64 + 7) / 8);
}


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

x86 assembly (clang, -O2):
<sys_sigsuspend>:
mov    $0x8,%esi
jmp    1030 <sys_rt_sigsuspend@plt>

LLVM IR (-O0):
%struct.kernel_sigset_t = type { i32 }
define i32 @sys_sigsuspend(%struct.kernel_sigset_t* %0) {
%2 = alloca %struct.kernel_sigset_t*
store %struct.kernel_sigset_t* %0, %struct.kernel_sigset_t** %2
%3 = load %struct.kernel_sigset_t*, %struct.kernel_sigset_t** %2
%4 = call i32 @sys_rt_sigsuspend(%struct.kernel_sigset_t* %3, i32 8)
ret i32 %4
}

LLVM IR (-O2):
%struct.kernel_sigset_t = type { i32 }
define i32 @sys_sigsuspend(%struct.kernel_sigset_t* %0) {
%2 = tail call i32 @sys_rt_sigsuspend(%struct.kernel_sigset_t* %0, i32 8)
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
char *kmp(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *string = "tale a walk on the wild side";
  char *pattern = "alk";
  printf("%s\n", kmp(pattern, string));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xedc(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <kmp@plt>
mov    %rax,%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef5(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1040 <kmp@plt>
lea    0xee6(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"tale a walk on the wild side\00"
@.str.1 = [4 x i8] c"alk\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i8* @kmp(i8* %4, i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@.str = [29 x i8] c"tale a walk on the wild side\00"
@.str.1 = [4 x i8] c"alk\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i8* @kmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
double f_sqr(double x) { return (x * x); }


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

x86 assembly (clang, -O2):
<f_sqr>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @f_sqr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @f_sqr(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
struct rw_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __up_read(struct rw_semaphore *);
__attribute__((always_)) void up_read(struct rw_semaphore *sem) {
  ;
  __up_read(sem);
  ;
}


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

x86 assembly (clang, -O2):
<up_read>:
jmp    1030 <__up_read@plt>

LLVM IR (-O0):
%struct.rw_semaphore = type { i32 }
define void @up_read(%struct.rw_semaphore* %0) {
%2 = alloca %struct.rw_semaphore*
store %struct.rw_semaphore* %0, %struct.rw_semaphore** %2
%3 = load %struct.rw_semaphore*, %struct.rw_semaphore** %2
%4 = call i32 @__up_read(%struct.rw_semaphore* %3)
ret void
}

LLVM IR (-O2):
%struct.rw_semaphore = type { i32 }
define void @up_read(%struct.rw_semaphore* %0) {
%2 = tail call i32 @__up_read(%struct.rw_semaphore* %0)
ret void
}
int add_three(int x, int y) { return x + 3; }


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

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

LLVM IR (-O0):
define i32 @add_three(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 = add nsw i32 %5, 3
ret i32 %6
}

LLVM IR (-O2):
define i32 @add_three(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 3
ret i32 %3
}
OP(dd, e8) { op_e8(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_e8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_e8()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ pthread_exit(void *);
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ removeentry(int /*<<< orphan*/);
void __attribute__((noreturn)) sim_pthread_exit(void *value_ptr) {
  removeentry(pthread_self());
  pthread_exit(value_ptr);
  exit(1);
}


x86 assembly (clang, -O0):
<sim_pthread_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edi
call   1050 <removeentry@plt>
mov    -0x8(%rbp),%rdi
call   1030 <pthread_exit@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<sim_pthread_exit>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %eax,%edi
call   1050 <removeentry@plt>
mov    %rbx,%rdi
call   1030 <pthread_exit@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @sim_pthread_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = call i32 @removeentry(i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @pthread_exit(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @sim_pthread_exit(i8* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @removeentry(i32 %2)
%4 = tail call i32 @pthread_exit(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_make_socket_low_delay() {
  printf("NOT IMPLEMENTED:"
         "pa_make_socket_low_delay"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_make_socket_low_delay\0A\00"
define i32 @pa_make_socket_low_delay() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_make_socket_low_delay\00"
define i32 @pa_make_socket_low_delay() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ console_getpos(int *, int *);
int /*<<< orphan*/ console_setpos(int, int);
int /*<<< orphan*/ printf(char *, int, char const *);
void console_erase(char const *mode) {
  int col, row;
  console_getpos(&col, &row);
  printf("%c[%s", 0x1B, mode);
  console_setpos(col, row);
}


x86 assembly (clang, -O0):
<console_erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <console_getpos@plt>
mov    -0x8(%rbp),%rdx
lea    0xeac(%rip),%rdi
mov    $0x1b,%esi
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1050 <console_setpos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_erase>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <console_getpos@plt>
lea    0xeb2(%rip),%rdi
mov    $0x1b,%esi
mov    %rbx,%rdx
call   1040 <printf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <console_setpos@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%c[%s\00"
define void @console_erase(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @console_getpos(i32* %3, i32* %4)
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27, i8* %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @console_setpos(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c[%s\00"
define void @console_erase(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @console_getpos(i32* %2, i32* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27, i8* %0)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @console_setpos(i32 %8, i32 %9)
ret void
}
double getDI() { return (double)((1LL << 32) - 16LL); }


x86 assembly (clang, -O0):
<getDI>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDI>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @getDI() {
ret double 0x41EFFFFFFE000000
}

LLVM IR (-O2):
define double @getDI() {
ret double 0x41EFFFFFFE000000
}
void SysTick_Wait(unsigned long delay) {
  volatile unsigned long elapsedTime;
  unsigned long startTime = (*((volatile unsigned long *)0xE000E018));
  do {
    elapsedTime =
        (startTime - (*((volatile unsigned long *)0xE000E018))) & 0x00FFFFFF;
  } while (elapsedTime <= delay);
}


x86 assembly (clang, -O0):
<SysTick_Wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xe000e018,%eax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0xe000e018,%ecx
mov    (%rcx),%rcx
sub    %rcx,%rax
and    $0xffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1114 <SysTick_Wait+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTick_Wait>:
mov    $0xe000e018,%eax
mov    (%rax),%rcx
nopl   0x0(%rax,%rax,1)
mov    (%rax),%rdx
mov    %ecx,%esi
sub    %edx,%esi
and    $0xffffff,%esi
mov    %rsi,-0x8(%rsp)
mov    -0x8(%rsp),%rdx
cmp    %rdi,%rdx
jbe    1110 <SysTick_Wait+0x10>
ret

LLVM IR (-O0):
define void @SysTick_Wait(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
store i64 %5, i64* %4
br label %6
6: ; preds = %11, %1
%7 = load i64, i64* %4
%8 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
%9 = sub i64 %7, %8
%10 = and i64 %9, 16777215
store volatile i64 %10, i64* %3
br label %11
11: ; preds = %6
%12 = load volatile i64, i64* %3
%13 = load i64, i64* %2
%14 = icmp ule i64 %12, %13
br i1 %14, label %6, label %15
15: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @SysTick_Wait(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
br label %5
5: ; preds = %5, %1
%6 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
%7 = sub i64 %4, %6
%8 = and i64 %7, 16777215
store volatile i64 %8, i64* %2
%9 = load volatile i64, i64* %2
%10 = icmp ugt i64 %9, %0
br i1 %10, label %11, label %5
11: ; preds = %5
ret void
}