const char *lcidToString(int lcid) {
  switch (lcid) {
  case 0x0404:
    return "zh-TW";
  case 0x0804:
    return "zh-CN";
  case 0x0409:
    return "en-US";
  case 0x0411:
    return "ja-JP";
  case 0x0412:
    return "ko-KR";
  case 0x0407:
    return "de-DE";
  case 0x0410:
    return "it-IT";
  case 0x0419:
    return "ru-RU";
  case 0x040C:
    return "fr-FR";
  case 0x0816:
    return "pt-PT";
  case 0x0C0A:
    return "es-ES";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<lcidToString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x404,%eax
je     11db <lcidToString+0xdb>
jmp    111d <lcidToString+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x407,%eax
je     122b <lcidToString+0x12b>
jmp    1130 <lcidToString+0x30>
mov    -0x10(%rbp),%eax
sub    $0x409,%eax
je     11fb <lcidToString+0xfb>
jmp    1143 <lcidToString+0x43>
mov    -0x10(%rbp),%eax
sub    $0x40c,%eax
je     125b <lcidToString+0x15b>
jmp    1156 <lcidToString+0x56>
mov    -0x10(%rbp),%eax
sub    $0x410,%eax
je     123b <lcidToString+0x13b>
jmp    1169 <lcidToString+0x69>
mov    -0x10(%rbp),%eax
sub    $0x411,%eax
je     120b <lcidToString+0x10b>
jmp    117c <lcidToString+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x412,%eax
je     121b <lcidToString+0x11b>
jmp    118f <lcidToString+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x419,%eax
je     124b <lcidToString+0x14b>
jmp    11a2 <lcidToString+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x804,%eax
je     11eb <lcidToString+0xeb>
jmp    11b5 <lcidToString+0xb5>
mov    -0x10(%rbp),%eax
sub    $0x816,%eax
je     126b <lcidToString+0x16b>
jmp    11c8 <lcidToString+0xc8>
mov    -0x10(%rbp),%eax
sub    $0xc0a,%eax
je     127b <lcidToString+0x17b>
jmp    128b <lcidToString+0x18b>
lea    0xe1e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xe14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xe0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xe00(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdf6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdec(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xde2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdd8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdce(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdc4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
lea    0xdba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1293 <lcidToString+0x193>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcidToString>:
cmp    $0x803,%edi
jg     1132 <lcidToString+0x32>
add    $0xfffffbfc,%edi
cmp    $0x15,%edi
ja     1192 <lcidToString+0x92>
lea    0xf3e(%rip),%rax
lea    0xedf(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xf45(%rip),%rax
ret
cmp    $0xc0a,%edi
je     1182 <lcidToString+0x82>
cmp    $0x816,%edi
je     118a <lcidToString+0x8a>
cmp    $0x804,%edi
jne    1192 <lcidToString+0x92>
lea    0xf0d(%rip),%rax
ret
lea    0xf0b(%rip),%rax
ret
lea    0xf27(%rip),%rax
ret
lea    0xf13(%rip),%rax
ret
lea    0xef9(%rip),%rax
ret
lea    0xef7(%rip),%rax
ret
lea    0xf01(%rip),%rax
ret
lea    0xf0b(%rip),%rax
ret
lea    0xefd(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"zh-TW\00"
@.str.1 = [6 x i8] c"zh-CN\00"
@.str.2 = [6 x i8] c"en-US\00"
@.str.3 = [6 x i8] c"ja-JP\00"
@.str.4 = [6 x i8] c"ko-KR\00"
@.str.5 = [6 x i8] c"de-DE\00"
@.str.6 = [6 x i8] c"it-IT\00"
@.str.7 = [6 x i8] c"ru-RU\00"
@.str.8 = [6 x i8] c"fr-FR\00"
@.str.9 = [6 x i8] c"pt-PT\00"
@.str.10 = [6 x i8] c"es-ES\00"
define i8* @lcidToString(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %16 [
i32 1028, label %5
i32 2052, label %6
i32 1033, label %7
i32 1041, label %8
i32 1042, label %9
i32 1031, label %10
i32 1040, label %11
i32 1049, label %12
i32 1036, label %13
i32 2070, label %14
i32 3082, label %15
]
5: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %17
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %17
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %17
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %17
10: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %17
11: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %17
12: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %17
13: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %17
14: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %17
15: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %17
16: ; preds = %1
store i8* null, i8** %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [6 x i8] c"zh-TW\00"
@.str.1 = [6 x i8] c"zh-CN\00"
@.str.2 = [6 x i8] c"en-US\00"
@.str.3 = [6 x i8] c"ja-JP\00"
@.str.4 = [6 x i8] c"ko-KR\00"
@.str.5 = [6 x i8] c"de-DE\00"
@.str.6 = [6 x i8] c"it-IT\00"
@.str.7 = [6 x i8] c"ru-RU\00"
@.str.8 = [6 x i8] c"fr-FR\00"
@.str.9 = [6 x i8] c"pt-PT\00"
@.str.10 = [6 x i8] c"es-ES\00"
define i8* @lcidToString(i32 %0) {
switch i32 %0, label %12 [
i32 1028, label %13
i32 2052, label %2
i32 1033, label %3
i32 1041, label %4
i32 1042, label %5
i32 1031, label %6
i32 1040, label %7
i32 1049, label %8
i32 1036, label %9
i32 2070, label %10
i32 3082, label %11
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
br label %13
5: ; preds = %1
br label %13
6: ; preds = %1
br label %13
7: ; preds = %1
br label %13
8: ; preds = %1
br label %13
9: ; preds = %1
br label %13
10: ; preds = %1
br label %13
11: ; preds = %1
br label %13
12: ; preds = %1
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%14 = phi i8* [ null, %12 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %14
}