char getCharfromKeycode(int keyCode) {
  switch (keyCode) {
  case 10:
    return '1';
  case 11:
    return '2';
  case 12:
    return '3';
  case 13:
    return '4';
  case 14:
    return '5';
  case 15:
    return '6';
  case 16:
    return '7';
  case 17:
    return '8';
  case 18:
    return '9';
  case 19:
    return '0';
  case 20:
    return '+';
  case 24:
    return 'q';
  case 25:
    return 'w';
  case 26:
    return 'e';
  case 27:
    return 'r';
  case 28:
    return 't';
  case 29:
    return 'y';
  case 30:
    return 'u';
  case 31:
    return 'i';
  case 32:
    return 'o';
  case 33:
    return 'p';
  case 38:
    return 'a';
  case 39:
    return 's';
  case 40:
    return 'd';
  case 41:
    return 'f';
  case 42:
    return 'g';
  case 43:
    return 'h';
  case 44:
    return 'j';
  case 45:
    return 'k';
  case 46:
    return 'l';
  case 52:
    return 'z';
  case 53:
    return 'x';
  case 54:
    return 'c';
  case 55:
    return 'v';
  case 56:
    return 'b';
  case 57:
    return 'n';
  case 58:
    return 'm';
  case 59:
    return ',';
  case 60:
    return '.';
  case 61:
    return '-';
  default:
    return '\0';
  }
}


x86 assembly (clang, -O0):
<getCharfromKeycode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x33,%eax
ja     1298 <getCharfromKeycode+0x198>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x31,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x32,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x33,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x34,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x35,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x36,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x37,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x38,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x39,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x30,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x2b,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x71,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x77,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x65,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x72,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x74,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x79,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x75,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x69,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6f,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x70,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x61,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x73,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x64,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x66,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x67,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x68,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6a,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6b,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6c,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x7a,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x78,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x63,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x76,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x62,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6e,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x6d,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x2c,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x2e,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x2d,-0x1(%rbp)
jmp    129c <getCharfromKeycode+0x19c>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCharfromKeycode>:
add    $0xfffffff6,%edi
cmp    $0x33,%edi
ja     1116 <getCharfromKeycode+0x16>
movslq %edi,%rax
lea    0xeee(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@switch.table.getCharfromKeycode = [52 x i8] c"1234567890+\00\00\00qwertyuiop\00\00\00\00asdfghjkl\00\00\00\00\00zxcvbnm,.-"
define signext i8 @getCharfromKeycode(i32 %0) {
%2 = add i32 %0, -10
%3 = icmp ult i32 %2, 52
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [52 x i8], [52 x i8]* @switch.table.getCharfromKeycode, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 0, %1 ]
ret i8 %9
}