xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ displays_expect_true_failed(int, char const *, int);
void Displayer_display_expect_true_failed(int act, const char *file, int line) {
  displays_expect_true_failed(act, file, line);
}


x86 assembly (clang, -O0):
<Displayer_display_expect_true_failed>:
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
call   1030 <displays_expect_true_failed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Displayer_display_expect_true_failed>:
jmp    1030 <displays_expect_true_failed@plt>

LLVM IR (-O0):
define void @Displayer_display_expect_true_failed(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 i32 @displays_expect_true_failed(i32 %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @Displayer_display_expect_true_failed(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @displays_expect_true_failed(i32 %0, i8* %1, i32 %2)
ret void
}
void toi_cluster_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @toi_cluster_exit() {
ret void
}
/* Variables and functions */
int exp(double const);
int sqrt(int);
double density_N01(double const x) {
  return 1 / sqrt(2 * 3.1415926535) * exp(-x * x / 2);
}


x86 assembly (clang, -O0):
<density_N01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe93(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<density_N01>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x6,%edi
call   1040 <sqrt@plt>
lea    0x1(%rax),%ecx
xor    %ebx,%ebx
cmp    $0x3,%ecx
cmovb  %eax,%ebx
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
call   1030 <exp@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @density_N01(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @sqrt(i32 6)
%4 = sdiv i32 1, %3
%5 = load double, double* %2
%6 = fneg double %5
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = fdiv double %8, 2.000000e+00
%10 = call i32 @exp(double %9)
%11 = mul nsw i32 %4, %10
%12 = sitofp i32 %11 to double
ret double %12
}

LLVM IR (-O2):
define double @density_N01(double %0) {
%2 = tail call i32 @sqrt(i32 6)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = fneg double %0
%7 = fmul double %6, %0
%8 = fmul double %7, 5.000000e-01
%9 = tail call i32 @exp(double %8)
%10 = mul nsw i32 %5, %9
%11 = sitofp i32 %10 to double
ret double %11
}
int sys$dclexh(void *desblk) {
  return ({
    unsigned long resultvar;
    register long int _a1 asm("rdi") = (long)(desblk);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(67), "r"(_a1)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$dclexh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x43,%rax
int    $0x81
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$dclexh>:
mov    $0x43,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$dclexh"(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 67, i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @"sys$dclexh"(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 67, i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
int test_imm_14uint32_mem(unsigned int *val) {
  return ((*val) & (0x14 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_14uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 20
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int fabs(double);
int fuzzyEquals(double x, double y) {
  return (fabs(x - y) <= 1e-12) || (x == y);
}


x86 assembly (clang, -O0):
<fuzzyEquals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
mov    $0x1,%al
movsd  0xec1(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    1161 <fuzzyEquals+0x51>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzzyEquals>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
setle  %al
movsd  0x10(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
setnp  %cl
sete   %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @fuzzyEquals(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call i32 @fabs(double %7)
%9 = sitofp i32 %8 to double
%10 = fcmp ole double %9, 0x3D719799812DEA11
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load double, double* %3
%13 = load double, double* %4
%14 = fcmp oeq double %12, %13
br label %15
15: ; preds = %11, %2
%16 = phi i1 [ true, %2 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @fuzzyEquals(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = icmp slt i32 %4, 1
%6 = fcmp oeq double %0, %1
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
__attribute__((no, noclone)) unsigned __int128 t172_3sub(signed __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed __int128)(3), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t172_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rsi,%rax
sar    $0x3f,%rax
xor    %ecx,%ecx
mov    $0x3,%edx
sub    %rdi,%rdx
mov    %ecx,%r9d
mov    %r9,%rcx
sbb    %rsi,%rcx
mov    %r9,%r8
sbb    %rax,%r8
sbb    %rax,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1190 <t172_3sub+0x80>
jmp    1197 <t172_3sub+0x87>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t172_3sub>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
mov    $0x3,%ebx
sub    %rdi,%rbx
sbb    %rsi,%r14
cmp    $0x4,%rdi
sbb    $0x0,%rsi
jl     1133 <t172_3sub+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t172_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 3, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t172_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nsw i129 3, %7
%9 = icmp sgt i128 %6, 3
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int hvc_nvram_set(char *item, char *value) {
  ((void)(item));
  ((void)(value));
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @hvc_nvram_set(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void cleanup() { unlink("file.txt"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"file.txt\00"
define void @cleanup() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"file.txt\00"
define void @cleanup() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myprint_libc(char *str) { printf("libC print: %s", str); }


x86 assembly (clang, -O0):
<myprint_libc>:
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):
<myprint_libc>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"libC print: %s\00"
define void @myprint_libc(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
float Math_FixDelta(float fDelta) {
  if (fDelta >= 180) {
    fDelta -= 360;
  } else if (fDelta <= -180) {
    fDelta += 360;
  }
  return fDelta;
}


x86 assembly (clang, -O0):
<Math_FixDelta>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     113a <Math_FixDelta+0x3a>
movss  -0x4(%rbp),%xmm0
movss  0xedc(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <Math_FixDelta+0x63>
movss  0xec2(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     115e <Math_FixDelta+0x5e>
movss  0xeb4(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <Math_FixDelta+0x63>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Math_FixDelta>:
ucomiss 0xef9(%rip),%xmm0
jae    111f <Math_FixDelta+0x1f>
movss  0xef7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     111e <Math_FixDelta+0x1e>
addss  0xeee(%rip),%xmm0
ret
addss  0xedd(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Math_FixDelta(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 1.800000e+02
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fsub float %6, 3.600000e+02
store float %7, float* %2
br label %15
8: ; preds = %1
%9 = load float, float* %2
%10 = fcmp ole float %9, -1.800000e+02
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load float, float* %2
%13 = fadd float %12, 3.600000e+02
store float %13, float* %2
br label %14
14: ; preds = %11, %8
br label %15
15: ; preds = %14, %5
%16 = load float, float* %2
ret float %16
}

LLVM IR (-O2):
define float @Math_FixDelta(float %0) {
%2 = fcmp ult float %0, 1.800000e+02
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fadd float %0, -3.600000e+02
br label %9
5: ; preds = %1
%6 = fcmp ugt float %0, -1.800000e+02
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = fadd float %0, 3.600000e+02
br label %9
9: ; preds = %5, %7, %3
%10 = phi float [ %4, %3 ], [ %8, %7 ], [ %0, %5 ]
ret float %10
}
/* Type definitions */
struct wl_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
void wl_surface_damage(struct wl_surface *wl_surface, int32_t x, int32_t y,
                       int32_t width, int32_t height) {
  wl_proxy_marshal((struct wl_proxy *)wl_surface, 2, x, y, width, height);
}


x86 assembly (clang, -O0):
<wl_surface_damage>:
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    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    $0x2,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_surface_damage>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_surface_damage(%struct.wl_surface* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.wl_surface*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.wl_surface* %0, %struct.wl_surface** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.wl_surface*, %struct.wl_surface** %6
%12 = bitcast %struct.wl_surface* %11 to %struct.wl_proxy*
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %12, i32 2, i32 %13, i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_surface_damage(%struct.wl_surface* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = bitcast %struct.wl_surface* %0 to %struct.wl_proxy*
%7 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 2, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int test_strtod();
int test_strtof();
int test_strtold();
int main(void) {
  return ({
    int result = 0;
    result |= test_strtof();
    result |= test_strtod();
    result |= test_strtold();
    result;
  });
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_strtof@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_strtod@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <test_strtold@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <test_strtof@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <test_strtod@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1050 <test_strtold@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 (...) @test_strtof()
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = call i32 (...) @test_strtod()
%8 = load i32, i32* %2
%9 = or i32 %8, %7
store i32 %9, i32* %2
%10 = call i32 (...) @test_strtold()
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_strtof()
%2 = tail call i32 (...) @test_strtod()
%3 = or i32 %2, %1
%4 = tail call i32 (...) @test_strtold()
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, int);
void *xmalloc_unsigned(size_t size) {
  void *mem;
  mem = calloc(size, 1);
  if (!mem)
    abort();
  return mem;
}


x86 assembly (clang, -O0):
<xmalloc_unsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc_unsigned+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc_unsigned>:
push   %rax
mov    $0x1,%esi
call   1040 <calloc@plt>
test   %rax,%rax
je     1132 <xmalloc_unsigned+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i8* @xmalloc_unsigned(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
int test_imm_04uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x04 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_04uint64_highword_reg>:
bt     $0x22,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_04uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 4
%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_04uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 17179869184
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *realloc(void *, unsigned long const);
void *xrealloc(void *ptr, const unsigned long size) {
  void *ret = realloc(ptr, size);
  if (!ret)
    die("xrealloc");
  return ret;
}


x86 assembly (clang, -O0):
<xrealloc>:
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    1158 <xrealloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xrealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"xrealloc\00"
define i8* @xrealloc(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 @die(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [9 x i8] c"xrealloc\00"
define noalias i8* @xrealloc(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 @die(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void foo072(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo072(i32 %0) {
ret void
}
int SecKeychainSearchCreateFromAttributes() { return -4; }


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

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

LLVM IR (-O0):
define i32 @SecKeychainSearchCreateFromAttributes() {
ret i32 -4
}

LLVM IR (-O2):
define i32 @SecKeychainSearchCreateFromAttributes() {
ret i32 -4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(int argc, const char *argv[]) {
  float pi = 3.14;
  float meaningOfLife = 42;
  double sum = pi + meaningOfLife;
  printf("The sum is %.2f.\n", sum);
  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)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"The sum is %.2f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x40091EB860000000, float* %6
store float 4.200000e+01, float* %7
%9 = load float, float* %6
%10 = load float, float* %7
%11 = fadd float %9, %10
%12 = fpext float %11 to double
store double %12, double* %8
%13 = load double, double* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The sum is %.2f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 0x404691EB80000000)
ret i32 0
}
/* Variables and functions */
__attribute__((__const__, __warn_unused_result__)) size_t
cheat_mean(size_t const size, size_t const another_size) {
  if (another_size < size)
    return cheat_mean(another_size, size);
  return size + (another_size - size) / 2;
}


x86 assembly (clang, -O0):
<cheat_mean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1144 <cheat_mean+0x34>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cheat_mean@plt>
mov    %rax,-0x8(%rbp)
jmp    115b <cheat_mean+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
shr    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cheat_mean>:
mov    %rsi,%rax
mov    %rdi,%rsi
mov    %rax,%rdi
sub    %rsi,%rax
jb     1100 <cheat_mean>
shr    %rax
add    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @cheat_mean(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = load i64, i64* %4
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = call i64 @cheat_mean(i64 %10, i64 %11)
store i64 %12, i64* %3
br label %20
13: ; preds = %2
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = load i64, i64* %4
%17 = sub i64 %15, %16
%18 = udiv i64 %17, 2
%19 = add i64 %14, %18
store i64 %19, i64* %3
br label %20
20: ; preds = %13, %9
%21 = load i64, i64* %3
ret i64 %21
}

LLVM IR (-O2):
define i64 @cheat_mean(i64 %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %0, %2 ], [ %5, %3 ]
%5 = phi i64 [ %1, %2 ], [ %4, %3 ]
%6 = icmp ult i64 %5, %4
br i1 %6, label %3, label %7
7: ; preds = %3
%8 = sub i64 %5, %4
%9 = lshr i64 %8, 1
%10 = add i64 %9, %4
ret i64 %10
}
int soru_5(int dizi[], int N) { return -1; }


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

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

LLVM IR (-O0):
define i32 @soru_5(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @soru_5(i32* nocapture readnone %0, i32 %1) {
ret i32 -1
}
double ceil(double x) {
  if ((x - (int)x) > 0) {
    return x + 1;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    113f <ceil+0x3f>
movsd  0xed0(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1149 <ceil+0x49>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
movsd  0xee8(%rip),%xmm3
addsd  %xmm0,%xmm3
xorpd  %xmm1,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fsub double %4, %7
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %3
%12 = fadd double %11, 1.000000e+00
store double %12, double* %2
br label %15
13: ; preds = %1
%14 = load double, double* %3
store double %14, double* %2
br label %15
15: ; preds = %13, %10
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
%5 = fcmp ogt double %4, 0.000000e+00
%6 = fadd double %0, 1.000000e+00
%7 = select i1 %5, double %6, double %0
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ setsid();
int /*<<< orphan*/ umask(int);
int /*<<< orphan*/ work();
void make_deamon() {
  if (fork()) {
    exit(0);
  }
  setsid();
  umask(0077);
  int i;
  for (i = 0; i < 256; i++) {
    close(i);
  }
  work();
}


x86 assembly (clang, -O0):
<make_deamon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1080 <fork@plt>
cmp    $0x0,%rax
je     1180 <make_deamon+0x20>
xor    %edi,%edi
call   1070 <exit@plt>
mov    $0x0,%al
call   1050 <setsid@plt>
mov    $0x3f,%edi
call   1060 <umask@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    11bb <make_deamon+0x5b>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1198 <make_deamon+0x38>
mov    $0x0,%al
call   1030 <work@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_deamon>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1080 <fork@plt>
test   %rax,%rax
jne    119a <make_deamon+0x3a>
xor    %eax,%eax
call   1050 <setsid@plt>
mov    $0x3f,%edi
call   1060 <umask@plt>
mov    %ebx,%edi
call   1040 <close@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1180 <make_deamon+0x20>
xor    %eax,%eax
pop    %rbx
jmp    1030 <work@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
define void @make_deamon() {
%1 = alloca i32
%2 = call i64 (...) @fork()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = call i32 (...) @setsid()
%8 = call i32 @umask(i32 63)
store i32 0, i32* %1
br label %9
9: ; preds = %15, %6
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 256
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %1
%14 = call i32 @close(i32 %13)
br label %15
15: ; preds = %12
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %9
18: ; preds = %9
%19 = call i32 (...) @work()
ret void
}

LLVM IR (-O2):
define void @make_deamon() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @setsid()
%7 = tail call i32 @umask(i32 63)
br label %8
8: ; preds = %5, %8
%9 = phi i32 [ 0, %5 ], [ %11, %8 ]
%10 = tail call i32 @close(i32 %9)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, 256
br i1 %12, label %13, label %8
13: ; preds = %8
%14 = tail call i32 (...) @work()
ret void
}
/* Variables and functions */
void *dlopen(char *, int /*<<< orphan*/);
int /*<<< orphan*/ dlsym(void *, char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  void *handle = dlopen(argv[0], 0);
  printf("%p\n", dlsym(handle, "main"));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
@.str.1 = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @dlopen(i8* %3, i32 0)
%5 = tail call i32 @dlsym(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void myServoAttach(int pin) {
  printf("servo attached at pin %d\nCommand values 0-180 degrees\n", pin);
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"servo attached at pin %d\0ACommand values 0-180 degrees\0A\00"
define void @myServoAttach(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"servo attached at pin %d\0ACommand values 0-180 degrees\0A\00"
define void @myServoAttach(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void Kit_TruthSetBit(unsigned *p, int Bit) { p[Bit >> 5] |= (1 << (Bit & 31)); }


x86 assembly (clang, -O0):
<Kit_TruthSetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_TruthSetBit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @Kit_TruthSetBit(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 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @Kit_TruthSetBit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %1, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
char funcSwitch(int a) {
  char result = '\0';
  switch (a) {
  case 0:
    result = 'a';
    break;
  case 1:
  case 2:
    result = 'b';
    break;
  default:
    result = 'c';
  }
  return result;
}


x86 assembly (clang, -O0):
<funcSwitch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1132 <funcSwitch+0x32>
jmp    111e <funcSwitch+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     113b <funcSwitch+0x3b>
jmp    1144 <funcSwitch+0x44>
movb   $0x61,-0x5(%rbp)
jmp    1148 <funcSwitch+0x48>
movb   $0x62,-0x5(%rbp)
jmp    1148 <funcSwitch+0x48>
movb   $0x63,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcSwitch>:
lea    0x0(,%rdi,8),%ecx
mov    $0x626261,%edx
shr    %cl,%edx
cmp    $0x3,%edi
mov    $0x63,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @funcSwitch(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 0, i8* %3
%4 = load i32, i32* %2
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
i32 2, label %6
]
5: ; preds = %1
store i8 97, i8* %3
br label %8
6: ; preds = %1, %1
store i8 98, i8* %3
br label %8
7: ; preds = %1
store i8 99, i8* %3
br label %8
8: ; preds = %7, %6, %5
%9 = load i8, i8* %3
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @funcSwitch(i32 %0) {
%2 = icmp ult i32 %0, 3
%3 = trunc i32 %0 to i24
%4 = shl i24 %3, 3
%5 = lshr i24 6447713, %4
%6 = trunc i24 %5 to i8
%7 = select i1 %2, i8 %6, i8 99
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void knfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<knfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @knfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
size_t __bwmsgsize(uint8_t *ptr, uint32_t size) {
  *ptr = (size >> 24) & 0x00ff;
  *(ptr + 1) = (size >> 16) & 0x00ff;
  *(ptr + 2) = (size >> 8) & 0x00ff;
  *(ptr + 3) = size & 0x00ff;
  return 4;
}


x86 assembly (clang, -O0):
<__bwmsgsize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bwmsgsize>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i64 @__bwmsgsize(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
store i32 %7, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 8
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %4
%20 = and i32 %19, 255
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 3
store i32 %20, i32* %22
ret i64 4
}

LLVM IR (-O2):
define i64 @__bwmsgsize(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
store i32 %3, i32* %0
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = and i32 %1, 255
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %11
ret i64 4
}
void selinux_setfilecon(const char *file, const char *devname,
                        unsigned int mode) {}


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

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

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

LLVM IR (-O2):
define void @selinux_setfilecon(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int);
void C67_CMPLTSP(int s1, int s2, int dst) {
  C67_asm("CMPLTSP.S1", s1, s2, dst);
}


x86 assembly (clang, -O0):
<C67_CMPLTSP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_CMPLTSP>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"CMPLTSP.S1\00"
define void @C67_CMPLTSP(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @C67_asm(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"CMPLTSP.S1\00"
define void @C67_CMPLTSP(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @C67_asm(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_desc() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_desc>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_desc>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_desc() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_desc() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int isPrime(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter a Number: ");
  scanf("%d", &n);
  printf("Returned Value: %d \n", isPrime(n));
  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   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <isPrime@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a Number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"Returned Value: %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 ([17 x i8], [17 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 @isPrime(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a Number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"Returned Value: %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 ([17 x i8], [17 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 @isPrime(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ muggle_parity_gen(int);
int /*<<< orphan*/ printf(char *);
void muggle_output_odd_parity() {
  printf("odd parity\n");
  muggle_parity_gen(0x01);
}


x86 assembly (clang, -O0):
<muggle_output_odd_parity>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <muggle_parity_gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<muggle_output_odd_parity>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <muggle_parity_gen@plt>

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

LLVM IR (-O2):
@str = [11 x i8] c"odd parity\00"
define void @muggle_output_odd_parity() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @muggle_parity_gen(i32 1)
ret void
}
/* Type definitions */
typedef double time_t;

/* Variables and functions */
int epgdb_calculate_mjd(time_t value) { return 40587 + ((value) / 86400.0); }


x86 assembly (clang, -O0):
<epgdb_calculate_mjd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xef2(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<epgdb_calculate_mjd>:
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @epgdb_calculate_mjd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 8.640000e+04
%5 = fadd double 4.058700e+04, %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @epgdb_calculate_mjd(double %0) {
%2 = fdiv double %0, 8.640000e+04
%3 = fadd double %2, 4.058700e+04
%4 = fptosi double %3 to i32
ret i32 %4
}
void av_opt_set_dict2() {}


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

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

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

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