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

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, long, long, long,
                           long);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
long strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  unsigned int i;
  char *c, *d, *k, *v, line[1000000], tag[1024], key[1024], val[1024];
  unsigned int r = 0;
  char ofn[1024];
  long int year, month, day, views;
  FILE *fp;
  strcpy(ofn, "out");
  if (argc > 1) {
    strcpy(ofn, argv[1]);
  }
  strcat(ofn, ".csv");
  printf("WIKIPIPER: writing to... %s\n", ofn);
  fp = fopen(ofn, "w");
  if (fp == NULL) {
    printf("WIKIPIPER: couldn't open output file.\n");
    return EXIT_FAILURE;
  }
  while (fgets(line, sizeof(line), stdin)) {
    if (r == 0) {
      if (sscanf(line, "{\"%1024[^\"]", tag) > 0) {
        if (strcmp(tag, "items") != 0) {
          printf("WIKIPIPER: error string detected (%s)\n", line);
          return 1;
        }
      } else {
        printf("WIKIPIPER: uninterpretable string (%s)\n", line);
        return 1;
      }
    }
    if (line[8] == ':' && line[9] == '[') {
      i = 10;
      c = line + 10;
      while (c[0] == '{') {
        if (sscanf(c, "{%1024[^}]}", tag) > 0) {
          d = tag;
          while (sscanf(d, "%1024[^:,}]:%1024[^,}]", key, val) >= 2) {
            d += strlen(key) + strlen(val) + 1;
            k = key + strlen(key) - 1;
            while (k[0] == '"') {
              k[0] = '\0';
              k--;
            }
            k = key;
            while (k[0] == '"') {
              k++;
            }
            v = val + strlen(val) - 1;
            while (v[0] == '"') {
              v[0] = '\0';
              v--;
            }
            v = val;
            while (v[0] == '"') {
              v++;
            }
            switch (k[0]) {
            case 't':
              v[strlen(v) - 1] = '\0';
              v[strlen(v) - 1] = '\0';
              day = strtol(v + strlen(v) - 2, NULL, 10);
              v[strlen(v) - 1] = '\0';
              v[strlen(v) - 1] = '\0';
              month = strtol(v + strlen(v) - 2, NULL, 10);
              v[strlen(v) - 1] = '\0';
              v[strlen(v) - 1] = '\0';
              year = strtol(v, NULL, 10);
              break;
            case 'v':
              views = strtol(v, NULL, 10);
              break;
            default:
              break;
            }
            if (d[0] == ',') {
              d++;
            }
          }
          fprintf(fp, "%li-%li-%li,%li\n", year, month, day, views);
          c += strlen(tag) + 2;
        }
        if (c[0] == ',') {
          c++;
        }
      }
    } else {
      printf("WIKIPIPER: characters following {%citems%c (%c%c)don't match \n",
             '"', '"', line[8], line[9]);
      return 1;
    }
    r++;
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf5320,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xf4e84(%rbp)
lea    -0xf5290(%rbp),%rdi
lea    0xe1f(%rip),%rsi
call   1030 <strcpy@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1204 <main+0x54>
lea    -0xf5290(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0xf5290(%rbp),%rdi
lea    0xdf2(%rip),%rsi
call   10d0 <strcat@plt>
lea    -0xf5290(%rbp),%rsi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf5290(%rbp),%rdi
lea    0xdec(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0xf52b8(%rbp)
cmpq   $0x0,-0xf52b8(%rbp)
jne    1273 <main+0xc3>
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    17b1 <main+0x601>
jmp    1278 <main+0xc8>
lea    -0xf4280(%rbp),%rdi
mov    0x2d62(%rip),%rax
mov    (%rax),%edx
mov    $0xf4240,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     17a5 <main+0x5f5>
cmpl   $0x0,-0xf4e84(%rbp)
jne    1337 <main+0x187>
lea    -0xf4280(%rbp),%rdi
lea    -0xf4680(%rbp),%rdx
lea    0xd91(%rip),%rsi
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x0,%eax
jle    1311 <main+0x161>
lea    -0xf4680(%rbp),%rdi
lea    0xd7f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     130c <main+0x15c>
lea    -0xf4280(%rbp),%rsi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17b1 <main+0x601>
jmp    1332 <main+0x182>
lea    -0xf4280(%rbp),%rsi
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17b1 <main+0x601>
jmp    1337 <main+0x187>
movsbl -0xf4278(%rbp),%eax
cmp    $0x3a,%eax
jne    1761 <main+0x5b1>
movsbl -0xf4277(%rbp),%eax
cmp    $0x5b,%eax
jne    1761 <main+0x5b1>
movl   $0xa,-0x14(%rbp)
lea    -0xf4280(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    175c <main+0x5ac>
mov    -0x20(%rbp),%rdi
lea    -0xf4680(%rbp),%rdx
lea    0xd21(%rip),%rsi
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x0,%eax
jle    173b <main+0x58b>
lea    -0xf4680(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0xf4a80(%rbp),%rdx
lea    -0xf4e80(%rbp),%rcx
lea    0xcf9(%rip),%rsi
mov    $0x0,%al
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jl     16f4 <main+0x544>
lea    -0xf4a80(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0xf52c8(%rbp)
lea    -0xf4e80(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52c8(%rbp),%rax
add    %rcx,%rax
add    $0x1,%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0xf4a80(%rbp),%rax
mov    %rax,-0xf52c0(%rbp)
lea    -0xf4a80(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52c0(%rbp),%rax
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1462 <main+0x2b2>
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    143a <main+0x28a>
lea    -0xf4a80(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    148e <main+0x2de>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    146d <main+0x2bd>
lea    -0xf4e80(%rbp),%rax
mov    %rax,-0xf52d0(%rbp)
lea    -0xf4e80(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52d0(%rbp),%rax
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    14e5 <main+0x335>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x38(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x38(%rbp)
jmp    14bd <main+0x30d>
lea    -0xf4e80(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1511 <main+0x361>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    14f0 <main+0x340>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xf52d4(%rbp)
sub    $0x74,%eax
je     1540 <main+0x390>
jmp    152c <main+0x37c>
mov    -0xf52d4(%rbp),%eax
sub    $0x76,%eax
je     16b0 <main+0x500>
jmp    16ce <main+0x51e>
mov    -0x38(%rbp),%rax
mov    %rax,-0xf5318(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf5318(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf5310(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf5310(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf5308(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xf5308(%rbp),%rdi
add    %rax,%rdi
add    $0xfffffffffffffffe,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0xf52a8(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf5300(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf5300(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf52f8(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52f8(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf52f0(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xf52f0(%rbp),%rdi
add    %rax,%rdi
add    $0xfffffffffffffffe,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0xf52a0(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf52e8(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52e8(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf52e0(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0xf52e0(%rbp),%rax
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0xf5298(%rbp)
jmp    16d3 <main+0x523>
mov    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10a0 <strtol@plt>
mov    %rax,-0xf52b0(%rbp)
jmp    16d3 <main+0x523>
jmp    16d3 <main+0x523>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
jne    16ef <main+0x53f>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    13aa <main+0x1fa>
mov    -0xf52b8(%rbp),%rdi
mov    -0xf5298(%rbp),%rdx
mov    -0xf52a0(%rbp),%rcx
mov    -0xf52a8(%rbp),%r8
mov    -0xf52b0(%rbp),%r9
lea    0x9b5(%rip),%rsi
call   1090 <fprintf@plt>
lea    -0xf4680(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x2,%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
jne    1757 <main+0x5a7>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    136d <main+0x1bd>
jmp    1791 <main+0x5e1>
movsbl -0xf4278(%rbp),%ecx
movsbl -0xf4277(%rbp),%r8d
ff
lea    0x96d(%rip),%rdi
mov    $0x22,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17b1 <main+0x601>
mov    -0xf4e84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4e84(%rbp)
jmp    1278 <main+0xc8>
mov    -0xf52b8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0xf5320,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf5278,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe23(%rip),%rsi
lea    0x430(%rsp),%rdi
call   1030 <strcpy@plt>
cmp    $0x2,%ebp
jl     1200 <main+0x40>
mov    0x8(%rbx),%rsi
lea    0x430(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdfd(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
call   10e0 <strcat@plt>
lea    0xdeb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdf7(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1577 <main+0x3b7>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edx
lea    0x1030(%rsp),%rdi
mov    $0xf4240,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     158e <main+0x3ce>
lea    0xc30(%rsp),%rbx
lea    0x830(%rsp),%r14
lea    0x30(%rsp),%r15
xor    %ebp,%ebp
jmp    12bb <main+0xfb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x4(%rsp),%ebp
add    $0x1,%ebp
mov    0x2d4a(%rip),%rax
mov    (%rax),%edx
lea    0x1030(%rsp),%rdi
mov    $0xf4240,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     158e <main+0x3ce>
test   %ebp,%ebp
jne    12f8 <main+0x138>
lea    0x1030(%rsp),%rdi
lea    0xd5a(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <sscanf@plt>
test   %eax,%eax
jle    15ba <main+0x3fa>
mov    %rbx,%rdi
lea    0xd4a(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    15c3 <main+0x403>
movsbl 0x1038(%rsp),%ecx
mov    0x1039(%rsp),%al
cmp    $0x3a,%ecx
jne    159c <main+0x3dc>
cmp    $0x5b,%al
jne    159c <main+0x3dc>
mov    %ebp,0x4(%rsp)
cmpb   $0x7b,0x103a(%rsp)
7b
jne    1290 <main+0xd0>
lea    0x103a(%rsp),%r12
jmp    1395 <main+0x1d5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rdi
lea    0xd60(%rip),%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    0x28(%rsp),%r9
call   10a0 <fprintf@plt>
lea    0xc30(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strlen@plt>
add    %rax,%r12
add    $0x2,%r12
xor    %eax,%eax
cmpb   $0x2c,(%r12)
sete   %al
cmpb   $0x7b,(%r12,%rax,1)
lea    (%r12,%rax,1),%r12
jne    1290 <main+0xd0>
mov    %r12,%rdi
lea    0xcea(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <sscanf@plt>
test   %eax,%eax
jle    137c <main+0x1bc>
mov    %rbx,%rdi
lea    0xcde(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
jge    1410 <main+0x250>
jmp    1340 <main+0x180>
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %rax,0x28(%rsp)
xor    %ebx,%ebx
cmpb   $0x2c,0x0(%rbp)
sete   %bl
add    %rbp,%rbx
mov    %rbx,%rdi
lea    0xc9b(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
cmp    $0x1,%eax
jle    1340 <main+0x180>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %rax,%rbp
mov    %r15,%rdi
call   1060 <strlen@plt>
add    %rbp,%rax
cmpb   $0x22,0x82f(%rsp,%rbp,1)
22
jne    144d <main+0x28d>
lea    (%rsp,%rbp,1),%rcx
add    $0x82f,%rcx
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rcx)
cmpb   $0x22,-0x1(%rcx)
lea    -0x1(%rcx),%rcx
je     1440 <main+0x280>
lea    (%rbx,%rax,1),%rbp
add    $0x1,%rbp
mov    %r14,%rax
nopl   0x0(%rax,%rax,1)
movsbl (%rax),%r13d
add    $0x1,%rax
cmp    $0x22,%r13d
je     1460 <main+0x2a0>
mov    %r15,%rdi
call   1060 <strlen@plt>
cmpb   $0x22,0x2f(%rsp,%rax,1)
jne    149d <main+0x2dd>
add    %rsp,%rax
add    $0x2f,%rax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,(%rax)
cmpb   $0x22,-0x1(%rax)
lea    -0x1(%rax),%rax
je     1490 <main+0x2d0>
lea    0x2f(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x22,0x1(%rbx)
lea    0x1(%rbx),%rbx
je     14b0 <main+0x2f0>
cmp    $0x76,%r13d
je     13d0 <main+0x210>
cmp    $0x74,%r13d
jne    13e4 <main+0x224>
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    (%rbx,%rax,1),%rdi
add    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %rax,0x20(%rsp)
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    (%rbx,%rax,1),%rdi
add    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %rax,0x18(%rsp)
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
call   1060 <strlen@plt>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %rax,0x10(%rsp)
jmp    13e4 <main+0x224>
lea    0xb7e(%rip),%rdi
call   1040 <puts@plt>
mov    0x2a4e(%rip),%rax
mov    (%rax),%eax
jmp    15de <main+0x41e>
mov    0x8(%rsp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
jmp    15de <main+0x41e>
movsbl %al,%r8d
lea    0xb16(%rip),%rdi
mov    $0x22,%esi
mov    $0x22,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    15d9 <main+0x419>
lea    0xaa0(%rip),%rdi
jmp    15ca <main+0x40a>
lea    0xa70(%rip),%rdi
lea    0x1030(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%eax
add    $0xf5278,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"out\00"
@.str.1 = [5 x i8] c".csv\00"
@.str.2 = [29 x i8] c"WIKIPIPER: writing to... %s\0A\00"
@.str.3 = [2 x i8] c"w\00"
@EXIT_FAILURE = global i32 0
@stdin = global i32 0
@.str.5 = [12 x i8] c"{\22%1024[^\22]\00"
@.str.6 = [6 x i8] c"items\00"
@.str.7 = [39 x i8] c"WIKIPIPER: error string detected (%s)\0A\00"
@.str.8 = [40 x i8] c"WIKIPIPER: uninterpretable string (%s)\0A\00"
@.str.9 = [12 x i8] c"{%1024[^}]}\00"
@.str.10 = [23 x i8] c"%1024[^:,}]:%1024[^,}]\00"
@.str.11 = [17 x i8] c"%li-%li-%li,%li\0A\00"
@.str.12 = [63 x i8] c"WIKIPIPER: characters following {%citems%c (%c%c)don't match \0A\00"
@str = [38 x i8] c"WIKIPIPER: couldn't open output file.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000000 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = alloca [1024 x i8]
%7 = alloca [1024 x i8]
%8 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = icmp sgt i32 %0, 1
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @strcpy(i8* %12, i8* %17)
br label %19
19: ; preds = %15, %2
%20 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%22 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %32, label %24
24: ; preds = %19
%25 = load i32, i32* @stdin
%26 = call i64 @fgets(i8* %8, i32 1000000, i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %192, label %28
28: ; preds = %24
%29 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 8
%30 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 9
%31 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 10
br label %35
32: ; preds = %19
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%34 = load i32, i32* @EXIT_FAILURE
br label %194
35: ; preds = %28, %183
%36 = phi i64 [ undef, %28 ], [ %187, %183 ]
%37 = phi i64 [ undef, %28 ], [ %186, %183 ]
%38 = phi i64 [ undef, %28 ], [ %185, %183 ]
%39 = phi i64 [ undef, %28 ], [ %184, %183 ]
%40 = phi i32 [ 0, %28 ], [ %188, %183 ]
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %52
42: ; preds = %35
%43 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* %9)
%44 = icmp sgt i32 %43, 0
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %52, label %48
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i8* %8)
br label %194
50: ; preds = %42
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %8)
br label %194
52: ; preds = %45, %35
%53 = load i8, i8* %29
%54 = icmp eq i8 %53, 58
%55 = load i8, i8* %30
%56 = icmp eq i8 %55, 91
%57 = select i1 %54, i1 %56, i1 false
br i1 %57, label %58, label %179
58: ; preds = %52
%59 = load i8, i8* %31
%60 = icmp eq i8 %59, 123
br i1 %60, label %61, label %183
61: ; preds = %58, %167
%62 = phi i64 [ %172, %167 ], [ %36, %58 ]
%63 = phi i64 [ %171, %167 ], [ %37, %58 ]
%64 = phi i64 [ %170, %167 ], [ %38, %58 ]
%65 = phi i64 [ %169, %167 ], [ %39, %58 ]
%66 = phi i8* [ %176, %167 ], [ %31, %58 ]
%67 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %66, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* %9)
%68 = icmp sgt i32 %67, 0
br i1 %68, label %69, label %167
69: ; preds = %61
%70 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %10, i8* %11)
%71 = icmp sgt i32 %70, 1
br i1 %71, label %72, label %158
72: ; preds = %69, %147
%73 = phi i64 [ %151, %147 ], [ %62, %69 ]
%74 = phi i64 [ %150, %147 ], [ %63, %69 ]
%75 = phi i64 [ %149, %147 ], [ %64, %69 ]
%76 = phi i64 [ %148, %147 ], [ %65, %69 ]
%77 = phi i8* [ %155, %147 ], [ %9, %69 ]
%78 = call i64 @strlen(i8* %10)
%79 = call i64 @strlen(i8* %11)
%80 = add i64 %78, 1
%81 = add i64 %80, %79
%82 = getelementptr inbounds i8, i8* %77, i64 %81
%83 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %78
%84 = getelementptr inbounds i8, i8* %83, i64 -1
%85 = load i8, i8* %84
%86 = icmp eq i8 %85, 34
br i1 %86, label %87, label %92
87: ; preds = %72, %87
%88 = phi i8* [ %89, %87 ], [ %84, %72 ]
store i8 0, i8* %88
%89 = getelementptr inbounds i8, i8* %88, i64 -1
%90 = load i8, i8* %89
%91 = icmp eq i8 %90, 34
br i1 %91, label %87, label %92
92: ; preds = %87, %72
br label %93
93: ; preds = %92, %93
%94 = phi i8* [ %97, %93 ], [ %10, %92 ]
%95 = load i8, i8* %94
%96 = icmp eq i8 %95, 34
%97 = getelementptr inbounds i8, i8* %94, i64 1
br i1 %96, label %93, label %98
98: ; preds = %93
%99 = call i64 @strlen(i8* %11)
%100 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %99
%101 = getelementptr inbounds i8, i8* %100, i64 -1
%102 = load i8, i8* %101
%103 = icmp eq i8 %102, 34
br i1 %103, label %104, label %109
104: ; preds = %98, %104
%105 = phi i8* [ %106, %104 ], [ %101, %98 ]
store i8 0, i8* %105
%106 = getelementptr inbounds i8, i8* %105, i64 -1
%107 = load i8, i8* %106
%108 = icmp eq i8 %107, 34
br i1 %108, label %104, label %109
109: ; preds = %104, %98
br label %110
110: ; preds = %109, %110
%111 = phi i8* [ %114, %110 ], [ %11, %109 ]
%112 = load i8, i8* %111
%113 = icmp eq i8 %112, 34
%114 = getelementptr inbounds i8, i8* %111, i64 1
br i1 %113, label %110, label %115
115: ; preds = %110
%116 = sext i8 %95 to i32
switch i32 %116, label %147 [
i32 116, label %117
i32 118, label %145
]
117: ; preds = %115
%118 = call i64 @strlen(i8* %111)
%119 = add i64 %118, -1
%120 = getelementptr inbounds i8, i8* %111, i64 %119
store i8 0, i8* %120
%121 = call i64 @strlen(i8* %111)
%122 = add i64 %121, -1
%123 = getelementptr inbounds i8, i8* %111, i64 %122
store i8 0, i8* %123
%124 = call i64 @strlen(i8* %111)
%125 = getelementptr inbounds i8, i8* %111, i64 -2
%126 = getelementptr inbounds i8, i8* %125, i64 %124
%127 = call i64 @strtol(i8* nocapture %126, i32* null, i32 10)
%128 = call i64 @strlen(i8* %111)
%129 = add i64 %128, -1
%130 = getelementptr inbounds i8, i8* %111, i64 %129
store i8 0, i8* %130
%131 = call i64 @strlen(i8* %111)
%132 = add i64 %131, -1
%133 = getelementptr inbounds i8, i8* %111, i64 %132
store i8 0, i8* %133
%134 = call i64 @strlen(i8* %111)
%135 = getelementptr inbounds i8, i8* %111, i64 -2
%136 = getelementptr inbounds i8, i8* %135, i64 %134
%137 = call i64 @strtol(i8* nocapture %136, i32* null, i32 10)
%138 = call i64 @strlen(i8* %111)
%139 = add i64 %138, -1
%140 = getelementptr inbounds i8, i8* %111, i64 %139
store i8 0, i8* %140
%141 = call i64 @strlen(i8* %111)
%142 = add i64 %141, -1
%143 = getelementptr inbounds i8, i8* %111, i64 %142
store i8 0, i8* %143
%144 = call i64 @strtol(i8* nocapture %111, i32* null, i32 10)
br label %147
145: ; preds = %115
%146 = call i64 @strtol(i8* nocapture %111, i32* null, i32 10)
br label %147
147: ; preds = %115, %145, %117
%148 = phi i64 [ %76, %115 ], [ %76, %145 ], [ %144, %117 ]
%149 = phi i64 [ %75, %115 ], [ %75, %145 ], [ %137, %117 ]
%150 = phi i64 [ %74, %115 ], [ %74, %145 ], [ %127, %117 ]
%151 = phi i64 [ %73, %115 ], [ %146, %145 ], [ %73, %117 ]
%152 = load i8, i8* %82
%153 = icmp eq i8 %152, 44
%154 = zext i1 %153 to i64
%155 = getelementptr i8, i8* %82, i64 %154
%156 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %155, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %10, i8* %11)
%157 = icmp sgt i32 %156, 1
br i1 %157, label %72, label %158
158: ; preds = %147, %69
%159 = phi i64 [ %65, %69 ], [ %148, %147 ]
%160 = phi i64 [ %64, %69 ], [ %149, %147 ]
%161 = phi i64 [ %63, %69 ], [ %150, %147 ]
%162 = phi i64 [ %62, %69 ], [ %151, %147 ]
%163 = call i32 @fprintf(i32* %22, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 %159, i64 %160, i64 %161, i64 %162)
%164 = call i64 @strlen(i8* %9)
%165 = add i64 %164, 2
%166 = getelementptr inbounds i8, i8* %66, i64 %165
br label %167
167: ; preds = %158, %61
%168 = phi i8* [ %166, %158 ], [ %66, %61 ]
%169 = phi i64 [ %159, %158 ], [ %65, %61 ]
%170 = phi i64 [ %160, %158 ], [ %64, %61 ]
%171 = phi i64 [ %161, %158 ], [ %63, %61 ]
%172 = phi i64 [ %162, %158 ], [ %62, %61 ]
%173 = load i8, i8* %168
%174 = icmp eq i8 %173, 44
%175 = zext i1 %174 to i64
%176 = getelementptr i8, i8* %168, i64 %175
%177 = load i8, i8* %176
%178 = icmp eq i8 %177, 123
br i1 %178, label %61, label %183
179: ; preds = %52
%180 = sext i8 %55 to i32
%181 = sext i8 %53 to i32
%182 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0), i32 34, i32 34, i32 %181, i32 %180)
br label %194
183: ; preds = %167, %58
%184 = phi i64 [ %39, %58 ], [ %169, %167 ]
%185 = phi i64 [ %38, %58 ], [ %170, %167 ]
%186 = phi i64 [ %37, %58 ], [ %171, %167 ]
%187 = phi i64 [ %36, %58 ], [ %172, %167 ]
%188 = add i32 %40, 1
%189 = load i32, i32* @stdin
%190 = call i64 @fgets(i8* %8, i32 1000000, i32 %189)
%191 = icmp eq i64 %190, 0
br i1 %191, label %192, label %35
192: ; preds = %183, %24
%193 = call i32 @fclose(i32* %22)
br label %194
194: ; preds = %192, %179, %50, %48, %32
%195 = phi i32 [ %34, %32 ], [ 1, %48 ], [ 1, %179 ], [ 1, %50 ], [ 0, %192 ]
ret i32 %195
}