#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 */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ sprintf(char *, char *, char, char, char *);
int sscanf(char *, char *, int *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *strrchr(char const *, char);
char *strstr(char *, char *);
void processfile(const char *name, int failsilent, int *max_build,
                 int *accum_build, int *max_year, int *max_month, int *max_day,
                 int *ismodified) {
  char str[512], str_base[512];
  char name_base[512];
  char *p1;
  FILE *fp, *fp_base;
  int build, maj_build;
  int year, month, day;
  int cnt;
  char modchar;
  if ((p1 = strrchr(name, '/')) != NULL) {
    ++p1;
    strncpy(name_base, name, (int)(p1 - name));
    name_base[(int)(p1 - name)] = '\0';
  } else {
    name_base[0] = '\0';
    p1 = (char *)name;
  }
  sprintf(name_base + strlen(name_base), ".svn%ctext-base%c%s.svn-base", '/',
          '/', p1);
  fp = fopen(name, "r");
  if (fp == NULL) {
    if (!failsilent)
      fprintf(stderr, "Failed to open input file '%s'\n", name);
    return;
  }
  fp_base = fopen(name_base, "r");
  build = 0;
  maj_build = 0;
  year = month = day = 0;
  while (fgets(str, sizeof str, fp) != NULL) {
    if (fp_base == NULL || fgets(str_base, sizeof str_base, fp_base) == NULL)
      str_base[0] = '\0';
    if ((p1 = strstr(str, "$Id:")) != NULL && strchr(p1 + 1, '$') != NULL) {
      if (sscanf(p1, "$Id: %*s %d %d-%d-%d", &build, &year, &month, &day) < 4 &&
          sscanf(p1, "$Id: %*s %d %d/%d/%d", &build, &year, &month, &day) < 4)
        if (sscanf(p1, "$Id: %*s %d.%d %d-%d-%d", &maj_build, &build, &year,
                   &month, &day) < 5)
          sscanf(p1, "$Id: %*s %d.%d %d/%d/%d", &maj_build, &build, &year,
                 &month, &day);
    } else if ((p1 = strstr(str, "$Rev:")) != NULL &&
               strchr(p1 + 1, '$') != NULL) {
      if (sscanf(p1, "$Rev: %d.%d", &maj_build, &build) < 2) {
        sscanf(p1, "$Rev: %d", &build);
        maj_build = 0;
      }
    } else if ((p1 = strstr(str, "$Revision:")) != NULL &&
               strchr(p1 + 1, '$') != NULL) {
      if (sscanf(p1, "$Revision: %d.%d", &maj_build, &build) < 2) {
        cnt = sscanf(p1, "$Revision: %d%c", &build, &modchar);
        if (cnt == 2 && modchar == 'M' && ismodified != NULL)
          *ismodified = 1;
        maj_build = 0;
      }
    } else if ((p1 = strstr(str, "$Date:")) != NULL &&
               strchr(p1 + 1, '$') != NULL) {
      if (sscanf(p1, "$Date: %d-%d-%d", &year, &month, &day) < 3)
        sscanf(p1, "$Date: %d/%d/%d", &year, &month, &day);
    } else if (ismodified != NULL && *ismodified == 0 && fp_base != NULL) {
      *ismodified = strcmp(str, str_base) != 0;
    }
    if (maj_build)
      *accum_build += build;
    else if (build > *max_build)
      *max_build = build;
    if (year > *max_year || (year == *max_year && month > *max_month) ||
        (year == *max_year && month == *max_month && day > *max_day)) {
      *max_year = year;
      *max_month = month;
      *max_day = day;
    }
    if (build > 0 && year > 0 &&
        (fp_base == NULL || ismodified == NULL || *ismodified != 0))
      break;
  }
  fclose(fp);
  if (fp_base != NULL)
    fclose(fp_base);
}


x86 assembly (clang, -O0):
<processfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x680,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     1258 <processfile+0x98>
mov    -0x638(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x638(%rbp)
lea    -0x630(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x638(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x638(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
cltq
movb   $0x0,-0x630(%rbp,%rax,1)
jmp    126a <processfile+0xaa>
movb   $0x0,-0x630(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x638(%rbp)
lea    -0x630(%rbp),%rax
mov    %rax,-0x670(%rbp)
lea    -0x630(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x670(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x638(%rbp),%r8
lea    0xd62(%rip),%rsi
mov    $0x2f,%ecx
mov    %ecx,%edx
call   10d0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd68(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x640(%rbp)
cmpq   $0x0,-0x640(%rbp)
jne    12f7 <processfile+0x137>
cmpl   $0x0,-0xc(%rbp)
jne    12f2 <processfile+0x132>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd32(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    1898 <processfile+0x6d8>
lea    -0x630(%rbp),%rdi
lea    0xd18(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x648(%rbp)
movl   $0x0,-0x64c(%rbp)
movl   $0x0,-0x650(%rbp)
movl   $0x0,-0x65c(%rbp)
movl   $0x0,-0x658(%rbp)
movl   $0x0,-0x654(%rbp)
lea    -0x230(%rbp),%rdi
mov    -0x640(%rbp),%rdx
mov    $0x200,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1872 <processfile+0x6b2>
cmpq   $0x0,-0x648(%rbp)
je     1395 <processfile+0x1d5>
lea    -0x430(%rbp),%rdi
mov    -0x648(%rbp),%rdx
mov    $0x200,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    139c <processfile+0x1dc>
movb   $0x0,-0x430(%rbp)
lea    -0x230(%rbp),%rdi
lea    0xc95(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     14de <processfile+0x31e>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     14de <processfile+0x31e>
mov    -0x638(%rbp),%rdi
lea    0xc57(%rip),%rsi
lea    -0x64c(%rbp),%rdx
lea    -0x654(%rbp),%rcx
lea    -0x658(%rbp),%r8
lea    -0x65c(%rbp),%r9
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x4,%eax
jge    14d9 <processfile+0x319>
mov    -0x638(%rbp),%rdi
lea    0xc32(%rip),%rsi
lea    -0x64c(%rbp),%rdx
lea    -0x654(%rbp),%rcx
lea    -0x658(%rbp),%r8
lea    -0x65c(%rbp),%r9
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x4,%eax
jge    14d9 <processfile+0x319>
mov    -0x638(%rbp),%rdi
lea    0xc0d(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
lea    -0x654(%rbp),%r8
lea    -0x658(%rbp),%r9
lea    -0x65c(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x5,%eax
jge    14d4 <processfile+0x314>
mov    -0x638(%rbp),%rdi
lea    0xbe0(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
lea    -0x654(%rbp),%r8
lea    -0x658(%rbp),%r9
lea    -0x65c(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10b0 <sscanf@plt>
jmp    14d9 <processfile+0x319>
jmp    1755 <processfile+0x595>
lea    -0x230(%rbp),%rdi
lea    0xbb2(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     1578 <processfile+0x3b8>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     1578 <processfile+0x3b8>
mov    -0x638(%rbp),%rdi
lea    0xb75(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jge    1573 <processfile+0x3b3>
mov    -0x638(%rbp),%rdi
lea    0xb55(%rip),%rsi
lea    -0x64c(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
movl   $0x0,-0x650(%rbp)
jmp    1750 <processfile+0x590>
lea    -0x230(%rbp),%rdi
lea    0xb33(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     1651 <processfile+0x491>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     1651 <processfile+0x491>
mov    -0x638(%rbp),%rdi
lea    0xafb(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jge    164c <processfile+0x48c>
mov    -0x638(%rbp),%rdi
lea    0xae0(%rip),%rsi
lea    -0x64c(%rbp),%rdx
lea    -0x661(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
mov    %eax,-0x660(%rbp)
cmpl   $0x2,-0x660(%rbp)
jne    1642 <processfile+0x482>
movsbl -0x661(%rbp),%eax
cmp    $0x4d,%eax
jne    1642 <processfile+0x482>
cmpq   $0x0,0x18(%rbp)
je     1642 <processfile+0x482>
mov    0x18(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x650(%rbp)
jmp    174b <processfile+0x58b>
lea    -0x230(%rbp),%rdi
lea    0xa86(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     16f6 <processfile+0x536>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     16f6 <processfile+0x536>
mov    -0x638(%rbp),%rdi
lea    0xa4a(%rip),%rsi
lea    -0x654(%rbp),%rdx
lea    -0x658(%rbp),%rcx
lea    -0x65c(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jge    16f1 <processfile+0x531>
mov    -0x638(%rbp),%rdi
lea    0xa27(%rip),%rsi
lea    -0x654(%rbp),%rdx
lea    -0x658(%rbp),%rcx
lea    -0x65c(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
jmp    1746 <processfile+0x586>
cmpq   $0x0,0x18(%rbp)
je     1741 <processfile+0x581>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1741 <processfile+0x581>
cmpq   $0x0,-0x648(%rbp)
je     1741 <processfile+0x581>
lea    -0x230(%rbp),%rdi
lea    -0x430(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1746 <processfile+0x586>
jmp    174b <processfile+0x58b>
jmp    1750 <processfile+0x590>
jmp    1755 <processfile+0x595>
cmpl   $0x0,-0x650(%rbp)
je     1775 <processfile+0x5b5>
mov    -0x64c(%rbp),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
jmp    1798 <processfile+0x5d8>
mov    -0x64c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1793 <processfile+0x5d3>
mov    -0x64c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1798 <processfile+0x5d8>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jg     1804 <processfile+0x644>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    17ce <processfile+0x60e>
mov    -0x658(%rbp),%eax
mov    -0x30(%rbp),%rcx
cmp    (%rcx),%eax
jg     1804 <processfile+0x644>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1828 <processfile+0x668>
mov    -0x658(%rbp),%eax
mov    -0x30(%rbp),%rcx
cmp    (%rcx),%eax
jne    1828 <processfile+0x668>
mov    -0x65c(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1828 <processfile+0x668>
mov    -0x654(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x658(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x65c(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x64c(%rbp)
jle    186d <processfile+0x6ad>
cmpl   $0x0,-0x654(%rbp)
jle    186d <processfile+0x6ad>
cmpq   $0x0,-0x648(%rbp)
je     1868 <processfile+0x6a8>
cmpq   $0x0,0x18(%rbp)
je     1868 <processfile+0x6a8>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
je     186d <processfile+0x6ad>
jmp    1872 <processfile+0x6b2>
jmp    1343 <processfile+0x183>
mov    -0x640(%rbp),%rdi
call   1040 <fclose@plt>
cmpq   $0x0,-0x648(%rbp)
je     1898 <processfile+0x6d8>
mov    -0x648(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x680,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x648,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,%r14
mov    %rcx,0x38(%rsp)
mov    %rdx,0x30(%rsp)
mov    %esi,%r15d
mov    %rdi,%r12
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     121e <processfile+0x5e>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rbp
sub    %r12,%rbp
lea    0x40(%rsp),%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,0x40(%rsp,%rax,1)
jmp    1226 <processfile+0x66>
movb   $0x0,0x40(%rsp)
mov    %r12,%rbx
lea    0x40(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x40,%rdi
lea    0xdbf(%rip),%rsi
mov    $0x2f,%edx
mov    $0x2f,%ecx
mov    %rbx,%r8
call   10d0 <sprintf@plt>
lea    0xdc3(%rip),%rsi
mov    %r12,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     16a5 <processfile+0x4e5>
mov    %rax,%r13
lea    0xda8(%rip),%rsi
lea    0x40(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbp
movl   $0x0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
lea    0x440(%rsp),%rdi
mov    $0x200,%esi
mov    %r13,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1696 <processfile+0x4d6>
test   %rbp,%rbp
sete   %al
cmpq   $0x0,0x688(%rsp)
sete   %cl
or     %al,%cl
mov    %cl,0x26(%rsp)
lea    0x440(%rsp),%r15
jmp    1309 <processfile+0x149>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    $0x200,%esi
mov    %r13,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1696 <processfile+0x4d6>
test   %rbp,%rbp
je     1328 <processfile+0x168>
lea    0x240(%rsp),%rdi
mov    $0x200,%esi
mov    %rbp,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
jne    1330 <processfile+0x170>
movb   $0x0,0x240(%rsp)
mov    %r15,%rdi
lea    0xd05(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     1430 <processfile+0x270>
mov    %rax,%r12
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1430 <processfile+0x270>
mov    %r12,%rdi
lea    0xcd8(%rip),%rsi
lea    0x10(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jg     15f0 <processfile+0x430>
mov    %r12,%rdi
lea    0xcbf(%rip),%rsi
lea    0x10(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jg     15f0 <processfile+0x430>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
mov    %r12,%rdi
lea    0xc9d(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x4,%eax
jg     15f0 <processfile+0x430>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
mov    %r12,%rdi
lea    0xc7e(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    15f0 <processfile+0x430>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
lea    0xc64(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     14a0 <processfile+0x2e0>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     14a0 <processfile+0x2e0>
mov    %rbx,%rdi
lea    0xc40(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jg     15f0 <processfile+0x430>
mov    %rbx,%rdi
lea    0xc28(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    1532 <processfile+0x372>
nopl   0x0(%rax)
mov    %r15,%rdi
lea    0xc0f(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     1540 <processfile+0x380>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1540 <processfile+0x380>
mov    %rbx,%rdi
lea    0xbec(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jg     15f0 <processfile+0x430>
mov    %rbx,%rdi
lea    0xbd9(%rip),%rsi
lea    0x10(%rsp),%rdx
lea    0x27(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmpq   $0x0,0x688(%rsp)
je     1532 <processfile+0x372>
cmp    $0x2,%eax
jne    1532 <processfile+0x372>
cmpb   $0x4d,0x27(%rsp)
jne    1532 <processfile+0x372>
mov    0x688(%rsp),%rax
movl   $0x1,(%rax)
movl   $0x0,0x20(%rsp)
jmp    1610 <processfile+0x450>
nop
mov    %r15,%rdi
lea    0xb9b(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     15b1 <processfile+0x3f1>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     15b1 <processfile+0x3f1>
mov    %rbx,%rdi
lea    0xb78(%rip),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x14(%rsp),%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jg     15f0 <processfile+0x430>
mov    %rbx,%rdi
lea    0xb63(%rip),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x14(%rsp),%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    15f0 <processfile+0x430>
cmpq   $0x0,0x688(%rsp)
je     15f0 <processfile+0x430>
test   %rbp,%rbp
je     15f0 <processfile+0x430>
mov    0x688(%rsp),%rax
cmpl   $0x0,(%rax)
jne    15f0 <processfile+0x430>
mov    %r15,%rdi
lea    0x240(%rsp),%rsi
call   1090 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    0x688(%rsp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,0x20(%rsp)
je     1610 <processfile+0x450>
mov    0x10(%rsp),%eax
mov    0x38(%rsp),%rcx
add    %eax,(%rcx)
jmp    161f <processfile+0x45f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x10(%rsp),%eax
mov    0x30(%rsp),%rcx
cmp    (%rcx),%eax
jle    161f <processfile+0x45f>
mov    %eax,(%rcx)
mov    0x1c(%rsp),%ecx
cmp    (%r14),%ecx
jle    1630 <processfile+0x470>
mov    0x18(%rsp),%edx
jmp    1640 <processfile+0x480>
xchg   %ax,%ax
jne    1658 <processfile+0x498>
mov    0x18(%rsp),%edx
mov    0x28(%rsp),%rsi
cmp    (%rsi),%edx
jle    1682 <processfile+0x4c2>
nop
mov    %ecx,(%r14)
mov    0x28(%rsp),%rsi
mov    %edx,(%rsi)
mov    0x14(%rsp),%edx
mov    0x680(%rsp),%rsi
mov    %edx,(%rsi)
test   %eax,%eax
jle    12f0 <processfile+0x130>
test   %ecx,%ecx
jle    12f0 <processfile+0x130>
cmpb   $0x0,0x26(%rsp)
jne    1696 <processfile+0x4d6>
mov    0x688(%rsp),%rax
cmpl   $0x0,(%rax)
je     12f0 <processfile+0x130>
jmp    16c4 <processfile+0x504>
jne    1658 <processfile+0x498>
mov    0x14(%rsp),%esi
mov    0x680(%rsp),%rdi
cmp    (%rdi),%esi
jg     1640 <processfile+0x480>
jmp    1658 <processfile+0x498>
mov    %r13,%rdi
call   1040 <fclose@plt>
test   %rbp,%rbp
jne    16cc <processfile+0x50c>
jmp    16d4 <processfile+0x514>
test   %r15d,%r15d
jne    16d4 <processfile+0x514>
mov    0x292f(%rip),%rax
mov    (%rax),%edi
lea    0x965(%rip),%rsi
mov    %r12,%rdx
call   10a0 <fprintf@plt>
jmp    16d4 <processfile+0x514>
mov    %r13,%rdi
call   1040 <fclose@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
add    $0x648,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [29 x i8] c".svn%ctext-base%c%s.svn-base\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"Failed to open input file '%s'\0A\00"
@.str.3 = [5 x i8] c"$Id:\00"
@.str.4 = [21 x i8] c"$Id: %*s %d %d-%d-%d\00"
@.str.5 = [21 x i8] c"$Id: %*s %d %d/%d/%d\00"
@.str.6 = [24 x i8] c"$Id: %*s %d.%d %d-%d-%d\00"
@.str.7 = [24 x i8] c"$Id: %*s %d.%d %d/%d/%d\00"
@.str.8 = [6 x i8] c"$Rev:\00"
@.str.9 = [12 x i8] c"$Rev: %d.%d\00"
@.str.10 = [9 x i8] c"$Rev: %d\00"
@.str.11 = [11 x i8] c"$Revision:\00"
@.str.12 = [17 x i8] c"$Revision: %d.%d\00"
@.str.13 = [16 x i8] c"$Revision: %d%c\00"
@.str.14 = [7 x i8] c"$Date:\00"
@.str.15 = [16 x i8] c"$Date: %d-%d-%d\00"
@.str.16 = [16 x i8] c"$Date: %d/%d/%d\00"
define void @processfile(i8* %0, i32 %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i32* %7) {
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%21 = bitcast i32* %12 to i8*
%22 = bitcast i32* %13 to i8*
%23 = bitcast i32* %14 to i8*
%24 = bitcast i32* %15 to i8*
%25 = bitcast i32* %16 to i8*
%26 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%27 = icmp eq i8* %26, null
br i1 %27, label %38, label %28
28: ; preds = %8
%29 = getelementptr inbounds i8, i8* %26, i64 1
%30 = ptrtoint i8* %29 to i64
%31 = ptrtoint i8* %0 to i64
%32 = sub i64 %30, %31
%33 = trunc i64 %32 to i32
%34 = call i32 @strncpy(i8* %20, i8* %0, i32 %33)
%35 = shl i64 %32, 32
%36 = ashr exact i64 %35, 32
%37 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 %36
store i8 0, i8* %37
br label %39
38: ; preds = %8
store i8 0, i8* %20
br label %39
39: ; preds = %38, %28
%40 = phi i8* [ %29, %28 ], [ %0, %38 ]
%41 = call i32 @strlen(i8* %20)
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 %42
%44 = call i32 @sprintf(i8* %43, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext 47, i8 signext 47, i8* %40)
%45 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %52
47: ; preds = %39
%48 = icmp eq i32 %1, 0
br i1 %48, label %49, label %189
49: ; preds = %47
%50 = load i32, i32* @stderr
%51 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %189
52: ; preds = %39
%53 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %16
store i32 0, i32* %15
store i32 0, i32* %14
%54 = call i32* @fgets(i8* %18, i32 512, i32* %45)
%55 = icmp eq i32* %54, null
br i1 %55, label %184, label %56
56: ; preds = %52
%57 = icmp eq i32* %53, null
%58 = icmp ne i32* %7, null
%59 = icmp eq i32* %7, null
%60 = icmp ne i32* %53, null
%61 = or i1 %59, %57
br label %62
62: ; preds = %56, %181
br i1 %57, label %66, label %63
63: ; preds = %62
%64 = call i32* @fgets(i8* %19, i32 512, i32* %53)
%65 = icmp eq i32* %64, null
br i1 %65, label %66, label %67
66: ; preds = %63, %62
store i8 0, i8* %19
br label %67
67: ; preds = %66, %63
%68 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%69 = icmp eq i8* %68, null
br i1 %69, label %85, label %70
70: ; preds = %67
%71 = getelementptr inbounds i8, i8* %68, i64 1
%72 = call i32* @strchr(i8* %71, i8 signext 36)
%73 = icmp eq i32* %72, null
br i1 %73, label %85, label %74
74: ; preds = %70
%75 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32* %12, i32* %14, i32* %15, i32* %16)
%76 = icmp slt i32 %75, 4
br i1 %76, label %77, label %137
77: ; preds = %74
%78 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32* %12, i32* %14, i32* %15, i32* %16)
%79 = icmp slt i32 %78, 4
br i1 %79, label %80, label %137
80: ; preds = %77
%81 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %68, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32* %13, i32* %12, i32* %14, i32* %15, i32* %16)
%82 = icmp slt i32 %81, 5
br i1 %82, label %83, label %137
83: ; preds = %80
%84 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %68, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32* %13, i32* %12, i32* %14, i32* %15, i32* %16)
br label %137
85: ; preds = %70, %67
%86 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%87 = icmp eq i8* %86, null
br i1 %87, label %97, label %88
88: ; preds = %85
%89 = getelementptr inbounds i8, i8* %86, i64 1
%90 = call i32* @strchr(i8* %89, i8 signext 36)
%91 = icmp eq i32* %90, null
br i1 %91, label %97, label %92
92: ; preds = %88
%93 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %86, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32* %13, i32* %12)
%94 = icmp slt i32 %93, 2
br i1 %94, label %95, label %137
95: ; preds = %92
%96 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %86, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32* %12)
store i32 0, i32* %13
br label %144
97: ; preds = %88, %85
%98 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%99 = icmp eq i8* %98, null
br i1 %99, label %116, label %100
100: ; preds = %97
%101 = getelementptr inbounds i8, i8* %98, i64 1
%102 = call i32* @strchr(i8* %101, i8 signext 36)
%103 = icmp eq i32* %102, null
br i1 %103, label %116, label %104
104: ; preds = %100
%105 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %98, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32* %13, i32* %12)
%106 = icmp slt i32 %105, 2
br i1 %106, label %107, label %137
107: ; preds = %104
%108 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %98, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32* %12, i8* %17)
%109 = icmp eq i32 %108, 2
%110 = load i8, i8* %17
%111 = icmp eq i8 %110, 77
%112 = select i1 %109, i1 %111, i1 false
%113 = and i1 %58, %112
br i1 %113, label %114, label %115
114: ; preds = %107
store i32 1, i32* %7
br label %115
115: ; preds = %114, %107
store i32 0, i32* %13
br label %144
116: ; preds = %100, %97
%117 = call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%118 = icmp eq i8* %117, null
br i1 %118, label %128, label %119
119: ; preds = %116
%120 = getelementptr inbounds i8, i8* %117, i64 1
%121 = call i32* @strchr(i8* %120, i8 signext 36)
%122 = icmp eq i32* %121, null
br i1 %122, label %128, label %123
123: ; preds = %119
%124 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %117, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32* %14, i32* %15, i32* %16)
%125 = icmp slt i32 %124, 3
br i1 %125, label %126, label %137
126: ; preds = %123
%127 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %117, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32* %14, i32* %15, i32* %16)
br label %137
128: ; preds = %119, %116
br i1 %59, label %137, label %129
129: ; preds = %128
%130 = load i32, i32* %7
%131 = icmp eq i32 %130, 0
%132 = and i1 %60, %131
br i1 %132, label %133, label %137
133: ; preds = %129
%134 = call i64 @strcmp(i8* %18, i8* %19)
%135 = icmp ne i64 %134, 0
%136 = zext i1 %135 to i32
store i32 %136, i32* %7
br label %137
137: ; preds = %92, %126, %123, %133, %129, %128, %104, %74, %77, %83, %80
%138 = load i32, i32* %13
%139 = icmp eq i32 %138, 0
br i1 %139, label %144, label %140
140: ; preds = %137
%141 = load i32, i32* %12
%142 = load i32, i32* %3
%143 = add nsw i32 %142, %141
store i32 %143, i32* %3
br label %149
144: ; preds = %115, %95, %137
%145 = load i32, i32* %12
%146 = load i32, i32* %2
%147 = icmp sgt i32 %145, %146
br i1 %147, label %148, label %149
148: ; preds = %144
store i32 %145, i32* %2
br label %149
149: ; preds = %144, %148, %140
%150 = phi i32 [ %145, %144 ], [ %145, %148 ], [ %141, %140 ]
%151 = load i32, i32* %14
%152 = load i32, i32* %4
%153 = icmp sgt i32 %151, %152
br i1 %153, label %154, label %156
154: ; preds = %149
%155 = load i32, i32* %15
br label %168
156: ; preds = %149
%157 = icmp eq i32 %151, %152
br i1 %157, label %158, label %171
158: ; preds = %156
%159 = load i32, i32* %15
%160 = load i32, i32* %5
%161 = icmp sgt i32 %159, %160
br i1 %161, label %168, label %162
162: ; preds = %158
%163 = icmp eq i32 %159, %160
br i1 %163, label %164, label %171
164: ; preds = %162
%165 = load i32, i32* %16
%166 = load i32, i32* %6
%167 = icmp sgt i32 %165, %166
br i1 %167, label %168, label %171
168: ; preds = %154, %164, %158
%169 = phi i32 [ %155, %154 ], [ %159, %164 ], [ %159, %158 ]
store i32 %151, i32* %4
store i32 %169, i32* %5
%170 = load i32, i32* %16
store i32 %170, i32* %6
br label %171
171: ; preds = %156, %168, %164, %162
%172 = icmp sgt i32 %150, 0
%173 = icmp sgt i32 %151, 0
%174 = select i1 %172, i1 %173, i1 false
br i1 %174, label %175, label %181
175: ; preds = %171
br i1 %61, label %184, label %176
176: ; preds = %175
%177 = load i32, i32* %7
%178 = icmp eq i32 %177, 0
br i1 %178, label %181, label %179
179: ; preds = %176
%180 = call i32 @fclose(i32* %45)
br label %187
181: ; preds = %176, %171
%182 = call i32* @fgets(i8* %18, i32 512, i32* %45)
%183 = icmp eq i32* %182, null
br i1 %183, label %184, label %62
184: ; preds = %181, %175, %52
%185 = call i32 @fclose(i32* %45)
%186 = icmp eq i32* %53, null
br i1 %186, label %189, label %187
187: ; preds = %179, %184
%188 = call i32 @fclose(i32* %53)
br label %189
189: ; preds = %184, %187, %47, %49
ret void
}