#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *config_get_version();
char *disasm_get_version();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *,
                           char *);
char *n64graphics_get_read_version();
char *n64graphics_get_write_version();
int /*<<< orphan*/ stderr;
void print_version(void) {
  fprintf(stderr,
          "n64split v"
          "0.4a"
          ", using:\n"
          "  %s\n"
          "  %s\n"
          "  %s\n"
          "  %s\n",
          disasm_get_version(), n64graphics_get_read_version(),
          n64graphics_get_write_version(), config_get_version());
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1050 <disasm_get_version@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <n64graphics_get_read_version@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <n64graphics_get_write_version@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <config_get_version@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    %rax,%r9
lea    0xe5b(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2e82(%rip),%rax
mov    (%rax),%r14d
xor    %eax,%eax
call   1050 <disasm_get_version@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1070 <n64graphics_get_read_version@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1060 <n64graphics_get_write_version@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <config_get_version@plt>
lea    0xe73(%rip),%rsi
mov    %r14d,%edi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
mov    %rax,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"n64split v0.4a, using:\0A %s\0A %s\0A %s\0A %s\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @disasm_get_version()
%3 = call i8* (...) @n64graphics_get_read_version()
%4 = call i8* (...) @n64graphics_get_write_version()
%5 = call i8* (...) @config_get_version()
%6 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"n64split v0.4a, using:\0A %s\0A %s\0A %s\0A %s\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @disasm_get_version()
%3 = tail call i8* (...) @n64graphics_get_read_version()
%4 = tail call i8* (...) @n64graphics_get_write_version()
%5 = tail call i8* (...) @config_get_version()
%6 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
ret void
}