xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
pid_t getpid(void) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @getpid() {
%1 = tail call i32 (...) @__infer_nondet_int()
ret i32 %1
}
void gtk_text_iter_get_marks() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_marks() {
ret void
}
int erdSingleLineWhiteSeparators(char t) { return ((t == '\t') + (t == ' ')); }


x86 assembly (clang, -O0):
<erdSingleLineWhiteSeparators>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl -0x1(%rbp),%ecx
cmp    $0x20,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<erdSingleLineWhiteSeparators>:
xor    %ecx,%ecx
cmp    $0x9,%dil
sete   %cl
xor    %eax,%eax
cmp    $0x20,%dil
sete   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @erdSingleLineWhiteSeparators(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 9
%6 = zext i1 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 32
%10 = zext i1 %9 to i32
%11 = add nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @erdSingleLineWhiteSeparators(i8 signext %0) {
%2 = icmp eq i8 %0, 9
%3 = zext i1 %2 to i32
%4 = icmp eq i8 %0, 32
%5 = zext i1 %4 to i32
%6 = add nuw nsw i32 %3, %5
ret i32 %6
}
void free_3d_double(double ***ptr) {
  free(ptr[0][0]);
  free(ptr[0]);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<free_3d_double>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_3d_double(double*** %0) {
%2 = alloca double***
store double*** %0, double**** %2
%3 = load double***, double**** %2
%4 = getelementptr inbounds double**, double*** %3, i64 0
%5 = load double**, double*** %4
%6 = getelementptr inbounds double*, double** %5, i64 0
%7 = load double*, double** %6
%8 = bitcast double* %7 to i8*
%9 = load double***, double**** %2
%10 = getelementptr inbounds double**, double*** %9, i64 0
%11 = load double**, double*** %10
%12 = bitcast double** %11 to i8*
%13 = load double***, double**** %2
%14 = bitcast double*** %13 to i8*
ret void
}

LLVM IR (-O2):
define void @free_3d_double(double*** nocapture %0) {
%2 = bitcast double*** %0 to i8***
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast double*** %0 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = bitcast double*** %0 to i8*
tail call void @free(i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ game_loop();
int /*<<< orphan*/ show_credits();
int /*<<< orphan*/ show_endgame();
int /*<<< orphan*/ show_select_map();
int /*<<< orphan*/ show_select_weapon();
int /*<<< orphan*/ show_title();
void main(void) {
  while (1) {
    show_title();
    show_select_map();
    show_select_weapon();
    game_loop();
    show_endgame();
    show_credits();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1169 <main+0x9>
mov    $0x0,%al
call   1080 <show_title@plt>
mov    $0x0,%al
call   1040 <show_select_map@plt>
mov    $0x0,%al
call   1070 <show_select_weapon@plt>
mov    $0x0,%al
call   1030 <game_loop@plt>
mov    $0x0,%al
call   1060 <show_endgame@plt>
mov    $0x0,%al
call   1050 <show_credits@plt>
jmp    1169 <main+0x9>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1080 <show_title@plt>
xor    %eax,%eax
call   1040 <show_select_map@plt>
xor    %eax,%eax
call   1070 <show_select_weapon@plt>
xor    %eax,%eax
call   1030 <game_loop@plt>
xor    %eax,%eax
call   1060 <show_endgame@plt>
xor    %eax,%eax
call   1050 <show_credits@plt>
jmp    1170 <main+0x10>

LLVM IR (-O0):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @show_title()
%3 = call i32 (...) @show_select_map()
%4 = call i32 (...) @show_select_weapon()
%5 = call i32 (...) @game_loop()
%6 = call i32 (...) @show_endgame()
%7 = call i32 (...) @show_credits()
br label %1
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @show_title()
%3 = tail call i32 (...) @show_select_map()
%4 = tail call i32 (...) @show_select_weapon()
%5 = tail call i32 (...) @game_loop()
%6 = tail call i32 (...) @show_endgame()
%7 = tail call i32 (...) @show_credits()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ qsort_r(void *, size_t, int (*)(void const *, void const *),
                           int /*<<< orphan*/, size_t);
void qsort(void *base, size_t nmemb, size_t size,
           int (*compare)(const void *, const void *)) {
  qsort_r(base, size, compare, 0, nmemb - 1);
}


x86 assembly (clang, -O0):
<qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%r8
sub    $0x1,%r8
xor    %ecx,%ecx
call   1030 <qsort_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
lea    -0x1(%rsi),%r8
mov    %rdx,%rsi
mov    %rcx,%rdx
xor    %ecx,%ecx
jmp    1030 <qsort_r@plt>

LLVM IR (-O0):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %7
%11 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%12 = load i64, i64* %6
%13 = sub i64 %12, 1
%14 = call i32 @qsort_r(i8* %9, i64 %10, i32 (i8*, i8*)* %11, i32 0, i64 %13)
ret void
}

LLVM IR (-O2):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = add i64 %1, -1
%6 = tail call i32 @qsort_r(i8* %0, i64 %2, i32 (i8*, i8*)* %3, i32 0, i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_64(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @free_64(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
void *aligned_malloc(int, int);
void __ompc_task_firstprivates_alloc(void **firstprivates, int size) {
  *firstprivates = aligned_malloc(size, 64);
}


x86 assembly (clang, -O0):
<__ompc_task_firstprivates_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x40,%esi
call   1030 <aligned_malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ompc_task_firstprivates_alloc>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    $0x40,%esi
call   1030 <aligned_malloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__ompc_task_firstprivates_alloc(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 = call i8* @aligned_malloc(i32 %5, i32 64)
%7 = load i8**, i8*** %3
store i8* %6, i8** %7
ret void
}

LLVM IR (-O2):
define void @__ompc_task_firstprivates_alloc(i8** nocapture writeonly %0, i32 %1) {
%3 = tail call i8* @aligned_malloc(i32 %1, i32 64)
store i8* %3, i8** %0
ret void
}
/* Variables and functions */
int other_func_a(int, int);
int other_func_b(int, int);
int test_22(int a, int b, int c, int d) {
  if ((a < 0) == (b < 0))
    return other_func_a(a, b);
  else
    return other_func_b(c, d);
}


x86 assembly (clang, -O0):
<test_22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0xc(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1168 <test_22+0x48>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <other_func_a@plt>
mov    %eax,-0x4(%rbp)
jmp    1176 <test_22+0x56>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <other_func_b@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_22>:
mov    %esi,%eax
xor    %edi,%eax
js     112b <test_22+0xb>
jmp    1030 <other_func_a@plt>
mov    %edx,%edi
mov    %ecx,%esi
jmp    1040 <other_func_b@plt>

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

LLVM IR (-O2):
define i32 @test_22(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = xor i32 %1, %0
%6 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @other_func_a(i32 %0, i32 %1)
br label %11
9: ; preds = %4
%10 = tail call i32 @other_func_b(i32 %2, i32 %3)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(const int a[], const int size) {
  for (int i = 0; i < size; i++)
    printf("%d ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
char *getcwd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int main(void) {
  char *pwd;
  if ((pwd = getcwd(0, 0)) == 0) {
    fputs("pwd: error: can't get working dir\n", stderr);
    return 1;
  }
  puts(pwd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1050 <getcwd@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <main+0x47>
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
lea    0xe9a(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x1,-0x4(%rbp)
jmp    1187 <main+0x57>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
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    %edi,%edi
xor    %esi,%esi
call   1050 <getcwd@plt>
test   %rax,%rax
je     114b <main+0x1b>
mov    %rax,%rdi
call   1030 <puts@plt>
jmp    1165 <main+0x35>
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
lea    0xea5(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"pwd: error: can't get working dir\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @getcwd(i32 0, i32 0)
store i8* %3, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 1, i32* %1
br label %11
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = call i32 @puts(i8* %9)
store i32 0, i32* %1
br label %11
11: ; preds = %8, %5
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [35 x i8] c"pwd: error: can't get working dir\0A\00"
@stderr = global i32 0
define i32 @main() {
%1 = tail call i8* @getcwd(i32 0, i32 0)
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %8
6: ; preds = %0
%7 = tail call i32 @puts(i8* %1)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ 1, %3 ], [ 0, %6 ]
ret i32 %9
}
/* Type definitions */
struct octeon_recv_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree(struct octeon_recv_info *);
void octeon_free_recv_info(struct octeon_recv_info *recv_info) {
  kfree(recv_info);
}


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

x86 assembly (clang, -O2):
<octeon_free_recv_info>:
jmp    1030 <kfree@plt>

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

LLVM IR (-O2):
%struct.octeon_recv_info = type { i32 }
define void @octeon_free_recv_info(%struct.octeon_recv_info* %0) {
%2 = tail call i32 @kfree(%struct.octeon_recv_info* %0)
ret void
}
unsigned short UpdateCrc14443(unsigned char ch, unsigned short *lpwCrc) {
  ch = (ch ^ (unsigned char)((*lpwCrc) & 0x00FF));
  ch = (ch ^ (ch << 4));
  *lpwCrc = (*lpwCrc >> 8) ^ ((unsigned short)ch << 8) ^
            ((unsigned short)ch << 3) ^ ((unsigned short)ch >> 4);
  return (*lpwCrc);
}


x86 assembly (clang, -O0):
<UpdateCrc14443>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzwl (%rcx),%ecx
and    $0xff,%ecx
movzbl %cl,%ecx
xor    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x1(%rbp),%ecx
shl    $0x4,%ecx
xor    %ecx,%eax
mov    %al,-0x1(%rbp)
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
sar    $0x8,%eax
movzbl -0x1(%rbp),%ecx
movzwl %cx,%ecx
shl    $0x8,%ecx
xor    %ecx,%eax
movzbl -0x1(%rbp),%ecx
movzwl %cx,%ecx
shl    $0x3,%ecx
xor    %ecx,%eax
movzbl -0x1(%rbp),%ecx
movzwl %cx,%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpdateCrc14443>:
movzwl (%rsi),%ecx
xor    %ecx,%edi
mov    %edi,%eax
shl    $0x4,%al
xor    %dil,%al
shr    $0x8,%ecx
movzbl %al,%eax
mov    %eax,%edx
shl    $0x8,%edx
or     %ecx,%edx
lea    0x0(,%rax,8),%ecx
shr    $0x4,%eax
xor    %ecx,%eax
xor    %edx,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define zeroext i16 @UpdateCrc14443(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i16*, i16** %4
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
%10 = and i32 %9, 255
%11 = trunc i32 %10 to i8
%12 = zext i8 %11 to i32
%13 = xor i32 %6, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 4
%20 = xor i32 %16, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %3
%22 = load i16*, i16** %4
%23 = load i16, i16* %22
%24 = zext i16 %23 to i32
%25 = ashr i32 %24, 8
%26 = load i8, i8* %3
%27 = zext i8 %26 to i16
%28 = zext i16 %27 to i32
%29 = shl i32 %28, 8
%30 = xor i32 %25, %29
%31 = load i8, i8* %3
%32 = zext i8 %31 to i16
%33 = zext i16 %32 to i32
%34 = shl i32 %33, 3
%35 = xor i32 %30, %34
%36 = load i8, i8* %3
%37 = zext i8 %36 to i16
%38 = zext i16 %37 to i32
%39 = ashr i32 %38, 4
%40 = xor i32 %35, %39
%41 = trunc i32 %40 to i16
%42 = load i16*, i16** %4
store i16 %41, i16* %42
%43 = load i16*, i16** %4
%44 = load i16, i16* %43
ret i16 %44
}

LLVM IR (-O2):
define zeroext i16 @UpdateCrc14443(i8 zeroext %0, i16* nocapture %1) {
%3 = load i16, i16* %1
%4 = trunc i16 %3 to i8
%5 = xor i8 %4, %0
%6 = shl i8 %5, 4
%7 = xor i8 %6, %5
%8 = lshr i16 %3, 8
%9 = zext i16 %8 to i32
%10 = zext i8 %7 to i32
%11 = shl nuw nsw i32 %10, 8
%12 = or i32 %11, %9
%13 = shl nuw nsw i32 %10, 3
%14 = lshr i32 %10, 4
%15 = xor i32 %14, %13
%16 = xor i32 %15, %12
%17 = trunc i32 %16 to i16
store i16 %17, i16* %1
ret i16 %17
}
int soma2(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<soma2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<soma2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @soma2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
double sqrt(double);
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1136 <dist+0x26>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
ret
movapd %xmm2,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @dist(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = load double, double* %8
%16 = load double, double* %6
%17 = fsub double %15, %16
%18 = load double, double* %8
%19 = load double, double* %6
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @dist(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %0
%6 = fsub double %3, %1
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
unsigned setbits(unsigned x, int p, int n, unsigned y) {
  return (x & ~((~(~0 << n)) << (p + 1 - n))) |
         ((y & ~(~0 << n)) << (p + 1 - n));
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%esi
shl    %cl,%esi
mov    %esi,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    %eax,%edx
shl    %cl,%edx
not    %edx
and    %edi,%edx
and    %r8d,%eax
shl    %cl,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %2
%6 = xor i32 %5, -1
%7 = add nsw i32 %1, 1
%8 = sub i32 %7, %2
%9 = shl i32 %6, %8
%10 = xor i32 %9, -1
%11 = and i32 %10, %0
%12 = and i32 %6, %3
%13 = shl i32 %12, %8
%14 = or i32 %11, %13
ret i32 %14
}
int trimMinMax(int val, int min, int max) {
  if (val < min)
    return min;
  if (val > max)
    return max;
  return val;
}


x86 assembly (clang, -O0):
<trimMinMax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <trimMinMax+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <trimMinMax+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <trimMinMax+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <trimMinMax+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimMinMax>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @trimMinMax(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int f1(int y, int x) { return x | (y & (~x)); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = or i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int BOB_MCBOB();
int main(int argc, char **argv) { return BOB_MCBOB(); }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
jmp    1030 <BOB_MCBOB@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 (...) @BOB_MCBOB()
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @BOB_MCBOB()
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool I2CMasterBusy(uint32_t ui32Base) {
  ;
  if ((*((volatile uint32_t *)(ui32Base + 0x00000004))) & 0x00000001) {
    return (true);
  } else {
    return (false);
  }
}


x86 assembly (clang, -O0):
<I2CMasterBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1129 <I2CMasterBusy+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1130 <I2CMasterBusy+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @I2CMasterBusy(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 4
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @I2CMasterBusy(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ make_symbol(char *, int /*<<< orphan*/ *);
void init_reserved_words(void) {
  make_symbol("nil", NULL);
  make_symbol("t", NULL);
}


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

x86 assembly (clang, -O2):
<init_reserved_words>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <make_symbol@plt>
lea    0xede(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <make_symbol@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"nil\00"
@.str.1 = [2 x i8] c"t\00"
define void @init_reserved_words() {
%1 = call i32 @make_symbol(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = call i32 @make_symbol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"nil\00"
@.str.1 = [2 x i8] c"t\00"
define void @init_reserved_words() {
%1 = tail call i32 @make_symbol(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = tail call i32 @make_symbol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void intro() { puts("HBASIC v0.1\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"HBASIC v0.1\0A\00"
define void @intro() {
%1 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"HBASIC v0.1\0A\00"
define void @intro() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int main() {
  f();
  g();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @g()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @g()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ConvertInstrument16(short *, long);
void ConvertInstrumentOut16(register short *tempPtr, register long sSize) {
  ConvertInstrument16(tempPtr, sSize);
}


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

x86 assembly (clang, -O2):
<ConvertInstrumentOut16>:
jmp    1030 <ConvertInstrument16@plt>

LLVM IR (-O0):
define void @ConvertInstrumentOut16(i16* %0, i64 %1) {
%3 = alloca i16*
%4 = alloca i64
store i16* %0, i16** %3
store i64 %1, i64* %4
%5 = load i16*, i16** %3
%6 = load i64, i64* %4
%7 = call i32 @ConvertInstrument16(i16* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @ConvertInstrumentOut16(i16* %0, i64 %1) {
%3 = tail call i32 @ConvertInstrument16(i16* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *const);
void vec_del(double *const vector) { free(vector - 1); }


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

x86 assembly (clang, -O2):
<vec_del>:
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @vec_del(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 -1
%5 = call i32 @free(double* %4)
ret void
}

LLVM IR (-O2):
define void @vec_del(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 -1
%3 = tail call i32 @free(double* %2)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_disassoc(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x0000 | 0x00A0);
}


x86 assembly (clang, -O0):
<ieee80211_is_disassoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xa0,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_disassoc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xa0,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_disassoc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 160)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_disassoc(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 160)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int phPlaceCall2(char const *, char const *, void *, int /*<<< orphan*/);
int phPlaceCall(const char *from, const char *uri, void *userData) {
  return phPlaceCall2(from, uri, userData, 0);
}


x86 assembly (clang, -O0):
<phPlaceCall>:
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    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <phPlaceCall2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phPlaceCall>:
xor    %ecx,%ecx
jmp    1030 <phPlaceCall2@plt>

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

LLVM IR (-O2):
define i32 @phPlaceCall(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @phPlaceCall2(i8* %0, i8* %1, i8* %2, i32 0)
ret i32 %4
}
int c034(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @c034() {
ret i32 0
}

LLVM IR (-O2):
define i32 @c034() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void demo_sleep(void) {
  while (1)
    usleep(10);
}


x86 assembly (clang, -O0):
<demo_sleep>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <demo_sleep+0x9>
mov    $0xa,%edi
call   1030 <usleep@plt>
jmp    1119 <demo_sleep+0x9>

x86 assembly (clang, -O2):
<demo_sleep>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <usleep@plt>
jmp    1120 <demo_sleep+0x10>

LLVM IR (-O0):
define void @demo_sleep() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @usleep(i32 10)
br label %1
}

LLVM IR (-O2):
define void @demo_sleep() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @usleep(i32 10)
br label %1
}
int is_hex_char(char x) {
  return (('0' <= x && x <= '9') || ('a' <= x && x <= 'f') ||
          ('A' <= x && x <= 'F'));
}


x86 assembly (clang, -O0):
<is_hex_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     112d <is_hex_char+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <is_hex_char+0x79>
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1150 <is_hex_char+0x50>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <is_hex_char+0x79>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x41,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     1173 <is_hex_char+0x73>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_char>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hex_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 97, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 65, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_hex_char(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_thread_free() {
  printf("NOT IMPLEMENTED:"
         "pa_thread_free"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_thread_free\0A\00"
define i32 @pa_thread_free() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_thread_free\00"
define i32 @pa_thread_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
double __attribute__((cold)) f2(double f) { return __builtin_rint(f); }


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

x86 assembly (clang, -O2):
<f2>:
jmp    1030 <rint@plt>
cs nopw 0x0(%rax,%rax,1)
nop

LLVM IR (-O0):
define double @f2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.rint.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @f2(double %0) {
%2 = tail call double @llvm.rint.f64(double %0)
ret double %2
}
void VecScalarDiv3fv(float v[3], const float a[3], float s) {
  v[0] = a[0] / s;
  v[1] = a[1] / s;
  v[2] = a[2] / s;
}


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

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

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

LLVM IR (-O2):
define void @VecScalarDiv3fv(float* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fdiv float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fdiv float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = fdiv float %11, %2
%13 = getelementptr inbounds float, float* %0, i64 2
store float %12, float* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ IN_RANGE_INC(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ outb(int, int);
void pic_send_eoi(int irq) {
  ASSERT(IN_RANGE_INC(irq, 0, 15));
  if (irq >= 8) {
    outb(0xA0, 0x20);
  }
  outb(0x20, 0x20);
}


x86 assembly (clang, -O0):
<pic_send_eoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0xf,%edx
call   1040 <IN_RANGE_INC@plt>
mov    %eax,%edi
call   1050 <ASSERT@plt>
cmpl   $0x8,-0x4(%rbp)
jl     116a <pic_send_eoi+0x3a>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_send_eoi>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
mov    $0xf,%edx
call   1040 <IN_RANGE_INC@plt>
mov    %eax,%edi
call   1050 <ASSERT@plt>
cmp    $0x8,%ebx
jl     115a <pic_send_eoi+0x2a>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x20,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pic_send_eoi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @IN_RANGE_INC(i32 %3, i32 0, i32 15)
%5 = call i32 @ASSERT(i32 %4)
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 8
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @outb(i32 160, i32 32)
br label %10
10: ; preds = %8, %1
%11 = call i32 @outb(i32 32, i32 32)
ret void
}

LLVM IR (-O2):
define void @pic_send_eoi(i32 %0) {
%2 = tail call i32 @IN_RANGE_INC(i32 %0, i32 0, i32 15)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = icmp sgt i32 %0, 7
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @outb(i32 160, i32 32)
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @outb(i32 32, i32 32)
ret void
}
void UART2_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @UART2_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_socket();
int /*<<< orphan*/ loop_event();
int main(int argc, char *argv[]) {
  init_socket();
  loop_event();
  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)
mov    $0x0,%al
call   1040 <init_socket@plt>
mov    $0x0,%al
call   1030 <loop_event@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_socket@plt>
xor    %eax,%eax
call   1030 <loop_event@plt>
xor    %eax,%eax
pop    %rcx
ret

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 (...) @init_socket()
%7 = call i32 (...) @loop_event()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_socket()
%4 = tail call i32 (...) @loop_event()
ret i32 0
}
void gdk_gc_set_values() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_set_values() {
ret void
}
/* Variables and functions */
size_t bnode_value(size_t index) { return ((index) << 1); }


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

x86 assembly (clang, -O2):
<bnode_value>:
lea    (%rdi,%rdi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @bnode_value(i64 %0) {
%2 = shl i64 %0, 1
ret i64 %2
}
int arch_print_syscall() {}


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

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

LLVM IR (-O0):
define i32 @arch_print_syscall() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @arch_print_syscall() {
ret i32 undef
}
void g_param_value_set_default() {}


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

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

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

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