#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 */
struct stat {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, ...);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ perror(char *);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  struct stat sb;
  FILE *f;
  char keyword[64];
  char ipaddr[64];
  int i, i1, i2, i3, i4;
  int seq, seq_prev;
  char c0, c1;
  int retval;
  int line = 0;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s filename (argc:%d)\n", argv[0], argc);
    exit(1);
  }
  if (stat(argv[1], &sb) < 0) {
    perror("spc_sanity: stat");
    exit(1);
  }
  if ((f = fopen(argv[1], "r")) == NULL) {
    perror("spc_sanity:fopen");
    exit(1);
  }
  retval = fscanf(f, "%s %d", keyword, &i);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "testid:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %d", keyword, &i);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "srcid:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %d", keyword, &i);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "dstid:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %s", keyword, ipaddr);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "src:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if ((strchr(ipaddr, '/')) == NULL) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %s", keyword, ipaddr);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "dst:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if ((strchr(ipaddr, '/')) == NULL) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %d", keyword, &i);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "start:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  retval = fscanf(f, "%s %d", keyword, &i);
  if (retval != 2) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  if (strcmp(keyword, "dur:") != 0) {
    fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
    exit(1);
  }
  line++;
  seq_prev = 0;
  while (!feof(f)) {
    retval = fscanf(f, "%d %d%c%d %d%c%d", &seq, &i1, &c0, &i2, &i3, &c1, &i4);
    if (feof(f))
      break;
    if (retval != 7) {
      fprintf(stderr, "spc_sanity: %s: Error on line %d (retval:%d)\n", argv[1],
              line, retval);
      exit(1);
    }
    if (c0 != '.' && c1 != '.') {
      fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
      exit(1);
    }
    if (seq - seq_prev > 32000 || seq - seq_prev < -32000) {
      fprintf(stderr, "spc_sanity: %s: Error on line %d\n", argv[1], line);
      exit(1);
    }
    seq_prev = seq;
    line++;
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xc8(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11e8 <main+0x58>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%ecx
lea    0xe29(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <stat@plt>
cmp    $0x0,%rax
jge    1219 <main+0x89>
lea    0xe14(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe07(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1251 <main+0xc1>
lea    0xdef(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xde2(%rip),%rsi
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     12b0 <main+0x120>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xda9(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0xdaf(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     12f9 <main+0x169>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xd60(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xd2b(%rip),%rsi
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     1367 <main+0x1d7>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xcf2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0xd00(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     13b0 <main+0x220>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xca9(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xc74(%rip),%rsi
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     141e <main+0x28e>
mov    0x2bea(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0xc50(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1467 <main+0x2d7>
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xbf2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
lea    0xbf4(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     14d5 <main+0x345>
mov    0x2b33(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xb84(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0xba6(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     151e <main+0x38e>
mov    0x2aea(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1568 <main+0x3d8>
mov    0x2aa0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xaf1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
lea    0xaf3(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     15d6 <main+0x446>
mov    0x2a32(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xa83(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0xaaa(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     161f <main+0x48f>
mov    0x29e9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0xa3a(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1669 <main+0x4d9>
mov    0x299f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x9f0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0x9bb(%rip),%rsi
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     16d7 <main+0x547>
mov    0x2931(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x982(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0x9ae(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1720 <main+0x590>
mov    0x28e8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x939(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0x904(%rip),%rsi
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
cmpl   $0x2,-0xc4(%rbp)
je     178e <main+0x5fe>
mov    0x287a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x8cb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    -0x60(%rbp),%rdi
lea    0x8fe(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     17d7 <main+0x647>
mov    0x2831(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x882(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
movl   $0x0,-0xbc(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    180f <main+0x67f>
jmp    198d <main+0x7fd>
mov    -0x20(%rbp),%rdi
lea    0x882(%rip),%rsi
lea    -0xb8(%rbp),%rdx
lea    -0xa8(%rbp),%rcx
lea    -0xbd(%rbp),%r8
lea    -0xac(%rbp),%r9
lea    -0xb0(%rbp),%r11
lea    -0xbe(%rbp),%r10
lea    -0xb4(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0xc4(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     187e <main+0x6ee>
jmp    198d <main+0x7fd>
cmpl   $0x7,-0xc4(%rbp)
je     18c1 <main+0x731>
mov    0x274e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
mov    -0xc4(%rbp),%r8d
lea    0x7fd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
movsbl -0xbd(%rbp),%eax
cmp    $0x2e,%eax
je     1910 <main+0x780>
movsbl -0xbe(%rbp),%eax
cmp    $0x2e,%eax
je     1910 <main+0x780>
mov    0x26f8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x749(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xb8(%rbp),%eax
sub    -0xbc(%rbp),%eax
cmp    $0x7d00,%eax
jg     193e <main+0x7ae>
mov    -0xb8(%rbp),%eax
sub    -0xbc(%rbp),%eax
cmp    $0xffff8300,%eax
jge    196d <main+0x7dd>
mov    0x269b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0xc8(%rbp),%ecx
lea    0x6ec(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0xb8(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    17f0 <main+0x660>
xor    %edi,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rsi,%r12
cmp    $0x2,%edi
jne    11c6 <main+0x36>
mov    0x8(%r12),%rdi
lea    0x18(%rsp),%rsi
call   1080 <stat@plt>
test   %rax,%rax
jns    11ed <main+0x5d>
lea    0xe5a(%rip),%rdi
jmp    120d <main+0x7d>
mov    %edi,%ecx
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xe24(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
add    $0x8,%r12
mov    (%r12),%rdi
lea    0xe33(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
jne    121c <main+0x8c>
lea    0xe24(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    %rax,%r14
lea    0xe1c(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    1341 <main+0x1b1>
lea    0xe20(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1341 <main+0x1b1>
lea    0xdde(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    135c <main+0x1cc>
lea    0xdea(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    135c <main+0x1cc>
lea    0xda0(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    137a <main+0x1ea>
lea    0xdb3(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    137a <main+0x1ea>
lea    0xda0(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x70(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    1323 <main+0x193>
lea    0xd86(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1323 <main+0x193>
lea    0x70(%rsp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1398 <main+0x208>
mov    0x2cb6(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xd11(%rip),%rsi
mov    $0x3,%ecx
jmp    11dc <main+0x4c>
mov    0x2c98(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xcf3(%rip),%rsi
xor    %ecx,%ecx
jmp    11dc <main+0x4c>
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xcd8(%rip),%rsi
mov    $0x1,%ecx
jmp    11dc <main+0x4c>
mov    0x2c5f(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xcba(%rip),%rsi
mov    $0x2,%ecx
jmp    11dc <main+0x4c>
lea    0xce1(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x70(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    13e2 <main+0x252>
lea    0xccc(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    13e2 <main+0x252>
lea    0x70(%rsp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1400 <main+0x270>
mov    0x2bf7(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xc52(%rip),%rsi
mov    $0x4,%ecx
jmp    11dc <main+0x4c>
lea    0xc3b(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    153a <main+0x3aa>
lea    0xc65(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    153a <main+0x3aa>
lea    0xbfd(%rip),%rsi
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fscanf@plt>
cmp    $0x2,%eax
jne    1558 <main+0x3c8>
lea    0xc2e(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1558 <main+0x3c8>
mov    %r14,%rdi
call   1070 <feof@plt>
test   %rax,%rax
jne    1533 <main+0x3a3>
mov    $0x7,%ebp
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
sub    $0x8,%rsp
mov    %r14,%rdi
lea    0xbee(%rip),%rsi
lea    0x1c(%rsp),%rdx
lea    0x34(%rsp),%rcx
lea    0x17(%rsp),%r8
lea    0x30(%rsp),%r9
xor    %eax,%eax
lea    0x28(%rsp),%rbx
push   %rbx
lea    0x1e(%rsp),%rbx
push   %rbx
lea    0x3c(%rsp),%rbx
push   %rbx
call   1040 <fscanf@plt>
add    $0x20,%rsp
mov    %eax,%r13d
mov    %r14,%rdi
call   1070 <feof@plt>
test   %rax,%rax
jne    1533 <main+0x3a3>
cmp    $0x7,%r13d
jne    1591 <main+0x401>
cmpb   $0x2e,0xf(%rsp)
je     1507 <main+0x377>
cmpb   $0x2e,0xe(%rsp)
jne    1576 <main+0x3e6>
mov    0x14(%rsp),%ebx
mov    %ebx,%eax
sub    %r15d,%eax
add    $0xffff82ff,%eax
cmp    $0xffff05fe,%eax
jbe    1576 <main+0x3e6>
add    $0x1,%ebp
mov    %r14,%rdi
call   1070 <feof@plt>
mov    %ebx,%r15d
test   %rax,%rax
je     14a0 <main+0x310>
xor    %edi,%edi
call   10b0 <exit@plt>
mov    0x2a9f(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xafa(%rip),%rsi
mov    $0x5,%ecx
jmp    11dc <main+0x4c>
mov    0x2a81(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xadc(%rip),%rsi
mov    $0x6,%ecx
jmp    11dc <main+0x4c>
mov    0x2a63(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xabe(%rip),%rsi
mov    %ebp,%ecx
jmp    11dc <main+0x4c>
mov    0x2a48(%rip),%rax
mov    (%rax),%edi
mov    (%r12),%rdx
lea    0xb08(%rip),%rsi
mov    %ebp,%ecx
mov    %r13d,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [30 x i8] c"Usage: %s filename (argc:%d)\0A\00"
@.str.1 = [17 x i8] c"spc_sanity: stat\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [17 x i8] c"spc_sanity:fopen\00"
@.str.4 = [6 x i8] c"%s %d\00"
@.str.5 = [34 x i8] c"spc_sanity: %s: Error on line %d\0A\00"
@.str.6 = [8 x i8] c"testid:\00"
@.str.7 = [7 x i8] c"srcid:\00"
@.str.8 = [7 x i8] c"dstid:\00"
@.str.9 = [6 x i8] c"%s %s\00"
@.str.10 = [5 x i8] c"src:\00"
@.str.11 = [5 x i8] c"dst:\00"
@.str.12 = [7 x i8] c"start:\00"
@.str.13 = [5 x i8] c"dur:\00"
@.str.14 = [17 x i8] c"%d %d%c%d %d%c%d\00"
@.str.15 = [46 x i8] c"spc_sanity: %s: Error on line %d (retval:%d)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.stat
%4 = alloca [64 x i8]
%5 = alloca [64 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = bitcast %struct.stat* %3 to i8*
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%17 = bitcast i32* %6 to i8*
%18 = bitcast i32* %7 to i8*
%19 = bitcast i32* %8 to i8*
%20 = bitcast i32* %9 to i8*
%21 = bitcast i32* %10 to i8*
%22 = bitcast i32* %11 to i8*
%23 = icmp eq i32 %0, 2
br i1 %23, label %29, label %24
24: ; preds = %2
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %1
%27 = tail call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %26, i32 %0)
%28 = tail call i32 @exit(i32 1)
unreachable
29: ; preds = %2
%30 = getelementptr inbounds i8*, i8** %1, i64 1
%31 = load i8*, i8** %30
%32 = call i64 @stat(i8* %31, %struct.stat* %3)
%33 = icmp slt i64 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %29
%35 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %29
%38 = load i8*, i8** %30
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %37
%45 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %15, i32* %6)
%46 = icmp eq i32 %45, 2
br i1 %46, label %52, label %47
47: ; preds = %44
%48 = load i32, i32* @stderr
%49 = load i8*, i8** %30
%50 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %49, i32 0)
%51 = call i32 @exit(i32 1)
unreachable
52: ; preds = %44
%53 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %60, label %55
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = load i8*, i8** %30
%58 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %57, i32 0)
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %52
%61 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %15, i32* %6)
%62 = icmp eq i32 %61, 2
br i1 %62, label %68, label %63
63: ; preds = %60
%64 = load i32, i32* @stderr
%65 = load i8*, i8** %30
%66 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %65, i32 1)
%67 = call i32 @exit(i32 1)
unreachable
68: ; preds = %60
%69 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %76, label %71
71: ; preds = %68
%72 = load i32, i32* @stderr
%73 = load i8*, i8** %30
%74 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %73, i32 1)
%75 = call i32 @exit(i32 1)
unreachable
76: ; preds = %68
%77 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %15, i32* %6)
%78 = icmp eq i32 %77, 2
br i1 %78, label %84, label %79
79: ; preds = %76
%80 = load i32, i32* @stderr
%81 = load i8*, i8** %30
%82 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %81, i32 2)
%83 = call i32 @exit(i32 1)
unreachable
84: ; preds = %76
%85 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%86 = icmp eq i64 %85, 0
br i1 %86, label %92, label %87
87: ; preds = %84
%88 = load i32, i32* @stderr
%89 = load i8*, i8** %30
%90 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %89, i32 2)
%91 = call i32 @exit(i32 1)
unreachable
92: ; preds = %84
%93 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %15, i8* %16)
%94 = icmp eq i32 %93, 2
br i1 %94, label %100, label %95
95: ; preds = %92
%96 = load i32, i32* @stderr
%97 = load i8*, i8** %30
%98 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %97, i32 3)
%99 = call i32 @exit(i32 1)
unreachable
100: ; preds = %92
%101 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %108, label %103
103: ; preds = %100
%104 = load i32, i32* @stderr
%105 = load i8*, i8** %30
%106 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %105, i32 3)
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %100
%109 = call i32* @strchr(i8* %16, i8 signext 47)
%110 = icmp eq i32* %109, null
br i1 %110, label %111, label %116
111: ; preds = %108
%112 = load i32, i32* @stderr
%113 = load i8*, i8** %30
%114 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %113, i32 3)
%115 = call i32 @exit(i32 1)
unreachable
116: ; preds = %108
%117 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %15, i8* %16)
%118 = icmp eq i32 %117, 2
br i1 %118, label %124, label %119
119: ; preds = %116
%120 = load i32, i32* @stderr
%121 = load i8*, i8** %30
%122 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %121, i32 4)
%123 = call i32 @exit(i32 1)
unreachable
124: ; preds = %116
%125 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%126 = icmp eq i64 %125, 0
br i1 %126, label %132, label %127
127: ; preds = %124
%128 = load i32, i32* @stderr
%129 = load i8*, i8** %30
%130 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %129, i32 4)
%131 = call i32 @exit(i32 1)
unreachable
132: ; preds = %124
%133 = call i32* @strchr(i8* %16, i8 signext 47)
%134 = icmp eq i32* %133, null
br i1 %134, label %135, label %140
135: ; preds = %132
%136 = load i32, i32* @stderr
%137 = load i8*, i8** %30
%138 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %136, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %137, i32 4)
%139 = call i32 @exit(i32 1)
unreachable
140: ; preds = %132
%141 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %15, i32* %6)
%142 = icmp eq i32 %141, 2
br i1 %142, label %148, label %143
143: ; preds = %140
%144 = load i32, i32* @stderr
%145 = load i8*, i8** %30
%146 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %145, i32 5)
%147 = call i32 @exit(i32 1)
unreachable
148: ; preds = %140
%149 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%150 = icmp eq i64 %149, 0
br i1 %150, label %156, label %151
151: ; preds = %148
%152 = load i32, i32* @stderr
%153 = load i8*, i8** %30
%154 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %152, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %153, i32 5)
%155 = call i32 @exit(i32 1)
unreachable
156: ; preds = %148
%157 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %15, i32* %6)
%158 = icmp eq i32 %157, 2
br i1 %158, label %164, label %159
159: ; preds = %156
%160 = load i32, i32* @stderr
%161 = load i8*, i8** %30
%162 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %160, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %161, i32 6)
%163 = call i32 @exit(i32 1)
unreachable
164: ; preds = %156
%165 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%166 = icmp eq i64 %165, 0
br i1 %166, label %167, label %170
167: ; preds = %164
%168 = call i64 @feof(i32* %39)
%169 = icmp eq i64 %168, 0
br i1 %169, label %175, label %213
170: ; preds = %164
%171 = load i32, i32* @stderr
%172 = load i8*, i8** %30
%173 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %171, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %172, i32 6)
%174 = call i32 @exit(i32 1)
unreachable
175: ; preds = %167, %209
%176 = phi i32 [ %210, %209 ], [ 7, %167 ]
%177 = phi i32 [ %200, %209 ], [ 0, %167 ]
%178 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i32* %11, i32* %7, i8* %12, i32* %8, i32* %9, i8* %13, i32* %10)
%179 = call i64 @feof(i32* %39)
%180 = icmp eq i64 %179, 0
br i1 %180, label %181, label %213
181: ; preds = %175
%182 = icmp eq i32 %178, 7
br i1 %182, label %188, label %183
183: ; preds = %181
%184 = load i32, i32* @stderr
%185 = load i8*, i8** %30
%186 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %184, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.15, i64 0, i64 0), i8* %185, i32 %176, i32 %178)
%187 = call i32 @exit(i32 1)
unreachable
188: ; preds = %181
%189 = load i8, i8* %12
%190 = icmp ne i8 %189, 46
%191 = load i8, i8* %13
%192 = icmp ne i8 %191, 46
%193 = select i1 %190, i1 %192, i1 false
br i1 %193, label %194, label %199
194: ; preds = %188
%195 = load i32, i32* @stderr
%196 = load i8*, i8** %30
%197 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %195, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %196, i32 %176)
%198 = call i32 @exit(i32 1)
unreachable
199: ; preds = %188
%200 = load i32, i32* %11
%201 = sub i32 -32001, %177
%202 = add i32 %201, %200
%203 = icmp ult i32 %202, -64001
br i1 %203, label %204, label %209
204: ; preds = %199
%205 = load i32, i32* @stderr
%206 = load i8*, i8** %30
%207 = call i32 (i32, i8*, i8*, i32, ...) @fprintf(i32 %205, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8* %206, i32 %176)
%208 = call i32 @exit(i32 1)
unreachable
209: ; preds = %199
%210 = add nuw nsw i32 %176, 1
%211 = call i64 @feof(i32* %39)
%212 = icmp eq i64 %211, 0
br i1 %212, label %175, label %213
213: ; preds = %209, %175, %167
%214 = call i32 @exit(i32 0)
unreachable
}