#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*/ mvprintw(int, int, char *);
int /*<<< orphan*/ refresh();
int strlen(char *);
void header() {
  char name[] = "ShadowEngine v0.1.4";
  mvprintw(1, (80 - strlen(name)) / 2, name);
  mvprintw(3, 0, "Features:");
  mvprintw(4, 0, "   1. Printing out a map from data/");
  mvprintw(5, 0, "   2. Added PC");
  mvprintw(6, 0, "   3. Movable PC");
  mvprintw(9, 0, "Use WASD to move, 'q' to quit");
  mvprintw(13, 0, "List of known issues : ");
  mvprintw(14, 0, "   1. Shift + WASD does not work");
  mvprintw(15, 0, "   2. Arrow keys/Numpad do not work");
  refresh();
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x50,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    -0x20(%rbp),%rdx
mov    $0x1,%edi
call   1050 <mvprintw@plt>
mov    $0x3,%edi
xor    %esi,%esi
lea    0xe85(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x4,%edi
xor    %esi,%esi
lea    0xe7c(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x5,%edi
xor    %esi,%esi
lea    0xe8d(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x6,%edi
xor    %esi,%esi
lea    0xe89(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x9,%edi
xor    %esi,%esi
lea    0xe87(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0xd,%edi
xor    %esi,%esi
lea    0xe92(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0xe,%edi
xor    %esi,%esi
lea    0xe97(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0xf,%edi
xor    %esi,%esi
lea    0xea5(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rbx
sub    $0x20,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x342e31,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    $0x50,%ecx
sub    %eax,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1050 <mvprintw@plt>
lea    0xe9d(%rip),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xe94(%rip),%rdx
mov    $0x4,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xea5(%rip),%rdx
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xea1(%rip),%rdx
mov    $0x6,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xe9f(%rip),%rdx
mov    $0x9,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xeaa(%rip),%rdx
mov    $0xd,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xeaf(%rip),%rdx
mov    $0xe,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
lea    0xebd(%rip),%rdx
mov    $0xf,%edi
xor    %esi,%esi
call   1050 <mvprintw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.header.name = [20 x i8] c"ShadowEngine v0.1.4\00"
@.str = [10 x i8] c"Features:\00"
@.str.1 = [36 x i8] c" 1. Printing out a map from data/\00"
@.str.2 = [15 x i8] c" 2. Added PC\00"
@.str.3 = [17 x i8] c" 3. Movable PC\00"
@.str.4 = [30 x i8] c"Use WASD to move, 'q' to quit\00"
@.str.5 = [24 x i8] c"List of known issues : \00"
@.str.6 = [33 x i8] c" 1. Shift + WASD does not work\00"
@.str.7 = [36 x i8] c" 2. Arrow keys/Numpad do not work\00"
define void @header() {
%1 = alloca [20 x i8]
%2 = bitcast [20 x i8]* %1 to i8*
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @strlen(i8* %3)
%5 = sub nsw i32 80, %4
%6 = sdiv i32 %5, 2
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%8 = call i32 @mvprintw(i32 1, i32 %6, i8* %7)
%9 = call i32 @mvprintw(i32 3, i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @mvprintw(i32 4, i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 5, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @mvprintw(i32 6, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @mvprintw(i32 9, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @mvprintw(i32 13, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 @mvprintw(i32 14, i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 @mvprintw(i32 15, i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@__const.header.name = [20 x i8] c"ShadowEngine v0.1.4\00"
@.str = [10 x i8] c"Features:\00"
@.str.1 = [36 x i8] c" 1. Printing out a map from data/\00"
@.str.2 = [15 x i8] c" 2. Added PC\00"
@.str.3 = [17 x i8] c" 3. Movable PC\00"
@.str.4 = [30 x i8] c"Use WASD to move, 'q' to quit\00"
@.str.5 = [24 x i8] c"List of known issues : \00"
@.str.6 = [33 x i8] c" 1. Shift + WASD does not work\00"
@.str.7 = [36 x i8] c" 2. Arrow keys/Numpad do not work\00"
define void @header() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = sub nsw i32 80, %3
%5 = sdiv i32 %4, 2
%6 = call i32 @mvprintw(i32 1, i32 %5, i8* %2)
%7 = call i32 @mvprintw(i32 3, i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @mvprintw(i32 4, i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @mvprintw(i32 5, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @mvprintw(i32 6, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 9, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @mvprintw(i32 13, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @mvprintw(i32 14, i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @mvprintw(i32 15, i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (...) @refresh()
ret void
}