#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*/ attrset(int);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ sparkle_pause();
void intro(void) {
  clear();
  attrset(((15) & 0x0f) | (((0) & 0x0f) << 4));
  mvaddstr(2, 34, "NibblesOS");
  attrset(((7) & 0x0f) | (((0) & 0x0f) << 4));
  mvaddstr(
      4, 6,
      "NibblesOS is a game for one to four players.  Navigate your snakes");
  mvaddstr(5, 8,
           "around the game board trying to eat up numbers while avoiding");
  mvaddstr(6, 6,
           "running into walls or other snakes.  The more numbers you eat up,");
  mvaddstr(7, 9, "the more points you gain and the longer your snake becomes.");
  mvaddstr(9, 32, "Game Controls");
  mvaddstr(11, 35, "General");
  mvaddstr(12, 34, "P - Pause");
  mvaddstr(
      14, 6,
      "Player 1            Player 2            Player 3            Player 4");
  mvaddstr(15, 66, "(keypad)");
  mvaddstr(16, 8,
           "(Up)                (Up)                (Up)                (Up)");
  mvaddstr(
      17, 9,
      "\x18                   W                   O                   \x18");
  mvaddstr(18, 1,
           "(Left) \x1b \x1a (Right)  (Left) A D (Right)  (Left) K ; (Right)  "
           "(Left) \x1b \x1a (Right)");
  mvaddstr(
      19, 9,
      "\x19                   S                   L                   \x19");
  mvaddstr(
      20, 7,
      "(Down)              (Down)              (Down)              (Down)");
  mvaddstr(24, 26, "Press any key to continue");
  sparkle_pause();
}


x86 assembly (clang, -O0):
<intro>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <clear@plt>
mov    $0xf,%edi
call   1040 <attrset@plt>
mov    $0x2,%edi
mov    $0x22,%esi
lea    0xe9a(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x7,%edi
call   1040 <attrset@plt>
mov    $0x4,%edi
mov    $0x6,%esi
lea    0xe84(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x5,%edi
mov    $0x8,%esi
lea    0xeb1(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x6,%esi
lea    0xede(%rip),%rdx
mov    %esi,%edi
call   1050 <mvaddstr@plt>
mov    $0x7,%edi
mov    $0x9,%esi
lea    0xf08(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x9,%edi
mov    $0x20,%esi
lea    0xf2e(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xb,%edi
mov    $0x23,%esi
lea    0xf26(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xc,%edi
mov    $0x22,%esi
lea    0xf18(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xe,%edi
mov    $0x6,%esi
lea    0xf0c(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xf,%edi
mov    $0x42,%esi
lea    0xf3b(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x10,%edi
mov    $0x8,%esi
lea    0xf2e(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x11,%edi
mov    $0x9,%esi
lea    0xf59(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x12,%edi
mov    $0x1,%esi
lea    0xf81(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x13,%edi
mov    $0x9,%esi
lea    0xfba(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x14,%edi
mov    $0x7,%esi
lea    0xfe2(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x18,%edi
mov    $0x1a,%esi
lea    0x100f(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x0,%al
call   1030 <sparkle_pause@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intro>:
push   %rax
xor    %eax,%eax
call   1060 <clear@plt>
mov    $0xf,%edi
call   1040 <attrset@plt>
lea    0xea7(%rip),%rdx
mov    $0x2,%edi
mov    $0x22,%esi
call   1050 <mvaddstr@plt>
mov    $0x7,%edi
call   1040 <attrset@plt>
lea    0xe91(%rip),%rdx
mov    $0x4,%edi
mov    $0x6,%esi
call   1050 <mvaddstr@plt>
lea    0xebe(%rip),%rdx
mov    $0x5,%edi
mov    $0x8,%esi
call   1050 <mvaddstr@plt>
lea    0xee6(%rip),%rdx
mov    $0x6,%edi
mov    $0x6,%esi
call   1050 <mvaddstr@plt>
lea    0xf12(%rip),%rdx
mov    $0x7,%edi
mov    $0x9,%esi
call   1050 <mvaddstr@plt>
lea    0xf38(%rip),%rdx
mov    $0x9,%edi
mov    $0x20,%esi
call   1050 <mvaddstr@plt>
lea    0xf30(%rip),%rdx
mov    $0xb,%edi
mov    $0x23,%esi
call   1050 <mvaddstr@plt>
lea    0xf22(%rip),%rdx
mov    $0xc,%edi
mov    $0x22,%esi
call   1050 <mvaddstr@plt>
lea    0xf16(%rip),%rdx
mov    $0xe,%edi
mov    $0x6,%esi
call   1050 <mvaddstr@plt>
lea    0xf45(%rip),%rdx
mov    $0xf,%edi
mov    $0x42,%esi
call   1050 <mvaddstr@plt>
lea    0xf38(%rip),%rdx
mov    $0x10,%edi
mov    $0x8,%esi
call   1050 <mvaddstr@plt>
lea    0xf63(%rip),%rdx
mov    $0x11,%edi
mov    $0x9,%esi
call   1050 <mvaddstr@plt>
lea    0xf8b(%rip),%rdx
mov    $0x12,%edi
mov    $0x1,%esi
call   1050 <mvaddstr@plt>
lea    0xfc4(%rip),%rdx
mov    $0x13,%edi
mov    $0x9,%esi
call   1050 <mvaddstr@plt>
lea    0xfec(%rip),%rdx
mov    $0x14,%edi
mov    $0x7,%esi
call   1050 <mvaddstr@plt>
lea    0x1019(%rip),%rdx
mov    $0x18,%edi
mov    $0x1a,%esi
call   1050 <mvaddstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <sparkle_pause@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"NibblesOS\00"
@.str.1 = [67 x i8] c"NibblesOS is a game for one to four players. Navigate your snakes\00"
@.str.2 = [62 x i8] c"around the game board trying to eat up numbers while avoiding\00"
@.str.3 = [66 x i8] c"running into walls or other snakes. The more numbers you eat up,\00"
@.str.4 = [60 x i8] c"the more points you gain and the longer your snake becomes.\00"
@.str.5 = [14 x i8] c"Game Controls\00"
@.str.6 = [8 x i8] c"General\00"
@.str.7 = [10 x i8] c"P - Pause\00"
@.str.8 = [69 x i8] c"Player 1 Player 2 Player 3 Player 4\00"
@.str.9 = [9 x i8] c"(keypad)\00"
@.str.10 = [65 x i8] c"(Up) (Up) (Up) (Up)\00"
@.str.11 = [62 x i8] c"\18 W O \18\00"
@.str.12 = [79 x i8] c"(Left) \1B \1A (Right) (Left) A D (Right) (Left) K ; (Right) (Left) \1B \1A (Right)\00"
@.str.13 = [62 x i8] c"\19 S L \19\00"
@.str.14 = [67 x i8] c"(Down) (Down) (Down) (Down)\00"
@.str.15 = [26 x i8] c"Press any key to continue\00"
define void @intro() {
%1 = call i32 (...) @clear()
%2 = call i32 @attrset(i32 15)
%3 = call i32 @mvaddstr(i32 2, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @attrset(i32 7)
%5 = call i32 @mvaddstr(i32 4, i32 6, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @mvaddstr(i32 5, i32 8, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @mvaddstr(i32 6, i32 6, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @mvaddstr(i32 7, i32 9, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @mvaddstr(i32 9, i32 32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @mvaddstr(i32 11, i32 35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @mvaddstr(i32 12, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @mvaddstr(i32 14, i32 6, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 @mvaddstr(i32 15, i32 66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @mvaddstr(i32 16, i32 8, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @mvaddstr(i32 17, i32 9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 @mvaddstr(i32 18, i32 1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 @mvaddstr(i32 19, i32 9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 @mvaddstr(i32 20, i32 7, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 @mvaddstr(i32 24, i32 26, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (...) @sparkle_pause()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"NibblesOS\00"
@.str.1 = [67 x i8] c"NibblesOS is a game for one to four players. Navigate your snakes\00"
@.str.2 = [62 x i8] c"around the game board trying to eat up numbers while avoiding\00"
@.str.3 = [66 x i8] c"running into walls or other snakes. The more numbers you eat up,\00"
@.str.4 = [60 x i8] c"the more points you gain and the longer your snake becomes.\00"
@.str.5 = [14 x i8] c"Game Controls\00"
@.str.6 = [8 x i8] c"General\00"
@.str.7 = [10 x i8] c"P - Pause\00"
@.str.8 = [69 x i8] c"Player 1 Player 2 Player 3 Player 4\00"
@.str.9 = [9 x i8] c"(keypad)\00"
@.str.10 = [65 x i8] c"(Up) (Up) (Up) (Up)\00"
@.str.11 = [62 x i8] c"\18 W O \18\00"
@.str.12 = [79 x i8] c"(Left) \1B \1A (Right) (Left) A D (Right) (Left) K ; (Right) (Left) \1B \1A (Right)\00"
@.str.13 = [62 x i8] c"\19 S L \19\00"
@.str.14 = [67 x i8] c"(Down) (Down) (Down) (Down)\00"
@.str.15 = [26 x i8] c"Press any key to continue\00"
define void @intro() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 @attrset(i32 15)
%3 = tail call i32 @mvaddstr(i32 2, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @attrset(i32 7)
%5 = tail call i32 @mvaddstr(i32 4, i32 6, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @mvaddstr(i32 5, i32 8, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @mvaddstr(i32 6, i32 6, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @mvaddstr(i32 7, i32 9, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @mvaddstr(i32 9, i32 32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i32 @mvaddstr(i32 11, i32 35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%11 = tail call i32 @mvaddstr(i32 12, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i32 @mvaddstr(i32 14, i32 6, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%13 = tail call i32 @mvaddstr(i32 15, i32 66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%14 = tail call i32 @mvaddstr(i32 16, i32 8, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%15 = tail call i32 @mvaddstr(i32 17, i32 9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%16 = tail call i32 @mvaddstr(i32 18, i32 1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%17 = tail call i32 @mvaddstr(i32 19, i32 9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
%18 = tail call i32 @mvaddstr(i32 20, i32 7, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.14, i64 0, i64 0))
%19 = tail call i32 @mvaddstr(i32 24, i32 26, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%20 = tail call i32 (...) @sparkle_pause()
ret void
}