#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;
char *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 ignore_eol,
                 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) {
      if (ignore_eol) {
        for (p1 = strchr(str, '\0');
             p1 != NULL && p1 > str && (*(p1 - 1) == '\r' || *(p1 - 1) == '\n');
             p1--)
          *--p1 = '\0';
        for (p1 = strchr(str_base, '\0');
             p1 != NULL && p1 > str_base &&
             (*(p1 - 1) == '\r' || *(p1 - 1) == '\n');
             p1--)
          *--p1 = '\0';
      }
      *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    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     125b <processfile+0x9b>
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    126d <processfile+0xad>
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    0xd5f(%rip),%rsi
mov    $0x2f,%ecx
mov    %ecx,%edx
call   10d0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd65(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x640(%rbp)
cmpq   $0x0,-0x640(%rbp)
jne    12fa <processfile+0x13a>
cmpl   $0x0,-0xc(%rbp)
jne    12f5 <processfile+0x135>
mov    0x2cfd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd2f(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    1a42 <processfile+0x882>
lea    -0x630(%rbp),%rdi
lea    0xd15(%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     1a1c <processfile+0x85c>
cmpq   $0x0,-0x648(%rbp)
je     1398 <processfile+0x1d8>
lea    -0x430(%rbp),%rdi
mov    -0x648(%rbp),%rdx
mov    $0x200,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
jne    139f <processfile+0x1df>
movb   $0x0,-0x430(%rbp)
lea    -0x230(%rbp),%rdi
lea    0xc92(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     14e1 <processfile+0x321>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     14e1 <processfile+0x321>
mov    -0x638(%rbp),%rdi
lea    0xc54(%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    14dc <processfile+0x31c>
mov    -0x638(%rbp),%rdi
lea    0xc2f(%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    14dc <processfile+0x31c>
mov    -0x638(%rbp),%rdi
lea    0xc0a(%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    14d7 <processfile+0x317>
mov    -0x638(%rbp),%rdi
lea    0xbdd(%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    14dc <processfile+0x31c>
jmp    18ff <processfile+0x73f>
lea    -0x230(%rbp),%rdi
lea    0xbaf(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     157b <processfile+0x3bb>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     157b <processfile+0x3bb>
mov    -0x638(%rbp),%rdi
lea    0xb72(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jge    1576 <processfile+0x3b6>
mov    -0x638(%rbp),%rdi
lea    0xb52(%rip),%rsi
lea    -0x64c(%rbp),%rdx
mov    $0x0,%al
call   10b0 <sscanf@plt>
movl   $0x0,-0x650(%rbp)
jmp    18fa <processfile+0x73a>
lea    -0x230(%rbp),%rdi
lea    0xb30(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     1654 <processfile+0x494>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     1654 <processfile+0x494>
mov    -0x638(%rbp),%rdi
lea    0xaf8(%rip),%rsi
lea    -0x650(%rbp),%rdx
lea    -0x64c(%rbp),%rcx
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jge    164f <processfile+0x48f>
mov    -0x638(%rbp),%rdi
lea    0xadd(%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    1645 <processfile+0x485>
movsbl -0x661(%rbp),%eax
cmp    $0x4d,%eax
jne    1645 <processfile+0x485>
cmpq   $0x0,0x20(%rbp)
je     1645 <processfile+0x485>
mov    0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x650(%rbp)
jmp    18f5 <processfile+0x735>
lea    -0x230(%rbp),%rdi
lea    0xa83(%rip),%rsi
call   10e0 <strstr@plt>
mov    %rax,-0x638(%rbp)
cmp    $0x0,%rax
je     16f9 <processfile+0x539>
mov    -0x638(%rbp),%rdi
add    $0x1,%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     16f9 <processfile+0x539>
mov    -0x638(%rbp),%rdi
lea    0xa47(%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    16f4 <processfile+0x534>
mov    -0x638(%rbp),%rdi
lea    0xa24(%rip),%rsi
lea    -0x654(%rbp),%rdx
lea    -0x658(%rbp),%rcx
lea    -0x65c(%rbp),%r8
mov    $0x0,%al
call   10b0 <sscanf@plt>
jmp    18f0 <processfile+0x730>
cmpq   $0x0,0x20(%rbp)
je     18eb <processfile+0x72b>
mov    0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jne    18eb <processfile+0x72b>
cmpq   $0x0,-0x648(%rbp)
je     18eb <processfile+0x72b>
cmpl   $0x0,-0x10(%rbp)
je     18c6 <processfile+0x706>
lea    -0x230(%rbp),%rdi
xor    %esi,%esi
call   1060 <strchr@plt>
mov    %rax,-0x638(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x638(%rbp)
mov    %al,-0x671(%rbp)
je     17b2 <processfile+0x5f2>
mov    -0x638(%rbp),%rcx
lea    -0x230(%rbp),%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x671(%rbp)
jbe    17b2 <processfile+0x5f2>
mov    -0x638(%rbp),%rax
movsbl -0x1(%rax),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x672(%rbp)
je     17a6 <processfile+0x5e6>
mov    -0x638(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x672(%rbp)
mov    -0x672(%rbp),%al
mov    %al,-0x671(%rbp)
mov    -0x671(%rbp),%al
test   $0x1,%al
jne    17c5 <processfile+0x605>
jmp    17f5 <processfile+0x635>
mov    -0x638(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x638(%rbp)
movb   $0x0,-0x1(%rax)
mov    -0x638(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x638(%rbp)
jmp    173e <processfile+0x57e>
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
call   1060 <strchr@plt>
mov    %rax,-0x638(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x638(%rbp)
mov    %al,-0x673(%rbp)
je     187e <processfile+0x6be>
mov    -0x638(%rbp),%rcx
lea    -0x430(%rbp),%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x673(%rbp)
jbe    187e <processfile+0x6be>
mov    -0x638(%rbp),%rax
movsbl -0x1(%rax),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x674(%rbp)
je     1872 <processfile+0x6b2>
mov    -0x638(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x674(%rbp)
mov    -0x674(%rbp),%al
mov    %al,-0x673(%rbp)
mov    -0x673(%rbp),%al
test   $0x1,%al
jne    1891 <processfile+0x6d1>
jmp    18c1 <processfile+0x701>
mov    -0x638(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x638(%rbp)
movb   $0x0,-0x1(%rax)
mov    -0x638(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x638(%rbp)
jmp    180a <processfile+0x64a>
jmp    18c6 <processfile+0x706>
lea    -0x230(%rbp),%rdi
lea    -0x430(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    18f0 <processfile+0x730>
jmp    18f5 <processfile+0x735>
jmp    18fa <processfile+0x73a>
jmp    18ff <processfile+0x73f>
cmpl   $0x0,-0x650(%rbp)
je     191f <processfile+0x75f>
mov    -0x64c(%rbp),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
jmp    1942 <processfile+0x782>
mov    -0x64c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    193d <processfile+0x77d>
mov    -0x64c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1942 <processfile+0x782>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jg     19ae <processfile+0x7ee>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1978 <processfile+0x7b8>
mov    -0x658(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jg     19ae <processfile+0x7ee>
mov    -0x654(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    19d2 <processfile+0x812>
mov    -0x658(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    19d2 <processfile+0x812>
mov    -0x65c(%rbp),%eax
mov    0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    19d2 <processfile+0x812>
mov    -0x654(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x658(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x65c(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x64c(%rbp)
jle    1a17 <processfile+0x857>
cmpl   $0x0,-0x654(%rbp)
jle    1a17 <processfile+0x857>
cmpq   $0x0,-0x648(%rbp)
je     1a12 <processfile+0x852>
cmpq   $0x0,0x20(%rbp)
je     1a12 <processfile+0x852>
mov    0x20(%rbp),%rax
cmpl   $0x0,(%rax)
je     1a17 <processfile+0x857>
jmp    1a1c <processfile+0x85c>
jmp    1346 <processfile+0x186>
mov    -0x640(%rbp),%rdi
call   1040 <fclose@plt>
cmpq   $0x0,-0x648(%rbp)
je     1a42 <processfile+0x882>
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,%r15
mov    %r8,0x38(%rsp)
mov    %rcx,0x30(%rsp)
mov    %edx,0x2c(%rsp)
mov    %esi,%r14d
mov    %rdi,%r12
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     121d <processfile+0x5d>
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    1225 <processfile+0x65>
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    0xdc0(%rip),%rsi
mov    $0x2f,%edx
mov    $0x2f,%ecx
mov    %rbx,%r8
call   10d0 <sprintf@plt>
lea    0xdc4(%rip),%rsi
mov    %r12,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1758 <processfile+0x598>
mov    %rax,%r13
lea    0xda9(%rip),%rsi
lea    0x40(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x24(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x20(%rsp)
lea    0x440(%rsp),%r12
mov    %r12,%rdi
mov    $0x200,%esi
mov    %r13,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1749 <processfile+0x589>
test   %rbp,%rbp
sete   %al
cmpq   $0x0,0x690(%rsp)
sete   %cl
or     %al,%cl
mov    %cl,0x2a(%rsp)
jmp    1309 <processfile+0x149>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
mov    $0x200,%esi
mov    %r13,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1749 <processfile+0x589>
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    %r12,%rdi
lea    0xd05(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     1430 <processfile+0x270>
mov    %rax,%r14
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1430 <processfile+0x270>
mov    %r14,%rdi
lea    0xcd8(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jg     1690 <processfile+0x4d0>
mov    %r14,%rdi
lea    0xcbf(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x3,%eax
jg     1690 <processfile+0x4d0>
lea    0x18(%rsp),%rax
mov    %rax,(%rsp)
mov    %r14,%rdi
lea    0xc9d(%rip),%rsi
lea    0x24(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x1c(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x4,%eax
jg     1690 <processfile+0x4d0>
lea    0x18(%rsp),%rax
mov    %rax,(%rsp)
mov    %r14,%rdi
lea    0xc7e(%rip),%rsi
lea    0x24(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x1c(%rsp),%r9
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    1690 <processfile+0x4d0>
nopl   0x0(%rax,%rax,1)
mov    %r12,%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    0x24(%rsp),%rdx
lea    0x14(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jg     1690 <processfile+0x4d0>
mov    %rbx,%rdi
lea    0xc28(%rip),%rsi
lea    0x14(%rsp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    1532 <processfile+0x372>
nopl   0x0(%rax)
mov    %r12,%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    0x24(%rsp),%rdx
lea    0x14(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jg     1690 <processfile+0x4d0>
mov    %rbx,%rdi
lea    0xbd9(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x2b(%rsp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmpq   $0x0,0x690(%rsp)
je     1532 <processfile+0x372>
cmp    $0x2,%eax
jne    1532 <processfile+0x372>
cmpb   $0x4d,0x2b(%rsp)
jne    1532 <processfile+0x372>
mov    0x690(%rsp),%rax
movl   $0x1,(%rax)
movl   $0x0,0x24(%rsp)
jmp    16b0 <processfile+0x4f0>
nop
mov    %r12,%rdi
lea    0xb9b(%rip),%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     15b8 <processfile+0x3f8>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
mov    $0x24,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     15b8 <processfile+0x3f8>
mov    %rbx,%rdi
lea    0xb78(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jg     1690 <processfile+0x4d0>
mov    %rbx,%rdi
lea    0xb5f(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
jmp    1690 <processfile+0x4d0>
cmpq   $0x0,0x690(%rsp)
je     1690 <processfile+0x4d0>
test   %rbp,%rbp
je     1690 <processfile+0x4d0>
mov    0x690(%rsp),%rax
cmpl   $0x0,(%rax)
jne    1690 <processfile+0x4d0>
cmpl   $0x0,0x2c(%rsp)
je     1663 <processfile+0x4a3>
mov    %r12,%rdi
call   1050 <strlen@plt>
add    %rsp,%rax
add    $0x440,%rax
jmp    1608 <processfile+0x448>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rax)
add    $0xfffffffffffffffe,%rax
cmp    %r12,%rax
jbe    161b <processfile+0x45b>
movzbl -0x1(%rax),%ecx
cmp    $0xd,%cl
je     1600 <processfile+0x440>
cmp    $0xa,%cl
je     1600 <processfile+0x440>
lea    0x240(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
add    %rsp,%rax
add    $0x240,%rax
cmp    %rbx,%rax
ja     1655 <processfile+0x495>
jmp    1663 <processfile+0x4a3>
nopl   0x0(%rax,%rax,1)
movb   $0x0,-0x1(%rax)
add    $0xfffffffffffffffe,%rax
lea    0x240(%rsp),%rcx
cmp    %rcx,%rax
jbe    1663 <processfile+0x4a3>
movzbl -0x1(%rax),%ecx
cmp    $0xd,%cl
je     1640 <processfile+0x480>
cmp    $0xa,%cl
je     1640 <processfile+0x480>
mov    %r12,%rdi
lea    0x240(%rsp),%rsi
call   1090 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    0x690(%rsp),%rax
mov    %ecx,(%rax)
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,0x24(%rsp)
je     16b0 <processfile+0x4f0>
mov    0x14(%rsp),%eax
mov    0x38(%rsp),%rcx
add    %eax,(%rcx)
jmp    16bf <processfile+0x4ff>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x14(%rsp),%eax
mov    0x30(%rsp),%rcx
cmp    (%rcx),%eax
jle    16bf <processfile+0x4ff>
mov    %eax,(%rcx)
mov    0x20(%rsp),%ecx
cmp    (%r15),%ecx
jle    16d0 <processfile+0x510>
mov    0x1c(%rsp),%edx
jmp    16f0 <processfile+0x530>
xchg   %ax,%ax
jne    170b <processfile+0x54b>
mov    0x1c(%rsp),%edx
mov    0x680(%rsp),%rsi
cmp    (%rsi),%edx
jle    1735 <processfile+0x575>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,(%r15)
mov    0x680(%rsp),%rsi
mov    %edx,(%rsi)
mov    0x18(%rsp),%edx
mov    0x688(%rsp),%rsi
mov    %edx,(%rsi)
test   %eax,%eax
jle    12f0 <processfile+0x130>
test   %ecx,%ecx
jle    12f0 <processfile+0x130>
cmpb   $0x0,0x2a(%rsp)
jne    1749 <processfile+0x589>
mov    0x690(%rsp),%rax
cmpl   $0x0,(%rax)
je     12f0 <processfile+0x130>
jmp    1777 <processfile+0x5b7>
jne    170b <processfile+0x54b>
mov    0x18(%rsp),%esi
mov    0x688(%rsp),%rdi
cmp    (%rdi),%esi
jg     16f0 <processfile+0x530>
jmp    170b <processfile+0x54b>
mov    %r13,%rdi
call   1040 <fclose@plt>
test   %rbp,%rbp
jne    177f <processfile+0x5bf>
jmp    1787 <processfile+0x5c7>
test   %r14d,%r14d
jne    1787 <processfile+0x5c7>
mov    0x287c(%rip),%rax
mov    (%rax),%edi
lea    0x8b2(%rip),%rsi
mov    %r12,%rdx
call   10a0 <fprintf@plt>
jmp    1787 <processfile+0x5c7>
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, i32* %8) {
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca [512 x i8]
%20 = alloca [512 x i8]
%21 = alloca [512 x i8]
%22 = alloca i8*
%23 = alloca i32*
%24 = alloca i32*
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i8
store i8* %0, i8** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%32 = load i8*, i8** %10
%33 = call i8* @strrchr(i8* %32, i8 signext 47)
store i8* %33, i8** %22
%34 = icmp ne i8* %33, null
br i1 %34, label %35, label %55
35: ; preds = %9
%36 = load i8*, i8** %22
%37 = getelementptr inbounds i8, i8* %36, i32 1
store i8* %37, i8** %22
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 0
%39 = load i8*, i8** %10
%40 = load i8*, i8** %22
%41 = load i8*, i8** %10
%42 = ptrtoint i8* %40 to i64
%43 = ptrtoint i8* %41 to i64
%44 = sub i64 %42, %43
%45 = trunc i64 %44 to i32
%46 = call i32 @strncpy(i8* %38, i8* %39, i32 %45)
%47 = load i8*, i8** %22
%48 = load i8*, i8** %10
%49 = ptrtoint i8* %47 to i64
%50 = ptrtoint i8* %48 to i64
%51 = sub i64 %49, %50
%52 = trunc i64 %51 to i32
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 %53
store i8 0, i8* %54
br label %58
55: ; preds = %9
%56 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 0
store i8 0, i8* %56
%57 = load i8*, i8** %10
store i8* %57, i8** %22
br label %58
58: ; preds = %55, %35
%59 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 0
%60 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 0
%61 = call i32 @strlen(i8* %60)
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %59, i64 %62
%64 = load i8*, i8** %22
%65 = call i32 @sprintf(i8* %63, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext 47, i8 signext 47, i8* %64)
%66 = load i8*, i8** %10
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %67, i32** %23
%68 = load i32*, i32** %23
%69 = icmp eq i32* %68, null
br i1 %69, label %70, label %78
70: ; preds = %58
%71 = load i32, i32* %11
%72 = icmp ne i32 %71, 0
br i1 %72, label %77, label %73
73: ; preds = %70
%74 = load i32, i32* @stderr
%75 = load i8*, i8** %10
%76 = call i32 @fprintf(i32 %74, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %75)
br label %77
77: ; preds = %73, %70
br label %354
78: ; preds = %58
%79 = getelementptr inbounds [512 x i8], [512 x i8]* %21, i64 0, i64 0
%80 = call i32* @fopen(i8* %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %80, i32** %24
store i32 0, i32* %25
store i32 0, i32* %26
store i32 0, i32* %29
store i32 0, i32* %28
store i32 0, i32* %27
br label %81
81: ; preds = %345, %78
%82 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%83 = load i32*, i32** %23
%84 = call i32* @fgets(i8* %82, i32 512, i32* %83)
%85 = icmp ne i32* %84, null
br i1 %85, label %86, label %346
86: ; preds = %81
%87 = load i32*, i32** %24
%88 = icmp eq i32* %87, null
br i1 %88, label %94, label %89
89: ; preds = %86
%90 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%91 = load i32*, i32** %24
%92 = call i32* @fgets(i8* %90, i32 512, i32* %91)
%93 = icmp eq i32* %92, null
br i1 %93, label %94, label %96
94: ; preds = %89, %86
%95 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
store i8 0, i8* %95
br label %96
96: ; preds = %94, %89
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%98 = call i8* @strstr(i8* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i8* %98, i8** %22
%99 = icmp ne i8* %98, null
br i1 %99, label %100, label %122
100: ; preds = %96
%101 = load i8*, i8** %22
%102 = getelementptr inbounds i8, i8* %101, i64 1
%103 = call i8* @strchr(i8* %102, i8 signext 36)
%104 = icmp ne i8* %103, null
br i1 %104, label %105, label %122
105: ; preds = %100
%106 = load i8*, i8** %22
%107 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %106, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32* %25, i32* %27, i32* %28, i32* %29)
%108 = icmp slt i32 %107, 4
br i1 %108, label %109, label %121
109: ; preds = %105
%110 = load i8*, i8** %22
%111 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %110, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32* %25, i32* %27, i32* %28, i32* %29)
%112 = icmp slt i32 %111, 4
br i1 %112, label %113, label %121
113: ; preds = %109
%114 = load i8*, i8** %22
%115 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %114, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32* %26, i32* %25, i32* %27, i32* %28, i32* %29)
%116 = icmp slt i32 %115, 5
br i1 %116, label %117, label %120
117: ; preds = %113
%118 = load i8*, i8** %22
%119 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %118, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32* %26, i32* %25, i32* %27, i32* %28, i32* %29)
br label %120
120: ; preds = %117, %113
br label %121
121: ; preds = %120, %109, %105
br label %274
122: ; preds = %100, %96
%123 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%124 = call i8* @strstr(i8* %123, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
store i8* %124, i8** %22
%125 = icmp ne i8* %124, null
br i1 %125, label %126, label %139
126: ; preds = %122
%127 = load i8*, i8** %22
%128 = getelementptr inbounds i8, i8* %127, i64 1
%129 = call i8* @strchr(i8* %128, i8 signext 36)
%130 = icmp ne i8* %129, null
br i1 %130, label %131, label %139
131: ; preds = %126
%132 = load i8*, i8** %22
%133 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %132, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32* %26, i32* %25)
%134 = icmp slt i32 %133, 2
br i1 %134, label %135, label %138
135: ; preds = %131
%136 = load i8*, i8** %22
%137 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %136, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32* %25)
store i32 0, i32* %26
br label %138
138: ; preds = %135, %131
br label %273
139: ; preds = %126, %122
%140 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%141 = call i8* @strstr(i8* %140, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
store i8* %141, i8** %22
%142 = icmp ne i8* %141, null
br i1 %142, label %143, label %168
143: ; preds = %139
%144 = load i8*, i8** %22
%145 = getelementptr inbounds i8, i8* %144, i64 1
%146 = call i8* @strchr(i8* %145, i8 signext 36)
%147 = icmp ne i8* %146, null
br i1 %147, label %148, label %168
148: ; preds = %143
%149 = load i8*, i8** %22
%150 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %149, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32* %26, i32* %25)
%151 = icmp slt i32 %150, 2
br i1 %151, label %152, label %167
152: ; preds = %148
%153 = load i8*, i8** %22
%154 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %153, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32* %25, i8* %31)
store i32 %154, i32* %30
%155 = load i32, i32* %30
%156 = icmp eq i32 %155, 2
br i1 %156, label %157, label %166
157: ; preds = %152
%158 = load i8, i8* %31
%159 = sext i8 %158 to i32
%160 = icmp eq i32 %159, 77
br i1 %160, label %161, label %166
161: ; preds = %157
%162 = load i32*, i32** %18
%163 = icmp ne i32* %162, null
br i1 %163, label %164, label %166
164: ; preds = %161
%165 = load i32*, i32** %18
store i32 1, i32* %165
br label %166
166: ; preds = %164, %161, %157, %152
store i32 0, i32* %26
br label %167
167: ; preds = %166, %148
br label %272
168: ; preds = %143, %139
%169 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%170 = call i8* @strstr(i8* %169, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
store i8* %170, i8** %22
%171 = icmp ne i8* %170, null
br i1 %171, label %172, label %185
172: ; preds = %168
%173 = load i8*, i8** %22
%174 = getelementptr inbounds i8, i8* %173, i64 1
%175 = call i8* @strchr(i8* %174, i8 signext 36)
%176 = icmp ne i8* %175, null
br i1 %176, label %177, label %185
177: ; preds = %172
%178 = load i8*, i8** %22
%179 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %178, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32* %27, i32* %28, i32* %29)
%180 = icmp slt i32 %179, 3
br i1 %180, label %181, label %184
181: ; preds = %177
%182 = load i8*, i8** %22
%183 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %182, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32* %27, i32* %28, i32* %29)
br label %184
184: ; preds = %181, %177
br label %271
185: ; preds = %172, %168
%186 = load i32*, i32** %18
%187 = icmp ne i32* %186, null
br i1 %187, label %188, label %270
188: ; preds = %185
%189 = load i32*, i32** %18
%190 = load i32, i32* %189
%191 = icmp eq i32 %190, 0
br i1 %191, label %192, label %270
192: ; preds = %188
%193 = load i32*, i32** %24
%194 = icmp ne i32* %193, null
br i1 %194, label %195, label %270
195: ; preds = %192
%196 = load i32, i32* %12
%197 = icmp ne i32 %196, 0
br i1 %197, label %198, label %263
198: ; preds = %195
%199 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%200 = call i8* @strchr(i8* %199, i8 signext 0)
store i8* %200, i8** %22
br label %201
201: ; preds = %227, %198
%202 = load i8*, i8** %22
%203 = icmp ne i8* %202, null
br i1 %203, label %204, label %222
204: ; preds = %201
%205 = load i8*, i8** %22
%206 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%207 = icmp ugt i8* %205, %206
br i1 %207, label %208, label %222
208: ; preds = %204
%209 = load i8*, i8** %22
%210 = getelementptr inbounds i8, i8* %209, i64 -1
%211 = load i8, i8* %210
%212 = sext i8 %211 to i32
%213 = icmp eq i32 %212, 13
br i1 %213, label %220, label %214
214: ; preds = %208
%215 = load i8*, i8** %22
%216 = getelementptr inbounds i8, i8* %215, i64 -1
%217 = load i8, i8* %216
%218 = sext i8 %217 to i32
%219 = icmp eq i32 %218, 10
br label %220
220: ; preds = %214, %208
%221 = phi i1 [ true, %208 ], [ %219, %214 ]
br label %222
222: ; preds = %220, %204, %201
%223 = phi i1 [ false, %204 ], [ false, %201 ], [ %221, %220 ]
br i1 %223, label %224, label %230
224: ; preds = %222
%225 = load i8*, i8** %22
%226 = getelementptr inbounds i8, i8* %225, i32 -1
store i8* %226, i8** %22
store i8 0, i8* %226
br label %227
227: ; preds = %224
%228 = load i8*, i8** %22
%229 = getelementptr inbounds i8, i8* %228, i32 -1
store i8* %229, i8** %22
br label %201
230: ; preds = %222
%231 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%232 = call i8* @strchr(i8* %231, i8 signext 0)
store i8* %232, i8** %22
br label %233
233: ; preds = %259, %230
%234 = load i8*, i8** %22
%235 = icmp ne i8* %234, null
br i1 %235, label %236, label %254
236: ; preds = %233
%237 = load i8*, i8** %22
%238 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%239 = icmp ugt i8* %237, %238
br i1 %239, label %240, label %254
240: ; preds = %236
%241 = load i8*, i8** %22
%242 = getelementptr inbounds i8, i8* %241, i64 -1
%243 = load i8, i8* %242
%244 = sext i8 %243 to i32
%245 = icmp eq i32 %244, 13
br i1 %245, label %252, label %246
246: ; preds = %240
%247 = load i8*, i8** %22
%248 = getelementptr inbounds i8, i8* %247, i64 -1
%249 = load i8, i8* %248
%250 = sext i8 %249 to i32
%251 = icmp eq i32 %250, 10
br label %252
252: ; preds = %246, %240
%253 = phi i1 [ true, %240 ], [ %251, %246 ]
br label %254
254: ; preds = %252, %236, %233
%255 = phi i1 [ false, %236 ], [ false, %233 ], [ %253, %252 ]
br i1 %255, label %256, label %262
256: ; preds = %254
%257 = load i8*, i8** %22
%258 = getelementptr inbounds i8, i8* %257, i32 -1
store i8* %258, i8** %22
store i8 0, i8* %258
br label %259
259: ; preds = %256
%260 = load i8*, i8** %22
%261 = getelementptr inbounds i8, i8* %260, i32 -1
store i8* %261, i8** %22
br label %233
262: ; preds = %254
br label %263
263: ; preds = %262, %195
%264 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%265 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%266 = call i64 @strcmp(i8* %264, i8* %265)
%267 = icmp ne i64 %266, 0
%268 = zext i1 %267 to i32
%269 = load i32*, i32** %18
store i32 %268, i32* %269
br label %270
270: ; preds = %263, %192, %188, %185
br label %271
271: ; preds = %270, %184
br label %272
272: ; preds = %271, %167
br label %273
273: ; preds = %272, %138
br label %274
274: ; preds = %273, %121
%275 = load i32, i32* %26
%276 = icmp ne i32 %275, 0
br i1 %276, label %277, label %282
277: ; preds = %274
%278 = load i32, i32* %25
%279 = load i32*, i32** %14
%280 = load i32, i32* %279
%281 = add nsw i32 %280, %278
store i32 %281, i32* %279
br label %291
282: ; preds = %274
%283 = load i32, i32* %25
%284 = load i32*, i32** %13
%285 = load i32, i32* %284
%286 = icmp sgt i32 %283, %285
br i1 %286, label %287, label %290
287: ; preds = %282
%288 = load i32, i32* %25
%289 = load i32*, i32** %13
store i32 %288, i32* %289
br label %290
290: ; preds = %287, %282
br label %291
291: ; preds = %290, %277
%292 = load i32, i32* %27
%293 = load i32*, i32** %15
%294 = load i32, i32* %293
%295 = icmp sgt i32 %292, %294
br i1 %295, label %321, label %296
296: ; preds = %291
%297 = load i32, i32* %27
%298 = load i32*, i32** %15
%299 = load i32, i32* %298
%300 = icmp eq i32 %297, %299
br i1 %300, label %301, label %306
301: ; preds = %296
%302 = load i32, i32* %28
%303 = load i32*, i32** %16
%304 = load i32, i32* %303
%305 = icmp sgt i32 %302, %304
br i1 %305, label %321, label %306
306: ; preds = %301, %296
%307 = load i32, i32* %27
%308 = load i32*, i32** %15
%309 = load i32, i32* %308
%310 = icmp eq i32 %307, %309
br i1 %310, label %311, label %328
311: ; preds = %306
%312 = load i32, i32* %28
%313 = load i32*, i32** %16
%314 = load i32, i32* %313
%315 = icmp eq i32 %312, %314
br i1 %315, label %316, label %328
316: ; preds = %311
%317 = load i32, i32* %29
%318 = load i32*, i32** %17
%319 = load i32, i32* %318
%320 = icmp sgt i32 %317, %319
br i1 %320, label %321, label %328
321: ; preds = %316, %301, %291
%322 = load i32, i32* %27
%323 = load i32*, i32** %15
store i32 %322, i32* %323
%324 = load i32, i32* %28
%325 = load i32*, i32** %16
store i32 %324, i32* %325
%326 = load i32, i32* %29
%327 = load i32*, i32** %17
store i32 %326, i32* %327
br label %328
328: ; preds = %321, %316, %311, %306
%329 = load i32, i32* %25
%330 = icmp sgt i32 %329, 0
br i1 %330, label %331, label %345
331: ; preds = %328
%332 = load i32, i32* %27
%333 = icmp sgt i32 %332, 0
br i1 %333, label %334, label %345
334: ; preds = %331
%335 = load i32*, i32** %24
%336 = icmp eq i32* %335, null
br i1 %336, label %344, label %337
337: ; preds = %334
%338 = load i32*, i32** %18
%339 = icmp eq i32* %338, null
br i1 %339, label %344, label %340
340: ; preds = %337
%341 = load i32*, i32** %18
%342 = load i32, i32* %341
%343 = icmp ne i32 %342, 0
br i1 %343, label %344, label %345
344: ; preds = %340, %337, %334
br label %346
345: ; preds = %340, %331, %328
br label %81
346: ; preds = %344, %81
%347 = load i32*, i32** %23
%348 = call i32 @fclose(i32* %347)
%349 = load i32*, i32** %24
%350 = icmp ne i32* %349, null
br i1 %350, label %351, label %354
351: ; preds = %346
%352 = load i32*, i32** %24
%353 = call i32 @fclose(i32* %352)
br label %354
354: ; preds = %77, %351, %346
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 %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i32* nocapture %7, i32* %8) {
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8
%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 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%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 = bitcast i32* %17 to i8*
%27 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%28 = icmp eq i8* %27, null
br i1 %28, label %39, label %29
29: ; preds = %9
%30 = getelementptr inbounds i8, i8* %27, i64 1
%31 = ptrtoint i8* %30 to i64
%32 = ptrtoint i8* %0 to i64
%33 = sub i64 %31, %32
%34 = trunc i64 %33 to i32
%35 = call i32 @strncpy(i8* %21, i8* %0, i32 %34)
%36 = shl i64 %33, 32
%37 = ashr exact i64 %36, 32
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %37
store i8 0, i8* %38
br label %40
39: ; preds = %9
store i8 0, i8* %21
br label %40
40: ; preds = %39, %29
%41 = phi i8* [ %30, %29 ], [ %0, %39 ]
%42 = call i32 @strlen(i8* %21)
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %43
%45 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext 47, i8 signext 47, i8* %41)
%46 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%47 = icmp eq i32* %46, null
br i1 %47, label %48, label %53
48: ; preds = %40
%49 = icmp eq i32 %1, 0
br i1 %49, label %50, label %214
50: ; preds = %48
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %214
53: ; preds = %40
%54 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %17
store i32 0, i32* %16
store i32 0, i32* %15
%55 = call i32* @fgets(i8* %19, i32 512, i32* %46)
%56 = icmp eq i32* %55, null
br i1 %56, label %209, label %57
57: ; preds = %53
%58 = icmp eq i32* %54, null
%59 = icmp ne i32* %8, null
%60 = icmp eq i32* %8, null
%61 = icmp ne i32* %54, null
%62 = icmp eq i32 %2, 0
%63 = or i1 %60, %58
br label %64
64: ; preds = %57, %206
br i1 %58, label %68, label %65
65: ; preds = %64
%66 = call i32* @fgets(i8* %20, i32 512, i32* %54)
%67 = icmp eq i32* %66, null
br i1 %67, label %68, label %69
68: ; preds = %65, %64
store i8 0, i8* %20
br label %69
69: ; preds = %68, %65
%70 = call i8* @strstr(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%71 = icmp eq i8* %70, null
br i1 %71, label %87, label %72
72: ; preds = %69
%73 = getelementptr inbounds i8, i8* %70, i64 1
%74 = call i8* @strchr(i8* %73, i8 signext 36)
%75 = icmp eq i8* %74, null
br i1 %75, label %87, label %76
76: ; preds = %72
%77 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %70, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32* %13, i32* %15, i32* %16, i32* %17)
%78 = icmp slt i32 %77, 4
br i1 %78, label %79, label %162
79: ; preds = %76
%80 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %70, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32* %13, i32* %15, i32* %16, i32* %17)
%81 = icmp slt i32 %80, 4
br i1 %81, label %82, label %162
82: ; preds = %79
%83 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %70, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32* %14, i32* %13, i32* %15, i32* %16, i32* %17)
%84 = icmp slt i32 %83, 5
br i1 %84, label %85, label %162
85: ; preds = %82
%86 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %70, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32* %14, i32* %13, i32* %15, i32* %16, i32* %17)
br label %162
87: ; preds = %72, %69
%88 = call i8* @strstr(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%89 = icmp eq i8* %88, null
br i1 %89, label %99, label %90
90: ; preds = %87
%91 = getelementptr inbounds i8, i8* %88, i64 1
%92 = call i8* @strchr(i8* %91, i8 signext 36)
%93 = icmp eq i8* %92, null
br i1 %93, label %99, label %94
94: ; preds = %90
%95 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %88, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32* %14, i32* %13)
%96 = icmp slt i32 %95, 2
br i1 %96, label %97, label %162
97: ; preds = %94
%98 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %88, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32* %13)
store i32 0, i32* %14
br label %169
99: ; preds = %90, %87
%100 = call i8* @strstr(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%101 = icmp eq i8* %100, null
br i1 %101, label %118, label %102
102: ; preds = %99
%103 = getelementptr inbounds i8, i8* %100, i64 1
%104 = call i8* @strchr(i8* %103, i8 signext 36)
%105 = icmp eq i8* %104, null
br i1 %105, label %118, label %106
106: ; preds = %102
%107 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %100, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32* %14, i32* %13)
%108 = icmp slt i32 %107, 2
br i1 %108, label %109, label %162
109: ; preds = %106
%110 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %100, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32* %13, i8* %18)
%111 = icmp eq i32 %110, 2
%112 = load i8, i8* %18
%113 = icmp eq i8 %112, 77
%114 = select i1 %111, i1 %113, i1 false
%115 = and i1 %59, %114
br i1 %115, label %116, label %117
116: ; preds = %109
store i32 1, i32* %8
br label %117
117: ; preds = %116, %109
store i32 0, i32* %14
br label %169
118: ; preds = %102, %99
%119 = call i8* @strstr(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%120 = icmp eq i8* %119, null
br i1 %120, label %130, label %121
121: ; preds = %118
%122 = getelementptr inbounds i8, i8* %119, i64 1
%123 = call i8* @strchr(i8* %122, i8 signext 36)
%124 = icmp eq i8* %123, null
br i1 %124, label %130, label %125
125: ; preds = %121
%126 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %119, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32* %15, i32* %16, i32* %17)
%127 = icmp slt i32 %126, 3
br i1 %127, label %128, label %162
128: ; preds = %125
%129 = call i32 (i8*, i8*, i32*, ...) @sscanf(i8* %119, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i32* %15, i32* %16, i32* %17)
br label %162
130: ; preds = %121, %118
br i1 %60, label %162, label %131
131: ; preds = %130
%132 = load i32, i32* %8
%133 = icmp eq i32 %132, 0
%134 = and i1 %61, %133
br i1 %134, label %135, label %162
135: ; preds = %131
br i1 %62, label %158, label %136
136: ; preds = %135
%137 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %19)
%138 = getelementptr [512 x i8], [512 x i8]* %10, i64 0, i64 %137
%139 = icmp ugt i8* %138, %19
br i1 %139, label %140, label %147
140: ; preds = %136, %144
%141 = phi i8* [ %145, %144 ], [ %138, %136 ]
%142 = getelementptr inbounds i8, i8* %141, i64 -1
%143 = load i8, i8* %142
switch i8 %143, label %147 [
i8 13, label %144
i8 10, label %144
]
144: ; preds = %140, %140
store i8 0, i8* %142
%145 = getelementptr inbounds i8, i8* %141, i64 -2
%146 = icmp ugt i8* %145, %19
br i1 %146, label %140, label %147
147: ; preds = %144, %140, %136
%148 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %20)
%149 = getelementptr [512 x i8], [512 x i8]* %11, i64 0, i64 %148
%150 = icmp ugt i8* %149, %20
br i1 %150, label %151, label %158
151: ; preds = %147, %155
%152 = phi i8* [ %156, %155 ], [ %149, %147 ]
%153 = getelementptr inbounds i8, i8* %152, i64 -1
%154 = load i8, i8* %153
switch i8 %154, label %158 [
i8 13, label %155
i8 10, label %155
]
155: ; preds = %151, %151
store i8 0, i8* %153
%156 = getelementptr inbounds i8, i8* %152, i64 -2
%157 = icmp ugt i8* %156, %20
br i1 %157, label %151, label %158
158: ; preds = %155, %151, %147, %135
%159 = call i64 @strcmp(i8* %19, i8* %20)
%160 = icmp ne i64 %159, 0
%161 = zext i1 %160 to i32
store i32 %161, i32* %8
br label %162
162: ; preds = %94, %128, %125, %158, %131, %130, %106, %76, %79, %85, %82
%163 = load i32, i32* %14
%164 = icmp eq i32 %163, 0
br i1 %164, label %169, label %165
165: ; preds = %162
%166 = load i32, i32* %13
%167 = load i32, i32* %4
%168 = add nsw i32 %167, %166
store i32 %168, i32* %4
br label %174
169: ; preds = %117, %97, %162
%170 = load i32, i32* %13
%171 = load i32, i32* %3
%172 = icmp sgt i32 %170, %171
br i1 %172, label %173, label %174
173: ; preds = %169
store i32 %170, i32* %3
br label %174
174: ; preds = %169, %173, %165
%175 = phi i32 [ %170, %169 ], [ %170, %173 ], [ %166, %165 ]
%176 = load i32, i32* %15
%177 = load i32, i32* %5
%178 = icmp sgt i32 %176, %177
br i1 %178, label %179, label %181
179: ; preds = %174
%180 = load i32, i32* %16
br label %193
181: ; preds = %174
%182 = icmp eq i32 %176, %177
br i1 %182, label %183, label %196
183: ; preds = %181
%184 = load i32, i32* %16
%185 = load i32, i32* %6
%186 = icmp sgt i32 %184, %185
br i1 %186, label %193, label %187
187: ; preds = %183
%188 = icmp eq i32 %184, %185
br i1 %188, label %189, label %196
189: ; preds = %187
%190 = load i32, i32* %17
%191 = load i32, i32* %7
%192 = icmp sgt i32 %190, %191
br i1 %192, label %193, label %196
193: ; preds = %179, %189, %183
%194 = phi i32 [ %180, %179 ], [ %184, %189 ], [ %184, %183 ]
store i32 %176, i32* %5
store i32 %194, i32* %6
%195 = load i32, i32* %17
store i32 %195, i32* %7
br label %196
196: ; preds = %181, %193, %189, %187
%197 = icmp sgt i32 %175, 0
%198 = icmp sgt i32 %176, 0
%199 = select i1 %197, i1 %198, i1 false
br i1 %199, label %200, label %206
200: ; preds = %196
br i1 %63, label %209, label %201
201: ; preds = %200
%202 = load i32, i32* %8
%203 = icmp eq i32 %202, 0
br i1 %203, label %206, label %204
204: ; preds = %201
%205 = call i32 @fclose(i32* %46)
br label %212
206: ; preds = %201, %196
%207 = call i32* @fgets(i8* %19, i32 512, i32* %46)
%208 = icmp eq i32* %207, null
br i1 %208, label %209, label %64
209: ; preds = %206, %200, %53
%210 = call i32 @fclose(i32* %46)
%211 = icmp eq i32* %54, null
br i1 %211, label %214, label %212
212: ; preds = %204, %209
%213 = call i32 @fclose(i32* %54)
br label %214
214: ; preds = %209, %212, %48, %50
ret void
}