xunge/DecIR huggingface dataset:
void get_vec_from_xyz(const double *x, const double *vxyz, double *v) {
  v[0] = vxyz[0];
  v[1] = vxyz[1];
  v[2] = vxyz[2];
}


x86 assembly (clang, -O0):
<get_vec_from_xyz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_vec_from_xyz>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @get_vec_from_xyz(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
store double %9, double* %11
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load double*, double** %6
%16 = getelementptr inbounds double, double* %15, i64 1
store double %14, double* %16
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %6
%21 = getelementptr inbounds double, double* %20, i64 2
store double %19, double* %21
ret void
}

LLVM IR (-O2):
define void @get_vec_from_xyz(double* nocapture readnone %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
store double %4, double* %2
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %2, i64 1
store double %6, double* %7
%8 = getelementptr inbounds double, double* %1, i64 2
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %2, i64 2
store double %9, double* %10
ret void
}
/* Variables and functions */
int getpagesize();
void *page_align(void *addr) {
  int i = 0;
  int sz = getpagesize();
  while ((void *)(i * sz) < addr)
    i++;
  return (i * sz);
}


x86 assembly (clang, -O0):
<page_align>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
cmp    -0x8(%rbp),%rax
jae    114e <page_align+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <page_align+0x1d>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_align>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getpagesize@plt>
cltq
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rcx
add    %rax,%rbx
cmp    %r14,%rcx
jb     1130 <page_align+0x20>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @page_align(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = call i32 (...) @getpagesize()
store i32 %5, i32* %4
br label %6
6: ; preds = %14, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = load i8*, i8** %2
%13 = icmp ult i8* %11, %12
br i1 %13, label %14, label %17
14: ; preds = %6
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %6
17: ; preds = %6
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = mul nsw i32 %18, %19
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i8*
ret i8* %22
}

LLVM IR (-O2):
define i8* @page_align(i8* readnone %0) {
%2 = tail call i32 (...) @getpagesize()
%3 = sext i32 %2 to i64
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = mul nsw i64 %5, %3
%7 = inttoptr i64 %6 to i8*
%8 = icmp ult i8* %7, %0
%9 = add nuw i64 %5, 1
br i1 %8, label %4, label %10
10: ; preds = %4
%11 = inttoptr i64 %6 to i8*
ret i8* %11
}
long echo_yes(string, flag)
char *string[];
long *flag;
{
  *flag = 0L;
  return (1);
}


x86 assembly (clang, -O0):
<echo_yes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_yes>:
movq   $0x0,(%rsi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i64 @echo_yes(i8** nocapture readnone %0, i64* nocapture writeonly %1) {
store i64 0, i64* %1
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: ls [OPTION]... [FILE]...\n");
  printf(
      "List information about the FILEs (the current directory by default).\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Usage: ls [OPTION]... [FILE]...\0A\00"
@.str.1 = [70 x i8] c"List information about the FILEs (the current directory by default).\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Usage: ls [OPTION]... [FILE]...\00"
@str.2 = [69 x i8] c"List information about the FILEs (the current directory by default).\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getnpar(int, char *, char *, long *);
int getnparlong(int n, char *name, long *ptr) {
  return getnpar(n, name, "l", ptr);
}


x86 assembly (clang, -O0):
<getnparlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <getnpar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnparlong>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
jmp    1030 <getnpar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"l\00"
define i32 @getnparlong(i32 %0, i8* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64* %2, i64** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64*, i64** %6
%10 = call i32 @getnpar(i32 %7, i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"l\00"
define i32 @getnparlong(i32 %0, i8* %1, i64* %2) {
%4 = tail call i32 @getnpar(i32 %0, i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double *, double, char const *);
void count_overload2(double *p1, const char *p2) {
  printf("Two params: %p (%f) %s\n", p1, *p1, p2);
}


x86 assembly (clang, -O0):
<count_overload2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rdx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_overload2>:
mov    %rsi,%rdx
mov    %rdi,%rsi
movsd  (%rdi),%xmm0
lea    0xedf(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Two params: %p (%f) %s\0A\00"
define void @count_overload2(double* %0, i8* %1) {
%3 = alloca double*
%4 = alloca i8*
store double* %0, double** %3
store i8* %1, i8** %4
%5 = load double*, double** %3
%6 = load double*, double** %3
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double* %5, double %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Two params: %p (%f) %s\0A\00"
define void @count_overload2(double* %0, i8* %1) {
%3 = load double, double* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double* %0, double %3, i8* %1)
ret void
}
/* Type definitions */
typedef int sig_atomic_t;

/* Variables and functions */
int do_hog(long niters) {
  volatile sig_atomic_t dummy = 1;
  if (niters <= 0)
    niters = 1;
  while (dummy && --niters)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<do_hog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jg     1122 <do_hog+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1127 <do_hog+0x27>
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     114e <do_hog+0x4e>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115e <do_hog+0x5e>
jmp    1163 <do_hog+0x63>
jmp    1127 <do_hog+0x27>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_hog>:
movl   $0x1,-0x4(%rsp)
test   %rdi,%rdi
mov    $0x1,%eax
cmovg  %rdi,%rax
add    $0xffffffffffffffff,%rax
nopl   0x0(%rax,%rax,1)
sub    $0x1,%rax
setb   %cl
cmpl   $0x0,-0x4(%rsp)
je     1132 <do_hog+0x32>
test   %cl,%cl
je     1120 <do_hog+0x20>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @do_hog(i64 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store volatile i32 1, i32* %2
%4 = icmp sgt i64 %0, 1
%5 = select i1 %4, i64 %0, i64 1
br label %6
6: ; preds = %6, %1
%7 = phi i64 [ %5, %1 ], [ %10, %6 ]
%8 = load volatile i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = add nsw i64 %7, -1
%11 = icmp eq i64 %10, 0
%12 = select i1 %9, i1 true, i1 %11
br i1 %12, label %13, label %6
13: ; preds = %6
ret i32 0
}
void init_freeenv(char **e) {
  int n;
  for (n = 0; e[n]; n++)
    free(e[n]);
  free(e);
}


x86 assembly (clang, -O0):
<init_freeenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1155 <init_freeenv+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <init_freeenv+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_freeenv>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <init_freeenv+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <init_freeenv+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @init_freeenv(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}
void foo393() {}


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

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

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

LLVM IR (-O2):
define void @foo393() {
ret void
}
void avutil_license() {}


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

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

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

LLVM IR (-O2):
define void @avutil_license() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t s337_get_data_mode(const uint8_t *p_s337) {
  return (p_s337[5] & 0x60) >> 5;
}


x86 assembly (clang, -O0):
<s337_get_data_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0x60,%eax
sar    $0x5,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s337_get_data_mode>:
mov    0x14(%rdi),%eax
shr    $0x5,%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @s337_get_data_mode(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = and i32 %5, 96
%7 = ashr i32 %6, 5
ret i32 %7
}

LLVM IR (-O2):
define i32 @s337_get_data_mode(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = lshr i32 %3, 5
%5 = and i32 %4, 3
ret i32 %5
}
/* Variables and functions */
float sqrt(int);
float sq_diagonal_side(float side) {
  float square_root_2 = sqrt(2);
  float diagonal = side * square_root_2;
  return diagonal;
}


x86 assembly (clang, -O0):
<sq_diagonal_side>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq_diagonal_side>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x2,%edi
call   1030 <sqrt@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sq_diagonal_side(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = call float @sqrt(i32 2)
store float %5, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fmul float %6, %7
store float %8, float* %4
%9 = load float, float* %4
ret float %9
}

LLVM IR (-O2):
define float @sq_diagonal_side(float %0) {
%2 = tail call float @sqrt(i32 2)
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
double strtod(char *, char **);
double nmea_atof(const char *str, int str_sz) {
  char *tmp_ptr;
  char buff[128];
  double res = 0;
  if (str_sz < 128) {
    memcpy(&buff[0], str, str_sz);
    buff[str_sz] = '\0';
    res = strtod(&buff[0], &tmp_ptr);
  }
  return res;
}


x86 assembly (clang, -O0):
<nmea_atof>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
cmpl   $0x80,-0xc(%rbp)
jge    1181 <nmea_atof+0x61>
lea    -0xa0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <memcpy@plt>
movslq -0xc(%rbp),%rax
movb   $0x0,-0xa0(%rbp,%rax,1)
lea    -0xa0(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_atof>:
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    %esi,%ebx
xorps  %xmm0,%xmm0
cmp    $0x7f,%esi
jg     115b <nmea_atof+0x3b>
mov    %rdi,%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
movb   $0x0,0x10(%rsp,%rax,1)
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1030 <strtod@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @nmea_atof(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [128 x i8]
%7 = alloca double
store i8* %0, i8** %3
store i32 %1, i32* %4
store double 0.000000e+00, double* %7
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 128
br i1 %9, label %10, label %20
10: ; preds = %2
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @memcpy(i8* %11, i8* %12, i32 %13)
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 %16
store i8 0, i8* %17
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%19 = call double @strtod(i8* %18, i8** %5)
store double %19, double* %7
br label %20
20: ; preds = %10, %2
%21 = load double, double* %7
ret double %21
}

LLVM IR (-O2):
define double @nmea_atof(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca [128 x i8]
%5 = bitcast i8** %3 to i8*
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = icmp slt i32 %1, 128
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = call i32 @memcpy(i8* %6, i8* %0, i32 %1)
%10 = sext i32 %1 to i64
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 %10
store i8 0, i8* %11
%12 = call double @strtod(i8* %6, i8** %3)
br label %13
13: ; preds = %8, %2
%14 = phi double [ %12, %8 ], [ 0.000000e+00, %2 ]
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ PIN_INT7_DriverIRQHandler();
__attribute__((weak)) void PIN_INT7_IRQHandler(void) {
  PIN_INT7_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @PIN_INT7_IRQHandler() {
%1 = call i32 (...) @PIN_INT7_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PIN_INT7_IRQHandler() {
%1 = tail call i32 (...) @PIN_INT7_DriverIRQHandler()
ret void
}
void inc_zcache_pers_nonactive_puts_ignored(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_pers_nonactive_puts_ignored() {
ret void
}
/* Type definitions */
struct nuts_lv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nuts_lv_remove_at(struct nuts_lv *, int /*<<< orphan*/,
                                     size_t);
void nuts_lv_remove(struct nuts_lv *lv, size_t nbytes) {
  nuts_lv_remove_at(lv, 0, nbytes);
}


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

x86 assembly (clang, -O2):
<nuts_lv_remove>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <nuts_lv_remove_at@plt>

LLVM IR (-O0):
%struct.nuts_lv = type { i32 }
define void @nuts_lv_remove(%struct.nuts_lv* %0, i64 %1) {
%3 = alloca %struct.nuts_lv*
%4 = alloca i64
store %struct.nuts_lv* %0, %struct.nuts_lv** %3
store i64 %1, i64* %4
%5 = load %struct.nuts_lv*, %struct.nuts_lv** %3
%6 = load i64, i64* %4
%7 = call i32 @nuts_lv_remove_at(%struct.nuts_lv* %5, i32 0, i64 %6)
ret void
}

LLVM IR (-O2):
%struct.nuts_lv = type { i32 }
define void @nuts_lv_remove(%struct.nuts_lv* %0, i64 %1) {
%3 = tail call i32 @nuts_lv_remove_at(%struct.nuts_lv* %0, i32 0, i64 %1)
ret void
}
void leaf(void) {}


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

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

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

LLVM IR (-O2):
define void @leaf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ turn(int);
void right() { turn(90); }


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

x86 assembly (clang, -O2):
<right>:
mov    $0x5a,%edi
jmp    1030 <turn@plt>

LLVM IR (-O0):
define void @right() {
%1 = call i32 @turn(i32 90)
ret void
}

LLVM IR (-O2):
define void @right() {
%1 = tail call i32 @turn(i32 90)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ torture_local_talloc();
int main(void) {
  if (!torture_local_talloc()) {
    printf("ERROR: TESTSUIE FAILED\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <torture_local_talloc@plt>
cmp    $0x0,%eax
jne    1157 <main+0x37>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <main+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <torture_local_talloc@plt>
test   %eax,%eax
jne    113f <main+0x1f>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"ERROR: TESTSUIE FAILED\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @torture_local_talloc()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [23 x i8] c"ERROR: TESTSUIE FAILED\00"
define i32 @main() {
%1 = tail call i32 (...) @torture_local_talloc()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ -1, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void file_open_failure(char *routine, char *var_name) {
  printf("\n*** FATAL ERROR IN %s FUNCTION\n", routine);
  printf("*** STATUS - FAILED TO OPEN FILE: '%s'\n", var_name);
  exit(-401);
}


x86 assembly (clang, -O0):
<file_open_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfffffe6f,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<file_open_failure>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0xfffffe6f,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"\0A*** FATAL ERROR IN %s FUNCTION\0A\00"
@.str.1 = [40 x i8] c"*** STATUS - FAILED TO OPEN FILE: '%s'\0A\00"
define void @file_open_failure(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 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 -401)
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0A*** FATAL ERROR IN %s FUNCTION\0A\00"
@.str.1 = [40 x i8] c"*** STATUS - FAILED TO OPEN FILE: '%s'\0A\00"
define void @file_open_failure(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @exit(i32 -401)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setstackaddr(int /*<<< orphan*/ *, void *);
int my_pthread_attr_setstackaddr(pthread_attr_t *__attr, void *stack_addr) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_setstackaddr(realattr, stack_addr);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_setstackaddr>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_setstackaddr@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_setstackaddr(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i8*, i8** %4
%12 = call i32 @pthread_attr_setstackaddr(i32* %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_attr_setstackaddr(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_attr_setstackaddr(i32* %5, i8* %1)
ret i32 %6
}
/* Variables and functions */
int OCTEON_IS_OCTEON3();
int octeon_has_feature_OCTEON_FEATURE_OCLA(void) { return OCTEON_IS_OCTEON3(); }


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

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

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

LLVM IR (-O2):
define i32 @octeon_has_feature_OCTEON_FEATURE_OCLA() {
%1 = tail call i32 (...) @OCTEON_IS_OCTEON3()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PUNPCKHWD(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x61);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x70);
  addbyte(0xc0 | (dst_reg << 3) | dst_reg);
  addbyte(0x0e);
}


x86 assembly (clang, -O0):
<MMX_PUNPCKHWD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x61,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x70,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x4(%rbp),%edi
call   1030 <addbyte@plt>
mov    $0xe,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PUNPCKHWD>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%r14d
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x61,%edi
call   1030 <addbyte@plt>
mov    %r14d,%ebx
or     $0x18,%ebx
shl    $0x3,%ebx
or     %ebx,%ebp
mov    %ebp,%edi
call   1030 <addbyte@plt>
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x70,%edi
call   1030 <addbyte@plt>
or     %r14d,%ebx
mov    %ebx,%edi
call   1030 <addbyte@plt>
mov    $0xe,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PUNPCKHWD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 97)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
%14 = call i32 @addbyte(i32 102)
%15 = call i32 @addbyte(i32 15)
%16 = call i32 @addbyte(i32 112)
%17 = load i32, i32* %3
%18 = shl i32 %17, 3
%19 = or i32 192, %18
%20 = load i32, i32* %3
%21 = or i32 %19, %20
%22 = call i32 @addbyte(i32 %21)
%23 = call i32 @addbyte(i32 14)
ret void
}

LLVM IR (-O2):
define void @MMX_PUNPCKHWD(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 97)
%6 = shl i32 %0, 3
%7 = or i32 %6, 192
%8 = or i32 %7, %1
%9 = tail call i32 @addbyte(i32 %8)
%10 = tail call i32 @addbyte(i32 102)
%11 = tail call i32 @addbyte(i32 15)
%12 = tail call i32 @addbyte(i32 112)
%13 = or i32 %7, %0
%14 = tail call i32 @addbyte(i32 %13)
%15 = tail call i32 @addbyte(i32 14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_loop();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ install_sighandlers();
int main(int argc, char *argv[]) {
  install_sighandlers();
  command_loop();
  exit(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)
mov    $0x0,%al
call   1050 <install_sighandlers@plt>
mov    $0x0,%al
call   1030 <command_loop@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <install_sighandlers@plt>
xor    %eax,%eax
call   1030 <command_loop@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
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 (...) @install_sighandlers()
%7 = call i32 (...) @command_loop()
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @install_sighandlers()
%4 = tail call i32 (...) @command_loop()
%5 = tail call i32 @exit(i32 0)
unreachable
}
void SocketSubsystemInit() {}


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

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

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

LLVM IR (-O2):
define void @SocketSubsystemInit() {
ret void
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_flash_get_segment_size(void *area) {
  return cfg_processor_get_hex_int_attr(area, "segsize");
}


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

x86 assembly (clang, -O2):
<cfg_flash_get_segment_size>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"segsize\00"
define i32 @cfg_flash_get_segment_size(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int pthread_self();
int /*<<< orphan*/ sleep(int);
void *myprocess(void *arg) {
  printf("thread_id is 0x%x, working on task %d\n", pthread_self(),
         *(int *)arg);
  sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<myprocess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myprocess>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    (%rbx),%edx
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"thread_id is 0x%x, working on task %d\0A\00"
define i8* @myprocess(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
%8 = call i32 @sleep(i32 1)
ret i8* null
}

LLVM IR (-O2):
@.str = [39 x i8] c"thread_id is 0x%x, working on task %d\0A\00"
define noalias i8* @myprocess(i8* nocapture %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
%6 = tail call i32 @sleep(i32 1)
ret i8* null
}
void whitespace(char **data) {
  while (**data && **data == ' ')
    ++*data;
}


x86 assembly (clang, -O0):
<whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1133 <whitespace+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <whitespace+0x43>
jmp    1156 <whitespace+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <whitespace+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<whitespace>:
mov    (%rdi),%rax
cmpb   $0x20,(%rax)
jne    111c <whitespace+0x1c>
add    $0x1,%rax
nopl   0x0(%rax)
mov    %rax,(%rdi)
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1110 <whitespace+0x10>
ret

LLVM IR (-O0):
define void @whitespace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %17, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 32
br label %15
15: ; preds = %9, %3
%16 = phi i1 [ false, %3 ], [ %14, %9 ]
br i1 %16, label %17, label %21
17: ; preds = %15
%18 = load i8**, i8*** %2
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
br label %3
21: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 32
br i1 %4, label %5, label %10
5: ; preds = %1, %5
%6 = phi i8* [ %7, %5 ], [ %2, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %7, i8** %0
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 32
br i1 %9, label %5, label %10
10: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_POT_POWER_PIN() { set_io_bit(0x70, 7); }


x86 assembly (clang, -O0):
<TOSH_SET_POT_POWER_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70,%edi
mov    $0x7,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_POT_POWER_PIN>:
mov    $0x70,%edi
mov    $0x7,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_POT_POWER_PIN() {
%1 = call i32 @set_io_bit(i32 112, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_POT_POWER_PIN() {
%1 = tail call i32 @set_io_bit(i32 112, i32 7)
ret void
}
void delay(void) {
  for (int i = 0; i < 100; i++) {
    __asm__ __volatile__("nop");
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1124 <delay+0x24>
nop
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    $0x64,%eax
cs nopw 0x0(%rax,%rax,1)
nop
nop
add    $0xffffffff,%eax
jne    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @delay() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %4, %2 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%4 = add nuw nsw i32 %3, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void ac_stop(void) { exit(1); }


x86 assembly (clang, -O0):
<ac_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<ac_stop>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @ac_stop() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @ac_stop() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
void ScaleAddRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleAddRow_SSE2() {
ret void
}
/* Variables and functions */
int iTlvBatchAddField55ObjBase(unsigned char, unsigned char *, unsigned char *,
                               int, int, int);
int iTlvBatchAddField55ObjHost(unsigned char ucFlag, unsigned char *psTlvBuffer,
                               unsigned char *psField55, int iField55Len,
                               int iConflictFlag) {
  int iRet;
  iRet = iTlvBatchAddField55ObjBase(ucFlag, psTlvBuffer, psField55, iField55Len,
                                    iConflictFlag, 1);
  return (iRet);
}


x86 assembly (clang, -O0):
<iTlvBatchAddField55ObjHost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x1,%r9d
movzbl %al,%edi
call   1030 <iTlvBatchAddField55ObjBase@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iTlvBatchAddField55ObjHost>:
mov    $0x1,%r9d
jmp    1030 <iTlvBatchAddField55ObjBase@plt>

LLVM IR (-O0):
define i32 @iTlvBatchAddField55ObjHost(i8 zeroext %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i8, i8* %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @iTlvBatchAddField55ObjBase(i8 zeroext %12, i8* %13, i8* %14, i32 %15, i32 %16, i32 1)
store i32 %17, i32* %11
%18 = load i32, i32* %11
ret i32 %18
}

LLVM IR (-O2):
define i32 @iTlvBatchAddField55ObjHost(i8 zeroext %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @iTlvBatchAddField55ObjBase(i8 zeroext %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
int _find_error_user(char const *message, char const *error, int ret) {
  fprintf(stderr, "%s%s: %s\n",
          "find"
          ": ",
          message, error);
  return ret;
}


x86 assembly (clang, -O0):
<_find_error_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec5(%rip),%rsi
lea    0xec8(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_find_error_user>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r8
mov    %rdi,%rcx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
lea    0xeda(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"%s%s: %s\0A\00"
@.str.1 = [7 x i8] c"find: \00"
define i32 @_find_error_user(i8* %0, i8* %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
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"%s%s: %s\0A\00"
@.str.1 = [7 x i8] c"find: \00"
define i32 @_find_error_user(i8* %0, i8* %1, i32 returned %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_failure(char *);
int /*<<< orphan*/ test_success(char *);
void test_finish(char *name, int status) {
  if (status)
    test_failure(name);
  else
    test_success(name);
}


x86 assembly (clang, -O0):
<test_finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1147 <test_finish+0x27>
mov    -0x8(%rbp),%rdi
call   1040 <test_failure@plt>
jmp    1150 <test_finish+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <test_success@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_finish>:
test   %esi,%esi
je     1129 <test_finish+0x9>
jmp    1040 <test_failure@plt>
jmp    1030 <test_success@plt>

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

LLVM IR (-O2):
define void @test_finish(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @test_failure(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @test_success(i8* %0)
br label %8
8: ; preds = %6, %4
ret void
}
void nand_read_byte(unsigned long offset, void *buf) {
  *(volatile unsigned char *)buf = *(volatile unsigned char *)offset;
}


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

x86 assembly (clang, -O2):
<nand_read_byte>:
mov    (%rdi),%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @nand_read_byte(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = inttoptr i64 %5 to i8*
%7 = load volatile i8, i8* %6
%8 = load i8*, i8** %4
store volatile i8 %7, i8* %8
ret void
}

LLVM IR (-O2):
define void @nand_read_byte(i64 %0, i8* %1) {
%3 = inttoptr i64 %0 to i8*
%4 = load volatile i8, i8* %3
store volatile i8 %4, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doit(char *);
int /*<<< orphan*/ exit(int);
int main(int argc, char **argv) {
  doit("1234567");
  exit(1);
}


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    0xec3(%rip),%rdi
call   1030 <doit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <doit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"1234567\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 @doit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"1234567\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @doit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
void av_opt_eval_int() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_eval_int() {
ret void
}