const char *cunning_convert(int input, char ref) {
  const char *n[] = {"./.", "./.", "./.", "./.", "./.",
                     "./.", "./.", "./.", "./.", "./."};
  const char *a[] = {"0/0", "0/1", "0/1", "0/1", "1/1",
                     "./.", "./.", "1/1", "./.", "1/1"};
  const char *t[] = {"1/1", "./.", "./.", "0/1", "1/1",
                     "./.", "0/1", "1/1", "0/1", "0/0"};
  const char *g[] = {"1/1", "./.", "0/1", "./.", "1/1",
                     "0/1", "./.", "0/0", "0/1", "1/1"};
  const char *c[] = {"1/1", "0/1", "./.", "./.", "0/0",
                     "0/1", "0/1", "1/1", "./.", "1/1"};
  const char **table = n;
  switch (ref) {
  case 'A':
    table = a;
    break;
  case 'T':
    table = t;
    break;
  case 'G':
    table = g;
    break;
  case 'C':
    table = c;
    break;
  default:
    table = n;
  }
  return table[input];
}


x86 assembly (clang, -O0):
<cunning_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movaps 0x2be5(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movaps 0x2bca(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movaps 0x2baf(%rip),%xmm0
movaps %xmm0,-0x40(%rbp)
movaps 0x2b94(%rip),%xmm0
movaps %xmm0,-0x50(%rbp)
movaps 0x2b79(%rip),%xmm0
movaps %xmm0,-0x60(%rbp)
movaps 0x2bfe(%rip),%xmm0
movaps %xmm0,-0x70(%rbp)
movaps 0x2be3(%rip),%xmm0
movaps %xmm0,-0x80(%rbp)
movaps 0x2bc8(%rip),%xmm0
movaps %xmm0,-0x90(%rbp)
movaps 0x2baa(%rip),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps 0x2b8c(%rip),%xmm0
movaps %xmm0,-0xb0(%rbp)
movaps 0x2c0e(%rip),%xmm0
movaps %xmm0,-0xc0(%rbp)
movaps 0x2bf0(%rip),%xmm0
movaps %xmm0,-0xd0(%rbp)
movaps 0x2bd2(%rip),%xmm0
movaps %xmm0,-0xe0(%rbp)
movaps 0x2bb4(%rip),%xmm0
movaps %xmm0,-0xf0(%rbp)
movaps 0x2b96(%rip),%xmm0
movaps %xmm0,-0x100(%rbp)
movaps 0x2c18(%rip),%xmm0
movaps %xmm0,-0x110(%rbp)
movaps 0x2bfa(%rip),%xmm0
movaps %xmm0,-0x120(%rbp)
movaps 0x2bdc(%rip),%xmm0
movaps %xmm0,-0x130(%rbp)
movaps 0x2bbe(%rip),%xmm0
movaps %xmm0,-0x140(%rbp)
movaps 0x2ba0(%rip),%xmm0
movaps %xmm0,-0x150(%rbp)
movaps 0x2c22(%rip),%xmm0
movaps %xmm0,-0x160(%rbp)
movaps 0x2c04(%rip),%xmm0
movaps %xmm0,-0x170(%rbp)
movaps 0x2be6(%rip),%xmm0
movaps %xmm0,-0x180(%rbp)
movaps 0x2bc8(%rip),%xmm0
movaps %xmm0,-0x190(%rbp)
movaps 0x2baa(%rip),%xmm0
movaps %xmm0,-0x1a0(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x1b0(%rbp)
sub    $0x13,%eax
ja     12e4 <cunning_convert+0x1e4>
mov    -0x1b0(%rbp),%rax
lea    0xd71(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0xb0(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
jmp    12ef <cunning_convert+0x1ef>
lea    -0x100(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
jmp    12ef <cunning_convert+0x1ef>
lea    -0x150(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
jmp    12ef <cunning_convert+0x1ef>
lea    -0x1a0(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
jmp    12ef <cunning_convert+0x1ef>
lea    -0x60(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cunning_convert>:
sub    $0x118,%rsp
movaps 0x2bf2(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0x2bd3(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0x2bb4(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0x2b95(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0x2b76(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0x2bf7(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0x2bd8(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0x2bb9(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0x2b9a(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0x2b7b(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2bff(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2be3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2bc7(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2bab(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2b8f(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2c13(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2bf7(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0x2bdc(%rip),%xmm0
movaps %xmm0,-0x10(%rsp)
movaps 0x2bc0(%rip),%xmm0
movaps %xmm0,-0x20(%rsp)
movaps 0x2ba4(%rip),%xmm0
movaps %xmm0,-0x30(%rsp)
movaps 0x2c28(%rip),%xmm0
movaps %xmm0,-0x40(%rsp)
movaps 0x2c0c(%rip),%xmm0
movaps %xmm0,-0x50(%rsp)
movaps 0x2bf0(%rip),%xmm0
movaps %xmm0,-0x60(%rsp)
movaps 0x2bd4(%rip),%xmm0
movaps %xmm0,-0x70(%rsp)
movaps 0x2bb8(%rip),%xmm0
movaps %xmm0,-0x80(%rsp)
add    $0xffffffbf,%esi
cmp    $0x13,%esi
ja     1271 <cunning_convert+0x171>
lea    0x70(%rsp),%rax
lea    0xd9f(%rip),%rcx
movslq (%rcx,%rsi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    -0x80(%rsp),%rax
jmp    1287 <cunning_convert+0x187>
lea    0xc0(%rsp),%rax
jmp    1287 <cunning_convert+0x187>
lea    -0x30(%rsp),%rax
jmp    1287 <cunning_convert+0x187>
lea    0x20(%rsp),%rax
movslq %edi,%rcx
mov    (%rax,%rcx,8),%rax
add    $0x118,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"./.\00"
@__const.cunning_convert.n = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)]
@.str.1 = [4 x i8] c"0/0\00"
@.str.2 = [4 x i8] c"0/1\00"
@.str.3 = [4 x i8] c"1/1\00"
@__const.cunning_convert.a = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@__const.cunning_convert.t = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0)]
@__const.cunning_convert.g = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@__const.cunning_convert.c = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
define i8* @cunning_convert(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [10 x i8*]
%6 = alloca [10 x i8*]
%7 = alloca [10 x i8*]
%8 = alloca [10 x i8*]
%9 = alloca [10 x i8*]
%10 = alloca i8**
store i32 %0, i32* %3
store i8 %1, i8* %4
%11 = bitcast [10 x i8*]* %5 to i8*
%12 = bitcast [10 x i8*]* %6 to i8*
%13 = bitcast [10 x i8*]* %7 to i8*
%14 = bitcast [10 x i8*]* %8 to i8*
%15 = bitcast [10 x i8*]* %9 to i8*
%16 = getelementptr inbounds [10 x i8*], [10 x i8*]* %5, i64 0, i64 0
store i8** %16, i8*** %10
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
switch i32 %18, label %27 [
i32 65, label %19
i32 84, label %21
i32 71, label %23
i32 67, label %25
]
19: ; preds = %2
%20 = getelementptr inbounds [10 x i8*], [10 x i8*]* %6, i64 0, i64 0
store i8** %20, i8*** %10
br label %29
21: ; preds = %2
%22 = getelementptr inbounds [10 x i8*], [10 x i8*]* %7, i64 0, i64 0
store i8** %22, i8*** %10
br label %29
23: ; preds = %2
%24 = getelementptr inbounds [10 x i8*], [10 x i8*]* %8, i64 0, i64 0
store i8** %24, i8*** %10
br label %29
25: ; preds = %2
%26 = getelementptr inbounds [10 x i8*], [10 x i8*]* %9, i64 0, i64 0
store i8** %26, i8*** %10
br label %29
27: ; preds = %2
%28 = getelementptr inbounds [10 x i8*], [10 x i8*]* %5, i64 0, i64 0
store i8** %28, i8*** %10
br label %29
29: ; preds = %27, %25, %23, %21, %19
%30 = load i8**, i8*** %10
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8*, i8** %30, i64 %32
%34 = load i8*, i8** %33
ret i8* %34
}

LLVM IR (-O2):
@.str = [4 x i8] c"./.\00"
@__const.cunning_convert.n = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)]
@.str.1 = [4 x i8] c"0/0\00"
@.str.2 = [4 x i8] c"0/1\00"
@.str.3 = [4 x i8] c"1/1\00"
@__const.cunning_convert.a = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@__const.cunning_convert.t = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0)]
@__const.cunning_convert.g = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@__const.cunning_convert.c = [10 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
define i8* @cunning_convert(i32 %0, i8 signext %1) {
%3 = alloca [10 x i8*]
%4 = alloca [10 x i8*]
%5 = alloca [10 x i8*]
%6 = alloca [10 x i8*]
%7 = alloca [10 x i8*]
%8 = bitcast [10 x i8*]* %3 to i8*
%9 = bitcast [10 x i8*]* %4 to i8*
%10 = bitcast [10 x i8*]* %5 to i8*
%11 = bitcast [10 x i8*]* %6 to i8*
%12 = bitcast [10 x i8*]* %7 to i8*
%13 = sext i8 %1 to i32
switch i32 %13, label %17 [
i32 65, label %18
i32 84, label %14
i32 71, label %15
i32 67, label %16
]
14: ; preds = %2
br label %18
15: ; preds = %2
br label %18
16: ; preds = %2
br label %18
17: ; preds = %2
br label %18
18: ; preds = %2, %17, %16, %15, %14
%19 = phi [10 x i8*]* [ %3, %17 ], [ %7, %16 ], [ %6, %15 ], [ %5, %14 ], [ %4, %2 ]
%20 = sext i32 %0 to i64
%21 = getelementptr inbounds [10 x i8*], [10 x i8*]* %19, i64 0, i64 %20
%22 = load i8*, i8** %21
ret i8* %22
}