xunge/DecIR huggingface dataset:
_Complex long double test_cprojl(_Complex long double x) {
  return __builtin_cprojl(x);
}


x86 assembly (clang, -O0):
<test_cprojl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <cprojl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cprojl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <cprojl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_cprojl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_cprojl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
void TestPassVarLDC(long double _Complex x) { TestVarArg("A", x); }


x86 assembly (clang, -O0):
<TestPassVarLDC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
lea    0xed0(%rip),%rdi
lea    -0x20(%rbp),%rax
mov    (%rax),%rcx
mov    %rcx,(%rsp)
mov    0x8(%rax),%rcx
mov    %rcx,0x8(%rsp)
mov    0x10(%rax),%rcx
mov    %rcx,0x10(%rsp)
mov    0x18(%rax),%rax
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1030 <TestVarArg@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestPassVarLDC>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1030 <TestVarArg@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
define void @TestPassVarLDC({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = call i32 (i8*, { x86_fp80, x86_fp80 }*, ...) bitcast (i32 (...)* @TestVarArg to i32 (i8*, { x86_fp80, x86_fp80 }*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), { x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
define void @TestPassVarLDC({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call i32 (i8*, { x86_fp80, x86_fp80 }*, ...) bitcast (i32 (...)* @TestVarArg to i32 (i8*, { x86_fp80, x86_fp80 }*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), { x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int define_output_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(19, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<define_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x13,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<define_output_file>:
mov    $0x13,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @define_output_file() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 19, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
double f(double);
double pole(double a, double b) {
  return (b - a) * (f(a) + 4.0 * f(a / 2.0 + b / 2.0) + f(b)) / 6.0;
}


x86 assembly (clang, -O0):
<pole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <f@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeb2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1030 <f@plt>
movsd  -0x28(%rbp),%xmm1
movsd  0xe90(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <f@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe54(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pole>:
sub    $0x28,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
call   1030 <f@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xec3(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1030 <f@plt>
mulsd  0xeaa(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <f@plt>
addsd  0x8(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
divsd  0xe87(%rip),%xmm0
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define double @pole(double %0, double %1) {
%3 = fsub double %1, %0
%4 = tail call double @f(double %0)
%5 = fmul double %0, 5.000000e-01
%6 = fmul double %1, 5.000000e-01
%7 = fadd double %5, %6
%8 = tail call double @f(double %7)
%9 = tail call double @llvm.fmuladd.f64(double %8, double 4.000000e+00, double %4)
%10 = tail call double @f(double %1)
%11 = fadd double %9, %10
%12 = fmul double %3, %11
%13 = fdiv double %12, 6.000000e+00
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int my_putstr(char *str) {
  if (str != NULL)
    write(1, str, my_strlen(str));
  return (0);
}


x86 assembly (clang, -O0):
<my_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <my_putstr+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr>:
test   %rdi,%rdi
je     113e <my_putstr+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
pop    %rbx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @my_strlen(i8* %0)
%5 = tail call i32 @write(i32 1, i8* %0, i32 %4)
br label %6
6: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
int _XMP_is_constant_stride_1dim() { return true; }


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

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

LLVM IR (-O0):
define i32 @_XMP_is_constant_stride_1dim() {
ret i32 1
}

LLVM IR (-O2):
define i32 @_XMP_is_constant_stride_1dim() {
ret i32 1
}
/* Variables and functions */
int elf_exchange(int);
int elf_exchange_2(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Part 1: %d\n", elf_exchange(3005290));
  printf("Part 2: %d\n", elf_exchange_2(3005290));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2ddb6a,%edi
call   1050 <elf_exchange@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2ddb6a,%edi
call   1040 <elf_exchange_2@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2ddb6a,%edi
call   1050 <elf_exchange@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2ddb6a,%edi
call   1040 <elf_exchange_2@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Part 1: %d\0A\00"
@.str.1 = [12 x i8] c"Part 2: %d\0A\00"
define i32 @main() {
%1 = call i32 @elf_exchange(i32 3005290)
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @elf_exchange_2(i32 3005290)
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Part 1: %d\0A\00"
@.str.1 = [12 x i8] c"Part 2: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @elf_exchange(i32 3005290)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @elf_exchange_2(i32 3005290)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ strlen(char *);
int get_offset_c_string_len_(char ***fer_ptr, int *offset) {
  char **each_str_ptr;
  each_str_ptr = *fer_ptr;
  each_str_ptr += *offset * 8 / sizeof(char **);
  if (*each_str_ptr == NULL)
    return 0;
  return (int)strlen(*each_str_ptr);
}


x86 assembly (clang, -O0):
<get_offset_c_string_len_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
shl    $0x3,%eax
cltq
shr    $0x3,%rax
shl    $0x3,%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1160 <get_offset_c_string_len_+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116f <get_offset_c_string_len_+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_offset_c_string_len_>:
push   %rax
mov    (%rdi),%rax
movslq (%rsi),%rcx
mov    (%rax,%rcx,8),%rdi
test   %rdi,%rdi
je     1127 <get_offset_c_string_len_+0x17>
call   1030 <strlen@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_offset_c_string_len_(i8*** nocapture %0, i32* nocapture %1) {
%3 = load i8**, i8*** %0
%4 = load i32, i32* %1
%5 = shl nsw i32 %4, 3
%6 = sext i32 %5 to i64
%7 = lshr exact i64 %6, 3
%8 = getelementptr inbounds i8*, i8** %3, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = tail call i64 @strlen(i8* %9)
%13 = trunc i64 %12 to i32
br label %14
14: ; preds = %2, %11
%15 = phi i32 [ %13, %11 ], [ 0, %2 ]
ret i32 %15
}
void SobelXYRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @SobelXYRow_NEON() {
ret void
}
/* Variables and functions */
size_t FSE_headerBound(unsigned maxSymbolValue, unsigned tableLog) {
  size_t maxHeaderSize = (((maxSymbolValue + 1) * tableLog) >> 3) + 1;
  return maxSymbolValue ? maxHeaderSize : 512;
}


x86 assembly (clang, -O0):
<FSE_headerBound>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   -0x8(%rbp),%eax
shr    $0x3,%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1137 <FSE_headerBound+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1145 <FSE_headerBound+0x45>
mov    $0x200,%eax
mov    %rax,-0x18(%rbp)
jmp    1145 <FSE_headerBound+0x45>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FSE_headerBound>:
lea    0x1(%rdi),%ecx
imul   %esi,%ecx
shr    $0x3,%ecx
add    $0x1,%ecx
test   %edi,%edi
mov    $0x200,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i64 @FSE_headerBound(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = add i32 %6, 1
%8 = load i32, i32* %4
%9 = mul i32 %7, %8
%10 = lshr i32 %9, 3
%11 = add i32 %10, 1
%12 = zext i32 %11 to i64
store i64 %12, i64* %5
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i64, i64* %5
br label %18
17: ; preds = %2
br label %18
18: ; preds = %17, %15
%19 = phi i64 [ %16, %15 ], [ 512, %17 ]
ret i64 %19
}

LLVM IR (-O2):
define i64 @FSE_headerBound(i32 %0, i32 %1) {
%3 = add i32 %0, 1
%4 = mul i32 %3, %1
%5 = lshr i32 %4, 3
%6 = add nuw nsw i32 %5, 1
%7 = icmp eq i32 %0, 0
%8 = select i1 %7, i32 512, i32 %6
%9 = zext i32 %8 to i64
ret i64 %9
}
__attribute__((target("sse4.2"))) void foo_decls(void) {}


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

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

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

LLVM IR (-O2):
define void @foo_decls() {
ret void
}
char *int2week(int day) {
  char *days[7] = {"Saturday",  "Sunday",   "Monday", "Tuesday",
                   "Wednesday", "Thursday", "Friday"};
  return days[day];
}


x86 assembly (clang, -O0):
<int2week>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x2cba(%rip),%rsi
mov    $0x38,%edx
call   1030 <memcpy@plt>
movslq -0x4(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2week>:
movslq %edi,%rax
lea    0xf32(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Saturday\00"
@.str.1 = [7 x i8] c"Sunday\00"
@.str.2 = [7 x i8] c"Monday\00"
@.str.3 = [8 x i8] c"Tuesday\00"
@.str.4 = [10 x i8] c"Wednesday\00"
@.str.5 = [9 x i8] c"Thursday\00"
@.str.6 = [7 x i8] c"Friday\00"
@__const.int2week.days = [7 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0)]
define i8* @int2week(i32 %0) {
%2 = alloca i32
%3 = alloca [7 x i8*]
store i32 %0, i32* %2
%4 = bitcast [7 x i8*]* %3 to i8*
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 %6
%8 = load i8*, i8** %7
ret i8* %8
}

LLVM IR (-O2):
@.str = [9 x i8] c"Saturday\00"
@.str.1 = [7 x i8] c"Sunday\00"
@.str.2 = [7 x i8] c"Monday\00"
@.str.3 = [8 x i8] c"Tuesday\00"
@.str.4 = [10 x i8] c"Wednesday\00"
@.str.5 = [9 x i8] c"Thursday\00"
@.str.6 = [7 x i8] c"Friday\00"
@reltable.int2week = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.int2week to i64)) to i32)]
define i8* @int2week(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl i64 %2, 2
%4 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.int2week to i8*), i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ HwNazeHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwNazeRequestUpdate() { UAVObjRequestUpdate(HwNazeHandle()); }


x86 assembly (clang, -O0):
<HwNazeRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <HwNazeHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HwNazeRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <HwNazeHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @HwNazeRequestUpdate() {
%1 = call i32 (...) @HwNazeHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwNazeRequestUpdate() {
%1 = tail call i32 (...) @HwNazeHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
void open_history_file(void) {}


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

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

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

LLVM IR (-O2):
define void @open_history_file() {
ret void
}
const char *isns_entity_protocol_help(void) {
  return "one of None, iSCSI, iFCP";
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"one of None, iSCSI, iFCP\00"
define i8* @isns_entity_protocol_help() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [25 x i8] c"one of None, iSCSI, iFCP\00"
define i8* @isns_entity_protocol_help() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}
unsigned long ERR_get_error() { return 0; }


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

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

LLVM IR (-O0):
define i64 @ERR_get_error() {
ret i64 0
}

LLVM IR (-O2):
define i64 @ERR_get_error() {
ret i64 0
}
void vx_info_init_cvirt_pc(struct _vx_cvirt_pc *cvirt_pc, int cpu) {}


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

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

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

LLVM IR (-O2):
%struct._vx_cvirt_pc = type opaque
define void @vx_info_init_cvirt_pc(%struct._vx_cvirt_pc* nocapture %0, i32 %1) {
ret void
}
int plusOne(int i) { return (++i); }


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

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

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

LLVM IR (-O2):
define i32 @plusOne(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ parse_data();
int /*<<< orphan*/ parse_text();
int /*<<< orphan*/ write_global();
int /*<<< orphan*/ write_text();
void parse() {
  parse_data();
  parse_text();
  write_text();
  write_global();
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <parse_data@plt>
mov    $0x0,%al
call   1050 <parse_text@plt>
mov    $0x0,%al
call   1040 <write_text@plt>
mov    $0x0,%al
call   1030 <write_global@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
push   %rax
xor    %eax,%eax
call   1060 <parse_data@plt>
xor    %eax,%eax
call   1050 <parse_text@plt>
xor    %eax,%eax
call   1040 <write_text@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <write_global@plt>

LLVM IR (-O0):
define void @parse() {
%1 = call i32 (...) @parse_data()
%2 = call i32 (...) @parse_text()
%3 = call i32 (...) @write_text()
%4 = call i32 (...) @write_global()
ret void
}

LLVM IR (-O2):
define void @parse() {
%1 = tail call i32 (...) @parse_data()
%2 = tail call i32 (...) @parse_text()
%3 = tail call i32 (...) @write_text()
%4 = tail call i32 (...) @write_global()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
int main(int argc, char **argv) {
  double subtotal = 200;
  double tax, grandtotal;
  double taxrate = 0.174;
  tax = subtotal * taxrate;
  grandtotal = subtotal + tax;
  printf("The tax on %f is %f, so the grand total is %f.\n", subtotal, tax,
         grandtotal);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeda(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [48 x i8] c"The tax on %f is %f, so the grand total is %f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.000000e+02, double* %6
store double 1.740000e-01, double* %9
%10 = load double, double* %6
%11 = load double, double* %9
%12 = fmul double %10, %11
store double %12, double* %7
%13 = load double, double* %6
%14 = load double, double* %7
%15 = fadd double %13, %14
store double %15, double* %8
%16 = load double, double* %6
%17 = load double, double* %7
%18 = load double, double* %8
%19 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %16, double %17, double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"The tax on %f is %f, so the grand total is %f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 2.000000e+02, double 3.480000e+01, double 2.348000e+02)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ update_sysinfo();
void update_total_processes() { update_sysinfo(); }


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

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

LLVM IR (-O0):
define void @update_total_processes() {
%1 = call i32 (...) @update_sysinfo()
ret void
}

LLVM IR (-O2):
define void @update_total_processes() {
%1 = tail call i32 (...) @update_sysinfo()
ret void
}
/* Variables and functions */
int atoi_nonlocalized(char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
int antoi(const char *input_str, int len) {
  char str[1024];
  strncpy(str, input_str, len);
  str[len] = 0;
  return (atoi_nonlocalized(str));
}


x86 assembly (clang, -O0):
<antoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
movslq -0xc(%rbp),%rax
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
call   1040 <atoi_nonlocalized@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<antoi>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %esi,%ebx
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,(%rsp,%rax,1)
mov    %r14,%rdi
call   1040 <atoi_nonlocalized@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @antoi(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @strncpy(i8* %6, i8* %7, i32 %8)
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %11
store i8 0, i8* %12
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%14 = call i32 @atoi_nonlocalized(i8* %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @antoi(i8* %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %0, i32 %1)
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %6
store i8 0, i8* %7
%8 = call i32 @atoi_nonlocalized(i8* %4)
ret i32 %8
}
/* Variables and functions */
double exp(double);
double If(double x) { return exp(0.5 * x * x); }


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

x86 assembly (clang, -O2):
<If>:
movsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @If(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 5.000000e-01, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @exp(double %6)
ret double %7
}

LLVM IR (-O2):
define double @If(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fmul double %2, %0
%4 = tail call double @exp(double %3)
ret double %4
}
getusage(s) char *s;
{
  printf("usage: %s host:file host:file ... file, or\n", s);
  printf("       %s file file ... file if connected\n", s);
}


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

x86 assembly (clang, -O2):
<getusage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define i32 @getusage(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [44 x i8] c"usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define i32 @getusage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
void BreakDownInterval(int dInterval, char *sInterval) {
  int dMin, dSec;
  dMin = dInterval / 60;
  dSec = dInterval - (dMin * 60);
  sprintf(sInterval, "%02d:%02d", dMin, dSec);
  return;
}


x86 assembly (clang, -O0):
<BreakDownInterval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x3c,-0x14(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeb6(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BreakDownInterval>:
mov    %rsi,%rax
movslq %edi,%rsi
imul   $0xffffffff88888889,%rsi,%rdx
shr    $0x20,%rdx
add    %esi,%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
sar    $0x5,%edx
add    %ecx,%edx
imul   $0xffffffc4,%edx,%ecx
add    %esi,%ecx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%02d:%02d\00"
define void @BreakDownInterval(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 60
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = mul nsw i32 %10, 60
%12 = sub nsw i32 %9, %11
store i32 %12, i32* %6
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%02d:%02d\00"
define void @BreakDownInterval(i32 %0, i8* nocapture writeonly %1) {
%3 = sdiv i32 %0, 60
%4 = mul nsw i32 %3, -60
%5 = add i32 %4, %0
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ socket(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int execute_socket() {
  socket(AF_INET, SOCK_STREAM, 0);
  socket(AF_INET, SOCK_DGRAM, 0);
  return 0;
}


x86 assembly (clang, -O0):
<execute_socket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_socket>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
mov    (%rbx),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @execute_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = load i32, i32* @AF_INET
%5 = load i32, i32* @SOCK_DGRAM
%6 = call i32 @socket(i32 %4, i32 %5, i32 0)
ret i32 0
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @execute_socket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = load i32, i32* @AF_INET
%5 = load i32, i32* @SOCK_DGRAM
%6 = tail call i32 @socket(i32 %4, i32 %5, i32 0)
ret i32 0
}
int go(char *feature, char *cpu) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @go(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 2
}
void ioSynchronousCheckForEvents() {}


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

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

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

LLVM IR (-O2):
define void @ioSynchronousCheckForEvents() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unsetenv(char *);
void __interposed_init() { unsetenv("LD_PRELOAD"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"LD_PRELOAD\00"
define void @__interposed_init() {
%1 = call i32 @unsetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"LD_PRELOAD\00"
define void @__interposed_init() {
%1 = tail call i32 @unsetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ listActors();
int /*<<< orphan*/ showActor(int /*<<< orphan*/);
char *strtok(int /*<<< orphan*/ *, char *);
void handleActorsCommand() {
  char *parameter = strtok(NULL, "");
  if (parameter == NULL)
    listActors();
  else
    showActor(atoi(parameter));
}


x86 assembly (clang, -O0):
<handleActorsCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xead(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1173 <handleActorsCommand+0x33>
mov    $0x0,%al
call   1030 <listActors@plt>
jmp    1183 <handleActorsCommand+0x43>
mov    -0x8(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1060 <showActor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleActorsCommand>:
push   %rax
lea    0xeb8(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     1164 <handleActorsCommand+0x24>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <showActor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <listActors@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @handleActorsCommand() {
%1 = alloca i8*
%2 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @listActors()
br label %11
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @showActor(i32 %9)
br label %11
11: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @handleActorsCommand() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @listActors()
br label %8
5: ; preds = %0
%6 = tail call i32 @atoi(i8* %1)
%7 = tail call i32 @showActor(i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
/* Type definitions */
struct ip {
  int /*<<< orphan*/ ip_src;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void set_ip_src_addr(struct ip *self, char *val) {
  if (inet_pton(AF_INET, val, &(self->ip_src)) != 1) {
    perror("inet_pton()");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<set_ip_src_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1030 <inet_pton@plt>
cmp    $0x1,%eax
je     1179 <set_ip_src_addr+0x49>
lea    0xe9a(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ip_src_addr>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <inet_pton@plt>
cmp    $0x1,%eax
jne    1149 <set_ip_src_addr+0x19>
pop    %rax
ret
lea    0xeb0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.ip = type { i32 }
@AF_INET = global i32 0
@.str = [12 x i8] c"inet_pton()\00"
@EXIT_FAILURE = global i32 0
define void @set_ip_src_addr(%struct.ip* %0, i8* %1) {
%3 = alloca %struct.ip*
%4 = alloca i8*
store %struct.ip* %0, %struct.ip** %3
store i8* %1, i8** %4
%5 = load i32, i32* @AF_INET
%6 = load i8*, i8** %4
%7 = load %struct.ip*, %struct.ip** %3
%8 = getelementptr inbounds %struct.ip, %struct.ip* %7, i32 0, i32 0
%9 = call i32 @inet_pton(i32 %5, i8* %6, i32* %8)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
ret void
}

LLVM IR (-O2):
%struct.ip = type { i32 }
@AF_INET = global i32 0
@.str = [12 x i8] c"inet_pton()\00"
@EXIT_FAILURE = global i32 0
define void @set_ip_src_addr(%struct.ip* %0, i8* %1) {
%3 = load i32, i32* @AF_INET
%4 = getelementptr inbounds %struct.ip, %struct.ip* %0, i64 0, i32 0
%5 = tail call i32 @inet_pton(i32 %3, i8* %1, i32* %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ pause();
int /*<<< orphan*/ perror(char *);
int set_ticker(int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int main() {
  void countdown(int);
  signal(SIGALRM, countdown);
  if (set_ticker(500) == -1)
    perror("set_ticker");
  else
    while (1)
      pause();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    0x2e79(%rip),%rsi
call   1030 <signal@plt>
mov    $0x1f4,%edi
call   1040 <set_ticker@plt>
cmp    $0xffffffff,%eax
jne    1188 <main+0x48>
lea    0xe82(%rip),%rdi
call   1060 <perror@plt>
jmp    1199 <main+0x59>
jmp    118d <main+0x4d>
mov    $0x0,%al
call   1050 <pause@plt>
jmp    118d <main+0x4d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2e87(%rip),%rsi
call   1030 <signal@plt>
mov    $0x1f4,%edi
call   1040 <set_ticker@plt>
cmp    $0xffffffff,%eax
je     1179 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1050 <pause@plt>
jmp    1170 <main+0x30>
lea    0xe80(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGALRM = global i32 0
@.str = [11 x i8] c"set_ticker\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGALRM
%3 = call i32 @signal(i32 %2, void (i32)* @countdown)
%4 = call i32 @set_ticker(i32 500)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %0
br label %9
9: ; preds = %8, %9
%10 = call i32 (...) @pause()
br label %9
11: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@.str = [11 x i8] c"set_ticker\00"
define i32 @main() {
%1 = load i32, i32* @SIGALRM
%2 = tail call i32 @signal(i32 %1, void (i32)* @countdown)
%3 = tail call i32 @set_ticker(i32 500)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
7: ; preds = %0, %7
%8 = tail call i32 (...) @pause()
br label %7
}
int main() {
  int a;
  a = 3;
  if (a == 3)
    return 1;
  else
    return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1128 <main+0x28>
movl   $0x1,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int errno;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void sigchld_handler(int s) {
  int saved_errno = errno;
  while (waitpid(-1, NULL, WNOHANG) > 0) {
  }
  errno = saved_errno;
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    114d <sigchld_handler+0x3d>
jmp    1127 <sigchld_handler+0x17>
mov    -0x8(%rbp),%ecx
mov    0x2e81(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ebd(%rip),%r14
mov    (%r14),%ebp
mov    0x2ec3(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1130 <sigchld_handler+0x20>
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i32 0
@WNOHANG = global i32 0
define void @sigchld_handler(i32 %0) {
%2 = load i32, i32* @errno
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* @WNOHANG
%5 = tail call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
store i32 %2, i32* @errno
ret void
}