#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*/ center_print(char *, int);
int /*<<< orphan*/ cls();
int /*<<< orphan*/ colorRestOfScreen();
int inb(int);
int /*<<< orphan*/ setcolor(int);
void startscreen() {
  cls();
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("  ____            _    ___  ____           ___   ___  _       ",
               0xCF);
  center_print(
      " |  _ \\ ___  _ __| |_ / _ \\/ ___|  __   __/ _ \\ / _ \\/ | __ _ ",
      0xCF);
  center_print(
      " | |_) / _ \\| '__| __| | | \\___ \\  \\ \\ / / | | | | | | |/ _` |",
      0xCF);
  center_print(
      " |  __/ (_) | |  | |_| |_| |___) |  \\ V /| |_| | |_| | | (_| |", 0xCF);
  center_print(
      " |_|   \\___/|_|   \\__|\\___/|____/    \\_/  \\___(_)___/|_|\\__,_|",
      0xCF);
  center_print("", 0xCF);
  center_print(" (c) 2017 Matt Gallant & Jacob Mealey", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("", 0xCF);
  center_print("Press any key to continue...", 0xCF);
  setcolor(0xCF);
  colorRestOfScreen();
  while (inb(0x60) & 0x80) {
  };
  setcolor(0xCF);
  cls();
}


x86 assembly (clang, -O0):
<startscreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <cls@plt>
lea    0xedc(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xecb(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xeba(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xea9(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe98(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe87(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe76(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe65(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe16(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe44(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe72(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xea0(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xece(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xdff(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xeeb(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xddd(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xdcc(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xdbb(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xdaa(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xd99(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xd88(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xd77(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe89(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    $0xcf,%edi
call   1070 <setcolor@plt>
mov    $0x0,%al
call   1060 <colorRestOfScreen@plt>
mov    $0x60,%edi
call   1040 <inb@plt>
and    $0x80,%eax
cmp    $0x0,%eax
je     1310 <startscreen+0x1c0>
jmp    12f3 <startscreen+0x1a3>
mov    $0xcf,%edi
call   1070 <setcolor@plt>
mov    $0x0,%al
call   1050 <cls@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<startscreen>:
push   %rbx
xor    %eax,%eax
call   1050 <cls@plt>
lea    0xedf(%rip),%rbx
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe32(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe60(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xe8e(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xebc(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xeea(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xf0b(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    %rbx,%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
lea    0xec5(%rip),%rdi
mov    $0xcf,%esi
call   1030 <center_print@plt>
mov    $0xcf,%edi
call   1070 <setcolor@plt>
xor    %eax,%eax
call   1060 <colorRestOfScreen@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x60,%edi
call   1040 <inb@plt>
test   $0x80,%al
jne    12c0 <startscreen+0x170>
mov    $0xcf,%edi
call   1070 <setcolor@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <cls@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [63 x i8] c" ____ _ ___ ____ ___ ___ _ \00"
@.str.2 = [63 x i8] c" | _ \\ ___ _ __| |_ / _ \\/ ___| __ __/ _ \\ / _ \\/ | __ _ \00"
@.str.3 = [63 x i8] c" | |_) / _ \\| '__| __| | | \\___ \\ \\ \\ / / | | | | | | |/ _` |\00"
@.str.4 = [63 x i8] c" | __/ (_) | | | |_| |_| |___) | \\ V /| |_| | |_| | | (_| |\00"
@.str.5 = [63 x i8] c" |_| \\___/|_| \\__|\\___/|____/ \\_/ \\___(_)___/|_|\\__,_|\00"
@.str.6 = [38 x i8] c" (c) 2017 Matt Gallant & Jacob Mealey\00"
@.str.7 = [29 x i8] c"Press any key to continue...\00"
define void @startscreen() {
%1 = call i32 (...) @cls()
%2 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%3 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%4 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%5 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%6 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%7 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%8 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%9 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%10 = call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 207)
%11 = call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 207)
%12 = call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 207)
%13 = call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0), i32 207)
%14 = call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.5, i64 0, i64 0), i32 207)
%15 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%16 = call i32 @center_print(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 207)
%17 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%18 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%19 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%20 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%21 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%22 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%23 = call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%24 = call i32 @center_print(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 207)
%25 = call i32 @setcolor(i32 207)
%26 = call i32 (...) @colorRestOfScreen()
br label %27
27: ; preds = %31, %0
%28 = call i32 @inb(i32 96)
%29 = and i32 %28, 128
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
br label %27
32: ; preds = %27
%33 = call i32 @setcolor(i32 207)
%34 = call i32 (...) @cls()
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [63 x i8] c" ____ _ ___ ____ ___ ___ _ \00"
@.str.2 = [63 x i8] c" | _ \\ ___ _ __| |_ / _ \\/ ___| __ __/ _ \\ / _ \\/ | __ _ \00"
@.str.3 = [63 x i8] c" | |_) / _ \\| '__| __| | | \\___ \\ \\ \\ / / | | | | | | |/ _` |\00"
@.str.4 = [63 x i8] c" | __/ (_) | | | |_| |_| |___) | \\ V /| |_| | |_| | | (_| |\00"
@.str.5 = [63 x i8] c" |_| \\___/|_| \\__|\\___/|____/ \\_/ \\___(_)___/|_|\\__,_|\00"
@.str.6 = [38 x i8] c" (c) 2017 Matt Gallant & Jacob Mealey\00"
@.str.7 = [29 x i8] c"Press any key to continue...\00"
define void @startscreen() {
%1 = tail call i32 (...) @cls()
%2 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%3 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%4 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%5 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%6 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%7 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%8 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%9 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%10 = tail call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 207)
%11 = tail call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 207)
%12 = tail call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 207)
%13 = tail call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0), i32 207)
%14 = tail call i32 @center_print(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.5, i64 0, i64 0), i32 207)
%15 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%16 = tail call i32 @center_print(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 207)
%17 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%18 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%19 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%20 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%21 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%22 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%23 = tail call i32 @center_print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 207)
%24 = tail call i32 @center_print(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 207)
%25 = tail call i32 @setcolor(i32 207)
%26 = tail call i32 (...) @colorRestOfScreen()
br label %27
27: ; preds = %27, %0
%28 = tail call i32 @inb(i32 96)
%29 = and i32 %28, 128
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %27
31: ; preds = %27
%32 = tail call i32 @setcolor(i32 207)
%33 = tail call i32 (...) @cls()
ret void
}