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


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     1150 <print_info+0x40>
jmp    112e <print_info+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1251 <print_info+0x141>
jmp    113f <print_info+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     137c <print_info+0x26c>
jmp    1499 <print_info+0x389>
lea    0xea9(%rip),%rdi
lea    0xeac(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0xefa(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
lea    0xf14(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2b(%rip),%rdi
lea    0xf2e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf45(%rip),%rdi
lea    0xf48(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5f(%rip),%rdi
lea    0xf63(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
lea    0xf7e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
lea    0xf99(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb0(%rip),%rdi
lea    0xef4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa6(%rip),%rdi
lea    0xfaa(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    149e <print_info+0x38e>
lea    0xda8(%rip),%rdi
lea    0xdda(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc2(%rip),%rdi
lea    0xdc5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xddc(%rip),%rdi
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf6(%rip),%rdi
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe10(%rip),%rdi
lea    0xd86(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2a(%rip),%rdi
lea    0xd71(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe44(%rip),%rdi
lea    0xd5c(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
lea    0xd47(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
lea    0xd32(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
lea    0xef0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
lea    0xefa(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
lea    0xf01(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    149e <print_info+0x38e>
lea    0xc7d(%rip),%rdi
lea    0xcaf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc97(%rip),%rdi
lea    0xc9a(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcb1(%rip),%rdi
lea    0xc85(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xccb(%rip),%rdi
lea    0xc70(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xce5(%rip),%rdi
lea    0xc5b(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcff(%rip),%rdi
lea    0xc46(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd19(%rip),%rdi
lea    0xc31(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd33(%rip),%rdi
lea    0xc1c(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd4e(%rip),%rdi
lea    0xc07(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd69(%rip),%rdi
lea    0xbf2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd76(%rip),%rdi
lea    0xe34(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd5e(%rip),%rdi
lea    0xe36(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    149e <print_info+0x38e>
jmp    149e <print_info+0x38e>
lea    0xe43(%rip),%rdi
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe54(%rip),%rdi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info>:
push   %rbx
cmp    $0x2,%edi
je     121d <print_info+0x10d>
cmp    $0x1,%edi
je     130b <print_info+0x1fb>
test   %edi,%edi
jne    1414 <print_info+0x304>
lea    0xece(%rip),%rdi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0xf05(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
lea    0xf1f(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
lea    0xf39(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
lea    0xf53(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
lea    0xf6d(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
lea    0xf85(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf9c(%rip),%rdi
lea    0xfa0(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfb7(%rip),%rdi
lea    0xfbb(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfd2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfd7(%rip),%rsi
jmp    1406 <print_info+0x2f6>
lea    0xddc(%rip),%rdi
lea    0xe0e(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdf3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe11(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe2f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe4d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfc1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    0xfb4(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf74(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfbd(%rip),%rsi
jmp    1406 <print_info+0x2f6>
lea    0xcee(%rip),%rdi
lea    0xd20(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd23(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd41(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd5f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd7d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd9b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdb9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdd8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe62(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xde9(%rip),%rdi
lea    0xe53(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdf6(%rip),%rdi
lea    0xe5d(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe6b(%rip),%rsi
lea    0xdd7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0xee2(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

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