xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *long2str(char *, int);
int s_count(char *, char *);
char *machowmany(char *arg) {
  int i;
  char arg1[10240];
  get_string(arg1);
  get_string(arg);
  i = s_count(arg, arg1);
  return (long2str(arg, i));
}


x86 assembly (clang, -O0):
<machowmany>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x2810(%rbp),%rdi
call   1040 <get_string@plt>
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    -0x8(%rbp),%rdi
lea    -0x2810(%rbp),%rsi
call   1030 <s_count@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <long2str@plt>
add    $0x2810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machowmany>:
push   %r14
push   %rbx
sub    $0x2808,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <get_string@plt>
mov    %rbx,%rdi
call   1040 <get_string@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <s_count@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <long2str@plt>
add    $0x2808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @machowmany(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [10240 x i8]
store i8* %0, i8** %2
%5 = getelementptr inbounds [10240 x i8], [10240 x i8]* %4, i64 0, i64 0
%6 = call i32 @get_string(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @get_string(i8* %7)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [10240 x i8], [10240 x i8]* %4, i64 0, i64 0
%11 = call i32 @s_count(i8* %9, i8* %10)
store i32 %11, i32* %3
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = call i8* @long2str(i8* %12, i32 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @machowmany(i8* %0) {
%2 = alloca [10240 x i8]
%3 = getelementptr inbounds [10240 x i8], [10240 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_string(i8* %3)
%5 = call i32 @get_string(i8* %0)
%6 = call i32 @s_count(i8* %0, i8* %3)
%7 = call i8* @long2str(i8* %0, i32 %6)
ret i8* %7
}
void spaces(n) int n;
{
  while (n--)
    putchar(' ');
}


x86 assembly (clang, -O0):
<spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1140 <spaces+0x30>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    111b <spaces+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaces>:
push   %rbx
test   %edi,%edi
je     1131 <spaces+0x21>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <spaces+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @spaces(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 32)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @spaces(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 32)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct serializer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ s_wl32(struct serializer *, int /*<<< orphan*/);
void s_wlf(struct serializer *s, float f) {
  s_wl32(s, *(uint32_t *)&f);
  return;
}


x86 assembly (clang, -O0):
<s_wlf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <s_wl32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_wlf>:
movd   %xmm0,%esi
jmp    1030 <s_wl32@plt>

LLVM IR (-O0):
%struct.serializer = type { i32 }
define void @s_wlf(%struct.serializer* %0, float %1) {
%3 = alloca %struct.serializer*
%4 = alloca float
store %struct.serializer* %0, %struct.serializer** %3
store float %1, float* %4
%5 = load %struct.serializer*, %struct.serializer** %3
%6 = bitcast float* %4 to i32*
%7 = load i32, i32* %6
%8 = call i32 @s_wl32(%struct.serializer* %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.serializer = type { i32 }
define void @s_wlf(%struct.serializer* %0, float %1) {
%3 = bitcast float %1 to i32
%4 = tail call i32 @s_wl32(%struct.serializer* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_case_assert_fail();
int /*<<< orphan*/ test_case_assert_pass();
void __assert_double_equal(const char *spec, double expected, double actual,
                           int line, const char *file) {
  int pass = expected == actual;
  if (pass) {
    test_case_assert_pass();
  } else {
    test_case_assert_fail();
  };
}


x86 assembly (clang, -O0):
<__assert_double_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     116d <__assert_double_equal+0x4d>
mov    $0x0,%al
call   1030 <test_case_assert_pass@plt>
jmp    1174 <__assert_double_equal+0x54>
mov    $0x0,%al
call   1040 <test_case_assert_fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__assert_double_equal>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
jne    112f <__assert_double_equal+0xf>
jp     112f <__assert_double_equal+0xf>
jmp    1030 <test_case_assert_pass@plt>
jmp    1040 <test_case_assert_fail@plt>

LLVM IR (-O0):
define void @__assert_double_equal(i8* %0, double %1, double %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca double
%8 = alloca double
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
store i8* %0, i8** %6
store double %1, double* %7
store double %2, double* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%12 = load double, double* %7
%13 = load double, double* %8
%14 = fcmp oeq double %12, %13
%15 = zext i1 %14 to i32
store i32 %15, i32* %11
%16 = load i32, i32* %11
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %5
%19 = call i32 (...) @test_case_assert_pass()
br label %22
20: ; preds = %5
%21 = call i32 (...) @test_case_assert_fail()
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
define void @__assert_double_equal(i8* nocapture readnone %0, double %1, double %2, i32 %3, i8* nocapture readnone %4) {
%6 = fcmp oeq double %1, %2
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 (...) @test_case_assert_pass()
br label %11
9: ; preds = %5
%10 = tail call i32 (...) @test_case_assert_fail()
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int main() {
  long unsigned i = 2;
  long unsigned k = 1;
  int b = 1;
  long unsigned p = 0;
  do {
    p = i + k;
    i = k;
    k = p;
    b = b + 1;
    printf("%lu,", p);
  } while (b <= 100);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x64,-0x1c(%rbp)
jle    113e <main+0x2e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r15d
mov    $0x2,%eax
mov    $0x64,%ebp
lea    0xed2(%rip),%r14
xchg   %ax,%ax
mov    %rax,%rbx
add    %r15,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rax
mov    %rbx,%r15
add    $0xffffffff,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lu,\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 2, %0 ], [ %3, %1 ]
%3 = phi i64 [ 1, %0 ], [ %5, %1 ]
%4 = phi i32 [ 1, %0 ], [ %6, %1 ]
%5 = add i64 %3, %2
%6 = add nuw nsw i32 %4, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %5)
%8 = icmp eq i32 %6, 101
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addComment(char *);
int /*<<< orphan*/ releaseInstructorLock();
int takeInstructorLock();
void lockAndComment(char *str) {
  int sts;
  sts = takeInstructorLock();
  if (!sts) {
    addComment(str);
    releaseInstructorLock();
  }
}


x86 assembly (clang, -O0):
<lockAndComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <takeInstructorLock@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1160 <lockAndComment+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <addComment@plt>
mov    $0x0,%al
call   1040 <releaseInstructorLock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lockAndComment>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <takeInstructorLock@plt>
test   %eax,%eax
je     1141 <lockAndComment+0x11>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <addComment@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <releaseInstructorLock@plt>

LLVM IR (-O0):
define void @lockAndComment(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @takeInstructorLock()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @addComment(i8* %8)
%10 = call i32 (...) @releaseInstructorLock()
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @lockAndComment(i8* %0) {
%2 = tail call i32 (...) @takeInstructorLock()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @addComment(i8* %0)
%6 = tail call i32 (...) @releaseInstructorLock()
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
scalar_t__ floatMalloc(int);
scalar_t__ intMalloc(int);
void sallocateA(int n, int nnz, float **a, int **asub, int **xa) {
  *a = (float *)floatMalloc(nnz);
  *asub = (int *)intMalloc(nnz);
  *xa = (int *)intMalloc(n + 1);
}


x86 assembly (clang, -O0):
<sallocateA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <floatMalloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%edi
call   1030 <intMalloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <intMalloc@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sallocateA>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%ebp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <floatMalloc@plt>
mov    %rax,(%r12)
mov    %ebp,%edi
call   1030 <intMalloc@plt>
mov    %rax,(%r15)
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <intMalloc@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @sallocateA(i32 %0, i32 %1, float** %2, i32** %3, i32** %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca float**
%9 = alloca i32**
%10 = alloca i32**
store i32 %0, i32* %6
store i32 %1, i32* %7
store float** %2, float*** %8
store i32** %3, i32*** %9
store i32** %4, i32*** %10
%11 = load i32, i32* %7
%12 = call i64 @floatMalloc(i32 %11)
%13 = inttoptr i64 %12 to float*
%14 = load float**, float*** %8
store float* %13, float** %14
%15 = load i32, i32* %7
%16 = call i64 @intMalloc(i32 %15)
%17 = inttoptr i64 %16 to i32*
%18 = load i32**, i32*** %9
store i32* %17, i32** %18
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
%21 = call i64 @intMalloc(i32 %20)
%22 = inttoptr i64 %21 to i32*
%23 = load i32**, i32*** %10
store i32* %22, i32** %23
ret void
}

LLVM IR (-O2):
define void @sallocateA(i32 %0, i32 %1, float** nocapture writeonly %2, i32** nocapture writeonly %3, i32** nocapture writeonly %4) {
%6 = tail call i64 @floatMalloc(i32 %1)
%7 = inttoptr i64 %6 to float*
store float* %7, float** %2
%8 = tail call i64 @intMalloc(i32 %1)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = add nsw i32 %0, 1
%11 = tail call i64 @intMalloc(i32 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGCLD;
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void ClearChild(int nSignal) {
  pid_t _pid_t;
  int nState;
  while ((_pid_t = waitpid(-1, &nState, WNOHANG)) > 0)
    ;
  signal(SIGCLD, ClearChild);
}


x86 assembly (clang, -O0):
<ClearChild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1153 <ClearChild+0x33>
jmp    112b <ClearChild+0xb>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    0x2e6d(%rip),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearChild>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1130 <ClearChild+0x10>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e7c(%rip),%rsi
call   1030 <signal@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@WNOHANG = global i32 0
@SIGCLD = global i32 0
define void @ClearChild(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
%9 = load i32, i32* @SIGCLD
%10 = call i32 @signal(i32 %9, void (i32)* @ClearChild)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void Die(char *msg) {
  endwin();
  puts(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<Die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <endwin@plt>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Die>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <endwin@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @Die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @endwin()
%4 = load i8*, i8** %2
%5 = call i32 @puts(i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Die(i8* nocapture %0) {
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ run_add_lace_tool_pipem_callback(int, int);
void run_add(int in_fd, int out_fd, void *voidarg) {
  (void)voidarg;
  run_add_lace_tool_pipem_callback(in_fd, out_fd);
}


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

x86 assembly (clang, -O2):
<run_add>:
jmp    1030 <run_add_lace_tool_pipem_callback@plt>

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

LLVM IR (-O2):
define void @run_add(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @run_add_lace_tool_pipem_callback(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
double gsw_gibbs(int, int, int, double, double, double);
double gsw_specvol_t_exact(double sa, double t, double p) {
  int n0, n1;
  n0 = 0;
  n1 = 1;
  return (gsw_gibbs(n0, n0, n1, sa, t, p));
}


x86 assembly (clang, -O0):
<gsw_specvol_t_exact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_gibbs@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @gsw_specvol_t_exact(double %0, double %1, double %2) {
%4 = tail call double @gsw_gibbs(i32 0, i32 0, i32 1, double %0, double %1, double %2)
ret double %4
}
void RTLockValidatorRecExclRecursionMixed(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclRecursionMixed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_linux_file_name(char *);
int /*<<< orphan*/ tcp_scalable_register();
void module_register(void) {
  tcp_scalable_register();
  set_linux_file_name("tcp_scalable.c");
}


x86 assembly (clang, -O0):
<module_register>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tcp_scalable_register@plt>
lea    0xece(%rip),%rdi
call   1040 <set_linux_file_name@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_register>:
push   %rax
xor    %eax,%eax
call   1030 <tcp_scalable_register@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <set_linux_file_name@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"tcp_scalable.c\00"
define void @module_register() {
%1 = call i32 (...) @tcp_scalable_register()
%2 = call i32 @set_linux_file_name(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"tcp_scalable.c\00"
define void @module_register() {
%1 = tail call i32 (...) @tcp_scalable_register()
%2 = tail call i32 @set_linux_file_name(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t raw_power(uint8_t *pkt) {
  uint32_t i;
  i = (uint32_t)pkt[3] | (uint32_t)pkt[4] << 8 | (uint32_t)pkt[5] << 16;
  if (i & 0x00800000)
    i |= 0xff000000;
  return (int32_t)i;
}


x86 assembly (clang, -O0):
<raw_power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x800000,%eax
cmp    $0x0,%eax
je     1149 <raw_power+0x49>
mov    -0xc(%rbp),%eax
or     $0xff000000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_power>:
mov    0x20(%rdi),%eax
mov    0x28(%rdi),%ecx
shl    $0x8,%eax
or     0x18(%rdi),%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    %ecx,%eax
or     $0xff000000,%eax
test   $0x800000,%ecx
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @raw_power(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 3
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 4
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 5
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 16
%19 = or i32 %13, %18
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = and i32 %20, 8388608
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %1
%24 = load i32, i32* %3
%25 = or i32 %24, -16777216
store i32 %25, i32* %3
br label %26
26: ; preds = %23, %1
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @raw_power(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i64, i64* %0, i64 4
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 5
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = and i32 %14, 8388608
%16 = icmp eq i32 %15, 0
%17 = or i32 %14, -16777216
%18 = select i1 %16, i32 %14, i32 %17
ret i32 %18
}
void foo344(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo344(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BasicIOInit();
int /*<<< orphan*/ HeapInit(int);
int /*<<< orphan*/ IncludeInit();
int /*<<< orphan*/ LexInit();
int /*<<< orphan*/ LibraryInit();
int /*<<< orphan*/ PlatformLibraryInit();
int /*<<< orphan*/ TableInit();
int /*<<< orphan*/ TypeInit();
int /*<<< orphan*/ VariableInit();
void PicocInitialise(int StackSize) {
  extern void Initjl777vars();
  BasicIOInit();
  HeapInit(StackSize);
  TableInit();
  VariableInit();
  LexInit();
  TypeInit();
  IncludeInit();
  LibraryInit();
  PlatformLibraryInit();
  Initjl777vars();
}


x86 assembly (clang, -O0):
<PicocInitialise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1090 <BasicIOInit@plt>
mov    -0x4(%rbp),%edi
call   10a0 <HeapInit@plt>
mov    $0x0,%al
call   1080 <TableInit@plt>
mov    $0x0,%al
call   1050 <VariableInit@plt>
mov    $0x0,%al
call   10c0 <LexInit@plt>
mov    $0x0,%al
call   10b0 <TypeInit@plt>
mov    $0x0,%al
call   1070 <IncludeInit@plt>
mov    $0x0,%al
call   1040 <LibraryInit@plt>
mov    $0x0,%al
call   1030 <PlatformLibraryInit@plt>
mov    $0x0,%al
call   1060 <Initjl777vars@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PicocInitialise>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1090 <BasicIOInit@plt>
mov    %ebx,%edi
call   10a0 <HeapInit@plt>
xor    %eax,%eax
call   1080 <TableInit@plt>
xor    %eax,%eax
call   1050 <VariableInit@plt>
xor    %eax,%eax
call   10c0 <LexInit@plt>
xor    %eax,%eax
call   10b0 <TypeInit@plt>
xor    %eax,%eax
call   1070 <IncludeInit@plt>
xor    %eax,%eax
call   1040 <LibraryInit@plt>
xor    %eax,%eax
call   1030 <PlatformLibraryInit@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <Initjl777vars@plt>

LLVM IR (-O0):
define void @PicocInitialise(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @BasicIOInit()
%4 = load i32, i32* %2
%5 = call i32 @HeapInit(i32 %4)
%6 = call i32 (...) @TableInit()
%7 = call i32 (...) @VariableInit()
%8 = call i32 (...) @LexInit()
%9 = call i32 (...) @TypeInit()
%10 = call i32 (...) @IncludeInit()
%11 = call i32 (...) @LibraryInit()
%12 = call i32 (...) @PlatformLibraryInit()
ret void
}

LLVM IR (-O2):
define void @PicocInitialise(i32 %0) {
%2 = tail call i32 (...) @BasicIOInit()
%3 = tail call i32 @HeapInit(i32 %0)
%4 = tail call i32 (...) @TableInit()
%5 = tail call i32 (...) @VariableInit()
%6 = tail call i32 (...) @LexInit()
%7 = tail call i32 (...) @TypeInit()
%8 = tail call i32 (...) @IncludeInit()
%9 = tail call i32 (...) @LibraryInit()
%10 = tail call i32 (...) @PlatformLibraryInit()
tail call void (...) @Initjl777vars()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MAX(int, int);
int MIN(int /*<<< orphan*/, int);
scalar_t__ sscanf(char const *, char *, int *);
int Str2Digit(const char *sz, int nMin, int nMax) {
  int nRet;
  if (sscanf(sz, "%d", &nRet) > 0) {
    return MIN(MAX(nRet, nMin), nMax);
  } else {
    return nMin;
  }
}


x86 assembly (clang, -O0):
<Str2Digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb3(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <sscanf@plt>
cmp    $0x0,%rax
jle    117d <Str2Digit+0x4d>
mov    -0x1c(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <MAX@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%esi
call   1030 <MIN@plt>
mov    %eax,-0x4(%rbp)
jmp    1183 <Str2Digit+0x53>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Str2Digit>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %esi,%ebx
lea    0xec2(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1050 <sscanf@plt>
test   %rax,%rax
jle    1163 <Str2Digit+0x33>
mov    0x4(%rsp),%edi
mov    %ebx,%esi
call   1040 <MAX@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1030 <MIN@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @Str2Digit(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = call i64 @sscanf(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load i32, i32* %8
%14 = load i32, i32* %6
%15 = call i32 @MAX(i32 %13, i32 %14)
%16 = load i32, i32* %7
%17 = call i32 @MIN(i32 %15, i32 %16)
store i32 %17, i32* %4
br label %20
18: ; preds = %3
%19 = load i32, i32* %6
store i32 %19, i32* %4
br label %20
20: ; preds = %18, %12
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @Str2Digit(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i64 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load i32, i32* %4
%10 = call i32 @MAX(i32 %9, i32 %1)
%11 = call i32 @MIN(i32 %10, i32 %2)
br label %12
12: ; preds = %3, %8
%13 = phi i32 [ %11, %8 ], [ %1, %3 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ isalnum(char);
char filter_char(char c) {
  if (isalnum(c) || c == '_' || c == '-') {
    return c;
  } else {
    return ' ';
  }
}


x86 assembly (clang, -O0):
<filter_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    114b <filter_char+0x3b>
movsbl -0x2(%rbp),%eax
cmp    $0x5f,%eax
je     114b <filter_char+0x3b>
movsbl -0x2(%rbp),%eax
cmp    $0x2d,%eax
jne    1156 <filter_char+0x46>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    115a <filter_char+0x4a>
movb   $0x20,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
cmp    $0x2d,%bl
mov    $0x2d,%ecx
mov    $0x20,%edx
cmove  %ecx,%edx
cmp    $0x5f,%bl
mov    $0x5f,%ecx
cmovne %edx,%ecx
test   %rax,%rax
cmovne %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @filter_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalnum(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 95
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %15, label %17
15: ; preds = %11, %7, %1
%16 = load i8, i8* %3
store i8 %16, i8* %2
br label %18
17: ; preds = %11
store i8 32, i8* %2
br label %18
18: ; preds = %17, %15
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @filter_char(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
%5 = icmp eq i8 %0, 45
%6 = select i1 %5, i8 45, i8 32
%7 = icmp eq i8 %0, 95
%8 = select i1 %7, i8 95, i8 %6
%9 = select i1 %4, i8 %8, i8 %0
ret i8 %9
}
/* Variables and functions */
int bar();
int baz();
int /*<<< orphan*/ printf(char *, int, int);
int foo(void) {
  int v1 = bar();
  int v2 = baz();
  printf("bar=%d, baz=%d\n", v1, v2);
  return v1 != 666 || v2 != 42;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <bar@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <baz@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%al
cmpl   $0x29a,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    117a <foo+0x4a>
cmpl   $0x2a,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <baz@plt>
mov    %eax,%ebp
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <printf@plt>
xor    $0x29a,%ebx
xor    $0x2a,%ebp
xor    %eax,%eax
or     %ebx,%ebp
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"bar=%d, baz=%d\0A\00"
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @bar()
store i32 %3, i32* %1
%4 = call i32 (...) @baz()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %1
%9 = icmp ne i32 %8, 666
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 42
br label %13
13: ; preds = %10, %0
%14 = phi i1 [ true, %0 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [16 x i8] c"bar=%d, baz=%d\0A\00"
define i32 @foo() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 (...) @baz()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = icmp ne i32 %1, 666
%5 = icmp ne i32 %2, 42
%6 = or i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ notImplementedI5();
void PrtFrameI5() { notImplementedI5(); }


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

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

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

LLVM IR (-O2):
define void @PrtFrameI5() {
%1 = tail call i32 (...) @notImplementedI5()
ret void
}
double fib(double n) {
  if (n < 2.)
    return n;
  else
    return fib(n - 1.) + fib(n - 2.);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113f <fib+0x2f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1181 <fib+0x71>
movsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fib@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fib@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1160 <fib+0x50>
movsd  0xeda(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm1,0x8(%rsp)
call   1030 <fib@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xebf(%rip),%xmm0
call   1030 <fib@plt>
movapd %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @fib(double %0) {
%2 = fcmp olt double %0, 2.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi double [ %10, %5 ], [ %0, %1 ]
ret double %4
5: ; preds = %1
%6 = fadd double %0, -1.000000e+00
%7 = tail call double @fib(double %6)
%8 = fadd double %0, -2.000000e+00
%9 = tail call double @fib(double %8)
%10 = fadd double %7, %9
br label %3
}
/* Variables and functions */
int getpid();
int get_pid() { return getpid(); }


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

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

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

LLVM IR (-O2):
define i32 @get_pid() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuidInput_rax_rcx(int, int, int *, int *, int *, int *);
int cpuid_pkg_MaxPhysicalProcessorCores(void) {
  uint64_t rax, rbx, rcx, rdx;
  int leafa = 4;
  int leafc = 0;
  cpuidInput_rax_rcx(leafa, leafc, &rax, &rbx, &rcx, &rdx);
  return (((uint64_t)(rax) &
           ((((uint64_t)1 << (((31)) - ((26)) + 1)) - 1) << ((26)))) >>
          (26)) +
         1;
}


x86 assembly (clang, -O0):
<cpuid_pkg_MaxPhysicalProcessorCores>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x4,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
lea    -0x4(%rbp),%rdx
lea    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%r8
lea    -0x10(%rbp),%r9
call   1030 <cpuidInput_rax_rcx@plt>
mov    -0x4(%rbp),%eax
and    $0xfc000000,%eax
sar    $0x1a,%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_pkg_MaxPhysicalProcessorCores>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <cpuidInput_rax_rcx@plt>
mov    0x8(%rsp),%eax
sar    $0x1a,%eax
add    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuid_pkg_MaxPhysicalProcessorCores() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 4, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = call i32 @cpuidInput_rax_rcx(i32 %7, i32 %8, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = and i32 %10, -67108864
%12 = ashr i32 %11, 26
%13 = add nsw i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @cpuid_pkg_MaxPhysicalProcessorCores() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuidInput_rax_rcx(i32 4, i32 0, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = ashr i32 %10, 26
%12 = add nsw i32 %11, 1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void echo(char *str) {
  printf("#Region\n");
  printf("%s\n", str);
  printf("#EndRegion\n");
}


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

x86 assembly (clang, -O2):
<echo>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [8 x i8] c"#Region\00"
@str.3 = [11 x i8] c"#EndRegion\00"
define void @echo(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int pid_compare(void *a, const void *b) {
  pid_t *pa = (pid_t *)a;
  pid_t *pb = (pid_t *)b;
  return *pa == *pb;
}


x86 assembly (clang, -O0):
<pid_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pid_compare>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @pid_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = icmp eq i64 %12, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @pid_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void osm_memset(void *mem, unsigned char value, int size) {
  while (size--) {
    *(unsigned char *)mem = value;
    mem = (unsigned char *)mem + 1;
  }
}


x86 assembly (clang, -O0):
<osm_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     113f <osm_memset+0x3f>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <osm_memset+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<osm_memset>:
test   %edx,%edx
je     1124 <osm_memset+0x14>
push   %rax
mov    %edx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @osm_memset(i8* %0, i8 zeroext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %11, %3
%8 = load i32, i32* %6
%9 = add nsw i32 %8, -1
store i32 %9, i32* %6
%10 = icmp ne i32 %8, 0
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %5
%13 = load i8*, i8** %4
store i8 %12, i8* %13
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %4
br label %7
16: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @osm_memset(i8* nocapture writeonly %0, i8 zeroext %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret void
}
void ExttResourceAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttResourceAuxTable() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int ssize_t;

/* Variables and functions */
bool sancus_get_u32zd(ssize_t v, uint32_t *out) {
  if ((v >= 0) && (v <= 0xffffffff)) {
    if (out != NULL)
      *out = (uint32_t)v;
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<sancus_get_u32zd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1141 <sancus_get_u32zd+0x41>
cmpl   $0xffffffff,-0x8(%rbp)
ja     1141 <sancus_get_u32zd+0x41>
cmpq   $0x0,-0x10(%rbp)
je     1135 <sancus_get_u32zd+0x35>
movslq -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1148 <sancus_get_u32zd+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_get_u32zd>:
test   %edi,%edi
js     1114 <sancus_get_u32zd+0x14>
mov    $0x1,%eax
test   %rsi,%rsi
je     1113 <sancus_get_u32zd+0x13>
mov    %edi,%ecx
mov    %rcx,(%rsi)
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sancus_get_u32zd(i32 %0, i64* writeonly %1) {
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = icmp eq i64* %1, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = zext i32 %0 to i64
store i64 %7, i64* %1
br label %8
8: ; preds = %2, %4, %6
%9 = phi i32 [ 1, %6 ], [ 1, %4 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int init_driver(int id, int buffer_size) {
  puts("init_driver ");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"init_driver \00"
define i32 @init_driver(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"init_driver \00"
define i32 @init_driver(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned int clock();
unsigned int ReadTimer(void) { return clock(); }


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

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

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

LLVM IR (-O2):
define i32 @ReadTimer() {
%1 = tail call i32 (...) @clock()
ret i32 %1
}