xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isalnum(int);
int path_symbol(int chr, int first) {
  return isalnum(chr) || chr == '_' || chr == '.';
}


x86 assembly (clang, -O0):
<path_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1151 <path_symbol+0x41>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1151 <path_symbol+0x41>
cmpl   $0x2e,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_symbol>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
cmp    $0x2e,%ebx
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @path_symbol(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 = call i64 @isalnum(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 95
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 46
br label %14
14: ; preds = %11, %8, %2
%15 = phi i1 [ true, %8 ], [ true, %2 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @path_symbol(i32 %0, i32 %1) {
%3 = tail call i64 @isalnum(i32 %0)
%4 = icmp ne i64 %3, 0
%5 = icmp eq i32 %0, 95
%6 = or i1 %5, %4
%7 = icmp eq i32 %0, 46
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int strlen(char *);
int upcEanSupplementWidth(char *digits) {
  switch (strlen(digits)) {
  case 2:
    return 28;
  case 5:
    return 55;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<upcEanSupplementWidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
sub    $0x2,%eax
je     1149 <upcEanSupplementWidth+0x39>
jmp    1138 <upcEanSupplementWidth+0x28>
mov    -0x14(%rbp),%eax
sub    $0x5,%eax
je     1155 <upcEanSupplementWidth+0x45>
jmp    1161 <upcEanSupplementWidth+0x51>
movl   $0x1c,-0x4(%rbp)
jmp    1168 <upcEanSupplementWidth+0x58>
movl   $0x37,-0x4(%rbp)
jmp    1168 <upcEanSupplementWidth+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upcEanSupplementWidth>:
push   %rax
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    $0x5,%eax
mov    $0x37,%edx
cmovne %ecx,%edx
cmp    $0x2,%eax
mov    $0x1c,%eax
cmovne %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @upcEanSupplementWidth(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
switch i32 %5, label %8 [
i32 2, label %6
i32 5, label %7
]
6: ; preds = %1
store i32 28, i32* %2
br label %9
7: ; preds = %1
store i32 55, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @upcEanSupplementWidth(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 5
%4 = select i1 %3, i32 55, i32 0
%5 = icmp eq i32 %2, 2
%6 = select i1 %5, i32 28, i32 %4
ret i32 %6
}
void slow_zero_page(void *page) {
  int d0, d1;
  __asm__ __volatile__("cld\n\t"
                       "rep ; stosl"
                       : "=&c"(d0), "=&D"(d1)
                       : "a"(0), "1"(page), "0"(1024)
                       : "memory");
}


x86 assembly (clang, -O0):
<slow_zero_page>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    $0x400,%ecx
cld
rep stos %eax,%es:(%rdi)
mov    %ecx,-0xc(%rbp)
mov    %edi,%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<slow_zero_page>:
xor    %eax,%eax
mov    $0x400,%ecx
cld
rep stos %eax,%es:(%rdi)
ret

LLVM IR (-O0):
define void @slow_zero_page(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call { i32, i8* } asm sideeffect "cld\0A\09rep ; stosl", "=&{cx},=&{di},{ax},1,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0, i8* %5, i32 1024)
%7 = extractvalue { i32, i8* } %6, 0
%8 = extractvalue { i32, i8* } %6, 1
store i32 %7, i32* %3
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
ret void
}

LLVM IR (-O2):
define void @slow_zero_page(i8* %0) {
%2 = tail call { i32, i8* } asm sideeffect "cld\0A\09rep ; stosl", "=&{cx},=&{di},{ax},1,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0, i8* %0, i32 1024)
ret void
}
/* Variables and functions */
int MDM_exist(char *);
int MFexist(char *name) { return (MDM_exist(name)); }


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

x86 assembly (clang, -O2):
<MFexist>:
jmp    1030 <MDM_exist@plt>

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

LLVM IR (-O2):
define i32 @MFexist(i8* %0) {
%2 = tail call i32 @MDM_exist(i8* %0)
ret i32 %2
}
void useit1(val) const int *val;
{
  static int usedval;
  usedval = *val;
}


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

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

LLVM IR (-O0):
@useit1.usedval = internal global i32 0
define void @useit1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
store i32 %4, i32* @useit1.usedval
ret void
}

LLVM IR (-O2):
define void @useit1(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void i2c_closeDevice(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<i2c_closeDevice>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @i2c_closeDevice(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void foo499(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo499(i32 %0) {
ret void
}
OP(ed, a5) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_target_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(265, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_target_solutions_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x109,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_target_solutions_to_container>:
mov    $0x109,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_target_solutions_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 265, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_target_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 265, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ handle_38(int /*<<< orphan*/);
int gen_38() {
  handle_38(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_38>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_38@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_38() {
%1 = call i32 @handle_38(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_38() {
%1 = tail call i32 @handle_38(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t person_by_key_hash(const uint64_t key) { return (uint32_t)key; }


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

x86 assembly (clang, -O2):
<person_by_key_hash>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @person_by_key_hash(i32 returned %0) {
ret i32 %0
}
int test_imm_7Buint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x7B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Buint64_highword_reg>:
movabs $0x7b00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Buint64_highword_reg(i64 %0) {
%2 = and i64 %0, 528280977408
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double fmod(double numer, double denom) {
  return (double)(numer - denom * ((int)(numer / denom)));
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
divsd  -0x10(%rbp),%xmm2
cvttsd2si %xmm2,%eax
cvtsi2sd %eax,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cvttpd2dq %xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @fmod(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 = fdiv double %7, %8
%10 = fptosi double %9 to i32
%11 = sitofp i32 %10 to double
%12 = fneg double %6
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double %5)
ret double %13
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = fptosi double %3 to i32
%5 = sitofp i32 %4 to double
%6 = fneg double %1
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double %0)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ __write2(char const *);
void *dlsym(char const *);
void *_dlsym(const char *s) {
  void *x = dlsym(s);
  if (!x) {
    __write2("ld.so: lookup of symbol \"");
    __write2(s);
    __write2("\" failed.\n");
  }
  return x;
}


x86 assembly (clang, -O0):
<_dlsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <dlsym@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <_dlsym+0x45>
lea    0xeb5(%rip),%rdi
call   1030 <__write2@plt>
mov    -0x8(%rbp),%rdi
call   1030 <__write2@plt>
lea    0xeba(%rip),%rdi
call   1030 <__write2@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dlsym>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <dlsym@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1154 <_dlsym+0x34>
lea    0xec5(%rip),%rdi
call   1030 <__write2@plt>
mov    %r14,%rdi
call   1030 <__write2@plt>
lea    0xecb(%rip),%rdi
call   1030 <__write2@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"ld.so: lookup of symbol \22\00"
@.str.1 = [11 x i8] c"\22 failed.\0A\00"
define i8* @_dlsym(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @dlsym(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = call i32 @__write2(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %2
%11 = call i32 @__write2(i8* %10)
%12 = call i32 @__write2(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [26 x i8] c"ld.so: lookup of symbol \22\00"
@.str.1 = [11 x i8] c"\22 failed.\0A\00"
define i8* @_dlsym(i8* %0) {
%2 = tail call i8* @dlsym(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @__write2(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @__write2(i8* %0)
%7 = tail call i32 @__write2(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %4, %1
ret i8* %2
}
int get5() { return 5; }


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

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

LLVM IR (-O0):
define i32 @get5() {
ret i32 5
}

LLVM IR (-O2):
define i32 @get5() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ retire();
void nero_end(void) {
  printf("Your heavy handed performance smacks of Nero and Ivan IV.\n");
  printf("The people (remaining) find you an unpleasant ruler, and,\n");
  printf("frankly, hate your guts!\n");
  retire();
}


x86 assembly (clang, -O0):
<nero_end>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
call   1040 <printf@plt>
lea    0xf33(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <retire@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nero_end>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <retire@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Your heavy handed performance smacks of Nero and Ivan IV.\0A\00"
@.str.1 = [59 x i8] c"The people (remaining) find you an unpleasant ruler, and,\0A\00"
@.str.2 = [26 x i8] c"frankly, hate your guts!\0A\00"
define void @nero_end() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @retire()
ret void
}

LLVM IR (-O2):
@str = [58 x i8] c"Your heavy handed performance smacks of Nero and Ivan IV.\00"
@str.3 = [58 x i8] c"The people (remaining) find you an unpleasant ruler, and,\00"
@str.4 = [25 x i8] c"frankly, hate your guts!\00"
define void @nero_end() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 (...) @retire()
ret void
}
/* Type definitions */
typedef unsigned char int32_t;

/* Variables and functions */
int32_t le2int(const unsigned char *buf) {
  int32_t res = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
  return res;
}


x86 assembly (clang, -O0):
<le2int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le2int>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @le2int(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 24
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %8, %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = or i32 %14, %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = or i32 %20, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %3
%27 = load i8, i8* %3
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @le2int(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int addr = 0x0804852b;
  addr <<= 4;
  printf("Hex: 0x%x\n", addr);
  printf("Decimal: %d\n", addr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x804852b,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Hex: 0x%x\0A\00"
@.str.1 = [13 x i8] c"Decimal: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 -2142743888)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 -2142743888)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addRoundKey(unsigned char *, unsigned char *);
int /*<<< orphan*/ invMixColumns(unsigned char *);
int /*<<< orphan*/ invShiftRows(unsigned char *);
int /*<<< orphan*/ invSubBytes(unsigned char *);
void aes_invRound(unsigned char *state, unsigned char *roundKey) {
  invShiftRows(state);
  invSubBytes(state);
  addRoundKey(state, roundKey);
  invMixColumns(state);
}


x86 assembly (clang, -O0):
<aes_invRound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <invShiftRows@plt>
mov    -0x8(%rbp),%rdi
call   1060 <invSubBytes@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <addRoundKey@plt>
mov    -0x8(%rbp),%rdi
call   1030 <invMixColumns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_invRound>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <invShiftRows@plt>
mov    %rbx,%rdi
call   1060 <invSubBytes@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <addRoundKey@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <invMixColumns@plt>

LLVM IR (-O0):
define void @aes_invRound(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 = call i32 @invShiftRows(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @invSubBytes(i8* %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @addRoundKey(i8* %9, i8* %10)
%12 = load i8*, i8** %3
%13 = call i32 @invMixColumns(i8* %12)
ret void
}

LLVM IR (-O2):
define void @aes_invRound(i8* %0, i8* %1) {
%3 = tail call i32 @invShiftRows(i8* %0)
%4 = tail call i32 @invSubBytes(i8* %0)
%5 = tail call i32 @addRoundKey(i8* %0, i8* %1)
%6 = tail call i32 @invMixColumns(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
int RSA_padding_add_PKCS1_PSS_mgf1(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ const *,
                                   int /*<<< orphan*/ const *,
                                   int /*<<< orphan*/ *, int);
int RSA_padding_add_PKCS1_PSS(RSA *rsa, uint8_t *EM, const uint8_t *mHash,
                              const EVP_MD *Hash, int sLen) {
  return RSA_padding_add_PKCS1_PSS_mgf1(rsa, EM, mHash, Hash, NULL, sLen);
}


x86 assembly (clang, -O0):
<RSA_padding_add_PKCS1_PSS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <RSA_padding_add_PKCS1_PSS_mgf1@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSA_padding_add_PKCS1_PSS>:
mov    %r8d,%r9d
xor    %r8d,%r8d
jmp    1030 <RSA_padding_add_PKCS1_PSS_mgf1@plt>

LLVM IR (-O0):
define i32 @RSA_padding_add_PKCS1_PSS(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32, i32* %10
%16 = call i32 @RSA_padding_add_PKCS1_PSS_mgf1(i32* %11, i32* %12, i32* %13, i32* %14, i32* null, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @RSA_padding_add_PKCS1_PSS(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = tail call i32 @RSA_padding_add_PKCS1_PSS_mgf1(i32* %0, i32* %1, i32* %2, i32* %3, i32* null, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ system(char *);
int main() {
  chdir("/mnt/user/code/Camera/bin");
  system("/mnt/user/jvm/java Main");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <chdir@plt>
lea    0xee3(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"/mnt/user/code/Camera/bin\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @chdir(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"/mnt/user/code/Camera/bin\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @chdir(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double M_PI;
int /*<<< orphan*/ assert(int);
double cos(double);
double wdw_Hamming(int i, int m) {
  assert(i < m);
  return (0.54 - (0.46 * cos((2.0 * M_PI * (double)i) / (double)(m - 1))));
}


x86 assembly (clang, -O0):
<wdw_Hamming>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0xec7(%rip),%xmm0
mov    0x2e98(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  0xe88(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe84(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wdw_Hamming>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    %esi,%ebp
setl   %dil
call   1030 <assert@plt>
mov    0x2ead(%rip),%rax
movsd  (%rax),%xmm1
addsd  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm0
mulsd  %xmm1,%xmm0
add    $0xffffffff,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
mulsd  0xe9a(%rip),%xmm0
addsd  0xe9a(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @wdw_Hamming(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load double, double* @M_PI
%11 = fmul double 2.000000e+00, %10
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = fmul double %11, %13
%15 = load i32, i32* %4
%16 = sub nsw i32 %15, 1
%17 = sitofp i32 %16 to double
%18 = fdiv double %14, %17
%19 = call double @cos(double %18)
%20 = call double @llvm.fmuladd.f64(double -4.600000e-01, double %19, double 5.400000e-01)
ret double %20
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @wdw_Hamming(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load double, double* @M_PI
%7 = fmul double %6, 2.000000e+00
%8 = sitofp i32 %0 to double
%9 = fmul double %7, %8
%10 = add nsw i32 %1, -1
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
%13 = tail call double @cos(double %12)
%14 = tail call double @llvm.fmuladd.f64(double %13, double -4.600000e-01, double 5.400000e-01)
ret double %14
}
/* Variables and functions */
int PAPI_thread_init(unsigned long (*)());
void PAPIF_THREAD_INIT(unsigned long int (*handle)(void), int *check) {
  *check = PAPI_thread_init(handle);
}


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

x86 assembly (clang, -O2):
<PAPIF_THREAD_INIT>:
push   %rbx
mov    %rsi,%rbx
call   1030 <PAPI_thread_init@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_THREAD_INIT(i64 ()* %0, i32* %1) {
%3 = alloca i64 ()*
%4 = alloca i32*
store i64 ()* %0, i64 ()** %3
store i32* %1, i32** %4
%5 = load i64 ()*, i64 ()** %3
%6 = bitcast i64 ()* %5 to i64 (...)*
%7 = call i32 @PAPI_thread_init(i64 (...)* %6)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @PAPIF_THREAD_INIT(i64 ()* %0, i32* nocapture writeonly %1) {
%3 = bitcast i64 ()* %0 to i64 (...)*
%4 = tail call i32 @PAPI_thread_init(i64 (...)* %3)
store i32 %4, i32* %1
ret void
}
int exact_square(int n) {
  int i;
  for (i = 1; i != n; i++) {
    if (n == i * i) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     114b <exact_square+0x4b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <exact_square+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1152 <exact_square+0x52>
jmp    113d <exact_square+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
xor    %eax,%eax
cmp    $0x1,%edi
je     1120 <exact_square+0x20>
mov    $0x1,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1121 <exact_square+0x21>
add    $0x1,%ecx
cmp    %ecx,%edi
jne    1110 <exact_square+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %10, label %5
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 1, %1 ]
%7 = mul nsw i32 %6, %6
%8 = icmp eq i32 %7, %0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %5 ]
ret i32 %11
}
void OCSP_REVOKEDINFO_free(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @XSetTile() {
ret i32 undef
}
/* Variables and functions */
int fatorial0(int);
double f0() {
  int i;
  double ret = 0;
  for (i = 1; i < 10000000; i++)
    ret += 1 / (fatorial0(i % 12));
  return ret;
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0x989680,-0x4(%rbp)
jge    116c <f0+0x5c>
mov    -0x4(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <fatorial0@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <f0+0x17>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%ebx
xorpd  %xmm0,%xmm0
mov    $0x98967f,%ebp
mov    $0xaaaaaaab,%r14d
jmp    114d <f0+0x3d>
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x1,%ebx
add    $0xffffffff,%ebp
je     1178 <f0+0x68>
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%eax
imul   %r14,%rax
shr    $0x23,%rax
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
mov    %ebx,%edi
sub    %eax,%edi
call   1030 <fatorial0@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
jb     1130 <f0+0x20>
xor    %eax,%eax
jmp    1130 <f0+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define double @f0() {
%1 = alloca i32
%2 = alloca double
store double 0.000000e+00, double* %2
store i32 1, i32* %1
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000000
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %1
%8 = srem i32 %7, 12
%9 = call i32 @fatorial0(i32 %8)
%10 = sdiv i32 1, %9
%11 = sitofp i32 %10 to double
%12 = load double, double* %2
%13 = fadd double %12, %11
store double %13, double* %2
br label %14
14: ; preds = %6
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %3
17: ; preds = %3
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @f0() {
br label %1
1: ; preds = %0, %1
%2 = phi double [ 0.000000e+00, %0 ], [ %10, %1 ]
%3 = phi i32 [ 1, %0 ], [ %11, %1 ]
%4 = urem i32 %3, 12
%5 = tail call i32 @fatorial0(i32 %4)
%6 = add i32 %5, 1
%7 = icmp ult i32 %6, 3
%8 = select i1 %7, i32 %5, i32 0
%9 = sitofp i32 %8 to double
%10 = fadd double %2, %9
%11 = add nuw nsw i32 %3, 1
%12 = icmp eq i32 %11, 10000000
br i1 %12, label %13, label %1
13: ; preds = %1
ret double %10
}
/* Variables and functions */
double ReadDS1621(int);
int ReadPCF8591(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, double, int, int, int, int);
void main(void) {
  while (1) {
    printf("% 5.2f %03u %03u %03u %03u\n\r", ReadDS1621(2), ReadPCF8591(0, 0),
           ReadPCF8591(0, 1), ReadPCF8591(0, 2), ReadPCF8591(0, 3));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
jmp    113d <main+0xd>
mov    $0x2,%edi
call   1050 <ReadDS1621@plt>
movsd  %xmm0,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1040 <ReadPCF8591@plt>
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <ReadPCF8591@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
mov    $0x2,%esi
call   1040 <ReadPCF8591@plt>
mov    %eax,-0x4(%rbp)
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <ReadPCF8591@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
mov    %eax,%r8d
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
jmp    113d <main+0xd>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    $0x2,%edi
call   1050 <ReadDS1621@plt>
movsd  %xmm0,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
call   1040 <ReadPCF8591@plt>
mov    %eax,%r15d
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <ReadPCF8591@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x2,%esi
call   1040 <ReadPCF8591@plt>
mov    %eax,%ebp
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <ReadPCF8591@plt>
mov    %r14,%rdi
movsd  (%rsp),%xmm0
mov    %r15d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
call   1030 <printf@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
@.str = [29 x i8] c"% 5.2f %03u %03u %03u %03u\0A\0D\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = call double @ReadDS1621(i32 2)
%3 = call i32 @ReadPCF8591(i32 0, i32 0)
%4 = call i32 @ReadPCF8591(i32 0, i32 1)
%5 = call i32 @ReadPCF8591(i32 0, i32 2)
%6 = call i32 @ReadPCF8591(i32 0, i32 3)
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %2, i32 %3, i32 %4, i32 %5, i32 %6)
br label %1
}

LLVM IR (-O2):
@.str = [29 x i8] c"% 5.2f %03u %03u %03u %03u\0A\0D\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call double @ReadDS1621(i32 2)
%3 = tail call i32 @ReadPCF8591(i32 0, i32 0)
%4 = tail call i32 @ReadPCF8591(i32 0, i32 1)
%5 = tail call i32 @ReadPCF8591(i32 0, i32 2)
%6 = tail call i32 @ReadPCF8591(i32 0, i32 3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %2, i32 %3, i32 %4, i32 %5, i32 %6)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ md5_constructor();
int /*<<< orphan*/ rmd160_constructor();
int /*<<< orphan*/ rndlinux_constructor();
int /*<<< orphan*/ sha1_constructor();
void cipher_modules_constructor(void) {
  static int done = 0;
  if (done)
    return;
  done = 1;
  rndlinux_constructor();
  sha1_constructor();
  rmd160_constructor();
  md5_constructor();
}


x86 assembly (clang, -O0):
<cipher_modules_constructor>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2ef9(%rip)
je     1156 <cipher_modules_constructor+0x16>
jmp    117c <cipher_modules_constructor+0x3c>
movl   $0x1,0x2ee4(%rip)
mov    $0x0,%al
call   1030 <rndlinux_constructor@plt>
mov    $0x0,%al
call   1040 <sha1_constructor@plt>
mov    $0x0,%al
call   1060 <rmd160_constructor@plt>
mov    $0x0,%al
call   1050 <md5_constructor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cipher_modules_constructor>:
push   %rax
cmpb   $0x0,0x2efc(%rip)
je     114c <cipher_modules_constructor+0xc>
pop    %rax
ret
movb   $0x1,0x2ef1(%rip)
xor    %eax,%eax
call   1030 <rndlinux_constructor@plt>
xor    %eax,%eax
call   1040 <sha1_constructor@plt>
xor    %eax,%eax
call   1060 <rmd160_constructor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <md5_constructor@plt>

LLVM IR (-O0):
@cipher_modules_constructor.done = internal global i32 0
define void @cipher_modules_constructor() {
%1 = load i32, i32* @cipher_modules_constructor.done
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %9
4: ; preds = %0
store i32 1, i32* @cipher_modules_constructor.done
%5 = call i32 (...) @rndlinux_constructor()
%6 = call i32 (...) @sha1_constructor()
%7 = call i32 (...) @rmd160_constructor()
%8 = call i32 (...) @md5_constructor()
br label %9
9: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@cipher_modules_constructor.done = internal unnamed_addr global i1 false
define void @cipher_modules_constructor() {
%1 = load i1, i1* @cipher_modules_constructor.done
br i1 %1, label %7, label %2
2: ; preds = %0
store i1 true, i1* @cipher_modules_constructor.done
%3 = tail call i32 (...) @rndlinux_constructor()
%4 = tail call i32 (...) @sha1_constructor()
%5 = tail call i32 (...) @rmd160_constructor()
%6 = tail call i32 (...) @md5_constructor()
br label %7
7: ; preds = %0, %2
ret void
}
int db_open(char *parameters) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @db_open(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char name[40];
  printf("Hello! What's your name?\n");
  scanf("%s", name);
  printf("%s, %s.\n", name, "You are an extrodinary being");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xec5(%rip),%rdi
lea    0xec7(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xea9(%rip),%rdi
lea    0xeab(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Hello! What's your name?\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%s, %s.\0A\00"
@.str.3 = [29 x i8] c"You are an extrodinary being\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%s, %s.\0A\00"
@.str.3 = [29 x i8] c"You are an extrodinary being\00"
@str = [25 x i8] c"Hello! What's your name?\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void basemm_init() {}


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

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

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

LLVM IR (-O2):
define void @basemm_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ backup_import(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void backup_import_database(const char *source, const char *dest) {
  if (!backup_import(source, dest)) {
    fprintf(stderr, "Unable to import the backup.\n");
    return;
  }
}


x86 assembly (clang, -O0):
<backup_import_database>:
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 <backup_import@plt>
cmp    $0x0,%eax
jne    115b <backup_import_database+0x3b>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup_import_database>:
push   %rax
call   1040 <backup_import@plt>
test   %eax,%eax
je     112c <backup_import_database+0xc>
pop    %rax
ret
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Unable to import the backup.\0A\00"
define void @backup_import_database(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 @backup_import(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Unable to import the backup.\0A\00"
define void @backup_import_database(i8* %0, i8* %1) {
%3 = tail call i32 @backup_import(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TIM_init();
void UserInitializationCalloutf(void) { TIM_init(); }


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

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

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

LLVM IR (-O2):
define void @UserInitializationCalloutf() {
%1 = tail call i32 (...) @TIM_init()
ret void
}
int test_imm_D6uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xD6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D6uint64_lowword_reg>:
test   $0xd6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D6uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 214
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo725(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo725(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
const uint8_t *mp4tree_get_box_type(const uint8_t *p) { return p + 4; }


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

x86 assembly (clang, -O2):
<mp4tree_get_box_type>:
lea    0x10(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @mp4tree_get_box_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
ret i32* %4
}

LLVM IR (-O2):
define i32* @mp4tree_get_box_type(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
ret i32* %2
}
/* Variables and functions */
int rand();
unsigned int mk_rnd_u32(void) { return (rand() & 0xffffffff); }


x86 assembly (clang, -O0):
<mk_rnd_u32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mk_rnd_u32() {
%1 = call i32 (...) @rand()
%2 = and i32 %1, -1
ret i32 %2
}

LLVM IR (-O2):
define i32 @mk_rnd_u32() {
%1 = tail call i32 (...) @rand()
ret i32 %1
}