xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ say_stop(char *, int);
void die(void) { say_stop("He won't bother anyone anymore...", 1); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say_stop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say_stop@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"He won't bother anyone anymore...\00"
define void @die() {
%1 = call i32 @say_stop(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"He won't bother anyone anymore...\00"
define void @die() {
%1 = tail call i32 @say_stop(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int average(int x, int y) {
  if (x > 0) {
    return average(x - 1, y + 1);
  } else if (y > 2) {
    return 1 + average(x + 1, y - 2);
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<average>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1141 <average+0x31>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <average@plt>
mov    %eax,-0x4(%rbp)
jmp    116e <average+0x5e>
cmpl   $0x2,-0xc(%rbp)
jle    1167 <average+0x57>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x2,%esi
call   1030 <average@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <average+0x5e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<average>:
xor    %ecx,%ecx
test   %edi,%edi
cmovg  %edi,%ecx
setg   %dl
add    %esi,%ecx
mov    $0x1,%eax
cmp    $0x3,%ecx
jl     1154 <average+0x54>
mov    $0x1,%r8d
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%edi
test   $0x1,%dl
cmovne %r8d,%edi
add    $0x1,%eax
test   %edi,%edi
setg   %dl
mov    $0x0,%esi
cmovg  %edi,%esi
add    %esi,%ecx
add    $0xfffffffe,%ecx
cmp    $0x2,%ecx
jg     1130 <average+0x30>
ret

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

LLVM IR (-O2):
define i32 @average(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
%4 = select i1 %3, i32 %0, i32 0
%5 = add i32 %4, %1
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %20
7: ; preds = %2, %7
%8 = phi i32 [ %18, %7 ], [ %5, %2 ]
%9 = phi i1 [ %16, %7 ], [ %3, %2 ]
%10 = phi i32 [ %13, %7 ], [ %0, %2 ]
%11 = phi i32 [ %15, %7 ], [ 1, %2 ]
%12 = add nsw i32 %10, 1
%13 = select i1 %9, i32 1, i32 %12
%14 = add nsw i32 %8, -2
%15 = add i32 %11, 1
%16 = icmp sgt i32 %13, 0
%17 = select i1 %16, i32 %13, i32 0
%18 = add i32 %14, %17
%19 = icmp sgt i32 %18, 2
br i1 %19, label %7, label %20
20: ; preds = %7, %2
%21 = phi i32 [ 1, %2 ], [ %15, %7 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
void main() {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 10) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    115e <main+0x2e>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0xa,%eax
jne    114c <main+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 10
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Problem with input arguments. Use like this:\n");
  printf("$ ./a.out in.raw out.raw 44100 1250 101");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Problem with input arguments. Use like this:\0A\00"
@.str.1 = [40 x i8] c"$ ./a.out in.raw out.raw 44100 1250 101\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"$ ./a.out in.raw out.raw 44100 1250 101\00"
@str = [45 x i8] c"Problem with input arguments. Use like this:\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Channel5_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DMA2_Channel5_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DMA2_Channel5_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stuffend();
void end_relocations(void) { stuffend(); }


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

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

LLVM IR (-O0):
define void @end_relocations() {
%1 = call i32 (...) @stuffend()
ret void
}

LLVM IR (-O2):
define void @end_relocations() {
%1 = tail call i32 (...) @stuffend()
ret void
}
/* Type definitions */
struct qspinlock {
  int dummy;
};
struct mcs_spinlock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ native_spin_unlock(struct qspinlock *);
struct mcs_spinlock *pv_get_qhead(struct qspinlock *);
int /*<<< orphan*/ pv_kick_node(struct mcs_spinlock *);
void queue_spin_unlock_slowpath(struct qspinlock *lock) {
  struct mcs_spinlock *node = pv_get_qhead(lock);
  native_spin_unlock(lock);
  pv_kick_node(node);
}


x86 assembly (clang, -O0):
<queue_spin_unlock_slowpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pv_get_qhead@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <native_spin_unlock@plt>
mov    -0x10(%rbp),%rdi
call   1030 <pv_kick_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<queue_spin_unlock_slowpath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <pv_get_qhead@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <native_spin_unlock@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <pv_kick_node@plt>

LLVM IR (-O0):
%struct.qspinlock = type { i32 }
%struct.mcs_spinlock = type { i32 }
define void @queue_spin_unlock_slowpath(%struct.qspinlock* %0) {
%2 = alloca %struct.qspinlock*
%3 = alloca %struct.mcs_spinlock*
store %struct.qspinlock* %0, %struct.qspinlock** %2
%4 = load %struct.qspinlock*, %struct.qspinlock** %2
%5 = call %struct.mcs_spinlock* @pv_get_qhead(%struct.qspinlock* %4)
store %struct.mcs_spinlock* %5, %struct.mcs_spinlock** %3
%6 = load %struct.qspinlock*, %struct.qspinlock** %2
%7 = call i32 @native_spin_unlock(%struct.qspinlock* %6)
%8 = load %struct.mcs_spinlock*, %struct.mcs_spinlock** %3
%9 = call i32 @pv_kick_node(%struct.mcs_spinlock* %8)
ret void
}

LLVM IR (-O2):
%struct.qspinlock = type { i32 }
%struct.mcs_spinlock = type { i32 }
define void @queue_spin_unlock_slowpath(%struct.qspinlock* %0) {
%2 = tail call %struct.mcs_spinlock* @pv_get_qhead(%struct.qspinlock* %0)
%3 = tail call i32 @native_spin_unlock(%struct.qspinlock* %0)
%4 = tail call i32 @pv_kick_node(%struct.mcs_spinlock* %2)
ret void
}
void MCI_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @MCI_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int foo(int n) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doStuff_pointerToConstInt(int *);
void f_5_1(void) {
  int ta[5];
  doStuff_pointerToConstInt(ta);
}


x86 assembly (clang, -O0):
<f_5_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_5_1>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @f_5_1() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%3 = call i32 @doStuff_pointerToConstInt(i32* %2)
ret void
}

LLVM IR (-O2):
define void @f_5_1() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @doStuff_pointerToConstInt(i32* %3)
ret void
}
int execute_add_key() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_add_key() {
ret i32 0
}
unsigned int unsignedint_ignoring_longlong(unsigned int x, long long y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @unsignedint_ignoring_longlong(i32 returned %0, i64 %1) {
ret i32 %0
}
/* Variables and functions */
double ceil(double);
double floor(double);
double igraph_i_round(double X) {
  if (X != X) {
    return X;
  }
  if (X < 0.0) {
    return floor(X);
  }
  return ceil(X);
}


x86 assembly (clang, -O0):
<igraph_i_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1148 <igraph_i_round+0x28>
jp     1148 <igraph_i_round+0x28>
jmp    1157 <igraph_i_round+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1188 <igraph_i_round+0x68>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1179 <igraph_i_round+0x59>
movsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1188 <igraph_i_round+0x68>
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igraph_i_round>:
ucomisd %xmm0,%xmm0
jp     113a <igraph_i_round+0x1a>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1135 <igraph_i_round+0x15>
jmp    1040 <floor@plt>
jmp    1030 <ceil@plt>
ret

LLVM IR (-O0):
define double @igraph_i_round(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = load double, double* %3
%6 = fcmp une double %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load double, double* %3
store double %8, double* %2
br label %18
9: ; preds = %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load double, double* %3
%14 = call double @llvm.floor.f64(double %13)
store double %14, double* %2
br label %18
15: ; preds = %9
%16 = load double, double* %3
%17 = call double @llvm.ceil.f64(double %16)
store double %17, double* %2
br label %18
18: ; preds = %15, %12, %7
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
define double @igraph_i_round(double %0) {
%2 = fcmp uno double %0, 0.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fcmp olt double %0, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call double @llvm.floor.f64(double %0)
br label %9
7: ; preds = %3
%8 = tail call double @llvm.ceil.f64(double %0)
br label %9
9: ; preds = %1, %7, %5
%10 = phi double [ %6, %5 ], [ %8, %7 ], [ %0, %1 ]
ret double %10
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ printf(char *);
void *initArray(int length, int size) {
  printf("alloc\n");
  void *a = calloc(length, size);
  return a;
}


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

x86 assembly (clang, -O2):
<initArray>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <calloc@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"alloc\00"
define noalias i8* @initArray(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = tail call i8* @calloc(i32 %0, i32 %1)
ret i8* %4
}
void __attribute__((__destructor__)) destr(void) {
  extern int fini_ran;
  fini_ran = 1;
}


x86 assembly (clang, -O0):
<destr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<destr>:
mov    0x2ee1(%rip),%rax
movl   $0x1,(%rax)
ret

LLVM IR (-O0):
@fini_ran = external global i32
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @destr, i8* null }]
define void @destr() {
store i32 1, i32* @fini_ran
ret void
}

LLVM IR (-O2):
@fini_ran = external global i32
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @destr, i8* null }]
define void @destr() {
store i32 1, i32* @fini_ran
ret void
}
char *stpcpy(char *dst, const char *src) {
  while ((*dst = *src))
    ++dst, ++src;
  return dst;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     113d <stpcpy+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     1122 <stpcpy+0x22>
add    $0x1,%rsi
nop
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %1, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i8* [ %0, %2 ], [ %8, %5 ]
ret i8* %13
}
void(mr1gm_finalize__)(void) {}


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

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

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

LLVM IR (-O2):
define void @mr1gm_finalize__() {
ret void
}
unsigned short int unsignedshortint_ignoring_signedshort(unsigned short int x,
                                                         signed short y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshortint_ignoring_signedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @unsignedshortint_ignoring_signedshort(i16 zeroext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshortint_ignoring_signedshort(i16 returned zeroext %0, i16 signext %1) {
ret i16 %0
}
int test_imm_5Dint32_mem(int *val) {
  return ((*val) & (0x5D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Dint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 93
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_SMOOTH = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = call i32 @glShadeModel(i32 %2)
ret void
}

LLVM IR (-O2):
@GL_SMOOTH = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = tail call i32 @glShadeModel(i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  void *default_gc;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_default_gc(void *_p, void *_v) {
  ((Screen *)_p)->default_gc = (void *)_v;
}


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

x86 assembly (clang, -O2):
<set_Screen_default_gc>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define void @set_Screen_default_gc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %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 i8* %5, i8** %8
ret void
}

LLVM IR (-O2):
define void @set_Screen_default_gc(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
int linearSearch(int *array, int len, int key) {
  for (int i = 0; i < len; i++) {
    if (array[i] == key)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <linearSearch+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1140 <linearSearch+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <linearSearch+0x5a>
jmp    1145 <linearSearch+0x45>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <linearSearch+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <linearSearch+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edx,(%rdi,%rcx,4)
je     111f <linearSearch+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <linearSearch+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @linearSearch(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
void store_ccic_version(unsigned char *hw, unsigned char *sw) {}


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

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

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

LLVM IR (-O2):
define void @store_ccic_version(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void catcher(int signum) { exit(0); }


x86 assembly (clang, -O0):
<catcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @catcher(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @catcher(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("\n\t\tUsage: affyAddGene\n"
         "\t\t         -h [display this help message]\n"
         "\t\t         -t threshold theta in a range 0.0 - 1.0\n"
         "\t\t         -m maximum expected biclusters in a range 1 - "
         "number_of_rows_in_input_data_matrix\n"
         "\t\t         -i <input microarray expression file (processed data)>\n"
         "\t\t         -p Output file format : 0 for standard format and 1 for "
         "BiBench bicluster format\n"
         "\t\t         -o <Output file>\n");
}


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

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

LLVM IR (-O0):
@.str = [395 x i8] c"\0A\09\09Usage: affyAddGene\0A\09\09 -h [display this help message]\0A\09\09 -t threshold theta in a range 0.0 - 1.0\0A\09\09 -m maximum expected biclusters in a range 1 - number_of_rows_in_input_data_matrix\0A\09\09 -i <input microarray expression file (processed data)>\0A\09\09 -p Output file format : 0 for standard format and 1 for BiBench bicluster format\0A\09\09 -o <Output file>\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([395 x i8], [395 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [394 x i8] c"\0A\09\09Usage: affyAddGene\0A\09\09 -h [display this help message]\0A\09\09 -t threshold theta in a range 0.0 - 1.0\0A\09\09 -m maximum expected biclusters in a range 1 - number_of_rows_in_input_data_matrix\0A\09\09 -i <input microarray expression file (processed data)>\0A\09\09 -p Output file format : 0 for standard format and 1 for BiBench bicluster format\0A\09\09 -o <Output file>\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([394 x i8], [394 x i8]* @str, i64 0, i64 0))
ret void
}
void debug_msg(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug_msg(i8* nocapture %0, ...) {
ret void
}
int balance_runtime(struct rt_rq *rt_rq) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.rt_rq = type opaque
define i32 @balance_runtime(%struct.rt_rq* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SetColorTemperature(void *);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned short);
void UPnPRenderingControl_SetColorTemperature(
    void *upnptoken, unsigned int InstanceID,
    unsigned short DesiredColorTemperature) {
  printf("Invoke: UPnPRenderingControl_SetColorTemperature(%u,%u);\r\n",
         InstanceID, DesiredColorTemperature);
  UPnPResponse_RenderingControl_SetColorTemperature(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SetColorTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
movzwl -0xe(%rbp),%edx
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <UPnPResponse_RenderingControl_SetColorTemperature@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SetColorTemperature>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UPnPResponse_RenderingControl_SetColorTemperature@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Invoke: UPnPRenderingControl_SetColorTemperature(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetColorTemperature(i8* %0, i32 %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i16
store i8* %0, i8** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i32, i32* %5
%8 = load i16, i16* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %7, i16 zeroext %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_SetColorTemperature(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Invoke: UPnPRenderingControl_SetColorTemperature(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetColorTemperature(i8* %0, i32 %1, i16 zeroext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_SetColorTemperature(i8* %0)
ret void
}
/* Variables and functions */
int check(char const *);
int main(int ac, const char **av) { return check(av[1]); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <check@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
jmp    1030 <check@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @check(i8* %4)
ret i32 %5
}
int ld_eq_mm2(long double *a1, long double *a2) { return !(((*a1) == (*a2))); }


x86 assembly (clang, -O0):
<ld_eq_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_eq_mm2>:
fldt   (%rdi)
fldt   (%rsi)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_eq_mm2(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp oeq x86_fp80 %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @ld_eq_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp une x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
const char *zlibVersion() { return "1.2.11"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"1.2.11\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"1.2.11\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
float ptr__fx(void const *const ptr) {
  return (
      ((((uintptr_t)ptr) >> ((sizeof(uintptr_t) * 8ULL) / 2)) &
       ((uintptr_t)(~((uintptr_t)((
           uintptr_t)(((uintptr_t)((0xFULL
                                    << ((sizeof(uintptr_t) * 8ULL) - 4ULL)) |
                                   ((0x1ULL
                                     << ((sizeof(uintptr_t) * 8ULL) - 1ULL)) -
                                    1ULL)))
                      << ((sizeof(uintptr_t) * 8ULL) / 2))))))) /
      ((float)((uintptr_t)(~((uintptr_t)((
          uintptr_t)(((uintptr_t)((0xFULL
                                   << ((sizeof(uintptr_t) * 8ULL) - 4ULL)) |
                                  ((0x1ULL
                                    << ((sizeof(uintptr_t) * 8ULL) - 1ULL)) -
                                   1ULL)))
                     << ((sizeof(uintptr_t) * 8ULL) / 2))))))));
}


x86 assembly (clang, -O0):
<ptr__fx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr__fx>:
shr    $0x20,%rdi
cvtsi2ss %rdi,%xmm0
mulss  0xeef(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ptr__fx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 32
%6 = and i64 %5, 4294967295
%7 = uitofp i64 %6 to float
%8 = fdiv float %7, 0x41F0000000000000
ret float %8
}

LLVM IR (-O2):
define float @ptr__fx(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 32
%4 = uitofp i64 %3 to float
%5 = fmul float %4, 0x3DF0000000000000
ret float %5
}
int fun1(int a, int b, int c, int d, int e, int f, int g) {
  int j = 0;
  while (j < 2) {
    a++;
    j++;
  }
  return a;
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1143 <fun1+0x43>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1122 <fun1+0x22>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun1(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
%15 = 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
store i32 0, i32* %15
br label %16
16: ; preds = %19, %7
%17 = load i32, i32* %15
%18 = icmp slt i32 %17, 2
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %8
%21 = add nsw i32 %20, 1
store i32 %21, i32* %8
%22 = load i32, i32* %15
%23 = add nsw i32 %22, 1
store i32 %23, i32* %15
br label %16
24: ; preds = %16
%25 = load i32, i32* %8
ret i32 %25
}

LLVM IR (-O2):
define i32 @fun1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = add i32 %0, 2
ret i32 %8
}
/* Variables and functions */
scalar_t__ csc_isdelim(char *, char);
char *find_sep(char *path) {
  while (*path) {
    if (csc_isdelim("/", *path)) {
      return path;
    }
    path++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<find_sep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1164 <find_sep+0x54>
mov    -0x10(%rbp),%rax
lea    0xecc(%rip),%rdi
movsbl (%rax),%esi
call   1030 <csc_isdelim@plt>
cmp    $0x0,%rax
je     1153 <find_sep+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <find_sep+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <find_sep+0xc>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_sep>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114c <find_sep+0x3c>
mov    %rdi,%rbx
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <csc_isdelim@plt>
test   %rax,%rax
jne    114e <find_sep+0x3e>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <find_sep+0x20>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @find_sep(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @csc_isdelim(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ null, %1 ], [ null, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void OutputDebugStringA(char buffer[2048]) { printf("%s", buffer); }


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

x86 assembly (clang, -O2):
<OutputDebugStringA>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @OutputDebugStringA(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *inttostr(int, char *);
int main() {
  char buf[128], *p;
  p = inttostr(-1, buf);
  if (*p != '-')
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
mov    $0xffffffff,%edi
call   1040 <inttostr@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1164 <main+0x44>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
mov    %rsp,%rsi
mov    $0xffffffff,%edi
call   1040 <inttostr@plt>
cmpb   $0x2d,(%rax)
jne    1143 <main+0x23>
xor    %eax,%eax
add    $0x88,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = call i8* @inttostr(i32 -1, i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 45
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i8* @inttostr(i32 -1, i8* %2)
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 45
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
unsigned dmin(unsigned a, unsigned b) { return a > b ? b : a; }


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

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

LLVM IR (-O0):
define i32 @dmin(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 ugt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @dmin(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void tegra114_init_speedo_data(struct tegra_sku_info *sku_info) {}


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

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

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

LLVM IR (-O2):
%struct.tegra_sku_info = type opaque
define void @tegra114_init_speedo_data(%struct.tegra_sku_info* nocapture %0) {
ret void
}
void mt_trace_ISR_start(int id) {}


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

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

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

LLVM IR (-O2):
define void @mt_trace_ISR_start(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void arg_check(int argc, int n) {
  if (argc - 1 < n) {
    printf("need %d argument(s)\n", n);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<arg_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    1156 <arg_check+0x36>
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_check>:
cmp    %esi,%edi
jle    1125 <arg_check+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"need %d argument(s)\0A\00"
define void @arg_check(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 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"need %d argument(s)\0A\00"
define void @arg_check(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %2
ret void
}
int clip(int x, int min, int max) {
  if (x > max)
    x = max;
  if (x < min)
    x = min;
  return x;
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    111f <clip+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1131 <clip+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @clip(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %2
%5 = select i1 %4, i32 %2, i32 %0
%6 = icmp slt i32 %5, %1
%7 = select i1 %6, i32 %1, i32 %5
ret i32 %7
}