xunge/DecIR huggingface dataset:
/* Variables and functions */
double rand_norm();
bool is_accepted(double p) {
  if (p > rand_norm())
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<is_accepted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand_norm@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114c <is_accepted+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <is_accepted+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_accepted>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand_norm@plt>
xor    %eax,%eax
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_accepted(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call double (...) @rand_norm()
%6 = fcmp ogt double %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_accepted(double %0) {
%2 = tail call double (...) @rand_norm()
%3 = fcmp olt double %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
void lcdl_init(void) {}


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

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

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

LLVM IR (-O2):
define void @lcdl_init() {
ret void
}
int thermal_notify_tz_trip_down(int tz_id, int id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thermal_notify_tz_trip_down(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_erlang_comments() {
  test_parser_verify_parse(test_parser_sourcefile("erlang", " %%comment"),
                           "erlang", "", "%%comment", 0);
}


x86 assembly (clang, -O0):
<test_erlang_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_erlang_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec8(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"erlang\00"
@.str.1 = [11 x i8] c" %%comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"%%comment\00"
define void @test_erlang_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"erlang\00"
@.str.1 = [11 x i8] c" %%comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"%%comment\00"
define void @test_erlang_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int str_equ(const char *s1, const char *s2) { return (!strcmp(s1, s2)); }


x86 assembly (clang, -O0):
<str_equ>:
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 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_equ>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str_equ(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @str_equ(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int main() {
  int x = (-0x7fffffff - 1);
  int y;
  asm("" : "+g"(x));
  y = -(-x);
  asm("" : "+g"(y));
  y = -(-(-0x7fffffff - 1));
  asm("" : "+g"(y));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x80000000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x80000000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x80000000,-0x4(%rsp)
80
mov    $0x80000000,%eax
mov    $0x80000000,%ecx
mov    %ecx,-0x4(%rsp)
mov    %ecx,-0x8(%rsp)
movl   $0x80000000,-0x8(%rsp)
80
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 -2147483648, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* %1
%5 = sub nsw i32 0, %4
%6 = sub nsw i32 0, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
store i32 -2147483648, i32* %2
%8 = load i32, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 -2147483648, i32* %1
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* %1
store i32 %5, i32* %2
store i32 -2147483648, i32* %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
int foo(int a, int b, int c, int d) {
  int x, y;
  b = a;
  if (a == b)
    x = c;
  else {
    link_error();
    x = d;
  }
  if (x == c)
    return a;
  else {
    link_error();
    return b;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1141 <foo+0x31>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114e <foo+0x3e>
mov    $0x0,%al
call   1030 <link_error@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1165 <foo+0x55>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <foo+0x62>
mov    $0x0,%al
call   1030 <link_error@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 returned %0, i32 %1, i32 %2, i32 %3) {
ret i32 %0
}
/* Variables and functions */
#define ARGP_KEY_HELP_EXTRA 128
int /*<<< orphan*/ gettext(char *);
char *strdup(int /*<<< orphan*/);
char *more_help(int key, const char *text, void *input) {
  switch (key) {
  case ARGP_KEY_HELP_EXTRA:
    return strdup(gettext(
        "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
  default:
    break;
  }
  return (char *)text;
}


x86 assembly (clang, -O0):
<more_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
jne    1162 <more_help+0x42>
jmp    1146 <more_help+0x26>
lea    0xeb3(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    116f <more_help+0x4f>
jmp    1167 <more_help+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<more_help>:
cmp    $0x80,%edi
jne    113d <more_help+0x1d>
push   %rax
lea    0xed0(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <strdup@plt>
mov    %rsi,%rax
ret

LLVM IR (-O0):
@.str = [60 x i8] c"Report bugs using the `glibcbug' script to <bugs@gnu.org>.\0A\00"
define i8* @more_help(i32 %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
switch i32 %8, label %12 [
i32 128, label %9
]
9: ; preds = %3
%10 = call i32 @gettext(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%11 = call i8* @strdup(i32 %10)
store i8* %11, i8** %4
br label %15
12: ; preds = %3
br label %13
13: ; preds = %12
%14 = load i8*, i8** %6
store i8* %14, i8** %4
br label %15
15: ; preds = %13, %9
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
@.str = [60 x i8] c"Report bugs using the `glibcbug' script to <bugs@gnu.org>.\0A\00"
define i8* @more_help(i32 %0, i8* readnone %1, i8* nocapture readnone %2) {
%4 = icmp eq i32 %0, 128
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i32 @gettext(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%7 = tail call i8* @strdup(i32 %6)
br label %8
8: ; preds = %3, %5
%9 = phi i8* [ %7, %5 ], [ %1, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void *vgCreateOffScreenSH(void) {
  printf("vgCreateOffScreenSH not implemented!\n");
}


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

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

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

LLVM IR (-O2):
@str = [37 x i8] c"vgCreateOffScreenSH not implemented!\00"
define noalias i8* @vgCreateOffScreenSH() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
unsigned char *char_deserialize(unsigned char *buffer, char *c) {
  *c = buffer[0];
  return (buffer + sizeof(char));
}


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

x86 assembly (clang, -O2):
<char_deserialize>:
mov    (%rdi),%al
mov    %al,(%rsi)
lea    0x1(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @char_deserialize(i8* %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %4
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_3c(int Salt, int Parameter) {
  unsigned b = Salt * 0x28EA041F + 0x638F;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_3c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x28ea041f,-0x4(%rbp),%eax
add    $0x638f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_3c>:
imul   $0x28ea041f,%edi,%edi
add    $0x638f,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_3c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 686425119
%8 = add nsw i32 %7, 25487
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_3c(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 686425119
%4 = add nsw i32 %3, 25487
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void help(void) {
  const char *helpText =
      "Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\n";
  printf("%s\n", helpText);
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xf1d(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [69 x i8] c"Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void q_copy(const float *q, float *out) {
  out[0] = q[0];
  out[1] = q[1];
  out[2] = q[2];
  out[3] = q[3];
}


x86 assembly (clang, -O0):
<q_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_copy>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
movss  0xc(%rdi),%xmm0
movss  %xmm0,0xc(%rsi)
ret

LLVM IR (-O0):
define void @q_copy(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %4
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %4
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
%20 = load float*, float** %3
%21 = getelementptr inbounds float, float* %20, i64 3
%22 = load float, float* %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 3
store float %22, float* %24
ret void
}

LLVM IR (-O2):
define void @q_copy(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
store float %3, float* %1
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 2
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 3
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %1, i64 3
store float %11, float* %12
ret void
}
/* Variables and functions */
int MakeServer(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setnonblock(int);
int main() {
  int sockfd = MakeServer(100);
  setnonblock(sockfd);
  printf("start listen.........\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1050 <MakeServer@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <setnonblock@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    1160 <main+0x30>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1050 <MakeServer@plt>
mov    %eax,%edi
call   1040 <setnonblock@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xchg   %ax,%ax
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [23 x i8] c"start listen.........\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @MakeServer(i32 100)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @setnonblock(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %0, %7
br label %7
}

LLVM IR (-O2):
@str = [22 x i8] c"start listen.........\00"
define i32 @main() {
%1 = tail call i32 @MakeServer(i32 100)
%2 = tail call i32 @setnonblock(i32 %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
br label %4
}
int ft_sqrt(int nb) {
  int i;
  i = 0;
  if (nb == 0)
    return (0);
  while (i * i < nb)
    i++;
  if ((nb % i) == 0)
    return (i);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <ft_sqrt+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1169 <ft_sqrt+0x69>
jmp    1129 <ft_sqrt+0x29>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1147 <ft_sqrt+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <ft_sqrt+0x29>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1162 <ft_sqrt+0x62>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <ft_sqrt+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
test   %edi,%edi
je     1129 <ft_sqrt+0x29>
mov    $0xffffffff,%ecx
nopl   0x0(%rax)
add    $0x1,%ecx
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
jl     1110 <ft_sqrt+0x10>
mov    %edi,%eax
cltd
idiv   %ecx
xor    %eax,%eax
test   %edx,%edx
cmove  %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_sqrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %26
8: ; preds = %1
br label %9
9: ; preds = %15, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %9
18: ; preds = %9
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = srem i32 %19, %20
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = load i32, i32* %4
store i32 %24, i32* %2
br label %26
25: ; preds = %18
store i32 0, i32* %2
br label %26
26: ; preds = %25, %23, %7
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = mul nsw i32 %4, %4
%6 = icmp slt i32 %5, %0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %3, label %8
8: ; preds = %3
%9 = srem i32 %0, %4
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 %4, i32 0
br label %12
12: ; preds = %8, %1
%13 = phi i32 [ 0, %1 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int sscanf(char *, char *, int *, int *);
char *parseInt(char *s, int *ip) {
  int r, sz;
  r = sscanf(s, "%d%n", ip, &sz);
  assert(r == 1);
  return (s + sz);
}


x86 assembly (clang, -O0):
<parseInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
lea    -0x18(%rbp),%rcx
call   1040 <sscanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseInt>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xece(%rip),%rsi
lea    0xc(%rsp),%rcx
call   1040 <sscanf@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
movslq 0xc(%rsp),%rax
add    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%n\00"
define i8* @parseInt(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = load i8*, i8** %3
%8 = load i32*, i32** %4
%9 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %8, i32* %6)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %3
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
ret i8* %17
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%n\00"
define i8* @parseInt(i8* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
ret i8* %11
}
void Init_zxing(void) {}


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

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

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

LLVM IR (-O2):
define void @Init_zxing() {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void DESDMADisable(uint32_t ui32Base, uint32_t ui32Flags) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000034))) &= ~ui32Flags;
}


x86 assembly (clang, -O0):
<DESDMADisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x34(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESDMADisable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
not    %rax
mov    -0x8(%rsp),%rcx
and    %rax,0x34(%rcx)
ret

LLVM IR (-O0):
define void @DESDMADisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add i64 %7, 52
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @DESDMADisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add i64 %7, 52
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}
void INT_Excep_MTU8_TGIV8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU8_TGIV8() {
ret void
}
void overflow(void) {
  float f1 = 3.5E+38f;
  float f2 = -3.5E+38f;
  float f3 = (__builtin_inff());
  float f4 = -(__builtin_inff());
  double d1 = 1.9E+308;
  double d2 = -1.9E+308;
  double d3 = (__builtin_inff());
  double d4 = -(__builtin_inff());
}


x86 assembly (clang, -O0):
<overflow>:
push   %rbp
mov    %rsp,%rbp
movss  0xf08(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe99(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @overflow() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store float 0x7FF0000000000000, float* %1
store float 0xFFF0000000000000, float* %2
store float 0x7FF0000000000000, float* %3
store float 0xFFF0000000000000, float* %4
store double 0x7FF0000000000000, double* %5
store double 0xFFF0000000000000, double* %6
store double 0x7FF0000000000000, double* %7
store double 0xFFF0000000000000, double* %8
ret void
}

LLVM IR (-O2):
define void @overflow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void byte_copyr(void *out, size_t len, const void *in) { memcpy(out, in, len); }


x86 assembly (clang, -O0):
<byte_copyr>:
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
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_copyr>:
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @byte_copyr(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %2, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_strcspn(char const *, char const *);
char *my_strpbrk(const char *s, const char *b) {
  s += my_strcspn(s, b);
  return *s ? (char *)s : 0;
}


x86 assembly (clang, -O0):
<my_strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <my_strcspn@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <my_strpbrk+0x4a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1165 <my_strpbrk+0x55>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1165 <my_strpbrk+0x55>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strpbrk>:
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strcspn@plt>
movslq %eax,%rcx
lea    (%rbx,%rcx,1),%rdx
xor    %eax,%eax
cmpb   $0x0,(%rbx,%rcx,1)
cmovne %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @my_strpbrk(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @my_strcspn(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i8, i8* %8, i64 %9
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i8*, i8** %3
br label %18
17: ; preds = %2
br label %18
18: ; preds = %17, %15
%19 = phi i8* [ %16, %15 ], [ null, %17 ]
ret i8* %19
}

LLVM IR (-O2):
define i8* @my_strpbrk(i8* %0, i8* %1) {
%3 = tail call i32 @my_strcspn(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* null, i8* %5
ret i8* %8
}
/* Type definitions */
struct sst_item {
  int dummy;
};

/* Variables and functions */
int _pos_calc(int);
struct sst_item *sst_mmap_level(const char *map, int level) {
  int pos = _pos_calc(level);
  return (struct sst_item *)(map + pos);
}


x86 assembly (clang, -O0):
<sst_mmap_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <_pos_calc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sst_mmap_level>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <_pos_calc@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sst_item = type { i32 }
define %struct.sst_item* @sst_mmap_level(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 i32, i32* %4
%7 = call i32 @_pos_calc(i32 %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = bitcast i8* %11 to %struct.sst_item*
ret %struct.sst_item* %12
}

LLVM IR (-O2):
%struct.sst_item = type { i32 }
define %struct.sst_item* @sst_mmap_level(i8* readnone %0, i32 %1) {
%3 = tail call i32 @_pos_calc(i32 %1)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = bitcast i8* %5 to %struct.sst_item*
ret %struct.sst_item* %6
}
void nseel_asm_mul_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_mul_end() {
ret void
}
void f(int x) { 1 == 1; }


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

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

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

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
int func_sub(int a, int b) { return a - b; }


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

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

LLVM IR (-O0):
define i32 @func_sub(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @func_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void assert_print_pass() { printf("\nPASS!\n"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\0APASS!\0A\00"
define void @assert_print_pass() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"\0APASS!\00"
define void @assert_print_pass() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void mcxExit(int val) { exit(val); }


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

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

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

LLVM IR (-O2):
define void @mcxExit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LZ5_compressBound(int);
int LZ5_compress_HC_extStateHC(void *, char const *, char *, int,
                               int /*<<< orphan*/);
int LZ5_compressHC_withStateHC(void *state, const char *src, char *dst,
                               int srcSize) {
  return LZ5_compress_HC_extStateHC(state, src, dst, srcSize,
                                    LZ5_compressBound(srcSize));
}


x86 assembly (clang, -O0):
<LZ5_compressHC_withStateHC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <LZ5_compressBound@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    %eax,%r8d
call   1030 <LZ5_compress_HC_extStateHC@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ5_compressHC_withStateHC>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %ecx,%edi
call   1040 <LZ5_compressBound@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <LZ5_compress_HC_extStateHC@plt>

LLVM IR (-O0):
define i32 @LZ5_compressHC_withStateHC(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @LZ5_compressBound(i32 %13)
%15 = call i32 @LZ5_compress_HC_extStateHC(i8* %9, i8* %10, i8* %11, i32 %12, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @LZ5_compressHC_withStateHC(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @LZ5_compressBound(i32 %3)
%6 = tail call i32 @LZ5_compress_HC_extStateHC(i8* %0, i8* %1, i8* %2, i32 %3, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
deleteIndividual(void *toBeDeleted) { free(toBeDeleted); }


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

x86 assembly (clang, -O2):
<deleteIndividual>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define i32 @deleteIndividual(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 undef
}
void dummy_proc_5(int a0, int a1, int a2, int a3, int a4) { return; }


x86 assembly (clang, -O0):
<dummy_proc_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_proc_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
define void @dummy_proc_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
/* Variables and functions */
int proxy_main(int, char **);
int main(int argc, char **argv) { return proxy_main(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <proxy_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <proxy_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @proxy_main(i32 %0, i8** %1)
ret i32 %3
}
int test_imm_01int64_lowword_mem(long long *val) {
  return ((*val) & (0x01 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_01int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 1
%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_01int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo363(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo363(i32 %0) {
ret void
}
int addRecursive(int num1, int num2) {
  int sum;
  int carry;
  if (num2 == 0) {
    return num1;
  }
  sum = num1 ^ num2;
  carry = (num1 & num2) << 1;
  return addRecursive(sum, carry);
}


x86 assembly (clang, -O0):
<addRecursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <addRecursive+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <addRecursive+0x46>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <addRecursive@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addRecursive>:
test   %esi,%esi
je     111d <addRecursive+0x1d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%eax
xor    %edi,%eax
and    %edi,%esi
mov    %eax,%edi
add    %esi,%esi
jne    1110 <addRecursive+0x10>
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @addRecursive(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = xor i32 %5, %6
%8 = and i32 %5, %6
%9 = shl i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ %0, %2 ], [ %7, %4 ]
ret i32 %12
}
int main() {
  char *s;
  s = (char[]){"whatever"};
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xef3(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"whatever\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca [9 x i8]
%3 = bitcast [9 x i8]* %2 to i8*
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
store i8* %4, i8** %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int intcompare(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

x86 assembly (clang, -O2):
<intcompare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @intcompare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcompare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void av_log_set_level() {}


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

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

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

LLVM IR (-O2):
define void @av_log_set_level() {
ret void
}
double Noise(int x, int y) {
  long n;
  n = x + y * 57;
  n = (n % 13) ^ n;
  return (1.0 - ((n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) /
                    1073741824.0);
}


x86 assembly (clang, -O0):
<Noise>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x39,-0x8(%rbp),%ecx
add    %ecx,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xd,%ecx
cqto
idiv   %rcx
xor    -0x10(%rbp),%rdx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   -0x10(%rbp),%rcx
imul   $0x3d73,%rcx,%rcx
add    $0xc0ae5,%rcx
imul   %rcx,%rax
add    $0x5208dd0d,%rax
and    $0x7fffffff,%rax
cvtsi2sd %rax,%xmm1
movsd  0xea1(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe8d(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Noise>:
imul   $0x39,%esi,%eax
add    %edi,%eax
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
lea    (%rcx,%rdx,4),%ecx
mov    %eax,%edx
sub    %ecx,%edx
xor    %eax,%edx
mov    %edx,%eax
imul   %edx,%eax
imul   $0x3d73,%eax,%eax
add    $0xc0ae5,%eax
imul   %edx,%eax
add    $0x5208dd0d,%eax
and    $0x7fffffff,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xeb0(%rip),%xmm0
addsd  0xeb0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Noise(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 57
%9 = add nsw i32 %6, %8
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = srem i64 %11, 13
%13 = load i64, i64* %5
%14 = xor i64 %12, %13
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %5
%18 = mul nsw i64 %16, %17
%19 = mul nsw i64 %18, 15731
%20 = add nsw i64 %19, 789221
%21 = mul nsw i64 %15, %20
%22 = add nsw i64 %21, 1376312589
%23 = and i64 %22, 2147483647
%24 = sitofp i64 %23 to double
%25 = fdiv double %24, 0x41D0000000000000
%26 = fsub double 1.000000e+00, %25
ret double %26
}

LLVM IR (-O2):
define double @Noise(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 57
%4 = add nsw i32 %3, %0
%5 = srem i32 %4, 13
%6 = xor i32 %5, %4
%7 = zext i32 %6 to i64
%8 = mul nuw nsw i64 %7, 15731
%9 = mul i64 %8, %7
%10 = add i64 %9, 789221
%11 = mul i64 %10, %7
%12 = add i64 %11, 1376312589
%13 = and i64 %12, 2147483647
%14 = sitofp i64 %13 to double
%15 = fmul double %14, 0x3E10000000000000
%16 = fsub double 1.000000e+00, %15
ret double %16
}