xunge/DecIR huggingface dataset:
void foo298() {}


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

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

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

LLVM IR (-O2):
define void @foo298() {
ret void
}
int Combinations(int x, int y) {
  if (x == y || y == 0) {
    return 1;
  } else {
    return Combinations(x - 1, y - 1) + Combinations(x - 1, y);
  }
}


x86 assembly (clang, -O0):
<Combinations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1134 <Combinations+0x24>
cmpl   $0x0,-0xc(%rbp)
jne    1140 <Combinations+0x30>
movl   $0x1,-0x4(%rbp)
jmp    116c <Combinations+0x5c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <Combinations@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <Combinations@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Combinations>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %esi,%esi
je     1162 <Combinations+0x52>
mov    %esi,%r14d
mov    %edi,%ebx
cmp    %esi,%edi
je     1162 <Combinations+0x52>
lea    -0x1(%r14),%r15d
neg    %r14d
add    $0xffffffff,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <Combinations@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0xffffffff,%eax
mov    %ebx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%ebx
cmp    $0xffffffff,%eax
jne    1140 <Combinations+0x30>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Combinations(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %0, %6 ], [ %11, %8 ]
%10 = phi i32 [ 0, %6 ], [ %13, %8 ]
%11 = add nsw i32 %9, -1
%12 = tail call i32 @Combinations(i32 %11, i32 %7)
%13 = add nsw i32 %12, %10
%14 = icmp eq i32 %11, %1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = add i32 %13, 1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 1, %2 ], [ %16, %15 ]
ret i32 %18
}
void f2(void *p) { printf("f2():%s\n", p); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"f2():%s\0A\00"
define void @f2(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void clrbit(unsigned int *w, unsigned int flags) { *w &= ~flags; }


x86 assembly (clang, -O0):
<clrbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clrbit>:
not    %esi
and    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @clrbit(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 = xor i32 %5, -1
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = and i32 %8, %6
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @clrbit(i32* nocapture %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = load i32, i32* %0
%5 = and i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *yajl_internal_malloc(void *ctx, size_t sz) {
  (void)ctx;
  return malloc(sz);
}


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

x86 assembly (clang, -O2):
<yajl_internal_malloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @yajl_internal_malloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @malloc(i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @yajl_internal_malloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
long long add_ll(long long a, long long b) { return a + b; }


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

x86 assembly (clang, -O2):
<add_ll>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @add_ll(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @add_ll(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
void _printSP_bin(void) {}


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

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

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

LLVM IR (-O2):
define void @_printSP_bin() {
ret void
}
int foo(int *p) {
  int a = p;
  return a + 4;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 4
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 4
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bef_push(int);
int ins_nm6() {
  bef_push(6);
  return 1;
}


x86 assembly (clang, -O0):
<ins_nm6>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <bef_push@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ins_nm6>:
push   %rax
mov    $0x6,%edi
call   1030 <bef_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ins_nm6() {
%1 = call i32 @bef_push(i32 6)
ret i32 1
}

LLVM IR (-O2):
define i32 @ins_nm6() {
%1 = tail call i32 @bef_push(i32 6)
ret i32 1
}
/* Type definitions */
struct timespec {
  long long tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ assert(int);
int clock_gettime(int /*<<< orphan*/, struct timespec *);
long long nano_time_i(void) {
  struct timespec ts;
  int h = clock_gettime(CLOCK_MONOTONIC, &ts);
  assert(!h);
  assert(!h);
  return (long long)ts.tv_sec * 1000000000 + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<nano_time_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
imul   $0x3b9aca00,-0x8(%rbp),%rax
3b
add    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nano_time_i>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%edi
call   1040 <assert@plt>
mov    %ebx,%edi
call   1040 <assert@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    (%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @nano_time_i() {
%1 = alloca %struct.timespec
%2 = alloca i32
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%16 = load i64, i64* %15
%17 = mul nsw i64 %16, 1000000000
%18 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%19 = load i64, i64* %18
%20 = add nsw i64 %17, %19
ret i64 %20
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @nano_time_i() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @assert(i32 %6)
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i64, i64* %9
%11 = mul nsw i64 %10, 1000000000
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%13 = load i64, i64* %12
%14 = add nsw i64 %11, %13
ret i64 %14
}
void ff_hevc_put_hevc_bi_w_qpel_v16_12_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ LCDIntf_WaitWhileBusy();
int /*<<< orphan*/ LCDIntf_WriteData(int /*<<< orphan*/);
int /*<<< orphan*/ resetInvalidCharCodeToSafeDefault(int /*<<< orphan*/ *);
int32_t LCDDriver_Putc(int32_t ch) {
  resetInvalidCharCodeToSafeDefault(&ch);
  LCDIntf_WriteData(ch);
  return LCDIntf_WaitWhileBusy();
}


x86 assembly (clang, -O0):
<LCDDriver_Putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <resetInvalidCharCodeToSafeDefault@plt>
mov    -0x4(%rbp),%edi
call   1040 <LCDIntf_WriteData@plt>
mov    $0x0,%al
call   1050 <LCDIntf_WaitWhileBusy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDDriver_Putc>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <resetInvalidCharCodeToSafeDefault@plt>
mov    0x4(%rsp),%edi
call   1040 <LCDIntf_WriteData@plt>
xor    %eax,%eax
call   1050 <LCDIntf_WaitWhileBusy@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @LCDDriver_Putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @resetInvalidCharCodeToSafeDefault(i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @LCDIntf_WriteData(i32 %4)
%6 = call i32 (...) @LCDIntf_WaitWhileBusy()
ret i32 %6
}

LLVM IR (-O2):
define i32 @LCDDriver_Putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @resetInvalidCharCodeToSafeDefault(i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @LCDIntf_WriteData(i32 %4)
%6 = call i32 (...) @LCDIntf_WaitWhileBusy()
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Debugging program\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Debugging program\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ff_hevc_put_hevc_uni_epel_h32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h32_10_sse4() {
ret void
}
/* Variables and functions */
float ldexp(float, int);
scalar_t__ random(int);
float rnd() { return ldexp((float)random(1 << 30), -30); }


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40000000,%edi
call   1040 <random@plt>
cvtsi2ss %rax,%xmm0
mov    $0xffffffe2,%edi
call   1030 <ldexp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rax
mov    $0x40000000,%edi
call   1040 <random@plt>
cvtsi2ss %rax,%xmm0
mov    $0xffffffe2,%edi
pop    %rax
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define float @rnd() {
%1 = call i64 @random(i32 1073741824)
%2 = sitofp i64 %1 to float
%3 = call float @ldexp(float %2, i32 -30)
ret float %3
}

LLVM IR (-O2):
define float @rnd() {
%1 = tail call i64 @random(i32 1073741824)
%2 = sitofp i64 %1 to float
%3 = tail call float @ldexp(float %2, i32 -30)
ret float %3
}
int test_16(int a, int b) {
  return (a & 0x80000000) == (b & 0x80000000) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
and    $0x80000000,%edx
mov    -0x8(%rbp),%esi
and    $0x80000000,%esi
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_16>:
xor    %esi,%edi
mov    $0xffffffec,%ecx
mov    $0xffffffd8,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_16(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 = and i32 %5, -2147483648
%7 = load i32, i32* %4
%8 = and i32 %7, -2147483648
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 -20, i32 -40
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_16(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp sgt i32 %3, -1
%5 = select i1 %4, i32 -20, i32 -40
ret i32 %5
}
long double logbl(long double x) {
  long double res = 0.0L;
  asm("fxtract\n\t"
      "fstp	%%st"
      : "=t"(res)
      : "0"(x));
  return res;
}


x86 assembly (clang, -O0):
<logbl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldz
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fxtract
fstp   %st(0)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbl>:
fldt   0x8(%rsp)
fxtract
fstp   %st(0)
ret

LLVM IR (-O0):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ print_hex_dump(char const *, int, unsigned int, int, int,
                                  void const *, size_t, int);
void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
                          unsigned int addr, const void *buf, size_t len) {
  print_hex_dump(prefix_str, prefix_type, addr, 16, 1, buf, len, 1);
}


x86 assembly (clang, -O0):
<print_hex_dump_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
mov    $0x10,%ecx
mov    $0x1,%r8d
mov    %rax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <print_hex_dump@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex_dump_bytes>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r9
mov    $0x10,%ecx
mov    $0x1,%r8d
push   $0x1
push   %rax
call   1030 <print_hex_dump@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @print_hex_dump_bytes(i8* %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i32 @print_hex_dump(i8* %11, i32 %12, i32 %13, i32 16, i32 1, i8* %14, i64 %15, i32 1)
ret void
}

LLVM IR (-O2):
define void @print_hex_dump_bytes(i8* %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = tail call i32 @print_hex_dump(i8* %0, i32 %1, i32 %2, i32 16, i32 1, i8* %3, i64 %4, i32 1)
ret void
}
/* Variables and functions */
float __nv_tanhf(float);
float tanhf(float __a) { return __nv_tanhf(__a); }


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

x86 assembly (clang, -O2):
<tanhf>:
jmp    1030 <__nv_tanhf@plt>

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

LLVM IR (-O2):
define float @tanhf(float %0) {
%2 = tail call float @__nv_tanhf(float %0)
ret float %2
}
/* Variables and functions */
void *LAVerifySEP() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @LAVerifySEP() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @LAVerifySEP() {
ret i8* null
}
void gtk_file_chooser_widget_new_with_backend() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ mem_write_8(int, int /*<<< orphan*/);
void mem_write_16(uint16_t addr, uint16_t v) {
  mem_write_8(addr, (uint8_t)(v & 0x00FF));
  mem_write_8(addr + 1, (uint8_t)((v & 0xFF00) >> 8));
}


x86 assembly (clang, -O0):
<mem_write_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0xff,%esi
call   1030 <mem_write_8@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
and    $0xff00,%esi
sar    $0x8,%esi
call   1030 <mem_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_write_16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %edi,%ebx
movzbl %al,%esi
mov    %eax,%ebp
call   1030 <mem_write_8@plt>
add    $0x1,%ebx
mov    %ebp,%eax
movzbl %ah,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <mem_write_8@plt>

LLVM IR (-O0):
define void @mem_write_16(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 = and i32 %6, 255
%8 = call i32 @mem_write_8(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %4
%12 = and i32 %11, 65280
%13 = ashr i32 %12, 8
%14 = call i32 @mem_write_8(i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
define void @mem_write_16(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @mem_write_8(i32 %0, i32 %3)
%5 = add nsw i32 %0, 1
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = tail call i32 @mem_write_8(i32 %5, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYNTAX(char const *);
void yyerror(const char *s) { SYNTAX(s); }


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

x86 assembly (clang, -O2):
<yyerror>:
jmp    1030 <SYNTAX@plt>

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

LLVM IR (-O2):
define void @yyerror(i8* %0) {
%2 = tail call i32 @SYNTAX(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void err_exit(const char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_exit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @err_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @err_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int selinux_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @selinux_init() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ mp_sizeof_strl(scalar_t__);
uint32_t mp_sizeof_str(uint32_t len) { return mp_sizeof_strl(len) + len; }


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

x86 assembly (clang, -O2):
<mp_sizeof_str>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mp_sizeof_strl@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mp_sizeof_str(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @mp_sizeof_strl(i64 %3)
%5 = load i64, i64* %2
%6 = add nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @mp_sizeof_str(i64 %0) {
%2 = tail call i64 @mp_sizeof_strl(i64 %0)
%3 = add nsw i64 %2, %0
ret i64 %3
}
int h(int x) { return x - 1; }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
/* Type definitions */
struct tipc_msg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ msg_set_bits(struct tipc_msg *, int, int, int, char);
void msg_set_net_plane(struct tipc_msg *m, char n) {
  msg_set_bits(m, 5, 1, 7, (n - 'A'));
}


x86 assembly (clang, -O0):
<msg_set_net_plane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%eax
sub    $0x41,%eax
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x7,%ecx
movsbl %al,%r8d
call   1030 <msg_set_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_set_net_plane>:
add    $0xbf,%sil
movsbl %sil,%r8d
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x7,%ecx
jmp    1030 <msg_set_bits@plt>

LLVM IR (-O0):
%struct.tipc_msg = type { i32 }
define void @msg_set_net_plane(%struct.tipc_msg* %0, i8 signext %1) {
%3 = alloca %struct.tipc_msg*
%4 = alloca i8
store %struct.tipc_msg* %0, %struct.tipc_msg** %3
store i8 %1, i8* %4
%5 = load %struct.tipc_msg*, %struct.tipc_msg** %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 65
%9 = trunc i32 %8 to i8
%10 = call i32 @msg_set_bits(%struct.tipc_msg* %5, i32 5, i32 1, i32 7, i8 signext %9)
ret void
}

LLVM IR (-O2):
%struct.tipc_msg = type { i32 }
define void @msg_set_net_plane(%struct.tipc_msg* %0, i8 signext %1) {
%3 = add i8 %1, -65
%4 = tail call i32 @msg_set_bits(%struct.tipc_msg* %0, i32 5, i32 1, i32 7, i8 signext %3)
ret void
}
int s_typeismq(struct stat *p) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @s_typeismq(%struct.stat* nocapture readnone %0) {
ret i32 0
}
void ar5312_prom_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ar5312_prom_init() {
ret void
}
/* Variables and functions */
int f154(int *);
int f155(int *p) { return f154(p); }


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

x86 assembly (clang, -O2):
<f155>:
jmp    1030 <f154@plt>

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

LLVM IR (-O2):
define i32 @f155(i32* %0) {
%2 = tail call i32 @f154(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_string2dec(void) { printf("\n\ttest_string2dec"); }


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"\0A\09test_string2dec\00"
define void @test_string2dec() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float tgammal(float);
float tgammaf(float x) { return (tgammal(x)); }


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

x86 assembly (clang, -O2):
<tgammaf>:
jmp    1030 <tgammal@plt>

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

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = tail call float @tgammal(float %0)
ret float %2
}
char *make_tag(int number, char *tag) {
  tag[0] = 'i';
  tag[1] = 'x';
  tag[2] = '0' + (number / 10);
  tag[3] = '0' + (number % 10);
  return tag;
}


x86 assembly (clang, -O0):
<make_tag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x69,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x78,0x1(%rax)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_tag>:
mov    %rsi,%rax
movw   $0x7869,(%rsi)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
lea    0x30(%rdx),%esi
mov    %sil,0x2(%rax)
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
add    $0x30,%cl
mov    %cl,0x3(%rax)
ret

LLVM IR (-O0):
define i8* @make_tag(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 105, i8* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 120, i8* %8
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 10
%11 = add nsw i32 48, %10
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 %12, i8* %14
%15 = load i32, i32* %3
%16 = srem i32 %15, 10
%17 = add nsw i32 48, %16
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 3
store i8 %18, i8* %20
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
define i8* @make_tag(i32 %0, i8* returned writeonly %1) {
store i8 105, i8* %1
%3 = getelementptr inbounds i8, i8* %1, i64 1
store i8 120, i8* %3
%4 = sdiv i32 %0, 10
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 48
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
%8 = srem i32 %0, 10
%9 = trunc i32 %8 to i8
%10 = add nsw i8 %9, 48
%11 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %10, i8* %11
ret i8* %1
}
void TOSH_MAKE_PW2_OUTPUT() { ; }


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

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

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

LLVM IR (-O2):
define void @TOSH_MAKE_PW2_OUTPUT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(float ***);
int /*<<< orphan*/ free_matrix2f(float **);
void free_matrix3f(float ***X) {
  free_matrix2f(X[0]);
  free(X);
}


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

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

LLVM IR (-O0):
define void @free_matrix3f(float*** %0) {
%2 = alloca float***
store float*** %0, float**** %2
%3 = load float***, float**** %2
%4 = getelementptr inbounds float**, float*** %3, i64 0
%5 = load float**, float*** %4
%6 = call i32 @free_matrix2f(float** %5)
%7 = load float***, float**** %2
%8 = call i32 @free(float*** %7)
ret void
}

LLVM IR (-O2):
define void @free_matrix3f(float*** nocapture %0) {
%2 = load float**, float*** %0
%3 = tail call i32 @free_matrix2f(float** %2)
%4 = tail call i32 @free(float*** %0)
ret void
}
/* Variables and functions */
int ceil(double);
signed int lceil(double x) { return ceil(x); }


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

x86 assembly (clang, -O2):
<lceil>:
jmp    1030 <ceil@plt>

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

LLVM IR (-O2):
define i32 @lceil(double %0) {
%2 = tail call i32 @ceil(double %0)
ret i32 %2
}
void websils_tls_abi_0() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv48_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int a, b;
  if (n % 2 == 0) {
    a = 4;
    b = n - 4;
  } else {
    b = 9;
    a = n - 9;
  }
  printf("%d %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1168 <main+0x48>
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    1178 <main+0x58>
movl   $0x9,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x9,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
add    $0xfffffff7,%ecx
test   $0x1,%al
mov    $0x4,%esi
cmovne %ecx,%esi
lea    -0x4(%rax),%eax
mov    $0x9,%edx
cmove  %eax,%edx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = srem i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
store i32 4, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 4
store i32 %11, i32* %4
br label %15
12: ; preds = %0
store i32 9, i32* %4
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 9
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = add nsw i32 %4, -4
%8 = add nsw i32 %4, -9
%9 = select i1 %6, i32 4, i32 %8
%10 = select i1 %6, i32 %7, i32 9
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ use_buf_calloc(int *, int);
int *wrap_calloc(int, int);
void call_calloc(int len) {
  int *calloc_buf = wrap_calloc(sizeof(int), len);
  use_buf_calloc(calloc_buf, len);
}


x86 assembly (clang, -O0):
<call_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1030 <wrap_calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <use_buf_calloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_calloc>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
mov    %ebx,%esi
call   1030 <wrap_calloc@plt>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <use_buf_calloc@plt>

LLVM IR (-O0):
define void @call_calloc(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32* @wrap_calloc(i32 4, i32 %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %2
%8 = call i32 @use_buf_calloc(i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @call_calloc(i32 %0) {
%2 = tail call i32* @wrap_calloc(i32 4, i32 %0)
%3 = tail call i32 @use_buf_calloc(i32* %2, i32 %0)
ret void
}
void WriteBlock(void) {}


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

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

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

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

/* Variables and functions */
int spi_disable_blockprotect_generic(struct flashrom_flashctx *, int, int,
                                     int /*<<< orphan*/, int);
int spi_disable_blockprotect_bp4_srwd(struct flashrom_flashctx *flash) {
  return spi_disable_blockprotect_generic(flash, 0x7C, 1 << 7, 0, 0xFF);
}


x86 assembly (clang, -O0):
<spi_disable_blockprotect_bp4_srwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7c,%esi
mov    $0x80,%edx
xor    %ecx,%ecx
mov    $0xff,%r8d
call   1030 <spi_disable_blockprotect_generic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_disable_blockprotect_bp4_srwd>:
mov    $0x7c,%esi
mov    $0x80,%edx
xor    %ecx,%ecx
mov    $0xff,%r8d
jmp    1030 <spi_disable_blockprotect_generic@plt>

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_disable_blockprotect_bp4_srwd(%struct.flashrom_flashctx* %0) {
%2 = alloca %struct.flashrom_flashctx*
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %2
%3 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %2
%4 = call i32 @spi_disable_blockprotect_generic(%struct.flashrom_flashctx* %3, i32 124, i32 128, i32 0, i32 255)
ret i32 %4
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_disable_blockprotect_bp4_srwd(%struct.flashrom_flashctx* %0) {
%2 = tail call i32 @spi_disable_blockprotect_generic(%struct.flashrom_flashctx* %0, i32 124, i32 128, i32 0, i32 255)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void BadMem(char *message, int exitcode) {
  fprintf(stderr, "Error on memory call: %s\n", message);
  exit(exitcode);
}


x86 assembly (clang, -O0):
<BadMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<BadMem>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Error on memory call: %s\0A\00"
define void @BadMem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Error on memory call: %s\0A\00"
define void @BadMem(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
unsigned int sys_call(int, int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/);
unsigned int proctime() { return sys_call(0x01, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<proctime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %r8d,%r8d
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <sys_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctime>:
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <sys_call@plt>

LLVM IR (-O0):
define i32 @proctime() {
%1 = call i32 @sys_call(i32 1, i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @proctime() {
%1 = tail call i32 @sys_call(i32 1, i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ after();
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
int main(int x) {
  foo();
  if (x) {
    bar();
    after();
    return 0;
  }
  bar();
  after();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <foo@plt>
cmpl   $0x0,-0x8(%rbp)
je     116d <main+0x3d>
mov    $0x0,%al
call   1040 <bar@plt>
mov    $0x0,%al
call   1030 <after@plt>
movl   $0x0,-0x4(%rbp)
jmp    117b <main+0x4b>
mov    $0x0,%al
call   1040 <bar@plt>
mov    $0x0,%al
call   1030 <after@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @bar()
%4 = tail call i32 (...) @after()
ret i32 0
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fstatfs(int, struct statfs *);
int open_rdonly(char *);
int execute_fstatfs() {
  struct statfs data;
  int fd = open_rdonly("syscalls.txt");
  fstatfs(fd, &data);
  close(fd);
  fstatfs(fd, &data);
  return 0;
}


x86 assembly (clang, -O0):
<execute_fstatfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <open_rdonly@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <fstatfs@plt>
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
mov    -0xc(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <fstatfs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_fstatfs>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1030 <open_rdonly@plt>
mov    %eax,%ebx
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rsi
call   1050 <fstatfs@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <fstatfs@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.statfs = type { i32 }
@.str = [13 x i8] c"syscalls.txt\00"
define i32 @execute_fstatfs() {
%1 = alloca %struct.statfs
%2 = alloca i32
%3 = call i32 @open_rdonly(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fstatfs(i32 %4, %struct.statfs* %1)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @fstatfs(i32 %8, %struct.statfs* %1)
ret i32 0
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
@.str = [13 x i8] c"syscalls.txt\00"
define i32 @execute_fstatfs() {
%1 = alloca %struct.statfs
%2 = bitcast %struct.statfs* %1 to i8*
%3 = tail call i32 @open_rdonly(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @fstatfs(i32 %3, %struct.statfs* %1)
%5 = call i32 @close(i32 %3)
%6 = call i32 @fstatfs(i32 %3, %struct.statfs* %1)
ret i32 0
}
unsigned int encuentra_d(unsigned int e, unsigned int phi) {
  unsigned int d = 1;
  while (1) {
    if (((d * e) % phi) == 1)
      return d;
    d++;
  }
}


x86 assembly (clang, -O0):
<encuentra_d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x1,%edx
jne    112b <encuentra_d+0x2b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <encuentra_d+0x11>

x86 assembly (clang, -O2):
<encuentra_d>:
xor    %r8d,%r8d
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
add    $0x1,%r8d
add    %edi,%ecx
cmp    $0x1,%edx
jne    1110 <encuentra_d+0x10>
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @encuentra_d(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 1, %2 ], [ %8, %3 ]
%5 = mul i32 %4, %0
%6 = urem i32 %5, %1
%7 = icmp eq i32 %6, 1
%8 = add i32 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
ret i32 %4
}
f(x) int x[];
{ return x[0]; }


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

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

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}