unsigned char unicode_to_cp866(unsigned short val) {
  static char tab0[256] = {
      0,    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
      0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
      0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
      0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
      0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
      0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
      0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
      0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
      0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
      0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
      0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0xff, 0,    0,    0,    0xfd, 0,    0,    0,
      0,    0,    0,    0,    '^',  0,    0,    0,    0xf8, 0,    0,    0,
      0,    0,    0,    0xfa, 0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    'x',
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,
  };
  switch (val >> 8) {
  case 0x00:
    return tab0[val];
  case 0x04:
    switch ((unsigned char)val) {
    case 0x01:
      return 0xf0;
    case 0x04:
      return 0xf2;
    case 0x07:
      return 0xf4;
    case 0x0e:
      return 0xf6;
    case 0x10:
      return 0x80;
    case 0x11:
      return 0x81;
    case 0x12:
      return 0x82;
    case 0x13:
      return 0x83;
    case 0x14:
      return 0x84;
    case 0x15:
      return 0x85;
    case 0x16:
      return 0x86;
    case 0x17:
      return 0x87;
    case 0x18:
      return 0x88;
    case 0x19:
      return 0x89;
    case 0x1a:
      return 0x8a;
    case 0x1b:
      return 0x8b;
    case 0x1c:
      return 0x8c;
    case 0x1d:
      return 0x8d;
    case 0x1e:
      return 0x8e;
    case 0x1f:
      return 0x8f;
    case 0x20:
      return 0x90;
    case 0x21:
      return 0x91;
    case 0x22:
      return 0x92;
    case 0x23:
      return 0x93;
    case 0x24:
      return 0x94;
    case 0x25:
      return 0x95;
    case 0x26:
      return 0x96;
    case 0x27:
      return 0x97;
    case 0x28:
      return 0x98;
    case 0x29:
      return 0x99;
    case 0x2a:
      return 0x9a;
    case 0x2b:
      return 0x9b;
    case 0x2c:
      return 0x9c;
    case 0x2d:
      return 0x9d;
    case 0x2e:
      return 0x9e;
    case 0x2f:
      return 0x9f;
    case 0x30:
      return 0xa0;
    case 0x31:
      return 0xa1;
    case 0x32:
      return 0xa2;
    case 0x33:
      return 0xa3;
    case 0x34:
      return 0xa4;
    case 0x35:
      return 0xa5;
    case 0x36:
      return 0xa6;
    case 0x37:
      return 0xa7;
    case 0x38:
      return 0xa8;
    case 0x39:
      return 0xa9;
    case 0x3a:
      return 0xaa;
    case 0x3b:
      return 0xab;
    case 0x3c:
      return 0xac;
    case 0x3d:
      return 0xad;
    case 0x3e:
      return 0xae;
    case 0x3f:
      return 0xaf;
    case 0x40:
      return 0xe0;
    case 0x41:
      return 0xe1;
    case 0x42:
      return 0xe2;
    case 0x43:
      return 0xe3;
    case 0x44:
      return 0xe4;
    case 0x45:
      return 0xe5;
    case 0x46:
      return 0xe6;
    case 0x47:
      return 0xe7;
    case 0x48:
      return 0xe8;
    case 0x49:
      return 0xe9;
    case 0x4a:
      return 0xea;
    case 0x4b:
      return 0xeb;
    case 0x4c:
      return 0xec;
    case 0x4d:
      return 0xed;
    case 0x4e:
      return 0xee;
    case 0x4f:
      return 0xef;
    case 0x51:
      return 0xf1;
    case 0x54:
      return 0xf3;
    case 0x57:
      return 0xf5;
    case 0x5e:
      return 0xf7;
    }
    break;
  case 0x20:
    switch ((unsigned char)val) {
    case 0x15:
      return '-';
    case 0x18:
      return '`';
    case 0x19:
      return '\'';
    case 0x28:
      return 0x0a;
    case 0x32:
      return '\'';
    }
    break;
  case 0x21:
    switch ((unsigned char)val) {
    case 0x16:
      return 0xfc;
    case 0x2f:
      return 'e';
    case 0x91:
      return '@';
    }
    break;
  case 0x22:
    switch ((unsigned char)val) {
    case 0x19:
      return 0xf9;
    case 0x1a:
      return 0xfb;
    case 0x27:
      return '^';
    case 0x28:
      return 'v';
    case 0x60:
      return '#';
    }
    break;
  case 0x25:
    switch ((unsigned char)val) {
    case 0x00:
      return 0xc4;
    case 0x02:
      return 0xb3;
    case 0x0c:
      return 0xda;
    case 0x10:
      return 0xbf;
    case 0x14:
      return 0xc0;
    case 0x18:
      return 0xd9;
    case 0x1c:
      return 0xc3;
    case 0x24:
      return 0xb4;
    case 0x2c:
      return 0xc2;
    case 0x34:
      return 0xc1;
    case 0x3c:
      return 0xc5;
    case 0x50:
      return 0xcd;
    case 0x51:
      return 0xba;
    case 0x52:
      return 0xd5;
    case 0x53:
      return 0xd6;
    case 0x54:
      return 0xc9;
    case 0x55:
      return 0xb8;
    case 0x56:
      return 0xb7;
    case 0x57:
      return 0xbb;
    case 0x58:
      return 0xd4;
    case 0x59:
      return 0xd3;
    case 0x5a:
      return 0xc8;
    case 0x5b:
      return 0xbe;
    case 0x5c:
      return 0xbd;
    case 0x5d:
      return 0xbc;
    case 0x5e:
      return 0xc6;
    case 0x5f:
      return 0xc7;
    case 0x60:
      return 0xcc;
    case 0x61:
      return 0xb5;
    case 0x62:
      return 0xb6;
    case 0x63:
      return 0xb9;
    case 0x64:
      return 0xd1;
    case 0x65:
      return 0xd2;
    case 0x66:
      return 0xcb;
    case 0x67:
      return 0xcf;
    case 0x68:
      return 0xd0;
    case 0x69:
      return 0xca;
    case 0x6a:
      return 0xd8;
    case 0x6b:
      return 0xd7;
    case 0x6c:
      return 0xce;
    case 0x80:
      return 0xdf;
    case 0x84:
      return 0xdc;
    case 0x88:
      return 0xdb;
    case 0x8c:
      return 0xdd;
    case 0x90:
      return 0xde;
    case 0x91:
      return 0xb0;
    case 0x92:
      return 0xb1;
    case 0x93:
      return 0xb2;
    case 0xa0:
      return 0xfe;
    case 0xca:
      return '$';
    }
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<unicode_to_cp866>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x25,%eax
ja     1733 <unicode_to_cp866+0x633>
mov    -0x10(%rbp),%rax
lea    0xed4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzwl -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0x2eee(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movzbl -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x5d,%eax
ja     13ff <unicode_to_cp866+0x2ff>
mov    -0x18(%rbp),%rax
lea    0x12ce(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0xf0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x80,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x81,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x82,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x83,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x84,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x85,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x86,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x87,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x88,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x89,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8a,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8b,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8c,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8d,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8e,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x8f,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x90,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x91,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x92,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x93,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x94,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x95,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x96,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x97,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x98,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x99,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9a,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9b,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9c,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9d,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9e,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x9f,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa8,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xaa,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xab,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xac,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xad,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xae,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xaf,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe8,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xe9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xea,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xeb,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xec,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xed,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xee,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xef,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xf7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
jmp    1733 <unicode_to_cp866+0x633>
movzbl -0x4(%rbp),%eax
add    $0xffffffeb,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x1d,%eax
ja     145b <unicode_to_cp866+0x35b>
mov    -0x20(%rbp),%rax
lea    0xf9f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2d,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x60,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x27,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xa,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x27,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
jmp    1733 <unicode_to_cp866+0x633>
movzbl -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
sub    $0x16,%eax
je     1499 <unicode_to_cp866+0x399>
jmp    1475 <unicode_to_cp866+0x375>
mov    -0x24(%rbp),%eax
sub    $0x2f,%eax
je     14a2 <unicode_to_cp866+0x3a2>
jmp    1486 <unicode_to_cp866+0x386>
mov    -0x24(%rbp),%eax
sub    $0x91,%eax
je     14ab <unicode_to_cp866+0x3ab>
jmp    14b4 <unicode_to_cp866+0x3b4>
movb   $0xfc,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x65,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x40,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
jmp    1733 <unicode_to_cp866+0x633>
movzbl -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0x19,%eax
je     1512 <unicode_to_cp866+0x412>
jmp    14ce <unicode_to_cp866+0x3ce>
mov    -0x28(%rbp),%eax
sub    $0x1a,%eax
je     151b <unicode_to_cp866+0x41b>
jmp    14df <unicode_to_cp866+0x3df>
mov    -0x28(%rbp),%eax
sub    $0x27,%eax
je     1524 <unicode_to_cp866+0x424>
jmp    14f0 <unicode_to_cp866+0x3f0>
mov    -0x28(%rbp),%eax
sub    $0x28,%eax
je     152d <unicode_to_cp866+0x42d>
jmp    1501 <unicode_to_cp866+0x401>
mov    -0x28(%rbp),%eax
sub    $0x60,%eax
je     1536 <unicode_to_cp866+0x436>
jmp    153f <unicode_to_cp866+0x43f>
movb   $0xf9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xfb,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x5e,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x76,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x23,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
jmp    1733 <unicode_to_cp866+0x633>
movzbl -0x4(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0xca,%rax
ja     172e <unicode_to_cp866+0x62e>
mov    -0x30(%rbp),%rax
lea    0xb35(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0xc4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xda,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xbf,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xcd,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xba,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb8,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xbb,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd4,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd3,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc8,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xbe,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xbd,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xbc,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xc7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xcc,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb5,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb6,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb9,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xcb,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xcf,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xca,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd8,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xd7,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xce,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xdf,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xdc,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xdb,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xdd,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xde,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb0,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb1,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xb2,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0xfe,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
movb   $0x24,-0x1(%rbp)
jmp    1737 <unicode_to_cp866+0x637>
jmp    1733 <unicode_to_cp866+0x633>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_to_cp866>:
mov    %edi,%eax
shr    $0x8,%eax
cmp    $0x25,%al
ja     11d4 <unicode_to_cp866+0xd4>
lea    0xeec(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzwl %di,%eax
lea    0x13e9(%rip),%rcx
jmp    1142 <unicode_to_cp866+0x42>
add    $0xff,%dil
cmp    $0x5e,%dil
jae    11d4 <unicode_to_cp866+0xd4>
movsbq %dil,%rax
lea    0x14ce(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret
add    $0xeb,%dil
cmp    $0x1d,%dil
ja     11d4 <unicode_to_cp866+0xd4>
mov    $0x2d,%al
movzbl %dil,%ecx
lea    0x132b(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x27,%al
ret
cmp    $0x91,%dil
je     11c5 <unicode_to_cp866+0xc5>
cmp    $0x16,%dil
je     11c8 <unicode_to_cp866+0xc8>
cmp    $0x2f,%dil
jne    11d4 <unicode_to_cp866+0xd4>
mov    $0x65,%al
ret
lea    -0x19(%rdi),%ecx
cmp    $0xf,%cl
ja     11cb <unicode_to_cp866+0xcb>
mov    $0xf9,%al
movzbl %cl,%ecx
lea    0x12b6(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0xfb,%al
ret
add    $0x80,%dil
cmp    $0xec,%dil
ja     11d4 <unicode_to_cp866+0xd4>
mov    $0xc4,%al
movzbl %dil,%ecx
lea    0xedf(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0xdf,%al
ret
mov    $0x40,%al
ret
mov    $0xfc,%al
ret
cmp    $0x60,%dil
jne    11d4 <unicode_to_cp866+0xd4>
mov    $0x23,%al
ret
xor    %eax,%eax
ret
mov    $0x5e,%al
ret
mov    $0x76,%al
ret
mov    $0x60,%al
ret
mov    $0xa,%al
ret
mov    $0xdc,%al
ret
mov    $0xdb,%al
ret
mov    $0xdd,%al
ret
mov    $0xde,%al
ret
mov    $0xb0,%al
ret
mov    $0xb1,%al
ret
mov    $0xb2,%al
ret
mov    $0xfe,%al
ret
mov    $0x24,%al
ret
mov    $0xb3,%al
ret
mov    $0xda,%al
ret
mov    $0xbf,%al
ret
mov    $0xc0,%al
ret
mov    $0xd9,%al
ret
mov    $0xc3,%al
ret
mov    $0xb4,%al
ret
mov    $0xc2,%al
ret
mov    $0xc1,%al
ret
mov    $0xc5,%al
ret
mov    $0xcd,%al
ret
mov    $0xba,%al
ret
mov    $0xd5,%al
ret
mov    $0xd6,%al
ret
mov    $0xc9,%al
ret
mov    $0xb8,%al
ret
mov    $0xb7,%al
ret
mov    $0xbb,%al
ret
mov    $0xd4,%al
ret
mov    $0xd3,%al
ret
mov    $0xc8,%al
ret
mov    $0xbe,%al
ret
mov    $0xbd,%al
ret
mov    $0xbc,%al
ret
mov    $0xc6,%al
ret
mov    $0xc7,%al
ret
mov    $0xcc,%al
ret
mov    $0xb5,%al
ret
mov    $0xb6,%al
ret
mov    $0xb9,%al
ret
mov    $0xd1,%al
ret
mov    $0xd2,%al
ret
mov    $0xcb,%al
ret
mov    $0xcf,%al
ret
mov    $0xd0,%al
ret
mov    $0xca,%al
ret
mov    $0xd8,%al
ret
mov    $0xd7,%al
ret
mov    $0xce,%al
ret

LLVM IR (-O0):
@unicode_to_cp866.tab0 = internal global <{ [216 x i8], [40 x i8] }> <{ [216 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\7F\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\FF\00\00\00\FD\00\00\00\00\00\00\00^\00\00\00\F8\00\00\00\00\00\00\FA\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00x", [40 x i8] zeroinitializer }>
define zeroext i8 @unicode_to_cp866(i16 zeroext %0) {
%2 = alloca i8
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = ashr i32 %5, 8
switch i32 %6, label %172 [
i32 0, label %7
i32 4, label %12
i32 32, label %89
i32 33, label %99
i32 34, label %107
i32 37, label %117
]
7: ; preds = %1
%8 = load i16, i16* %3
%9 = zext i16 %8 to i64
%10 = getelementptr inbounds [256 x i8], [256 x i8]* bitcast (<{ [216 x i8], [40 x i8] }>* @unicode_to_cp866.tab0 to [256 x i8]*), i64 0, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %2
br label %173
12: ; preds = %1
%13 = load i16, i16* %3
%14 = trunc i16 %13 to i8
%15 = zext i8 %14 to i32
switch i32 %15, label %88 [
i32 1, label %16
i32 4, label %17
i32 7, label %18
i32 14, label %19
i32 16, label %20
i32 17, label %21
i32 18, label %22
i32 19, label %23
i32 20, label %24
i32 21, label %25
i32 22, label %26
i32 23, label %27
i32 24, label %28
i32 25, label %29
i32 26, label %30
i32 27, label %31
i32 28, label %32
i32 29, label %33
i32 30, label %34
i32 31, label %35
i32 32, label %36
i32 33, label %37
i32 34, label %38
i32 35, label %39
i32 36, label %40
i32 37, label %41
i32 38, label %42
i32 39, label %43
i32 40, label %44
i32 41, label %45
i32 42, label %46
i32 43, label %47
i32 44, label %48
i32 45, label %49
i32 46, label %50
i32 47, label %51
i32 48, label %52
i32 49, label %53
i32 50, label %54
i32 51, label %55
i32 52, label %56
i32 53, label %57
i32 54, label %58
i32 55, label %59
i32 56, label %60
i32 57, label %61
i32 58, label %62
i32 59, label %63
i32 60, label %64
i32 61, label %65
i32 62, label %66
i32 63, label %67
i32 64, label %68
i32 65, label %69
i32 66, label %70
i32 67, label %71
i32 68, label %72
i32 69, label %73
i32 70, label %74
i32 71, label %75
i32 72, label %76
i32 73, label %77
i32 74, label %78
i32 75, label %79
i32 76, label %80
i32 77, label %81
i32 78, label %82
i32 79, label %83
i32 81, label %84
i32 84, label %85
i32 87, label %86
i32 94, label %87
]
16: ; preds = %12
store i8 -16, i8* %2
br label %173
17: ; preds = %12
store i8 -14, i8* %2
br label %173
18: ; preds = %12
store i8 -12, i8* %2
br label %173
19: ; preds = %12
store i8 -10, i8* %2
br label %173
20: ; preds = %12
store i8 -128, i8* %2
br label %173
21: ; preds = %12
store i8 -127, i8* %2
br label %173
22: ; preds = %12
store i8 -126, i8* %2
br label %173
23: ; preds = %12
store i8 -125, i8* %2
br label %173
24: ; preds = %12
store i8 -124, i8* %2
br label %173
25: ; preds = %12
store i8 -123, i8* %2
br label %173
26: ; preds = %12
store i8 -122, i8* %2
br label %173
27: ; preds = %12
store i8 -121, i8* %2
br label %173
28: ; preds = %12
store i8 -120, i8* %2
br label %173
29: ; preds = %12
store i8 -119, i8* %2
br label %173
30: ; preds = %12
store i8 -118, i8* %2
br label %173
31: ; preds = %12
store i8 -117, i8* %2
br label %173
32: ; preds = %12
store i8 -116, i8* %2
br label %173
33: ; preds = %12
store i8 -115, i8* %2
br label %173
34: ; preds = %12
store i8 -114, i8* %2
br label %173
35: ; preds = %12
store i8 -113, i8* %2
br label %173
36: ; preds = %12
store i8 -112, i8* %2
br label %173
37: ; preds = %12
store i8 -111, i8* %2
br label %173
38: ; preds = %12
store i8 -110, i8* %2
br label %173
39: ; preds = %12
store i8 -109, i8* %2
br label %173
40: ; preds = %12
store i8 -108, i8* %2
br label %173
41: ; preds = %12
store i8 -107, i8* %2
br label %173
42: ; preds = %12
store i8 -106, i8* %2
br label %173
43: ; preds = %12
store i8 -105, i8* %2
br label %173
44: ; preds = %12
store i8 -104, i8* %2
br label %173
45: ; preds = %12
store i8 -103, i8* %2
br label %173
46: ; preds = %12
store i8 -102, i8* %2
br label %173
47: ; preds = %12
store i8 -101, i8* %2
br label %173
48: ; preds = %12
store i8 -100, i8* %2
br label %173
49: ; preds = %12
store i8 -99, i8* %2
br label %173
50: ; preds = %12
store i8 -98, i8* %2
br label %173
51: ; preds = %12
store i8 -97, i8* %2
br label %173
52: ; preds = %12
store i8 -96, i8* %2
br label %173
53: ; preds = %12
store i8 -95, i8* %2
br label %173
54: ; preds = %12
store i8 -94, i8* %2
br label %173
55: ; preds = %12
store i8 -93, i8* %2
br label %173
56: ; preds = %12
store i8 -92, i8* %2
br label %173
57: ; preds = %12
store i8 -91, i8* %2
br label %173
58: ; preds = %12
store i8 -90, i8* %2
br label %173
59: ; preds = %12
store i8 -89, i8* %2
br label %173
60: ; preds = %12
store i8 -88, i8* %2
br label %173
61: ; preds = %12
store i8 -87, i8* %2
br label %173
62: ; preds = %12
store i8 -86, i8* %2
br label %173
63: ; preds = %12
store i8 -85, i8* %2
br label %173
64: ; preds = %12
store i8 -84, i8* %2
br label %173
65: ; preds = %12
store i8 -83, i8* %2
br label %173
66: ; preds = %12
store i8 -82, i8* %2
br label %173
67: ; preds = %12
store i8 -81, i8* %2
br label %173
68: ; preds = %12
store i8 -32, i8* %2
br label %173
69: ; preds = %12
store i8 -31, i8* %2
br label %173
70: ; preds = %12
store i8 -30, i8* %2
br label %173
71: ; preds = %12
store i8 -29, i8* %2
br label %173
72: ; preds = %12
store i8 -28, i8* %2
br label %173
73: ; preds = %12
store i8 -27, i8* %2
br label %173
74: ; preds = %12
store i8 -26, i8* %2
br label %173
75: ; preds = %12
store i8 -25, i8* %2
br label %173
76: ; preds = %12
store i8 -24, i8* %2
br label %173
77: ; preds = %12
store i8 -23, i8* %2
br label %173
78: ; preds = %12
store i8 -22, i8* %2
br label %173
79: ; preds = %12
store i8 -21, i8* %2
br label %173
80: ; preds = %12
store i8 -20, i8* %2
br label %173
81: ; preds = %12
store i8 -19, i8* %2
br label %173
82: ; preds = %12
store i8 -18, i8* %2
br label %173
83: ; preds = %12
store i8 -17, i8* %2
br label %173
84: ; preds = %12
store i8 -15, i8* %2
br label %173
85: ; preds = %12
store i8 -13, i8* %2
br label %173
86: ; preds = %12
store i8 -11, i8* %2
br label %173
87: ; preds = %12
store i8 -9, i8* %2
br label %173
88: ; preds = %12
br label %172
89: ; preds = %1
%90 = load i16, i16* %3
%91 = trunc i16 %90 to i8
%92 = zext i8 %91 to i32
switch i32 %92, label %98 [
i32 21, label %93
i32 24, label %94
i32 25, label %95
i32 40, label %96
i32 50, label %97
]
93: ; preds = %89
store i8 45, i8* %2
br label %173
94: ; preds = %89
store i8 96, i8* %2
br label %173
95: ; preds = %89
store i8 39, i8* %2
br label %173
96: ; preds = %89
store i8 10, i8* %2
br label %173
97: ; preds = %89
store i8 39, i8* %2
br label %173
98: ; preds = %89
br label %172
99: ; preds = %1
%100 = load i16, i16* %3
%101 = trunc i16 %100 to i8
%102 = zext i8 %101 to i32
switch i32 %102, label %106 [
i32 22, label %103
i32 47, label %104
i32 145, label %105
]
103: ; preds = %99
store i8 -4, i8* %2
br label %173
104: ; preds = %99
store i8 101, i8* %2
br label %173
105: ; preds = %99
store i8 64, i8* %2
br label %173
106: ; preds = %99
br label %172
107: ; preds = %1
%108 = load i16, i16* %3
%109 = trunc i16 %108 to i8
%110 = zext i8 %109 to i32
switch i32 %110, label %116 [
i32 25, label %111
i32 26, label %112
i32 39, label %113
i32 40, label %114
i32 96, label %115
]
111: ; preds = %107
store i8 -7, i8* %2
br label %173
112: ; preds = %107
store i8 -5, i8* %2
br label %173
113: ; preds = %107
store i8 94, i8* %2
br label %173
114: ; preds = %107
store i8 118, i8* %2
br label %173
115: ; preds = %107
store i8 35, i8* %2
br label %173
116: ; preds = %107
br label %172
117: ; preds = %1
%118 = load i16, i16* %3
%119 = trunc i16 %118 to i8
%120 = zext i8 %119 to i32
switch i32 %120, label %171 [
i32 0, label %121
i32 2, label %122
i32 12, label %123
i32 16, label %124
i32 20, label %125
i32 24, label %126
i32 28, label %127
i32 36, label %128
i32 44, label %129
i32 52, label %130
i32 60, label %131
i32 80, label %132
i32 81, label %133
i32 82, label %134
i32 83, label %135
i32 84, label %136
i32 85, label %137
i32 86, label %138
i32 87, label %139
i32 88, label %140
i32 89, label %141
i32 90, label %142
i32 91, label %143
i32 92, label %144
i32 93, label %145
i32 94, label %146
i32 95, label %147
i32 96, label %148
i32 97, label %149
i32 98, label %150
i32 99, label %151
i32 100, label %152
i32 101, label %153
i32 102, label %154
i32 103, label %155
i32 104, label %156
i32 105, label %157
i32 106, label %158
i32 107, label %159
i32 108, label %160
i32 128, label %161
i32 132, label %162
i32 136, label %163
i32 140, label %164
i32 144, label %165
i32 145, label %166
i32 146, label %167
i32 147, label %168
i32 160, label %169
i32 202, label %170
]
121: ; preds = %117
store i8 -60, i8* %2
br label %173
122: ; preds = %117
store i8 -77, i8* %2
br label %173
123: ; preds = %117
store i8 -38, i8* %2
br label %173
124: ; preds = %117
store i8 -65, i8* %2
br label %173
125: ; preds = %117
store i8 -64, i8* %2
br label %173
126: ; preds = %117
store i8 -39, i8* %2
br label %173
127: ; preds = %117
store i8 -61, i8* %2
br label %173
128: ; preds = %117
store i8 -76, i8* %2
br label %173
129: ; preds = %117
store i8 -62, i8* %2
br label %173
130: ; preds = %117
store i8 -63, i8* %2
br label %173
131: ; preds = %117
store i8 -59, i8* %2
br label %173
132: ; preds = %117
store i8 -51, i8* %2
br label %173
133: ; preds = %117
store i8 -70, i8* %2
br label %173
134: ; preds = %117
store i8 -43, i8* %2
br label %173
135: ; preds = %117
store i8 -42, i8* %2
br label %173
136: ; preds = %117
store i8 -55, i8* %2
br label %173
137: ; preds = %117
store i8 -72, i8* %2
br label %173
138: ; preds = %117
store i8 -73, i8* %2
br label %173
139: ; preds = %117
store i8 -69, i8* %2
br label %173
140: ; preds = %117
store i8 -44, i8* %2
br label %173
141: ; preds = %117
store i8 -45, i8* %2
br label %173
142: ; preds = %117
store i8 -56, i8* %2
br label %173
143: ; preds = %117
store i8 -66, i8* %2
br label %173
144: ; preds = %117
store i8 -67, i8* %2
br label %173
145: ; preds = %117
store i8 -68, i8* %2
br label %173
146: ; preds = %117
store i8 -58, i8* %2
br label %173
147: ; preds = %117
store i8 -57, i8* %2
br label %173
148: ; preds = %117
store i8 -52, i8* %2
br label %173
149: ; preds = %117
store i8 -75, i8* %2
br label %173
150: ; preds = %117
store i8 -74, i8* %2
br label %173
151: ; preds = %117
store i8 -71, i8* %2
br label %173
152: ; preds = %117
store i8 -47, i8* %2
br label %173
153: ; preds = %117
store i8 -46, i8* %2
br label %173
154: ; preds = %117
store i8 -53, i8* %2
br label %173
155: ; preds = %117
store i8 -49, i8* %2
br label %173
156: ; preds = %117
store i8 -48, i8* %2
br label %173
157: ; preds = %117
store i8 -54, i8* %2
br label %173
158: ; preds = %117
store i8 -40, i8* %2
br label %173
159: ; preds = %117
store i8 -41, i8* %2
br label %173
160: ; preds = %117
store i8 -50, i8* %2
br label %173
161: ; preds = %117
store i8 -33, i8* %2
br label %173
162: ; preds = %117
store i8 -36, i8* %2
br label %173
163: ; preds = %117
store i8 -37, i8* %2
br label %173
164: ; preds = %117
store i8 -35, i8* %2
br label %173
165: ; preds = %117
store i8 -34, i8* %2
br label %173
166: ; preds = %117
store i8 -80, i8* %2
br label %173
167: ; preds = %117
store i8 -79, i8* %2
br label %173
168: ; preds = %117
store i8 -78, i8* %2
br label %173
169: ; preds = %117
store i8 -2, i8* %2
br label %173
170: ; preds = %117
store i8 36, i8* %2
br label %173
171: ; preds = %117
br label %172
172: ; preds = %1, %171, %116, %106, %98, %88
store i8 0, i8* %2
br label %173
173: ; preds = %172, %170, %169, %168, %167, %166, %165, %164, %163, %162, %161, %160, %159, %158, %157, %156, %155, %154, %153, %152, %151, %150, %149, %148, %147, %146, %145, %144, %143, %142, %141, %140, %139, %138, %137, %136, %135, %134, %133, %132, %131, %130, %129, %128, %127, %126, %125, %124, %123, %122, %121, %115, %114, %113, %112, %111, %105, %104, %103, %97, %96, %95, %94, %93, %87, %86, %85, %84, %83, %82, %81, %80, %79, %78, %77, %76, %75, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %62, %61, %60, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %7
%174 = load i8, i8* %2
ret i8 %174
}

LLVM IR (-O2):
@unicode_to_cp866.tab0 = internal unnamed_addr constant <{ [216 x i8], [40 x i8] }> <{ [216 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\7F\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\FF\00\00\00\FD\00\00\00\00\00\00\00^\00\00\00\F8\00\00\00\00\00\00\FA\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00x", [40 x i8] zeroinitializer }>
@switch.table.unicode_to_cp866 = [94 x i8] c"\F0\00\00\F2\00\00\F4\00\00\00\00\00\00\F6\00\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91\92\93\94\95\96\97\98\99\9A\9B\9C\9D\9E\9F\A0\A1\A2\A3\A4\A5\A6\A7\A8\A9\AA\AB\AC\AD\AE\AF\E0\E1\E2\E3\E4\E5\E6\E7\E8\E9\EA\EB\EC\ED\EE\EF\00\F1\00\00\F3\00\00\F5\00\00\00\00\00\00\F7"
define zeroext i8 @unicode_to_cp866(i16 zeroext %0) {
%2 = lshr i16 %0, 8
%3 = trunc i16 %2 to i8
switch i8 %3, label %79 [
i8 0, label %4
i8 4, label %8
i8 32, label %12
i8 33, label %18
i8 34, label %22
i8 37, label %28
]
4: ; preds = %1
%5 = zext i16 %0 to i64
%6 = getelementptr inbounds [256 x i8], [256 x i8]* bitcast (<{ [216 x i8], [40 x i8] }>* @unicode_to_cp866.tab0 to [256 x i8]*), i64 0, i64 %5
%7 = load i8, i8* %6
br label %84
8: ; preds = %1
%9 = trunc i16 %0 to i8
%10 = add i8 %9, -1
%11 = icmp ult i8 %10, 94
br i1 %11, label %80, label %79
12: ; preds = %1
%13 = trunc i16 %0 to i8
switch i8 %13, label %79 [
i8 21, label %84
i8 24, label %14
i8 25, label %15
i8 40, label %16
i8 50, label %17
]
14: ; preds = %12
br label %84
15: ; preds = %12
br label %84
16: ; preds = %12
br label %84
17: ; preds = %12
br label %84
18: ; preds = %1
%19 = trunc i16 %0 to i8
switch i8 %19, label %79 [
i8 22, label %84
i8 47, label %20
i8 -111, label %21
]
20: ; preds = %18
br label %84
21: ; preds = %18
br label %84
22: ; preds = %1
%23 = trunc i16 %0 to i8
switch i8 %23, label %79 [
i8 25, label %84
i8 26, label %24
i8 39, label %25
i8 40, label %26
i8 96, label %27
]
24: ; preds = %22
br label %84
25: ; preds = %22
br label %84
26: ; preds = %22
br label %84
27: ; preds = %22
br label %84
28: ; preds = %1
%29 = trunc i16 %0 to i8
switch i8 %29, label %79 [
i8 0, label %84
i8 2, label %30
i8 12, label %31
i8 16, label %32
i8 20, label %33
i8 24, label %34
i8 28, label %35
i8 36, label %36
i8 44, label %37
i8 52, label %38
i8 60, label %39
i8 80, label %40
i8 81, label %41
i8 82, label %42
i8 83, label %43
i8 84, label %44
i8 85, label %45
i8 86, label %46
i8 87, label %47
i8 88, label %48
i8 89, label %49
i8 90, label %50
i8 91, label %51
i8 92, label %52
i8 93, label %53
i8 94, label %54
i8 95, label %55
i8 96, label %56
i8 97, label %57
i8 98, label %58
i8 99, label %59
i8 100, label %60
i8 101, label %61
i8 102, label %62
i8 103, label %63
i8 104, label %64
i8 105, label %65
i8 106, label %66
i8 107, label %67
i8 108, label %68
i8 -128, label %69
i8 -124, label %70
i8 -120, label %71
i8 -116, label %72
i8 -112, label %73
i8 -111, label %74
i8 -110, label %75
i8 -109, label %76
i8 -96, label %77
i8 -54, label %78
]
30: ; preds = %28
br label %84
31: ; preds = %28
br label %84
32: ; preds = %28
br label %84
33: ; preds = %28
br label %84
34: ; preds = %28
br label %84
35: ; preds = %28
br label %84
36: ; preds = %28
br label %84
37: ; preds = %28
br label %84
38: ; preds = %28
br label %84
39: ; preds = %28
br label %84
40: ; preds = %28
br label %84
41: ; preds = %28
br label %84
42: ; preds = %28
br label %84
43: ; preds = %28
br label %84
44: ; preds = %28
br label %84
45: ; preds = %28
br label %84
46: ; preds = %28
br label %84
47: ; preds = %28
br label %84
48: ; preds = %28
br label %84
49: ; preds = %28
br label %84
50: ; preds = %28
br label %84
51: ; preds = %28
br label %84
52: ; preds = %28
br label %84
53: ; preds = %28
br label %84
54: ; preds = %28
br label %84
55: ; preds = %28
br label %84
56: ; preds = %28
br label %84
57: ; preds = %28
br label %84
58: ; preds = %28
br label %84
59: ; preds = %28
br label %84
60: ; preds = %28
br label %84
61: ; preds = %28
br label %84
62: ; preds = %28
br label %84
63: ; preds = %28
br label %84
64: ; preds = %28
br label %84
65: ; preds = %28
br label %84
66: ; preds = %28
br label %84
67: ; preds = %28
br label %84
68: ; preds = %28
br label %84
69: ; preds = %28
br label %84
70: ; preds = %28
br label %84
71: ; preds = %28
br label %84
72: ; preds = %28
br label %84
73: ; preds = %28
br label %84
74: ; preds = %28
br label %84
75: ; preds = %28
br label %84
76: ; preds = %28
br label %84
77: ; preds = %28
br label %84
78: ; preds = %28
br label %84
79: ; preds = %8, %28, %22, %18, %12, %1
br label %84
80: ; preds = %8
%81 = sext i8 %10 to i64
%82 = getelementptr inbounds [94 x i8], [94 x i8]* @switch.table.unicode_to_cp866, i64 0, i64 %81
%83 = load i8, i8* %82
br label %84
84: ; preds = %80, %28, %22, %18, %12, %79, %78, %77, %76, %75, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %62, %61, %60, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %27, %26, %25, %24, %21, %20, %17, %16, %15, %14, %4
%85 = phi i8 [ 0, %79 ], [ 36, %78 ], [ -2, %77 ], [ -78, %76 ], [ -79, %75 ], [ -80, %74 ], [ -34, %73 ], [ -35, %72 ], [ -37, %71 ], [ -36, %70 ], [ -33, %69 ], [ -50, %68 ], [ -41, %67 ], [ -40, %66 ], [ -54, %65 ], [ -48, %64 ], [ -49, %63 ], [ -53, %62 ], [ -46, %61 ], [ -47, %60 ], [ -71, %59 ], [ -74, %58 ], [ -75, %57 ], [ -52, %56 ], [ -57, %55 ], [ -58, %54 ], [ -68, %53 ], [ -67, %52 ], [ -66, %51 ], [ -56, %50 ], [ -45, %49 ], [ -44, %48 ], [ -69, %47 ], [ -73, %46 ], [ -72, %45 ], [ -55, %44 ], [ -42, %43 ], [ -43, %42 ], [ -70, %41 ], [ -51, %40 ], [ -59, %39 ], [ -63, %38 ], [ -62, %37 ], [ -76, %36 ], [ -61, %35 ], [ -39, %34 ], [ -64, %33 ], [ -65, %32 ], [ -38, %31 ], [ -77, %30 ], [ 35, %27 ], [ 118, %26 ], [ 94, %25 ], [ -5, %24 ], [ 64, %21 ], [ 101, %20 ], [ 39, %17 ], [ 10, %16 ], [ 39, %15 ], [ 96, %14 ], [ %7, %4 ], [ 45, %12 ], [ -4, %18 ], [ -7, %22 ], [ -60, %28 ], [ %83, %80 ]
ret i8 %85
}