int nt2int_rc_indel(char nt) {
  int result;
  if (nt == 'A') {
    result = 3;
  } else if (nt == 'C') {
    result = 2;
  } else if (nt == 'G') {
    result = 1;
  } else if (nt == 'T') {
    result = 0;
  } else if (nt == 'a') {
    result = 8;
  } else if (nt == 'c') {
    result = 7;
  } else if (nt == 'g') {
    result = 6;
  } else if (nt == 't') {
    result = 5;
  } else if (nt == 'n') {
    result = 9;
  } else if (nt == 'x') {
    result = 10;
  } else {
    result = 4;
  }
  return result;
}


x86 assembly (clang, -O0):
<nt2int_rc_indel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jne    1123 <nt2int_rc_indel+0x23>
movl   $0x3,-0x8(%rbp)
jmp    1238 <nt2int_rc_indel+0x138>
movsbl -0x1(%rbp),%eax
cmp    $0x43,%eax
jne    113c <nt2int_rc_indel+0x3c>
movl   $0x2,-0x8(%rbp)
jmp    1233 <nt2int_rc_indel+0x133>
movsbl -0x1(%rbp),%eax
cmp    $0x47,%eax
jne    1155 <nt2int_rc_indel+0x55>
movl   $0x1,-0x8(%rbp)
jmp    122e <nt2int_rc_indel+0x12e>
movsbl -0x1(%rbp),%eax
cmp    $0x54,%eax
jne    116e <nt2int_rc_indel+0x6e>
movl   $0x0,-0x8(%rbp)
jmp    1229 <nt2int_rc_indel+0x129>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jne    1187 <nt2int_rc_indel+0x87>
movl   $0x8,-0x8(%rbp)
jmp    1224 <nt2int_rc_indel+0x124>
movsbl -0x1(%rbp),%eax
cmp    $0x63,%eax
jne    11a0 <nt2int_rc_indel+0xa0>
movl   $0x7,-0x8(%rbp)
jmp    121f <nt2int_rc_indel+0x11f>
movsbl -0x1(%rbp),%eax
cmp    $0x67,%eax
jne    11b9 <nt2int_rc_indel+0xb9>
movl   $0x6,-0x8(%rbp)
jmp    121a <nt2int_rc_indel+0x11a>
movsbl -0x1(%rbp),%eax
cmp    $0x74,%eax
jne    11d2 <nt2int_rc_indel+0xd2>
movl   $0x5,-0x8(%rbp)
jmp    1215 <nt2int_rc_indel+0x115>
movsbl -0x1(%rbp),%eax
cmp    $0x6e,%eax
jne    11eb <nt2int_rc_indel+0xeb>
movl   $0x9,-0x8(%rbp)
jmp    1210 <nt2int_rc_indel+0x110>
movsbl -0x1(%rbp),%eax
cmp    $0x78,%eax
jne    1204 <nt2int_rc_indel+0x104>
movl   $0xa,-0x8(%rbp)
jmp    120b <nt2int_rc_indel+0x10b>
movl   $0x4,-0x8(%rbp)
jmp    1210 <nt2int_rc_indel+0x110>
jmp    1215 <nt2int_rc_indel+0x115>
jmp    121a <nt2int_rc_indel+0x11a>
jmp    121f <nt2int_rc_indel+0x11f>
jmp    1224 <nt2int_rc_indel+0x124>
jmp    1229 <nt2int_rc_indel+0x129>
jmp    122e <nt2int_rc_indel+0x12e>
jmp    1233 <nt2int_rc_indel+0x133>
jmp    1238 <nt2int_rc_indel+0x138>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nt2int_rc_indel>:
add    $0xbf,%dil
cmp    $0x37,%dil
ja     1129 <nt2int_rc_indel+0x29>
mov    $0x3,%eax
movzbl %dil,%ecx
lea    0xee6(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x2,%eax
ret
mov    $0x4,%eax
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
mov    $0x8,%eax
ret
mov    $0x7,%eax
ret
mov    $0x6,%eax
ret
mov    $0x9,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @nt2int_rc_indel(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 65
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 3, i32* %3
br label %63
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 67
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %3
br label %62
13: ; preds = %8
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 71
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %3
br label %61
18: ; preds = %13
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 84
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 0, i32* %3
br label %60
23: ; preds = %18
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 97
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 8, i32* %3
br label %59
28: ; preds = %23
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 99
br i1 %31, label %32, label %33
32: ; preds = %28
store i32 7, i32* %3
br label %58
33: ; preds = %28
%34 = load i8, i8* %2
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 103
br i1 %36, label %37, label %38
37: ; preds = %33
store i32 6, i32* %3
br label %57
38: ; preds = %33
%39 = load i8, i8* %2
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 116
br i1 %41, label %42, label %43
42: ; preds = %38
store i32 5, i32* %3
br label %56
43: ; preds = %38
%44 = load i8, i8* %2
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 110
br i1 %46, label %47, label %48
47: ; preds = %43
store i32 9, i32* %3
br label %55
48: ; preds = %43
%49 = load i8, i8* %2
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 120
br i1 %51, label %52, label %53
52: ; preds = %48
store i32 10, i32* %3
br label %54
53: ; preds = %48
store i32 4, i32* %3
br label %54
54: ; preds = %53, %52
br label %55
55: ; preds = %54, %47
br label %56
56: ; preds = %55, %42
br label %57
57: ; preds = %56, %37
br label %58
58: ; preds = %57, %32
br label %59
59: ; preds = %58, %27
br label %60
60: ; preds = %59, %22
br label %61
61: ; preds = %60, %17
br label %62
62: ; preds = %61, %12
br label %63
63: ; preds = %62, %7
%64 = load i32, i32* %3
ret i32 %64
}

LLVM IR (-O2):
define i32 @nt2int_rc_indel(i8 signext %0) {
switch i8 %0, label %11 [
i8 65, label %12
i8 67, label %2
i8 71, label %3
i8 84, label %4
i8 97, label %5
i8 99, label %6
i8 103, label %7
i8 116, label %8
i8 110, label %9
i8 120, 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, %2, %4, %6, %8, %10, %11, %9, %7, %5, %3
%13 = phi i32 [ 2, %2 ], [ 1, %3 ], [ 0, %4 ], [ 8, %5 ], [ 7, %6 ], [ 6, %7 ], [ 5, %8 ], [ 9, %9 ], [ 10, %10 ], [ 4, %11 ], [ 3, %1 ]
ret i32 %13
}