xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int arcgc, char *argv[]) {
  printf("Hello, world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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 = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  foo(1);
  foo(2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1)
%2 = tail call i32 @foo(i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
int one(void) {
  print_string("one ");
  return 1;
}


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

x86 assembly (clang, -O2):
<one>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"one \00"
define i32 @one() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void f14(a16, a17) register struct file *a16;
int a17;
{}


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

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

LLVM IR (-O0):
%struct.file = type opaque
define void @f14(%struct.file* %0, i32 %1) {
%3 = alloca %struct.file*
%4 = alloca i32
store %struct.file* %0, %struct.file** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.file = type opaque
define void @f14(%struct.file* nocapture %0, i32 %1) {
ret void
}
void g_clear() {}


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

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

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

LLVM IR (-O2):
define void @g_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int, int, char, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void killCommand(char *args[]) {
  interrupt(0x21, 0x9, args[1][0] - '0', 0, 0);
  return;
}


x86 assembly (clang, -O0):
<killCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    $0x21,%edi
mov    $0x9,%esi
xor    %r8d,%r8d
movsbl %al,%edx
mov    %r8d,%ecx
call   1030 <interrupt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killCommand>:
mov    0x8(%rdi),%rax
mov    (%rax),%al
add    $0xd0,%al
movsbl %al,%edx
mov    $0x21,%edi
mov    $0x9,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <interrupt@plt>

LLVM IR (-O0):
define void @killCommand(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
%10 = trunc i32 %9 to i8
%11 = call i32 @interrupt(i32 33, i32 9, i8 signext %10, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @killCommand(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = add i8 %4, -48
%6 = tail call i32 @interrupt(i32 33, i32 9, i8 signext %5, i32 0, i32 0)
ret void
}
void g_type_init_with_debug_flags() {}


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

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

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

LLVM IR (-O2):
define void @g_type_init_with_debug_flags() {
ret void
}
int fn8(int x, unsigned long long y) { return x << y; }


x86 assembly (clang, -O0):
<fn8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn8>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @fn8(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = shl i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @fn8(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *ex_safe_free(void *array) {
  if (array != 0)
    free(array);
  return 0;
}


x86 assembly (clang, -O0):
<ex_safe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <ex_safe_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex_safe_free>:
test   %rdi,%rdi
je     111f <ex_safe_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @ex_safe_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printTestInfo(char *, char *);
int addAtRearWithOneNode() {
  printTestInfo("addAtRearWithOneNode", "(not implemented)");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"addAtRearWithOneNode\00"
@.str.1 = [18 x i8] c"(not implemented)\00"
define i32 @addAtRearWithOneNode() {
%1 = call i32 @printTestInfo(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"addAtRearWithOneNode\00"
@.str.1 = [18 x i8] c"(not implemented)\00"
define i32 @addAtRearWithOneNode() {
%1 = tail call i32 @printTestInfo(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void uwsgi_init_worker_mount_apps() {}


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

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

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

LLVM IR (-O2):
define void @uwsgi_init_worker_mount_apps() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *opendir(char *);
main() { DIR *d = opendir("."); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main() {
%1 = tail call i32* @opendir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void *xalloc(size_t size, const char *myname) {
  void *p = malloc(size);
  if (p == NULL) {
    fprintf(stderr, "%s: %s\n", myname, strerror(errno));
    exit(2);
  }
  return p;
}


x86 assembly (clang, -O0):
<xalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11aa <xalloc+0x6a>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
lea    0xe65(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1157 <xalloc+0x17>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e82(%rip),%rax
mov    (%rax),%ebp
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe8b(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define i8* @xalloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %4
%13 = load i32, i32* @errno
%14 = call i8* @strerror(i32 %13)
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %14)
%16 = call i32 @exit(i32 2)
unreachable
17: ; preds = %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define noalias i8* @xalloc(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %8)
%10 = tail call i32 @exit(i32 2)
unreachable
11: ; preds = %2
ret i8* %3
}
void gpio_int_unmask_set(unsigned gpio) { return; }


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

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

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

LLVM IR (-O2):
define void @gpio_int_unmask_set(i32 %0) {
ret void
}
int func(void) { return 933; }


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

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

LLVM IR (-O0):
define i32 @func() {
ret i32 933
}

LLVM IR (-O2):
define i32 @func() {
ret i32 933
}
int mdp_ppp_do_blit(struct mdp_info *mdp, struct mdp_blit_req *req,
                    struct file *src_file, unsigned long src_start,
                    unsigned long src_len, struct file *dst_file,
                    unsigned long dst_start, unsigned long dst_len) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.mdp_info = type opaque
%struct.mdp_blit_req = type opaque
%struct.file = type opaque
define i32 @mdp_ppp_do_blit(%struct.mdp_info* %0, %struct.mdp_blit_req* %1, %struct.file* %2, i64 %3, i64 %4, %struct.file* %5, i64 %6, i64 %7) {
%9 = alloca %struct.mdp_info*
%10 = alloca %struct.mdp_blit_req*
%11 = alloca %struct.file*
%12 = alloca i64
%13 = alloca i64
%14 = alloca %struct.file*
%15 = alloca i64
%16 = alloca i64
store %struct.mdp_info* %0, %struct.mdp_info** %9
store %struct.mdp_blit_req* %1, %struct.mdp_blit_req** %10
store %struct.file* %2, %struct.file** %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store %struct.file* %5, %struct.file** %14
store i64 %6, i64* %15
store i64 %7, i64* %16
ret i32 0
}

LLVM IR (-O2):
%struct.mdp_info = type opaque
%struct.mdp_blit_req = type opaque
%struct.file = type opaque
define i32 @mdp_ppp_do_blit(%struct.mdp_info* nocapture readnone %0, %struct.mdp_blit_req* nocapture readnone %1, %struct.file* nocapture readnone %2, i64 %3, i64 %4, %struct.file* nocapture readnone %5, i64 %6, i64 %7) {
ret i32 0
}
int foo(int *a, int argc) {
  int c;
  int d, e;
  d = *a;
  if (argc) {
    a = &c;
  }
  e = *a;
  return d + e;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1126 <foo+0x26>
lea    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = shl nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int do_lzma_compress(char *, int, char *, int *);
int lzma_compress(char *in, int in_len, char *out, int *out_len) {
  return do_lzma_compress(in, in_len, out, out_len);
}


x86 assembly (clang, -O0):
<lzma_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <do_lzma_compress@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzma_compress>:
jmp    1030 <do_lzma_compress@plt>

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

LLVM IR (-O2):
define i32 @lzma_compress(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call i32 @do_lzma_compress(i8* %0, i32 %1, i8* %2, i32* %3)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void EMACRxWatchdogTimerSet(uint32_t ui32Base, uint8_t ui8Timeout) {
  (*((volatile uint32_t *)(ui32Base + 0x00000C24))) = (uint32_t)ui8Timeout;
}


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

x86 assembly (clang, -O2):
<EMACRxWatchdogTimerSet>:
mov    %rsi,0xc24(%rdi)
ret

LLVM IR (-O0):
define void @EMACRxWatchdogTimerSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 3108
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EMACRxWatchdogTimerSet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 3108
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
long msGettick(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @msGettick() {
ret i64 0
}

LLVM IR (-O2):
define i64 @msGettick() {
ret i64 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dmediansorted(int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dmediansorted(N, x, stride);
  printf("median: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   1050 <stdlib_strided_dmediansorted@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dmediansorted@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [13 x i8] c"median: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dmediansorted(i32 %6, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [13 x i8] c"median: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dmediansorted(i32 4, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
void PrimaryRPMISR() {}


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

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

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

LLVM IR (-O2):
define void @PrimaryRPMISR() {
ret void
}
/* Variables and functions */
int myfunc(char *);
int /*<<< orphan*/ printf(char *, int);
main() { printf("%d", myfunc("DESIS")); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed8(%rip),%rdi
call   1040 <myfunc@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1040 <myfunc@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"DESIS\00"
define i32 @main() {
%1 = call i32 @myfunc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"DESIS\00"
define i32 @main() {
%1 = tail call i32 @myfunc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double sin(double);
double uxxyy_exact(double x, double y) {
  double pi = 3.141592653589793;
  double value;
  value = -pi * pi * (x * x + y * y) * sin(pi * x * y);
  return value;
}


x86 assembly (clang, -O0):
<uxxyy_exact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uxxyy_exact>:
push   %rax
movapd %xmm0,%xmm2
mulsd  0xeeb(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xecb(%rip),%xmm2
movsd  %xmm2,(%rsp)
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @uxxyy_exact(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0x400921FB54442D18, double* %5
%7 = load double, double* %5
%8 = fneg double %7
%9 = load double, double* %5
%10 = fmul double %8, %9
%11 = load double, double* %3
%12 = load double, double* %3
%13 = load double, double* %4
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = call double @llvm.fmuladd.f64(double %11, double %12, double %15)
%17 = fmul double %10, %16
%18 = load double, double* %5
%19 = load double, double* %3
%20 = fmul double %18, %19
%21 = load double, double* %4
%22 = fmul double %20, %21
%23 = call double @sin(double %22)
%24 = fmul double %17, %23
store double %24, double* %6
%25 = load double, double* %6
ret double %25
}

LLVM IR (-O2):
define double @uxxyy_exact(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = fmul double %4, 0xC023BD3CC9BE45DE
%6 = fmul double %0, 0x400921FB54442D18
%7 = fmul double %6, %1
%8 = tail call double @sin(double %7)
%9 = fmul double %5, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xaa() {
  Assert_real((isspace(170) == 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_isspace.c",
              855, ("isspace should be 0 for 0xaa"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xaa>:
push   %rax
mov    $0xaa,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x357,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xaa\00"
define void @t_isspace_0xaa() {
%1 = call i64 @isspace(i32 170)
%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 855, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xaa\00"
define void @t_isspace_0xaa() {
%1 = tail call i64 @isspace(i32 170)
%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 855, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int allocTSIH(struct World *wrld) { return 0x0778; }


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

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

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

LLVM IR (-O2):
%struct.World = type opaque
define i32 @allocTSIH(%struct.World* nocapture readnone %0) {
ret i32 1912
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ screen;
};
typedef TYPE_1__ XEDataObject;

/* Variables and functions */
void *get_XEDataObject_screen(void *_p) {
  return (void *)((XEDataObject *)_p)->screen;
}


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

x86 assembly (clang, -O2):
<get_XEDataObject_screen>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XEDataObject_screen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XEDataObject_screen(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test_pthread_fork();
int /*<<< orphan*/ test_thread_memory();
int main(int argc, char *argv[]) {
  test_thread_memory();
  test_pthread_fork();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_thread_memory@plt>
mov    $0x0,%al
call   1030 <test_pthread_fork@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_thread_memory@plt>
xor    %eax,%eax
call   1030 <test_pthread_fork@plt>
xor    %edi,%edi
call   1050 <exit@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 = call i32 (...) @test_thread_memory()
%7 = call i32 (...) @test_pthread_fork()
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_thread_memory()
%4 = tail call i32 (...) @test_pthread_fork()
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ db_simple_exec(int /*<<< orphan*/ *, char *);
void db_clear(sqlite3 *db) {
  db_simple_exec(db, "DELETE FROM client;");
  db_simple_exec(db, "DELETE FROM channel;");
  db_simple_exec(db, "DELETE FROM whowas;");
  db_simple_exec(db, "DELETE FROM forbidden_nick WHERE expiry != 0;");
}


x86 assembly (clang, -O0):
<db_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <db_simple_exec@plt>
mov    -0x8(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <db_simple_exec@plt>
mov    -0x8(%rbp),%rdi
lea    0xee2(%rip),%rsi
call   1030 <db_simple_exec@plt>
mov    -0x8(%rbp),%rdi
lea    0xee6(%rip),%rsi
call   1030 <db_simple_exec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_clear>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <db_simple_exec@plt>
lea    0xeed(%rip),%rsi
mov    %rbx,%rdi
call   1030 <db_simple_exec@plt>
lea    0xef3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <db_simple_exec@plt>
lea    0xef8(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <db_simple_exec@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"DELETE FROM client;\00"
@.str.1 = [21 x i8] c"DELETE FROM channel;\00"
@.str.2 = [20 x i8] c"DELETE FROM whowas;\00"
@.str.3 = [46 x i8] c"DELETE FROM forbidden_nick WHERE expiry != 0;\00"
define void @db_clear(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @db_simple_exec(i32* %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @db_simple_exec(i32* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @db_simple_exec(i32* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @db_simple_exec(i32* %9, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"DELETE FROM client;\00"
@.str.1 = [21 x i8] c"DELETE FROM channel;\00"
@.str.2 = [20 x i8] c"DELETE FROM whowas;\00"
@.str.3 = [46 x i8] c"DELETE FROM forbidden_nick WHERE expiry != 0;\00"
define void @db_clear(i32* %0) {
%2 = tail call i32 @db_simple_exec(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @db_simple_exec(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @db_simple_exec(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @db_simple_exec(i32* %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fun(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  int nr_of_yields = 0;
  ret = fun(1);
  printf("Number of yields %d\n", nr_of_yields);
  printf("RETURNED %d\n", ret);
  if (ret != 201) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0xc9,-0x14(%rbp)
je     1188 <main+0x68>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
cmp    $0xc9,%ebx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Number of yields %d\0A\00"
@.str.1 = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%6 = icmp ne i32 %3, 201
%7 = zext i1 %6 to i32
ret i32 %7
}
char *benchmark_result() {
  static char result = '\0';
  return (&result);
}


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

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

LLVM IR (-O0):
@benchmark_result.result = internal global i8 0
define i8* @benchmark_result() {
ret i8* @benchmark_result.result
}

LLVM IR (-O2):
@benchmark_result.result = internal global i8 0
define i8* @benchmark_result() {
ret i8* @benchmark_result.result
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int my_func(int);
int main(void) {
  int x;
  assert(my_func(x) == x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
call   1030 <my_func@plt>
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @my_func(i32 %2)
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @my_func(i32 undef)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
extern void freeMemory(void *mem) { free(mem); }


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

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

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

LLVM IR (-O2):
define void @freeMemory(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int main() {
  int a, b, c;
  if (a) {
  A:
    b = 0;
    c = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1128 <main+0x28>
jmp    111a <main+0x1a>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
const char *sas_discovery_reason_to_text(uint8_t reason) {
  if (reason == (0x01))
    return "STARTED";
  else if (reason == (0x02))
    return "COMPLETED";
  else
    return "UNKNOWN";
}


x86 assembly (clang, -O0):
<sas_discovery_reason_to_text>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1121 <sas_discovery_reason_to_text+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <sas_discovery_reason_to_text+0x46>
cmpl   $0x2,-0xc(%rbp)
jne    113b <sas_discovery_reason_to_text+0x3b>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <sas_discovery_reason_to_text+0x46>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_discovery_reason_to_text>:
cmp    $0x2,%edi
lea    0xefe(%rip),%rax
lea    0xf01(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"STARTED\00"
@.str.1 = [10 x i8] c"COMPLETED\00"
@.str.2 = [8 x i8] c"UNKNOWN\00"
define i8* @sas_discovery_reason_to_text(i32 %0) {
%2 = alloca i8*
%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 i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %7
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"STARTED\00"
@.str.1 = [10 x i8] c"COMPLETED\00"
@.str.2 = [8 x i8] c"UNKNOWN\00"
define i8* @sas_discovery_reason_to_text(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ _IO(char, int);
int ioctl(int, int /*<<< orphan*/);
int beaglelogic_memcacheinvalidate(int fd) { return ioctl(fd, _IO('k', 0x25)); }


x86 assembly (clang, -O0):
<beaglelogic_memcacheinvalidate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x6b,%edi
mov    $0x25,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beaglelogic_memcacheinvalidate>:
push   %rbx
mov    %edi,%ebx
mov    $0x6b,%edi
mov    $0x25,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @beaglelogic_memcacheinvalidate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i8 signext 107, i32 37)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @beaglelogic_memcacheinvalidate(i32 %0) {
%2 = tail call i32 @_IO(i8 signext 107, i32 37)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fatal(int /*<<< orphan*/, char *);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p = malloc(n ? n : 1);
  if (!p)
    fatal(0, "out of memory");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <xmalloc+0x24>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <xmalloc+0x32>
mov    $0x1,%eax
mov    %rax,-0x18(%rbp)
jmp    1152 <xmalloc+0x32>
mov    -0x18(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1178 <xmalloc+0x58>
xor    %edi,%edi
lea    0xe8d(%rip),%rsi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <xmalloc+0x28>
lea    0xebf(%rip),%rsi
xor    %edi,%edi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i64, i64* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi i64 [ %7, %6 ], [ 1, %8 ]
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %16, label %14
14: ; preds = %9
%15 = call i32 @fatal(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @fatal(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Dummy test\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 = [12 x i8] c"Dummy test\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Dummy test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void Key_Bind_Null_f(void) {}


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

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

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

LLVM IR (-O2):
define void @Key_Bind_Null_f() {
ret void
}
double max(double x) { return 1.0; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @max(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @max(double %0) {
ret double 1.000000e+00
}
char RotCharDown(int value, char lBound, char rBound) {
  while (value < lBound)
    value = (unsigned int)rBound - (lBound - value - 1);
  return (char)value;
}


x86 assembly (clang, -O0):
<RotCharDown>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jge    1139 <RotCharDown+0x39>
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
sub    -0x4(%rbp),%ecx
sub    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <RotCharDown+0x12>
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RotCharDown>:
mov    %edi,%eax
cmp    %edi,%esi
jle    1116 <RotCharDown+0x16>
movsbl %dl,%ecx
sub    %esi,%ecx
add    $0x1,%ecx
xchg   %ax,%ax
add    %ecx,%eax
cmp    %esi,%eax
jl     1110 <RotCharDown+0x10>
ret

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

LLVM IR (-O2):
define signext i8 @RotCharDown(i32 %0, i8 signext %1, i8 signext %2) {
%4 = sext i8 %1 to i32
%5 = icmp sgt i32 %4, %0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = sext i8 %2 to i32
%8 = sub nsw i32 %7, %4
br label %9
9: ; preds = %6, %9
%10 = phi i32 [ %0, %6 ], [ %12, %9 ]
%11 = add nsw i32 %10, 1
%12 = add i32 %8, %11
%13 = icmp slt i32 %12, %4
br i1 %13, label %9, label %14
14: ; preds = %9, %3
%15 = phi i32 [ %0, %3 ], [ %12, %9 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}
void ff_hevc_put_hevc_uni_w_qpel_v8_10_sse4() {}


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

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

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

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