xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int sum(int, int);
int __attribute__((used)) __attribute__((visibility("default")))
test(int32_t arg1, int32_t arg2) {
  int x = arg1 + arg2;
  int y = arg1 - arg2;
  return sum(x, y) / 2;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <sum@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %edi,%eax
lea    (%rsi,%rax,1),%edi
sub    %esi,%eax
mov    %eax,%esi
call   1030 <sum@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
sar    %eax
pop    %rcx
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i32)* @test to i8*)], section "llvm.metadata"
define i32 @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @sum(i32 %13, i32 %14)
%16 = sdiv i32 %15, 2
ret i32 %16
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, i32)* @test to i8*)], section "llvm.metadata"
define i32 @test(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sub nsw i32 %0, %1
%5 = tail call i32 @sum(i32 %3, i32 %4)
%6 = sdiv i32 %5, 2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void copyname(char *name, char *s) {
  strncpy(name, s, 16);
  name[16] = 0;
}


x86 assembly (clang, -O0):
<copyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
movb   $0x0,0x10(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyname>:
push   %rbx
mov    %rdi,%rbx
mov    $0x10,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x10(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @copyname(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 @strncpy(i8* %5, i8* %6, i32 16)
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 16
store i8 0, i8* %9
ret void
}

LLVM IR (-O2):
define void @copyname(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* %0, i8* %1, i32 16)
%4 = getelementptr inbounds i8, i8* %0, i64 16
store i8 0, i8* %4
ret void
}
/* Variables and functions */
unsigned int getbits(int, int, int);
int /*<<< orphan*/ printf(char *, unsigned int);
main() {
  unsigned a = getbits(255, 3, 4);
  printf("%d\n", a);
  unsigned b = getbits(3, 1, 2);
  printf("%d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xff,%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1040 <getbits@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1040 <getbits@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xff,%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1040 <getbits@plt>
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1040 <getbits@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @getbits(i32 255, i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @getbits(i32 3, i32 1, i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CallApplication();
scalar_t__ CheckForceUpdate();
int /*<<< orphan*/ HandleUpdate();
void main(void) {
  if (CheckForceUpdate()) {
    HandleUpdate();
  } else {
    CallApplication();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <CheckForceUpdate@plt>
cmp    $0x0,%rax
je     1151 <main+0x21>
mov    $0x0,%al
call   1030 <HandleUpdate@plt>
jmp    1158 <main+0x28>
mov    $0x0,%al
call   1050 <CallApplication@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <CheckForceUpdate@plt>
test   %rax,%rax
je     1145 <main+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <HandleUpdate@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <CallApplication@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i64 (...) @CheckForceUpdate()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @HandleUpdate()
br label %7
5: ; preds = %0
%6 = call i32 (...) @CallApplication()
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @CheckForceUpdate()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @HandleUpdate()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @CallApplication()
br label %7
7: ; preds = %5, %3
ret void
}
int pw(int v) { return v & ((1024 * 1024) - 1); }


x86 assembly (clang, -O0):
<pw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pw>:
mov    %edi,%eax
and    $0xfffff,%eax
ret

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

LLVM IR (-O2):
define i32 @pw(i32 %0) {
%2 = and i32 %0, 1048575
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ decomp(char, char *);
char *malloc(int);
scalar_t__ read(int, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
void read_huf(char *enc, int fd) {
  int err;
  char *bit, buff;
  bit = malloc(8 * sizeof(int));
  while (read(fd, &buff, 1) > 0) {
    decomp(buff, bit);
    strcat(enc, bit);
  }
}


x86 assembly (clang, -O0):
<read_huf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x20,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x19(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x0,%rax
jle    1199 <read_huf+0x59>
mov    -0x19(%rbp),%al
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1040 <decomp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strcat@plt>
jmp    115d <read_huf+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_huf>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r14
mov    $0x20,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0x7(%rsp),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
jle    11ac <read_huf+0x6c>
lea    0x7(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl 0x7(%rsp),%edi
mov    %rbx,%rsi
call   1040 <decomp@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <strcat@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
jg     1180 <read_huf+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @read_huf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = call i8* @malloc(i32 32)
store i8* %8, i8** %6
br label %9
9: ; preds = %13, %2
%10 = load i32, i32* %4
%11 = call i64 @read(i32 %10, i8* %7, i32 1)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i8, i8* %7
%15 = load i8*, i8** %6
%16 = call i32 @decomp(i8 signext %14, i8* %15)
%17 = load i8*, i8** %3
%18 = load i8*, i8** %6
%19 = call i32 @strcat(i8* %17, i8* %18)
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @read_huf(i8* %0, i32 %1) {
%3 = alloca i8
%4 = tail call dereferenceable_or_null(32) i8* @malloc(i32 32)
%5 = call i64 @read(i32 %1, i8* %3, i32 1)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2, %7
%8 = load i8, i8* %3
%9 = tail call i32 @decomp(i8 signext %8, i8* %4)
%10 = tail call i32 @strcat(i8* %0, i8* %4)
%11 = call i64 @read(i32 %1, i8* %3, i32 1)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %2
ret void
}
void signed_char_rem_signed_char(signed char *LHS, signed char RHS) {
  (*LHS) %= RHS;
}


x86 assembly (clang, -O0):
<signed_char_rem_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsbl (%rax),%eax
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %dl,%cl
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_rem_signed_char>:
movsbl (%rdi),%eax
cwtd
idiv   %si
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_rem_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = srem i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @signed_char_rem_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i16
%5 = sext i8 %1 to i16
%6 = srem i16 %4, %5
%7 = trunc i16 %6 to i8
store i8 %7, i8* %0
ret void
}
unsigned long pointer_hash(void *location) { return (unsigned long)location; }


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

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

LLVM IR (-O0):
define i64 @pointer_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @pointer_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY_ASN1_METHOD;

/* Variables and functions */
int ameth_cmp(int /*<<< orphan*/ const *const *,
              int /*<<< orphan*/ const *const *);
int ameth_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {
  const EVP_PKEY_ASN1_METHOD *const *a = a_;
  const EVP_PKEY_ASN1_METHOD *const *b = b_;
  return ameth_cmp(a, b);
}


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

x86 assembly (clang, -O2):
<ameth_cmp_BSEARCH_CMP_FN>:
jmp    1030 <ameth_cmp@plt>

LLVM IR (-O0):
define i32 @ameth_cmp_BSEARCH_CMP_FN(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*** %6
%13 = call i32 @ameth_cmp(i32** %11, i32** %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @ameth_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32**
%4 = bitcast i8* %1 to i32**
%5 = tail call i32 @ameth_cmp(i32** %3, i32** %4)
ret i32 %5
}
double f_prime(double x) { return 3 * x * x + 1; }


x86 assembly (clang, -O0):
<f_prime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed9(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_prime>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f_prime(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 3.000000e+00, %3
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
ret double %6
}

LLVM IR (-O2):
define double @f_prime(double %0) {
%2 = fmul double %0, 3.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
ret double %3
}
int main() {
  int i;
  if (0 || 1) {
    i = 14;
  } else {
    i = 15;
  }
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 14
}
void testFunc() { extern int i; }


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

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

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

LLVM IR (-O2):
define void @testFunc() {
ret void
}
double eq_double(double a, double b) { return a == b; }


x86 assembly (clang, -O0):
<eq_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_double>:
cmpeqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @eq_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @eq_double(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc_unlocked(int /*<<< orphan*/ *);
int getc_unlocked(FILE *file) { return fgetc_unlocked(file); }


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

x86 assembly (clang, -O2):
<getc_unlocked>:
jmp    1030 <fgetc_unlocked@plt>

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

LLVM IR (-O2):
define i32 @getc_unlocked(i32* nocapture %0) {
%2 = tail call i32 @fgetc_unlocked(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ join();
int mypthread_join() { join(); }


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

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

LLVM IR (-O0):
define i32 @mypthread_join() {
%1 = alloca i32
%2 = call i32 (...) @join()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @mypthread_join() {
%1 = tail call i32 (...) @join()
ret i32 undef
}
void qf_spin_unlock(volatile int *lock) {
  __sync_lock_release(lock);
  return;
}


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

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

LLVM IR (-O0):
define void @qf_spin_unlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
store atomic i32 0, i32* %3 release
ret void
}

LLVM IR (-O2):
define void @qf_spin_unlock(i32* nocapture writeonly %0) {
store atomic i32 0, i32* %0 release
ret void
}
unsigned long long int msm_timer_get_sclk_ticks(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @msm_timer_get_sclk_ticks() {
ret i64 0
}
void LoadColours(void) {}


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

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

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

LLVM IR (-O2):
define void @LoadColours() {
ret void
}
int get_image_size(file_name, rows, cols)
char *file_name;
long *cols, *rows;
{}


x86 assembly (clang, -O0):
<get_image_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_image_size(i8* nocapture readnone %0, i64* nocapture readnone %1, i64* nocapture readnone %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
void printProduct(double x, double y) {
  printf("%f * %f = %f.\n", x, y, x * y);
}


x86 assembly (clang, -O0):
<printProduct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printProduct>:
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%f * %f = %f.\0A\00"
define void @printProduct(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %5, double %6, double %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%f * %f = %f.\0A\00"
define void @printProduct(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %3)
ret void
}
/* Variables and functions */
scalar_t__ CLOCKS_PER_SEC;
int getCPS(void) { return ((int)CLOCKS_PER_SEC); }


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

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

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i64 0
define i32 @getCPS() {
%1 = load i64, i64* @CLOCKS_PER_SEC
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i64 0
define i32 @getCPS() {
%1 = load i64, i64* @CLOCKS_PER_SEC
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_da(char *str) { sprintf(str, "DA    A                         "); }


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

x86 assembly (clang, -O2):
<sprint_da>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

LLVM IR (-O0):
@.str = [33 x i8] c"DA A \00"
define void @sprint_da(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"DA A \00"
define void @sprint_da(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
/* Variables and functions */
long long l_dnnt(double *);
long long intr_wrap_409(double p1) { return l_dnnt(&p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_409>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <l_dnnt@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @intr_wrap_409(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i64 @l_dnnt(double* %2)
ret i64 %3
}

LLVM IR (-O2):
define i64 @intr_wrap_409(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i64 @l_dnnt(double* %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void raext4096() {
  printf("\nChanging Read Ahead Cache size for External sdcard to 4096kb\n");
  char buf[256];
  sprintf(buf, "/system/bin/sh -c %s",
          "'echo 4096 > /sys/block/mmcblk1/queue/read_ahead_kb'");
  system(buf);
}


x86 assembly (clang, -O0):
<raext4096>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
lea    0xeea(%rip),%rsi
lea    0xef8(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raext4096>:
push   %rbx
sub    $0x100,%rsp
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [63 x i8] c"\0AChanging Read Ahead Cache size for External sdcard to 4096kb\0A\00"
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 4096 > /sys/block/mmcblk1/queue/read_ahead_kb'\00"
define void @raext4096() {
%1 = alloca [256 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @system(i8* %5)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 4096 > /sys/block/mmcblk1/queue/read_ahead_kb'\00"
@str = [62 x i8] c"\0AChanging Read Ahead Cache size for External sdcard to 4096kb\00"
define void @raext4096() {
%1 = alloca [256 x i8]
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* %3)
ret void
}
double __creal(double _Complex z) { return __real__ z; }


x86 assembly (clang, -O0):
<__creal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @__creal(double returned %0, double %1) {
ret double %0
}
int _CLOSE(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_CLOSE(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort_report(char *, ...);
int /*<<< orphan*/ *getcwd(char *, int);
const char *scwd(void) {
  static char buf[256];
  if ((getcwd(buf, 256)) == NULL)
    (1 == 1) ? abort_report("Could not stat working directory.", "")
             : abort_report("Could not stat working directory.");
  return buf;
}


x86 assembly (clang, -O0):
<scwd>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
jne    1154 <scwd+0x34>
lea    0xeba(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <abort_report@plt>
lea    0x2ee5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scwd>:
push   %rax
lea    0x2f18(%rip),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
test   %rax,%rax
jne    114c <scwd+0x2c>
lea    0xec2(%rip),%rdi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <abort_report@plt>
lea    0x2eed(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@scwd.buf = internal global [256 x i8] zeroinitializer
@.str = [34 x i8] c"Could not stat working directory.\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @scwd() {
%1 = call i32* @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @scwd.buf, i64 0, i64 0), i32 256)
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (i8*, ...) @abort_report(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @scwd.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@scwd.buf = internal global [256 x i8] zeroinitializer
@.str = [34 x i8] c"Could not stat working directory.\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @scwd() {
%1 = tail call i32* @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @scwd.buf, i64 0, i64 0), i32 256)
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @abort_report(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @scwd.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void Util_outOfMemory(const char *message) {
  if (message != NULL) {
    fprintf(stderr, "Out of memory:\n%s\n", message);
  } else {
    fputs("Out of memory.\n", stderr);
  }
  abort();
}


x86 assembly (clang, -O0):
<Util_outOfMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1165 <Util_outOfMemory+0x35>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea5(%rip),%rsi
call   1050 <fprintf@plt>
jmp    117a <Util_outOfMemory+0x4a>
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
lea    0xe9e(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<Util_outOfMemory>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
test   %rdi,%rdi
jne    1154 <Util_outOfMemory+0x24>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>
mov    %rdi,%rdx
lea    0xea2(%rip),%rsi
mov    %eax,%edi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Out of memory:\0A%s\0A\00"
@.str.1 = [16 x i8] c"Out of memory.\0A\00"
define void @Util_outOfMemory(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %5
%13 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Out of memory:\0A%s\0A\00"
@.str.1 = [16 x i8] c"Out of memory.\0A\00"
define void @Util_outOfMemory(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = load i32, i32* @stderr
br i1 %2, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ NJ_FLT_EQ(float, float);
int NJ_FLT_LT(float x, float y) {
  if (NJ_FLT_EQ(x, y)) {
    return (0);
  } else {
    if (x < y) {
      return (1);
    } else {
      return (0);
    }
  }
}


x86 assembly (clang, -O0):
<NJ_FLT_LT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <NJ_FLT_EQ@plt>
cmp    $0x0,%rax
je     1147 <NJ_FLT_LT+0x37>
movl   $0x0,-0x4(%rbp)
jmp    116d <NJ_FLT_LT+0x5d>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1166 <NJ_FLT_LT+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <NJ_FLT_LT+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NJ_FLT_LT>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
call   1030 <NJ_FLT_EQ@plt>
test   %rax,%rax
sete   %al
movss  (%rsp),%xmm0
ucomiss 0x4(%rsp),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @NJ_FLT_LT(float %0, float %1) {
%3 = tail call i64 @NJ_FLT_EQ(float %0, float %1)
%4 = icmp eq i64 %3, 0
%5 = fcmp olt float %0, %1
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ InitComparators();
int /*<<< orphan*/ InitQueryOperators();
__attribute__((constructor)) void InitQueryModule(void) {
  InitComparators();
  InitQueryOperators();
}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @InitQueryModule, i8* null }]
define void @InitQueryModule() {
%1 = call i32 (...) @InitComparators()
%2 = call i32 (...) @InitQueryOperators()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @InitQueryModule, i8* null }]
define void @InitQueryModule() {
%1 = tail call i32 (...) @InitComparators()
%2 = tail call i32 (...) @InitQueryOperators()
ret void
}
/* Variables and functions */
char peek_2_char();
char peek_char();
bool block_comment_open_detected(void) {
  bool result = false;
  if ((peek_char() == '/') && (peek_2_char() == '*')) {
    result = true;
  }
  return result;
}


x86 assembly (clang, -O0):
<block_comment_open_detected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <peek_char@plt>
movsbl %al,%eax
cmp    $0x2f,%eax
jne    115c <block_comment_open_detected+0x3c>
mov    $0x0,%al
call   1030 <peek_2_char@plt>
movsbl %al,%eax
cmp    $0x2a,%eax
jne    115c <block_comment_open_detected+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_comment_open_detected>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <peek_char@plt>
cmp    $0x2f,%al
jne    113c <block_comment_open_detected+0x1c>
xor    %eax,%eax
call   1030 <peek_2_char@plt>
xor    %ebx,%ebx
cmp    $0x2a,%al
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @block_comment_open_detected() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call signext i8 (...) @peek_char()
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 47
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = call signext i8 (...) @peek_2_char()
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 42
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %10
10: ; preds = %9, %5, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @block_comment_open_detected() {
%1 = tail call signext i8 (...) @peek_char()
%2 = icmp eq i8 %1, 47
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call signext i8 (...) @peek_2_char()
%5 = icmp eq i8 %4, 42
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
long timevaldelta(struct timeval *a, struct timeval *b) {
  return 1000000 * (a->tv_sec - b->tv_sec) + a->tv_usec - b->tv_usec;
}


x86 assembly (clang, -O0):
<timevaldelta>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
imul   $0xf4240,%eax,%eax
cltq
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
mov    -0x10(%rbp),%rcx
sub    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timevaldelta>:
movslq (%rdi),%rax
movslq (%rsi),%rcx
sub    %rcx,%rax
imul   $0xf4240,%rax,%rcx
mov    0x8(%rdi),%rax
sub    0x8(%rsi),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @timevaldelta(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
%12 = mul nsw i32 1000000, %11
%13 = sext i32 %12 to i64
%14 = load %struct.timeval*, %struct.timeval** %3
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 1
%16 = load i64, i64* %15
%17 = add nsw i64 %13, %16
%18 = load %struct.timeval*, %struct.timeval** %4
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%20 = load i64, i64* %19
%21 = sub nsw i64 %17, %20
ret i64 %21
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @timevaldelta(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul nsw i32 %7, 1000000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%11 = load i64, i64* %10
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%13 = load i64, i64* %12
%14 = sub i64 %11, %13
%15 = add i64 %14, %9
ret i64 %15
}
int do_665() { return 665; }


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

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

LLVM IR (-O0):
define i32 @do_665() {
ret i32 665
}

LLVM IR (-O2):
define i32 @do_665() {
ret i32 665
}
/* Variables and functions */
scalar_t__ do_alloc_dictionary();
void *_nss_ldap_db_open(void) { return (void *)do_alloc_dictionary(); }


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

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

LLVM IR (-O0):
define i8* @_nss_ldap_db_open() {
%1 = call i64 (...) @do_alloc_dictionary()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @_nss_ldap_db_open() {
%1 = tail call i64 (...) @do_alloc_dictionary()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
float absoluteValue(float num) {
  if (num < 0) {
    num = num * -1;
  }
  return num;
}


x86 assembly (clang, -O0):
<absoluteValue>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1128 <absoluteValue+0x28>
movss  0xee2(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absoluteValue>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @absoluteValue(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fmul float %6, -1.000000e+00
store float %7, float* %2
br label %8
8: ; preds = %5, %1
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
define float @absoluteValue(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
void array() {
  int a[10];
  int i, j;
  for (i = 0; i < 10; ++i)
    for (j = 0; j < 5010; ++j)
      a[i] = 10;
}


x86 assembly (clang, -O0):
<array>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1156 <array+0x56>
movl   $0x0,-0x38(%rbp)
cmpl   $0x1392,-0x38(%rbp)
jge    1143 <array+0x43>
movslq -0x34(%rbp),%rax
movl   $0xa,-0x30(%rbp,%rax,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    111c <array+0x1c>
jmp    1148 <array+0x48>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    110b <array+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @array() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ECHILD;
int /*<<< orphan*/ errno;
int _wait(int *status) {
  status = status;
  errno = ECHILD;
  return -1;
}


x86 assembly (clang, -O0):
<_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wait>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ECHILD = global i32 0
@errno = global i32 0
define i32 @_wait(i32* nocapture readnone %0) {
%2 = load i32, i32* @ECHILD
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_socket_rtp_recv_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_socket@%p::rtp_recv (rtpp_socket_rtp_recv) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_socket_rtp_recv_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_socket_rtp_recv_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_socket@%p::rtp_recv (rtpp_socket_rtp_recv) is invoked after destruction\0A\00"
define void @rtpp_socket_rtp_recv_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_socket@%p::rtp_recv (rtpp_socket_rtp_recv) is invoked after destruction\0A\00"
define void @rtpp_socket_rtp_recv_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int imax(int, int);
int imaxa(int a[], int length) {
  int max = a[0];
  int i;
  for (i = 0; i < length; i++) {
    max = imax(max, a[i]);
  }
  return max;
}


x86 assembly (clang, -O0):
<imaxa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <imaxa+0x4f>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <imax@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <imaxa+0x1f>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imaxa>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%eax
test   %esi,%esi
jle    1154 <imaxa+0x44>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %eax,%edi
mov    %eax,%esi
call   1030 <imax@plt>
cmp    $0x1,%ebp
je     1154 <imaxa+0x44>
mov    %ebp,%ebp
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r14,%rbx,4),%esi
mov    %eax,%edi
call   1030 <imax@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <imaxa+0x30>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @imaxa(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %2
%6 = zext i32 %1 to i64
%7 = tail call i32 @imax(i32 %3, i32 %3)
%8 = icmp eq i32 %1, 1
br i1 %8, label %17, label %9
9: ; preds = %5, %9
%10 = phi i64 [ %15, %9 ], [ 1, %5 ]
%11 = phi i32 [ %14, %9 ], [ %7, %5 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %10
%13 = load i32, i32* %12
%14 = tail call i32 @imax(i32 %11, i32 %13)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %6
br i1 %16, label %17, label %9
17: ; preds = %9, %5, %2
%18 = phi i32 [ %3, %2 ], [ %7, %5 ], [ %14, %9 ]
ret i32 %18
}