#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 */
scalar_t__ ERR;
int /*<<< orphan*/ endwin();
scalar_t__ getch();
int /*<<< orphan*/ init();
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ play();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
int main() {
  init();
  printw(
      "\tCymon's Games\n\thttp://WWW.CYMONSGAMES.COM\n\n"
      "   This game and its code is a 2008 Cymon's Games game.\n"
      "   If you have enjoyed this game or would just like to have a new game\n"
      "   each week please visit:\n"
      "   http://WWW.CYMONSGAMES.COM for C/C++ programming resources and "
      "programs\n"
      "   for everyone, beginners and advanced users alike.\n\n");
  printw("\n\tPress ENTER to continue...\n");
  refresh();
  while (getch() == ERR)
    ;
  play();
  mvprintw(15, 32, "Press any key...");
  while (getch() != ERR)
    ;
  nodelay(stdscr, 0);
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
lea    0xe63(%rip),%rdi
call   1050 <printw@plt>
lea    0xf9f(%rip),%rdi
call   1050 <printw@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x0,%al
call   1080 <getch@plt>
mov    0x2e25(%rip),%rcx
cmp    (%rcx),%rax
jne    11d1 <main+0x51>
jmp    11b5 <main+0x35>
mov    $0x0,%al
call   1030 <play@plt>
mov    $0xf,%edi
mov    $0x20,%esi
lea    0xf7d(%rip),%rdx
call   10a0 <mvprintw@plt>
mov    $0x0,%al
call   1080 <getch@plt>
mov    0x2dec(%rip),%rcx
cmp    (%rcx),%rax
je     120a <main+0x8a>
jmp    11ee <main+0x6e>
mov    0x2dcf(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1060 <nodelay@plt>
mov    $0x0,%al
call   1080 <getch@plt>
mov    $0x0,%al
call   1090 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <init@plt>
lea    0xe71(%rip),%rdi
call   1050 <printw@plt>
lea    0xfad(%rip),%rdi
call   1050 <printw@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    0x2e3a(%rip),%rbx
xchg   %ax,%ax
xor    %eax,%eax
call   1080 <getch@plt>
cmp    (%rbx),%rax
je     11b0 <main+0x30>
xor    %eax,%eax
call   1030 <play@plt>
lea    0xf9c(%rip),%rdx
mov    $0xf,%edi
mov    $0x20,%esi
call   10a0 <mvprintw@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1080 <getch@plt>
cmp    (%rbx),%rax
jne    11e0 <main+0x60>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1060 <nodelay@plt>
xor    %eax,%eax
call   1080 <getch@plt>
xor    %eax,%eax
call   1090 <endwin@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [328 x i8] c"\09Cymon's Games\0A\09http://WWW.CYMONSGAMES.COM\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@.str.1 = [30 x i8] c"\0A\09Press ENTER to continue...\0A\00"
@ERR = global i64 0
@.str.2 = [17 x i8] c"Press any key...\00"
@stdscr = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @init()
%3 = call i32 @printw(i8* getelementptr inbounds ([328 x i8], [328 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printw(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @refresh()
br label %6
6: ; preds = %10, %0
%7 = call i64 (...) @getch()
%8 = load i64, i64* @ERR
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
%12 = call i32 (...) @play()
%13 = call i32 @mvprintw(i32 15, i32 32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %18, %11
%15 = call i64 (...) @getch()
%16 = load i64, i64* @ERR
%17 = icmp ne i64 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
br label %14
19: ; preds = %14
%20 = load i32, i32* @stdscr
%21 = call i32 @nodelay(i32 %20, i32 0)
%22 = call i64 (...) @getch()
%23 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [328 x i8] c"\09Cymon's Games\0A\09http://WWW.CYMONSGAMES.COM\0A\0A This game and its code is a 2008 Cymon's Games game.\0A If you have enjoyed this game or would just like to have a new game\0A each week please visit:\0A http://WWW.CYMONSGAMES.COM for C/C++ programming resources and programs\0A for everyone, beginners and advanced users alike.\0A\0A\00"
@.str.1 = [30 x i8] c"\0A\09Press ENTER to continue...\0A\00"
@ERR = global i64 0
@.str.2 = [17 x i8] c"Press any key...\00"
@stdscr = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 @printw(i8* getelementptr inbounds ([328 x i8], [328 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printw(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @refresh()
br label %5
5: ; preds = %5, %0
%6 = tail call i64 (...) @getch()
%7 = load i64, i64* @ERR
%8 = icmp eq i64 %6, %7
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = tail call i32 (...) @play()
%11 = tail call i32 @mvprintw(i32 15, i32 32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %12, %9
%13 = tail call i64 (...) @getch()
%14 = load i64, i64* @ERR
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %12
16: ; preds = %12
%17 = load i32, i32* @stdscr
%18 = tail call i32 @nodelay(i32 %17, i32 0)
%19 = tail call i64 (...) @getch()
%20 = tail call i32 (...) @endwin()
ret i32 0
}