xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int s;
  s = socket(AF_INET, SOCK_STREAM, 0);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @AF_INET
%8 = load i32, i32* @SOCK_STREAM
%9 = call i32 @socket(i32 %7, i32 %8, i32 0)
store i32 %9, i32* %6
ret i32 0
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @AF_INET
%4 = load i32, i32* @SOCK_STREAM
%5 = tail call i32 @socket(i32 %3, i32 %4, i32 0)
ret i32 0
}
void murder_stack(unsigned int depth) {
  if (!depth)
    return;
  murder_stack(depth - 1);
}


x86 assembly (clang, -O0):
<murder_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <murder_stack+0x1a>
jmp    1135 <murder_stack+0x25>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <murder_stack@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @murder_stack(i32 %0) {
ret void
}
int main(void) {
  for (;;)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <main+0xb>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("xterm -e './ifme --gui'");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"xterm -e './ifme --gui'\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"xterm -e './ifme --gui'\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void get_ctrlC(int sig_num) {
  printf("Detected Ctrl+c\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<get_ctrlC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ctrlC>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Detected Ctrl+c\0A\00"
@stdout = global i32 0
define void @get_ctrlC(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 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [16 x i8] c"Detected Ctrl+c\00"
define void @get_ctrlC(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vle_compl_reset();
void teardown(void) { vle_compl_reset(); }


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

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

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

LLVM IR (-O2):
define void @teardown() {
%1 = tail call i32 (...) @vle_compl_reset()
ret void
}
void ff_hevc_put_hevc_uni_pel_pixels32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_bss();
int /*<<< orphan*/ init_data();
int /*<<< orphan*/ main();
int /*<<< orphan*/ mcu_init();
void __start(void) {
  init_data();
  init_bss();
  mcu_init();
  (void)main();
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<__start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_data@plt>
mov    $0x0,%al
call   1050 <init_bss@plt>
mov    $0x0,%al
call   1040 <mcu_init@plt>
mov    $0x0,%al
call   1060 <main@plt>
jmp    1160 <__start+0x20>

x86 assembly (clang, -O2):
<__start>:
push   %rax
xor    %eax,%eax
call   1030 <init_data@plt>
xor    %eax,%eax
call   1050 <init_bss@plt>
xor    %eax,%eax
call   1040 <mcu_init@plt>
xor    %eax,%eax
call   1060 <main@plt>
nopl   (%rax)
jmp    1160 <__start+0x20>

LLVM IR (-O0):
define void @__start() {
%1 = call i32 (...) @init_data()
%2 = call i32 (...) @init_bss()
%3 = call i32 (...) @mcu_init()
%4 = call i32 (...) @main()
br label %5
5: ; preds = %5, %0
br label %5
}

LLVM IR (-O2):
define void @__start() {
%1 = tail call i32 (...) @init_data()
%2 = tail call i32 (...) @init_bss()
%3 = tail call i32 (...) @mcu_init()
%4 = tail call i32 (...) @main()
br label %5
5: ; preds = %5, %0
br label %5
}
/* Type definitions */
struct membuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ asm_src_buffer_push(struct membuf *);
struct membuf *get_named_buffer(char const *);
void asm_include(const char *msg) {
  struct membuf *src;
  src = get_named_buffer(msg);
  asm_src_buffer_push(src);
}


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

x86 assembly (clang, -O2):
<asm_include>:
push   %rax
call   1030 <get_named_buffer@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <asm_src_buffer_push@plt>

LLVM IR (-O0):
%struct.membuf = type { i32 }
define void @asm_include(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.membuf*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.membuf* @get_named_buffer(i8* %4)
store %struct.membuf* %5, %struct.membuf** %3
%6 = load %struct.membuf*, %struct.membuf** %3
%7 = call i32 @asm_src_buffer_push(%struct.membuf* %6)
ret void
}

LLVM IR (-O2):
%struct.membuf = type { i32 }
define void @asm_include(i8* %0) {
%2 = tail call %struct.membuf* @get_named_buffer(i8* %0)
%3 = tail call i32 @asm_src_buffer_push(%struct.membuf* %2)
ret void
}
/* Variables and functions */
int fread(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int update_from_input() {
  int c = 0;
  char buf[1];
  while (fread(buf, 1, 1, stdin) == 1) {
    c = buf[0];
  }
  return c;
}


x86 assembly (clang, -O0):
<update_from_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rdi
mov    0x2ebe(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    114d <update_from_input+0x3d>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    111f <update_from_input+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_from_input>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2ec8(%rip),%r15
mov    (%r15),%ecx
lea    0xf(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
jne    116f <update_from_input+0x5f>
lea    0xf(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0xf(%rsp),%ebx
mov    (%r15),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
je     1150 <update_from_input+0x40>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @update_from_input() {
%1 = alloca i32
%2 = alloca [1 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fread(i8* %4, i32 1, i32 1, i32 %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
store i32 %11, i32* %1
br label %3
12: ; preds = %3
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @update_from_input() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fread(i8* %2, i32 1, i32 1, i32 %3)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %13
6: ; preds = %0, %6
%7 = load i8, i8* %2
%8 = load i32, i32* @stdin
%9 = call i32 @fread(i8* %2, i32 1, i32 1, i32 %8)
%10 = icmp eq i32 %9, 1
br i1 %10, label %6, label %11
11: ; preds = %6
%12 = sext i8 %7 to i32
br label %13
13: ; preds = %11, %0
%14 = phi i32 [ %12, %11 ], [ 0, %0 ]
ret i32 %14
}
void clear_disp(int *disp) {
  register int i;
  for (i = 0; i <= 3; i++)
    disp[i] = 0;
}


x86 assembly (clang, -O0):
<clear_disp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jg     1136 <clear_disp+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear_disp+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_disp>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @clear_disp(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
void set_null(char *v) { v[0] = '\0'; }


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

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

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

LLVM IR (-O2):
define void @set_null(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int print_uint32(int /*<<< orphan*/, char *);
int print_int32(int32_t n, char *p) {
  int sign;
  if ((sign = n < 0)) {
    *p++ = '-';
    n = -n;
  }
  return print_uint32((uint32_t)n, p) + sign;
}


x86 assembly (clang, -O0):
<print_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1140 <print_int32+0x30>
jmp    115c <print_int32+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <print_uint32@plt>
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int32>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
js     111e <print_int32+0xe>
mov    %rbx,%rdi
jmp    112b <print_int32+0x1b>
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    %rbx,%rdi
neg    %rdi
shr    $0x3f,%rbx
call   1030 <print_uint32@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @print_int32(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %5
br i1 %7, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 45, i8* %10
%12 = load i64, i64* %3
%13 = sub nsw i64 0, %12
store i64 %13, i64* %3
br label %14
14: ; preds = %9, %2
%15 = load i64, i64* %3
%16 = trunc i64 %15 to i32
%17 = load i8*, i8** %4
%18 = call i32 @print_uint32(i32 %16, i8* %17)
%19 = load i32, i32* %5
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @print_int32(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%6 = sub nsw i64 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = phi i64 [ %6, %4 ], [ %0, %2 ]
%10 = lshr i64 %0, 63
%11 = trunc i64 %10 to i32
%12 = trunc i64 %9 to i32
%13 = tail call i32 @print_uint32(i32 %12, i8* %8)
%14 = add nsw i32 %13, %11
ret i32 %14
}
void ReadGame(char *filename) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
void emptyArgs(char *args[]) {
  for (size_t i = 0; i < 20; i++) {
    args[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<emptyArgs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jae    113c <emptyArgs+0x3c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <emptyArgs+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emptyArgs>:
xorps  %xmm0,%xmm0
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @emptyArgs(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
store i8** %0, i8*** %2
store i64 0, i64* %3
br label %4
4: ; preds = %11, %1
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 20
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i64, i64* %3
%10 = getelementptr inbounds i8*, i8** %8, i64 %9
store i8* null, i8** %10
br label %11
11: ; preds = %7
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @emptyArgs(i8** nocapture writeonly %0) {
%2 = bitcast i8** %0 to i8*
ret void
}
int PageHuge(struct page *page) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @PageHuge(%struct.page* nocapture readnone %0) {
ret i32 0
}
int host_get_file_name(char *buffer, int max_buffer_size) {
  int ret;
  memset(buffer, 0, max_buffer_size);
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, "
                       "0x10"
                       "\n"
                       ".byte "
                       "0x03"
                       ", 0x00\n"
                       ".byte 0x00, 0x00, 0x00\n"
                       ".byte 0x00\n"
                       : "=a"(ret)
                       : "a"(buffer), "b"(max_buffer_size));
  return ret;
}


x86 assembly (clang, -O0):
<host_get_file_name>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ebx
(bad)
add    %dl,(%rax)
add    (%rax),%eax
add    %al,(%rax)
add    %al,(%rax)
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_get_file_name>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movslq %esi,%rbx
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
(bad)
add    %dl,(%rax)
add    (%rax),%eax
add    %al,(%rax)
add    %al,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @host_get_file_name(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x10\0A.byte 0x03, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @host_get_file_name(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %3, i1 false)
%4 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x10\0A.byte 0x03, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %1)
ret i32 %4
}
int test_imm_F0uint16_mem(unsigned short *val) {
  return ((*val) & (-0xF0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F0uint16_mem>:
movzwl (%rdi),%eax
test   $0xff10,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F0uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -240
%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_F0uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -240
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test3();
int main() {
  test3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test3@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test3()
ret i32 0
}
extern unsigned int inl_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       "\noutb %%al,$0x80"
                       : "=a"(_v)
                       : "Nd"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inl_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
out    %al,$0x80
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl_p>:
mov    %edi,%edx
in     (%dx),%eax
out    %al,$0x80
ret

LLVM IR (-O0):
define i32 @inl_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int terminal_measure32(int /*<<< orphan*/ const *);
int terminal_wmeasure(const wchar_t *s) {
  return terminal_measure32((const int32_t *)s);
}


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

x86 assembly (clang, -O2):
<terminal_wmeasure>:
jmp    1030 <terminal_measure32@plt>

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

LLVM IR (-O2):
define i32 @terminal_wmeasure(i32* %0) {
%2 = tail call i32 @terminal_measure32(i32* %0)
ret i32 %2
}
/* Variables and functions */
float sqrtf(float);
float rsqrtf(float x) { return 1.0f / sqrtf(x); }


x86 assembly (clang, -O0):
<rsqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsqrtf>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <rsqrtf+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <rsqrtf+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rsqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @rsqrtf(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
/* Type definitions */
struct fifo_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fifo_buffer_append(struct fifo_buffer *, size_t);
void *growing_fifo_write(struct fifo_buffer **, size_t);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void growing_fifo_append(struct fifo_buffer **buffer_p, const void *data,
                         size_t length) {
  void *p = growing_fifo_write(buffer_p, length);
  memcpy(p, data, length);
  fifo_buffer_append(*buffer_p, length);
}


x86 assembly (clang, -O0):
<growing_fifo_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <growing_fifo_write@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fifo_buffer_append@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<growing_fifo_append>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rsi
call   1050 <growing_fifo_write@plt>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    (%r15),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fifo_buffer_append@plt>

LLVM IR (-O0):
%struct.fifo_buffer = type { i32 }
define void @growing_fifo_append(%struct.fifo_buffer** %0, i8* %1, i64 %2) {
%4 = alloca %struct.fifo_buffer**
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store %struct.fifo_buffer** %0, %struct.fifo_buffer*** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.fifo_buffer**, %struct.fifo_buffer*** %4
%9 = load i64, i64* %6
%10 = call i8* @growing_fifo_write(%struct.fifo_buffer** %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load %struct.fifo_buffer**, %struct.fifo_buffer*** %4
%16 = load %struct.fifo_buffer*, %struct.fifo_buffer** %15
%17 = load i64, i64* %6
%18 = call i32 @fifo_buffer_append(%struct.fifo_buffer* %16, i64 %17)
ret void
}

LLVM IR (-O2):
%struct.fifo_buffer = type { i32 }
define void @growing_fifo_append(%struct.fifo_buffer** %0, i8* %1, i64 %2) {
%4 = tail call i8* @growing_fifo_write(%struct.fifo_buffer** %0, i64 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i64 %2)
%6 = load %struct.fifo_buffer*, %struct.fifo_buffer** %0
%7 = tail call i32 @fifo_buffer_append(%struct.fifo_buffer* %6, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ once_flag;

/* Variables and functions */
int /*<<< orphan*/ kthread_once(int /*<<< orphan*/ *, void (*)());
void call_once(once_flag *flag, void (*func)(void)) {
  (void)kthread_once(flag, func);
}


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

x86 assembly (clang, -O2):
<call_once>:
jmp    1030 <kthread_once@plt>

LLVM IR (-O0):
define void @call_once(i32* %0, void ()* %1) {
%3 = alloca i32*
%4 = alloca void ()*
store i32* %0, i32** %3
store void ()* %1, void ()** %4
%5 = load i32*, i32** %3
%6 = load void ()*, void ()** %4
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @kthread_once(i32* %5, void (...)* %7)
ret void
}

LLVM IR (-O2):
define void @call_once(i32* %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @kthread_once(i32* %0, void (...)* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void ConfirmMenu_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/"
                             "art_blueish"
                             "/cut_frame");
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"menu/art_blueish/cut_frame\00"
define void @ConfirmMenu_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"menu/art_blueish/cut_frame\00"
define void @ConfirmMenu_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
void clearScreen(void) {}


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

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

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

LLVM IR (-O2):
define void @clearScreen() {
ret void
}
int ident(int val) { return val; }


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

x86 assembly (clang, -O2):
<ident>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ident(i32 returned %0) {
ret i32 %0
}
float noise_grad1(int hash, float x) {
  int h = hash & 15;
  float grad = 1.0 + (h & 7);
  if (h & 8)
    grad = -grad;
  return (grad * x);
}


x86 assembly (clang, -O0):
<noise_grad1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
cvtsi2sd %eax,%xmm1
movsd  0xed9(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     115a <noise_grad1+0x5a>
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<noise_grad1>:
mov    %edi,%eax
and    $0x7,%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
test   $0x8,%dil
je     1119 <noise_grad1+0x19>
xorps  0xee7(%rip),%xmm1
mulss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @noise_grad1(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%7 = load i32, i32* %3
%8 = and i32 %7, 15
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = and i32 %9, 7
%11 = sitofp i32 %10 to double
%12 = fadd double 1.000000e+00, %11
%13 = fptrunc double %12 to float
store float %13, float* %6
%14 = load i32, i32* %5
%15 = and i32 %14, 8
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load float, float* %6
%19 = fneg float %18
store float %19, float* %6
br label %20
20: ; preds = %17, %2
%21 = load float, float* %6
%22 = load float, float* %4
%23 = fmul float %21, %22
ret float %23
}

LLVM IR (-O2):
define float @noise_grad1(i32 %0, float %1) {
%3 = and i32 %0, 7
%4 = add nuw nsw i32 %3, 1
%5 = sitofp i32 %4 to float
%6 = and i32 %0, 8
%7 = icmp eq i32 %6, 0
%8 = fneg float %5
%9 = select i1 %7, float %5, float %8
%10 = fmul float %9, %1
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ non_det;

/* Variables and functions */
int /*<<< orphan*/ klee_make_symbolic(unsigned long *, int, char *);
unsigned long map2check_non_det_sector_t() {
  unsigned long non_det;
  klee_make_symbolic(&non_det, sizeof(non_det), "non_det_#type");
  return non_det;
}


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

x86 assembly (clang, -O2):
<map2check_non_det_sector_t>:
push   %rax
lea    0xee8(%rip),%rdx
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <klee_make_symbolic@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"non_det_#type\00"
define i64 @map2check_non_det_sector_t() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @klee_make_symbolic(i64* %1, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i64, i64* %1
ret i64 %4
}
void forward(void) {}


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

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

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

LLVM IR (-O2):
define void @forward() {
ret void
}
int fn_2(int flag) {
  int x = 4, y = 5;
  if (flag)
    x = 3;
  y = 2;
  return x * y;
}


x86 assembly (clang, -O0):
<fn_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1126 <fn_2+0x26>
movl   $0x3,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_2>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
add    %eax,%eax
add    $0x6,%eax
ret

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

LLVM IR (-O2):
define i32 @fn_2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 8, i32 6
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t select_int64_t() { return 1 | (3 << 1); }


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

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

LLVM IR (-O0):
define i32 @select_int64_t() {
ret i32 7
}

LLVM IR (-O2):
define i32 @select_int64_t() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fcloseall();
int getpid();
int /*<<< orphan*/ printf(char *, int);
void closing_client() {
  printf(" K:'%d' ", getpid());
  fcloseall();
  exit(2);
}


x86 assembly (clang, -O0):
<closing_client>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <fcloseall@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<closing_client>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <fcloseall@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" K:'%d' \00"
define void @closing_client() {
%1 = call i32 (...) @getpid()
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @fcloseall()
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c" K:'%d' \00"
define void @closing_client() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @fcloseall()
%4 = tail call i32 @exit(i32 2)
unreachable
}
void gdk_set_double_click_time() {}


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

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

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

LLVM IR (-O2):
define void @gdk_set_double_click_time() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int __sysconf(int /*<<< orphan*/);
int __getpagesize(void) { return __sysconf(_SC_PAGESIZE); }


x86 assembly (clang, -O0):
<__getpagesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpagesize>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__sysconf@plt>

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define i32 @__getpagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = call i32 @__sysconf(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define i32 @__getpagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i32 @__sysconf(i32 %1)
ret i32 %2
}
/* Type definitions */
struct aiocb64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int aio_cancel64(int fd, struct aiocb64 *cb) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<aio_cancel64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aio_cancel64>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.aiocb64 = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @aio_cancel64(i32 %0, %struct.aiocb64* %1) {
%3 = alloca i32
%4 = alloca %struct.aiocb64*
store i32 %0, i32* %3
store %struct.aiocb64* %1, %struct.aiocb64** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.aiocb64 = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @aio_cancel64(i32 %0, %struct.aiocb64* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ bsp_dma_enable();
int /*<<< orphan*/ bsp_dma_setBuffer();
void bsp_ledsStripes_setOn() {
  bsp_dma_setBuffer();
  bsp_dma_enable();
}


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

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

LLVM IR (-O0):
define void @bsp_ledsStripes_setOn() {
%1 = call i32 (...) @bsp_dma_setBuffer()
%2 = call i32 (...) @bsp_dma_enable()
ret void
}

LLVM IR (-O2):
define void @bsp_ledsStripes_setOn() {
%1 = tail call i32 (...) @bsp_dma_setBuffer()
%2 = tail call i32 (...) @bsp_dma_enable()
ret void
}
int test_imm_D4uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xD4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D4uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xd4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_D4uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 212
%6 = icmp ne i64 %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_D4uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 13893632
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int int_ceildiv(int a, int b) { return (a + b - 1) / b; }


x86 assembly (clang, -O0):
<int_ceildiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_ceildiv>:
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @int_ceildiv(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 = add nsw i32 %5, %6
%8 = sub nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @int_ceildiv(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = sdiv i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ add(char const *);
void odadd(const char *fmt) {
  static int needpad;
  if (needpad)
    add("\""
        "         "
        "\"");
  add(fmt);
  needpad = 1;
}


x86 assembly (clang, -O0):
<odadd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpl   $0x0,0x2f09(%rip)
je     1135 <odadd+0x25>
lea    0xed0(%rip),%rdi
call   1030 <add@plt>
mov    -0x8(%rbp),%rdi
call   1030 <add@plt>
movl   $0x1,0x2ee4(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odadd>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x1,0x2f11(%rip)
jne    1129 <odadd+0x19>
lea    0xedc(%rip),%rdi
call   1030 <add@plt>
mov    %rbx,%rdi
call   1030 <add@plt>
movb   $0x1,0x2ef4(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@odadd.needpad = internal global i32 0
@.str = [12 x i8] c"\22 \22\00"
define void @odadd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @odadd.needpad
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @add(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = call i32 @add(i8* %8)
store i32 1, i32* @odadd.needpad
ret void
}

LLVM IR (-O2):
@odadd.needpad = internal unnamed_addr global i1 false
@.str = [12 x i8] c"\22 \22\00"
define void @odadd(i8* %0) {
%2 = load i1, i1* @odadd.needpad
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @add(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @add(i8* %0)
store i1 true, i1* @odadd.needpad
ret void
}
void addCurCharToToken(char **curPos, int *length) {
  (*curPos)++;
  (*length)++;
}


x86 assembly (clang, -O0):
<addCurCharToToken>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addCurCharToToken>:
addq   $0x1,(%rdi)
addl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @addCurCharToToken(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @addCurCharToToken(i8** nocapture %0, i32* nocapture %1) {
%3 = load i8*, i8** %0
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %4, i8** %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
ret void
}
const char *I_NoAppServicesClientGetServerAddr(void) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @I_NoAppServicesClientGetServerAddr() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @I_NoAppServicesClientGetServerAddr() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Z80_reset();
int /*<<< orphan*/ reset_dma();
int /*<<< orphan*/ reset_memory();
int /*<<< orphan*/ reset_registers();
int /*<<< orphan*/ reset_timers();
int /*<<< orphan*/ system_sound_chipreset();
int /*<<< orphan*/ system_sound_silence();
void reset(void) {
  Z80_reset();
  reset_memory();
  reset_registers();
  reset_timers();
  reset_dma();
  system_sound_chipreset();
  system_sound_silence();
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <Z80_reset@plt>
mov    $0x0,%al
call   1080 <reset_memory@plt>
mov    $0x0,%al
call   1070 <reset_registers@plt>
mov    $0x0,%al
call   1040 <reset_timers@plt>
mov    $0x0,%al
call   1060 <reset_dma@plt>
mov    $0x0,%al
call   1030 <system_sound_chipreset@plt>
mov    $0x0,%al
call   1090 <system_sound_silence@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
push   %rax
xor    %eax,%eax
call   1050 <Z80_reset@plt>
xor    %eax,%eax
call   1080 <reset_memory@plt>
xor    %eax,%eax
call   1070 <reset_registers@plt>
xor    %eax,%eax
call   1040 <reset_timers@plt>
xor    %eax,%eax
call   1060 <reset_dma@plt>
xor    %eax,%eax
call   1030 <system_sound_chipreset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <system_sound_silence@plt>

LLVM IR (-O0):
define void @reset() {
%1 = call i32 (...) @Z80_reset()
%2 = call i32 (...) @reset_memory()
%3 = call i32 (...) @reset_registers()
%4 = call i32 (...) @reset_timers()
%5 = call i32 (...) @reset_dma()
%6 = call i32 (...) @system_sound_chipreset()
%7 = call i32 (...) @system_sound_silence()
ret void
}

LLVM IR (-O2):
define void @reset() {
%1 = tail call i32 (...) @Z80_reset()
%2 = tail call i32 (...) @reset_memory()
%3 = tail call i32 (...) @reset_registers()
%4 = tail call i32 (...) @reset_timers()
%5 = tail call i32 (...) @reset_dma()
%6 = tail call i32 (...) @system_sound_chipreset()
%7 = tail call i32 (...) @system_sound_silence()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ native_window_create_video(int, int, int, int);
void window_create_video(int x, int y, int w, int h) {
  native_window_create_video(x, y, w, h);
}


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

x86 assembly (clang, -O2):
<window_create_video>:
jmp    1030 <native_window_create_video@plt>

LLVM IR (-O0):
define void @window_create_video(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @native_window_create_video(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @window_create_video(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @native_window_create_video(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
void Next() {}


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

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

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

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


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

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

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

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