xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_dobldobl_series_step(double *step) {
  int fail;
  int precision = 1;
  int *b;
  fail = _ada_use_c2phc4c(885, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_dobldobl_series_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x375,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_dobldobl_series_step>:
push   %rax
mov    %rdi,%rcx
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x375,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @padcon_get_dobldobl_series_step(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 885, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
double unifinv(double p, double a, double b) {
  if (b < a)
    error("Parameter b is smaller than a.");
  return p * (b - a) + a;
}


x86 assembly (clang, -O0):
<unifinv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1147 <unifinv+0x37>
lea    0xebe(%rip),%rdi
call   1030 <error@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unifinv>:
ucomisd %xmm2,%xmm1
jbe    114c <unifinv+0x3c>
sub    $0x18,%rsp
lea    0xedf(%rip),%rdi
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  %xmm2,(%rsp)
call   1030 <error@plt>
movsd  (%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Parameter b is smaller than a.\00"
define double @unifinv(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %3
%13 = load double, double* %4
%14 = load double, double* %6
%15 = load double, double* %5
%16 = fsub double %14, %15
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double %13, double %16, double %17)
ret double %18
}

LLVM IR (-O2):
@.str = [31 x i8] c"Parameter b is smaller than a.\00"
define double @unifinv(double %0, double %1, double %2) {
%4 = fcmp olt double %2, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = fsub double %2, %1
%9 = tail call double @llvm.fmuladd.f64(double %0, double %8, double %1)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ puts0(char *);
void int91_unknown(void) { puts0("Error: Unknown int 91 function!\r\n"); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Error: Unknown int 91 function!\0D\0A\00"
define void @int91_unknown() {
%1 = call i32 @puts0(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Error: Unknown int 91 function!\0D\0A\00"
define void @int91_unknown() {
%1 = tail call i32 @puts0(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}
int in_octal_digit_class(int c) { return '0' <= c && c <= '7'; }


x86 assembly (clang, -O0):
<in_octal_digit_class>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <in_octal_digit_class+0x24>
cmpl   $0x37,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_octal_digit_class>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @in_octal_digit_class(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 55
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @in_octal_digit_class(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ e_movrr(int, int);
int /*<<< orphan*/ e_pushr(int);
int /*<<< orphan*/ e_subri(int, int);
void co_enter(void) {
  e_pushr(5);
  e_movrr(5, 4);
  e_pushr(3);
  e_pushr(6);
  e_pushr(7);
  e_subri(4, 12 + 16);
}


x86 assembly (clang, -O0):
<co_enter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1050 <e_pushr@plt>
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <e_movrr@plt>
mov    $0x3,%edi
call   1050 <e_pushr@plt>
mov    $0x6,%edi
call   1050 <e_pushr@plt>
mov    $0x7,%edi
call   1050 <e_pushr@plt>
mov    $0x4,%edi
mov    $0x1c,%esi
call   1030 <e_subri@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_enter>:
push   %rax
mov    $0x5,%edi
call   1050 <e_pushr@plt>
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <e_movrr@plt>
mov    $0x3,%edi
call   1050 <e_pushr@plt>
mov    $0x6,%edi
call   1050 <e_pushr@plt>
mov    $0x7,%edi
call   1050 <e_pushr@plt>
mov    $0x4,%edi
mov    $0x1c,%esi
pop    %rax
jmp    1030 <e_subri@plt>

LLVM IR (-O0):
define void @co_enter() {
%1 = call i32 @e_pushr(i32 5)
%2 = call i32 @e_movrr(i32 5, i32 4)
%3 = call i32 @e_pushr(i32 3)
%4 = call i32 @e_pushr(i32 6)
%5 = call i32 @e_pushr(i32 7)
%6 = call i32 @e_subri(i32 4, i32 28)
ret void
}

LLVM IR (-O2):
define void @co_enter() {
%1 = tail call i32 @e_pushr(i32 5)
%2 = tail call i32 @e_movrr(i32 5, i32 4)
%3 = tail call i32 @e_pushr(i32 3)
%4 = tail call i32 @e_pushr(i32 6)
%5 = tail call i32 @e_pushr(i32 7)
%6 = tail call i32 @e_subri(i32 4, i32 28)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
char *SelectLeftRight(int /*<<< orphan*/, char *, int /*<<< orphan*/, int);
char *QMSelectLeft(int16_t fno, char *index_name, int16_t listno) {
  return SelectLeftRight(fno, index_name, listno, 44);
}


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

x86 assembly (clang, -O2):
<QMSelectLeft>:
mov    $0x2c,%ecx
jmp    1030 <SelectLeftRight@plt>

LLVM IR (-O0):
define i8* @QMSelectLeft(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i8* @SelectLeftRight(i32 %7, i8* %8, i32 %9, i32 44)
ret i8* %10
}

LLVM IR (-O2):
define i8* @QMSelectLeft(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @SelectLeftRight(i32 %0, i8* %1, i32 %2, i32 44)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\nCzesc!\n\n");
  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 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [9 x i8] c"\0ACzesc!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float foo(long long u) {
  if (!(-(1LL << 53) < u && u < (1LL << 53))) {
    if ((unsigned long long)u & ((1ULL << 11) - 1)) {
      u &= ~((1ULL << 11) - 1);
      u |= (1ULL << 11);
    }
  }
  double f = (int)(u >> (32));
  f *= 0x1p32f;
  f += (unsigned int)u;
  return (float)f;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffe0000000000000,%rax
cmp    -0x8(%rbp),%rax
jge    1130 <foo+0x30>
movabs $0x20000000000000,%rax
cmp    %rax,-0x8(%rbp)
jl     1165 <foo+0x65>
mov    -0x8(%rbp),%rax
and    $0x7ff,%rax
cmp    $0x0,%rax
je     1160 <foo+0x60>
mov    -0x8(%rbp),%rax
and    $0xfffffffffffff800,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x800,%rax
mov    %rax,-0x8(%rbp)
jmp    1165 <foo+0x65>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe84(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movabs $0x1fffffffffffff,%rax
add    %rdi,%rax
mov    %rdi,%rcx
and    $0xfffffffffffff000,%rcx
or     $0x800,%rcx
test   $0x7ff,%edi
cmove  %rdi,%rcx
movabs $0x3fffffffffffff,%rdx
cmp    %rdx,%rax
cmovb  %rdi,%rcx
mov    %ecx,%eax
shr    $0x20,%rcx
cvtsi2sd %ecx,%xmm0
mulsd  0xeb5(%rip),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @foo(i64 %0) {
%2 = alloca i64
%3 = alloca double
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp slt i64 -9007199254740992, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp slt i64 %7, 9007199254740992
br i1 %8, label %19, label %9
9: ; preds = %6, %1
%10 = load i64, i64* %2
%11 = and i64 %10, 2047
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i64, i64* %2
%15 = and i64 %14, -2048
store i64 %15, i64* %2
%16 = load i64, i64* %2
%17 = or i64 %16, 2048
store i64 %17, i64* %2
br label %18
18: ; preds = %13, %9
br label %19
19: ; preds = %18, %6
%20 = load i64, i64* %2
%21 = ashr i64 %20, 32
%22 = trunc i64 %21 to i32
%23 = sitofp i32 %22 to double
store double %23, double* %3
%24 = load double, double* %3
%25 = fmul double %24, 0x41F0000000000000
store double %25, double* %3
%26 = load i64, i64* %2
%27 = trunc i64 %26 to i32
%28 = uitofp i32 %27 to double
%29 = load double, double* %3
%30 = fadd double %29, %28
store double %30, double* %3
%31 = load double, double* %3
%32 = fptrunc double %31 to float
ret float %32
}

LLVM IR (-O2):
define float @foo(i64 %0) {
%2 = add i64 %0, 9007199254740991
%3 = icmp ult i64 %2, 18014398509481983
%4 = and i64 %0, 2047
%5 = icmp eq i64 %4, 0
%6 = or i1 %3, %5
%7 = and i64 %0, -4096
%8 = or i64 %7, 2048
%9 = select i1 %6, i64 %0, i64 %8
%10 = lshr i64 %9, 32
%11 = trunc i64 %10 to i32
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 0x41F0000000000000
%14 = trunc i64 %9 to i32
%15 = uitofp i32 %14 to double
%16 = fadd double %13, %15
%17 = fptrunc double %16 to float
ret float %17
}
/* Variables and functions */
int /*<<< orphan*/ allot_float(int /*<<< orphan*/);
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
int /*<<< orphan*/ fixnum_to_float(int /*<<< orphan*/);
void primitive_fixnum_to_float_impl(void) {
  drepl(allot_float(fixnum_to_float(dpeek())));
}


x86 assembly (clang, -O0):
<primitive_fixnum_to_float_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1050 <fixnum_to_float@plt>
mov    %eax,%edi
call   1060 <allot_float@plt>
mov    %eax,%edi
call   1040 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_fixnum_to_float_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1050 <fixnum_to_float@plt>
mov    %eax,%edi
call   1060 <allot_float@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <drepl@plt>

LLVM IR (-O0):
define void @primitive_fixnum_to_float_impl() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @fixnum_to_float(i32 %1)
%3 = call i32 @allot_float(i32 %2)
%4 = call i32 @drepl(i32 %3)
ret void
}

LLVM IR (-O2):
define void @primitive_fixnum_to_float_impl() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @fixnum_to_float(i32 %1)
%3 = tail call i32 @allot_float(i32 %2)
%4 = tail call i32 @drepl(i32 %3)
ret void
}
int f(_Bool a) {
  int t = a;
  if (t != 2)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
je     112d <f+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1134 <f+0x34>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i1 zeroext %0) {
ret i32 0
}
int fun1137() { return 1137; }


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

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

LLVM IR (-O0):
define i32 @fun1137() {
ret i32 1137
}

LLVM IR (-O2):
define i32 @fun1137() {
ret i32 1137
}
/* Variables and functions */
float exp(double);
float dbtorms(float f) {
  if (f <= 0)
    return (0);
  else {
    if (f > 485)
      f = 485;
  }
  return (exp((2.302585092994 * 0.05) * (f - 100.)));
}


x86 assembly (clang, -O0):
<dbtorms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1137 <dbtorms+0x27>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118a <dbtorms+0x7a>
movss  -0x8(%rbp),%xmm0
movss  0xebc(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    115a <dbtorms+0x4a>
movss  0xeab(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    115f <dbtorms+0x4f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea0(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe8c(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbtorms>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jae    1140 <dbtorms+0x30>
movss  0xee0(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  0xed5(%rip),%xmm0
mulsd  0xed5(%rip),%xmm0
jmp    1030 <exp@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @dbtorms(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %18
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ogt float %8, 4.850000e+02
br i1 %9, label %10, label %11
10: ; preds = %7
store float 4.850000e+02, float* %3
br label %11
11: ; preds = %10, %7
br label %12
12: ; preds = %11
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fsub double %14, 1.000000e+02
%16 = fmul double 0x3FBD791C5F88877F, %15
%17 = call float @exp(double %16)
store float %17, float* %2
br label %18
18: ; preds = %12, %6
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @dbtorms(float %0) {
%2 = fcmp ugt float %0, 0.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = fcmp ogt float %0, 4.850000e+02
%5 = select i1 %4, float 4.850000e+02, float %0
%6 = fpext float %5 to double
%7 = fadd double %6, -1.000000e+02
%8 = fmul double %7, 0x3FBD791C5F88877F
%9 = tail call float @exp(double %8)
br label %10
10: ; preds = %1, %3
%11 = phi float [ %9, %3 ], [ 0.000000e+00, %1 ]
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *memalign(int, size_t);
__attribute__((unused)) void *memalign64(size_t szB) {
  void *x;
  x = memalign(64, szB);
  assert(x);
  assert(0 == ((64 - 1) & (unsigned long)x));
  return x;
}


x86 assembly (clang, -O0):
<memalign64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x40,%edi
call   1040 <memalign@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rcx
and    $0x3f,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memalign64>:
push   %rbx
mov    %rdi,%rsi
mov    $0x40,%edi
call   1040 <memalign@plt>
mov    %rax,%rbx
mov    %ebx,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memalign64(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @memalign(i32 64, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %9 to i64
%11 = and i64 63, %10
%12 = icmp eq i64 0, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @memalign64(i64 %0) {
%2 = tail call align 64 i8* @memalign(i32 64, i64 %0)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @assert(i32 1)
ret i8* %2
}
double calculate_average_value(int number_values, double sum_values) {
  double average = sum_values / (double)number_values;
  return average;
}


x86 assembly (clang, -O0):
<calculate_average_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_average_value>:
cvtsi2sd %edi,%xmm1
divsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @calculate_average_value(i32 %0, double %1) {
%3 = sitofp i32 %0 to double
%4 = fdiv double %1, %3
ret double %4
}
char *stralloc(s)
char *s;
{ return strcpy(ourmalloc((unsigned)strlen(s) + 1), s); }


x86 assembly (clang, -O0):
<stralloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    $0x0,%al
call   1050 <ourmalloc@plt>
movslq %eax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stralloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
xor    %eax,%eax
call   1050 <ourmalloc@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @stralloc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = trunc i64 %4 to i32
%6 = add i32 %5, 1
%7 = call i32 (i32, ...) bitcast (i32 (...)* @ourmalloc to i32 (i32, ...)*)(i32 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = load i8*, i8** %2
%11 = call i8* @strcpy(i8* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @stralloc(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @ourmalloc to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i8* @strcpy(i8* dereferenceable(1) %7, i8* dereferenceable(1) %0)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ USBDEVFS_CLAIMINTERFACE;
int doioctl(int /*<<< orphan*/, int *, char *);
int claim_if(int iIf) {
  return doioctl(USBDEVFS_CLAIMINTERFACE, &iIf, "claim_if");
}


x86 assembly (clang, -O0):
<claim_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <doioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<claim_if>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rdx
lea    0x4(%rsp),%rsi
call   1030 <doioctl@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@USBDEVFS_CLAIMINTERFACE = global i32 0
@.str = [9 x i8] c"claim_if\00"
define i32 @claim_if(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @USBDEVFS_CLAIMINTERFACE
%4 = call i32 @doioctl(i32 %3, i32* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void AV_WL16(uint8_t *dst, unsigned val) {
  *dst++ = val;
  *dst++ = val >> 8;
}


x86 assembly (clang, -O0):
<AV_WL16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AV_WL16>:
mov    %esi,(%rdi)
shr    $0x8,%esi
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @AV_WL16(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i32 1
store i32* %7, i32** %3
store i32 %5, i32* %6
%8 = load i32, i32* %4
%9 = lshr i32 %8, 8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %3
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @AV_WL16(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %1, i32* %0
%4 = lshr i32 %1, 8
store i32 %4, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearScreen();
int /*<<< orphan*/ pause();
void pauseAndClearScreen() {
  pause();
  clearScreen();
}


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

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

LLVM IR (-O0):
define void @pauseAndClearScreen() {
%1 = call i32 (...) @pause()
%2 = call i32 (...) @clearScreen()
ret void
}

LLVM IR (-O2):
define void @pauseAndClearScreen() {
%1 = tail call i32 (...) @pause()
%2 = tail call i32 (...) @clearScreen()
ret void
}
char *langDbgDevFmpac() { return "FMPAC"; }


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

x86 assembly (clang, -O2):
<langDbgDevFmpac>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"FMPAC\00"
define i8* @langDbgDevFmpac() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"FMPAC\00"
define i8* @langDbgDevFmpac() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ uvarint_encode64(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                    int);
uint8_t *Num_To_Varint_64(uint64_t TOV64INPUT) {
  static uint8_t buffy_001[60] = {0};
  uvarint_encode64(TOV64INPUT, buffy_001, 60);
  return buffy_001;
}


x86 assembly (clang, -O0):
<Num_To_Varint_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
mov    $0x3c,%edx
call   1030 <uvarint_encode64@plt>
lea    0x2f0a(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Num_To_Varint_64>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
mov    $0x3c,%edx
call   1030 <uvarint_encode64@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@Num_To_Varint_64.buffy_001 = internal global [60 x i32] zeroinitializer
define i32* @Num_To_Varint_64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @uvarint_encode64(i32 %3, i32* getelementptr inbounds ([60 x i32], [60 x i32]* @Num_To_Varint_64.buffy_001, i64 0, i64 0), i32 60)
ret i32* getelementptr inbounds ([60 x i32], [60 x i32]* @Num_To_Varint_64.buffy_001, i64 0, i64 0)
}

LLVM IR (-O2):
@Num_To_Varint_64.buffy_001 = internal global [60 x i32] zeroinitializer
define i32* @Num_To_Varint_64(i32 %0) {
%2 = tail call i32 @uvarint_encode64(i32 %0, i32* getelementptr inbounds ([60 x i32], [60 x i32]* @Num_To_Varint_64.buffy_001, i64 0, i64 0), i32 60)
ret i32* getelementptr inbounds ([60 x i32], [60 x i32]* @Num_To_Varint_64.buffy_001, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ pause();
int write(int, char *, int);
void *thread(void *arg) {
  assert(write(1, "", 1) == 1);
  pause();
  return arg;
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edx
lea    0xeb8(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x0,%al
call   1050 <pause@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
call   1050 <pause@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 (...) @pause()
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @thread(i8* readnone returned %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 (...) @pause()
ret i8* %0
}
/* Variables and functions */
int _rdseed16_step(unsigned short *);
int __attribute__((__target__("rdseed")))
rdseed16_step_wrap(unsigned short *p) {
  return _rdseed16_step(p);
}


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

x86 assembly (clang, -O2):
<rdseed16_step_wrap>:
jmp    1030 <_rdseed16_step@plt>

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

LLVM IR (-O2):
define i32 @rdseed16_step_wrap(i16* %0) {
%2 = tail call i32 @_rdseed16_step(i16* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ emitexpr(int);
int /*<<< orphan*/ puts(char *);
void emitbin(int expr1, int expr2) {
  emitexpr(expr2);
  puts("\tpush eax\n");
  emitexpr(expr1);
  puts("\tpop ecx\n");
}


x86 assembly (clang, -O0):
<emitbin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <emitexpr@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%edi
call   1040 <emitexpr@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emitbin>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <emitexpr@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <emitexpr@plt>
lea    0xec7(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\09push eax\0A\00"
@.str.1 = [10 x i8] c"\09pop ecx\0A\00"
define void @emitbin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @emitexpr(i32 %5)
%7 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 @emitexpr(i32 %8)
%10 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\09push eax\0A\00"
@.str.1 = [10 x i8] c"\09pop ecx\0A\00"
define void @emitbin(i32 %0, i32 %1) {
%3 = tail call i32 @emitexpr(i32 %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @emitexpr(i32 %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int polynomial(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  printf("Enter a value for x: ");
  scanf("%d", &x);
  printf("%d\n", polynomial(x));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Enter a value for x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 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* %2)
%5 = load i32, i32* %2
%6 = call i32 @polynomial(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter a value for x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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 = call i32 @polynomial(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: ./chat <username> <send fifo> <recieve fifo>\n");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"Usage: ./chat <username> <send fifo> <recieve fifo>\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"Usage: ./chat <username> <send fifo> <recieve fifo>\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *notImplemented();
char *serverClientKill(char *host, char *port, char *unused) {
  (void)(unused);
  return notImplemented();
}


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

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

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

LLVM IR (-O2):
define i8* @serverClientKill(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i8* (...) @notImplemented()
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ rr_dt_now(long *, long *);
bool rr_dt_is_past(long sec, long ms) {
  long now_sec, now_ms;
  rr_dt_now(&now_sec, &now_ms);
  if (now_sec > sec || (now_sec == sec && now_ms >= ms))
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<rr_dt_is_past>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <rr_dt_now@plt>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1157 <rr_dt_is_past+0x47>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1163 <rr_dt_is_past+0x53>
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1163 <rr_dt_is_past+0x53>
movl   $0x1,-0x4(%rbp)
jmp    116a <rr_dt_is_past+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr_dt_is_past>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <rr_dt_now@plt>
mov    $0x1,%eax
cmp    %rbx,0x10(%rsp)
jg     1148 <rr_dt_is_past+0x38>
sete   %al
cmp    %r14,0x8(%rsp)
setge  %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @rr_dt_is_past(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @rr_dt_now(i64* %3, i64* %4)
%8 = load i64, i64* %3
%9 = icmp sgt i64 %8, %0
br i1 %9, label %16, label %10
10: ; preds = %2
%11 = icmp eq i64 %8, %0
%12 = load i64, i64* %4
%13 = icmp sge i64 %12, %1
%14 = select i1 %11, i1 %13, i1 false
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %10, %2
%17 = phi i32 [ 1, %2 ], [ %15, %10 ]
ret i32 %17
}
/* Type definitions */
typedef int uint64_t;
struct pcg_state_128 {
  int dummy;
};

/* Variables and functions */
int pcg_mcg_128_xsh_rr_64_random_r(struct pcg_state_128 *);
uint64_t pcg_mcg_128_xsh_rr_64_boundedrand_r(struct pcg_state_128 *rng,
                                             uint64_t bound) {
  uint64_t threshold = -bound % bound;
  for (;;) {
    uint64_t r = pcg_mcg_128_xsh_rr_64_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_mcg_128_xsh_rr_64_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_mcg_128_xsh_rr_64_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_mcg_128_xsh_rr_64_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_mcg_128_xsh_rr_64_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_mcg_128_xsh_rr_64_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_mcg_128_xsh_rr_64_random_r@plt>
test   %eax,%eax
js     1120 <pcg_mcg_128_xsh_rr_64_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_128 = type { i32 }
define i32 @pcg_mcg_128_xsh_rr_64_boundedrand_r(%struct.pcg_state_128* %0, i32 %1) {
%3 = alloca %struct.pcg_state_128*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_128* %0, %struct.pcg_state_128** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_128*, %struct.pcg_state_128** %3
%13 = call i32 @pcg_mcg_128_xsh_rr_64_random_r(%struct.pcg_state_128* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_128 = type { i32 }
define i32 @pcg_mcg_128_xsh_rr_64_boundedrand_r(%struct.pcg_state_128* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_mcg_128_xsh_rr_64_random_r(%struct.pcg_state_128* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
void XdbeQueryExtension() {}


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

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

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

LLVM IR (-O2):
define void @XdbeQueryExtension() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f_empty_goto_loop();
int /*<<< orphan*/ f_empty_goto_loop_suffix();
int /*<<< orphan*/ f_empty_while_loop();
int /*<<< orphan*/ f_empty_while_loop_suffix();
int /*<<< orphan*/ f_nonempty_goto_loop();
int /*<<< orphan*/ f_nonempty_while_loop();
int main() {
  f_empty_goto_loop();
  f_empty_while_loop();
  f_empty_goto_loop_suffix();
  f_empty_while_loop_suffix();
  f_nonempty_goto_loop();
  f_nonempty_while_loop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <f_empty_goto_loop@plt>
mov    $0x0,%al
call   1080 <f_empty_while_loop@plt>
mov    $0x0,%al
call   1040 <f_empty_goto_loop_suffix@plt>
mov    $0x0,%al
call   1030 <f_empty_while_loop_suffix@plt>
mov    $0x0,%al
call   1070 <f_nonempty_goto_loop@plt>
mov    $0x0,%al
call   1050 <f_nonempty_while_loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <f_empty_goto_loop@plt>
xor    %eax,%eax
call   1080 <f_empty_while_loop@plt>
xor    %eax,%eax
call   1040 <f_empty_goto_loop_suffix@plt>
xor    %eax,%eax
call   1030 <f_empty_while_loop_suffix@plt>
xor    %eax,%eax
call   1070 <f_nonempty_goto_loop@plt>
xor    %eax,%eax
call   1050 <f_nonempty_while_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f_empty_goto_loop()
%3 = call i32 (...) @f_empty_while_loop()
%4 = call i32 (...) @f_empty_goto_loop_suffix()
%5 = call i32 (...) @f_empty_while_loop_suffix()
%6 = call i32 (...) @f_nonempty_goto_loop()
%7 = call i32 (...) @f_nonempty_while_loop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f_empty_goto_loop()
%2 = tail call i32 (...) @f_empty_while_loop()
%3 = tail call i32 (...) @f_empty_goto_loop_suffix()
%4 = tail call i32 (...) @f_empty_while_loop_suffix()
%5 = tail call i32 (...) @f_nonempty_goto_loop()
%6 = tail call i32 (...) @f_nonempty_while_loop()
ret i32 0
}
unsigned short oui_get_tlv_head(unsigned short type, unsigned short len) {
  return (type & 0x7f) << 9 | (len & 0x1ff);
}


x86 assembly (clang, -O0):
<oui_get_tlv_head>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x7f,%eax
shl    $0x9,%eax
movzwl -0x4(%rbp),%ecx
and    $0x1ff,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oui_get_tlv_head>:
shl    $0x9,%edi
and    $0x1ff,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define zeroext i16 @oui_get_tlv_head(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = and i32 %6, 127
%8 = shl i32 %7, 9
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = and i32 %10, 511
%12 = or i32 %8, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @oui_get_tlv_head(i16 zeroext %0, i16 zeroext %1) {
%3 = shl i16 %0, 9
%4 = and i16 %1, 511
%5 = or i16 %4, %3
ret i16 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(size_t);
int8_t *zompMalloc(size_t bytes) { return malloc(bytes); }


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

x86 assembly (clang, -O2):
<zompMalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i32* @zompMalloc(i64 %0) {
%2 = tail call i32* @malloc(i64 %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ daemonize();
int /*<<< orphan*/ pwn();
int /*<<< orphan*/ unsetenv(char *);
__attribute__((__constructor__)) void preloadme(void) {
  unsetenv("LD_PRELOAD");
  daemonize();
  pwn();
}


x86 assembly (clang, -O0):
<preloadme>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <unsetenv@plt>
mov    $0x0,%al
call   1030 <daemonize@plt>
mov    $0x0,%al
call   1040 <pwn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<preloadme>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <unsetenv@plt>
xor    %eax,%eax
call   1030 <daemonize@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pwn@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"LD_PRELOAD\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @preloadme, i8* null }]
define void @preloadme() {
%1 = call i32 @unsetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @daemonize()
%3 = call i32 (...) @pwn()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"LD_PRELOAD\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @preloadme, i8* null }]
define void @preloadme() {
%1 = tail call i32 @unsetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @daemonize()
%3 = tail call i32 (...) @pwn()
ret void
}
double psi_m_stable(double zeta, double zeta0) {
  double psi_m = -4.7 * (zeta - zeta0);
  return psi_m;
}


x86 assembly (clang, -O0):
<psi_m_stable>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xee0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<psi_m_stable>:
subsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @psi_m_stable(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 = fsub double %6, %7
%9 = fmul double -4.700000e+00, %8
store double %9, double* %5
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
define double @psi_m_stable(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fmul double %3, -4.700000e+00
ret double %4
}
/* Variables and functions */
char vrna_bpp_symbol(float const *);
char bppm_symbol(const float *x) { return vrna_bpp_symbol(x); }


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

x86 assembly (clang, -O2):
<bppm_symbol>:
jmp    1030 <vrna_bpp_symbol@plt>

LLVM IR (-O0):
define signext i8 @bppm_symbol(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = call signext i8 @vrna_bpp_symbol(float* %3)
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @bppm_symbol(float* %0) {
%2 = tail call signext i8 @vrna_bpp_symbol(float* %0)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int chmod(const char *path, mode_t mode) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<chmod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chmod(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}