int fb_hScancodeToExtendedKey(int scancode) {
  int key;
  switch (scancode) {
  case 0x3B:
    key = ((int)((((unsigned)(unsigned char)(';')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x3C:
    key = ((int)((((unsigned)(unsigned char)('<')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x3D:
    key = ((int)((((unsigned)(unsigned char)('=')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x3E:
    key = ((int)((((unsigned)(unsigned char)('>')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x3F:
    key = ((int)((((unsigned)(unsigned char)('?')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x40:
    key = ((int)((((unsigned)(unsigned char)('@')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x41:
    key = ((int)((((unsigned)(unsigned char)('A')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x42:
    key = ((int)((((unsigned)(unsigned char)('B')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x43:
    key = ((int)((((unsigned)(unsigned char)('C')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x44:
    key = ((int)((((unsigned)(unsigned char)('D')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x47:
    key = ((int)((((unsigned)(unsigned char)('G')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x48:
    key = ((int)((((unsigned)(unsigned char)('H')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x49:
    key = ((int)((((unsigned)(unsigned char)('I')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x4B:
    key = ((int)((((unsigned)(unsigned char)('K')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x4C:
    key = ((int)((((unsigned)(unsigned char)('L')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x4D:
    key = ((int)((((unsigned)(unsigned char)('M')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x4F:
    key = ((int)((((unsigned)(unsigned char)('O')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x50:
    key = ((int)((((unsigned)(unsigned char)('P')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x51:
    key = ((int)((((unsigned)(unsigned char)('Q')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x52:
    key = ((int)((((unsigned)(unsigned char)('R')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  case 0x53:
    key = ((int)((((unsigned)(unsigned char)('S')) << 8) +
                 (unsigned)(unsigned char)(((char)255))));
    break;
  default:
    key = 0;
    break;
  }
  return key;
}


x86 assembly (clang, -O0):
<fb_hScancodeToExtendedKey>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffc5,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x18,%eax
ja     122c <fb_hScancodeToExtendedKey+0x12c>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3bff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x3cff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x3dff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x3eff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x3fff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x40ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x41ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x42ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x43ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x44ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x47ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x48ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x49ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x4bff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x4cff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x4dff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x4fff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x50ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x51ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x52ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x53ff,-0x8(%rbp)
jmp    1233 <fb_hScancodeToExtendedKey+0x133>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hScancodeToExtendedKey>:
add    $0xffffffc5,%edi
xor    %eax,%eax
cmp    $0x18,%edi
ja     1117 <fb_hScancodeToExtendedKey+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @fb_hScancodeToExtendedKey(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %26 [
i32 59, label %5
i32 60, label %6
i32 61, label %7
i32 62, label %8
i32 63, label %9
i32 64, label %10
i32 65, label %11
i32 66, label %12
i32 67, label %13
i32 68, label %14
i32 71, label %15
i32 72, label %16
i32 73, label %17
i32 75, label %18
i32 76, label %19
i32 77, label %20
i32 79, label %21
i32 80, label %22
i32 81, label %23
i32 82, label %24
i32 83, label %25
]
5: ; preds = %1
store i32 15359, i32* %3
br label %27
6: ; preds = %1
store i32 15615, i32* %3
br label %27
7: ; preds = %1
store i32 15871, i32* %3
br label %27
8: ; preds = %1
store i32 16127, i32* %3
br label %27
9: ; preds = %1
store i32 16383, i32* %3
br label %27
10: ; preds = %1
store i32 16639, i32* %3
br label %27
11: ; preds = %1
store i32 16895, i32* %3
br label %27
12: ; preds = %1
store i32 17151, i32* %3
br label %27
13: ; preds = %1
store i32 17407, i32* %3
br label %27
14: ; preds = %1
store i32 17663, i32* %3
br label %27
15: ; preds = %1
store i32 18431, i32* %3
br label %27
16: ; preds = %1
store i32 18687, i32* %3
br label %27
17: ; preds = %1
store i32 18943, i32* %3
br label %27
18: ; preds = %1
store i32 19455, i32* %3
br label %27
19: ; preds = %1
store i32 19711, i32* %3
br label %27
20: ; preds = %1
store i32 19967, i32* %3
br label %27
21: ; preds = %1
store i32 20479, i32* %3
br label %27
22: ; preds = %1
store i32 20735, i32* %3
br label %27
23: ; preds = %1
store i32 20991, i32* %3
br label %27
24: ; preds = %1
store i32 21247, i32* %3
br label %27
25: ; preds = %1
store i32 21503, i32* %3
br label %27
26: ; preds = %1
store i32 0, i32* %3
br label %27
27: ; preds = %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@switch.table.fb_hScancodeToExtendedKey = [25 x i32] [i32 15359, i32 15615, i32 15871, i32 16127, i32 16383, i32 16639, i32 16895, i32 17151, i32 17407, i32 17663, i32 0, i32 0, i32 18431, i32 18687, i32 18943, i32 0, i32 19455, i32 19711, i32 19967, i32 0, i32 20479, i32 20735, i32 20991, i32 21247, i32 21503]
define i32 @fb_hScancodeToExtendedKey(i32 %0) {
%2 = add i32 %0, -59
%3 = icmp ult i32 %2, 25
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [25 x i32], [25 x i32]* @switch.table.fb_hScancodeToExtendedKey, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}