xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ is_literali(char *, char const *, char const *);
int scan_boolean(const char *str, const char *strend) {
  if (is_literali("false", str, strend))
    return 0;
  if (is_literali("true", str, strend))
    return 1;
  return -1;
}


x86 assembly (clang, -O0):
<scan_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <is_literali@plt>
cmp    $0x0,%rax
je     114a <scan_boolean+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    117b <scan_boolean+0x6b>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xead(%rip),%rdi
call   1030 <is_literali@plt>
cmp    $0x0,%rax
je     1174 <scan_boolean+0x64>
movl   $0x1,-0x4(%rbp)
jmp    117b <scan_boolean+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_boolean>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <is_literali@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1151 <scan_boolean+0x41>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <is_literali@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i32 @scan_boolean(i8* %0, i8* %1) {
%3 = tail call i64 @is_literali(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @is_literali(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i32 -1, i32 1
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
void ERR_peek_last_error_line(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_peek_last_error_line() {
ret void
}
int char_to_inc(char c) {
  switch (c) {
  case 'N':
    return 0;
    break;
  case 'E':
    return 1;
    break;
  case 'S':
    return 2;
    break;
  case 'W':
    return 3;
    break;
  default:
    return -1;
    break;
  }
  return -1;
}


x86 assembly (clang, -O0):
<char_to_inc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x12,%eax
ja     1164 <char_to_inc+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    116b <char_to_inc+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    116b <char_to_inc+0x6b>
movl   $0x2,-0x4(%rbp)
jmp    116b <char_to_inc+0x6b>
movl   $0x3,-0x4(%rbp)
jmp    116b <char_to_inc+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_to_inc>:
add    $0xffffffbb,%edi
cmp    $0x12,%edi
ja     1120 <char_to_inc+0x20>
xor    %eax,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @char_to_inc(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 78, label %6
i32 69, label %7
i32 83, label %8
i32 87, label %9
]
6: ; preds = %1
store i32 0, i32* %2
br label %11
7: ; preds = %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
store i32 2, i32* %2
br label %11
9: ; preds = %1
store i32 3, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @char_to_inc(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 78, label %7
i32 69, label %3
i32 83, label %4
i32 87, label %5
]
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3
%8 = phi i32 [ -1, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %8
}
const char *zlibVersion() { return "1.0.4"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.0.4\00"
define i8* @zlibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void foo227(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo227(i32 %0) {
ret void
}
void *atomic_ptr_swap(void **ptr, void *new) {
  void *old;
  __asm__ volatile("lock xchg %2, %0"
                   : "=r"(old), "=m"(*ptr)
                   : "m"(*ptr), "0"(new));
  return old;
}


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

x86 assembly (clang, -O2):
<atomic_ptr_swap>:
mov    %rsi,%rax
lock xchg %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @atomic_ptr_swap(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*** %3
%8 = load i8*, i8** %4
%9 = call i8* asm sideeffect "lock xchg $2, $0", "=r,=*m,*m,0,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %6, i8** elementtype(i8*) %7, i8* %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define i8* @atomic_ptr_swap(i8** %0, i8* %1) {
%3 = tail call i8* asm sideeffect "lock xchg $2, $0", "=r,=*m,*m,0,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8** elementtype(i8*) %0, i8* %1)
ret i8* %3
}
void task_suspend(void) {}


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

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

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

LLVM IR (-O2):
define void @task_suspend() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_die(char *, char *, int);
int main(int argc, char **argv) {
  OPENSSL_die("Voluntary abort",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/FriendSoftwareLabs/friendup/refs/"
              "heads/master/libs-ext/openssl/test/aborttest.c",
              14);
  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)
lea    0xed3(%rip),%rdi
lea    0xedc(%rip),%rsi
mov    $0xe,%edx
call   1030 <OPENSSL_die@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef1(%rip),%rsi
mov    $0xe,%edx
call   1030 <OPENSSL_die@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Voluntary abort\00"
@.str.1 = [170 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FriendSoftwareLabs/friendup/refs/heads/master/libs-ext/openssl/test/aborttest.c\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 = call i32 @OPENSSL_die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str.1, i64 0, i64 0), i32 14)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Voluntary abort\00"
@.str.1 = [170 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FriendSoftwareLabs/friendup/refs/heads/master/libs-ext/openssl/test/aborttest.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @OPENSSL_die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str.1, i64 0, i64 0), i32 14)
ret i32 0
}
/* Variables and functions */
int gob_encode_unsigned_long_long(char *, size_t, unsigned long long);
int gob_encode_long_long(char *buf, size_t buf_size, long long i) {
  unsigned long long u;
  if (i < 0) {
    u = (~i << 1) | 1;
  } else {
    u = (i << 1);
  }
  return gob_encode_unsigned_long_long(buf, buf_size, u);
}


x86 assembly (clang, -O0):
<gob_encode_long_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1148 <gob_encode_long_long+0x38>
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
shl    $0x1,%rax
or     $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1154 <gob_encode_long_long+0x44>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <gob_encode_unsigned_long_long@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_encode_long_long>:
lea    (%rdx,%rdx,1),%rax
test   %rdx,%rdx
not    %rdx
lea    0x1(%rdx,%rdx,1),%rdx
cmovns %rax,%rdx
jmp    1030 <gob_encode_unsigned_long_long@plt>

LLVM IR (-O0):
define i32 @gob_encode_long_long(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i64, i64* %6
%12 = xor i64 %11, -1
%13 = shl i64 %12, 1
%14 = or i64 %13, 1
store i64 %14, i64* %7
br label %18
15: ; preds = %3
%16 = load i64, i64* %6
%17 = shl i64 %16, 1
store i64 %17, i64* %7
br label %18
18: ; preds = %15, %10
%19 = load i8*, i8** %4
%20 = load i64, i64* %5
%21 = load i64, i64* %7
%22 = call i32 @gob_encode_unsigned_long_long(i8* %19, i64 %20, i64 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @gob_encode_long_long(i8* %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %2, 0
%5 = xor i64 %2, -1
%6 = shl i64 %5, 1
%7 = or i64 %6, 1
%8 = shl i64 %2, 1
%9 = select i1 %4, i64 %7, i64 %8
%10 = tail call i32 @gob_encode_unsigned_long_long(i8* %0, i64 %1, i64 %9)
ret i32 %10
}
int test_imm_99int32_reg(int val) { return ((val) & (0x99 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_99int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x99,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_99int32_reg>:
test   $0x99,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_99int32_reg(i32 %0) {
%2 = and i32 %0, 153
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_27uint16_reg(unsigned short val) {
  return ((val) & (0x27 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_27uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x27,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_27uint16_reg>:
test   $0x27,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_27uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 39
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ tick();
void animate(void) {
  tick();
  glutPostRedisplay();
}


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

x86 assembly (clang, -O2):
<animate>:
push   %rax
xor    %eax,%eax
call   1030 <tick@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glutPostRedisplay@plt>

LLVM IR (-O0):
define void @animate() {
%1 = call i32 (...) @tick()
%2 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @animate() {
%1 = tail call i32 (...) @tick()
%2 = tail call i32 (...) @glutPostRedisplay()
ret void
}
int my_hash_equal(const void *a, const void *b) {
  return *((const int *)a) == *((const int *)b);
}


x86 assembly (clang, -O0):
<my_hash_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_hash_equal>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @my_hash_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_hash_equal(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ McResCtrl_ReleasePacketBuf();
void McDevIf_ReleasePacketBuf(void) { McResCtrl_ReleasePacketBuf(); }


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

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

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

LLVM IR (-O2):
define void @McDevIf_ReleasePacketBuf() {
%1 = tail call i32 (...) @McResCtrl_ReleasePacketBuf()
ret void
}
void freeCBR_nowait(unsigned int a) {}


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

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

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

LLVM IR (-O2):
define void @freeCBR_nowait(i32 %0) {
ret void
}
/* Variables and functions */
long double cosl(long double);
long double libm_cosl(long double x) { return cosl(x); }


x86 assembly (clang, -O0):
<libm_cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <cosl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libm_cosl>:
jmp    1030 <cosl@plt>

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

LLVM IR (-O2):
define x86_fp80 @libm_cosl(x86_fp80 %0) {
%2 = tail call x86_fp80 @cosl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int __sys_lseek(int, int, int);
int lseek(int file, int ptr, int dir) { return __sys_lseek(file, ptr, dir); }


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <__sys_lseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
jmp    1030 <__sys_lseek@plt>

LLVM IR (-O0):
define i32 @lseek(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 @__sys_lseek(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__sys_lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pioneer_read_string(unsigned char *, int,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ pioneer_send_command0(int);
int /*<<< orphan*/ printf(char *);
int pioneer_sync1(void) {
  unsigned char buf[256];
  pioneer_send_command0(1);
  pioneer_read_string(buf, 5, NULL);
  if (buf[0] != 1) {
    printf("Could not SYNC1\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<pioneer_sync1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    $0x1,%edi
call   1050 <pioneer_send_command0@plt>
lea    -0x110(%rbp),%rdi
mov    $0x5,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <pioneer_read_string@plt>
movzbl -0x110(%rbp),%eax
cmp    $0x1,%eax
je     1182 <pioneer_sync1+0x52>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1189 <pioneer_sync1+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pioneer_sync1>:
push   %rbx
sub    $0x100,%rsp
mov    $0x1,%edi
call   1050 <pioneer_send_command0@plt>
xor    %ebx,%ebx
mov    %rsp,%rdi
mov    $0x5,%esi
xor    %edx,%edx
call   1040 <pioneer_read_string@plt>
cmpb   $0x1,(%rsp)
je     116a <pioneer_sync1+0x3a>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Could not SYNC1\0A\00"
define i32 @pioneer_sync1() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = call i32 @pioneer_send_command0(i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = call i32 @pioneer_read_string(i8* %4, i32 5, i32* null)
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %13
12: ; preds = %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@str = [16 x i8] c"Could not SYNC1\00"
define i32 @pioneer_sync1() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @pioneer_send_command0(i32 1)
%4 = call i32 @pioneer_read_string(i8* %2, i32 5, i32* null)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = phi i32 [ -1, %7 ], [ 0, %0 ]
ret i32 %10
}
ClrEoln() {}


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

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

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

LLVM IR (-O2):
define i32 @ClrEoln() {
ret i32 undef
}
/* Variables and functions */
int tempered_type_hid_exit(char **);
bool temper_type_exit(char **error) { return tempered_type_hid_exit(error); }


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

x86 assembly (clang, -O2):
<temper_type_exit>:
jmp    1030 <tempered_type_hid_exit@plt>

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

LLVM IR (-O2):
define i32 @temper_type_exit(i8** %0) {
%2 = tail call i32 @tempered_type_hid_exit(i8** %0)
ret i32 %2
}
/* Variables and functions */
size_t strnlen(char *, size_t);
const char *find_argv0(char *buf, size_t num_read) {
  size_t argv0_len = strnlen(buf, num_read);
  if (argv0_len == num_read) {
    return NULL;
  }
  return buf;
}


x86 assembly (clang, -O0):
<find_argv0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strnlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    114c <find_argv0+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    1154 <find_argv0+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_argv0>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strnlen@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
cmovne %r14,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @find_argv0(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = call i64 @strnlen(i8* %7, i64 %8)
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = load i64, i64* %5
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i8* null, i8** %3
br label %16
14: ; preds = %2
%15 = load i8*, i8** %4
store i8* %15, i8** %3
br label %16
16: ; preds = %14, %13
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @find_argv0(i8* %0, i64 %1) {
%3 = tail call i64 @strnlen(i8* %0, i64 %1)
%4 = icmp eq i64 %3, %1
%5 = select i1 %4, i8* null, i8* %0
ret i8* %5
}
/* Variables and functions */
int __syscall(int, int, void const *, int);
int write(int fd, const void *p, int size) { return __syscall(1, fd, p, size); }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
call   1030 <__syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <__syscall@plt>

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @__syscall(i32 1, i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dodir(char *, int);
int DOllist(void) { dodir(".", 1); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @DOllist() {
%1 = tail call i32 @dodir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ jv_mem_free(void *);
void jq_yyfree(void *p, void *extra) { jv_mem_free(p); }


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

x86 assembly (clang, -O2):
<jq_yyfree>:
jmp    1030 <jv_mem_free@plt>

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

LLVM IR (-O2):
define void @jq_yyfree(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @jv_mem_free(i8* %0)
ret void
}
void nsa325_dt_init(void) {}


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

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

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

LLVM IR (-O2):
define void @nsa325_dt_init() {
ret void
}
unsigned char bcdToDec(unsigned char val) {
  return ((val / 16 * 10) + (val % 16));
}


x86 assembly (clang, -O0):
<bcdToDec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
imul   $0xa,%eax,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
add    %edx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcdToDec>:
mov    %edi,%eax
shr    $0x4,%al
movzbl %al,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%dil
add    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @bcdToDec(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sdiv i32 %4, 16
%6 = mul nsw i32 %5, 10
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = srem i32 %8, 16
%10 = add nsw i32 %6, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @bcdToDec(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = mul nuw i8 %2, 10
%4 = and i8 %0, 15
%5 = add nuw i8 %3, %4
ret i8 %5
}
void sock_Shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @sock_Shutdown() {
ret void
}
void *func(void *ar) {
  int *myar = (int *)ar;
  for (int i = 0; i < 10000000; i++) {
    myar[0]++;
    myar[1]++;
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x989680,-0x1c(%rbp)
jge    114a <func+0x4a>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <func+0x17>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
addl   $0x989680,(%rdi)
addl   $0x989680,0x4(%rdi)
ret

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

LLVM IR (-O2):
define noalias i8* @func(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %2
%6 = load i32, i32* %4
%7 = add i32 %5, 10000000
%8 = add i32 %6, 10000000
store i32 %7, i32* %2
store i32 %8, i32* %4
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
struct tm *update_time(struct tm *old_time) {
  time_t sttime;
  sttime = mktime(old_time);
  return localtime(&sttime);
}


x86 assembly (clang, -O0):
<update_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mktime@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_time>:
push   %rax
call   1040 <mktime@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @update_time(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
store %struct.tm* %0, %struct.tm** %2
%4 = load %struct.tm*, %struct.tm** %2
%5 = call i32 @mktime(%struct.tm* %4)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
ret %struct.tm* %6
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @update_time(%struct.tm* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @mktime(%struct.tm* %0)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
ret %struct.tm* %5
}
int _get_int_len(int n) {
  int i;
  for (i = 1; n /= 10; i++) {
    ;
  }
  return i;
}


x86 assembly (clang, -O0):
<_get_int_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1138 <_get_int_len+0x38>
jmp    112a <_get_int_len+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_get_int_len+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_int_len>:
lea    0x9(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x13,%ecx
jb     1145 <_get_int_len+0x45>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
lea    (%rcx,%rdx,1),%edi
add    $0x1,%eax
add    %edx,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1120 <_get_int_len+0x20>
ret

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

LLVM IR (-O2):
define i32 @_get_int_len(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = add nsw i32 %7, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
void delete_mob(void) {}


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

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

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

LLVM IR (-O2):
define void @delete_mob() {
ret void
}
int __attribute__((const)) qux(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @qux() {
ret i32 4
}

LLVM IR (-O2):
define i32 @qux() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "Incorrect number of arguments, got %i\n", argc);
    return 1;
  }
  puts(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     1164 <main+0x44>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1178 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %edi,%edx
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Incorrect number of arguments, got %i\0A\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 %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i32, i32* %4
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 1, i32* %3
br label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @puts(i8* %15)
store i32 0, i32* %3
br label %17
17: ; preds = %12, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Incorrect number of arguments, got %i\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ao();
int /*<<< orphan*/ mav(int, int);
int /*<<< orphan*/ msleep(int);
int main() {
  mav(0, 1000);
  mav(2, 1000);
  msleep(4000);
  ao();
  mav(0, 1000);
  mav(2, 500);
  msleep(5000);
  ao();
  mav(0, 1000);
  mav(2, 1000);
  msleep(3000);
  ao();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0xfa0,%edi
call   1030 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1040 <mav@plt>
mov    $0x1388,%edi
call   1030 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0xbb8,%edi
call   1030 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0xfa0,%edi
call   1030 <msleep@plt>
xor    %eax,%eax
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1040 <mav@plt>
mov    $0x1388,%edi
call   1030 <msleep@plt>
xor    %eax,%eax
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0xbb8,%edi
call   1030 <msleep@plt>
xor    %eax,%eax
call   1050 <ao@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @mav(i32 0, i32 1000)
%3 = call i32 @mav(i32 2, i32 1000)
%4 = call i32 @msleep(i32 4000)
%5 = call i32 (...) @ao()
%6 = call i32 @mav(i32 0, i32 1000)
%7 = call i32 @mav(i32 2, i32 500)
%8 = call i32 @msleep(i32 5000)
%9 = call i32 (...) @ao()
%10 = call i32 @mav(i32 0, i32 1000)
%11 = call i32 @mav(i32 2, i32 1000)
%12 = call i32 @msleep(i32 3000)
%13 = call i32 (...) @ao()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mav(i32 0, i32 1000)
%2 = tail call i32 @mav(i32 2, i32 1000)
%3 = tail call i32 @msleep(i32 4000)
%4 = tail call i32 (...) @ao()
%5 = tail call i32 @mav(i32 0, i32 1000)
%6 = tail call i32 @mav(i32 2, i32 500)
%7 = tail call i32 @msleep(i32 5000)
%8 = tail call i32 (...) @ao()
%9 = tail call i32 @mav(i32 0, i32 1000)
%10 = tail call i32 @mav(i32 2, i32 1000)
%11 = tail call i32 @msleep(i32 3000)
%12 = tail call i32 (...) @ao()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ REG_UART_BASE(scalar_t__);
__attribute__((always_)) __attribute__((flatten)) uint32_t
UART_STATUS(uint32_t i) {
  return (REG_UART_BASE(i) + 0x1c);
}


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

x86 assembly (clang, -O2):
<UART_STATUS>:
push   %rax
call   1030 <REG_UART_BASE@plt>
add    $0x1c,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @UART_STATUS(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @REG_UART_BASE(i64 %3)
%5 = add nsw i64 %4, 28
ret i64 %5
}

LLVM IR (-O2):
define i64 @UART_STATUS(i64 %0) {
%2 = tail call i64 @REG_UART_BASE(i64 %0)
%3 = add nsw i64 %2, 28
ret i64 %3
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int, int, int);
int play_attack_defend_n(int, int, int, int, int);
int autohelperowl_attackpat261(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(2, 1, move, transformation);
  return play_attack_defend_n(color, 1, 1, a, a);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat261>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <play_attack_defend_n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat261>:
push   %rbx
mov    %ecx,%ebx
mov    %esi,%ecx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <offset@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %eax,%ecx
mov    %eax,%r8d
pop    %rbx
jmp    1030 <play_attack_defend_n@plt>

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat261(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 2, i32 1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %9
%19 = load i32, i32* %11
%20 = load i32, i32* %11
%21 = call i32 @play_attack_defend_n(i32 %18, i32 1, i32 1, i32 %19, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat261(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 2, i32 1, i32 %2, i32 %1)
%7 = tail call i32 @play_attack_defend_n(i32 %3, i32 1, i32 1, i32 %6, i32 %6)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int getc(int /*<<< orphan*/ *);
void echo2file(FILE *in, FILE *out) {
  int p1;
  while ((p1 = getc(in)) != EOF)
    fprintf(out, "%c", p1);
}


x86 assembly (clang, -O0):
<echo2file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <echo2file+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xea7(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1130 <echo2file+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo2file>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <getc@plt>
mov    0x2eb1(%rip),%r15
cmp    (%r15),%eax
je     1157 <echo2file+0x37>
nopl   0x0(%rax)
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    (%r15),%eax
jne    1140 <echo2file+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define void @echo2file(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @fputc(i32 %7, i32* %1)
%9 = tail call i32 @getc(i32* %0)
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
int test_imm_49int8_reg(signed char val) {
  return ((val) & (0x49 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_49int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x49,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_49int8_reg>:
test   $0x49,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_49int8_reg(i8 signext %0) {
%2 = and i8 %0, 73
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
long double dfoo2(double *db1) { return *db1; }


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

x86 assembly (clang, -O2):
<dfoo2>:
fldl   (%rdi)
ret

LLVM IR (-O0):
define x86_fp80 @dfoo2(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fpext double %4 to x86_fp80
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @dfoo2(double* nocapture %0) {
%2 = load double, double* %0
%3 = fpext double %2 to x86_fp80
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNC_8() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(8);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNC_8>:
push   %rax
mov    $0x8,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNC_8() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 8)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNC_8() {
%1 = tail call i32 @BNCIO(i32 8)
ret i32 99
}
int bar() {
  int i = 1;
  int j;
  if (1 == i)
    return j;
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    1124 <bar+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112b <bar+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_WRLCK;
int fd_get_lock(int, int /*<<< orphan*/, int /*<<< orphan*/);
int fd_get_write_lock(int fd) { return (fd_get_lock(fd, F_SETLK, F_WRLCK)); }


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

x86 assembly (clang, -O2):
<fd_get_write_lock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fd_get_lock@plt>

LLVM IR (-O0):
@F_SETLK = global i32 0
@F_WRLCK = global i32 0
define i32 @fd_get_write_lock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETLK
%5 = load i32, i32* @F_WRLCK
%6 = call i32 @fd_get_lock(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@F_SETLK = global i32 0
@F_WRLCK = global i32 0
define i32 @fd_get_write_lock(i32 %0) {
%2 = load i32, i32* @F_SETLK
%3 = load i32, i32* @F_WRLCK
%4 = tail call i32 @fd_get_lock(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
void foo_1_2_1_2_2_1_2_1_2() {}


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

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

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

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