xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_aupdate_new() {
  printf("NOT IMPLEMENTED:"
         "pa_aupdate_new"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_aupdate_new\00"
define i32 @pa_aupdate_new() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
main(void) {
  int age = 17;
  int ageday = age * 365;
  printf("Day:%d", ageday);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x11,-0x8(%rbp)
imul   $0x16d,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Day:%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 17, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 365
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Day:%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6205)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, int);
void *sqliterkOSMalloc(size_t size) { return calloc(size, sizeof(char)); }


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

x86 assembly (clang, -O2):
<sqliterkOSMalloc>:
mov    $0x1,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @sqliterkOSMalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @calloc(i64 %3, i32 1)
ret i8* %4
}

LLVM IR (-O2):
define i8* @sqliterkOSMalloc(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
ret i8* %2
}
void genlhu() {}


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

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

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

LLVM IR (-O2):
define void @genlhu() {
ret void
}
/* Variables and functions */
int memcmp(void const *, void const *, size_t);
int module_libc_memcmp(const void *s1, const void *s2, size_t n) {
  return memcmp(s1, s2, n);
}


x86 assembly (clang, -O0):
<module_libc_memcmp>:
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
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_libc_memcmp>:
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @module_libc_memcmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
char *langDbgRegsYm2413() { return "YM2413 Registers"; }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"YM2413 Registers\00"
define i8* @langDbgRegsYm2413() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_94(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 94)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_94>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x5e,%eax
jne    1144 <fn_ch_94+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_94+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_94>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x5e,%ecx
jne    1133 <fn_ch_94+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_ch_94(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @next_utf8(i8* %5, i32* %4)
%7 = icmp eq i32 %6, 94
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @fn_ch_94(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 94
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void d_start(int i) {
  time_t now;
  time(&now);
  printf("\033[1;32m"
         "thread[%d]: barrier:"
         "\033[0m"
         " starting at %s",
         i, ctime(&now));
}


x86 assembly (clang, -O0):
<d_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <ctime@plt>
mov    -0xc(%rbp),%esi
mov    %rax,%rdx
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_start>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <time@plt>
mov    %r14,%rdi
call   1030 <ctime@plt>
lea    0xeae(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1040 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\1B[1;32mthread[%d]: barrier:\1B[0m starting at %s\00"
define void @d_start(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @time(i32* %3)
%5 = load i32, i32* %2
%6 = call i8* @ctime(i32* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"\1B[1;32mthread[%d]: barrier:\1B[0m starting at %s\00"
define void @d_start(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call i8* @ctime(i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int bsr(unsigned int);
int get_gamma_code_length(unsigned int d) {
  assert(d > 0);
  int k = bsr(d);
  return (2 * k + 1);
}


x86 assembly (clang, -O0):
<get_gamma_code_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
call   1040 <bsr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_gamma_code_length>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1030 <assert@plt>
mov    %ebx,%edi
call   1040 <bsr@plt>
add    %eax,%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_gamma_code_length(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @bsr(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = mul nsw i32 2, %10
%12 = add nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_gamma_code_length(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @bsr(i32 %0)
%6 = shl nsw i32 %5, 1
%7 = or i32 %6, 1
ret i32 %7
}
/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
double runtime(void) { return (double)clock() / CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<runtime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<runtime>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @runtime() {
%1 = call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load double, double* @CLOCKS_PER_SEC
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @runtime() {
%1 = tail call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load double, double* @CLOCKS_PER_SEC
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ allmergedmarspec(int, int);
int main(int argc, char *argv[]) {
  allmergedmarspec(10, 10);
  allmergedmarspec(100, 100);
  allmergedmarspec(1000, 100);
  allmergedmarspec(10, 10000);
  allmergedmarspec(1, 100000);
  allmergedmarspec(1, 1000000);
  allmergedmarspec(1, 2000000);
  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)
mov    $0xa,%esi
mov    %esi,%edi
call   1030 <allmergedmarspec@plt>
mov    $0x64,%esi
mov    %esi,%edi
call   1030 <allmergedmarspec@plt>
mov    $0x3e8,%edi
mov    $0x64,%esi
call   1030 <allmergedmarspec@plt>
mov    $0xa,%edi
mov    $0x2710,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0x186a0,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0xf4240,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0x1e8480,%esi
call   1030 <allmergedmarspec@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0xa,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x3e8,%edi
mov    $0x64,%esi
call   1030 <allmergedmarspec@plt>
mov    $0xa,%edi
mov    $0x2710,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0x186a0,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0xf4240,%esi
call   1030 <allmergedmarspec@plt>
mov    $0x1,%edi
mov    $0x1e8480,%esi
call   1030 <allmergedmarspec@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @allmergedmarspec(i32 10, i32 10)
%7 = call i32 @allmergedmarspec(i32 100, i32 100)
%8 = call i32 @allmergedmarspec(i32 1000, i32 100)
%9 = call i32 @allmergedmarspec(i32 10, i32 10000)
%10 = call i32 @allmergedmarspec(i32 1, i32 100000)
%11 = call i32 @allmergedmarspec(i32 1, i32 1000000)
%12 = call i32 @allmergedmarspec(i32 1, i32 2000000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @allmergedmarspec(i32 10, i32 10)
%4 = tail call i32 @allmergedmarspec(i32 100, i32 100)
%5 = tail call i32 @allmergedmarspec(i32 1000, i32 100)
%6 = tail call i32 @allmergedmarspec(i32 10, i32 10000)
%7 = tail call i32 @allmergedmarspec(i32 1, i32 100000)
%8 = tail call i32 @allmergedmarspec(i32 1, i32 1000000)
%9 = tail call i32 @allmergedmarspec(i32 1, i32 2000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgldinc(void) { gen("movq\t%rax,%rdx"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"movq\09%rax,%rdx\00"
define void @cgldinc() {
%1 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"movq\09%rax,%rdx\00"
define void @cgldinc() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ native_irq_disable();
void raw_local_irq_disable(void) { native_irq_disable(); }


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

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

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

LLVM IR (-O2):
define void @raw_local_irq_disable() {
%1 = tail call i32 (...) @native_irq_disable()
ret void
}
int test_00(int a, int b, int c, int d) { return a + b + 1; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    (%rdi,%rsi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_00(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* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = add nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_00(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add i32 %0, 1
%6 = add i32 %5, %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ mouse_read(unsigned char *);
int /*<<< orphan*/ outb(int, unsigned char);
int mouse_cmd(unsigned char in, unsigned char *out) {
  int ret = -1;
  unsigned m = 0;
  outb(0xffe0, in);
  *out = 0xfe;
  do {
    if (!mouse_read(out)) {
      ret = 0;
      break;
    }
  } while (m++ < 32768U);
  return ret;
}


x86 assembly (clang, -O0):
<mouse_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0xffe0,%edi
movzbl -0x1(%rbp),%esi
call   1030 <outb@plt>
mov    -0x10(%rbp),%rax
movb   $0xfe,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <mouse_read@plt>
cmp    $0x0,%eax
jne    1173 <mouse_cmd+0x53>
movl   $0x0,-0x14(%rbp)
jmp    118e <mouse_cmd+0x6e>
jmp    1178 <mouse_cmd+0x58>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x8000,%eax
jb     1155 <mouse_cmd+0x35>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse_cmd>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%esi
mov    $0xffe0,%edi
call   1030 <outb@plt>
movb   $0xfe,(%rbx)
mov    $0x8001,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <mouse_read@plt>
test   %eax,%eax
je     1158 <mouse_cmd+0x38>
add    $0xffffffff,%ebp
jne    1140 <mouse_cmd+0x20>
mov    $0xffffffff,%eax
jmp    115a <mouse_cmd+0x3a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mouse_cmd(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i8* %1, i8** %4
store i32 -1, i32* %5
store i32 0, i32* %6
%7 = load i8, i8* %3
%8 = call i32 @outb(i32 65504, i8 zeroext %7)
%9 = load i8*, i8** %4
store i8 -2, i8* %9
br label %10
10: ; preds = %16, %2
%11 = load i8*, i8** %4
%12 = call i32 @mouse_read(i8* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %10
store i32 0, i32* %5
br label %20
15: ; preds = %10
br label %16
16: ; preds = %15
%17 = load i32, i32* %6
%18 = add i32 %17, 1
store i32 %18, i32* %6
%19 = icmp ult i32 %17, 32768
br i1 %19, label %10, label %20
20: ; preds = %16, %14
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @mouse_cmd(i8 zeroext %0, i8* %1) {
%3 = tail call i32 @outb(i32 65504, i8 zeroext %0)
store i8 -2, i8* %1
br label %4
4: ; preds = %8, %2
%5 = phi i32 [ 0, %2 ], [ %9, %8 ]
%6 = tail call i32 @mouse_read(i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, 32769
br i1 %10, label %11, label %4
11: ; preds = %4, %8
%12 = phi i32 [ -1, %8 ], [ 0, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void initnacl(void) {
  puts("hello from nacl");
  return;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"hello from nacl\00"
define void @initnacl() {
%1 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"hello from nacl\00"
define void @initnacl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long SPITXCRCGet(unsigned long ulBase) {

  ;
  return (*((volatile unsigned long *)(ulBase + 0x00000018)));
}


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

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

LLVM IR (-O0):
define i64 @SPITXCRCGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 24
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @SPITXCRCGet(i64 %0) {
%2 = add i64 %0, 24
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ brain_free_(void *);
void cont_dispose_item_(void *in_context, void *in_item) {
  if (in_item)
    brain_free_(in_item);
}


x86 assembly (clang, -O0):
<cont_dispose_item_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <cont_dispose_item_+0x24>
mov    -0x10(%rbp),%rdi
call   1030 <brain_free_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cont_dispose_item_>:
test   %rsi,%rsi
je     111d <cont_dispose_item_+0xd>
mov    %rsi,%rdi
jmp    1030 <brain_free_@plt>
ret

LLVM IR (-O0):
define void @cont_dispose_item_(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @brain_free_(i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @cont_dispose_item_(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @brain_free_(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("USAGE: sampleip [-F freq] [duration]\n");
  printf("       -F freq    # sample frequency (Hertz), default 99\n");
  printf("       duration   # sampling duration (seconds), default 5\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"USAGE: sampleip [-F freq] [duration]\0A\00"
@.str.1 = [58 x i8] c" -F freq # sample frequency (Hertz), default 99\0A\00"
@.str.2 = [60 x i8] c" duration # sampling duration (seconds), default 5\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"USAGE: sampleip [-F freq] [duration]\00"
@str.3 = [57 x i8] c" -F freq # sample frequency (Hertz), default 99\00"
@str.4 = [59 x i8] c" duration # sampling duration (seconds), default 5\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ randi(int, int);
double randd() { return ((double)randi(1, 1000)) / 1000; }


x86 assembly (clang, -O0):
<randd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1030 <randi@plt>
cvtsi2sd %rax,%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randd>:
push   %rax
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1030 <randi@plt>
cvtsi2sd %rax,%xmm0
divsd  0xed3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @randd() {
%1 = call i64 @randi(i32 1, i32 1000)
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 1.000000e+03
ret double %3
}

LLVM IR (-O2):
define double @randd() {
%1 = tail call i64 @randi(i32 1, i32 1000)
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 1.000000e+03
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: sse_level [--avx]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: sse_level [--avx]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [25 x i8] c"Usage: sse_level [--avx]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int factorial(int);
int factorial_iter(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", factorial(10));
  printf("%d\n", factorial_iter(10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <factorial@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <factorial_iter@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1030 <factorial@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <factorial_iter@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @factorial(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @factorial_iter(i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct grrr_string {
  int dummy;
};

/* Variables and functions */
struct grrr_string *_grrrs_ptr(char *s) {
  return (struct grrr_string *)(s + (-2 * sizeof(uint32_t)));
}


x86 assembly (clang, -O0):
<_grrrs_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_grrrs_ptr>:
lea    -0x8(%rdi),%rax
ret

LLVM IR (-O0):
%struct.grrr_string = type { i32 }
define %struct.grrr_string* @_grrrs_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -8
%5 = bitcast i8* %4 to %struct.grrr_string*
ret %struct.grrr_string* %5
}

LLVM IR (-O2):
%struct.grrr_string = type { i32 }
define %struct.grrr_string* @_grrrs_ptr(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to %struct.grrr_string*
ret %struct.grrr_string* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int num;
  num = 1;
  printf("I am a simple");
  printf("computer.\n");
  printf("My favorite number is %d because it is first.\n", 1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"I am a simple\00"
@.str.1 = [11 x i8] c"computer.\0A\00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"I am a simple\00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
@str = [10 x i8] c"computer.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}
float g() {
  return 123.456;
  return 42689.2;
}


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

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

LLVM IR (-O0):
define float @g() {
ret float 0x405EDD2F20000000
}

LLVM IR (-O2):
define float @g() {
ret float 0x405EDD2F20000000
}
/* Variables and functions */
int /*<<< orphan*/ print_checker();
int /*<<< orphan*/ sleep(int);
void *stat_thread(void *arg) {
  while (1) {
    sleep(1);
    print_checker();
  }
  return NULL;
}


x86 assembly (clang, -O0):
<stat_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    $0x0,%al
call   1030 <print_checker@plt>
jmp    112c <stat_thread+0xc>

x86 assembly (clang, -O2):
<stat_thread>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
call   1030 <print_checker@plt>
jmp    1130 <stat_thread+0x10>

LLVM IR (-O0):
define i8* @stat_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @sleep(i32 1)
%5 = call i32 (...) @print_checker()
br label %3
}

LLVM IR (-O2):
define noalias i8* @stat_thread(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 (...) @print_checker()
br label %2
}
__attribute__((no)) void Func2(char *x) { *x = 1; }


x86 assembly (clang, -O0):
<Func2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func2>:
movb   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @Func2(i8* nocapture writeonly %0) {
store i8 1, i8* %0
ret void
}
/* Variables and functions */
char input();
int /*<<< orphan*/ unput(char);
skipToEol() {
  char c;
  while ((c = input()) != '\n' && c != 0)
    ;
  unput(c);
}


x86 assembly (clang, -O0):
<skipToEol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <input@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x6(%rbp)
je     1150 <skipToEol+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    1160 <skipToEol+0x40>
jmp    1165 <skipToEol+0x45>
jmp    1128 <skipToEol+0x8>
movsbl -0x5(%rbp),%edi
call   1040 <unput@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipToEol>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <input@plt>
cmp    $0xa,%al
je     113f <skipToEol+0x1f>
test   %al,%al
jne    1130 <skipToEol+0x10>
movsbl %al,%edi
pop    %rax
jmp    1040 <unput@plt>

LLVM IR (-O0):
define i32 @skipToEol() {
%1 = alloca i32
%2 = alloca i8
br label %3
3: ; preds = %13, %0
%4 = call signext i8 (...) @input()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br label %11
11: ; preds = %7, %3
%12 = phi i1 [ false, %3 ], [ %10, %7 ]
br i1 %12, label %13, label %14
13: ; preds = %11
br label %3
14: ; preds = %11
%15 = load i8, i8* %2
%16 = call i32 @unput(i8 signext %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @skipToEol() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @input()
switch i8 %2, label %1 [
i8 10, label %3
i8 0, label %3
]
3: ; preds = %1, %1
%4 = tail call i32 @unput(i8 signext %2)
ret i32 undef
}
/* Type definitions */
struct NameValuePair {
  int dummy;
};

/* Variables and functions */
char *getValueForName(char *, struct NameValuePair *, int /*<<< orphan*/ *);
long strToLong(char *, long);
long getValueNumForName(char *name, struct NameValuePair *pair,
                        long defaultValue) {
  char *valueTxt = getValueForName(name, pair, NULL);
  return strToLong(valueTxt, defaultValue);
}


x86 assembly (clang, -O0):
<getValueNumForName>:
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
xor    %eax,%eax
mov    %eax,%edx
call   1040 <getValueForName@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strToLong@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getValueNumForName>:
push   %rbx
mov    %rdx,%rbx
xor    %edx,%edx
call   1040 <getValueForName@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strToLong@plt>

LLVM IR (-O0):
%struct.NameValuePair = type { i32 }
define i64 @getValueNumForName(i8* %0, %struct.NameValuePair* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca %struct.NameValuePair*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store %struct.NameValuePair* %1, %struct.NameValuePair** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load %struct.NameValuePair*, %struct.NameValuePair** %5
%10 = call i8* @getValueForName(i8* %8, %struct.NameValuePair* %9, i32* null)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i64, i64* %6
%13 = call i64 @strToLong(i8* %11, i64 %12)
ret i64 %13
}

LLVM IR (-O2):
%struct.NameValuePair = type { i32 }
define i64 @getValueNumForName(i8* %0, %struct.NameValuePair* %1, i64 %2) {
%4 = tail call i8* @getValueForName(i8* %0, %struct.NameValuePair* %1, i32* null)
%5 = tail call i64 @strToLong(i8* %4, i64 %2)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void sig_alrm(int signo) { exit(4); }


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

x86 assembly (clang, -O2):
<sig_alrm>:
push   %rax
mov    $0x4,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @sig_alrm(i32 %0) {
%2 = tail call i32 @exit(i32 4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ z80_ed_46_im_0();
void z80_ed_6e_im_0(void) { z80_ed_46_im_0(); }


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

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

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

LLVM IR (-O2):
define void @z80_ed_6e_im_0() {
%1 = tail call i32 (...) @z80_ed_46_im_0()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void idt_irq5(void) { print("IRQ 5"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"IRQ 5\00"
define void @idt_irq5() {
%1 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"IRQ 5\00"
define void @idt_irq5() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ GMP_RNDN;
int /*<<< orphan*/ mpfr_set_d(int /*<<< orphan*/, double, int /*<<< orphan*/);
void double_to_mpfr(mpfr_t rop, double dh) { mpfr_set_d(rop, dh, GMP_RNDN); }


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

x86 assembly (clang, -O2):
<double_to_mpfr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <mpfr_set_d@plt>

LLVM IR (-O0):
@GMP_RNDN = global i32 0
define void @double_to_mpfr(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load i32, i32* %3
%6 = load double, double* %4
%7 = load i32, i32* @GMP_RNDN
%8 = call i32 @mpfr_set_d(i32 %5, double %6, i32 %7)
ret void
}

LLVM IR (-O2):
@GMP_RNDN = global i32 0
define void @double_to_mpfr(i32 %0, double %1) {
%3 = load i32, i32* @GMP_RNDN
%4 = tail call i32 @mpfr_set_d(i32 %0, double %1, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *strdup(const char *s) {
  int n = strlen(s);
  char *p = (char *)malloc(n + 1);
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ _write(int, char *, int);
void _exit(int status) {
  (void)status;
  _write(1, "exit", 4);
  while (1) {
    ;
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
lea    0xed9(%rip),%rsi
mov    $0x4,%edx
call   1030 <_write@plt>
jmp    1131 <_exit+0x21>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <_write@plt>
nopw   0x0(%rax,%rax,1)
jmp    1130 <_exit+0x20>

LLVM IR (-O0):
@.str = [5 x i8] c"exit\00"
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"exit\00"
define void @_exit(i32 %0) {
%2 = tail call i32 @_write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
br label %3
3: ; preds = %1, %3
br label %3
}
void capturingNegahead2CAPTURING_NEGAHEAD() {}


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

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

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

LLVM IR (-O2):
define void @capturingNegahead2CAPTURING_NEGAHEAD() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void or_die(int cnd) {
  if (!cnd)
    exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1133 <or_die+0x23>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_die>:
test   %edi,%edi
je     1115 <or_die+0x5>
ret
push   %rax
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @or_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @or_die(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %1
ret void
}
void *curr_stkp(void) {
  void *stk;
  asm("mov %%rsp, %0" : "=r"(stk)::);
  return stk;
}


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

x86 assembly (clang, -O2):
<curr_stkp>:
mov    %rsp,%rax
ret

LLVM IR (-O0):
define i8* @curr_stkp() {
%1 = alloca i8*
%2 = call i8* asm "mov %rsp, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @curr_stkp() {
%1 = tail call i8* asm "mov %rsp, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int bsd_syscall_getsockname(int, struct sockaddr *, int /*<<< orphan*/ *);
int uptcp_getsockname(int s, struct sockaddr *asa, socklen_t *alen) {
  return bsd_syscall_getsockname(s, asa, alen);
}


x86 assembly (clang, -O0):
<uptcp_getsockname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <bsd_syscall_getsockname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptcp_getsockname>:
jmp    1030 <bsd_syscall_getsockname@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @uptcp_getsockname(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32*, i32** %6
%10 = call i32 @bsd_syscall_getsockname(i32 %7, %struct.sockaddr* %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @uptcp_getsockname(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @bsd_syscall_getsockname(i32 %0, %struct.sockaddr* %1, i32* %2)
ret i32 %4
}
double f(double x, double y, double t) { return 0.0; }


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

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

LLVM IR (-O0):
define double @f(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @f(double %0, double %1, double %2) {
ret double 0.000000e+00
}
/* Type definitions */
union i2c_smbus_data {
  int /*<<< orphan*/ byte;
};
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __s32;

/* Variables and functions */
int /*<<< orphan*/ i2c_smbus_access(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                    int, union i2c_smbus_data *);
__s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value) {
  union i2c_smbus_data data;
  data.byte = value;
  return i2c_smbus_access(file, 0, command, 2, &data);
}


x86 assembly (clang, -O0):
<i2c_smbus_write_byte_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
xor    %esi,%esi
mov    $0x2,%ecx
lea    -0x10(%rbp),%r8
call   1030 <i2c_smbus_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_write_byte_data>:
push   %rax
mov    %esi,%eax
mov    %edx,(%rsp)
mov    %rsp,%r8
xor    %esi,%esi
mov    %eax,%edx
mov    $0x2,%ecx
call   1030 <i2c_smbus_access@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_write_byte_data(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = bitcast %union.i2c_smbus_data* %7 to i32*
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @i2c_smbus_access(i32 %10, i32 0, i32 %11, i32 2, %union.i2c_smbus_data* %7)
ret i32 %12
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_write_byte_data(i32 %0, i32 %1, i32 %2) {
%4 = alloca %union.i2c_smbus_data
%5 = bitcast %union.i2c_smbus_data* %4 to i8*
%6 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %4, i64 0, i32 0
store i32 %2, i32* %6
%7 = call i32 @i2c_smbus_access(i32 %0, i32 0, i32 %1, i32 2, %union.i2c_smbus_data* %4)
ret i32 %7
}
int GetInt32PreservedEndian(const void *ptr) {
  int val;
  const unsigned char *uptr = ptr;
  val = (uptr[0] << 0) | (uptr[1] << 8) | (uptr[2] << 16) | (uptr[3] << 24);
  return val;
}


x86 assembly (clang, -O0):
<GetInt32PreservedEndian>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shl    $0x0,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetInt32PreservedEndian>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @GetInt32PreservedEndian(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}