xunge/DecIR huggingface dataset:
double humps(double x, void *params) {
  double f;
  f = 1. / ((x - 0.3) * (x - 0.3) + 0.01) +
      1. / ((x - 0.9) * (x - 0.9) + 0.04) - 6;
  return f;
}


x86 assembly (clang, -O0):
<humps>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xf0e(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xefd(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xee5(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xec1(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xec0(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  -0x8(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm3
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe97(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  0xe83(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe6b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<humps>:
unpcklpd %xmm0,%xmm0
addpd  0xef4(%rip),%xmm0
mulpd  %xmm0,%xmm0
addpd  0xef8(%rip),%xmm0
movapd 0xf00(%rip),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @humps(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
%5 = alloca double
store double %0, double* %3
store i8* %1, i8** %4
%6 = load double, double* %3
%7 = fsub double %6, 3.000000e-01
%8 = load double, double* %3
%9 = fsub double %8, 3.000000e-01
%10 = call double @llvm.fmuladd.f64(double %7, double %9, double 1.000000e-02)
%11 = fdiv double 1.000000e+00, %10
%12 = load double, double* %3
%13 = fsub double %12, 9.000000e-01
%14 = load double, double* %3
%15 = fsub double %14, 9.000000e-01
%16 = call double @llvm.fmuladd.f64(double %13, double %15, double 4.000000e-02)
%17 = fdiv double 1.000000e+00, %16
%18 = fadd double %11, %17
%19 = fsub double %18, 6.000000e+00
store double %19, double* %5
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @humps(double %0, i8* nocapture readnone %1) {
%3 = insertelement <2 x double> poison, double %0, i64 0
%4 = shufflevector <2 x double> %3, <2 x double> poison, <2 x i32> zeroinitializer
%5 = fadd <2 x double> %4, <double -3.000000e-01, double -9.000000e-01>
%6 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> %5, <2 x double> <double 1.000000e-02, double 4.000000e-02>)
%7 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %6
%8 = shufflevector <2 x double> %7, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%9 = fadd <2 x double> %7, %8
%10 = extractelement <2 x double> %9, i64 0
%11 = fadd double %10, -6.000000e+00
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void autofree_(void *p) {
  void **q = (void **)p;
  free(*q);
}


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

x86 assembly (clang, -O2):
<autofree_>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @autofree_(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @autofree_(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
extern void reallocMemory(void **mem, size_t newsize) {
  void *ptr;
  ptr = realloc(*mem, newsize);
  if (!ptr) {
    free(*mem);
    *mem = (void *)0;
    return;
  }
  *mem = ptr;
}


x86 assembly (clang, -O0):
<reallocMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116b <reallocMemory+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1176 <reallocMemory+0x56>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocMemory>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <reallocMemory+0x1f>
mov    (%r14),%rdi
call   1030 <free@plt>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @reallocMemory(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca i8*
store i8** %0, i8*** %3
store i64 %1, i64* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = load i64, i64* %4
%9 = call i8* @realloc(i8* %7, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %17, label %12
12: ; preds = %2
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = call i32 @free(i8* %14)
%16 = load i8**, i8*** %3
store i8* null, i8** %16
br label %20
17: ; preds = %2
%18 = load i8*, i8** %5
%19 = load i8**, i8*** %3
store i8* %18, i8** %19
br label %20
20: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
define void @reallocMemory(i8** nocapture %0, i64 %1) {
%3 = load i8*, i8** %0
%4 = tail call i8* @realloc(i8* %3, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %0
%8 = tail call i32 @free(i8* %7)
br label %9
9: ; preds = %2, %6
store i8* %4, i8** %0
ret void
}
int test_imm_21uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x21 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_21uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 33
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
float min(float, float);
float blendLinearDodge(float base, float blend) {
  return min(base + blend, 1.0f);
}


x86 assembly (clang, -O0):
<blendLinearDodge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xecc(%rip),%xmm1
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blendLinearDodge>:
addss  %xmm1,%xmm0
movss  0xee4(%rip),%xmm1
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @blendLinearDodge(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
%8 = call float @min(float %7, float 1.000000e+00)
ret float %8
}

LLVM IR (-O2):
define float @blendLinearDodge(float %0, float %1) {
%3 = fadd float %0, %1
%4 = tail call float @min(float %3, float 1.000000e+00)
ret float %4
}
/* Type definitions */
struct utsname {
  int dummy;
};

/* Variables and functions */
int uname(struct utsname *);
int __gnat_florist_uname(struct utsname *s) { return uname(s); }


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

x86 assembly (clang, -O2):
<__gnat_florist_uname>:
jmp    1030 <uname@plt>

LLVM IR (-O0):
%struct.utsname = type { i32 }
define i32 @__gnat_florist_uname(%struct.utsname* %0) {
%2 = alloca %struct.utsname*
store %struct.utsname* %0, %struct.utsname** %2
%3 = load %struct.utsname*, %struct.utsname** %2
%4 = call i32 @uname(%struct.utsname* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
define i32 @__gnat_florist_uname(%struct.utsname* nocapture %0) {
%2 = tail call i32 @uname(%struct.utsname* %0)
ret i32 %2
}
__attribute__((always_)) int notifier_from_errno(int err) {
  if (err)
    return 0x8000 | (0x0001 - err);
  return 0x0001;
}


x86 assembly (clang, -O0):
<notifier_from_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1126 <notifier_from_errno+0x26>
mov    $0x1,%eax
sub    -0x8(%rbp),%eax
or     $0x8000,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <notifier_from_errno+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<notifier_from_errno>:
mov    $0x1,%ecx
mov    $0x1,%eax
sub    %edi,%eax
or     $0x8000,%eax
test   %edi,%edi
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @notifier_from_errno(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 1, %7
%9 = or i32 32768, %8
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @notifier_from_errno(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = sub nsw i32 1, %0
%4 = or i32 %3, 32768
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
void RGB565ToI420() {}


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

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

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

LLVM IR (-O2):
define void @RGB565ToI420() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double a;
  double b;
  double c;
  scanf("%lf %lf %lf", &a, &b, &c);
  double sum = a + b + c;
  printf("%.2lf\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = load double, double* %2
%10 = fadd double %8, %9
%11 = load double, double* %3
%12 = fadd double %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %12)
ret i32 0
}
/* Variables and functions */
scalar_t__ strchr(char const *, char);
int bar(const char *fmt) { return (strchr(fmt, '*') != 0); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
mov    $0x2a,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strchr(i8* %3, i8 signext 42)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bar(i8* %0) {
%2 = tail call i64 @strchr(i8* %0, i8 signext 42)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned char *ripemd160_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_ripemd160(unsigned char *out,
                                     const unsigned char *in, size_t in_len) {
  return ripemd160_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_ripemd160>:
jmp    1030 <ripemd160_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_ripemd160(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ripemd160_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
void run(void (*setup)(void), int (*loop)(void)) {
  (*setup)();
  while (((*loop)()) != 0) {
  }
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
call   *-0x8(%rbp)
call   *-0x10(%rbp)
cmp    $0x0,%eax
je     1124 <run+0x24>
jmp    1113 <run+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rbx
mov    %rsi,%rbx
call   *%rdi
cs nopw 0x0(%rax,%rax,1)
call   *%rbx
test   %eax,%eax
jne    1110 <run+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @run(void ()* %0, i32 ()* %1) {
%3 = alloca void ()*
%4 = alloca i32 ()*
store void ()* %0, void ()** %3
store i32 ()* %1, i32 ()** %4
%5 = load void ()*, void ()** %3
br label %6
6: ; preds = %10, %2
%7 = load i32 ()*, i32 ()** %4
%8 = call i32 %7()
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @run(void ()* nocapture %0, i32 ()* nocapture %1) {
tail call void %0()
br label %3
3: ; preds = %3, %2
%4 = tail call i32 %1()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
unsigned char hexdigit(char c) {
  if (c >= 'A' && c <= 'F')
    return c - 'A' + 10;
  if (c >= 'a' && c <= 'f')
    return c - 'a' + 10;
  return c - '0';
}


x86 assembly (clang, -O0):
<hexdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <hexdigit+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x46,%eax
jg     1136 <hexdigit+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    116c <hexdigit+0x6c>
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1162 <hexdigit+0x62>
movsbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jg     1162 <hexdigit+0x62>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    116c <hexdigit+0x6c>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdigit>:
lea    -0x41(%rdi),%eax
lea    -0x61(%rdi),%ecx
cmp    $0x6,%cl
mov    $0xa9,%ecx
mov    $0xd0,%edx
cmovb  %ecx,%edx
cmp    $0x6,%al
mov    $0xc9,%eax
cmovae %edx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @hexdigit(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 70
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 %14, 10
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %36
17: ; preds = %7, %1
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 97
br i1 %20, label %21, label %31
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 102
br i1 %24, label %25, label %31
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 97
%29 = add nsw i32 %28, 10
%30 = trunc i32 %29 to i8
store i8 %30, i8* %2
br label %36
31: ; preds = %21, %17
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = sub nsw i32 %33, 48
%35 = trunc i32 %34 to i8
store i8 %35, i8* %2
br label %36
36: ; preds = %31, %25, %11
%37 = load i8, i8* %2
ret i8 %37
}

LLVM IR (-O2):
define zeroext i8 @hexdigit(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 6
%4 = add i8 %0, -97
%5 = icmp ult i8 %4, 6
%6 = select i1 %5, i8 -87, i8 -48
%7 = select i1 %3, i8 -55, i8 %6
%8 = add i8 %7, %0
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void on_end(int stat, void *str) {
  printf("Koncim %d %s\n", stat, (char *)str);
}


x86 assembly (clang, -O0):
<on_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_end>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Koncim %d %s\0A\00"
define void @on_end(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
double tanh(double);
double intr_wrap_085(double p1) { return tanh(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_085>:
jmp    1030 <tanh@plt>

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

LLVM IR (-O2):
define double @intr_wrap_085(double %0) {
%2 = tail call double @tanh(double %0)
ret double %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cryptcmp(const char *encrypted, const char *clear) {
  const char *cmp;
  cmp = clear;
  if (!clear || !encrypted) {
    return 1;
  }
  return strcmp(cmp, encrypted);
}


x86 assembly (clang, -O0):
<cryptcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113e <cryptcmp+0x2e>
cmpq   $0x0,-0x10(%rbp)
jne    114a <cryptcmp+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115a <cryptcmp+0x4a>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cryptcmp>:
test   %rdi,%rdi
je     1128 <cryptcmp+0x18>
test   %rsi,%rsi
je     1128 <cryptcmp+0x18>
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcmp@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @cryptcmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %1, null
%4 = icmp ne i8* %0, null
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* %1, i8* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
int /*<<< orphan*/ modff(float, float *);
int /*<<< orphan*/ modfl(long double, long double *);
void uninivar_modf(void) {
  float f1;
  float *f2;
  (void)modff(f1, f2);
  double d1;
  double *d2;
  (void)modf(d1, d2);
  long double ld1;
  long double *ld2;
  (void)modfl(ld1, ld2);
}


x86 assembly (clang, -O0):
<uninivar_modf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1030 <modff@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rdi
call   1040 <modf@plt>
fldt   -0x30(%rbp)
mov    -0x38(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <modfl@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_modf>:
sub    $0x18,%rsp
call   1030 <modff@plt>
call   1040 <modf@plt>
call   1050 <modfl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninivar_modf() {
%1 = alloca float
%2 = alloca float*
%3 = alloca double
%4 = alloca double*
%5 = alloca x86_fp80
%6 = alloca x86_fp80*
%7 = load float, float* %1
%8 = load float*, float** %2
%9 = call i32 @modff(float %7, float* %8)
%10 = load double, double* %3
%11 = load double*, double** %4
%12 = call i32 @modf(double %10, double* %11)
%13 = load x86_fp80, x86_fp80* %5
%14 = load x86_fp80*, x86_fp80** %6
%15 = call i32 @modfl(x86_fp80 %13, x86_fp80* %14)
ret void
}

LLVM IR (-O2):
define void @uninivar_modf() {
%1 = tail call i32 @modff(float undef, float* undef)
%2 = tail call i32 @modf(double undef, double* undef)
%3 = tail call i32 @modfl(x86_fp80 undef, x86_fp80* undef)
ret void
}
unsigned int umin(unsigned int a, unsigned int b) {
  return (((a) < (b)) ? (a) : (b));
}


x86 assembly (clang, -O0):
<umin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <umin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <umin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @umin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @umin(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int dummyaudio_VolumeGetLevel(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @dummyaudio_VolumeGetLevel() {
ret i32 0
}

LLVM IR (-O2):
define i32 @dummyaudio_VolumeGetLevel() {
ret i32 0
}
/* Variables and functions */
scalar_t__ char_cipher(int /*<<< orphan*/);
void name_cipher(char *buf, int n) {
  int i;
  unsigned char c;
  for (i = 0; i < n; i++) {
    c = (unsigned char)char_cipher(0);
    buf[i] ^= c;
  }
}


x86 assembly (clang, -O0):
<name_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <name_cipher+0x4f>
xor    %edi,%edi
call   1030 <char_cipher@plt>
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <name_cipher+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_cipher>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1144 <name_cipher+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <char_cipher@plt>
xor    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <name_cipher+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @name_cipher(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = tail call i64 @char_cipher(i32 0)
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 %7
%11 = load i8, i8* %10
%12 = xor i8 %11, %9
store i8 %12, i8* %10
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
unsigned int btcl_mem(char *base, int bitno) {
  unsigned char res;
  __asm__ __volatile__("btcl\t%2, %0\n\t"
                       "setc\t%1"
                       : "=m"(*base), "=q"(res)
                       : "r"(bitno));
  return res;
}


x86 assembly (clang, -O0):
<btcl_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
btc    %ecx,(%rax)
setb   %al
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btcl_mem>:
btc    %esi,(%rdi)
setb   %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @btcl_mem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8 asm sideeffect "btcl\09$2, $0\0A\09setc\09$1", "=*m,=q,r,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %6, i32 %7)
store i8 %8, i8* %5
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @btcl_mem(i8* %0, i32 %1) {
%3 = tail call i8 asm sideeffect "btcl\09$2, $0\0A\09setc\09$1", "=*m,=q,r,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0, i32 %1)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ hoic_vrb_setup(int, char *);
int hdoip_cli_vrb_setup(int fd, int fdr, char **argv, int argc) {
  hoic_vrb_setup(fd, argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<hdoip_cli_vrb_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <hoic_vrb_setup@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdoip_cli_vrb_setup>:
push   %rax
mov    (%rdx),%rsi
call   1030 <hoic_vrb_setup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hdoip_cli_vrb_setup(i32 %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8**, i8*** %7
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @hoic_vrb_setup(i32 %9, i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @hdoip_cli_vrb_setup(i32 %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = load i8*, i8** %2
%6 = tail call i32 @hoic_vrb_setup(i32 %0, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ instrukcja();
int /*<<< orphan*/ menu();
int main() {
  instrukcja();
  menu();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <instrukcja@plt>
mov    $0x0,%al
call   1040 <menu@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <instrukcja@plt>
xor    %eax,%eax
call   1040 <menu@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @instrukcja()
%2 = tail call i32 (...) @menu()
ret i32 0
}
/* Variables and functions */
scalar_t__ is_prime(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  printf("Enter the number: ");
  scanf("%d", &a);
  if (is_prime(a))
    printf("It's a prime number");
  else
    printf("It's NOT a prime number");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <main+0x5a>
lea    0xea5(%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
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <is_prime@plt>
test   %rax,%rax
lea    0xec9(%rip),%rax
lea    0xeae(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter the number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"It's a prime number\00"
@.str.3 = [24 x i8] c"It's NOT a prime number\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 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 i64 @is_prime(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter the number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"It's a prime number\00"
@.str.3 = [24 x i8] c"It's NOT a prime number\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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 i64 @is_prime(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0)
%9 = call i32 @printf(i8* dereferenceable(1) %8)
ret i32 0
}
/* Variables and functions */
char const *_GetBoxSource(char *, int, int /*<<< orphan*/);
const char *GetBoxSource(char *str, int src) {
  return _GetBoxSource(str, src, 0);
}


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

x86 assembly (clang, -O2):
<GetBoxSource>:
xor    %edx,%edx
jmp    1030 <_GetBoxSource@plt>

LLVM IR (-O0):
define i8* @GetBoxSource(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 = call i8* @_GetBoxSource(i8* %5, i32 %6, i32 0)
ret i8* %7
}

LLVM IR (-O2):
define i8* @GetBoxSource(i8* %0, i32 %1) {
%3 = tail call i8* @_GetBoxSource(i8* %0, i32 %1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void bill(char *arg) { printf("bill: luliusheng test %s\n", arg); }


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

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

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

LLVM IR (-O2):
@.str = [26 x i8] c"bill: luliusheng test %s\0A\00"
define void @bill(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int schemaType_function(const char *_tag_, int _type_,
                        const char *elementFormDefault, const char *xmlns_xsd) {
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @schemaType_function(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
int foo(int x) { return __builtin_popcount(x); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
ret i32 %2
}
void unsigned_char_and_signed_char_signed_int(unsigned char *LHS,
                                              signed int RHS) {
  (*LHS) &= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_and_signed_char_signed_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_and_signed_char_signed_int>:
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_and_signed_char_signed_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 = and i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @unsigned_char_and_signed_char_signed_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = trunc i32 %1 to i8
%5 = and i8 %3, %4
store i8 %5, i8* %0
ret void
}
void fast_log_msgr_debug_dump(struct fast_log_entry *fe __attribute__((unused)),
                              char *buf __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_debug_dump(%struct.fast_log_entry* %0, i8* %1) {
%3 = alloca %struct.fast_log_entry*
%4 = alloca i8*
store %struct.fast_log_entry* %0, %struct.fast_log_entry** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_debug_dump(%struct.fast_log_entry* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_enomem();
void *realloc(void *, size_t);
void *tr_realloc(void *ptr, size_t size) {
  void *mem = realloc(ptr, size);
  if (!mem)
    log_enomem();
  return mem;
}


x86 assembly (clang, -O0):
<tr_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <tr_realloc+0x33>
mov    $0x0,%al
call   1040 <log_enomem@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr_realloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <tr_realloc+0x15>
xor    %eax,%eax
call   1040 <log_enomem@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @tr_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 (...) @log_enomem()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @tr_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @log_enomem()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  long int var = 210;
  printf("The current process ID is %d!\n", getpid());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"The current process ID is %d!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 210, i64* %6
%7 = call i32 (...) @getpid()
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"The current process ID is %d!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getNumber(double *);
double tan(double);
double tangente(double a) {
  getNumber(&a);
  return tan(a);
}


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

x86 assembly (clang, -O2):
<tangente>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <getNumber@plt>
movsd  (%rsp),%xmm0
call   1040 <tan@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @tangente(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @tan(double %4)
ret double %5
}

LLVM IR (-O2):
define double @tangente(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @tan(double %4)
ret double %5
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *gt1_name_context_strdup_size(const char *s, int size) {
  char *new;
  new = ((char *)malloc((size + 1) * sizeof(char)));
  memcpy(new, s, size);
  new[size] = '\0';
  return new;
}


x86 assembly (clang, -O0):
<gt1_name_context_strdup_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt1_name_context_strdup_size>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @gt1_name_context_strdup_size(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_set_sink_volume_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_set_sink_volume_by_name"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [51 x i8] c"NOT IMPLEMENTED:pa_context_set_sink_volume_by_name\00"
define i32 @pa_context_set_sink_volume_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void X509_PURPOSE_get_id(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ OUT_RING(struct nouveau_channel *, int);
void BEGIN_RING(struct nouveau_channel *chan, int subc, int mthd, int size) {
  OUT_RING(chan, (subc << 13) | (size << 18) | mthd);
}


x86 assembly (clang, -O0):
<BEGIN_RING>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0xd,%esi
mov    -0x14(%rbp),%eax
shl    $0x12,%eax
or     %eax,%esi
or     -0x10(%rbp),%esi
call   1030 <OUT_RING@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BEGIN_RING>:
shl    $0xd,%esi
shl    $0x12,%ecx
or     %edx,%esi
or     %ecx,%esi
jmp    1030 <OUT_RING@plt>

LLVM IR (-O0):
%struct.nouveau_channel = type { i32 }
define void @BEGIN_RING(%struct.nouveau_channel* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.nouveau_channel*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.nouveau_channel* %0, %struct.nouveau_channel** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.nouveau_channel*, %struct.nouveau_channel** %5
%10 = load i32, i32* %6
%11 = shl i32 %10, 13
%12 = load i32, i32* %8
%13 = shl i32 %12, 18
%14 = or i32 %11, %13
%15 = load i32, i32* %7
%16 = or i32 %14, %15
%17 = call i32 @OUT_RING(%struct.nouveau_channel* %9, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.nouveau_channel = type { i32 }
define void @BEGIN_RING(%struct.nouveau_channel* %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %1, 13
%6 = shl i32 %3, 18
%7 = or i32 %5, %2
%8 = or i32 %7, %6
%9 = tail call i32 @OUT_RING(%struct.nouveau_channel* %0, i32 %8)
ret void
}