int FBasesPolN(int b) {
  switch (b) {
  case 'A':
    return 'A';
  case 'C':
    return 'C';
  case 'G':
    return 'G';
  case 'T':
    return 'T';
  case 'U':
    return 'T';
  case 'a':
    return 'A';
  case 'c':
    return 'C';
  case 'g':
    return 'G';
  case 't':
    return 'T';
  case 'n':
    return 'N';
  case 'N':
    return 'N';
  default:
    return -1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<FBasesPolN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x33,%eax
ja     11b4 <FBasesPolN+0xb4>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x41,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x43,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x47,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x54,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x54,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x41,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x43,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x47,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x54,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x4e,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0x4e,-0x4(%rbp)
jmp    11bb <FBasesPolN+0xbb>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FBasesPolN>:
lea    -0x41(%rdi),%ecx
cmp    $0x33,%ecx
ja     1138 <FBasesPolN+0x38>
mov    $0x41,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    %edi,%eax
ret
mov    $0x54,%eax
ret
mov    $0x43,%eax
ret
mov    $0x47,%eax
ret
mov    $0x4e,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @FBasesPolN(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %16 [
i32 65, label %5
i32 67, label %6
i32 71, label %7
i32 84, label %8
i32 85, label %9
i32 97, label %10
i32 99, label %11
i32 103, label %12
i32 116, label %13
i32 110, label %14
i32 78, label %15
]
5: ; preds = %1
store i32 65, i32* %2
br label %17
6: ; preds = %1
store i32 67, i32* %2
br label %17
7: ; preds = %1
store i32 71, i32* %2
br label %17
8: ; preds = %1
store i32 84, i32* %2
br label %17
9: ; preds = %1
store i32 84, i32* %2
br label %17
10: ; preds = %1
store i32 65, i32* %2
br label %17
11: ; preds = %1
store i32 67, i32* %2
br label %17
12: ; preds = %1
store i32 71, i32* %2
br label %17
13: ; preds = %1
store i32 84, i32* %2
br label %17
14: ; preds = %1
store i32 78, i32* %2
br label %17
15: ; preds = %1
store i32 78, i32* %2
br label %17
16: ; preds = %1
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @FBasesPolN(i32 %0) {
switch i32 %0, label %11 [
i32 65, label %12
i32 67, label %2
i32 71, label %3
i32 84, label %4
i32 85, label %5
i32 97, label %12
i32 99, label %6
i32 103, label %7
i32 116, label %8
i32 110, label %9
i32 78, label %10
]
2: ; preds = %1
br label %12
3: ; preds = %1
br label %12
4: ; preds = %1
br label %12
5: ; preds = %1
br label %12
6: ; preds = %1
br label %12
7: ; preds = %1
br label %12
8: ; preds = %1
br label %12
9: ; preds = %1
br label %12
10: ; preds = %1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %1, %1, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%13 = phi i32 [ -1, %11 ], [ %0, %10 ], [ 78, %9 ], [ 84, %8 ], [ 71, %7 ], [ 67, %6 ], [ 84, %5 ], [ %0, %4 ], [ %0, %3 ], [ %0, %2 ], [ 65, %1 ], [ 65, %1 ]
ret i32 %13
}