char decodeAA(int encodedAA) {
  switch (encodedAA) {
  case 0:
    return 'A';
  case 1:
    return 'R';
  case 2:
    return 'N';
  case 3:
    return 'D';
  case 4:
    return 'C';
  case 5:
    return 'Q';
  case 6:
    return 'E';
  case 7:
    return 'G';
  case 8:
    return 'H';
  case 9:
    return 'I';
  case 10:
    return 'L';
  case 11:
    return 'K';
  case 12:
    return 'M';
  case 13:
    return 'F';
  case 14:
    return 'P';
  case 15:
    return 'S';
  case 16:
    return 'T';
  case 17:
    return 'W';
  case 18:
    return 'Y';
  case 19:
    return 'V';
  case 20:
    return 'B';
  case 21:
    return 'Z';
  case 99:
    return 'X';
  case -1:
    return '*';
  default:
    return '?';
  }
}


x86 assembly (clang, -O0):
<decodeAA>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x64,%eax
ja     1208 <decodeAA+0x108>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x41,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x52,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x4e,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x44,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x43,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x51,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x45,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x47,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x48,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x49,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x4c,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x4b,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x4d,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x46,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x50,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x53,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x54,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x57,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x59,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x56,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x42,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x5a,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x58,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x2a,-0x1(%rbp)
jmp    120c <decodeAA+0x10c>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeAA>:
add    $0x1,%edi
cmp    $0x64,%edi
ja     115c <decodeAA+0x5c>
mov    $0x41,%al
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x2a,%al
ret
mov    $0x52,%al
ret
mov    $0x4e,%al
ret
mov    $0x44,%al
ret
mov    $0x43,%al
ret
mov    $0x51,%al
ret
mov    $0x45,%al
ret
mov    $0x47,%al
ret
mov    $0x48,%al
ret
mov    $0x49,%al
ret
mov    $0x4c,%al
ret
mov    $0x4b,%al
ret
mov    $0x4d,%al
ret
mov    $0x46,%al
ret
mov    $0x50,%al
ret
mov    $0x53,%al
ret
mov    $0x54,%al
ret
mov    $0x57,%al
ret
mov    $0x59,%al
ret
mov    $0x56,%al
ret
mov    $0x42,%al
ret
mov    $0x5a,%al
ret
mov    $0x3f,%al
ret
mov    $0x58,%al
ret

LLVM IR (-O0):
define signext i8 @decodeAA(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %29 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 10, label %15
i32 11, label %16
i32 12, label %17
i32 13, label %18
i32 14, label %19
i32 15, label %20
i32 16, label %21
i32 17, label %22
i32 18, label %23
i32 19, label %24
i32 20, label %25
i32 21, label %26
i32 99, label %27
i32 -1, label %28
]
5: ; preds = %1
store i8 65, i8* %2
br label %30
6: ; preds = %1
store i8 82, i8* %2
br label %30
7: ; preds = %1
store i8 78, i8* %2
br label %30
8: ; preds = %1
store i8 68, i8* %2
br label %30
9: ; preds = %1
store i8 67, i8* %2
br label %30
10: ; preds = %1
store i8 81, i8* %2
br label %30
11: ; preds = %1
store i8 69, i8* %2
br label %30
12: ; preds = %1
store i8 71, i8* %2
br label %30
13: ; preds = %1
store i8 72, i8* %2
br label %30
14: ; preds = %1
store i8 73, i8* %2
br label %30
15: ; preds = %1
store i8 76, i8* %2
br label %30
16: ; preds = %1
store i8 75, i8* %2
br label %30
17: ; preds = %1
store i8 77, i8* %2
br label %30
18: ; preds = %1
store i8 70, i8* %2
br label %30
19: ; preds = %1
store i8 80, i8* %2
br label %30
20: ; preds = %1
store i8 83, i8* %2
br label %30
21: ; preds = %1
store i8 84, i8* %2
br label %30
22: ; preds = %1
store i8 87, i8* %2
br label %30
23: ; preds = %1
store i8 89, i8* %2
br label %30
24: ; preds = %1
store i8 86, i8* %2
br label %30
25: ; preds = %1
store i8 66, i8* %2
br label %30
26: ; preds = %1
store i8 90, i8* %2
br label %30
27: ; preds = %1
store i8 88, i8* %2
br label %30
28: ; preds = %1
store i8 42, i8* %2
br label %30
29: ; preds = %1
store i8 63, i8* %2
br label %30
30: ; preds = %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%31 = load i8, i8* %2
ret i8 %31
}

LLVM IR (-O2):
define signext i8 @decodeAA(i32 %0) {
switch i32 %0, label %25 [
i32 0, label %26
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 5, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
i32 10, label %11
i32 11, label %12
i32 12, label %13
i32 13, label %14
i32 14, label %15
i32 15, label %16
i32 16, label %17
i32 17, label %18
i32 18, label %19
i32 19, label %20
i32 20, label %21
i32 21, label %22
i32 99, label %23
i32 -1, label %24
]
2: ; preds = %1
br label %26
3: ; preds = %1
br label %26
4: ; preds = %1
br label %26
5: ; preds = %1
br label %26
6: ; preds = %1
br label %26
7: ; preds = %1
br label %26
8: ; preds = %1
br label %26
9: ; preds = %1
br label %26
10: ; preds = %1
br label %26
11: ; preds = %1
br label %26
12: ; preds = %1
br label %26
13: ; preds = %1
br label %26
14: ; preds = %1
br label %26
15: ; preds = %1
br label %26
16: ; preds = %1
br label %26
17: ; preds = %1
br label %26
18: ; preds = %1
br label %26
19: ; preds = %1
br label %26
20: ; preds = %1
br label %26
21: ; preds = %1
br label %26
22: ; preds = %1
br label %26
23: ; preds = %1
br label %26
24: ; preds = %1
br label %26
25: ; preds = %1
br label %26
26: ; preds = %1, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%27 = phi i8 [ 63, %25 ], [ 42, %24 ], [ 88, %23 ], [ 90, %22 ], [ 66, %21 ], [ 86, %20 ], [ 89, %19 ], [ 87, %18 ], [ 84, %17 ], [ 83, %16 ], [ 80, %15 ], [ 70, %14 ], [ 77, %13 ], [ 75, %12 ], [ 76, %11 ], [ 73, %10 ], [ 72, %9 ], [ 71, %8 ], [ 69, %7 ], [ 81, %6 ], [ 67, %5 ], [ 68, %4 ], [ 78, %3 ], [ 82, %2 ], [ 65, %1 ]
ret i8 %27
}