#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef char *section;
typedef char *page;
typedef scalar_t__ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
scalar_t__ ferror(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, scalar_t__, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int getc(int /*<<< orphan*/ *);
int searchwindex(FILE *wf, char *title, char **ppage, char **psection) {
  static char page[256], section[32];
  static long low, high;
  long mid0, mid1;
  int c;
  unsigned char *pt;
  char *pc;
  if (ftell(wf) == 0) {
    low = 0;
    fseek(wf, (off_t)0, SEEK_END);
    high = ftell(wf);
  }
  while (low <= high) {
    pt = (unsigned char *)title;
    mid0 = mid1 = (low + high) >> 1;
    if (mid0 == 0) {
      if (fseek(wf, (off_t)0, SEEK_SET) != 0)
        return -1;
    } else {
      if (fseek(wf, (off_t)mid0 - 1, SEEK_SET) != 0)
        return -1;
      while ((c = getc(wf)) != EOF && c != '\n')
        mid1++;
      if (ferror(wf))
        return -1;
    }
    for (;;) {
      if ((c = getc(wf)) == ' ' || c == '\t')
        c = 0;
      if (c == 0 || c != *pt)
        break;
      pt++;
    }
    if (c == EOF || *pt <= c) {
      high = mid0 - 1;
    } else {
      low = mid1 + 1;
    }
  }
  if (fseek(wf, (off_t)low, SEEK_SET) != 0)
    return -1;
  do {
    if (low != 0) {
      while ((c = getc(wf)) != EOF && c != '\n')
        low++;
      if (ferror(wf))
        return -1;
    }
    pt = (unsigned char *)title;
    for (;;) {
      if ((c = getc(wf)) == EOF)
        return 0;
      low++;
      if (c == ' ' || c == '\t')
        c = 0;
      if (c == 0 || c != *pt)
        break;
      pt++;
    }
  } while (c < *pt);
  if (*pt != c)
    return 0;
  while ((c = fgetc(wf)) == ' ' || c == '\t') {
  }
  pc = page;
  while (c != ' ' && c != '\t' && c != '(' && c != '\n' && c != EOF) {
    if (pc < ((page) + (sizeof(page) / sizeof((page)[0]))) - 1)
      *pc++ = c;
    c = getc(wf);
  }
  if (pc == page)
    return 0;
  *pc = 0;
  while (c == ' ' || c == '\t')
    c = fgetc(wf);
  if (c != '(')
    return 0;
  pc = section;
  while ((c = fgetc(wf)) != ')' && c != '\n' && c != EOF) {
    if ('A' <= c && c <= 'Z')
      c = c - 'A' + 'a';
    if (pc < ((section) + (sizeof(section) / sizeof((section)[0]))) - 1)
      *pc++ = c;
  }
  *pc = 0;
  if (c != ')' || pc == section)
    return 0;
  while (c != EOF && c != '\n')
    c = getc(wf);
  if (c != '\n')
    return 0;
  *ppage = page;
  *psection = section;
  return 1;
}


x86 assembly (clang, -O0):
<searchwindex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
cmp    $0x0,%rax
jne    11ac <searchwindex+0x5c>
movq   $0x0,0x2ffa(%rip)
mov    -0x10(%rbp),%rdi
mov    0x2e57(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1060 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,0x2fdc(%rip)
jmp    11b1 <searchwindex+0x61>
mov    0x2fc8(%rip),%rax
cmp    0x2fc9(%rip),%rax
jg     1370 <searchwindex+0x220>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    0x2fac(%rip),%rax
add    0x2fad(%rip),%rax
sar    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1223 <searchwindex+0xd3>
mov    -0x10(%rbp),%rdi
mov    0x2dd3(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     121e <searchwindex+0xce>
movl   $0xffffffff,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    12c9 <searchwindex+0x179>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
sub    $0x1,%rsi
mov    0x2d9a(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     1253 <searchwindex+0x103>
movl   $0xffffffff,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    1258 <searchwindex+0x108>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,%ecx
mov    %ecx,-0x3c(%rbp)
xor    %eax,%eax
mov    0x2d71(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x51(%rbp)
je     1284 <searchwindex+0x134>
cmpl   $0xa,-0x3c(%rbp)
setne  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
test   $0x1,%al
jne    1294 <searchwindex+0x144>
jmp    12a5 <searchwindex+0x155>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1258 <searchwindex+0x108>
mov    -0x10(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     12c4 <searchwindex+0x174>
movl   $0xffffffff,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    12c9 <searchwindex+0x179>
jmp    12ce <searchwindex+0x17e>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0x20,%eax
je     12ed <searchwindex+0x19d>
cmpl   $0x9,-0x3c(%rbp)
jne    12f4 <searchwindex+0x1a4>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     1310 <searchwindex+0x1c0>
mov    -0x3c(%rbp),%eax
mov    -0x48(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
je     1315 <searchwindex+0x1c5>
jmp    1326 <searchwindex+0x1d6>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    12ce <searchwindex+0x17e>
mov    -0x3c(%rbp),%eax
mov    0x2cb0(%rip),%rcx
cmp    (%rcx),%eax
je     1348 <searchwindex+0x1f8>
mov    -0x48(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x3c(%rbp),%eax
jg     135c <searchwindex+0x20c>
mov    -0x30(%rbp),%rax
sub    $0x1,%rax
mov    %rax,0x2e31(%rip)
jmp    136b <searchwindex+0x21b>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,0x2e15(%rip)
jmp    11b1 <searchwindex+0x61>
mov    -0x10(%rbp),%rdi
mov    0x2e05(%rip),%rsi
mov    0x2c4e(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
cmp    $0x0,%rax
je     139f <searchwindex+0x24f>
movl   $0xffffffff,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    13a4 <searchwindex+0x254>
cmpq   $0x0,0x2dd4(%rip)
je     142e <searchwindex+0x2de>
jmp    13b7 <searchwindex+0x267>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,%ecx
mov    %ecx,-0x3c(%rbp)
xor    %eax,%eax
mov    0x2c12(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x52(%rbp)
je     13e3 <searchwindex+0x293>
cmpl   $0xa,-0x3c(%rbp)
setne  %al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
test   $0x1,%al
jne    13f3 <searchwindex+0x2a3>
jmp    140a <searchwindex+0x2ba>
mov    0x2d86(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2d7b(%rip)
jmp    13b7 <searchwindex+0x267>
mov    -0x10(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     1429 <searchwindex+0x2d9>
movl   $0xffffffff,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    142e <searchwindex+0x2de>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,-0x3c(%rbp)
mov    0x2b97(%rip),%rcx
cmp    (%rcx),%eax
jne    145d <searchwindex+0x30d>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
mov    0x2d1c(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2d11(%rip)
cmpl   $0x20,-0x3c(%rbp)
je     1483 <searchwindex+0x333>
cmpl   $0x9,-0x3c(%rbp)
jne    148a <searchwindex+0x33a>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     14a6 <searchwindex+0x356>
mov    -0x3c(%rbp),%eax
mov    -0x48(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
je     14ab <searchwindex+0x35b>
jmp    14bc <searchwindex+0x36c>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1436 <searchwindex+0x2e6>
jmp    14c1 <searchwindex+0x371>
mov    -0x3c(%rbp),%eax
mov    -0x48(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
jl     13a4 <searchwindex+0x254>
mov    -0x48(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x3c(%rbp),%eax
je     14ef <searchwindex+0x39f>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    14f4 <searchwindex+0x3a4>
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,%ecx
mov    %ecx,-0x3c(%rbp)
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x53(%rbp)
je     151a <searchwindex+0x3ca>
cmpl   $0x9,-0x3c(%rbp)
sete   %al
mov    %al,-0x53(%rbp)
mov    -0x53(%rbp),%al
test   $0x1,%al
jne    152a <searchwindex+0x3da>
jmp    152f <searchwindex+0x3df>
jmp    14f4 <searchwindex+0x3a4>
lea    0x2b2a(%rip),%rax
mov    %rax,-0x50(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x3c(%rbp)
mov    %al,-0x54(%rbp)
je     1588 <searchwindex+0x438>
xor    %eax,%eax
cmpl   $0x9,-0x3c(%rbp)
mov    %al,-0x54(%rbp)
je     1588 <searchwindex+0x438>
xor    %eax,%eax
cmpl   $0x28,-0x3c(%rbp)
mov    %al,-0x54(%rbp)
je     1588 <searchwindex+0x438>
xor    %eax,%eax
cmpl   $0xa,-0x3c(%rbp)
mov    %al,-0x54(%rbp)
je     1588 <searchwindex+0x438>
mov    -0x3c(%rbp),%eax
mov    0x2a60(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x54(%rbp)
mov    -0x54(%rbp),%al
test   $0x1,%al
jne    1598 <searchwindex+0x448>
jmp    15d6 <searchwindex+0x486>
lea    0x2ac1(%rip),%rax
add    $0xff,%rax
cmp    %rax,-0x50(%rbp)
jae    15c5 <searchwindex+0x475>
mov    -0x3c(%rbp),%eax
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x50(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,-0x3c(%rbp)
jmp    153a <searchwindex+0x3ea>
lea    0x2a83(%rip),%rax
cmp    %rax,-0x50(%rbp)
jne    15f3 <searchwindex+0x4a3>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    $0x1,%al
cmpl   $0x20,-0x3c(%rbp)
mov    %al,-0x55(%rbp)
je     1613 <searchwindex+0x4c3>
cmpl   $0x9,-0x3c(%rbp)
sete   %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    1623 <searchwindex+0x4d3>
jmp    1634 <searchwindex+0x4e4>
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
jmp    15fa <searchwindex+0x4aa>
cmpl   $0x28,-0x3c(%rbp)
je     164a <searchwindex+0x4fa>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
lea    0x2b0f(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,%ecx
mov    %ecx,-0x3c(%rbp)
xor    %eax,%eax
cmp    $0x29,%ecx
mov    %al,-0x56(%rbp)
je     1692 <searchwindex+0x542>
xor    %eax,%eax
cmpl   $0xa,-0x3c(%rbp)
mov    %al,-0x56(%rbp)
je     1692 <searchwindex+0x542>
mov    -0x3c(%rbp),%eax
mov    0x2956(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
test   $0x1,%al
jne    16a2 <searchwindex+0x552>
jmp    16f6 <searchwindex+0x5a6>
mov    $0x41,%eax
cmp    -0x3c(%rbp),%eax
jg     16c6 <searchwindex+0x576>
cmpl   $0x5a,-0x3c(%rbp)
jg     16c6 <searchwindex+0x576>
mov    -0x3c(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x3c(%rbp)
lea    0x2a93(%rip),%rax
add    $0x1f,%rax
cmp    %rax,-0x50(%rbp)
jae    16f1 <searchwindex+0x5a1>
mov    -0x3c(%rbp),%eax
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x50(%rbp)
mov    %cl,(%rax)
jmp    1655 <searchwindex+0x505>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x29,-0x3c(%rbp)
jne    1718 <searchwindex+0x5c8>
lea    0x2a52(%rip),%rax
cmp    %rax,-0x50(%rbp)
jne    1724 <searchwindex+0x5d4>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
jmp    1729 <searchwindex+0x5d9>
mov    -0x3c(%rbp),%ecx
xor    %eax,%eax
mov    0x28ab(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x57(%rbp)
je     174a <searchwindex+0x5fa>
cmpl   $0xa,-0x3c(%rbp)
setne  %al
mov    %al,-0x57(%rbp)
mov    -0x57(%rbp),%al
test   $0x1,%al
jne    175a <searchwindex+0x60a>
jmp    176b <searchwindex+0x61b>
mov    -0x10(%rbp),%rdi
call   1070 <getc@plt>
mov    %eax,-0x3c(%rbp)
jmp    1729 <searchwindex+0x5d9>
cmpl   $0xa,-0x3c(%rbp)
je     1781 <searchwindex+0x631>
movl   $0x0,-0x4(%rbp)
jmp    17a4 <searchwindex+0x654>
mov    -0x20(%rbp),%rax
lea    0x28d4(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
lea    0x29c6(%rip),%rcx
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchwindex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,(%rsp)
mov    %rdi,%r12
call   1050 <ftell@plt>
test   %rax,%rax
je     1182 <searchwindex+0x32>
mov    0x3008(%rip),%rax
jmp    11af <searchwindex+0x5f>
movq   $0x0,0x2ff3(%rip)
mov    0x2e54(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <fseek@plt>
mov    %r12,%rdi
call   1050 <ftell@plt>
mov    %rax,0x2fd9(%rip)
mov    0x2fca(%rip),%rbp
cmp    %rax,%rbp
jle    12df <searchwindex+0x18f>
mov    0x2e0a(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %rbp,%rsi
call   1060 <fseek@plt>
mov    $0xffffffff,%r13d
test   %rax,%rax
jne    1438 <searchwindex+0x2e8>
mov    0x2f97(%rip),%rcx
mov    0x2df0(%rip),%rbp
movabs $0x100000201,%r14
test   %rcx,%rcx
je     1231 <searchwindex+0xe1>
nop
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    $0xa,%eax
je     1220 <searchwindex+0xd0>
cmp    0x0(%rbp),%eax
je     1220 <searchwindex+0xd0>
addq   $0x1,0x2f66(%rip)
01
jmp    1200 <searchwindex+0xb0>
nopl   0x0(%rax)
mov    %r12,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1438 <searchwindex+0x2e8>
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    0x0(%rbp),%eax
je     142d <searchwindex+0x2dd>
mov    (%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x2f29(%rip),%rcx
add    $0x1,%rcx
mov    %rcx,0x2f1e(%rip)
cmp    $0x20,%eax
ja     126f <searchwindex+0x11f>
mov    %eax,%edx
bt     %rdx,%r14
jb     1290 <searchwindex+0x140>
movzbl (%rbx),%edx
cmp    %edx,%eax
jne    1292 <searchwindex+0x142>
add    $0x1,%rbx
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    0x0(%rbp),%eax
jne    1250 <searchwindex+0x100>
jmp    142d <searchwindex+0x2dd>
nopl   0x0(%rax)
xor    %eax,%eax
movzbl (%rbx),%edx
cmp    %edx,%eax
jl     11fa <searchwindex+0xaa>
xor    %r13d,%r13d
cmp    %edx,%eax
jne    1438 <searchwindex+0x2e8>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1040 <fgetc@plt>
cmp    $0x9,%eax
je     12b0 <searchwindex+0x160>
cmp    $0x20,%eax
je     12b0 <searchwindex+0x160>
lea    0x2d97(%rip),%r15
lea    0x2e8f(%rip),%rbx
movabs $0x10100000600,%r14
jmp    1452 <searchwindex+0x302>
mov    0x2cfa(%rip),%r15
mov    $0xffffffff,%r13d
jmp    130e <searchwindex+0x1be>
xchg   %ax,%ax
add    $0xffffffffffffffff,%r14
mov    %r14,0x2e8d(%rip)
mov    0x2e7e(%rip),%rbp
mov    %r14,%rax
cmp    %rax,%rbp
jg     11bf <searchwindex+0x6f>
add    %rbp,%rax
mov    %rax,%r14
sar    %r14
cmp    $0x1,%rax
ja     1340 <searchwindex+0x1f0>
mov    0x2cac(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <fseek@plt>
mov    $0x0,%ebp
test   %rax,%rax
je     1397 <searchwindex+0x247>
jmp    1432 <searchwindex+0x2e2>
nop
lea    -0x1(%r14),%rbp
mov    0x2c85(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %rbp,%rsi
call   1060 <fseek@plt>
test   %rax,%rax
jne    1438 <searchwindex+0x2e8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1070 <getc@plt>
add    $0x1,%rbp
cmp    $0xa,%eax
je     1386 <searchwindex+0x236>
cmp    (%r15),%eax
jne    1370 <searchwindex+0x220>
mov    %r12,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1438 <searchwindex+0x2e8>
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    $0x20,%eax
ja     13f0 <searchwindex+0x2a0>
xor    %edx,%edx
mov    %eax,%ecx
movabs $0x100000201,%rsi
bt     %rcx,%rsi
mov    (%rsp),%rbx
jae    13f0 <searchwindex+0x2a0>
cmp    (%r15),%edx
je     12f0 <searchwindex+0x1a0>
movzbl (%rbx),%eax
cmp    %eax,%edx
jge    12f0 <searchwindex+0x1a0>
add    $0x1,%rbp
mov    %rbp,0x2da5(%rip)
mov    0x2da6(%rip),%rax
cmp    %rax,%rbp
jle    130e <searchwindex+0x1be>
jmp    11bf <searchwindex+0x6f>
mov    (%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%ecx
cmp    %ecx,%eax
jne    1429 <searchwindex+0x2d9>
add    $0x1,%rbx
mov    %r12,%rdi
call   1070 <getc@plt>
mov    %eax,%ecx
xor    %edx,%edx
cmp    $0x9,%eax
cmove  %edx,%eax
cmp    $0x20,%ecx
cmove  %edx,%eax
test   %eax,%eax
jne    1400 <searchwindex+0x2b0>
jmp    13bc <searchwindex+0x26c>
mov    %eax,%edx
jmp    13bc <searchwindex+0x26c>
xor    %r13d,%r13d
jmp    1438 <searchwindex+0x2e8>
mov    $0xffffffff,%r13d
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    $0x28,%eax
ja     145f <searchwindex+0x30f>
mov    %eax,%ecx
bt     %rcx,%r14
jb     1472 <searchwindex+0x322>
cmp    0x0(%rbp),%eax
je     1472 <searchwindex+0x322>
cmp    %rbx,%r15
jae    144a <searchwindex+0x2fa>
mov    %al,(%r15)
add    $0x1,%r15
jmp    144a <searchwindex+0x2fa>
lea    0x2be7(%rip),%r14
cmp    %r14,%r15
je     1438 <searchwindex+0x2e8>
movb   $0x0,(%r15)
jmp    1498 <searchwindex+0x348>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1040 <fgetc@plt>
cmp    $0x9,%eax
je     1490 <searchwindex+0x340>
cmp    $0x20,%eax
je     1490 <searchwindex+0x340>
cmp    $0x28,%eax
jne    1438 <searchwindex+0x2e8>
lea    0x2cb2(%rip),%r15
lea    0x2cca(%rip),%rbx
mov    %r12,%rdi
call   1040 <fgetc@plt>
cmp    $0xa,%eax
je     14e9 <searchwindex+0x399>
cmp    $0x29,%eax
je     14e9 <searchwindex+0x399>
cmp    0x0(%rbp),%eax
je     14e9 <searchwindex+0x399>
cmp    %rbx,%r15
jae    14b5 <searchwindex+0x365>
lea    -0x41(%rax),%ecx
lea    0x20(%rax),%edx
cmp    $0x1a,%ecx
movzbl %dl,%ecx
cmovae %eax,%ecx
mov    %cl,(%r15)
add    $0x1,%r15
jmp    14b5 <searchwindex+0x365>
movb   $0x0,(%r15)
cmp    $0x29,%eax
jne    1438 <searchwindex+0x2e8>
lea    0x2c63(%rip),%rbx
cmp    %rbx,%r15
je     1438 <searchwindex+0x2e8>
cmpl   $0x29,0x0(%rbp)
je     1438 <searchwindex+0x2e8>
mov    %r12,%rdi
call   1070 <getc@plt>
cmp    $0xa,%eax
je     1522 <searchwindex+0x3d2>
cmp    0x0(%rbp),%eax
jne    1510 <searchwindex+0x3c0>
cmp    $0xa,%eax
jne    1438 <searchwindex+0x2e8>
mov    0x8(%rsp),%rax
mov    %r14,(%rax)
mov    0x10(%rsp),%rax
mov    %rbx,(%rax)
mov    $0x1,%r13d
jmp    1438 <searchwindex+0x2e8>

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

LLVM IR (-O2):
@searchwindex.page = internal global [256 x i8] zeroinitializer
@searchwindex.section = internal global [32 x i8] zeroinitializer
@searchwindex.low = internal unnamed_addr global i64 0
@searchwindex.high = internal unnamed_addr global i64 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@EOF = global i32 0
define i32 @searchwindex(i32* nocapture %0, i8* nocapture %1, i8** nocapture writeonly %2, i8** nocapture writeonly %3) {
%5 = tail call i64 @ftell(i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = load i64, i64* @searchwindex.high
br label %13
9: ; preds = %4
store i64 0, i64* @searchwindex.low
%10 = load i32, i32* @SEEK_END
%11 = tail call i64 @fseek(i32* %0, i64 0, i32 %10)
%12 = tail call i64 @ftell(i32* %0)
store i64 %12, i64* @searchwindex.high
br label %13
13: ; preds = %7, %9
%14 = phi i64 [ %8, %7 ], [ %12, %9 ]
%15 = load i64, i64* @searchwindex.low
%16 = icmp sgt i64 %15, %14
br i1 %16, label %79, label %17
17: ; preds = %13, %75
%18 = phi i64 [ %76, %75 ], [ %14, %13 ]
%19 = phi i64 [ %77, %75 ], [ %15, %13 ]
%20 = add nsw i64 %18, %19
%21 = ashr i64 %20, 1
%22 = icmp ult i64 %20, 2
br i1 %22, label %23, label %27
23: ; preds = %17
%24 = load i32, i32* @SEEK_SET
%25 = tail call i64 @fseek(i32* %0, i64 0, i32 %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %43, label %187
27: ; preds = %17
%28 = add nsw i64 %21, -1
%29 = load i32, i32* @SEEK_SET
%30 = tail call i64 @fseek(i32* %0, i64 %28, i32 %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %187
32: ; preds = %27, %32
%33 = phi i64 [ %39, %32 ], [ %21, %27 ]
%34 = tail call i32 @getc(i32* %0)
%35 = load i32, i32* @EOF
%36 = icmp ne i32 %34, %35
%37 = icmp ne i32 %34, 10
%38 = and i1 %37, %36
%39 = add nsw i64 %33, 1
br i1 %38, label %32, label %40
40: ; preds = %32
%41 = tail call i64 @ferror(i32* %0)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %187
43: ; preds = %40, %23
%44 = phi i64 [ 0, %23 ], [ %33, %40 ]
%45 = tail call i32 @getc(i32* %0)
switch i32 %45, label %46 [
i32 32, label %60
i32 9, label %60
i32 0, label %60
]
46: ; preds = %43, %52
%47 = phi i32 [ %58, %52 ], [ %45, %43 ]
%48 = phi i8* [ %53, %52 ], [ %1, %43 ]
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = icmp eq i32 %47, %50
br i1 %51, label %52, label %60
52: ; preds = %46
%53 = getelementptr inbounds i8, i8* %48, i64 1
%54 = tail call i32 @getc(i32* %0)
%55 = icmp eq i32 %54, 32
%56 = icmp eq i32 %54, 9
%57 = or i1 %55, %56
%58 = select i1 %57, i32 0, i32 %54
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %46
60: ; preds = %46, %52, %43, %43, %43
%61 = phi i8* [ %1, %43 ], [ %1, %43 ], [ %1, %43 ], [ %53, %52 ], [ %48, %46 ]
%62 = phi i32 [ 0, %43 ], [ 0, %43 ], [ 0, %43 ], [ 0, %52 ], [ %47, %46 ]
%63 = load i32, i32* @EOF
%64 = icmp eq i32 %62, %63
br i1 %64, label %69, label %65
65: ; preds = %60
%66 = load i8, i8* %61
%67 = zext i8 %66 to i32
%68 = icmp slt i32 %62, %67
br i1 %68, label %72, label %69
69: ; preds = %65, %60
%70 = add nsw i64 %21, -1
store i64 %70, i64* @searchwindex.high
%71 = load i64, i64* @searchwindex.low
br label %75
72: ; preds = %65
%73 = add nsw i64 %44, 1
store i64 %73, i64* @searchwindex.low
%74 = load i64, i64* @searchwindex.high
br label %75
75: ; preds = %72, %69
%76 = phi i64 [ %74, %72 ], [ %70, %69 ]
%77 = phi i64 [ %73, %72 ], [ %71, %69 ]
%78 = icmp sgt i64 %77, %76
br i1 %78, label %79, label %17
79: ; preds = %75, %13
%80 = phi i64 [ %15, %13 ], [ %77, %75 ]
%81 = load i32, i32* @SEEK_SET
%82 = tail call i64 @fseek(i32* %0, i64 %80, i32 %81)
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %187
84: ; preds = %79
%85 = load i64, i64* @searchwindex.low
br label %86
86: ; preds = %84, %124
%87 = phi i64 [ %85, %84 ], [ %114, %124 ]
%88 = icmp eq i64 %87, 0
br i1 %88, label %106, label %89
89: ; preds = %86
%90 = tail call i32 @getc(i32* %0)
%91 = load i32, i32* @EOF
%92 = icmp ne i32 %90, %91
%93 = icmp ne i32 %90, 10
%94 = and i1 %93, %92
br i1 %94, label %95, label %103
95: ; preds = %89, %95
%96 = load i64, i64* @searchwindex.low
%97 = add nsw i64 %96, 1
store i64 %97, i64* @searchwindex.low
%98 = tail call i32 @getc(i32* %0)
%99 = load i32, i32* @EOF
%100 = icmp ne i32 %98, %99
%101 = icmp ne i32 %98, 10
%102 = and i1 %101, %100
br i1 %102, label %95, label %103
103: ; preds = %95, %89
%104 = tail call i64 @ferror(i32* %0)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %187
106: ; preds = %103, %86
%107 = tail call i32 @getc(i32* %0)
%108 = load i32, i32* @EOF
%109 = icmp eq i32 %107, %108
br i1 %109, label %187, label %110
110: ; preds = %106, %119
%111 = phi i32 [ %121, %119 ], [ %107, %106 ]
%112 = phi i8* [ %120, %119 ], [ %1, %106 ]
%113 = load i64, i64* @searchwindex.low
%114 = add nsw i64 %113, 1
store i64 %114, i64* @searchwindex.low
switch i32 %111, label %115 [
i32 32, label %124
i32 9, label %124
i32 0, label %124
]
115: ; preds = %110
%116 = load i8, i8* %112
%117 = zext i8 %116 to i32
%118 = icmp eq i32 %111, %117
br i1 %118, label %119, label %124
119: ; preds = %115
%120 = getelementptr inbounds i8, i8* %112, i64 1
%121 = tail call i32 @getc(i32* %0)
%122 = load i32, i32* @EOF
%123 = icmp eq i32 %121, %122
br i1 %123, label %187, label %110
124: ; preds = %110, %110, %110, %115
%125 = phi i32 [ %111, %115 ], [ 0, %110 ], [ 0, %110 ], [ 0, %110 ]
%126 = load i8, i8* %112
%127 = zext i8 %126 to i32
%128 = icmp slt i32 %125, %127
br i1 %128, label %86, label %129
129: ; preds = %124
%130 = zext i8 %126 to i32
%131 = icmp eq i32 %125, %130
br i1 %131, label %132, label %187
132: ; preds = %129, %134
%133 = tail call i32 @fgetc(i32* %0)
switch i32 %133, label %135 [
i32 32, label %134
i32 9, label %134
]
134: ; preds = %132, %132
br label %132
135: ; preds = %132, %146
%136 = phi i32 [ %148, %146 ], [ %133, %132 ]
%137 = phi i8* [ %147, %146 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @searchwindex.page, i64 0, i64 0), %132 ]
switch i32 %136, label %138 [
i32 40, label %149
i32 32, label %149
i32 10, label %149
i32 9, label %149
]
138: ; preds = %135
%139 = load i32, i32* @EOF
%140 = icmp eq i32 %136, %139
br i1 %140, label %149, label %141
141: ; preds = %138
%142 = icmp ult i8* %137, getelementptr inbounds ([256 x i8], [256 x i8]* @searchwindex.page, i64 0, i64 255)
br i1 %142, label %143, label %146
143: ; preds = %141
%144 = trunc i32 %136 to i8
%145 = getelementptr inbounds i8, i8* %137, i64 1
store i8 %144, i8* %137
br label %146
146: ; preds = %143, %141
%147 = phi i8* [ %145, %143 ], [ %137, %141 ]
%148 = tail call i32 @getc(i32* %0)
br label %135
149: ; preds = %135, %135, %135, %135, %138
%150 = icmp eq i8* %137, getelementptr inbounds ([256 x i8], [256 x i8]* @searchwindex.page, i64 0, i64 0)
br i1 %150, label %187, label %151
151: ; preds = %149
store i8 0, i8* %137
br label %152
152: ; preds = %154, %151
%153 = phi i32 [ %136, %151 ], [ %155, %154 ]
switch i32 %153, label %187 [
i32 32, label %154
i32 9, label %154
i32 40, label %169
]
154: ; preds = %152, %152
%155 = tail call i32 @fgetc(i32* %0)
br label %152
156: ; preds = %169, %161
%157 = tail call i32 @fgetc(i32* %0)
switch i32 %157, label %158 [
i32 41, label %172
i32 10, label %172
]
158: ; preds = %156
%159 = load i32, i32* @EOF
%160 = icmp eq i32 %157, %159
br i1 %160, label %172, label %161
161: ; preds = %158
br i1 %171, label %162, label %156
162: ; preds = %161
%163 = add i32 %157, -65
%164 = icmp ult i32 %163, 26
%165 = add nsw i32 %157, 32
%166 = select i1 %164, i32 %165, i32 %157
%167 = trunc i32 %166 to i8
%168 = getelementptr inbounds i8, i8* %170, i64 1
store i8 %167, i8* %170
br label %169
169: ; preds = %152, %162
%170 = phi i8* [ %168, %162 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @searchwindex.section, i64 0, i64 0), %152 ]
%171 = icmp ult i8* %170, getelementptr inbounds ([32 x i8], [32 x i8]* @searchwindex.section, i64 0, i64 31)
br label %156
172: ; preds = %156, %156, %158
%173 = icmp eq i32 %157, 41
store i8 0, i8* %170
%174 = icmp ne i8* %170, getelementptr inbounds ([32 x i8], [32 x i8]* @searchwindex.section, i64 0, i64 0)
%175 = select i1 %173, i1 %174, i1 false
%176 = load i32, i32* @EOF
%177 = icmp ne i32 %176, 41
%178 = select i1 %175, i1 %177, i1 false
br i1 %178, label %179, label %187
179: ; preds = %172, %179
%180 = tail call i32 @getc(i32* %0)
%181 = load i32, i32* @EOF
%182 = icmp ne i32 %180, %181
%183 = icmp ne i32 %180, 10
%184 = and i1 %183, %182
br i1 %184, label %179, label %185
185: ; preds = %179
br i1 %183, label %187, label %186
186: ; preds = %185
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @searchwindex.page, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @searchwindex.section, i64 0, i64 0), i8** %3
br label %187
187: ; preds = %40, %27, %23, %103, %106, %119, %152, %185, %172, %149, %129, %79, %186
%188 = phi i32 [ 1, %186 ], [ -1, %79 ], [ 0, %129 ], [ 0, %149 ], [ 0, %172 ], [ 0, %185 ], [ 0, %152 ], [ 0, %119 ], [ 0, %106 ], [ -1, %103 ], [ -1, %23 ], [ -1, %27 ], [ -1, %40 ]
ret i32 %188
}