int afl2planet(int afl) {
  int p;
  switch (afl) {
  case '0':
    p = 0;
    break;
  case '1':
    p = 1;
    break;
  case '2':
    p = 2;
    break;
  case '3':
    p = 3;
    break;
  case '4':
    p = 4;
    break;
  case '5':
    p = 5;
    break;
  case '6':
    p = 6;
    break;
  case '7':
    p = 7;
    break;
  case '8':
    p = 8;
    break;
  case '9':
    p = 9;
    break;
  case 'n':
    p = 10;
    break;
  case 'N':
    p = 11;
    break;
  case 'c':
    p = 12;
    break;
  case 'i':
    p = 13;
    break;
  case 'C':
    p = 14;
    break;
  case 'P':
    p = 15;
    break;
  case 'J':
    p = 16;
    break;
  case 'V':
    p = 17;
    break;
  case 'A':
    p = 19;
    break;
  case 'M':
    p = 20;
    break;
  default:
    p = -1;
    break;
  }
  return p;
}


x86 assembly (clang, -O0):
<afl2planet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3e,%eax
ja     1220 <afl2planet+0x120>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x1,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x2,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x3,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x4,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x5,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x6,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x7,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x8,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x9,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xa,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xb,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xc,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xd,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xe,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xf,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x10,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x11,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x13,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0x14,-0x8(%rbp)
jmp    1227 <afl2planet+0x127>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<afl2planet>:
add    $0xffffffd0,%edi
cmp    $0x3e,%edi
ja     1150 <afl2planet+0x50>
xor    %eax,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret
mov    $0x4,%eax
ret
mov    $0x5,%eax
ret
mov    $0x6,%eax
ret
mov    $0x7,%eax
ret
mov    $0x8,%eax
ret
mov    $0x9,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x13,%eax
ret
mov    $0xe,%eax
ret
mov    $0x10,%eax
ret
mov    $0x14,%eax
ret
mov    $0xb,%eax
ret
mov    $0xf,%eax
ret
mov    $0x11,%eax
ret
mov    $0xc,%eax
ret
mov    $0xd,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @afl2planet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %25 [
i32 48, label %5
i32 49, label %6
i32 50, label %7
i32 51, label %8
i32 52, label %9
i32 53, label %10
i32 54, label %11
i32 55, label %12
i32 56, label %13
i32 57, label %14
i32 110, label %15
i32 78, label %16
i32 99, label %17
i32 105, label %18
i32 67, label %19
i32 80, label %20
i32 74, label %21
i32 86, label %22
i32 65, label %23
i32 77, label %24
]
5: ; preds = %1
store i32 0, i32* %3
br label %26
6: ; preds = %1
store i32 1, i32* %3
br label %26
7: ; preds = %1
store i32 2, i32* %3
br label %26
8: ; preds = %1
store i32 3, i32* %3
br label %26
9: ; preds = %1
store i32 4, i32* %3
br label %26
10: ; preds = %1
store i32 5, i32* %3
br label %26
11: ; preds = %1
store i32 6, i32* %3
br label %26
12: ; preds = %1
store i32 7, i32* %3
br label %26
13: ; preds = %1
store i32 8, i32* %3
br label %26
14: ; preds = %1
store i32 9, i32* %3
br label %26
15: ; preds = %1
store i32 10, i32* %3
br label %26
16: ; preds = %1
store i32 11, i32* %3
br label %26
17: ; preds = %1
store i32 12, i32* %3
br label %26
18: ; preds = %1
store i32 13, i32* %3
br label %26
19: ; preds = %1
store i32 14, i32* %3
br label %26
20: ; preds = %1
store i32 15, i32* %3
br label %26
21: ; preds = %1
store i32 16, i32* %3
br label %26
22: ; preds = %1
store i32 17, i32* %3
br label %26
23: ; preds = %1
store i32 19, i32* %3
br label %26
24: ; preds = %1
store i32 20, i32* %3
br label %26
25: ; preds = %1
store i32 -1, i32* %3
br label %26
26: ; preds = %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @afl2planet(i32 %0) {
switch i32 %0, label %21 [
i32 48, label %22
i32 49, label %2
i32 50, label %3
i32 51, label %4
i32 52, label %5
i32 53, label %6
i32 54, label %7
i32 55, label %8
i32 56, label %9
i32 57, label %10
i32 110, label %11
i32 78, label %12
i32 99, label %13
i32 105, label %14
i32 67, label %15
i32 80, label %16
i32 74, label %17
i32 86, label %18
i32 65, label %19
i32 77, label %20
]
2: ; preds = %1
br label %22
3: ; preds = %1
br label %22
4: ; preds = %1
br label %22
5: ; preds = %1
br label %22
6: ; preds = %1
br label %22
7: ; preds = %1
br label %22
8: ; preds = %1
br label %22
9: ; preds = %1
br label %22
10: ; preds = %1
br label %22
11: ; preds = %1
br label %22
12: ; preds = %1
br label %22
13: ; preds = %1
br label %22
14: ; preds = %1
br label %22
15: ; preds = %1
br label %22
16: ; preds = %1
br label %22
17: ; preds = %1
br label %22
18: ; preds = %1
br label %22
19: ; preds = %1
br label %22
20: ; preds = %1
br label %22
21: ; preds = %1
br label %22
22: ; preds = %1, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%23 = phi i32 [ -1, %21 ], [ 20, %20 ], [ 19, %19 ], [ 17, %18 ], [ 16, %17 ], [ 15, %16 ], [ 14, %15 ], [ 13, %14 ], [ 12, %13 ], [ 11, %12 ], [ 10, %11 ], [ 9, %10 ], [ 8, %9 ], [ 7, %8 ], [ 6, %7 ], [ 5, %6 ], [ 4, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %23
}