xunge/DecIR huggingface dataset:
int test_imm_35int64_lowword_reg(long long val) {
  return ((val) & (0x35 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_35int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 53
%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_35int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 53
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait4(int /*<<< orphan*/, int *, int, struct rusage *);
pid_t wait3(int *status, int options, struct rusage *rusage) {
  return wait4((pid_t)-1, status, options, rusage);
}


x86 assembly (clang, -O0):
<wait3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0xffffffff,%edi
call   1030 <wait4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait3>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1030 <wait4@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
define i32 @wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.rusage*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.rusage* %2, %struct.rusage** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load %struct.rusage*, %struct.rusage** %6
%10 = call i32 @wait4(i32 -1, i32* %7, i32 %8, %struct.rusage* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
define i32 @wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = tail call i32 @wait4(i32 -1, i32* %0, i32 %1, %struct.rusage* %2)
ret i32 %4
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, int, double);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  double result = pow(n, 3);
  printf("%d^3 = %.2f\n", n, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
mov    0x4(%rsp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"%d^3 = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call double @pow(i32 %4, i32 3)
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %6, double %5)
ret i32 0
}
void CFGMR3AreValuesValid(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3AreValuesValid() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void msleep(int microsec) { usleep((unsigned long)microsec); }


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

x86 assembly (clang, -O2):
<msleep>:
movslq %edi,%rdi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = call i32 @usleep(i64 %4)
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i32 @usleep(i64 %2)
ret void
}
float celToFahr(int cel) { return (cel * 1.8 + 32); }


x86 assembly (clang, -O0):
<celToFahr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<celToFahr>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @celToFahr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 1.800000e+00, double 3.200000e+01)
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @celToFahr(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fptrunc double %3 to float
ret float %4
}
char *foo1(char *p, unsigned int x) { return p - (x & ~1); }


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,%ecx
mov    %ecx,%edx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
mov    %rdi,%rax
and    $0xfffffffe,%esi
sub    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @foo1(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 = and i32 %6, -2
%8 = zext i32 %7 to i64
%9 = sub i64 0, %8
%10 = getelementptr inbounds i8, i8* %5, i64 %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @foo1(i8* readnone %0, i32 %1) {
%3 = and i32 %1, -2
%4 = zext i32 %3 to i64
%5 = sub nsw i64 0, %4
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ tmpbuf;

/* Variables and functions */
int /*<<< orphan*/ jsonq(char const *, char const *, char *, int);
int /*<<< orphan*/ strcmp(char *, char *);
int jsonq_bool(const char *s, const char *name) {
  char tmpbuf[256];
  jsonq(s, name, tmpbuf, sizeof(tmpbuf));
  return !strcmp(tmpbuf, "true");
}


x86 assembly (clang, -O0):
<jsonq_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x110(%rbp),%rdx
mov    $0x100,%ecx
call   1030 <jsonq@plt>
lea    -0x110(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonq_bool>:
sub    $0x108,%rsp
mov    %rsp,%rdx
mov    $0x100,%ecx
call   1030 <jsonq@plt>
mov    $0x65757274,%ecx
xor    (%rsp),%ecx
movzbl 0x4(%rsp),%edx
xor    %eax,%eax
or     %ecx,%edx
sete   %al
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
define i32 @jsonq_bool(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%9 = call i32 @jsonq(i8* %6, i8* %7, i8* %8, i32 256)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
define i32 @jsonq_bool(i8* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @jsonq(i8* %0, i8* %1, i8* %4, i32 256)
%6 = call i32 @bcmp(i8* dereferenceable(5) %4, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
long long foo7(long long x) { return x - (-1); }


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

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

LLVM IR (-O0):
define i64 @foo7(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 %3, -1
ret i64 %4
}

LLVM IR (-O2):
define i64 @foo7(i64 %0) {
%2 = add nsw i64 %0, 1
ret i64 %2
}
/* Variables and functions */
int strlen(char *str) {
  char *p = str;
  unsigned int counter = 0;
  while (*p != '\0') {
    p++;
    counter++;
  }
  return counter;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1141 <strlen+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <strlen+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int add(int, int);
int main(void) { return add(9, 4); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x9,%edi
mov    $0x4,%esi
jmp    1030 <add@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @add(i32 9, i32 4)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ matNf_setRow(float *, float const *, int const, int);
void mat4f_setRow(float matrix[16], const float v[4], const int row) {
  matNf_setRow(matrix, v, row, 4);
}


x86 assembly (clang, -O0):
<mat4f_setRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x4,%ecx
call   1030 <matNf_setRow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4f_setRow>:
mov    $0x4,%ecx
jmp    1030 <matNf_setRow@plt>

LLVM IR (-O0):
define void @mat4f_setRow(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = load i32, i32* %6
%10 = call i32 @matNf_setRow(float* %7, float* %8, i32 %9, i32 4)
ret void
}

LLVM IR (-O2):
define void @mat4f_setRow(float* %0, float* %1, i32 %2) {
%4 = tail call i32 @matNf_setRow(float* %0, float* %1, i32 %2, i32 4)
ret void
}
int clickplc_exe_Next_dec(unsigned char *stream, void *obj) {
  int encsize = 4;
  return (encsize);
}


x86 assembly (clang, -O0):
<clickplc_exe_Next_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @clickplc_exe_Next_dec(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 4
}
/* Variables and functions */
long double __qasin(long double);
long double intr_wrap_010(long double p1) { return __qasin(p1); }


x86 assembly (clang, -O0):
<intr_wrap_010>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__qasin@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_010>:
jmp    1030 <__qasin@plt>

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

LLVM IR (-O2):
define x86_fp80 @intr_wrap_010(x86_fp80 %0) {
%2 = tail call x86_fp80 @__qasin(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void pa_threaded_mainloop_unlock(int *m) {
  empty_log("pa_threaded_mainloop_unlock: nothing to do\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"pa_threaded_mainloop_unlock: nothing to do\0A\00"
define void @pa_threaded_mainloop_unlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @empty_log(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"pa_threaded_mainloop_unlock: nothing to do\0A\00"
define void @pa_threaded_mainloop_unlock(i32* nocapture readnone %0) {
%2 = tail call i32 @empty_log(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
double load_le_double(const uint8_t *p) {
  union {
    double d;
    uint8_t b[sizeof(double)];
  } u;
  memcpy(u.b, p, sizeof(double));
  return u.d;
}


x86 assembly (clang, -O0):
<load_le_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_le_double>:
sub    $0x28,%rsp
mov    %rdi,%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
%union.anon = type { double, [24 x i8] }
define double @load_le_double(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
store i32* %0, i32** %2
%4 = bitcast %union.anon* %3 to [8 x i32]*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%6 = load i32*, i32** %2
%7 = call i32 @memcpy(i32* %5, i32* %6, i32 8)
%8 = bitcast %union.anon* %3 to double*
%9 = load double, double* %8
ret double %9
}

LLVM IR (-O2):
%union.anon = type { double, [24 x i8] }
define double @load_le_double(i32* %0) {
%2 = alloca %union.anon
%3 = bitcast %union.anon* %2 to i8*
%4 = bitcast %union.anon* %2 to i32*
%5 = call i32 @memcpy(i32* %4, i32* %0, i32 8)
%6 = getelementptr inbounds %union.anon, %union.anon* %2, i64 0, i32 0
%7 = load double, double* %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printInt(char, int);
int main() { printInt('a', 54); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%edi
mov    $0x36,%esi
call   1030 <printInt@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
mov    $0x36,%esi
call   1030 <printInt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @printInt(i8 signext 97, i32 54)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printInt(i8 signext 97, i32 54)
ret i32 0
}
void gdk_rgb_find_color() {}


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

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

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

LLVM IR (-O2):
define void @gdk_rgb_find_color() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("say Helllo world Jorge Juri");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"say Helllo world Jorge Juri\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"say Helllo world Jorge Juri\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int errno;
int get_errno(void) { return errno; }


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

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

LLVM IR (-O0):
@errno = global i32 0
define i32 @get_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @get_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}
void outb(unsigned char v, unsigned short p) {
  asm volatile("outb %1,%0" ::"d"(p), "a"(v));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%dx
mov    -0x1(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8, i8* %3
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb $1,$0", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %1, i8 %0)
ret void
}
void on_exit_msg() {}


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

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

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

LLVM IR (-O2):
define void @on_exit_msg() {
ret void
}
int is_pos(int numero) {
  int boolean = 0;
  if (numero >= 0) {
    boolean = 1;
  }
  return boolean;
}


x86 assembly (clang, -O0):
<is_pos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111f <is_pos+0x1f>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pos>:
mov    %edi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @is_pos(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_pos(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
ret i32 %3
}
int isprime(int m) {
  if (m < 1)
    return 0;
  int i;
  for (i = 2; i < m; i++) {
    if (m % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    111d <isprime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isprime+0x66>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <isprime+0x5f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114c <isprime+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isprime+0x66>
jmp    1151 <isprime+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <isprime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
xor    %ecx,%ecx
test   %edi,%edi
jle    1126 <isprime+0x26>
cmp    $0x3,%edi
jb     1120 <isprime+0x20>
mov    $0x2,%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1126 <isprime+0x26>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <isprime+0x10>
mov    $0x1,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 2
br i1 %4, label %7, label %12
5: ; preds = %7
%6 = icmp eq i32 %11, %0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %5, %7, %3, %1
%13 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 1, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glIndexiv(int /*<<< orphan*/ *);
void Indexiv(GLint c[1]) { glIndexiv(c); }


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

x86 assembly (clang, -O2):
<Indexiv>:
jmp    1030 <glIndexiv@plt>

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

LLVM IR (-O2):
define void @Indexiv(i32* %0) {
%2 = tail call i32 @glIndexiv(i32* %0)
ret void
}
/* Variables and functions */
double cos(int);
double calc_tk(int k, int nnodes) {
  int nn;
  nn = 2 * nnodes;
  return cos((nn - 1 - 2 * k) * 3.14159265358979323846 / nn);
}


x86 assembly (clang, -O0):
<calc_tk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xebf(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_tk>:
add    %edi,%edi
not    %edi
lea    (%rdi,%rsi,2),%eax
mov    %esi,%ecx
add    %esi,%ecx
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
cvtsi2sd %ecx,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <cos@plt>

LLVM IR (-O0):
define double @calc_tk(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 2, %6
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = mul nsw i32 2, %10
%12 = sub nsw i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 0x400921FB54442D18
%15 = load i32, i32* %5
%16 = sitofp i32 %15 to double
%17 = fdiv double %14, %16
%18 = fptosi double %17 to i32
%19 = call double @cos(i32 %18)
ret double %19
}

LLVM IR (-O2):
define double @calc_tk(i32 %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = mul i32 %0, -2
%5 = add i32 %4, -1
%6 = add i32 %5, %3
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 0x400921FB54442D18
%9 = sitofp i32 %3 to double
%10 = fdiv double %8, %9
%11 = fptosi double %10 to i32
%12 = tail call double @cos(i32 %11)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void exitapp(int exitcode) { exit(exitcode); }


x86 assembly (clang, -O0):
<exitapp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<exitapp>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @exitapp(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _MM_SET_EXCEPTION_MASK(unsigned int);
void test_MM_SET_EXCEPTION_MASK(unsigned int A) { _MM_SET_EXCEPTION_MASK(A); }


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

x86 assembly (clang, -O2):
<test_MM_SET_EXCEPTION_MASK>:
jmp    1030 <_MM_SET_EXCEPTION_MASK@plt>

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

LLVM IR (-O2):
define void @test_MM_SET_EXCEPTION_MASK(i32 %0) {
%2 = tail call i32 @_MM_SET_EXCEPTION_MASK(i32 %0)
ret void
}
/* Variables and functions */
unsigned char readchar();
unsigned char readchar_blocking() {
  unsigned char ch;
  unsigned char ret;
  ch = 0;
  while (ch == 0) {
    ch = readchar();
  }
  ret = ch & 0x7F;
  while (ch != 0) {
    ch = readchar();
  }
  return ret;
}


x86 assembly (clang, -O0):
<readchar_blocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1138 <readchar_blocking+0x28>
mov    $0x0,%al
call   1030 <readchar@plt>
mov    %al,-0x1(%rbp)
jmp    111c <readchar_blocking+0xc>
movzbl -0x1(%rbp),%eax
and    $0x7f,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     115e <readchar_blocking+0x4e>
mov    $0x0,%al
call   1030 <readchar@plt>
mov    %al,-0x1(%rbp)
jmp    1142 <readchar_blocking+0x32>
movzbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readchar_blocking>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <readchar@plt>
test   %al,%al
je     1120 <readchar_blocking+0x10>
mov    %eax,%ebx
nopl   (%rax)
xor    %eax,%eax
call   1030 <readchar@plt>
test   %al,%al
jne    1130 <readchar_blocking+0x20>
and    $0x7f,%bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @readchar_blocking() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %1
br label %3
3: ; preds = %7, %0
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call zeroext i8 (...) @readchar()
store i8 %8, i8* %1
br label %3
9: ; preds = %3
%10 = load i8, i8* %1
%11 = zext i8 %10 to i32
%12 = and i32 %11, 127
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %14
14: ; preds = %18, %9
%15 = load i8, i8* %1
%16 = zext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call zeroext i8 (...) @readchar()
store i8 %19, i8* %1
br label %14
20: ; preds = %14
%21 = load i8, i8* %2
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @readchar_blocking() {
br label %1
1: ; preds = %0, %1
%2 = tail call zeroext i8 (...) @readchar()
%3 = icmp eq i8 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1, %4
%5 = tail call zeroext i8 (...) @readchar()
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = and i8 %2, 127
ret i8 %8
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int inet_pton(int /*<<< orphan*/, char const *, struct in6_addr *);
int verify_ipv6(const char *addr) {
  int result = 0;
  if (addr != NULL) {
    struct in6_addr a;
    result = inet_pton(AF_INET6, addr, &a);
  }
  return (result > 0) ? 1 : 0;
}


x86 assembly (clang, -O0):
<verify_ipv6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <verify_ipv6+0x37>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_ipv6>:
test   %rdi,%rdi
je     1138 <verify_ipv6+0x28>
push   %rax
mov    %rdi,%rsi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setg   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
@AF_INET6 = global i32 0
define i32 @verify_ipv6(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.in6_addr
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @AF_INET6
%9 = load i8*, i8** %2
%10 = call i32 @inet_pton(i32 %8, i8* %9, %struct.in6_addr* %4)
store i32 %10, i32* %3
br label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
ret i32 %15
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
@AF_INET6 = global i32 0
define i32 @verify_ipv6(i8* %0) {
%2 = alloca %struct.in6_addr
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = bitcast %struct.in6_addr* %2 to i8*
%6 = load i32, i32* @AF_INET6
%7 = call i32 @inet_pton(i32 %6, i8* %0, %struct.in6_addr* %2)
%8 = icmp sgt i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %1
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct TYPE_3__ {
  int /*<<< orphan*/ *wide_char;
};
struct TYPE_4__ {
  TYPE_1__ string;
};
typedef TYPE_2__ XIMText;

/* Variables and functions */
void set_XIMText_string_wide_char(void *_p, void *_v) {
  ((XIMText *)_p)->string.wide_char = (wchar_t *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XIMText_string_wide_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XIMText_string_wide_char(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errorExit(int);
int /*<<< orphan*/ printf(char *);
void outOfMemory(void) {
  printf("RAxML was not able to allocate enough memory.\n");
  printf("Please check the approximate memory consumption of your dataset "
         "using\n");
  printf("the memory calculator at "
         "http://www.exelixis-lab.org/web/software/raxml/index.html.\n");
  printf("RAxML will exit now\n");
  errorExit(-1);
}


x86 assembly (clang, -O0):
<outOfMemory>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7c(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <errorExit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outOfMemory>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1040 <errorExit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"RAxML was not able to allocate enough memory.\0A\00"
@.str.1 = [71 x i8] c"Please check the approximate memory consumption of your dataset using\0A\00"
@.str.2 = [85 x i8] c"the memory calculator at http://www.exelixis-lab.org/web/software/raxml/index.html.\0A\00"
@.str.3 = [21 x i8] c"RAxML will exit now\0A\00"
define void @outOfMemory() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @errorExit(i32 -1)
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"RAxML was not able to allocate enough memory.\00"
@str.4 = [70 x i8] c"Please check the approximate memory consumption of your dataset using\00"
@str.5 = [84 x i8] c"the memory calculator at http://www.exelixis-lab.org/web/software/raxml/index.html.\00"
@str.6 = [20 x i8] c"RAxML will exit now\00"
define void @outOfMemory() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @errorExit(i32 -1)
ret void
}
int omap5_thermal_expose_sensor(struct omap_bandgap *bg_ptr, int id,
                                char *domain) {
  return 0;
}


x86 assembly (clang, -O0):
<omap5_thermal_expose_sensor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.omap_bandgap = type opaque
define i32 @omap5_thermal_expose_sensor(%struct.omap_bandgap* %0, i32 %1, i8* %2) {
%4 = alloca %struct.omap_bandgap*
%5 = alloca i32
%6 = alloca i8*
store %struct.omap_bandgap* %0, %struct.omap_bandgap** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.omap_bandgap = type opaque
define i32 @omap5_thermal_expose_sensor(%struct.omap_bandgap* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
double _pow(int, int);
double ldexp(double x, int p) { return x * _pow(2, p); }


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    $0x2,%edi
call   1030 <_pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexp>:
push   %rax
mov    %edi,%esi
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1030 <_pow@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
%3 = tail call double @_pow(i32 2, i32 %1)
%4 = fmul double %3, %0
ret double %4
}
void unsigned_char_rem_signed_char_unsigned_int(unsigned char *LHS,
                                                unsigned int RHS) {
  (*LHS) %= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_rem_signed_char_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzbl (%rax),%eax
xor    %edx,%edx
div    %ecx
mov    -0x18(%rbp),%rax
mov    %dl,%cl
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_rem_signed_char_unsigned_int>:
movzbl (%rdi),%eax
xor    %edx,%edx
div    %esi
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @unsigned_char_rem_signed_char_unsigned_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = urem i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
void smbios_build_type_38_table(void) {}


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

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

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

LLVM IR (-O2):
define void @smbios_build_type_38_table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void TimerDelay(unsigned long delay) { usleep(delay); }


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

x86 assembly (clang, -O2):
<TimerDelay>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @TimerDelay(i64 %0) {
%2 = tail call i32 @usleep(i64 %0)
ret void
}
float square(float num) { return (num * num); }


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

x86 assembly (clang, -O2):
<square>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @square(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @square(float %0) {
%2 = fmul float %0, %0
ret float %2
}
int test_imm_C2int32_mem(int *val) {
  return ((*val) & (0xC2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C2int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 194
%6 = icmp ne i32 %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_C2int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 194
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ cat(char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *);
int main(void) {
  char s[32];
  sprintf(s, "addFile_cat.b");
  if (0 != cat("addFile_cat.a", s)) {
    puts("cat failed");
    exit(-1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1060 <cat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1193 <main+0x53>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x622e7461635f65,%rax
mov    %rax,0x6(%rsp)
movabs $0x5f656c6946646461,%rax
6c 65 5f
mov    %rax,(%rsp)
lea    0xeb6(%rip),%rdi
mov    %rsp,%rsi
call   1050 <cat@plt>
test   %rax,%rax
jne    116c <main+0x3c>
xor    %edi,%edi
call   1040 <exit@plt>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"addFile_cat.b\00"
@.str.1 = [14 x i8] c"addFile_cat.a\00"
@.str.2 = [11 x i8] c"cat failed\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = call i64 @cat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = icmp ne i64 0, %6
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %0
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"addFile_cat.b\00"
@.str.1 = [14 x i8] c"addFile_cat.a\00"
@.str.2 = [11 x i8] c"cat failed\00"
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = call i64 @cat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 -1)
unreachable
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ nothing();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("There, now you have less than nothing. Yet you still try. Some would "
         "recogmedn a psychologist. I recogmend natural selection\n");
  nothing();
}


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

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

LLVM IR (-O0):
@.str = [126 x i8] c"There, now you have less than nothing. Yet you still try. Some would recogmedn a psychologist. I recogmend natural selection\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @nothing()
ret i32 0
}

LLVM IR (-O2):
@str = [125 x i8] c"There, now you have less than nothing. Yet you still try. Some would recogmedn a psychologist. I recogmend natural selection\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([125 x i8], [125 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @nothing()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_calculadora();
int /*<<< orphan*/ test_criar_personagem();
int /*<<< orphan*/ test_duelo();
int /*<<< orphan*/ test_maior_elemento();
int /*<<< orphan*/ test_maior_media();
int /*<<< orphan*/ test_maior_numero();
int /*<<< orphan*/ test_media_notas();
int /*<<< orphan*/ test_soma();
int main() {
  test_soma();
  test_maior_numero();
  test_maior_elemento();
  test_calculadora();
  test_media_notas();
  test_maior_media();
  test_criar_personagem();
  test_duelo();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_soma@plt>
mov    $0x0,%al
call   10a0 <test_maior_numero@plt>
mov    $0x0,%al
call   1080 <test_maior_elemento@plt>
mov    $0x0,%al
call   1090 <test_calculadora@plt>
mov    $0x0,%al
call   1050 <test_media_notas@plt>
mov    $0x0,%al
call   1060 <test_maior_media@plt>
mov    $0x0,%al
call   1030 <test_criar_personagem@plt>
mov    $0x0,%al
call   1070 <test_duelo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_soma@plt>
xor    %eax,%eax
call   10a0 <test_maior_numero@plt>
xor    %eax,%eax
call   1080 <test_maior_elemento@plt>
xor    %eax,%eax
call   1090 <test_calculadora@plt>
xor    %eax,%eax
call   1050 <test_media_notas@plt>
xor    %eax,%eax
call   1060 <test_maior_media@plt>
xor    %eax,%eax
call   1030 <test_criar_personagem@plt>
xor    %eax,%eax
call   1070 <test_duelo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_soma()
%3 = call i32 (...) @test_maior_numero()
%4 = call i32 (...) @test_maior_elemento()
%5 = call i32 (...) @test_calculadora()
%6 = call i32 (...) @test_media_notas()
%7 = call i32 (...) @test_maior_media()
%8 = call i32 (...) @test_criar_personagem()
%9 = call i32 (...) @test_duelo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_soma()
%2 = tail call i32 (...) @test_maior_numero()
%3 = tail call i32 (...) @test_maior_elemento()
%4 = tail call i32 (...) @test_calculadora()
%5 = tail call i32 (...) @test_media_notas()
%6 = tail call i32 (...) @test_maior_media()
%7 = tail call i32 (...) @test_criar_personagem()
%8 = tail call i32 (...) @test_duelo()
ret i32 0
}