#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 *, char *);
int /*<<< orphan*/ refresh();
void print_info(int status) {
  switch (status) {
  case 0:
    mvprintw(3, 45, "%s", "    Use your arrow key to play     ");
    mvprintw(4, 45, "%s", "                                   ");
    mvprintw(5, 45, "%s", "             _____                 ");
    mvprintw(6, 45, "%s", "            |     |                ");
    mvprintw(7, 45, "%s", "            |  ^  |                ");
    mvprintw(8, 45, "%s", "            |  |  |                ");
    mvprintw(9, 45, "%s", "      -------------------          ");
    mvprintw(10, 45, "%s", "      |     |     |     |          ");
    mvprintw(11, 45, "%s", "      |  <- |  |  | ->  |          ");
    mvprintw(12, 45, "%s", "      |     |  v  |     |          ");
    mvprintw(13, 45, "%s", "      -------------------          ");
    mvprintw(14, 45, "%s", "      Or W, S, A, D instead        ");
    break;
  case 1:
    mvprintw(3, 45, "%s", "                                   ");
    mvprintw(4, 45, "%s", "                                   ");
    mvprintw(5, 45, "%s", "                                   ");
    mvprintw(6, 45, "%s", "                                   ");
    mvprintw(7, 45, "%s", "                                   ");
    mvprintw(8, 45, "%s", "                                   ");
    mvprintw(9, 45, "%s", "                                   ");
    mvprintw(10, 45, "%s", "                                   ");
    mvprintw(11, 45, "%s", "                                   ");
    mvprintw(12, 45, "%s", "                                   ");
    mvprintw(13, 45, "%s", "               HURRAY!!!           ");
    mvprintw(14, 45, "%s", "          You reached 2048!!       ");
    mvprintw(15, 45, "%s", "           Move to continue        ");
    break;
  case 2:
    mvprintw(3, 45, "%s", "                                   ");
    mvprintw(4, 45, "%s", "                                   ");
    mvprintw(5, 45, "%s", "                                   ");
    mvprintw(6, 45, "%s", "                                   ");
    mvprintw(7, 45, "%s", "                                   ");
    mvprintw(8, 45, "%s", "                                   ");
    mvprintw(9, 45, "%s", "                                   ");
    mvprintw(10, 45, "%s", "                                   ");
    mvprintw(11, 45, "%s", "                                   ");
    mvprintw(12, 45, "%s", "                                   ");
    mvprintw(13, 45, "%s", "                OH NO!!            ");
    mvprintw(14, 45, "%s", "              You lose!!!          ");
    break;
  default:
    break;
  }
  mvprintw(20, 49, "%s", "    Press 'r' to retry");
  mvprintw(21, 49, "%s", "          'q' to quit");
  refresh();
}


x86 assembly (clang, -O0):
<print_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1160 <print_info+0x40>
jmp    113e <print_info+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     12c1 <print_info+0x1a1>
jmp    114f <print_info+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     143f <print_info+0x31f>
jmp    15a0 <print_info+0x480>
mov    $0x3,%edi
mov    $0x2d,%esi
lea    0xe8f(%rip),%rdx
lea    0xe8b(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2d,%esi
lea    0xe72(%rip),%rdx
lea    0xe92(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2d,%esi
lea    0xe55(%rip),%rdx
lea    0xe99(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2d,%esi
lea    0xe38(%rip),%rdx
lea    0xea0(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x2d,%esi
lea    0xe1b(%rip),%rdx
lea    0xea7(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2d,%esi
lea    0xdfe(%rip),%rdx
lea    0xeae(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x2d,%esi
lea    0xde1(%rip),%rdx
lea    0xeb5(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2d,%esi
lea    0xdc4(%rip),%rdx
lea    0xebc(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2d,%esi
lea    0xda7(%rip),%rdx
lea    0xec3(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2d,%esi
lea    0xd8a(%rip),%rdx
lea    0xeca(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xd,%edi
mov    $0x2d,%esi
lea    0xd6d(%rip),%rdx
lea    0xe41(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xe,%edi
mov    $0x2d,%esi
lea    0xd50(%rip),%rdx
lea    0xeb4(%rip),%rcx
call   1040 <mvprintw@plt>
jmp    15a5 <print_info+0x485>
mov    $0x3,%edi
mov    $0x2d,%esi
lea    0xd2e(%rip),%rdx
lea    0xd4e(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2d,%esi
lea    0xd11(%rip),%rdx
lea    0xd31(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2d,%esi
lea    0xcf4(%rip),%rdx
lea    0xd14(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2d,%esi
lea    0xcd7(%rip),%rdx
lea    0xcf7(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x2d,%esi
lea    0xcba(%rip),%rdx
lea    0xcda(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2d,%esi
lea    0xc9d(%rip),%rdx
lea    0xcbd(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x2d,%esi
lea    0xc80(%rip),%rdx
lea    0xca0(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2d,%esi
lea    0xc63(%rip),%rdx
lea    0xc83(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2d,%esi
lea    0xc46(%rip),%rdx
lea    0xc66(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2d,%esi
lea    0xc29(%rip),%rdx
lea    0xc49(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xd,%edi
mov    $0x2d,%esi
lea    0xc0c(%rip),%rdx
lea    0xd94(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xe,%edi
mov    $0x2d,%esi
lea    0xbef(%rip),%rdx
lea    0xd9b(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xf,%edi
mov    $0x2d,%esi
lea    0xbd2(%rip),%rdx
lea    0xda2(%rip),%rcx
call   1040 <mvprintw@plt>
jmp    15a5 <print_info+0x485>
mov    $0x3,%edi
mov    $0x2d,%esi
lea    0xbb0(%rip),%rdx
lea    0xbd0(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2d,%esi
lea    0xb93(%rip),%rdx
lea    0xbb3(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2d,%esi
lea    0xb76(%rip),%rdx
lea    0xb96(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2d,%esi
lea    0xb59(%rip),%rdx
lea    0xb79(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x2d,%esi
lea    0xb3c(%rip),%rdx
lea    0xb5c(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2d,%esi
lea    0xb1f(%rip),%rdx
lea    0xb3f(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x2d,%esi
lea    0xb02(%rip),%rdx
lea    0xb22(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2d,%esi
lea    0xae5(%rip),%rdx
lea    0xb05(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2d,%esi
lea    0xac8(%rip),%rdx
lea    0xae8(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2d,%esi
lea    0xaab(%rip),%rdx
lea    0xacb(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xd,%edi
mov    $0x2d,%esi
lea    0xa8e(%rip),%rdx
lea    0xc82(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0xe,%edi
mov    $0x2d,%esi
lea    0xa71(%rip),%rdx
lea    0xc89(%rip),%rcx
call   1040 <mvprintw@plt>
jmp    15a5 <print_info+0x485>
jmp    15a5 <print_info+0x485>
mov    $0x14,%edi
mov    $0x31,%esi
lea    0xa4a(%rip),%rdx
lea    0xc86(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x15,%edi
mov    $0x31,%esi
lea    0xa2d(%rip),%rdx
lea    0xc80(%rip),%rcx
call   1040 <mvprintw@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
je     1263 <print_info+0x143>
cmp    $0x1,%edi
je     136d <print_info+0x24d>
test   %edi,%edi
jne    1498 <print_info+0x378>
lea    0xebb(%rip),%rbx
lea    0xeb7(%rip),%rcx
mov    $0x3,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xec2(%rip),%rcx
mov    $0x4,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xecd(%rip),%rcx
mov    $0x5,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xed8(%rip),%rcx
mov    $0x6,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xee3(%rip),%rcx
mov    $0x7,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xeee(%rip),%rcx
mov    $0x8,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xef9(%rip),%r14
mov    $0x9,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
lea    0xf01(%rip),%rcx
mov    $0xa,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xf0c(%rip),%rcx
mov    $0xb,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xf17(%rip),%rcx
mov    $0xc,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xd,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
lea    0xf0d(%rip),%rcx
jmp    1363 <print_info+0x243>
lea    0xd96(%rip),%rbx
lea    0xdb6(%rip),%r14
mov    $0x3,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
lea    0xeb1(%rip),%rcx
mov    $0xd,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xebc(%rip),%rcx
mov    $0xe,%edi
jmp    148b <print_info+0x36b>
lea    0xc8c(%rip),%rbx
lea    0xcac(%rip),%r14
mov    $0x3,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <mvprintw@plt>
lea    0xd3b(%rip),%rcx
mov    $0xd,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xd46(%rip),%rcx
mov    $0xe,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xd51(%rip),%rcx
mov    $0xf,%edi
mov    $0x2d,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xb61(%rip),%rbx
lea    0xd9d(%rip),%rcx
mov    $0x14,%edi
mov    $0x31,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
lea    0xd9b(%rip),%rcx
mov    $0x15,%edi
mov    $0x31,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <refresh@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [36 x i8] c" Use your arrow key to play \00"
@.str.2 = [36 x i8] c" \00"
@.str.3 = [36 x i8] c" _____ \00"
@.str.4 = [36 x i8] c" | | \00"
@.str.5 = [36 x i8] c" | ^ | \00"
@.str.6 = [36 x i8] c" | | | \00"
@.str.7 = [36 x i8] c" ------------------- \00"
@.str.8 = [36 x i8] c" | | | | \00"
@.str.9 = [36 x i8] c" | <- | | | -> | \00"
@.str.10 = [36 x i8] c" | | v | | \00"
@.str.11 = [36 x i8] c" Or W, S, A, D instead \00"
@.str.12 = [36 x i8] c" HURRAY!!! \00"
@.str.13 = [36 x i8] c" You reached 2048!! \00"
@.str.14 = [36 x i8] c" Move to continue \00"
@.str.15 = [36 x i8] c" OH NO!! \00"
@.str.16 = [36 x i8] c" You lose!!! \00"
@.str.17 = [23 x i8] c" Press 'r' to retry\00"
@.str.18 = [22 x i8] c" 'q' to quit\00"
define void @print_info(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %44 [
i32 0, label %4
i32 1, label %17
i32 2, label %31
]
4: ; preds = %1
%5 = call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
br label %45
17: ; preds = %1
%18 = call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%29 = call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0))
%30 = call i32 @mvprintw(i32 15, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
br label %45
31: ; preds = %1
%32 = call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%34 = call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%35 = call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%36 = call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%37 = call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%39 = call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%40 = call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%41 = call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
%43 = call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0))
br label %45
44: ; preds = %1
br label %45
45: ; preds = %44, %31, %17, %4
%46 = call i32 @mvprintw(i32 20, i32 49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0))
%47 = call i32 @mvprintw(i32 21, i32 49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0))
%48 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [36 x i8] c" Use your arrow key to play \00"
@.str.2 = [36 x i8] c" \00"
@.str.3 = [36 x i8] c" _____ \00"
@.str.4 = [36 x i8] c" | | \00"
@.str.5 = [36 x i8] c" | ^ | \00"
@.str.6 = [36 x i8] c" | | | \00"
@.str.7 = [36 x i8] c" ------------------- \00"
@.str.8 = [36 x i8] c" | | | | \00"
@.str.9 = [36 x i8] c" | <- | | | -> | \00"
@.str.10 = [36 x i8] c" | | v | | \00"
@.str.11 = [36 x i8] c" Or W, S, A, D instead \00"
@.str.12 = [36 x i8] c" HURRAY!!! \00"
@.str.13 = [36 x i8] c" You reached 2048!! \00"
@.str.14 = [36 x i8] c" Move to continue \00"
@.str.15 = [36 x i8] c" OH NO!! \00"
@.str.16 = [36 x i8] c" You lose!!! \00"
@.str.17 = [23 x i8] c" Press 'r' to retry\00"
@.str.18 = [22 x i8] c" 'q' to quit\00"
define void @print_info(i32 %0) {
switch i32 %0, label %42 [
i32 0, label %2
i32 1, label %15
i32 2, label %29
]
2: ; preds = %1
%3 = tail call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
br label %42
15: ; preds = %1
%16 = tail call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%19 = tail call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%20 = tail call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%21 = tail call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%22 = tail call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%23 = tail call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%24 = tail call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%25 = tail call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%26 = tail call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%27 = tail call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0))
%28 = tail call i32 @mvprintw(i32 15, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
br label %42
29: ; preds = %1
%30 = tail call i32 @mvprintw(i32 3, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%31 = tail call i32 @mvprintw(i32 4, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%32 = tail call i32 @mvprintw(i32 5, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%33 = tail call i32 @mvprintw(i32 6, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%34 = tail call i32 @mvprintw(i32 7, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%35 = tail call i32 @mvprintw(i32 8, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%36 = tail call i32 @mvprintw(i32 9, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%37 = tail call i32 @mvprintw(i32 10, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%38 = tail call i32 @mvprintw(i32 11, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%39 = tail call i32 @mvprintw(i32 12, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%40 = tail call i32 @mvprintw(i32 13, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
%41 = tail call i32 @mvprintw(i32 14, i32 45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0))
br label %42
42: ; preds = %1, %29, %15, %2
%43 = tail call i32 @mvprintw(i32 20, i32 49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0))
%44 = tail call i32 @mvprintw(i32 21, i32 49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0))
%45 = tail call i32 (...) @refresh()
ret void
}