int planet2afl(int planet) {
  switch (planet) {
  case 0:
    return '0';
  case 1:
    return '1';
  case 2:
    return '2';
  case 3:
    return '3';
  case 4:
    return '4';
  case 5:
    return '5';
  case 6:
    return '6';
  case 7:
    return '7';
  case 8:
    return '8';
  case 9:
    return '9';
  case 10:
    return 'n';
  case 11:
    return 'N';
  case 12:
    return 'c';
  case 13:
    return 'i';
  case 14:
    return 'C';
  case 15:
    return 'P';
  case 16:
    return 'J';
  case 17:
    return 'V';
  case 19:
    return 'A';
  case 20:
    return 'M';
  }
  if (planet >= 21 && planet <= 32)
    return 'H';
  else
    return -1;
}


x86 assembly (clang, -O0):
<planet2afl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x14,%rax
ja     121c <planet2afl+0x11c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x30,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x31,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x32,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x33,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x34,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x35,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x36,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x37,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x38,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x39,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x6e,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x4e,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x63,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x69,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x43,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x50,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x4a,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x56,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x41,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0x4d,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
cmpl   $0x15,-0x8(%rbp)
jl     123c <planet2afl+0x13c>
cmpl   $0x20,-0x8(%rbp)
jg     123c <planet2afl+0x13c>
movl   $0x48,-0x4(%rbp)
jmp    1243 <planet2afl+0x143>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<planet2afl>:
cmp    $0x15,%edi
jae    110f <planet2afl+0xf>
mov    $0x1bffff,%eax
bt     %edi,%eax
jb     1123 <planet2afl+0x23>
add    $0xffffffeb,%edi
cmp    $0xc,%edi
mov    $0x48,%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret
movslq %edi,%rax
lea    0xed3(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @planet2afl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %25 [
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 19, label %23
i32 20, label %24
]
5: ; preds = %1
store i32 48, i32* %2
br label %33
6: ; preds = %1
store i32 49, i32* %2
br label %33
7: ; preds = %1
store i32 50, i32* %2
br label %33
8: ; preds = %1
store i32 51, i32* %2
br label %33
9: ; preds = %1
store i32 52, i32* %2
br label %33
10: ; preds = %1
store i32 53, i32* %2
br label %33
11: ; preds = %1
store i32 54, i32* %2
br label %33
12: ; preds = %1
store i32 55, i32* %2
br label %33
13: ; preds = %1
store i32 56, i32* %2
br label %33
14: ; preds = %1
store i32 57, i32* %2
br label %33
15: ; preds = %1
store i32 110, i32* %2
br label %33
16: ; preds = %1
store i32 78, i32* %2
br label %33
17: ; preds = %1
store i32 99, i32* %2
br label %33
18: ; preds = %1
store i32 105, i32* %2
br label %33
19: ; preds = %1
store i32 67, i32* %2
br label %33
20: ; preds = %1
store i32 80, i32* %2
br label %33
21: ; preds = %1
store i32 74, i32* %2
br label %33
22: ; preds = %1
store i32 86, i32* %2
br label %33
23: ; preds = %1
store i32 65, i32* %2
br label %33
24: ; preds = %1
store i32 77, i32* %2
br label %33
25: ; preds = %1
%26 = load i32, i32* %3
%27 = icmp sge i32 %26, 21
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %3
%30 = icmp sle i32 %29, 32
br i1 %30, label %31, label %32
31: ; preds = %28
store i32 72, i32* %2
br label %33
32: ; preds = %28, %25
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %31, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
@switch.table.planet2afl = [21 x i32] [i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 110, i32 78, i32 99, i32 105, i32 67, i32 80, i32 74, i32 86, i32 48, i32 65, i32 77]
define i32 @planet2afl(i32 %0) {
%2 = icmp ult i32 %0, 21
br i1 %2, label %7, label %3
3: ; preds = %7, %1
%4 = add i32 %0, -21
%5 = icmp ult i32 %4, 12
%6 = select i1 %5, i32 72, i32 -1
br label %15
7: ; preds = %1
%8 = lshr i32 1835007, %0
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %7
%12 = sext i32 %0 to i64
%13 = getelementptr inbounds [21 x i32], [21 x i32]* @switch.table.planet2afl, i64 0, i64 %12
%14 = load i32, i32* %13
br label %15
15: ; preds = %11, %3
%16 = phi i32 [ %6, %3 ], [ %14, %11 ]
ret i32 %16
}