xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ foo(int, int);
int main() {
  int a = 10;
  int b = 0;
  if (foo(a, b))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <foo@plt>
cmp    $0x0,%rax
je     114e <main+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <main+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
xor    %esi,%esi
call   1030 <foo@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i32 10, i32 0)
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ ushort;
typedef scalar_t__ uint;

/* Variables and functions */
int neq(uint x, uint y) { return (ushort)x != (ushort)y; }


x86 assembly (clang, -O0):
<neq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<neq>:
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @neq(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ne i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @neq(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x5a() {
  Assert_real((iscntrl(90) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              455, ("iscntrl should be 0 for Z"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x5a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5a,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1c7,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x5a>:
push   %rax
mov    $0x5a,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1c7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for Z\00"
define void @t_iscntrl_0x5a() {
%1 = call i64 @iscntrl(i32 90)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for Z\00"
define void @t_iscntrl_0x5a() {
%1 = tail call i64 @iscntrl(i32 90)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int unsignedint_ignoring_unsignedlong(unsigned int x,
                                               unsigned long y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @unsignedint_ignoring_unsignedlong(i32 returned %0, i64 %1) {
ret i32 %0
}
void ND_Keyboard_Init() {}


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

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

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

LLVM IR (-O2):
define void @ND_Keyboard_Init() {
ret void
}
void kfile_init() { ; }


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

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

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

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

/* Variables and functions */
int syscall(int, int, struct sembuf *, size_t, struct timespec const *);
int semtimedop(int id, struct sembuf *buf, size_t n,
               const struct timespec *ts) {
  return syscall(312, id, buf, n, ts);
}


x86 assembly (clang, -O0):
<semtimedop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x138,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semtimedop>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x138,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.sembuf = type { i32 }
%struct.timespec = type { i32 }
define i32 @semtimedop(i32 %0, %struct.sembuf* %1, i64 %2, %struct.timespec* %3) {
%5 = alloca i32
%6 = alloca %struct.sembuf*
%7 = alloca i64
%8 = alloca %struct.timespec*
store i32 %0, i32* %5
store %struct.sembuf* %1, %struct.sembuf** %6
store i64 %2, i64* %7
store %struct.timespec* %3, %struct.timespec** %8
%9 = load i32, i32* %5
%10 = load %struct.sembuf*, %struct.sembuf** %6
%11 = load i64, i64* %7
%12 = load %struct.timespec*, %struct.timespec** %8
%13 = call i32 @syscall(i32 312, i32 %9, %struct.sembuf* %10, i64 %11, %struct.timespec* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.sembuf = type { i32 }
%struct.timespec = type { i32 }
define i32 @semtimedop(i32 %0, %struct.sembuf* %1, i64 %2, %struct.timespec* %3) {
%5 = tail call i32 @syscall(i32 312, i32 %0, %struct.sembuf* %1, i64 %2, %struct.timespec* %3)
ret i32 %5
}
void foo_2_2_2_2_2_2_2_2_2() {}


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

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

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

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

/* Variables and functions */
__u32 i_blks(const __u32 sz, const __u32 blksz) {
  return sz == 0 ? 0 : (sz - 1) / blksz + 1;
}


x86 assembly (clang, -O0):
<i_blks>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111e <i_blks+0x1e>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    112e <i_blks+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_blks>:
test   %edi,%edi
je     1110 <i_blks+0x10>
add    $0xffffffff,%edi
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @i_blks(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, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %14
8: ; preds = %2
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %4
%12 = sdiv i32 %10, %11
%13 = add nsw i32 %12, 1
br label %14
14: ; preds = %8, %7
%15 = phi i32 [ 0, %7 ], [ %13, %8 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @i_blks(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = sdiv i32 %5, %1
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int W(float *);
int /*<<< orphan*/ X(float *, int);
void O(float *d) { X(d, 1 / W(d)); }


x86 assembly (clang, -O0):
<O>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <W@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <X@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<O>:
push   %rbx
mov    %rdi,%rbx
call   1040 <W@plt>
lea    0x1(%rax),%ecx
xor    %esi,%esi
cmp    $0x3,%ecx
cmovb  %eax,%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <X@plt>

LLVM IR (-O0):
define void @O(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call i32 @W(float* %4)
%6 = sdiv i32 1, %5
%7 = call i32 @X(float* %3, i32 %6)
ret void
}

LLVM IR (-O2):
define void @O(float* %0) {
%2 = tail call i32 @W(float* %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = tail call i32 @X(float* %0, i32 %5)
ret void
}
void ff_videodsp_init_ppc() {}


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

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

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

LLVM IR (-O2):
define void @ff_videodsp_init_ppc() {
ret void
}
/* Variables and functions */
int baz();
int foo();
int main() {
  short k = (0xDFB2L);
  int i = (((0x5405EA32L / (k))));
  return i + foo() + baz();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0xdfb2,-0x6(%rbp)
movswq -0x6(%rbp),%rcx
mov    $0x5405ea32,%eax
cqto
idiv   %rcx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <baz@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <baz@plt>
add    %ebx,%eax
add    $0xfffd6628,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i32
store i32 0, i32* %1
store i16 -8270, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i64
%6 = sdiv i64 1409673778, %5
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (...) @foo()
%10 = add nsw i32 %8, %9
%11 = call i32 (...) @baz()
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = add nsw i32 %1, -170456
%3 = tail call i32 (...) @baz()
%4 = add nsw i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int main(void) {
  char c;
  int *p = &c;
  return *p;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ key_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ ftok(char *, int);
int /*<<< orphan*/ printf(char *);
key_t creo_clave(int id) {
  key_t clave = ftok("/bin/ls", id);
  if (clave == (key_t)-1) {
    printf("Error no puedo conseguir clave\n");
    exit(0);
  }
  return clave;
}


x86 assembly (clang, -O0):
<creo_clave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1050 <ftok@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    116c <creo_clave+0x3c>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creo_clave>:
push   %rax
mov    %edi,%esi
lea    0xec6(%rip),%rdi
call   1050 <ftok@plt>
cmp    $0xffffffffffffffff,%rax
je     1147 <creo_clave+0x17>
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [32 x i8] c"Error no puedo conseguir clave\0A\00"
define i64 @creo_clave(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @ftok(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %1
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
@str = [31 x i8] c"Error no puedo conseguir clave\00"
define i64 @creo_clave(i32 %0) {
%2 = tail call i64 @ftok(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp eq i64 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
void _do_fork() {
  int pid = fork();
  if (pid < 0) {
    exit(EXIT_FAILURE);
  } else if (pid > 0) {
    _exit(EXIT_SUCCESS);
  }
}


x86 assembly (clang, -O0):
<_do_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    115a <_do_fork+0x2a>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1172 <_do_fork+0x42>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
jmp    1177 <_do_fork+0x47>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_do_fork>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
js     1140 <_do_fork+0x10>
jne    114e <_do_fork+0x1e>
pop    %rax
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @_do_fork() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* @EXIT_SUCCESS
%13 = call i32 @_exit(i32 %12)
unreachable
14: ; preds = %8
br label %15
15: ; preds = %14
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @_do_fork() {
%1 = tail call i32 (...) @fork()
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = icmp eq i32 %1, 0
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @_exit(i32 %9)
unreachable
11: ; preds = %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ send_command(struct chirp_client *, int /*<<< orphan*/,
                                char *, int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int64_t chirp_client_pread_begin(struct chirp_client *c, int64_t fd,
                                 void *buffer, int64_t length, int64_t offset,
                                 time_t stoptime) {
  return send_command(c, stoptime, "pread %lld %lld %lld\n", fd, length,
                      offset);
}


x86 assembly (clang, -O0):
<chirp_client_pread_begin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xeb9(%rip),%rdx
call   1030 <send_command@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_pread_begin>:
mov    %r8d,%eax
mov    %ecx,%r8d
mov    %esi,%ecx
lea    0xee1(%rip),%rdx
mov    %r9d,%esi
mov    %eax,%r9d
jmp    1030 <send_command@plt>

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [22 x i8] c"pread %lld %lld %lld\0A\00"
define i32 @chirp_client_pread_begin(%struct.chirp_client* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.chirp_client*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store %struct.chirp_client* %0, %struct.chirp_client** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load %struct.chirp_client*, %struct.chirp_client** %7
%14 = load i32, i32* %12
%15 = load i32, i32* %8
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = call i32 @send_command(%struct.chirp_client* %13, i32 %14, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [22 x i8] c"pread %lld %lld %lld\0A\00"
define i32 @chirp_client_pread_begin(%struct.chirp_client* %0, i32 %1, i8* nocapture readnone %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @send_command(%struct.chirp_client* %0, i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %3, i32 %4)
ret i32 %7
}
int fifo_pop(int *actuel, int nbValeurs) {
  int valeur = actuel[0];
  int i;
  for (i = 0; i < nbValeurs - 1; i++) {
    actuel[i] = actuel[i + 1];
  }
  actuel[nbValeurs - 1] = -1;
  return valeur;
}


x86 assembly (clang, -O0):
<fifo_pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1155 <fifo_pop+0x55>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <fifo_pop+0x1b>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifo_pop>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%r14d
lea    -0x1(%rsi),%ebp
cmp    $0x2,%esi
jl     1134 <fifo_pop+0x24>
lea    0x4(%rbx),%rsi
mov    %ebp,%edx
shl    $0x2,%rdx
mov    %rbx,%rdi
call   1030 <memmove@plt>
movslq %ebp,%rax
movl   $0xffffffff,(%rbx,%rax,4)
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fifo_pop(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add i32 %1, -1
%5 = icmp sgt i32 %1, 1
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = bitcast i32* %0 to i8*
%8 = getelementptr i32, i32* %0, i64 1
%9 = bitcast i32* %8 to i8*
%10 = zext i32 %4 to i64
%11 = shl nuw nsw i64 %10, 2
br label %12
12: ; preds = %6, %2
%13 = sext i32 %4 to i64
%14 = getelementptr inbounds i32, i32* %0, i64 %13
store i32 -1, i32* %14
ret i32 %3
}
/* Variables and functions */
unsigned int dns_nonrandom_32();
unsigned dns_random16(void) {
  unsigned x = dns_nonrandom_32();
  return (x ^ (x >> 16)) & 0xffff;
}


x86 assembly (clang, -O0):
<dns_random16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dns_nonrandom_32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
xor    %ecx,%eax
and    $0xffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_random16>:
push   %rax
xor    %eax,%eax
call   1030 <dns_nonrandom_32@plt>
movzwl %ax,%ecx
shr    $0x10,%eax
xor    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dns_random16() {
%1 = alloca i32
%2 = call i32 (...) @dns_nonrandom_32()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* %1
%5 = lshr i32 %4, 16
%6 = xor i32 %3, %5
%7 = and i32 %6, 65535
ret i32 %7
}

LLVM IR (-O2):
define i32 @dns_random16() {
%1 = tail call i32 (...) @dns_nonrandom_32()
%2 = lshr i32 %1, 16
%3 = and i32 %1, 65535
%4 = xor i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  char *c = "AB";
  char c0 = *c;
  char c1 = *(c + 1);
  assert(c0 == 'A' && c1 == 'B');
  assert(3 + 7 == 10);
  assert(36 == (10 + 15 + 3 + 7) + 1);
  int cond = 1;
  assert(cond == 1);
  int cond2 = 1;
  assert(cond2 == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x12(%rbp)
movsbl -0x11(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x1d(%rbp)
jne    115c <main+0x4c>
movsbl -0x12(%rbp),%eax
cmp    $0x42,%eax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"AB\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
store i8 %8, i8* %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
store i8 %11, i8* %4
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 65
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 66
br label %19
19: ; preds = %15, %0
%20 = phi i1 [ false, %0 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @assert(i32 1)
%24 = call i32 @assert(i32 1)
store i32 1, i32* %5
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 1
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
store i32 1, i32* %6
%29 = load i32, i32* %6
%30 = icmp eq i32 %29, 1
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
ret i32 0
}
int str_len(char str[]) {
  int i;
  for (i = 0; str[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <str_len+0x37>
jmp    1129 <str_len+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @str_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
struct eb_root {
  int dummy;
};
struct eb32_node {
  int dummy;
};

/* Variables and functions */
struct eb32_node *__eb32i_insert(struct eb_root *, struct eb32_node *);
struct eb32_node *eb32i_insert(struct eb_root *root, struct eb32_node *new) {
  return __eb32i_insert(root, new);
}


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

x86 assembly (clang, -O2):
<eb32i_insert>:
jmp    1030 <__eb32i_insert@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.eb32_node = type { i32 }
define %struct.eb32_node* @eb32i_insert(%struct.eb_root* %0, %struct.eb32_node* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca %struct.eb32_node*
store %struct.eb_root* %0, %struct.eb_root** %3
store %struct.eb32_node* %1, %struct.eb32_node** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load %struct.eb32_node*, %struct.eb32_node** %4
%7 = call %struct.eb32_node* @__eb32i_insert(%struct.eb_root* %5, %struct.eb32_node* %6)
ret %struct.eb32_node* %7
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.eb32_node = type { i32 }
define %struct.eb32_node* @eb32i_insert(%struct.eb_root* %0, %struct.eb32_node* %1) {
%3 = tail call %struct.eb32_node* @__eb32i_insert(%struct.eb_root* %0, %struct.eb32_node* %1)
ret %struct.eb32_node* %3
}
char *cgiBooleanShadowPrefix() { return "boolshad."; }


x86 assembly (clang, -O0):
<cgiBooleanShadowPrefix>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiBooleanShadowPrefix>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"boolshad.\00"
define i8* @cgiBooleanShadowPrefix() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"boolshad.\00"
define i8* @cgiBooleanShadowPrefix() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int LZ4_free(void *LZ4_stream) {
  free(LZ4_stream);
  return (0);
}


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

x86 assembly (clang, -O2):
<LZ4_free>:
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @LZ4_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
char *str_quotefin2(char *, char);
char *str_quotefin(char *s) { return str_quotefin2(s, '"'); }


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

x86 assembly (clang, -O2):
<str_quotefin>:
mov    $0x22,%esi
jmp    1030 <str_quotefin2@plt>

LLVM IR (-O0):
define i8* @str_quotefin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @str_quotefin2(i8* %3, i8 signext 34)
ret i8* %4
}

LLVM IR (-O2):
define i8* @str_quotefin(i8* %0) {
%2 = tail call i8* @str_quotefin2(i8* %0, i8 signext 34)
ret i8* %2
}
void load(int flag, double local_nzval[][((128 + 4 - 1) / 4)][(1 << 9)],
          double *nzval, short local_cols[][((128 + 4 - 1) / 4)][(1 << 9)],
          short *cols, int num_rows) {
#pragma HLS inline off
  if (flag) {
    memcpy(local_nzval, nzval, sizeof(double) * (1 << 9) * num_rows);
    memcpy(local_cols, cols, sizeof(short) * (1 << 9) * num_rows);
  }
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1163 <load+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq -0x2c(%rbp),%rdx
shl    $0xc,%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
movslq -0x2c(%rbp),%rdx
shl    $0xa,%rdx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
test   %edi,%edi
je     114e <load+0x3e>
push   %r15
push   %r14
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
movslq %r9d,%rbx
mov    %rbx,%rax
shl    $0xc,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <memcpy@plt>
shl    $0xa,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>
ret

LLVM IR (-O0):
define void @load(i32 %0, [32 x [512 x double]]* %1, double* %2, [32 x [512 x i16]]* %3, i16* %4, i32 %5) {
%7 = alloca i32
%8 = alloca [32 x [512 x double]]*
%9 = alloca double*
%10 = alloca [32 x [512 x i16]]*
%11 = alloca i16*
%12 = alloca i32
store i32 %0, i32* %7
store [32 x [512 x double]]* %1, [32 x [512 x double]]** %8
store double* %2, double** %9
store [32 x [512 x i16]]* %3, [32 x [512 x i16]]** %10
store i16* %4, i16** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %6
%16 = load [32 x [512 x double]]*, [32 x [512 x double]]** %8
%17 = bitcast [32 x [512 x double]]* %16 to i8*
%18 = load double*, double** %9
%19 = bitcast double* %18 to i8*
%20 = load i32, i32* %12
%21 = sext i32 %20 to i64
%22 = mul i64 4096, %21
%23 = load [32 x [512 x i16]]*, [32 x [512 x i16]]** %10
%24 = bitcast [32 x [512 x i16]]* %23 to i8*
%25 = load i16*, i16** %11
%26 = bitcast i16* %25 to i8*
%27 = load i32, i32* %12
%28 = sext i32 %27 to i64
%29 = mul i64 1024, %28
br label %30
30: ; preds = %15, %6
ret void
}

LLVM IR (-O2):
define void @load(i32 %0, [32 x [512 x double]]* nocapture writeonly %1, double* nocapture %2, [32 x [512 x i16]]* nocapture writeonly %3, i16* nocapture %4, i32 %5) {
%7 = icmp eq i32 %0, 0
br i1 %7, label %16, label %8
8: ; preds = %6
%9 = bitcast [32 x [512 x double]]* %1 to i8*
%10 = bitcast double* %2 to i8*
%11 = sext i32 %5 to i64
%12 = shl nsw i64 %11, 12
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %9, i8* align 8 %10, i64 %12, i1 false)
%13 = bitcast [32 x [512 x i16]]* %3 to i8*
%14 = bitcast i16* %4 to i8*
%15 = shl nsw i64 %11, 10
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 2 %13, i8* align 2 %14, i64 %15, i1 false)
br label %16
16: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumNumbers(int *, int);
int main() {
  int nums[5] = {23, 14, -8, 43, 11};
  int sum = sumNumbers(nums, 5);
  printf("Sum is %i\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <sumNumbers@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <sumNumbers@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.nums = [5 x i32] [i32 23, i32 14, i32 -8, i32 43, i32 11]
@.str = [11 x i8] c"Sum is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call i32 @sumNumbers(i32* %5, i32 5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [5 x i32] [i32 23, i32 14, i32 -8, i32 43, i32 11]
@.str = [11 x i8] c"Sum is %i\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @sumNumbers(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int hwlist_mmi_item(const char *value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hwlist_mmi_item(i8* nocapture readnone %0) {
ret i32 0
}
void edi_read_cmd(unsigned char *cmd, unsigned short address) {
  cmd[0] = 0x30;
  cmd[1] = 0x00;
  cmd[2] = (address >> 8) & 0xff;
  cmd[3] = (address >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<edi_read_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x30,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<edi_read_cmd>:
mov    %esi,%eax
movw   $0x30,(%rdi)
mov    %ah,0x2(%rdi)
mov    %al,0x3(%rdi)
ret

LLVM IR (-O0):
define void @edi_read_cmd(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 48, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %8
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 2
store i8 %13, i8* %15
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = ashr i32 %17, 0
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 3
store i8 %20, i8* %22
ret void
}

LLVM IR (-O2):
define void @edi_read_cmd(i8* nocapture writeonly %0, i16 zeroext %1) {
store i8 48, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %3
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %5, i8* %6
%7 = trunc i16 %1 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %7, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ tidy_utmp();
void quit(int status) {
  tidy_utmp();
  exit(status);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tidy_utmp@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <tidy_utmp@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @tidy_utmp()
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @quit(i32 %0) {
%2 = tail call i32 (...) @tidy_utmp()
%3 = tail call i32 @exit(i32 %0)
unreachable
}
int stm_current_tsp(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stm_current_tsp() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ do_wep(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/, int /*<<< orphan*/ const *,
                          int /*<<< orphan*/, int /*<<< orphan*/);
int32_t wep_decrypt(const uint8_t *src, uint8_t *dest, uint32_t len,
                    const uint8_t *wepkey, uint32_t keylen) {
  return do_wep(src, dest, len, wepkey, keylen, 0);
}


x86 assembly (clang, -O0):
<wep_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <do_wep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wep_decrypt>:
xor    %r9d,%r9d
jmp    1030 <do_wep@plt>

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

LLVM IR (-O2):
define i32 @wep_decrypt(i32* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @do_wep(i32* %0, i32* %1, i32 %2, i32* %3, i32 %4, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_eol() { printf("\n"); }


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

x86 assembly (clang, -O2):
<print_eol>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_eol() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct lang_decl {
  int dummy;
};

/* Variables and functions */
scalar_t__ ggc_test_and_set_mark(struct lang_decl *const);
void gt_ggc_mx_lang_decl(void *x_p) {
  struct lang_decl *const x = (struct lang_decl *)x_p;
  if (ggc_test_and_set_mark(x)) {
  }
}


x86 assembly (clang, -O0):
<gt_ggc_mx_lang_decl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ggc_test_and_set_mark@plt>
cmp    $0x0,%rax
je     113c <gt_ggc_mx_lang_decl+0x2c>
jmp    113c <gt_ggc_mx_lang_decl+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_ggc_mx_lang_decl>:
jmp    1030 <ggc_test_and_set_mark@plt>

LLVM IR (-O0):
%struct.lang_decl = type { i32 }
define void @gt_ggc_mx_lang_decl(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.lang_decl*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.lang_decl*
store %struct.lang_decl* %5, %struct.lang_decl** %3
%6 = load %struct.lang_decl*, %struct.lang_decl** %3
%7 = call i64 @ggc_test_and_set_mark(%struct.lang_decl* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.lang_decl = type { i32 }
define void @gt_ggc_mx_lang_decl(i8* %0) {
%2 = bitcast i8* %0 to %struct.lang_decl*
%3 = tail call i64 @ggc_test_and_set_mark(%struct.lang_decl* %2)
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
void bar(char *t) {
  char *tt;
  tt = strrchr(t, '\n');
}


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

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

LLVM IR (-O0):
define void @bar(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 10)
store i8* %5, i8** %3
ret void
}

LLVM IR (-O2):
define void @bar(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct xmms_convert_buffers {
  int dummy;
};

/* Variables and functions */
int convert_mono_to_stereo(struct xmms_convert_buffers *, void **, int,
                           int /*<<< orphan*/);
int convert_mono_to_stereo_8(struct xmms_convert_buffers *buf, void **data,
                             int length) {
  return convert_mono_to_stereo(buf, data, length, (0));
}


x86 assembly (clang, -O0):
<convert_mono_to_stereo_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <convert_mono_to_stereo@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.xmms_convert_buffers = type { i32 }
define i32 @convert_mono_to_stereo_8(%struct.xmms_convert_buffers* %0, i8** %1, i32 %2) {
%4 = tail call i32 @convert_mono_to_stereo(%struct.xmms_convert_buffers* %0, i8** %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
scalar_t__ cut_beginning();
int /*<<< orphan*/ mf_write_midi_event(int, int, char *, int);
void copy_parameter(int chan, int c1, int c2) {
  char data[2];
  if (cut_beginning())
    return;
  data[0] = (char)c1;
  data[1] = (char)c2;
  mf_write_midi_event(0xb0, chan, data, 2);
}


x86 assembly (clang, -O0):
<copy_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1040 <cut_beginning@plt>
cmp    $0x0,%rax
je     1147 <copy_parameter+0x27>
jmp    1169 <copy_parameter+0x49>
mov    -0x8(%rbp),%eax
mov    %al,-0xe(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0xd(%rbp)
mov    -0x4(%rbp),%esi
lea    -0xe(%rbp),%rdx
mov    $0xb0,%edi
mov    $0x2,%ecx
call   1030 <mf_write_midi_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_parameter>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
xor    %eax,%eax
call   1040 <cut_beginning@plt>
test   %rax,%rax
jne    115b <copy_parameter+0x3b>
mov    %bl,0xe(%rsp)
mov    %bpl,0xf(%rsp)
lea    0xe(%rsp),%rdx
mov    $0xb0,%edi
mov    %r14d,%esi
mov    $0x2,%ecx
call   1030 <mf_write_midi_event@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @copy_parameter(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i64 (...) @cut_beginning()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
br label %21
11: ; preds = %3
%12 = load i32, i32* %5
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
store i8 %13, i8* %14
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 1
store i8 %16, i8* %17
%18 = load i32, i32* %4
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%20 = call i32 @mf_write_midi_event(i32 176, i32 %18, i8* %19, i32 2)
br label %21
21: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
define void @copy_parameter(i32 %0, i32 %1, i32 %2) {
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%6 = tail call i64 (...) @cut_beginning()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = trunc i32 %1 to i8
store i8 %9, i8* %5
%10 = trunc i32 %2 to i8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 %10, i8* %11
%12 = call i32 @mf_write_midi_event(i32 176, i32 %0, i8* %5, i32 2)
br label %13
13: ; preds = %3, %8
ret void
}