double getLetterScore(char letter) {
  double result = 0;
  switch (letter) {
  case 'A':
  case 'a':
    result = 8.167;
    break;
  case 'B':
  case 'b':
    result += 1.492;
    break;
  case 'C':
  case 'c':
    result += 2.782;
    break;
  case 'D':
  case 'd':
    result += 4.253;
    break;
  case 'E':
  case 'e':
    result += 12.702;
    break;
  case 'F':
  case 'f':
    result += 2.228;
    break;
  case 'G':
  case 'g':
    result += 2.015;
    break;
  case 'H':
  case 'h':
    result += 6.094;
    break;
  case 'I':
  case 'i':
    result += 6.966;
    break;
  case 'J':
  case 'j':
    result += 0.153;
    break;
  case 'K':
  case 'k':
    result += 0.772;
    break;
  case 'L':
  case 'l':
    result += 4.025;
    break;
  case 'M':
  case 'm':
    result += 2.406;
    break;
  case 'N':
  case 'n':
    result += 6.749;
    break;
  case 'O':
  case 'o':
    result += 7.507;
    break;
  case 'P':
  case 'p':
    result += 1.929;
    break;
  case 'Q':
  case 'q':
    result += 0.095;
    break;
  case 'R':
  case 'r':
    result += 5.987;
    break;
  case 'S':
  case 's':
    result += 6.327;
    break;
  case 'T':
  case 't':
    result += 9.056;
    break;
  case 'U':
  case 'u':
    result += 2.758;
    break;
  case 'V':
  case 'v':
    result += 0.978;
    break;
  case 'W':
  case 'w':
    result += 2.360;
    break;
  case 'X':
  case 'x':
    result += 0.150;
    break;
  case 'Y':
  case 'y':
    result += 1.974;
    break;
  case 'Z':
  case 'z':
    result += 0.074;
    break;
  case '\0':
  case ' ':
  case '\n':
  case ')':
  case '(':
  case ',':
  case ':':
  case ';':
  case '.':
  case '!':
  case '?':
  case '\'':
  case '"':
    result += 0.0;
    break;
  default:
    result -= 50.0;
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<getLetterScore>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movq   $0x0,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x7a,%eax
ja     139c <getLetterScore+0x29c>
mov    -0x18(%rbp),%rax
lea    0xfa8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xf87(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xf6d(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xf4e(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xf2f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xf10(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xef1(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xed2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xeb3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xe94(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xe75(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xe56(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xe37(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xe18(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xdf9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xdda(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xdbb(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd9c(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd7d(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd5e(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd3f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd20(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xd01(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xce2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xcc3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xca4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  0xc85(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
xorps  %xmm0,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13b2 <getLetterScore+0x2b2>
movsd  -0x10(%rbp),%xmm0
movsd  0xd27(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLetterScore>:
cmp    $0x7a,%dil
ja     1117 <getLetterScore+0x17>
movsbq %dil,%rax
lea    0xef7(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret
movsd  0xee1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @getLetterScore(i8 signext %0) {
%2 = alloca i8
%3 = alloca double
store i8 %0, i8* %2
store double 0.000000e+00, double* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %85 [
i32 65, label %6
i32 97, label %6
i32 66, label %7
i32 98, label %7
i32 67, label %10
i32 99, label %10
i32 68, label %13
i32 100, label %13
i32 69, label %16
i32 101, label %16
i32 70, label %19
i32 102, label %19
i32 71, label %22
i32 103, label %22
i32 72, label %25
i32 104, label %25
i32 73, label %28
i32 105, label %28
i32 74, label %31
i32 106, label %31
i32 75, label %34
i32 107, label %34
i32 76, label %37
i32 108, label %37
i32 77, label %40
i32 109, label %40
i32 78, label %43
i32 110, label %43
i32 79, label %46
i32 111, label %46
i32 80, label %49
i32 112, label %49
i32 81, label %52
i32 113, label %52
i32 82, label %55
i32 114, label %55
i32 83, label %58
i32 115, label %58
i32 84, label %61
i32 116, label %61
i32 85, label %64
i32 117, label %64
i32 86, label %67
i32 118, label %67
i32 87, label %70
i32 119, label %70
i32 88, label %73
i32 120, label %73
i32 89, label %76
i32 121, label %76
i32 90, label %79
i32 122, label %79
i32 0, label %82
i32 32, label %82
i32 10, label %82
i32 41, label %82
i32 40, label %82
i32 44, label %82
i32 58, label %82
i32 59, label %82
i32 46, label %82
i32 33, label %82
i32 63, label %82
i32 39, label %82
i32 34, label %82
]
6: ; preds = %1, %1
store double 8.167000e+00, double* %3
br label %88
7: ; preds = %1, %1
%8 = load double, double* %3
%9 = fadd double %8, 1.492000e+00
store double %9, double* %3
br label %88
10: ; preds = %1, %1
%11 = load double, double* %3
%12 = fadd double %11, 2.782000e+00
store double %12, double* %3
br label %88
13: ; preds = %1, %1
%14 = load double, double* %3
%15 = fadd double %14, 4.253000e+00
store double %15, double* %3
br label %88
16: ; preds = %1, %1
%17 = load double, double* %3
%18 = fadd double %17, 1.270200e+01
store double %18, double* %3
br label %88
19: ; preds = %1, %1
%20 = load double, double* %3
%21 = fadd double %20, 2.228000e+00
store double %21, double* %3
br label %88
22: ; preds = %1, %1
%23 = load double, double* %3
%24 = fadd double %23, 2.015000e+00
store double %24, double* %3
br label %88
25: ; preds = %1, %1
%26 = load double, double* %3
%27 = fadd double %26, 6.094000e+00
store double %27, double* %3
br label %88
28: ; preds = %1, %1
%29 = load double, double* %3
%30 = fadd double %29, 6.966000e+00
store double %30, double* %3
br label %88
31: ; preds = %1, %1
%32 = load double, double* %3
%33 = fadd double %32, 1.530000e-01
store double %33, double* %3
br label %88
34: ; preds = %1, %1
%35 = load double, double* %3
%36 = fadd double %35, 7.720000e-01
store double %36, double* %3
br label %88
37: ; preds = %1, %1
%38 = load double, double* %3
%39 = fadd double %38, 4.025000e+00
store double %39, double* %3
br label %88
40: ; preds = %1, %1
%41 = load double, double* %3
%42 = fadd double %41, 2.406000e+00
store double %42, double* %3
br label %88
43: ; preds = %1, %1
%44 = load double, double* %3
%45 = fadd double %44, 6.749000e+00
store double %45, double* %3
br label %88
46: ; preds = %1, %1
%47 = load double, double* %3
%48 = fadd double %47, 7.507000e+00
store double %48, double* %3
br label %88
49: ; preds = %1, %1
%50 = load double, double* %3
%51 = fadd double %50, 1.929000e+00
store double %51, double* %3
br label %88
52: ; preds = %1, %1
%53 = load double, double* %3
%54 = fadd double %53, 9.500000e-02
store double %54, double* %3
br label %88
55: ; preds = %1, %1
%56 = load double, double* %3
%57 = fadd double %56, 5.987000e+00
store double %57, double* %3
br label %88
58: ; preds = %1, %1
%59 = load double, double* %3
%60 = fadd double %59, 6.327000e+00
store double %60, double* %3
br label %88
61: ; preds = %1, %1
%62 = load double, double* %3
%63 = fadd double %62, 9.056000e+00
store double %63, double* %3
br label %88
64: ; preds = %1, %1
%65 = load double, double* %3
%66 = fadd double %65, 2.758000e+00
store double %66, double* %3
br label %88
67: ; preds = %1, %1
%68 = load double, double* %3
%69 = fadd double %68, 0x3FEF4BC6A7EF9DB2
store double %69, double* %3
br label %88
70: ; preds = %1, %1
%71 = load double, double* %3
%72 = fadd double %71, 2.360000e+00
store double %72, double* %3
br label %88
73: ; preds = %1, %1
%74 = load double, double* %3
%75 = fadd double %74, 1.500000e-01
store double %75, double* %3
br label %88
76: ; preds = %1, %1
%77 = load double, double* %3
%78 = fadd double %77, 1.974000e+00
store double %78, double* %3
br label %88
79: ; preds = %1, %1
%80 = load double, double* %3
%81 = fadd double %80, 0x3FB2F1A9FBE76C8B
store double %81, double* %3
br label %88
82: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%83 = load double, double* %3
%84 = fadd double %83, 0.000000e+00
store double %84, double* %3
br label %88
85: ; preds = %1
%86 = load double, double* %3
%87 = fsub double %86, 5.000000e+01
store double %87, double* %3
br label %88
88: ; preds = %85, %82, %79, %76, %73, %70, %67, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %6
%89 = load double, double* %3
ret double %89
}

LLVM IR (-O2):
@switch.table.getLetterScore = [123 x double] [double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double -5.000000e+01, double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double 0.000000e+00, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 0.000000e+00, double -5.000000e+01, double 8.167000e+00, double 1.492000e+00, double 2.782000e+00, double 4.253000e+00, double 1.270200e+01, double 2.228000e+00, double 2.015000e+00, double 6.094000e+00, double 6.966000e+00, double 1.530000e-01, double 7.720000e-01, double 4.025000e+00, double 2.406000e+00, double 6.749000e+00, double 7.507000e+00, double 1.929000e+00, double 9.500000e-02, double 5.987000e+00, double 6.327000e+00, double 9.056000e+00, double 2.758000e+00, double 0x3FEF4BC6A7EF9DB2, double 2.360000e+00, double 1.500000e-01, double 1.974000e+00, double 0x3FB2F1A9FBE76C8B, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double -5.000000e+01, double 8.167000e+00, double 1.492000e+00, double 2.782000e+00, double 4.253000e+00, double 1.270200e+01, double 2.228000e+00, double 2.015000e+00, double 6.094000e+00, double 6.966000e+00, double 1.530000e-01, double 7.720000e-01, double 4.025000e+00, double 2.406000e+00, double 6.749000e+00, double 7.507000e+00, double 1.929000e+00, double 9.500000e-02, double 5.987000e+00, double 6.327000e+00, double 9.056000e+00, double 2.758000e+00, double 0x3FEF4BC6A7EF9DB2, double 2.360000e+00, double 1.500000e-01, double 1.974000e+00, double 0x3FB2F1A9FBE76C8B]
define double @getLetterScore(i8 signext %0) {
%2 = icmp ult i8 %0, 123
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i8 %0 to i64
%5 = getelementptr inbounds [123 x double], [123 x double]* @switch.table.getLetterScore, i64 0, i64 %4
%6 = load double, double* %5
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ -5.000000e+01, %1 ]
ret double %8
}