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

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int /*<<< orphan*/, int,
                          int /*<<< orphan*/ *);
int getopt(int, char **, char *);
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *optarg;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ *stdout;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  char *filename = NULL;
  char *outfile = NULL;
  FILE *f;
  FILE *of;
  int c;
  int verbose = 0;
  while ((c = getopt(argc, argv, "o:i:")) != -1) {
    switch (c) {
    case 'i':
      filename = optarg;
      if (verbose > 0)
        printf("set in filename to: %s\n", filename);
      break;
    case 'o':
      outfile = optarg;
      if (verbose > 0)
        printf("set out filename to: %s\n", filename);
      break;
    default:
      printf("\n");
      usage(argv[0]);
      abort();
    }
  }
  if (filename == NULL) {
    usage(argv[0]);
    return 1;
  }
  if (outfile == NULL) {
    of = stdout;
  } else {
    if (!(of = fopen(outfile, "w"))) {
      printf("couldn't open outfile.\n");
      return 3;
    }
  }
  char *outdata = (char *)malloc(2048);
  snprintf(outdata, 2048,
           "<xml><appdata><name>TsAnalyzer-SubExtractor</name><version>GIT</"
           "version></appdata><data>");
  fwrite(outdata, strlen(outdata), 1, of);
  char *data = (char *)malloc(188);
  int chk = 0;
  if (!(f = fopen(filename, "r"))) {
    printf("couldn't open in file.\n");
    return 2;
  }
  int oldsize = ftell(f);
  while (!feof(f) && chk != 0x47) {
    chk = fgetc(f);
  }
  int newsize = ftell(f);
  if (oldsize != newsize) {
    fseek(f, -1, SEEK_CUR);
    oldsize--;
  }
  if (feof(f)) {
    fclose(f);
    printf("EOF before hitting mainloop.\n");
    return 3;
  }
  while (!feof(f)) {
    uint8_t pos = 0;
    fread(data, 188, 1, f);
    uint16_t PID = (data[1] & 0x1F) << 8 | (data[2] & 0xff);
    uint8_t PUSI = (data[1] & 0x40) >> 6;
    uint8_t AFC = (data[3] & 0x30) >> 4;
    pos = pos + 4;
    if (AFC == 0x02 || AFC == 0x03) {
      pos = pos + data[pos] + 1;
    }
    if (PUSI == 0x01 &&
        (((data[pos] << 16) & 0xFF0000) | ((data[pos + 1] << 8) & 0xFF00) |
         (data[pos + 2] & 0xFF)) == 0x000001) {
      uint32_t i;
      uint8_t SID = (data[pos + 3]);
      uint16_t orig_PPL =
          ((data[pos + 4] & 0xFF00) << 8) | (data[pos + 5] & 0xFF);
      uint16_t PPL = orig_PPL;
      pos = pos + 6;
      if (SID != 0xBD)
        continue;
      if (SID != 0x00) {
        uint8_t PTSDTSF = (data[pos + 1] & 0xC0) >> 6;
        uint8_t ESCRF = (data[pos + 1] & 0x20) >> 5;
        uint8_t ESRF = (data[pos + 1] & 0x10) >> 4;
        uint8_t DSMTMF = (data[pos + 1] & 0x08) >> 3;
        uint8_t ACIF = (data[pos + 1] & 0x04) >> 2;
        uint8_t PESCRCF = (data[pos + 1] & 0x02) >> 1;
        uint8_t PESEF = (data[pos + 1] & 0x01);
        uint8_t PESHDL = data[pos + 2];
        pos = pos + 3;
        PPL = PPL - 3;
        snprintf(outdata, 2048, "\n<PES><PID>%02X</PID>", PID);
        if (PTSDTSF == 0x2) {
          snprintf(outdata, 2048,
                   "\n<PES><PID>%02X</PID><DTS>%02X%02X%02X%02X%02X</DTS>", PID,
                   (uint8_t)data[pos], (uint8_t)data[pos + 1],
                   (uint8_t)data[pos + 2], (uint8_t)data[pos + 3],
                   (uint8_t)data[pos + 4]);
          pos = pos + 5;
          PPL = PPL - 5;
          PESHDL = PESHDL - 5;
        }
        if (PTSDTSF == 0x3) {
          pos = pos + 10;
          PPL = PPL - 10;
          PESHDL = PESHDL - 10;
        }
        if (ESCRF == 0x1) {
          pos = pos + 6;
          PPL = PPL - 6;
          PESHDL = PESHDL - 6;
        }
        if (ESRF == 0x1) {
          pos = pos + 3;
          PPL = PPL - 3;
          PESHDL = PESHDL - 3;
        }
        if (DSMTMF == 0x1) {
          pos = pos + 1;
          PPL = PPL - 1;
          PESHDL = PESHDL - 1;
        }
        if (ACIF == 0x1) {
          pos = pos + 1;
          PPL = PPL - 1;
          PESHDL = PESHDL - 1;
        }
        if (PESCRCF == 0x1) {
          pos = pos + 2;
          PPL = PPL - 2;
          PESHDL = PESHDL - 2;
        }
        if (PESEF == 0x1) {
          uint8_t PESPDF = (data[pos] & 0x80) >> 7;
          uint8_t PHFF = (data[pos] & 0x40) >> 6;
          uint8_t PPSCF = (data[pos] & 0x20) >> 5;
          uint8_t PSTDBF = (data[pos] & 0x10) >> 4;
          uint8_t PESEF2 = data[pos] & 0x01;
          pos++;
          PESHDL = PESHDL - 1;
          PPL = PPL - 1;
          if (PESPDF == 0x01) {
            pos = pos + 16;
            PPL = PPL - 16;
            PESHDL = PESHDL - 16;
          }
          if (PHFF == 0x01) {
            PPL = PPL - 1 - data[pos];
            PESHDL = PESHDL - 1 - data[pos];
            pos = pos + data[pos] + 1;
          }
          if (PPSCF == 0x01) {
            pos = pos + 2;
            PPL = PPL - 2;
            PESHDL = PESHDL - 2;
          }
          if (PSTDBF == 0x01) {
            pos = pos + 2;
            PPL = PPL - 2;
            PESHDL = PESHDL - 2;
          }
          if (PESEF2 == 0x01) {
            uint8_t PEFL = data[pos] & 0x7F;
            uint8_t SIDEF = data[pos + 1] & 0xF0 >> 7;
            pos = pos + 2;
            PPL = PPL - 2;
            PESHDL = PESHDL - 2;
            if (SIDEF == 0x0) {
              pos = pos + PEFL;
              PPL = PPL - PEFL;
              PESHDL = PESHDL - PEFL;
            }
          }
        }
        for (i = 0; PESHDL > 0; i++) {
          pos++;
          PPL--;
          PESHDL--;
        }
        uint8_t data_group_id = (data[pos] & 0xFC) >> 2;
        pos = pos + 3;
        PPL = PPL - 3;
        if (data_group_id != 0x20) {
          continue;
        }
        data_group_id = (data[pos] & 0xFC) >> 2;
        if ((data_group_id > 0x08 && data_group_id < 0x20) ||
            (data_group_id > 0x28)) {
          continue;
        }
        uint16_t data_group_size =
            ((data[pos + 3] << 8) & 0xFF00) | (data[pos + 4] & 0xFF);
        pos = pos + 5;
        PPL = PPL - 5;
        if (data_group_size > PPL) {
          continue;
        }
        char *closetag = malloc(2 * sizeof(char));
        if (data_group_id == 0x0 || data_group_id == 0x20) {
          fwrite(outdata, strlen(outdata), 1, of);
          snprintf(outdata, 2048, "<DG><TYPE>CAPTION MANAGEMENT</TYPE>");
          fwrite(outdata, strlen(outdata), 1, of);
          sprintf(closetag, "CM");
          uint8_t TMD = (data[pos] & 0xC0) >> 6;
          uint8_t reserved1 = data[pos] & 0x3F;
          pos++;
          snprintf(outdata, 2048, "<CM><TMD>%02X</TMD>", (uint8_t)TMD);
          fwrite(outdata, strlen(outdata), 1, of);
          if (TMD == 0x1 || TMD == 0x02) {
            snprintf(outdata, 2048, "<OTM>%02X%02X%02X%02X%02X</OTM>",
                     (uint8_t)data[pos + 0], (uint8_t)data[pos + 1],
                     (uint8_t)data[pos + 2], (uint8_t)data[pos + 3],
                     (uint8_t)data[pos + 4]);
            fwrite(outdata, strlen(outdata), 1, of);
            pos = pos + 5;
          }
          uint8_t numlang = data[pos];
          snprintf(outdata, 2048, "<NUMLANG>%02X</NUMLANG>",
                   (uint8_t)data[pos]);
          fwrite(outdata, strlen(outdata), 1, of);
          pos++;
          for (i = 0; i < numlang; i++) {
            uint8_t DMF = data[pos] & 0x0F;
            pos++;
            if (DMF == 0x0C || DMF == 0x0D || DMF == 0x0E) {
              pos++;
            }
            snprintf(outdata, 2048, "<LANG>%c%c%c</LANG>", (uint8_t)data[pos],
                     (uint8_t)data[pos + 1], (uint8_t)data[pos + 2]);
            fwrite(outdata, strlen(outdata), 1, of);
            pos = pos + 3;
            pos++;
          }
        } else {
          fwrite(outdata, strlen(outdata), 1, of);
          snprintf(outdata, 2048, "<DG><TYPE>CAPTION STATEMENT</TYPE>");
          fwrite(outdata, strlen(outdata), 1, of);
          sprintf(closetag, "CS");
          uint8_t TMD = (data[pos] & 0xC0) >> 6;
          pos++;
          snprintf(outdata, 2048, "<CS><TMD>%02X</TMD>", (uint8_t)TMD);
          fwrite(outdata, strlen(outdata), 1, of);
          if (TMD == 0x1 || TMD == 0x02) {
            snprintf(outdata, 2048, "<STM>%02X%02X%02X%02X%02X</STM>",
                     (uint8_t)data[pos + 0], (uint8_t)data[pos + 1],
                     (uint8_t)data[pos + 2], (uint8_t)data[pos + 3],
                     (uint8_t)data[pos + 4]);
            fwrite(outdata, strlen(outdata), 1, of);
            pos = pos + 5;
          }
        }
        uint32_t dull = ((data[pos] << 16) & 0xFF0000) |
                        ((data[pos + 1] << 8) & 0xFF00) |
                        (data[pos + 2] & 0xFF);
        uint32_t dullcounter = dull;
        snprintf(outdata, 2048, "<LEN>%02X%02X%02X</LEN>",
                 (uint8_t)data[pos + 0], (uint8_t)data[pos + 1],
                 (uint8_t)data[pos + 2]);
        fwrite(outdata, strlen(outdata), 1, of);
        pos = pos + 3;
        PPL = PPL - 3;
        while (dullcounter != 0) {
          uint8_t oldpos = pos;
          uint32_t data_unit_size =
              (((data[pos + 2] & 0x0000FF) << 16) |
               ((data[pos + 3] & 0x00FF) << 8) | ((data[pos + 4] & 0xFF) << 0));
          if (data_unit_size > 188 || data_unit_size > PPL) {
            if (dullcounter < data_unit_size)
              dullcounter = 0;
            else
              dullcounter = dullcounter - data_unit_size;
            continue;
          }
          memset(outdata, 0, (2048));
          snprintf(outdata, 2048,
                   "<DU><DUP>%02X</DUP><LEN>%02X%02X%02X|%08X</LEN><DATA>",
                   data[pos + 1], data[pos + 2], data[pos + 3], data[pos + 4],
                   data_unit_size);
          fwrite(outdata, strlen(outdata), 1, of);
          pos = pos + 5;
          for (i = 0; i < data_unit_size; i++) {
            sprintf(outdata, "%02X", (uint8_t)data[pos]);
            fwrite(outdata, strlen(outdata), 1, of);
            pos++;
          }
          snprintf(outdata, 2048, "</DATA></DU>");
          fwrite(outdata, strlen(outdata), 1, of);
          dullcounter = dullcounter - (pos - oldpos);
        }
        snprintf(outdata, 2048, "</%s></DG></PES>", closetag);
        fwrite(outdata, strlen(outdata), 1, of);
      }
    }
  }
  snprintf(outdata, 2048, "\n</data></xml>\n");
  fwrite(outdata, strlen(outdata), 1, of);
  fflush(of);
  if (of != stdout)
    fclose(of);
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0x1da2(%rip),%rdx
call   1120 <getopt@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
je     131e <main+0xfe>
mov    -0x34(%rbp),%eax
mov    %eax,-0xe8(%rbp)
sub    $0x69,%eax
je     129a <main+0x7a>
jmp    1286 <main+0x66>
mov    -0xe8(%rbp),%eax
sub    $0x6f,%eax
je     12c9 <main+0xa9>
jmp    12f8 <main+0xd8>
mov    0x3d57(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x38(%rbp)
jle    12c4 <main+0xa4>
mov    -0x18(%rbp),%rsi
lea    0x1d48(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1319 <main+0xf9>
mov    0x3d28(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x38(%rbp)
jle    12f3 <main+0xd3>
mov    -0x18(%rbp),%rsi
lea    0x1d31(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1319 <main+0xf9>
lea    0x1dc2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <usage@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1250 <main+0x30>
cmpq   $0x0,-0x18(%rbp)
jne    1341 <main+0x121>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    258e <main+0x136e>
cmpq   $0x0,-0x20(%rbp)
jne    135f <main+0x13f>
mov    0x3c7d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    139c <main+0x17c>
mov    -0x20(%rbp),%rdi
lea    0x1ccc(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    1397 <main+0x177>
lea    0x1cb4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x3,-0x4(%rbp)
jmp    258e <main+0x136e>
jmp    139c <main+0x17c>
mov    $0x800,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    $0x800,%esi
lea    0x1c96(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xf0(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    $0xbc,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0x1c9d(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    1439 <main+0x219>
lea    0x1c85(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    258e <main+0x136e>
mov    -0x28(%rbp),%rdi
call   10b0 <ftell@plt>
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   10c0 <feof@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xf1(%rbp)
jne    1470 <main+0x250>
cmpl   $0x47,-0x4c(%rbp)
setne  %al
mov    %al,-0xf1(%rbp)
mov    -0xf1(%rbp),%al
test   $0x1,%al
jne    1483 <main+0x263>
jmp    1494 <main+0x274>
mov    -0x28(%rbp),%rdi
call   10a0 <fgetc@plt>
mov    %eax,-0x4c(%rbp)
jmp    1445 <main+0x225>
mov    -0x28(%rbp),%rdi
call   10b0 <ftell@plt>
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     14cc <main+0x2ac>
mov    -0x28(%rbp),%rdi
mov    0x3b29(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%esi
call   10f0 <fseek@plt>
mov    -0x50(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%rax
je     1502 <main+0x2e2>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
lea    0x1bd4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x3,-0x4(%rbp)
jmp    258e <main+0x136e>
jmp    1507 <main+0x2e7>
mov    -0x28(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1526 <main+0x306>
jmp    2516 <main+0x12f6>
movl   $0x0,-0x58(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0xbc,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x48(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0x1f,%eax
shl    $0x8,%eax
mov    -0x48(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x48(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0x40,%eax
sar    $0x6,%eax
mov    %eax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
movsbl 0x3(%rax),%eax
and    $0x30,%eax
sar    $0x4,%eax
mov    %eax,-0x64(%rbp)
mov    -0x58(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x2,-0x64(%rbp)
je     15a4 <main+0x384>
cmpl   $0x3,-0x64(%rbp)
jne    15bb <main+0x39b>
mov    -0x58(%rbp),%eax
mov    -0x48(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x1,-0x60(%rbp)
jne    2511 <main+0x12f1>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
shl    $0x10,%eax
and    $0xff0000,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
or     %ecx,%eax
cmp    $0x1,%eax
jne    2511 <main+0x12f1>
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xff00,%eax
shl    $0x8,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x5,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0xbd,-0x6c(%rbp)
je     1681 <main+0x461>
jmp    1507 <main+0x2e7>
cmpl   $0x0,-0x6c(%rbp)
je     250c <main+0x12ec>
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xc0,%eax
sar    $0x6,%eax
mov    %eax,-0x78(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x20,%eax
sar    $0x5,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x10,%eax
sar    $0x4,%eax
mov    %eax,-0x80(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x8,%eax
sar    $0x3,%eax
mov    %eax,-0x84(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x4,%eax
sar    $0x2,%eax
mov    %eax,-0x88(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x2,%eax
sar    $0x1,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x94(%rbp)
mov    -0x58(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x74(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x5c(%rbp),%ecx
mov    $0x800,%esi
lea    0x1959(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
cmpl   $0x2,-0x78(%rbp)
jne    1835 <main+0x615>
mov    -0x40(%rbp),%rdi
mov    -0x5c(%rbp),%ecx
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r11d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r10d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%eax
mov    $0x800,%esi
lea    0x18f7(%rip),%rdx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x58(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x3,-0x78(%rbp)
jne    1860 <main+0x640>
mov    -0x58(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x7c(%rbp)
jne    188b <main+0x66b>
mov    -0x58(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x80(%rbp)
jne    18b6 <main+0x696>
mov    -0x58(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x84(%rbp)
jne    18e4 <main+0x6c4>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x88(%rbp)
jne    1912 <main+0x6f2>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x8c(%rbp)
jne    1940 <main+0x720>
mov    -0x58(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x90(%rbp)
jne    1b65 <main+0x945>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x80,%eax
sar    $0x7,%eax
mov    %eax,-0x98(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x40,%eax
sar    $0x6,%eax
mov    %eax,-0x9c(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x20,%eax
sar    $0x5,%eax
mov    %eax,-0xa0(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x10,%eax
sar    $0x4,%eax
mov    %eax,-0xa4(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x1,%eax
mov    %eax,-0xa8(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
cmpl   $0x1,-0x98(%rbp)
jne    1a13 <main+0x7f3>
mov    -0x58(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x10,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x10,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0x9c(%rbp)
jne    1a6b <main+0x84b>
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    -0x48(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
mov    -0x48(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x94(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x48(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x1,-0xa0(%rbp)
jne    1a99 <main+0x879>
mov    -0x58(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0xa4(%rbp)
jne    1ac7 <main+0x8a7>
mov    -0x58(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x1,-0xa8(%rbp)
jne    1b60 <main+0x940>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x7f,%eax
mov    %eax,-0xac(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x1,%eax
mov    %eax,-0xb0(%rbp)
mov    -0x58(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x0,-0xb0(%rbp)
jne    1b5b <main+0x93b>
mov    -0x58(%rbp),%eax
add    -0xac(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    -0xac(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
sub    -0xac(%rbp),%eax
mov    %eax,-0x94(%rbp)
jmp    1b60 <main+0x940>
jmp    1b65 <main+0x945>
movl   $0x0,-0x68(%rbp)
cmpl   $0x0,-0x94(%rbp)
jle    1ba8 <main+0x988>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
mov    -0x94(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x94(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1b6c <main+0x94c>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xfc,%eax
sar    $0x2,%eax
mov    %eax,-0xb4(%rbp)
mov    -0x58(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x74(%rbp)
cmpl   $0x20,-0xb4(%rbp)
je     1be6 <main+0x9c6>
jmp    1507 <main+0x2e7>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xfc,%eax
sar    $0x2,%eax
mov    %eax,-0xb4(%rbp)
cmpl   $0x8,-0xb4(%rbp)
jle    1c1a <main+0x9fa>
cmpl   $0x20,-0xb4(%rbp)
jl     1c27 <main+0xa07>
cmpl   $0x28,-0xb4(%rbp)
jle    1c2c <main+0xa0c>
jmp    1507 <main+0x2e7>
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
shl    $0x8,%eax
and    $0xff00,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0xb8(%rbp)
mov    -0x58(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x74(%rbp)
mov    -0xb8(%rbp),%eax
cmp    -0x74(%rbp),%eax
jle    1c8a <main+0xa6a>
jmp    1507 <main+0x2e7>
mov    $0x2,%edi
call   10d0 <malloc@plt>
mov    %rax,-0xc0(%rbp)
cmpl   $0x0,-0xb4(%rbp)
je     1cb5 <main+0xa95>
cmpl   $0x20,-0xb4(%rbp)
jne    1fe0 <main+0xdc0>
mov    -0x40(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x110(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x40(%rbp),%rdi
mov    $0x800,%esi
lea    0x143c(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x108(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0xc0(%rbp),%rdi
lea    0x1420(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xc0,%eax
sar    $0x6,%eax
mov    %eax,-0xc4(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x3f,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0xc4(%rbp),%ecx
mov    $0x800,%esi
lea    0x13ce(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x100(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
cmpl   $0x1,-0xc4(%rbp)
je     1dd1 <main+0xbb1>
cmpl   $0x2,-0xc4(%rbp)
jne    1e7c <main+0xc5c>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r10d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%eax
mov    $0x800,%esi
lea    0x132e(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0xcc(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x800,%esi
lea    0x12dd(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x120(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    1fdb <main+0xdbb>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xf,%eax
mov    %eax,-0xd0(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0xc,-0xd0(%rbp)
je     1f40 <main+0xd20>
cmpl   $0xd,-0xd0(%rbp)
je     1f40 <main+0xd20>
cmpl   $0xe,-0xd0(%rbp)
jne    1f49 <main+0xd29>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    $0x800,%esi
lea    0x1216(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x128(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1eec <main+0xccc>
jmp    2197 <main+0xf77>
mov    -0x40(%rbp),%rax
mov    %rax,-0x140(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x140(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x40(%rbp),%rdi
mov    $0x800,%esi
lea    0x1198(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x138(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0xc0(%rbp),%rdi
lea    0x117b(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xc0,%eax
sar    $0x6,%eax
mov    %eax,-0xd4(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0xd4(%rbp),%ecx
mov    $0x800,%esi
lea    0x113e(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x130(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x130(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
cmpl   $0x1,-0xd4(%rbp)
je     20e7 <main+0xec7>
cmpl   $0x2,-0xd4(%rbp)
jne    2192 <main+0xf72>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r10d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%eax
mov    $0x800,%esi
lea    0x109e(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x148(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x58(%rbp)
jmp    2197 <main+0xf77>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
shl    $0x10,%eax
and    $0xff0000,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    $0x800,%esi
lea    0xfd6(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x150(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0xdc(%rbp)
je     24c3 <main+0x12a3>
mov    -0x58(%rbp),%eax
mov    %eax,-0xe0(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xff,%eax
shl    $0x10,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0xe4(%rbp)
cmpl   $0xbc,-0xe4(%rbp)
jg     2307 <main+0x10e7>
mov    -0xe4(%rbp),%eax
cmp    -0x74(%rbp),%eax
jle    233f <main+0x111f>
mov    -0xdc(%rbp),%eax
cmp    -0xe4(%rbp),%eax
jge    2328 <main+0x1108>
movl   $0x0,-0xdc(%rbp)
jmp    233a <main+0x111a>
mov    -0xdc(%rbp),%eax
sub    -0xe4(%rbp),%eax
mov    %eax,-0xdc(%rbp)
jmp    227b <main+0x105b>
mov    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1090 <memset@plt>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r8d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r9d
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%edx
add    $0x4,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%r10d
mov    -0xe4(%rbp),%eax
mov    $0x800,%esi
lea    0xe79(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x158(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x58(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0xe4(%rbp),%eax
jge    2465 <main+0x1245>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0xe3f(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x160(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    23f6 <main+0x11d6>
mov    -0x40(%rbp),%rdi
mov    $0x800,%esi
lea    0xdeb(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x168(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0xdc(%rbp),%eax
mov    -0x58(%rbp),%ecx
sub    -0xe0(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xdc(%rbp)
jmp    227b <main+0x105b>
mov    -0x40(%rbp),%rdi
mov    -0xc0(%rbp),%rcx
mov    $0x800,%esi
lea    0xd93(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x170(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x170(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
jmp    2511 <main+0x12f1>
jmp    1507 <main+0x2e7>
mov    -0x40(%rbp),%rdi
mov    $0x800,%esi
lea    0xd58(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,-0x178(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x178(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%rcx
mov    $0x1,%edx
call   1140 <fwrite@plt>
mov    -0x30(%rbp),%rdi
call   10e0 <fflush@plt>
mov    -0x30(%rbp),%rax
mov    0x2a64(%rip),%rcx
cmp    (%rcx),%rax
je     257e <main+0x135e>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    %edi,%ebx
xor    %r14d,%r14d
lea    0xdd6(%rip),%r15
mov    0x2dc7(%rip),%r12
xor    %r13d,%r13d
jmp    1244 <main+0x34>
cs nopw 0x0(%rax,%rax,1)
mov    (%r12),%r13
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1120 <getopt@plt>
cmp    $0x69,%eax
je     1240 <main+0x30>
cmp    $0xffffffff,%eax
je     126a <main+0x5a>
cmp    $0x6f,%eax
jne    143c <main+0x22c>
mov    (%r12),%r14
jmp    1244 <main+0x34>
test   %r13,%r13
je     1297 <main+0x87>
test   %r14,%r14
je     12aa <main+0x9a>
lea    0xd8a(%rip),%rsi
mov    %r14,%rdi
call   1110 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    12b4 <main+0xa4>
lea    0xde0(%rip),%rdi
jmp    138b <main+0x17b>
mov    0x0(%rbp),%rdi
call   1100 <usage@plt>
mov    $0x1,%ebp
jmp    142b <main+0x21b>
mov    0x2d1f(%rip),%rax
mov    (%rax),%r14
mov    $0x800,%edi
call   10d0 <malloc@plt>
mov    %rax,%r15
lea    0xd3f(%rip),%rdx
mov    %rax,%rdi
mov    $0x800,%esi
xor    %eax,%eax
call   1090 <snprintf@plt>
mov    %r15,%rdi
call   1080 <strlen@plt>
mov    %r15,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1130 <fwrite@plt>
mov    $0xbc,%edi
call   10d0 <malloc@plt>
mov    %rax,%r12
lea    0xd5b(%rip),%rsi
mov    %r13,%rdi
call   1110 <fopen@plt>
test   %rax,%rax
je     141a <main+0x20a>
mov    %rax,%rbx
mov    %rax,%rdi
call   10b0 <ftell@plt>
mov    %eax,%r13d
mov    %rbx,%rdi
call   10c0 <feof@plt>
nopl   0x0(%rax)
test   %rax,%rax
jne    134c <main+0x13c>
mov    %rbx,%rdi
call   10a0 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   10c0 <feof@plt>
cmp    $0x47,%ebp
jne    1330 <main+0x120>
mov    %rbx,%rdi
call   10b0 <ftell@plt>
cmp    %eax,%r13d
je     136f <main+0x15f>
mov    0x2c80(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   10f0 <fseek@plt>
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
je     13b5 <main+0x1a5>
mov    %rbx,%rdi
call   1070 <fclose@plt>
lea    0xd15(%rip),%rdi
call   1050 <puts@plt>
mov    $0x3,%ebp
jmp    142b <main+0x21b>
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    $0xbc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fread@plt>
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
je     13a0 <main+0x190>
lea    0xc99(%rip),%rdx
xor    %ebp,%ebp
mov    %r15,%rdi
mov    $0x800,%esi
xor    %eax,%eax
call   1090 <snprintf@plt>
mov    %r15,%rdi
call   1080 <strlen@plt>
mov    %r15,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1130 <fwrite@plt>
mov    %r14,%rdi
call   10e0 <fflush@plt>
mov    0x2bcd(%rip),%rax
cmp    (%rax),%r14
je     1410 <main+0x200>
mov    %r14,%rdi
call   1070 <fclose@plt>
mov    %rbx,%rdi
call   1070 <fclose@plt>
jmp    142b <main+0x21b>
lea    0xc68(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x0(%rbp),%rdi
call   1100 <usage@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"o:i:\00"
@optarg = global i8* null
@.str.1 = [24 x i8] c"set in filename to: %s\0A\00"
@.str.2 = [25 x i8] c"set out filename to: %s\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@stdout = global i32* null
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [24 x i8] c"couldn't open outfile.\0A\00"
@.str.6 = [89 x i8] c"<xml><appdata><name>TsAnalyzer-SubExtractor</name><version>GIT</version></appdata><data>\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [24 x i8] c"couldn't open in file.\0A\00"
@SEEK_CUR = global i32 0
@.str.9 = [30 x i8] c"EOF before hitting mainloop.\0A\00"
@.str.10 = [22 x i8] c"\0A<PES><PID>%02X</PID>\00"
@.str.11 = [53 x i8] c"\0A<PES><PID>%02X</PID><DTS>%02X%02X%02X%02X%02X</DTS>\00"
@.str.12 = [36 x i8] c"<DG><TYPE>CAPTION MANAGEMENT</TYPE>\00"
@.str.13 = [3 x i8] c"CM\00"
@.str.14 = [20 x i8] c"<CM><TMD>%02X</TMD>\00"
@.str.15 = [32 x i8] c"<OTM>%02X%02X%02X%02X%02X</OTM>\00"
@.str.16 = [24 x i8] c"<NUMLANG>%02X</NUMLANG>\00"
@.str.17 = [20 x i8] c"<LANG>%c%c%c</LANG>\00"
@.str.18 = [35 x i8] c"<DG><TYPE>CAPTION STATEMENT</TYPE>\00"
@.str.19 = [3 x i8] c"CS\00"
@.str.20 = [20 x i8] c"<CS><TMD>%02X</TMD>\00"
@.str.21 = [32 x i8] c"<STM>%02X%02X%02X%02X%02X</STM>\00"
@.str.22 = [24 x i8] c"<LEN>%02X%02X%02X</LEN>\00"
@.str.23 = [54 x i8] c"<DU><DUP>%02X</DUP><LEN>%02X%02X%02X|%08X</LEN><DATA>\00"
@.str.24 = [5 x i8] c"%02X\00"
@.str.25 = [13 x i8] c"</DATA></DU>\00"
@.str.26 = [17 x i8] c"</%s></DG></PES>\00"
@.str.27 = [16 x i8] c"\0A</data></xml>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i8*
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca i32
%51 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i32 0, i32* %11
br label %52
52: ; preds = %82, %2
%53 = load i32, i32* %4
%54 = load i8**, i8*** %5
%55 = call i32 @getopt(i32 %53, i8** %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %55, i32* %10
%56 = icmp ne i32 %55, -1
br i1 %56, label %57, label %83
57: ; preds = %52
%58 = load i32, i32* %10
switch i32 %58, label %75 [
i32 105, label %59
i32 111, label %67
]
59: ; preds = %57
%60 = load i8*, i8** @optarg
store i8* %60, i8** %6
%61 = load i32, i32* %11
%62 = icmp sgt i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %59
%64 = load i8*, i8** %6
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %64)
br label %66
66: ; preds = %63, %59
br label %82
67: ; preds = %57
%68 = load i8*, i8** @optarg
store i8* %68, i8** %7
%69 = load i32, i32* %11
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %67
%72 = load i8*, i8** %6
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %72)
br label %74
74: ; preds = %71, %67
br label %82
75: ; preds = %57
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%77 = load i8**, i8*** %5
%78 = getelementptr inbounds i8*, i8** %77, i64 0
%79 = load i8*, i8** %78
%80 = call i32 @usage(i8* %79)
%81 = call i32 (...) @abort()
unreachable
82: ; preds = %74, %66
br label %52
83: ; preds = %52
%84 = load i8*, i8** %6
%85 = icmp eq i8* %84, null
br i1 %85, label %86, label %91
86: ; preds = %83
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 0
%89 = load i8*, i8** %88
%90 = call i32 @usage(i8* %89)
store i32 1, i32* %3
br label %1159
91: ; preds = %83
%92 = load i8*, i8** %7
%93 = icmp eq i8* %92, null
br i1 %93, label %94, label %96
94: ; preds = %91
%95 = load i32*, i32** @stdout
store i32* %95, i32** %9
br label %103
96: ; preds = %91
%97 = load i8*, i8** %7
%98 = call i32* @fopen(i8* %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %98, i32** %9
%99 = icmp ne i32* %98, null
br i1 %99, label %102, label %100
100: ; preds = %96
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
store i32 3, i32* %3
br label %1159
102: ; preds = %96
br label %103
103: ; preds = %102, %94
%104 = call i8* @malloc(i32 2048)
store i8* %104, i8** %12
%105 = load i8*, i8** %12
%106 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %105, i32 2048, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.6, i64 0, i64 0))
%107 = load i8*, i8** %12
%108 = load i8*, i8** %12
%109 = call i32 @strlen(i8* %108)
%110 = load i32*, i32** %9
%111 = call i32 @fwrite(i8* %107, i32 %109, i32 1, i32* %110)
%112 = call i8* @malloc(i32 188)
store i8* %112, i8** %13
store i32 0, i32* %14
%113 = load i8*, i8** %6
%114 = call i32* @fopen(i8* %113, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %114, i32** %8
%115 = icmp ne i32* %114, null
br i1 %115, label %118, label %116
116: ; preds = %103
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
store i32 2, i32* %3
br label %1159
118: ; preds = %103
%119 = load i32*, i32** %8
%120 = call i32 @ftell(i32* %119)
store i32 %120, i32* %15
br label %121
121: ; preds = %130, %118
%122 = load i32*, i32** %8
%123 = call i64 @feof(i32* %122)
%124 = icmp ne i64 %123, 0
br i1 %124, label %128, label %125
125: ; preds = %121
%126 = load i32, i32* %14
%127 = icmp ne i32 %126, 71
br label %128
128: ; preds = %125, %121
%129 = phi i1 [ false, %121 ], [ %127, %125 ]
br i1 %129, label %130, label %133
130: ; preds = %128
%131 = load i32*, i32** %8
%132 = call i32 @fgetc(i32* %131)
store i32 %132, i32* %14
br label %121
133: ; preds = %128
%134 = load i32*, i32** %8
%135 = call i32 @ftell(i32* %134)
store i32 %135, i32* %16
%136 = load i32, i32* %15
%137 = load i32, i32* %16
%138 = icmp ne i32 %136, %137
br i1 %138, label %139, label %145
139: ; preds = %133
%140 = load i32*, i32** %8
%141 = load i32, i32* @SEEK_CUR
%142 = call i32 @fseek(i32* %140, i32 -1, i32 %141)
%143 = load i32, i32* %15
%144 = add nsw i32 %143, -1
store i32 %144, i32* %15
br label %145
145: ; preds = %139, %133
%146 = load i32*, i32** %8
%147 = call i64 @feof(i32* %146)
%148 = icmp ne i64 %147, 0
br i1 %148, label %149, label %153
149: ; preds = %145
%150 = load i32*, i32** %8
%151 = call i32 @fclose(i32* %150)
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
store i32 3, i32* %3
br label %1159
153: ; preds = %145
br label %154
154: ; preds = %1139, %676, %649, %631, %267, %153
%155 = load i32*, i32** %8
%156 = call i64 @feof(i32* %155)
%157 = icmp ne i64 %156, 0
%158 = xor i1 %157, true
br i1 %158, label %159, label %1140
159: ; preds = %154
store i32 0, i32* %17
%160 = load i8*, i8** %13
%161 = load i32*, i32** %8
%162 = call i32 @fread(i8* %160, i32 188, i32 1, i32* %161)
%163 = load i8*, i8** %13
%164 = getelementptr inbounds i8, i8* %163, i64 1
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = and i32 %166, 31
%168 = shl i32 %167, 8
%169 = load i8*, i8** %13
%170 = getelementptr inbounds i8, i8* %169, i64 2
%171 = load i8, i8* %170
%172 = sext i8 %171 to i32
%173 = and i32 %172, 255
%174 = or i32 %168, %173
store i32 %174, i32* %18
%175 = load i8*, i8** %13
%176 = getelementptr inbounds i8, i8* %175, i64 1
%177 = load i8, i8* %176
%178 = sext i8 %177 to i32
%179 = and i32 %178, 64
%180 = ashr i32 %179, 6
store i32 %180, i32* %19
%181 = load i8*, i8** %13
%182 = getelementptr inbounds i8, i8* %181, i64 3
%183 = load i8, i8* %182
%184 = sext i8 %183 to i32
%185 = and i32 %184, 48
%186 = ashr i32 %185, 4
store i32 %186, i32* %20
%187 = load i32, i32* %17
%188 = add nsw i32 %187, 4
store i32 %188, i32* %17
%189 = load i32, i32* %20
%190 = icmp eq i32 %189, 2
br i1 %190, label %194, label %191
191: ; preds = %159
%192 = load i32, i32* %20
%193 = icmp eq i32 %192, 3
br i1 %193, label %194, label %204
194: ; preds = %191, %159
%195 = load i32, i32* %17
%196 = load i8*, i8** %13
%197 = load i32, i32* %17
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds i8, i8* %196, i64 %198
%200 = load i8, i8* %199
%201 = sext i8 %200 to i32
%202 = add nsw i32 %195, %201
%203 = add nsw i32 %202, 1
store i32 %203, i32* %17
br label %204
204: ; preds = %194, %191
%205 = load i32, i32* %19
%206 = icmp eq i32 %205, 1
br i1 %206, label %207, label %1139
207: ; preds = %204
%208 = load i8*, i8** %13
%209 = load i32, i32* %17
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i8, i8* %208, i64 %210
%212 = load i8, i8* %211
%213 = sext i8 %212 to i32
%214 = shl i32 %213, 16
%215 = and i32 %214, 16711680
%216 = load i8*, i8** %13
%217 = load i32, i32* %17
%218 = add nsw i32 %217, 1
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i8, i8* %216, i64 %219
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = shl i32 %222, 8
%224 = and i32 %223, 65280
%225 = or i32 %215, %224
%226 = load i8*, i8** %13
%227 = load i32, i32* %17
%228 = add nsw i32 %227, 2
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i8, i8* %226, i64 %229
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = and i32 %232, 255
%234 = or i32 %225, %233
%235 = icmp eq i32 %234, 1
br i1 %235, label %236, label %1139
236: ; preds = %207
%237 = load i8*, i8** %13
%238 = load i32, i32* %17
%239 = add nsw i32 %238, 3
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i8, i8* %237, i64 %240
%242 = load i8, i8* %241
%243 = sext i8 %242 to i32
store i32 %243, i32* %22
%244 = load i8*, i8** %13
%245 = load i32, i32* %17
%246 = add nsw i32 %245, 4
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i8, i8* %244, i64 %247
%249 = load i8, i8* %248
%250 = sext i8 %249 to i32
%251 = and i32 %250, 65280
%252 = shl i32 %251, 8
%253 = load i8*, i8** %13
%254 = load i32, i32* %17
%255 = add nsw i32 %254, 5
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i8, i8* %253, i64 %256
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = and i32 %259, 255
%261 = or i32 %252, %260
store i32 %261, i32* %23
%262 = load i32, i32* %23
store i32 %262, i32* %24
%263 = load i32, i32* %17
%264 = add nsw i32 %263, 6
store i32 %264, i32* %17
%265 = load i32, i32* %22
%266 = icmp ne i32 %265, 189
br i1 %266, label %267, label %268
267: ; preds = %236
br label %154
268: ; preds = %236
%269 = load i32, i32* %22
%270 = icmp ne i32 %269, 0
br i1 %270, label %271, label %1138
271: ; preds = %268
%272 = load i8*, i8** %13
%273 = load i32, i32* %17
%274 = add nsw i32 %273, 1
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds i8, i8* %272, i64 %275
%277 = load i8, i8* %276
%278 = sext i8 %277 to i32
%279 = and i32 %278, 192
%280 = ashr i32 %279, 6
store i32 %280, i32* %25
%281 = load i8*, i8** %13
%282 = load i32, i32* %17
%283 = add nsw i32 %282, 1
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds i8, i8* %281, i64 %284
%286 = load i8, i8* %285
%287 = sext i8 %286 to i32
%288 = and i32 %287, 32
%289 = ashr i32 %288, 5
store i32 %289, i32* %26
%290 = load i8*, i8** %13
%291 = load i32, i32* %17
%292 = add nsw i32 %291, 1
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds i8, i8* %290, i64 %293
%295 = load i8, i8* %294
%296 = sext i8 %295 to i32
%297 = and i32 %296, 16
%298 = ashr i32 %297, 4
store i32 %298, i32* %27
%299 = load i8*, i8** %13
%300 = load i32, i32* %17
%301 = add nsw i32 %300, 1
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds i8, i8* %299, i64 %302
%304 = load i8, i8* %303
%305 = sext i8 %304 to i32
%306 = and i32 %305, 8
%307 = ashr i32 %306, 3
store i32 %307, i32* %28
%308 = load i8*, i8** %13
%309 = load i32, i32* %17
%310 = add nsw i32 %309, 1
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds i8, i8* %308, i64 %311
%313 = load i8, i8* %312
%314 = sext i8 %313 to i32
%315 = and i32 %314, 4
%316 = ashr i32 %315, 2
store i32 %316, i32* %29
%317 = load i8*, i8** %13
%318 = load i32, i32* %17
%319 = add nsw i32 %318, 1
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds i8, i8* %317, i64 %320
%322 = load i8, i8* %321
%323 = sext i8 %322 to i32
%324 = and i32 %323, 2
%325 = ashr i32 %324, 1
store i32 %325, i32* %30
%326 = load i8*, i8** %13
%327 = load i32, i32* %17
%328 = add nsw i32 %327, 1
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds i8, i8* %326, i64 %329
%331 = load i8, i8* %330
%332 = sext i8 %331 to i32
%333 = and i32 %332, 1
store i32 %333, i32* %31
%334 = load i8*, i8** %13
%335 = load i32, i32* %17
%336 = add nsw i32 %335, 2
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds i8, i8* %334, i64 %337
%339 = load i8, i8* %338
%340 = sext i8 %339 to i32
store i32 %340, i32* %32
%341 = load i32, i32* %17
%342 = add nsw i32 %341, 3
store i32 %342, i32* %17
%343 = load i32, i32* %24
%344 = sub nsw i32 %343, 3
store i32 %344, i32* %24
%345 = load i8*, i8** %12
%346 = load i32, i32* %18
%347 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %345, i32 2048, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %346)
%348 = load i32, i32* %25
%349 = icmp eq i32 %348, 2
br i1 %349, label %350, label %394
350: ; preds = %271
%351 = load i8*, i8** %12
%352 = load i32, i32* %18
%353 = load i8*, i8** %13
%354 = load i32, i32* %17
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds i8, i8* %353, i64 %355
%357 = load i8, i8* %356
%358 = sext i8 %357 to i32
%359 = load i8*, i8** %13
%360 = load i32, i32* %17
%361 = add nsw i32 %360, 1
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds i8, i8* %359, i64 %362
%364 = load i8, i8* %363
%365 = sext i8 %364 to i32
%366 = load i8*, i8** %13
%367 = load i32, i32* %17
%368 = add nsw i32 %367, 2
%369 = sext i32 %368 to i64
%370 = getelementptr inbounds i8, i8* %366, i64 %369
%371 = load i8, i8* %370
%372 = sext i8 %371 to i32
%373 = load i8*, i8** %13
%374 = load i32, i32* %17
%375 = add nsw i32 %374, 3
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds i8, i8* %373, i64 %376
%378 = load i8, i8* %377
%379 = sext i8 %378 to i32
%380 = load i8*, i8** %13
%381 = load i32, i32* %17
%382 = add nsw i32 %381, 4
%383 = sext i32 %382 to i64
%384 = getelementptr inbounds i8, i8* %380, i64 %383
%385 = load i8, i8* %384
%386 = sext i8 %385 to i32
%387 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %351, i32 2048, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0), i32 %352, i32 %358, i32 %365, i32 %372, i32 %379, i32 %386)
%388 = load i32, i32* %17
%389 = add nsw i32 %388, 5
store i32 %389, i32* %17
%390 = load i32, i32* %24
%391 = sub nsw i32 %390, 5
store i32 %391, i32* %24
%392 = load i32, i32* %32
%393 = sub nsw i32 %392, 5
store i32 %393, i32* %32
br label %394
394: ; preds = %350, %271
%395 = load i32, i32* %25
%396 = icmp eq i32 %395, 3
br i1 %396, label %397, label %404
397: ; preds = %394
%398 = load i32, i32* %17
%399 = add nsw i32 %398, 10
store i32 %399, i32* %17
%400 = load i32, i32* %24
%401 = sub nsw i32 %400, 10
store i32 %401, i32* %24
%402 = load i32, i32* %32
%403 = sub nsw i32 %402, 10
store i32 %403, i32* %32
br label %404
404: ; preds = %397, %394
%405 = load i32, i32* %26
%406 = icmp eq i32 %405, 1
br i1 %406, label %407, label %414
407: ; preds = %404
%408 = load i32, i32* %17
%409 = add nsw i32 %408, 6
store i32 %409, i32* %17
%410 = load i32, i32* %24
%411 = sub nsw i32 %410, 6
store i32 %411, i32* %24
%412 = load i32, i32* %32
%413 = sub nsw i32 %412, 6
store i32 %413, i32* %32
br label %414
414: ; preds = %407, %404
%415 = load i32, i32* %27
%416 = icmp eq i32 %415, 1
br i1 %416, label %417, label %424
417: ; preds = %414
%418 = load i32, i32* %17
%419 = add nsw i32 %418, 3
store i32 %419, i32* %17
%420 = load i32, i32* %24
%421 = sub nsw i32 %420, 3
store i32 %421, i32* %24
%422 = load i32, i32* %32
%423 = sub nsw i32 %422, 3
store i32 %423, i32* %32
br label %424
424: ; preds = %417, %414
%425 = load i32, i32* %28
%426 = icmp eq i32 %425, 1
br i1 %426, label %427, label %434
427: ; preds = %424
%428 = load i32, i32* %17
%429 = add nsw i32 %428, 1
store i32 %429, i32* %17
%430 = load i32, i32* %24
%431 = sub nsw i32 %430, 1
store i32 %431, i32* %24
%432 = load i32, i32* %32
%433 = sub nsw i32 %432, 1
store i32 %433, i32* %32
br label %434
434: ; preds = %427, %424
%435 = load i32, i32* %29
%436 = icmp eq i32 %435, 1
br i1 %436, label %437, label %444
437: ; preds = %434
%438 = load i32, i32* %17
%439 = add nsw i32 %438, 1
store i32 %439, i32* %17
%440 = load i32, i32* %24
%441 = sub nsw i32 %440, 1
store i32 %441, i32* %24
%442 = load i32, i32* %32
%443 = sub nsw i32 %442, 1
store i32 %443, i32* %32
br label %444
444: ; preds = %437, %434
%445 = load i32, i32* %30
%446 = icmp eq i32 %445, 1
br i1 %446, label %447, label %454
447: ; preds = %444
%448 = load i32, i32* %17
%449 = add nsw i32 %448, 2
store i32 %449, i32* %17
%450 = load i32, i32* %24
%451 = sub nsw i32 %450, 2
store i32 %451, i32* %24
%452 = load i32, i32* %32
%453 = sub nsw i32 %452, 2
store i32 %453, i32* %32
br label %454
454: ; preds = %447, %444
%455 = load i32, i32* %31
%456 = icmp eq i32 %455, 1
br i1 %456, label %457, label %602
457: ; preds = %454
%458 = load i8*, i8** %13
%459 = load i32, i32* %17
%460 = sext i32 %459 to i64
%461 = getelementptr inbounds i8, i8* %458, i64 %460
%462 = load i8, i8* %461
%463 = sext i8 %462 to i32
%464 = and i32 %463, 128
%465 = ashr i32 %464, 7
store i32 %465, i32* %33
%466 = load i8*, i8** %13
%467 = load i32, i32* %17
%468 = sext i32 %467 to i64
%469 = getelementptr inbounds i8, i8* %466, i64 %468
%470 = load i8, i8* %469
%471 = sext i8 %470 to i32
%472 = and i32 %471, 64
%473 = ashr i32 %472, 6
store i32 %473, i32* %34
%474 = load i8*, i8** %13
%475 = load i32, i32* %17
%476 = sext i32 %475 to i64
%477 = getelementptr inbounds i8, i8* %474, i64 %476
%478 = load i8, i8* %477
%479 = sext i8 %478 to i32
%480 = and i32 %479, 32
%481 = ashr i32 %480, 5
store i32 %481, i32* %35
%482 = load i8*, i8** %13
%483 = load i32, i32* %17
%484 = sext i32 %483 to i64
%485 = getelementptr inbounds i8, i8* %482, i64 %484
%486 = load i8, i8* %485
%487 = sext i8 %486 to i32
%488 = and i32 %487, 16
%489 = ashr i32 %488, 4
store i32 %489, i32* %36
%490 = load i8*, i8** %13
%491 = load i32, i32* %17
%492 = sext i32 %491 to i64
%493 = getelementptr inbounds i8, i8* %490, i64 %492
%494 = load i8, i8* %493
%495 = sext i8 %494 to i32
%496 = and i32 %495, 1
store i32 %496, i32* %37
%497 = load i32, i32* %17
%498 = add nsw i32 %497, 1
store i32 %498, i32* %17
%499 = load i32, i32* %32
%500 = sub nsw i32 %499, 1
store i32 %500, i32* %32
%501 = load i32, i32* %24
%502 = sub nsw i32 %501, 1
store i32 %502, i32* %24
%503 = load i32, i32* %33
%504 = icmp eq i32 %503, 1
br i1 %504, label %505, label %512
505: ; preds = %457
%506 = load i32, i32* %17
%507 = add nsw i32 %506, 16
store i32 %507, i32* %17
%508 = load i32, i32* %24
%509 = sub nsw i32 %508, 16
store i32 %509, i32* %24
%510 = load i32, i32* %32
%511 = sub nsw i32 %510, 16
store i32 %511, i32* %32
br label %512
512: ; preds = %505, %457
%513 = load i32, i32* %34
%514 = icmp eq i32 %513, 1
br i1 %514, label %515, label %543
515: ; preds = %512
%516 = load i32, i32* %24
%517 = sub nsw i32 %516, 1
%518 = load i8*, i8** %13
%519 = load i32, i32* %17
%520 = sext i32 %519 to i64
%521 = getelementptr inbounds i8, i8* %518, i64 %520
%522 = load i8, i8* %521
%523 = sext i8 %522 to i32
%524 = sub nsw i32 %517, %523
store i32 %524, i32* %24
%525 = load i32, i32* %32
%526 = sub nsw i32 %525, 1
%527 = load i8*, i8** %13
%528 = load i32, i32* %17
%529 = sext i32 %528 to i64
%530 = getelementptr inbounds i8, i8* %527, i64 %529
%531 = load i8, i8* %530
%532 = sext i8 %531 to i32
%533 = sub nsw i32 %526, %532
store i32 %533, i32* %32
%534 = load i32, i32* %17
%535 = load i8*, i8** %13
%536 = load i32, i32* %17
%537 = sext i32 %536 to i64
%538 = getelementptr inbounds i8, i8* %535, i64 %537
%539 = load i8, i8* %538
%540 = sext i8 %539 to i32
%541 = add nsw i32 %534, %540
%542 = add nsw i32 %541, 1
store i32 %542, i32* %17
br label %543
543: ; preds = %515, %512
%544 = load i32, i32* %35
%545 = icmp eq i32 %544, 1
br i1 %545, label %546, label %553
546: ; preds = %543
%547 = load i32, i32* %17
%548 = add nsw i32 %547, 2
store i32 %548, i32* %17
%549 = load i32, i32* %24
%550 = sub nsw i32 %549, 2
store i32 %550, i32* %24
%551 = load i32, i32* %32
%552 = sub nsw i32 %551, 2
store i32 %552, i32* %32
br label %553
553: ; preds = %546, %543
%554 = load i32, i32* %36
%555 = icmp eq i32 %554, 1
br i1 %555, label %556, label %563
556: ; preds = %553
%557 = load i32, i32* %17
%558 = add nsw i32 %557, 2
store i32 %558, i32* %17
%559 = load i32, i32* %24
%560 = sub nsw i32 %559, 2
store i32 %560, i32* %24
%561 = load i32, i32* %32
%562 = sub nsw i32 %561, 2
store i32 %562, i32* %32
br label %563
563: ; preds = %556, %553
%564 = load i32, i32* %37
%565 = icmp eq i32 %564, 1
br i1 %565, label %566, label %601
566: ; preds = %563
%567 = load i8*, i8** %13
%568 = load i32, i32* %17
%569 = sext i32 %568 to i64
%570 = getelementptr inbounds i8, i8* %567, i64 %569
%571 = load i8, i8* %570
%572 = sext i8 %571 to i32
%573 = and i32 %572, 127
store i32 %573, i32* %38
%574 = load i8*, i8** %13
%575 = load i32, i32* %17
%576 = add nsw i32 %575, 1
%577 = sext i32 %576 to i64
%578 = getelementptr inbounds i8, i8* %574, i64 %577
%579 = load i8, i8* %578
%580 = sext i8 %579 to i32
%581 = and i32 %580, 1
store i32 %581, i32* %39
%582 = load i32, i32* %17
%583 = add nsw i32 %582, 2
store i32 %583, i32* %17
%584 = load i32, i32* %24
%585 = sub nsw i32 %584, 2
store i32 %585, i32* %24
%586 = load i32, i32* %32
%587 = sub nsw i32 %586, 2
store i32 %587, i32* %32
%588 = load i32, i32* %39
%589 = icmp eq i32 %588, 0
br i1 %589, label %590, label %600
590: ; preds = %566
%591 = load i32, i32* %17
%592 = load i32, i32* %38
%593 = add nsw i32 %591, %592
store i32 %593, i32* %17
%594 = load i32, i32* %24
%595 = load i32, i32* %38
%596 = sub nsw i32 %594, %595
store i32 %596, i32* %24
%597 = load i32, i32* %32
%598 = load i32, i32* %38
%599 = sub nsw i32 %597, %598
store i32 %599, i32* %32
br label %600
600: ; preds = %590, %566
br label %601
601: ; preds = %600, %563
br label %602
602: ; preds = %601, %454
store i32 0, i32* %21
br label %603
603: ; preds = %613, %602
%604 = load i32, i32* %32
%605 = icmp sgt i32 %604, 0
br i1 %605, label %606, label %616
606: ; preds = %603
%607 = load i32, i32* %17
%608 = add nsw i32 %607, 1
store i32 %608, i32* %17
%609 = load i32, i32* %24
%610 = add nsw i32 %609, -1
store i32 %610, i32* %24
%611 = load i32, i32* %32
%612 = add nsw i32 %611, -1
store i32 %612, i32* %32
br label %613
613: ; preds = %606
%614 = load i32, i32* %21
%615 = add nsw i32 %614, 1
store i32 %615, i32* %21
br label %603
616: ; preds = %603
%617 = load i8*, i8** %13
%618 = load i32, i32* %17
%619 = sext i32 %618 to i64
%620 = getelementptr inbounds i8, i8* %617, i64 %619
%621 = load i8, i8* %620
%622 = sext i8 %621 to i32
%623 = and i32 %622, 252
%624 = ashr i32 %623, 2
store i32 %624, i32* %40
%625 = load i32, i32* %17
%626 = add nsw i32 %625, 3
store i32 %626, i32* %17
%627 = load i32, i32* %24
%628 = sub nsw i32 %627, 3
store i32 %628, i32* %24
%629 = load i32, i32* %40
%630 = icmp ne i32 %629, 32
br i1 %630, label %631, label %632
631: ; preds = %616
br label %154
632: ; preds = %616
%633 = load i8*, i8** %13
%634 = load i32, i32* %17
%635 = sext i32 %634 to i64
%636 = getelementptr inbounds i8, i8* %633, i64 %635
%637 = load i8, i8* %636
%638 = sext i8 %637 to i32
%639 = and i32 %638, 252
%640 = ashr i32 %639, 2
store i32 %640, i32* %40
%641 = load i32, i32* %40
%642 = icmp sgt i32 %641, 8
br i1 %642, label %643, label %646
643: ; preds = %632
%644 = load i32, i32* %40
%645 = icmp slt i32 %644, 32
br i1 %645, label %649, label %646
646: ; preds = %643, %632
%647 = load i32, i32* %40
%648 = icmp sgt i32 %647, 40
br i1 %648, label %649, label %650
649: ; preds = %646, %643
br label %154
650: ; preds = %646
%651 = load i8*, i8** %13
%652 = load i32, i32* %17
%653 = add nsw i32 %652, 3
%654 = sext i32 %653 to i64
%655 = getelementptr inbounds i8, i8* %651, i64 %654
%656 = load i8, i8* %655
%657 = sext i8 %656 to i32
%658 = shl i32 %657, 8
%659 = and i32 %658, 65280
%660 = load i8*, i8** %13
%661 = load i32, i32* %17
%662 = add nsw i32 %661, 4
%663 = sext i32 %662 to i64
%664 = getelementptr inbounds i8, i8* %660, i64 %663
%665 = load i8, i8* %664
%666 = sext i8 %665 to i32
%667 = and i32 %666, 255
%668 = or i32 %659, %667
store i32 %668, i32* %41
%669 = load i32, i32* %17
%670 = add nsw i32 %669, 5
store i32 %670, i32* %17
%671 = load i32, i32* %24
%672 = sub nsw i32 %671, 5
store i32 %672, i32* %24
%673 = load i32, i32* %41
%674 = load i32, i32* %24
%675 = icmp sgt i32 %673, %674
br i1 %675, label %676, label %677
676: ; preds = %650
br label %154
677: ; preds = %650
%678 = call i8* @malloc(i32 2)
store i8* %678, i8** %42
%679 = load i32, i32* %40
%680 = icmp eq i32 %679, 0
br i1 %680, label %684, label %681
681: ; preds = %677
%682 = load i32, i32* %40
%683 = icmp eq i32 %682, 32
br i1 %683, label %684, label %857
684: ; preds = %681, %677
%685 = load i8*, i8** %12
%686 = load i8*, i8** %12
%687 = call i32 @strlen(i8* %686)
%688 = load i32*, i32** %9
%689 = call i32 @fwrite(i8* %685, i32 %687, i32 1, i32* %688)
%690 = load i8*, i8** %12
%691 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %690, i32 2048, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%692 = load i8*, i8** %12
%693 = load i8*, i8** %12
%694 = call i32 @strlen(i8* %693)
%695 = load i32*, i32** %9
%696 = call i32 @fwrite(i8* %692, i32 %694, i32 1, i32* %695)
%697 = load i8*, i8** %42
%698 = call i32 (i8*, i8*, ...) @sprintf(i8* %697, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%699 = load i8*, i8** %13
%700 = load i32, i32* %17
%701 = sext i32 %700 to i64
%702 = getelementptr inbounds i8, i8* %699, i64 %701
%703 = load i8, i8* %702
%704 = sext i8 %703 to i32
%705 = and i32 %704, 192
%706 = ashr i32 %705, 6
store i32 %706, i32* %43
%707 = load i8*, i8** %13
%708 = load i32, i32* %17
%709 = sext i32 %708 to i64
%710 = getelementptr inbounds i8, i8* %707, i64 %709
%711 = load i8, i8* %710
%712 = sext i8 %711 to i32
%713 = and i32 %712, 63
store i32 %713, i32* %44
%714 = load i32, i32* %17
%715 = add nsw i32 %714, 1
store i32 %715, i32* %17
%716 = load i8*, i8** %12
%717 = load i32, i32* %43
%718 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %716, i32 2048, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 %717)
%719 = load i8*, i8** %12
%720 = load i8*, i8** %12
%721 = call i32 @strlen(i8* %720)
%722 = load i32*, i32** %9
%723 = call i32 @fwrite(i8* %719, i32 %721, i32 1, i32* %722)
%724 = load i32, i32* %43
%725 = icmp eq i32 %724, 1
br i1 %725, label %729, label %726
726: ; preds = %684
%727 = load i32, i32* %43
%728 = icmp eq i32 %727, 2
br i1 %728, label %729, label %774
729: ; preds = %726, %684
%730 = load i8*, i8** %12
%731 = load i8*, i8** %13
%732 = load i32, i32* %17
%733 = add nsw i32 %732, 0
%734 = sext i32 %733 to i64
%735 = getelementptr inbounds i8, i8* %731, i64 %734
%736 = load i8, i8* %735
%737 = sext i8 %736 to i32
%738 = load i8*, i8** %13
%739 = load i32, i32* %17
%740 = add nsw i32 %739, 1
%741 = sext i32 %740 to i64
%742 = getelementptr inbounds i8, i8* %738, i64 %741
%743 = load i8, i8* %742
%744 = sext i8 %743 to i32
%745 = load i8*, i8** %13
%746 = load i32, i32* %17
%747 = add nsw i32 %746, 2
%748 = sext i32 %747 to i64
%749 = getelementptr inbounds i8, i8* %745, i64 %748
%750 = load i8, i8* %749
%751 = sext i8 %750 to i32
%752 = load i8*, i8** %13
%753 = load i32, i32* %17
%754 = add nsw i32 %753, 3
%755 = sext i32 %754 to i64
%756 = getelementptr inbounds i8, i8* %752, i64 %755
%757 = load i8, i8* %756
%758 = sext i8 %757 to i32
%759 = load i8*, i8** %13
%760 = load i32, i32* %17
%761 = add nsw i32 %760, 4
%762 = sext i32 %761 to i64
%763 = getelementptr inbounds i8, i8* %759, i64 %762
%764 = load i8, i8* %763
%765 = sext i8 %764 to i32
%766 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %730, i32 2048, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %737, i32 %744, i32 %751, i32 %758, i32 %765)
%767 = load i8*, i8** %12
%768 = load i8*, i8** %12
%769 = call i32 @strlen(i8* %768)
%770 = load i32*, i32** %9
%771 = call i32 @fwrite(i8* %767, i32 %769, i32 1, i32* %770)
%772 = load i32, i32* %17
%773 = add nsw i32 %772, 5
store i32 %773, i32* %17
br label %774
774: ; preds = %729, %726
%775 = load i8*, i8** %13
%776 = load i32, i32* %17
%777 = sext i32 %776 to i64
%778 = getelementptr inbounds i8, i8* %775, i64 %777
%779 = load i8, i8* %778
%780 = sext i8 %779 to i32
store i32 %780, i32* %45
%781 = load i8*, i8** %12
%782 = load i8*, i8** %13
%783 = load i32, i32* %17
%784 = sext i32 %783 to i64
%785 = getelementptr inbounds i8, i8* %782, i64 %784
%786 = load i8, i8* %785
%787 = sext i8 %786 to i32
%788 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %781, i32 2048, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i32 %787)
%789 = load i8*, i8** %12
%790 = load i8*, i8** %12
%791 = call i32 @strlen(i8* %790)
%792 = load i32*, i32** %9
%793 = call i32 @fwrite(i8* %789, i32 %791, i32 1, i32* %792)
%794 = load i32, i32* %17
%795 = add nsw i32 %794, 1
store i32 %795, i32* %17
store i32 0, i32* %21
br label %796
796: ; preds = %853, %774
%797 = load i32, i32* %21
%798 = load i32, i32* %45
%799 = icmp slt i32 %797, %798
br i1 %799, label %800, label %856
800: ; preds = %796
%801 = load i8*, i8** %13
%802 = load i32, i32* %17
%803 = sext i32 %802 to i64
%804 = getelementptr inbounds i8, i8* %801, i64 %803
%805 = load i8, i8* %804
%806 = sext i8 %805 to i32
%807 = and i32 %806, 15
store i32 %807, i32* %46
%808 = load i32, i32* %17
%809 = add nsw i32 %808, 1
store i32 %809, i32* %17
%810 = load i32, i32* %46
%811 = icmp eq i32 %810, 12
br i1 %811, label %818, label %812
812: ; preds = %800
%813 = load i32, i32* %46
%814 = icmp eq i32 %813, 13
br i1 %814, label %818, label %815
815: ; preds = %812
%816 = load i32, i32* %46
%817 = icmp eq i32 %816, 14
br i1 %817, label %818, label %821
818: ; preds = %815, %812, %800
%819 = load i32, i32* %17
%820 = add nsw i32 %819, 1
store i32 %820, i32* %17
br label %821
821: ; preds = %818, %815
%822 = load i8*, i8** %12
%823 = load i8*, i8** %13
%824 = load i32, i32* %17
%825 = sext i32 %824 to i64
%826 = getelementptr inbounds i8, i8* %823, i64 %825
%827 = load i8, i8* %826
%828 = sext i8 %827 to i32
%829 = load i8*, i8** %13
%830 = load i32, i32* %17
%831 = add nsw i32 %830, 1
%832 = sext i32 %831 to i64
%833 = getelementptr inbounds i8, i8* %829, i64 %832
%834 = load i8, i8* %833
%835 = sext i8 %834 to i32
%836 = load i8*, i8** %13
%837 = load i32, i32* %17
%838 = add nsw i32 %837, 2
%839 = sext i32 %838 to i64
%840 = getelementptr inbounds i8, i8* %836, i64 %839
%841 = load i8, i8* %840
%842 = sext i8 %841 to i32
%843 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %822, i32 2048, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0), i32 %828, i32 %835, i32 %842)
%844 = load i8*, i8** %12
%845 = load i8*, i8** %12
%846 = call i32 @strlen(i8* %845)
%847 = load i32*, i32** %9
%848 = call i32 @fwrite(i8* %844, i32 %846, i32 1, i32* %847)
%849 = load i32, i32* %17
%850 = add nsw i32 %849, 3
store i32 %850, i32* %17
%851 = load i32, i32* %17
%852 = add nsw i32 %851, 1
store i32 %852, i32* %17
br label %853
853: ; preds = %821
%854 = load i32, i32* %21
%855 = add nsw i32 %854, 1
store i32 %855, i32* %21
br label %796
856: ; preds = %796
br label %941
857: ; preds = %681
%858 = load i8*, i8** %12
%859 = load i8*, i8** %12
%860 = call i32 @strlen(i8* %859)
%861 = load i32*, i32** %9
%862 = call i32 @fwrite(i8* %858, i32 %860, i32 1, i32* %861)
%863 = load i8*, i8** %12
%864 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %863, i32 2048, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.18, i64 0, i64 0))
%865 = load i8*, i8** %12
%866 = load i8*, i8** %12
%867 = call i32 @strlen(i8* %866)
%868 = load i32*, i32** %9
%869 = call i32 @fwrite(i8* %865, i32 %867, i32 1, i32* %868)
%870 = load i8*, i8** %42
%871 = call i32 (i8*, i8*, ...) @sprintf(i8* %870, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%872 = load i8*, i8** %13
%873 = load i32, i32* %17
%874 = sext i32 %873 to i64
%875 = getelementptr inbounds i8, i8* %872, i64 %874
%876 = load i8, i8* %875
%877 = sext i8 %876 to i32
%878 = and i32 %877, 192
%879 = ashr i32 %878, 6
store i32 %879, i32* %47
%880 = load i32, i32* %17
%881 = add nsw i32 %880, 1
store i32 %881, i32* %17
%882 = load i8*, i8** %12
%883 = load i32, i32* %47
%884 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %882, i32 2048, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i32 %883)
%885 = load i8*, i8** %12
%886 = load i8*, i8** %12
%887 = call i32 @strlen(i8* %886)
%888 = load i32*, i32** %9
%889 = call i32 @fwrite(i8* %885, i32 %887, i32 1, i32* %888)
%890 = load i32, i32* %47
%891 = icmp eq i32 %890, 1
br i1 %891, label %895, label %892
892: ; preds = %857
%893 = load i32, i32* %47
%894 = icmp eq i32 %893, 2
br i1 %894, label %895, label %940
895: ; preds = %892, %857
%896 = load i8*, i8** %12
%897 = load i8*, i8** %13
%898 = load i32, i32* %17
%899 = add nsw i32 %898, 0
%900 = sext i32 %899 to i64
%901 = getelementptr inbounds i8, i8* %897, i64 %900
%902 = load i8, i8* %901
%903 = sext i8 %902 to i32
%904 = load i8*, i8** %13
%905 = load i32, i32* %17
%906 = add nsw i32 %905, 1
%907 = sext i32 %906 to i64
%908 = getelementptr inbounds i8, i8* %904, i64 %907
%909 = load i8, i8* %908
%910 = sext i8 %909 to i32
%911 = load i8*, i8** %13
%912 = load i32, i32* %17
%913 = add nsw i32 %912, 2
%914 = sext i32 %913 to i64
%915 = getelementptr inbounds i8, i8* %911, i64 %914
%916 = load i8, i8* %915
%917 = sext i8 %916 to i32
%918 = load i8*, i8** %13
%919 = load i32, i32* %17
%920 = add nsw i32 %919, 3
%921 = sext i32 %920 to i64
%922 = getelementptr inbounds i8, i8* %918, i64 %921
%923 = load i8, i8* %922
%924 = sext i8 %923 to i32
%925 = load i8*, i8** %13
%926 = load i32, i32* %17
%927 = add nsw i32 %926, 4
%928 = sext i32 %927 to i64
%929 = getelementptr inbounds i8, i8* %925, i64 %928
%930 = load i8, i8* %929
%931 = sext i8 %930 to i32
%932 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %896, i32 2048, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0), i32 %903, i32 %910, i32 %917, i32 %924, i32 %931)
%933 = load i8*, i8** %12
%934 = load i8*, i8** %12
%935 = call i32 @strlen(i8* %934)
%936 = load i32*, i32** %9
%937 = call i32 @fwrite(i8* %933, i32 %935, i32 1, i32* %936)
%938 = load i32, i32* %17
%939 = add nsw i32 %938, 5
store i32 %939, i32* %17
br label %940
940: ; preds = %895, %892
br label %941
941: ; preds = %940, %856
%942 = load i8*, i8** %13
%943 = load i32, i32* %17
%944 = sext i32 %943 to i64
%945 = getelementptr inbounds i8, i8* %942, i64 %944
%946 = load i8, i8* %945
%947 = sext i8 %946 to i32
%948 = shl i32 %947, 16
%949 = and i32 %948, 16711680
%950 = load i8*, i8** %13
%951 = load i32, i32* %17
%952 = add nsw i32 %951, 1
%953 = sext i32 %952 to i64
%954 = getelementptr inbounds i8, i8* %950, i64 %953
%955 = load i8, i8* %954
%956 = sext i8 %955 to i32
%957 = shl i32 %956, 8
%958 = and i32 %957, 65280
%959 = or i32 %949, %958
%960 = load i8*, i8** %13
%961 = load i32, i32* %17
%962 = add nsw i32 %961, 2
%963 = sext i32 %962 to i64
%964 = getelementptr inbounds i8, i8* %960, i64 %963
%965 = load i8, i8* %964
%966 = sext i8 %965 to i32
%967 = and i32 %966, 255
%968 = or i32 %959, %967
store i32 %968, i32* %48
%969 = load i32, i32* %48
store i32 %969, i32* %49
%970 = load i8*, i8** %12
%971 = load i8*, i8** %13
%972 = load i32, i32* %17
%973 = add nsw i32 %972, 0
%974 = sext i32 %973 to i64
%975 = getelementptr inbounds i8, i8* %971, i64 %974
%976 = load i8, i8* %975
%977 = sext i8 %976 to i32
%978 = load i8*, i8** %13
%979 = load i32, i32* %17
%980 = add nsw i32 %979, 1
%981 = sext i32 %980 to i64
%982 = getelementptr inbounds i8, i8* %978, i64 %981
%983 = load i8, i8* %982
%984 = sext i8 %983 to i32
%985 = load i8*, i8** %13
%986 = load i32, i32* %17
%987 = add nsw i32 %986, 2
%988 = sext i32 %987 to i64
%989 = getelementptr inbounds i8, i8* %985, i64 %988
%990 = load i8, i8* %989
%991 = sext i8 %990 to i32
%992 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %970, i32 2048, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0), i32 %977, i32 %984, i32 %991)
%993 = load i8*, i8** %12
%994 = load i8*, i8** %12
%995 = call i32 @strlen(i8* %994)
%996 = load i32*, i32** %9
%997 = call i32 @fwrite(i8* %993, i32 %995, i32 1, i32* %996)
%998 = load i32, i32* %17
%999 = add nsw i32 %998, 3
store i32 %999, i32* %17
%1000 = load i32, i32* %24
%1001 = sub nsw i32 %1000, 3
store i32 %1001, i32* %24
br label %1002
1002: ; preds = %1116, %1051, %941
%1003 = load i32, i32* %49
%1004 = icmp ne i32 %1003, 0
br i1 %1004, label %1005, label %1129
1005: ; preds = %1002
%1006 = load i32, i32* %17
store i32 %1006, i32* %50
%1007 = load i8*, i8** %13
%1008 = load i32, i32* %17
%1009 = add nsw i32 %1008, 2
%1010 = sext i32 %1009 to i64
%1011 = getelementptr inbounds i8, i8* %1007, i64 %1010
%1012 = load i8, i8* %1011
%1013 = sext i8 %1012 to i32
%1014 = and i32 %1013, 255
%1015 = shl i32 %1014, 16
%1016 = load i8*, i8** %13
%1017 = load i32, i32* %17
%1018 = add nsw i32 %1017, 3
%1019 = sext i32 %1018 to i64
%1020 = getelementptr inbounds i8, i8* %1016, i64 %1019
%1021 = load i8, i8* %1020
%1022 = sext i8 %1021 to i32
%1023 = and i32 %1022, 255
%1024 = shl i32 %1023, 8
%1025 = or i32 %1015, %1024
%1026 = load i8*, i8** %13
%1027 = load i32, i32* %17
%1028 = add nsw i32 %1027, 4
%1029 = sext i32 %1028 to i64
%1030 = getelementptr inbounds i8, i8* %1026, i64 %1029
%1031 = load i8, i8* %1030
%1032 = sext i8 %1031 to i32
%1033 = and i32 %1032, 255
%1034 = shl i32 %1033, 0
%1035 = or i32 %1025, %1034
store i32 %1035, i32* %51
%1036 = load i32, i32* %51
%1037 = icmp sgt i32 %1036, 188
br i1 %1037, label %1042, label %1038
1038: ; preds = %1005
%1039 = load i32, i32* %51
%1040 = load i32, i32* %24
%1041 = icmp sgt i32 %1039, %1040
br i1 %1041, label %1042, label %1052
1042: ; preds = %1038, %1005
%1043 = load i32, i32* %49
%1044 = load i32, i32* %51
%1045 = icmp slt i32 %1043, %1044
br i1 %1045, label %1046, label %1047
1046: ; preds = %1042
store i32 0, i32* %49
br label %1051
1047: ; preds = %1042
%1048 = load i32, i32* %49
%1049 = load i32, i32* %51
%1050 = sub nsw i32 %1048, %1049
store i32 %1050, i32* %49
br label %1051
1051: ; preds = %1047, %1046
br label %1002
1052: ; preds = %1038
%1053 = load i8*, i8** %12
%1054 = call i32 @memset(i8* %1053, i32 0, i32 2048)
%1055 = load i8*, i8** %12
%1056 = load i8*, i8** %13
%1057 = load i32, i32* %17
%1058 = add nsw i32 %1057, 1
%1059 = sext i32 %1058 to i64
%1060 = getelementptr inbounds i8, i8* %1056, i64 %1059
%1061 = load i8, i8* %1060
%1062 = sext i8 %1061 to i32
%1063 = load i8*, i8** %13
%1064 = load i32, i32* %17
%1065 = add nsw i32 %1064, 2
%1066 = sext i32 %1065 to i64
%1067 = getelementptr inbounds i8, i8* %1063, i64 %1066
%1068 = load i8, i8* %1067
%1069 = sext i8 %1068 to i32
%1070 = load i8*, i8** %13
%1071 = load i32, i32* %17
%1072 = add nsw i32 %1071, 3
%1073 = sext i32 %1072 to i64
%1074 = getelementptr inbounds i8, i8* %1070, i64 %1073
%1075 = load i8, i8* %1074
%1076 = sext i8 %1075 to i32
%1077 = load i8*, i8** %13
%1078 = load i32, i32* %17
%1079 = add nsw i32 %1078, 4
%1080 = sext i32 %1079 to i64
%1081 = getelementptr inbounds i8, i8* %1077, i64 %1080
%1082 = load i8, i8* %1081
%1083 = sext i8 %1082 to i32
%1084 = load i32, i32* %51
%1085 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %1055, i32 2048, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.23, i64 0, i64 0), i32 %1062, i32 %1069, i32 %1076, i32 %1083, i32 %1084)
%1086 = load i8*, i8** %12
%1087 = load i8*, i8** %12
%1088 = call i32 @strlen(i8* %1087)
%1089 = load i32*, i32** %9
%1090 = call i32 @fwrite(i8* %1086, i32 %1088, i32 1, i32* %1089)
%1091 = load i32, i32* %17
%1092 = add nsw i32 %1091, 5
store i32 %1092, i32* %17
store i32 0, i32* %21
br label %1093
1093: ; preds = %1113, %1052
%1094 = load i32, i32* %21
%1095 = load i32, i32* %51
%1096 = icmp slt i32 %1094, %1095
br i1 %1096, label %1097, label %1116
1097: ; preds = %1093
%1098 = load i8*, i8** %12
%1099 = load i8*, i8** %13
%1100 = load i32, i32* %17
%1101 = sext i32 %1100 to i64
%1102 = getelementptr inbounds i8, i8* %1099, i64 %1101
%1103 = load i8, i8* %1102
%1104 = sext i8 %1103 to i32
%1105 = call i32 (i8*, i8*, ...) @sprintf(i8* %1098, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i32 %1104)
%1106 = load i8*, i8** %12
%1107 = load i8*, i8** %12
%1108 = call i32 @strlen(i8* %1107)
%1109 = load i32*, i32** %9
%1110 = call i32 @fwrite(i8* %1106, i32 %1108, i32 1, i32* %1109)
%1111 = load i32, i32* %17
%1112 = add nsw i32 %1111, 1
store i32 %1112, i32* %17
br label %1113
1113: ; preds = %1097
%1114 = load i32, i32* %21
%1115 = add nsw i32 %1114, 1
store i32 %1115, i32* %21
br label %1093
1116: ; preds = %1093
%1117 = load i8*, i8** %12
%1118 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %1117, i32 2048, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.25, i64 0, i64 0))
%1119 = load i8*, i8** %12
%1120 = load i8*, i8** %12
%1121 = call i32 @strlen(i8* %1120)
%1122 = load i32*, i32** %9
%1123 = call i32 @fwrite(i8* %1119, i32 %1121, i32 1, i32* %1122)
%1124 = load i32, i32* %49
%1125 = load i32, i32* %17
%1126 = load i32, i32* %50
%1127 = sub nsw i32 %1125, %1126
%1128 = sub nsw i32 %1124, %1127
store i32 %1128, i32* %49
br label %1002
1129: ; preds = %1002
%1130 = load i8*, i8** %12
%1131 = load i8*, i8** %42
%1132 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %1130, i32 2048, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0), i8* %1131)
%1133 = load i8*, i8** %12
%1134 = load i8*, i8** %12
%1135 = call i32 @strlen(i8* %1134)
%1136 = load i32*, i32** %9
%1137 = call i32 @fwrite(i8* %1133, i32 %1135, i32 1, i32* %1136)
br label %1138
1138: ; preds = %1129, %268
br label %1139
1139: ; preds = %1138, %207, %204
br label %154
1140: ; preds = %154
%1141 = load i8*, i8** %12
%1142 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %1141, i32 2048, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
%1143 = load i8*, i8** %12
%1144 = load i8*, i8** %12
%1145 = call i32 @strlen(i8* %1144)
%1146 = load i32*, i32** %9
%1147 = call i32 @fwrite(i8* %1143, i32 %1145, i32 1, i32* %1146)
%1148 = load i32*, i32** %9
%1149 = call i32 @fflush(i32* %1148)
%1150 = load i32*, i32** %9
%1151 = load i32*, i32** @stdout
%1152 = icmp ne i32* %1150, %1151
br i1 %1152, label %1153, label %1156
1153: ; preds = %1140
%1154 = load i32*, i32** %9
%1155 = call i32 @fclose(i32* %1154)
br label %1156
1156: ; preds = %1153, %1140
%1157 = load i32*, i32** %8
%1158 = call i32 @fclose(i32* %1157)
store i32 0, i32* %3
br label %1159
1159: ; preds = %1156, %149, %116, %100, %86
%1160 = load i32, i32* %3
ret i32 %1160
}

LLVM IR (-O2):
@.str = [5 x i8] c"o:i:\00"
@optarg = global i8* null
@stdout = global i32* null
@.str.4 = [2 x i8] c"w\00"
@.str.6 = [89 x i8] c"<xml><appdata><name>TsAnalyzer-SubExtractor</name><version>GIT</version></appdata><data>\00"
@.str.7 = [2 x i8] c"r\00"
@SEEK_CUR = global i32 0
@.str.27 = [16 x i8] c"\0A</data></xml>\0A\00"
@str = [23 x i8] c"couldn't open outfile.\00"
@str.28 = [23 x i8] c"couldn't open in file.\00"
@str.29 = [29 x i8] c"EOF before hitting mainloop.\00"
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %11, %2
%4 = phi i8* [ %12, %11 ], [ null, %2 ]
%5 = phi i8* [ %7, %11 ], [ null, %2 ]
br label %6
6: ; preds = %3, %9
%7 = phi i8* [ %10, %9 ], [ %5, %3 ]
%8 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
switch i32 %8, label %13 [
i32 -1, label %18
i32 105, label %9
i32 111, label %11
]
9: ; preds = %6
%10 = load i8*, i8** @optarg
br label %6
11: ; preds = %6
%12 = load i8*, i8** @optarg
br label %3
13: ; preds = %6
%14 = tail call i32 @putchar(i32 10)
%15 = load i8*, i8** %1
%16 = tail call i32 @usage(i8* %15)
%17 = tail call i32 (...) @abort()
unreachable
18: ; preds = %6
%19 = icmp eq i8* %7, null
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %1
%22 = tail call i32 @usage(i8* %21)
br label %83
23: ; preds = %18
%24 = icmp eq i8* %4, null
br i1 %24, label %25, label %27
25: ; preds = %23
%26 = load i32*, i32** @stdout
br label %32
27: ; preds = %23
%28 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %83
32: ; preds = %27, %25
%33 = phi i32* [ %26, %25 ], [ %28, %27 ]
%34 = tail call dereferenceable_or_null(2048) i8* @malloc(i32 2048)
%35 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %34, i32 2048, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.6, i64 0, i64 0))
%36 = tail call i32 @strlen(i8* %34)
%37 = tail call i32 @fwrite(i8* %34, i32 %36, i32 1, i32* %33)
%38 = tail call dereferenceable_or_null(188) i8* @malloc(i32 188)
%39 = tail call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %43
41: ; preds = %32
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
br label %83
43: ; preds = %32
%44 = tail call i32 @ftell(i32* %39)
%45 = tail call i64 @feof(i32* %39)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %53
47: ; preds = %43, %47
%48 = tail call i32 @fgetc(i32* %39)
%49 = tail call i64 @feof(i32* %39)
%50 = icmp eq i64 %49, 0
%51 = icmp ne i32 %48, 71
%52 = and i1 %51, %50
br i1 %52, label %47, label %53
53: ; preds = %47, %43
%54 = tail call i32 @ftell(i32* %39)
%55 = icmp eq i32 %44, %54
br i1 %55, label %59, label %56
56: ; preds = %53
%57 = load i32, i32* @SEEK_CUR
%58 = tail call i32 @fseek(i32* %39, i32 -1, i32 %57)
br label %59
59: ; preds = %56, %53
%60 = tail call i64 @feof(i32* %39)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = tail call i64 @feof(i32* %39)
%64 = icmp eq i64 %63, 0
br i1 %64, label %68, label %72
65: ; preds = %59
%66 = tail call i32 @fclose(i32* %39)
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.29, i64 0, i64 0))
br label %83
68: ; preds = %62, %68
%69 = tail call i32 @fread(i8* %38, i32 188, i32 1, i32* %39)
%70 = tail call i64 @feof(i32* %39)
%71 = icmp eq i64 %70, 0
br i1 %71, label %68, label %72
72: ; preds = %68, %62
%73 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %34, i32 2048, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
%74 = tail call i32 @strlen(i8* %34)
%75 = tail call i32 @fwrite(i8* %34, i32 %74, i32 1, i32* %33)
%76 = tail call i32 @fflush(i32* %33)
%77 = load i32*, i32** @stdout
%78 = icmp eq i32* %33, %77
br i1 %78, label %81, label %79
79: ; preds = %72
%80 = tail call i32 @fclose(i32* %33)
br label %81
81: ; preds = %79, %72
%82 = tail call i32 @fclose(i32* %39)
br label %83
83: ; preds = %41, %81, %65, %30, %20
%84 = phi i32 [ 1, %20 ], [ 3, %30 ], [ 2, %41 ], [ 3, %65 ], [ 0, %81 ]
ret i32 %84
}