xunge/DecIR huggingface dataset:
double Lvanleer_lim(const double dp, const double dm) {
  double s;
  s = dp * dm;
  return (s > 0.0 ? 2.0 * s / (dp + dm) : 0.0);
}


x86 assembly (clang, -O0):
<Lvanleer_lim>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1154 <Lvanleer_lim+0x54>
movsd  0xec9(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1161 <Lvanleer_lim+0x61>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1161 <Lvanleer_lim+0x61>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lvanleer_lim>:
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm3
jbe    1122 <Lvanleer_lim+0x22>
addsd  %xmm3,%xmm3
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm3
movapd %xmm3,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @Lvanleer_lim(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fmul double %6, %7
store double %8, double* %5
%9 = load double, double* %5
%10 = fcmp ogt double %9, 0.000000e+00
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load double, double* %5
%13 = fmul double 2.000000e+00, %12
%14 = load double, double* %3
%15 = load double, double* %4
%16 = fadd double %14, %15
%17 = fdiv double %13, %16
br label %19
18: ; preds = %2
br label %19
19: ; preds = %18, %11
%20 = phi double [ %17, %11 ], [ 0.000000e+00, %18 ]
ret double %20
}

LLVM IR (-O2):
define double @Lvanleer_lim(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = fmul double %3, 2.000000e+00
%7 = fadd double %0, %1
%8 = fdiv double %6, %7
br label %9
9: ; preds = %2, %5
%10 = phi double [ %8, %5 ], [ 0.000000e+00, %2 ]
ret double %10
}
void __rts_main_loop() {}


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

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

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

LLVM IR (-O2):
define void @__rts_main_loop() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ setvar(char ***, char const *, char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, size_t);
ssize_t setvard(char ***e, const char *prefix, const char *var, size_t value) {
  char buffer[32];
  snprintf(buffer, sizeof(buffer), "%zu", value);
  return setvar(e, prefix, var, buffer);
}


x86 assembly (clang, -O0):
<setvard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    $0x20,%esi
lea    0xeb4(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1040 <setvar@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setvard>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec5(%rip),%rdx
mov    %rsp,%r12
mov    %r12,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
call   1040 <setvar@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%zu\00"
define i32 @setvard(i8*** %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8***
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca [32 x i8]
store i8*** %0, i8**** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%11 = load i64, i64* %8
%12 = call i32 @snprintf(i8* %10, i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load i8***, i8**** %5
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%17 = call i32 @setvar(i8*** %13, i8* %14, i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%zu\00"
define i32 @setvard(i8*** %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca [32 x i8]
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
%8 = call i32 @setvar(i8*** %0, i8* %1, i8* %2, i8* %6)
ret i32 %8
}
int col_byte_uhc_1(int col) {
  return (col >= 0x34 ? 0x4d : col >= 0x1a ? 0x47 : 0x41) + col;
}


x86 assembly (clang, -O0):
<col_byte_uhc_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x34,-0x4(%rbp)
jl     111e <col_byte_uhc_1+0x1e>
mov    $0x4d,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <col_byte_uhc_1+0x34>
mov    -0x4(%rbp),%edx
mov    $0x41,%eax
mov    $0x47,%ecx
cmp    $0x1a,%edx
cmovge %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<col_byte_uhc_1>:
cmp    $0x1a,%edi
mov    $0x47,%eax
mov    $0x41,%ecx
cmovge %eax,%ecx
cmp    $0x34,%edi
mov    $0x4d,%eax
cmovl  %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @col_byte_uhc_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 52
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 26
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 71, i32 65
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 77, %5 ], [ %10, %6 ]
%13 = load i32, i32* %2
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @col_byte_uhc_1(i32 %0) {
%2 = icmp sgt i32 %0, 51
%3 = icmp sgt i32 %0, 25
%4 = select i1 %3, i32 71, i32 65
%5 = select i1 %2, i32 77, i32 %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int _exit(int s) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

x86 assembly (clang, -O2):
<_exit>:
jmp    1100 <_exit>

LLVM IR (-O0):
define i32 @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define i32 @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
char rumStrget(char *str, int n) { return str[n]; }


x86 assembly (clang, -O0):
<rumStrget>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rumStrget>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @rumStrget(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @rumStrget(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
void *readdir64() {
  errno = ENOSYS;
  return 0;
}


x86 assembly (clang, -O0):
<readdir64>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readdir64>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i8* @readdir64() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i8* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i8* @readdir64() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i8* null
}
__attribute__((always_)) void bpf_barrier(void) {
  asm volatile("" : : : "memory");
}


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

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

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

LLVM IR (-O2):
define void @bpf_barrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef double int8_t;

/* Variables and functions */
double convert_int8_to_double(void *buf, int i) { return ((int8_t *)buf)[i]; }


x86 assembly (clang, -O0):
<convert_int8_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_int8_to_double>:
movslq %esi,%rax
movsd  (%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @convert_int8_to_double(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to double*
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %6, i64 %8
%10 = load double, double* %9
ret double %10
}

LLVM IR (-O2):
define double @convert_int8_to_double(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to double*
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds double, double* %3, i64 %4
%6 = load double, double* %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
void hex2str(int val, char *str) {
  if (val == -1)
    strcpy(str, "*");
  else
    sprintf(str, "%x", val);
}


x86 assembly (clang, -O0):
<hex2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    114e <hex2str+0x2e>
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1161 <hex2str+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea6(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2str>:
mov    %rsi,%rax
cmp    $0xffffffff,%edi
je     1139 <hex2str+0x19>
mov    %edi,%edx
lea    0xed1(%rip),%rsi
mov    %rax,%rdi
jmp    1040 <sprintf@plt>
lea    0xec0(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [3 x i8] c"%x\00"
define void @hex2str(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i32, i32* %3
%13 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
@.str.1 = [3 x i8] c"%x\00"
define void @hex2str(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
int priority(char c) {
  switch (c) {
  case '+':
  case '-':
    return 1;
  case '/':
  case '*':
    return 2;
  case ('^'):
    return 3;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<priority>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2a,%eax
je     116f <priority+0x6f>
jmp    111f <priority+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2b,%eax
je     1163 <priority+0x63>
jmp    1130 <priority+0x30>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1163 <priority+0x63>
jmp    1141 <priority+0x41>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     116f <priority+0x6f>
jmp    1152 <priority+0x52>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     117b <priority+0x7b>
jmp    1187 <priority+0x87>
movl   $0x1,-0x4(%rbp)
jmp    118e <priority+0x8e>
movl   $0x2,-0x4(%rbp)
jmp    118e <priority+0x8e>
movl   $0x3,-0x4(%rbp)
jmp    118e <priority+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<priority>:
lea    -0x2a(%rdi),%ecx
cmp    $0x5,%ecx
ja     1123 <priority+0x23>
mov    $0x1,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x2,%eax
ret
cmp    $0x5e,%edi
jne    112e <priority+0x2e>
mov    $0x3,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @priority(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 43, label %6
i32 45, label %6
i32 47, label %7
i32 42, label %7
i32 94, label %8
]
6: ; preds = %1, %1
store i32 1, i32* %2
br label %10
7: ; preds = %1, %1
store i32 2, i32* %2
br label %10
8: ; preds = %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @priority(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 43, label %6
i32 45, label %6
i32 47, label %3
i32 42, label %3
i32 94, label %4
]
3: ; preds = %1, %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5, %4, %3
%7 = phi i32 [ 0, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ exp(double);
float expf(float x) { return (float)exp((double)x); }


x86 assembly (clang, -O0):
<expf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @expf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @exp(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @expf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @exp(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int in_class(int, char *);
int in_comment_class(int c) { return in_class(c, "#"); }


x86 assembly (clang, -O0):
<in_comment_class>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <in_class@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_comment_class>:
lea    0xee9(%rip),%rsi
jmp    1030 <in_class@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"#\00"
define i32 @in_comment_class(i32 %0) {
%2 = tail call i32 @in_class(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void put_hash_backend(struct hash_backend *backend) {}


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

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

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

LLVM IR (-O2):
%struct.hash_backend = type opaque
define void @put_hash_backend(%struct.hash_backend* nocapture %0) {
ret void
}
/* Variables and functions */
float M_PI_2;
float asinf(float);
float acosf(float x) { return (M_PI_2 - asinf(x)); }


x86 assembly (clang, -O0):
<acosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    0x2ec4(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asinf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosf>:
push   %rax
mov    0x2ed0(%rip),%rax
movss  (%rax),%xmm1
movss  %xmm1,0x4(%rsp)
call   1030 <asinf@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI_2 = global float 0.000000e+00
define float @acosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* @M_PI_2
%4 = load float, float* %2
%5 = call float @asinf(float %4)
%6 = fsub float %3, %5
ret float %6
}

LLVM IR (-O2):
@M_PI_2 = global float 0.000000e+00
define float @acosf(float %0) {
%2 = load float, float* @M_PI_2
%3 = tail call float @asinf(float %0)
%4 = fsub float %2, %3
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ drawHash(int);
int /*<<< orphan*/ drawSpace(int, int);
int /*<<< orphan*/ printf(char *);
void drawPyramid(void) {
  int i;
  for (i = 0; i < 22; i++) {
    drawSpace(i, 22);
    drawHash(i);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<drawPyramid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x16,-0x4(%rbp)
jge    1178 <drawPyramid+0x48>
mov    -0x4(%rbp),%edi
mov    $0x16,%esi
call   1040 <drawSpace@plt>
mov    -0x4(%rbp),%edi
call   1050 <drawHash@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <drawPyramid+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawPyramid>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
mov    $0x16,%esi
call   1040 <drawSpace@plt>
mov    %ebx,%edi
call   1050 <drawHash@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x16,%ebx
jne    1140 <drawPyramid+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @drawPyramid() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 @drawSpace(i32 %2, i32 22)
%4 = tail call i32 @drawHash(i32 %2)
%5 = tail call i32 @putchar(i32 10)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 22
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help(char *cmd) { printf("Usage: %s <port>\n", cmd); }


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

x86 assembly (clang, -O2):
<help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Usage: %s <port>\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Usage: %s <port>\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int dice();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int result;
  result = dice();
  printf("Resultado: %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <dice@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Resultado: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @dice()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
double func3() { return -5.0; }


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @func3() {
ret double -5.000000e+00
}

LLVM IR (-O2):
define double @func3() {
ret double -5.000000e+00
}
int update_frac(void *self, double f) {
  if (f < 0)
    return (1);
  else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<update_frac>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1127 <update_frac+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <update_frac+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_frac>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

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

LLVM IR (-O2):
define i32 @update_frac(i8* nocapture readnone %0, double %1) {
%3 = fcmp olt double %1, 0.000000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void exit_fun1(void) { printf("I am in exit_fun1\n"); }


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

x86 assembly (clang, -O2):
<exit_fun1>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"I am in exit_fun1\0A\00"
define void @exit_fun1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"I am in exit_fun1\00"
define void @exit_fun1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_replies(void *, int);
void *reply_thread(void *h) {
  process_replies(h, 1);
  return 0;
}


x86 assembly (clang, -O0):
<reply_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <process_replies@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reply_thread>:
push   %rax
mov    $0x1,%esi
call   1030 <process_replies@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @reply_thread(i8* %0) {
%2 = tail call i32 @process_replies(i8* %0, i32 1)
ret i8* null
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
int triple_is_branch_type(struct compile_state *, struct triple *, int);
int triple_is_end(struct compile_state *state, struct triple *ins) {
  return triple_is_branch_type(state, ins, 0x0a0);
}


x86 assembly (clang, -O0):
<triple_is_end>:
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    $0xa0,%edx
call   1030 <triple_is_branch_type@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triple_is_end>:
mov    $0xa0,%edx
jmp    1030 <triple_is_branch_type@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_end(%struct.compile_state* %0, %struct.triple* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.triple*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.triple* %1, %struct.triple** %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = load %struct.triple*, %struct.triple** %4
%7 = call i32 @triple_is_branch_type(%struct.compile_state* %5, %struct.triple* %6, i32 160)
ret i32 %7
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_end(%struct.compile_state* %0, %struct.triple* %1) {
%3 = tail call i32 @triple_is_branch_type(%struct.compile_state* %0, %struct.triple* %1, i32 160)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _action(char const **);
void _actionlist(char const **mode) {
  char c;
  for (c = **mode; c == '+' || c == '-' || c == '='; c = **mode)
    _action(mode);
}


x86 assembly (clang, -O0):
<_actionlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0xa(%rbp)
je     1159 <_actionlist+0x49>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0xa(%rbp)
je     1159 <_actionlist+0x49>
movsbl -0x9(%rbp),%eax
cmp    $0x3d,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    1169 <_actionlist+0x59>
jmp    1183 <_actionlist+0x73>
mov    -0x8(%rbp),%rdi
call   1030 <_action@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
jmp    1128 <_actionlist+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_actionlist>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x2000280000000000,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%rax
movzbl (%rax),%eax
cmp    $0x3d,%rax
ja     114c <_actionlist+0x3c>
bt     %rax,%r14
jae    114c <_actionlist+0x3c>
mov    %rbx,%rdi
call   1030 <_action@plt>
jmp    1130 <_actionlist+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @_actionlist(i8** %0) {
%2 = alloca i8**
%3 = alloca i8
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
store i8 %6, i8* %3
br label %7
7: ; preds = %24, %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 43
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 61
br label %19
19: ; preds = %15, %11, %7
%20 = phi i1 [ true, %11 ], [ true, %7 ], [ %18, %15 ]
br i1 %20, label %21, label %28
21: ; preds = %19
%22 = load i8**, i8*** %2
%23 = call i32 @_action(i8** %22)
br label %24
24: ; preds = %21
%25 = load i8**, i8*** %2
%26 = load i8*, i8** %25
%27 = load i8, i8* %26
store i8 %27, i8* %3
br label %7
28: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @_actionlist(i8** %0) {
br label %2
2: ; preds = %5, %1
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 61, label %5
i8 45, label %5
i8 43, label %5
]
5: ; preds = %2, %2, %2
%6 = tail call i32 @_action(i8** %0)
br label %2
7: ; preds = %2
ret void
}
/* Variables and functions */
size_t strlcpy(char *, char *, size_t);
const char *RAND_file_name(char *buf, size_t size) {
  if (strlcpy(buf, "/dev/urandom", size) >= size)
    return (NULL);
  return buf;
}


x86 assembly (clang, -O0):
<RAND_file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <strlcpy@plt>
cmp    -0x18(%rbp),%rax
jb     114b <RAND_file_name+0x3b>
movq   $0x0,-0x8(%rbp)
jmp    1153 <RAND_file_name+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RAND_file_name>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rsi
mov    %rbx,%rdx
call   1030 <strlcpy@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
cmovb  %r14,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
define i8* @RAND_file_name(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = load i64, i64* %5
%8 = call i64 @strlcpy(i8* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i64, i64* %5
%10 = icmp uge i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %14
12: ; preds = %2
%13 = load i8*, i8** %4
store i8* %13, i8** %3
br label %14
14: ; preds = %12, %11
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
define i8* @RAND_file_name(i8* %0, i64 %1) {
%3 = tail call i64 @strlcpy(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %1)
%4 = icmp ult i64 %3, %1
%5 = select i1 %4, i8* %0, i8* null
ret i8* %5
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ CC_SPI_Transfer(int, char *, char *, int);
char TI_CC_SPIReadReg(int fd, char addr) {
  uint8_t txBuf[2];
  uint8_t rxBuf[2];
  txBuf[0] = (addr | 0x80);
  txBuf[1] = 0;
  CC_SPI_Transfer(fd, txBuf, rxBuf, 2);
  return (char)rxBuf[1];
}


x86 assembly (clang, -O0):
<TI_CC_SPIReadReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x7(%rbp)
movb   $0x0,-0x6(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x7(%rbp),%rsi
lea    -0x9(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <CC_SPI_Transfer@plt>
movsbl -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TI_CC_SPIReadReg>:
push   %rax
or     $0x80,%sil
mov    %sil,0x4(%rsp)
movb   $0x0,0x5(%rsp)
lea    0x4(%rsp),%rsi
lea    0x6(%rsp),%rdx
mov    $0x2,%ecx
call   1030 <CC_SPI_Transfer@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TI_CC_SPIReadReg(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [2 x i8]
%6 = alloca [2 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = or i32 %8, 128
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %10, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 0, i8* %12
%13 = load i32, i32* %3
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%16 = call i32 @CC_SPI_Transfer(i32 %13, i8* %14, i8* %15, i32 2)
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 1
%18 = load i8, i8* %17
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @TI_CC_SPIReadReg(i32 %0, i8 signext %1) {
%3 = alloca [2 x i8]
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%7 = or i8 %1, -128
store i8 %7, i8* %5
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %8
%9 = call i32 @CC_SPI_Transfer(i32 %0, i8* %5, i8* %6, i32 2)
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
%11 = load i8, i8* %10
ret i8 %11
}
void glLinkProgram(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glLinkProgram() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int);
void clear_bitarray24(uint32_t *bitarray) {
  memset(bitarray, 0x00, sizeof(uint32_t) * (1 << 19));
}


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

x86 assembly (clang, -O2):
<clear_bitarray24>:
xor    %esi,%esi
mov    $0x200000,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @clear_bitarray24(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i32 0, i32 2097152)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printNewLineCharacter() {
  printf("\n");
  return;
}


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

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

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

LLVM IR (-O2):
define void @printNewLineCharacter() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1126 <max+0x26>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    112d <max+0x2d>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
void ExttInvoiceMonthAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttInvoiceMonthAuxTable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void set_value(int index, int **ptr_array, int array_length) {
  if (index == (array_length - 1)) {
    puts("Yes");
  }
}


x86 assembly (clang, -O0):
<set_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    113f <set_value+0x2f>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_value>:
add    $0xffffffff,%edx
cmp    %edi,%edx
jne    1123 <set_value+0x13>
lea    0xee2(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Yes\00"
define void @set_value(i32 %0, i32** %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32**
%6 = alloca i32
store i32 %0, i32* %4
store i32** %1, i32*** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = sub nsw i32 %8, 1
%10 = icmp eq i32 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Yes\00"
define void @set_value(i32 %0, i32** nocapture readnone %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = icmp eq i32 %4, %0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
char *malloc(int);
char *Square_coords_to_string(int x, int y) {
  char *str = malloc(3 * sizeof(char));
  str[0] = x + 'a';
  str[1] = '8' - y;
  str[2] = '\0';
  return str;
}


x86 assembly (clang, -O0):
<Square_coords_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x61,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    $0x38,%eax
sub    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x2(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Square_coords_to_string>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x3,%edi
call   1030 <malloc@plt>
add    $0x61,%bpl
mov    %bpl,(%rax)
mov    $0x38,%cl
sub    %bl,%cl
mov    %cl,0x1(%rax)
movb   $0x0,0x2(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @Square_coords_to_string(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i8* @malloc(i32 3)
store i8* %6, i8** %5
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 97
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = sub nsw i32 56, %12
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 0, i8* %18
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @Square_coords_to_string(i32 %0, i32 %1) {
%3 = tail call dereferenceable_or_null(3) i8* @malloc(i32 3)
%4 = trunc i32 %0 to i8
%5 = add i8 %4, 97
store i8 %5, i8* %3
%6 = trunc i32 %1 to i8
%7 = sub i8 56, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %7, i8* %8
%9 = getelementptr inbounds i8, i8* %3, i64 2
store i8 0, i8* %9
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t prestime(void) {
  time_t t;
  time(&t);
  return t;
}


x86 assembly (clang, -O0):
<prestime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <time@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prestime>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <time@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @prestime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
unsigned int rd_unsigned2(fd) {
  char buf[2];
  rd_bytes(fd, buf, 2L);
  return ((((buf)[0]) & 0377) | ((unsigned)(((buf)[1]) & 0377) << 8));
}


x86 assembly (clang, -O0):
<rd_unsigned2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x6(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <rd_bytes@plt>
movsbl -0x6(%rbp),%eax
and    $0xff,%eax
movsbl -0x5(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_unsigned2>:
push   %rax
lea    0x6(%rsp),%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <rd_bytes@plt>
movzwl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rd_unsigned2(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%6 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @rd_bytes to i32 (i32, i8*, i64, ...)*)(i32 %4, i8* %5, i64 2)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = and i32 %9, 255
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = and i32 %13, 255
%15 = shl i32 %14, 8
%16 = or i32 %10, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @rd_unsigned2(i32 %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @rd_bytes to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %3, i64 2)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 8
%11 = or i32 %10, %6
ret i32 %11
}
int event_base_start_iocp(struct event_base *base, int n_cpus) { return -1; }


x86 assembly (clang, -O0):
<event_base_start_iocp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.event_base = type opaque
define i32 @event_base_start_iocp(%struct.event_base* %0, i32 %1) {
%3 = alloca %struct.event_base*
%4 = alloca i32
store %struct.event_base* %0, %struct.event_base** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
%struct.event_base = type opaque
define i32 @event_base_start_iocp(%struct.event_base* nocapture readnone %0, i32 %1) {
ret i32 -1
}
void RTLockValidatorClassEnforceStrictReleaseOrder(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorClassEnforceStrictReleaseOrder() {
ret void
}
/* Type definitions */
struct rbtree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rbtree *);
int /*<<< orphan*/ rbtree_clear(struct rbtree *);
void rbtree_free(struct rbtree *target) {
  rbtree_clear(target);
  free(target);
}


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

x86 assembly (clang, -O2):
<rbtree_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <rbtree_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.rbtree = type { i32 }
define void @rbtree_free(%struct.rbtree* %0) {
%2 = alloca %struct.rbtree*
store %struct.rbtree* %0, %struct.rbtree** %2
%3 = load %struct.rbtree*, %struct.rbtree** %2
%4 = call i32 @rbtree_clear(%struct.rbtree* %3)
%5 = load %struct.rbtree*, %struct.rbtree** %2
%6 = call i32 @free(%struct.rbtree* %5)
ret void
}

LLVM IR (-O2):
%struct.rbtree = type { i32 }
define void @rbtree_free(%struct.rbtree* %0) {
%2 = tail call i32 @rbtree_clear(%struct.rbtree* %0)
%3 = tail call i32 @free(%struct.rbtree* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input;
  int sum;
  printf("Enter number n:\n");
  scanf("%d", &input);
  sum = input * (input + 1);
  printf("Sum of %d natural numbers is %d\n", input, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0x1(%rsi),%edx
imul   %esi,%edx
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter number n:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"Sum of %d natural numbers is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = mul nsw i32 %6, %8
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"Sum of %d natural numbers is %d\0A\00"
@str = [16 x i8] c"Enter number n:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 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), i32* %1)
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %6, %5
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _OSSwapInt32(int /*<<< orphan*/);
uint32_t OSReadSwapInt32(volatile void *base, uintptr_t offset) {
  uint32_t result;
  result = *(uint32_t *)((uintptr_t)base + offset);
  return _OSSwapInt32(result);
}


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

x86 assembly (clang, -O2):
<OSReadSwapInt32>:
mov    (%rdi,%rsi,1),%edi
jmp    1030 <_OSSwapInt32@plt>

LLVM IR (-O0):
define i32 @OSReadSwapInt32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i64, i64* %4
%9 = add i64 %7, %8
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = call i32 @_OSSwapInt32(i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @OSReadSwapInt32(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = add i64 %3, %1
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @_OSSwapInt32(i32 %6)
ret i32 %7
}