xunge/DecIR huggingface dataset:
void vec2_divide(float *dst, float *b) {
  dst[0] = dst[0] / b[0];
  dst[1] = dst[1] / b[1];
}


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

x86 assembly (clang, -O2):
<vec2_divide>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
divss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
divss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @vec2_divide(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fdiv float %3, %4
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fdiv float %7, %9
store float %10, float* %6
ret void
}
int ilog2(int x) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @ilog2(i32 %0) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("this is cmd2!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"this is cmd2!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int soma(int n1, int n2) {
  int soma = 0;
  for (int i = n1; i < n2; i++)
    soma += i;
  return soma;
}


x86 assembly (clang, -O0):
<soma>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113a <soma+0x3a>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1117 <soma+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<soma>:
xor    %eax,%eax
cmp    %esi,%edi
jge    1122 <soma+0x22>
mov    %edi,%ecx
not    %ecx
add    %esi,%ecx
lea    0x1(%rdi),%eax
imul   %ecx,%eax
sub    %edi,%esi
add    $0xfffffffe,%esi
imul   %rcx,%rsi
shr    %rsi
add    %edi,%eax
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @soma(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = xor i32 %0, -1
%6 = add i32 %5, %1
%7 = add nsw i32 %0, 1
%8 = mul i32 %6, %7
%9 = zext i32 %6 to i33
%10 = add i32 %1, -2
%11 = sub i32 %10, %0
%12 = zext i32 %11 to i33
%13 = mul i33 %9, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = add i32 %8, %0
%17 = add i32 %16, %15
br label %18
18: ; preds = %4, %2
%19 = phi i32 [ 0, %2 ], [ %17, %4 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ fputsn(int, char *, int);
int print_to_base(int, char *, int);
int print_oct(int fd, int n) {
  int count;
  char buffer[20] = {0};
  count = print_to_base(n, buffer, 8);
  fputsn(fd, buffer, count);
  return count;
}


x86 assembly (clang, -O0):
<print_oct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1050 <print_to_base@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <fputsn@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_oct>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%r14
mov    %esi,%edi
mov    %r14,%rsi
mov    $0x8,%edx
call   1040 <print_to_base@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <fputsn@plt>
mov    %ebp,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @print_oct(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [20 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast [20 x i8]* %6 to i8*
%8 = load i32, i32* %4
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%10 = call i32 @print_to_base(i32 %8, i8* %9, i32 8)
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%13 = load i32, i32* %5
%14 = call i32 @fputsn(i32 %11, i8* %12, i32 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @print_oct(i32 %0, i32 %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @print_to_base(i32 %1, i8* %4, i32 8)
%6 = call i32 @fputsn(i32 %0, i8* %4, i32 %5)
ret i32 %5
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int syscall(int, char const *, struct timeval const *);
int utimes(const char *path, const struct timeval times[2]) {
  return syscall(30, path, times);
}


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

x86 assembly (clang, -O2):
<utimes>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1e,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i8*
%4 = alloca %struct.timeval*
store i8* %0, i8** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load i8*, i8** %3
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = call i32 @syscall(i32 30, i8* %5, %struct.timeval* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = tail call i32 @syscall(i32 30, i8* %0, %struct.timeval* %1)
ret i32 %3
}
void readLinkedList() {}


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

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

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

LLVM IR (-O2):
define void @readLinkedList() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ substituteWildcard(char *, int, int /*<<< orphan*/);
int main() {
  char str[] = "1?100?1";
  printf("Result of substituting for ? in %s with 0 or 1:\n", str);
  substituteWildcard(str, 8, 0);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
xor    %edx,%edx
call   1050 <substituteWildcard@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x313f3030313f31,%rax
mov    %rax,0x8(%rsp)
lea    0xeb5(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %edx,%edx
call   1050 <substituteWildcard@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [8 x i8] c"1?100?1\00"
@.str = [49 x i8] c"Result of substituting for ? in %s with 0 or 1:\0A\00"
define i32 @main() {
%1 = alloca [8 x i8]
%2 = bitcast [8 x i8]* %1 to i8*
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%6 = call i32 @substituteWildcard(i8* %5, i32 8, i32 0)
%7 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"Result of substituting for ? in %s with 0 or 1:\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 13861750058336049, i64* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @substituteWildcard(i8* %2, i32 8, i32 0)
%5 = call i32 (...) @getchar()
ret i32 0
}
__attribute__((section("test"))) void test4_bar() {}


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

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

LLVM IR (-O0):
define void @test4_bar() section "test" {
ret void
}

LLVM IR (-O2):
define void @test4_bar() section "test" {
ret void
}
z(p, i) char *i;
{}


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

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

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

LLVM IR (-O2):
define i32 @z(i32 %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcmp_for_qsort(const void *aa, const void *bb) {
  const char **a = (const char **)aa;
  const char **b = (const char **)bb;
  return strcmp(*a, *b);
}


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

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

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

LLVM IR (-O2):
define i32 @strcmp_for_qsort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  for (i = 2; i < 101; i += 2) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
add    $0x2,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x63,%ebx
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 2, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 2
%5 = icmp ult i32 %2, 99
br i1 %5, label %1, label %6
6: ; preds = %1
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISLNK(int /*<<< orphan*/);
scalar_t__ lstat(char const *, struct stat *);
int mc_path_islink(const char *filename) {
  struct stat st;
  if (0 != lstat(filename, &st)) {
    return 0;
  }
  return !!S_ISLNK(st.st_mode);
}


x86 assembly (clang, -O0):
<mc_path_islink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <lstat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1153 <mc_path_islink+0x33>
movl   $0x0,-0x4(%rbp)
jmp    116d <mc_path_islink+0x4d>
mov    -0x18(%rbp),%edi
call   1030 <S_ISLNK@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_path_islink>:
push   %rax
mov    %rsp,%rsi
call   1040 <lstat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <mc_path_islink+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISLNK@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @mc_path_islink(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @lstat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 0, %6
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %17
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISLNK(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @mc_path_islink(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @lstat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISLNK(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
int SCFree(void *buffer) {
  (buffer);
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @SCFree(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct nlmsghdr {
  int /*<<< orphan*/ nlmsg_len;
};

/* Variables and functions */
int NLMSG_ALIGN(int /*<<< orphan*/);
struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining) {
  int totlen = NLMSG_ALIGN(nlh->nlmsg_len);
  *remaining -= totlen;
  return (struct nlmsghdr *)((unsigned char *)nlh + totlen);
}


x86 assembly (clang, -O0):
<nlmsg_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <NLMSG_ALIGN@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlmsg_next>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <NLMSG_ALIGN@plt>
sub    %eax,(%r14)
cltq
add    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.nlmsghdr = type { i32 }
define %struct.nlmsghdr* @nlmsg_next(%struct.nlmsghdr* %0, i32* %1) {
%3 = alloca %struct.nlmsghdr*
%4 = alloca i32*
%5 = alloca i32
store %struct.nlmsghdr* %0, %struct.nlmsghdr** %3
store i32* %1, i32** %4
%6 = load %struct.nlmsghdr*, %struct.nlmsghdr** %3
%7 = getelementptr inbounds %struct.nlmsghdr, %struct.nlmsghdr* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @NLMSG_ALIGN(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = sub nsw i32 %12, %10
store i32 %13, i32* %11
%14 = load %struct.nlmsghdr*, %struct.nlmsghdr** %3
%15 = bitcast %struct.nlmsghdr* %14 to i8*
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = bitcast i8* %18 to %struct.nlmsghdr*
ret %struct.nlmsghdr* %19
}

LLVM IR (-O2):
%struct.nlmsghdr = type { i32 }
define %struct.nlmsghdr* @nlmsg_next(%struct.nlmsghdr* %0, i32* nocapture %1) {
%3 = getelementptr inbounds %struct.nlmsghdr, %struct.nlmsghdr* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 @NLMSG_ALIGN(i32 %4)
%6 = load i32, i32* %1
%7 = sub nsw i32 %6, %5
store i32 %7, i32* %1
%8 = bitcast %struct.nlmsghdr* %0 to i8*
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = bitcast i8* %10 to %struct.nlmsghdr*
ret %struct.nlmsghdr* %11
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ atol(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 2)
    exit(0);
  kill(atol(argv[1]), SIGKILL);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1157 <main+0x27>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1153 <main+0x23>
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    0x2e9a(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atol(i8* %13)
%15 = load i32, i32* @SIGKILL
%16 = call i32 @kill(i32 %14, i32 %15)
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atol(i8* %8)
%10 = load i32, i32* @SIGKILL
%11 = tail call i32 @kill(i32 %9, i32 %10)
ret i32 0
}
int ones(void) { return 111; }


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

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

LLVM IR (-O0):
define i32 @ones() {
ret i32 111
}

LLVM IR (-O2):
define i32 @ones() {
ret i32 111
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void test(char *data) { fprintf(stderr, "%s\n", data); }


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

x86 assembly (clang, -O2):
<test>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @test(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ gzFile;

/* Variables and functions */
scalar_t__ Z_OK;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ gzclose(scalar_t__);
int /*<<< orphan*/ stderr;
void close_fixed_fastq(gzFile fd) {
  if (fd == 0) {
    return;
  }
  if (gzclose(fd) != Z_OK) {
    fprintf(stderr, "\nError: unable to close file descriptor\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<close_fixed_fastq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114c <close_fixed_fastq+0x1c>
jmp    1184 <close_fixed_fastq+0x54>
mov    -0x8(%rbp),%rdi
call   1030 <gzclose@plt>
mov    0x2e94(%rip),%rcx
cmp    (%rcx),%rax
je     1184 <close_fixed_fastq+0x54>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe8b(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_fixed_fastq>:
push   %rax
test   %rdi,%rdi
je     1147 <close_fixed_fastq+0x17>
call   1030 <gzclose@plt>
mov    0x2eae(%rip),%rcx
cmp    (%rcx),%rax
jne    1149 <close_fixed_fastq+0x19>
pop    %rax
ret
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@Z_OK = global i64 0
@stderr = global i32 0
@.str = [41 x i8] c"\0AError: unable to close file descriptor\0A\00"
define void @close_fixed_fastq(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %15
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i64 @gzclose(i64 %7)
%9 = load i64, i64* @Z_OK
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %5, %6
ret void
}

LLVM IR (-O2):
@Z_OK = global i64 0
@stderr = global i32 0
@.str = [41 x i8] c"\0AError: unable to close file descriptor\0A\00"
define void @close_fixed_fastq(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i64 @gzclose(i64 %0)
%5 = load i64, i64* @Z_OK
%6 = icmp eq i64 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %1, %3
ret void
}
int sgx_oc_cpuidex(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @sgx_oc_cpuidex() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sgx_oc_cpuidex() {
ret i32 1
}
int INHERENT_utimes() { return 1; }


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

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

LLVM IR (-O0):
define i32 @INHERENT_utimes() {
ret i32 1
}

LLVM IR (-O2):
define i32 @INHERENT_utimes() {
ret i32 1
}
int wtypePtr_compare(const void *e1, const void *e2) {
  return (long)e1 - (long)e2;
}


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

x86 assembly (clang, -O2):
<wtypePtr_compare>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @wtypePtr_compare(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @wtypePtr_compare(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int foo4(int, int);
int bar5(int a) { return foo4(1, a); }


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

x86 assembly (clang, -O2):
<bar5>:
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <foo4@plt>

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

LLVM IR (-O2):
define i32 @bar5(i32 %0) {
%2 = tail call i32 @foo4(i32 1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void write_int(int i) { printf("%d", i); }


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

x86 assembly (clang, -O2):
<write_int>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @write_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print(void *user, const char *str) {
  (void)user;
  printf("%s", str);
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @print(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** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void sunxi_serial_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @sunxi_serial_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ function(int, int, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int x;
  x = 0;
  function(1, 2, 3);
  x = 1;
  printf("%d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <function@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <function@plt>
lea    0xec4(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 @function(i32 1, i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned long);
int /*<<< orphan*/ sfv_mmap_calc_crc32(char *, unsigned long *);
int main(int argc, char *argv[]) {
  unsigned long crc;
  sfv_mmap_calc_crc32(argv[1], &crc);
  printf("%s %08lx\n", argv[1], crc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <sfv_mmap_calc_crc32@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x18(%rbp),%rdx
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
call   1030 <sfv_mmap_calc_crc32@plt>
mov    0x8(%rbx),%rsi
mov    0x8(%rsp),%rdx
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%s %08lx\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sfv_mmap_calc_crc32(i8* %6, i64* %3)
%8 = load i8*, i8** %5
%9 = load i64, i64* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8, i64 %9)
ret i32 0
}
void rcrv_(geom) float geom[4][4];
{ rcrv(geom); }


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

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

LLVM IR (-O0):
define void @rcrv_([4 x float]* %0) {
%2 = alloca [4 x float]*
store [4 x float]* %0, [4 x float]** %2
%3 = load [4 x float]*, [4 x float]** %2
%4 = call i32 ([4 x float]*, ...) bitcast (i32 (...)* @rcrv to i32 ([4 x float]*, ...)*)([4 x float]* %3)
ret void
}

LLVM IR (-O2):
define void @rcrv_([4 x float]* %0) {
%2 = tail call i32 ([4 x float]*, ...) bitcast (i32 (...)* @rcrv to i32 ([4 x float]*, ...)*)([4 x float]* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CrestInit();
void __globinit_faculty(void) {
  { __CrestInit(); }
}


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

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

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

LLVM IR (-O2):
define void @__globinit_faculty() {
%1 = tail call i32 (...) @__CrestInit()
ret void
}
void stFreeTokens(char *inputString, char *delimiter, char ***tokenString) {
  int i;
  int count = stCountTokens(inputString, delimiter);
  for (i = 0; i < count; i++)
    free((*tokenString)[i]);
  free(*tokenString);
}


x86 assembly (clang, -O0):
<stFreeTokens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <stCountTokens@plt>
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    117b <stFreeTokens+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114d <stFreeTokens+0x2d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stFreeTokens>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
xor    %eax,%eax
call   1040 <stCountTokens@plt>
test   %eax,%eax
jle    1155 <stFreeTokens+0x35>
mov    %eax,%r15d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rax
mov    (%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <stFreeTokens+0x20>
mov    (%r14),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @stFreeTokens(i8* %0, i8* %1, i8*** nocapture %2) {
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @stCountTokens to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = zext i32 %4 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = load i8**, i8*** %2
%11 = getelementptr inbounds i8*, i8** %10, i64 %9
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %3
%16 = bitcast i8*** %2 to i8**
%17 = load i8*, i8** %16
tail call void @free(i8* %17)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_tx_byte(unsigned char);
void __console_tx_char(unsigned char byte) { uart_tx_byte(byte); }


x86 assembly (clang, -O0):
<__console_tx_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <uart_tx_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_char>:
jmp    1030 <uart_tx_byte@plt>

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

LLVM IR (-O2):
define void @__console_tx_char(i8 zeroext %0) {
%2 = tail call i32 @uart_tx_byte(i8 zeroext %0)
ret void
}
int main(void) {
  __asm__ __volatile__("nop;");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "nop;", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
void RTMemEfDup(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfDup() {
ret void
}
int co_abs(int val) { return val < 0 ? val * (-1) : val; }


x86 assembly (clang, -O0):
<co_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111d <co_abs+0x1d>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <co_abs+0x23>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @co_abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, -1
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @co_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int bottom_bit(unsigned int bits) {
  int res;
  __asm__(" xorl %[res],%[res];\n"
          " decl %[res];\n"
          " bsfl %[bits],%[res]\n"
          : [res] "=&r"(res)
          : [bits] "rm"(bits));
  return res;
}


x86 assembly (clang, -O0):
<bottom_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
dec    %eax
bsf    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bottom_bit>:
mov    %edi,-0x4(%rsp)
xor    %eax,%eax
dec    %eax
bsf    -0x4(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @bottom_bit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm " xorl $0,$0;\0A decl $0;\0A bsfl $1,$0\0A", "=&r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @bottom_bit(i32 %0) {
%2 = tail call i32 asm " xorl $0,$0;\0A decl $0;\0A bsfl $1,$0\0A", "=&r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i32 %2
}
void willusgui_semaphore_release(void *semaphore) {}


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

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

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

LLVM IR (-O2):
define void @willusgui_semaphore_release(i8* nocapture %0) {
ret void
}
void vfree(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<vfree>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfree>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.vfree = [6 x i8] c"vfree\00"
define void @vfree() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.vfree, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.vfree = [6 x i8] c"vfree\00"
define void @vfree() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.vfree, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, ...);
int main() {
  const int limit = 100;
  const int *const cpci = &limit;
  const int *const *pcpci;
  printf("%d\n %p\n", *cpci, *pcpci);
  pcpci = &cpci;
  printf("%d\n", **pcpci);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x64,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d\0A %p\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 100, i32* undef)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 100)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef void DIR;

/* Variables and functions */
void *opendir(char *);
int /*<<< orphan*/ wcstombs(char *, int /*<<< orphan*/ const *, int);
__attribute__((visibility("default"))) void *
osal_search_dir_open(const wchar_t *_pathname) {
  char pathname[260];
  wcstombs(pathname, _pathname, 260);
  DIR *dir;
  dir = opendir(pathname);
  return dir;
}


x86 assembly (clang, -O0):
<osal_search_dir_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x104,%edx
call   1040 <wcstombs@plt>
lea    -0x110(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osal_search_dir_open>:
push   %rbx
sub    $0x110,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x104,%edx
call   1040 <wcstombs@plt>
mov    %rbx,%rdi
call   1030 <opendir@plt>
add    $0x110,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @osal_search_dir_open(i32* %0) {
%2 = alloca [260 x i8]
%3 = getelementptr inbounds [260 x i8], [260 x i8]* %2, i64 0, i64 0
%4 = call i32 @wcstombs(i8* %3, i32* %0, i32 260)
%5 = call i8* @opendir(i8* %3)
ret i8* %5
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
int statfs(const char *path, struct statfs *buf) {
  int success;
  int size_path;
  success = __infer_nondet_int();
  size_path = __get_array_size(path);
  struct statfs s;
  *buf = s;
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<statfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statfs>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
xor    %eax,%eax
test   %ebp,%ebp
setle  %al
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.statfs = type { i32 }
define i32 @statfs(i8* %0, %struct.statfs* %1) {
%3 = alloca i8*
%4 = alloca %struct.statfs*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.statfs
store i8* %0, i8** %3
store %struct.statfs* %1, %struct.statfs** %4
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = call i32 @__get_array_size(i8* %9)
store i32 %10, i32* %6
%11 = load %struct.statfs*, %struct.statfs** %4
%12 = bitcast %struct.statfs* %11 to i8*
%13 = bitcast %struct.statfs* %7 to i8*
%14 = load i32, i32* %5
%15 = icmp sgt i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 -1
ret i32 %17
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
define i32 @statfs(i8* %0, %struct.statfs* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = tail call i32 @__get_array_size(i8* %0)
%5 = icmp slt i32 %3, 1
%6 = sext i1 %5 to i32
ret i32 %6
}