#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*/ szLine;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int check_md5sum(void *, unsigned char *, unsigned int);
int /*<<< orphan*/ close_file(void *);
int errno;
int /*<<< orphan*/ errx(int, char *, char const *, int, ...);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
void *open_file(char const *, int);
int /*<<< orphan*/ stdout;
int strerror(int);
int string_to_digest(char const *, unsigned char *);
scalar_t__ strlen(char *);
int check_files(const char *pszFilename, int fText, int fBinaryTextOpt,
                int fQuiet, unsigned fProgress) {
  int rc = 0;
  FILE *pFile;
  pFile = fopen(pszFilename, "r");
  if (pFile) {
    int iLine = 0;
    char szLine[8192];
    while (fgets(szLine, sizeof(szLine), pFile)) {
      const char *pszDigest;
      int fLineText;
      char *psz;
      int rc2;
      iLine++;
      psz = szLine;
      while (*psz == ' ' || *psz == '\t' || *psz == '\n')
        psz++;
      if (!*psz || *psz == '#' || *psz == ';' || *psz == '/')
        continue;
      rc2 = (int)strlen(psz);
      if (psz[rc2 - 1] == '\n')
        psz[rc2 - (rc2 >= 2 && psz[rc2 - 2] == '\r' ? 2 : 1)] = '\0';
      pszDigest = psz;
      while (*psz != ' ' && *psz != '\t' && *psz)
        psz++;
      if (*psz) {
        *psz++ = '\0';
        while (*psz == ' ' || *psz == '\t' || *psz == '\n')
          psz++;
        if (*psz != '*')
          fLineText = fBinaryTextOpt ? fText : 0;
        else {
          fLineText = 0;
          psz++;
        }
        if (*psz) {
          unsigned char Digest[16];
          pszFilename = psz;
          rc2 = string_to_digest(pszDigest, Digest);
          if (!rc2) {
            void *pvFile = open_file(pszFilename, fLineText);
            if (pvFile) {
              if (!fQuiet)
                fprintf(stdout, "%s: ", pszFilename);
              rc2 = check_md5sum(pvFile, Digest, fProgress);
              close_file(pvFile);
              if (!fQuiet) {
                fprintf(stdout, "%s\n",
                        !rc2      ? "OK"
                        : rc2 < 0 ? "FAILURE"
                                  : "ERROR");
                fflush(stdout);
                if (rc2 > 0)
                  errx(1, "Error reading '%s': %s", pszFilename, strerror(rc2));
              }
              if (rc2)
                rc = 1;
            } else {
              if (!fQuiet)
                errx(1, "Failed to open '%s': %s", pszFilename,
                     strerror(errno));
              rc = 1;
            }
          } else if (!fQuiet) {
            errx(1, "%s (%d): Ignoring malformed digest '%s' (digest)",
                 pszFilename, iLine, pszDigest);
            errx(1, "%s (%d):                            %*s^", pszFilename,
                 iLine, rc2 - 1, "");
          }
        } else if (!fQuiet)
          errx(1, "%s (%d): Ignoring malformed line!", pszFilename, iLine);
      } else if (!fQuiet)
        errx(1, "%s (%d): Ignoring malformed line!", pszFilename, iLine);
    }
    fclose(pFile);
  } else {
    errx(1, "Failed to open '%s': %s", pszFilename, strerror(errno));
    rc = 1;
  }
  return rc;
}


x86 assembly (clang, -O0):
<check_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20b0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     17e1 <check_files+0x621>
movl   $0x0,-0x2c(%rbp)
lea    -0x2030(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x2000,%esi
call   10a0 <fgets@plt>
cmp    $0x0,%rax
je     17d3 <check_files+0x613>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
lea    -0x2030(%rbp),%rax
mov    %rax,-0x2048(%rbp)
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2069(%rbp)
je     128b <check_files+0xcb>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2069(%rbp)
je     128b <check_files+0xcb>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2069(%rbp)
mov    -0x2069(%rbp),%al
test   $0x1,%al
jne    129e <check_files+0xde>
jmp    12b5 <check_files+0xf5>
mov    -0x2048(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x2048(%rbp)
jmp    123f <check_files+0x7f>
mov    -0x2048(%rbp),%rax
cmpb   $0x0,(%rax)
je     12fe <check_files+0x13e>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     12fe <check_files+0x13e>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     12fe <check_files+0x13e>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1303 <check_files+0x143>
jmp    1209 <check_files+0x49>
mov    -0x2048(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x204c(%rbp)
mov    -0x2048(%rbp),%rax
mov    -0x204c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    13b5 <check_files+0x1f5>
mov    -0x2048(%rbp),%rax
mov    %rax,-0x2078(%rbp)
mov    -0x204c(%rbp),%eax
mov    %eax,-0x2070(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x204c(%rbp)
mov    %al,-0x206a(%rbp)
jl     1387 <check_files+0x1c7>
mov    -0x2048(%rbp),%rax
mov    -0x204c(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x206a(%rbp)
mov    -0x2078(%rbp),%rax
mov    -0x2070(%rbp),%ecx
mov    -0x206a(%rbp),%dil
mov    $0x1,%edx
mov    $0x2,%esi
test   $0x1,%dil
cmovne %esi,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2048(%rbp),%rax
mov    %rax,-0x2038(%rbp)
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2079(%rbp)
je     140f <check_files+0x24f>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x2079(%rbp)
je     140f <check_files+0x24f>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x2079(%rbp)
mov    -0x2079(%rbp),%al
test   $0x1,%al
jne    1422 <check_files+0x262>
jmp    1439 <check_files+0x279>
mov    -0x2048(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x2048(%rbp)
jmp    13c3 <check_files+0x203>
mov    -0x2048(%rbp),%rax
cmpb   $0x0,(%rax)
je     17a5 <check_files+0x5e5>
mov    -0x2048(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x2048(%rbp)
movb   $0x0,(%rax)
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x207a(%rbp)
je     14ad <check_files+0x2ed>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x207a(%rbp)
je     14ad <check_files+0x2ed>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x207a(%rbp)
mov    -0x207a(%rbp),%al
test   $0x1,%al
jne    14c0 <check_files+0x300>
jmp    14d7 <check_files+0x317>
mov    -0x2048(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x2048(%rbp)
jmp    1461 <check_files+0x2a1>
mov    -0x2048(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     1520 <check_files+0x360>
cmpl   $0x0,-0x10(%rbp)
je     1502 <check_files+0x342>
mov    -0xc(%rbp),%eax
mov    %eax,-0x2080(%rbp)
jmp    150f <check_files+0x34f>
xor    %eax,%eax
mov    %eax,-0x2080(%rbp)
jmp    150f <check_files+0x34f>
mov    -0x2080(%rbp),%eax
mov    %eax,-0x203c(%rbp)
jmp    153c <check_files+0x37c>
movl   $0x0,-0x203c(%rbp)
mov    -0x2048(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x2048(%rbp)
mov    -0x2048(%rbp),%rax
cmpb   $0x0,(%rax)
je     1777 <check_files+0x5b7>
mov    -0x2048(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x2038(%rbp),%rdi
lea    -0x2060(%rbp),%rsi
call   1040 <string_to_digest@plt>
mov    %eax,-0x204c(%rbp)
cmpl   $0x0,-0x204c(%rbp)
jne    1716 <check_files+0x556>
mov    -0x8(%rbp),%rdi
mov    -0x203c(%rbp),%esi
call   1080 <open_file@plt>
mov    %rax,-0x2068(%rbp)
cmpq   $0x0,-0x2068(%rbp)
je     16cb <check_files+0x50b>
cmpl   $0x0,-0x14(%rbp)
jne    15c4 <check_files+0x404>
mov    0x2a26(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xa43(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x2068(%rbp),%rdi
lea    -0x2060(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1050 <check_md5sum@plt>
mov    %eax,-0x204c(%rbp)
mov    -0x2068(%rbp),%rdi
call   1030 <close_file@plt>
cmpl   $0x0,-0x14(%rbp)
jne    16b2 <check_files+0x4f2>
mov    0x29db(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2084(%rbp)
cmpl   $0x0,-0x204c(%rbp)
jne    1625 <check_files+0x465>
lea    0x9f2(%rip),%rax
mov    %rax,-0x2090(%rbp)
jmp    1647 <check_files+0x487>
mov    -0x204c(%rbp),%edx
lea    0x9e4(%rip),%rax
lea    0x9d5(%rip),%rcx
cmp    $0x0,%edx
cmovl  %rcx,%rax
mov    %rax,-0x2090(%rbp)
mov    -0x2084(%rbp),%edi
mov    -0x2090(%rbp),%rdx
lea    0x9ac(%rip),%rsi
call   10b0 <fprintf@plt>
mov    0x2971(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
cmpl   $0x0,-0x204c(%rbp)
jle    16ad <check_files+0x4ed>
mov    -0x8(%rbp),%rax
mov    %rax,-0x2098(%rbp)
mov    -0x204c(%rbp),%edi
call   10e0 <strerror@plt>
mov    -0x2098(%rbp),%rdx
mov    %eax,%ecx
mov    $0x1,%edi
lea    0x976(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
jmp    16b2 <check_files+0x4f2>
cmpl   $0x0,-0x204c(%rbp)
je     16c6 <check_files+0x506>
movl   $0x1,-0x1c(%rbp)
jmp    1711 <check_files+0x551>
cmpl   $0x0,-0x14(%rbp)
jne    170a <check_files+0x54a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20a0(%rbp)
mov    0x28f9(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x20a0(%rbp),%rdx
mov    %eax,%ecx
mov    $0x1,%edi
lea    0x930(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
movl   $0x1,-0x1c(%rbp)
jmp    1772 <check_files+0x5b2>
cmpl   $0x0,-0x14(%rbp)
jne    176d <check_files+0x5ad>
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x2038(%rbp),%r8
mov    $0x1,%edi
lea    0x911(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x204c(%rbp),%r8d
sub    $0x1,%r8d
mov    $0x1,%edi
lea    0x91d(%rip),%rsi
lea    0x8a4(%rip),%r9
mov    $0x0,%al
call   1090 <errx@plt>
jmp    1772 <check_files+0x5b2>
jmp    17a0 <check_files+0x5e0>
cmpl   $0x0,-0x14(%rbp)
jne    179b <check_files+0x5db>
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    $0x1,%edi
lea    0x911(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
jmp    17a0 <check_files+0x5e0>
jmp    17ce <check_files+0x60e>
cmpl   $0x0,-0x14(%rbp)
jne    17c9 <check_files+0x609>
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    $0x1,%edi
lea    0x8e3(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
jmp    17ce <check_files+0x60e>
jmp    1209 <check_files+0x49>
mov    -0x28(%rbp),%rdi
call   1060 <fclose@plt>
jmp    181d <check_files+0x65d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20a8(%rbp)
mov    0x27ed(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0x20a8(%rbp),%rdx
mov    %eax,%ecx
mov    $0x1,%edi
lea    0x824(%rip),%rsi
mov    $0x0,%al
call   1090 <errx@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_files>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2038,%rsp
mov    %r8d,%r14d
mov    %ecx,0x8(%rsp)
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r13
lea    0xe19(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1520 <check_files+0x360>
mov    %rax,%rbp
lea    0x30(%rsp),%rdi
mov    $0x2000,%esi
mov    %rax,%rdx
call   10a0 <fgets@plt>
test   %rax,%rax
mov    %rbp,0x18(%rsp)
je     154d <check_files+0x38d>
mov    %r14d,0x10(%rsp)
test   %r15d,%r15d
cmove  %r15d,%ebx
mov    %ebx,0x14(%rsp)
movabs $0x100000600,%r12
movl   $0x0,0xc(%rsp)
xor    %r14d,%r14d
mov    0x8(%rsp),%ebx
lea    0x30(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r14d
lea    0x32(%rsp),%r15
nopl   0x0(%rax)
movzbl 0x0(%rbp),%eax
cmp    $0x3b,%rax
ja     12c0 <check_files+0x100>
bt     %rax,%r12
jae    1280 <check_files+0xc0>
add    $0x1,%rbp
add    $0x1,%r15
jmp    1260 <check_files+0xa0>
nopw   0x0(%rax,%rax,1)
movabs $0x800800800000001,%rcx
bt     %rax,%rcx
jae    12c0 <check_files+0x100>
mov    %r13,%r15
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x2000,%esi
mov    0x18(%rsp),%rdx
call   10a0 <fgets@plt>
mov    %r15,%r13
test   %rax,%rax
jne    1250 <check_files+0x90>
jmp    1555 <check_files+0x395>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    -0x1(%rax),%ecx
movslq %ecx,%rcx
cmpb   $0xa,0x0(%rbp,%rcx,1)
jne    1304 <check_files+0x144>
cmp    $0x2,%eax
jl     12f1 <check_files+0x131>
mov    $0xfffffffe,%esi
lea    (%rax,%rsi,1),%edx
lea    0x1(%rsi),%rcx
cmpb   $0xd,0x0(%rbp,%rdx,1)
cmove  %rsi,%rcx
jmp    12fa <check_files+0x13a>
mov    $0xfffffffe,%ecx
add    $0x1,%rcx
add    %eax,%ecx
movslq %ecx,%rax
movb   $0x0,0x0(%rbp,%rax,1)
mov    %rbp,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
test   %cl,%cl
je     13da <check_files+0x21a>
cmp    $0x9,%cl
je     132f <check_files+0x16f>
cmp    $0x20,%cl
je     132f <check_files+0x16f>
add    $0x1,%rax
add    $0x1,%r15
jmp    1310 <check_files+0x150>
movb   $0x0,(%rax)
jmp    1344 <check_files+0x184>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15
movzbl -0x1(%r15),%eax
lea    -0x9(%rax),%ecx
cmp    $0x2,%cl
jb     1340 <check_files+0x180>
cmp    $0x20,%al
je     1340 <check_files+0x180>
cmp    $0x2a,%al
jne    13ce <check_files+0x20e>
mov    (%r15),%al
xor    %ecx,%ecx
test   %al,%al
je     13da <check_files+0x21a>
mov    %ecx,%r13d
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
call   1040 <string_to_digest@plt>
test   %eax,%eax
je     1400 <check_files+0x240>
cmpl   $0x0,0x8(%rsp)
jne    13c5 <check_files+0x205>
mov    %eax,%ebx
mov    $0x1,%edi
lea    0xcbc(%rip),%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1090 <errx@plt>
add    $0xffffffff,%ebx
mov    $0x1,%edi
lea    0xcce(%rip),%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %ebx,%r8d
lea    0xc4c(%rip),%r9
xor    %eax,%eax
call   1090 <errx@plt>
mov    0x8(%rsp),%ebx
jmp    1293 <check_files+0xd3>
add    $0xffffffffffffffff,%r15
mov    0x14(%rsp),%ecx
test   %al,%al
jne    1362 <check_files+0x1a2>
test   %ebx,%ebx
jne    1290 <check_files+0xd0>
mov    $0x1,%edi
lea    0xcb7(%rip),%rsi
mov    %r13,%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1090 <errx@plt>
jmp    1290 <check_files+0xd0>
mov    %r15,%rdi
mov    %r13d,%esi
call   1080 <open_file@plt>
test   %rax,%rax
je     14d4 <check_files+0x314>
mov    %rax,%rbp
mov    0x8(%rsp),%ebx
test   %ebx,%ebx
jne    1437 <check_files+0x277>
mov    0x2bb2(%rip),%rax
mov    (%rax),%edi
lea    0xbd3(%rip),%rsi
mov    %r15,%rdx
call   10b0 <fprintf@plt>
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
mov    0x10(%rsp),%edx
call   1050 <check_md5sum@plt>
mov    %eax,%r13d
mov    %rbp,%rdi
call   1030 <close_file@plt>
test   %ebx,%ebx
jne    14b8 <check_files+0x2f8>
mov    0x2b7a(%rip),%rbx
mov    (%rbx),%edi
test   %r13d,%r13d
lea    0xbac(%rip),%rdx
lea    0xb9d(%rip),%rax
cmovs  %rax,%rdx
lea    0xb8f(%rip),%rax
cmove  %rax,%rdx
lea    0xb80(%rip),%rsi
call   10b0 <fprintf@plt>
mov    (%rbx),%edi
call   10c0 <fflush@plt>
test   %r13d,%r13d
jle    14b8 <check_files+0x2f8>
mov    %r13d,%edi
call   10e0 <strerror@plt>
mov    $0x1,%edi
lea    0xb70(%rip),%rsi
mov    %r15,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1090 <errx@plt>
test   %r13d,%r13d
mov    $0x1,%eax
mov    0xc(%rsp),%ecx
cmovne %eax,%ecx
mov    %ecx,0xc(%rsp)
mov    0x8(%rsp),%ebx
jmp    1293 <check_files+0xd3>
movl   $0x1,0xc(%rsp)
mov    0x8(%rsp),%ebx
test   %ebx,%ebx
lea    0x30(%rsp),%rbp
jne    1298 <check_files+0xd8>
mov    0x2aec(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
movl   $0x1,0xc(%rsp)
mov    $0x1,%edi
lea    0xb24(%rip),%rsi
mov    %r15,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1090 <errx@plt>
jmp    1298 <check_files+0xd8>
mov    0x2ab9(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xafe(%rip),%rsi
mov    $0x1,%ebx
mov    $0x1,%edi
mov    %r13,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1090 <errx@plt>
jmp    1563 <check_files+0x3a3>
movl   $0x0,0xc(%rsp)
mov    0x18(%rsp),%rdi
call   1060 <fclose@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%eax
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stdout = global i32 0
@.str.1 = [5 x i8] c"%s: \00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [3 x i8] c"OK\00"
@.str.4 = [8 x i8] c"FAILURE\00"
@.str.5 = [6 x i8] c"ERROR\00"
@.str.6 = [23 x i8] c"Error reading '%s': %s\00"
@.str.7 = [24 x i8] c"Failed to open '%s': %s\00"
@errno = global i32 0
@.str.8 = [49 x i8] c"%s (%d): Ignoring malformed digest '%s' (digest)\00"
@.str.9 = [41 x i8] c"%s (%d): %*s^\00"
@.str.10 = [1 x i8] zeroinitializer
@.str.11 = [34 x i8] c"%s (%d): Ignoring malformed line!\00"
define i32 @check_files(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [8192 x i8]
%7 = alloca [16 x i8]
%8 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %128, label %10
10: ; preds = %5
%11 = getelementptr inbounds [8192 x i8], [8192 x i8]* %6, i64 0, i64 0
%12 = call i64 @fgets(i8* %11, i32 8192, i32* %8)
%13 = icmp eq i64 %12, 0
br i1 %13, label %125, label %14
14: ; preds = %10
%15 = icmp eq i32 %2, 0
%16 = select i1 %15, i32 0, i32 %1
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%18 = icmp eq i32 %3, 0
br label %19
19: ; preds = %14, %120
%20 = phi i8* [ %0, %14 ], [ %122, %120 ]
%21 = phi i32 [ 0, %14 ], [ %121, %120 ]
%22 = phi i32 [ 0, %14 ], [ %23, %120 ]
%23 = add nuw nsw i32 %22, 1
br label %24
24: ; preds = %27, %19
%25 = phi i8* [ %11, %19 ], [ %28, %27 ]
%26 = load i8, i8* %25
switch i8 %26, label %29 [
i8 32, label %27
i8 9, label %27
i8 10, label %27
i8 0, label %120
i8 35, label %120
i8 59, label %120
i8 47, label %120
]
27: ; preds = %24, %24, %24
%28 = getelementptr inbounds i8, i8* %25, i64 1
br label %24
29: ; preds = %24
%30 = call i64 @strlen(i8* %25)
%31 = shl i64 %30, 32
%32 = add i64 %31, -4294967296
%33 = ashr exact i64 %32, 32
%34 = getelementptr inbounds i8, i8* %25, i64 %33
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 10
br i1 %36, label %37, label %53
37: ; preds = %29
%38 = trunc i64 %30 to i32
%39 = icmp sgt i32 %38, 1
br i1 %39, label %40, label %47
40: ; preds = %37
%41 = add i64 %30, 4294967294
%42 = and i64 %41, 4294967295
%43 = getelementptr inbounds i8, i8* %25, i64 %42
%44 = load i8, i8* %43
%45 = icmp eq i8 %44, 13
%46 = select i1 %45, i64 4294967294, i64 4294967295
br label %47
47: ; preds = %40, %37
%48 = phi i64 [ 4294967295, %37 ], [ %46, %40 ]
%49 = add i64 %48, %30
%50 = shl i64 %49, 32
%51 = ashr exact i64 %50, 32
%52 = getelementptr inbounds i8, i8* %25, i64 %51
store i8 0, i8* %52
br label %53
53: ; preds = %47, %29
br label %54
54: ; preds = %53, %57
%55 = phi i8* [ %58, %57 ], [ %25, %53 ]
%56 = load i8, i8* %55
switch i8 %56, label %57 [
i8 0, label %117
i8 9, label %59
i8 32, label %59
]
57: ; preds = %54
%58 = getelementptr inbounds i8, i8* %55, i64 1
br label %54
59: ; preds = %54, %54
store i8 0, i8* %55
br label %60
60: ; preds = %64, %59
%61 = phi i8* [ %55, %59 ], [ %62, %64 ]
%62 = getelementptr inbounds i8, i8* %61, i64 1
%63 = load i8, i8* %62
switch i8 %63, label %68 [
i8 32, label %64
i8 9, label %64
i8 10, label %64
i8 42, label %65
]
64: ; preds = %60, %60, %60
br label %60
65: ; preds = %60
%66 = getelementptr inbounds i8, i8* %61, i64 2
%67 = load i8, i8* %66
br label %68
68: ; preds = %60, %65
%69 = phi i8 [ %67, %65 ], [ %63, %60 ]
%70 = phi i32 [ 0, %65 ], [ %16, %60 ]
%71 = phi i8* [ %66, %65 ], [ %62, %60 ]
%72 = icmp eq i8 %69, 0
br i1 %72, label %114, label %73
73: ; preds = %68
%74 = call i32 @string_to_digest(i8* %25, i8* %17)
%75 = icmp eq i32 %74, 0
br i1 %75, label %76, label %107
76: ; preds = %73
%77 = call i8* @open_file(i8* %71, i32 %70)
%78 = icmp eq i8* %77, null
br i1 %78, label %102, label %79
79: ; preds = %76
br i1 %18, label %80, label %83
80: ; preds = %79
%81 = load i32, i32* @stdout
%82 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %71)
br label %83
83: ; preds = %80, %79
%84 = call i32 @check_md5sum(i8* %77, i8* %17, i32 %4)
%85 = call i32 @close_file(i8* %77)
br i1 %18, label %86, label %99
86: ; preds = %83
%87 = load i32, i32* @stdout
%88 = icmp eq i32 %84, 0
%89 = icmp slt i32 %84, 0
%90 = select i1 %89, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0)
%91 = select i1 %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %90
%92 = call i32 @fprintf(i32 %87, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %91)
%93 = load i32, i32* @stdout
%94 = call i32 @fflush(i32 %93)
%95 = icmp sgt i32 %84, 0
br i1 %95, label %96, label %99
96: ; preds = %86
%97 = call i32 @strerror(i32 %84)
%98 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8* %71, i32 %97)
br label %99
99: ; preds = %86, %96, %83
%100 = icmp eq i32 %84, 0
%101 = select i1 %100, i32 %21, i32 1
br label %112
102: ; preds = %76
br i1 %18, label %103, label %112
103: ; preds = %102
%104 = load i32, i32* @errno
%105 = call i32 @strerror(i32 %104)
%106 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8* %71, i32 %105)
br label %112
107: ; preds = %73
br i1 %18, label %108, label %112
108: ; preds = %107
%109 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0), i8* %71, i32 %23, i8* %25)
%110 = add nsw i32 %74, -1
%111 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0), i8* %71, i32 %23, i32 %110, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0))
br label %112
112: ; preds = %99, %103, %102, %107, %108
%113 = phi i32 [ %21, %107 ], [ %21, %108 ], [ %101, %99 ], [ 1, %103 ], [ 1, %102 ]
br label %120
114: ; preds = %68
br i1 %18, label %115, label %120
115: ; preds = %114
%116 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i8* %20, i32 %23)
br label %120
117: ; preds = %54
br i1 %18, label %118, label %120
118: ; preds = %117
%119 = call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i8* %20, i32 %23)
br label %120
120: ; preds = %24, %24, %24, %24, %114, %115, %112, %118, %117
%121 = phi i32 [ %113, %112 ], [ %21, %114 ], [ %21, %115 ], [ %21, %117 ], [ %21, %118 ], [ %21, %24 ], [ %21, %24 ], [ %21, %24 ], [ %21, %24 ]
%122 = phi i8* [ %71, %112 ], [ %20, %114 ], [ %20, %115 ], [ %20, %117 ], [ %20, %118 ], [ %20, %24 ], [ %20, %24 ], [ %20, %24 ], [ %20, %24 ]
%123 = call i64 @fgets(i8* %11, i32 8192, i32* %8)
%124 = icmp eq i64 %123, 0
br i1 %124, label %125, label %19
125: ; preds = %120, %10
%126 = phi i32 [ 0, %10 ], [ %121, %120 ]
%127 = call i32 @fclose(i32* %8)
br label %132
128: ; preds = %5
%129 = load i32, i32* @errno
%130 = tail call i32 @strerror(i32 %129)
%131 = tail call i32 (i32, i8*, i8*, i32, ...) @errx(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8* %0, i32 %130)
br label %132
132: ; preds = %128, %125
%133 = phi i32 [ %126, %125 ], [ 1, %128 ]
ret i32 %133
}