xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ babl_base_type_float();
int /*<<< orphan*/ babl_base_type_u16();
int /*<<< orphan*/ babl_base_type_u32();
int /*<<< orphan*/ babl_base_type_u8();
void types(void) {
  babl_base_type_float();
  babl_base_type_u8();
  babl_base_type_u16();
  babl_base_type_u32();
}


x86 assembly (clang, -O0):
<types>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <babl_base_type_float@plt>
mov    $0x0,%al
call   1040 <babl_base_type_u8@plt>
mov    $0x0,%al
call   1030 <babl_base_type_u16@plt>
mov    $0x0,%al
call   1050 <babl_base_type_u32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<types>:
push   %rax
xor    %eax,%eax
call   1060 <babl_base_type_float@plt>
xor    %eax,%eax
call   1040 <babl_base_type_u8@plt>
xor    %eax,%eax
call   1030 <babl_base_type_u16@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <babl_base_type_u32@plt>

LLVM IR (-O0):
define void @types() {
%1 = call i32 (...) @babl_base_type_float()
%2 = call i32 (...) @babl_base_type_u8()
%3 = call i32 (...) @babl_base_type_u16()
%4 = call i32 (...) @babl_base_type_u32()
ret void
}

LLVM IR (-O2):
define void @types() {
%1 = tail call i32 (...) @babl_base_type_float()
%2 = tail call i32 (...) @babl_base_type_u8()
%3 = tail call i32 (...) @babl_base_type_u16()
%4 = tail call i32 (...) @babl_base_type_u32()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x11() {
  Assert_real((isgraph(17) == 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_isgraph.c",
              90, ("isgraph should be 0 for 0x11"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x11>:
push   %rax
mov    $0x11,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x5a,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x11\00"
define void @t_isgraph_0x11() {
%1 = call i64 @isgraph(i32 17)
%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 90, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x11\00"
define void @t_isgraph_0x11() {
%1 = tail call i64 @isgraph(i32 17)
%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 90, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
main() {
  f(&main);
  return sizeof(main);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32 (...)*, ...) bitcast (i32 (...)* @f to i32 (i32 (...)*, ...)*)(i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
ret i32 1
}
void transfer_RGBA8888_to_RGBA8888(unsigned char *(*output),
                                   unsigned char *input) {
  (*output)[0] = input[0];
  (*output)[1] = input[1];
  (*output)[2] = input[2];
  (*output)[3] = input[3];
  (*output) += 4;
}


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

x86 assembly (clang, -O2):
<transfer_RGBA8888_to_RGBA8888>:
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
mov    0x3(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x3(%rcx)
addq   $0x4,(%rdi)
ret

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

LLVM IR (-O2):
define void @transfer_RGBA8888_to_RGBA8888(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8*, i8** %0
store i8 %3, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = load i8, i8* %5
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %8
%9 = getelementptr inbounds i8, i8* %1, i64 2
%10 = load i8, i8* %9
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 %10, i8* %12
%13 = getelementptr inbounds i8, i8* %1, i64 3
%14 = load i8, i8* %13
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 %14, i8* %16
%17 = load i8*, i8** %0
%18 = getelementptr inbounds i8, i8* %17, i64 4
store i8* %18, i8** %0
ret void
}
int check_cmp(int *a, int *b) {
  if (*a > *b)
    return 1;
  if (*a < *b)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<check_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <check_cmp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    114f <check_cmp+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1148 <check_cmp+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <check_cmp+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_cmp>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @check_cmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = icmp slt i32 %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Variables and functions */
int atoi(char *);
int strlen(char *);
void F_ValToInt(char *str, int *i) {
  str[strlen(str) - 1] = 0;
  *i = atoi(str);
}


x86 assembly (clang, -O0):
<F_ValToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F_ValToInt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
call   1040 <atoi@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @F_ValToInt(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %3
%12 = call i32 @atoi(i8* %11)
%13 = load i32*, i32** %4
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
define void @F_ValToInt(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
%7 = tail call i32 @atoi(i8* %0)
store i32 %7, i32* %1
ret void
}
int bump_detect_front() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bump_detect_front() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rep_ret();
int /*<<< orphan*/ repnz_ret();
int main() {
  rep_ret();
  repnz_ret();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rep_ret()
%2 = tail call i32 (...) @repnz_ret()
ret i32 0
}
void i2d_PKCS7_SIGNED(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_SIGNED() {
ret void
}
/* Variables and functions */
int v4l2_dup(int);
__attribute__((visibility("default"))) int dup(int fd) { return v4l2_dup(fd); }


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

x86 assembly (clang, -O2):
<dup>:
jmp    1030 <v4l2_dup@plt>

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

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @v4l2_dup(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *listFilesDir(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ write(int, char *, int);
void lsFunction(int fd, char *dirName) {
  printf("LS -> LOG Header %s \n", dirName);
  static char buffer[8096 + 1];
  sprintf(buffer, "%s", listFilesDir(dirName));
  write(fd, buffer, 8096);
}


x86 assembly (clang, -O0):
<lsFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <listFilesDir@plt>
mov    %rax,%rdx
lea    0x2ede(%rip),%rdi
lea    0xe9d(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    0x2ec8(%rip),%rsi
mov    $0x1fa0,%edx
call   1040 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsFunction>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeb1(%rip),%rdi
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <listFilesDir@plt>
lea    0x2eed(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1fa0,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <write@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"LS -> LOG Header %s \0A\00"
@lsFunction.buffer = internal global [8097 x i8] zeroinitializer
@.str.1 = [3 x i8] c"%s\00"
define void @lsFunction(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i8* @listFilesDir(i8* %7)
%9 = call i32 @sprintf(i8* getelementptr inbounds ([8097 x i8], [8097 x i8]* @lsFunction.buffer, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %3
%11 = call i32 @write(i32 %10, i8* getelementptr inbounds ([8097 x i8], [8097 x i8]* @lsFunction.buffer, i64 0, i64 0), i32 8096)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"LS -> LOG Header %s \0A\00"
@lsFunction.buffer = internal global [8097 x i8] zeroinitializer
define void @lsFunction(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i8* @listFilesDir(i8* %1)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([8097 x i8], [8097 x i8]* @lsFunction.buffer, i64 0, i64 0), i8* dereferenceable(1) %4)
%6 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([8097 x i8], [8097 x i8]* @lsFunction.buffer, i64 0, i64 0), i32 8096)
ret void
}
int xhFromWyDxhBorder(int wy) { return (wy - (2 * 100)); }


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

x86 assembly (clang, -O2):
<xhFromWyDxhBorder>:
lea    -0xc8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xhFromWyDxhBorder(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 200
ret i32 %4
}

LLVM IR (-O2):
define i32 @xhFromWyDxhBorder(i32 %0) {
%2 = add nsw i32 %0, -200
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ ENOTDIR;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
int /*<<< orphan*/ *opendir(char *);
void test_isfile(void) {
  DIR *dir = opendir("tests/1/file");
  assert(dir == NULL);
  assert(errno == ENOTDIR);
}


x86 assembly (clang, -O0):
<test_isfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%rax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isfile>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <opendir@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%rax
mov    0x2eac(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"tests/1/file\00"
@errno = global i64 0
@ENOTDIR = global i64 0
define void @test_isfile() {
%1 = alloca i32*
%2 = call i32* @opendir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp eq i32* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* @errno
%8 = load i64, i64* @ENOTDIR
%9 = icmp eq i64 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"tests/1/file\00"
@errno = global i64 0
@ENOTDIR = global i64 0
define void @test_isfile() {
%1 = tail call i32* @opendir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32* %1, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOTDIR
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret void
}
main() {
  int i;
  _Static_assert(sizeof(i) == sizeof(int), "buh");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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
store i32 0, i32* %1
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define i32 @has_3DNow() {
ret i32 0
}
int driveFL(int forwardPower, int turnPower) { return 0; }


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

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

LLVM IR (-O0):
define i32 @driveFL(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 @driveFL(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
size_t ft_count_array(const char **array) {
  size_t size;
  size = 0;
  while (array[size])
    ++size;
  return (size);
}


x86 assembly (clang, -O0):
<ft_count_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1134 <ft_count_array+0x34>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ft_count_array+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_count_array>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <ft_count_array+0x10>
ret

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

LLVM IR (-O2):
define i64 @ft_count_array(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
void _ZGr32_java_Sutil_Siso4217__properties(void) {}


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

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

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

LLVM IR (-O2):
define void @_ZGr32_java_Sutil_Siso4217__properties() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CounterToLocalTimeC__1__Counter__overflow();
int /*<<< orphan*/ TransformCounterC__0__CounterFrom__overflow();
void AtmegaCounterP__0__Counter__overflow(void) {
  CounterToLocalTimeC__1__Counter__overflow();
  TransformCounterC__0__CounterFrom__overflow();
}


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

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

LLVM IR (-O0):
define void @AtmegaCounterP__0__Counter__overflow() {
%1 = call i32 (...) @CounterToLocalTimeC__1__Counter__overflow()
%2 = call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
ret void
}

LLVM IR (-O2):
define void @AtmegaCounterP__0__Counter__overflow() {
%1 = tail call i32 (...) @CounterToLocalTimeC__1__Counter__overflow()
%2 = tail call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
ret void
}
void fortranflush_(int *rank) {}


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

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

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

LLVM IR (-O2):
define void @fortranflush_(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
void *memzero32(void *dest, size_t n) {
  uint32_t z32 = 0U;
  do {
    uint32_t *p = (uint32_t *)dest;
    for (; n >= sizeof(uint32_t); n -= sizeof(uint32_t))
      *p++ = z32;
  } while (0);
  return (dest);
}


x86 assembly (clang, -O0):
<memzero32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x4,-0x10(%rbp)
jb     114b <memzero32+0x4b>
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x20(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
sub    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    111b <memzero32+0x1b>
jmp    1150 <memzero32+0x50>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memzero32>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x4,%rsi
jb     112b <memzero32+0x1b>
mov    %rsi,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @memzero32(i8* returned writeonly %0, i64 %1) {
%3 = icmp ugt i64 %1, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = and i64 %1, -4
br label %6
6: ; preds = %4, %2
ret i8* %0
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
double tvtod(struct timeval tv) {
  return (tv.tv_sec + ((double)tv.tv_usec / 1000000.0));
}


x86 assembly (clang, -O0):
<tvtod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tvtod>:
cvtsi2sd %rdi,%xmm1
divsd  0xef3(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @tvtod(double %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to { double, i64 }*
%5 = getelementptr inbounds { double, i64 }, { double, i64 }* %4, i32 0, i32 0
store double %0, double* %5
%6 = getelementptr inbounds { double, i64 }, { double, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load double, double* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
%13 = fadd double %8, %12
ret double %13
}

LLVM IR (-O2):
define double @tvtod(double %0, i64 %1) {
%3 = sitofp i64 %1 to double
%4 = fdiv double %3, 1.000000e+06
%5 = fadd double %4, %0
ret double %5
}
/* Variables and functions */
double sin(double);
double fun_2D_sin(double x, double unused_0, double unused_1) {
  unused_0 = unused_0;
  unused_1 = unused_1;
  return sin(x);
}


x86 assembly (clang, -O0):
<fun_2D_sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_2D_sin>:
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @fun_2D_sin(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
store double %7, double* %5
%8 = load double, double* %6
store double %8, double* %6
%9 = load double, double* %4
%10 = call double @sin(double %9)
ret double %10
}

LLVM IR (-O2):
define double @fun_2D_sin(double %0, double %1, double %2) {
%4 = tail call double @sin(double %0)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_sd(double);
__m128d test_mm_set_sd(double A) { return _mm_set_sd(A); }


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

x86 assembly (clang, -O2):
<test_mm_set_sd>:
jmp    1030 <_mm_set_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_set_sd(double %0) {
%2 = tail call i32 @_mm_set_sd(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void printArray(int *arr, int len) {
  do {
    if (0)
      fprintf(stderr, "[%d", arr[0]);
  } while (0);
  for (int i = 1; i < len; i++) {
    do {
      if (0)
        fprintf(stderr, "\t%d", arr[i]);
    } while (0);
  }
  do {
    if (0)
      fprintf(stderr, "]\n");
  } while (0);
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
jmp    1110 <printArray+0x10>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1140 <printArray+0x40>
jmp    1128 <printArray+0x28>
jmp    112d <printArray+0x2d>
jmp    1132 <printArray+0x32>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1117 <printArray+0x17>
jmp    1145 <printArray+0x45>
jmp    114a <printArray+0x4a>
pop    %rbp
ret

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

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

LLVM IR (-O2):
@stderr = global i32 0
define void @printArray(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
void main() {
  int c;
  while (c != EOF) {
    c = getchar();
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
je     1151 <main+0x31>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
jmp    1128 <main+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <putchar@plt>
cmp    (%r14),%ebx
jne    1130 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @putchar(i32 %2)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %2, %4
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t from_bigendian(uint32_t n) {
  union {
    uint32_t big;
    uint8_t bytes[4];
  } u;
  u.big = n;
  return u.bytes[0] << 24 | u.bytes[1] << 16 | u.bytes[2] << 8 | u.bytes[3];
}


x86 assembly (clang, -O0):
<from_bigendian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x18,%eax
mov    -0x14(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { [4 x i32] }
define i32 @from_bigendian(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to [4 x i32]*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%8 = load i32, i32* %7
%9 = shl i32 %8, 24
%10 = bitcast %union.anon* %3 to [4 x i32]*
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0, i64 1
%12 = load i32, i32* %11
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = bitcast %union.anon* %3 to [4 x i32]*
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 2
%17 = load i32, i32* %16
%18 = shl i32 %17, 8
%19 = or i32 %14, %18
%20 = bitcast %union.anon* %3 to [4 x i32]*
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 3
%22 = load i32, i32* %21
%23 = or i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @from_bigendian(i32 %0) {
ret i32 -1
}
unsigned long hash_dbj2(char *str) {
  unsigned long hash = 5381;
  unsigned long c;
  while ((c = *str++) != '\0') {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_dbj2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbq (%rax),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     114a <hash_dbj2+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_dbj2+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_dbj2>:
mov    (%rdi),%cl
test   %cl,%cl
je     113d <hash_dbj2+0x3d>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %rdx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbq %cl,%rcx
shl    $0x5,%rax
add    %rdx,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %rax,%rdx
test   %cl,%cl
jne    1120 <hash_dbj2+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_dbj2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = sext i8 %5 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i64 %7, 33
%11 = add i64 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
void avpriv_slicethread_free() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_slicethread_free() {
ret void
}
/* Type definitions */
typedef scalar_t__ voidpf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int fclose_file_func(voidpf opaque, voidpf stream) {
  int ret;
  ret = fclose((FILE *)stream);
  return ret;
}


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

x86 assembly (clang, -O2):
<fclose_file_func>:
mov    %rsi,%rdi
jmp    1030 <fclose@plt>

LLVM IR (-O0):
define i32 @fclose_file_func(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i32*
%8 = call i32 @fclose(i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @fclose_file_func(i64 %0, i64 %1) {
%3 = inttoptr i64 %1 to i32*
%4 = tail call i32 @fclose(i32* %3)
ret i32 %4
}
/* Variables and functions */
void *__builtin_alloca(unsigned long);
void *__builtin_malloc(unsigned long);
int /*<<< orphan*/ f(void *);
void bar(long unsigned int len) {
  void *p;
  if (len > 500)
    p = __builtin_alloca(len);
  else
    p = __builtin_malloc(len);
  f(p);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1f4,-0x8(%rbp)
jbe    1158 <bar+0x38>
mov    -0x8(%rbp),%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,-0x10(%rbp)
jmp    1165 <bar+0x45>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <f@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbp
mov    %rsp,%rbp
cmp    $0x1f5,%rdi
jb     1140 <bar+0x20>
mov    %rsp,%rax
add    $0xf,%rdi
and    $0xfffffffffffffff0,%rdi
sub    %rdi,%rax
mov    %rax,%rsp
jmp    1145 <bar+0x25>
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <f@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @bar(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ugt i64 %4, 500
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = alloca i8, i64 %7
store i8* %8, i8** %3
br label %12
9: ; preds = %1
%10 = load i64, i64* %2
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %3
br label %12
12: ; preds = %9, %6
%13 = load i8*, i8** %3
%14 = call i32 @f(i8* %13)
ret void
}

LLVM IR (-O2):
define void @bar(i64 %0) {
%2 = icmp ugt i64 %0, 500
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = alloca i8, i64 %0
br label %7
5: ; preds = %1
%6 = tail call i8* @malloc(i64 %0)
br label %7
7: ; preds = %5, %3
%8 = phi i8* [ %4, %3 ], [ %6, %5 ]
%9 = call i32 @f(i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C();
int /*<<< orphan*/ printf(char *);
int B(void) {
  printf("enter B\n");
  C();
  printf("exit B\n");
}


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <C@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <C@plt>
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"enter B\0A\00"
@.str.1 = [8 x i8] c"exit B\0A\00"
define i32 @B() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @C()
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@str = [8 x i8] c"enter B\00"
@str.2 = [7 x i8] c"exit B\00"
define i32 @B() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @C()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.2, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ck_malloc(size_t);
void *memcpy(int /*<<< orphan*/, void const *, size_t);
void *memdup(const void *src, size_t n) { return memcpy(ck_malloc(n), src, n); }


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

x86 assembly (clang, -O2):
<memdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <ck_malloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @memdup(i8* %0, i64 %1) {
%3 = tail call i32 @ck_malloc(i64 %1)
%4 = tail call i8* @memcpy(i32 %3, i8* %0, i64 %1)
ret i8* %4
}
int a_twist_l_on_eloc(eloc)
int eloc;
{
  int temp_arr[12];
  a_eloc_unpack(eloc, temp_arr);
  four_cycle(temp_arr, 11, 7, 9, 3);
  return a_eloc_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_l_on_eloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <a_eloc_unpack@plt>
lea    -0x40(%rbp),%rdi
mov    $0xb,%esi
mov    $0x7,%edx
mov    $0x9,%ecx
mov    $0x3,%r8d
mov    $0x0,%al
call   1030 <four_cycle@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <a_eloc_pack@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_l_on_eloc>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <a_eloc_unpack@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0x7,%edx
mov    $0x9,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1030 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <a_eloc_pack@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_l_on_eloc(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 11, i32 7, i32 9, i32 3)
%9 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @a_twist_l_on_eloc(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 11, i32 7, i32 9, i32 3)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ write4shell(char *, int);
void write4shell_new(char *path) {
  if (path)
    if (*path == '1') {
      write4shell("", 1);
      return;
    }
  write4shell("", 0);
}


x86 assembly (clang, -O0):
<write4shell_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <write4shell_new+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jne    114d <write4shell_new+0x3d>
lea    0xec2(%rip),%rdi
mov    $0x1,%esi
call   1030 <write4shell@plt>
jmp    1160 <write4shell_new+0x50>
jmp    1152 <write4shell_new+0x42>
lea    0xea7(%rip),%rdi
xor    %esi,%esi
call   1030 <write4shell@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write4shell_new>:
test   %rdi,%rdi
je     111f <write4shell_new+0xf>
mov    $0x1,%esi
cmpb   $0x31,(%rdi)
je     1121 <write4shell_new+0x11>
xor    %esi,%esi
lea    0xed8(%rip),%rdi
jmp    1030 <write4shell@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @write4shell_new(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 %13
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 49
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = call i32 @write4shell(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
br label %15
12: ; preds = %5
br label %13
13: ; preds = %12, %1
%14 = call i32 @write4shell(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
br label %15
15: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @write4shell_new(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 49
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
%9 = tail call i32 @write4shell(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ Qexpand_squiggle(char const *, char *);
int rename(char *, char *);
int Qrename(const char *old, const char *new) {
  char e_old[PATH_MAX];
  char e_new[PATH_MAX];
  Qexpand_squiggle(old, e_old);
  Qexpand_squiggle(new, e_new);
  return rename(e_old, e_new);
}


x86 assembly (clang, -O0):
<Qrename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rsi
sub    %rdx,%rsi
mov    %rsi,-0x38(%rbp)
mov    %rsi,%rsp
mov    %rcx,-0x20(%rbp)
mov    (%rax),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <Qexpand_squiggle@plt>
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdi
call   1040 <Qexpand_squiggle@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <rename@plt>
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Qrename>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r15
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r15,%rsi
call   1040 <Qexpand_squiggle@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <Qexpand_squiggle@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <rename@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
define i32 @Qrename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i32, i32* @PATH_MAX
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %5
%11 = alloca i8, i64 %9
store i64 %9, i64* %6
%12 = load i32, i32* @PATH_MAX
%13 = zext i32 %12 to i64
%14 = alloca i8, i64 %13
store i64 %13, i64* %7
%15 = load i8*, i8** %3
%16 = call i32 @Qexpand_squiggle(i8* %15, i8* %11)
%17 = load i8*, i8** %4
%18 = call i32 @Qexpand_squiggle(i8* %17, i8* %14)
%19 = call i32 @rename(i8* %11, i8* %14)
%20 = load i8*, i8** %5
ret i32 %19
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
define i32 @Qrename(i8* %0, i8* %1) {
%3 = load i32, i32* @PATH_MAX
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = alloca i8, i64 %4
%7 = call i32 @Qexpand_squiggle(i8* %0, i8* %5)
%8 = call i32 @Qexpand_squiggle(i8* %1, i8* %6)
%9 = call i32 @rename(i8* %5, i8* %6)
ret i32 %9
}