#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 */

/* Variables and functions */
unsigned char DetermineEUC(char *, unsigned char);
int /*<<< orphan*/ strncmp(char *, char *, int);
unsigned char GuessCodingSystem_EastAsia(unsigned char *str, int length,
                                         unsigned char defaultEuc,
                                         char *language) {
  int i;
  unsigned char ch;
  int big5Penalty = 0;
  int sjisPenalty = 0;
  int eucjapanPenalty = 0;
  int eucPenalty = 0;
  for (i = 0; i < length; i++) {
    ch = str[i];
    if (0x80 & ch) {
      if (0x8e == ch || 0x8f == ch) {
        eucPenalty++;
        break;
      }
      if (!((ch) >= 0xa1 && (ch) <= 0xfe)) {
        eucPenalty++;
        break;
      }
      if (++i >= length)
        break;
      ch = str[i];
      if (!((ch) >= 0xa1 && (ch) <= 0xfe)) {
        eucPenalty++;
        break;
      }
    }
  }
  if (0 == eucPenalty) {
    if (language)
      return DetermineEUC(language, defaultEuc);
    else if (0 != defaultEuc)
      return defaultEuc;
  }
  for (i = 0; i < length; i++) {
    ch = str[i];
    if (0x80 & ch) {
      if (0x8e == ch) {
        if (++i >= length)
          break;
        ch = str[i];
        if (!((ch) >= 0xa1 && (ch) <= 0xdf)) {
          eucjapanPenalty++;
          break;
        }
        continue;
      }
      if (0x8f == ch) {
        if (++i >= length)
          break;
        ch = str[i];
      }
      if (!((ch) >= 0xa1 && (ch) <= 0xfe)) {
        eucjapanPenalty++;
        break;
      }
      if (++i >= length)
        break;
      ch = str[i];
      if (!((ch) >= 0xa1 && (ch) <= 0xfe)) {
        eucjapanPenalty++;
        break;
      }
    }
  }
  if (0 == eucjapanPenalty) {
    if (language) {
      if (!strncmp(language, "ja", 2))
        return 4;
      else
        return 5;
    } else {
      return 4;
    }
  }
  for (i = 0; i < length; i++) {
    ch = str[i];
    if (0x80 & ch) {
      if (!(((ch) >= 0xa1 && (ch) <= 0xfe))) {
        big5Penalty++;
        break;
      }
      ch = str[++i];
      if (i >= length)
        break;
      if (!(((ch) >= 0x40 && (ch) <= 0x7e) || ((ch) >= 0xa1 && (ch) <= 0xfe))) {
        big5Penalty++;
        break;
      }
    }
  }
  if (0 == big5Penalty)
    return 7;
  for (i = 0; i < length; i++) {
    ch = str[i];
    if (0x80 & ch) {
      if (((ch) >= 0xa1 && (ch) <= 0xdf))
        continue;
      if (!(((ch) >= 0x81 && (ch) <= 0x9f) || ((ch) >= 0xe0 && (ch) <= 0xfc))) {
        sjisPenalty++;
        break;
      }
      ch = str[++i];
      if (i >= length)
        break;
      if (!(((ch) >= 0x40 && (ch) <= 0x7e) || ((ch) >= 0x80 && (ch) <= 0xfc))) {
        sjisPenalty++;
        break;
      }
    }
  }
  if (0 == sjisPenalty)
    return 8;
  return 10;
}


x86 assembly (clang, -O0):
<GuessCodingSystem_EastAsia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    124c <GuessCodingSystem_EastAsia+0x12c>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1239 <GuessCodingSystem_EastAsia+0x119>
movzbl -0x25(%rbp),%ecx
mov    $0x8e,%eax
cmp    %ecx,%eax
je     11a9 <GuessCodingSystem_EastAsia+0x89>
movzbl -0x25(%rbp),%ecx
mov    $0x8f,%eax
cmp    %ecx,%eax
jne    11b7 <GuessCodingSystem_EastAsia+0x97>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    124c <GuessCodingSystem_EastAsia+0x12c>
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     11d5 <GuessCodingSystem_EastAsia+0xb5>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    11e3 <GuessCodingSystem_EastAsia+0xc3>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    124c <GuessCodingSystem_EastAsia+0x12c>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    -0x14(%rbp),%eax
jl     11fa <GuessCodingSystem_EastAsia+0xda>
jmp    124c <GuessCodingSystem_EastAsia+0x12c>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     1226 <GuessCodingSystem_EastAsia+0x106>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    1234 <GuessCodingSystem_EastAsia+0x114>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    124c <GuessCodingSystem_EastAsia+0x12c>
jmp    1239 <GuessCodingSystem_EastAsia+0x119>
jmp    123e <GuessCodingSystem_EastAsia+0x11e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    115b <GuessCodingSystem_EastAsia+0x3b>
xor    %eax,%eax
cmp    -0x38(%rbp),%eax
jne    129a <GuessCodingSystem_EastAsia+0x17a>
cmpq   $0x0,-0x20(%rbp)
je     1277 <GuessCodingSystem_EastAsia+0x157>
mov    -0x20(%rbp),%rdi
movzbl -0x15(%rbp),%esi
call   1030 <DetermineEUC@plt>
mov    %al,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movzbl -0x15(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1290 <GuessCodingSystem_EastAsia+0x170>
mov    -0x15(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
jmp    1295 <GuessCodingSystem_EastAsia+0x175>
jmp    129a <GuessCodingSystem_EastAsia+0x17a>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13ff <GuessCodingSystem_EastAsia+0x2df>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     13ec <GuessCodingSystem_EastAsia+0x2cc>
movzbl -0x25(%rbp),%ecx
mov    $0x8e,%eax
cmp    %ecx,%eax
jne    1334 <GuessCodingSystem_EastAsia+0x214>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    -0x14(%rbp),%eax
jl     12f5 <GuessCodingSystem_EastAsia+0x1d5>
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     1321 <GuessCodingSystem_EastAsia+0x201>
movzbl -0x25(%rbp),%eax
cmp    $0xdf,%eax
jle    132f <GuessCodingSystem_EastAsia+0x20f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
jmp    13f1 <GuessCodingSystem_EastAsia+0x2d1>
movzbl -0x25(%rbp),%ecx
mov    $0x8f,%eax
cmp    %ecx,%eax
jne    136a <GuessCodingSystem_EastAsia+0x24a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    -0x14(%rbp),%eax
jl     135c <GuessCodingSystem_EastAsia+0x23c>
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     1388 <GuessCodingSystem_EastAsia+0x268>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    1396 <GuessCodingSystem_EastAsia+0x276>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    -0x14(%rbp),%eax
jl     13ad <GuessCodingSystem_EastAsia+0x28d>
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     13d9 <GuessCodingSystem_EastAsia+0x2b9>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    13e7 <GuessCodingSystem_EastAsia+0x2c7>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ff <GuessCodingSystem_EastAsia+0x2df>
jmp    13ec <GuessCodingSystem_EastAsia+0x2cc>
jmp    13f1 <GuessCodingSystem_EastAsia+0x2d1>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12a1 <GuessCodingSystem_EastAsia+0x181>
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
jne    144e <GuessCodingSystem_EastAsia+0x32e>
cmpq   $0x0,-0x20(%rbp)
je     1445 <GuessCodingSystem_EastAsia+0x325>
mov    -0x20(%rbp),%rdi
lea    0xbe0(%rip),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    143c <GuessCodingSystem_EastAsia+0x31c>
movb   $0x4,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movb   $0x5,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movb   $0x4,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1532 <GuessCodingSystem_EastAsia+0x412>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     151f <GuessCodingSystem_EastAsia+0x3ff>
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     149f <GuessCodingSystem_EastAsia+0x37f>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    14ad <GuessCodingSystem_EastAsia+0x38d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1532 <GuessCodingSystem_EastAsia+0x412>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     14d4 <GuessCodingSystem_EastAsia+0x3b4>
jmp    1532 <GuessCodingSystem_EastAsia+0x412>
movzbl -0x25(%rbp),%eax
cmp    $0x40,%eax
jl     14ee <GuessCodingSystem_EastAsia+0x3ce>
movzbl -0x25(%rbp),%eax
cmp    $0x7e,%eax
jle    151a <GuessCodingSystem_EastAsia+0x3fa>
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     150c <GuessCodingSystem_EastAsia+0x3ec>
movzbl -0x25(%rbp),%eax
cmp    $0xfe,%eax
jle    151a <GuessCodingSystem_EastAsia+0x3fa>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1532 <GuessCodingSystem_EastAsia+0x412>
jmp    151f <GuessCodingSystem_EastAsia+0x3ff>
jmp    1524 <GuessCodingSystem_EastAsia+0x404>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1455 <GuessCodingSystem_EastAsia+0x335>
xor    %eax,%eax
cmp    -0x2c(%rbp),%eax
jne    1546 <GuessCodingSystem_EastAsia+0x426>
movb   $0x7,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    166b <GuessCodingSystem_EastAsia+0x54b>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movzbl -0x25(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1658 <GuessCodingSystem_EastAsia+0x538>
movzbl -0x25(%rbp),%eax
cmp    $0xa1,%eax
jl     159c <GuessCodingSystem_EastAsia+0x47c>
movzbl -0x25(%rbp),%eax
cmp    $0xdf,%eax
jg     159c <GuessCodingSystem_EastAsia+0x47c>
jmp    165d <GuessCodingSystem_EastAsia+0x53d>
movzbl -0x25(%rbp),%eax
cmp    $0x81,%eax
jl     15ba <GuessCodingSystem_EastAsia+0x49a>
movzbl -0x25(%rbp),%eax
cmp    $0x9f,%eax
jle    15e6 <GuessCodingSystem_EastAsia+0x4c6>
movzbl -0x25(%rbp),%eax
cmp    $0xe0,%eax
jl     15d8 <GuessCodingSystem_EastAsia+0x4b8>
movzbl -0x25(%rbp),%eax
cmp    $0xfc,%eax
jle    15e6 <GuessCodingSystem_EastAsia+0x4c6>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    166b <GuessCodingSystem_EastAsia+0x54b>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     160d <GuessCodingSystem_EastAsia+0x4ed>
jmp    166b <GuessCodingSystem_EastAsia+0x54b>
movzbl -0x25(%rbp),%eax
cmp    $0x40,%eax
jl     1627 <GuessCodingSystem_EastAsia+0x507>
movzbl -0x25(%rbp),%eax
cmp    $0x7e,%eax
jle    1653 <GuessCodingSystem_EastAsia+0x533>
movzbl -0x25(%rbp),%eax
cmp    $0x80,%eax
jl     1645 <GuessCodingSystem_EastAsia+0x525>
movzbl -0x25(%rbp),%eax
cmp    $0xfc,%eax
jle    1653 <GuessCodingSystem_EastAsia+0x533>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    166b <GuessCodingSystem_EastAsia+0x54b>
jmp    1658 <GuessCodingSystem_EastAsia+0x538>
jmp    165d <GuessCodingSystem_EastAsia+0x53d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    154d <GuessCodingSystem_EastAsia+0x42d>
xor    %eax,%eax
cmp    -0x30(%rbp),%eax
jne    167f <GuessCodingSystem_EastAsia+0x55f>
movb   $0x8,-0x1(%rbp)
jmp    1683 <GuessCodingSystem_EastAsia+0x563>
movb   $0xa,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GuessCodingSystem_EastAsia>:
push   %rax
test   %esi,%esi
jle    1174 <GuessCodingSystem_EastAsia+0x54>
xor    %eax,%eax
jmp    1137 <GuessCodingSystem_EastAsia+0x17>
nopl   0x0(%rax)
add    $0x1,%eax
cmp    %esi,%eax
jge    1174 <GuessCodingSystem_EastAsia+0x54>
movslq %eax,%r8
movzbl (%rdi,%r8,1),%r9d
test   %r9b,%r9b
jns    1130 <GuessCodingSystem_EastAsia+0x10>
mov    %r9d,%eax
and    $0xfe,%al
cmp    $0x8e,%al
je     118d <GuessCodingSystem_EastAsia+0x6d>
add    $0x5f,%r9b
cmp    $0x5d,%r9b
ja     118d <GuessCodingSystem_EastAsia+0x6d>
add    $0x1,%r8
cmp    %esi,%r8d
jge    1174 <GuessCodingSystem_EastAsia+0x54>
movzbl (%rdi,%r8,1),%r9d
add    $0x5f,%r9b
mov    %r8d,%eax
cmp    $0x5d,%r9b
jbe    1130 <GuessCodingSystem_EastAsia+0x10>
jmp    118d <GuessCodingSystem_EastAsia+0x6d>
test   %rcx,%rcx
je     1185 <GuessCodingSystem_EastAsia+0x65>
movzbl %dl,%esi
mov    %rcx,%rdi
pop    %rax
jmp    1030 <DetermineEUC@plt>
test   %dl,%dl
jne    12dd <GuessCodingSystem_EastAsia+0x1bd>
test   %esi,%esi
jle    120e <GuessCodingSystem_EastAsia+0xee>
xor    %edx,%edx
jmp    11ab <GuessCodingSystem_EastAsia+0x8b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,%edx
cmp    %esi,%eax
jge    120e <GuessCodingSystem_EastAsia+0xee>
movslq %edx,%rax
movzbl (%rdi,%rax,1),%r8d
test   %r8b,%r8b
jns    11a0 <GuessCodingSystem_EastAsia+0x80>
cmp    $0x8f,%r8b
je     11da <GuessCodingSystem_EastAsia+0xba>
cmp    $0x8e,%r8b
jne    11e9 <GuessCodingSystem_EastAsia+0xc9>
add    $0x1,%rax
cmp    %esi,%eax
jge    120e <GuessCodingSystem_EastAsia+0xee>
movzbl (%rdi,%rax,1),%edx
add    $0x5f,%dl
cmp    $0x3f,%dl
jb     11a2 <GuessCodingSystem_EastAsia+0x82>
jmp    120a <GuessCodingSystem_EastAsia+0xea>
add    $0x1,%rax
cmp    %esi,%eax
jge    120e <GuessCodingSystem_EastAsia+0xee>
movzbl (%rdi,%rax,1),%r8d
mov    %eax,%edx
add    $0x5f,%r8b
cmp    $0x5d,%r8b
ja     120a <GuessCodingSystem_EastAsia+0xea>
movslq %edx,%rax
add    $0x1,%rax
cmp    %esi,%eax
jge    120e <GuessCodingSystem_EastAsia+0xee>
movzbl (%rdi,%rax,1),%edx
add    $0x5f,%dl
cmp    $0x5d,%dl
jbe    11a2 <GuessCodingSystem_EastAsia+0x82>
xor    %ecx,%ecx
jmp    124b <GuessCodingSystem_EastAsia+0x12b>
test   %rcx,%rcx
je     1280 <GuessCodingSystem_EastAsia+0x160>
lea    0xde6(%rip),%rsi
mov    %rcx,%rdi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x1,%eax
mov    $0x5,%dl
sbb    $0x0,%dl
jmp    12dd <GuessCodingSystem_EastAsia+0x1bd>
mov    %eax,%ecx
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ecx
cmp    %esi,%ecx
jge    12db <GuessCodingSystem_EastAsia+0x1bb>
movslq %ecx,%rax
movzbl (%rdi,%rax,1),%edx
test   %dl,%dl
jns    1240 <GuessCodingSystem_EastAsia+0x120>
add    $0x5f,%dl
cmp    $0x5e,%dl
jae    127c <GuessCodingSystem_EastAsia+0x15c>
add    $0x1,%rax
cmp    %esi,%eax
jge    12db <GuessCodingSystem_EastAsia+0x1bb>
movzbl (%rdi,%rax,1),%edx
lea    -0x40(%rdx),%ecx
cmp    $0x3f,%cl
jb     1234 <GuessCodingSystem_EastAsia+0x114>
add    $0x5f,%dl
mov    %eax,%ecx
cmp    $0x5d,%dl
jbe    1240 <GuessCodingSystem_EastAsia+0x120>
xor    %ecx,%ecx
jmp    128f <GuessCodingSystem_EastAsia+0x16f>
mov    $0x4,%dl
jmp    12dd <GuessCodingSystem_EastAsia+0x1bd>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x8,%dl
cmp    %esi,%ecx
jge    12dd <GuessCodingSystem_EastAsia+0x1bd>
movslq %ecx,%rax
movzbl (%rdi,%rax,1),%r8d
test   %r8b,%r8b
jns    1286 <GuessCodingSystem_EastAsia+0x166>
lea    0x5f(%r8),%edx
cmp    $0x3f,%dl
jb     1286 <GuessCodingSystem_EastAsia+0x166>
lea    0x7f(%r8),%ecx
mov    $0xa,%dl
cmp    $0x1f,%cl
jb     12ba <GuessCodingSystem_EastAsia+0x19a>
add    $0x20,%r8b
cmp    $0x1c,%r8b
ja     12dd <GuessCodingSystem_EastAsia+0x1bd>
add    $0x1,%rax
cmp    %esi,%eax
jge    12e1 <GuessCodingSystem_EastAsia+0x1c1>
movzbl (%rdi,%rax,1),%r8d
cmp    $0xfd,%r8b
jl     1284 <GuessCodingSystem_EastAsia+0x164>
add    $0xc0,%r8b
mov    %eax,%ecx
cmp    $0x3e,%r8b
jbe    1286 <GuessCodingSystem_EastAsia+0x166>
jmp    12dd <GuessCodingSystem_EastAsia+0x1bd>
mov    $0x7,%dl
mov    %edx,%eax
pop    %rcx
ret
mov    $0x8,%dl
jmp    12dd <GuessCodingSystem_EastAsia+0x1bd>

LLVM IR (-O0):
@.str = [3 x i8] c"ja\00"
define zeroext i8 @GuessCodingSystem_EastAsia(i8* %0, i32 %1, i8 zeroext %2, i8* %3) {
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8 %2, i8* %8
store i8* %3, i8** %9
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %10
br label %16
16: ; preds = %76, %4
%17 = load i32, i32* %10
%18 = load i32, i32* %7
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %79
20: ; preds = %16
%21 = load i8*, i8** %6
%22 = load i32, i32* %10
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
store i8 %25, i8* %11
%26 = load i8, i8* %11
%27 = zext i8 %26 to i32
%28 = and i32 128, %27
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %75
30: ; preds = %20
%31 = load i8, i8* %11
%32 = zext i8 %31 to i32
%33 = icmp eq i32 142, %32
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = load i8, i8* %11
%36 = zext i8 %35 to i32
%37 = icmp eq i32 143, %36
br i1 %37, label %38, label %41
38: ; preds = %34, %30
%39 = load i32, i32* %15
%40 = add nsw i32 %39, 1
store i32 %40, i32* %15
br label %79
41: ; preds = %34
%42 = load i8, i8* %11
%43 = zext i8 %42 to i32
%44 = icmp sge i32 %43, 161
br i1 %44, label %45, label %49
45: ; preds = %41
%46 = load i8, i8* %11
%47 = zext i8 %46 to i32
%48 = icmp sle i32 %47, 254
br i1 %48, label %52, label %49
49: ; preds = %45, %41
%50 = load i32, i32* %15
%51 = add nsw i32 %50, 1
store i32 %51, i32* %15
br label %79
52: ; preds = %45
%53 = load i32, i32* %10
%54 = add nsw i32 %53, 1
store i32 %54, i32* %10
%55 = load i32, i32* %7
%56 = icmp sge i32 %54, %55
br i1 %56, label %57, label %58
57: ; preds = %52
br label %79
58: ; preds = %52
%59 = load i8*, i8** %6
%60 = load i32, i32* %10
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %59, i64 %61
%63 = load i8, i8* %62
store i8 %63, i8* %11
%64 = load i8, i8* %11
%65 = zext i8 %64 to i32
%66 = icmp sge i32 %65, 161
br i1 %66, label %67, label %71
67: ; preds = %58
%68 = load i8, i8* %11
%69 = zext i8 %68 to i32
%70 = icmp sle i32 %69, 254
br i1 %70, label %74, label %71
71: ; preds = %67, %58
%72 = load i32, i32* %15
%73 = add nsw i32 %72, 1
store i32 %73, i32* %15
br label %79
74: ; preds = %67
br label %75
75: ; preds = %74, %20
br label %76
76: ; preds = %75
%77 = load i32, i32* %10
%78 = add nsw i32 %77, 1
store i32 %78, i32* %10
br label %16
79: ; preds = %71, %57, %49, %38, %16
%80 = load i32, i32* %15
%81 = icmp eq i32 0, %80
br i1 %81, label %82, label %97
82: ; preds = %79
%83 = load i8*, i8** %9
%84 = icmp ne i8* %83, null
br i1 %84, label %85, label %89
85: ; preds = %82
%86 = load i8*, i8** %9
%87 = load i8, i8* %8
%88 = call zeroext i8 @DetermineEUC(i8* %86, i8 zeroext %87)
store i8 %88, i8* %5
br label %354
89: ; preds = %82
%90 = load i8, i8* %8
%91 = zext i8 %90 to i32
%92 = icmp ne i32 0, %91
br i1 %92, label %93, label %95
93: ; preds = %89
%94 = load i8, i8* %8
store i8 %94, i8* %5
br label %354
95: ; preds = %89
br label %96
96: ; preds = %95
br label %97
97: ; preds = %96, %79
store i32 0, i32* %10
br label %98
98: ; preds = %190, %97
%99 = load i32, i32* %10
%100 = load i32, i32* %7
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %193
102: ; preds = %98
%103 = load i8*, i8** %6
%104 = load i32, i32* %10
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %103, i64 %105
%107 = load i8, i8* %106
store i8 %107, i8* %11
%108 = load i8, i8* %11
%109 = zext i8 %108 to i32
%110 = and i32 128, %109
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %189
112: ; preds = %102
%113 = load i8, i8* %11
%114 = zext i8 %113 to i32
%115 = icmp eq i32 142, %114
br i1 %115, label %116, label %139
116: ; preds = %112
%117 = load i32, i32* %10
%118 = add nsw i32 %117, 1
store i32 %118, i32* %10
%119 = load i32, i32* %7
%120 = icmp sge i32 %118, %119
br i1 %120, label %121, label %122
121: ; preds = %116
br label %193
122: ; preds = %116
%123 = load i8*, i8** %6
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8, i8* %123, i64 %125
%127 = load i8, i8* %126
store i8 %127, i8* %11
%128 = load i8, i8* %11
%129 = zext i8 %128 to i32
%130 = icmp sge i32 %129, 161
br i1 %130, label %131, label %135
131: ; preds = %122
%132 = load i8, i8* %11
%133 = zext i8 %132 to i32
%134 = icmp sle i32 %133, 223
br i1 %134, label %138, label %135
135: ; preds = %131, %122
%136 = load i32, i32* %14
%137 = add nsw i32 %136, 1
store i32 %137, i32* %14
br label %193
138: ; preds = %131
br label %190
139: ; preds = %112
%140 = load i8, i8* %11
%141 = zext i8 %140 to i32
%142 = icmp eq i32 143, %141
br i1 %142, label %143, label %155
143: ; preds = %139
%144 = load i32, i32* %10
%145 = add nsw i32 %144, 1
store i32 %145, i32* %10
%146 = load i32, i32* %7
%147 = icmp sge i32 %145, %146
br i1 %147, label %148, label %149
148: ; preds = %143
br label %193
149: ; preds = %143
%150 = load i8*, i8** %6
%151 = load i32, i32* %10
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %150, i64 %152
%154 = load i8, i8* %153
store i8 %154, i8* %11
br label %155
155: ; preds = %149, %139
%156 = load i8, i8* %11
%157 = zext i8 %156 to i32
%158 = icmp sge i32 %157, 161
br i1 %158, label %159, label %163
159: ; preds = %155
%160 = load i8, i8* %11
%161 = zext i8 %160 to i32
%162 = icmp sle i32 %161, 254
br i1 %162, label %166, label %163
163: ; preds = %159, %155
%164 = load i32, i32* %14
%165 = add nsw i32 %164, 1
store i32 %165, i32* %14
br label %193
166: ; preds = %159
%167 = load i32, i32* %10
%168 = add nsw i32 %167, 1
store i32 %168, i32* %10
%169 = load i32, i32* %7
%170 = icmp sge i32 %168, %169
br i1 %170, label %171, label %172
171: ; preds = %166
br label %193
172: ; preds = %166
%173 = load i8*, i8** %6
%174 = load i32, i32* %10
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8, i8* %173, i64 %175
%177 = load i8, i8* %176
store i8 %177, i8* %11
%178 = load i8, i8* %11
%179 = zext i8 %178 to i32
%180 = icmp sge i32 %179, 161
br i1 %180, label %181, label %185
181: ; preds = %172
%182 = load i8, i8* %11
%183 = zext i8 %182 to i32
%184 = icmp sle i32 %183, 254
br i1 %184, label %188, label %185
185: ; preds = %181, %172
%186 = load i32, i32* %14
%187 = add nsw i32 %186, 1
store i32 %187, i32* %14
br label %193
188: ; preds = %181
br label %189
189: ; preds = %188, %102
br label %190
190: ; preds = %189, %138
%191 = load i32, i32* %10
%192 = add nsw i32 %191, 1
store i32 %192, i32* %10
br label %98
193: ; preds = %185, %171, %163, %148, %135, %121, %98
%194 = load i32, i32* %14
%195 = icmp eq i32 0, %194
br i1 %195, label %196, label %206
196: ; preds = %193
%197 = load i8*, i8** %9
%198 = icmp ne i8* %197, null
br i1 %198, label %199, label %205
199: ; preds = %196
%200 = load i8*, i8** %9
%201 = call i32 @strncmp(i8* %200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%202 = icmp ne i32 %201, 0
br i1 %202, label %204, label %203
203: ; preds = %199
store i8 4, i8* %5
br label %354
204: ; preds = %199
store i8 5, i8* %5
br label %354
205: ; preds = %196
store i8 4, i8* %5
br label %354
206: ; preds = %193
store i32 0, i32* %10
br label %207
207: ; preds = %264, %206
%208 = load i32, i32* %10
%209 = load i32, i32* %7
%210 = icmp slt i32 %208, %209
br i1 %210, label %211, label %267
211: ; preds = %207
%212 = load i8*, i8** %6
%213 = load i32, i32* %10
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds i8, i8* %212, i64 %214
%216 = load i8, i8* %215
store i8 %216, i8* %11
%217 = load i8, i8* %11
%218 = zext i8 %217 to i32
%219 = and i32 128, %218
%220 = icmp ne i32 %219, 0
br i1 %220, label %221, label %263
221: ; preds = %211
%222 = load i8, i8* %11
%223 = zext i8 %222 to i32
%224 = icmp sge i32 %223, 161
br i1 %224, label %225, label %229
225: ; preds = %221
%226 = load i8, i8* %11
%227 = zext i8 %226 to i32
%228 = icmp sle i32 %227, 254
br i1 %228, label %232, label %229
229: ; preds = %225, %221
%230 = load i32, i32* %12
%231 = add nsw i32 %230, 1
store i32 %231, i32* %12
br label %267
232: ; preds = %225
%233 = load i8*, i8** %6
%234 = load i32, i32* %10
%235 = add nsw i32 %234, 1
store i32 %235, i32* %10
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds i8, i8* %233, i64 %236
%238 = load i8, i8* %237
store i8 %238, i8* %11
%239 = load i32, i32* %10
%240 = load i32, i32* %7
%241 = icmp sge i32 %239, %240
br i1 %241, label %242, label %243
242: ; preds = %232
br label %267
243: ; preds = %232
%244 = load i8, i8* %11
%245 = zext i8 %244 to i32
%246 = icmp sge i32 %245, 64
br i1 %246, label %247, label %251
247: ; preds = %243
%248 = load i8, i8* %11
%249 = zext i8 %248 to i32
%250 = icmp sle i32 %249, 126
br i1 %250, label %262, label %251
251: ; preds = %247, %243
%252 = load i8, i8* %11
%253 = zext i8 %252 to i32
%254 = icmp sge i32 %253, 161
br i1 %254, label %255, label %259
255: ; preds = %251
%256 = load i8, i8* %11
%257 = zext i8 %256 to i32
%258 = icmp sle i32 %257, 254
br i1 %258, label %262, label %259
259: ; preds = %255, %251
%260 = load i32, i32* %12
%261 = add nsw i32 %260, 1
store i32 %261, i32* %12
br label %267
262: ; preds = %255, %247
br label %263
263: ; preds = %262, %211
br label %264
264: ; preds = %263
%265 = load i32, i32* %10
%266 = add nsw i32 %265, 1
store i32 %266, i32* %10
br label %207
267: ; preds = %259, %242, %229, %207
%268 = load i32, i32* %12
%269 = icmp eq i32 0, %268
br i1 %269, label %270, label %271
270: ; preds = %267
store i8 7, i8* %5
br label %354
271: ; preds = %267
store i32 0, i32* %10
br label %272
272: ; preds = %346, %271
%273 = load i32, i32* %10
%274 = load i32, i32* %7
%275 = icmp slt i32 %273, %274
br i1 %275, label %276, label %349
276: ; preds = %272
%277 = load i8*, i8** %6
%278 = load i32, i32* %10
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds i8, i8* %277, i64 %279
%281 = load i8, i8* %280
store i8 %281, i8* %11
%282 = load i8, i8* %11
%283 = zext i8 %282 to i32
%284 = and i32 128, %283
%285 = icmp ne i32 %284, 0
br i1 %285, label %286, label %345
286: ; preds = %276
%287 = load i8, i8* %11
%288 = zext i8 %287 to i32
%289 = icmp sge i32 %288, 161
br i1 %289, label %290, label %295
290: ; preds = %286
%291 = load i8, i8* %11
%292 = zext i8 %291 to i32
%293 = icmp sle i32 %292, 223
br i1 %293, label %294, label %295
294: ; preds = %290
br label %346
295: ; preds = %290, %286
%296 = load i8, i8* %11
%297 = zext i8 %296 to i32
%298 = icmp sge i32 %297, 129
br i1 %298, label %299, label %303
299: ; preds = %295
%300 = load i8, i8* %11
%301 = zext i8 %300 to i32
%302 = icmp sle i32 %301, 159
br i1 %302, label %314, label %303
303: ; preds = %299, %295
%304 = load i8, i8* %11
%305 = zext i8 %304 to i32
%306 = icmp sge i32 %305, 224
br i1 %306, label %307, label %311
307: ; preds = %303
%308 = load i8, i8* %11
%309 = zext i8 %308 to i32
%310 = icmp sle i32 %309, 252
br i1 %310, label %314, label %311
311: ; preds = %307, %303
%312 = load i32, i32* %13
%313 = add nsw i32 %312, 1
store i32 %313, i32* %13
br label %349
314: ; preds = %307, %299
%315 = load i8*, i8** %6
%316 = load i32, i32* %10
%317 = add nsw i32 %316, 1
store i32 %317, i32* %10
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds i8, i8* %315, i64 %318
%320 = load i8, i8* %319
store i8 %320, i8* %11
%321 = load i32, i32* %10
%322 = load i32, i32* %7
%323 = icmp sge i32 %321, %322
br i1 %323, label %324, label %325
324: ; preds = %314
br label %349
325: ; preds = %314
%326 = load i8, i8* %11
%327 = zext i8 %326 to i32
%328 = icmp sge i32 %327, 64
br i1 %328, label %329, label %333
329: ; preds = %325
%330 = load i8, i8* %11
%331 = zext i8 %330 to i32
%332 = icmp sle i32 %331, 126
br i1 %332, label %344, label %333
333: ; preds = %329, %325
%334 = load i8, i8* %11
%335 = zext i8 %334 to i32
%336 = icmp sge i32 %335, 128
br i1 %336, label %337, label %341
337: ; preds = %333
%338 = load i8, i8* %11
%339 = zext i8 %338 to i32
%340 = icmp sle i32 %339, 252
br i1 %340, label %344, label %341
341: ; preds = %337, %333
%342 = load i32, i32* %13
%343 = add nsw i32 %342, 1
store i32 %343, i32* %13
br label %349
344: ; preds = %337, %329
br label %345
345: ; preds = %344, %276
br label %346
346: ; preds = %345, %294
%347 = load i32, i32* %10
%348 = add nsw i32 %347, 1
store i32 %348, i32* %10
br label %272
349: ; preds = %341, %324, %311, %272
%350 = load i32, i32* %13
%351 = icmp eq i32 0, %350
br i1 %351, label %352, label %353
352: ; preds = %349
store i8 8, i8* %5
br label %354
353: ; preds = %349
store i8 10, i8* %5
br label %354
354: ; preds = %353, %352, %270, %205, %204, %203, %93, %85
%355 = load i8, i8* %5
ret i8 %355
}

LLVM IR (-O2):
@.str = [3 x i8] c"ja\00"
define zeroext i8 @GuessCodingSystem_EastAsia(i8* nocapture %0, i32 %1, i8 zeroext %2, i8* %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %31
6: ; preds = %4, %27
%7 = phi i32 [ %29, %27 ], [ 0, %4 ]
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp sgt i8 %10, -1
br i1 %11, label %27, label %12
12: ; preds = %6
%13 = and i8 %10, -2
%14 = icmp ne i8 %13, -114
%15 = add nsw i8 %10, 95
%16 = icmp ult i8 %15, 94
%17 = and i1 %14, %16
br i1 %17, label %18, label %37
18: ; preds = %12
%19 = add nsw i32 %7, 1
%20 = icmp slt i32 %19, %1
br i1 %20, label %21, label %31
21: ; preds = %18
%22 = sext i32 %19 to i64
%23 = getelementptr inbounds i8, i8* %0, i64 %22
%24 = load i8, i8* %23
%25 = add i8 %24, 95
%26 = icmp ult i8 %25, 94
br i1 %26, label %27, label %37
27: ; preds = %6, %21
%28 = phi i32 [ %19, %21 ], [ %7, %6 ]
%29 = add nsw i32 %28, 1
%30 = icmp slt i32 %29, %1
br i1 %30, label %6, label %31
31: ; preds = %18, %27, %4
%32 = icmp eq i8* %3, null
br i1 %32, label %35, label %33
33: ; preds = %31
%34 = tail call zeroext i8 @DetermineEUC(i8* %3, i8 zeroext %2)
br label %142
35: ; preds = %31
%36 = icmp eq i8 %2, 0
br i1 %36, label %37, label %142
37: ; preds = %12, %21, %35
br i1 %5, label %38, label %80
38: ; preds = %37, %76
%39 = phi i32 [ %78, %76 ], [ 0, %37 ]
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %0, i64 %40
%42 = load i8, i8* %41
%43 = icmp sgt i8 %42, -1
br i1 %43, label %76, label %44
44: ; preds = %38
switch i8 %42, label %62 [
i8 -114, label %45
i8 -113, label %55
]
45: ; preds = %44
%46 = add nsw i32 %39, 1
%47 = icmp slt i32 %46, %1
br i1 %47, label %48, label %80
48: ; preds = %45
%49 = sext i32 %46 to i64
%50 = getelementptr inbounds i8, i8* %0, i64 %49
%51 = load i8, i8* %50
%52 = add i8 %51, 95
%53 = icmp ult i8 %52, 63
br i1 %53, label %76, label %54
54: ; preds = %70, %62, %48
br label %86
55: ; preds = %44
%56 = add nsw i32 %39, 1
%57 = icmp slt i32 %56, %1
br i1 %57, label %58, label %80
58: ; preds = %55
%59 = sext i32 %56 to i64
%60 = getelementptr inbounds i8, i8* %0, i64 %59
%61 = load i8, i8* %60
br label %62
62: ; preds = %44, %58
%63 = phi i32 [ %56, %58 ], [ %39, %44 ]
%64 = phi i8 [ %61, %58 ], [ %42, %44 ]
%65 = add i8 %64, 95
%66 = icmp ult i8 %65, 94
br i1 %66, label %67, label %54
67: ; preds = %62
%68 = add nsw i32 %63, 1
%69 = icmp slt i32 %68, %1
br i1 %69, label %70, label %80
70: ; preds = %67
%71 = sext i32 %68 to i64
%72 = getelementptr inbounds i8, i8* %0, i64 %71
%73 = load i8, i8* %72
%74 = add i8 %73, 95
%75 = icmp ult i8 %74, 94
br i1 %75, label %76, label %54
76: ; preds = %38, %70, %48
%77 = phi i32 [ %46, %48 ], [ %68, %70 ], [ %39, %38 ]
%78 = add nsw i32 %77, 1
%79 = icmp slt i32 %78, %1
br i1 %79, label %38, label %80
80: ; preds = %67, %55, %45, %76, %37
%81 = icmp eq i8* %3, null
br i1 %81, label %142, label %82
82: ; preds = %80
%83 = tail call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%84 = icmp eq i32 %83, 0
%85 = select i1 %84, i8 4, i8 5
br label %142
86: ; preds = %54, %108
%87 = phi i32 [ %110, %108 ], [ 0, %54 ]
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %0, i64 %88
%90 = load i8, i8* %89
%91 = icmp sgt i8 %90, -1
br i1 %91, label %108, label %92
92: ; preds = %86
%93 = add nsw i8 %90, 95
%94 = icmp ult i8 %93, 94
br i1 %94, label %96, label %95
95: ; preds = %99, %92
br label %112
96: ; preds = %92
%97 = add nsw i32 %87, 1
%98 = icmp slt i32 %97, %1
br i1 %98, label %99, label %142
99: ; preds = %96
%100 = sext i32 %97 to i64
%101 = getelementptr inbounds i8, i8* %0, i64 %100
%102 = load i8, i8* %101
%103 = add i8 %102, -64
%104 = icmp ult i8 %103, 63
%105 = add i8 %102, 95
%106 = icmp ult i8 %105, 94
%107 = or i1 %104, %106
br i1 %107, label %108, label %95
108: ; preds = %86, %99
%109 = phi i32 [ %97, %99 ], [ %87, %86 ]
%110 = add nsw i32 %109, 1
%111 = icmp slt i32 %110, %1
br i1 %111, label %86, label %142
112: ; preds = %95, %138
%113 = phi i32 [ %140, %138 ], [ 0, %95 ]
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8, i8* %0, i64 %114
%116 = load i8, i8* %115
%117 = icmp sgt i8 %116, -1
%118 = add i8 %116, 95
%119 = icmp ult i8 %118, 63
%120 = or i1 %117, %119
br i1 %120, label %138, label %121
121: ; preds = %112
%122 = add nsw i8 %116, 127
%123 = icmp ult i8 %122, 31
%124 = add nsw i8 %116, 32
%125 = icmp ult i8 %124, 29
%126 = or i1 %123, %125
br i1 %126, label %127, label %142
127: ; preds = %121
%128 = add nsw i32 %113, 1
%129 = icmp slt i32 %128, %1
br i1 %129, label %130, label %142
130: ; preds = %127
%131 = sext i32 %128 to i64
%132 = getelementptr inbounds i8, i8* %0, i64 %131
%133 = load i8, i8* %132
%134 = add i8 %133, -64
%135 = icmp ult i8 %134, 63
%136 = icmp slt i8 %133, -3
%137 = or i1 %136, %135
br i1 %137, label %138, label %142
138: ; preds = %112, %130
%139 = phi i32 [ %128, %130 ], [ %113, %112 ]
%140 = add nsw i32 %139, 1
%141 = icmp slt i32 %140, %1
br i1 %141, label %112, label %142
142: ; preds = %96, %108, %138, %127, %121, %130, %80, %82, %35, %33
%143 = phi i8 [ %34, %33 ], [ %2, %35 ], [ %85, %82 ], [ 4, %80 ], [ 8, %138 ], [ 8, %127 ], [ 10, %121 ], [ 10, %130 ], [ 7, %108 ], [ 7, %96 ]
ret i8 %143
}