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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(long *, int, int, int /*<<< orphan*/ *);
scalar_t__ islower(char);
scalar_t__ isupper(char);
int open_dict(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
scalar_t__ read_item(int *, int *, int *, char *, char *, char *, char *,
                     char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
char tolower(char);
int main() {
  char lroot1[50], lroot2[50], lroot3[50], nom[50];
  char mean[200];
  char fname[50];
  int lclass, ltype, lgen, i;
  long pos;
  FILE *indexf['z' - 'a' + 1];
  if (open_dict(0) == -1) {
    perror("Open error");
    exit(-1);
  }
  for (i = 0; i <= 'z' - 'a'; ++i) {
    sprintf(fname, "lat%c.ind", i + 'a');
    indexf[i] = fopen(fname, "w");
  }
  pos = 0;
  while (read_item(&lclass, &ltype, &lgen, lroot1, lroot2, lroot3, nom, mean) !=
         EOF) {
    if (lroot1[0] == 0 && lclass == 3 && (ltype & 7) == 6) {
      char *f1 = "fer";
      char *f2 = "tul";
      char *f3 = "lat";
      fwrite(&pos, sizeof(long), 1, indexf[f1[0] - 'a']);
      fwrite(&pos, sizeof(long), 1, indexf[f2[0] - 'a']);
      fwrite(&pos, sizeof(long), 1, indexf[f3[0] - 'a']);
    }
    if (isupper(lroot1[0])) {
      lroot1[0] = tolower(lroot1[0]);
    }
    if (islower(lroot1[0])) {
      fwrite(&pos, sizeof(long), 1, indexf[lroot1[0] - 'a']);
    }
    if ((lclass == 1 && (ltype & 7) == 3) ||
        (lclass == 2 && (ltype & 7) == 4)) {
      if (isupper(nom[0])) {
        nom[0] = tolower(nom[0]);
      }
      if (nom[0] != lroot1[0] && islower(nom[0])) {
        fwrite(&pos, sizeof(long), 1, indexf[nom[0] - 'a']);
      }
    }
    if (lclass == 3) {
      if (isupper(lroot2[0])) {
        lroot2[0] = tolower(lroot2[0]);
      }
      if (lroot2[0] != lroot1[0] && islower(lroot2[0])) {
        fwrite(&pos, sizeof(long), 1, indexf[lroot2[0] - 'a']);
      }
      if (isupper(lroot3[0])) {
        lroot3[0] = tolower(lroot3[0]);
      }
      if (lroot3[0] != lroot2[0] && lroot3[0] != lroot1[0] &&
          islower(lroot3[0])) {
        fwrite(&pos, sizeof(long), 1, indexf[lroot3[0] - 'a']);
      }
    }
    if (lclass == 8 || lclass == 9) {
      if (lroot2[0]) {
        if (isupper(lroot2[0])) {
          lroot2[0] = tolower(lroot2[0]);
        }
        if (lroot2[0] != lroot1[0] && islower(lroot2[0])) {
          fwrite(&pos, sizeof(long), 1, indexf[lroot2[0] - 'a']);
        }
      }
      if (lroot3[0]) {
        if (isupper(lroot3[0])) {
          lroot3[0] = tolower(lroot3[0]);
        }
        if (lroot3[0] != lroot2[0] && lroot3[0] != lroot1[0] &&
            islower(lroot3[0])) {
          fwrite(&pos, sizeof(long), 1, indexf[lroot3[0] - 'a']);
        }
      }
    }
    ++pos;
  }
  for (i = 0; i <= 'z' - 'a'; ++i) {
    fclose(indexf[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <open_dict@plt>
cmp    $0xffffffff,%eax
jne    11e8 <main+0x38>
lea    0xe27(%rip),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
movl   $0x0,-0x220(%rbp)
cmpl   $0x19,-0x220(%rbp)
jg     1254 <main+0xa4>
lea    -0x210(%rbp),%rdi
mov    -0x220(%rbp),%edx
add    $0x61,%edx
lea    0xdf5(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x210(%rbp),%rdi
lea    0xdec(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rcx
movslq -0x220(%rbp),%rax
mov    %rcx,-0x300(%rbp,%rax,8)
ff
mov    -0x220(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x220(%rbp)
jmp    11f2 <main+0x42>
movq   $0x0,-0x228(%rbp)
lea    -0x40(%rbp),%rcx
lea    -0x80(%rbp),%r8
lea    -0xc0(%rbp),%r9
lea    -0x100(%rbp),%r10
lea    -0x1d0(%rbp),%rax
lea    -0x214(%rbp),%rdi
lea    -0x218(%rbp),%rsi
lea    -0x21c(%rbp),%rdx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <read_item@plt>
mov    0x2d42(%rip),%rcx
cmp    (%rcx),%rax
je     16fa <main+0x54a>
movsbl -0x40(%rbp),%eax
cmp    $0x0,%eax
jne    138c <main+0x1dc>
cmpl   $0x3,-0x214(%rbp)
jne    138c <main+0x1dc>
mov    -0x218(%rbp),%eax
and    $0x7,%eax
cmp    $0x6,%eax
jne    138c <main+0x1dc>
lea    0xd35(%rip),%rax
mov    %rax,-0x308(%rbp)
lea    0xd2b(%rip),%rax
mov    %rax,-0x310(%rbp)
lea    0xd21(%rip),%rax
mov    %rax,-0x318(%rbp)
mov    -0x308(%rbp),%rax
movsbl (%rax),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    -0x310(%rbp),%rax
movsbl (%rax),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    -0x318(%rbp),%rax
movsbl (%rax),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
movsbl -0x40(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     13ab <main+0x1fb>
movsbl -0x40(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0x40(%rbp)
movsbl -0x40(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     13e5 <main+0x235>
movsbl -0x40(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
cmpl   $0x1,-0x214(%rbp)
jne    1404 <main+0x254>
mov    -0x218(%rbp),%eax
and    $0x7,%eax
cmp    $0x3,%eax
je     1423 <main+0x273>
cmpl   $0x2,-0x214(%rbp)
jne    14a3 <main+0x2f3>
mov    -0x218(%rbp),%eax
and    $0x7,%eax
cmp    $0x4,%eax
jne    14a3 <main+0x2f3>
movsbl -0x100(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     144b <main+0x29b>
movsbl -0x100(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0x100(%rbp)
movsbl -0x100(%rbp),%eax
movsbl -0x40(%rbp),%ecx
cmp    %ecx,%eax
je     149e <main+0x2ee>
movsbl -0x100(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     149e <main+0x2ee>
movsbl -0x100(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    14a3 <main+0x2f3>
cmpl   $0x3,-0x214(%rbp)
jne    15ac <main+0x3fc>
movsbl -0x80(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     14cf <main+0x31f>
movsbl -0x80(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0x80(%rbp)
movsbl -0x80(%rbp),%eax
movsbl -0x40(%rbp),%ecx
cmp    %ecx,%eax
je     1519 <main+0x369>
movsbl -0x80(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1519 <main+0x369>
movsbl -0x80(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
movsbl -0xc0(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     1541 <main+0x391>
movsbl -0xc0(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0xc0(%rbp)
movsbl -0xc0(%rbp),%eax
movsbl -0x80(%rbp),%ecx
cmp    %ecx,%eax
je     15a7 <main+0x3f7>
movsbl -0xc0(%rbp),%eax
movsbl -0x40(%rbp),%ecx
cmp    %ecx,%eax
je     15a7 <main+0x3f7>
movsbl -0xc0(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     15a7 <main+0x3f7>
movsbl -0xc0(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    15ac <main+0x3fc>
cmpl   $0x8,-0x214(%rbp)
je     15c6 <main+0x416>
cmpl   $0x9,-0x214(%rbp)
jne    16e3 <main+0x533>
cmpb   $0x0,-0x80(%rbp)
je     163e <main+0x48e>
movsbl -0x80(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     15ef <main+0x43f>
movsbl -0x80(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0x80(%rbp)
movsbl -0x80(%rbp),%eax
movsbl -0x40(%rbp),%ecx
cmp    %ecx,%eax
je     1639 <main+0x489>
movsbl -0x80(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1639 <main+0x489>
movsbl -0x80(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    163e <main+0x48e>
cmpb   $0x0,-0xc0(%rbp)
je     16de <main+0x52e>
movsbl -0xc0(%rbp),%edi
call   1080 <isupper@plt>
cmp    $0x0,%rax
je     1673 <main+0x4c3>
movsbl -0xc0(%rbp),%edi
call   1070 <tolower@plt>
mov    %al,-0xc0(%rbp)
movsbl -0xc0(%rbp),%eax
movsbl -0x80(%rbp),%ecx
cmp    %ecx,%eax
je     16d9 <main+0x529>
movsbl -0xc0(%rbp),%eax
movsbl -0x40(%rbp),%ecx
cmp    %ecx,%eax
je     16d9 <main+0x529>
movsbl -0xc0(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     16d9 <main+0x529>
movsbl -0xc0(%rbp),%eax
sub    $0x61,%eax
cltq
mov    -0x300(%rbp,%rax,8),%rcx
ff
lea    -0x228(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    16de <main+0x52e>
jmp    16e3 <main+0x533>
mov    -0x228(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x228(%rbp)
jmp    125f <main+0xaf>
movl   $0x0,-0x220(%rbp)
cmpl   $0x19,-0x220(%rbp)
jg     1739 <main+0x589>
movslq -0x220(%rbp),%rax
mov    -0x300(%rbp,%rax,8),%rdi
ff
call   1040 <fclose@plt>
mov    -0x220(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x220(%rbp)
jmp    1704 <main+0x554>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x308,%rsp
xor    %edi,%edi
call   1050 <open_dict@plt>
cmp    $0xffffffff,%eax
je     1774 <main+0x5c4>
xor    %ebx,%ebx
lea    0xe31(%rip),%r14
lea    0x200(%rsp),%rbp
lea    0xe2c(%rip),%r15
nopl   0x0(%rax)
lea    0x61(%rbx),%edx
mov    %rbp,%rdi
mov    %r14,%rsi
call   10b0 <sprintf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1090 <fopen@plt>
mov    %rax,0xf0(%rsp,%rbx,8)
add    $0x1,%rbx
cmp    $0x1a,%rbx
jne    11f0 <main+0x40>
movq   $0x0,0x10(%rsp)
lea    0x240(%rsp),%rax
lea    0x1c0(%rsp),%r14
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x70(%rsp),%rcx
lea    0x30(%rsp),%r8
lea    0xb0(%rsp),%r9
push   %rax
push   %r14
call   1060 <read_item@plt>
add    $0x10,%rsp
mov    0x2d80(%rip),%rbp
cmp    0x0(%rbp),%rax
jne    13d8 <main+0x228>
mov    0xf0(%rsp),%rdi
call   1040 <fclose@plt>
mov    0xf8(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x100(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x108(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x110(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x118(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x120(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x128(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x130(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x138(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x140(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x148(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x150(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x158(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x160(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x168(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x170(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x178(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x180(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x188(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x190(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x198(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x1a0(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x1a8(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x1b0(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x1b8(%rsp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x308,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x118(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x148(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x188(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rbx
lea    0x70(%rsp),%r15
lea    0x30(%rsp),%r12
lea    0xb0(%rsp),%r13
jmp    145c <main+0x2ac>
nopl   0x0(%rax,%rax,1)
addq   $0x1,0x10(%rsp)
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r15,%rcx
mov    %r12,%r8
mov    %r13,%r9
lea    0x240(%rsp),%rax
push   %rax
push   %r14
call   1060 <read_item@plt>
add    $0x10,%rsp
cmp    0x0(%rbp),%rax
je     1272 <main+0xc2>
movzbl 0x70(%rsp),%eax
test   %al,%al
jne    14d2 <main+0x322>
cmpl   $0x3,0x4(%rsp)
jne    14d2 <main+0x322>
mov    0x8(%rsp),%eax
and    $0x7,%eax
cmp    $0x6,%eax
jne    14d0 <main+0x320>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    0x28(%rsp),%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    0x18(%rsp),%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    0x20(%rsp),%rcx
call   10d0 <fwrite@plt>
movzbl 0x70(%rsp),%eax
jmp    14d2 <main+0x322>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
movsbl %al,%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0x70(%rsp),%eax
test   %rcx,%rcx
je     14f3 <main+0x343>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0x70(%rsp)
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1520 <main+0x370>
movsbq 0x70(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
ff
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
je     1540 <main+0x390>
cmp    $0x1,%eax
jne    15b4 <main+0x404>
mov    0x8(%rsp),%eax
and    $0x7,%eax
cmp    $0x3,%eax
je     154c <main+0x39c>
jmp    15b0 <main+0x400>
mov    0x8(%rsp),%eax
and    $0x7,%eax
cmp    $0x4,%eax
jne    15b0 <main+0x400>
movsbl 0x1c0(%rsp),%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0x1c0(%rsp),%eax
test   %rcx,%rcx
je     1578 <main+0x3c8>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0x1c0(%rsp)
cmp    0x70(%rsp),%al
je     15b0 <main+0x400>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     15b0 <main+0x400>
movsbq 0x1c0(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
ff
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
xchg   %ax,%ax
mov    0x4(%rsp),%eax
cmp    $0x3,%eax
jne    1680 <main+0x4d0>
movsbl 0x30(%rsp),%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0x30(%rsp),%eax
test   %rcx,%rcx
je     15e0 <main+0x430>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0x30(%rsp)
cmp    0x70(%rsp),%al
je     1613 <main+0x463>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1613 <main+0x463>
movsbq 0x30(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
movsbl 0xb0(%rsp),%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0xb0(%rsp),%eax
test   %rcx,%rcx
je     163f <main+0x48f>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0xb0(%rsp)
cmp    0x30(%rsp),%al
je     1680 <main+0x4d0>
cmp    0x70(%rsp),%al
je     1680 <main+0x4d0>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1680 <main+0x4d0>
movsbq 0xb0(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
ff
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%eax
and    $0xfffffffe,%eax
cmp    $0x8,%eax
jne    1420 <main+0x270>
movzbl 0x30(%rsp),%eax
test   %al,%al
je     16f0 <main+0x540>
movsbl %al,%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0x30(%rsp),%eax
test   %rcx,%rcx
je     16ba <main+0x50a>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0x30(%rsp)
cmp    0x70(%rsp),%al
je     16f0 <main+0x540>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     16f0 <main+0x540>
movsbq 0x30(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
ff
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
nopl   (%rax)
movzbl 0xb0(%rsp),%eax
test   %al,%al
je     1420 <main+0x270>
movsbl %al,%edi
call   1080 <isupper@plt>
mov    %rax,%rcx
movzbl 0xb0(%rsp),%eax
test   %rcx,%rcx
je     1727 <main+0x577>
movsbl %al,%edi
call   1070 <tolower@plt>
mov    %al,0xb0(%rsp)
cmp    0x30(%rsp),%al
je     1420 <main+0x270>
cmp    0x70(%rsp),%al
je     1420 <main+0x270>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1420 <main+0x270>
movsbq 0xb0(%rsp),%rax
mov    -0x218(%rsp,%rax,8),%rcx
ff
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
jmp    1420 <main+0x270>
lea    0x885(%rip),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>

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

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