#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*/ A_REVERSE;
int /*<<< orphan*/ A_STANDOUT;
int COLS;
int /*<<< orphan*/ aprint(int /*<<< orphan*/, char *);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ initSH();
int /*<<< orphan*/ init_screen();
int /*<<< orphan*/ maprint(int /*<<< orphan*/, char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ run();
int strlen(char *);
int main(int argc, char *argv[]) {
  init_screen();
  aprint(A_REVERSE, "Loading NO_NAME ...");
  getch();
  clear();
  maprint(A_STANDOUT, "NO_NAME", 0, (COLS - (strlen("NO_NAME"))) / 2);
  refresh();
  initSH();
  run();
  clear();
  refresh();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_screen@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    0xe33(%rip),%rsi
call   10b0 <aprint@plt>
mov    $0x0,%al
call   1070 <getch@plt>
mov    $0x0,%al
call   10c0 <clear@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2df5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xe15(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    0xdf5(%rip),%rsi
xor    %edx,%edx
call   10a0 <maprint@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1090 <initSH@plt>
mov    $0x0,%al
call   1040 <run@plt>
mov    $0x0,%al
call   10c0 <clear@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1080 <endwin@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <init_screen@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
lea    0xe45(%rip),%rsi
call   10b0 <aprint@plt>
xor    %eax,%eax
call   1070 <getch@plt>
xor    %eax,%eax
call   10c0 <clear@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%ebx
mov    0x2e0a(%rip),%rax
mov    (%rax),%ebp
lea    0xe2d(%rip),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
sub    %eax,%ebp
mov    %ebp,%ecx
shr    $0x1f,%ecx
add    %ebp,%ecx
sar    %ecx
mov    %ebx,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   10a0 <maprint@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
call   1090 <initSH@plt>
xor    %eax,%eax
call   1040 <run@plt>
xor    %eax,%eax
call   10c0 <clear@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
call   1080 <endwin@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@A_REVERSE = global i32 0
@.str = [20 x i8] c"Loading NO_NAME ...\00"
@A_STANDOUT = global i32 0
@.str.1 = [8 x i8] c"NO_NAME\00"
@COLS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init_screen()
%7 = load i32, i32* @A_REVERSE
%8 = call i32 @aprint(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @getch()
%10 = call i32 (...) @clear()
%11 = load i32, i32* @A_STANDOUT
%12 = load i32, i32* @COLS
%13 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%14 = sub nsw i32 %12, %13
%15 = sdiv i32 %14, 2
%16 = call i32 @maprint(i32 %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %15)
%17 = call i32 (...) @refresh()
%18 = call i32 (...) @initSH()
%19 = call i32 (...) @run()
%20 = call i32 (...) @clear()
%21 = call i32 (...) @refresh()
%22 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@A_REVERSE = global i32 0
@.str = [20 x i8] c"Loading NO_NAME ...\00"
@A_STANDOUT = global i32 0
@.str.1 = [8 x i8] c"NO_NAME\00"
@COLS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_screen()
%4 = load i32, i32* @A_REVERSE
%5 = tail call i32 @aprint(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @getch()
%7 = tail call i32 (...) @clear()
%8 = load i32, i32* @A_STANDOUT
%9 = load i32, i32* @COLS
%10 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = sub nsw i32 %9, %10
%12 = sdiv i32 %11, 2
%13 = tail call i32 @maprint(i32 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %12)
%14 = tail call i32 (...) @refresh()
%15 = tail call i32 (...) @initSH()
%16 = tail call i32 (...) @run()
%17 = tail call i32 (...) @clear()
%18 = tail call i32 (...) @refresh()
%19 = tail call i32 (...) @endwin()
ret i32 0
}