xunge/DecIR huggingface dataset:
void d2i_PKCS7_RECIP_INFO(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_PKCS7_RECIP_INFO() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reshapeviewport();
int reshapeviewport_() { reshapeviewport(); }


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

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

LLVM IR (-O0):
define i32 @reshapeviewport_() {
%1 = alloca i32
%2 = call i32 (...) @reshapeviewport()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @reshapeviewport_() {
%1 = tail call i32 (...) @reshapeviewport()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __assert_fail_base_backtrace(char *, char const *,
                                                char const *, unsigned int,
                                                char const *);
void __assert_fail_backtrace(const char *assertion, const char *file,
                             unsigned int line, const char *function) {
  __assert_fail_base_backtrace("%s: %s:%u: %s: Assertion '%s' failed.\n",
                               assertion, file, line, function);
}


x86 assembly (clang, -O0):
<__assert_fail_backtrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    0xec3(%rip),%rdi
call   1030 <__assert_fail_base_backtrace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__assert_fail_backtrace>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xede(%rip),%rdi
jmp    1030 <__assert_fail_base_backtrace@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"%s: %s:%u: %s: Assertion '%s' failed.\0A\00"
define void @__assert_fail_backtrace(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @__assert_fail_base_backtrace(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"%s: %s:%u: %s: Assertion '%s' failed.\0A\00"
define void @__assert_fail_backtrace(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @__assert_fail_base_backtrace(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2, i8* %3)
ret void
}
void ignore_handler(int signum) { (void)signum; }


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

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

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

LLVM IR (-O2):
define void @ignore_handler(i32 %0) {
ret void
}
int main() {
  int choose;
  int life;
  int death;
  int temp;
  choose = 2;
  life = 13;
  death = 17;
  while (life < death) {
    temp = death;
    death = life + 1;
    life = temp;
    if (choose < life || choose < death) {
      life = choose;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0xd,-0xc(%rbp)
movl   $0x11,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1164 <main+0x64>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1159 <main+0x59>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115f <main+0x5f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <main+0x20>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putch(int /*<<< orphan*/);
void puts(const char *str) {
  while (*str)
    putch(*str++);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putch@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putch(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
__attribute__((no)) void dd(int x, void (*f)(int)) { f(x); }


x86 assembly (clang, -O0):
<dd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd>:
jmp    *%rsi

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

LLVM IR (-O2):
define void @dd(i32 %0, void (i32)* nocapture %1) {
tail call void %1(i32 %0)
ret void
}
unsigned char b_input(void) {
  unsigned char chr;
  asm volatile("call *0x00100010" : "=a"(chr));
  return chr;
}


x86 assembly (clang, -O0):
<b_input>:
push   %rbp
mov    %rsp,%rbp
call   *0x100010
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_input>:
call   *0x100010
ret

LLVM IR (-O0):
define zeroext i8 @b_input() {
%1 = alloca i8
%2 = call i8 asm sideeffect "call *0x00100010", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %2, i8* %1
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @b_input() {
%1 = tail call i8 asm sideeffect "call *0x00100010", "={ax},~{dirflag},~{fpsr},~{flags}"()
ret i8 %1
}
int rect_height(int rect[2][2]) { return (rect[1][1] - rect[0][1]); }


x86 assembly (clang, -O0):
<rect_height>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    -0x8(%rbp),%rcx
sub    0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rect_height>:
mov    0xc(%rdi),%eax
sub    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rect_height([2 x i32]* %0) {
%2 = alloca [2 x i32]*
store [2 x i32]* %0, [2 x i32]** %2
%3 = load [2 x i32]*, [2 x i32]** %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 1
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%6 = load i32, i32* %5
%7 = load [2 x i32]*, [2 x i32]** %2
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%10 = load i32, i32* %9
%11 = sub nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @rect_height([2 x i32]* nocapture %0) {
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 1, i64 1
%3 = load i32, i32* %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 0, i64 1
%5 = load i32, i32* %4
%6 = sub nsw i32 %3, %5
ret i32 %6
}
char printable(unsigned char password_byte) {
  char check = 1;
  if (password_byte < 0x20 || password_byte > 0x7E) {
    check = 0;
  }
  return check;
}


x86 assembly (clang, -O0):
<printable>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jl     1128 <printable+0x28>
movzbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
jle    112c <printable+0x2c>
movb   $0x0,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<printable>:
add    $0xe0,%dil
cmp    $0x5f,%dil
setb   %al
ret

LLVM IR (-O0):
define signext i8 @printable(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 1, i8* %3
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp sgt i32 %9, 126
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i8 0, i8* %3
br label %12
12: ; preds = %11, %7
%13 = load i8, i8* %3
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @printable(i8 zeroext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i8
ret i8 %4
}
int rgbMap32To32(int sourcePixel) { return sourcePixel; }


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

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

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

LLVM IR (-O2):
define i32 @rgbMap32To32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
double j0(double);
double c_j0(double arg0) { return j0(arg0); }


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

x86 assembly (clang, -O2):
<c_j0>:
jmp    1030 <j0@plt>

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

LLVM IR (-O2):
define double @c_j0(double %0) {
%2 = tail call double @j0(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ opjump(char *, int);
void jumpc(int label) { opjump("c,", label); }


x86 assembly (clang, -O0):
<jumpc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <opjump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jumpc>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <opjump@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"c,\00"
define void @jumpc(i32 %0) {
%2 = tail call i32 @opjump(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int mDB_header(fn, type, dst) {
  return mDBi_msg('i', fn, type, 0, 0, 0, 0, dst);
}


x86 assembly (clang, -O0):
<mDB_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%eax
mov    $0x69,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <mDBi_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDB_header>:
push   %rax
mov    %edx,%r10d
mov    %esi,%edx
mov    %edi,%esi
mov    $0x69,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   %r10
push   $0x0
call   1030 <mDBi_msg@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mDB_header(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 105, i32 %7, i32 %8, i32 0, i32 0, i32 0, i32 0, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mDB_header(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 105, i32 %0, i32 %1, i32 0, i32 0, i32 0, i32 0, i32 %2)
ret i32 %4
}
int foo(void) {
  int f = 2, g = 0;
  int h = (g < 7) ^ (1 || (f = 1));
  int j = (g < 7) ^ (0 && (f = 1));
  return f + h + j;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
xor    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
xor    $0x0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 2, i32* %1
store i32 0, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 7
%7 = zext i1 %6 to i32
%8 = xor i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 7
%11 = zext i1 %10 to i32
%12 = xor i32 %11, 0
store i32 %12, i32* %4
%13 = load i32, i32* %1
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 3
}
/* Variables and functions */
double fabs(double);
double max(double a, double b) { return 1 / 2. * (a + b + fabs(a - b)); }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xee7(%rip),%xmm2
pand   %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xec7(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm0
andpd  0xef0(%rip),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @max(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
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = call double @llvm.fabs.f64(double %10)
%12 = fadd double %7, %11
%13 = fmul double 5.000000e-01, %12
ret double %13
}

LLVM IR (-O2):
define double @max(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fadd double %3, %5
%7 = fmul double %6, 5.000000e-01
ret double %7
}
void PRCMLPDSIntervalSet(unsigned long ulTicks) {
  if (ulTicks < 21) {
    ulTicks = 21;
  }
  (*((volatile unsigned long *)(0x4402D000 + 0x00000020))) = ulTicks;
  (*((volatile unsigned long *)(0x4402D000 + 0x00000010))) = ulTicks - 20;
}


x86 assembly (clang, -O0):
<PRCMLPDSIntervalSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x15,-0x8(%rbp)
jae    111b <PRCMLPDSIntervalSet+0x1b>
movq   $0x15,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x4402d020,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rcx
sub    $0x14,%rcx
mov    $0x4402d010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMLPDSIntervalSet>:
cmp    $0x16,%rdi
mov    $0x15,%eax
cmovae %rdi,%rax
mov    %rax,0x4402d020
44
add    $0xffffffffffffffec,%rax
mov    %rax,0x4402d010
44
ret

LLVM IR (-O0):
define void @PRCMLPDSIntervalSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 21
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 21, i64* %2
br label %6
6: ; preds = %5, %1
%7 = load i64, i64* %2
store volatile i64 %7, i64* inttoptr (i64 1141035040 to i64*)
%8 = load i64, i64* %2
%9 = sub i64 %8, 20
store volatile i64 %9, i64* inttoptr (i64 1141035024 to i64*)
ret void
}

LLVM IR (-O2):
define void @PRCMLPDSIntervalSet(i64 %0) {
%2 = icmp ugt i64 %0, 21
%3 = select i1 %2, i64 %0, i64 21
store volatile i64 %3, i64* inttoptr (i64 1141035040 to i64*)
%4 = add i64 %3, -20
store volatile i64 %4, i64* inttoptr (i64 1141035024 to i64*)
ret void
}
/* Type definitions */
struct cheat_test_suite {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cheat_test_assert(struct cheat_test_suite *, int, char *,
                                     char *, int);
void test_second_failure(struct cheat_test_suite *suite) {
  cheat_test_assert(
      suite, 1 == 0, "1 == 0",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/Tordek/cheat/refs/heads/master/sampletest.c",
      46);
}


x86 assembly (clang, -O0):
<test_second_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
lea    0xed7(%rip),%rdx
lea    0xed7(%rip),%rcx
mov    $0x2e,%r8d
call   1030 <cheat_test_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_second_failure>:
lea    0xee9(%rip),%rdx
lea    0xee9(%rip),%rcx
xor    %esi,%esi
mov    $0x2e,%r8d
jmp    1030 <cheat_test_assert@plt>

LLVM IR (-O0):
%struct.cheat_test_suite = type { i32 }
@.str = [7 x i8] c"1 == 0\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tordek/cheat/refs/heads/master/sampletest.c\00"
define void @test_second_failure(%struct.cheat_test_suite* %0) {
%2 = alloca %struct.cheat_test_suite*
store %struct.cheat_test_suite* %0, %struct.cheat_test_suite** %2
%3 = load %struct.cheat_test_suite*, %struct.cheat_test_suite** %2
%4 = call i32 @cheat_test_assert(%struct.cheat_test_suite* %3, i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 46)
ret void
}

LLVM IR (-O2):
%struct.cheat_test_suite = type { i32 }
@.str = [7 x i8] c"1 == 0\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tordek/cheat/refs/heads/master/sampletest.c\00"
define void @test_second_failure(%struct.cheat_test_suite* %0) {
%2 = tail call i32 @cheat_test_assert(%struct.cheat_test_suite* %0, i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 46)
ret void
}
int cmp(const void *pa, const void *pb) {
  char a = *(const char *)pa;
  char b = *(const char *)pb;
  *(char *)pa = *(char *)pb = 100;
  return 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x64,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x64,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
movb   $0x64,(%rsi)
movb   $0x64,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
store i8 %10, i8* %6
%11 = load i8*, i8** %4
store i8 100, i8* %11
%12 = load i8*, i8** %3
store i8 100, i8* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 100, i8* %1
store i8 100, i8* %0
ret i32 0
}
/* Type definitions */
struct catmc_atomic_bool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct catmc_atomic_bool *);
void catmc_atomic_bool_destroy(struct catmc_atomic_bool *wrapper) {
  free(wrapper);
}


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

x86 assembly (clang, -O2):
<catmc_atomic_bool_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.catmc_atomic_bool = type { i32 }
define void @catmc_atomic_bool_destroy(%struct.catmc_atomic_bool* nocapture %0) {
%2 = tail call i32 @free(%struct.catmc_atomic_bool* %0)
ret void
}
double qurt_fabs(double n) {
  double f;
  if (n >= 0)
    f = n;
  else
    f = -n;
  return f;
}


x86 assembly (clang, -O0):
<qurt_fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <qurt_fabs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <qurt_fabs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<qurt_fabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
cmpnlesd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @qurt_fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %2
store double %7, double* %3
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = fneg double %9
store double %10, double* %3
br label %11
11: ; preds = %8, %6
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @qurt_fabs(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glColor3f(float, float, float);
void setupRC() {
  glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
  glColor3f(0.0f, 1.0f, 0.0f);
}


x86 assembly (clang, -O0):
<setupRC>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movss  0xed1(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glClearColor@plt>
xorps  %xmm2,%xmm2
movss  0xebb(%rip),%xmm1
movaps %xmm2,%xmm0
call   1040 <glColor3f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupRC>:
push   %rax
movss  0xed7(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glClearColor@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movss  0xebb(%rip),%xmm1
pop    %rax
jmp    1040 <glColor3f@plt>

LLVM IR (-O0):
define void @setupRC() {
%1 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%2 = call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @setupRC() {
%1 = tail call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%2 = tail call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha256_get(unsigned char *, unsigned char const *, int);
void SHA256(const unsigned char *header, int len, unsigned char hash[32]) {
  sha256_get(hash, header, len);
}


x86 assembly (clang, -O0):
<SHA256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <sha256_get@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA256>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <sha256_get@plt>

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

LLVM IR (-O2):
define void @SHA256(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @sha256_get(i8* %2, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void sensors_yyfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<sensors_yyfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @sensors_yyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int am_getconfig(const char *path, char *val, const char *def) { return -1; }


x86 assembly (clang, -O0):
<am_getconfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @am_getconfig(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @am_getconfig(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ NullCheck(int *);
int _dayOfWeek(int, int, int);
int date_time_calculateDayOfWeek(int year, int month, int day, int *dayOfWeek) {
  NullCheck(dayOfWeek);
  *dayOfWeek = _dayOfWeek(year, month, day);
  return 0;
}


x86 assembly (clang, -O0):
<date_time_calculateDayOfWeek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <NullCheck@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <_dayOfWeek@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_time_calculateDayOfWeek>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebp
mov    %rcx,%rdi
call   1040 <NullCheck@plt>
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1030 <_dayOfWeek@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @date_time_calculateDayOfWeek(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32*, i32** %8
%10 = call i32 @NullCheck(i32* %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @_dayOfWeek(i32 %11, i32 %12, i32 %13)
%15 = load i32*, i32** %8
store i32 %14, i32* %15
ret i32 0
}

LLVM IR (-O2):
define i32 @date_time_calculateDayOfWeek(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @NullCheck(i32* %3)
%6 = tail call i32 @_dayOfWeek(i32 %0, i32 %1, i32 %2)
store i32 %6, i32* %3
ret i32 0
}
AR0AX1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (((float *)11111111)[x1]); }


x86 assembly (clang, -O0):
<AR0AX1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AX1>:
movslq %esi,%rax
movss  0xa98ac7(,%rax,4),%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

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

LLVM IR (-O2):
define i32 @AR0AX1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds float, float* inttoptr (i64 11111111 to float*), i64 %7
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %4, i64 10000000
store float %9, float* %10
ret i32 undef
}
void INT_Excep_TMR1_OV1I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR1_OV1I() {
ret void
}
void ERR_add_error_data(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_add_error_data() {
ret void
}
int audio_close(struct audio_info_struct *ai) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.audio_info_struct = type opaque
define i32 @audio_close(%struct.audio_info_struct* nocapture readnone %0) {
ret i32 0
}
void EC_POINT_invert(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_invert() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ mpfr_set_flt(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ sinf(float);
void getsin_flt(mpfr_t y, float phase) {
  mpfr_set_flt(y, sinf(phase), MPFR_RNDN);
}


x86 assembly (clang, -O0):
<getsin_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <sinf@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
call   1040 <mpfr_set_flt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsin_flt>:
push   %rbx
mov    %edi,%ebx
call   1030 <sinf@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%edx
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mpfr_set_flt@plt>

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
define void @getsin_flt(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = load i32, i32* %3
%6 = load float, float* %4
%7 = call i32 @sinf(float %6)
%8 = load i32, i32* @MPFR_RNDN
%9 = call i32 @mpfr_set_flt(i32 %5, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define void @getsin_flt(i32 %0, float %1) {
%3 = tail call i32 @sinf(float %1)
%4 = load i32, i32* @MPFR_RNDN
%5 = tail call i32 @mpfr_set_flt(i32 %0, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ emalloc(int);
char *buf() { return (char *)emalloc(2047 + 1); }


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

x86 assembly (clang, -O2):
<buf>:
mov    $0x800,%edi
jmp    1030 <emalloc@plt>

LLVM IR (-O0):
define i8* @buf() {
%1 = call i64 @emalloc(i32 2048)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @buf() {
%1 = tail call i64 @emalloc(i32 2048)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Terminal_clear_screen(int);
int /*<<< orphan*/ Terminal_end_raw_mode();
int /*<<< orphan*/ Terminal_reset_cursor(int);
void cleanup_screen(void) {
  Terminal_reset_cursor(1);
  Terminal_end_raw_mode();
  Terminal_clear_screen(1);
}


x86 assembly (clang, -O0):
<cleanup_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <Terminal_reset_cursor@plt>
mov    $0x0,%al
call   1050 <Terminal_end_raw_mode@plt>
mov    $0x1,%edi
call   1030 <Terminal_clear_screen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_screen>:
push   %rax
mov    $0x1,%edi
call   1040 <Terminal_reset_cursor@plt>
xor    %eax,%eax
call   1050 <Terminal_end_raw_mode@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <Terminal_clear_screen@plt>

LLVM IR (-O0):
define void @cleanup_screen() {
%1 = call i32 @Terminal_reset_cursor(i32 1)
%2 = call i32 (...) @Terminal_end_raw_mode()
%3 = call i32 @Terminal_clear_screen(i32 1)
ret void
}

LLVM IR (-O2):
define void @cleanup_screen() {
%1 = tail call i32 @Terminal_reset_cursor(i32 1)
%2 = tail call i32 (...) @Terminal_end_raw_mode()
%3 = tail call i32 @Terminal_clear_screen(i32 1)
ret void
}
void vec3_multiply(float *dst, float *b) {
  dst[0] = dst[0] * b[0];
  dst[1] = dst[1] * b[1];
  dst[2] = dst[2] * b[2];
}


x86 assembly (clang, -O0):
<vec3_multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_multiply>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
mulss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @vec3_multiply(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fmul float %7, %10
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = fmul float %16, %19
%21 = load float*, float** %3
%22 = getelementptr inbounds float, float* %21, i64 1
store float %20, float* %22
%23 = load float*, float** %3
%24 = getelementptr inbounds float, float* %23, i64 2
%25 = load float, float* %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 2
%28 = load float, float* %27
%29 = fmul float %25, %28
%30 = load float*, float** %3
%31 = getelementptr inbounds float, float* %30, i64 2
store float %29, float* %31
ret void
}

LLVM IR (-O2):
define void @vec3_multiply(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fmul float %3, %4
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fmul float %7, %9
store float %10, float* %6
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = fmul float %12, %14
store float %15, float* %11
ret void
}
int circlemod3(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @circlemod3() {
ret i32 3
}

LLVM IR (-O2):
define i32 @circlemod3() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ ClockMilliSecondsDelay(int);
void msDelay(int len) { ClockMilliSecondsDelay(len); }


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

x86 assembly (clang, -O2):
<msDelay>:
jmp    1030 <ClockMilliSecondsDelay@plt>

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

LLVM IR (-O2):
define void @msDelay(i32 %0) {
%2 = tail call i32 @ClockMilliSecondsDelay(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __util_oom(char const *, char const *, int, scalar_t__);
void *strdup(char const *);
scalar_t__ strlen(char const *);
void *__util_strdup(const char *func, const char *file, int line,
                    const char *str) {
  void *buf = strdup(str);
  if (buf == NULL)
    __util_oom(func, file, line, strlen(str) + 1);
  return buf;
}


x86 assembly (clang, -O0):
<__util_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1195 <__util_strdup+0x65>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    %rax,%rcx
add    $0x1,%rcx
call   1040 <__util_oom@plt>
mov    -0x28(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__util_strdup>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%rbp
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rcx,%rdi
call   1050 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116e <__util_strdup+0x3e>
mov    %rbp,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   1040 <__util_oom@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @__util_strdup(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %8
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %9
%12 = load i8*, i8** %9
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %22
14: ; preds = %4
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = load i8*, i8** %8
%19 = call i64 @strlen(i8* %18)
%20 = add nsw i64 %19, 1
%21 = call i32 @__util_oom(i8* %15, i8* %16, i32 %17, i64 %20)
br label %22
22: ; preds = %14, %4
%23 = load i8*, i8** %9
ret i8* %23
}

LLVM IR (-O2):
define noalias i8* @__util_strdup(i8* %0, i8* %1, i32 %2, i8* nocapture %3) {
%5 = tail call i8* @strdup(i8* %3)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @strlen(i8* dereferenceable(1) %3)
%9 = add nsw i64 %8, 1
%10 = tail call i32 @__util_oom(i8* %0, i8* %1, i32 %2, i64 %9)
br label %11
11: ; preds = %7, %4
ret i8* %5
}
/* Type definitions */
struct coord2d {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
double length(struct coord2d *, int);
double perimeter(struct coord2d *coord, int num_vertices) {
  assert(num_vertices >= 4);
  return length(coord, num_vertices);
}


x86 assembly (clang, -O0):
<perimeter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <length@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perimeter>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x4,%esi
setge  %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <length@plt>

LLVM IR (-O0):
%struct.coord2d = type { i32 }
define double @perimeter(%struct.coord2d* %0, i32 %1) {
%3 = alloca %struct.coord2d*
%4 = alloca i32
store %struct.coord2d* %0, %struct.coord2d** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 4
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load %struct.coord2d*, %struct.coord2d** %3
%10 = load i32, i32* %4
%11 = call double @length(%struct.coord2d* %9, i32 %10)
ret double %11
}

LLVM IR (-O2):
%struct.coord2d = type { i32 }
define double @perimeter(%struct.coord2d* %0, i32 %1) {
%3 = icmp sgt i32 %1, 3
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call double @length(%struct.coord2d* %0, i32 %1)
ret double %6
}
/* Variables and functions */
void UsageFault_Handler() {
  while (true)
    ;
}


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

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

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

LLVM IR (-O2):
define void @UsageFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
long foo2(long a) {
  long b = a + 1;
  if (b < 0)
    return b;
  return 1;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    112c <foo2+0x2c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <foo2+0x34>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
lea    0x1(%rdi),%rcx
cmp    $0xffffffffffffffff,%rdi
mov    $0x1,%eax
cmovl  %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @foo2(i64 %0) {
%2 = icmp slt i64 %0, -1
%3 = add nsw i64 %0, 1
%4 = select i1 %2, i64 %3, i64 1
ret i64 %4
}
/* Variables and functions */
int enter_Choice();
int /*<<< orphan*/ printf(char *);
void data_Maintenance(void) {
  int temp = 1;
  printf("Please enter your choice\n");
  while (temp == 1) {
    temp = enter_Choice();
  }
}


x86 assembly (clang, -O0):
<data_Maintenance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1154 <data_Maintenance+0x34>
mov    $0x0,%al
call   1040 <enter_Choice@plt>
mov    %eax,-0x4(%rbp)
jmp    113b <data_Maintenance+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_Maintenance>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <enter_Choice@plt>
cmp    $0x1,%eax
je     1130 <data_Maintenance+0x10>
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Please enter your choice\0A\00"
define void @data_Maintenance() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 (...) @enter_Choice()
store i32 %7, i32* %1
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Please enter your choice\00"
define void @data_Maintenance() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @enter_Choice()
%4 = icmp eq i32 %3, 1
br i1 %4, label %2, label %5
5: ; preds = %2
ret void
}
/* Type definitions */
struct coprthr_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _printcl(char *, int, char *, char *);
void *copy_buffer_to_image(struct coprthr_device *dev, void *argp) {
  do {
    if ("<4>"
        "cmdcall_x86_64:copy_buffer_to_image: unsupported"[1] <= '0')
      _printcl("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/browndeer/coprthr/refs/heads/"
               "parallellocalypse/src/libcoprthr/arch/x86_64/devcmds_x86_64.c",
               425, "clmesg",
               "<4>"
               "cmdcall_x86_64:copy_buffer_to_image: unsupported");
  } while (0);
  return (0);
}


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

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

LLVM IR (-O0):
%struct.coprthr_device = type { i32 }
define i8* @copy_buffer_to_image(%struct.coprthr_device* %0, i8* %1) {
%3 = alloca %struct.coprthr_device*
%4 = alloca i8*
store %struct.coprthr_device* %0, %struct.coprthr_device** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
ret i8* null
}

LLVM IR (-O2):
%struct.coprthr_device = type { i32 }
define noalias i8* @copy_buffer_to_image(%struct.coprthr_device* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}