xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, char *, int);
int ini_writeint(FILE *file, char *key, int value) {
  return fprintf(file, "        %s = %d\n", key, value);
}


x86 assembly (clang, -O0):
<ini_writeint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_writeint>:
mov    %edx,%ecx
mov    %rsi,%rdx
lea    0xee4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c" %s = %d\0A\00"
define i32 @ini_writeint(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [17 x i8] c" %s = %d\0A\00"
define i32 @ini_writeint(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
ret i32 %4
}
int bar(int a, int b, int c) {
  int y = a * b;
  if (c)
    y = 12;
  return y;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1128 <bar+0x28>
movl   $0xc,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
imul   %esi,%edi
test   %edx,%edx
mov    $0xc,%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = icmp eq i32 %2, 0
%6 = select i1 %5, i32 %4, i32 12
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ loadlevel(char *);
void loadcollectionlevel(int levelnum) {
  char loadfilename[32] = "co00.lvl";
  loadfilename[2] = 48 + levelnum / 10;
  loadfilename[3] = 48 + levelnum % 10;
  loadlevel(loadfilename);
}


x86 assembly (clang, -O0):
<loadcollectionlevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
mov    %al,-0x2e(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%al
mov    %al,-0x2d(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <loadlevel@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadcollectionlevel>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    0x30(%rcx),%edx
mov    %dl,0x2(%rsp)
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x30,%al
mov    %al,0x3(%rsp)
mov    %rsp,%rdi
call   1030 <loadlevel@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.loadcollectionlevel.loadfilename = [32 x i8] c"co00.lvl\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @loadcollectionlevel(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
store i32 %0, i32* %2
%4 = bitcast [32 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 10
%7 = add nsw i32 48, %6
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 2
store i8 %8, i8* %9
%10 = load i32, i32* %2
%11 = srem i32 %10, 10
%12 = add nsw i32 48, %11
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%16 = call i32 @loadlevel(i8* %15)
ret void
}

LLVM IR (-O2):
@__const.loadcollectionlevel.loadfilename = [32 x i8] c"co00.lvl\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @loadcollectionlevel(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = sdiv i32 %0, 10
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 48
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 2
store i8 %6, i8* %7
%8 = srem i32 %0, 10
%9 = trunc i32 %8 to i8
%10 = add nsw i8 %9, 48
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 3
store i8 %10, i8* %11
%12 = call i32 @loadlevel(i8* %3)
ret void
}
/* Variables and functions */
double RAND_MAX;
double rand();
size_t TestingRandomFew(size_t index, size_t total) {
  return rand() * (100.0 / RAND_MAX);
}


x86 assembly (clang, -O0):
<TestingRandomFew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eba(%rip),%rax
movsd  (%rax),%xmm2
movsd  0xec6(%rip),%xmm1
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xeaf(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestingRandomFew>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
movsd  0xed9(%rip),%xmm1
divsd  (%rax),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xec5(%rip),%xmm1
cvttsd2si %xmm1,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i64 @TestingRandomFew(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call double (...) @rand()
%6 = load double, double* @RAND_MAX
%7 = fdiv double 1.000000e+02, %6
%8 = fmul double %5, %7
%9 = fptoui double %8 to i64
ret i64 %9
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i64 @TestingRandomFew(i64 %0, i64 %1) {
%3 = tail call double (...) @rand()
%4 = load double, double* @RAND_MAX
%5 = fdiv double 1.000000e+02, %4
%6 = fmul double %3, %5
%7 = fptoui double %6 to i64
ret i64 %7
}
/* Variables and functions */
size_t min_size(size_t a, size_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <min_size+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min_size+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_size>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @min_size(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @min_size(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
unsigned long farpeekl(unsigned int sel, void *off) {
  unsigned long ret;
  __asm__("push %%fs\n\t"
          "mov  %1, %%fs\n\t"
          "mov  %%fs:(%2), %0\n\t"
          "pop  %%fs"
          : "=r"(ret)
          : "g"(sel), "r"(off));
  return ret;
}


x86 assembly (clang, -O0):
<farpeekl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,-0x1c(%rbp)
push   %fs
mov    -0x1c(%rbp),%fs
mov    %fs:(%rax),%rax
pop    %fs
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<farpeekl>:
mov    %edi,-0x4(%rsp)
push   %fs
mov    -0x4(%rsp),%fs
mov    %fs:(%rsi),%rax
pop    %fs
ret

LLVM IR (-O0):
define i64 @farpeekl(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i64 asm "push %fs\0A\09mov $1, %fs\0A\09mov %fs:($2), $0\0A\09pop %fs", "=r,imr,r,~{dirflag},~{fpsr},~{flags}"(i32 %6, i8* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @farpeekl(i32 %0, i8* %1) {
%3 = tail call i64 asm "push %fs\0A\09mov $1, %fs\0A\09mov %fs:($2), $0\0A\09pop %fs", "=r,imr,r,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1)
ret i64 %3
}
int hwnat_qos_queue_stop(void) {}


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

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

LLVM IR (-O0):
define i32 @hwnat_qos_queue_stop() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @hwnat_qos_queue_stop() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void io_beep(void) { printf("\a"); }


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

x86 assembly (clang, -O2):
<io_beep>:
mov    $0x7,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @io_beep() {
%1 = tail call i32 @putchar(i32 7)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t PNGGetUInt32BE(const uint8_t *ptr) {
  return (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3];
}


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

x86 assembly (clang, -O2):
<PNGGetUInt32BE>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @PNGGetUInt32BE(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ lstrip(char *, char const *);
int /*<<< orphan*/ rstrip(char *, char const *);
void strip(char *s, const char *delimiters) {
  lstrip(s, delimiters);
  rstrip(s, delimiters);
}


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

x86 assembly (clang, -O2):
<strip>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <lstrip@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <rstrip@plt>

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

LLVM IR (-O2):
define void @strip(i8* %0, i8* %1) {
%3 = tail call i32 @lstrip(i8* %0, i8* %1)
%4 = tail call i32 @rstrip(i8* %0, i8* %1)
ret void
}
void VecZero3iv(int v[3]) {
  v[0] = 0;
  v[1] = 0;
  v[2] = 0;
}


x86 assembly (clang, -O0):
<VecZero3iv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecZero3iv>:
movq   $0x0,(%rdi)
movl   $0x0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecZero3iv(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 0, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 0, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 0, i32* %8
ret void
}

LLVM IR (-O2):
define void @VecZero3iv(i32* nocapture writeonly %0) {
store i32 0, i32* %0
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 0, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 2
store i32 0, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *cmd) {
  fprintf(stderr, "Usage: %s  %s://PATH  NOTIFY-USER-DATA\n", cmd, cmd);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
mov    %rcx,%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: %s %s://PATH NOTIFY-USER-DATA\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: %s %s://PATH NOTIFY-USER-DATA\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void __SLEEP(int period) {
  if (period > 0) {
    usleep(period * 1000);
  }
}


x86 assembly (clang, -O0):
<__SLEEP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1131 <__SLEEP+0x21>
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SLEEP>:
test   %edi,%edi
jle    111f <__SLEEP+0xf>
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>
ret

LLVM IR (-O0):
define void @__SLEEP(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, 1000
%8 = call i32 @usleep(i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @__SLEEP(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = mul nsw i32 %0, 1000
%5 = tail call i32 @usleep(i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
void f(void) { struct s0; }


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
int read_config(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @read_config() {
ret i32 0
}
_Complex float test(float a, float b, float c, float d) { return 1.0iF; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x3f800000,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movaps 0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define <2 x float> @test(float %0, float %1, float %2, float %3) {
%5 = alloca { float, float }
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%10 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%11 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
store float 0.000000e+00, float* %10
store float 1.000000e+00, float* %11
%12 = bitcast { float, float }* %5 to <2 x float>*
%13 = load <2 x float>, <2 x float>* %12
ret <2 x float> %13
}

LLVM IR (-O2):
define <2 x float> @test(float %0, float %1, float %2, float %3) {
ret <2 x float> <float 0.000000e+00, float 1.000000e+00>
}
void initializers() {
  int *x = ((void *)0), *y = ((void *)0);
  struct Z {};
  struct {
    struct Z z;
  } z = {(struct Z){}};
}


x86 assembly (clang, -O0):
<initializers>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { %struct.Z }
%struct.Z = type {}
define void @initializers() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca %struct.anon
store i32* null, i32** %1
store i32* null, i32** %2
%4 = bitcast %struct.anon* %3 to i8*
ret void
}

LLVM IR (-O2):
%struct.anon = type { %struct.Z }
%struct.Z = type {}
define void @initializers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void printUsageAndExit() {
  printf("Usage: csvgrep -d 'delimiter' [-f 'fileName']\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<printUsageAndExit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsageAndExit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Usage: csvgrep -d 'delimiter' [-f 'fileName']\0A\00"
@EXIT_SUCCESS = global i32 0
define void @printUsageAndExit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [46 x i8] c"Usage: csvgrep -d 'delimiter' [-f 'fileName']\00"
define void @printUsageAndExit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
unsigned int BKDRHash(char *str) {
  unsigned int seed = 131;
  unsigned int hash = 0;
  int c;
  while ((c = *str++)) {
    hash = (hash * seed) + c;
  }
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<BKDRHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x83,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1146 <BKDRHash+0x46>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <BKDRHash+0x16>
mov    -0x10(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BKDRHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <BKDRHash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
imul   $0x83,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <BKDRHash+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @BKDRHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 131
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
bool old_romwbw_bios_present(void) {
  return (*((unsigned int *)0x0040) == 0xA857);
}


x86 assembly (clang, -O0):
<old_romwbw_bios_present>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%eax
cmpl   $0xa857,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<old_romwbw_bios_present>:
xor    %eax,%eax
cmpl   $0xa857,0x40
sete   %al
ret

LLVM IR (-O0):
define i32 @old_romwbw_bios_present() {
%1 = load i32, i32* inttoptr (i64 64 to i32*)
%2 = icmp eq i32 %1, 43095
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @old_romwbw_bios_present() {
%1 = load i32, i32* inttoptr (i64 64 to i32*)
%2 = icmp eq i32 %1, 43095
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void dispose_string(void *str) { free(*(char **)str); }


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

x86 assembly (clang, -O2):
<dispose_string>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dispose_string(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
int thread_num() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thread_num() {
ret i32 0
}
int machine_interrupt_address(int int_num) {
  if (int_num > 18)
    return -1;
  return (int_num * 2 + 2) * 512;
}


x86 assembly (clang, -O0):
<machine_interrupt_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x12,-0x8(%rbp)
jle    111d <machine_interrupt_address+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    112c <machine_interrupt_address+0x2c>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x2,%eax
shl    $0x9,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<machine_interrupt_address>:
mov    %edi,%ecx
shl    $0xa,%ecx
add    $0x400,%ecx
cmp    $0x13,%edi
mov    $0xffffffff,%eax
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @machine_interrupt_address(i32 %0) {
%2 = icmp sgt i32 %0, 18
%3 = shl i32 %0, 10
%4 = add i32 %3, 1024
%5 = select i1 %2, i32 -1, i32 %4
ret i32 %5
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      state[0UL] = state[local1] + state[0UL];
      local1++;
    }
    output[0UL] = (state[0UL] - 238420169UL) + 818149947UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x3686696a,%rax
sub    $0x3a7c73b7,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1158 <RandomFunc+0x58>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <RandomFunc+0x2b>
mov    -0x18(%rbp),%rcx
sub    $0xe3600c9,%rcx
add    $0x30c3fa3b,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x1e97ef25,%eax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, 914778474
%11 = sub i64 %10, 981234615
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i64, i64* %6
%18 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %17
%19 = load i64, i64* %18
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%21 = load i64, i64* %20
%22 = add i64 %19, %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %22, i64* %23
%24 = load i64, i64* %6
%25 = add i64 %24, 1
store i64 %25, i64* %6
br label %13
26: ; preds = %13
%27 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%28 = load i64, i64* %27
%29 = sub i64 %28, 238420169
%30 = add i64 %29, 818149947
%31 = load i64*, i64** %4
%32 = getelementptr inbounds i64, i64* %31, i64 0
store i64 %30, i64* %32
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 513273637
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void checkTreeNumber(int numberOfTrees, char *fileName) {
  if (numberOfTrees <= 1) {
    printf("RAxML is expecting to read more than one tree in file %s for this "
           "operation on a set of trees!\n",
           fileName);
    printf("The program will exit now\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<checkTreeNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1163 <checkTreeNumber+0x43>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkTreeNumber>:
cmp    $0x1,%edi
jle    1136 <checkTreeNumber+0x6>
ret
push   %rax
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [96 x i8] c"RAxML is expecting to read more than one tree in file %s for this operation on a set of trees!\0A\00"
@.str.1 = [27 x i8] c"The program will exit now\0A\00"
define void @checkTreeNumber(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [96 x i8] c"RAxML is expecting to read more than one tree in file %s for this operation on a set of trees!\0A\00"
@str = [26 x i8] c"The program will exit now\00"
define void @checkTreeNumber(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void p_assert(int v_check, int v_line) {
  if (!v_check) {
    if (v_line)
      fprintf(stderr, "assert violation in line %i", v_line);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<p_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1164 <p_assert+0x44>
cmpl   $0x0,-0x8(%rbp)
je     115a <p_assert+0x3a>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_assert>:
test   %edi,%edi
je     1125 <p_assert+0x5>
ret
push   %rax
mov    %esi,%edx
test   %esi,%esi
je     1141 <p_assert+0x21>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"assert violation in line %i\00"
define void @p_assert(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 = icmp ne i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* @stderr
%12 = load i32, i32* %4
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %7
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"assert violation in line %i\00"
define void @p_assert(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %9
9: ; preds = %6, %4
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void dump(int *array, int size) {
  for (int i = 0; i < size; i++) {
    printf("%d,", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <dump+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <dump+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <dump+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <dump+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d,\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @dump(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d,\00"
define void @dump(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ my_assert(int);
void should_report_assertion_failure(int x) {
  x = 0;
  my_assert(x);
}


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

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

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

LLVM IR (-O2):
define void @should_report_assertion_failure(i32 %0) {
%2 = tail call i32 @my_assert(i32 0)
ret void
}
/* Type definitions */
struct hashmap_iter {
  int dummy;
};
struct hashmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hashmap_iter_init(struct hashmap *, struct hashmap_iter *);
void *hashmap_iter_next(struct hashmap_iter *);
void *hashmap_iter_first(struct hashmap *map, struct hashmap_iter *iter) {
  hashmap_iter_init(map, iter);
  return hashmap_iter_next(iter);
}


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

x86 assembly (clang, -O2):
<hashmap_iter_first>:
push   %rbx
mov    %rsi,%rbx
call   1030 <hashmap_iter_init@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <hashmap_iter_next@plt>

LLVM IR (-O0):
%struct.hashmap = type { i32 }
%struct.hashmap_iter = type { i32 }
define i8* @hashmap_iter_first(%struct.hashmap* %0, %struct.hashmap_iter* %1) {
%3 = alloca %struct.hashmap*
%4 = alloca %struct.hashmap_iter*
store %struct.hashmap* %0, %struct.hashmap** %3
store %struct.hashmap_iter* %1, %struct.hashmap_iter** %4
%5 = load %struct.hashmap*, %struct.hashmap** %3
%6 = load %struct.hashmap_iter*, %struct.hashmap_iter** %4
%7 = call i32 @hashmap_iter_init(%struct.hashmap* %5, %struct.hashmap_iter* %6)
%8 = load %struct.hashmap_iter*, %struct.hashmap_iter** %4
%9 = call i8* @hashmap_iter_next(%struct.hashmap_iter* %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.hashmap = type { i32 }
%struct.hashmap_iter = type { i32 }
define i8* @hashmap_iter_first(%struct.hashmap* %0, %struct.hashmap_iter* %1) {
%3 = tail call i32 @hashmap_iter_init(%struct.hashmap* %0, %struct.hashmap_iter* %1)
%4 = tail call i8* @hashmap_iter_next(%struct.hashmap_iter* %1)
ret i8* %4
}
int page_order(struct ring_buffer *rb) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ring_buffer = type opaque
define i32 @page_order(%struct.ring_buffer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void version(char *progname) {
  printf("%s version 1.0\n", progname);
  printf("By Ludwig Jaffe based on remserial 1.4 by Paul Davis\n", progname);
  printf("License: GPLv2\n", progname);
}


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

x86 assembly (clang, -O2):
<version>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s version 1.0\0A\00"
@.str.1 = [54 x i8] c"By Ludwig Jaffe based on remserial 1.4 by Paul Davis\0A\00"
@.str.2 = [16 x i8] c"License: GPLv2\0A\00"
define void @version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s version 1.0\0A\00"
@.str.1 = [54 x i8] c"By Ludwig Jaffe based on remserial 1.4 by Paul Davis\0A\00"
@.str.2 = [16 x i8] c"License: GPLv2\0A\00"
define void @version(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
unsigned add(unsigned a, unsigned b) {
  if (a == 0)
    return b;
  return add(--a, ++b);
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <add+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <add+0x3d>
mov    -0x8(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x8(%rbp)
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
call   1030 <add@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add(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 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = add i32 %11, -1
store i32 %12, i32* %4
%13 = load i32, i32* %5
%14 = add i32 %13, 1
store i32 %14, i32* %5
%15 = call i32 @add(i32 %12, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ do_exit(int /*<<< orphan*/);
void die(int notused) {
  (void)notused;
  do_exit(0);
}


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

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

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

LLVM IR (-O2):
define void @die(i32 %0) {
%2 = tail call i32 @do_exit(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void baz_6(int a, int b, int c) {
  if (a == 39 && b == 41)
    foo();
  if (c == 12 || b == 41)
    bar();
}


x86 assembly (clang, -O0):
<baz_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x27,-0x4(%rbp)
jne    114c <baz_6+0x2c>
cmpl   $0x29,-0x8(%rbp)
jne    114c <baz_6+0x2c>
mov    $0x0,%al
call   1040 <foo@plt>
cmpl   $0xc,-0xc(%rbp)
je     1160 <baz_6+0x40>
cmpl   $0x29,-0x8(%rbp)
jne    1167 <baz_6+0x47>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz_6>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
cmp    $0x27,%edi
jne    1138 <baz_6+0x18>
cmp    $0x29,%ebp
jne    1138 <baz_6+0x18>
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x29,%ebp
je     1149 <baz_6+0x29>
cmp    $0xc,%ebx
je     1149 <baz_6+0x29>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @baz_6(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 39
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 41
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @foo()
br label %14
14: ; preds = %12, %9, %3
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 12
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 41
br i1 %19, label %20, label %22
20: ; preds = %17, %14
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %17
ret void
}

LLVM IR (-O2):
define void @baz_6(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 39
%5 = icmp eq i32 %1, 41
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 (...) @foo()
br label %9
9: ; preds = %7, %3
%10 = icmp eq i32 %2, 12
%11 = or i1 %5, %10
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 (...) @bar()
br label %14
14: ; preds = %9, %12
ret void
}
void H_Pass_16_C() {}


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

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

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

LLVM IR (-O2):
define void @H_Pass_16_C() {
ret void
}
int ifloor(float f) { return (int)(f); }


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

x86 assembly (clang, -O2):
<ifloor>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @ifloor(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptosi float %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @ifloor(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ isblank(char const);
const char *eat_blanks(const char *string) {
  while (*string) {
    if (!isblank(*string))
      break;
    string++;
  }
  return string;
}


x86 assembly (clang, -O0):
<eat_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1154 <eat_blanks+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isblank@plt>
cmp    $0x0,%eax
jne    1143 <eat_blanks+0x33>
jmp    1154 <eat_blanks+0x44>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <eat_blanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_blanks>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <eat_blanks+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isblank@plt>
test   %eax,%eax
je     1138 <eat_blanks+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <eat_blanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @eat_blanks(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isblank(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %9, %4, %1
%14 = phi i8* [ %0, %1 ], [ %6, %4 ], [ %10, %9 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ rom_load(char *);
void dmg_load_rom(char *rom_path) { rom_load(rom_path); }


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

x86 assembly (clang, -O2):
<dmg_load_rom>:
jmp    1030 <rom_load@plt>

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

LLVM IR (-O2):
define void @dmg_load_rom(i8* %0) {
%2 = tail call i32 @rom_load(i8* %0)
ret void
}