xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ expint(int, int);
int main(void) {
  expint(50, 1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @expint(i32 50, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hanoi(int, char, char, char);
int main(int argc, const char *argv[]) {
  char a = 'a', b = 'b', c = 'c';
  hanoi(3, a, b, c);
  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)
movb   $0x61,-0x11(%rbp)
movb   $0x62,-0x12(%rbp)
movb   $0x63,-0x13(%rbp)
mov    -0x11(%rbp),%cl
mov    -0x12(%rbp),%al
mov    $0x3,%edi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x13(%rbp),%ecx
call   1030 <hanoi@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
call   1030 <hanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 97, i8* %6
store i8 98, i8* %7
store i8 99, i8* %8
%9 = load i8, i8* %6
%10 = load i8, i8* %7
%11 = load i8, i8* %8
%12 = call i32 @hanoi(i32 3, i8 signext %9, i8 signext %10, i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @hanoi(i32 3, i8 signext 97, i8 signext 98, i8 signext 99)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pic24_nvmcon_write_completion(int, int);
int /*<<< orphan*/ pic24_six(int, int);
void pic24_nvmcon_write_internal(void) {
  pic24_six(0xA8E761, 2);
  pic24_nvmcon_write_completion(0x8000, 0x0000);
}


x86 assembly (clang, -O0):
<pic24_nvmcon_write_internal>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa8e761,%edi
mov    $0x2,%esi
call   1040 <pic24_six@plt>
mov    $0x8000,%edi
xor    %esi,%esi
call   1030 <pic24_nvmcon_write_completion@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic24_nvmcon_write_internal>:
push   %rax
mov    $0xa8e761,%edi
mov    $0x2,%esi
call   1040 <pic24_six@plt>
mov    $0x8000,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <pic24_nvmcon_write_completion@plt>

LLVM IR (-O0):
define void @pic24_nvmcon_write_internal() {
%1 = call i32 @pic24_six(i32 11069281, i32 2)
%2 = call i32 @pic24_nvmcon_write_completion(i32 32768, i32 0)
ret void
}

LLVM IR (-O2):
define void @pic24_nvmcon_write_internal() {
%1 = tail call i32 @pic24_six(i32 11069281, i32 2)
%2 = tail call i32 @pic24_nvmcon_write_completion(i32 32768, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ unlink(char *);
void ltr_int_close_tmp_file(char *fname, int fd) {
  close(fd);
  unlink(fname);
}


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

x86 assembly (clang, -O2):
<ltr_int_close_tmp_file>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @ltr_int_close_tmp_file(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 = call i32 @close(i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @unlink(i8* %7)
ret void
}

LLVM IR (-O2):
define void @ltr_int_close_tmp_file(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @close(i32 %1)
%4 = tail call i32 @unlink(i8* %0)
ret void
}
int spi_byte(int txbyte) {}


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

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

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

LLVM IR (-O2):
define i32 @spi_byte(i32 %0) {
ret i32 undef
}
int main() {
  int a, b;
  a = b + b + b + b + b + b + b + b + b + b + b + b + b + b + b;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
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 = load i32, i32* %3
%6 = add nsw i32 %4, %5
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %3
%24 = add nsw i32 %22, %23
%25 = load i32, i32* %3
%26 = add nsw i32 %24, %25
%27 = load i32, i32* %3
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %3
%30 = add nsw i32 %28, %29
%31 = load i32, i32* %3
%32 = add nsw i32 %30, %31
store i32 %32, i32* %2
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ifct_noscale(float *, int);
void ifct_defn_scaling(float *f, int length) { ifct_noscale(f, length); }


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

x86 assembly (clang, -O2):
<ifct_defn_scaling>:
jmp    1030 <ifct_noscale@plt>

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

LLVM IR (-O2):
define void @ifct_defn_scaling(float* %0, i32 %1) {
%3 = tail call i32 @ifct_noscale(float* %0, i32 %1)
ret void
}
int isBeforeSignedInt(int numA, int numB, int ambiguousCase) {
  if (numA == numB) {
    return 0;
  }
  if ((numA < 0 && numB < 0) || (numA >= 0 && numB >= 0)) {
    return numA < numB;
  } else {
    return ambiguousCase;
  }
}


x86 assembly (clang, -O0):
<isBeforeSignedInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1125 <isBeforeSignedInt+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1169 <isBeforeSignedInt+0x69>
cmpl   $0x0,-0x8(%rbp)
jge    1139 <isBeforeSignedInt+0x39>
cmpl   $0x0,-0xc(%rbp)
jl     114d <isBeforeSignedInt+0x4d>
cmpl   $0x0,-0x8(%rbp)
jl     1163 <isBeforeSignedInt+0x63>
cmpl   $0x0,-0xc(%rbp)
jl     1163 <isBeforeSignedInt+0x63>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <isBeforeSignedInt+0x69>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBeforeSignedInt>:
xor    %eax,%eax
cmp    %esi,%edi
je     1112 <isBeforeSignedInt+0x12>
test   %edi,%esi
js     1113 <isBeforeSignedInt+0x13>
mov    %esi,%eax
or     %edi,%eax
mov    %edx,%eax
jns    1113 <isBeforeSignedInt+0x13>
ret
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @isBeforeSignedInt(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = and i32 %1, %0
%7 = icmp slt i32 %6, 0
%8 = or i32 %1, %0
%9 = icmp sgt i32 %8, -1
%10 = or i1 %7, %9
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = icmp slt i32 %0, %1
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %5, %3, %11
%15 = phi i32 [ %13, %11 ], [ 0, %3 ], [ %2, %5 ]
ret i32 %15
}
/* Type definitions */
struct mm_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ flush_tlb_mm(struct mm_struct *);
void local_flush_tlb_mm(struct mm_struct *mm) { flush_tlb_mm(mm); }


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

x86 assembly (clang, -O2):
<local_flush_tlb_mm>:
jmp    1030 <flush_tlb_mm@plt>

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

LLVM IR (-O2):
%struct.mm_struct = type { i32 }
define void @local_flush_tlb_mm(%struct.mm_struct* %0) {
%2 = tail call i32 @flush_tlb_mm(%struct.mm_struct* %0)
ret void
}
unsigned long long exponent(double d) {
  return *(unsigned long long *)(&d) & (0x7ffull << 52);
}


x86 assembly (clang, -O0):
<exponent>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movabs $0x7ff0000000000000,%rax
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponent>:
movq   %xmm0,%rcx
movabs $0x7ff0000000000000,%rax
and    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @exponent(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = bitcast double* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, 9218868437227405312
ret i64 %5
}

LLVM IR (-O2):
define i64 @exponent(double %0) {
%2 = bitcast double %0 to i64
%3 = and i64 %2, 9218868437227405312
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ curs_move(long, long);
int /*<<< orphan*/ curs_refresh();
void set_crsr(long x, long y) {
  curs_move(y, x);
  curs_refresh();
}


x86 assembly (clang, -O0):
<set_crsr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <curs_move@plt>
mov    $0x0,%al
call   1040 <curs_refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_crsr>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <curs_move@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <curs_refresh@plt>

LLVM IR (-O0):
define void @set_crsr(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = call i32 @curs_move(i64 %5, i64 %6)
%8 = call i32 (...) @curs_refresh()
ret void
}

LLVM IR (-O2):
define void @set_crsr(i64 %0, i64 %1) {
%3 = tail call i32 @curs_move(i64 %1, i64 %0)
%4 = tail call i32 (...) @curs_refresh()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage(void) { puts("Usage: nutparse input.nut"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: nutparse input.nut\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: nutparse input.nut\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int);
int printf(char *);
int main() {
  int n;
  n = printf("Wassssssssssssssup?\n");
  print(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,%edi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Wassssssssssssssup?\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @print(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Wassssssssssssssup?\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print(i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t AONEventRtcGet(void) {
  uint32_t ui32EventSrc;
  ui32EventSrc = (*((volatile unsigned long *)(0x40093000 + 0x0000000C)));
  return ((ui32EventSrc & 0x0000003F) >> 0);
}


x86 assembly (clang, -O0):
<AONEventRtcGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4009300c,%eax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
sar    $0x0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AONEventRtcGet>:
mov    0x4009300c,%rax
40
and    $0x3f,%eax
ret

LLVM IR (-O0):
define i32 @AONEventRtcGet() {
%1 = alloca i32
%2 = load volatile i64, i64* inttoptr (i64 1074343948 to i64*)
%3 = trunc i64 %2 to i32
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = and i32 %4, 63
%6 = ashr i32 %5, 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @AONEventRtcGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074343948 to i64*)
%2 = trunc i64 %1 to i32
%3 = and i32 %2, 63
ret i32 %3
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ crash();
int /*<<< orphan*/ perror(char const *);
scalar_t__ stat(char const *, struct stat *);
void checkfiles(const char *infile, const char *outfile) {
  struct stat buf;
  if (infile)
    if (stat(infile, &buf) < 0) {
      perror(infile);
      crash();
    };
}


x86 assembly (clang, -O0):
<checkfiles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1177 <checkfiles+0x47>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    1172 <checkfiles+0x42>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <crash@plt>
jmp    1177 <checkfiles+0x47>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkfiles>:
push   %rbx
sub    $0x10,%rsp
test   %rdi,%rdi
je     114c <checkfiles+0x1c>
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1152 <checkfiles+0x22>
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <crash@plt>
jmp    114c <checkfiles+0x1c>

LLVM IR (-O0):
%struct.stat = type { i32 }
define void @checkfiles(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.stat
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i64 @stat(i8* %9, %struct.stat* %5)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = call i32 @perror(i8* %13)
%15 = call i32 (...) @crash()
br label %16
16: ; preds = %12, %8
br label %17
17: ; preds = %16, %2
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define void @checkfiles(i8* %0, i8* nocapture readnone %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = icmp eq i8* %0, null
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = call i64 @stat(i8* %0, %struct.stat* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 @perror(i8* %0)
%11 = call i32 (...) @crash()
br label %12
12: ; preds = %6, %9, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char word[200];
  scanf("%s", &word);
  printf("%ld", hash(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = bitcast [200 x i8]* %2 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%6 = call i32 @hash(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = bitcast [200 x i8]* %1 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = call i32 @hash(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
struct pcg_state_64 {
  int dummy;
};

/* Variables and functions */
int pcg_oneseq_64_xsl_rr_rr_64_random_r(struct pcg_state_64 *);
uint64_t pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r(struct pcg_state_64 *rng,
                                                  uint64_t bound) {
  uint64_t threshold = -bound % bound;
  for (;;) {
    uint64_t r = pcg_oneseq_64_xsl_rr_rr_64_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_oneseq_64_xsl_rr_rr_64_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_oneseq_64_xsl_rr_rr_64_random_r@plt>
test   %eax,%eax
js     1120 <pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_64* %0, %struct.pcg_state_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_64*, %struct.pcg_state_64** %3
%13 = call i32 @pcg_oneseq_64_xsl_rr_rr_64_random_r(%struct.pcg_state_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_oneseq_64_xsl_rr_rr_64_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_oneseq_64_xsl_rr_rr_64_random_r(%struct.pcg_state_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ fchdir(int);
int open(char *, int /*<<< orphan*/);
int main() {
  int dir_fd;
  dir_fd = open(".", O_RDONLY);
  fchdir(dir_fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <fchdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <open@plt>
mov    %eax,%edi
call   1030 <fchdir@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @fchdir(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @fchdir(i32 %2)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char CHAR_BIT;
int /*<<< orphan*/ assert(int);
void set_bit_true(volatile uint8_t *byte, char bit_num) {
  assert(bit_num < CHAR_BIT);
  *byte |= (1 << bit_num);
}


x86 assembly (clang, -O0):
<set_bit_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    0x2eb3(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit_true>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2ec0(%rip),%rax
xor    %edi,%edi
cmp    %bl,(%rax)
setg   %dil
call   1030 <assert@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
or     %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@CHAR_BIT = global i8 0
define void @set_bit_true(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8, i8* @CHAR_BIT
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = shl i32 1, %13
%15 = load i32*, i32** %3
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %14
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i8 0
define void @set_bit_true(i32* %0, i8 signext %1) {
%3 = load i8, i8* @CHAR_BIT
%4 = icmp sgt i8 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = zext i8 %1 to i32
%8 = shl nuw i32 1, %7
%9 = load volatile i32, i32* %0
%10 = or i32 %9, %8
store volatile i32 %10, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fits_bits(int, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main(void) {
  assert(fits_bits(0xFFFF, 16));
  assert(fits_bits(0x1001, 13));
  assert(fits_bits(0x70000001, 31));
  printf("evaluate successful!");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffff,%edi
mov    $0x10,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x1001,%edi
mov    $0xd,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x70000001,%edi
mov    $0x1f,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffff,%edi
mov    $0x10,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x1001,%edi
mov    $0xd,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x70000001,%edi
mov    $0x1f,%esi
call   1040 <fits_bits@plt>
mov    %eax,%edi
call   1060 <assert@plt>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"evaluate successful!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fits_bits(i32 65535, i32 16)
%3 = call i32 @assert(i32 %2)
%4 = call i32 @fits_bits(i32 4097, i32 13)
%5 = call i32 @assert(i32 %4)
%6 = call i32 @fits_bits(i32 1879048193, i32 31)
%7 = call i32 @assert(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"evaluate successful!\00"
define i32 @main() {
%1 = tail call i32 @fits_bits(i32 65535, i32 16)
%2 = tail call i32 @assert(i32 %1)
%3 = tail call i32 @fits_bits(i32 4097, i32 13)
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @fits_bits(i32 1879048193, i32 31)
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @getchar()
ret i32 0
}
int inverse_number(int val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @inverse_number(i32 returned %0) {
ret i32 %0
}
void eapol_sm_invalidate_cached_session(struct eapol_sm *sm) {}


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

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

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

LLVM IR (-O2):
%struct.eapol_sm = type opaque
define void @eapol_sm_invalidate_cached_session(%struct.eapol_sm* nocapture %0) {
ret void
}
double __attribute__((no)) add(double x, double y) { return x + y; }


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @add(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @add(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  uint64_t a, b, c;
  scanf("%llu %llu %llu", &a, &b, &c);
  printf((b + c) / a & 1 ? "opponent\n" : "paul\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
and    $0x1,%ecx
lea    0xebc(%rip),%rdi
lea    0xeab(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
add    0x10(%rsp),%eax
cltd
idivl  0x14(%rsp)
test   $0x1,%al
lea    0xec4(%rip),%rax
lea    0xeb3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%llu %llu %llu\00"
@.str.1 = [10 x i8] c"opponent\0A\00"
@.str.2 = [6 x i8] c"paul\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %2
%10 = sdiv i32 %8, %9
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%15 = call i32 @printf(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%llu %llu %llu\00"
@.str.1 = [10 x i8] c"opponent\0A\00"
@.str.2 = [6 x i8] c"paul\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %8
%11 = load i32, i32* %1
%12 = sdiv i32 %10, %11
%13 = and i32 %12, 1
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%16 = call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}
void __attribute__((no)) HEX00_lazy_restInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_lazy_restInit() {
ret void
}
char *get_vlm_build_information() {
  static char *vlm_build_info = "\"Unknown\"";
  return vlm_build_info;
}


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

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

LLVM IR (-O0):
@get_vlm_build_information.vlm_build_info = internal global i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0)
@.str = [10 x i8] c"\22Unknown\22\00"
define i8* @get_vlm_build_information() {
%1 = load i8*, i8** @get_vlm_build_information.vlm_build_info
ret i8* %1
}

LLVM IR (-O2):
@.str = [10 x i8] c"\22Unknown\22\00"
define i8* @get_vlm_build_information() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_connection(int connection, char *string) {
  printf("Connection");
  printf(" #%d: %s", connection, string);
}


x86 assembly (clang, -O0):
<print_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_connection>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Connection\00"
@.str.1 = [9 x i8] c" #%d: %s\00"
define void @print_connection(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Connection\00"
@.str.1 = [9 x i8] c" #%d: %s\00"
define void @print_connection(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
void rop3_128_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_128_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_128_1_0>:
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_128_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_128_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
store i8 %5, i8* %0
ret void
}
void PRCMLPDSRestoreInfoSet(unsigned long ulStackPtr,
                            unsigned long ulProgCntr) {
  (*((volatile unsigned long *)(0x4402E18C))) = ulStackPtr;
  (*((volatile unsigned long *)(0x4402E190))) = ulProgCntr;
}


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

x86 assembly (clang, -O2):
<PRCMLPDSRestoreInfoSet>:
mov    %rdi,0x4402e18c
44
mov    %rsi,0x4402e190
44
ret

LLVM IR (-O0):
define void @PRCMLPDSRestoreInfoSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
store volatile i64 %5, i64* inttoptr (i64 1141039500 to i64*)
%6 = load i64, i64* %4
store volatile i64 %6, i64* inttoptr (i64 1141039504 to i64*)
ret void
}

LLVM IR (-O2):
define void @PRCMLPDSRestoreInfoSet(i64 %0, i64 %1) {
store volatile i64 %0, i64* inttoptr (i64 1141039500 to i64*)
store volatile i64 %1, i64* inttoptr (i64 1141039504 to i64*)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char buffer[128] = {0};
  printf("Insert ROP chain here:\n");
  gets(buffer);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
lea    -0x90(%rbp),%rdi
call   1050 <gets@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1040 <gets@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Insert ROP chain here:\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
store i32 0, i32* %1
%3 = bitcast [128 x i8]* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [23 x i8] c"Insert ROP chain here:\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void fun14(int data[3]) {
  printf("data[0] %d data[1] %d data[2] %d\n", data[0], data[1], data[2]);
}


x86 assembly (clang, -O0):
<fun14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun14>:
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [34 x i8] c"data[0] %d data[1] %d data[2] %d\0A\00"
define void @fun14(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ intc_init();
int /*<<< orphan*/ switch_init();
int /*<<< orphan*/ uart_init();
void board_init(void) {
  intc_init();
  switch_init();
  uart_init();
}


x86 assembly (clang, -O0):
<board_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <intc_init@plt>
mov    $0x0,%al
call   1050 <switch_init@plt>
mov    $0x0,%al
call   1030 <uart_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_init>:
push   %rax
xor    %eax,%eax
call   1040 <intc_init@plt>
xor    %eax,%eax
call   1050 <switch_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <uart_init@plt>

LLVM IR (-O0):
define void @board_init() {
%1 = call i32 (...) @intc_init()
%2 = call i32 (...) @switch_init()
%3 = call i32 (...) @uart_init()
ret void
}

LLVM IR (-O2):
define void @board_init() {
%1 = tail call i32 (...) @intc_init()
%2 = tail call i32 (...) @switch_init()
%3 = tail call i32 (...) @uart_init()
ret void
}
void tegra_cpuidle_pcie_irqs_in_use(void) {}


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

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

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

LLVM IR (-O2):
define void @tegra_cpuidle_pcie_irqs_in_use() {
ret void
}
__attribute__((always_)) void tasklet_disable(struct tasklet_struct *t) {
  tasklet_disable_nosync(t);
  do {
  } while (0);
  __asm__ __volatile__("" : : : "memory");
}


x86 assembly (clang, -O0):
<tasklet_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <tasklet_disable_nosync@plt>
jmp    112c <tasklet_disable+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tasklet_struct = type opaque
define void @tasklet_disable(%struct.tasklet_struct* %0) {
%2 = alloca %struct.tasklet_struct*
store %struct.tasklet_struct* %0, %struct.tasklet_struct** %2
%3 = load %struct.tasklet_struct*, %struct.tasklet_struct** %2
%4 = call i32 (%struct.tasklet_struct*, ...) bitcast (i32 (...)* @tasklet_disable_nosync to i32 (%struct.tasklet_struct*, ...)*)(%struct.tasklet_struct* %3)
br label %5
5: ; preds = %1
br label %6
6: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.tasklet_struct = type opaque
define void @tasklet_disable(%struct.tasklet_struct* %0) {
%2 = tail call i32 (%struct.tasklet_struct*, ...) bitcast (i32 (...)* @tasklet_disable_nosync to i32 (%struct.tasklet_struct*, ...)*)(%struct.tasklet_struct* %0)
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
void funcion_hilo(char *a) {
  printf("%s", a);
  sleep(3);
}


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

x86 assembly (clang, -O2):
<funcion_hilo>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @funcion_hilo(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)
%5 = call i32 @sleep(i32 3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @funcion_hilo(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @sleep(i32 3)
ret void
}
/* Variables and functions */
float vectors_scalar_product(float const *, float const *);
float vectors_norm_sqr(const float u[3]) {
  float norm = vectors_scalar_product(u, u);
  return norm;
}


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

x86 assembly (clang, -O2):
<vectors_norm_sqr>:
mov    %rdi,%rsi
jmp    1030 <vectors_scalar_product@plt>

LLVM IR (-O0):
define float @vectors_norm_sqr(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = load float*, float** %2
%6 = call float @vectors_scalar_product(float* %4, float* %5)
store float %6, float* %3
%7 = load float, float* %3
ret float %7
}

LLVM IR (-O2):
define float @vectors_norm_sqr(float* %0) {
%2 = tail call float @vectors_scalar_product(float* %0, float* %0)
ret float %2
}