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


x86 assembly (clang, -O0):
<Assign_State>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x19,%eax
ja     1252 <Assign_State+0x152>
mov    -0x20(%rbp),%rax
lea    0xebf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x1,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x2,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x3,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x4,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x5,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x6,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x7,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x8,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x9,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xa,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xb,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xc,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xd,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xe,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xf,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x10,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x11,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x12,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x13,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x2,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0x5,-0x14(%rbp)
jmp    1259 <Assign_State+0x159>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assign_State>:
movsbl (%rdi),%ecx
lea    -0x41(%rcx),%edx
mov    $0xffffffff,%eax
cmp    $0x19,%edx
ja     1121 <Assign_State+0x21>
movslq %ecx,%rax
lea    0xee6(%rip),%rcx
mov    -0x104(%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @Assign_State(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i32]
store i8* %0, i8** %2
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 -1, i32* %4
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 -1, i32* %5
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 -1, i32* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
switch i32 %10, label %55 [
i32 65, label %11
i32 82, label %13
i32 78, label %15
i32 68, label %17
i32 67, label %19
i32 81, label %21
i32 69, label %23
i32 71, label %25
i32 72, label %27
i32 73, label %29
i32 76, label %31
i32 75, label %33
i32 77, label %35
i32 70, label %37
i32 80, label %39
i32 83, label %41
i32 84, label %43
i32 87, label %45
i32 89, label %47
i32 86, label %49
i32 66, label %51
i32 90, label %53
]
11: ; preds = %1
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 0, i32* %12
br label %57
13: ; preds = %1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 1, i32* %14
br label %57
15: ; preds = %1
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2, i32* %16
br label %57
17: ; preds = %1
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 3, i32* %18
br label %57
19: ; preds = %1
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 4, i32* %20
br label %57
21: ; preds = %1
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 5, i32* %22
br label %57
23: ; preds = %1
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 6, i32* %24
br label %57
25: ; preds = %1
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 7, i32* %26
br label %57
27: ; preds = %1
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 8, i32* %28
br label %57
29: ; preds = %1
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 9, i32* %30
br label %57
31: ; preds = %1
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 10, i32* %32
br label %57
33: ; preds = %1
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 11, i32* %34
br label %57
35: ; preds = %1
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 12, i32* %36
br label %57
37: ; preds = %1
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 13, i32* %38
br label %57
39: ; preds = %1
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 14, i32* %40
br label %57
41: ; preds = %1
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 15, i32* %42
br label %57
43: ; preds = %1
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 16, i32* %44
br label %57
45: ; preds = %1
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 17, i32* %46
br label %57
47: ; preds = %1
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 18, i32* %48
br label %57
49: ; preds = %1
%50 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 19, i32* %50
br label %57
51: ; preds = %1
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2, i32* %52
br label %57
53: ; preds = %1
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 5, i32* %54
br label %57
55: ; preds = %1
%56 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 -1, i32* %56
br label %57
57: ; preds = %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%59 = load i32, i32* %58
ret i32 %59
}

LLVM IR (-O2):
@switch.table.Assign_State = [26 x i32] [i32 0, i32 2, i32 4, i32 3, i32 6, i32 13, i32 7, i32 8, i32 9, i32 -1, i32 11, i32 10, i32 12, i32 2, i32 -1, i32 14, i32 5, i32 1, i32 15, i32 16, i32 -1, i32 19, i32 17, i32 -1, i32 18, i32 5]
define i32 @Assign_State(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = add nsw i32 %3, -65
%5 = icmp ult i32 %4, 26
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [26 x i32], [26 x i32]* @switch.table.Assign_State, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}