#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 /*<<< orphan*/ WINDOW;

/* Variables and functions */
int ERR;
#define KEY_A1 140
#define KEY_A3 139
#define KEY_B2 138
#define KEY_C1 137
#define KEY_C3 136
#define KEY_DOWN 135
#define KEY_END 134
#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*/ halfdelay(int);
int /*<<< orphan*/ nocbreak();
int /*<<< orphan*/ raw();
int tolower(int);
char toupper(char);
int wgetch(int /*<<< orphan*/ *);
int md_readchar(WINDOW *win) {
  int ch = 0;
  int lastch = 0;
  int mode = 0;
  int mode2 = 0;
  for (;;) {
    ch = wgetch(win);
    if (ch == ERR) {
      mode = 0;
      nocbreak();
      raw();
      ch = 27;
      break;
    }
    if (mode == 3) {
      if (ch == '^')
        ch = (toupper(toupper(lastch)));
      if (ch == '~')
        ch = tolower(lastch);
      if (mode2 == 1)
        ch = (toupper(toupper(ch)));
      break;
    }
    if (mode == 1) {
      if (ch == 27) {
        mode2 = 1;
        continue;
      }
      if ((ch == 'F') || (ch == 'O') || (ch == '[')) {
        mode = 2;
        continue;
      }
      switch (ch) {
      case KEY_LEFT:
        ch = (toupper('H'));
        break;
      case KEY_RIGHT:
        ch = (toupper('L'));
        break;
      case KEY_UP:
        ch = (toupper('K'));
        break;
      case KEY_DOWN:
        ch = (toupper('J'));
        break;
      case KEY_HOME:
        ch = (toupper('Y'));
        break;
      case KEY_PPAGE:
        ch = (toupper('U'));
        break;
      case KEY_NPAGE:
        ch = (toupper('N'));
        break;
      case KEY_END:
        ch = (toupper('B'));
        break;
      default:
        break;
      }
      break;
    }
    if (mode == 2) {
      switch (ch) {
      case '^':
        ch = (toupper('H'));
        break;
      case '$':
        ch = (toupper('L'));
        break;
      case 'H':
        ch = 'y';
        break;
      case 1:
        ch = (toupper('K'));
        break;
      case 2:
        ch = (toupper('J'));
        break;
      case 3:
        ch = (toupper('L'));
        break;
      case 4:
        ch = (toupper('H'));
        break;
      case 263:
        ch = (toupper('Y'));
        break;
      case 19:
        ch = (toupper('U'));
        break;
      case 20:
        ch = (toupper('N'));
        break;
      case 21:
        ch = (toupper('B'));
        break;
      case 'G':
        ch = '.';
        break;
      case '7':
        lastch = 'Y';
        mode = 3;
        break;
      case '5':
        lastch = 'U';
        mode = 3;
        break;
      case '6':
        lastch = 'N';
        mode = 3;
        break;
      case '1':
        lastch = 'y';
        mode = 3;
        break;
      case '4':
        lastch = 'b';
        mode = 3;
        break;
      case 'D':
        ch = (toupper('H'));
        break;
      case 'C':
        ch = (toupper('L'));
        break;
      case 'A':
        ch = (toupper('K'));
        break;
      case 'B':
        ch = (toupper('J'));
        break;
      case 't':
        ch = 'h';
        break;
      case 'v':
        ch = 'l';
        break;
      case 'x':
        ch = 'k';
        break;
      case 'r':
        ch = 'j';
        break;
      case 'w':
        ch = 'y';
        break;
      case 'y':
        ch = 'u';
        break;
      case 's':
        ch = 'n';
        break;
      case 'q':
        ch = 'b';
        break;
      case 'u':
      case 'E':
        ch = '.';
        break;
      }
      if (mode != 2)
        continue;
    }
    if (ch == 27) {
      halfdelay(1);
      mode = 1;
      continue;
    }
    switch (ch) {
    case KEY_LEFT:
      ch = 'h';
      break;
    case KEY_DOWN:
      ch = 'j';
      break;
    case KEY_UP:
      ch = 'k';
      break;
    case KEY_RIGHT:
      ch = 'l';
      break;
    case KEY_HOME:
      ch = 'y';
      break;
    case KEY_PPAGE:
      ch = 'u';
      break;
    case KEY_END:
      ch = 'b';
      break;
    case KEY_NPAGE:
      ch = 'n';
      break;
    case KEY_A1:
      ch = 'y';
      break;
    case KEY_A3:
      ch = 'u';
      break;
    case KEY_C1:
      ch = 'b';
      break;
    case KEY_C3:
      ch = 'n';
      break;
    case KEY_B2:
      ch = '.';
      break;
    case 0x146:
      ch = (toupper('K'));
      break;
    case 0x145:
      ch = (toupper('J'));
      break;
    case 511:
      ch = (toupper('J'));
      break;
    case 512:
      ch = (toupper('J'));
      break;
    case 514:
      ch = (toupper('H'));
      break;
    case 516:
      ch = (toupper('L'));
      break;
    case 518:
      ch = (toupper('K'));
      break;
    case 519:
      ch = (toupper('K'));
      break;
    }
    break;
  }
  nocbreak();
  raw();
  return (ch & 0x7F);
}


x86 assembly (clang, -O0):
<md_readchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <wgetch@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e4a(%rip),%rcx
cmp    (%rcx),%eax
jne    11c7 <md_readchar+0x67>
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1080 <nocbreak@plt>
mov    $0x0,%al
call   1040 <raw@plt>
movl   $0x1b,-0xc(%rbp)
jmp    1899 <md_readchar+0x739>
cmpl   $0x3,-0x14(%rbp)
jne    1231 <md_readchar+0xd1>
cmpl   $0x5e,-0xc(%rbp)
jne    11f4 <md_readchar+0x94>
mov    -0x10(%rbp),%eax
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7e,-0xc(%rbp)
jne    1209 <md_readchar+0xa9>
mov    -0x10(%rbp),%edi
call   1060 <tolower@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    122c <md_readchar+0xcc>
mov    -0xc(%rbp),%eax
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1899 <md_readchar+0x739>
cmpl   $0x1,-0x14(%rbp)
jne    1356 <md_readchar+0x1f6>
cmpl   $0x1b,-0xc(%rbp)
jne    1251 <md_readchar+0xf1>
movl   $0x1,-0x18(%rbp)
jmp    1188 <md_readchar+0x28>
cmpl   $0x46,-0xc(%rbp)
je     126f <md_readchar+0x10f>
cmpl   $0x4f,-0xc(%rbp)
je     126f <md_readchar+0x10f>
cmpl   $0x5b,-0xc(%rbp)
jne    127b <md_readchar+0x11b>
movl   $0x2,-0x14(%rbp)
jmp    1188 <md_readchar+0x28>
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x7,%eax
ja     134c <md_readchar+0x1ec>
mov    -0x20(%rbp),%rax
lea    0x1181(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x48,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x4c,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x59,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x55,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x4e,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
mov    $0x42,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1351 <md_readchar+0x1f1>
jmp    1351 <md_readchar+0x1f1>
jmp    1899 <md_readchar+0x739>
cmpl   $0x2,-0x14(%rbp)
jne    15a3 <md_readchar+0x443>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x106,%eax
ja     158f <md_readchar+0x42f>
mov    -0x28(%rbp),%rax
lea    0xc7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x48,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4c,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x79,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4c,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x48,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x59,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x55,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4e,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x42,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x2e,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x59,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x55,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x4e,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x79,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x62,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x48,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4c,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x68,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x6c,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x6b,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x6a,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x79,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x75,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x6e,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x62,-0xc(%rbp)
jmp    158f <md_readchar+0x42f>
movl   $0x2e,-0xc(%rbp)
cmpl   $0x2,-0x14(%rbp)
je     159e <md_readchar+0x43e>
jmp    1188 <md_readchar+0x28>
jmp    15a3 <md_readchar+0x443>
cmpl   $0x1b,-0xc(%rbp)
jne    15c3 <md_readchar+0x463>
mov    $0x1,%edi
call   1050 <halfdelay@plt>
movl   $0x1,-0x14(%rbp)
jmp    1188 <md_readchar+0x28>
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x80,%eax
je     176d <md_readchar+0x60d>
jmp    15d9 <md_readchar+0x479>
mov    -0x2c(%rbp),%eax
sub    $0x81,%eax
je     1779 <md_readchar+0x619>
jmp    15ec <md_readchar+0x48c>
mov    -0x2c(%rbp),%eax
sub    $0x82,%eax
je     1791 <md_readchar+0x631>
jmp    15ff <md_readchar+0x49f>
mov    -0x2c(%rbp),%eax
sub    $0x83,%eax
je     17a9 <md_readchar+0x649>
jmp    1612 <md_readchar+0x4b2>
mov    -0x2c(%rbp),%eax
sub    $0x84,%eax
je     1755 <md_readchar+0x5f5>
jmp    1625 <md_readchar+0x4c5>
mov    -0x2c(%rbp),%eax
sub    $0x85,%eax
je     1785 <md_readchar+0x625>
jmp    1638 <md_readchar+0x4d8>
mov    -0x2c(%rbp),%eax
sub    $0x86,%eax
je     179d <md_readchar+0x63d>
jmp    164b <md_readchar+0x4eb>
mov    -0x2c(%rbp),%eax
sub    $0x87,%eax
je     1761 <md_readchar+0x601>
jmp    165e <md_readchar+0x4fe>
mov    -0x2c(%rbp),%eax
sub    $0x88,%eax
je     17d9 <md_readchar+0x679>
jmp    1671 <md_readchar+0x511>
mov    -0x2c(%rbp),%eax
sub    $0x89,%eax
je     17cd <md_readchar+0x66d>
jmp    1684 <md_readchar+0x524>
mov    -0x2c(%rbp),%eax
sub    $0x8a,%eax
je     17e5 <md_readchar+0x685>
jmp    1697 <md_readchar+0x537>
mov    -0x2c(%rbp),%eax
sub    $0x8b,%eax
je     17c1 <md_readchar+0x661>
jmp    16aa <md_readchar+0x54a>
mov    -0x2c(%rbp),%eax
sub    $0x8c,%eax
je     17b5 <md_readchar+0x655>
jmp    16bd <md_readchar+0x55d>
mov    -0x2c(%rbp),%eax
sub    $0x145,%eax
je     1806 <md_readchar+0x6a6>
jmp    16d0 <md_readchar+0x570>
mov    -0x2c(%rbp),%eax
sub    $0x146,%eax
je     17f1 <md_readchar+0x691>
jmp    16e3 <md_readchar+0x583>
mov    -0x2c(%rbp),%eax
sub    $0x1ff,%eax
je     181b <md_readchar+0x6bb>
jmp    16f6 <md_readchar+0x596>
mov    -0x2c(%rbp),%eax
sub    $0x200,%eax
je     1830 <md_readchar+0x6d0>
jmp    1709 <md_readchar+0x5a9>
mov    -0x2c(%rbp),%eax
sub    $0x202,%eax
je     1845 <md_readchar+0x6e5>
jmp    171c <md_readchar+0x5bc>
mov    -0x2c(%rbp),%eax
sub    $0x204,%eax
je     185a <md_readchar+0x6fa>
jmp    172f <md_readchar+0x5cf>
mov    -0x2c(%rbp),%eax
sub    $0x206,%eax
je     186f <md_readchar+0x70f>
jmp    1742 <md_readchar+0x5e2>
mov    -0x2c(%rbp),%eax
sub    $0x207,%eax
je     1884 <md_readchar+0x724>
jmp    1894 <md_readchar+0x734>
movl   $0x68,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x6a,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x6b,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x6c,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x79,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x75,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x62,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x6e,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x79,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x75,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x62,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x6e,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
movl   $0x2e,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4a,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x48,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4c,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1894 <md_readchar+0x734>
mov    $0x4b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    1899 <md_readchar+0x739>
mov    $0x0,%al
call   1080 <nocbreak@plt>
mov    $0x0,%al
call   1040 <raw@plt>
mov    -0xc(%rbp),%eax
and    $0x7f,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_readchar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
call   1070 <wgetch@plt>
mov    0x2e6e(%rip),%r12
cmp    (%r12),%eax
jne    1198 <md_readchar+0x38>
xor    %eax,%eax
call   1080 <nocbreak@plt>
xor    %eax,%eax
call   1040 <raw@plt>
mov    $0x1b,%ebp
jmp    1420 <md_readchar+0x2c0>
movl   $0x0,0x4(%rsp)
xor    %ecx,%ecx
movl   $0x0,(%rsp)
xor    %r15d,%r15d
xor    %r14d,%r14d
test   $0x1,%cl
jne    1365 <md_readchar+0x205>
test   $0x1,%r15b
je     11f0 <md_readchar+0x90>
lea    -0x1b(%rax),%ecx
cmp    $0x6c,%ecx
ja     1442 <md_readchar+0x2e2>
mov    $0x1,%r14b
xor    %r15d,%r15d
lea    0x1431(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
mov    %eax,%ebp
jmp    *%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   $0x1,%r14b
je     126c <md_readchar+0x10c>
lea    -0x1(%rax),%r9d
cmp    $0x106,%r9d
ja     126c <md_readchar+0x10c>
mov    $0x6a,%r10d
mov    $0x6b,%esi
mov    $0x6c,%edi
mov    $0x68,%ebx
mov    $0x2e,%ecx
mov    $0x79,%ebp
mov    $0x48,%r8b
lea    0xdd4(%rip),%r11
movslq (%r11,%r9,4),%rdx
add    %r11,%rdx
jmp    *%rdx
mov    $0x4c,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x4b,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x4a,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x55,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x4e,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x42,%r8b
jmp    1260 <md_readchar+0x100>
mov    $0x59,%r8b
cs nopw 0x0(%rax,%rax,1)
movzbl %r8b,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,%ebp
cmp    $0x144,%eax
jg     1340 <md_readchar+0x1e0>
lea    -0x1b(%rbp),%eax
cmp    $0x71,%eax
ja     1420 <md_readchar+0x2c0>
mov    $0x79,%r10d
mov    $0x6c,%esi
mov    $0x6b,%edi
mov    $0x6a,%ebx
mov    $0x68,%ecx
lea    0x1176(%rip),%rdx
movslq (%rdx,%rax,4),%rax
add    %rdx,%rax
jmp    *%rax
mov    $0x1,%edi
call   1050 <halfdelay@plt>
mov    $0x1,%r15b
xor    %r14d,%r14d
mov    %r13,%rdi
call   1070 <wgetch@plt>
xor    %ecx,%ecx
cmp    (%r12),%eax
jne    11af <md_readchar+0x4f>
jmp    1180 <md_readchar+0x20>
mov    %r13,%rdi
call   1070 <wgetch@plt>
mov    $0x1,%r15b
movl   $0x1,0x4(%rsp)
xor    %ecx,%ecx
cmp    (%r12),%eax
jne    11ac <md_readchar+0x4c>
jmp    1180 <md_readchar+0x20>
movl   $0x79,(%rsp)
jmp    1327 <md_readchar+0x1c7>
movl   $0x62,(%rsp)
jmp    1327 <md_readchar+0x1c7>
movl   $0x55,(%rsp)
jmp    1327 <md_readchar+0x1c7>
movl   $0x59,(%rsp)
jmp    1327 <md_readchar+0x1c7>
movl   $0x4e,(%rsp)
mov    %r13,%rdi
call   1070 <wgetch@plt>
mov    $0x1,%cl
cmp    (%r12),%eax
jne    11a9 <md_readchar+0x49>
jmp    1180 <md_readchar+0x20>
lea    -0x1ff(%rbp),%eax
cmp    $0x8,%eax
ja     13a8 <md_readchar+0x248>
lea    0x1292(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x48,%edi
jmp    1418 <md_readchar+0x2b8>
cmp    $0x5e,%eax
jne    137e <md_readchar+0x21e>
movsbl (%rsp),%edi
call   1030 <toupper@plt>
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
mov    %eax,%ebp
cmp    $0x7e,%eax
jne    138f <md_readchar+0x22f>
mov    (%rsp),%edi
call   1060 <tolower@plt>
mov    %eax,%ebp
cmpl   $0x1,0x4(%rsp)
jne    1420 <md_readchar+0x2c0>
movsbl %bpl,%edi
call   1030 <toupper@plt>
movsbl %al,%edi
jmp    1418 <md_readchar+0x2b8>
cmp    $0x145,%ebp
je     13bf <md_readchar+0x25f>
cmp    $0x146,%ebp
jne    1420 <md_readchar+0x2c0>
mov    $0x4b,%edi
jmp    1418 <md_readchar+0x2b8>
mov    $0x4a,%edi
jmp    1418 <md_readchar+0x2b8>
mov    $0x75,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    $0x6e,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    %r10d,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    $0x62,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    $0x4c,%edi
jmp    1418 <md_readchar+0x2b8>
mov    %ecx,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    %edi,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    %esi,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    %ebx,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    $0x2e,%ebp
jmp    1420 <md_readchar+0x2c0>
mov    $0x55,%edi
jmp    1418 <md_readchar+0x2b8>
mov    $0x4e,%edi
jmp    1418 <md_readchar+0x2b8>
mov    $0x59,%edi
jmp    1418 <md_readchar+0x2b8>
mov    $0x42,%edi
call   1030 <toupper@plt>
movzbl %al,%ebp
xor    %eax,%eax
call   1080 <nocbreak@plt>
xor    %eax,%eax
call   1040 <raw@plt>
and    $0x7f,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ebp
jmp    1420 <md_readchar+0x2c0>

LLVM IR (-O0):
@ERR = global i32 0
define i32 @md_readchar(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %160, %155, %60, %50, %1
%8 = load i32*, i32** %2
%9 = call i32 @wgetch(i32* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* @ERR
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %7
store i32 0, i32* %5
%14 = call i32 (...) @nocbreak()
%15 = call i32 (...) @raw()
store i32 27, i32* %3
br label %202
16: ; preds = %7
%17 = load i32, i32* %5
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %44
19: ; preds = %16
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 94
br i1 %21, label %22, label %28
22: ; preds = %19
%23 = load i32, i32* %4
%24 = trunc i32 %23 to i8
%25 = call signext i8 @toupper(i8 signext %24)
%26 = call signext i8 @toupper(i8 signext %25)
%27 = sext i8 %26 to i32
store i32 %27, i32* %3
br label %28
28: ; preds = %22, %19
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 126
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %4
%33 = call i32 @tolower(i32 %32)
store i32 %33, i32* %3
br label %34
34: ; preds = %31, %28
%35 = load i32, i32* %6
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = load i32, i32* %3
%39 = trunc i32 %38 to i8
%40 = call signext i8 @toupper(i8 signext %39)
%41 = call signext i8 @toupper(i8 signext %40)
%42 = sext i8 %41 to i32
store i32 %42, i32* %3
br label %43
43: ; preds = %37, %34
br label %202
44: ; preds = %16
%45 = load i32, i32* %5
%46 = icmp eq i32 %45, 1
br i1 %46, label %47, label %89
47: ; preds = %44
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 27
br i1 %49, label %50, label %51
50: ; preds = %47
store i32 1, i32* %6
br label %7
51: ; preds = %47
%52 = load i32, i32* %3
%53 = icmp eq i32 %52, 70
br i1 %53, label %60, label %54
54: ; preds = %51
%55 = load i32, i32* %3
%56 = icmp eq i32 %55, 79
br i1 %56, label %60, label %57
57: ; preds = %54
%58 = load i32, i32* %3
%59 = icmp eq i32 %58, 91
br i1 %59, label %60, label %61
60: ; preds = %57, %54, %51
store i32 2, i32* %5
br label %7
61: ; preds = %57
%62 = load i32, i32* %3
switch i32 %62, label %87 [
i32 132, label %63
i32 129, label %66
i32 128, label %69
i32 135, label %72
i32 133, label %75
i32 130, label %78
i32 131, label %81
i32 134, label %84
]
63: ; preds = %61
%64 = call signext i8 @toupper(i8 signext 72)
%65 = sext i8 %64 to i32
store i32 %65, i32* %3
br label %88
66: ; preds = %61
%67 = call signext i8 @toupper(i8 signext 76)
%68 = sext i8 %67 to i32
store i32 %68, i32* %3
br label %88
69: ; preds = %61
%70 = call signext i8 @toupper(i8 signext 75)
%71 = sext i8 %70 to i32
store i32 %71, i32* %3
br label %88
72: ; preds = %61
%73 = call signext i8 @toupper(i8 signext 74)
%74 = sext i8 %73 to i32
store i32 %74, i32* %3
br label %88
75: ; preds = %61
%76 = call signext i8 @toupper(i8 signext 89)
%77 = sext i8 %76 to i32
store i32 %77, i32* %3
br label %88
78: ; preds = %61
%79 = call signext i8 @toupper(i8 signext 85)
%80 = sext i8 %79 to i32
store i32 %80, i32* %3
br label %88
81: ; preds = %61
%82 = call signext i8 @toupper(i8 signext 78)
%83 = sext i8 %82 to i32
store i32 %83, i32* %3
br label %88
84: ; preds = %61
%85 = call signext i8 @toupper(i8 signext 66)
%86 = sext i8 %85 to i32
store i32 %86, i32* %3
br label %88
87: ; preds = %61
br label %88
88: ; preds = %87, %84, %81, %78, %75, %72, %69, %66, %63
br label %202
89: ; preds = %44
%90 = load i32, i32* %5
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %157
92: ; preds = %89
%93 = load i32, i32* %3
switch i32 %93, label %152 [
i32 94, label %94
i32 36, label %97
i32 72, label %100
i32 1, label %101
i32 2, label %104
i32 3, label %107
i32 4, label %110
i32 263, label %113
i32 19, label %116
i32 20, label %119
i32 21, label %122
i32 71, label %125
i32 55, label %126
i32 53, label %127
i32 54, label %128
i32 49, label %129
i32 52, label %130
i32 68, label %131
i32 67, label %134
i32 65, label %137
i32 66, label %140
i32 116, label %143
i32 118, label %144
i32 120, label %145
i32 114, label %146
i32 119, label %147
i32 121, label %148
i32 115, label %149
i32 113, label %150
i32 117, label %151
i32 69, label %151
]
94: ; preds = %92
%95 = call signext i8 @toupper(i8 signext 72)
%96 = sext i8 %95 to i32
store i32 %96, i32* %3
br label %152
97: ; preds = %92
%98 = call signext i8 @toupper(i8 signext 76)
%99 = sext i8 %98 to i32
store i32 %99, i32* %3
br label %152
100: ; preds = %92
store i32 121, i32* %3
br label %152
101: ; preds = %92
%102 = call signext i8 @toupper(i8 signext 75)
%103 = sext i8 %102 to i32
store i32 %103, i32* %3
br label %152
104: ; preds = %92
%105 = call signext i8 @toupper(i8 signext 74)
%106 = sext i8 %105 to i32
store i32 %106, i32* %3
br label %152
107: ; preds = %92
%108 = call signext i8 @toupper(i8 signext 76)
%109 = sext i8 %108 to i32
store i32 %109, i32* %3
br label %152
110: ; preds = %92
%111 = call signext i8 @toupper(i8 signext 72)
%112 = sext i8 %111 to i32
store i32 %112, i32* %3
br label %152
113: ; preds = %92
%114 = call signext i8 @toupper(i8 signext 89)
%115 = sext i8 %114 to i32
store i32 %115, i32* %3
br label %152
116: ; preds = %92
%117 = call signext i8 @toupper(i8 signext 85)
%118 = sext i8 %117 to i32
store i32 %118, i32* %3
br label %152
119: ; preds = %92
%120 = call signext i8 @toupper(i8 signext 78)
%121 = sext i8 %120 to i32
store i32 %121, i32* %3
br label %152
122: ; preds = %92
%123 = call signext i8 @toupper(i8 signext 66)
%124 = sext i8 %123 to i32
store i32 %124, i32* %3
br label %152
125: ; preds = %92
store i32 46, i32* %3
br label %152
126: ; preds = %92
store i32 89, i32* %4
store i32 3, i32* %5
br label %152
127: ; preds = %92
store i32 85, i32* %4
store i32 3, i32* %5
br label %152
128: ; preds = %92
store i32 78, i32* %4
store i32 3, i32* %5
br label %152
129: ; preds = %92
store i32 121, i32* %4
store i32 3, i32* %5
br label %152
130: ; preds = %92
store i32 98, i32* %4
store i32 3, i32* %5
br label %152
131: ; preds = %92
%132 = call signext i8 @toupper(i8 signext 72)
%133 = sext i8 %132 to i32
store i32 %133, i32* %3
br label %152
134: ; preds = %92
%135 = call signext i8 @toupper(i8 signext 76)
%136 = sext i8 %135 to i32
store i32 %136, i32* %3
br label %152
137: ; preds = %92
%138 = call signext i8 @toupper(i8 signext 75)
%139 = sext i8 %138 to i32
store i32 %139, i32* %3
br label %152
140: ; preds = %92
%141 = call signext i8 @toupper(i8 signext 74)
%142 = sext i8 %141 to i32
store i32 %142, i32* %3
br label %152
143: ; preds = %92
store i32 104, i32* %3
br label %152
144: ; preds = %92
store i32 108, i32* %3
br label %152
145: ; preds = %92
store i32 107, i32* %3
br label %152
146: ; preds = %92
store i32 106, i32* %3
br label %152
147: ; preds = %92
store i32 121, i32* %3
br label %152
148: ; preds = %92
store i32 117, i32* %3
br label %152
149: ; preds = %92
store i32 110, i32* %3
br label %152
150: ; preds = %92
store i32 98, i32* %3
br label %152
151: ; preds = %92, %92
store i32 46, i32* %3
br label %152
152: ; preds = %92, %151, %150, %149, %148, %147, %146, %145, %144, %143, %140, %137, %134, %131, %130, %129, %128, %127, %126, %125, %122, %119, %116, %113, %110, %107, %104, %101, %100, %97, %94
%153 = load i32, i32* %5
%154 = icmp ne i32 %153, 2
br i1 %154, label %155, label %156
155: ; preds = %152
br label %7
156: ; preds = %152
br label %157
157: ; preds = %156, %89
%158 = load i32, i32* %3
%159 = icmp eq i32 %158, 27
br i1 %159, label %160, label %162
160: ; preds = %157
%161 = call i32 @halfdelay(i32 1)
store i32 1, i32* %5
br label %7
162: ; preds = %157
%163 = load i32, i32* %3
switch i32 %163, label %201 [
i32 132, label %164
i32 135, label %165
i32 128, label %166
i32 129, label %167
i32 133, label %168
i32 130, label %169
i32 134, label %170
i32 131, label %171
i32 140, label %172
i32 139, label %173
i32 137, label %174
i32 136, label %175
i32 138, label %176
i32 326, label %177
i32 325, label %180
i32 511, label %183
i32 512, label %186
i32 514, label %189
i32 516, label %192
i32 518, label %195
i32 519, label %198
]
164: ; preds = %162
store i32 104, i32* %3
br label %201
165: ; preds = %162
store i32 106, i32* %3
br label %201
166: ; preds = %162
store i32 107, i32* %3
br label %201
167: ; preds = %162
store i32 108, i32* %3
br label %201
168: ; preds = %162
store i32 121, i32* %3
br label %201
169: ; preds = %162
store i32 117, i32* %3
br label %201
170: ; preds = %162
store i32 98, i32* %3
br label %201
171: ; preds = %162
store i32 110, i32* %3
br label %201
172: ; preds = %162
store i32 121, i32* %3
br label %201
173: ; preds = %162
store i32 117, i32* %3
br label %201
174: ; preds = %162
store i32 98, i32* %3
br label %201
175: ; preds = %162
store i32 110, i32* %3
br label %201
176: ; preds = %162
store i32 46, i32* %3
br label %201
177: ; preds = %162
%178 = call signext i8 @toupper(i8 signext 75)
%179 = sext i8 %178 to i32
store i32 %179, i32* %3
br label %201
180: ; preds = %162
%181 = call signext i8 @toupper(i8 signext 74)
%182 = sext i8 %181 to i32
store i32 %182, i32* %3
br label %201
183: ; preds = %162
%184 = call signext i8 @toupper(i8 signext 74)
%185 = sext i8 %184 to i32
store i32 %185, i32* %3
br label %201
186: ; preds = %162
%187 = call signext i8 @toupper(i8 signext 74)
%188 = sext i8 %187 to i32
store i32 %188, i32* %3
br label %201
189: ; preds = %162
%190 = call signext i8 @toupper(i8 signext 72)
%191 = sext i8 %190 to i32
store i32 %191, i32* %3
br label %201
192: ; preds = %162
%193 = call signext i8 @toupper(i8 signext 76)
%194 = sext i8 %193 to i32
store i32 %194, i32* %3
br label %201
195: ; preds = %162
%196 = call signext i8 @toupper(i8 signext 75)
%197 = sext i8 %196 to i32
store i32 %197, i32* %3
br label %201
198: ; preds = %162
%199 = call signext i8 @toupper(i8 signext 75)
%200 = sext i8 %199 to i32
store i32 %200, i32* %3
br label %201
201: ; preds = %162, %198, %195, %192, %189, %186, %183, %180, %177, %176, %175, %174, %173, %172, %171, %170, %169, %168, %167, %166, %165, %164
br label %202
202: ; preds = %201, %88, %43, %13
%203 = call i32 (...) @nocbreak()
%204 = call i32 (...) @raw()
%205 = load i32, i32* %3
%206 = and i32 %205, 127
ret i32 %206
}

LLVM IR (-O2):
@ERR = global i32 0
define i32 @md_readchar(i32* %0) {
%2 = tail call i32 @wgetch(i32* %0)
%3 = load i32, i32* @ERR
%4 = icmp eq i32 %2, %3
br i1 %4, label %19, label %5
5: ; preds = %1, %99
%6 = phi i32 [ %101, %99 ], [ %2, %1 ]
%7 = phi i32 [ %16, %99 ], [ 0, %1 ]
%8 = phi i1 [ true, %99 ], [ false, %1 ]
%9 = phi i32 [ %100, %99 ], [ 0, %1 ]
br label %14
10: ; preds = %48
%11 = tail call i32 @wgetch(i32* %0)
%12 = load i32, i32* @ERR
%13 = icmp eq i32 %11, %12
br i1 %13, label %19, label %14
14: ; preds = %5, %10
%15 = phi i32 [ %6, %5 ], [ %11, %10 ]
%16 = phi i32 [ %7, %5 ], [ 1, %10 ]
%17 = phi i1 [ false, %5 ], [ true, %10 ]
%18 = phi i1 [ %8, %5 ], [ false, %10 ]
br label %22
19: ; preds = %99, %10, %49, %1
%20 = tail call i32 (...) @nocbreak()
%21 = tail call i32 (...) @raw()
br label %153
22: ; preds = %14, %49
%23 = phi i32 [ %15, %14 ], [ %52, %49 ]
%24 = phi i1 [ false, %14 ], [ %51, %49 ]
%25 = phi i1 [ %17, %14 ], [ %50, %49 ]
%26 = phi i1 [ %18, %14 ], [ false, %49 ]
br i1 %26, label %27, label %47
27: ; preds = %22
%28 = icmp eq i32 %23, 94
br i1 %28, label %29, label %34
29: ; preds = %27
%30 = trunc i32 %9 to i8
%31 = tail call signext i8 @toupper(i8 signext %30)
%32 = tail call signext i8 @toupper(i8 signext %31)
%33 = sext i8 %32 to i32
br label %34
34: ; preds = %29, %27
%35 = phi i32 [ %33, %29 ], [ %23, %27 ]
%36 = icmp eq i32 %35, 126
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = tail call i32 @tolower(i32 %9)
br label %39
39: ; preds = %37, %34
%40 = phi i32 [ %38, %37 ], [ %35, %34 ]
%41 = icmp eq i32 %16, 1
br i1 %41, label %42, label %153
42: ; preds = %39
%43 = trunc i32 %40 to i8
%44 = tail call signext i8 @toupper(i8 signext %43)
%45 = tail call signext i8 @toupper(i8 signext %44)
%46 = zext i8 %45 to i32
br label %153
47: ; preds = %22
br i1 %25, label %48, label %79
48: ; preds = %47
switch i32 %23, label %143 [
i32 27, label %10
i32 91, label %49
i32 79, label %49
i32 70, label %49
i32 132, label %55
i32 129, label %58
i32 128, label %61
i32 135, label %64
i32 133, label %67
i32 130, label %70
i32 131, label %73
i32 134, label %76
]
49: ; preds = %48, %48, %48, %110
%50 = phi i1 [ true, %110 ], [ false, %48 ], [ false, %48 ], [ false, %48 ]
%51 = phi i1 [ false, %110 ], [ true, %48 ], [ true, %48 ], [ true, %48 ]
%52 = tail call i32 @wgetch(i32* %0)
%53 = load i32, i32* @ERR
%54 = icmp eq i32 %52, %53
br i1 %54, label %19, label %22
55: ; preds = %48
%56 = tail call signext i8 @toupper(i8 signext 72)
%57 = zext i8 %56 to i32
br label %153
58: ; preds = %48
%59 = tail call signext i8 @toupper(i8 signext 76)
%60 = zext i8 %59 to i32
br label %153
61: ; preds = %48
%62 = tail call signext i8 @toupper(i8 signext 75)
%63 = zext i8 %62 to i32
br label %153
64: ; preds = %48
%65 = tail call signext i8 @toupper(i8 signext 74)
%66 = zext i8 %65 to i32
br label %153
67: ; preds = %48
%68 = tail call signext i8 @toupper(i8 signext 89)
%69 = zext i8 %68 to i32
br label %153
70: ; preds = %48
%71 = tail call signext i8 @toupper(i8 signext 85)
%72 = zext i8 %71 to i32
br label %153
73: ; preds = %48
%74 = tail call signext i8 @toupper(i8 signext 78)
%75 = zext i8 %74 to i32
br label %153
76: ; preds = %48
%77 = tail call signext i8 @toupper(i8 signext 66)
%78 = zext i8 %77 to i32
br label %153
79: ; preds = %47
br i1 %24, label %80, label %108
80: ; preds = %79
switch i32 %23, label %108 [
i32 94, label %104
i32 36, label %81
i32 72, label %143
i32 1, label %82
i32 2, label %83
i32 3, label %84
i32 4, label %104
i32 263, label %85
i32 19, label %86
i32 20, label %87
i32 21, label %88
i32 71, label %145
i32 55, label %99
i32 53, label %95
i32 54, label %96
i32 49, label %97
i32 52, label %98
i32 68, label %104
i32 67, label %89
i32 65, label %90
i32 66, label %91
i32 116, label %147
i32 118, label %149
i32 120, label %151
i32 114, label %153
i32 119, label %143
i32 121, label %92
i32 115, label %93
i32 113, label %94
i32 117, label %145
i32 69, label %145
]
81: ; preds = %80
br label %104
82: ; preds = %80
br label %104
83: ; preds = %80
br label %104
84: ; preds = %80
br label %104
85: ; preds = %80
br label %104
86: ; preds = %80
br label %104
87: ; preds = %80
br label %104
88: ; preds = %80
br label %104
89: ; preds = %80
br label %104
90: ; preds = %80
br label %104
91: ; preds = %80
br label %104
92: ; preds = %80
br label %153
93: ; preds = %80
br label %153
94: ; preds = %80
br label %153
95: ; preds = %80
br label %99
96: ; preds = %80
br label %99
97: ; preds = %80
br label %99
98: ; preds = %80
br label %99
99: ; preds = %80, %98, %97, %96, %95
%100 = phi i32 [ 85, %95 ], [ 78, %96 ], [ 121, %97 ], [ 98, %98 ], [ 89, %80 ]
%101 = tail call i32 @wgetch(i32* %0)
%102 = load i32, i32* @ERR
%103 = icmp eq i32 %101, %102
br i1 %103, label %19, label %5
104: ; preds = %80, %80, %80, %91, %90, %89, %88, %87, %86, %85, %84, %83, %82, %81
%105 = phi i8 [ 76, %81 ], [ 75, %82 ], [ 74, %83 ], [ 76, %84 ], [ 89, %85 ], [ 85, %86 ], [ 78, %87 ], [ 66, %88 ], [ 76, %89 ], [ 75, %90 ], [ 74, %91 ], [ 72, %80 ], [ 72, %80 ], [ 72, %80 ]
%106 = tail call signext i8 @toupper(i8 signext %105)
%107 = sext i8 %106 to i32
br label %108
108: ; preds = %104, %80, %79
%109 = phi i32 [ %23, %79 ], [ %23, %80 ], [ %107, %104 ]
switch i32 %109, label %143 [
i32 27, label %110
i32 132, label %145
i32 135, label %147
i32 128, label %149
i32 129, label %151
i32 133, label %153
i32 130, label %112
i32 134, label %113
i32 131, label %114
i32 140, label %153
i32 139, label %115
i32 137, label %116
i32 136, label %117
i32 138, label %118
i32 326, label %119
i32 325, label %122
i32 511, label %125
i32 512, label %128
i32 514, label %131
i32 516, label %134
i32 518, label %137
i32 519, label %140
]
110: ; preds = %108
%111 = tail call i32 @halfdelay(i32 1)
br label %49
112: ; preds = %108
br label %153
113: ; preds = %108
br label %153
114: ; preds = %108
br label %153
115: ; preds = %108
br label %153
116: ; preds = %108
br label %153
117: ; preds = %108
br label %153
118: ; preds = %108
br label %153
119: ; preds = %108
%120 = tail call signext i8 @toupper(i8 signext 75)
%121 = zext i8 %120 to i32
br label %153
122: ; preds = %108
%123 = tail call signext i8 @toupper(i8 signext 74)
%124 = zext i8 %123 to i32
br label %153
125: ; preds = %108
%126 = tail call signext i8 @toupper(i8 signext 74)
%127 = zext i8 %126 to i32
br label %153
128: ; preds = %108
%129 = tail call signext i8 @toupper(i8 signext 74)
%130 = zext i8 %129 to i32
br label %153
131: ; preds = %108
%132 = tail call signext i8 @toupper(i8 signext 72)
%133 = zext i8 %132 to i32
br label %153
134: ; preds = %108
%135 = tail call signext i8 @toupper(i8 signext 76)
%136 = zext i8 %135 to i32
br label %153
137: ; preds = %108
%138 = tail call signext i8 @toupper(i8 signext 75)
%139 = zext i8 %138 to i32
br label %153
140: ; preds = %108
%141 = tail call signext i8 @toupper(i8 signext 75)
%142 = zext i8 %141 to i32
br label %153
143: ; preds = %108, %48, %80, %80
%144 = phi i32 [ 121, %80 ], [ 121, %80 ], [ %23, %48 ], [ %109, %108 ]
br label %153
145: ; preds = %80, %80, %80, %108
%146 = phi i32 [ 104, %108 ], [ 46, %80 ], [ 46, %80 ], [ 46, %80 ]
br label %153
147: ; preds = %80, %108
%148 = phi i32 [ 106, %108 ], [ 104, %80 ]
br label %153
149: ; preds = %80, %108
%150 = phi i32 [ 107, %108 ], [ 108, %80 ]
br label %153
151: ; preds = %80, %108
%152 = phi i32 [ 108, %108 ], [ 107, %80 ]
br label %153
153: ; preds = %108, %108, %80, %151, %149, %147, %145, %143, %94, %93, %92, %112, %113, %114, %115, %116, %117, %118, %119, %122, %125, %128, %131, %134, %137, %140, %55, %58, %61, %64, %67, %70, %73, %76, %39, %42, %19
%154 = phi i32 [ 27, %19 ], [ %46, %42 ], [ %40, %39 ], [ %78, %76 ], [ %75, %73 ], [ %72, %70 ], [ %69, %67 ], [ %66, %64 ], [ %63, %61 ], [ %60, %58 ], [ %57, %55 ], [ %142, %140 ], [ %139, %137 ], [ %136, %134 ], [ %133, %131 ], [ %130, %128 ], [ %127, %125 ], [ %124, %122 ], [ %121, %119 ], [ 46, %118 ], [ 110, %117 ], [ 98, %116 ], [ 117, %115 ], [ 110, %114 ], [ 98, %113 ], [ 117, %112 ], [ 98, %94 ], [ 110, %93 ], [ 117, %92 ], [ %144, %143 ], [ %146, %145 ], [ %148, %147 ], [ %150, %149 ], [ %152, %151 ], [ 106, %80 ], [ 121, %108 ], [ 121, %108 ]
%155 = tail call i32 (...) @nocbreak()
%156 = tail call i32 (...) @raw()
%157 = and i32 %154, 127
ret i32 %157
}