#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'\r':
    strcpy(buf, "<cr>");
    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    $0xfffffff3,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x7d,%eax
ja     136c <wchar_to_spec+0x24c>
mov    -0x18(%rbp),%rax
lea    0xea2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2ed2(%rip),%rdi
lea    0x1087(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2eba(%rip),%rdi
lea    0x1077(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2ea2(%rip),%rdi
lea    0x1064(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e8a(%rip),%rdi
lea    0x1052(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e72(%rip),%rdi
lea    0x1041(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e5a(%rip),%rdi
lea    0x102f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e42(%rip),%rdi
lea    0x101c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e2a(%rip),%rdi
lea    0x100b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2e12(%rip),%rdi
lea    0xffa(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2dfa(%rip),%rdi
lea    0xfea(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2de2(%rip),%rdi
lea    0xfdb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2dca(%rip),%rdi
lea    0xfcb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2db2(%rip),%rdi
lea    0xfbc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2d9a(%rip),%rdi
lea    0xfaf(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
mov    -0x8(%rbp),%rax
cmpl   $0x5b,0x4(%rax)
jne    12f9 <wchar_to_spec+0x1d9>
mov    -0x8(%rbp),%rax
cmpl   $0x5a,0x8(%rax)
jne    12f9 <wchar_to_spec+0x1d9>
lea    0x2d66(%rip),%rdi
lea    0xf5f(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
jmp    17a2 <wchar_to_spec+0x682>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
je     1354 <wchar_to_spec+0x234>
mov    -0x8(%rbp),%rax
cmpl   $0x1b,0x4(%rax)
je     1354 <wchar_to_spec+0x234>
lea    0x2d24(%rip),%rdi
lea    0xf3e(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
sub    $0x61,%ecx
movsbl 0x2d0a(%rip),%eax
add    %ecx,%eax
mov    %al,0x2d02(%rip)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2ce5(%rip),%rdi
lea    0xf05(%rip),%rsi
call   1030 <strcpy@plt>
jmp    17a2 <wchar_to_spec+0x682>
mov    -0x8(%rbp),%rax
cmpl   $0xa,(%rax)
je     1396 <wchar_to_spec+0x276>
mov    -0x8(%rbp),%rax
cmpl   $0x20,(%rax)
jle    13ae <wchar_to_spec+0x28e>
mov    -0x8(%rbp),%rax
cmpl   $0x100,(%rax)
jge    13ae <wchar_to_spec+0x28e>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %al,0x2c9e(%rip)
movb   $0x0,0x2c98(%rip)
jmp    179d <wchar_to_spec+0x67d>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2c25(%rip),%rcx
cmp    (%rcx),%eax
jl     1413 <wchar_to_spec+0x2f3>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2c10(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jge    1413 <wchar_to_spec+0x2f3>
lea    0x2c5c(%rip),%rdi
lea    0xe82(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2be3(%rip),%rax
sub    (%rax),%ecx
movsbl 0x2c3c(%rip),%eax
add    %ecx,%eax
mov    %al,0x2c34(%rip)
jmp    1798 <wchar_to_spec+0x678>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2bc0(%rip),%rcx
mov    (%rcx),%ecx
add    $0xd,%ecx
cmp    %ecx,%eax
jl     1482 <wchar_to_spec+0x362>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ba6(%rip),%rcx
mov    (%rcx),%ecx
add    $0x15,%ecx
cmp    %ecx,%eax
jg     1482 <wchar_to_spec+0x362>
lea    0x2bf2(%rip),%rdi
lea    0xe1d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2b79(%rip),%rax
mov    (%rax),%eax
add    $0xd,%eax
sub    %eax,%ecx
movsbl 0x2bcf(%rip),%eax
add    %ecx,%eax
mov    %al,0x2bc7(%rip)
jmp    1793 <wchar_to_spec+0x673>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b51(%rip),%rcx
mov    (%rcx),%ecx
add    $0x16,%ecx
cmp    %ecx,%eax
jl     14f1 <wchar_to_spec+0x3d1>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2b37(%rip),%rcx
mov    (%rcx),%ecx
add    $0x18,%ecx
cmp    %ecx,%eax
jg     14f1 <wchar_to_spec+0x3d1>
lea    0x2b83(%rip),%rdi
lea    0xdb5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2b0a(%rip),%rax
mov    (%rax),%eax
add    $0x16,%eax
sub    %eax,%ecx
movsbl 0x2b61(%rip),%eax
add    %ecx,%eax
mov    %al,0x2b59(%rip)
jmp    178e <wchar_to_spec+0x66e>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ae2(%rip),%rcx
mov    (%rcx),%ecx
add    $0x19,%ecx
cmp    %ecx,%eax
jl     1560 <wchar_to_spec+0x440>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ac8(%rip),%rcx
mov    (%rcx),%ecx
add    $0x21,%ecx
cmp    %ecx,%eax
jg     1560 <wchar_to_spec+0x440>
lea    0x2b14(%rip),%rdi
lea    0xd4e(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2a9b(%rip),%rax
mov    (%rax),%eax
add    $0x19,%eax
sub    %eax,%ecx
movsbl 0x2af1(%rip),%eax
add    %ecx,%eax
mov    %al,0x2ae9(%rip)
jmp    1789 <wchar_to_spec+0x669>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a73(%rip),%rcx
mov    (%rcx),%ecx
add    $0x22,%ecx
cmp    %ecx,%eax
jl     15cf <wchar_to_spec+0x4af>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a59(%rip),%rcx
mov    (%rcx),%ecx
add    $0x24,%ecx
cmp    %ecx,%eax
jg     15cf <wchar_to_spec+0x4af>
lea    0x2aa5(%rip),%rdi
lea    0xce6(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2a2c(%rip),%rax
mov    (%rax),%eax
add    $0x22,%eax
sub    %eax,%ecx
movsbl 0x2a83(%rip),%eax
add    %ecx,%eax
mov    %al,0x2a7b(%rip)
jmp    1784 <wchar_to_spec+0x664>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2a04(%rip),%rcx
mov    (%rcx),%ecx
add    $0x25,%ecx
cmp    %ecx,%eax
jl     163e <wchar_to_spec+0x51e>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x29ea(%rip),%rcx
mov    (%rcx),%ecx
add    $0x2d,%ecx
cmp    %ecx,%eax
jg     163e <wchar_to_spec+0x51e>
lea    0x2a36(%rip),%rdi
lea    0xc7f(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x29bd(%rip),%rax
mov    (%rax),%eax
add    $0x25,%eax
sub    %eax,%ecx
movsbl 0x2a13(%rip),%eax
add    %ecx,%eax
mov    %al,0x2a0b(%rip)
jmp    177f <wchar_to_spec+0x65f>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2995(%rip),%rcx
mov    (%rcx),%ecx
add    $0x2e,%ecx
cmp    %ecx,%eax
jl     16ad <wchar_to_spec+0x58d>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x297b(%rip),%rcx
mov    (%rcx),%ecx
add    $0x30,%ecx
cmp    %ecx,%eax
jg     16ad <wchar_to_spec+0x58d>
lea    0x29c7(%rip),%rdi
lea    0xc17(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x294e(%rip),%rax
mov    (%rax),%eax
add    $0x2e,%eax
sub    %eax,%ecx
movsbl 0x29a5(%rip),%eax
add    %ecx,%eax
mov    %al,0x299d(%rip)
jmp    177a <wchar_to_spec+0x65a>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2926(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jl     1747 <wchar_to_spec+0x627>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x290c(%rip),%rcx
mov    (%rcx),%ecx
add    $0x3f,%ecx
cmp    %ecx,%eax
jge    1747 <wchar_to_spec+0x627>
lea    0x2958(%rip),%rdi
lea    0xbb0(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x28df(%rip),%rcx
sub    (%rcx),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
movsbl 0x292e(%rip),%eax
add    %ecx,%eax
mov    %al,0x2926(%rip)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x28b7(%rip),%rcx
sub    (%rcx),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movsbl 0x2909(%rip),%eax
add    %edx,%eax
mov    %al,0x2901(%rip)
jmp    1775 <wchar_to_spec+0x655>
lea    0x28f2(%rip),%rdi
lea    0xb50(%rip),%rsi
call   1030 <strcpy@plt>
movsbl 0x28e2(%rip),%edi
mov    -0x8(%rbp),%rax
add    (%rax),%edi
sub    $0x1,%edi
call   1040 <tolower@plt>
mov    %al,0x28ce(%rip)
jmp    177a <wchar_to_spec+0x65a>
jmp    177f <wchar_to_spec+0x65f>
jmp    1784 <wchar_to_spec+0x664>
jmp    1789 <wchar_to_spec+0x669>
jmp    178e <wchar_to_spec+0x66e>
jmp    1793 <wchar_to_spec+0x673>
jmp    1798 <wchar_to_spec+0x678>
jmp    179d <wchar_to_spec+0x67d>
jmp    17a2 <wchar_to_spec+0x682>
lea    0x2897(%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    -0xa(%rax),%ecx
cmp    $0x80,%ecx
ja     12e7 <wchar_to_spec+0x1c7>
mov    %rsi,%rbx
lea    0xeb7(%rip),%rdx
movslq (%rdx,%rcx,4),%rsi
add    %rdx,%rsi
jmp    *%rsi
lea    0x2ee7(%rip),%rdi
lea    0x10b0(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
mov    0x4(%r14),%eax
test   %eax,%eax
je     1304 <wchar_to_spec+0x1e4>
cmp    $0x1b,%eax
je     1304 <wchar_to_spec+0x1e4>
cmp    $0x5b,%eax
jne    1342 <wchar_to_spec+0x222>
cmpl   $0x5a,0x8(%r14)
jne    1342 <wchar_to_spec+0x222>
lea    0x2ea6(%rip),%rdi
lea    0x10ab(%rip),%rsi
call   1030 <strcpy@plt>
addq   $0x2,(%rbx)
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e8a(%rip),%rdi
lea    0x104b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e72(%rip),%rdi
lea    0x1040(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e5a(%rip),%rdi
lea    0x103b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e42(%rip),%rdi
lea    0x1036(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e2a(%rip),%rdi
lea    0x1037(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2e12(%rip),%rdi
lea    0x1028(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2dfa(%rip),%rdi
lea    0xfe7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2de2(%rip),%rdi
lea    0xfb6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2dca(%rip),%rdi
lea    0xfa5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2db2(%rip),%rdi
lea    0xf98(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2d9a(%rip),%rdi
lea    0xf96(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2d82(%rip),%rdi
lea    0xf87(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    0x2d6a(%rip),%rdi
lea    0xf8b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
lea    -0x21(%rax),%edx
cmp    $0xde,%edx
ja     131c <wchar_to_spec+0x1fc>
mov    %al,0x2d48(%rip)
movb   $0x0,0x2d42(%rip)
jmp    147b <wchar_to_spec+0x35b>
lea    0x2d35(%rip),%rdi
lea    0xf61(%rip),%rsi
call   1030 <strcpy@plt>
jmp    147b <wchar_to_spec+0x35b>
cmp    $0x9,%eax
ja     1370 <wchar_to_spec+0x250>
lea    0x2d18(%rip),%rdi
lea    0xf4a(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    %al,0x2d05(%rip)
jmp    147b <wchar_to_spec+0x35b>
lea    0x2cf7(%rip),%rdi
lea    0xf1d(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x4(%r14),%al
add    0x2ce4(%rip),%al
add    $0x9f,%al
mov    %al,0x2cdc(%rip)
addq   $0x1,(%rbx)
jmp    147b <wchar_to_spec+0x35b>
lea    -0xd(%rax),%edx
cmp    $0x8,%edx
ja     13a1 <wchar_to_spec+0x281>
lea    0x2cc1(%rip),%rdi
lea    0xef8(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2cb0(%rip),%al
add    $0xf3,%al
mov    %al,0x2ca8(%rip)
jmp    147b <wchar_to_spec+0x35b>
lea    -0x16(%rax),%edx
cmp    $0x2,%edx
ja     13d2 <wchar_to_spec+0x2b2>
lea    0x2c90(%rip),%rdi
lea    0xece(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2c80(%rip),%al
add    $0xea,%al
mov    %al,0x2c78(%rip)
jmp    147b <wchar_to_spec+0x35b>
add    $0xffffffe7,%eax
lea    0x2c64(%rip),%rdi
cmp    $0x8,%eax
ja     1400 <wchar_to_spec+0x2e0>
lea    0xea5(%rip),%rsi
call   1030 <strcpy@plt>
mov    (%r14),%al
add    0x2c4e(%rip),%al
add    $0xe7,%al
mov    %al,0x2c46(%rip)
jmp    147b <wchar_to_spec+0x35b>
cmp    $0x34,%ecx
ja     1454 <wchar_to_spec+0x334>
lea    0xe88(%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,0x2c14(%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,0x2bf1(%rip)
jmp    147b <wchar_to_spec+0x35b>
lea    0xe3f(%rip),%rsi
call   1030 <strcpy@plt>
movsbl 0x2bdc(%rip),%eax
mov    (%r14),%ecx
lea    (%rax,%rcx,1),%edi
add    $0xffffffff,%edi
call   1040 <tolower@plt>
mov    %al,0x2bc8(%rip)
lea    0x2bbe(%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"<cr>\00"
@.str.2 = [6 x i8] c"<del>\00"
@.str.3 = [7 x i8] c"<home>\00"
@.str.4 = [6 x i8] c"<end>\00"
@.str.5 = [5 x i8] c"<up>\00"
@.str.6 = [7 x i8] c"<down>\00"
@.str.7 = [7 x i8] c"<left>\00"
@.str.8 = [8 x i8] c"<right>\00"
@.str.9 = [9 x i8] c"<delete>\00"
@.str.10 = [8 x i8] c"<s-tab>\00"
@.str.11 = [9 x i8] c"<pageup>\00"
@.str.12 = [11 x i8] c"<pagedown>\00"
@.str.13 = [5 x i8] c"<bs>\00"
@.str.14 = [6 x i8] c"<m-a>\00"
@.str.15 = [6 x i8] c"<esc>\00"
@KEY_F0 = constant i32 0
@.str.16 = [5 x i8] c"<f0>\00"
@.str.17 = [7 x i8] c"<s-f1>\00"
@.str.18 = [8 x i8] c"<s-f10>\00"
@.str.19 = [7 x i8] c"<c-f1>\00"
@.str.20 = [8 x i8] c"<c-f10>\00"
@.str.21 = [7 x i8] c"<a-f1>\00"
@.str.22 = [8 x i8] c"<a-f10>\00"
@.str.23 = [6 x i8] c"<f00>\00"
@.str.24 = [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 %76 [
i32 32, label %8
i32 13, 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
]
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 %301
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 %301
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 ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %301
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 ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %301
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 %301
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 ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %301
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 ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %301
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 ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %301
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 ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %301
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 ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %301
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 %301
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 %301
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 ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
br label %301
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 ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
br label %301
36: ; preds = %2
%37 = load i32*, i32** %3
%38 = getelementptr inbounds i32, i32* %37, i64 1
%39 = load i32, i32* %38
%40 = icmp eq i32 %39, 91
br i1 %40, label %41, label %51
41: ; preds = %36
%42 = load i32*, i32** %3
%43 = getelementptr inbounds i32, i32* %42, i64 2
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 90
br i1 %45, label %46, label %51
46: ; preds = %41
%47 = 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))
%48 = load i64*, i64** %4
%49 = load i64, i64* %48
%50 = add i64 %49, 2
store i64 %50, i64* %48
br label %301
51: ; preds = %41, %36
%52 = load i32*, i32** %3
%53 = getelementptr inbounds i32, i32* %52, i64 1
%54 = load i32, i32* %53
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %74
56: ; preds = %51
%57 = load i32*, i32** %3
%58 = getelementptr inbounds i32, i32* %57, i64 1
%59 = load i32, i32* %58
%60 = icmp ne i32 %59, 27
br i1 %60, label %61, label %74
61: ; preds = %56
%62 = 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.14, i64 0, i64 0))
%63 = load i32*, i32** %3
%64 = getelementptr inbounds i32, i32* %63, i64 1
%65 = load i32, i32* %64
%66 = sub nsw i32 %65, 97
%67 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%68 = sext i8 %67 to i32
%69 = add nsw i32 %68, %66
%70 = trunc i32 %69 to i8
store i8 %70, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%71 = load i64*, i64** %4
%72 = load i64, i64* %71
%73 = add i64 %72, 1
store i64 %73, i64* %71
br label %301
74: ; preds = %56, %51
%75 = 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))
br label %301
76: ; preds = %2
%77 = load i32*, i32** %3
%78 = load i32, i32* %77
%79 = icmp eq i32 %78, 10
br i1 %79, label %88, label %80
80: ; preds = %76
%81 = load i32*, i32** %3
%82 = load i32, i32* %81
%83 = icmp sgt i32 %82, 32
br i1 %83, label %84, label %92
84: ; preds = %80
%85 = load i32*, i32** %3
%86 = load i32, i32* %85
%87 = icmp slt i32 %86, 256
br i1 %87, label %88, label %92
88: ; preds = %84, %76
%89 = load i32*, i32** %3
%90 = load i32, i32* %89
%91 = trunc i32 %90 to i8
store i8 %91, 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 %300
92: ; preds = %84, %80
%93 = load i32*, i32** %3
%94 = load i32, i32* %93
%95 = load i32, i32* @KEY_F0
%96 = icmp sge i32 %94, %95
br i1 %96, label %97, label %113
97: ; preds = %92
%98 = load i32*, i32** %3
%99 = load i32, i32* %98
%100 = load i32, i32* @KEY_F0
%101 = add nsw i32 %100, 10
%102 = icmp slt i32 %99, %101
br i1 %102, label %103, label %113
103: ; preds = %97
%104 = 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.16, i64 0, i64 0))
%105 = load i32*, i32** %3
%106 = load i32, i32* %105
%107 = load i32, i32* @KEY_F0
%108 = sub nsw i32 %106, %107
%109 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%110 = sext i8 %109 to i32
%111 = add nsw i32 %110, %108
%112 = trunc i32 %111 to i8
store i8 %112, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
br label %299
113: ; preds = %97, %92
%114 = load i32*, i32** %3
%115 = load i32, i32* %114
%116 = load i32, i32* @KEY_F0
%117 = add nsw i32 %116, 13
%118 = icmp sge i32 %115, %117
br i1 %118, label %119, label %136
119: ; preds = %113
%120 = load i32*, i32** %3
%121 = load i32, i32* %120
%122 = load i32, i32* @KEY_F0
%123 = add nsw i32 %122, 21
%124 = icmp sle i32 %121, %123
br i1 %124, label %125, label %136
125: ; preds = %119
%126 = 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.17, i64 0, i64 0))
%127 = load i32*, i32** %3
%128 = load i32, i32* %127
%129 = load i32, i32* @KEY_F0
%130 = add nsw i32 %129, 13
%131 = sub nsw i32 %128, %130
%132 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%133 = sext i8 %132 to i32
%134 = add nsw i32 %133, %131
%135 = trunc i32 %134 to i8
store i8 %135, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %298
136: ; preds = %119, %113
%137 = load i32*, i32** %3
%138 = load i32, i32* %137
%139 = load i32, i32* @KEY_F0
%140 = add nsw i32 %139, 22
%141 = icmp sge i32 %138, %140
br i1 %141, label %142, label %159
142: ; preds = %136
%143 = load i32*, i32** %3
%144 = load i32, i32* %143
%145 = load i32, i32* @KEY_F0
%146 = add nsw i32 %145, 24
%147 = icmp sle i32 %144, %146
br i1 %147, label %148, label %159
148: ; preds = %142
%149 = 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.18, i64 0, i64 0))
%150 = load i32*, i32** %3
%151 = load i32, i32* %150
%152 = load i32, i32* @KEY_F0
%153 = add nsw i32 %152, 22
%154 = sub nsw i32 %151, %153
%155 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%156 = sext i8 %155 to i32
%157 = add nsw i32 %156, %154
%158 = trunc i32 %157 to i8
store i8 %158, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %297
159: ; preds = %142, %136
%160 = load i32*, i32** %3
%161 = load i32, i32* %160
%162 = load i32, i32* @KEY_F0
%163 = add nsw i32 %162, 25
%164 = icmp sge i32 %161, %163
br i1 %164, label %165, label %182
165: ; preds = %159
%166 = load i32*, i32** %3
%167 = load i32, i32* %166
%168 = load i32, i32* @KEY_F0
%169 = add nsw i32 %168, 33
%170 = icmp sle i32 %167, %169
br i1 %170, label %171, label %182
171: ; preds = %165
%172 = 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.19, i64 0, i64 0))
%173 = load i32*, i32** %3
%174 = load i32, i32* %173
%175 = load i32, i32* @KEY_F0
%176 = add nsw i32 %175, 25
%177 = sub nsw i32 %174, %176
%178 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%179 = sext i8 %178 to i32
%180 = add nsw i32 %179, %177
%181 = trunc i32 %180 to i8
store i8 %181, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %296
182: ; preds = %165, %159
%183 = load i32*, i32** %3
%184 = load i32, i32* %183
%185 = load i32, i32* @KEY_F0
%186 = add nsw i32 %185, 34
%187 = icmp sge i32 %184, %186
br i1 %187, label %188, label %205
188: ; preds = %182
%189 = load i32*, i32** %3
%190 = load i32, i32* %189
%191 = load i32, i32* @KEY_F0
%192 = add nsw i32 %191, 36
%193 = icmp sle i32 %190, %192
br i1 %193, label %194, label %205
194: ; preds = %188
%195 = 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.20, i64 0, i64 0))
%196 = load i32*, i32** %3
%197 = load i32, i32* %196
%198 = load i32, i32* @KEY_F0
%199 = add nsw i32 %198, 34
%200 = sub nsw i32 %197, %199
%201 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%202 = sext i8 %201 to i32
%203 = add nsw i32 %202, %200
%204 = trunc i32 %203 to i8
store i8 %204, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %295
205: ; preds = %188, %182
%206 = load i32*, i32** %3
%207 = load i32, i32* %206
%208 = load i32, i32* @KEY_F0
%209 = add nsw i32 %208, 37
%210 = icmp sge i32 %207, %209
br i1 %210, label %211, label %228
211: ; preds = %205
%212 = load i32*, i32** %3
%213 = load i32, i32* %212
%214 = load i32, i32* @KEY_F0
%215 = add nsw i32 %214, 45
%216 = icmp sle i32 %213, %215
br i1 %216, label %217, label %228
217: ; preds = %211
%218 = 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.21, i64 0, i64 0))
%219 = load i32*, i32** %3
%220 = load i32, i32* %219
%221 = load i32, i32* @KEY_F0
%222 = add nsw i32 %221, 37
%223 = sub nsw i32 %220, %222
%224 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%225 = sext i8 %224 to i32
%226 = add nsw i32 %225, %223
%227 = trunc i32 %226 to i8
store i8 %227, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %294
228: ; preds = %211, %205
%229 = load i32*, i32** %3
%230 = load i32, i32* %229
%231 = load i32, i32* @KEY_F0
%232 = add nsw i32 %231, 46
%233 = icmp sge i32 %230, %232
br i1 %233, label %234, label %251
234: ; preds = %228
%235 = load i32*, i32** %3
%236 = load i32, i32* %235
%237 = load i32, i32* @KEY_F0
%238 = add nsw i32 %237, 48
%239 = icmp sle i32 %236, %238
br i1 %239, label %240, label %251
240: ; preds = %234
%241 = 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.22, i64 0, i64 0))
%242 = load i32*, i32** %3
%243 = load i32, i32* %242
%244 = load i32, i32* @KEY_F0
%245 = add nsw i32 %244, 46
%246 = sub nsw i32 %243, %245
%247 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%248 = sext i8 %247 to i32
%249 = add nsw i32 %248, %246
%250 = trunc i32 %249 to i8
store i8 %250, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %293
251: ; preds = %234, %228
%252 = load i32*, i32** %3
%253 = load i32, i32* %252
%254 = load i32, i32* @KEY_F0
%255 = add nsw i32 %254, 10
%256 = icmp sge i32 %253, %255
br i1 %256, label %257, label %283
257: ; preds = %251
%258 = load i32*, i32** %3
%259 = load i32, i32* %258
%260 = load i32, i32* @KEY_F0
%261 = add nsw i32 %260, 63
%262 = icmp slt i32 %259, %261
br i1 %262, label %263, label %283
263: ; preds = %257
%264 = 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.23, i64 0, i64 0))
%265 = load i32*, i32** %3
%266 = load i32, i32* %265
%267 = load i32, i32* @KEY_F0
%268 = sub nsw i32 %266, %267
%269 = sdiv i32 %268, 10
%270 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%271 = sext i8 %270 to i32
%272 = add nsw i32 %271, %269
%273 = trunc i32 %272 to i8
store i8 %273, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%274 = load i32*, i32** %3
%275 = load i32, i32* %274
%276 = load i32, i32* @KEY_F0
%277 = sub nsw i32 %275, %276
%278 = srem i32 %277, 10
%279 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%280 = sext i8 %279 to i32
%281 = add nsw i32 %280, %278
%282 = trunc i32 %281 to i8
store i8 %282, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %292
283: ; preds = %257, %251
%284 = 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))
%285 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%286 = sext i8 %285 to i32
%287 = load i32*, i32** %3
%288 = load i32, i32* %287
%289 = add nsw i32 %286, %288
%290 = sub nsw i32 %289, 1
%291 = call signext i8 @tolower(i32 %290)
store i8 %291, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %292
292: ; preds = %283, %263
br label %293
293: ; preds = %292, %240
br label %294
294: ; preds = %293, %217
br label %295
295: ; preds = %294, %194
br label %296
296: ; preds = %295, %171
br label %297
297: ; preds = %296, %148
br label %298
298: ; preds = %297, %125
br label %299
299: ; preds = %298, %103
br label %300
300: ; preds = %299, %88
br label %301
301: ; preds = %300, %74, %61, %46, %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"<cr>\00"
@.str.2 = [6 x i8] c"<del>\00"
@.str.3 = [7 x i8] c"<home>\00"
@.str.4 = [6 x i8] c"<end>\00"
@.str.5 = [5 x i8] c"<up>\00"
@.str.6 = [7 x i8] c"<down>\00"
@.str.7 = [7 x i8] c"<left>\00"
@.str.8 = [8 x i8] c"<right>\00"
@.str.9 = [9 x i8] c"<delete>\00"
@.str.10 = [8 x i8] c"<s-tab>\00"
@.str.11 = [9 x i8] c"<pageup>\00"
@.str.12 = [11 x i8] c"<pagedown>\00"
@.str.13 = [5 x i8] c"<bs>\00"
@.str.14 = [6 x i8] c"<m-a>\00"
@.str.15 = [6 x i8] c"<esc>\00"
@KEY_F0 = constant i32 0
@.str.16 = [5 x i8] c"<f0>\00"
@.str.17 = [7 x i8] c"<s-f1>\00"
@.str.18 = [8 x i8] c"<s-f10>\00"
@.str.19 = [7 x i8] c"<c-f1>\00"
@.str.23 = [6 x i8] c"<f00>\00"
@.str.24 = [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 %54 [
i32 32, label %4
i32 13, label %6
i32 127, label %8
i32 133, label %10
i32 134, label %12
i32 128, label %14
i32 135, label %16
i32 132, label %18
i32 129, label %20
i32 136, label %22
i32 137, label %24
i32 130, label %26
i32 131, label %28
i32 138, label %30
i32 27, label %32
i32 10, label %57
]
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 %120
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 %120
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 ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %120
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 ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %120
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 %120
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 ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %120
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 ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %120
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 ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %120
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 ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %120
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 ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %120
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 %120
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 %120
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 ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
br label %120
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 ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
br label %120
32: ; preds = %2
%33 = getelementptr inbounds i32, i32* %0, i64 1
%34 = load i32, i32* %33
switch i32 %34, label %43 [
i32 91, label %35
i32 0, label %52
i32 27, label %52
]
35: ; preds = %32
%36 = getelementptr inbounds i32, i32* %0, i64 2
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 90
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = 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))
%41 = load i64, i64* %1
%42 = add i64 %41, 2
store i64 %42, i64* %1
br label %120
43: ; preds = %32, %35
%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 ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%45 = load i32, i32* %33
%46 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%47 = trunc i32 %45 to i8
%48 = add i8 %47, -97
%49 = add i8 %48, %46
store i8 %49, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%50 = load i64, i64* %1
%51 = add i64 %50, 1
store i64 %51, i64* %1
br label %120
52: ; preds = %32, %32
%53 = 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))
br label %120
54: ; preds = %2
%55 = add i32 %3, -33
%56 = icmp ult i32 %55, 223
br i1 %56, label %57, label %59
57: ; preds = %54, %2
%58 = trunc i32 %3 to i8
store i8 %58, 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 %120
59: ; preds = %54
%60 = icmp ult i32 %3, 10
br i1 %60, label %61, label %67
61: ; preds = %59
%62 = 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.16, i64 0, i64 0))
%63 = load i32, i32* %0
%64 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%65 = trunc i32 %63 to i8
%66 = add i8 %64, %65
store i8 %66, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
br label %120
67: ; preds = %59
%68 = add i32 %3, -13
%69 = icmp ult i32 %68, 9
br i1 %69, label %70, label %77
70: ; preds = %67
%71 = 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.17, i64 0, i64 0))
%72 = load i32, i32* %0
%73 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%74 = trunc i32 %72 to i8
%75 = add i8 %74, -13
%76 = add i8 %75, %73
store i8 %76, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %120
77: ; preds = %67
%78 = add i32 %3, -22
%79 = icmp ult i32 %78, 3
br i1 %79, label %80, label %87
80: ; preds = %77
%81 = 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.18, i64 0, i64 0))
%82 = load i32, i32* %0
%83 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
%84 = trunc i32 %82 to i8
%85 = add i8 %84, -22
%86 = add i8 %85, %83
store i8 %86, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 5)
br label %120
87: ; preds = %77
%88 = add i32 %3, -25
%89 = icmp ult i32 %88, 9
br i1 %89, label %90, label %97
90: ; preds = %87
%91 = 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.19, i64 0, i64 0))
%92 = load i32, i32* %0
%93 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
%94 = trunc i32 %92 to i8
%95 = add i8 %94, -25
%96 = add i8 %95, %93
store i8 %96, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 4)
br label %120
97: ; preds = %87
%98 = add i32 %3, -10
%99 = icmp ult i32 %98, 53
br i1 %99, label %100, label %112
100: ; preds = %97
%101 = 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.23, i64 0, i64 0))
%102 = load i32, i32* %0
%103 = sdiv i32 %102, 10
%104 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%105 = trunc i32 %103 to i8
%106 = add i8 %104, %105
store i8 %106, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 2)
%107 = load i32, i32* %0
%108 = srem i32 %107, 10
%109 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%110 = trunc i32 %108 to i8
%111 = add i8 %109, %110
store i8 %111, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %120
112: ; preds = %97
%113 = 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))
%114 = load i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
%115 = sext i8 %114 to i32
%116 = load i32, i32* %0
%117 = add nsw i32 %115, -1
%118 = add i32 %117, %116
%119 = tail call signext i8 @tolower(i32 %118)
store i8 %119, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @wchar_to_spec.buf, i64 0, i64 3)
br label %120
120: ; preds = %57, %70, %90, %100, %112, %80, %61, %52, %43, %39, %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)
}