xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ acc_device_host;
int /*<<< orphan*/ acc_device_not_host;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  acc_init(acc_device_host);
  fprintf(stderr, "CheCKpOInT\n");
  acc_shutdown(acc_device_not_host);
  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    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1050 <acc_init@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <acc_init@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@acc_device_host = global i32 0
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
@acc_device_not_host = global i32 0
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* @acc_device_host
%7 = call i32 @acc_init(i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @acc_device_not_host
%11 = call i32 @acc_shutdown(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@acc_device_host = global i32 0
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
@acc_device_not_host = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @acc_device_host
%4 = tail call i32 @acc_init(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @acc_device_not_host
%8 = tail call i32 @acc_shutdown(i32 %7)
ret i32 0
}
/* Type definitions */
struct timeval {
  int tv_sec;
  unsigned long long tv_usec;
};

/* Variables and functions */
unsigned long long int gettime(struct timeval start, struct timeval stop) {
  return (stop.tv_sec - start.tv_sec) * 1000000 + stop.tv_usec - start.tv_usec;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0xf4240,%eax,%eax
cltq
add    -0x18(%rbp),%rax
sub    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    %edi,%edx
imul   $0xf4240,%edx,%eax
cltq
sub    %rsi,%rcx
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @gettime(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = bitcast %struct.timeval* %5 to { i32, i64 }*
%8 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 0
store i32 %0, i32* %8
%9 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = bitcast %struct.timeval* %6 to { i32, i64 }*
%11 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 0
store i32 %2, i32* %11
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 1
store i64 %3, i64* %12
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = mul nsw i32 %17, 1000000
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%21 = load i64, i64* %20
%22 = add i64 %19, %21
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%24 = load i64, i64* %23
%25 = sub i64 %22, %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @gettime(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %2, %0
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = sub i64 %3, %1
%9 = add i64 %8, %7
ret i64 %9
}
int install_service(const char *self) { return (~0); }


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

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

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

LLVM IR (-O2):
define i32 @install_service(i8* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t minimum_uint32(uint32_t a, uint32_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<minimum_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <minimum_uint32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <minimum_uint32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum_uint32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @minimum_uint32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
void *array_init();
void *map_init() { return array_init(); }


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

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

LLVM IR (-O0):
define i8* @map_init() {
%1 = call i8* (...) @array_init()
ret i8* %1
}

LLVM IR (-O2):
define i8* @map_init() {
%1 = tail call i8* (...) @array_init()
ret i8* %1
}
/* Variables and functions */
scalar_t__ COND_PL();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_spl_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_PL() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_spl_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_PL@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_spl_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_PL@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_spl_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_PL()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_spl_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_PL()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ abort();
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void make_nonblocking(int s) {
  if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
    perror("make_nonblocking: fcntl");
    abort();
  }
}


x86 assembly (clang, -O0):
<make_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
call   1040 <fcntl@plt>
cmp    $0xffffffff,%eax
jne    1171 <make_nonblocking+0x41>
lea    0xe9b(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_nonblocking>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
call   1040 <fcntl@plt>
cmp    $0xffffffff,%eax
je     114f <make_nonblocking+0x1f>
pop    %rax
ret
lea    0xeaa(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str = [24 x i8] c"make_nonblocking: fcntl\00"
define void @make_nonblocking(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = call i32 @fcntl(i32 %3, i32 %4, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str = [24 x i8] c"make_nonblocking: fcntl\00"
define void @make_nonblocking(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @O_NONBLOCK
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1
ret void
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: readcdf.c,v 1.27 2011/09/28 13:30:10 christos Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [63 x i8] c"@(#)$File: readcdf.c,v 1.27 2011/09/28 13:30:10 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
struct gl_framebuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _mesa_reference_framebuffer_(struct gl_framebuffer **,
                                                struct gl_framebuffer *);
void _mesa_reference_framebuffer(struct gl_framebuffer **ptr,
                                 struct gl_framebuffer *fb) {
  if (*ptr != fb)
    _mesa_reference_framebuffer_(ptr, fb);
}


x86 assembly (clang, -O0):
<_mesa_reference_framebuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
je     113e <_mesa_reference_framebuffer+0x2e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_mesa_reference_framebuffer_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mesa_reference_framebuffer>:
cmp    %rsi,(%rdi)
je     111a <_mesa_reference_framebuffer+0xa>
jmp    1030 <_mesa_reference_framebuffer_@plt>
ret

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

LLVM IR (-O2):
%struct.gl_framebuffer = type { i32 }
define void @_mesa_reference_framebuffer(%struct.gl_framebuffer** %0, %struct.gl_framebuffer* %1) {
%3 = load %struct.gl_framebuffer*, %struct.gl_framebuffer** %0
%4 = icmp eq %struct.gl_framebuffer* %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @_mesa_reference_framebuffer_(%struct.gl_framebuffer** %0, %struct.gl_framebuffer* %1)
br label %7
7: ; preds = %5, %2
ret void
}
int *hop(int *elem) { return (int *)(elem + *elem); }


x86 assembly (clang, -O0):
<hop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hop>:
movslq (%rdi),%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i32* @hop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %3, i64 %6
ret i32* %7
}

LLVM IR (-O2):
define i32* @hop(i32* %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xd7() {
  Assert_real((isbdigit(215) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1080, ("isbdigit should be 0 for 0xd7"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x438,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd7\00"
define void @t_isbdigit_0xd7() {
%1 = tail call i64 @isbdigit(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int mkdirEx(const char *base_dir, const char *add_dir) { return -4; }


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

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

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

LLVM IR (-O2):
define i32 @mkdirEx(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -4
}
int renderHTML(char *buf, void *target) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @renderHTML(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
unsigned xrop3_235_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_235_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_235_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rdi,1),%edx
mov    %esi,%eax
shl    $0x8,%eax
xor    %eax,%ecx
or     %esi,%eax
not    %ecx
not    %eax
or     %edx,%eax
and    %ecx,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_235_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_235_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = xor i32 %4, %7
%10 = xor i32 %9, -1
%11 = xor i32 %8, -1
%12 = or i32 %5, %11
%13 = and i32 %12, %10
%14 = xor i32 %3, -1
%15 = and i32 %14, %6
%16 = or i32 %13, %15
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ SEQ_BENDER(int /*<<< orphan*/, int, int);
void seq_bender(int chn, int pitch) { SEQ_BENDER(0, chn, pitch); }


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

x86 assembly (clang, -O2):
<seq_bender>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <SEQ_BENDER@plt>

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

LLVM IR (-O2):
define void @seq_bender(i32 %0, i32 %1) {
%3 = tail call i32 @SEQ_BENDER(i32 0, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ ceil(int);
int log(double);
int valueFromBinary(int value) {
  return (int)(ceil(log((double)value) / log((double)2.)));
}


x86 assembly (clang, -O0):
<valueFromBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
call   1040 <log@plt>
mov    %eax,-0x8(%rbp)
movsd  0xec0(%rip),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valueFromBinary>:
push   %rbx
cvtsi2sd %edi,%xmm0
call   1040 <log@plt>
mov    %eax,%ebx
movsd  0xecc(%rip),%xmm0
call   1040 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%edi
pop    %rbx
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @valueFromBinary(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call i32 @log(double %4)
%6 = call i32 @log(double 2.000000e+00)
%7 = sdiv i32 %5, %6
%8 = call i64 @ceil(i32 %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @valueFromBinary(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call i32 @log(double %2)
%4 = tail call i32 @log(double 2.000000e+00)
%5 = sdiv i32 %3, %4
%6 = tail call i64 @ceil(i32 %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}
int BoundBy(int bval, int lbound, int rbound) {
  if (bval < lbound)
    return lbound;
  if (bval > rbound)
    return rbound;
  return bval;
}


x86 assembly (clang, -O0):
<BoundBy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <BoundBy+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <BoundBy+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <BoundBy+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <BoundBy+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BoundBy>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @BoundBy(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
char *langEnumControlsJoyGunStick() { return "Gun Stick"; }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Gun Stick\00"
define i8* @langEnumControlsJoyGunStick() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
void synaptics_pt_close(struct serio *port) {}


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

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

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

LLVM IR (-O2):
%struct.serio = type opaque
define void @synaptics_pt_close(%struct.serio* nocapture %0) {
ret void
}
int main() {
  int i, sum = 0;
  for (i = 1; i <= 10; i++)
    sum = sum + i;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ break_here();
void foo(void) { break_here(); }


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

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

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

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @break_here()
ret void
}
/* Variables and functions */
scalar_t__ calloc(scalar_t__, int);
scalar_t__ strlen(char *);
char *alloc_ptr(char *string) {
  return (char *)calloc(strlen(string) + 1, sizeof(char));
}


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

x86 assembly (clang, -O2):
<alloc_ptr>:
push   %rax
call   1030 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1040 <calloc@plt>

LLVM IR (-O0):
define i8* @alloc_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i64 @calloc(i64 %5, i32 1)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @alloc_ptr(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void printList(int list[], int length) {
  int i = 0;
  for (i = 0; i < length; i++) {
    printf("%3d", list[i]);
  }
  puts("");
  return;
}


x86 assembly (clang, -O0):
<printList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116e <printList+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <printList+0x1d>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printList>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1155 <printList+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printList+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%3d\00"
@.str.1 = [1 x i8] zeroinitializer
define void @printList(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%3d\00"
define void @printList(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
int f_ge_mm1(float *a1, float *a2) { return (((*a1) >= (*a2))); }


x86 assembly (clang, -O0):
<f_ge_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ge_mm1>:
movss  (%rdi),%xmm0
xor    %eax,%eax
ucomiss (%rsi),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @f_ge_mm1(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fcmp oge float %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_ge_mm1(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp oge float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int psci_acpi_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @psci_acpi_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ munmap(int /*<<< orphan*/, int);
void unmap(void) { munmap(0, 0x100000); }


x86 assembly (clang, -O0):
<unmap>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x100000,%esi
call   1030 <munmap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmap>:
xor    %edi,%edi
mov    $0x100000,%esi
jmp    1030 <munmap@plt>

LLVM IR (-O0):
define void @unmap() {
%1 = call i32 @munmap(i32 0, i32 1048576)
ret void
}

LLVM IR (-O2):
define void @unmap() {
%1 = tail call i32 @munmap(i32 0, i32 1048576)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_warning(char *);
int /*<<< orphan*/ h_free(void *);
void component_gameobject_free(void *handle) {
  if (!handle) {
    debug_warning("[component_gameobject_free] handle canont be NULL");
    return;
  }
  h_free(handle);
}


x86 assembly (clang, -O0):
<component_gameobject_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <component_gameobject_free+0x28>
lea    0xec2(%rip),%rdi
call   1040 <debug_warning@plt>
jmp    1151 <component_gameobject_free+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <h_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_gameobject_free>:
test   %rdi,%rdi
je     112a <component_gameobject_free+0xa>
jmp    1030 <h_free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <debug_warning@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"[component_gameobject_free] handle canont be NULL\00"
define void @component_gameobject_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @debug_warning(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @h_free(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"[component_gameobject_free] handle canont be NULL\00"
define void @component_gameobject_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @debug_warning(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @h_free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int pow(double, int);
double g(double x) { return (pow(1.0 + x, 20) - 1) / x - 41.6666667; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mov    $0x14,%edi
call   1030 <pow@plt>
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xede(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x14,%edi
call   1030 <pow@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  (%rsp),%xmm0
addsd  0xec1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @g(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 1.000000e+00, %3
%5 = call i32 @pow(double %4, i32 20)
%6 = sub nsw i32 %5, 1
%7 = sitofp i32 %6 to double
%8 = load double, double* %2
%9 = fdiv double %7, %8
%10 = fsub double %9, 0x4044D555559CEA87
ret double %10
}

LLVM IR (-O2):
define double @g(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = tail call i32 @pow(double %2, i32 20)
%4 = add nsw i32 %3, -1
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, %0
%7 = fadd double %6, 0xC044D555559CEA87
ret double %7
}
decode_i_p0(int a, int b) { return (a & 0xfff00000) | 1 << b; }


x86 assembly (clang, -O0):
<decode_i_p0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfff00000,%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_i_p0>:
mov    %edi,%eax
and    $0xfff00000,%eax
bts    %esi,%eax
ret

LLVM IR (-O0):
define i32 @decode_i_p0(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, -1048576
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @decode_i_p0(i32 %0, i32 %1) {
%3 = and i32 %0, -1048576
%4 = shl nuw i32 1, %1
%5 = or i32 %4, %3
ret i32 %5
}
void mbox_seq_init(struct omap_mbox *mbox) {}


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

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

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

LLVM IR (-O2):
%struct.omap_mbox = type opaque
define void @mbox_seq_init(%struct.omap_mbox* nocapture %0) {
ret void
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int c_pline() { return fputs("[F", stdout); }


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

x86 assembly (clang, -O2):
<c_pline>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[F\00"
@stdout = global i32 0
define i32 @c_pline() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[F\00"
@stdout = global i32 0
define i32 @c_pline() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int MenuFontToHandle(int);
int trap_R_Font_StrLenPixels(char const *, int, float);
int Text_Width(const char *text, float scale, int iMenuFont) {
  int iFontIndex = MenuFontToHandle(iMenuFont);
  return trap_R_Font_StrLenPixels(text, iFontIndex, scale);
}


x86 assembly (clang, -O0):
<Text_Width>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <MenuFontToHandle@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
movss  -0xc(%rbp),%xmm0
call   1040 <trap_R_Font_StrLenPixels@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Text_Width>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <MenuFontToHandle@plt>
mov    %rbx,%rdi
mov    %eax,%esi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <trap_R_Font_StrLenPixels@plt>

LLVM IR (-O0):
define i32 @Text_Width(i8* %0, float %1, i32 %2) {
%4 = alloca i8*
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @MenuFontToHandle(i32 %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = load i32, i32* %7
%12 = load float, float* %5
%13 = call i32 @trap_R_Font_StrLenPixels(i8* %10, i32 %11, float %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @Text_Width(i8* %0, float %1, i32 %2) {
%4 = tail call i32 @MenuFontToHandle(i32 %2)
%5 = tail call i32 @trap_R_Font_StrLenPixels(i8* %0, i32 %4, float %1)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ printf(char const *);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
void vtprintf(const char *module, const char *msg, va_list list) {
  printf(module);
  printf(": ");
  vprintf(msg, list);
}


x86 assembly (clang, -O0):
<vtprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <vprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vtprintf>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <vprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c": \00"
define void @vtprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @vprintf(i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c": \00"
define void @vtprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) %0)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @vprintf(i8* %1, i32 %2)
ret void
}
int test_imm_A5int32_reg(int val) { return ((val) & (0xA5 << 0)) ? -20 : -40; }


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

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

LLVM IR (-O0):
define i32 @test_imm_A5int32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 165
%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_A5int32_reg(i32 %0) {
%2 = and i32 %0, 165
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void oom_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @oom_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ conn_listen();
void comm_listen() { conn_listen(); }


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

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

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

LLVM IR (-O2):
define void @comm_listen() {
%1 = tail call i32 (...) @conn_listen()
ret void
}
int calc_f(int year, int month) {
  int f;
  if (month <= 2) {
    f = year - 1;
  } else {
    f = year;
  }
  return f;
}


x86 assembly (clang, -O0):
<calc_f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     1122 <calc_f+0x22>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <calc_f+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_f>:
mov    %edi,%eax
xor    %ecx,%ecx
cmp    $0x3,%esi
setl   %cl
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_f(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 3
%4 = sext i1 %3 to i32
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 0, d = 1;
  while (d != 0 && ++i)
    scanf("%d", &d);
  printf("%d", i - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     115e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116e <main+0x4e>
jmp    1183 <main+0x63>
lea    0xe8b(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x1,0xc(%rsp)
mov    $0xffffffff,%ebx
lea    0xec3(%rip),%r14
lea    0xc(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
add    $0x1,%ebx
cmpl   $0x0,0xc(%rsp)
jne    1150 <main+0x30>
lea    0xe94(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %5, %3 ]
%5 = add nuw nsw i32 %4, 1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int literals(void) {
  int x = 30LL;
  return x + 1;
}


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

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

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

LLVM IR (-O2):
define i32 @literals() {
ret i32 31
}
/* Variables and functions */
double drand48();
int check_percent(int percent) {
  return (drand48() < (double)(percent / 100.0));
}


x86 assembly (clang, -O0):
<check_percent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <drand48@plt>
movaps %xmm0,%xmm1
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xece(%rip),%xmm2
divsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_percent>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <drand48@plt>
cvtsi2sd %ebx,%xmm1
divsd  0xeda(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_percent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call double (...) @drand48()
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.000000e+02
%7 = fcmp olt double %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @check_percent(i32 %0) {
%2 = tail call double (...) @drand48()
%3 = sitofp i32 %0 to double
%4 = fdiv double %3, 1.000000e+02
%5 = fcmp olt double %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}