xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int mk251_main() {
  int i;
  for (i = 0; i < 48500000; i++)
    putchar(251);
  return 0;
}


x86 assembly (clang, -O0):
<mk251_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2e40d20,-0x4(%rbp)
jge    1144 <mk251_main+0x34>
mov    $0xfb,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <mk251_main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mk251_main>:
push   %rbx
mov    $0x2e40d20,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xfb,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <mk251_main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mk251_main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 48500000
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @putchar(i32 251)
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @mk251_main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 251)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 48500000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
int bitcount(unsigned x) {
  int i;
  for (i = 0; x != 0; x &= x - 1) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <bitcount+0x32>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = add i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char **argv) {
  fprintf(stderr, " %s [-n num-lines] [fileout] stdin.\n", argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c" %s [-n num-lines] [fileout] stdin.\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c" %s [-n num-lines] [fileout] stdin.\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate_subsets(int);
int main(int argc, char **argv) {
  generate_subsets(3);
  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    $0x3,%edi
call   1030 <generate_subsets@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <generate_subsets@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @generate_subsets(i32 3)
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ run_test(char *, int, char **);
int test_blanks(int argc, char **argv) {
  char *args[] = {"./launch", "test_launch_blanks"};
  run_test("", 2, args);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<test_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdx
lea    0xec8(%rip),%rdi
mov    $0x2,%esi
call   1030 <run_test@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_blanks>:
sub    $0x18,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee2(%rip),%rdi
mov    %rsp,%rdx
mov    $0x2,%esi
call   1030 <run_test@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"./launch\00"
@.str.1 = [19 x i8] c"test_launch_blanks\00"
@__const.test_blanks.args = [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i32 0, i32 0)]
@.str.2 = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @test_blanks(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [2 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [2 x i8*]* %5 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%8 = call i32 @run_test(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2, i8** %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [9 x i8] c"./launch\00"
@.str.1 = [19 x i8] c"test_launch_blanks\00"
@__const.test_blanks.args = [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i32 0, i32 0)]
@.str.2 = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @test_blanks(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%6 = call i32 @run_test(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2, i8** %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};
struct t_gui_window {
  int dummy;
};
struct t_gui_buffer {
  int dummy;
};
struct t_gui_bar_item {
  int dummy;
};

/* Variables and functions */
char *gui_bar_item_buffer_modes_cb(const void *pointer, void *data,
                                   struct t_gui_bar_item *item,
                                   struct t_gui_window *window,
                                   struct t_gui_buffer *buffer,
                                   struct t_hashtable *extra_info) {
  (void)pointer;
  (void)data;
  (void)item;
  (void)window;
  (void)buffer;
  (void)extra_info;
  return NULL;
}


x86 assembly (clang, -O0):
<gui_bar_item_buffer_modes_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.t_gui_bar_item = type { i32 }
%struct.t_gui_window = type { i32 }
%struct.t_gui_buffer = type { i32 }
%struct.t_hashtable = type { i32 }
define i8* @gui_bar_item_buffer_modes_cb(i8* %0, i8* %1, %struct.t_gui_bar_item* %2, %struct.t_gui_window* %3, %struct.t_gui_buffer* %4, %struct.t_hashtable* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca %struct.t_gui_bar_item*
%10 = alloca %struct.t_gui_window*
%11 = alloca %struct.t_gui_buffer*
%12 = alloca %struct.t_hashtable*
store i8* %0, i8** %7
store i8* %1, i8** %8
store %struct.t_gui_bar_item* %2, %struct.t_gui_bar_item** %9
store %struct.t_gui_window* %3, %struct.t_gui_window** %10
store %struct.t_gui_buffer* %4, %struct.t_gui_buffer** %11
store %struct.t_hashtable* %5, %struct.t_hashtable** %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load %struct.t_gui_bar_item*, %struct.t_gui_bar_item** %9
%16 = load %struct.t_gui_window*, %struct.t_gui_window** %10
%17 = load %struct.t_gui_buffer*, %struct.t_gui_buffer** %11
%18 = load %struct.t_hashtable*, %struct.t_hashtable** %12
ret i8* null
}

LLVM IR (-O2):
%struct.t_gui_bar_item = type { i32 }
%struct.t_gui_window = type { i32 }
%struct.t_gui_buffer = type { i32 }
%struct.t_hashtable = type { i32 }
define noalias i8* @gui_bar_item_buffer_modes_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_gui_bar_item* nocapture readnone %2, %struct.t_gui_window* nocapture readnone %3, %struct.t_gui_buffer* nocapture readnone %4, %struct.t_hashtable* nocapture readnone %5) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ renameat(int /*<<< orphan*/, char *, int /*<<< orphan*/, char *);
int main(void) {
  if (0 > renameat(AT_FDCWD, "arnold.layne", AT_FDCWD, "lucifer.sam"))
    return EXIT_FAILURE;
  else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rsi
lea    0xece(%rip),%rcx
call   1030 <renameat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1163 <main+0x53>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116f <main+0x5f>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
lea    0xee5(%rip),%rcx
mov    %edi,%edx
call   1030 <renameat@plt>
test   %rax,%rax
jns    113d <main+0x2d>
mov    0x2ea5(%rip),%rax
jmp    1144 <main+0x34>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [12 x i8] c"lucifer.sam\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @AT_FDCWD
%3 = load i32, i32* @AT_FDCWD
%4 = call i64 @renameat(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp sgt i64 0, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
store i32 %7, i32* %1
br label %10
8: ; preds = %0
%9 = load i32, i32* @EXIT_SUCCESS
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [12 x i8] c"lucifer.sam\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @AT_FDCWD
%2 = tail call i64 @renameat(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
%4 = load i32, i32* @EXIT_FAILURE
%5 = load i32, i32* @EXIT_SUCCESS
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int *make_iv(int len) {
  int *v;
  if (!len)
    len = 1;
  v = (int *)calloc(len, sizeof(int));
  if (!v) {
    fprintf(stderr, "Run-time error in make_iv");
    exit(1);
  }
  return --v;
}


x86 assembly (clang, -O0):
<make_iv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114c <make_iv+0x1c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1187 <make_iv+0x57>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xe88(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_iv>:
push   %rax
test   %edi,%edi
mov    $0x1,%eax
cmove  %eax,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1150 <make_iv+0x20>
add    $0xfffffffffffffffc,%rax
pop    %rcx
ret
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Run-time error in make_iv\00"
define i32* @make_iv(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 1, i32* %2
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
%9 = call i64 @calloc(i32 %8, i32 4)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %3
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %17, label %13
13: ; preds = %7
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %7
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i32 -1
store i32* %19, i32** %3
ret i32* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Run-time error in make_iv\00"
define i32* @make_iv(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 %0
%4 = tail call i64 @calloc(i32 %3, i32 4)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = inttoptr i64 %4 to i32*
%12 = getelementptr inbounds i32, i32* %11, i64 -1
ret i32* %12
}
void transpose1(double out[2][2], _Atomic double in[2][2]) {}


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

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

LLVM IR (-O0):
define void @transpose1([2 x double]* %0, [2 x double]* %1) {
%3 = alloca [2 x double]*
%4 = alloca [2 x double]*
store [2 x double]* %0, [2 x double]** %3
store [2 x double]* %1, [2 x double]** %4
ret void
}

LLVM IR (-O2):
define void @transpose1([2 x double]* nocapture %0, [2 x double]* nocapture %1) {
ret void
}
void acpi_pci_link_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_pci_link_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearScreen();
int /*<<< orphan*/ getKey();
int /*<<< orphan*/ putNum(int);
void main() {
  clearScreen();
  putNum(8 - (3 + 2));
  putNum(2 + 2);
  getKey();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <clearScreen@plt>
mov    $0x3,%edi
call   1030 <putNum@plt>
mov    $0x4,%edi
call   1030 <putNum@plt>
mov    $0x0,%al
call   1040 <getKey@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <clearScreen@plt>
mov    $0x3,%edi
call   1030 <putNum@plt>
mov    $0x4,%edi
call   1030 <putNum@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getKey@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @clearScreen()
%2 = call i32 @putNum(i32 3)
%3 = call i32 @putNum(i32 4)
%4 = call i32 (...) @getKey()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @clearScreen()
%2 = tail call i32 @putNum(i32 3)
%3 = tail call i32 @putNum(i32 4)
%4 = tail call i32 (...) @getKey()
ret void
}
void packcombine(int *index, int rest, int bitno_rest) {
  *index = *index << bitno_rest;
  *index += rest;
}


x86 assembly (clang, -O0):
<packcombine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<packcombine>:
mov    %edx,%ecx
mov    (%rdi),%eax
shl    %cl,%eax
add    %esi,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @packcombine(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32, i32* %6
%10 = shl i32 %8, %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, %12
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @packcombine(i32* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* %0
%5 = shl i32 %4, %2
%6 = add nsw i32 %5, %1
store i32 %6, i32* %0
ret void
}
int test_imm_BBint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xBB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BBint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xbb,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BBint64_highword_mem>:
testb  $0xbb,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_BBint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 187
%7 = icmp ne i64 %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_BBint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 803158884352
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ channel_write(int, unsigned char, unsigned char *, int);
int error(char *, char const *);
int protoerror(unsigned char tid, unsigned char err, const char *errstr) {
  channel_write(0x00, tid, &err, 1);
  return error("protocol error (%s)", errstr);
}


x86 assembly (clang, -O0):
<protoerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %edi,%edi
lea    -0x2(%rbp),%rdx
mov    $0x1,%ecx
movzbl -0x1(%rbp),%esi
call   1040 <channel_write@plt>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protoerror>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %edi,%eax
mov    %sil,0xf(%rsp)
lea    0xf(%rsp),%rdx
xor    %edi,%edi
mov    %eax,%esi
mov    $0x1,%ecx
call   1040 <channel_write@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"protocol error (%s)\00"
define i32 @protoerror(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = call i32 @channel_write(i32 0, i8 zeroext %7, i8* %5, i32 1)
%9 = load i8*, i8** %6
%10 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"protocol error (%s)\00"
define i32 @protoerror(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
store i8 %1, i8* %4
%5 = call i32 @channel_write(i32 0, i8 zeroext %0, i8* %4, i32 1)
%6 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int read_dobldobl_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(233, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<read_dobldobl_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xe9,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_dobldobl_start_system>:
mov    $0xe9,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @read_dobldobl_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 233, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_dobldobl_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 233, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
struct rw_semaphore {
  int dummy;
};

/* Variables and functions */
int __down_read_trylock(struct rw_semaphore *);
int down_read_trylock(struct rw_semaphore *sem) {
  int ret;
  ;
  ret = __down_read_trylock(sem);
  ;
  return ret;
}


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

x86 assembly (clang, -O2):
<down_read_trylock>:
jmp    1030 <__down_read_trylock@plt>

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

LLVM IR (-O2):
%struct.rw_semaphore = type { i32 }
define i32 @down_read_trylock(%struct.rw_semaphore* %0) {
%2 = tail call i32 @__down_read_trylock(%struct.rw_semaphore* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ filter();
void wrap_filter(void) { filter(); }


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

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

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

LLVM IR (-O2):
define void @wrap_filter() {
%1 = tail call i32 (...) @filter()
ret void
}
/* Variables and functions */
unsigned short const *encode_utf16(char const *, int);
const unsigned short int *encode_to_alphabet(const char *mapcode,
                                             int alphabet) {
  return encode_utf16(mapcode, alphabet);
}


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

x86 assembly (clang, -O2):
<encode_to_alphabet>:
jmp    1030 <encode_utf16@plt>

LLVM IR (-O0):
define i16* @encode_to_alphabet(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 i32, i32* %4
%7 = call i16* @encode_utf16(i8* %5, i32 %6)
ret i16* %7
}

LLVM IR (-O2):
define i16* @encode_to_alphabet(i8* %0, i32 %1) {
%3 = tail call i16* @encode_utf16(i8* %0, i32 %1)
ret i16* %3
}
void ARGBToRGB565Row_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRGB565Row_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgdefl(int v) { lgen("%s\t%c%d", ".quad", v); }


x86 assembly (clang, -O0):
<cgdefl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdefl>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xee8(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s\09%c%d\00"
@.str.1 = [6 x i8] c".quad\00"
define void @cgdefl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s\09%c%d\00"
@.str.1 = [6 x i8] c".quad\00"
define void @cgdefl(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
void RTLockValidatorRecExclCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _strcpy(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char a[5] = "12345";
  char b[5];
  strcpy(b, a);
  _strcpy(b, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xe(%rbp),%rdi
lea    -0x9(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xe(%rbp),%rdi
lea    -0x9(%rbp),%rsi
call   1040 <_strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movb   $0x35,0x10(%rsp)
movl   $0x34333231,0xc(%rsp)
34
lea    0x13(%rsp),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <_strcpy@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.a = [5 x i8] c"12345"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%10 = call i32 @_strcpy(i8* %8, i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i8] c"12345"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
%6 = call i32 @_strcpy(i8* %4, i8* %3)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(scalar_t__ const *);
int label_is_root(const uint8_t *label) {
  assert(label);
  return label[0] == 0;
}


x86 assembly (clang, -O0):
<label_is_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_is_root>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
xor    %eax,%eax
cmpq   $0x0,(%rbx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @label_is_root(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @assert(i64* %3)
%5 = load i64*, i64** %2
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @label_is_root(i64* %0) {
%2 = tail call i32 @assert(i64* %0)
%3 = load i64, i64* %0
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_D0int8_mem(signed char *val) {
  return ((*val) & (-0xD0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D0int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -208
%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_D0int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -208
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_module_if_ul_subc_handle_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_module_if@%p::ul_subc_handle "
          "(rtpp_module_if_ul_subc_handle) is invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_module_if_ul_subc_handle_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_module_if_ul_subc_handle_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [103 x i8] c"Method rtpp_module_if@%p::ul_subc_handle (rtpp_module_if_ul_subc_handle) is invoked after destruction\0A\00"
define void @rtpp_module_if_ul_subc_handle_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [103 x i8] c"Method rtpp_module_if@%p::ul_subc_handle (rtpp_module_if_ul_subc_handle) is invoked after destruction\0A\00"
define void @rtpp_module_if_ul_subc_handle_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
double bpm_to_interval(double bpm) {
  double beats_per_second, samples_per_beat;
  beats_per_second = bpm / 60;
  samples_per_beat = 44100 / beats_per_second;
  return samples_per_beat / 128;
}


x86 assembly (clang, -O0):
<bpm_to_interval>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee1(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpm_to_interval>:
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bpm_to_interval(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fdiv double %5, 6.000000e+01
store double %6, double* %3
%7 = load double, double* %3
%8 = fdiv double 4.410000e+04, %7
store double %8, double* %4
%9 = load double, double* %4
%10 = fdiv double %9, 1.280000e+02
ret double %10
}

LLVM IR (-O2):
define double @bpm_to_interval(double %0) {
%2 = fdiv double %0, 6.000000e+01
%3 = fdiv double 4.410000e+04, %2
%4 = fmul double %3, 7.812500e-03
ret double %4
}
/* Type definitions */
struct list_args_info {
  int dummy;
};

/* Variables and functions */
int list_cmdline_parser2(int, char **, struct list_args_info *,
                         int /*<<< orphan*/, int, int);
int list_cmdline_parser(int argc, char **argv,
                        struct list_args_info *args_info) {
  return list_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<list_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <list_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <list_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.list_args_info = type { i32 }
define i32 @list_cmdline_parser(i32 %0, i8** %1, %struct.list_args_info* %2) {
%4 = tail call i32 @list_cmdline_parser2(i32 %0, i8** %1, %struct.list_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
void gtk_entry_get_layout_offsets() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_get_layout_offsets() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t prince_round_constant(const unsigned int round) {
  uint64_t rc[] = {0x0000000000000000, 0x13198a2e03707344, 0xa4093822299f31d0,
                   0x082efa98ec4e6c89, 0x452821e638d01377, 0xbe5466cf34e90c6c,
                   0x7ef84f78fd955cb1, 0x85840851f1ac43aa, 0xc882d32f25323c54,
                   0x64a51195e0e3610d, 0xd3b5a399ca0c2399, 0xc0ac29b7c97c50dd};
  return rc[round];
}


x86 assembly (clang, -O0):
<prince_round_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeda(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
mov    -0x4(%rbp),%eax
mov    -0x40(%rbp,%rax,4),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prince_round_constant>:
mov    %edi,%eax
lea    0xef7(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@__const.prince_round_constant.rc = [12 x i32] [i32 0, i32 57701188, i32 698298832, i32 -330404727, i32 953160567, i32 887688300, i32 -40543055, i32 -240368726, i32 624049236, i32 -521969395, i32 -905174119, i32 -914599715]
define i32 @prince_round_constant(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = bitcast [12 x i32]* %3 to i8*
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
@__const.prince_round_constant.rc = [12 x i32] [i32 0, i32 57701188, i32 698298832, i32 -330404727, i32 953160567, i32 887688300, i32 -40543055, i32 -240368726, i32 624049236, i32 -521969395, i32 -905174119, i32 -914599715]
define i32 @prince_round_constant(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [12 x i32], [12 x i32]* @__const.prince_round_constant.rc, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n usage: pstore cat [OPTIONS] INPUT\n");
  printf("\n The options are:\n");
  printf(
      "   -q, --quiet                  print only table and column headers\n");
  printf("\n");
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
lea    0xee7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0A usage: pstore cat [OPTIONS] INPUT\0A\00"
@.str.1 = [20 x i8] c"\0A The options are:\0A\00"
@.str.2 = [69 x i8] c" -q, --quiet print only table and column headers\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [36 x i8] c"\0A usage: pstore cat [OPTIONS] INPUT\00"
@str.4 = [19 x i8] c"\0A The options are:\00"
@str.5 = [68 x i8] c" -q, --quiet print only table and column headers\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
srnd(num) { srandom(num); }


x86 assembly (clang, -O0):
<srnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <srandom@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @srnd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @srandom to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @srnd(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @srandom to i32 (i32, ...)*)(i32 %0)
ret i32 undef
}
int FindStartCode3(unsigned char *Buf) {
  if (Buf[0] != 0 || Buf[1] != 0 || Buf[2] != 0 || Buf[3] != 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<FindStartCode3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    114b <FindStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    114b <FindStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    114b <FindStartCode3+0x4b>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x1,%eax
je     1157 <FindStartCode3+0x57>
movl   $0x0,-0x4(%rbp)
jmp    115e <FindStartCode3+0x5e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FindStartCode3>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
je     1108 <FindStartCode3+0x8>
ret
cmpb   $0x0,0x1(%rdi)
jne    1107 <FindStartCode3+0x7>
cmpb   $0x0,0x2(%rdi)
jne    1107 <FindStartCode3+0x7>
xor    %eax,%eax
cmpb   $0x1,0x3(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @FindStartCode3(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %17
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 1
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %12, %1, %4, %8
%18 = phi i32 [ 0, %8 ], [ 0, %4 ], [ 0, %1 ], [ %16, %12 ]
ret i32 %18
}
void SteamAPI_ISteamHTMLSurface_StopFind(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamHTMLSurface_StopFind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_StopFind>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_StopFind = [36 x i8] c"SteamAPI_ISteamHTMLSurface_StopFind\00"
define void @SteamAPI_ISteamHTMLSurface_StopFind(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_StopFind, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_StopFind = [36 x i8] c"SteamAPI_ISteamHTMLSurface_StopFind\00"
define void @SteamAPI_ISteamHTMLSurface_StopFind(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_StopFind, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int IS_STACK(const void *ptr, unsigned long rsp) {
  if ((unsigned long)ptr < (unsigned long)rsp - 128 ||
      (unsigned long)ptr > (unsigned long)rsp + 16384)
    return false;
  else
    return true;
}


x86 assembly (clang, -O0):
<IS_STACK>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x80,%rcx
cmp    %rcx,%rax
jb     113c <IS_STACK+0x3c>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    $0x4000,%rcx
cmp    %rcx,%rax
jbe    1148 <IS_STACK+0x48>
movl   $0x0,-0x4(%rbp)
jmp    114f <IS_STACK+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_STACK>:
lea    -0x80(%rsi),%rax
cmp    %rdi,%rax
setbe  %al
add    $0x4000,%rsi
cmp    %rdi,%rsi
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IS_STACK(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
%8 = load i64, i64* %5
%9 = sub i64 %8, 128
%10 = icmp ult i64 %7, %9
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = ptrtoint i8* %12 to i64
%14 = load i64, i64* %5
%15 = add i64 %14, 16384
%16 = icmp ugt i64 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %11, %2
store i32 0, i32* %3
br label %19
18: ; preds = %11
store i32 1, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @IS_STACK(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = add i64 %1, -128
%5 = icmp ule i64 %4, %3
%6 = add i64 %1, 16384
%7 = icmp uge i64 %6, %3
%8 = and i1 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_WN_list(void) {
  printf("BA63 BA66");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"BA63 BA66\00"
define i32 @drv_WN_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"BA63 BA66\00"
define i32 @drv_WN_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}