xunge/DecIR huggingface dataset:
/* Variables and functions */
float filtered_smoothstep(float, float, float, float);
float filtered_smoothpulse(float edge0, float edge1, float edge2, float edge3,
                           float x, float dx) {
  return filtered_smoothstep(edge0, edge1, x, dx) -
         filtered_smoothstep(edge2, edge3, x, dx);
}


x86 assembly (clang, -O0):
<filtered_smoothpulse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
call   1030 <filtered_smoothstep@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
call   1030 <filtered_smoothstep@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filtered_smoothpulse>:
sub    $0x18,%rsp
movss  %xmm5,0x8(%rsp)
movss  %xmm4,0x4(%rsp)
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movaps %xmm4,%xmm2
movaps %xmm5,%xmm3
call   1030 <filtered_smoothstep@plt>
movss  %xmm0,0xc(%rsp)
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
movss  0x8(%rsp),%xmm3
call   1030 <filtered_smoothstep@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @filtered_smoothpulse(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load float, float* %11
%16 = load float, float* %12
%17 = call float @filtered_smoothstep(float %13, float %14, float %15, float %16)
%18 = load float, float* %9
%19 = load float, float* %10
%20 = load float, float* %11
%21 = load float, float* %12
%22 = call float @filtered_smoothstep(float %18, float %19, float %20, float %21)
%23 = fsub float %17, %22
ret float %23
}

LLVM IR (-O2):
define float @filtered_smoothpulse(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @filtered_smoothstep(float %0, float %1, float %4, float %5)
%8 = tail call float @filtered_smoothstep(float %2, float %3, float %4, float %5)
%9 = fsub float %7, %8
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 5, b = 10, tmp;
  printf("Before exchange a = %d, b = %d\n", a, b);
  tmp = b;
  b = a;
  a = tmp;
  printf("Before exchange a = %d, b = %d\n", a, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [32 x i8] c"Before exchange a = %d, b = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 5, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 10, i32 5)
ret i32 0
}
void foo493() {}


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

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

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

LLVM IR (-O2):
define void @foo493() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TaskletC__Tasklet__schedule();
void RadioAlarmP__0__Tasklet__schedule(void) { TaskletC__Tasklet__schedule(); }


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

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

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

LLVM IR (-O2):
define void @RadioAlarmP__0__Tasklet__schedule() {
%1 = tail call i32 (...) @TaskletC__Tasklet__schedule()
ret void
}
int main(void) {
  int var;
  while ((var < 10)) {
    ++var;
    continue;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1123 <main+0x23>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <main+0xb>
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 i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void PutCopyAtom(FILE *f) { fprintf(f, "ITEM: COPYATOMS\n"); }


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

x86 assembly (clang, -O2):
<PutCopyAtom>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"ITEM: COPYATOMS\0A\00"
define void @PutCopyAtom(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 16, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int divide_power2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", divide_power2(19, 3));
  printf("%d\n", divide_power2(-19, 3));
  printf("%d\n", 19 / 8);
  printf("%d\n", -19 / 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x13,%edi
mov    $0x3,%esi
call   1040 <divide_power2@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffed,%edi
mov    $0x3,%esi
call   1040 <divide_power2@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x13,%edi
mov    $0x3,%esi
call   1040 <divide_power2@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xffffffed,%edi
mov    $0x3,%esi
call   1040 <divide_power2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @divide_power2(i32 19, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @divide_power2(i32 -19, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x5e() {
  Assert_real((islower(94) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              475, ("islower should be 0 for ^"));
}


x86 assembly (clang, -O0):
<t_islower_0x5e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5e,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1db,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x5e>:
push   %rax
mov    $0x5e,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1db,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ^\00"
define void @t_islower_0x5e() {
%1 = call i64 @islower(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ^\00"
define void @t_islower_0x5e() {
%1 = tail call i64 @islower(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int ENOSYS;
int getgroups(int gidsetsize, gid_t grouplist[]) { return ENOSYS; }


x86 assembly (clang, -O0):
<getgroups>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgroups>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @getgroups(i32 %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ idt_set_gate(unsigned int, int, int, void *);
void set_system_gate(unsigned int n, void(*addr)) {
  idt_set_gate(n, 15, 3, addr);
}


x86 assembly (clang, -O0):
<set_system_gate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0xf,%esi
mov    $0x3,%edx
call   1030 <idt_set_gate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_system_gate>:
mov    %rsi,%rcx
mov    $0xf,%esi
mov    $0x3,%edx
jmp    1030 <idt_set_gate@plt>

LLVM IR (-O0):
define void @set_system_gate(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @idt_set_gate(i32 %5, i32 15, i32 3, i8* %6)
ret void
}

LLVM IR (-O2):
define void @set_system_gate(i32 %0, i8* %1) {
%3 = tail call i32 @idt_set_gate(i32 %0, i32 15, i32 3, i8* %1)
ret void
}
/* Variables and functions */
int find_first_larger(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int main() {
  int A[16] = {1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6};
  printf("Found index = %d\n", find_first_larger(A, 16, 4));
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rdi
mov    $0x10,%esi
mov    $0x4,%edx
call   1060 <find_first_larger@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x10,%esi
mov    $0x4,%edx
call   1050 <find_first_larger@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.A = [16 x i32] [i32 1, i32 2, i32 3, i32 3, i32 4, i32 4, i32 4, i32 5, i32 5, i32 5, i32 5, i32 6, i32 6, i32 6, i32 6, i32 6]
@.str = [18 x i8] c"Found index = %d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
store i32 0, i32* %1
%3 = bitcast [16 x i32]* %2 to i8*
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%5 = call i32 @find_first_larger(i32* %4, i32 16, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [16 x i32] [i32 1, i32 2, i32 3, i32 3, i32 4, i32 4, i32 4, i32 5, i32 5, i32 5, i32 5, i32 6, i32 6, i32 6, i32 6, i32 6]
@.str = [18 x i8] c"Found index = %d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_first_larger(i32* %3, i32 16, i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_ss(float *);
int /*<<< orphan*/ _mm_mul_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_store_ss(float *, int /*<<< orphan*/);
uint32_t determ_multiply_float(uint32_t a, uint32_t b) {
  uint32_t r;
  _mm_store_ss((float *)&r,
               _mm_mul_ss(_mm_load_ss((float *)&a), _mm_load_ss((float *)&b)));
  return r;
}


x86 assembly (clang, -O0):
<determ_multiply_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <_mm_load_ss@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1030 <_mm_mul_ss@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <_mm_store_ss@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determ_multiply_float>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <_mm_mul_ss@plt>
lea    0x4(%rsp),%rdi
mov    %eax,%esi
call   1040 <_mm_store_ss@plt>
mov    0x4(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @determ_multiply_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast i32* %5 to float*
%7 = bitcast i32* %3 to float*
%8 = call i32 @_mm_load_ss(float* %7)
%9 = bitcast i32* %4 to float*
%10 = call i32 @_mm_load_ss(float* %9)
%11 = call i32 @_mm_mul_ss(i32 %8, i32 %10)
%12 = call i32 @_mm_store_ss(float* %6, i32 %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @determ_multiply_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast i32* %5 to i8*
%7 = bitcast i32* %5 to float*
%8 = bitcast i32* %3 to float*
%9 = call i32 @_mm_load_ss(float* %8)
%10 = bitcast i32* %4 to float*
%11 = call i32 @_mm_load_ss(float* %10)
%12 = call i32 @_mm_mul_ss(i32 %9, i32 %11)
%13 = call i32 @_mm_store_ss(float* %7, i32 %12)
%14 = load i32, i32* %5
ret i32 %14
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ pshell_loop();
int main(int argc, char **argv) {
  pshell_loop();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <pshell_loop@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pshell_loop@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @pshell_loop()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pshell_loop()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
double absd(double a) { return a > -a ? a : -a; }


x86 assembly (clang, -O0):
<absd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1143 <absd+0x43>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1164 <absd+0x64>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absd>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @absd(double %0) {
%2 = fneg double %0
%3 = fcmp olt double %2, %0
%4 = select i1 %3, double %0, double %2
ret double %4
}
int mock_cache_set(struct da_cloud_cache_cfg *cfg, const char *key,
                   const char *value) {
  (void)cfg;
  (void)key;
  (void)value;
  return (0);
}


x86 assembly (clang, -O0):
<mock_cache_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.da_cloud_cache_cfg = type opaque
define i32 @mock_cache_set(%struct.da_cloud_cache_cfg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.da_cloud_cache_cfg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.da_cloud_cache_cfg* %0, %struct.da_cloud_cache_cfg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.da_cloud_cache_cfg*, %struct.da_cloud_cache_cfg** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.da_cloud_cache_cfg = type opaque
define i32 @mock_cache_set(%struct.da_cloud_cache_cfg* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mrs_msr_test1();
int /*<<< orphan*/ mrs_msr_test2();
int /*<<< orphan*/ nop_test();
int /*<<< orphan*/ sev_test();
void misc_instruction_test(void) {
  mrs_msr_test1();
  mrs_msr_test2();
  nop_test();
  sev_test();
}


x86 assembly (clang, -O0):
<misc_instruction_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mrs_msr_test1@plt>
mov    $0x0,%al
call   1050 <mrs_msr_test2@plt>
mov    $0x0,%al
call   1060 <nop_test@plt>
mov    $0x0,%al
call   1040 <sev_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<misc_instruction_test>:
push   %rax
xor    %eax,%eax
call   1030 <mrs_msr_test1@plt>
xor    %eax,%eax
call   1050 <mrs_msr_test2@plt>
xor    %eax,%eax
call   1060 <nop_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <sev_test@plt>

LLVM IR (-O0):
define void @misc_instruction_test() {
%1 = call i32 (...) @mrs_msr_test1()
%2 = call i32 (...) @mrs_msr_test2()
%3 = call i32 (...) @nop_test()
%4 = call i32 (...) @sev_test()
ret void
}

LLVM IR (-O2):
define void @misc_instruction_test() {
%1 = tail call i32 (...) @mrs_msr_test1()
%2 = tail call i32 (...) @mrs_msr_test2()
%3 = tail call i32 (...) @nop_test()
%4 = tail call i32 (...) @sev_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void Usleep(int usec) { usleep(usec); }


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

x86 assembly (clang, -O2):
<Usleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @Usleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
/* Variables and functions */
int bs_conv_8_14be(unsigned char *, int, unsigned char *);
int bs_conv_swab16(unsigned char const *, int, unsigned char *);
int bs_conv_16le_14be(const unsigned char *in_buf, int size,
                      unsigned char *out_buf) {
  size = bs_conv_swab16(in_buf, size, out_buf);
  size = bs_conv_8_14be(out_buf, size, out_buf);
  return size;
}


x86 assembly (clang, -O0):
<bs_conv_16le_14be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <bs_conv_swab16@plt>
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <bs_conv_8_14be@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_conv_16le_14be>:
push   %rbx
mov    %rdx,%rbx
call   1030 <bs_conv_swab16@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <bs_conv_8_14be@plt>

LLVM IR (-O0):
define i32 @bs_conv_16le_14be(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @bs_conv_swab16(i8* %7, i32 %8, i8* %9)
store i32 %10, i32* %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = call i32 @bs_conv_8_14be(i8* %11, i32 %12, i8* %13)
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @bs_conv_16le_14be(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @bs_conv_swab16(i8* %0, i32 %1, i8* %2)
%5 = tail call i32 @bs_conv_8_14be(i8* %2, i32 %4, i8* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetState() {
  printf("XSetState called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"XSetState called\00"
define i32 @XSetState() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
long long sssz() { return 0xffffffffffff0000LL; }


x86 assembly (clang, -O0):
<sssz>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffff0000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sssz>:
mov    $0xffffffffffff0000,%rax
ret

LLVM IR (-O0):
define i64 @sssz() {
ret i64 -65536
}

LLVM IR (-O2):
define i64 @sssz() {
ret i64 -65536
}
/* Type definitions */
typedef int /*<<< orphan*/ src;

/* Variables and functions */
int /*<<< orphan*/ isPrime(unsigned int);
unsigned int bdd_prime_gte(unsigned int src) {
  if ((!((src)&0x1)))
    ++src;
  while (!isPrime(src))
    src += 2;
  return src;
}


x86 assembly (clang, -O0):
<bdd_prime_gte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1133 <bdd_prime_gte+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <bdd_prime_gte+0x28>
mov    -0x4(%rbp),%edi
call   1030 <isPrime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1155 <bdd_prime_gte+0x45>
jmp    1163 <bdd_prime_gte+0x53>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <bdd_prime_gte+0x28>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdd_prime_gte>:
push   %rbx
mov    %edi,%ebx
not    %ebx
and    $0x1,%ebx
add    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <isPrime@plt>
add    $0x2,%ebx
test   %eax,%eax
je     1120 <bdd_prime_gte+0x10>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @bdd_prime_gte(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
%4 = add i32 %3, %0
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ %4, %1 ], [ %9, %5 ]
%7 = tail call i32 @isPrime(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = add i32 %6, 2
br i1 %8, label %5, label %10
10: ; preds = %5
ret i32 %6
}
void serializePartial(char *buf, int len) { return; }


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

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

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

LLVM IR (-O2):
define void @serializePartial(i8* nocapture %0, i32 %1) {
ret void
}
unsigned long djb2_hash(char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <djb2_hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <djb2_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <djb2_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2_hash+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i64 @djb2_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32
store i8* %0, i8** %2
store i64 5381, i64* %3
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %5
%12 = load i64, i64* %3
%13 = shl i64 %12, 5
%14 = load i64, i64* %3
%15 = add i64 %13, %14
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = add i64 %15, %17
store i64 %18, i64* %3
br label %5
19: ; preds = %5
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @djb2_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
int epidx_dir(int idx) { return idx & 1; }


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

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

LLVM IR (-O0):
define i32 @epidx_dir(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 @epidx_dir(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SOCK_DGRAM;
int do_open_server_socket(int, int /*<<< orphan*/);
int open_udp_server_socket(int port) {
  return (do_open_server_socket(port, SOCK_DGRAM));
}


x86 assembly (clang, -O0):
<open_udp_server_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <do_open_server_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_udp_server_socket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <do_open_server_socket@plt>

LLVM IR (-O0):
@SOCK_DGRAM = global i32 0
define i32 @open_udp_server_socket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SOCK_DGRAM
%5 = call i32 @do_open_server_socket(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SOCK_DGRAM = global i32 0
define i32 @open_udp_server_socket(i32 %0) {
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @do_open_server_socket(i32 %0, i32 %2)
ret i32 %3
}
float fmodf(float x, float y) { asm volatile("int $13"); }


x86 assembly (clang, -O0):
<fmodf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
int    $0xd
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodf>:
int    $0xd
ret

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

LLVM IR (-O2):
define float @fmodf(float %0, float %1) {
tail call void asm sideeffect "int $$13", "~{dirflag},~{fpsr},~{flags}"()
ret float undef
}
/* Variables and functions */
int ENDSWAP_32(int);
void bei2s_array(int *src, int count, short *dest) {
  int value;
  while (--count >= 0) {
    value = ENDSWAP_32(src[count]);
    dest[count] = value >> 16;
  };
}


x86 assembly (clang, -O0):
<bei2s_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     1162 <bei2s_array+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <ENDSWAP_32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
sar    $0x10,%eax
mov    %ax,%dx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
jmp    1123 <bei2s_array+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bei2s_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    114f <bei2s_array+0x3f>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%ebx
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%r12d
mov    (%r15,%r12,4),%edi
call   1030 <ENDSWAP_32@plt>
shr    $0x10,%eax
mov    %ax,(%r14,%r12,2)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <bei2s_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @bei2s_array(i32* nocapture %0, i32 %1, i16* nocapture writeonly %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = and i64 %9, 4294967295
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @ENDSWAP_32(i32 %12)
%14 = lshr i32 %13, 16
%15 = trunc i32 %14 to i16
%16 = getelementptr inbounds i16, i16* %2, i64 %10
store i16 %15, i16* %16
%17 = icmp ugt i64 %8, 1
br i1 %17, label %7, label %18
18: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int major(int /*<<< orphan*/);
int minor(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
void disk_print_devt(dev_t d) { printf("%02x:%02x", major(d), minor(d)); }


x86 assembly (clang, -O0):
<disk_print_devt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <major@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <minor@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_print_devt>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1050 <major@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <minor@plt>
lea    0xeb6(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%02x:%02x\00"
define void @disk_print_devt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @major(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @minor(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%02x:%02x\00"
define void @disk_print_devt(i32 %0) {
%2 = tail call i32 @major(i32 %0)
%3 = tail call i32 @minor(i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret void
}
OP(op, d7) { RST(0x10); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x10,%edi
mov    $0x0,%al
call   1030 <RST@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
mov    $0x10,%edi
xor    %eax,%eax
jmp    1030 <RST@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (i32, ...) bitcast (i32 (...)* @RST to i32 (i32, ...)*)(i32 16)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @RST to i32 (i32, ...)*)(i32 16)
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntRegister(scalar_t__, void (*)());
void stub1(scalar_t__);
void uDMAIntRegister(uint32_t ui32Base, uint32_t ui32IntChannel,
                     void (*pfnHandler)(void)) {
  ;
  ;
  ;
  NOROM_IntRegister(ui32IntChannel, pfnHandler);
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[4])(ui32IntChannel);
}


x86 assembly (clang, -O0):
<uDMAIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <NOROM_IntRegister@plt>
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    0x20(%rax),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAIntRegister>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <NOROM_IntRegister@plt>
mov    0x100001e0,%rax
10
mov    %rbx,%rdi
pop    %rbx
jmp    *0x20(%rax)

LLVM IR (-O0):
define void @uDMAIntRegister(i64 %0, i64 %1, void ()* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca void ()*
store i64 %0, i64* %4
store i64 %1, i64* %5
store void ()* %2, void ()** %6
%7 = load i64, i64* %5
%8 = load void ()*, void ()** %6
%9 = bitcast void ()* %8 to void (...)*
%10 = call i32 @NOROM_IntRegister(i64 %7, void (...)* %9)
%11 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%12 = inttoptr i64 %11 to i64*
%13 = getelementptr inbounds i64, i64* %12, i64 4
%14 = load i64, i64* %13
%15 = inttoptr i64 %14 to void (i64)*
%16 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @uDMAIntRegister(i64 %0, i64 %1, void ()* %2) {
%4 = bitcast void ()* %2 to void (...)*
%5 = tail call i32 @NOROM_IntRegister(i64 %1, void (...)* %4)
%6 = load i64, i64* inttoptr (i64 268435936 to i64*)
%7 = inttoptr i64 %6 to i64*
%8 = getelementptr inbounds i64, i64* %7, i64 4
%9 = load i64, i64* %8
%10 = inttoptr i64 %9 to void (i64)*
tail call void %10(i64 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct itimerval {
  TYPE_1__ it_value;
  TYPE_1__ it_interval;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int /*<<< orphan*/ xsetitimer(int /*<<< orphan*/, struct itimerval *,
                              int /*<<< orphan*/);
void timer_stop(void) {
  struct itimerval it;
  it.it_value.tv_sec = 0;
  it.it_value.tv_usec = 0;
  it.it_interval = it.it_value;
  xsetitimer(ITIMER_REAL, &it, 0);
}


x86 assembly (clang, -O0):
<timer_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <xsetitimer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_stop>:
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <xsetitimer@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@ITIMER_REAL = global i32 0
define void @timer_stop() {
%1 = alloca %struct.itimerval
%2 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i32 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%7 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%8 = bitcast %struct.TYPE_2__* %6 to i8*
%9 = bitcast %struct.TYPE_2__* %7 to i8*
%10 = load i32, i32* @ITIMER_REAL
%11 = call i32 @xsetitimer(i32 %10, %struct.itimerval* %1, i32 0)
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@ITIMER_REAL = global i32 0
define void @timer_stop() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = bitcast %struct.itimerval* %1 to i8*
%4 = load i32, i32* @ITIMER_REAL
%5 = call i32 @xsetitimer(i32 %4, %struct.itimerval* %1, i32 0)
ret void
}
int dwt_getgain_real(int orient) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dwt_getgain_real(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double, int);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr,
          "\n"
          "Usage: bntools map [options] <ref> <query>\n"
          "\n"
          "Options:\n"
          "   <ref>        reference genome, in tsv/cmap format\n"
          "   <query>      query molecules/contigs, in tsv/cmap/bnx format\n"
          "   -e <FLOAT>   tolerance to compare fragment size [%f]\n"
          "   -m <INT>     minimal matched labels in query fragment [%d]\n"
          "   -v           show verbose message\n"
          "   -h           show this help\n"
          "\n",
          0.1, 4);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xee4(%rip),%rsi
movsd  0xed4(%rip),%xmm0
mov    $0x4,%edx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
movsd  0xed8(%rip),%xmm0
mov    $0x4,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [359 x i8] c"\0AUsage: bntools map [options] <ref> <query>\0A\0AOptions:\0A <ref> reference genome, in tsv/cmap format\0A <query> query molecules/contigs, in tsv/cmap/bnx format\0A -e <FLOAT> tolerance to compare fragment size [%f]\0A -m <INT> minimal matched labels in query fragment [%d]\0A -v show verbose message\0A -h show this help\0A\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0), double 1.000000e-01, i32 4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [359 x i8] c"\0AUsage: bntools map [options] <ref> <query>\0A\0AOptions:\0A <ref> reference genome, in tsv/cmap format\0A <query> query molecules/contigs, in tsv/cmap/bnx format\0A -e <FLOAT> tolerance to compare fragment size [%f]\0A -m <INT> minimal matched labels in query fragment [%d]\0A -v show verbose message\0A -h show this help\0A\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0), double 1.000000e-01, i32 4)
ret void
}
int round_double(double arg) {
  if (arg < 0.0)
    return (int)(arg - 0.5);
  else
    return (int)(arg + 0.5);
}


x86 assembly (clang, -O0):
<round_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1134 <round_double+0x34>
movsd  -0x10(%rbp),%xmm0
movsd  0xedc(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <round_double+0x48>
movsd  0xec4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_double>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @round_double(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}