xunge/DecIR huggingface dataset:
/* Type definitions */
struct di_weak_object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ di_drop_weak_ref(struct di_weak_object **);
void __attribute__((unused))
di_free_di_weak_objectp(struct di_weak_object **p) {
  if (*p) {
    di_drop_weak_ref(p);
  }
}


x86 assembly (clang, -O0):
<di_free_di_weak_objectp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1133 <di_free_di_weak_objectp+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <di_drop_weak_ref@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<di_free_di_weak_objectp>:
cmpq   $0x0,(%rdi)
je     111b <di_free_di_weak_objectp+0xb>
jmp    1030 <di_drop_weak_ref@plt>
ret

LLVM IR (-O0):
%struct.di_weak_object = type { i32 }
define void @di_free_di_weak_objectp(%struct.di_weak_object** %0) {
%2 = alloca %struct.di_weak_object**
store %struct.di_weak_object** %0, %struct.di_weak_object*** %2
%3 = load %struct.di_weak_object**, %struct.di_weak_object*** %2
%4 = load %struct.di_weak_object*, %struct.di_weak_object** %3
%5 = icmp ne %struct.di_weak_object* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.di_weak_object**, %struct.di_weak_object*** %2
%8 = call i32 @di_drop_weak_ref(%struct.di_weak_object** %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.di_weak_object = type { i32 }
define void @di_free_di_weak_objectp(%struct.di_weak_object** %0) {
%2 = load %struct.di_weak_object*, %struct.di_weak_object** %0
%3 = icmp eq %struct.di_weak_object* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @di_drop_weak_ref(%struct.di_weak_object** %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inlineFunc();
void use89() { inlineFunc(); }


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

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

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

LLVM IR (-O2):
define void @use89() {
%1 = tail call i32 (...) @inlineFunc()
ret void
}
void npm_isdbt_get_status(void) { unsigned int starttime; }


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

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

LLVM IR (-O0):
define void @npm_isdbt_get_status() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @npm_isdbt_get_status() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int main() {
  putchar(65);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 65)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void free_skin(void *handle) { dlclose(handle); }


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

x86 assembly (clang, -O2):
<free_skin>:
jmp    1030 <dlclose@plt>

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

LLVM IR (-O2):
define void @free_skin(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Nothing is here. Please run \"test_algrithms\"\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"Nothing is here. Please run \22test_algrithms\22\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [45 x i8] c"Nothing is here. Please run \22test_algrithms\22\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ japi_play(int);
void j_play(int arg0) { japi_play(arg0); }


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

x86 assembly (clang, -O2):
<j_play>:
jmp    1030 <japi_play@plt>

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

LLVM IR (-O2):
define void @j_play(i32 %0) {
%2 = tail call i32 @japi_play(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ bool_t;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
bool_t authnone_validate() { return (TRUE); }


x86 assembly (clang, -O0):
<authnone_validate>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<authnone_validate>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@TRUE = global i32 0
define i32 @authnone_validate() {
%1 = load i32, i32* @TRUE
ret i32 %1
}

LLVM IR (-O2):
@TRUE = global i32 0
define i32 @authnone_validate() {
%1 = load i32, i32* @TRUE
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ popattributes();
void popatt_() { popattributes(); }


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

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

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

LLVM IR (-O2):
define void @popatt_() {
%1 = tail call i32 (...) @popattributes()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exitFatal(char *, int);
scalar_t__ readString(char *, size_t, int);
void readUserName(char buffer[], size_t len) {
  if (readString(buffer, len, 0x200u) == 0)
    exitFatal("Invalid user- or groupname",
              sizeof("Invalid user- or groupname") - 1);
}


x86 assembly (clang, -O0):
<readUserName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x200,%edx
call   1040 <readString@plt>
cmp    $0x0,%rax
jne    115d <readUserName+0x3d>
lea    0xead(%rip),%rdi
mov    $0x1a,%esi
call   1030 <exitFatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readUserName>:
push   %rax
mov    $0x200,%edx
call   1040 <readString@plt>
test   %rax,%rax
je     1132 <readUserName+0x12>
pop    %rax
ret
lea    0xec7(%rip),%rdi
mov    $0x1a,%esi
pop    %rax
jmp    1030 <exitFatal@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Invalid user- or groupname\00"
define void @readUserName(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i64 @readString(i8* %5, i64 %6, i32 512)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @exitFatal(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Invalid user- or groupname\00"
define void @readUserName(i8* %0, i64 %1) {
%3 = tail call i64 @readString(i8* %0, i64 %1, i32 512)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @exitFatal(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
br label %7
7: ; preds = %5, %2
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xselectionclear;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselectionclear_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xselectionclear.send_event = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xselectionclear_send_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xselectionclear_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xselectionclear_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xselectionclear_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct net_interface_info {
  int dummy;
};
struct net_interface {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ net_interface_const_object(struct net_interface const *);
scalar_t__ obus_object_get_info(int /*<<< orphan*/);
const struct net_interface_info *
net_interface_get_info(const struct net_interface *object) {
  return (const struct net_interface_info *)obus_object_get_info(
      net_interface_const_object(object));
}


x86 assembly (clang, -O0):
<net_interface_get_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <net_interface_const_object@plt>
mov    %eax,%edi
call   1030 <obus_object_get_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_interface_get_info>:
push   %rax
call   1040 <net_interface_const_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <obus_object_get_info@plt>

LLVM IR (-O0):
%struct.net_interface_info = type { i32 }
%struct.net_interface = type { i32 }
define %struct.net_interface_info* @net_interface_get_info(%struct.net_interface* %0) {
%2 = alloca %struct.net_interface*
store %struct.net_interface* %0, %struct.net_interface** %2
%3 = load %struct.net_interface*, %struct.net_interface** %2
%4 = call i32 @net_interface_const_object(%struct.net_interface* %3)
%5 = call i64 @obus_object_get_info(i32 %4)
%6 = inttoptr i64 %5 to %struct.net_interface_info*
ret %struct.net_interface_info* %6
}

LLVM IR (-O2):
%struct.net_interface_info = type { i32 }
%struct.net_interface = type { i32 }
define %struct.net_interface_info* @net_interface_get_info(%struct.net_interface* %0) {
%2 = tail call i32 @net_interface_const_object(%struct.net_interface* %0)
%3 = tail call i64 @obus_object_get_info(i32 %2)
%4 = inttoptr i64 %3 to %struct.net_interface_info*
ret %struct.net_interface_info* %4
}
/* Variables and functions */
char *strchr(char const *, int);
char *module_libc_strchr(const char *src, int ch) { return strchr(src, ch); }


x86 assembly (clang, -O0):
<module_libc_strchr>:
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 <strchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_libc_strchr>:
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @module_libc_strchr(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 i8* @strchr(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @module_libc_strchr(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x07() {
  Assert_real((ispunct(7) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              40, ("ispunct should be 0 for 0x07"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x07>:
push   %rax
mov    $0x7,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x28,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x07\00"
define void @t_ispunct_0x07() {
%1 = tail call i64 @ispunct(i32 7)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xc3() {
  Assert_real((ispunct(195) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              980, ("ispunct should be 0 for 0xc3"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xc3>:
push   %rax
mov    $0xc3,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3d4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xc3\00"
define void @t_ispunct_0xc3() {
%1 = tail call i64 @ispunct(i32 195)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int *realloc(int *, int);
void f_working(int **p) {
  printf("*p: %lu\n", *p);
  *p = realloc(*p, 6 * 1024 * 1024 * sizeof(int));
  printf("*p: %lu\n", *p);
}


x86 assembly (clang, -O0):
<f_working>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x1800000,%esi
call   1040 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_working>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0xecf(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rdi
mov    $0x1800000,%esi
call   1040 <realloc@plt>
mov    %rax,(%rbx)
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"*p: %lu\0A\00"
define void @f_working(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32*, i32** %0
%5 = tail call i32* @realloc(i32* %4, i32 25165824)
store i32* %5, i32** %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void Extend(int x, int y) { printf(";%d;%d", x, y); }


x86 assembly (clang, -O0):
<Extend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Extend>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c";%d;%d\00"
define void @Extend(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c";%d;%d\00"
define void @Extend(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ABDAY_3;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abday_3() { return nl_langinfo(ABDAY_3); }


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

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

LLVM IR (-O0):
@ABDAY_3 = global i32 0
define i8* @langinfo_abday_3() {
%1 = load i32, i32* @ABDAY_3
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABDAY_3 = global i32 0
define i8* @langinfo_abday_3() {
%1 = load i32, i32* @ABDAY_3
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
int array_dimmax() { return 16777215; }


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

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

LLVM IR (-O0):
define i32 @array_dimmax() {
ret i32 16777215
}

LLVM IR (-O2):
define i32 @array_dimmax() {
ret i32 16777215
}
/* Variables and functions */
int aty_ld_le32(int);
int ati_is_dbl_scan(void) { return aty_ld_le32(0x001C) & 0x00000001; }


x86 assembly (clang, -O0):
<ati_is_dbl_scan>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c,%edi
call   1030 <aty_ld_le32@plt>
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ati_is_dbl_scan>:
push   %rax
mov    $0x1c,%edi
call   1030 <aty_ld_le32@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ati_is_dbl_scan() {
%1 = call i32 @aty_ld_le32(i32 28)
%2 = and i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @ati_is_dbl_scan() {
%1 = tail call i32 @aty_ld_le32(i32 28)
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ disabled_wait();
int /*<<< orphan*/ sclp_print(char const *);
void panic(const char *string) {
  sclp_print(string);
  disabled_wait();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sclp_print@plt>
mov    $0x0,%al
call   1030 <disabled_wait@plt>
jmp    113c <panic+0x1c>

x86 assembly (clang, -O2):
<panic>:
push   %rax
call   1040 <sclp_print@plt>
xor    %eax,%eax
call   1030 <disabled_wait@plt>
nopl   (%rax)
jmp    1130 <panic+0x10>

LLVM IR (-O0):
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sclp_print(i8* %3)
%5 = call i32 (...) @disabled_wait()
br label %6
6: ; preds = %1, %6
br label %6
}

LLVM IR (-O2):
define void @panic(i8* %0) {
%2 = tail call i32 @sclp_print(i8* %0)
%3 = tail call i32 (...) @disabled_wait()
br label %4
4: ; preds = %1, %4
br label %4
}
void crypto_alloc_base(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<crypto_alloc_base>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_alloc_base>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.crypto_alloc_base = [18 x i8] c"crypto_alloc_base\00"
define void @crypto_alloc_base() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.crypto_alloc_base, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.crypto_alloc_base = [18 x i8] c"crypto_alloc_base\00"
define void @crypto_alloc_base() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.crypto_alloc_base, i64 0, i64 0))
ret void
}
/* Variables and functions */
double modf(double, double *);
double nmea_degree2ndeg(double val) {
  double int_part;
  double fra_part;
  fra_part = modf(val, &int_part);
  val = int_part * 100 + fra_part * 60;
  return val;
}


x86 assembly (clang, -O0):
<nmea_degree2ndeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xeb6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_degree2ndeg>:
push   %rax
mov    %rsp,%rdi
call   1030 <modf@plt>
mulsd  0xedf(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @nmea_degree2ndeg(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @modf(double %5, double* %3)
store double %6, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fmul double %8, 6.000000e+01
%10 = call double @llvm.fmuladd.f64(double %7, double 1.000000e+02, double %9)
store double %10, double* %2
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @nmea_degree2ndeg(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call double @modf(double %0, double* %2)
%5 = load double, double* %2
%6 = fmul double %4, 6.000000e+01
%7 = tail call double @llvm.fmuladd.f64(double %5, double 1.000000e+02, double %6)
ret double %7
}
int logo_para_setup(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @logo_para_setup() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prune_add1(int);
void call_prune_add1_2_Good() { prune_add1(10); }


x86 assembly (clang, -O0):
<call_prune_add1_2_Good>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <prune_add1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_prune_add1_2_Good>:
mov    $0xa,%edi
jmp    1030 <prune_add1@plt>

LLVM IR (-O0):
define void @call_prune_add1_2_Good() {
%1 = call i32 @prune_add1(i32 10)
ret void
}

LLVM IR (-O2):
define void @call_prune_add1_2_Good() {
%1 = tail call i32 @prune_add1(i32 10)
ret void
}
void redecl6() {}


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

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

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

LLVM IR (-O2):
define void @redecl6() {
ret void
}
unsigned char explicit_unsigned_int_to_unsigned_char(unsigned int src) {
  return (unsigned char)src;
}


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

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

LLVM IR (-O0):
define zeroext i8 @explicit_unsigned_int_to_unsigned_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @explicit_unsigned_int_to_unsigned_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
void do_some_work() {
  int i;
  for (i = 0; i < 0x2000000; i++) {
    i = i * 10.0 / 5 / 2;
  }
}


x86 assembly (clang, -O0):
<do_some_work>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2000000,-0x4(%rbp)
jge    1156 <do_some_work+0x56>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeeb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <do_some_work+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do_some_work() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 33554432
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 1.000000e+01
%9 = fdiv double %8, 5.000000e+00
%10 = fdiv double %9, 2.000000e+00
%11 = fptosi double %10 to i32
store i32 %11, i32* %1
br label %12
12: ; preds = %5
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @do_some_work() {
ret void
}
/* Variables and functions */
scalar_t__ exp2(float);
int main(int argc, char **argv) {
  float x = 7;
  return (int)exp2(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <exp2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movss  0xee8(%rip),%xmm0
jmp    1030 <exp2@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 7.000000e+00, float* %6
%7 = load float, float* %6
%8 = call i64 @exp2(float %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @exp2(float 7.000000e+00)
%4 = trunc i64 %3 to i32
ret i32 %4
}
int sync_page(int fd, unsigned int page) { return 0; }


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

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

LLVM IR (-O0):
define i32 @sync_page(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 @sync_page(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_exit2(void) { printf("second exit\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"second exit\00"
define void @my_exit2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  int a;
  int *pa;
  a = 3;
  pa = &a;
  return *pa;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void reset_msm_pm_stats(void) {
  FILE *file;
  file = fopen("/proc/msm_pm_stats", "w");
  if (!file)
    return;
  fprintf(file, "reset\n");
  fclose(file);
}


x86 assembly (clang, -O0):
<reset_msm_pm_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115f <reset_msm_pm_stats+0x2f>
jmp    1178 <reset_msm_pm_stats+0x48>
mov    -0x8(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_msm_pm_stats>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     116e <reset_msm_pm_stats+0x3e>
mov    %rax,%rbx
lea    0xec2(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/proc/msm_pm_stats\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [7 x i8] c"reset\0A\00"
define void @reset_msm_pm_stats() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %6, label %5
5: ; preds = %0
br label %11
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %1
%10 = call i32 @fclose(i32* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"/proc/msm_pm_stats\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [7 x i8] c"reset\0A\00"
define void @reset_msm_pm_stats() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i64 6, i64 1, i32* %1)
%5 = tail call i32 @fclose(i32* %1)
br label %6
6: ; preds = %0, %3
ret void
}
void neighbor_output(char *desc, int pos, char *filename) {}


x86 assembly (clang, -O0):
<neighbor_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @neighbor_output(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @neighbor_output(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
int sum_n_recur(int n) {
  if (n == 1)
    return 1;
  return n + sum_n_recur(n - 1);
}


x86 assembly (clang, -O0):
<sum_n_recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <sum_n_recur+0x21>
movl   $0x1,-0x4(%rbp)
jmp    114c <sum_n_recur+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum_n_recur@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_n_recur>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1124 <sum_n_recur+0x24>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %ecx,%eax
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
shr    %rdx
add    %edi,%eax
sub    %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @sum_n_recur(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = add i32 %0, -2
%6 = mul i32 %4, %5
%7 = zext i32 %5 to i33
%8 = add i32 %0, -3
%9 = zext i32 %8 to i33
%10 = mul i33 %7, %9
%11 = lshr i33 %10, 1
%12 = trunc i33 %11 to i32
%13 = add i32 %6, %0
%14 = sub i32 %13, %12
%15 = add i32 %14, 1
br label %16
16: ; preds = %3, %1
%17 = phi i32 [ 1, %1 ], [ %15, %3 ]
ret i32 %17
}
int Get3(unsigned char *mem) {
  return (mem[0] + (mem[1] * 256) + (mem[2] * 256 * 256));
}


x86 assembly (clang, -O0):
<Get3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get3>:
movzwl (%rdi),%ecx
movzbl 0x2(%rdi),%eax
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Get3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = mul nsw i32 %10, 256
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = mul nsw i32 %16, 256
%18 = mul nsw i32 %17, 256
%19 = add nsw i32 %12, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @Get3(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
ret i32 %13
}
float stbir__support_zero(float s) {
  (void)sizeof(s);
  return 0;
}


x86 assembly (clang, -O0):
<stbir__support_zero>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbir__support_zero>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @stbir__support_zero(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @stbir__support_zero(float %0) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void rand_seed() { srand(time(0)); }


x86 assembly (clang, -O0):
<rand_seed>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_seed>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @rand_seed() {
%1 = call i32 @time(i32 0)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @rand_seed() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int firejail_strcmp(const char *a, const char *b) {
  if (!a)
    return b ? -1 : 0;
  else if (!b)
    return 1;
  else
    return strcmp(a, b);
}


x86 assembly (clang, -O0):
<firejail_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1145 <firejail_strcmp+0x35>
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <firejail_strcmp+0x5c>
cmpq   $0x0,-0x18(%rbp)
jne    115c <firejail_strcmp+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    116c <firejail_strcmp+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<firejail_strcmp>:
test   %rdi,%rdi
je     111f <firejail_strcmp+0xf>
test   %rsi,%rsi
je     1125 <firejail_strcmp+0x15>
jmp    1030 <strcmp@plt>
neg    %rsi
sbb    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @firejail_strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -1, i32 0
store i32 %12, i32* %3
br label %21
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %13
store i32 1, i32* %3
br label %21
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcmp(i8* %18, i8* %19)
store i32 %20, i32* %3
br label %21
21: ; preds = %17, %16, %8
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @firejail_strcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = icmp ne i8* %1, null
%6 = sext i1 %5 to i32
br label %11
7: ; preds = %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %11
11: ; preds = %7, %9, %4
%12 = phi i32 [ %10, %9 ], [ %6, %4 ], [ 1, %7 ]
ret i32 %12
}
/* Variables and functions */
int side(double);
int sideBit(double x) { return 1 << side(x); }


x86 assembly (clang, -O0):
<sideBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <side@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sideBit>:
push   %rax
call   1030 <side@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%edx
mov    %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sideBit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @side(double %3)
%5 = shl i32 1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @sideBit(double %0) {
%2 = tail call i32 @side(double %0)
%3 = shl nuw i32 1, %2
ret i32 %3
}
void __attribute__((weak)) usbcb_error_handler() {}


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

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

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

LLVM IR (-O2):
define weak void @usbcb_error_handler() {
ret void
}
/* Variables and functions */
scalar_t__ lgammaf(float);
int /*<<< orphan*/ link_failure_lgammaf();
void test_lgammaf(float f) {
  if (lgammaf(f) != lgammaf(f))
    link_failure_lgammaf();
}


x86 assembly (clang, -O0):
<test_lgammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <lgammaf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <lgammaf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_lgammaf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_lgammaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lgammaf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <lgammaf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <lgammaf@plt>
cmp    %rax,%rbx
jne    1149 <test_lgammaf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_lgammaf@plt>

LLVM IR (-O0):
define void @test_lgammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @lgammaf(float %3)
%5 = load float, float* %2
%6 = call i64 @lgammaf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_lgammaf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_lgammaf(float %0) {
%2 = tail call i64 @lgammaf(float %0)
%3 = tail call i64 @lgammaf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_lgammaf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void ntov(uint32_t ip, uint8_t *vector) {
  vector[0] = (ip >> (3 * 8)) & 0xff;
  vector[1] = (ip >> (2 * 8)) & 0xff;
  vector[2] = (ip >> (1 * 8)) & 0xff;
  vector[3] = (ip >> (0 * 8)) & 0xff;
}


x86 assembly (clang, -O0):
<ntov>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntov>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %ah,%edx
movzbl %al,%edi
shr    $0x18,%eax
mov    %eax,(%rsi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rsi)
mov    %edx,0x8(%rsi)
mov    %edi,0xc(%rsi)
ret

LLVM IR (-O0):
define void @ntov(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32, i32* %3
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 3
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @ntov(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
store i32 %3, i32* %1
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %0, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %8, i32* %9
%10 = and i32 %0, 255
%11 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %10, i32* %11
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ pwrite(int, void *, size_t, int /*<<< orphan*/);
ssize_t exfat_write(int fd, void *buf, size_t size, off_t offset) {
  return pwrite(fd, buf, size, offset);
}


x86 assembly (clang, -O0):
<exfat_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <pwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exfat_write>:
jmp    1030 <pwrite@plt>

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

LLVM IR (-O2):
define i32 @exfat_write(i32 %0, i8* nocapture %1, i64 %2, i32 %3) {
%5 = tail call i32 @pwrite(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
void endUnitSystem(void *data) {}


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

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

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

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