int trieHash(char ch) {
  int ret = -1;
  switch (ch) {
  case 'a':
    ret = 0;
    break;
  case 'b':
    ret = 1;
    break;
  case 'c':
    ret = 2;
    break;
  case 'd':
    ret = 3;
    break;
  case 'e':
    ret = 4;
    break;
  case 'f':
    ret = 5;
    break;
  case 'g':
    ret = 6;
    break;
  case 'h':
    ret = 7;
    break;
  case 'i':
    ret = 8;
    break;
  case 'j':
    ret = 9;
    break;
  case 'k':
    ret = 10;
    break;
  case 'l':
    ret = 11;
    break;
  case 'm':
    ret = 12;
    break;
  case 'n':
    ret = 13;
    break;
  case 'o':
    ret = 14;
    break;
  case 'p':
    ret = 15;
    break;
  case 'q':
    ret = 16;
    break;
  case 'r':
    ret = 17;
    break;
  case 's':
    ret = 18;
    break;
  case 't':
    ret = 19;
    break;
  case 'u':
    ret = 20;
    break;
  case 'v':
    ret = 21;
    break;
  case 'w':
    ret = 22;
    break;
  case 'x':
    ret = 23;
    break;
  case 'y':
    ret = 24;
    break;
  case 'z':
    ret = 25;
    break;
  case '=':
    ret = 26;
    break;
  case '<':
    ret = 27;
    break;
  case '>':
    ret = 28;
    break;
  case '"':
    ret = 29;
    break;
  case ' ':
    ret = 30;
    break;
  case '/':
    ret = 31;
    break;
  case '&':
    ret = 32;
    break;
  case '#':
    ret = 33;
    break;
  case '0':
    ret = 34;
    break;
  case '1':
    ret = 35;
    break;
  case '2':
    ret = 36;
    break;
  case '3':
    ret = 37;
    break;
  case '4':
    ret = 38;
    break;
  case '5':
    ret = 39;
    break;
  case '6':
    ret = 40;
    break;
  case '7':
    ret = 41;
    break;
  case '8':
    ret = 42;
    break;
  case '9':
    ret = 43;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<trieHash>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5a,%eax
ja     1346 <trieHash+0x246>
mov    -0x10(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x2,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x3,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x4,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x5,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x6,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x7,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x8,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x9,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xa,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xb,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xc,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xd,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xe,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0xf,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x10,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x11,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x12,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x13,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x14,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x15,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x16,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x17,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x18,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x19,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1a,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1b,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1c,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1d,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1e,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x1f,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x20,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x21,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x22,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x23,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x24,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x25,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x26,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x27,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x28,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x29,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x2a,-0x8(%rbp)
jmp    1346 <trieHash+0x246>
movl   $0x2b,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trieHash>:
add    $0xffffffe0,%edi
mov    $0xffffffff,%eax
cmp    $0x5a,%edi
ja     111a <trieHash+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @trieHash(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 -1, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %50 [
i32 97, label %6
i32 98, label %7
i32 99, label %8
i32 100, label %9
i32 101, label %10
i32 102, label %11
i32 103, label %12
i32 104, label %13
i32 105, label %14
i32 106, label %15
i32 107, label %16
i32 108, label %17
i32 109, label %18
i32 110, label %19
i32 111, label %20
i32 112, label %21
i32 113, label %22
i32 114, label %23
i32 115, label %24
i32 116, label %25
i32 117, label %26
i32 118, label %27
i32 119, label %28
i32 120, label %29
i32 121, label %30
i32 122, label %31
i32 61, label %32
i32 60, label %33
i32 62, label %34
i32 34, label %35
i32 32, label %36
i32 47, label %37
i32 38, label %38
i32 35, label %39
i32 48, label %40
i32 49, label %41
i32 50, label %42
i32 51, label %43
i32 52, label %44
i32 53, label %45
i32 54, label %46
i32 55, label %47
i32 56, label %48
i32 57, label %49
]
6: ; preds = %1
store i32 0, i32* %3
br label %50
7: ; preds = %1
store i32 1, i32* %3
br label %50
8: ; preds = %1
store i32 2, i32* %3
br label %50
9: ; preds = %1
store i32 3, i32* %3
br label %50
10: ; preds = %1
store i32 4, i32* %3
br label %50
11: ; preds = %1
store i32 5, i32* %3
br label %50
12: ; preds = %1
store i32 6, i32* %3
br label %50
13: ; preds = %1
store i32 7, i32* %3
br label %50
14: ; preds = %1
store i32 8, i32* %3
br label %50
15: ; preds = %1
store i32 9, i32* %3
br label %50
16: ; preds = %1
store i32 10, i32* %3
br label %50
17: ; preds = %1
store i32 11, i32* %3
br label %50
18: ; preds = %1
store i32 12, i32* %3
br label %50
19: ; preds = %1
store i32 13, i32* %3
br label %50
20: ; preds = %1
store i32 14, i32* %3
br label %50
21: ; preds = %1
store i32 15, i32* %3
br label %50
22: ; preds = %1
store i32 16, i32* %3
br label %50
23: ; preds = %1
store i32 17, i32* %3
br label %50
24: ; preds = %1
store i32 18, i32* %3
br label %50
25: ; preds = %1
store i32 19, i32* %3
br label %50
26: ; preds = %1
store i32 20, i32* %3
br label %50
27: ; preds = %1
store i32 21, i32* %3
br label %50
28: ; preds = %1
store i32 22, i32* %3
br label %50
29: ; preds = %1
store i32 23, i32* %3
br label %50
30: ; preds = %1
store i32 24, i32* %3
br label %50
31: ; preds = %1
store i32 25, i32* %3
br label %50
32: ; preds = %1
store i32 26, i32* %3
br label %50
33: ; preds = %1
store i32 27, i32* %3
br label %50
34: ; preds = %1
store i32 28, i32* %3
br label %50
35: ; preds = %1
store i32 29, i32* %3
br label %50
36: ; preds = %1
store i32 30, i32* %3
br label %50
37: ; preds = %1
store i32 31, i32* %3
br label %50
38: ; preds = %1
store i32 32, i32* %3
br label %50
39: ; preds = %1
store i32 33, i32* %3
br label %50
40: ; preds = %1
store i32 34, i32* %3
br label %50
41: ; preds = %1
store i32 35, i32* %3
br label %50
42: ; preds = %1
store i32 36, i32* %3
br label %50
43: ; preds = %1
store i32 37, i32* %3
br label %50
44: ; preds = %1
store i32 38, i32* %3
br label %50
45: ; preds = %1
store i32 39, i32* %3
br label %50
46: ; preds = %1
store i32 40, i32* %3
br label %50
47: ; preds = %1
store i32 41, i32* %3
br label %50
48: ; preds = %1
store i32 42, i32* %3
br label %50
49: ; preds = %1
store i32 43, i32* %3
br label %50
50: ; preds = %1, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%51 = load i32, i32* %3
ret i32 %51
}

LLVM IR (-O2):
@switch.table.trieHash = [91 x i32] [i32 30, i32 -1, i32 29, i32 33, i32 -1, i32 -1, i32 32, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 31, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 -1, i32 -1, i32 27, i32 26, i32 28, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25]
define i32 @trieHash(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -32
%4 = icmp ult i32 %3, 91
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [91 x i32], [91 x i32]* @switch.table.trieHash, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ -1, %1 ], [ %8, %5 ]
ret i32 %10
}