#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 */
typedef int chtype;

/* Variables and functions */
int /*<<< orphan*/ attroff(int);
int /*<<< orphan*/ attron(int);
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ init_pair(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/, int, int, char *);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ resize_term(int, int);
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
char wgetch(int /*<<< orphan*/);
void about_game() {
  char c;
  initscr();
  resize_term(30, 76);
  start_color();
  init_pair(1, 7, 0);
  while (1) {
    noecho();
    curs_set(0);
    attron((((chtype)(1) << 24) & (chtype)0xff000000));
    mvwprintw(stdscr, 5, 2,
              "The original version of Mummy Maze has been published by PopCap "
              "Games.");
    mvwprintw(stdscr, 6, 2,
              "Game rules are pretty simple, avoid the mummy and escape from "
              "the maze!");
    mvwprintw(stdscr, 7, 2,
              "This game has been made, as the homework assignment");
    mvwprintw(stdscr, 8, 2,
              "for subject Programming Practicum 2, by The Sloths");
    mvwprintw(stdscr, 11, 5, "June 2016.");
    mvwprintw(stdscr, 13, 5, "Esc-Back");
    attroff((((chtype)(1) << 24) & (chtype)0xff000000));
    c = wgetch(stdscr);
    if (c == 27)
      break;
    refresh();
  }
  endwin();
}


x86 assembly (clang, -O0):
<about_game>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x1e,%edi
mov    $0x4c,%esi
call   1080 <resize_term@plt>
mov    $0x0,%al
call   1060 <start_color@plt>
mov    $0x1,%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1040 <init_pair@plt>
mov    $0x0,%al
call   10d0 <noecho@plt>
xor    %edi,%edi
call   10e0 <curs_set@plt>
mov    $0x1000000,%edi
call   1070 <attron@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
mov    $0x5,%esi
mov    $0x2,%edx
lea    0xdd8(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
mov    $0x6,%esi
mov    $0x2,%edx
lea    0xe00(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
mov    $0x7,%esi
mov    $0x2,%edx
lea    0xe29(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%esi
mov    $0x2,%edx
lea    0xe3e(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    $0xb,%esi
mov    $0x5,%edx
lea    0xe52(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
mov    $0xd,%esi
mov    $0x5,%edx
lea    0xe3e(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    $0x1000000,%edi
call   1030 <attroff@plt>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
call   10b0 <wgetch@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    12f5 <about_game+0x135>
jmp    1301 <about_game+0x141>
mov    $0x0,%al
call   1090 <refresh@plt>
jmp    11f6 <about_game+0x36>
mov    $0x0,%al
call   10a0 <endwin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<about_game>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
mov    $0x1e,%edi
mov    $0x4c,%esi
call   1080 <resize_term@plt>
xor    %eax,%eax
call   1060 <start_color@plt>
mov    $0x1,%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1040 <init_pair@plt>
mov    0x2de8(%rip),%r14
lea    0xe40(%rip),%r15
lea    0xe81(%rip),%r12
lea    0xeae(%rip),%r13
lea    0xeda(%rip),%rbx
lea    0xede(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   10d0 <noecho@plt>
xor    %edi,%edi
call   10e0 <curs_set@plt>
mov    $0x1000000,%edi
call   1070 <attron@plt>
mov    (%r14),%edi
mov    $0x5,%esi
mov    $0x2,%edx
lea    0xda4(%rip),%rcx
call   10c0 <mvwprintw@plt>
mov    (%r14),%edi
mov    $0x6,%esi
mov    $0x2,%edx
mov    %r15,%rcx
call   10c0 <mvwprintw@plt>
mov    (%r14),%edi
mov    $0x7,%esi
mov    $0x2,%edx
mov    %r12,%rcx
call   10c0 <mvwprintw@plt>
mov    (%r14),%edi
mov    $0x8,%esi
mov    $0x2,%edx
mov    %r13,%rcx
call   10c0 <mvwprintw@plt>
mov    (%r14),%edi
mov    $0xb,%esi
mov    $0x5,%edx
mov    %rbx,%rcx
call   10c0 <mvwprintw@plt>
mov    (%r14),%edi
mov    $0xd,%esi
mov    $0x5,%edx
mov    %rbp,%rcx
call   10c0 <mvwprintw@plt>
mov    $0x1000000,%edi
call   1030 <attroff@plt>
mov    (%r14),%edi
call   10b0 <wgetch@plt>
cmp    $0x1b,%al
je     12ec <about_game+0x12c>
xor    %eax,%eax
call   1090 <refresh@plt>
jmp    1230 <about_game+0x70>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <endwin@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@.str = [71 x i8] c"The original version of Mummy Maze has been published by PopCap Games.\00"
@.str.1 = [72 x i8] c"Game rules are pretty simple, avoid the mummy and escape from the maze!\00"
@.str.2 = [52 x i8] c"This game has been made, as the homework assignment\00"
@.str.3 = [51 x i8] c"for subject Programming Practicum 2, by The Sloths\00"
@.str.4 = [11 x i8] c"June 2016.\00"
@.str.5 = [9 x i8] c"Esc-Back\00"
define void @about_game() {
%1 = alloca i8
%2 = call i32 (...) @initscr()
%3 = call i32 @resize_term(i32 30, i32 76)
%4 = call i32 (...) @start_color()
%5 = call i32 @init_pair(i32 1, i32 7, i32 0)
br label %6
6: ; preds = %0, %29
%7 = call i32 (...) @noecho()
%8 = call i32 @curs_set(i32 0)
%9 = call i32 @attron(i32 16777216)
%10 = load i32, i32* @stdscr
%11 = call i32 @mvwprintw(i32 %10, i32 5, i32 2, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stdscr
%13 = call i32 @mvwprintw(i32 %12, i32 6, i32 2, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @stdscr
%15 = call i32 @mvwprintw(i32 %14, i32 7, i32 2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @stdscr
%17 = call i32 @mvwprintw(i32 %16, i32 8, i32 2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* @stdscr
%19 = call i32 @mvwprintw(i32 %18, i32 11, i32 5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%20 = load i32, i32* @stdscr
%21 = call i32 @mvwprintw(i32 %20, i32 13, i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 @attroff(i32 16777216)
%23 = load i32, i32* @stdscr
%24 = call signext i8 @wgetch(i32 %23)
store i8 %24, i8* %1
%25 = load i8, i8* %1
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 27
br i1 %27, label %28, label %29
28: ; preds = %6
br label %31
29: ; preds = %6
%30 = call i32 (...) @refresh()
br label %6
31: ; preds = %28
%32 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@.str = [71 x i8] c"The original version of Mummy Maze has been published by PopCap Games.\00"
@.str.1 = [72 x i8] c"Game rules are pretty simple, avoid the mummy and escape from the maze!\00"
@.str.2 = [52 x i8] c"This game has been made, as the homework assignment\00"
@.str.3 = [51 x i8] c"for subject Programming Practicum 2, by The Sloths\00"
@.str.4 = [11 x i8] c"June 2016.\00"
@.str.5 = [9 x i8] c"Esc-Back\00"
define void @about_game() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 @resize_term(i32 30, i32 76)
%3 = tail call i32 (...) @start_color()
%4 = tail call i32 @init_pair(i32 1, i32 7, i32 0)
br label %5
5: ; preds = %25, %0
%6 = tail call i32 (...) @noecho()
%7 = tail call i32 @curs_set(i32 0)
%8 = tail call i32 @attron(i32 16777216)
%9 = load i32, i32* @stdscr
%10 = tail call i32 @mvwprintw(i32 %9, i32 5, i32 2, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @stdscr
%12 = tail call i32 @mvwprintw(i32 %11, i32 6, i32 2, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @stdscr
%14 = tail call i32 @mvwprintw(i32 %13, i32 7, i32 2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32, i32* @stdscr
%16 = tail call i32 @mvwprintw(i32 %15, i32 8, i32 2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* @stdscr
%18 = tail call i32 @mvwprintw(i32 %17, i32 11, i32 5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%19 = load i32, i32* @stdscr
%20 = tail call i32 @mvwprintw(i32 %19, i32 13, i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%21 = tail call i32 @attroff(i32 16777216)
%22 = load i32, i32* @stdscr
%23 = tail call signext i8 @wgetch(i32 %22)
%24 = icmp eq i8 %23, 27
br i1 %24, label %27, label %25
25: ; preds = %5
%26 = tail call i32 (...) @refresh()
br label %5
27: ; preds = %5
%28 = tail call i32 (...) @endwin()
ret void
}