#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 */
int ch2int(char const);
int /*<<< orphan*/ editDistanceP(char *, int, char const *, int);
int /*<<< orphan*/ fitPattern(char, char const);
int isPageNumber(const char *content, int limit) {
  int a = 0;
  int b = 0;
  if (limit < 3)
    return 0;
  if (limit > 9)
    limit = 9;
  switch (limit) {
  case 9:
    if ((editDistanceP("nnnnennnn", 9, content, 9) <= 0)) {
      a = ch2int(content[0]) * 1000 + ch2int(content[1]) * 100 +
          ch2int(content[2]) * 10 + ch2int(content[3]);
      b = ch2int(content[5]) * 1000 + ch2int(content[6]) * 100 +
          ch2int(content[7]) * 10 + ch2int(content[8]);
      if (b > a && content[4] != ' ') {
        return 9;
      }
    }
  case 8:
    if (editDistanceP("nnnennnn", 8, content, 8) <= 0) {
      a = ch2int(content[0]) * 100 + ch2int(content[1]) * 10 +
          ch2int(content[2]);
      b = ch2int(content[4]) * 1000 + ch2int(content[5]) * 100 +
          ch2int(content[6]) * 10 + ch2int(content[7]);
      if (b > a && content[3] != ' ') {
        return 8;
      }
    }
  case 7:
    if (editDistanceP("nnnennn", 7, content, 7) <= 0) {
      a = ch2int(content[0]) * 100 + ch2int(content[1]) * 10 +
          ch2int(content[2]);
      b = ch2int(content[4]) * 100 + ch2int(content[5]) * 10 +
          ch2int(content[6]);
      if (b > a && content[3] != ' ') {
        return 7;
      }
    }
  case 6:
    if (editDistanceP("nnennn", 6, content, 6) <= 0) {
      a = ch2int(content[0]) * 10 + ch2int(content[1]) * 1;
      b = ch2int(content[3]) * 100 + ch2int(content[4]) * 10 +
          ch2int(content[5]);
      if (b > a && content[2] != ' ') {
        return 7;
      }
    }
  case 5:
    if (editDistanceP("nnenn", 5, content, 5) <= 0) {
      a = ch2int(content[0]) * 10 + ch2int(content[1]);
      b = ch2int(content[3]) * 10 + ch2int(content[4]);
      if (b > a && content[2] != ' ') {
        return 5;
      }
    }
  case 4:
    if (fitPattern('n', content[0]) && (content[1] == '-') &&
        fitPattern('n', content[2]) && fitPattern('n', content[3])) {
      a = ch2int(content[0]);
      b = ch2int(content[2]) * 10 + ch2int(content[3]);
      if (b > a && content[1] != ' ') {
        return 4;
      }
    }
  case 3:
    if (fitPattern('n', content[0]) && (content[1] == '-') &&
        fitPattern('n', content[2])) {
      a = ch2int(content[0]);
      b = ch2int(content[2]);
      if (b > a && content[1] != ' ') {
        return 3;
      }
    }
  default:
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isPageNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1166 <isPageNumber+0x36>
movl   $0x0,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
cmpl   $0x9,-0x14(%rbp)
jle    1177 <isPageNumber+0x47>
movl   $0x9,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xfffffffd,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x6,%eax
ja     1753 <isPageNumber+0x623>
mov    -0x28(%rbp),%rax
lea    0xe69(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdx
lea    0xe71(%rip),%rdi
mov    $0x9,%ecx
mov    %ecx,%esi
call   1030 <editDistanceP@plt>
cmp    $0x0,%eax
jg     12af <isPageNumber+0x17f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
imul   $0x64,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
imul   $0x64,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x7(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x8(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    12aa <isPageNumber+0x17a>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x20,%eax
je     12aa <isPageNumber+0x17a>
movl   $0x9,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    12af <isPageNumber+0x17f>
jmp    12b4 <isPageNumber+0x184>
mov    -0x10(%rbp),%rdx
lea    0xd5e(%rip),%rdi
mov    $0x8,%ecx
mov    %ecx,%esi
call   1030 <editDistanceP@plt>
cmp    $0x0,%eax
jg     13a6 <isPageNumber+0x276>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
imul   $0x64,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x7(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    13a1 <isPageNumber+0x271>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x20,%eax
je     13a1 <isPageNumber+0x271>
movl   $0x8,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    13a6 <isPageNumber+0x276>
jmp    13ab <isPageNumber+0x27b>
mov    -0x10(%rbp),%rdx
lea    0xc70(%rip),%rdi
mov    $0x7,%ecx
mov    %ecx,%esi
call   1030 <editDistanceP@plt>
cmp    $0x0,%eax
jg     1480 <isPageNumber+0x350>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    147b <isPageNumber+0x34b>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x20,%eax
je     147b <isPageNumber+0x34b>
movl   $0x7,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    1480 <isPageNumber+0x350>
jmp    1485 <isPageNumber+0x355>
mov    -0x10(%rbp),%rdx
lea    0xb97(%rip),%rdi
mov    $0x6,%ecx
mov    %ecx,%esi
call   1030 <editDistanceP@plt>
cmp    $0x0,%eax
jg     1543 <isPageNumber+0x413>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%eax
shl    $0x0,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    153e <isPageNumber+0x40e>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x20,%eax
je     153e <isPageNumber+0x40e>
movl   $0x7,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    1543 <isPageNumber+0x413>
jmp    1548 <isPageNumber+0x418>
mov    -0x10(%rbp),%rdx
lea    0xadb(%rip),%rdi
mov    $0x5,%ecx
mov    %ecx,%esi
call   1030 <editDistanceP@plt>
cmp    $0x0,%eax
jg     15e9 <isPageNumber+0x4b9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1040 <ch2int@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x74(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    15e4 <isPageNumber+0x4b4>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x20,%eax
je     15e4 <isPageNumber+0x4b4>
movl   $0x5,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    15e9 <isPageNumber+0x4b9>
jmp    15ee <isPageNumber+0x4be>
mov    -0x10(%rbp),%rax
mov    $0x6e,%edi
movsbl (%rax),%esi
call   1050 <fitPattern@plt>
cmp    $0x0,%eax
je     16b6 <isPageNumber+0x586>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    16b6 <isPageNumber+0x586>
mov    -0x10(%rbp),%rax
mov    $0x6e,%edi
movsbl 0x2(%rax),%esi
call   1050 <fitPattern@plt>
cmp    $0x0,%eax
je     16b6 <isPageNumber+0x586>
mov    -0x10(%rbp),%rax
mov    $0x6e,%edi
movsbl 0x3(%rax),%esi
call   1050 <fitPattern@plt>
cmp    $0x0,%eax
je     16b6 <isPageNumber+0x586>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1040 <ch2int@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    16b1 <isPageNumber+0x581>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
je     16b1 <isPageNumber+0x581>
movl   $0x4,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    16b6 <isPageNumber+0x586>
jmp    16bb <isPageNumber+0x58b>
mov    -0x10(%rbp),%rax
mov    $0x6e,%edi
movsbl (%rax),%esi
call   1050 <fitPattern@plt>
cmp    $0x0,%eax
je     174e <isPageNumber+0x61e>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    174e <isPageNumber+0x61e>
mov    -0x10(%rbp),%rax
mov    $0x6e,%edi
movsbl 0x2(%rax),%esi
call   1050 <fitPattern@plt>
cmp    $0x0,%eax
je     174e <isPageNumber+0x61e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%edi
call   1040 <ch2int@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1749 <isPageNumber+0x619>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
je     1749 <isPageNumber+0x619>
movl   $0x3,-0x4(%rbp)
jmp    175a <isPageNumber+0x62a>
jmp    174e <isPageNumber+0x61e>
jmp    1753 <isPageNumber+0x623>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPageNumber>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
cmp    $0x3,%esi
jl     14be <isPageNumber+0x38e>
cmp    $0x9,%esi
mov    $0x9,%eax
cmovb  %esi,%eax
add    $0xfffffffd,%eax
cmp    $0x6,%eax
ja     14bc <isPageNumber+0x38c>
mov    %rdi,%rbx
lea    0xe9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xea9(%rip),%rdi
mov    $0x9,%esi
mov    %rbx,%rdx
mov    $0x9,%ecx
call   1030 <editDistanceP@plt>
test   %eax,%eax
jg     1219 <isPageNumber+0xe9>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%r14d
movsbl 0x1(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
add    %r14d,%ebp
movsbl 0x2(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%r14d
movsbl 0x3(%rbx),%edi
call   1040 <ch2int@plt>
mov    %eax,%r15d
add    %r14d,%r15d
movsbl 0x5(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%r14d
movsbl 0x6(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
add    %r14d,%ebp
movsbl 0x7(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%ebp
movsbl 0x8(%rbx),%edi
call   1040 <ch2int@plt>
add    %ebp,%eax
cmp    %r15d,%eax
jle    1219 <isPageNumber+0xe9>
mov    $0x9,%eax
cmpb   $0x20,0x4(%rbx)
jne    14be <isPageNumber+0x38e>
lea    0xdfd(%rip),%rdi
mov    $0x8,%esi
mov    %rbx,%rdx
mov    $0x8,%ecx
call   1030 <editDistanceP@plt>
test   %eax,%eax
jg     12af <isPageNumber+0x17f>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
movsbl 0x1(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%r14d
movsbl 0x2(%rbx),%edi
call   1040 <ch2int@plt>
mov    %eax,%r15d
add    %r14d,%r15d
movsbl 0x4(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x3e8,%eax,%r14d
movsbl 0x5(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
add    %r14d,%ebp
movsbl 0x6(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%ebp
movsbl 0x7(%rbx),%edi
call   1040 <ch2int@plt>
add    %ebp,%eax
cmp    %r15d,%eax
jle    12af <isPageNumber+0x17f>
mov    $0x8,%eax
cmpb   $0x20,0x3(%rbx)
jne    14be <isPageNumber+0x38e>
lea    0xd70(%rip),%rdi
mov    $0x7,%esi
mov    %rbx,%rdx
mov    $0x7,%ecx
call   1030 <editDistanceP@plt>
test   %eax,%eax
jg     1332 <isPageNumber+0x202>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
movsbl 0x1(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%r14d
movsbl 0x2(%rbx),%edi
call   1040 <ch2int@plt>
mov    %eax,%ebp
add    %r14d,%ebp
movsbl 0x4(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%r14d
movsbl 0x5(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    (%r14,%rax,2),%r14d
movsbl 0x6(%rbx),%edi
call   1040 <ch2int@plt>
add    %r14d,%eax
cmp    %ebp,%eax
jle    1332 <isPageNumber+0x202>
mov    $0x7,%eax
cmpb   $0x20,0x3(%rbx)
jne    14be <isPageNumber+0x38e>
lea    0xcee(%rip),%rdi
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x6,%ecx
call   1030 <editDistanceP@plt>
test   %eax,%eax
jg     13a2 <isPageNumber+0x272>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%ebp
movsbl 0x1(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rbp,2),%r14d
movsbl 0x3(%rbx),%edi
call   1040 <ch2int@plt>
imul   $0x64,%eax,%ebp
movsbl 0x4(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%eax
lea    0x0(%rbp,%rax,2),%ebp
movsbl 0x5(%rbx),%edi
call   1040 <ch2int@plt>
add    %ebp,%eax
cmp    %r14d,%eax
jle    13a2 <isPageNumber+0x272>
mov    $0x7,%eax
cmpb   $0x20,0x2(%rbx)
jne    14be <isPageNumber+0x38e>
lea    0xc85(%rip),%rdi
mov    $0x5,%esi
mov    %rbx,%rdx
mov    $0x5,%ecx
call   1030 <editDistanceP@plt>
test   %eax,%eax
jg     1403 <isPageNumber+0x2d3>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%ebp
movsbl 0x1(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rbp,2),%r14d
movsbl 0x3(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%ebp
movsbl 0x4(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rbp,2),%eax
cmp    %r14d,%eax
jle    1403 <isPageNumber+0x2d3>
mov    $0x5,%eax
cmpb   $0x20,0x2(%rbx)
jne    14be <isPageNumber+0x38e>
movsbl (%rbx),%esi
mov    $0x6e,%edi
call   1050 <fitPattern@plt>
test   %eax,%eax
je     1471 <isPageNumber+0x341>
cmpb   $0x2d,0x1(%rbx)
jne    1471 <isPageNumber+0x341>
movsbl 0x2(%rbx),%esi
mov    $0x6e,%edi
call   1050 <fitPattern@plt>
test   %eax,%eax
je     1471 <isPageNumber+0x341>
movsbl 0x3(%rbx),%esi
mov    $0x6e,%edi
call   1050 <fitPattern@plt>
test   %eax,%eax
je     1471 <isPageNumber+0x341>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
mov    %eax,%r14d
movsbl 0x2(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rax,4),%ebp
movsbl 0x3(%rbx),%edi
call   1040 <ch2int@plt>
lea    (%rax,%rbp,2),%eax
cmp    %r14d,%eax
jle    1471 <isPageNumber+0x341>
mov    $0x4,%eax
cmpb   $0x20,0x1(%rbx)
jne    14be <isPageNumber+0x38e>
movsbl (%rbx),%esi
mov    $0x6e,%edi
call   1050 <fitPattern@plt>
test   %eax,%eax
je     14bc <isPageNumber+0x38c>
cmpb   $0x2d,0x1(%rbx)
jne    14bc <isPageNumber+0x38c>
movsbl 0x2(%rbx),%esi
mov    $0x6e,%edi
call   1050 <fitPattern@plt>
test   %eax,%eax
je     14bc <isPageNumber+0x38c>
movsbl (%rbx),%edi
call   1040 <ch2int@plt>
mov    %eax,%ebp
movsbl 0x2(%rbx),%edi
call   1040 <ch2int@plt>
cmp    %ebp,%eax
jle    14bc <isPageNumber+0x38c>
mov    $0x3,%eax
cmpb   $0x20,0x1(%rbx)
jne    14be <isPageNumber+0x38e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"nnnnennnn\00"
@.str.1 = [9 x i8] c"nnnennnn\00"
@.str.2 = [8 x i8] c"nnnennn\00"
@.str.3 = [7 x i8] c"nnennn\00"
@.str.4 = [6 x i8] c"nnenn\00"
define i32 @isPageNumber(i8* %0, i32 %1) {
%3 = icmp slt i32 %1, 3
br i1 %3, label %231, label %4
4: ; preds = %2
%5 = icmp ult i32 %1, 9
%6 = select i1 %5, i32 %1, i32 9
switch i32 %6, label %230 [
i32 9, label %7
i32 8, label %51
i32 7, label %90
i32 6, label %124
i32 5, label %153
i32 4, label %177
i32 3, label %208
]
7: ; preds = %4
%8 = tail call i32 @editDistanceP(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9, i8* %0, i32 9)
%9 = icmp slt i32 %8, 1
br i1 %9, label %10, label %51
10: ; preds = %7
%11 = load i8, i8* %0
%12 = tail call i32 @ch2int(i8 signext %11)
%13 = mul nsw i32 %12, 1000
%14 = getelementptr inbounds i8, i8* %0, i64 1
%15 = load i8, i8* %14
%16 = tail call i32 @ch2int(i8 signext %15)
%17 = mul nsw i32 %16, 100
%18 = add nsw i32 %17, %13
%19 = getelementptr inbounds i8, i8* %0, i64 2
%20 = load i8, i8* %19
%21 = tail call i32 @ch2int(i8 signext %20)
%22 = mul nsw i32 %21, 10
%23 = add nsw i32 %18, %22
%24 = getelementptr inbounds i8, i8* %0, i64 3
%25 = load i8, i8* %24
%26 = tail call i32 @ch2int(i8 signext %25)
%27 = add nsw i32 %23, %26
%28 = getelementptr inbounds i8, i8* %0, i64 5
%29 = load i8, i8* %28
%30 = tail call i32 @ch2int(i8 signext %29)
%31 = mul nsw i32 %30, 1000
%32 = getelementptr inbounds i8, i8* %0, i64 6
%33 = load i8, i8* %32
%34 = tail call i32 @ch2int(i8 signext %33)
%35 = mul nsw i32 %34, 100
%36 = add nsw i32 %35, %31
%37 = getelementptr inbounds i8, i8* %0, i64 7
%38 = load i8, i8* %37
%39 = tail call i32 @ch2int(i8 signext %38)
%40 = mul nsw i32 %39, 10
%41 = add nsw i32 %36, %40
%42 = getelementptr inbounds i8, i8* %0, i64 8
%43 = load i8, i8* %42
%44 = tail call i32 @ch2int(i8 signext %43)
%45 = add nsw i32 %41, %44
%46 = icmp sgt i32 %45, %27
br i1 %46, label %47, label %51
47: ; preds = %10
%48 = getelementptr inbounds i8, i8* %0, i64 4
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, 32
br i1 %50, label %51, label %231
51: ; preds = %7, %47, %10, %4
%52 = tail call i32 @editDistanceP(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 8, i8* %0, i32 8)
%53 = icmp slt i32 %52, 1
br i1 %53, label %54, label %90
54: ; preds = %51
%55 = load i8, i8* %0
%56 = tail call i32 @ch2int(i8 signext %55)
%57 = mul nsw i32 %56, 100
%58 = getelementptr inbounds i8, i8* %0, i64 1
%59 = load i8, i8* %58
%60 = tail call i32 @ch2int(i8 signext %59)
%61 = mul nsw i32 %60, 10
%62 = add nsw i32 %61, %57
%63 = getelementptr inbounds i8, i8* %0, i64 2
%64 = load i8, i8* %63
%65 = tail call i32 @ch2int(i8 signext %64)
%66 = add nsw i32 %62, %65
%67 = getelementptr inbounds i8, i8* %0, i64 4
%68 = load i8, i8* %67
%69 = tail call i32 @ch2int(i8 signext %68)
%70 = mul nsw i32 %69, 1000
%71 = getelementptr inbounds i8, i8* %0, i64 5
%72 = load i8, i8* %71
%73 = tail call i32 @ch2int(i8 signext %72)
%74 = mul nsw i32 %73, 100
%75 = add nsw i32 %74, %70
%76 = getelementptr inbounds i8, i8* %0, i64 6
%77 = load i8, i8* %76
%78 = tail call i32 @ch2int(i8 signext %77)
%79 = mul nsw i32 %78, 10
%80 = add nsw i32 %75, %79
%81 = getelementptr inbounds i8, i8* %0, i64 7
%82 = load i8, i8* %81
%83 = tail call i32 @ch2int(i8 signext %82)
%84 = add nsw i32 %80, %83
%85 = icmp sgt i32 %84, %66
br i1 %85, label %86, label %90
86: ; preds = %54
%87 = getelementptr inbounds i8, i8* %0, i64 3
%88 = load i8, i8* %87
%89 = icmp eq i8 %88, 32
br i1 %89, label %90, label %231
90: ; preds = %51, %86, %54, %4
%91 = tail call i32 @editDistanceP(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7, i8* %0, i32 7)
%92 = icmp slt i32 %91, 1
br i1 %92, label %93, label %124
93: ; preds = %90
%94 = load i8, i8* %0
%95 = tail call i32 @ch2int(i8 signext %94)
%96 = mul nsw i32 %95, 100
%97 = getelementptr inbounds i8, i8* %0, i64 1
%98 = load i8, i8* %97
%99 = tail call i32 @ch2int(i8 signext %98)
%100 = mul nsw i32 %99, 10
%101 = add nsw i32 %100, %96
%102 = getelementptr inbounds i8, i8* %0, i64 2
%103 = load i8, i8* %102
%104 = tail call i32 @ch2int(i8 signext %103)
%105 = add nsw i32 %101, %104
%106 = getelementptr inbounds i8, i8* %0, i64 4
%107 = load i8, i8* %106
%108 = tail call i32 @ch2int(i8 signext %107)
%109 = mul nsw i32 %108, 100
%110 = getelementptr inbounds i8, i8* %0, i64 5
%111 = load i8, i8* %110
%112 = tail call i32 @ch2int(i8 signext %111)
%113 = mul nsw i32 %112, 10
%114 = add nsw i32 %113, %109
%115 = getelementptr inbounds i8, i8* %0, i64 6
%116 = load i8, i8* %115
%117 = tail call i32 @ch2int(i8 signext %116)
%118 = add nsw i32 %114, %117
%119 = icmp sgt i32 %118, %105
br i1 %119, label %120, label %124
120: ; preds = %93
%121 = getelementptr inbounds i8, i8* %0, i64 3
%122 = load i8, i8* %121
%123 = icmp eq i8 %122, 32
br i1 %123, label %124, label %231
124: ; preds = %90, %120, %93, %4
%125 = tail call i32 @editDistanceP(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6, i8* %0, i32 6)
%126 = icmp slt i32 %125, 1
br i1 %126, label %127, label %153
127: ; preds = %124
%128 = load i8, i8* %0
%129 = tail call i32 @ch2int(i8 signext %128)
%130 = mul nsw i32 %129, 10
%131 = getelementptr inbounds i8, i8* %0, i64 1
%132 = load i8, i8* %131
%133 = tail call i32 @ch2int(i8 signext %132)
%134 = add nsw i32 %133, %130
%135 = getelementptr inbounds i8, i8* %0, i64 3
%136 = load i8, i8* %135
%137 = tail call i32 @ch2int(i8 signext %136)
%138 = mul nsw i32 %137, 100
%139 = getelementptr inbounds i8, i8* %0, i64 4
%140 = load i8, i8* %139
%141 = tail call i32 @ch2int(i8 signext %140)
%142 = mul nsw i32 %141, 10
%143 = add nsw i32 %142, %138
%144 = getelementptr inbounds i8, i8* %0, i64 5
%145 = load i8, i8* %144
%146 = tail call i32 @ch2int(i8 signext %145)
%147 = add nsw i32 %143, %146
%148 = icmp sgt i32 %147, %134
br i1 %148, label %149, label %153
149: ; preds = %127
%150 = getelementptr inbounds i8, i8* %0, i64 2
%151 = load i8, i8* %150
%152 = icmp eq i8 %151, 32
br i1 %152, label %153, label %231
153: ; preds = %124, %149, %127, %4
%154 = tail call i32 @editDistanceP(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5, i8* %0, i32 5)
%155 = icmp slt i32 %154, 1
br i1 %155, label %156, label %177
156: ; preds = %153
%157 = load i8, i8* %0
%158 = tail call i32 @ch2int(i8 signext %157)
%159 = mul nsw i32 %158, 10
%160 = getelementptr inbounds i8, i8* %0, i64 1
%161 = load i8, i8* %160
%162 = tail call i32 @ch2int(i8 signext %161)
%163 = add nsw i32 %162, %159
%164 = getelementptr inbounds i8, i8* %0, i64 3
%165 = load i8, i8* %164
%166 = tail call i32 @ch2int(i8 signext %165)
%167 = mul nsw i32 %166, 10
%168 = getelementptr inbounds i8, i8* %0, i64 4
%169 = load i8, i8* %168
%170 = tail call i32 @ch2int(i8 signext %169)
%171 = add nsw i32 %170, %167
%172 = icmp sgt i32 %171, %163
br i1 %172, label %173, label %177
173: ; preds = %156
%174 = getelementptr inbounds i8, i8* %0, i64 2
%175 = load i8, i8* %174
%176 = icmp eq i8 %175, 32
br i1 %176, label %177, label %231
177: ; preds = %153, %173, %156, %4
%178 = load i8, i8* %0
%179 = tail call i32 @fitPattern(i8 signext 110, i8 signext %178)
%180 = icmp eq i32 %179, 0
br i1 %180, label %208, label %181
181: ; preds = %177
%182 = getelementptr inbounds i8, i8* %0, i64 1
%183 = load i8, i8* %182
%184 = icmp eq i8 %183, 45
br i1 %184, label %185, label %208
185: ; preds = %181
%186 = getelementptr inbounds i8, i8* %0, i64 2
%187 = load i8, i8* %186
%188 = tail call i32 @fitPattern(i8 signext 110, i8 signext %187)
%189 = icmp eq i32 %188, 0
br i1 %189, label %208, label %190
190: ; preds = %185
%191 = getelementptr inbounds i8, i8* %0, i64 3
%192 = load i8, i8* %191
%193 = tail call i32 @fitPattern(i8 signext 110, i8 signext %192)
%194 = icmp eq i32 %193, 0
br i1 %194, label %208, label %195
195: ; preds = %190
%196 = load i8, i8* %0
%197 = tail call i32 @ch2int(i8 signext %196)
%198 = load i8, i8* %186
%199 = tail call i32 @ch2int(i8 signext %198)
%200 = mul nsw i32 %199, 10
%201 = load i8, i8* %191
%202 = tail call i32 @ch2int(i8 signext %201)
%203 = add nsw i32 %202, %200
%204 = icmp sgt i32 %203, %197
br i1 %204, label %205, label %208
205: ; preds = %195
%206 = load i8, i8* %182
%207 = icmp eq i8 %206, 32
br i1 %207, label %208, label %231
208: ; preds = %177, %181, %185, %190, %205, %195, %4
%209 = load i8, i8* %0
%210 = tail call i32 @fitPattern(i8 signext 110, i8 signext %209)
%211 = icmp eq i32 %210, 0
br i1 %211, label %230, label %212
212: ; preds = %208
%213 = getelementptr inbounds i8, i8* %0, i64 1
%214 = load i8, i8* %213
%215 = icmp eq i8 %214, 45
br i1 %215, label %216, label %230
216: ; preds = %212
%217 = getelementptr inbounds i8, i8* %0, i64 2
%218 = load i8, i8* %217
%219 = tail call i32 @fitPattern(i8 signext 110, i8 signext %218)
%220 = icmp eq i32 %219, 0
br i1 %220, label %230, label %221
221: ; preds = %216
%222 = load i8, i8* %0
%223 = tail call i32 @ch2int(i8 signext %222)
%224 = load i8, i8* %217
%225 = tail call i32 @ch2int(i8 signext %224)
%226 = icmp sgt i32 %225, %223
br i1 %226, label %227, label %230
227: ; preds = %221
%228 = load i8, i8* %213
%229 = icmp eq i8 %228, 32
br i1 %229, label %230, label %231
230: ; preds = %208, %212, %216, %227, %221, %4
br label %231
231: ; preds = %227, %205, %173, %149, %120, %86, %47, %2, %230
%232 = phi i32 [ 0, %230 ], [ 0, %2 ], [ 9, %47 ], [ 8, %86 ], [ 7, %120 ], [ 7, %149 ], [ 5, %173 ], [ 4, %205 ], [ 3, %227 ]
ret i32 %232
}