#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 uint16_t;

/* Variables and functions */
int /*<<< orphan*/ add_nes_str(char *, char *);
void append_nes(char *input, uint16_t arg) {
  switch (arg) {
  case 0x2000:
    add_nes_str(input, "PPU setup #1");
    break;
  case 0x2001:
    add_nes_str(input, "PPU setup #2");
    break;
  case 0x2002:
    add_nes_str(input, "PPU status");
    break;
  case 0x2003:
    add_nes_str(input, "SPR-RAM address select");
    break;
  case 0x2004:
    add_nes_str(input, "SPR-RAM data");
    break;
  case 0x2005:
    add_nes_str(input, "PPU scroll");
    break;
  case 0x2006:
    add_nes_str(input, "VRAM address select");
    break;
  case 0x2007:
    add_nes_str(input, "VRAM data");
    break;
  case 0x4000:
    add_nes_str(input, "Audio -> Square 1");
    break;
  case 0x4001:
    add_nes_str(input, "Audio -> Square 1");
    break;
  case 0x4002:
    add_nes_str(input, "Audio -> Square 1");
    break;
  case 0x4003:
    add_nes_str(input, "Audio -> Square 1");
    break;
  case 0x4004:
    add_nes_str(input, "Audio -> Square 2");
    break;
  case 0x4005:
    add_nes_str(input, "Audio -> Square 2");
    break;
  case 0x4006:
    add_nes_str(input, "Audio -> Square 2");
    break;
  case 0x4007:
    add_nes_str(input, "Audio -> Square 2");
    break;
  case 0x4008:
    add_nes_str(input, "Audio -> Triangle");
    break;
  case 0x4009:
    add_nes_str(input, "Audio -> Triangle");
    break;
  case 0x400a:
    add_nes_str(input, "Audio -> Triangle");
    break;
  case 0x400b:
    add_nes_str(input, "Audio -> Triangle");
    break;
  case 0x400c:
    add_nes_str(input, "Audio -> Noise control reg");
    break;
  case 0x400e:
    add_nes_str(input, "Audio -> Noise Frequency reg #1");
    break;
  case 0x400f:
    add_nes_str(input, "Audio -> Noise Frequency reg #2");
    break;
  case 0x4010:
    add_nes_str(input, "Audio -> DPCM control");
    break;
  case 0x4011:
    add_nes_str(input, "Audio -> DPCM D/A data");
    break;
  case 0x4012:
    add_nes_str(input, "Audio -> DPCM address");
    break;
  case 0x4013:
    add_nes_str(input, "Audio -> DPCM data length");
    break;
  case 0x4014:
    add_nes_str(input, "Sprite DMA trigger");
    break;
  case 0x4015:
    add_nes_str(input, "IRQ status / Sound enable");
    break;
  case 0x4016:
    add_nes_str(input, "Joypad & I/O port for port #1");
    break;
  case 0x4017:
    add_nes_str(input, "Joypad & I/O port for port #2");
    break;
  }
}


x86 assembly (clang, -O0):
<append_nes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x2000,%eax
je     136f <append_nes+0x25f>
jmp    1135 <append_nes+0x25>
mov    -0x10(%rbp),%eax
sub    $0x2001,%eax
je     1384 <append_nes+0x274>
jmp    1148 <append_nes+0x38>
mov    -0x10(%rbp),%eax
sub    $0x2002,%eax
je     1399 <append_nes+0x289>
jmp    115b <append_nes+0x4b>
mov    -0x10(%rbp),%eax
sub    $0x2003,%eax
je     13ae <append_nes+0x29e>
jmp    116e <append_nes+0x5e>
mov    -0x10(%rbp),%eax
sub    $0x2004,%eax
je     13c3 <append_nes+0x2b3>
jmp    1181 <append_nes+0x71>
mov    -0x10(%rbp),%eax
sub    $0x2005,%eax
je     13d8 <append_nes+0x2c8>
jmp    1194 <append_nes+0x84>
mov    -0x10(%rbp),%eax
sub    $0x2006,%eax
je     13ed <append_nes+0x2dd>
jmp    11a7 <append_nes+0x97>
mov    -0x10(%rbp),%eax
sub    $0x2007,%eax
je     1402 <append_nes+0x2f2>
jmp    11ba <append_nes+0xaa>
mov    -0x10(%rbp),%eax
sub    $0x4000,%eax
je     1417 <append_nes+0x307>
jmp    11cd <append_nes+0xbd>
mov    -0x10(%rbp),%eax
sub    $0x4001,%eax
je     142c <append_nes+0x31c>
jmp    11e0 <append_nes+0xd0>
mov    -0x10(%rbp),%eax
sub    $0x4002,%eax
je     1441 <append_nes+0x331>
jmp    11f3 <append_nes+0xe3>
mov    -0x10(%rbp),%eax
sub    $0x4003,%eax
je     1456 <append_nes+0x346>
jmp    1206 <append_nes+0xf6>
mov    -0x10(%rbp),%eax
sub    $0x4004,%eax
je     146b <append_nes+0x35b>
jmp    1219 <append_nes+0x109>
mov    -0x10(%rbp),%eax
sub    $0x4005,%eax
je     1480 <append_nes+0x370>
jmp    122c <append_nes+0x11c>
mov    -0x10(%rbp),%eax
sub    $0x4006,%eax
je     1495 <append_nes+0x385>
jmp    123f <append_nes+0x12f>
mov    -0x10(%rbp),%eax
sub    $0x4007,%eax
je     14aa <append_nes+0x39a>
jmp    1252 <append_nes+0x142>
mov    -0x10(%rbp),%eax
sub    $0x4008,%eax
je     14bf <append_nes+0x3af>
jmp    1265 <append_nes+0x155>
mov    -0x10(%rbp),%eax
sub    $0x4009,%eax
je     14d4 <append_nes+0x3c4>
jmp    1278 <append_nes+0x168>
mov    -0x10(%rbp),%eax
sub    $0x400a,%eax
je     14e9 <append_nes+0x3d9>
jmp    128b <append_nes+0x17b>
mov    -0x10(%rbp),%eax
sub    $0x400b,%eax
je     14fe <append_nes+0x3ee>
jmp    129e <append_nes+0x18e>
mov    -0x10(%rbp),%eax
sub    $0x400c,%eax
je     1513 <append_nes+0x403>
jmp    12b1 <append_nes+0x1a1>
mov    -0x10(%rbp),%eax
sub    $0x400e,%eax
je     1528 <append_nes+0x418>
jmp    12c4 <append_nes+0x1b4>
mov    -0x10(%rbp),%eax
sub    $0x400f,%eax
je     153d <append_nes+0x42d>
jmp    12d7 <append_nes+0x1c7>
mov    -0x10(%rbp),%eax
sub    $0x4010,%eax
je     1552 <append_nes+0x442>
jmp    12ea <append_nes+0x1da>
mov    -0x10(%rbp),%eax
sub    $0x4011,%eax
je     1567 <append_nes+0x457>
jmp    12fd <append_nes+0x1ed>
mov    -0x10(%rbp),%eax
sub    $0x4012,%eax
je     157c <append_nes+0x46c>
jmp    1310 <append_nes+0x200>
mov    -0x10(%rbp),%eax
sub    $0x4013,%eax
je     1591 <append_nes+0x481>
jmp    1323 <append_nes+0x213>
mov    -0x10(%rbp),%eax
sub    $0x4014,%eax
je     15a6 <append_nes+0x496>
jmp    1336 <append_nes+0x226>
mov    -0x10(%rbp),%eax
sub    $0x4015,%eax
je     15bb <append_nes+0x4ab>
jmp    1349 <append_nes+0x239>
mov    -0x10(%rbp),%eax
sub    $0x4016,%eax
je     15d0 <append_nes+0x4c0>
jmp    135c <append_nes+0x24c>
mov    -0x10(%rbp),%eax
sub    $0x4017,%eax
je     15e5 <append_nes+0x4d5>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc86(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc7e(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc76(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc6c(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc6e(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc66(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc5c(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc5b(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc50(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc3b(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc26(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc11(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xc0e(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbf9(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbe4(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbcf(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbcc(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbb7(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xba2(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xb8d(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xb8a(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xb90(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xb9b(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xba6(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xba7(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xba9(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbaa(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbaf(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbad(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbb2(%rip),%rsi
call   1030 <add_nes_str@plt>
jmp    15f5 <append_nes+0x4e5>
mov    -0x8(%rbp),%rdi
lea    0xbbb(%rip),%rsi
call   1030 <add_nes_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_nes>:
mov    %esi,%eax
lea    -0x4000(%rax),%ecx
cmp    $0x17,%ecx
ja     1139 <append_nes+0x29>
lea    0xefc(%rip),%rax
movslq (%rax,%rcx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xfbe(%rip),%rsi
jmp    1030 <add_nes_str@plt>
add    $0xffffe000,%eax
cmp    $0x7,%eax
ja     117e <append_nes+0x6e>
lea    0xf36(%rip),%rsi
lea    0xeaf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf2c(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xf97(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xf9d(%rip),%rsi
jmp    1030 <add_nes_str@plt>
ret
lea    0xfa2(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xfb1(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xfc5(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xfd9(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xfe3(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xfee(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xff8(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0x1006(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0x100d(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0x101b(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0x102d(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xe90(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xe8f(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xe9a(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xe9b(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xeae(%rip),%rsi
jmp    1030 <add_nes_str@plt>
lea    0xe8e(%rip),%rsi
jmp    1030 <add_nes_str@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"PPU setup\00"
@.str.1 = [13 x i8] c"PPU setup\00"
@.str.2 = [11 x i8] c"PPU status\00"
@.str.3 = [23 x i8] c"SPR-RAM address select\00"
@.str.4 = [13 x i8] c"SPR-RAM data\00"
@.str.5 = [11 x i8] c"PPU scroll\00"
@.str.6 = [20 x i8] c"VRAM address select\00"
@.str.7 = [10 x i8] c"VRAM data\00"
@.str.8 = [18 x i8] c"Audio -> Square 1\00"
@.str.9 = [18 x i8] c"Audio -> Square 2\00"
@.str.10 = [18 x i8] c"Audio -> Triangle\00"
@.str.11 = [27 x i8] c"Audio -> Noise control reg\00"
@.str.12 = [32 x i8] c"Audio -> Noise Frequency reg\00"
@.str.13 = [32 x i8] c"Audio -> Noise Frequency reg\00"
@.str.14 = [22 x i8] c"Audio -> DPCM control\00"
@.str.15 = [23 x i8] c"Audio -> DPCM D/A data\00"
@.str.16 = [22 x i8] c"Audio -> DPCM address\00"
@.str.17 = [26 x i8] c"Audio -> DPCM data length\00"
@.str.18 = [19 x i8] c"Sprite DMA trigger\00"
@.str.19 = [26 x i8] c"IRQ status / Sound enable\00"
@.str.20 = [30 x i8] c"Joypad & I/O port for port\00"
@.str.21 = [30 x i8] c"Joypad & I/O port for port\00"
define void @append_nes(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %99 [
i32 8192, label %6
i32 8193, label %9
i32 8194, label %12
i32 8195, label %15
i32 8196, label %18
i32 8197, label %21
i32 8198, label %24
i32 8199, label %27
i32 16384, label %30
i32 16385, label %33
i32 16386, label %36
i32 16387, label %39
i32 16388, label %42
i32 16389, label %45
i32 16390, label %48
i32 16391, label %51
i32 16392, label %54
i32 16393, label %57
i32 16394, label %60
i32 16395, label %63
i32 16396, label %66
i32 16398, label %69
i32 16399, label %72
i32 16400, label %75
i32 16401, label %78
i32 16402, label %81
i32 16403, label %84
i32 16404, label %87
i32 16405, label %90
i32 16406, label %93
i32 16407, label %96
]
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = call i32 @add_nes_str(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %99
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @add_nes_str(i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %99
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i32 @add_nes_str(i8* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %99
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = call i32 @add_nes_str(i8* %16, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %99
18: ; preds = %2
%19 = load i8*, i8** %3
%20 = call i32 @add_nes_str(i8* %19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %99
21: ; preds = %2
%22 = load i8*, i8** %3
%23 = call i32 @add_nes_str(i8* %22, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %99
24: ; preds = %2
%25 = load i8*, i8** %3
%26 = call i32 @add_nes_str(i8* %25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %99
27: ; preds = %2
%28 = load i8*, i8** %3
%29 = call i32 @add_nes_str(i8* %28, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %99
30: ; preds = %2
%31 = load i8*, i8** %3
%32 = call i32 @add_nes_str(i8* %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %99
33: ; preds = %2
%34 = load i8*, i8** %3
%35 = call i32 @add_nes_str(i8* %34, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %99
36: ; preds = %2
%37 = load i8*, i8** %3
%38 = call i32 @add_nes_str(i8* %37, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %99
39: ; preds = %2
%40 = load i8*, i8** %3
%41 = call i32 @add_nes_str(i8* %40, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %99
42: ; preds = %2
%43 = load i8*, i8** %3
%44 = call i32 @add_nes_str(i8* %43, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %99
45: ; preds = %2
%46 = load i8*, i8** %3
%47 = call i32 @add_nes_str(i8* %46, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %99
48: ; preds = %2
%49 = load i8*, i8** %3
%50 = call i32 @add_nes_str(i8* %49, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %99
51: ; preds = %2
%52 = load i8*, i8** %3
%53 = call i32 @add_nes_str(i8* %52, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %99
54: ; preds = %2
%55 = load i8*, i8** %3
%56 = call i32 @add_nes_str(i8* %55, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
br label %99
57: ; preds = %2
%58 = load i8*, i8** %3
%59 = call i32 @add_nes_str(i8* %58, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
br label %99
60: ; preds = %2
%61 = load i8*, i8** %3
%62 = call i32 @add_nes_str(i8* %61, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
br label %99
63: ; preds = %2
%64 = load i8*, i8** %3
%65 = call i32 @add_nes_str(i8* %64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
br label %99
66: ; preds = %2
%67 = load i8*, i8** %3
%68 = call i32 @add_nes_str(i8* %67, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
br label %99
69: ; preds = %2
%70 = load i8*, i8** %3
%71 = call i32 @add_nes_str(i8* %70, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
br label %99
72: ; preds = %2
%73 = load i8*, i8** %3
%74 = call i32 @add_nes_str(i8* %73, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
br label %99
75: ; preds = %2
%76 = load i8*, i8** %3
%77 = call i32 @add_nes_str(i8* %76, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
br label %99
78: ; preds = %2
%79 = load i8*, i8** %3
%80 = call i32 @add_nes_str(i8* %79, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
br label %99
81: ; preds = %2
%82 = load i8*, i8** %3
%83 = call i32 @add_nes_str(i8* %82, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0))
br label %99
84: ; preds = %2
%85 = load i8*, i8** %3
%86 = call i32 @add_nes_str(i8* %85, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.17, i64 0, i64 0))
br label %99
87: ; preds = %2
%88 = load i8*, i8** %3
%89 = call i32 @add_nes_str(i8* %88, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0))
br label %99
90: ; preds = %2
%91 = load i8*, i8** %3
%92 = call i32 @add_nes_str(i8* %91, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0))
br label %99
93: ; preds = %2
%94 = load i8*, i8** %3
%95 = call i32 @add_nes_str(i8* %94, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.20, i64 0, i64 0))
br label %99
96: ; preds = %2
%97 = load i8*, i8** %3
%98 = call i32 @add_nes_str(i8* %97, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
br label %99
99: ; preds = %2, %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"PPU setup\00"
@.str.1 = [13 x i8] c"PPU setup\00"
@.str.2 = [11 x i8] c"PPU status\00"
@.str.3 = [23 x i8] c"SPR-RAM address select\00"
@.str.4 = [13 x i8] c"SPR-RAM data\00"
@.str.5 = [11 x i8] c"PPU scroll\00"
@.str.6 = [20 x i8] c"VRAM address select\00"
@.str.7 = [10 x i8] c"VRAM data\00"
@.str.8 = [18 x i8] c"Audio -> Square 1\00"
@.str.9 = [18 x i8] c"Audio -> Square 2\00"
@.str.10 = [18 x i8] c"Audio -> Triangle\00"
@.str.11 = [27 x i8] c"Audio -> Noise control reg\00"
@.str.12 = [32 x i8] c"Audio -> Noise Frequency reg\00"
@.str.13 = [32 x i8] c"Audio -> Noise Frequency reg\00"
@.str.14 = [22 x i8] c"Audio -> DPCM control\00"
@.str.15 = [23 x i8] c"Audio -> DPCM D/A data\00"
@.str.16 = [22 x i8] c"Audio -> DPCM address\00"
@.str.17 = [26 x i8] c"Audio -> DPCM data length\00"
@.str.18 = [19 x i8] c"Sprite DMA trigger\00"
@.str.19 = [26 x i8] c"IRQ status / Sound enable\00"
@.str.20 = [30 x i8] c"Joypad & I/O port for port\00"
@.str.21 = [30 x i8] c"Joypad & I/O port for port\00"
define void @append_nes(i8* %0, i32 %1) {
switch i32 %1, label %36 [
i32 8192, label %33
i32 8193, label %3
i32 8194, label %4
i32 8195, label %5
i32 8196, label %6
i32 8197, label %7
i32 8198, label %8
i32 8199, label %9
i32 16384, label %10
i32 16385, label %11
i32 16386, label %12
i32 16387, label %13
i32 16388, label %14
i32 16389, label %15
i32 16390, label %16
i32 16391, label %17
i32 16392, label %18
i32 16393, label %19
i32 16394, label %20
i32 16395, label %21
i32 16396, label %22
i32 16398, label %23
i32 16399, label %24
i32 16400, label %25
i32 16401, label %26
i32 16402, label %27
i32 16403, label %28
i32 16404, label %29
i32 16405, label %30
i32 16406, label %31
i32 16407, label %32
]
3: ; preds = %2
br label %33
4: ; preds = %2
br label %33
5: ; preds = %2
br label %33
6: ; preds = %2
br label %33
7: ; preds = %2
br label %33
8: ; preds = %2
br label %33
9: ; preds = %2
br label %33
10: ; preds = %2
br label %33
11: ; preds = %2
br label %33
12: ; preds = %2
br label %33
13: ; preds = %2
br label %33
14: ; preds = %2
br label %33
15: ; preds = %2
br label %33
16: ; preds = %2
br label %33
17: ; preds = %2
br label %33
18: ; preds = %2
br label %33
19: ; preds = %2
br label %33
20: ; preds = %2
br label %33
21: ; preds = %2
br label %33
22: ; preds = %2
br label %33
23: ; preds = %2
br label %33
24: ; preds = %2
br label %33
25: ; preds = %2
br label %33
26: ; preds = %2
br label %33
27: ; preds = %2
br label %33
28: ; preds = %2
br label %33
29: ; preds = %2
br label %33
30: ; preds = %2
br label %33
31: ; preds = %2
br label %33
32: ; preds = %2
br label %33
33: ; preds = %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20, %21, %22, %23, %24, %25, %26, %27, %28, %29, %30, %31, %32
%34 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0), %32 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.20, i64 0, i64 0), %31 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), %30 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), %29 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.17, i64 0, i64 0), %28 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), %27 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), %26 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), %25 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), %24 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), %23 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0), %22 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %21 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %20 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %19 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), %18 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), %17 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), %16 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), %15 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), %14 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %13 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %12 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %11 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %2 ]
%35 = tail call i32 @add_nes_str(i8* %0, i8* %34)
br label %36
36: ; preds = %33, %2
ret void
}