xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ blocking_read(int, int);
scalar_t__ read(int, char *, int const);
void purge_fd(int fd) {
  static const int bufsize = 10;
  char buf[bufsize];
  blocking_read(fd, 0 == 1);
  while (read(fd, buf, bufsize) >= 0)
    ;
  blocking_read(fd, 0 == 0);
}


x86 assembly (clang, -O0):
<purge_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <blocking_read@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <read@plt>
cmp    $0x0,%rax
jl     115c <purge_fd+0x3c>
jmp    113c <purge_fd+0x1c>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <blocking_read@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<purge_fd>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
xor    %esi,%esi
call   1040 <blocking_read@plt>
mov    %rsp,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0xa,%edx
call   1030 <read@plt>
test   %rax,%rax
jns    1140 <purge_fd+0x20>
mov    %ebx,%edi
mov    $0x1,%esi
add    $0x18,%rsp
pop    %rbx
pop    %r14
jmp    1040 <blocking_read@plt>

LLVM IR (-O0):
@purge_fd.bufsize = internal constant i32 10
define void @purge_fd(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @llvm.stacksave()
store i8* %4, i8** %3
%5 = alloca i8, i64 10
%6 = load i32, i32* %2
%7 = call i32 @blocking_read(i32 %6, i32 0)
br label %8
8: ; preds = %12, %1
%9 = load i32, i32* %2
%10 = call i64 @read(i32 %9, i8* %5, i32 10)
%11 = icmp sge i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
br label %8
13: ; preds = %8
%14 = load i32, i32* %2
%15 = call i32 @blocking_read(i32 %14, i32 1)
%16 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @purge_fd(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @blocking_read(i32 %0, i32 0)
br label %5
5: ; preds = %5, %1
%6 = call i64 @read(i32 %0, i8* %3, i32 10)
%7 = icmp sgt i64 %6, -1
br i1 %7, label %5, label %8
8: ; preds = %5
%9 = tail call i32 @blocking_read(i32 %0, i32 1)
ret void
}
/* Variables and functions */
int atoll(char *);
int /*<<< orphan*/ get_proc_cpuinfo_data(char *, char *, int);
unsigned long long generic_get_cpu_clockrate_proccpuinfo_fallback(int cpu) {
  char buffer[512];
  if (!get_proc_cpuinfo_data("cpu MHz", buffer, cpu))
    return atoll(buffer) * 1000000;
  else
    return 0;
}


x86 assembly (clang, -O0):
<generic_get_cpu_clockrate_proccpuinfo_fallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %edi,-0xc(%rbp)
lea    -0x210(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec1(%rip),%rdi
call   1030 <get_proc_cpuinfo_data@plt>
cmp    $0x0,%eax
jne    116a <generic_get_cpu_clockrate_proccpuinfo_fallback+0x4a>
lea    -0x210(%rbp),%rdi
call   1040 <atoll@plt>
imul   $0xf4240,%eax,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1172 <generic_get_cpu_clockrate_proccpuinfo_fallback+0x52>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_get_cpu_clockrate_proccpuinfo_fallback>:
sub    $0x208,%rsp
mov    %edi,%edx
lea    0xed0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <get_proc_cpuinfo_data@plt>
test   %eax,%eax
je     1146 <generic_get_cpu_clockrate_proccpuinfo_fallback+0x26>
xor    %eax,%eax
add    $0x208,%rsp
ret
mov    %rsp,%rdi
call   1040 <atoll@plt>
imul   $0xf4240,%eax,%eax
cltq
add    $0x208,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"cpu MHz\00"
define i64 @generic_get_cpu_clockrate_proccpuinfo_fallback(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca [512 x i8]
store i32 %0, i32* %3
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @get_proc_cpuinfo_data(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %1
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%11 = call i32 @atoll(i8* %10)
%12 = mul nsw i32 %11, 1000000
%13 = sext i32 %12 to i64
store i64 %13, i64* %2
br label %15
14: ; preds = %1
store i64 0, i64* %2
br label %15
15: ; preds = %14, %9
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"cpu MHz\00"
define i64 @generic_get_cpu_clockrate_proccpuinfo_fallback(i32 %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_proc_cpuinfo_data(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @atoll(i8* %3)
%8 = mul nsw i32 %7, 1000000
%9 = sext i32 %8 to i64
br label %10
10: ; preds = %1, %6
%11 = phi i64 [ %9, %6 ], [ 0, %1 ]
ret i64 %11
}
int iora_buffer_save_all(int filno) {
  int record_num;
  int count;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @iora_buffer_save_all(i32 %0) {
ret i32 0
}
int asm_cmp64(unsigned long *a, unsigned long *b) {
  if (a[0] != b[0])
    return 1;
  if (a[1] != b[1])
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<asm_cmp64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
je     112c <asm_cmp64+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1155 <asm_cmp64+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x8(%rcx),%rax
je     114e <asm_cmp64+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <asm_cmp64+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asm_cmp64>:
mov    (%rdi),%rcx
mov    $0x1,%eax
cmp    (%rsi),%rcx
jne    111a <asm_cmp64+0x1a>
mov    0x8(%rdi),%rcx
xor    %eax,%eax
cmp    0x8(%rsi),%rcx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @asm_cmp64(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = getelementptr inbounds i64, i64* %0, i64 1
%8 = load i64, i64* %7
%9 = getelementptr inbounds i64, i64* %1, i64 1
%10 = load i64, i64* %9
%11 = icmp ne i64 %8, %10
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %2
%14 = phi i32 [ 1, %2 ], [ %12, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int code) {
  printf("\nusage:\n\n   phapi_server args\n\n\t [-l <log file>]\n\t [-d "
         "<verbose level>]\n\t [-s <server port>]\n\t [-c <callback port>]\n\t "
         "[-k]\t keep running after phTerminate\n\t [-q]\t be quiet (don't "
         "print Welcome message)\n\t [-h]\n");
  exit(code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [210 x i8] c"\0Ausage:\0A\0A phapi_server args\0A\0A\09 [-l <log file>]\0A\09 [-d <verbose level>]\0A\09 [-s <server port>]\0A\09 [-c <callback port>]\0A\09 [-k]\09 keep running after phTerminate\0A\09 [-q]\09 be quiet (don't print Welcome message)\0A\09 [-h]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@str = [209 x i8] c"\0Ausage:\0A\0A phapi_server args\0A\0A\09 [-l <log file>]\0A\09 [-d <verbose level>]\0A\09 [-s <server port>]\0A\09 [-c <callback port>]\0A\09 [-k]\09 keep running after phTerminate\0A\09 [-q]\09 be quiet (don't print Welcome message)\0A\09 [-h]\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([209 x i8], [209 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
int do_408() { return 408; }


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

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

LLVM IR (-O0):
define i32 @do_408() {
ret i32 408
}

LLVM IR (-O2):
define i32 @do_408() {
ret i32 408
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
int get_XGraphicsExposeEvent_send_event(void *_p) {
  return (int)((XGraphicsExposeEvent *)_p)->send_event;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XGraphicsExposeEvent_send_event(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 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XGraphicsExposeEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int __WORDSIZE;
int /*<<< orphan*/ __bitmap_xor(unsigned long *, unsigned long const *,
                                unsigned long const *, int);
void bitmap_xor(unsigned long *dst, const unsigned long *src1,
                const unsigned long *src2, int nbits) {
  if (nbits <= __WORDSIZE)
    *dst = *src1 ^ *src2;
  else
    __bitmap_xor(dst, src1, src2, nbits);
}


x86 assembly (clang, -O0):
<bitmap_xor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jg     1153 <bitmap_xor+0x43>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
xor    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1167 <bitmap_xor+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <__bitmap_xor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_xor>:
mov    0x2ed1(%rip),%rax
cmp    %ecx,(%rax)
jge    1120 <bitmap_xor+0x10>
jmp    1030 <__bitmap_xor@plt>
mov    (%rdx),%rax
xor    (%rsi),%rax
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
@__WORDSIZE = global i32 0
define void @bitmap_xor(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = load i32, i32* @__WORDSIZE
%6 = icmp slt i32 %5, %3
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = xor i64 %9, %8
store i64 %10, i64* %0
br label %13
11: ; preds = %4
%12 = tail call i32 @__bitmap_xor(i64* %0, i64* %1, i64* %2, i32 %3)
br label %13
13: ; preds = %11, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dateString(int, int, int);
int main(int argc, const char *argv[]) {
  dateString(22, 11, 1963);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x16,%edi
mov    $0xb,%esi
mov    $0x7ab,%edx
call   1030 <dateString@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x16,%edi
mov    $0xb,%esi
mov    $0x7ab,%edx
call   1030 <dateString@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dateString(i32 22, i32 11, i32 1963)
ret i32 0
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_seq_toss(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_seq_toss>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_seq_toss(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_seq_toss(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
long long int findroot(long long int nfs[], long long int a) {
  long long int t;
  if (nfs[a] < 0) {
    return a;
  } else {
    t = findroot(nfs, nfs[a]);
    nfs[a] = t;
    return t;
  }
}


x86 assembly (clang, -O0):
<findroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jge    1140 <findroot+0x30>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <findroot+0x61>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <findroot@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findroot>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rdi,%rsi,8),%rsi
test   %rsi,%rsi
js     112f <findroot+0x1f>
mov    %rdi,%r14
call   1030 <findroot@plt>
mov    %rax,(%r14,%rbx,8)
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @findroot(i64* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 %1
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2, %8
%7 = phi i64 [ %9, %8 ], [ %1, %2 ]
ret i64 %7
8: ; preds = %2
%9 = tail call i64 @findroot(i64* %0, i64 %4)
store i64 %9, i64* %3
br label %6
}
void *thread_4(void *arg) {
  printf("fun = %s thread_id = %u, arg = %d \n", __func__, (int)pthread_self(),
         (int)(long)arg);
}


x86 assembly (clang, -O0):
<thread_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
lea    0xebe(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_4>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xece(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    %eax,%edx
mov    %ebx,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"fun = %s thread_id = %u, arg = %d \0A\00"
@__func__.thread_4 = [9 x i8] c"thread_4\00"
define i8* @thread_4(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @pthread_self()
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.thread_4, i64 0, i64 0), i32 %4, i32 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [36 x i8] c"fun = %s thread_id = %u, arg = %d \0A\00"
@__func__.thread_4 = [9 x i8] c"thread_4\00"
define noalias i8* @thread_4(i8* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.thread_4, i64 0, i64 0), i32 %2, i32 %4)
ret i8* undef
}
int test_imm_A0uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xA0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A0uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 160
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A0uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 687194767360
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *tmpnam(int /*<<< orphan*/);
char *tempnam(const char *_dir, const char *_prefix) { return tmpnam(0); }


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

x86 assembly (clang, -O2):
<tempnam>:
xor    %edi,%edi
jmp    1030 <tmpnam@plt>

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

LLVM IR (-O2):
define i8* @tempnam(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i8* @tmpnam(i32 0)
ret i8* %3
}
int compare_int(void *a, void *b) {
  int *c = (int *)a;
  int *d = (int *)b;
  return *c - *d;
}


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

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

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

LLVM IR (-O2):
define i32 @compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int Id_SetRESUid(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int Id_SetEUid(uid_t euid) { return Id_SetRESUid((uid_t)-1, euid, (uid_t)-1); }


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

x86 assembly (clang, -O2):
<Id_SetEUid>:
mov    %edi,%esi
mov    $0xffffffff,%edi
mov    $0xffffffff,%edx
jmp    1030 <Id_SetRESUid@plt>

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

LLVM IR (-O2):
define i32 @Id_SetEUid(i32 %0) {
%2 = tail call i32 @Id_SetRESUid(i32 -1, i32 %0, i32 -1)
ret i32 %2
}
/* Type definitions */
struct fortran_stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int fortran_seek(struct fortran_stream *, int, int /*<<< orphan*/);
int fortran_rew(struct fortran_stream *stream) {
  return fortran_seek(stream, -1, SEEK_CUR);
}


x86 assembly (clang, -O0):
<fortran_rew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%esi
call   1030 <fortran_seek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fortran_rew>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%esi
jmp    1030 <fortran_seek@plt>

LLVM IR (-O0):
%struct.fortran_stream = type { i32 }
@SEEK_CUR = global i32 0
define i32 @fortran_rew(%struct.fortran_stream* %0) {
%2 = alloca %struct.fortran_stream*
store %struct.fortran_stream* %0, %struct.fortran_stream** %2
%3 = load %struct.fortran_stream*, %struct.fortran_stream** %2
%4 = load i32, i32* @SEEK_CUR
%5 = call i32 @fortran_seek(%struct.fortran_stream* %3, i32 -1, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.fortran_stream = type { i32 }
@SEEK_CUR = global i32 0
define i32 @fortran_rew(%struct.fortran_stream* %0) {
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i32 @fortran_seek(%struct.fortran_stream* %0, i32 -1, i32 %2)
ret i32 %3
}
int valid_font_id(int font_id) { return (font_id >= 0 && font_id <= 2); }


x86 assembly (clang, -O0):
<valid_font_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <valid_font_id+0x20>
cmpl   $0x2,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_font_id>:
xor    %eax,%eax
cmp    $0x3,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @valid_font_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 2
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @valid_font_id(i32 %0) {
%2 = icmp ult i32 %0, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
void vm_op_nop(void) { return; }


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

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

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

LLVM IR (-O2):
define void @vm_op_nop() {
ret void
}
int main() {
  int a = 0;
  return 0;
}


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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int atol(char *);
int /*<<< orphan*/ show_pws(int, char const *);
int main(int argc, char **argv) {
  if (argc != 3) {
    return 1;
  }
  int rid = atol(argv[1]);
  const char *pw = argv[2];
  show_pws(rid, pw);
  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)
cmpl   $0x3,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    117b <main+0x5b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <show_pws@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x3,%edi
jne    1145 <main+0x25>
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    0x10(%rbx),%rsi
mov    %eax,%edi
call   1030 <show_pws@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @show_pws(i32 %7, i8* %9)
br label %11
11: ; preds = %2, %4
%12 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello World!\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pnc_read_bool_from_console_optional(char const *, int *,
                                                       int);
void pnc_read_bool_from_console(char const *message, bool *val) {
  pnc_read_bool_from_console_optional(message, val, false);
}


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

x86 assembly (clang, -O2):
<pnc_read_bool_from_console>:
xor    %edx,%edx
jmp    1030 <pnc_read_bool_from_console_optional@plt>

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

LLVM IR (-O2):
define void @pnc_read_bool_from_console(i8* %0, i32* %1) {
%3 = tail call i32 @pnc_read_bool_from_console_optional(i8* %0, i32* %1, i32 0)
ret void
}
int module_install() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @module_install() {
ret i32 0
}
double interp2_k_cubic2(double x) {
  double result = 0.0;
  result = (2.0 * x * x * x) - (3.0 * x * x) + 1.0;
  return result;
}


x86 assembly (clang, -O0):
<interp2_k_cubic2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xed8(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_k_cubic2>:
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeec(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  0xedc(%rip),%xmm0
ret

LLVM IR (-O0):
define double @interp2_k_cubic2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = fmul double 2.000000e+00, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fmul double 3.000000e+00, %9
%11 = load double, double* %2
%12 = fmul double %10, %11
%13 = fneg double %12
%14 = call double @llvm.fmuladd.f64(double %7, double %8, double %13)
%15 = fadd double %14, 1.000000e+00
store double %15, double* %3
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @interp2_k_cubic2(double %0) {
%2 = fmul double %0, 2.000000e+00
%3 = fmul double %2, %0
%4 = fmul double %0, -3.000000e+00
%5 = fmul double %4, %0
%6 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}
void foo441(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo441(i32 %0) {
ret void
}
void XSetWindowBackground() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @slab_deinit_ctable() {
ret void
}
double sample_mel(int sample, int num, double fs) {
  double freq;
  freq = (double)(sample + 1) / (double)(num) * (fs / 2.0);
  return freq_mel(freq);
}


x86 assembly (clang, -O0):
<sample_mel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xebd(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <freq_mel@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_mel>:
push   %rax
add    $0x1,%edi
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm2
divsd  %xmm2,%xmm1
mulsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    $0x1,%al
call   1030 <freq_mel@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sample_mel(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to double
%13 = fdiv double %10, %12
%14 = load double, double* %6
%15 = fdiv double %14, 2.000000e+00
%16 = fmul double %13, %15
store double %16, double* %7
%17 = load double, double* %7
%18 = call i32 (double, ...) bitcast (i32 (...)* @freq_mel to i32 (double, ...)*)(double %17)
%19 = sitofp i32 %18 to double
ret double %19
}

LLVM IR (-O2):
define double @sample_mel(i32 %0, i32 %1, double %2) {
%4 = add nsw i32 %0, 1
%5 = sitofp i32 %4 to double
%6 = sitofp i32 %1 to double
%7 = fdiv double %5, %6
%8 = fmul double %2, 5.000000e-01
%9 = fmul double %7, %8
%10 = tail call i32 (double, ...) bitcast (i32 (...)* @freq_mel to i32 (double, ...)*)(double %9)
%11 = sitofp i32 %10 to double
ret double %11
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg4setBank6(int);
void m31setParams5006(uint16_t addr, uint8_t val) {
  (void)addr;
  prg4setBank6(val << 12);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xc,%edi
jmp    1030 <prg4setBank6@plt>

LLVM IR (-O0):
define void @m31setParams5006(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %6, 12
%8 = call i32 @prg4setBank6(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m31setParams5006(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = tail call i32 @prg4setBank6(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char *);
void ft_putendl(char const *s) {
  char *str;
  if (!s)
    return;
  str = (char *)s;
  ft_putstr(str);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <ft_putendl+0x1c>
jmp    1157 <ft_putendl+0x37>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
test   %rdi,%rdi
je     1136 <ft_putendl+0x16>
push   %rax
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>
ret

LLVM IR (-O0):
define void @ft_putendl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
br label %12
7: ; preds = %1
%8 = load i8*, i8** %2
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @ft_putstr(i8* %9)
%11 = call i32 @ft_putchar(i8 signext 10)
br label %12
12: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @ft_putendl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @ft_putstr(i8* %0)
%5 = tail call i32 @ft_putchar(i8 signext 10)
br label %6
6: ; preds = %1, %3
ret void
}
main() {
  int test(void), test2(void);
  if (test())
  lbl:
    __attribute__((unused)) if (test2()) lbl2 : __attribute((noreturn)) f();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
call   1050 <test@plt>
cmp    $0x0,%eax
je     1171 <main+0x41>
jmp    1152 <main+0x22>
call   1040 <test2@plt>
cmp    $0x0,%eax
je     116c <main+0x3c>
jmp    1165 <main+0x35>
mov    $0x0,%al
call   1030 <f@plt>
jmp    1171 <main+0x41>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <test@plt>
test   %eax,%eax
je     114a <main+0x1a>
call   1040 <test2@plt>
test   %eax,%eax
je     114a <main+0x1a>
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test()
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @test2()
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @f()
br label %8
8: ; preds = %3, %6, %0
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
char *get_value(char *buffer) {
  buffer = strchr(buffer, '=') + 1;
  while (*buffer == ' ' || *buffer == '\t') {
    buffer++;
  }
  return buffer;
}


x86 assembly (clang, -O0):
<get_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <strchr@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1157 <get_value+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1167 <get_value+0x57>
jmp    1178 <get_value+0x68>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <get_value+0x22>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_value>:
push   %rax
mov    $0x3d,%esi
call   1030 <strchr@plt>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1120 <get_value+0x10>
cmp    $0x9,%cl
je     1120 <get_value+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @get_value(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 61)
br label %3
3: ; preds = %7, %1
%4 = phi i8* [ %2, %1 ], [ %5, %7 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
switch i8 %6, label %8 [
i8 32, label %7
i8 9, label %7
]
7: ; preds = %3, %3
br label %3
8: ; preds = %3
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int write(int, char *, int);
void fail(int fd) {
  char c = 0;
  if (write(fd, &c, sizeof(c)) != sizeof(c))
    perror("Writing failure byte");
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cltq
cmp    $0x1,%rax
je     1158 <fail+0x38>
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fail>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
jne    113c <fail+0x1c>
pop    %rax
ret
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Writing failure byte\00"
define void @fail(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 0, i8* %3
%4 = load i32, i32* %2
%5 = call i32 @write(i32 %4, i8* %3, i32 1)
%6 = sext i32 %5 to i64
%7 = icmp ne i64 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Writing failure byte\00"
define void @fail(i32 %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = call i32 @write(i32 %0, i8* %2, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ createList();
int main() {
  createList();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @createList()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int size = 1024 * 1024 * 1024;
  char array[size];
  for (int i = 0; i < size; i++)
    array[i] = i % 256;
  printf("Finished!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x40000000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1183 <main+0x73>
mov    -0x1c(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1153 <main+0x43>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%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 = [11 x i8] c"Finished!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i32 0, i32* %1
store i32 1073741824, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
store i32 0, i32* %5
br label %10
10: ; preds = %21, %0
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %24
14: ; preds = %10
%15 = load i32, i32* %5
%16 = srem i32 %15, 256
%17 = trunc i32 %16 to i8
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %9, i64 %19
store i8 %17, i8* %20
br label %21
21: ; preds = %14
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %10
24: ; preds = %10
%25 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%26 = load i8*, i8** %3
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@str = [10 x i8] c"Finished!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ requestor1();
int /*<<< orphan*/ requestor2();
int main(void) {
  requestor1();
  requestor2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @requestor1()
%2 = tail call i32 (...) @requestor2()
ret i32 0
}
/* Variables and functions */
int returnFalse();
int dependentReturnFalse() { return returnFalse(); }


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

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

LLVM IR (-O0):
define i32 @dependentReturnFalse() {
%1 = call i32 (...) @returnFalse()
ret i32 %1
}

LLVM IR (-O2):
define i32 @dependentReturnFalse() {
%1 = tail call i32 (...) @returnFalse()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ clear_list();
void hooks_cleanup(void) { clear_list(); }


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

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

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

LLVM IR (-O2):
define void @hooks_cleanup() {
%1 = tail call i32 (...) @clear_list()
ret void
}