int taps(char letter) {
  switch (letter) {
  case 'a':
    return 1;
    break;
  case 'b':
    return 2;
    break;
  case 'c':
    return 3;
    break;
  case 'd':
    return 1;
    break;
  case 'e':
    return 2;
    break;
  case 'f':
    return 3;
    break;
  case 'g':
    return 1;
    break;
  case 'h':
    return 2;
    break;
  case 'i':
    return 3;
    break;
  case 'j':
    return 1;
    break;
  case 'k':
    return 2;
    break;
  case 'l':
    return 3;
    break;
  case 'm':
    return 1;
    break;
  case 'n':
    return 2;
    break;
  case 'o':
    return 3;
    break;
  case 'p':
    return 1;
    break;
  case 'q':
    return 2;
    break;
  case 'r':
    return 3;
    break;
  case 's':
    return 4;
    break;
  case 't':
    return 1;
    break;
  case 'u':
    return 2;
    break;
  case 'v':
    return 3;
    break;
  case 'w':
    return 1;
    break;
  case 'x':
    return 2;
    break;
  case 'y':
    return 3;
    break;
  case 'z':
    return 4;
    break;
  case ' ':
    return 1;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<taps>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5a,%eax
ja     1278 <taps+0x178>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x4,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x2,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x3,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x4,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x1,-0x4(%rbp)
jmp    127f <taps+0x17f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<taps>:
add    $0xffffffe0,%edi
cmp    $0x5a,%edi
ja     1130 <taps+0x30>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret
mov    $0x4,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @taps(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %33 [
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 32, label %32
]
6: ; preds = %1
store i32 1, i32* %2
br label %34
7: ; preds = %1
store i32 2, i32* %2
br label %34
8: ; preds = %1
store i32 3, i32* %2
br label %34
9: ; preds = %1
store i32 1, i32* %2
br label %34
10: ; preds = %1
store i32 2, i32* %2
br label %34
11: ; preds = %1
store i32 3, i32* %2
br label %34
12: ; preds = %1
store i32 1, i32* %2
br label %34
13: ; preds = %1
store i32 2, i32* %2
br label %34
14: ; preds = %1
store i32 3, i32* %2
br label %34
15: ; preds = %1
store i32 1, i32* %2
br label %34
16: ; preds = %1
store i32 2, i32* %2
br label %34
17: ; preds = %1
store i32 3, i32* %2
br label %34
18: ; preds = %1
store i32 1, i32* %2
br label %34
19: ; preds = %1
store i32 2, i32* %2
br label %34
20: ; preds = %1
store i32 3, i32* %2
br label %34
21: ; preds = %1
store i32 1, i32* %2
br label %34
22: ; preds = %1
store i32 2, i32* %2
br label %34
23: ; preds = %1
store i32 3, i32* %2
br label %34
24: ; preds = %1
store i32 4, i32* %2
br label %34
25: ; preds = %1
store i32 1, i32* %2
br label %34
26: ; preds = %1
store i32 2, i32* %2
br label %34
27: ; preds = %1
store i32 3, i32* %2
br label %34
28: ; preds = %1
store i32 1, i32* %2
br label %34
29: ; preds = %1
store i32 2, i32* %2
br label %34
30: ; preds = %1
store i32 3, i32* %2
br label %34
31: ; preds = %1
store i32 4, i32* %2
br label %34
32: ; preds = %1
store i32 1, i32* %2
br label %34
33: ; preds = %1
store i32 0, i32* %2
br label %34
34: ; preds = %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
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @taps(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %21 [
i32 97, label %22
i32 98, label %3
i32 99, label %4
i32 100, label %22
i32 101, label %5
i32 102, label %6
i32 103, label %22
i32 104, label %7
i32 105, label %8
i32 106, label %22
i32 107, label %9
i32 108, label %10
i32 109, label %22
i32 110, label %11
i32 111, label %12
i32 112, label %22
i32 113, label %13
i32 114, label %14
i32 115, label %15
i32 116, label %22
i32 117, label %16
i32 118, label %17
i32 119, label %22
i32 120, label %18
i32 121, label %19
i32 122, label %20
i32 32, label %22
]
3: ; preds = %1
br label %22
4: ; preds = %1
br label %22
5: ; preds = %1
br label %22
6: ; preds = %1
br label %22
7: ; preds = %1
br label %22
8: ; preds = %1
br label %22
9: ; preds = %1
br label %22
10: ; preds = %1
br label %22
11: ; preds = %1
br label %22
12: ; preds = %1
br label %22
13: ; preds = %1
br label %22
14: ; preds = %1
br label %22
15: ; preds = %1
br label %22
16: ; preds = %1
br label %22
17: ; preds = %1
br label %22
18: ; preds = %1
br label %22
19: ; preds = %1
br label %22
20: ; preds = %1
br label %22
21: ; preds = %1
br label %22
22: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%23 = phi i32 [ 0, %21 ], [ 4, %20 ], [ 3, %19 ], [ 2, %18 ], [ 3, %17 ], [ 2, %16 ], [ 4, %15 ], [ 3, %14 ], [ 2, %13 ], [ 3, %12 ], [ 2, %11 ], [ 3, %10 ], [ 2, %9 ], [ 3, %8 ], [ 2, %7 ], [ 3, %6 ], [ 2, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %23
}