xunge/DecIR huggingface dataset:
/* Variables and functions */
double exp(double);
double log(int);
double blastzScoreToNcbiExpectation(int bzScore) {
  double bits = bzScore * 0.0205;
  double logProb = -bits * log(2);
  return 3.0e9 * exp(logProb);
}


x86 assembly (clang, -O0):
<blastzScoreToNcbiExpectation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x2,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe6e(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blastzScoreToNcbiExpectation>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xed3(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0xeba(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @blastzScoreToNcbiExpectation(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 2.050000e-02
store double %7, double* %3
%8 = load double, double* %3
%9 = fneg double %8
%10 = call double @log(i32 2)
%11 = fmul double %9, %10
store double %11, double* %4
%12 = load double, double* %4
%13 = call double @exp(double %12)
%14 = fmul double 3.000000e+09, %13
ret double %14
}

LLVM IR (-O2):
define double @blastzScoreToNcbiExpectation(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, -2.050000e-02
%4 = tail call double @log(i32 2)
%5 = fmul double %3, %4
%6 = tail call double @exp(double %5)
%7 = fmul double %6, 3.000000e+09
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void EthernetIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  DEBUG_ASSERT(ulBase == 0x40048000);
  DEBUG_ASSERT(pfnHandler != 0);
  IntRegister(58, pfnHandler);
  IntEnable(58);
}


x86 assembly (clang, -O0):
<EthernetIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40048000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <DEBUG_ASSERT@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1040 <IntRegister@plt>
mov    $0x3a,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetIntRegister>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x40048000,%rdi
sete   %al
mov    %eax,%edi
call   1050 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <DEBUG_ASSERT@plt>
mov    $0x3a,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    $0x3a,%edi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @EthernetIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074036736
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load void ()*, void ()** %4
%10 = icmp ne void ()* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @DEBUG_ASSERT(i32 %11)
%13 = load void ()*, void ()** %4
%14 = bitcast void ()* %13 to void (...)*
%15 = call i32 @IntRegister(i32 58, void (...)* %14)
%16 = call i32 @IntEnable(i32 58)
ret void
}

LLVM IR (-O2):
define void @EthernetIntRegister(i64 %0, void ()* %1) {
%3 = icmp eq i64 %0, 1074036736
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = icmp ne void ()* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = bitcast void ()* %1 to void (...)*
%10 = tail call i32 @IntRegister(i32 58, void (...)* %9)
%11 = tail call i32 @IntEnable(i32 58)
ret void
}
/* Variables and functions */
size_t pretty_print_indent_level();
size_t pretty_print_indent_get_level(void) {
  return pretty_print_indent_level();
}


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

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

LLVM IR (-O0):
define i64 @pretty_print_indent_get_level() {
%1 = call i64 (...) @pretty_print_indent_level()
ret i64 %1
}

LLVM IR (-O2):
define i64 @pretty_print_indent_get_level() {
%1 = tail call i64 (...) @pretty_print_indent_level()
ret i64 %1
}
unsigned long ft_nbrmag_unsigned(unsigned long nbr, unsigned long base) {
  long mag;
  mag = 1;
  while (nbr / base != 0) {
    mag = mag * base;
    nbr = nbr / base;
  }
  return (mag);
}


x86 assembly (clang, -O0):
<ft_nbrmag_unsigned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
cmp    $0x0,%rax
je     114c <ft_nbrmag_unsigned+0x4c>
mov    -0x18(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1114 <ft_nbrmag_unsigned+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_nbrmag_unsigned>:
mov    $0x1,%ecx
cmp    %rsi,%rdi
jae    110e <ft_nbrmag_unsigned+0xe>
mov    %rcx,%rax
ret
mov    %rdi,%rax
jmp    112e <ft_nbrmag_unsigned+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edx,%edx
div    %rsi
imul   %rsi,%rcx
cmp    %rsi,%rax
jb     110a <ft_nbrmag_unsigned+0xa>
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
jne    1120 <ft_nbrmag_unsigned+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <ft_nbrmag_unsigned+0x25>

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

LLVM IR (-O2):
define i64 @ft_nbrmag_unsigned(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 1, %2 ]
%6 = phi i64 [ %7, %4 ], [ %0, %2 ]
%7 = udiv i64 %6, %1
%8 = mul i64 %5, %1
%9 = icmp ult i64 %7, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i64 [ 1, %2 ], [ %8, %4 ]
ret i64 %11
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int bind(int, struct sockaddr const *, int /*<<< orphan*/);
int errno;
int __sulong_posix_bind(int sockfd, const struct sockaddr *addr,
                        socklen_t addrlen) {
  {
    int native_errno = errno;
    int result = bind(sockfd, addr, addrlen);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bind@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115a <__sulong_posix_bind+0x4a>
xor    %eax,%eax
mov    0x2e8d(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%ecx
mov    0x2e7c(%rip),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_bind>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <bind@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load %struct.sockaddr*, %struct.sockaddr** %5
%12 = load i32, i32* %6
%13 = call i32 @bind(i32 %10, %struct.sockaddr* %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %7
store i32 %22, i32* @errno
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
store i32 %4, i32* @errno
ret i32 %9
}
/* Variables and functions */
int get_phase();
int adapt_R(int depth) {
  if (depth > (6 * 4)) {
    if (get_phase() > (4 * 500))
      return (3 * 4);
    return (2 * 4);
  } else
    return (2 * 4);
}


x86 assembly (clang, -O0):
<adapt_R>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x18,-0x8(%rbp)
jle    114f <adapt_R+0x3f>
mov    $0x0,%al
call   1030 <get_phase@plt>
cmp    $0x7d0,%eax
jle    1143 <adapt_R+0x33>
movl   $0xc,-0x4(%rbp)
jmp    1156 <adapt_R+0x46>
movl   $0x8,-0x4(%rbp)
jmp    1156 <adapt_R+0x46>
movl   $0x8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adapt_R>:
mov    $0x8,%eax
cmp    $0x19,%edi
jl     1137 <adapt_R+0x27>
push   %rax
xor    %eax,%eax
call   1030 <get_phase@plt>
xor    %ecx,%ecx
cmp    $0x7d1,%eax
setge  %cl
lea    0x8(,%rcx,4),%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @adapt_R(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 24
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call i32 (...) @get_phase()
%8 = icmp sgt i32 %7, 2000
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 12, i32* %2
br label %12
10: ; preds = %6
store i32 8, i32* %2
br label %12
11: ; preds = %1
store i32 8, i32* %2
br label %12
12: ; preds = %11, %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @adapt_R(i32 %0) {
%2 = icmp sgt i32 %0, 24
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 (...) @get_phase()
%5 = icmp sgt i32 %4, 2000
%6 = select i1 %5, i32 12, i32 8
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 8, %1 ]
ret i32 %8
}
char *strcat(char *dest, char *src) {
  char *ret = dest;
  while (*(++dest))
    ;
  while (*src)
    *(dest++) = *(src++);
  *dest = 0;
  return ret;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,0x1(%rax)
je     1132 <strcat+0x32>
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <strcat+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1137 <strcat+0x37>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
mov    (%rsi),%dl
test   %dl,%dl
je     1143 <strcat+0x43>
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %dl,(%rcx,%rdi,1)
movzbl 0x1(%rsi,%rdi,1),%edx
add    $0x1,%rdi
test   %dl,%dl
jne    1130 <strcat+0x30>
add    %rdi,%rcx
movb   $0x0,(%rcx)
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %16, %11 ], [ %5, %8 ]
%14 = phi i8* [ %15, %11 ], [ %1, %8 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %13
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %5, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* %0
}
void gtk_file_chooser_list_shortcut_folder_uris() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_list_shortcut_folder_uris() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double, double, double);
int /*<<< orphan*/ stderr;
int main(void) {
  double d = 1.0;
  double e = 1.0 + 1.0;
  double f = e - d;
  fprintf(stderr, "d = %f e = %f f = %f\n", d, e, f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xeef(%rip),%rsi
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm0
movaps %xmm0,%xmm2
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"d = %f e = %f f = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 2.000000e+00, double* %3
%5 = load double, double* %3
%6 = load double, double* %2
%7 = fsub double %5, %6
store double %7, double* %4
%8 = load i32, i32* @stderr
%9 = load double, double* %2
%10 = load double, double* %3
%11 = load double, double* %4
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %9, double %10, double %11)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"d = %f e = %f f = %f\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, double 1.000000e+00)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t BF_roundUpToBaseTwo(uint32_t nInput) {
  nInput--;
  nInput |= nInput >> 1;
  nInput |= nInput >> 2;
  nInput |= nInput >> 4;
  nInput |= nInput >> 8;
  nInput |= nInput >> 16;
  nInput++;
  return nInput;
}


x86 assembly (clang, -O0):
<BF_roundUpToBaseTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BF_roundUpToBaseTwo>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @BF_roundUpToBaseTwo(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int rand();
int main(int argc, char **argv) {
  int x = rand();
  rand();
  return x;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rand()
%4 = tail call i32 (...) @rand()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ XOR_BEST_BY(unsigned char *, unsigned char *,
                               unsigned char *);
void XOREQ_BEST_BY(unsigned char *d, unsigned char *s) { XOR_BEST_BY(d, d, s); }


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

x86 assembly (clang, -O2):
<XOREQ_BEST_BY>:
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <XOR_BEST_BY@plt>

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

LLVM IR (-O2):
define void @XOREQ_BEST_BY(i8* %0, i8* %1) {
%3 = tail call i32 @XOR_BEST_BY(i8* %0, i8* %0, i8* %1)
ret void
}
extern void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk,
                           unsigned cpu) {}


x86 assembly (clang, -O0):
<enter_lazy_tlb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
%struct.task_struct = type opaque
define void @enter_lazy_tlb(%struct.mm_struct* %0, %struct.task_struct* %1, i32 %2) {
%4 = alloca %struct.mm_struct*
%5 = alloca %struct.task_struct*
%6 = alloca i32
store %struct.mm_struct* %0, %struct.mm_struct** %4
store %struct.task_struct* %1, %struct.task_struct** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.task_struct = type opaque
define void @enter_lazy_tlb(%struct.mm_struct* nocapture %0, %struct.task_struct* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ b();
int /*<<< orphan*/ c();
void g() {
  b();
  c();
}


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

x86 assembly (clang, -O2):
<g>:
push   %rax
xor    %eax,%eax
call   1030 <b@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <c@plt>

LLVM IR (-O0):
define void @g() {
%1 = call i32 (...) @b()
%2 = call i32 (...) @c()
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = tail call i32 (...) @b()
%2 = tail call i32 (...) @c()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int x = 1;
  int y = 2;
  printf("x = %i, y = %i\n", x, y);
  printf("x = %i, y = %i\n", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebb(%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    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"x = %i, y = %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
ret i32 0
}
/* Variables and functions */
long double sin(long double);
long double fun_sin(long double a) { return sin(a); }


x86 assembly (clang, -O0):
<fun_sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sin@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define x86_fp80 @fun_sin(x86_fp80 %0) {
%2 = tail call x86_fp80 @sin(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
__attribute__((destructor)) void fini() { closelog(); }


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = tail call i32 (...) @closelog()
ret void
}
struct device_node *of_find_node_by_path(const char *path) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.device_node = type opaque
define %struct.device_node* @of_find_node_by_path(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.device_node* null
}

LLVM IR (-O2):
%struct.device_node = type opaque
define noalias %struct.device_node* @of_find_node_by_path(i8* nocapture readnone %0) {
ret %struct.device_node* null
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "test"
        " [expression]\n       [ [expression] ]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Usage: test [expression]\0A [ [expression] ]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [50 x i8] c"Usage: test [expression]\0A [ [expression] ]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
unsigned int bpf_log2(unsigned long);
unsigned int bpf_log2l(unsigned long v) {
  unsigned int hi = v >> 32;
  if (hi)
    return bpf_log2(hi) + 32 + 1;
  else
    return bpf_log2(v) + 1;
}


x86 assembly (clang, -O0):
<bpf_log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1149 <bpf_log2l+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,%edi
call   1030 <bpf_log2@plt>
add    $0x20,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <bpf_log2l+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <bpf_log2@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_log2l>:
push   %rax
mov    %rdi,%rax
shr    $0x20,%rax
jne    1121 <bpf_log2l+0x11>
call   1030 <bpf_log2@plt>
jmp    112c <bpf_log2l+0x1c>
mov    %rax,%rdi
call   1030 <bpf_log2@plt>
add    $0x20,%eax
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bpf_log2l(i64 %0) {
%2 = icmp ult i64 %0, 4294967296
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = lshr i64 %0, 32
%5 = tail call i32 @bpf_log2(i64 %4)
%6 = add i32 %5, 32
br label %9
7: ; preds = %1
%8 = tail call i32 @bpf_log2(i64 %0)
br label %9
9: ; preds = %7, %3
%10 = phi i32 [ %6, %3 ], [ %8, %7 ]
%11 = add i32 %10, 1
ret i32 %11
}
/* Type definitions */
struct circle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct circle *);
void free_circle(struct circle *c) { free(c); }


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

x86 assembly (clang, -O2):
<free_circle>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.circle = type { i32 }
define void @free_circle(%struct.circle* %0) {
%2 = alloca %struct.circle*
store %struct.circle* %0, %struct.circle** %2
%3 = load %struct.circle*, %struct.circle** %2
%4 = call i32 @free(%struct.circle* %3)
ret void
}

LLVM IR (-O2):
%struct.circle = type { i32 }
define void @free_circle(%struct.circle* nocapture %0) {
%2 = tail call i32 @free(%struct.circle* %0)
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_pointer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_pointer, user_data);
}


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

x86 assembly (clang, -O2):
<wl_pointer_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_pointer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_pointer_set_user_data(%struct.wl_pointer* %0, i8* %1) {
%3 = alloca %struct.wl_pointer*
%4 = alloca i8*
store %struct.wl_pointer* %0, %struct.wl_pointer** %3
store i8* %1, i8** %4
%5 = load %struct.wl_pointer*, %struct.wl_pointer** %3
%6 = bitcast %struct.wl_pointer* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_pointer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_pointer_set_user_data(%struct.wl_pointer* %0, i8* %1) {
%3 = bitcast %struct.wl_pointer* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct prime_thread_ctx {
  int dummy;
};

/* Variables and functions */
int load_unaligned_skip_to(struct prime_thread_ctx *pctx, uint64_t target_num,
                           void *ctx) {
  (void)pctx;
  (void)target_num;
  (void)ctx;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.prime_thread_ctx = type { i32 }
define i32 @load_unaligned_skip_to(%struct.prime_thread_ctx* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
void pPrPr_disableITimers(void) {}


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

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

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

LLVM IR (-O2):
define void @pPrPr_disableITimers() {
ret void
}
/* Variables and functions */
char *strcpy(char *, char *);
char *t12(char *x) { return strcpy(x, "foo"); }


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

x86 assembly (clang, -O2):
<t12>:
mov    %rdi,%rax
movl   $0x6f6f66,(%rdi)
ret

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
define i8* @t12(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strcpy(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
define i8* @t12(i8* returned writeonly %0) {
%2 = bitcast i8* %0 to i32*
store i32 7303014, i32* %2
ret i8* %0
}
double radToDeg(double angle) { return angle * 57.2958; }


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

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

LLVM IR (-O0):
define double @radToDeg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 5.729580e+01
ret double %4
}

LLVM IR (-O2):
define double @radToDeg(double %0) {
%2 = fmul double %0, 5.729580e+01
ret double %2
}
void swap(int *num1, int *num2) {
  int swapper;
  swapper = *num1;
  *num1 = *num2;
  *num2 = swapper;
}


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

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

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
umask() { return 0644; }


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

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

LLVM IR (-O0):
define i32 @umask() {
ret i32 420
}

LLVM IR (-O2):
define i32 @umask() {
ret i32 420
}
void usleep(int a) {}


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

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

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

LLVM IR (-O2):
define void @usleep(i32 %0) {
ret void
}
/* Variables and functions */
int check_sp_value(void *);
void *current_sp_value(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int main() {
  void *current_sp = current_sp_value(0, 0, 0, 0, 0, 0, 0, 0, 0);
  return check_sp_value(current_sp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <current_sp_value@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <check_sp_value@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <current_sp_value@plt>
add    $0x20,%rsp
mov    %rax,%rdi
pop    %rax
jmp    1040 <check_sp_value@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @current_sp_value(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @check_sp_value(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @current_sp_value(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @check_sp_value(i8* %1)
ret i32 %2
}
int main(int argc, char **argv) {
  printf("\nIn %s calling function: hello_yocto\n", __FUNCTION__);
  hello_yocto();
  printf("\nIn %s calling function: ", __FUNCTION__);
  foo_bar();
  printf("Exiting...\n\n");
  return 0;
}


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)
lea    0xeb3(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <hello_yocto@plt>
lea    0xec2(%rip),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <foo_bar@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xed7(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <hello_yocto@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <foo_bar@plt>
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"\0AIn %s calling function: hello_yocto\0A\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
@.str.1 = [26 x i8] c"\0AIn %s calling function: \00"
@.str.2 = [13 x i8] c"Exiting...\0A\0A\00"
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 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
%7 = call i32 (...) @hello_yocto()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
%9 = call i32 (...) @foo_bar()
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"\0AIn %s calling function: hello_yocto\0A\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
@.str.1 = [26 x i8] c"\0AIn %s calling function: \00"
@str = [12 x i8] c"Exiting...\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
%4 = tail call i32 (...) @hello_yocto()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0))
%6 = tail call i32 (...) @foo_bar()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dhcp_packet(int, char *, int /*<<< orphan*/ *, char *,
                               char *);
void dhcp_release(char *ipaddr, char *gwaddr, char *hardware) {
  dhcp_packet(7, ipaddr, NULL, gwaddr, hardware);
}


x86 assembly (clang, -O0):
<dhcp_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x7,%edi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <dhcp_packet@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhcp_release>:
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rsi
mov    $0x7,%edi
xor    %edx,%edx
jmp    1030 <dhcp_packet@plt>

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

LLVM IR (-O2):
define void @dhcp_release(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @dhcp_packet(i32 7, i8* %0, i32* null, i8* %1, i8* %2)
ret void
}
void g_object_freeze_notify() {}


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

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

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

LLVM IR (-O2):
define void @g_object_freeze_notify() {
ret void
}
void _cc3_set_cam_ddr(volatile unsigned long val) {}


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

x86 assembly (clang, -O2):
<_cc3_set_cam_ddr>:
mov    %rdi,-0x8(%rsp)
ret

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1160 <main+0x40>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x4c>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    (%rsp),%eax
lea    0xec6(%rip),%rax
lea    0xebc(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PUT32(int, int);
void sda_high(void) { PUT32(0x2020001C, 1 << 2); }


x86 assembly (clang, -O0):
<sda_high>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2020001c,%edi
mov    $0x4,%esi
call   1030 <PUT32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sda_high>:
mov    $0x2020001c,%edi
mov    $0x4,%esi
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @sda_high() {
%1 = call i32 @PUT32(i32 538968092, i32 4)
ret void
}

LLVM IR (-O2):
define void @sda_high() {
%1 = tail call i32 @PUT32(i32 538968092, i32 4)
ret void
}
float Front(float *Q) { return Q[0]; }


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

x86 assembly (clang, -O2):
<Front>:
movss  (%rdi),%xmm0
ret

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

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