unsigned char e2a(unsigned char x) {
  switch (x) {
  case 0xF0:
    return '0';
  case 0xF1:
    return '1';
  case 0xF2:
    return '2';
  case 0xF3:
    return '3';
  case 0xF4:
    return '4';
  case 0xF5:
    return '5';
  case 0xF6:
    return '6';
  case 0xF7:
    return '7';
  case 0xF8:
    return '8';
  case 0xF9:
    return '9';
  case 0xC1:
    return 'A';
  case 0xC2:
    return 'B';
  case 0xC3:
    return 'C';
  case 0xC4:
    return 'D';
  case 0xC5:
    return 'E';
  case 0xC6:
    return 'F';
  case 0xC7:
    return 'G';
  case 0xC8:
    return 'H';
  case 0xC9:
    return 'I';
  case 0xD1:
    return 'J';
  case 0xD2:
    return 'K';
  case 0xD3:
    return 'L';
  case 0xD4:
    return 'M';
  case 0xD5:
    return 'N';
  case 0xD6:
    return 'O';
  case 0xD7:
    return 'P';
  case 0xD8:
    return 'Q';
  case 0xD9:
    return 'R';
  case 0xE2:
    return 'S';
  case 0xE3:
    return 'T';
  case 0xE4:
    return 'U';
  case 0xE5:
    return 'V';
  case 0xE6:
    return 'W';
  case 0xE7:
    return 'X';
  case 0xE8:
    return 'Y';
  case 0xE9:
    return 'Z';
  }
  return ' ';
}


x86 assembly (clang, -O0):
<e2a>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
add    $0xffffff3f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x38,%eax
ja     127a <e2a+0x17a>
mov    -0x10(%rbp),%rax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x30,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x31,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x32,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x33,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x34,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x35,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x36,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x37,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x38,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x39,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x41,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x42,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x43,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x44,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x45,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x46,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x47,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x48,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x49,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4a,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4b,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4c,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4d,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4e,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x4f,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x50,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x51,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x52,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x53,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x54,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x55,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x56,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x57,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x58,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x59,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x5a,-0x1(%rbp)
jmp    127e <e2a+0x17e>
movb   $0x20,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<e2a>:
add    $0x3f,%dil
mov    $0x20,%al
cmp    $0x38,%dil
ja     111a <e2a+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @e2a(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %42 [
i32 240, label %6
i32 241, label %7
i32 242, label %8
i32 243, label %9
i32 244, label %10
i32 245, label %11
i32 246, label %12
i32 247, label %13
i32 248, label %14
i32 249, label %15
i32 193, label %16
i32 194, label %17
i32 195, label %18
i32 196, label %19
i32 197, label %20
i32 198, label %21
i32 199, label %22
i32 200, label %23
i32 201, label %24
i32 209, label %25
i32 210, label %26
i32 211, label %27
i32 212, label %28
i32 213, label %29
i32 214, label %30
i32 215, label %31
i32 216, label %32
i32 217, label %33
i32 226, label %34
i32 227, label %35
i32 228, label %36
i32 229, label %37
i32 230, label %38
i32 231, label %39
i32 232, label %40
i32 233, label %41
]
6: ; preds = %1
store i8 48, i8* %2
br label %43
7: ; preds = %1
store i8 49, i8* %2
br label %43
8: ; preds = %1
store i8 50, i8* %2
br label %43
9: ; preds = %1
store i8 51, i8* %2
br label %43
10: ; preds = %1
store i8 52, i8* %2
br label %43
11: ; preds = %1
store i8 53, i8* %2
br label %43
12: ; preds = %1
store i8 54, i8* %2
br label %43
13: ; preds = %1
store i8 55, i8* %2
br label %43
14: ; preds = %1
store i8 56, i8* %2
br label %43
15: ; preds = %1
store i8 57, i8* %2
br label %43
16: ; preds = %1
store i8 65, i8* %2
br label %43
17: ; preds = %1
store i8 66, i8* %2
br label %43
18: ; preds = %1
store i8 67, i8* %2
br label %43
19: ; preds = %1
store i8 68, i8* %2
br label %43
20: ; preds = %1
store i8 69, i8* %2
br label %43
21: ; preds = %1
store i8 70, i8* %2
br label %43
22: ; preds = %1
store i8 71, i8* %2
br label %43
23: ; preds = %1
store i8 72, i8* %2
br label %43
24: ; preds = %1
store i8 73, i8* %2
br label %43
25: ; preds = %1
store i8 74, i8* %2
br label %43
26: ; preds = %1
store i8 75, i8* %2
br label %43
27: ; preds = %1
store i8 76, i8* %2
br label %43
28: ; preds = %1
store i8 77, i8* %2
br label %43
29: ; preds = %1
store i8 78, i8* %2
br label %43
30: ; preds = %1
store i8 79, i8* %2
br label %43
31: ; preds = %1
store i8 80, i8* %2
br label %43
32: ; preds = %1
store i8 81, i8* %2
br label %43
33: ; preds = %1
store i8 82, i8* %2
br label %43
34: ; preds = %1
store i8 83, i8* %2
br label %43
35: ; preds = %1
store i8 84, i8* %2
br label %43
36: ; preds = %1
store i8 85, i8* %2
br label %43
37: ; preds = %1
store i8 86, i8* %2
br label %43
38: ; preds = %1
store i8 87, i8* %2
br label %43
39: ; preds = %1
store i8 88, i8* %2
br label %43
40: ; preds = %1
store i8 89, i8* %2
br label %43
41: ; preds = %1
store i8 90, i8* %2
br label %43
42: ; preds = %1
store i8 32, i8* %2
br label %43
43: ; preds = %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
%44 = load i8, i8* %2
ret i8 %44
}

LLVM IR (-O2):
@switch.table.e2a = [57 x i8] c"ABCDEFGHI JKLMNOPQR STUVWXYZ 0123456789"
define zeroext i8 @e2a(i8 zeroext %0) {
%2 = add i8 %0, 63
%3 = icmp ult i8 %2, 57
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [57 x i8], [57 x i8]* @switch.table.e2a, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 32, %1 ]
ret i8 %9
}