#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"
      "            | (___  _ _ __ ___  _ __ | | ___| \\  / | |  | | |     \n"
      "             \\___ \\| | '_ ` _ \\| '_ \\| |/ _ \\ |\\/| | |  | | |     "
      "\n"
      "             ____) | | | | | | | |_) | |  __/ |  | | |__| | |____ \n"
      "            |_____/|_|_| |_| |_| .__/|_|\\___|_|  |_|\\____/ \\_____|\n"
      "                               | |                                \n"
      "                               |_|                                \n");
  border_print();
  printf("\n");
  center_print("Developed at", 79);
  center_print("The Massachusetts Institute of Technology", 79);
  center_print("and", 79);
  center_print("Argonne National Laboratory", 79);
  printf("\n");
  char v[100];
  sprintf(v, "Version: %d", version);
  center_print(v, 79);
  printf("\n");
  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    0x10ab(%rip),%rdi
call   1050 <printf@plt>
lea    0x10a1(%rip),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    0x109d(%rip),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    0x10b6(%rip),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    0x10a9(%rip),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    0x105b(%rip),%rdi
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0x10a1(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x4f,%esi
call   1030 <center_print@plt>
lea    0x102e(%rip),%rdi
call   1050 <printf@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   1060 <border_print@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <border_print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe7d(%rip),%rdi
mov    $0x4f,%esi
call   1050 <center_print@plt>
lea    0xe79(%rip),%rdi
mov    $0x4f,%esi
call   1050 <center_print@plt>
lea    0xe92(%rip),%rdi
mov    $0x4f,%esi
call   1050 <center_print@plt>
lea    0xe85(%rip),%rdi
mov    $0x4f,%esi
call   1050 <center_print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe86(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
call   1070 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1050 <center_print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <border_print@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [537 x i8] c" _____ _ _ __ __ ____ _____ \0A / ____(_) | | | \\/ |/ __ \\ / ____|\0A | (___ _ _ __ ___ _ __ | | ___| \\ / | | | | | \0A \\___ \\| | '_ ` _ \\| '_ \\| |/ _ \\ |\\/| | | | | | \0A ____) | | | | | | | |_) | | __/ | | | |__| | |____ \0A |_____/|_|_| |_| |_| .__/|_|\\___|_| |_|\\____/ \\_____|\0A | | \0A |_| \0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [13 x i8] c"Developed at\00"
@.str.3 = [42 x i8] c"The Massachusetts Institute of Technology\00"
@.str.4 = [4 x i8] c"and\00"
@.str.5 = [28 x i8] c"Argonne National Laboratory\00"
@.str.6 = [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 ([537 x i8], [537 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @border_print()
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @center_print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 79)
%9 = call i32 @center_print(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 79)
%10 = call i32 @center_print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 79)
%11 = call i32 @center_print(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 79)
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %2
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%17 = call i32 @center_print(i8* %16, i32 79)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 (...) @border_print()
ret void
}

LLVM IR (-O2):
@.str.2 = [13 x i8] c"Developed at\00"
@.str.3 = [42 x i8] c"The Massachusetts Institute of Technology\00"
@.str.4 = [4 x i8] c"and\00"
@.str.5 = [28 x i8] c"Argonne National Laboratory\00"
@.str.6 = [12 x i8] c"Version: %d\00"
@str = [536 x i8] c" _____ _ _ __ __ ____ _____ \0A / ____(_) | | | \\/ |/ __ \\ / ____|\0A | (___ _ _ __ ___ _ __ | | ___| \\ / | | | | | \0A \\___ \\| | '_ ` _ \\| '_ \\| |/ _ \\ |\\/| | | | | | \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 ([536 x i8], [536 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @border_print()
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @center_print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 79)
%8 = tail call i32 @center_print(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 79)
%9 = tail call i32 @center_print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 79)
%10 = tail call i32 @center_print(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 79)
%11 = tail call i32 @putchar(i32 10)
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %0)
%14 = call i32 @center_print(i8* %12, i32 79)
%15 = call i32 @putchar(i32 10)
%16 = call i32 (...) @border_print()
ret void
}