char *hankana2sjis(int index) {
  static char kanatbl[][2] = {
      0x81, 0x40, 0x81, 0x42, 0x81, 0x75, 0x81, 0x76, 0x81, 0x41, 0x81, 0x45,
      0x82, 0xf0, 0x82, 0x9f, 0x82, 0xa1, 0x82, 0xa3, 0x82, 0xa5, 0x82, 0xa7,
      0x82, 0xe1, 0x82, 0xe3, 0x82, 0xe5, 0x82, 0xc1, 0x81, 0x5b, 0x82, 0xa0,
      0x82, 0xa2, 0x82, 0xa4, 0x82, 0xa6, 0x82, 0xa8, 0x82, 0xa9, 0x82, 0xab,
      0x82, 0xad, 0x82, 0xaf, 0x82, 0xb1, 0x82, 0xb3, 0x82, 0xb5, 0x82, 0xb7,
      0x82, 0xb9, 0x82, 0xbb, 0x82, 0xbd, 0x82, 0xbf, 0x82, 0xc2, 0x82, 0xc4,
      0x82, 0xc6, 0x82, 0xc8, 0x82, 0xc9, 0x82, 0xca, 0x82, 0xcb, 0x82, 0xcc,
      0x82, 0xcd, 0x82, 0xd0, 0x82, 0xd3, 0x82, 0xd6, 0x82, 0xd9, 0x82, 0xdc,
      0x82, 0xdd, 0x82, 0xde, 0x82, 0xdf, 0x82, 0xe0, 0x82, 0xe2, 0x82, 0xe4,
      0x82, 0xe6, 0x82, 0xe7, 0x82, 0xe8, 0x82, 0xe9, 0x82, 0xea, 0x82, 0xeb,
      0x82, 0xed, 0x82, 0xf1, 0x81, 0x4a, 0x81, 0x4b};
  return kanatbl[index - 0xa0];
}


x86 assembly (clang, -O0):
<hankana2sjis>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa0,%eax
movslq %eax,%rcx
lea    0x2f17(%rip),%rax
shl    $0x1,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hankana2sjis>:
movslq %edi,%rax
lea    0x2f26(%rip),%rcx
lea    (%rcx,%rax,2),%rax
add    $0xfffffffffffffec0,%rax
ret

LLVM IR (-O0):
@hankana2sjis.kanatbl = internal global [64 x [2 x i8]] [[2 x i8] c"\81@", [2 x i8] c"\81B", [2 x i8] c"\81u", [2 x i8] c"\81v", [2 x i8] c"\81A", [2 x i8] c"\81E", [2 x i8] c"\82\F0", [2 x i8] c"\82\9F", [2 x i8] c"\82\A1", [2 x i8] c"\82\A3", [2 x i8] c"\82\A5", [2 x i8] c"\82\A7", [2 x i8] c"\82\E1", [2 x i8] c"\82\E3", [2 x i8] c"\82\E5", [2 x i8] c"\82\C1", [2 x i8] c"\81[", [2 x i8] c"\82\A0", [2 x i8] c"\82\A2", [2 x i8] c"\82\A4", [2 x i8] c"\82\A6", [2 x i8] c"\82\A8", [2 x i8] c"\82\A9", [2 x i8] c"\82\AB", [2 x i8] c"\82\AD", [2 x i8] c"\82\AF", [2 x i8] c"\82\B1", [2 x i8] c"\82\B3", [2 x i8] c"\82\B5", [2 x i8] c"\82\B7", [2 x i8] c"\82\B9", [2 x i8] c"\82\BB", [2 x i8] c"\82\BD", [2 x i8] c"\82\BF", [2 x i8] c"\82\C2", [2 x i8] c"\82\C4", [2 x i8] c"\82\C6", [2 x i8] c"\82\C8", [2 x i8] c"\82\C9", [2 x i8] c"\82\CA", [2 x i8] c"\82\CB", [2 x i8] c"\82\CC", [2 x i8] c"\82\CD", [2 x i8] c"\82\D0", [2 x i8] c"\82\D3", [2 x i8] c"\82\D6", [2 x i8] c"\82\D9", [2 x i8] c"\82\DC", [2 x i8] c"\82\DD", [2 x i8] c"\82\DE", [2 x i8] c"\82\DF", [2 x i8] c"\82\E0", [2 x i8] c"\82\E2", [2 x i8] c"\82\E4", [2 x i8] c"\82\E6", [2 x i8] c"\82\E7", [2 x i8] c"\82\E8", [2 x i8] c"\82\E9", [2 x i8] c"\82\EA", [2 x i8] c"\82\EB", [2 x i8] c"\82\ED", [2 x i8] c"\82\F1", [2 x i8] c"\81J", [2 x i8] c"\81K"]
define i8* @hankana2sjis(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 160
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [64 x [2 x i8]], [64 x [2 x i8]]* @hankana2sjis.kanatbl, i64 0, i64 %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
ret i8* %7
}

LLVM IR (-O2):
@hankana2sjis.kanatbl = internal global [64 x [2 x i8]] [[2 x i8] c"\81@", [2 x i8] c"\81B", [2 x i8] c"\81u", [2 x i8] c"\81v", [2 x i8] c"\81A", [2 x i8] c"\81E", [2 x i8] c"\82\F0", [2 x i8] c"\82\9F", [2 x i8] c"\82\A1", [2 x i8] c"\82\A3", [2 x i8] c"\82\A5", [2 x i8] c"\82\A7", [2 x i8] c"\82\E1", [2 x i8] c"\82\E3", [2 x i8] c"\82\E5", [2 x i8] c"\82\C1", [2 x i8] c"\81[", [2 x i8] c"\82\A0", [2 x i8] c"\82\A2", [2 x i8] c"\82\A4", [2 x i8] c"\82\A6", [2 x i8] c"\82\A8", [2 x i8] c"\82\A9", [2 x i8] c"\82\AB", [2 x i8] c"\82\AD", [2 x i8] c"\82\AF", [2 x i8] c"\82\B1", [2 x i8] c"\82\B3", [2 x i8] c"\82\B5", [2 x i8] c"\82\B7", [2 x i8] c"\82\B9", [2 x i8] c"\82\BB", [2 x i8] c"\82\BD", [2 x i8] c"\82\BF", [2 x i8] c"\82\C2", [2 x i8] c"\82\C4", [2 x i8] c"\82\C6", [2 x i8] c"\82\C8", [2 x i8] c"\82\C9", [2 x i8] c"\82\CA", [2 x i8] c"\82\CB", [2 x i8] c"\82\CC", [2 x i8] c"\82\CD", [2 x i8] c"\82\D0", [2 x i8] c"\82\D3", [2 x i8] c"\82\D6", [2 x i8] c"\82\D9", [2 x i8] c"\82\DC", [2 x i8] c"\82\DD", [2 x i8] c"\82\DE", [2 x i8] c"\82\DF", [2 x i8] c"\82\E0", [2 x i8] c"\82\E2", [2 x i8] c"\82\E4", [2 x i8] c"\82\E6", [2 x i8] c"\82\E7", [2 x i8] c"\82\E8", [2 x i8] c"\82\E9", [2 x i8] c"\82\EA", [2 x i8] c"\82\EB", [2 x i8] c"\82\ED", [2 x i8] c"\82\F1", [2 x i8] c"\81J", [2 x i8] c"\81K"]
define i8* @hankana2sjis(i32 %0) {
%2 = add nsw i32 %0, -160
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [64 x [2 x i8]], [64 x [2 x i8]]* @hankana2sjis.kanatbl, i64 0, i64 %3, i64 0
ret i8* %4
}