xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_complex_matrix_element();
int /*<<< orphan*/ test_copy_to_dynamic_array();
int /*<<< orphan*/ test_diagonalize_hermitian_matrix();
int /*<<< orphan*/ test_hermitian_matrix_element();
int /*<<< orphan*/ test_hermitian_matrix_mean_value();
int /*<<< orphan*/ test_multiply_by_hermitian_matrix();
int /*<<< orphan*/ test_scalar_product_and_norm();
int main(void) {
  test_hermitian_matrix_mean_value();
  test_hermitian_matrix_element();
  test_scalar_product_and_norm();
  test_multiply_by_hermitian_matrix();
  test_complex_matrix_element();
  test_copy_to_dynamic_array();
  test_diagonalize_hermitian_matrix();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_hermitian_matrix_mean_value@plt>
mov    $0x0,%al
call   1030 <test_hermitian_matrix_element@plt>
mov    $0x0,%al
call   1050 <test_scalar_product_and_norm@plt>
mov    $0x0,%al
call   1080 <test_multiply_by_hermitian_matrix@plt>
mov    $0x0,%al
call   1060 <test_complex_matrix_element@plt>
mov    $0x0,%al
call   1040 <test_copy_to_dynamic_array@plt>
mov    $0x0,%al
call   1090 <test_diagonalize_hermitian_matrix@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_hermitian_matrix_mean_value@plt>
xor    %eax,%eax
call   1030 <test_hermitian_matrix_element@plt>
xor    %eax,%eax
call   1050 <test_scalar_product_and_norm@plt>
xor    %eax,%eax
call   1080 <test_multiply_by_hermitian_matrix@plt>
xor    %eax,%eax
call   1060 <test_complex_matrix_element@plt>
xor    %eax,%eax
call   1040 <test_copy_to_dynamic_array@plt>
xor    %eax,%eax
call   1090 <test_diagonalize_hermitian_matrix@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_hermitian_matrix_mean_value()
%3 = call i32 (...) @test_hermitian_matrix_element()
%4 = call i32 (...) @test_scalar_product_and_norm()
%5 = call i32 (...) @test_multiply_by_hermitian_matrix()
%6 = call i32 (...) @test_complex_matrix_element()
%7 = call i32 (...) @test_copy_to_dynamic_array()
%8 = call i32 (...) @test_diagonalize_hermitian_matrix()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_hermitian_matrix_mean_value()
%2 = tail call i32 (...) @test_hermitian_matrix_element()
%3 = tail call i32 (...) @test_scalar_product_and_norm()
%4 = tail call i32 (...) @test_multiply_by_hermitian_matrix()
%5 = tail call i32 (...) @test_complex_matrix_element()
%6 = tail call i32 (...) @test_copy_to_dynamic_array()
%7 = tail call i32 (...) @test_diagonalize_hermitian_matrix()
ret i32 0
}
/* Variables and functions */
char *corta_string(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *s = "Hello world";
  s = corta_string(s);
  printf("%s\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <corta_string@plt>
lea    0xed8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @corta_string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ criar_threads_de_forma_ordenada(int *);
int /*<<< orphan*/ criar_threads_de_qualquer_forma();
int /*<<< orphan*/ sleep(int);
int main() {
  int min = 1;
  criar_threads_de_qualquer_forma();
  sleep(1);
  criar_threads_de_forma_ordenada(&min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1040 <criar_threads_de_qualquer_forma@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    -0x8(%rbp),%rdi
call   1030 <criar_threads_de_forma_ordenada@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
xor    %eax,%eax
call   1040 <criar_threads_de_qualquer_forma@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0x4(%rsp),%rdi
call   1030 <criar_threads_de_forma_ordenada@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (...) @criar_threads_de_qualquer_forma()
%4 = call i32 @sleep(i32 1)
%5 = call i32 @criar_threads_de_forma_ordenada(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = tail call i32 (...) @criar_threads_de_qualquer_forma()
%4 = tail call i32 @sleep(i32 1)
%5 = call i32 @criar_threads_de_forma_ordenada(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int read(int, char *, int);
int main(void) {
  int fd, n;
  char buf[10];
  fd = open("foo/bar/xyzzy", O_RDONLY);
  printf("fd = %d\n", fd);
  n = read(fd, buf, 10);
  printf("n = %d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x16(%rbp),%rsi
mov    $0xa,%edx
call   1040 <read@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
lea    0xebb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0x6(%rsp),%rsi
mov    %ebx,%edi
mov    $0xa,%edx
call   1040 <read@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"foo/bar/xyzzy\00"
@O_RDONLY = global i32 0
@.str.1 = [9 x i8] c"fd = %d\0A\00"
@.str.2 = [8 x i8] c"n = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i8]
store i32 0, i32* %1
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%11 = call i32 @read(i32 %9, i8* %10, i32 10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"foo/bar/xyzzy\00"
@O_RDONLY = global i32 0
@.str.1 = [9 x i8] c"fd = %d\0A\00"
@.str.2 = [8 x i8] c"n = %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @read(i32 %4, i8* %2, i32 10)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int special(const char *s) {
  char c;
  char b;
  switch (*s) {
  case '^':
    b = *++s;
    if (b == '?') {
      c = b | 0x40;
    } else {
      c = b & 0x1f;
    }
    break;
  default:
    c = *s;
    break;
  }
  return c;
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
sub    $0x5e,%al
jne    115b <special+0x5b>
jmp    111b <special+0x1b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    0x1(%rax),%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
cmp    $0x3f,%eax
jne    114c <special+0x4c>
movsbl -0xa(%rbp),%eax
or     $0x40,%eax
mov    %al,-0x9(%rbp)
jmp    1156 <special+0x56>
movsbl -0xa(%rbp),%eax
and    $0x1f,%eax
mov    %al,-0x9(%rbp)
jmp    1164 <special+0x64>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
mov    (%rdi),%al
cmp    $0x5e,%al
jne    111b <special+0x1b>
mov    0x1(%rdi),%al
mov    %eax,%ecx
and    $0x1f,%cl
cmp    $0x3f,%al
movzbl %cl,%ecx
mov    $0x7f,%eax
cmovne %ecx,%eax
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @special(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %26 [
i32 94, label %8
]
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %10
store i8 %11, i8* %4
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 63
br i1 %14, label %15, label %20
15: ; preds = %8
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = or i32 %17, 64
%19 = trunc i32 %18 to i8
store i8 %19, i8* %3
br label %25
20: ; preds = %8
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = and i32 %22, 31
%24 = trunc i32 %23 to i8
store i8 %24, i8* %3
br label %25
25: ; preds = %20, %15
br label %29
26: ; preds = %1
%27 = load i8*, i8** %2
%28 = load i8, i8* %27
store i8 %28, i8* %3
br label %29
29: ; preds = %26, %25
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @special(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 94
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 63
%8 = and i8 %6, 31
%9 = select i1 %7, i8 127, i8 %8
br label %10
10: ; preds = %4, %1
%11 = phi i8 [ %2, %1 ], [ %9, %4 ]
%12 = sext i8 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func1(void) { printf("func1\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"func1\00"
define void @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t void_to_num(void *v) { return (uint64_t)v; }


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

x86 assembly (clang, -O2):
<void_to_num>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @void_to_num(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int write(int, char *, int);
void makeoutput(char *buf, int len) {
  if (write(1, buf, len) < len) {
    perror("write");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<makeoutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
cmp    -0xc(%rbp),%eax
jge    116f <makeoutput+0x3f>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeoutput>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1030 <write@plt>
cmp    %ebx,%eax
jl     1148 <makeoutput+0x18>
pop    %rbx
ret
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"write\00"
define void @makeoutput(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @write(i32 1, i8* %5, i32 %6)
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
define void @makeoutput(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @write(i32 1, i8* %0, i32 %1)
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ my_strlen(char *);
int write(int, char *, int /*<<< orphan*/);
void my_putstr(char *str) {
  int a;
  a = write(1, str, my_strlen(str));
  if (a == -1) {
    my_putstr("Error on write\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<my_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1190 <my_putstr+0x50>
lea    0xe7f(%rip),%rdi
call   1050 <my_putstr@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
je     115f <my_putstr+0x1f>
pop    %rbx
ret
lea    0xe9a(%rip),%rdi
call   1050 <my_putstr@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Error on write\0A\00"
define void @my_putstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @my_strlen(i8* %5)
%7 = call i32 @write(i32 1, i8* %4, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Error on write\0A\00"
define void @my_putstr(i8* %0) {
%2 = tail call i32 @my_strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
tail call void @my_putstr(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ absolute();
int /*<<< orphan*/ ror16addr(int /*<<< orphan*/);
void rorAbs16(void) { ror16addr(absolute()); }


x86 assembly (clang, -O0):
<rorAbs16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <absolute@plt>
mov    %eax,%edi
call   1040 <ror16addr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rorAbs16>:
push   %rax
xor    %eax,%eax
call   1030 <absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ror16addr@plt>

LLVM IR (-O0):
define void @rorAbs16() {
%1 = call i32 (...) @absolute()
%2 = call i32 @ror16addr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @rorAbs16() {
%1 = tail call i32 (...) @absolute()
%2 = tail call i32 @ror16addr(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_aupdate_read_begin() {
  printf("NOT IMPLEMENTED:"
         "pa_aupdate_read_begin"
         "\n");
}


x86 assembly (clang, -O0):
<pa_aupdate_read_begin>:
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_aupdate_read_begin>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_aupdate_read_begin\00"
define i32 @pa_aupdate_read_begin() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int id2(int);
int id(int x) {
  if (x == 0)
    return 0;
  return id2(x - 1) + 1;
}


x86 assembly (clang, -O0):
<id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <id+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1142 <id+0x32>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <id2@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id>:
test   %edi,%edi
je     1125 <id+0x15>
push   %rax
add    $0xffffffff,%edi
call   1030 <id2@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @id2(i32 %9)
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %12
12: ; preds = %7, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @id(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @id2(i32 %4)
%6 = add nsw i32 %5, 1
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
__typeof__(isprint(1)) test_isprint_43(void) { return isprint(1); }


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

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

LLVM IR (-O0):
define i32 @test_isprint_43() {
%1 = call i32 @isprint(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isprint_43() {
%1 = tail call i32 @isprint(i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ write32(int, int /*<<< orphan*/);
void aes_empty_iv(void) {
  int i;
  for (i = 0; i < 4; i++)
    write32((0xd020000 + 0x010), 0);
}


x86 assembly (clang, -O0):
<aes_empty_iv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    1143 <aes_empty_iv+0x33>
mov    $0xd020010,%edi
xor    %esi,%esi
call   1030 <write32@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <aes_empty_iv+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_empty_iv>:
push   %rax
mov    $0xd020010,%edi
xor    %esi,%esi
call   1030 <write32@plt>
mov    $0xd020010,%edi
xor    %esi,%esi
call   1030 <write32@plt>
mov    $0xd020010,%edi
xor    %esi,%esi
call   1030 <write32@plt>
mov    $0xd020010,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <write32@plt>

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

LLVM IR (-O2):
define void @aes_empty_iv() {
%1 = tail call i32 @write32(i32 218234896, i32 0)
%2 = tail call i32 @write32(i32 218234896, i32 0)
%3 = tail call i32 @write32(i32 218234896, i32 0)
%4 = tail call i32 @write32(i32 218234896, i32 0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void ADCSequenceUnderflowClear(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  ASSERT(ui32SequenceNum < 4);
  (*((volatile uint32_t *)(ui32Base + 0x00000018))) = 1 << ui32SequenceNum;
}


x86 assembly (clang, -O0):
<ADCSequenceUnderflowClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <ADCSequenceUnderflowClear+0x2d>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x4,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x18,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceUnderflowClear>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1030 <ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
movslq %ebp,%rcx
mov    %eax,0x18(%rcx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @ADCSequenceUnderflowClear(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 = icmp eq i32 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @ASSERT(i32 %16)
%18 = load i32, i32* %4
%19 = shl i32 1, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 24
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store volatile i32 %19, i32* %23
ret void
}

LLVM IR (-O2):
define void @ADCSequenceUnderflowClear(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = shl nuw i32 1, %1
%11 = add nsw i32 %0, 24
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
ret void
}
/* Variables and functions */
int f60(int *);
int f61(int *p) { return f60(p); }


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

x86 assembly (clang, -O2):
<f61>:
jmp    1030 <f60@plt>

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

LLVM IR (-O2):
define i32 @f61(i32* %0) {
%2 = tail call i32 @f60(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, char const *,
                           char const *);
void error(FILE *fp, const char *location, const char *msg, int sec, int step) {
  fprintf(fp, "(wt=%d,ms=%d) Error at %s: %s\n", sec, step, location, msg);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
mov    %rdx,%r9
mov    %rsi,%rax
lea    0xee3(%rip),%rsi
mov    %ecx,%edx
mov    %r8d,%ecx
mov    %rax,%r8
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"(wt=%d,ms=%d) Error at %s: %s\0A\00"
define void @error(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %9
%13 = load i32, i32* %10
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"(wt=%d,ms=%d) Error at %s: %s\0A\00"
define void @error(i32* nocapture %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_card_info_list() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_card_info_list"
         "\n");
}


x86 assembly (clang, -O0):
<pa_context_get_card_info_list>:
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_context_get_card_info_list>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [46 x i8] c"NOT IMPLEMENTED:pa_context_get_card_info_list\00"
define i32 @pa_context_get_card_info_list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
void *realloc(void *, size_t);
void *of_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


x86 assembly (clang, -O0):
<of_realloc>:
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 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<of_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @of_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int __raw_readb(int);
int board_is_ts7250(void) { return __raw_readb(0xfebff000) == 0x01; }


x86 assembly (clang, -O0):
<board_is_ts7250>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfebff000,%edi
call   1030 <__raw_readb@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_ts7250>:
push   %rax
mov    $0xfebff000,%edi
call   1030 <__raw_readb@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @board_is_ts7250() {
%1 = call i32 @__raw_readb(i32 -20975616)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @board_is_ts7250() {
%1 = tail call i32 @__raw_readb(i32 -20975616)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
void randomseed(int seeds[]) {
  seeds[1] = 123456;
  seeds[2] = 234567;
  seeds[3] = 345678;
}


x86 assembly (clang, -O0):
<randomseed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1e240,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x39447,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x5464e,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomseed>:
movabs $0x394470001e240,%rax
mov    %rax,0x4(%rdi)
movl   $0x5464e,0xc(%rdi)
ret

LLVM IR (-O0):
define void @randomseed(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 123456, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
store i32 234567, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
store i32 345678, i32* %8
ret void
}

LLVM IR (-O2):
define void @randomseed(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 123456, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 2
store i32 234567, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 3
store i32 345678, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FreeLinedefs();
int /*<<< orphan*/ FreeSectors();
int /*<<< orphan*/ FreeSegs();
int /*<<< orphan*/ FreeSidedefs();
int /*<<< orphan*/ FreeSubsecs();
int /*<<< orphan*/ FreeThings();
int /*<<< orphan*/ FreeVertices();
int /*<<< orphan*/ FreeWallTips();
void FreeLevel(void) {
  FreeVertices();
  FreeSidedefs();
  FreeLinedefs();
  FreeSectors();
  FreeThings();
  FreeSegs();
  FreeSubsecs();
  FreeWallTips();
}


x86 assembly (clang, -O0):
<FreeLevel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <FreeVertices@plt>
mov    $0x0,%al
call   10a0 <FreeSidedefs@plt>
mov    $0x0,%al
call   1050 <FreeLinedefs@plt>
mov    $0x0,%al
call   1090 <FreeSectors@plt>
mov    $0x0,%al
call   1030 <FreeThings@plt>
mov    $0x0,%al
call   1060 <FreeSegs@plt>
mov    $0x0,%al
call   1040 <FreeSubsecs@plt>
mov    $0x0,%al
call   1070 <FreeWallTips@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeLevel>:
push   %rax
xor    %eax,%eax
call   1080 <FreeVertices@plt>
xor    %eax,%eax
call   10a0 <FreeSidedefs@plt>
xor    %eax,%eax
call   1050 <FreeLinedefs@plt>
xor    %eax,%eax
call   1090 <FreeSectors@plt>
xor    %eax,%eax
call   1030 <FreeThings@plt>
xor    %eax,%eax
call   1060 <FreeSegs@plt>
xor    %eax,%eax
call   1040 <FreeSubsecs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <FreeWallTips@plt>

LLVM IR (-O0):
define void @FreeLevel() {
%1 = call i32 (...) @FreeVertices()
%2 = call i32 (...) @FreeSidedefs()
%3 = call i32 (...) @FreeLinedefs()
%4 = call i32 (...) @FreeSectors()
%5 = call i32 (...) @FreeThings()
%6 = call i32 (...) @FreeSegs()
%7 = call i32 (...) @FreeSubsecs()
%8 = call i32 (...) @FreeWallTips()
ret void
}

LLVM IR (-O2):
define void @FreeLevel() {
%1 = tail call i32 (...) @FreeVertices()
%2 = tail call i32 (...) @FreeSidedefs()
%3 = tail call i32 (...) @FreeLinedefs()
%4 = tail call i32 (...) @FreeSectors()
%5 = tail call i32 (...) @FreeThings()
%6 = tail call i32 (...) @FreeSegs()
%7 = tail call i32 (...) @FreeSubsecs()
%8 = tail call i32 (...) @FreeWallTips()
ret void
}
double Double_copy(double *x) { return *x; }


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

x86 assembly (clang, -O2):
<Double_copy>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @Double_copy(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @Double_copy(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
/* Type definitions */
struct MIDIMessageFormat {
  int dummy;
};
struct MIDIMessageData {
  int dummy;
};

/* Variables and functions */
int MIDIMessageFormatEncodeRunningStatus(struct MIDIMessageFormat *,
                                         struct MIDIMessageData *,
                                         int /*<<< orphan*/ *, size_t, void *,
                                         size_t *);
int MIDIMessageFormatEncode(struct MIDIMessageFormat *format,
                            struct MIDIMessageData *data, size_t size,
                            void *buffer, size_t *written) {
  return MIDIMessageFormatEncodeRunningStatus(format, data, NULL, size, buffer,
                                              written);
}


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

x86 assembly (clang, -O2):
<MIDIMessageFormatEncode>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <MIDIMessageFormatEncodeRunningStatus@plt>

LLVM IR (-O0):
%struct.MIDIMessageFormat = type { i32 }
%struct.MIDIMessageData = type { i32 }
define i32 @MIDIMessageFormatEncode(%struct.MIDIMessageFormat* %0, %struct.MIDIMessageData* %1, i64 %2, i8* %3, i64* %4) {
%6 = alloca %struct.MIDIMessageFormat*
%7 = alloca %struct.MIDIMessageData*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64*
store %struct.MIDIMessageFormat* %0, %struct.MIDIMessageFormat** %6
store %struct.MIDIMessageData* %1, %struct.MIDIMessageData** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64* %4, i64** %10
%11 = load %struct.MIDIMessageFormat*, %struct.MIDIMessageFormat** %6
%12 = load %struct.MIDIMessageData*, %struct.MIDIMessageData** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64*, i64** %10
%16 = call i32 @MIDIMessageFormatEncodeRunningStatus(%struct.MIDIMessageFormat* %11, %struct.MIDIMessageData* %12, i32* null, i64 %13, i8* %14, i64* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.MIDIMessageFormat = type { i32 }
%struct.MIDIMessageData = type { i32 }
define i32 @MIDIMessageFormatEncode(%struct.MIDIMessageFormat* %0, %struct.MIDIMessageData* %1, i64 %2, i8* %3, i64* %4) {
%6 = tail call i32 @MIDIMessageFormatEncodeRunningStatus(%struct.MIDIMessageFormat* %0, %struct.MIDIMessageData* %1, i32* null, i64 %2, i8* %3, i64* %4)
ret i32 %6
}
char *test_myAdd_normal(const char **_ja_name) {
  do {
    *_ja_name = __func__;
    if (!(myAdd(4, 6) == 10))
      return "4 + 6 == 10";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_myAdd_normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x4,%edi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <myAdd@plt>
cmp    $0xa,%eax
je     1154 <test_myAdd_normal+0x44>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <test_myAdd_normal+0x51>
jmp    1159 <test_myAdd_normal+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_myAdd_normal>:
push   %rbx
lea    0xee8(%rip),%rax
mov    %rax,(%rdi)
xor    %ebx,%ebx
mov    $0x4,%edi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <myAdd@plt>
cmp    $0xa,%eax
lea    0xeda(%rip),%rax
cmovne %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@__func__.test_myAdd_normal = [18 x i8] c"test_myAdd_normal\00"
@.str = [12 x i8] c"4 + 6 == 10\00"
define i8* @test_myAdd_normal(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8** %0, i8*** %3
br label %4
4: ; preds = %1
%5 = load i8**, i8*** %3
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_myAdd_normal, i64 0, i64 0), i8** %5
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @myAdd to i32 (i32, i32, ...)*)(i32 4, i32 6)
%7 = icmp eq i32 %6, 10
br i1 %7, label %9, label %8
8: ; preds = %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
9: ; preds = %4
br label %10
10: ; preds = %9
store i8* null, i8** %2
br label %11
11: ; preds = %10, %8
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@__func__.test_myAdd_normal = [18 x i8] c"test_myAdd_normal\00"
@.str = [12 x i8] c"4 + 6 == 10\00"
define i8* @test_myAdd_normal(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.test_myAdd_normal, i64 0, i64 0), i8** %0
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @myAdd to i32 (i32, i32, ...)*)(i32 4, i32 6)
%3 = icmp eq i32 %2, 10
%4 = select i1 %3, i8* null, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ brain_free_(void *);
void cont_dispose_key_(void *in_context, void *in_key) {
  if (in_key)
    brain_free_(in_key);
}


x86 assembly (clang, -O0):
<cont_dispose_key_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <cont_dispose_key_+0x24>
mov    -0x10(%rbp),%rdi
call   1030 <brain_free_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cont_dispose_key_>:
test   %rsi,%rsi
je     111d <cont_dispose_key_+0xd>
mov    %rsi,%rdi
jmp    1030 <brain_free_@plt>
ret

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

LLVM IR (-O2):
define void @cont_dispose_key_(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @brain_free_(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_pipe(int signo) { printf("catch SIGPIPE:%d\n", signo); }


x86 assembly (clang, -O0):
<sig_pipe>:
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):
<sig_pipe>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"catch SIGPIPE:%d\0A\00"
define void @sig_pipe(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
unsigned long GetFileLen316();
unsigned long getfilelen() { return GetFileLen316(); }


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

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

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

LLVM IR (-O2):
define i64 @getfilelen() {
%1 = tail call i64 (...) @GetFileLen316()
ret i64 %1
}
/* Type definitions */
struct clk {
  int dummy;
};

/* Variables and functions */
struct clk *clk_fixed(char const *, int);
struct clk *mxs_clk_fixed(const char *name, int rate) {
  return clk_fixed(name, rate);
}


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

x86 assembly (clang, -O2):
<mxs_clk_fixed>:
jmp    1030 <clk_fixed@plt>

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

LLVM IR (-O2):
%struct.clk = type { i32 }
define %struct.clk* @mxs_clk_fixed(i8* %0, i32 %1) {
%3 = tail call %struct.clk* @clk_fixed(i8* %0, i32 %1)
ret %struct.clk* %3
}
/* Variables and functions */
double M_PI;
double circle_area(double radius) { return M_PI * radius * radius; }


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

x86 assembly (clang, -O2):
<circle_area>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @circle_area(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* @M_PI
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @circle_area(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fmul double %3, %0
ret double %4
}
int main() {
  unsigned long t1 = -1;
  char t2 = 1;
  return t1 + t2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movb   $0x1,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbq -0x11(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8
store i32 0, i32* %1
store i64 -1, i64* %2
store i8 1, i8* %3
%4 = load i64, i64* %2
%5 = load i8, i8* %3
%6 = sext i8 %5 to i64
%7 = add i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fib(int n, int *array) { return array[n]; }


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
movslq %edi,%rax
mov    (%rsi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @fib(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @fib(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
int acl_copy_int_native() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @acl_copy_int_native() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void cmdErrorHandlingFunc(char *errMessage) {
  printf("Error: %s\n", errMessage);
}


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

x86 assembly (clang, -O2):
<cmdErrorHandlingFunc>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @cmdErrorHandlingFunc(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) {
  ZEND_VM_NEXT_OPCODE();
}


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

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

LLVM IR (-O0):
define i32 @ZEND_EXT_NOP_SPEC_HANDLER(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @ZEND_VM_NEXT_OPCODE()
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @ZEND_EXT_NOP_SPEC_HANDLER(i32 %0) {
%2 = tail call i32 (...) @ZEND_VM_NEXT_OPCODE()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
uint8_t imm8(FILE *file) {
  uint8_t byte;
  if (fread(&byte, sizeof(uint8_t), 1, file) == 1)
    return byte;
  return 0;
}


x86 assembly (clang, -O0):
<imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    1147 <imm8+0x37>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <imm8+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm8>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1135 <imm8+0x25>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @imm8(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 0
ret i32 %7
}
void foo711() {}


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

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

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

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


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

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

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

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