#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 */
int /*<<< orphan*/ border_print();
int /*<<< orphan*/ center_print(char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void logo(int version) {
  border_print();
  printf("                   __   __ ___________                 _             "
         "           \n"
         "                   \\ \\ / //  ___| ___ \\               | |         "
         "              \n"
         "                    \\ V / \\ `--.| |_/ / ___ _ __   ___| |__        "
         "             \n"
         "                    /   \\  `--. \\ ___ \\/ _ \\ '_ \\ / __| '_ \\   "
         "                 \n"
         "                   / /^\\ \\/\\__/ / |_/ /  __/ | | | (__| | | |     "
         "              \n"
         "                   \\/   \\/\\____/\\____/ \\___|_| |_|\\___|_| |_|  "
         "                 \n\n");
  border_print();
  center_print("Developed at Argonne National Laboratory", 79);
  char v[100];
  sprintf(v, "Version: %d", version);
  center_print(v, 79);
  border_print();
}


x86 assembly (clang, -O0):
<logo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <border_print@plt>
lea    0xea7(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <border_print@plt>
lea    0x107c(%rip),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0x108d(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
mov    $0x0,%al
call   1040 <border_print@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logo>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <border_print@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <border_print@plt>
lea    0xe97(%rip),%rdi
mov    $0x4f,%esi
call   1040 <center_print@plt>
lea    0xeaf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1040 <center_print@plt>
xor    %eax,%eax
call   1050 <border_print@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [488 x i8] c" __ __ ___________ _ \0A \\ \\ / // ___| ___ \\ | | \0A \\ V / \\ `--.| |_/ / ___ _ __ ___| |__ \0A / \\ `--. \\ ___ \\/ _ \\ '_ \\ / __| '_ \\ \0A / /^\\ \\/\\__/ / |_/ / __/ | | | (__| | | | \0A \\/ \\/\\____/\\____/ \\___|_| |_|\\___|_| |_| \0A\0A\00"
@.str.1 = [41 x i8] c"Developed at Argonne National Laboratory\00"
@.str.2 = [12 x i8] c"Version: %d\00"
define void @logo(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 %0, i32* %2
%4 = call i32 (...) @border_print()
%5 = call i32 @printf(i8* getelementptr inbounds ([488 x i8], [488 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @border_print()
%7 = call i32 @center_print(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 79)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @center_print(i8* %11, i32 79)
%13 = call i32 (...) @border_print()
ret void
}

LLVM IR (-O2):
@.str.1 = [41 x i8] c"Developed at Argonne National Laboratory\00"
@.str.2 = [12 x i8] c"Version: %d\00"
@str = [487 x i8] c" __ __ ___________ _ \0A \\ \\ / // ___| ___ \\ | | \0A \\ V / \\ `--.| |_/ / ___ _ __ ___| |__ \0A / \\ `--. \\ ___ \\/ _ \\ '_ \\ / __| '_ \\ \0A / /^\\ \\/\\__/ / |_/ / __/ | | | (__| | | | \0A \\/ \\/\\____/\\____/ \\___|_| |_|\\___|_| |_| \0A\00"
define void @logo(i32 %0) {
%2 = alloca [100 x i8]
%3 = tail call i32 (...) @border_print()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([487 x i8], [487 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @border_print()
%6 = tail call i32 @center_print(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 79)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%9 = call i32 @center_print(i8* %7, i32 79)
%10 = call i32 (...) @border_print()
ret void
}