void han2zen(int *p1, int *p2) {
  int c = *p1;
  int daku = 0;
  int handaku = 0;
  int mtable[][2] = {
      {129, 66},  {129, 117}, {129, 118}, {129, 65},  {129, 69},  {131, 146},
      {131, 64},  {131, 66},  {131, 68},  {131, 70},  {131, 72},  {131, 131},
      {131, 133}, {131, 135}, {131, 98},  {129, 91},  {131, 65},  {131, 67},
      {131, 69},  {131, 71},  {131, 73},  {131, 74},  {131, 76},  {131, 78},
      {131, 80},  {131, 82},  {131, 84},  {131, 86},  {131, 88},  {131, 90},
      {131, 92},  {131, 94},  {131, 96},  {131, 99},  {131, 101}, {131, 103},
      {131, 105}, {131, 106}, {131, 107}, {131, 108}, {131, 109}, {131, 110},
      {131, 113}, {131, 116}, {131, 119}, {131, 122}, {131, 125}, {131, 126},
      {131, 128}, {131, 129}, {131, 130}, {131, 132}, {131, 134}, {131, 136},
      {131, 137}, {131, 138}, {131, 139}, {131, 140}, {131, 141}, {131, 143},
      {131, 147}, {129, 74},  {129, 75}};
  if (*p2 == 222 && ((*p1 >= 182 && *p1 <= 196) || (*p1 >= 202 && *p1 <= 206) ||
                     (*p1 == 179)))
    daku = 1;
  else if (*p2 == 223 && (*p1 >= 202 && *p1 <= 206))
    handaku = 1;
  *p1 = mtable[c - 161][0];
  *p2 = mtable[c - 161][1];
  if (daku) {
    if ((*p2 >= 74 && *p2 <= 103) || (*p2 >= 110 && *p2 <= 122))
      (*p2)++;
    else if (*p2 == 131 && *p2 == 69)
      *p2 = 148;
  } else if (handaku && *p2 >= 110 && *p2 <= 122)
    (*p2) += 2;
}


x86 assembly (clang, -O0):
<han2zen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x220(%rbp),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x1f8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
cmpl   $0xde,(%rax)
jne    11be <han2zen+0xae>
mov    -0x8(%rbp),%rax
cmpl   $0xb6,(%rax)
jl     1182 <han2zen+0x72>
mov    -0x8(%rbp),%rax
cmpl   $0xc4,(%rax)
jle    11b2 <han2zen+0xa2>
mov    -0x8(%rbp),%rax
cmpl   $0xca,(%rax)
jl     11a2 <han2zen+0x92>
mov    -0x8(%rbp),%rax
cmpl   $0xce,(%rax)
jle    11b2 <han2zen+0xa2>
mov    -0x8(%rbp),%rax
cmpl   $0xb3,(%rax)
jne    11be <han2zen+0xae>
movl   $0x1,-0x18(%rbp)
jmp    11fa <han2zen+0xea>
mov    -0x10(%rbp),%rax
cmpl   $0xdf,(%rax)
jne    11f5 <han2zen+0xe5>
mov    -0x8(%rbp),%rax
cmpl   $0xca,(%rax)
jl     11f5 <han2zen+0xe5>
mov    -0x8(%rbp),%rax
cmpl   $0xce,(%rax)
jg     11f5 <han2zen+0xe5>
movl   $0x1,-0x1c(%rbp)
jmp    11fa <han2zen+0xea>
mov    -0x14(%rbp),%eax
sub    $0xa1,%eax
cltq
mov    -0x220(%rbp,%rax,8),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
sub    $0xa1,%eax
cltq
mov    -0x21c(%rbp,%rax,8),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x18(%rbp)
je     12a7 <han2zen+0x197>
mov    -0x10(%rbp),%rax
cmpl   $0x4a,(%rax)
jl     124c <han2zen+0x13c>
mov    -0x10(%rbp),%rax
cmpl   $0x67,(%rax)
jle    1266 <han2zen+0x156>
mov    -0x10(%rbp),%rax
cmpl   $0x6e,(%rax)
jl     1276 <han2zen+0x166>
mov    -0x10(%rbp),%rax
cmpl   $0x7a,(%rax)
jg     1276 <han2zen+0x166>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    12a2 <han2zen+0x192>
mov    -0x10(%rbp),%rax
cmpl   $0x83,(%rax)
jne    129d <han2zen+0x18d>
mov    -0x10(%rbp),%rax
cmpl   $0x45,(%rax)
jne    129d <han2zen+0x18d>
mov    -0x10(%rbp),%rax
movl   $0x94,(%rax)
jmp    12a2 <han2zen+0x192>
jmp    12db <han2zen+0x1cb>
cmpl   $0x0,-0x1c(%rbp)
je     12d6 <han2zen+0x1c6>
mov    -0x10(%rbp),%rax
cmpl   $0x6e,(%rax)
jl     12d6 <han2zen+0x1c6>
mov    -0x10(%rbp),%rax
cmpl   $0x7a,(%rax)
jg     12d6 <han2zen+0x1c6>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
jmp    12db <han2zen+0x1cb>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<han2zen>:
movslq (%rdi),%rax
mov    (%rsi),%ecx
mov    $0x1,%r8b
cmp    $0xdf,%ecx
je     112c <han2zen+0x2c>
cmp    $0xde,%ecx
jne    1139 <han2zen+0x39>
lea    -0xb6(%rax),%ecx
cmp    $0xf,%ecx
jae    11cb <han2zen+0xcb>
xor    %r10d,%r10d
jmp    113c <han2zen+0x3c>
lea    -0xcf(%rax),%ecx
cmp    $0xfffffffb,%ecx
setb   %r8b
mov    $0x1,%r10b
lea    -0xa1(%rax),%r9
lea    0xeb6(%rip),%rdx
mov    -0x508(%rdx,%rax,8),%ecx
mov    -0x504(%rdx,%rax,8),%eax
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
test   %r10b,%r10b
je     118c <han2zen+0x8c>
test   %r8b,%r8b
jne    118b <han2zen+0x8b>
movabs $0x1ffffe0000003826,%rcx
fe ff 1f
bt     %r9,%rcx
jae    118b <han2zen+0x8b>
mov    $0x2,%ecx
movabs $0x60003fffffffc7df,%rdx
bt     %r9,%rdx
jb     11c6 <han2zen+0xc6>
ret
movabs $0x7fffffffffe0f826,%rcx
ff ff 7f
bt     %r9,%rcx
jae    11b1 <han2zen+0xb1>
mov    $0x1,%ecx
movabs $0x6000000fffffc7d9,%rdx
bt     %r9,%rdx
jb     11c6 <han2zen+0xc6>
mov    $0x1,%ecx
movabs $0x3e0000000006,%rdx
bt     %r9,%rdx
jae    118b <han2zen+0x8b>
add    %ecx,%eax
mov    %eax,(%rsi)
ret
lea    -0xcf(%rax),%ecx
cmp    $0xfffffffb,%ecx
setb   %dl
cmp    $0xb3,%eax
setne  %r10b
and    %dl,%r10b
jmp    113c <han2zen+0x3c>

LLVM IR (-O0):
@__const.han2zen.mtable = [63 x [2 x i32]] [[2 x i32] [i32 129, i32 66], [2 x i32] [i32 129, i32 117], [2 x i32] [i32 129, i32 118], [2 x i32] [i32 129, i32 65], [2 x i32] [i32 129, i32 69], [2 x i32] [i32 131, i32 146], [2 x i32] [i32 131, i32 64], [2 x i32] [i32 131, i32 66], [2 x i32] [i32 131, i32 68], [2 x i32] [i32 131, i32 70], [2 x i32] [i32 131, i32 72], [2 x i32] [i32 131, i32 131], [2 x i32] [i32 131, i32 133], [2 x i32] [i32 131, i32 135], [2 x i32] [i32 131, i32 98], [2 x i32] [i32 129, i32 91], [2 x i32] [i32 131, i32 65], [2 x i32] [i32 131, i32 67], [2 x i32] [i32 131, i32 69], [2 x i32] [i32 131, i32 71], [2 x i32] [i32 131, i32 73], [2 x i32] [i32 131, i32 74], [2 x i32] [i32 131, i32 76], [2 x i32] [i32 131, i32 78], [2 x i32] [i32 131, i32 80], [2 x i32] [i32 131, i32 82], [2 x i32] [i32 131, i32 84], [2 x i32] [i32 131, i32 86], [2 x i32] [i32 131, i32 88], [2 x i32] [i32 131, i32 90], [2 x i32] [i32 131, i32 92], [2 x i32] [i32 131, i32 94], [2 x i32] [i32 131, i32 96], [2 x i32] [i32 131, i32 99], [2 x i32] [i32 131, i32 101], [2 x i32] [i32 131, i32 103], [2 x i32] [i32 131, i32 105], [2 x i32] [i32 131, i32 106], [2 x i32] [i32 131, i32 107], [2 x i32] [i32 131, i32 108], [2 x i32] [i32 131, i32 109], [2 x i32] [i32 131, i32 110], [2 x i32] [i32 131, i32 113], [2 x i32] [i32 131, i32 116], [2 x i32] [i32 131, i32 119], [2 x i32] [i32 131, i32 122], [2 x i32] [i32 131, i32 125], [2 x i32] [i32 131, i32 126], [2 x i32] [i32 131, i32 128], [2 x i32] [i32 131, i32 129], [2 x i32] [i32 131, i32 130], [2 x i32] [i32 131, i32 132], [2 x i32] [i32 131, i32 134], [2 x i32] [i32 131, i32 136], [2 x i32] [i32 131, i32 137], [2 x i32] [i32 131, i32 138], [2 x i32] [i32 131, i32 139], [2 x i32] [i32 131, i32 140], [2 x i32] [i32 131, i32 141], [2 x i32] [i32 131, i32 143], [2 x i32] [i32 131, i32 147], [2 x i32] [i32 129, i32 74], [2 x i32] [i32 129, i32 75]]
define void @han2zen(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [63 x [2 x i32]]
store i32* %0, i32** %3
store i32* %1, i32** %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
store i32 %10, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%11 = bitcast [63 x [2 x i32]]* %8 to i8*
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, 222
br i1 %14, label %15, label %36
15: ; preds = %2
%16 = load i32*, i32** %3
%17 = load i32, i32* %16
%18 = icmp sge i32 %17, 182
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i32*, i32** %3
%21 = load i32, i32* %20
%22 = icmp sle i32 %21, 196
br i1 %22, label %35, label %23
23: ; preds = %19, %15
%24 = load i32*, i32** %3
%25 = load i32, i32* %24
%26 = icmp sge i32 %25, 202
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load i32*, i32** %3
%29 = load i32, i32* %28
%30 = icmp sle i32 %29, 206
br i1 %30, label %35, label %31
31: ; preds = %27, %23
%32 = load i32*, i32** %3
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 179
br i1 %34, label %35, label %36
35: ; preds = %31, %27, %19
store i32 1, i32* %6
br label %50
36: ; preds = %31, %2
%37 = load i32*, i32** %4
%38 = load i32, i32* %37
%39 = icmp eq i32 %38, 223
br i1 %39, label %40, label %49
40: ; preds = %36
%41 = load i32*, i32** %3
%42 = load i32, i32* %41
%43 = icmp sge i32 %42, 202
br i1 %43, label %44, label %49
44: ; preds = %40
%45 = load i32*, i32** %3
%46 = load i32, i32* %45
%47 = icmp sle i32 %46, 206
br i1 %47, label %48, label %49
48: ; preds = %44
store i32 1, i32* %7
br label %49
49: ; preds = %48, %44, %40, %36
br label %50
50: ; preds = %49, %35
%51 = load i32, i32* %5
%52 = sub nsw i32 %51, 161
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [63 x [2 x i32]], [63 x [2 x i32]]* %8, i64 0, i64 %53
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %54, i64 0, i64 0
%56 = load i32, i32* %55
%57 = load i32*, i32** %3
store i32 %56, i32* %57
%58 = load i32, i32* %5
%59 = sub nsw i32 %58, 161
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [63 x [2 x i32]], [63 x [2 x i32]]* %8, i64 0, i64 %60
%62 = getelementptr inbounds [2 x i32], [2 x i32]* %61, i64 0, i64 1
%63 = load i32, i32* %62
%64 = load i32*, i32** %4
store i32 %63, i32* %64
%65 = load i32, i32* %6
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %99
67: ; preds = %50
%68 = load i32*, i32** %4
%69 = load i32, i32* %68
%70 = icmp sge i32 %69, 74
br i1 %70, label %71, label %75
71: ; preds = %67
%72 = load i32*, i32** %4
%73 = load i32, i32* %72
%74 = icmp sle i32 %73, 103
br i1 %74, label %83, label %75
75: ; preds = %71, %67
%76 = load i32*, i32** %4
%77 = load i32, i32* %76
%78 = icmp sge i32 %77, 110
br i1 %78, label %79, label %87
79: ; preds = %75
%80 = load i32*, i32** %4
%81 = load i32, i32* %80
%82 = icmp sle i32 %81, 122
br i1 %82, label %83, label %87
83: ; preds = %79, %71
%84 = load i32*, i32** %4
%85 = load i32, i32* %84
%86 = add nsw i32 %85, 1
store i32 %86, i32* %84
br label %98
87: ; preds = %79, %75
%88 = load i32*, i32** %4
%89 = load i32, i32* %88
%90 = icmp eq i32 %89, 131
br i1 %90, label %91, label %97
91: ; preds = %87
%92 = load i32*, i32** %4
%93 = load i32, i32* %92
%94 = icmp eq i32 %93, 69
br i1 %94, label %95, label %97
95: ; preds = %91
%96 = load i32*, i32** %4
store i32 148, i32* %96
br label %97
97: ; preds = %95, %91, %87
br label %98
98: ; preds = %97, %83
br label %115
99: ; preds = %50
%100 = load i32, i32* %7
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %114
102: ; preds = %99
%103 = load i32*, i32** %4
%104 = load i32, i32* %103
%105 = icmp sge i32 %104, 110
br i1 %105, label %106, label %114
106: ; preds = %102
%107 = load i32*, i32** %4
%108 = load i32, i32* %107
%109 = icmp sle i32 %108, 122
br i1 %109, label %110, label %114
110: ; preds = %106
%111 = load i32*, i32** %4
%112 = load i32, i32* %111
%113 = add nsw i32 %112, 2
store i32 %113, i32* %111
br label %114
114: ; preds = %110, %106, %102, %99
br label %115
115: ; preds = %114, %98
ret void
}

LLVM IR (-O2):
@__const.han2zen.mtable = [63 x [2 x i32]] [[2 x i32] [i32 129, i32 66], [2 x i32] [i32 129, i32 117], [2 x i32] [i32 129, i32 118], [2 x i32] [i32 129, i32 65], [2 x i32] [i32 129, i32 69], [2 x i32] [i32 131, i32 146], [2 x i32] [i32 131, i32 64], [2 x i32] [i32 131, i32 66], [2 x i32] [i32 131, i32 68], [2 x i32] [i32 131, i32 70], [2 x i32] [i32 131, i32 72], [2 x i32] [i32 131, i32 131], [2 x i32] [i32 131, i32 133], [2 x i32] [i32 131, i32 135], [2 x i32] [i32 131, i32 98], [2 x i32] [i32 129, i32 91], [2 x i32] [i32 131, i32 65], [2 x i32] [i32 131, i32 67], [2 x i32] [i32 131, i32 69], [2 x i32] [i32 131, i32 71], [2 x i32] [i32 131, i32 73], [2 x i32] [i32 131, i32 74], [2 x i32] [i32 131, i32 76], [2 x i32] [i32 131, i32 78], [2 x i32] [i32 131, i32 80], [2 x i32] [i32 131, i32 82], [2 x i32] [i32 131, i32 84], [2 x i32] [i32 131, i32 86], [2 x i32] [i32 131, i32 88], [2 x i32] [i32 131, i32 90], [2 x i32] [i32 131, i32 92], [2 x i32] [i32 131, i32 94], [2 x i32] [i32 131, i32 96], [2 x i32] [i32 131, i32 99], [2 x i32] [i32 131, i32 101], [2 x i32] [i32 131, i32 103], [2 x i32] [i32 131, i32 105], [2 x i32] [i32 131, i32 106], [2 x i32] [i32 131, i32 107], [2 x i32] [i32 131, i32 108], [2 x i32] [i32 131, i32 109], [2 x i32] [i32 131, i32 110], [2 x i32] [i32 131, i32 113], [2 x i32] [i32 131, i32 116], [2 x i32] [i32 131, i32 119], [2 x i32] [i32 131, i32 122], [2 x i32] [i32 131, i32 125], [2 x i32] [i32 131, i32 126], [2 x i32] [i32 131, i32 128], [2 x i32] [i32 131, i32 129], [2 x i32] [i32 131, i32 130], [2 x i32] [i32 131, i32 132], [2 x i32] [i32 131, i32 134], [2 x i32] [i32 131, i32 136], [2 x i32] [i32 131, i32 137], [2 x i32] [i32 131, i32 138], [2 x i32] [i32 131, i32 139], [2 x i32] [i32 131, i32 140], [2 x i32] [i32 131, i32 141], [2 x i32] [i32 131, i32 143], [2 x i32] [i32 131, i32 147], [2 x i32] [i32 129, i32 74], [2 x i32] [i32 129, i32 75]]
define void @han2zen(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
switch i32 %4, label %16 [
i32 222, label %5
i32 223, label %13
]
5: ; preds = %2
%6 = add i32 %3, -182
%7 = icmp ult i32 %6, 15
br i1 %7, label %16, label %8
8: ; preds = %5
%9 = add i32 %3, -207
%10 = icmp ult i32 %9, -5
%11 = icmp ne i32 %3, 179
%12 = and i1 %11, %10
br label %16
13: ; preds = %2
%14 = add i32 %3, -207
%15 = icmp ult i32 %14, -5
br label %16
16: ; preds = %8, %2, %13, %5
%17 = phi i1 [ false, %5 ], [ true, %13 ], [ true, %2 ], [ %12, %8 ]
%18 = phi i1 [ true, %5 ], [ %15, %13 ], [ true, %2 ], [ true, %8 ]
%19 = add nsw i32 %3, -161
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [63 x [2 x i32]], [63 x [2 x i32]]* @__const.han2zen.mtable, i64 0, i64 %20, i64 0
%22 = load i32, i32* %21
store i32 %22, i32* %0
%23 = getelementptr inbounds [63 x [2 x i32]], [63 x [2 x i32]]* @__const.han2zen.mtable, i64 0, i64 %20, i64 1
%24 = load i32, i32* %23
store i32 %24, i32* %1
br i1 %17, label %37, label %25
25: ; preds = %16
%26 = lshr i64 9223372036852742182, %20
%27 = and i64 %26, 1
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = lshr i64 6917529096360544217, %20
%31 = and i64 %30, 1
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %46
33: ; preds = %29, %25
%34 = lshr i64 68169720922118, %20
%35 = and i64 %34, 1
%36 = icmp eq i64 %35, 0
br i1 %36, label %49, label %46
37: ; preds = %16
br i1 %18, label %49, label %38
38: ; preds = %37
%39 = lshr i64 2305840810190452774, %20
%40 = and i64 %39, 1
%41 = icmp eq i64 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %38
%43 = lshr i64 6917599396385245151, %20
%44 = and i64 %43, 1
%45 = icmp eq i64 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %42, %29, %33
%47 = phi i32 [ 1, %33 ], [ 1, %29 ], [ 2, %42 ]
%48 = add nsw i32 %24, %47
store i32 %48, i32* %1
br label %49
49: ; preds = %46, %33, %37, %38, %42
ret void
}