xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __builtin_exit(int /*<<< orphan*/);
int /*<<< orphan*/ configure2();
int main() {
  configure2();
  __builtin_exit(0);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @configure2()
%2 = call i32 @__builtin_exit(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @configure2()
%2 = tail call i32 @__builtin_exit(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int to_hex(int);
int main() {
  if (6 != to_hex((5, 6))) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1030 <to_hex@plt>
mov    %eax,%ecx
mov    $0x6,%eax
cmp    %ecx,%eax
je     1175 <main+0x45>
lea    0xea1(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1040 <to_hex@plt>
cmp    $0x6,%eax
jne    1163 <main+0x23>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe96(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @to_hex(i32 6)
%3 = icmp ne i32 6, %2
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 @to_hex(i32 6)
%2 = icmp eq i32 %1, 6
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void touch_update() { system("touch ./.conslk"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"touch ./.conslk\00"
define void @touch_update() {
%1 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"touch ./.conslk\00"
define void @touch_update() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int power_help(int, int, int);
int power3(int base, int exponent) { return power_help(base, exponent, 1); }


x86 assembly (clang, -O0):
<power3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1030 <power_help@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power3>:
mov    $0x1,%edx
jmp    1030 <power_help@plt>

LLVM IR (-O0):
define i32 @power3(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 = call i32 @power_help(i32 %5, i32 %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @power3(i32 %0, i32 %1) {
%3 = tail call i32 @power_help(i32 %0, i32 %1, i32 1)
ret i32 %3
}
double circle_area(double r) { return 3.1415926 * r * r; }


x86 assembly (clang, -O0):
<circle_area>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle_area>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @circle_area(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 0x400921FB4D12D84A, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @circle_area(double %0) {
%2 = fmul double %0, 0x400921FB4D12D84A
%3 = fmul double %2, %0
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ do_get_tsc();
uint64_t get_tsc(void) { return do_get_tsc(); }


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

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

LLVM IR (-O0):
define i32 @get_tsc() {
%1 = call i32 (...) @do_get_tsc()
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_tsc() {
%1 = tail call i32 (...) @do_get_tsc()
ret i32 %1
}
_Complex float foo(_Complex float x) { return __real x + 1.0iF * __imag x; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm2
mulss  %xmm3,%xmm2
addss  %xmm2,%xmm1
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
xorps  %xmm2,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @foo(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %4
%5 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%6 = load float, float* %5
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%8 = load float, float* %7
%9 = fmul float 0.000000e+00, %8
%10 = fmul float 1.000000e+00, %8
%11 = fadd float %6, %9
%12 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%13 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %11, float* %12
store float %10, float* %13
%14 = bitcast { float, float }* %2 to <2 x float>*
%15 = load <2 x float>, <2 x float>* %14
ret <2 x float> %15
}

LLVM IR (-O2):
define <2 x float> @foo(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 0
%3 = extractelement <2 x float> %0, i64 1
%4 = fmul float %3, 0.000000e+00
%5 = fadd float %2, %4
%6 = insertelement <2 x float> %0, float %5, i64 0
ret <2 x float> %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
int /*<<< orphan*/ stderr;
void coco_assert_failed(const char *fname, int lineno) {
  fprintf(stderr, "Assert failed at: %s#%d.\n", fname, lineno);
  exit(-1);
}


x86 assembly (clang, -O0):
<coco_assert_failed>:
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
mov    -0xc(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Assert failed at: %s#%d.\0A\00"
define void @coco_assert_failed(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 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Assert failed at: %s#%d.\0A\00"
define void @coco_assert_failed(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, i32 %1)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
int return_lea(char *p) { return (int)p; }


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

x86 assembly (clang, -O2):
<return_lea>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @return_lea(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
int main() {
  long number = 3.141592653590L;
  int day = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x3,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int yogrt_get_interval2_start();
int iyogrt_get_interval2_start__(void) { return yogrt_get_interval2_start(); }


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

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

LLVM IR (-O0):
define i32 @iyogrt_get_interval2_start__() {
%1 = call i32 (...) @yogrt_get_interval2_start()
ret i32 %1
}

LLVM IR (-O2):
define i32 @iyogrt_get_interval2_start__() {
%1 = tail call i32 (...) @yogrt_get_interval2_start()
ret i32 %1
}
double RawToFloat(unsigned char raw, unsigned char *psdr) {
  return ((double)raw);
}


x86 assembly (clang, -O0):
<RawToFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @RawToFloat(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = uitofp i8 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @RawToFloat(i8 zeroext %0, i8* nocapture readnone %1) {
%3 = uitofp i8 %0 to double
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ ObjectSize0(char *);
void test13() {
  char c[10];
  char *p = c;
  ObjectSize0(p);
  ObjectSize0(++p);
  ObjectSize0(p++);
}


x86 assembly (clang, -O0):
<test13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ObjectSize0@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x18(%rbp)
call   1030 <ObjectSize0@plt>
mov    -0x18(%rbp),%rdi
mov    %rdi,%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
call   1030 <ObjectSize0@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test13>:
push   %rbx
sub    $0x10,%rsp
lea    0x6(%rsp),%rdi
call   1030 <ObjectSize0@plt>
lea    0x7(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <ObjectSize0@plt>
mov    %rbx,%rdi
call   1030 <ObjectSize0@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test13() {
%1 = alloca [10 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @ObjectSize0(i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = call i32 @ObjectSize0(i8* %7)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = call i32 @ObjectSize0(i8* %9)
ret void
}

LLVM IR (-O2):
define void @test13() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @ObjectSize0(i8* %2)
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
%5 = call i32 @ObjectSize0(i8* %4)
%6 = call i32 @ObjectSize0(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quick_Sort(int *, int /*<<< orphan*/, int,
                              int /*<<< orphan*/);
void quickSort(int *Array, int size) { quick_Sort(Array, 0, (size - 1), 0); }


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

x86 assembly (clang, -O2):
<quickSort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <quick_Sort@plt>

LLVM IR (-O0):
define void @quickSort(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 = sub nsw i32 %6, 1
%8 = call i32 @quick_Sort(i32* %5, i32 0, i32 %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @quick_Sort(i32* %0, i32 0, i32 %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(short, char);
int kmain(void) {
  outb(((short int)(0x3F8 + 0)), 'O');
  outb(((short int)(0x3F8 + 0)), 'K');
  outb(((short int)(0x3F8 + 0)), '\n');
  return 0;
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f8,%edi
mov    $0x4f,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x4b,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
mov    $0x3f8,%edi
mov    $0x4f,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x4b,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @kmain() {
%1 = call i32 @outb(i16 signext 1016, i8 signext 79)
%2 = call i32 @outb(i16 signext 1016, i8 signext 75)
%3 = call i32 @outb(i16 signext 1016, i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @kmain() {
%1 = tail call i32 @outb(i16 signext 1016, i8 signext 79)
%2 = tail call i32 @outb(i16 signext 1016, i8 signext 75)
%3 = tail call i32 @outb(i16 signext 1016, i8 signext 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int syscall(int, int, int /*<<< orphan*/ const *, int);
int signalfd(int fd, const sigset_t *sigs, int flags) {
  return syscall(349, fd, sigs, 8);
}


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

x86 assembly (clang, -O2):
<signalfd>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x15d,%edi
mov    $0x8,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @signalfd(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = call i32 @syscall(i32 349, i32 %7, i32* %8, i32 8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @signalfd(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @syscall(i32 349, i32 %0, i32* %1, i32 8)
ret i32 %4
}
void stellaris_nmi(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<stellaris_nmi>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <stellaris_nmi+0x9>
jmp    1109 <stellaris_nmi+0x9>

x86 assembly (clang, -O2):
<stellaris_nmi>:
jmp    1100 <stellaris_nmi>

LLVM IR (-O0):
define void @stellaris_nmi() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @stellaris_nmi() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ func2();
int dontgenerate1(void) {
  func2();
  return 1;
}


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

x86 assembly (clang, -O2):
<dontgenerate1>:
push   %rax
xor    %eax,%eax
call   1030 <func2@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dontgenerate1() {
%1 = call i32 (...) @func2()
ret i32 1
}

LLVM IR (-O2):
define i32 @dontgenerate1() {
%1 = tail call i32 (...) @func2()
ret i32 1
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettimeofday_as_double() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + (tv.tv_usec / 1000000.0);
}


x86 assembly (clang, -O0):
<gettimeofday_as_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_as_double>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @gettimeofday_as_double() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %4, %7
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @gettimeofday_as_double() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
void wifi_rsp_sme_start_scan(const struct wifi_msg_sme_start_scan_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_start_scan_rsp_t = type opaque
define void @wifi_rsp_sme_start_scan(%struct.wifi_msg_sme_start_scan_rsp_t* nocapture %0) {
ret void
}
void zeros(double *a, int m, int n) {
  int j;
  for (j = 0; j < m * n; ++j)
    a[j] = 0;
}


x86 assembly (clang, -O0):
<zeros>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1145 <zeros+0x45>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <zeros+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeros>:
imul   %edx,%esi
test   %esi,%esi
jle    1129 <zeros+0x19>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @zeros(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %19, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = mul nsw i32 %10, %11
%13 = icmp slt i32 %9, %12
br i1 %13, label %14, label %22
14: ; preds = %8
%15 = load double*, double** %4
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
store double 0.000000e+00, double* %18
br label %19
19: ; preds = %14
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
store i32 %21, i32* %7
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @zeros(double* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = bitcast double* %0 to i8*
%8 = zext i32 %4 to i64
%9 = shl nuw nsw i64 %8, 3
br label %10
10: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app_readInCfg();
int /*<<< orphan*/ lsrp_readInCfg();
int /*<<< orphan*/ sw_readInCfg();
void readcfgs() {
  app_readInCfg();
  sw_readInCfg();
  lsrp_readInCfg();
}


x86 assembly (clang, -O0):
<readcfgs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <app_readInCfg@plt>
mov    $0x0,%al
call   1050 <sw_readInCfg@plt>
mov    $0x0,%al
call   1030 <lsrp_readInCfg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<readcfgs>:
push   %rax
xor    %eax,%eax
call   1040 <app_readInCfg@plt>
xor    %eax,%eax
call   1050 <sw_readInCfg@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <lsrp_readInCfg@plt>

LLVM IR (-O0):
define void @readcfgs() {
%1 = call i32 (...) @app_readInCfg()
%2 = call i32 (...) @sw_readInCfg()
%3 = call i32 (...) @lsrp_readInCfg()
ret void
}

LLVM IR (-O2):
define void @readcfgs() {
%1 = tail call i32 (...) @app_readInCfg()
%2 = tail call i32 (...) @sw_readInCfg()
%3 = tail call i32 (...) @lsrp_readInCfg()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mp_msg(int, int /*<<< orphan*/, char *);
void draw_osd(void) {
  mp_msg(3, 0, "xover error: didn't used sub vo draw_osd!\n");
}


x86 assembly (clang, -O0):
<draw_osd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
xor    %esi,%esi
lea    0xede(%rip),%rdx
call   1030 <mp_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_osd>:
lea    0xee9(%rip),%rdx
mov    $0x3,%edi
xor    %esi,%esi
jmp    1030 <mp_msg@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"xover error: didn't used sub vo draw_osd!\0A\00"
define void @draw_osd() {
%1 = call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"xover error: didn't used sub vo draw_osd!\0A\00"
define void @draw_osd() {
%1 = tail call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *);
void fatal_err(const char *msg) {
  syslog(LOG_ERR, "%s: %m", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <syslog@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_err>:
push   %rax
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <syslog@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %m\00"
@EXIT_FAILURE = global i32 0
define void @fatal_err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %m\00"
@EXIT_FAILURE = global i32 0
define void @fatal_err(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
struct optchain {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct optchain *);
void free_optch(struct optchain *optch) {
  if (optch)
    free(optch);
}


x86 assembly (clang, -O0):
<free_optch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <free_optch+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_optch>:
test   %rdi,%rdi
je     111a <free_optch+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.optchain = type { i32 }
define void @free_optch(%struct.optchain* %0) {
%2 = alloca %struct.optchain*
store %struct.optchain* %0, %struct.optchain** %2
%3 = load %struct.optchain*, %struct.optchain** %2
%4 = icmp ne %struct.optchain* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.optchain*, %struct.optchain** %2
%7 = call i32 @free(%struct.optchain* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.optchain = type { i32 }
define void @free_optch(%struct.optchain* %0) {
%2 = icmp eq %struct.optchain* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.optchain* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ta_free_each(void *key, void *val, void *data) { free(val); }


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

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

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

LLVM IR (-O2):
define void @ta_free_each(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ flushentry();
void *malloc(size_t);
void *Malloc(size_t size) {
  void *retval;
  while ((retval = malloc(size)) == NULL)
    if (flushentry() == 0)
      break;
  return (retval);
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115e <Malloc+0x3e>
mov    $0x0,%al
call   1030 <flushentry@plt>
cmp    $0x0,%rax
jne    1159 <Malloc+0x39>
jmp    115e <Malloc+0x3e>
jmp    112c <Malloc+0xc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <Malloc+0x2c>
xor    %eax,%eax
call   1030 <flushentry@plt>
test   %rax,%rax
jne    1130 <Malloc+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @Malloc(i64 %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 (...) @flushentry()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ kwrite(int, char *, int /*<<< orphan*/);
int main() {
  kwrite(15, "SHELL !!!!\n", 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%edi
lea    0xed5(%rip),%rsi
xor    %edx,%edx
call   1030 <kwrite@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xf,%edi
xor    %edx,%edx
call   1030 <kwrite@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"SHELL !!!!\0A\00"
define i32 @main() {
%1 = tail call i32 @kwrite(i32 15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ drv_FW8888_send_cmd(int);
void __attribute__((unused)) drv_FW8888_backlight_off(void) {
  drv_FW8888_send_cmd(0x38);
}


x86 assembly (clang, -O0):
<drv_FW8888_backlight_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%edi
call   1030 <drv_FW8888_send_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_FW8888_backlight_off>:
mov    $0x38,%edi
jmp    1030 <drv_FW8888_send_cmd@plt>

LLVM IR (-O0):
define void @drv_FW8888_backlight_off() {
%1 = call i32 @drv_FW8888_send_cmd(i32 56)
ret void
}

LLVM IR (-O2):
define void @drv_FW8888_backlight_off() {
%1 = tail call i32 @drv_FW8888_send_cmd(i32 56)
ret void
}
void startCounter(int n, int interr) {
  int *IO = (int *)(0x3c000000 + 5 * 0x00000020);
  int interrupt;
  interrupt = (interr == 0 ? 0x00000000 : 0x80000000);
  *IO = (interrupt | 0x40000000 | (0x3fffffff & n));
}


x86 assembly (clang, -O0):
<startCounter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x3c0000a0,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x80000000,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
or     $0x40000000,%ecx
mov    -0x4(%rbp),%eax
and    $0x3fffffff,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<startCounter>:
test   %esi,%esi
mov    $0x40000000,%eax
mov    $0xc0000000,%ecx
cmove  %eax,%ecx
and    $0x3fffffff,%edi
or     %ecx,%edi
mov    %edi,0x3c0000a0
ret

LLVM IR (-O0):
define void @startCounter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32* inttoptr (i64 1006633120 to i32*), i32** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 -2147483648
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = or i32 %11, 1073741824
%13 = load i32, i32* %3
%14 = and i32 1073741823, %13
%15 = or i32 %12, %14
%16 = load i32*, i32** %5
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @startCounter(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 1073741824, i32 -1073741824
%5 = and i32 %0, 1073741823
%6 = or i32 %4, %5
store i32 %6, i32* inttoptr (i64 1006633120 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
void asfStopWatchDog() {
  char ESC = 27;
  printf("%c %c[?25h\n", '\r', ESC);
}


x86 assembly (clang, -O0):
<asfStopWatchDog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x1b,-0x1(%rbp)
lea    0xedd(%rip),%rdi
mov    $0xd,%esi
movsbl -0x1(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asfStopWatchDog>:
lea    0xee9(%rip),%rdi
mov    $0xd,%esi
mov    $0x1b,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%c %c[?25h\0A\00"
define void @asfStopWatchDog() {
%1 = alloca i8
store i8 27, i8* %1
%2 = load i8, i8* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 13, i8 signext %2)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%c %c[?25h\0A\00"
define void @asfStopWatchDog() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 13, i8 signext 27)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_deque_iterator_add();
int /*<<< orphan*/ test_deque_iterator_next();
int /*<<< orphan*/ test_deque_iterator_remove();
void test_deque_iterator() {
  test_deque_iterator_next();
  test_deque_iterator_add();
  test_deque_iterator_remove();
}


x86 assembly (clang, -O0):
<test_deque_iterator>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_deque_iterator_next@plt>
mov    $0x0,%al
call   1040 <test_deque_iterator_add@plt>
mov    $0x0,%al
call   1050 <test_deque_iterator_remove@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_deque_iterator>:
push   %rax
xor    %eax,%eax
call   1030 <test_deque_iterator_next@plt>
xor    %eax,%eax
call   1040 <test_deque_iterator_add@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_deque_iterator_remove@plt>

LLVM IR (-O0):
define void @test_deque_iterator() {
%1 = call i32 (...) @test_deque_iterator_next()
%2 = call i32 (...) @test_deque_iterator_add()
%3 = call i32 (...) @test_deque_iterator_remove()
ret void
}

LLVM IR (-O2):
define void @test_deque_iterator() {
%1 = tail call i32 (...) @test_deque_iterator_next()
%2 = tail call i32 (...) @test_deque_iterator_add()
%3 = tail call i32 (...) @test_deque_iterator_remove()
ret void
}
/* Variables and functions */
unsigned int getTotalAlternativeCX();
unsigned int getTotalHomozygous();
unsigned int getTotalDinucleotides() {
  return getTotalHomozygous() + getTotalAlternativeCX();
}


x86 assembly (clang, -O0):
<getTotalDinucleotides>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getTotalHomozygous@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getTotalAlternativeCX@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTotalDinucleotides>:
push   %rbx
xor    %eax,%eax
call   1030 <getTotalHomozygous@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getTotalAlternativeCX@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getTotalDinucleotides() {
%1 = call i32 (...) @getTotalHomozygous()
%2 = call i32 (...) @getTotalAlternativeCX()
%3 = add i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @getTotalDinucleotides() {
%1 = tail call i32 (...) @getTotalHomozygous()
%2 = tail call i32 (...) @getTotalAlternativeCX()
%3 = add i32 %2, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fld_preg64_qword(int reg64) {
  put8(0xDD);
  put8(reg64);
}


x86 assembly (clang, -O0):
<fld_preg64_qword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xdd,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fld_preg64_qword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdd,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fld_preg64_qword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 221)
%4 = load i32, i32* %2
%5 = call i32 @put8(i32 %4)
ret void
}

LLVM IR (-O2):
define void @fld_preg64_qword(i32 %0) {
%2 = tail call i32 @put8(i32 221)
%3 = tail call i32 @put8(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int __pformat(int, int /*<<< orphan*/, int /*<<< orphan*/, char const *,
              int /*<<< orphan*/);
int /*<<< orphan*/ _lock_file(int /*<<< orphan*/);
int /*<<< orphan*/ _unlock_file(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int __attribute__((__cdecl__)) __vprintf(const char *fmt, va_list argv) {
  register int retval;
  _lock_file(stdout);
  retval = __pformat(0x2000 | 0x4000, stdout, 0, fmt, argv);
  _unlock_file(stdout);
  return retval;
}


x86 assembly (clang, -O0):
<__vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1050 <_lock_file@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    $0x6000,%edi
xor    %edx,%edx
call   1030 <__pformat@plt>
mov    %eax,-0x10(%rbp)
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1040 <_unlock_file@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vprintf>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2ea0(%rip),%r14
mov    (%r14),%edi
call   1050 <_lock_file@plt>
mov    (%r14),%esi
mov    $0x6000,%edi
xor    %edx,%edx
mov    %rbx,%rcx
mov    %ebp,%r8d
call   1030 <__pformat@plt>
mov    %eax,%ebx
mov    (%r14),%edi
call   1040 <_unlock_file@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @__vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* @stdout
%7 = call i32 @_lock_file(i32 %6)
%8 = load i32, i32* @stdout
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @__pformat(i32 24576, i32 %8, i32 0, i8* %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* @stdout
%13 = call i32 @_unlock_file(i32 %12)
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @__vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @_lock_file(i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @__pformat(i32 24576, i32 %5, i32 0, i8* %0, i32 %1)
%7 = load i32, i32* @stdout
%8 = tail call i32 @_unlock_file(i32 %7)
ret i32 %6
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int usb_raw_io_flags_zero(__u16 flags) { return (flags & 0x0001); }


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

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

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

LLVM IR (-O2):
define i32 @usb_raw_io_flags_zero(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
double time_reverse_convert_second(int sixtieth) { return sixtieth / 3600.0; }


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

x86 assembly (clang, -O2):
<time_reverse_convert_second>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @time_reverse_convert_second(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 3.600000e+03
ret double %5
}

LLVM IR (-O2):
define double @time_reverse_convert_second(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 3.600000e+03
ret double %3
}
void swap(float *scores, int s1, int s2) {
  float temp;
  temp = scores[s1];
  scores[s1] = scores[s2];
  scores[s2] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
movss  (%rdi,%rax,4),%xmm0
movslq %edx,%rcx
movss  (%rdi,%rcx,4),%xmm1
movss  %xmm1,(%rdi,%rax,4)
movss  %xmm0,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @swap(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load float*, float** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
store float %12, float* %7
%13 = load float*, float** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds float, float* %13, i64 %15
%17 = load float, float* %16
%18 = load float*, float** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
store float %17, float* %21
%22 = load float, float* %7
%23 = load float*, float** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds float, float* %23, i64 %25
store float %22, float* %26
ret void
}

LLVM IR (-O2):
define void @swap(float* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds float, float* %0, i64 %4
%6 = load float, float* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds float, float* %0, i64 %7
%9 = load float, float* %8
store float %9, float* %5
store float %6, float* %8
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t car(int32_t p) {
  int32_t *a = (int32_t *)(p - 1);
  return *a;
}


x86 assembly (clang, -O0):
<car>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<car>:
mov    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @car(i64 %0) {
%2 = alloca i64
%3 = alloca i64*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sub nsw i64 %4, 1
%6 = inttoptr i64 %5 to i64*
store i64* %6, i64** %3
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @car(i64 %0) {
%2 = add nsw i64 %0, -1
%3 = inttoptr i64 %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
u_int32_t count_bits(u_int32_t b) {
  b = b - ((b >> 1) & 0x55555555);
  b = ((b >> 2) & 0x33333333) + (b & 0x33333333);
  b = ((b >> 4) + b) & 0x0f0f0f0f;
  b += (b >> 8);
  b += (b >> 16);
  return b & 0x3f;
}


x86 assembly (clang, -O0):
<count_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55555555,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
add    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_bits>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
and    $0x33333333,%eax
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @count_bits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 1
%6 = and i32 %5, 1431655765
%7 = sub nsw i32 %3, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = ashr i32 %8, 2
%10 = and i32 %9, 858993459
%11 = load i32, i32* %2
%12 = and i32 %11, 858993459
%13 = add nsw i32 %10, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = ashr i32 %14, 4
%16 = load i32, i32* %2
%17 = add nsw i32 %15, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 8
%21 = load i32, i32* %2
%22 = add nsw i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = ashr i32 %23, 16
%25 = load i32, i32* %2
%26 = add nsw i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 63
ret i32 %28
}

LLVM IR (-O2):
define i32 @count_bits(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub nsw i32 %0, %3
%5 = lshr i32 %4, 2
%6 = and i32 %5, 858993459
%7 = and i32 %4, 858993459
%8 = add nuw nsw i32 %6, %7
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ timer_func_handler_pntr();
void timer_sig_handler(int arg) { timer_func_handler_pntr(); }


x86 assembly (clang, -O0):
<timer_sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <timer_func_handler_pntr@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @timer_sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @timer_func_handler_pntr()
ret void
}

LLVM IR (-O2):
define void @timer_sig_handler(i32 %0) {
%2 = tail call i32 (...) @timer_func_handler_pntr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DATA_user();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_user();
LIBRARY_user() {
  LibraryHeader("user", "Sat Feb  1 10:41:24 2014 ");
  DATA_user();
  STARTUP_user();
}


x86 assembly (clang, -O0):
<LIBRARY_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1030 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_user@plt>
mov    $0x0,%al
call   1040 <STARTUP_user@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_user>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1030 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_user@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <STARTUP_user@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"user\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:24 2014 \00"
define i32 @LIBRARY_user() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_user()
%4 = call i32 (...) @STARTUP_user()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"user\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:24 2014 \00"
define i32 @LIBRARY_user() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_user()
%3 = tail call i32 (...) @STARTUP_user()
ret i32 undef
}