xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *realloc_or_die(void *old, size_t size) {
  void *result = realloc(old, size);
  if (!result) {
    fprintf(stderr, "Reallocation failure.");
    exit(1);
  };
  return result;
}


x86 assembly (clang, -O0):
<realloc_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <realloc_or_die+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_or_die>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <realloc_or_die+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Reallocation failure.\00"
define noalias i8* @realloc_or_die(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
void fd92(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  p01C:
    goto p01C;
    goto a;
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd92>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd92+0x7>

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

LLVM IR (-O0):
define void @fd92(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd92(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char buffer[489];
  int g;
  g = 0;
  gets(buffer);
  if (g) {
    printf("Wait aren't you supposed to be researching? Level Cleared!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1f4(%rbp)
lea    -0x1f0(%rbp),%rdi
call   1040 <gets@plt>
cmpl   $0x0,-0x1f4(%rbp)
je     1161 <main+0x41>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1f8,%rsp
mov    %rsp,%rdi
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x1f8,%rsp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"Wait aren't you supposed to be researching? Level Cleared!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [489 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = getelementptr inbounds [489 x i8], [489 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [489 x i8]
%2 = getelementptr inbounds [489 x i8], [489 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
ret i32 0
}
int __qlcnic_register_dcb(struct qlcnic_adapter *adapter) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.qlcnic_adapter = type opaque
define i32 @__qlcnic_register_dcb(%struct.qlcnic_adapter* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void leave(int n) { exit(0); }


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

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

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

LLVM IR (-O2):
define void @leave(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
void avcodec_register_all() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_register_all() {
ret void
}
/* Variables and functions */
int _err_init(char *);
int /*<<< orphan*/ _err_set_desc(char *, char *);
int /*<<< orphan*/ _err_set_flags(char *, int);
int reg_err(char *errname, char *desc, int flags) {
  int status = 0;
  status = _err_init(errname);
  if (status == 0) {
    _err_set_desc(errname, desc);
    _err_set_flags(errname, flags);
  } else {
    return status;
  }
  return status;
}


x86 assembly (clang, -O0):
<reg_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_err_init@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    117e <reg_err+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_err_set_desc@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <_err_set_flags@plt>
jmp    1189 <reg_err+0x59>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118f <reg_err+0x5f>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_err>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <_err_init@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1161 <reg_err+0x31>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <_err_set_desc@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1050 <_err_set_flags@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @reg_err(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_err_init(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @_err_set_desc(i8* %0, i8* %1)
%8 = tail call i32 @_err_set_flags(i8* %0, i32 %2)
br label %9
9: ; preds = %3, %6
ret i32 %4
}
/* Variables and functions */
char *p_bind_textdomain_codeset(char const *, char const *);
int /*<<< orphan*/ setup();
char *g_libintl_bind_textdomain_codeset(const char *domainname,
                                        const char *codeset) {
  setup();
  return p_bind_textdomain_codeset(domainname, codeset);
}


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

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

LLVM IR (-O0):
define i8* @g_libintl_bind_textdomain_codeset(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @setup()
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @p_bind_textdomain_codeset(i8* %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @g_libintl_bind_textdomain_codeset(i8* %0, i8* %1) {
%3 = tail call i32 (...) @setup()
%4 = tail call i8* @p_bind_textdomain_codeset(i8* %0, i8* %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Cmd_Argv_sv(int);
int /*<<< orphan*/ Q_strncpyz(char *, int /*<<< orphan*/, int);
void SV_Cmd_ArgvBuffer(int arg, char *buffer, int bufferLength) {
  Q_strncpyz(buffer, Cmd_Argv_sv(arg), bufferLength);
}


x86 assembly (clang, -O0):
<SV_Cmd_ArgvBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Cmd_Argv_sv@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x14(%rbp),%edx
call   1040 <Q_strncpyz@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SV_Cmd_ArgvBuffer>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <Cmd_Argv_sv@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Q_strncpyz@plt>

LLVM IR (-O0):
define void @SV_Cmd_ArgvBuffer(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 i8*, i8** %5
%8 = load i32, i32* %4
%9 = call i32 @Cmd_Argv_sv(i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @Q_strncpyz(i8* %7, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @SV_Cmd_ArgvBuffer(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @Cmd_Argv_sv(i32 %0)
%5 = tail call i32 @Q_strncpyz(i8* %1, i32 %4, i32 %2)
ret void
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int printwaitn(struct tcb *, int, int /*<<< orphan*/);
int sys_waitpid(struct tcb *tcp) { return printwaitn(tcp, 3, 0); }


x86 assembly (clang, -O0):
<sys_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <printwaitn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_waitpid>:
mov    $0x3,%esi
xor    %edx,%edx
jmp    1030 <printwaitn@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_waitpid(%struct.tcb* %0) {
%2 = tail call i32 @printwaitn(%struct.tcb* %0, i32 3, i32 0)
ret i32 %2
}
/* Variables and functions */
size_t next_prev_power_2(size_t x) {
  for (size_t i = 0, b = 1; i <= sizeof(size_t); i++, b <<= 1)
    x |= (x >> b);
  return x;
}


x86 assembly (clang, -O0):
<next_prev_power_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
cmpq   $0x8,-0x10(%rbp)
ja     1153 <next_prev_power_2+0x53>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    %cl,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <next_prev_power_2+0x18>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @next_prev_power_2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
store i64 1, i64* %4
br label %5
5: ; preds = %14, %1
%6 = load i64, i64* %3
%7 = icmp ule i64 %6, 8
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i64, i64* %2
%10 = load i64, i64* %4
%11 = lshr i64 %9, %10
%12 = load i64, i64* %2
%13 = or i64 %12, %11
store i64 %13, i64* %2
br label %14
14: ; preds = %8
%15 = load i64, i64* %3
%16 = add i64 %15, 1
store i64 %16, i64* %3
%17 = load i64, i64* %4
%18 = shl i64 %17, 1
store i64 %18, i64* %4
br label %5
19: ; preds = %5
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @next_prev_power_2(i64 %0) {
ret i64 poison
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  system(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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <system@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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @system(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @system(i8* %4)
ret i32 0
}
void async_synchronize_full_domain(struct async_domain *domain) {}


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

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

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

LLVM IR (-O2):
%struct.async_domain = type opaque
define void @async_synchronize_full_domain(%struct.async_domain* nocapture %0) {
ret void
}
int _ioSetImageWrite(int enable) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_ioSetImageWrite(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _login_usage(void) {
  fputs("Usage: "
        "login"
        " [user]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_login_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_login_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: login [user]\0A\00"
@stderr = global i32 0
define i32 @_login_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: login [user]\0A\00"
@stderr = global i32 0
define i32 @_login_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ rot13(char *, char *);
void _rot13(int *w) { rot13((char *)(w[0]), (char *)(w[2])); }


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

x86 assembly (clang, -O2):
<_rot13>:
movslq (%rdi),%rax
movslq 0x8(%rdi),%rsi
mov    %rax,%rdi
jmp    1030 <rot13@plt>

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

LLVM IR (-O2):
define void @_rot13(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @rot13(i8* %4, i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
long long strtoll(char const *, char **, int /*<<< orphan*/);
long long parse_longlong(const char *arg) {
  long long ret;
  char *s;
  ret = strtoll(arg, &s, 0);
  if (*s != '\0')
    err(1, "parse_count: unexpected character in \"%s\"\n", arg);
  return ret;
}


x86 assembly (clang, -O0):
<parse_longlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtoll@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <parse_longlong+0x44>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xea1(%rip),%rsi
call   1040 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_longlong>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtoll@plt>
mov    %rax,%r14
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     1151 <parse_longlong+0x31>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1040 <err@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [43 x i8] c"parse_count: unexpected character in \22%s\22\0A\00"
define i64 @parse_longlong(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtoll(i8* %5, i8** %4, i32 0)
store i64 %6, i64* %3
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
@.str = [43 x i8] c"parse_count: unexpected character in \22%s\22\0A\00"
define i64 @parse_longlong(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoll(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_polygons_header();
void fgmvwrite_polygons_header_() { gmvwrite_polygons_header(); }


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

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

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

LLVM IR (-O2):
define void @fgmvwrite_polygons_header_() {
%1 = tail call i32 (...) @gmvwrite_polygons_header()
ret void
}
/* Type definitions */
struct bitmask {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ numa_bitmask_free(struct bitmask *);
void numa_free_nodemask(struct bitmask *b) { numa_bitmask_free(b); }


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

x86 assembly (clang, -O2):
<numa_free_nodemask>:
jmp    1030 <numa_bitmask_free@plt>

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

LLVM IR (-O2):
%struct.bitmask = type { i32 }
define void @numa_free_nodemask(%struct.bitmask* %0) {
%2 = tail call i32 @numa_bitmask_free(%struct.bitmask* %0)
ret void
}
/* Type definitions */
struct string_s {
  int dummy;
};

/* Variables and functions */
struct string_s *string_nwrap(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
struct string_s *string_wrap(const char *cstr) {
  if (!cstr)
    return string_nwrap(NULL, 0);
  return string_nwrap(cstr, strlen(cstr));
}


x86 assembly (clang, -O0):
<string_wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <string_wrap+0x2b>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <string_nwrap@plt>
mov    %rax,-0x8(%rbp)
jmp    116b <string_wrap+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <string_nwrap@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_wrap>:
test   %rdi,%rdi
je     1139 <string_wrap+0x19>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <string_nwrap@plt>
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <string_nwrap@plt>

LLVM IR (-O0):
%struct.string_s = type { i32 }
define %struct.string_s* @string_wrap(i8* %0) {
%2 = alloca %struct.string_s*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call %struct.string_s* @string_nwrap(i8* null, i32 0)
store %struct.string_s* %7, %struct.string_s** %2
br label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = call %struct.string_s* @string_nwrap(i8* %9, i32 %11)
store %struct.string_s* %12, %struct.string_s** %2
br label %13
13: ; preds = %8, %6
%14 = load %struct.string_s*, %struct.string_s** %2
ret %struct.string_s* %14
}

LLVM IR (-O2):
%struct.string_s = type { i32 }
define %struct.string_s* @string_wrap(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call %struct.string_s* @string_nwrap(i8* null, i32 0)
br label %8
5: ; preds = %1
%6 = tail call i32 @strlen(i8* %0)
%7 = tail call %struct.string_s* @string_nwrap(i8* %0, i32 %6)
br label %8
8: ; preds = %5, %3
%9 = phi %struct.string_s* [ %7, %5 ], [ %4, %3 ]
ret %struct.string_s* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int dirfd(DIR *dir) {
  (void)dir;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @dirfd(i32* nocapture readnone %0) {
ret i32 -1
}
void swap(int **list, int i) {
  int *a = *list;
  if (a[i] > a[i + 1]) {
    int tmp = a[i + 1];
    a[i + 1] = a[i];
    a[i] = tmp;
  }
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1173 <swap+0x73>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%rax
movslq %esi,%rcx
mov    (%rax,%rcx,4),%edx
mov    0x4(%rax,%rcx,4),%esi
cmp    %esi,%edx
jle    111b <swap+0x1b>
lea    0x1(%rcx),%rdi
mov    %edx,(%rax,%rdi,4)
mov    %esi,(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @swap(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
%7 = load i32**, i32*** %3
%8 = load i32*, i32** %7
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
%19 = load i32, i32* %18
%20 = icmp sgt i32 %13, %19
br i1 %20, label %21, label %43
21: ; preds = %2
%22 = load i32*, i32** %5
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %22, i64 %25
%27 = load i32, i32* %26
store i32 %27, i32* %6
%28 = load i32*, i32** %5
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
%32 = load i32, i32* %31
%33 = load i32*, i32** %5
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32, i32* %33, i64 %36
store i32 %32, i32* %37
%38 = load i32, i32* %6
%39 = load i32*, i32** %5
%40 = load i32, i32* %4
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %39, i64 %41
store i32 %38, i32* %42
br label %43
43: ; preds = %21, %2
ret void
}

LLVM IR (-O2):
define void @swap(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %3, i64 %4
%6 = load i32, i32* %5
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = load i32, i32* %9
%11 = icmp sgt i32 %6, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 %6, i32* %9
store i32 %10, i32* %5
br label %13
13: ; preds = %12, %2
ret void
}
void exynos4_default_sdhci3(void) {}


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

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

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

LLVM IR (-O2):
define void @exynos4_default_sdhci3() {
ret void
}
int Mix_InitMP3() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Mix_InitMP3() {
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, int);
void *Malloc(size_t size) {
  void *buffer;
  buffer = calloc(size, 1);
  return (buffer);
}


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

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

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

LLVM IR (-O2):
define i8* @Malloc(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
double *mk_farr_from_iarr(int *, int);
int /*<<< orphan*/ spr_indices_sort_realnums(double *, int, int *);
void spr_indices_sort_integers(int *iarr, int size, int *indices) {
  double *farr = mk_farr_from_iarr(iarr, size);
  spr_indices_sort_realnums(farr, size, indices);
  free(farr);
}


x86 assembly (clang, -O0):
<spr_indices_sort_integers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <mk_farr_from_iarr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <spr_indices_sort_realnums@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spr_indices_sort_integers>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
call   1050 <mk_farr_from_iarr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1040 <spr_indices_sort_realnums@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @spr_indices_sort_integers(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca double*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = call double* @mk_farr_from_iarr(i32* %8, i32 %9)
store double* %10, double** %7
%11 = load double*, double** %7
%12 = load i32, i32* %5
%13 = load i32*, i32** %6
%14 = call i32 @spr_indices_sort_realnums(double* %11, i32 %12, i32* %13)
%15 = load double*, double** %7
%16 = call i32 @free(double* %15)
ret void
}

LLVM IR (-O2):
define void @spr_indices_sort_integers(i32* %0, i32 %1, i32* %2) {
%4 = tail call double* @mk_farr_from_iarr(i32* %0, i32 %1)
%5 = tail call i32 @spr_indices_sort_realnums(double* %4, i32 %1, i32* %2)
%6 = tail call i32 @free(double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ flush_binlog_ts();
int /*<<< orphan*/ printf(char *);
void sigint_handler(const int sig) {
  printf("SIGINT handled.\n");
  flush_binlog_ts();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <flush_binlog_ts@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"SIGINT handled.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @flush_binlog_ts()
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [16 x i8] c"SIGINT handled.\00"
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @flush_binlog_ts()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void chaz_ConfWriterPerl_add_sys_include(const char *header) { (void)header; }


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriterPerl_add_sys_include(i8* nocapture %0) {
ret void
}
void fzz_deinit() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_collapse_row() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vcpuinsInit();
void vcpuInit() { vcpuinsInit(); }


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

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

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

LLVM IR (-O2):
define void @vcpuInit() {
%1 = tail call i32 (...) @vcpuinsInit()
ret void
}
/* Variables and functions */
int baz();
void qux(int x) {
  if ((x == baz()))
    return;
}


x86 assembly (clang, -O0):
<qux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <baz@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
jne    113a <qux+0x2a>
jmp    113a <qux+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @qux(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @baz()
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @qux(i32 %0) {
%2 = tail call i32 (...) @baz()
ret void
}
/* Variables and functions */
char *enstrdup(int, char const *);
char *estrdup(const char *s) { return enstrdup(1, s); }


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

x86 assembly (clang, -O2):
<estrdup>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <enstrdup@plt>

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

LLVM IR (-O2):
define i8* @estrdup(i8* %0) {
%2 = tail call i8* @enstrdup(i32 1, i8* %0)
ret i8* %2
}
/* Variables and functions */
long strtoul(char const *, char **, unsigned int);
long strtol(const char *cp, char **endp, unsigned int base) {
  if (*cp == '-')
    return -strtoul(cp + 1, endp, base);
  return strtoul(cp, endp, base);
}


x86 assembly (clang, -O0):
<strtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1158 <strtol+0x48>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strtoul@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116c <strtol+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strtoul@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtol>:
push   %rax
cmpb   $0x2d,(%rdi)
jne    1124 <strtol+0x14>
add    $0x1,%rdi
call   1030 <strtoul@plt>
neg    %rax
pop    %rcx
ret
pop    %rax
jmp    1030 <strtoul@plt>

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

LLVM IR (-O2):
define i64 @strtol(i8* %0, i8** nocapture %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i64 @strtoul(i8* %7, i8** %1, i32 %2)
%9 = sub nsw i64 0, %8
br label %12
10: ; preds = %3
%11 = tail call i64 @strtoul(i8* %0, i8** %1, i32 %2)
br label %12
12: ; preds = %10, %6
%13 = phi i64 [ %9, %6 ], [ %11, %10 ]
ret i64 %13
}
int test_imm_EDint8_mem(signed char *val) {
  return ((*val) & (-0xED << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EDint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff13,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EDint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff13,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EDint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -237
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
int test_imm_FAint16_reg(short val) {
  return ((val) & (-0xFA << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FAint16_reg>:
test   $0xff06,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FAint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -250
%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_FAint16_reg(i16 signext %0) {
%2 = and i16 %0, -250
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *GenreCode(unsigned char);
char *genre_string(unsigned char code) {
  if (code < 0x20)
    return "";
  if (code > 0xad)
    return "";
  return GenreCode(code - 0x20);
}


x86 assembly (clang, -O0):
<genre_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x20,%eax
jge    113b <genre_string+0x2b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <genre_string+0x5d>
movzbl -0x9(%rbp),%eax
cmp    $0xad,%eax
jle    115a <genre_string+0x4a>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <genre_string+0x5d>
movzbl -0x9(%rbp),%eax
sub    $0x20,%eax
movzbl %al,%edi
call   1030 <GenreCode@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genre_string>:
lea    0x52(%rdi),%eax
cmp    $0x72,%al
jae    111f <genre_string+0xf>
lea    0xee2(%rip),%rax
ret
add    $0xe0,%dil
movzbl %dil,%edi
jmp    1030 <GenreCode@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @genre_string(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp sgt i32 %10, 173
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
13: ; preds = %8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = sub nsw i32 %15, 32
%17 = trunc i32 %16 to i8
%18 = call i8* @GenreCode(i8 zeroext %17)
store i8* %18, i8** %2
br label %19
19: ; preds = %13, %12, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @genre_string(i8 zeroext %0) {
%2 = add i8 %0, 82
%3 = icmp ult i8 %2, 114
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = add i8 %0, -32
%6 = tail call i8* @GenreCode(i8 zeroext %5)
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage_message(char *exec_name) {
  fprintf(stderr, "Usage %s [-h] [-@ flag ...] program.hal\n", exec_name);
}


x86 assembly (clang, -O0):
<usage_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage_message>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage %s [-h] [-@ flag ...] program.hal\0A\00"
define void @usage_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage %s [-h] [-@ flag ...] program.hal\0A\00"
define void @usage_message(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void __DELETE_java_lang_ThreadGroup(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_ThreadGroup(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reader_enable();
void readerInit() { reader_enable(); }


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

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

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

LLVM IR (-O2):
define void @readerInit() {
%1 = tail call i32 (...) @reader_enable()
ret void
}
int mkstemp(path)
char *path;
{
  int fd;
  return (_gettemp(path, &fd, 0, 0) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <_gettemp@plt>
cmp    $0x0,%eax
je     1143 <mkstemp+0x33>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <mkstemp+0x40>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <mkstemp+0x40>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <_gettemp@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, i32, i32, ...)*)(i8* %4, i32* %3, i32 0, i32 0)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ -1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %2, i32 0, i32 0)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}