#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
#define KEY_BACKSPACE 138
#define KEY_BTAB 137
#define KEY_DC 136
#define KEY_DOWN 135
#define KEY_END 134
int const KEY_F0;
#define KEY_HOME 133
#define KEY_LEFT 132
#define KEY_NPAGE 131
#define KEY_PPAGE 130
#define KEY_RIGHT 129
#define KEY_UP 128
int /*<<< orphan*/ strcpy(char *, char *);
char tolower(int /*<<< orphan*/);
const char *wchar_to_spec(const wchar_t c[], size_t *len) {
  static char buf[32];
  *len = 1;
  switch (*c) {
  case L' ':
    strcpy(buf, "<space>");
    break;
  case L'\b':
    strcpy(buf, "<bs>");
    break;
  case L'\r':
    strcpy(buf, "<cr>");
    break;
  case L'\n':
    strcpy(buf, "<c-j>");
    break;
  case L'\177':
    strcpy(buf, "<del>");
    break;
  case KEY_HOME:
    strcpy(buf, "<home>");
    break;
  case KEY_END:
    strcpy(buf, "<end>");
    break;
  case KEY_UP:
    strcpy(buf, "<up>");
    break;
  case KEY_DOWN:
    strcpy(buf, "<down>");
    break;
  case KEY_LEFT:
    strcpy(buf, "<left>");
    break;
  case KEY_RIGHT:
    strcpy(buf, "<right>");
    break;
  case KEY_DC:
    strcpy(buf, "<delete>");
    break;
  case KEY_BTAB:
    strcpy(buf, "<s-tab>");
    break;
  case KEY_PPAGE:
    strcpy(buf, "<pageup>");
    break;
  case KEY_NPAGE:
    strcpy(buf, "<pagedown>");
    break;
  case KEY_BACKSPACE:
    strcpy(buf, "<bs>");
    break;
  case L'\033':
    if (c[1] == L'[' && c[2] == 'Z') {
      strcpy(buf, "<s-tab>");
      *len += 2;
      break;
    }
    if (c[1] != L'\0' && c[1] != L'\033') {
      strcpy(buf, "<m-a>");
      buf[3] += c[1] - L'a';
      ++*len;
      break;
    }
    strcpy(buf, "<esc>");
    break;
  default:
    if (*c == '\n' || (*c > L' ' && *c < 256)) {
      buf[0] = *c;
      buf[1] = '\0';
    } else if (*c >= KEY_F0 && *c < KEY_F0 + 10) {
      strcpy(buf, "<f0>");
      buf[2] += *c - KEY_F0;
    } else if (*c >= KEY_F0 + 13 && *c <= KEY_F0 + 21) {
      strcpy(buf, "<s-f1>");
      buf[4] += *c - (KEY_F0 + 13);
    } else if (*c >= KEY_F0 + 22 && *c <= KEY_F0 + 24) {
      strcpy(buf, "<s-f10>");
      buf[5] += *c - (KEY_F0 + 22);
    } else if (*c >= KEY_F0 + 25 && *c <= KEY_F0 + 33) {
      strcpy(buf, "<c-f1>");
      buf[4] += *c - (KEY_F0 + 25);
    } else if (*c >= KEY_F0 + 34 && *c <= KEY_F0 + 36) {
      strcpy(buf, "<c-f10>");
      buf[5] += *c - (KEY_F0 + 34);
    } else if (*c >= KEY_F0 + 37 && *c <= KEY_F0 + 45) {
      strcpy(buf, "<a-f1>");
      buf[4] += *c - (KEY_F0 + 37);
    } else if (*c >= KEY_F0 + 46 && *c <= KEY_F0 + 48) {
      strcpy(buf, "<a-f10>");
      buf[5] += *c - (KEY_F0 + 46);
    } else if (*c >= KEY_F0 + 10 && *c < KEY_F0 + 63) {
      strcpy(buf, "<f00>");
      buf[2] += (*c - KEY_F0) / 10;
      buf[3] += (*c - KEY_F0) % 10;
    } else {
      strcpy(buf, "<c-A>");
      buf[3] = tolower(buf[3] + *c - 1);
    }
    break;
  }
  return buf;
}


x86 assembly (clang, -O0):
<wchar_to_spec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xfffffff8,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x82,%eax
ja     139e <wchar_to_spec+0x27e>
mov    -0x18(%rbp),%rax
lea    0xea0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2ed0(%rip),%rdi
lea    0x1099(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2eb8(%rip),%rdi
lea    0x1089(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2ea0(%rip),%rdi
lea    0x1076(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e88(%rip),%rdi
lea    0x1063(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e70(%rip),%rdi
lea    0x1051(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e58(%rip),%rdi
lea    0x103f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e40(%rip),%rdi
lea    0x102e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e28(%rip),%rdi
lea    0x101c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2e10(%rip),%rdi
lea    0x1009(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2df8(%rip),%rdi
lea    0xff8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2de0(%rip),%rdi
lea    0xfe7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2dc8(%rip),%rdi
lea    0xfd7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2db0(%rip),%rdi
lea    0xfc8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2d98(%rip),%rdi
lea    0xfb8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2d80(%rip),%rdi
lea    0xfa9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2d68(%rip),%rdi
lea    0xf39(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
mov    -0x8(%rbp),%rax
cmpl   $0x5b,0x4(%rax)
jne    132b <wchar_to_spec+0x20b>
mov    -0x8(%rbp),%rax
cmpl   $0x5a,0x8(%rax)
jne    132b <wchar_to_spec+0x20b>
lea    0x2d34(%rip),%rdi
lea    0xf4c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
jmp    17d4 <wchar_to_spec+0x6b4>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
je     1386 <wchar_to_spec+0x266>
mov    -0x8(%rbp),%rax
cmpl   $0x1b,0x4(%rax)
je     1386 <wchar_to_spec+0x266>
lea    0x2cf2(%rip),%rdi
lea    0xf26(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
sub    $0x61,%ecx
movsbl 0x2cd8(%rip),%eax
add    %ecx,%eax
mov    %al,0x2cd0(%rip)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2cb3(%rip),%rdi
lea    0xeed(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17d4 <wchar_to_spec+0x6b4>
mov    -0x8(%rbp),%rax
cmpl   $0xa,(%rax)
je     13c8 <wchar_to_spec+0x2a8>
mov    -0x8(%rbp),%rax
cmpl   $0x20,(%rax)
jle    13e0 <wchar_to_spec+0x2c0>
mov    -0x8(%rbp),%rax
cmpl   $0x100,(%rax)
jge    13e0 <wchar_to_spec+0x2c0>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %al,0x2c6c(%rip)
movb   $0x0,0x2c66(%rip)
jmp    17cf <wchar_to_spec+0x6af>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2bf3(%rip),%rcx
cmp    (%rcx),%eax
jl     1445 <wchar_to_spec+0x325>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2bde(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jge    1445 <wchar_to_spec+0x325>
lea    0x2c2a(%rip),%rdi
lea    0xe6a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2bb1(%rip),%rax
sub    (%rax),%ecx
movsbl 0x2c0a(%rip),%eax
add    %ecx,%eax
mov    %al,0x2c02(%rip)
jmp    17ca <wchar_to_spec+0x6aa>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b8e(%rip),%rcx
mov    (%rcx),%ecx
add    $0xd,%ecx
cmp    %ecx,%eax
jl     14b4 <wchar_to_spec+0x394>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b74(%rip),%rcx
mov    (%rcx),%ecx
add    $0x15,%ecx
cmp    %ecx,%eax
jg     14b4 <wchar_to_spec+0x394>
lea    0x2bc0(%rip),%rdi
lea    0xe05(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2b47(%rip),%rax
mov    (%rax),%eax
add    $0xd,%eax
sub    %eax,%ecx
movsbl 0x2b9d(%rip),%eax
add    %ecx,%eax
mov    %al,0x2b95(%rip)
jmp    17c5 <wchar_to_spec+0x6a5>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b1f(%rip),%rcx
mov    (%rcx),%ecx
add    $0x16,%ecx
cmp    %ecx,%eax
jl     1523 <wchar_to_spec+0x403>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b05(%rip),%rcx
mov    (%rcx),%ecx
add    $0x18,%ecx
cmp    %ecx,%eax
jg     1523 <wchar_to_spec+0x403>
lea    0x2b51(%rip),%rdi
lea    0xd9d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2ad8(%rip),%rax
mov    (%rax),%eax
add    $0x16,%eax
sub    %eax,%ecx
movsbl 0x2b2f(%rip),%eax
add    %ecx,%eax
mov    %al,0x2b27(%rip)
jmp    17c0 <wchar_to_spec+0x6a0>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ab0(%rip),%rcx
mov    (%rcx),%ecx
add    $0x19,%ecx
cmp    %ecx,%eax
jl     1592 <wchar_to_spec+0x472>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a96(%rip),%rcx
mov    (%rcx),%ecx
add    $0x21,%ecx
cmp    %ecx,%eax
jg     1592 <wchar_to_spec+0x472>
lea    0x2ae2(%rip),%rdi
lea    0xd36(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2a69(%rip),%rax
mov    (%rax),%eax
add    $0x19,%eax
sub    %eax,%ecx
movsbl 0x2abf(%rip),%eax
add    %ecx,%eax
mov    %al,0x2ab7(%rip)
jmp    17bb <wchar_to_spec+0x69b>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a41(%rip),%rcx
mov    (%rcx),%ecx
add    $0x22,%ecx
cmp    %ecx,%eax
jl     1601 <wchar_to_spec+0x4e1>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a27(%rip),%rcx
mov    (%rcx),%ecx
add    $0x24,%ecx
cmp    %ecx,%eax
jg     1601 <wchar_to_spec+0x4e1>
lea    0x2a73(%rip),%rdi
lea    0xcce(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x29fa(%rip),%rax
mov    (%rax),%eax
add    $0x22,%eax
sub    %eax,%ecx
movsbl 0x2a51(%rip),%eax
add    %ecx,%eax
mov    %al,0x2a49(%rip)
jmp    17b6 <wchar_to_spec+0x696>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x29d2(%rip),%rcx
mov    (%rcx),%ecx
add    $0x25,%ecx
cmp    %ecx,%eax
jl     1670 <wchar_to_spec+0x550>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x29b8(%rip),%rcx
mov    (%rcx),%ecx
add    $0x2d,%ecx
cmp    %ecx,%eax
jg     1670 <wchar_to_spec+0x550>
lea    0x2a04(%rip),%rdi
lea    0xc67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x298b(%rip),%rax
mov    (%rax),%eax
add    $0x25,%eax
sub    %eax,%ecx
movsbl 0x29e1(%rip),%eax
add    %ecx,%eax
mov    %al,0x29d9(%rip)
jmp    17b1 <wchar_to_spec+0x691>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2963(%rip),%rcx
mov    (%rcx),%ecx
add    $0x2e,%ecx
cmp    %ecx,%eax
jl     16df <wchar_to_spec+0x5bf>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2949(%rip),%rcx
mov    (%rcx),%ecx
add    $0x30,%ecx
cmp    %ecx,%eax
jg     16df <wchar_to_spec+0x5bf>
lea    0x2995(%rip),%rdi
lea    0xbff(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x291c(%rip),%rax
mov    (%rax),%eax
add    $0x2e,%eax
sub    %eax,%ecx
movsbl 0x2973(%rip),%eax
add    %ecx,%eax
mov    %al,0x296b(%rip)
jmp    17ac <wchar_to_spec+0x68c>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x28f4(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jl     1779 <wchar_to_spec+0x659>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x28da(%rip),%rcx
mov    (%rcx),%ecx
add    $0x3f,%ecx
cmp    %ecx,%eax
jge    1779 <wchar_to_spec+0x659>
lea    0x2926(%rip),%rdi
lea    0xb98(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x28ad(%rip),%rcx
sub    (%rcx),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
movsbl 0x28fc(%rip),%eax
add    %ecx,%eax
mov    %al,0x28f4(%rip)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2885(%rip),%rcx
sub    (%rcx),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movsbl 0x28d7(%rip),%eax
add    %edx,%eax
mov    %al,0x28cf(%rip)
jmp    17a7 <wchar_to_spec+0x687>
lea    0x28c0(%rip),%rdi
lea    0xb38(%rip),%rsi
call   1030 <strcpy@plt>
movsbl 0x28b0(%rip),%edi
mov    -0x8(%rbp),%rax
add    (%rax),%edi
sub    $0x1,%edi
call   1040 <tolower@plt>
mov    %al,0x289c(%rip)
jmp    17ac <wchar_to_spec+0x68c>
jmp    17b1 <wchar_to_spec+0x691>
jmp    17b6 <wchar_to_spec+0x696>
jmp    17bb <wchar_to_spec+0x69b>
jmp    17c0 <wchar_to_spec+0x6a0>
jmp    17c5 <wchar_to_spec+0x6a5>
jmp    17ca <wchar_to_spec+0x6aa>
jmp    17cf <wchar_to_spec+0x6af>
jmp    17d4 <wchar_to_spec+0x6b4>
lea    0x2865(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wchar_to_spec>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movq   $0x1,(%rsi)
mov    (%rdi),%eax
lea    -0x8(%rax),%ecx
cmp    $0x82,%ecx
ja     1163 <wchar_to_spec+0x43>
lea    0xebe(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x2eee(%rip),%rdi
lea    0x10bf(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    -0x21(%rax),%ecx
cmp    $0xde,%ecx
ja     131c <wchar_to_spec+0x1fc>
mov    %al,0x2ec8(%rip)
movb   $0x0,0x2ec2(%rip)
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2eb5(%rip),%rdi
lea    0x108b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
mov    0x4(%r14),%eax
test   %eax,%eax
je     1342 <wchar_to_spec+0x222>
cmp    $0x1b,%eax
je     1342 <wchar_to_spec+0x222>
mov    %rsi,%rbx
cmp    $0x5b,%eax
jne    135a <wchar_to_spec+0x23a>
cmpl   $0x5a,0x8(%r14)
jne    135a <wchar_to_spec+0x23a>
lea    0x2e71(%rip),%rdi
lea    0x1089(%rip),%rsi
call   1030 <strcpy@plt>
addq   $0x2,(%rbx)
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2e55(%rip),%rdi
lea    0x101e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2e3d(%rip),%rdi
lea    0x1066(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2e25(%rip),%rdi
lea    0x1025(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2e0d(%rip),%rdi
lea    0xff4(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2df5(%rip),%rdi
lea    0xfe3(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2ddd(%rip),%rdi
lea    0xfb8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2dc5(%rip),%rdi
lea    0xfa6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2dad(%rip),%rdi
lea    0xfa1(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2d95(%rip),%rdi
lea    0xf9c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2d7d(%rip),%rdi
lea    0xf9d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2d65(%rip),%rdi
lea    0xf5e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2d4d(%rip),%rdi
lea    0xf5c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2d35(%rip),%rdi
lea    0xf4d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
cmp    $0x9,%eax
ja     1388 <wchar_to_spec+0x268>
lea    0x2d18(%rip),%rdi
lea    0xf58(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    %al,0x2d05(%rip)
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2cf7(%rip),%rdi
lea    0xf31(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14a0 <wchar_to_spec+0x380>
lea    0x2cdf(%rip),%rdi
lea    0xf13(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x4(%r14),%al
add    0x2ccc(%rip),%al
add    $0x9f,%al
mov    %al,0x2cc4(%rip)
addq   $0x1,(%rbx)
jmp    14a0 <wchar_to_spec+0x380>
lea    -0xd(%rax),%ecx
cmp    $0x8,%ecx
ja     13b9 <wchar_to_spec+0x299>
lea    0x2ca9(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2c98(%rip),%al
add    $0xf3,%al
mov    %al,0x2c90(%rip)
jmp    14a0 <wchar_to_spec+0x380>
lea    -0x16(%rax),%ecx
cmp    $0x2,%ecx
ja     13ea <wchar_to_spec+0x2ca>
lea    0x2c78(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2c68(%rip),%al
add    $0xea,%al
mov    %al,0x2c60(%rip)
jmp    14a0 <wchar_to_spec+0x380>
lea    -0x19(%rax),%ecx
cmp    $0x8,%ecx
ja     141b <wchar_to_spec+0x2fb>
lea    0x2c47(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2c36(%rip),%al
add    $0xe7,%al
mov    %al,0x2c2e(%rip)
jmp    14a0 <wchar_to_spec+0x380>
add    $0xfffffff6,%eax
lea    0x2c1b(%rip),%rdi
cmp    $0x34,%eax
ja     1479 <wchar_to_spec+0x359>
lea    0xe71(%rip),%rsi
call   1030 <strcpy@plt>
movslq (%r14),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x22,%rax
add    %ecx,%eax
add    %al,0x2bef(%rip)
movslq (%r14),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    %al,0x2bcc(%rip)
jmp    14a0 <wchar_to_spec+0x380>
lea    0xe28(%rip),%rsi
call   1030 <strcpy@plt>
movsbl 0x2bb7(%rip),%eax
mov    (%r14),%ecx
lea    (%rax,%rcx,1),%edi
add    $0xffffffff,%edi
call   1040 <tolower@plt>
mov    %al,0x2ba3(%rip)
lea    0x2b99(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@wchar_to_spec.buf = internal global [32 x i8] zeroinitializer
@.str = [8 x i8] c"<space>\00"
@.str.1 = [5 x i8] c"<bs>\00"
@.str.2 = [5 x i8] c"<cr>\00"
@.str.3 = [6 x i8] c"<c-j>\00"
@.str.4 = [6 x i8] c"<del>\00"
@.str.5 = [7 x i8] c"<home>\00"
@.str.6 = [6 x i8] c"<end>\00"
@.str.7 = [5 x i8] c"<up>\00"
@.str.8 = [7 x i8] c"<down>\00"
@.str.9 = [7 x i8] c"<left>\00"
@.str.10 = [8 x i8] c"<right>\00"
@.str.11 = [9 x i8] c"<delete>\00"
@.str.12 = [8 x i8] c"<s-tab>\00"
@.str.13 = [9 x i8] c"<pageup>\00"
@.str.14 = [11 x i8] c"<pagedown>\00"
@.str.15 = [6 x i8] c"<m-a>\00"
@.str.16 = [6 x i8] c"<esc>\00"
@KEY_F0 = constant i32 0
@.str.17 = [5 x i8] c"<f0>\00"
@.str.18 = [7 x i8] c"<s-f1>\00"
@.str.19 = [8 x i8] c"<s-f10>\00"
@.str.20 = [7 x i8] c"<c-f1>\00"
@.str.21 = [8 x i8] c"<c-f10>\00"
@.str.22 = [7 x i8] c"<a-f1>\00"
@.str.23 = [8 x i8] c"<a-f10>\00"
@.str.24 = [6 x i8] c"<f00>\00"
@.str.25 = [6 x i8] c"<c-A>\00"
define i8* @wchar_to_spec(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
store i64 1, i64* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
switch i32 %7, label %80 [
i32 32, label %8
i32 8, label %10
i32 13, label %12
i32 10, label %14
i32 127, label %16
i32 133, label %18
i32 134, label %20
i32 128, label %22
i32 135, label %24
i32 132, label %26
i32 129, label %28
i32 136, label %30
i32 137, label %32
i32 130, label %34
i32 131, label %36
i32 138, label %38
i32 27, label %40
]
8: ; preds = %2
%9 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %305
10: ; preds = %2
%11 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %305
12: ; preds = %2
%13 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %305
14: ; preds = %2
%15 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %305
16: ; preds = %2
%17 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %305
18: ; preds = %2
%19 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %305
20: ; preds = %2
%21 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %305
22: ; preds = %2
%23 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %305
24: ; preds = %2
%25 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %305
26: ; preds = %2
%27 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %305
28: ; preds = %2
%29 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %305
30: ; preds = %2
%31 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %305
32: ; preds = %2
%33 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
br label %305
34: ; preds = %2
%35 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
br label %305
36: ; preds = %2
%37 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
br label %305
38: ; preds = %2
%39 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %305
40: ; preds = %2
%41 = load i32*, i32** %3
%42 = getelementptr inbounds i32, i32* %41, i64 1
%43 = load i32, i32* %42
%44 = icmp eq i32 %43, 91
br i1 %44, label %45, label %55
45: ; preds = %40
%46 = load i32*, i32** %3
%47 = getelementptr inbounds i32, i32* %46, i64 2
%48 = load i32, i32* %47
%49 = icmp eq i32 %48, 90
br i1 %49, label %50, label %55
50: ; preds = %45
%51 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%52 = load i64*, i64** %4
%53 = load i64, i64* %52
%54 = add i64 %53, 2
store i64 %54, i64* %52
br label %305
55: ; preds = %45, %40
%56 = load i32*, i32** %3
%57 = getelementptr inbounds i32, i32* %56, i64 1
%58 = load i32, i32* %57
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %78
60: ; preds = %55
%61 = load i32*, i32** %3
%62 = getelementptr inbounds i32, i32* %61, i64 1
%63 = load i32, i32* %62
%64 = icmp ne i32 %63, 27
br i1 %64, label %65, label %78
65: ; preds = %60
%66 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%67 = load i32*, i32** %3
%68 = getelementptr inbounds i32, i32* %67, i64 1
%69 = load i32, i32* %68
%70 = sub nsw i32 %69, 97
%71 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%72 = sext i8 %71 to i32
%73 = add nsw i32 %72, %70
%74 = trunc i32 %73 to i8
store i8 %74, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%75 = load i64*, i64** %4
%76 = load i64, i64* %75
%77 = add i64 %76, 1
store i64 %77, i64* %75
br label %305
78: ; preds = %60, %55
%79 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
br label %305
80: ; preds = %2
%81 = load i32*, i32** %3
%82 = load i32, i32* %81
%83 = icmp eq i32 %82, 10
br i1 %83, label %92, label %84
84: ; preds = %80
%85 = load i32*, i32** %3
%86 = load i32, i32* %85
%87 = icmp sgt i32 %86, 32
br i1 %87, label %88, label %96
88: ; preds = %84
%89 = load i32*, i32** %3
%90 = load i32, i32* %89
%91 = icmp slt i32 %90, 256
br i1 %91, label %92, label %96
92: ; preds = %88, %80
%93 = load i32*, i32** %3
%94 = load i32, i32* %93
%95 = trunc i32 %94 to i8
store i8 %95, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0)
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 1)
br label %304
96: ; preds = %88, %84
%97 = load i32*, i32** %3
%98 = load i32, i32* %97
%99 = load i32, i32* @KEY_F0
%100 = icmp sge i32 %98, %99
br i1 %100, label %101, label %117
101: ; preds = %96
%102 = load i32*, i32** %3
%103 = load i32, i32* %102
%104 = load i32, i32* @KEY_F0
%105 = add nsw i32 %104, 10
%106 = icmp slt i32 %103, %105
br i1 %106, label %107, label %117
107: ; preds = %101
%108 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%109 = load i32*, i32** %3
%110 = load i32, i32* %109
%111 = load i32, i32* @KEY_F0
%112 = sub nsw i32 %110, %111
%113 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%114 = sext i8 %113 to i32
%115 = add nsw i32 %114, %112
%116 = trunc i32 %115 to i8
store i8 %116, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
br label %303
117: ; preds = %101, %96
%118 = load i32*, i32** %3
%119 = load i32, i32* %118
%120 = load i32, i32* @KEY_F0
%121 = add nsw i32 %120, 13
%122 = icmp sge i32 %119, %121
br i1 %122, label %123, label %140
123: ; preds = %117
%124 = load i32*, i32** %3
%125 = load i32, i32* %124
%126 = load i32, i32* @KEY_F0
%127 = add nsw i32 %126, 21
%128 = icmp sle i32 %125, %127
br i1 %128, label %129, label %140
129: ; preds = %123
%130 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%131 = load i32*, i32** %3
%132 = load i32, i32* %131
%133 = load i32, i32* @KEY_F0
%134 = add nsw i32 %133, 13
%135 = sub nsw i32 %132, %134
%136 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%137 = sext i8 %136 to i32
%138 = add nsw i32 %137, %135
%139 = trunc i32 %138 to i8
store i8 %139, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %302
140: ; preds = %123, %117
%141 = load i32*, i32** %3
%142 = load i32, i32* %141
%143 = load i32, i32* @KEY_F0
%144 = add nsw i32 %143, 22
%145 = icmp sge i32 %142, %144
br i1 %145, label %146, label %163
146: ; preds = %140
%147 = load i32*, i32** %3
%148 = load i32, i32* %147
%149 = load i32, i32* @KEY_F0
%150 = add nsw i32 %149, 24
%151 = icmp sle i32 %148, %150
br i1 %151, label %152, label %163
152: ; preds = %146
%153 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
%154 = load i32*, i32** %3
%155 = load i32, i32* %154
%156 = load i32, i32* @KEY_F0
%157 = add nsw i32 %156, 22
%158 = sub nsw i32 %155, %157
%159 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%160 = sext i8 %159 to i32
%161 = add nsw i32 %160, %158
%162 = trunc i32 %161 to i8
store i8 %162, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %301
163: ; preds = %146, %140
%164 = load i32*, i32** %3
%165 = load i32, i32* %164
%166 = load i32, i32* @KEY_F0
%167 = add nsw i32 %166, 25
%168 = icmp sge i32 %165, %167
br i1 %168, label %169, label %186
169: ; preds = %163
%170 = load i32*, i32** %3
%171 = load i32, i32* %170
%172 = load i32, i32* @KEY_F0
%173 = add nsw i32 %172, 33
%174 = icmp sle i32 %171, %173
br i1 %174, label %175, label %186
175: ; preds = %169
%176 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
%177 = load i32*, i32** %3
%178 = load i32, i32* %177
%179 = load i32, i32* @KEY_F0
%180 = add nsw i32 %179, 25
%181 = sub nsw i32 %178, %180
%182 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%183 = sext i8 %182 to i32
%184 = add nsw i32 %183, %181
%185 = trunc i32 %184 to i8
store i8 %185, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %300
186: ; preds = %169, %163
%187 = load i32*, i32** %3
%188 = load i32, i32* %187
%189 = load i32, i32* @KEY_F0
%190 = add nsw i32 %189, 34
%191 = icmp sge i32 %188, %190
br i1 %191, label %192, label %209
192: ; preds = %186
%193 = load i32*, i32** %3
%194 = load i32, i32* %193
%195 = load i32, i32* @KEY_F0
%196 = add nsw i32 %195, 36
%197 = icmp sle i32 %194, %196
br i1 %197, label %198, label %209
198: ; preds = %192
%199 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
%200 = load i32*, i32** %3
%201 = load i32, i32* %200
%202 = load i32, i32* @KEY_F0
%203 = add nsw i32 %202, 34
%204 = sub nsw i32 %201, %203
%205 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%206 = sext i8 %205 to i32
%207 = add nsw i32 %206, %204
%208 = trunc i32 %207 to i8
store i8 %208, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %299
209: ; preds = %192, %186
%210 = load i32*, i32** %3
%211 = load i32, i32* %210
%212 = load i32, i32* @KEY_F0
%213 = add nsw i32 %212, 37
%214 = icmp sge i32 %211, %213
br i1 %214, label %215, label %232
215: ; preds = %209
%216 = load i32*, i32** %3
%217 = load i32, i32* %216
%218 = load i32, i32* @KEY_F0
%219 = add nsw i32 %218, 45
%220 = icmp sle i32 %217, %219
br i1 %220, label %221, label %232
221: ; preds = %215
%222 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0))
%223 = load i32*, i32** %3
%224 = load i32, i32* %223
%225 = load i32, i32* @KEY_F0
%226 = add nsw i32 %225, 37
%227 = sub nsw i32 %224, %226
%228 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%229 = sext i8 %228 to i32
%230 = add nsw i32 %229, %227
%231 = trunc i32 %230 to i8
store i8 %231, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %298
232: ; preds = %215, %209
%233 = load i32*, i32** %3
%234 = load i32, i32* %233
%235 = load i32, i32* @KEY_F0
%236 = add nsw i32 %235, 46
%237 = icmp sge i32 %234, %236
br i1 %237, label %238, label %255
238: ; preds = %232
%239 = load i32*, i32** %3
%240 = load i32, i32* %239
%241 = load i32, i32* @KEY_F0
%242 = add nsw i32 %241, 48
%243 = icmp sle i32 %240, %242
br i1 %243, label %244, label %255
244: ; preds = %238
%245 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%246 = load i32*, i32** %3
%247 = load i32, i32* %246
%248 = load i32, i32* @KEY_F0
%249 = add nsw i32 %248, 46
%250 = sub nsw i32 %247, %249
%251 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%252 = sext i8 %251 to i32
%253 = add nsw i32 %252, %250
%254 = trunc i32 %253 to i8
store i8 %254, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %297
255: ; preds = %238, %232
%256 = load i32*, i32** %3
%257 = load i32, i32* %256
%258 = load i32, i32* @KEY_F0
%259 = add nsw i32 %258, 10
%260 = icmp sge i32 %257, %259
br i1 %260, label %261, label %287
261: ; preds = %255
%262 = load i32*, i32** %3
%263 = load i32, i32* %262
%264 = load i32, i32* @KEY_F0
%265 = add nsw i32 %264, 63
%266 = icmp slt i32 %263, %265
br i1 %266, label %267, label %287
267: ; preds = %261
%268 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0))
%269 = load i32*, i32** %3
%270 = load i32, i32* %269
%271 = load i32, i32* @KEY_F0
%272 = sub nsw i32 %270, %271
%273 = sdiv i32 %272, 10
%274 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%275 = sext i8 %274 to i32
%276 = add nsw i32 %275, %273
%277 = trunc i32 %276 to i8
store i8 %277, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%278 = load i32*, i32** %3
%279 = load i32, i32* %278
%280 = load i32, i32* @KEY_F0
%281 = sub nsw i32 %279, %280
%282 = srem i32 %281, 10
%283 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%284 = sext i8 %283 to i32
%285 = add nsw i32 %284, %282
%286 = trunc i32 %285 to i8
store i8 %286, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %296
287: ; preds = %261, %255
%288 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%289 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%290 = sext i8 %289 to i32
%291 = load i32*, i32** %3
%292 = load i32, i32* %291
%293 = add nsw i32 %290, %292
%294 = sub nsw i32 %293, 1
%295 = call signext i8 @tolower(i32 %294)
store i8 %295, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %296
296: ; preds = %287, %267
br label %297
297: ; preds = %296, %244
br label %298
298: ; preds = %297, %221
br label %299
299: ; preds = %298, %198
br label %300
300: ; preds = %299, %175
br label %301
301: ; preds = %300, %152
br label %302
302: ; preds = %301, %129
br label %303
303: ; preds = %302, %107
br label %304
304: ; preds = %303, %92
br label %305
305: ; preds = %304, %78, %65, %50, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@wchar_to_spec.buf = internal global [32 x i8] zeroinitializer
@.str = [8 x i8] c"<space>\00"
@.str.1 = [5 x i8] c"<bs>\00"
@.str.2 = [5 x i8] c"<cr>\00"
@.str.3 = [6 x i8] c"<c-j>\00"
@.str.4 = [6 x i8] c"<del>\00"
@.str.5 = [7 x i8] c"<home>\00"
@.str.6 = [6 x i8] c"<end>\00"
@.str.7 = [5 x i8] c"<up>\00"
@.str.8 = [7 x i8] c"<down>\00"
@.str.9 = [7 x i8] c"<left>\00"
@.str.10 = [8 x i8] c"<right>\00"
@.str.11 = [9 x i8] c"<delete>\00"
@.str.12 = [8 x i8] c"<s-tab>\00"
@.str.13 = [9 x i8] c"<pageup>\00"
@.str.14 = [11 x i8] c"<pagedown>\00"
@.str.15 = [6 x i8] c"<m-a>\00"
@.str.16 = [6 x i8] c"<esc>\00"
@KEY_F0 = constant i32 0
@.str.17 = [5 x i8] c"<f0>\00"
@.str.18 = [7 x i8] c"<s-f1>\00"
@.str.19 = [8 x i8] c"<s-f10>\00"
@.str.20 = [7 x i8] c"<c-f1>\00"
@.str.24 = [6 x i8] c"<f00>\00"
@.str.25 = [6 x i8] c"<c-A>\00"
define i8* @wchar_to_spec(i32* %0, i64* nocapture %1) {
store i64 1, i64* %1
%3 = load i32, i32* %0
switch i32 %3, label %58 [
i32 32, label %4
i32 8, label %6
i32 13, label %8
i32 10, label %10
i32 127, label %12
i32 133, label %14
i32 134, label %16
i32 128, label %18
i32 135, label %20
i32 132, label %22
i32 129, label %24
i32 136, label %26
i32 137, label %28
i32 130, label %30
i32 131, label %32
i32 138, label %34
i32 27, label %36
]
4: ; preds = %2
%5 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %124
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %124
8: ; preds = %2
%9 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %124
10: ; preds = %2
%11 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %124
12: ; preds = %2
%13 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %124
14: ; preds = %2
%15 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %124
16: ; preds = %2
%17 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %124
18: ; preds = %2
%19 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %124
20: ; preds = %2
%21 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %124
22: ; preds = %2
%23 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %124
24: ; preds = %2
%25 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %124
26: ; preds = %2
%27 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %124
28: ; preds = %2
%29 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
br label %124
30: ; preds = %2
%31 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
br label %124
32: ; preds = %2
%33 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
br label %124
34: ; preds = %2
%35 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %124
36: ; preds = %2
%37 = getelementptr inbounds i32, i32* %0, i64 1
%38 = load i32, i32* %37
switch i32 %38, label %47 [
i32 91, label %39
i32 0, label %56
i32 27, label %56
]
39: ; preds = %36
%40 = getelementptr inbounds i32, i32* %0, i64 2
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 90
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%45 = load i64, i64* %1
%46 = add i64 %45, 2
store i64 %46, i64* %1
br label %124
47: ; preds = %36, %39
%48 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%49 = load i32, i32* %37
%50 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%51 = trunc i32 %49 to i8
%52 = add i8 %51, -97
%53 = add i8 %52, %50
store i8 %53, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%54 = load i64, i64* %1
%55 = add i64 %54, 1
store i64 %55, i64* %1
br label %124
56: ; preds = %36, %36
%57 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
br label %124
58: ; preds = %2
%59 = add i32 %3, -33
%60 = icmp ult i32 %59, 223
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = trunc i32 %3 to i8
store i8 %62, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0)
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 1)
br label %124
63: ; preds = %58
%64 = icmp ult i32 %3, 10
br i1 %64, label %65, label %71
65: ; preds = %63
%66 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%67 = load i32, i32* %0
%68 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%69 = trunc i32 %67 to i8
%70 = add i8 %68, %69
store i8 %70, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
br label %124
71: ; preds = %63
%72 = add i32 %3, -13
%73 = icmp ult i32 %72, 9
br i1 %73, label %74, label %81
74: ; preds = %71
%75 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%76 = load i32, i32* %0
%77 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%78 = trunc i32 %76 to i8
%79 = add i8 %78, -13
%80 = add i8 %79, %77
store i8 %80, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %124
81: ; preds = %71
%82 = add i32 %3, -22
%83 = icmp ult i32 %82, 3
br i1 %83, label %84, label %91
84: ; preds = %81
%85 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
%86 = load i32, i32* %0
%87 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%88 = trunc i32 %86 to i8
%89 = add i8 %88, -22
%90 = add i8 %89, %87
store i8 %90, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %124
91: ; preds = %81
%92 = add i32 %3, -25
%93 = icmp ult i32 %92, 9
br i1 %93, label %94, label %101
94: ; preds = %91
%95 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
%96 = load i32, i32* %0
%97 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%98 = trunc i32 %96 to i8
%99 = add i8 %98, -25
%100 = add i8 %99, %97
store i8 %100, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %124
101: ; preds = %91
%102 = add i32 %3, -10
%103 = icmp ult i32 %102, 53
br i1 %103, label %104, label %116
104: ; preds = %101
%105 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0))
%106 = load i32, i32* %0
%107 = sdiv i32 %106, 10
%108 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%109 = trunc i32 %107 to i8
%110 = add i8 %108, %109
store i8 %110, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%111 = load i32, i32* %0
%112 = srem i32 %111, 10
%113 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%114 = trunc i32 %112 to i8
%115 = add i8 %113, %114
store i8 %115, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %124
116: ; preds = %101
%117 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%118 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%119 = sext i8 %118 to i32
%120 = load i32, i32* %0
%121 = add nsw i32 %119, -1
%122 = add i32 %121, %120
%123 = tail call signext i8 @tolower(i32 %122)
store i8 %123, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %124
124: ; preds = %61, %74, %94, %104, %116, %84, %65, %56, %47, %43, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 0)
}