xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void exit_usage() {
  fprintf(stderr, "Usage: net264 [-p port] [-m max_clients]\n"
                  "\n"
                  "Port defaults to 5500.\n"
                  "Max Clients defaults to 100\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<exit_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [94 x i8] c"Usage: net264 [-p port] [-m max_clients]\0A\0APort defaults to 5500.\0AMax Clients defaults to 100\0A\00"
define void @exit_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [94 x i8] c"Usage: net264 [-p port] [-m max_clients]\0A\0APort defaults to 5500.\0AMax Clients defaults to 100\0A\00"
define void @exit_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
char *memchr(char const *, char, size_t);
size_t vs_strnlen(const char *string, size_t maxlen) {
  const char *end = memchr(string, '\0', maxlen);
  return end ? end - string : maxlen;
}


x86 assembly (clang, -O0):
<vs_strnlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1152 <vs_strnlen+0x42>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    115a <vs_strnlen+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vs_strnlen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memchr@plt>
mov    %rax,%rcx
sub    %rbx,%rcx
test   %rax,%rax
cmove  %r14,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @vs_strnlen(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @memchr(i8* %6, i8 signext 0, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
br label %19
17: ; preds = %2
%18 = load i64, i64* %4
br label %19
19: ; preds = %17, %11
%20 = phi i64 [ %16, %11 ], [ %18, %17 ]
ret i64 %20
}

LLVM IR (-O2):
define i64 @vs_strnlen(i8* %0, i64 %1) {
%3 = tail call i8* @memchr(i8* %0, i8 signext 0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = select i1 %4, i64 %1, i64 %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ close_files();
int /*<<< orphan*/ printf(char *);
void cleanup() {
  printf("Cleaning up.\n");
  close_files();
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <close_files@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <close_files@plt>

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

LLVM IR (-O2):
@str = [13 x i8] c"Cleaning up.\00"
define void @cleanup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @close_files()
ret void
}
int kprintf(const char *format, ...) {
  __builtin_va_list args;
  int result;
  __builtin_va_start(args, format);
  ;
  result = vprintf(format, args);
  __builtin_va_end(args);
  return result;
}


x86 assembly (clang, -O0):
<kprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
test   %al,%al
je     114c <kprintf+0x3c>
movaps %xmm0,-0xb0(%rbp)
movaps %xmm1,-0xa0(%rbp)
movaps %xmm2,-0x90(%rbp)
movaps %xmm3,-0x80(%rbp)
movaps %xmm4,-0x70(%rbp)
movaps %xmm5,-0x60(%rbp)
movaps %xmm6,-0x50(%rbp)
movaps %xmm7,-0x40(%rbp)
mov    %r9,-0xb8(%rbp)
mov    %r8,-0xc0(%rbp)
mov    %rcx,-0xc8(%rbp)
mov    %rdx,-0xd0(%rbp)
mov    %rsi,-0xd8(%rbp)
mov    %rdi,-0x8(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x30,-0x1c(%rbp)
movl   $0x8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <vprintf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kprintf>:
sub    $0xd8,%rsp
mov    %rsi,0x28(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rcx,0x38(%rsp)
mov    %r8,0x40(%rsp)
mov    %r9,0x48(%rsp)
test   %al,%al
je     116b <kprintf+0x5b>
movaps %xmm0,0x50(%rsp)
movaps %xmm1,0x60(%rsp)
movaps %xmm2,0x70(%rsp)
movaps %xmm3,0x80(%rsp)
movaps %xmm4,0x90(%rsp)
movaps %xmm5,0xa0(%rsp)
movaps %xmm6,0xb0(%rsp)
movaps %xmm7,0xc0(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0xe0(%rsp),%rax
mov    %rax,0x8(%rsp)
movabs $0x3000000008,%rax
mov    %rax,(%rsp)
mov    %rsp,%rsi
call   1030 <vprintf@plt>
add    $0xd8,%rsp
ret

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @kprintf(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca [1 x %struct.__va_list_tag]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%6 = bitcast %struct.__va_list_tag* %5 to i8*
%7 = load i8*, i8** %2
%8 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%9 = call i32 @vprintf(i8* %7, %struct.__va_list_tag* %8)
store i32 %9, i32* %4
%10 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%11 = bitcast %struct.__va_list_tag* %10 to i8*
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @kprintf(i8* nocapture %0, ...) {
%2 = alloca [1 x %struct.__va_list_tag]
%3 = bitcast [1 x %struct.__va_list_tag]* %2 to i8*
%4 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %2, i64 0, i64 0
%5 = call i32 @vprintf(i8* %0, %struct.__va_list_tag* %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ memory_free(void *, char *, int);
int /*<<< orphan*/ set_clear(void *);
void set_release(void **S) {
  set_clear(*S);
  ((void)(memory_free((void *)(*S),
                      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/"
                      "heads/master/src/set.c",
                      114),
          (*S) = 0));
}


x86 assembly (clang, -O0):
<set_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <set_clear@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xeba(%rip),%rsi
mov    $0x72,%edx
call   1040 <memory_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_release>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <set_clear@plt>
mov    (%rbx),%rdi
lea    0xeca(%rip),%rsi
mov    $0x72,%edx
call   1040 <memory_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/heads/master/src/set.c\00"
define void @set_release(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i32 @set_clear(i8* %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i64 @memory_free(i8* %7, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 114)
%9 = load i8**, i8*** %2
store i8* null, i8** %9
ret void
}

LLVM IR (-O2):
@.str = [132 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ASMlover/libc/refs/heads/master/src/set.c\00"
define void @set_release(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @set_clear(i8* %2)
%4 = load i8*, i8** %0
%5 = tail call i64 @memory_free(i8* %4, i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 114)
store i8* null, i8** %0
ret void
}
int stat_file(const char *filename) {
  int fd = 0;
  return 0;
}


x86 assembly (clang, -O0):
<stat_file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @stat_file(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int atrshmlog_db_main(int, char **);
int main(int argc, char *argv[]) { return atrshmlog_db_main(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <atrshmlog_db_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @atrshmlog_db_main(i32 %0, i8** %1)
ret i32 %3
}
void ff_hevc_put_hevc_bi_pel_pixels8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels8_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const, int const);
int add(const int num1, const int num2) {
  printf("%i + %i = %i\n", num1, num2, num1 + num2);
  return (0);
}


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

x86 assembly (clang, -O2):
<add>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    (%rdx,%rsi,1),%ecx
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%i + %i = %i\0A\00"
define i32 @add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%i + %i = %i\0A\00"
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret i32 0
}
void motorFatalError(const char msg[]) {}


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

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

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

LLVM IR (-O2):
define void @motorFatalError(i8* nocapture %0) {
ret void
}
void __hv_sub_f(float bIn0, float bIn1, float *bOut) { *bOut = bIn0 - bIn1; }


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

x86 assembly (clang, -O2):
<__hv_sub_f>:
subss  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_sub_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float*, float** %6
store float %9, float* %10
ret void
}

LLVM IR (-O2):
define void @__hv_sub_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fsub float %0, %1
store float %4, float* %2
ret void
}
void enable_smartreflex(int srid) {}


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

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

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

LLVM IR (-O2):
define void @enable_smartreflex(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ error(char *);
char *readLineHelper(char *, int);
char *readLine(void) {
  char *prefix = (char *)calloc(1, 1);
  if (prefix == NULL)
    error("out of memory");
  return readLineHelper(prefix, 16);
}


x86 assembly (clang, -O0):
<readLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115f <readLine+0x2f>
lea    0xea6(%rip),%rdi
call   1050 <error@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
call   1030 <readLineHelper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readLine>:
push   %rbx
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1154 <readLine+0x24>
lea    0xeb1(%rip),%rdi
call   1050 <error@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
pop    %rbx
jmp    1030 <readLineHelper@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @readLine() {
%1 = alloca i8*
%2 = call i64 @calloc(i32 1, i32 1)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i8*, i8** %1
%10 = call i8* @readLineHelper(i8* %9, i32 16)
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @readLine() {
%1 = tail call i64 @calloc(i32 1, i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = inttoptr i64 %1 to i8*
%7 = tail call i8* @readLineHelper(i8* %6, i32 16)
ret i8* %7
}
void l1_concrete_underrun_Bad() {
  int a[10];
  a[-1] = 0;
}


x86 assembly (clang, -O0):
<l1_concrete_underrun_Bad>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x34(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @l1_concrete_underrun_Bad() {
%1 = alloca [10 x i32]
%2 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 -1
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @l1_concrete_underrun_Bad() {
ret void
}
int skrand(range) {
  int temp;
  temp = rand13() + rand13();
  if (temp > 017777)
    temp = 040000 - temp;
  return hmul(temp, 8 * range);
}


x86 assembly (clang, -O0):
<skrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand13@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand13@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1fff,-0x8(%rbp)
jle    115e <skrand+0x3e>
mov    $0x4000,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
shl    $0x3,%esi
mov    $0x0,%al
call   1040 <hmul@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skrand>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand13@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <rand13@plt>
add    %eax,%ebp
mov    $0x4000,%edi
sub    %ebp,%edi
cmp    $0x2000,%ebp
cmovl  %ebp,%edi
shl    $0x3,%ebx
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <hmul@plt>

LLVM IR (-O0):
define i32 @skrand(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @rand13()
%5 = call i32 (...) @rand13()
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 8191
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sub nsw i32 16384, %10
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = mul nsw i32 8, %14
%16 = call i32 (i32, i32, ...) bitcast (i32 (...)* @hmul to i32 (i32, i32, ...)*)(i32 %13, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @skrand(i32 %0) {
%2 = tail call i32 (...) @rand13()
%3 = tail call i32 (...) @rand13()
%4 = add nsw i32 %3, %2
%5 = icmp sgt i32 %4, 8191
%6 = sub nsw i32 16384, %4
%7 = select i1 %5, i32 %6, i32 %4
%8 = shl nsw i32 %0, 3
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @hmul to i32 (i32, i32, ...)*)(i32 %7, i32 %8)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ Usage();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void OptHelp(const char *Opt __attribute__((unused)),
             const char *Arg __attribute__((unused))) {
  Usage();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<OptHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <Usage@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<OptHelp>:
push   %rax
xor    %eax,%eax
call   1030 <Usage@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @OptHelp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @Usage()
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @OptHelp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @Usage()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void allocationClose() { return; }


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

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

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

LLVM IR (-O2):
define void @allocationClose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void do_signal() {
  ;
  exit(-6);
}


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

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

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

LLVM IR (-O2):
define void @do_signal() {
%1 = tail call i32 @exit(i32 -6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Detected gcc.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Detected gcc.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void caller_2_2_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_2_1_1_1_2() {
ret void
}
float compute_average_grade() {}


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

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

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

LLVM IR (-O2):
define float @compute_average_grade() {
ret float undef
}
void mdp4_dtv_free_base_pipe(struct msm_fb_data_type *mfd) {}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dtv_free_base_pipe(%struct.msm_fb_data_type* %0) {
%2 = alloca %struct.msm_fb_data_type*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %2
ret void
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dtv_free_base_pipe(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
void WatchdogUnlock(void) {
  (*((volatile unsigned long *)(0x40080000 + 0x00000C00))) = 0x1ACCE551;
}


x86 assembly (clang, -O0):
<WatchdogUnlock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40080c00,%eax
movq   $0x1acce551,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogUnlock>:
movq   $0x1acce551,0x40080c00
40 51 e5 cc 1a
ret

LLVM IR (-O0):
define void @WatchdogUnlock() {
store volatile i64 449635665, i64* inttoptr (i64 1074269184 to i64*)
ret void
}

LLVM IR (-O2):
define void @WatchdogUnlock() {
store volatile i64 449635665, i64* inttoptr (i64 1074269184 to i64*)
ret void
}
/* Variables and functions */
double fp_prev(double);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%f\n", fp_prev(1.0));
  printf("%0.25f\n", fp_prev(1.0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm0
call   1030 <fp_prev@plt>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
movsd  0xebb(%rip),%xmm0
call   1030 <fp_prev@plt>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1030 <fp_prev@plt>
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
movsd  0xebe(%rip),%xmm0
call   1030 <fp_prev@plt>
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [8 x i8] c"%0.25f\0A\00"
define i32 @main() {
%1 = call double @fp_prev(double 1.000000e+00)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = call double @fp_prev(double 1.000000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [8 x i8] c"%0.25f\0A\00"
define i32 @main() {
%1 = tail call double @fp_prev(double 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @fp_prev(double 1.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %3)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ checksum(int /*<<< orphan*/ *, void *, size_t);
void checksum_payload(uint32_t *result, void *payload, size_t pay_len) {
  if (pay_len & 1) {
    ((uint8_t *)payload)[pay_len++] = 0;
  }
  checksum(result, payload, pay_len);
}


x86 assembly (clang, -O0):
<checksum_payload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1151 <checksum_payload+0x41>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movq   $0x0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <checksum@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checksum_payload>:
test   $0x1,%dl
je     1121 <checksum_payload+0x11>
movq   $0x0,(%rsi,%rdx,8)
add    $0x1,%rdx
jmp    1030 <checksum@plt>

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

LLVM IR (-O2):
define void @checksum_payload(i32* %0, i8* %1, i64 %2) {
%4 = and i64 %2, 1
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = bitcast i8* %1 to i64*
%8 = add i64 %2, 1
%9 = getelementptr inbounds i64, i64* %7, i64 %2
store i64 0, i64* %9
br label %10
10: ; preds = %6, %3
%11 = phi i64 [ %8, %6 ], [ %2, %3 ]
%12 = tail call i32 @checksum(i32* %0, i8* %1, i64 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ butler();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("I will summon the butler function.\n");
  butler();
  printf("Yes, Bring me some tea and writeable CD-ROMS.\n");
  getchar();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"I will summon the butler function.\0A\00"
@.str.1 = [47 x i8] c"Yes, Bring me some tea and writeable CD-ROMS.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @butler()
%4 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"I will summon the butler function.\00"
@str.2 = [46 x i8] c"Yes, Bring me some tea and writeable CD-ROMS.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @butler()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int mhvtl_fifo_count(int);
int dec_fifo_count(void) { return mhvtl_fifo_count(2); }


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

x86 assembly (clang, -O2):
<dec_fifo_count>:
mov    $0x2,%edi
jmp    1030 <mhvtl_fifo_count@plt>

LLVM IR (-O0):
define i32 @dec_fifo_count() {
%1 = call i32 @mhvtl_fifo_count(i32 2)
ret i32 %1
}

LLVM IR (-O2):
define i32 @dec_fifo_count() {
%1 = tail call i32 @mhvtl_fifo_count(i32 2)
ret i32 %1
}
/* Variables and functions */
double ddot_(int *, double *, int *, double *, int *);
double DDOT(int ntot, double *x, int incx, double *y, int incy) {
  return ddot_(&ntot, x, &incx, y, &incy);
}


x86 assembly (clang, -O0):
<DDOT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <ddot_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DDOT>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <ddot_@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @DDOT(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = call double @ddot_(i32* %6, double* %1, i32* %7, double* %3, i32* %8)
ret double %9
}
int Exist_Row(int a[9][9], int i, int k) {
  int j, result = 0;
  for (j = 0; j < 9; j++) {
    if (a[i][j] == k)
      result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<Exist_Row>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    115f <Exist_Row+0x5f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jne    114c <Exist_Row+0x4c>
movl   $0x1,-0x18(%rbp)
jmp    1151 <Exist_Row+0x51>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <Exist_Row+0x1c>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Exist_Row>:
movslq %esi,%rax
lea    (%rax,%rax,8),%rax
cmp    %edx,(%rdi,%rax,4)
sete   %cl
movdqu 0x4(%rdi,%rax,4),%xmm0
movdqu 0x14(%rdi,%rax,4),%xmm1
movd   %edx,%xmm2
pshufd $0x0,%xmm2,%xmm2
pcmpeqd %xmm2,%xmm1
pcmpeqd %xmm2,%xmm0
packssdw %xmm1,%xmm0
psllw  $0xf,%xmm0
pmovmskb %xmm0,%eax
test   $0xaaaa,%eax
setne  %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @Exist_Row([9 x i32]* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %4, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, %2
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %0, i64 %4, i64 1
%9 = bitcast i32* %8 to <8 x i32>*
%10 = load <8 x i32>, <8 x i32>* %9
%11 = insertelement <8 x i32> poison, i32 %2, i64 0
%12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> zeroinitializer
%13 = icmp eq <8 x i32> %10, %12
%14 = freeze <8 x i1> %13
%15 = bitcast <8 x i1> %14 to i8
%16 = icmp ne i8 %15, 0
%17 = select i1 %16, i1 true, i1 %7
%18 = zext i1 %17 to i32
ret i32 %18
}
void Library_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Library_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_log_ewrite_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_log@%p::errwrite (rtpp_log_ewrite) is invoked after "
          "destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_log_ewrite_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_log_ewrite_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [77 x i8] c"Method rtpp_log@%p::errwrite (rtpp_log_ewrite) is invoked after destruction\0A\00"
define void @rtpp_log_ewrite_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [77 x i8] c"Method rtpp_log@%p::errwrite (rtpp_log_ewrite) is invoked after destruction\0A\00"
define void @rtpp_log_ewrite_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int CheckPointerFloat(void *p, char *name) {
  if (p == NULL) {
    fprintf(stderr, "Error in fft_float():  %s == NULL\n", name);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<CheckPointerFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <CheckPointerFloat+0x40>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1157 <CheckPointerFloat+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckPointerFloat>:
mov    $0x1,%eax
test   %rdi,%rdi
je     111b <CheckPointerFloat+0xb>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Error in fft_float(): %s == NULL\0A\00"
define i32 @CheckPointerFloat(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 0, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Error in fft_float(): %s == NULL\0A\00"
define i32 @CheckPointerFloat(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ SSL_read;
int zopenssl_timed_do(int /*<<< orphan*/ *, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/, void *, int,
                      long);
int zopenssl_read(SSL *ssl, void *buf, int len, long timeout) {
  return zopenssl_timed_do(ssl, 0, SSL_read, 0, buf, len, timeout);
}


x86 assembly (clang, -O0):
<zopenssl_read>:
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    -0x8(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %rax,(%rsp)
call   1030 <zopenssl_timed_do@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zopenssl_read>:
push   %rax
mov    %edx,%r9d
mov    %rsi,%r8
mov    0x2ec2(%rip),%rax
mov    (%rax),%edx
mov    %rcx,(%rsp)
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <zopenssl_timed_do@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@SSL_read = global i32 0
define i32 @zopenssl_read(i32* %0, i8* %1, i32 %2, i64 %3) {
%5 = load i32, i32* @SSL_read
%6 = tail call i32 @zopenssl_timed_do(i32* %0, i32 0, i32 %5, i32 0, i8* %1, i32 %2, i64 %3)
ret i32 %6
}
int assertNoEmpty(int *actual, int length) {
  int i;
  for (i = 0; i < length; i++) {
    if (*(actual + i) == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<assertNoEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <assertNoEmpty+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    113c <assertNoEmpty+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1156 <assertNoEmpty+0x56>
jmp    1141 <assertNoEmpty+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <assertNoEmpty+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertNoEmpty>:
mov    $0x1,%eax
test   %esi,%esi
jle    111f <assertNoEmpty+0x1f>
mov    %esi,%ecx
xor    %edx,%edx
nopl   (%rax)
cmpl   $0x0,(%rdi,%rdx,4)
je     1120 <assertNoEmpty+0x20>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <assertNoEmpty+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @assertNoEmpty(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %8, %6, %2
%15 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %15
}
void processor_explicatory_flush(void *process_state) {}


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

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

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

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

/* Variables and functions */
struct katcl_line *line_katcp(struct katcp_dispatch *);
struct katcl_parse *ready_katcl(struct katcl_line *);
struct katcl_parse *arg_parse_katcp(struct katcp_dispatch *d) {
  struct katcl_line *l;
  ;
  l = line_katcp(d);
  if (l == NULL) {
    return NULL;
  }
  return ready_katcl(l);
}


x86 assembly (clang, -O0):
<arg_parse_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <line_katcp@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <arg_parse_katcp+0x31>
movq   $0x0,-0x8(%rbp)
jmp    115e <arg_parse_katcp+0x3e>
mov    -0x18(%rbp),%rdi
call   1030 <ready_katcl@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_parse_katcp>:
push   %rax
call   1040 <line_katcp@plt>
test   %rax,%rax
je     1134 <arg_parse_katcp+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1030 <ready_katcl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcl_parse = type { i32 }
%struct.katcp_dispatch = type { i32 }
%struct.katcl_line = type { i32 }
define %struct.katcl_parse* @arg_parse_katcp(%struct.katcp_dispatch* %0) {
%2 = alloca %struct.katcl_parse*
%3 = alloca %struct.katcp_dispatch*
%4 = alloca %struct.katcl_line*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %3
%5 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %3
%6 = call %struct.katcl_line* @line_katcp(%struct.katcp_dispatch* %5)
store %struct.katcl_line* %6, %struct.katcl_line** %4
%7 = load %struct.katcl_line*, %struct.katcl_line** %4
%8 = icmp eq %struct.katcl_line* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store %struct.katcl_parse* null, %struct.katcl_parse** %2
br label %13
10: ; preds = %1
%11 = load %struct.katcl_line*, %struct.katcl_line** %4
%12 = call %struct.katcl_parse* @ready_katcl(%struct.katcl_line* %11)
store %struct.katcl_parse* %12, %struct.katcl_parse** %2
br label %13
13: ; preds = %10, %9
%14 = load %struct.katcl_parse*, %struct.katcl_parse** %2
ret %struct.katcl_parse* %14
}

LLVM IR (-O2):
%struct.katcl_parse = type { i32 }
%struct.katcp_dispatch = type { i32 }
%struct.katcl_line = type { i32 }
define %struct.katcl_parse* @arg_parse_katcp(%struct.katcp_dispatch* %0) {
%2 = tail call %struct.katcl_line* @line_katcp(%struct.katcp_dispatch* %0)
%3 = icmp eq %struct.katcl_line* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call %struct.katcl_parse* @ready_katcl(%struct.katcl_line* %2)
br label %6
6: ; preds = %1, %4
%7 = phi %struct.katcl_parse* [ %5, %4 ], [ null, %1 ]
ret %struct.katcl_parse* %7
}
int bar(int x) { return x + 5; }


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

x86 assembly (clang, -O2):
<bar>:
lea    0x5(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = add nsw i32 %0, 5
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
int peek(FILE *in) {
  int c = fgetc(in);
  ungetc(c, in);
  return c;
}


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1040 <ungetc@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <ungetc@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @peek(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @ungetc(i32 %2, i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ __off64_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t sendfile64(int out_fd, int in_fd, __off64_t *offset, size_t count) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<sendfile64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendfile64>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @sendfile64(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i64 %3, i64* %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @sendfile64(i32 %0, i32 %1, i32* nocapture readnone %2, i64 %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
void _exit(status) int status;
{
  status &= 0xff;
  abort();
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
store i32 %4, i32* %2
unreachable
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
tail call void @abort()
unreachable
}