xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xf5() {
  Assert_real((isspace(245) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1230, ("isspace should be 0 for 0xf5"));
}


x86 assembly (clang, -O0):
<t_isspace_0xf5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf5,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ce,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xf5>:
push   %rax
mov    $0xf5,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ce,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf5\00"
define void @t_isspace_0xf5() {
%1 = call i64 @isspace(i32 245)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1230, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf5\00"
define void @t_isspace_0xf5() {
%1 = tail call i64 @isspace(i32 245)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1230, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void _Jv_b2d(void) {}


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

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

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

LLVM IR (-O2):
define void @_Jv_b2d() {
ret void
}
int isAlpha(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<isAlpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <isAlpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <isAlpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <isAlpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAlpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isAlpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isAlpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int dummyfn1(int a) { return a + 1; }


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

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

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

LLVM IR (-O2):
define i32 @dummyfn1(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void strlencpy(char *destination, char *source, int n_chars) {
  strncpy(destination, source, n_chars);
  destination[n_chars] = '\0';
}


x86 assembly (clang, -O0):
<strlencpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlencpy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @strlencpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @strlencpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int, int, int);
void DoUnLoop(void) { InlineWords(4, 41, 41, 20, 20); }


x86 assembly (clang, -O0):
<DoUnLoop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x29,%edx
mov    $0x14,%r8d
mov    %edx,%esi
mov    %r8d,%ecx
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoUnLoop>:
mov    $0x4,%edi
mov    $0x29,%esi
mov    $0x29,%edx
mov    $0x14,%ecx
mov    $0x14,%r8d
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoUnLoop() {
%1 = call i32 @InlineWords(i32 4, i32 41, i32 41, i32 20, i32 20)
ret void
}

LLVM IR (-O2):
define void @DoUnLoop() {
%1 = tail call i32 @InlineWords(i32 4, i32 41, i32 41, i32 20, i32 20)
ret void
}
/* Variables and functions */
double exp(double);
double cosh(double x) {
  x = exp(x);
  return ((x + (1.0 / x)) / 2.0);
}


x86 assembly (clang, -O0):
<cosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosh>:
push   %rax
call   1030 <exp@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @cosh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
store double %4, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fdiv double 1.000000e+00, %6
%8 = fadd double %5, %7
%9 = fdiv double %8, 2.000000e+00
ret double %9
}

LLVM IR (-O2):
define double @cosh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fdiv double 1.000000e+00, %2
%4 = fadd double %2, %3
%5 = fmul double %4, 5.000000e-01
ret double %5
}
long stub_syscall3(long syscall, long arg1, long arg2, long arg3) {
  long ret;
  __asm__ volatile("int $0x80"
                   : "=a"(ret)
                   : "0"(syscall), "b"(arg1), "c"(arg2), "d"(arg3));
  return ret;
}


x86 assembly (clang, -O0):
<stub_syscall3>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
int    $0x80
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<stub_syscall3>:
push   %rbx
mov    %rcx,%rax
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rax,%rdx
mov    %rdi,%rax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i64 @stub_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %10, i64 %11, i64 %12, i64 %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
ret i64 %15
}

LLVM IR (-O2):
define i64 @stub_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3)
ret i64 %5
}
int count() {}


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

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

LLVM IR (-O0):
define i32 @count() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @count() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int);
void gen_block(FILE *outfile, int num, int dim) {
  fprintf(outfile, "_block[%d][%d]", num, dim);
}


x86 assembly (clang, -O0):
<gen_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_block>:
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"_block[%d][%d]\00"
define void @gen_block(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 @fprintf(i32* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"_block[%d][%d]\00"
define void @gen_block(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
void restart_process(int pid) { kill(pid, SIGHUP); }


x86 assembly (clang, -O0):
<restart_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restart_process>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGHUP = global i32 0
define void @restart_process(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGHUP
%5 = call i32 @kill(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@SIGHUP = global i32 0
define void @restart_process(i32 %0) {
%2 = load i32, i32* @SIGHUP
%3 = tail call i32 @kill(i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main() {
  puts(getenv("PWD"));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"PWD\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @getenv(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i32 %2)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"PWD\00"
define i32 @main() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i32 %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int Montgomery(int a, int b, int m) {
  int result = 1;
  int base = a;
  while (b > 0) {
    if ((b & 1) == 1) {
      result = (result * base) % m;
    }
    base = (base * base) % m;
    b >>= 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<Montgomery>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    115d <Montgomery+0x5d>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1141 <Montgomery+0x41>
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111a <Montgomery+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Montgomery>:
test   %esi,%esi
jle    113c <Montgomery+0x3c>
mov    %edx,%r8d
mov    $0x1,%ecx
jmp    1126 <Montgomery+0x26>
xchg   %ax,%ax
imul   %edi,%edi
mov    %edi,%eax
cltd
idiv   %r8d
mov    %esi,%eax
shr    %eax
mov    %edx,%edi
cmp    $0x1,%esi
mov    %eax,%esi
jbe    1139 <Montgomery+0x39>
test   $0x1,%sil
je     1110 <Montgomery+0x10>
imul   %edi,%ecx
mov    %ecx,%eax
cltd
idiv   %r8d
mov    %edx,%ecx
jmp    1110 <Montgomery+0x10>
mov    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @Montgomery(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %20
5: ; preds = %3, %14
%6 = phi i32 [ %17, %14 ], [ %0, %3 ]
%7 = phi i32 [ %15, %14 ], [ 1, %3 ]
%8 = phi i32 [ %18, %14 ], [ %1, %3 ]
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = mul nsw i32 %6, %7
%13 = srem i32 %12, %2
br label %14
14: ; preds = %11, %5
%15 = phi i32 [ %13, %11 ], [ %7, %5 ]
%16 = mul nsw i32 %6, %6
%17 = srem i32 %16, %2
%18 = lshr i32 %8, 1
%19 = icmp ult i32 %8, 2
br i1 %19, label %20, label %5
20: ; preds = %14, %3
%21 = phi i32 [ 1, %3 ], [ %15, %14 ]
ret i32 %21
}
const char *db_create_jelines_table_sql(void) {
  static const char *query =
      "CREATE TABLE jelines ("
      "    id         INTEGER         NOT NULL AUTO_INCREMENT,"
      "    je         INTEGER         NOT NULL,"
      "    account    VARCHAR(20)     NOT NULL,"
      "    amount     DECIMAL(20,2)   NOT NULL,"
      "  CONSTRAINT jelines_pk"
      "    PRIMARY KEY (id),"
      "  CONSTRAINT jes_je_fk"
      "    FOREIGN KEY (je)"
      "    REFERENCES jes(id),"
      "  CONSTRAINT jes_account_fk"
      "    FOREIGN KEY (account)"
      "    REFERENCES nomaccts(num)"
      ");";
  return query;
}


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

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

LLVM IR (-O0):
@db_create_jelines_table_sql.query = internal global i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i32 0, i32 0)
@.str = [389 x i8] c"CREATE TABLE jelines ( id INTEGER NOT NULL AUTO_INCREMENT, je INTEGER NOT NULL, account VARCHAR(20) NOT NULL, amount DECIMAL(20,2) NOT NULL, CONSTRAINT jelines_pk PRIMARY KEY (id), CONSTRAINT jes_je_fk FOREIGN KEY (je) REFERENCES jes(id), CONSTRAINT jes_account_fk FOREIGN KEY (account) REFERENCES nomaccts(num));\00"
define i8* @db_create_jelines_table_sql() {
%1 = load i8*, i8** @db_create_jelines_table_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [389 x i8] c"CREATE TABLE jelines ( id INTEGER NOT NULL AUTO_INCREMENT, je INTEGER NOT NULL, account VARCHAR(20) NOT NULL, amount DECIMAL(20,2) NOT NULL, CONSTRAINT jelines_pk PRIMARY KEY (id), CONSTRAINT jes_je_fk FOREIGN KEY (je) REFERENCES jes(id), CONSTRAINT jes_account_fk FOREIGN KEY (account) REFERENCES nomaccts(num));\00"
define i8* @db_create_jelines_table_sql() {
ret i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0)
}
char dj_ready_mod(char mod_num) { return 0; }


x86 assembly (clang, -O0):
<dj_ready_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @dj_ready_mod(i8 signext %0) {
ret i8 0
}
int floatEq(float f1, float f2) {
  float delta = f1 - f2;
  delta = delta >= 0.0f ? delta : -delta;
  return (delta < 0.00001f);
}


x86 assembly (clang, -O0):
<floatEq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113d <floatEq+0x3d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1154 <floatEq+0x54>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe9a(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatEq>:
subss  %xmm1,%xmm0
movaps 0xef5(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm0,%xmm2
movss  0xee9(%rip),%xmm0
xor    %eax,%eax
ucomiss %xmm2,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @floatEq(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = fcmp oge float %9, 0.000000e+00
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load float, float* %5
br label %16
13: ; preds = %2
%14 = load float, float* %5
%15 = fneg float %14
br label %16
16: ; preds = %13, %11
%17 = phi float [ %12, %11 ], [ %15, %13 ]
store float %17, float* %5
%18 = load float, float* %5
%19 = fcmp olt float %18, 0x3EE4F8B580000000
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @floatEq(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fcmp oge float %3, 0.000000e+00
%5 = fneg float %3
%6 = select i1 %4, float %3, float %5
%7 = fcmp olt float %6, 0x3EE4F8B580000000
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int sum(int, int);
int main() { return sum(1, 10); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
mov    $0xa,%esi
jmp    1030 <sum@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 1, i32 10)
ret i32 %1
}
double ff_get_energy(struct ff *ff) {
  (void)ff;
  return (0.0);
}


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

x86 assembly (clang, -O2):
<ff_get_energy>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
%struct.ff = type opaque
define double @ff_get_energy(%struct.ff* %0) {
%2 = alloca %struct.ff*
store %struct.ff* %0, %struct.ff** %2
%3 = load %struct.ff*, %struct.ff** %2
ret double 0.000000e+00
}

LLVM IR (-O2):
%struct.ff = type opaque
define double @ff_get_energy(%struct.ff* nocapture readnone %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void log_error(char *msg, int _errno) {
  fprintf(stderr, "ERRNO %d: %s\n", _errno, msg);
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_error>:
mov    %esi,%edx
mov    %rdi,%rcx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"ERRNO %d: %s\0A\00"
define void @log_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"ERRNO %d: %s\0A\00"
define void @log_error(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
ret void
}
/* Variables and functions */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ joe_fatal(char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *stralloc(char *str) {
  char *retval;
  retval = calloc(strlen(str) + 1, 1);
  if (!retval) {
    joe_fatal("Fatal memory allocation error");
  }
  strcpy(retval, str);
  return retval;
}


x86 assembly (clang, -O0):
<stralloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1181 <stralloc+0x41>
lea    0xe84(%rip),%rdi
call   1060 <joe_fatal@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stralloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116e <stralloc+0x2e>
lea    0xe97(%rip),%rdi
call   1060 <joe_fatal@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Fatal memory allocation error\00"
define i8* @stralloc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @calloc(i64 %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = call i32 @joe_fatal(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
%13 = load i8*, i8** %3
%14 = load i8*, i8** %2
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [30 x i8] c"Fatal memory allocation error\00"
define i8* @stralloc(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @calloc(i64 %3, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @joe_fatal(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void store2(unsigned char *buf, signed short value) {
  buf[0] = value;
  buf[1] = value >> 8;
}


x86 assembly (clang, -O0):
<store2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movswl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store2>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @store2(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = trunc i16 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i16, i16* %4
%10 = sext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @store2(i8* nocapture writeonly %0, i16 signext %1) {
%3 = trunc i16 %1 to i8
store i8 %3, i8* %0
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MessageBoxX11(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 2)
    return -1;
  MessageBoxX11("QMole Message", argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     113c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <main+0x47>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <MessageBoxX11@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
jne    1131 <main+0x21>
push   %rax
mov    0x8(%rsi),%rsi
lea    0xeda(%rip),%rdi
call   1030 <MessageBoxX11@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"QMole Message\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @MessageBoxX11(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
scalar_t__ system(char *);
void write_to_disk(const char *filename, int num_blocks) {
  char buf[1024];
  snprintf(buf, 1024,
           "dd if=/dev/urandom of=test.file count=%d bs=4096 status=none",
           num_blocks);
  assert(system(buf) == 0);
}


x86 assembly (clang, -O0):
<write_to_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x400,%esi
lea    0xea8(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_disk>:
push   %rbx
sub    $0x400,%rsp
mov    %esi,%ecx
lea    0xebf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"dd if=/dev/urandom of=test.file count=%d bs=4096 status=none\00"
define void @write_to_disk(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = call i64 @system(i8* %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"dd if=/dev/urandom of=test.file count=%d bs=4096 status=none\00"
define void @write_to_disk(i8* nocapture readnone %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i64 @system(i8* %4)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ htsstr_format0(char const *, char *, char **);
char *malloc(int /*<<< orphan*/);
char *htsstr_format(const char *str, char **map) {
  char *s;
  s = malloc(htsstr_format0(str, NULL, map));
  htsstr_format0(str, s, map);
  return s;
}


x86 assembly (clang, -O0):
<htsstr_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <htsstr_format0@plt>
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <htsstr_format0@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htsstr_format>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <htsstr_format0@plt>
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
call   1040 <htsstr_format0@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @htsstr_format(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %3
%7 = load i8**, i8*** %4
%8 = call i32 @htsstr_format0(i8* %6, i8* null, i8** %7)
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %3
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
%13 = call i32 @htsstr_format0(i8* %10, i8* %11, i8** %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @htsstr_format(i8* %0, i8** %1) {
%3 = tail call i32 @htsstr_format0(i8* %0, i8* null, i8** %1)
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @htsstr_format0(i8* %0, i8* %4, i8** %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ emukb_inject(char *);
bool emukb_erase_chars(size_t n_chars) {
  int i;
  for (i = 0; i < n_chars + 1; i++) {
    emukb_inject("\b");
  }
  return true;
}


x86 assembly (clang, -O0):
<emukb_erase_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jae    1152 <emukb_erase_chars+0x42>
lea    0xec1(%rip),%rdi
call   1030 <emukb_inject@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <emukb_erase_chars+0x13>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emukb_erase_chars>:
push   %r14
push   %rbx
push   %rax
cmp    $0xffffffffffffffff,%rdi
je     113e <emukb_erase_chars+0x2e>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <emukb_inject@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <emukb_erase_chars+0x20>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\08\00"
define i32 @emukb_erase_chars(i64 %0) {
%2 = icmp eq i64 %0, -1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @emukb_inject(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = add nuw i64 %4, 1
%7 = icmp eq i64 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ DMA10_DriverIRQHandler();
__attribute__((weak)) void DMA10_IRQHandler(void) { DMA10_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @DMA10_IRQHandler() {
%1 = tail call i32 (...) @DMA10_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextlnw146(char const *);
void drawtextlnw(const char *s) { DrawTextlnw146(s); }


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

x86 assembly (clang, -O2):
<drawtextlnw>:
jmp    1030 <DrawTextlnw146@plt>

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

LLVM IR (-O2):
define void @drawtextlnw(i8* %0) {
%2 = tail call i32 @DrawTextlnw146(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ logger(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ read_uint2(char const *);
int read_mysql_short(const char *buf) {
  uint16_t num = 0;
  num = read_uint2(buf);
  logger(0, "SHORT INT: %d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<read_mysql_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_uint2@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %edi,%edi
lea    0xeb5(%rip),%rsi
call   1040 <logger@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mysql_short>:
push   %rax
call   1030 <read_uint2@plt>
lea    0xed3(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1040 <logger@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"SHORT INT: %d\0A\00"
define i32 @read_mysql_short(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @read_uint2(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @logger(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"SHORT INT: %d\0A\00"
define i32 @read_mysql_short(i8* %0) {
%2 = tail call i32 @read_uint2(i8* %0)
%3 = tail call i32 @logger(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void handSig() { exit(0); }


x86 assembly (clang, -O0):
<handSig>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @handSig() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handSig() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
float cubicIn(int, float, float, float);
float cubicOut(float fraction, float start, float delta, float slope) {
  return cubicIn(1 - fraction, start + delta, -delta, slope);
}


x86 assembly (clang, -O0):
<cubicOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xecc(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x10(%rbp),%xmm2
call   1030 <cubicIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubicOut>:
movss  0xee8(%rip),%xmm4
subss  %xmm0,%xmm4
cvttss2si %xmm4,%edi
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
xorps  0xee2(%rip),%xmm2
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <cubicIn@plt>

LLVM IR (-O0):
define float @cubicOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = fsub float 1.000000e+00, %9
%11 = fptosi float %10 to i32
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fadd float %12, %13
%15 = load float, float* %7
%16 = fneg float %15
%17 = load float, float* %8
%18 = call float @cubicIn(i32 %11, float %14, float %16, float %17)
ret float %18
}

LLVM IR (-O2):
define float @cubicOut(float %0, float %1, float %2, float %3) {
%5 = fsub float 1.000000e+00, %0
%6 = fptosi float %5 to i32
%7 = fadd float %1, %2
%8 = fneg float %2
%9 = tail call float @cubicIn(i32 %6, float %7, float %8, float %3)
ret float %9
}
int mlt_version_get_major() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mlt_version_get_major() {
ret i32 0
}
void WeaponSG552_SecondaryFire(void) {}


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

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

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

LLVM IR (-O2):
define void @WeaponSG552_SecondaryFire() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ se_write_read_bytes(char *, int, char *, int);
void se_status(void) {
  printf("Status\n");
  char cmd = 0x07;
  char in[16];
  se_write_read_bytes(&cmd, 1, in, 16);
}


x86 assembly (clang, -O0):
<se_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
movb   $0x7,-0x1(%rbp)
lea    -0x20(%rbp),%rdx
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
mov    $0x10,%ecx
call   1040 <se_write_read_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<se_status>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
movb   $0x7,0xf(%rsp)
lea    0xf(%rsp),%rdi
lea    0x10(%rsp),%rdx
mov    $0x1,%esi
mov    $0x10,%ecx
call   1040 <se_write_read_bytes@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Status\0A\00"
define void @se_status() {
%1 = alloca i8
%2 = alloca [16 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8 7, i8* %1
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @se_write_read_bytes(i8* %1, i32 1, i8* %4, i32 16)
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Status\00"
define void @se_status() {
%1 = alloca i8
%2 = alloca [16 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
store i8 7, i8* %1
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @se_write_read_bytes(i8* %1, i32 1, i8* %4, i32 16)
ret void
}
int __dst_hmac_md5_init() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @__dst_hmac_md5_init() {
ret i32 0
}
/* Type definitions */
struct string_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ string_buffer_append_chars(struct string_buffer *, char *,
                                              int);
int strlen(char *);
void string_buffer_append_string(struct string_buffer *buffer, char *string) {
  int length = strlen(string);
  string_buffer_append_chars(buffer, string, length);
}


x86 assembly (clang, -O0):
<string_buffer_append_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <string_buffer_append_chars@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_buffer_append_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <string_buffer_append_chars@plt>

LLVM IR (-O0):
%struct.string_buffer = type { i32 }
define void @string_buffer_append_string(%struct.string_buffer* %0, i8* %1) {
%3 = alloca %struct.string_buffer*
%4 = alloca i8*
%5 = alloca i32
store %struct.string_buffer* %0, %struct.string_buffer** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load %struct.string_buffer*, %struct.string_buffer** %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i32 @string_buffer_append_chars(%struct.string_buffer* %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.string_buffer = type { i32 }
define void @string_buffer_append_string(%struct.string_buffer* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @string_buffer_append_chars(%struct.string_buffer* %0, i8* %1, i32 %3)
ret void
}
void hw_driveselect() {}


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

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

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

LLVM IR (-O2):
define void @hw_driveselect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_quit();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *error) {
  display_quit();
  fprintf(stderr, "chroma: %s\n", error);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <display_quit@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <display_quit@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"chroma: %s\0A\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @display_quit()
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"chroma: %s\0A\00"
define void @fatal(i8* %0) {
%2 = tail call i32 (...) @display_quit()
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fputs(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
int fputs_jmp(const char *s, FILE *file, jmp_buf *jmp_if_error) {
  int fputs_result = fputs(s, file);
  if (fputs_result == EOF) {
    longjmp(*jmp_if_error, (!0));
  }
  return fputs_result;
}


x86 assembly (clang, -O0):
<fputs_jmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputs@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%eax
jne    1166 <fputs_jmp+0x46>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <longjmp@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs_jmp>:
push   %rbx
mov    %rdx,%rbx
call   1030 <fputs@plt>
mov    0x2eb8(%rip),%rcx
cmp    (%rcx),%eax
je     1136 <fputs_jmp+0x16>
pop    %rbx
ret
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <longjmp@plt>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fputs_jmp(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = call i32 @fputs(i8* %8, i32* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = call i32 @longjmp(i32 %16, i32 1)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fputs_jmp(i8* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = tail call i32 @fputs(i8* %0, i32* %1)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* %2
%9 = tail call i32 @longjmp(i32 %8, i32 1)
unreachable
10: ; preds = %3
ret i32 %4
}