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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
scalar_t__ allZero(unsigned char *);
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(unsigned char *, char, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char const *, char *);
int main(int argc, char **argv) {
  int pgsz = 0;
  long szFile;
  FILE *in;
  int i, j;
  int nErr = 0;
  const char *zInputFile = 0;
  const char *zBaseName = 0;
  int lastPage = 0;
  int iPage;
  unsigned char aLine[16];
  unsigned char aHdr[100];
  unsigned char bShow[256];
  memset(bShow, '.', sizeof(bShow));
  for (i = ' '; i <= '~'; i++) {
    if (i != '{' && i != '}' && i != '"' && i != '\\')
      bShow[i] = i;
  }
  for (i = 1; i < argc; i++) {
    if (argv[i][0] == '-') {
      const char *z = argv[i];
      z++;
      if (z[0] == '-')
        z++;
      if (strcmp(z, "pagesize") == 0) {
        i++;
        pgsz = atoi(argv[i]);
        if (pgsz < 512 || pgsz > 65536 || (pgsz & (pgsz - 1)) != 0) {
          fprintf(stderr, "Page size must be a power of two between"
                          " 512 and 65536.\n");
          nErr++;
        }
        continue;
      }
      fprintf(stderr, "Unknown option: %s\n", argv[i]);
      nErr++;
    } else if (zInputFile) {
      fprintf(stderr, "Already using a different input file: [%s]\n", argv[i]);
      nErr++;
    } else {
      zInputFile = argv[i];
    }
  }
  if (zInputFile == 0) {
    fprintf(stderr, "No input file specified.\n");
    nErr++;
  }
  if (nErr) {
    fprintf(stderr, "Usage: %s [--pagesize N] FILENAME\n", argv[0]);
    exit(1);
  }
  in = fopen(zInputFile, "rb");
  if (in == 0) {
    fprintf(stderr, "Cannot open input file [%s]\n", zInputFile);
    exit(1);
  }
  fseek(in, 0, SEEK_END);
  szFile = ftell(in);
  rewind(in);
  if (szFile < 100) {
    fprintf(stderr, "File too short. Minimum size is 100 bytes.\n");
    exit(1);
  }
  if (fread(aHdr, 100, 1, in) != 1) {
    fprintf(stderr, "Cannot read file header\n");
    exit(1);
  }
  rewind(in);
  if (pgsz == 0) {
    pgsz = (aHdr[16] << 8) | aHdr[17];
    if (pgsz == 1)
      pgsz = 65536;
    if (pgsz < 512 || (pgsz & (pgsz - 1)) != 0) {
      fprintf(stderr, "Invalid page size in header: %d\n", pgsz);
      exit(1);
    }
  }
  zBaseName = zInputFile;
  for (i = 0; zInputFile[i]; i++) {
    if (zInputFile[i] == '/' && zInputFile[i + 1] != 0)
      zBaseName = zInputFile + i + 1;
  }
  printf("| size %d pagesize %d filename %s\n", (int)szFile, pgsz, zBaseName);
  for (i = 0; i < szFile; i += 16) {
    int got = (int)fread(aLine, 1, 16, in);
    if (got != 16) {
      static int once = 1;
      if (once) {
        fprintf(stderr, "Could not read input file starting at byte %d\n",
                i + got);
      }
      memset(aLine + got, 0, 16 - got);
    }
    if (allZero(aLine))
      continue;
    iPage = i / pgsz + 1;
    if (lastPage != iPage) {
      printf("| page %d offset %d\n", iPage, (iPage - 1) * pgsz);
      lastPage = iPage;
    }
    printf("|  %5d:", i - (iPage - 1) * pgsz);
    for (j = 0; j < 16; j++)
      printf(" %02x", aLine[j]);
    printf("   ");
    for (j = 0; j < 16; j++) {
      unsigned char c = (unsigned char)aLine[j];
      fputc(bShow[c], stdout);
    }
    fputc('\n', stdout);
  }
  fclose(in);
  printf("| end %s\n", zBaseName);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x34(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
lea    -0x1d0(%rbp),%rdi
mov    $0x2e,%esi
mov    $0x100,%edx
call   1080 <memset@plt>
movl   $0x20,-0x2c(%rbp)
cmpl   $0x7e,-0x2c(%rbp)
jg     1290 <main+0xb0>
cmpl   $0x7b,-0x2c(%rbp)
je     127d <main+0x9d>
cmpl   $0x7d,-0x2c(%rbp)
je     127d <main+0x9d>
cmpl   $0x22,-0x2c(%rbp)
je     127d <main+0x9d>
cmpl   $0x5c,-0x2c(%rbp)
je     127d <main+0x9d>
mov    -0x2c(%rbp),%eax
mov    %al,%cl
movslq -0x2c(%rbp),%rax
mov    %cl,-0x1d0(%rbp,%rax,1)
jmp    1282 <main+0xa2>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    123b <main+0x5b>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1427 <main+0x247>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    13c3 <main+0x1e3>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1305 <main+0x125>
mov    -0x1d8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rdi
lea    0xced(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    1392 <main+0x1b2>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10f0 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x200,-0x14(%rbp)
jl     136d <main+0x18d>
cmpl   $0x10000,-0x14(%rbp)
jg     136d <main+0x18d>
mov    -0x14(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     138d <main+0x1ad>
mov    0x2c64(%rip),%rax
mov    (%rax),%edi
lea    0xc8c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1419 <main+0x239>
mov    0x2c3f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc94(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1414 <main+0x234>
cmpq   $0x0,-0x40(%rbp)
je     13ff <main+0x21f>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc6c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    140f <main+0x22f>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
jmp    1414 <main+0x234>
jmp    1419 <main+0x239>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1297 <main+0xb7>
cmpq   $0x0,-0x40(%rbp)
jne    1452 <main+0x272>
mov    0x2b9f(%rip),%rax
mov    (%rax),%edi
lea    0xc40(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1484 <main+0x2a4>
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc29(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    -0x40(%rbp),%rdi
lea    0xc30(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    14c8 <main+0x2e8>
mov    0x2b2e(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rdx
lea    0xc0b(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    0x2b15(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10d0 <fseek@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
call   1070 <rewind@plt>
cmpq   $0x64,-0x20(%rbp)
jge    151e <main+0x33e>
mov    0x2ad4(%rip),%rax
mov    (%rax),%edi
lea    0xbd2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x64,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x1,%eax
je     1562 <main+0x382>
mov    0x2a90(%rip),%rax
mov    (%rax),%edi
lea    0xbba(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    -0x28(%rbp),%rdi
call   1070 <rewind@plt>
cmpl   $0x0,-0x14(%rbp)
jne    15e6 <main+0x406>
movzbl -0xc0(%rbp),%eax
shl    $0x8,%eax
movzbl -0xbf(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    159c <main+0x3bc>
movl   $0x10000,-0x14(%rbp)
cmpl   $0x200,-0x14(%rbp)
jl     15bd <main+0x3dd>
mov    -0x14(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     15e1 <main+0x401>
mov    0x2a14(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xb54(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
jmp    15e6 <main+0x406>
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     165c <main+0x47c>
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1649 <main+0x469>
mov    -0x40(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1649 <main+0x469>
mov    -0x40(%rbp),%rax
movslq -0x2c(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    164e <main+0x46e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    15f5 <main+0x415>
mov    -0x20(%rbp),%rax
mov    %eax,%esi
mov    -0x14(%rbp),%edx
mov    -0x48(%rbp),%rcx
lea    0xad5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1823 <main+0x643>
lea    -0x60(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1040 <fread@plt>
mov    %eax,-0x1dc(%rbp)
cmpl   $0x10,-0x1dc(%rbp)
je     1703 <main+0x523>
cmpl   $0x0,0x29d3(%rip)
je     16e3 <main+0x503>
mov    0x290e(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
add    -0x1dc(%rbp),%edx
lea    0xa8c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
lea    -0x60(%rbp),%rdi
movslq -0x1dc(%rbp),%rax
add    %rax,%rdi
mov    $0x10,%edx
sub    -0x1dc(%rbp),%edx
xor    %esi,%esi
call   1080 <memset@plt>
lea    -0x60(%rbp),%rdi
call   1030 <allZero@plt>
cmp    $0x0,%rax
je     171b <main+0x53b>
jmp    1815 <main+0x635>
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x14(%rbp)
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
je     1755 <main+0x575>
mov    -0x50(%rbp),%esi
mov    -0x50(%rbp),%edx
sub    $0x1,%edx
imul   -0x14(%rbp),%edx
lea    0xa4f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
imul   -0x14(%rbp),%eax
sub    %eax,%esi
lea    0xa41(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x30(%rbp)
cmpl   $0x10,-0x30(%rbp)
jge    17a8 <main+0x5c8>
movslq -0x30(%rbp),%rax
movzbl -0x60(%rbp,%rax,1),%esi
lea    0xa21(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1779 <main+0x599>
lea    0xa0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x30(%rbp)
cmpl   $0x10,-0x30(%rbp)
jge    1802 <main+0x622>
movslq -0x30(%rbp),%rax
mov    -0x60(%rbp,%rax,1),%al
mov    %al,-0x1dd(%rbp)
movzbl -0x1dd(%rbp),%eax
mov    -0x1d0(%rbp,%rax,1),%al
mov    0x27e6(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1090 <fputc@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    17bd <main+0x5dd>
mov    0x27c7(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1090 <fputc@plt>
mov    -0x2c(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x2c(%rbp)
jmp    167e <main+0x49e>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x48(%rbp),%rsi
lea    0x987(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
lea    0x30(%rsp),%rdi
mov    $0x2e,%esi
mov    $0x100,%edx
call   1080 <memset@plt>
xor    %eax,%eax
movabs $0x280000001,%rcx
jmp    1238 <main+0x58>
nopl   0x0(%rax,%rax,1)
bt     %rsi,%rcx
jae    12d0 <main+0xf0>
add    $0x5,%rax
cmp    $0x7e,%rdx
je     12e6 <main+0x106>
lea    0x20(%rax),%rdx
lea    -0x5c(%rdx),%esi
cmp    $0x21,%esi
ja     124a <main+0x6a>
bt     %rsi,%rcx
jb     1260 <main+0x80>
cmp    $0x22,%edx
je     1260 <main+0x80>
lea    0x20(%rax),%esi
mov    %sil,0x50(%rsp,%rax,1)
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdx
lea    -0x5c(%rdx),%esi
cmp    $0x21,%esi
ja     1272 <main+0x92>
bt     %rsi,%rcx
jb     1280 <main+0xa0>
cmp    $0x22,%edx
je     1280 <main+0xa0>
lea    0x21(%rax),%esi
mov    %sil,0x51(%rsp,%rax,1)
nop
add    $0x1,%rdx
lea    -0x5c(%rdx),%esi
cmp    $0x21,%esi
ja     1292 <main+0xb2>
bt     %rsi,%rcx
jb     12a0 <main+0xc0>
cmp    $0x22,%edx
je     12a0 <main+0xc0>
lea    0x22(%rax),%esi
mov    %sil,0x52(%rsp,%rax,1)
nop
add    $0x1,%rdx
lea    -0x5c(%rdx),%esi
cmp    $0x21,%esi
ja     12b2 <main+0xd2>
bt     %rsi,%rcx
jb     12c0 <main+0xe0>
cmp    $0x22,%edx
je     12c0 <main+0xe0>
lea    0x23(%rax),%esi
mov    %sil,0x53(%rsp,%rax,1)
nop
add    $0x1,%rdx
lea    -0x5c(%rdx),%esi
cmp    $0x21,%esi
jbe    1220 <main+0x40>
cmp    $0x22,%edx
je     122a <main+0x4a>
lea    0x24(%rax),%esi
mov    %sil,0x54(%rsp,%rax,1)
jmp    122a <main+0x4a>
xor    %r12d,%r12d
mov    $0x0,%ebx
cmp    $0x2,%ebp
jl     1406 <main+0x226>
mov    $0x1,%r13d
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %r15d,%r15d
xor    %ebx,%ebx
jmp    131d <main+0x13d>
mov    %rdx,%r15
xchg   %ax,%ax
add    $0x1,%r13d
cmp    %ebp,%r13d
jge    13fc <main+0x21c>
movslq %r13d,%r12
mov    (%r14,%r12,8),%rdx
cmpb   $0x2d,(%rdx)
jne    1360 <main+0x180>
lea    0x1(%rdx),%rdi
lea    0x2(%rdx),%rax
cmpb   $0x2d,0x1(%rdx)
cmove  %rax,%rdi
lea    0xcc0(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1381 <main+0x1a1>
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
mov    (%r14,%r12,8),%rdx
lea    0xce4(%rip),%rsi
jmp    1375 <main+0x195>
test   %r15,%r15
je     130b <main+0x12b>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
lea    0xce1(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
add    $0x1,%ebx
jmp    1310 <main+0x130>
lea    0x1(%r12),%r13d
mov    0x8(%r14,%r12,8),%rdi
call   10f0 <atoi@plt>
lea    -0x200(%rax),%ecx
cmp    $0xfe00,%ecx
mov    %rax,0x10(%rsp)
ja     13e3 <main+0x203>
mov    %eax,%edx
shr    %edx
and    $0x55555555,%edx
mov    %eax,%ecx
sub    %edx,%ecx
mov    %ecx,%edx
and    $0x33333333,%edx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shr    $0x4,%edx
add    %ecx,%edx
and    $0xf0f0f0f,%edx
imul   $0x1010101,%edx,%ecx
shr    $0x18,%ecx
cmp    $0x2,%ecx
jb     1310 <main+0x130>
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
lea    0xc16(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    137c <main+0x19c>
test   %r15,%r15
mov    0x10(%rsp),%r12
jne    1423 <main+0x243>
mov    0x2bcb(%rip),%rax
mov    (%rax),%edi
lea    0xc6c(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   10b0 <fprintf@plt>
add    $0x1,%ebx
test   %ebx,%ebx
jne    18b3 <main+0x6d3>
lea    0xc8d(%rip),%rsi
mov    %r15,%rdi
call   10e0 <fopen@plt>
test   %rax,%rax
je     18c8 <main+0x6e8>
mov    %rax,%rbp
mov    0x2b9b(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10d0 <fseek@plt>
mov    %rbp,%rdi
call   10c0 <ftell@plt>
mov    %rax,%r14
mov    %rbp,%rdi
call   1070 <rewind@plt>
cmp    $0x63,%r14
jle    18ec <main+0x70c>
lea    0x130(%rsp),%rdi
mov    $0x64,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    18fe <main+0x71e>
mov    %rbp,%rdi
call   1070 <rewind@plt>
test   %r12d,%r12d
jne    150c <main+0x32c>
movzwl 0x140(%rsp),%eax
shl    $0x10,%eax
bswap  %eax
cmp    $0x1,%eax
mov    $0x10000,%r12d
cmovne %eax,%r12d
cmp    $0x200,%r12d
jb     191f <main+0x73f>
mov    %r12d,%eax
shr    %eax
and    $0x5555,%eax
mov    %r12d,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
cmp    $0x2,%eax
jae    191f <main+0x73f>
xor    %eax,%eax
mov    %r15,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
movzbl -0x1(%r15,%rax,1),%edx
test   %dl,%dl
je     1542 <main+0x362>
cmp    $0x2f,%dl
jne    1520 <main+0x340>
lea    (%r15,%rax,1),%rdx
cmpb   $0x0,(%r15,%rax,1)
cmovne %rdx,%rcx
jmp    1520 <main+0x340>
lea    0xbfc(%rip),%rdi
mov    %r14d,%esi
mov    %r12,0x10(%rsp)
mov    %r12d,%edx
mov    %rcx,0x20(%rsp)
xor    %eax,%eax
call   1060 <printf@plt>
test   %r14,%r14
jle    1884 <main+0x6a4>
lea    0xc44(%rip),%r15
mov    0x2a59(%rip),%r13
xor    %r12d,%r12d
movl   $0x0,0x1c(%rsp)
mov    %rbp,0x28(%rsp)
jmp    17f0 <main+0x610>
nopl   0x0(%rax)
lea    0xc15(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl (%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x1(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x2(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x3(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x4(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x5(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x6(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x7(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x8(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0x9(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xa(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xb(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xc(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xd(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xe(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl 0xf(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb23(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl (%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x1(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x2(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x3(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x4(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x5(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x6(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x7(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x8(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0x9(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xa(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xb(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xc(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xd(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xe(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
movzbl 0xf(%rsp),%eax
movsbl 0x30(%rsp,%rax,1),%edi
mov    0x0(%r13),%esi
call   1090 <fputc@plt>
mov    0x0(%r13),%esi
mov    $0xa,%edi
call   1090 <fputc@plt>
mov    %rbp,%r14
mov    0x28(%rsp),%rbp
add    $0x10,%r12
cmp    %r12,%r14
jle    1884 <main+0x6a4>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %rbp,%rcx
call   1040 <fread@plt>
cmp    $0x10,%eax
je     183c <main+0x65c>
mov    %eax,%ebx
mov    0x27c5(%rip),%rax
mov    (%rax),%edi
lea    (%r12,%rbx,1),%edx
lea    0x948(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rdi
mov    $0x10,%edx
sub    %ebx,%edx
xor    %esi,%esi
call   1080 <memset@plt>
mov    %rsp,%rdi
call   1030 <allZero@plt>
test   %rax,%rax
jne    17e3 <main+0x603>
mov    %r14,%rbp
mov    %r12d,%eax
cltd
idivl  0x10(%rsp)
mov    %edx,%r14d
lea    0x1(%rax),%ebx
cmp    %ebx,0x1c(%rsp)
je     1590 <main+0x3b0>
imul   0x10(%rsp),%eax
lea    0x927(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,0x1c(%rsp)
jmp    1590 <main+0x3b0>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0x92b(%rip),%rdi
mov    0x20(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x271e(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0x7d6(%rip),%rsi
jmp    18db <main+0x6fb>
mov    0x2709(%rip),%rax
mov    (%rax),%edi
lea    0x7ea(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    0x26e5(%rip),%rax
mov    (%rax),%edi
lea    0x7e3(%rip),%rsi
jmp    190e <main+0x72e>
mov    0x26d3(%rip),%rax
mov    (%rax),%edi
lea    0x7fd(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    0x26b2(%rip),%rax
mov    (%rax),%edi
lea    0x7f5(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"pagesize\00"
@stderr = global i32 0
@.str.1 = [57 x i8] c"Page size must be a power of two between 512 and 65536.\0A\00"
@.str.2 = [20 x i8] c"Unknown option: %s\0A\00"
@.str.3 = [44 x i8] c"Already using a different input file: [%s]\0A\00"
@.str.4 = [26 x i8] c"No input file specified.\0A\00"
@.str.5 = [35 x i8] c"Usage: %s [--pagesize N] FILENAME\0A\00"
@.str.6 = [3 x i8] c"rb\00"
@.str.7 = [29 x i8] c"Cannot open input file [%s]\0A\00"
@SEEK_END = global i32 0
@.str.8 = [44 x i8] c"File too short. Minimum size is 100 bytes.\0A\00"
@.str.9 = [25 x i8] c"Cannot read file header\0A\00"
@.str.10 = [33 x i8] c"Invalid page size in header: %d\0A\00"
@.str.11 = [35 x i8] c"| size %d pagesize %d filename %s\0A\00"
@main.once = internal global i32 1
@.str.12 = [47 x i8] c"Could not read input file starting at byte %d\0A\00"
@.str.13 = [21 x i8] c"| page %d offset %d\0A\00"
@.str.14 = [8 x i8] c"| %5d:\00"
@.str.15 = [6 x i8] c" %02x\00"
@.str.16 = [4 x i8] c" \00"
@stdout = global i32 0
@.str.17 = [10 x i8] c"| end %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%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 [16 x i8]
%17 = alloca [100 x i8]
%18 = alloca [256 x i8]
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %11
store i8* null, i8** %12
store i8* null, i8** %13
store i32 0, i32* %14
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 0
%23 = call i32 @memset(i8* %22, i8 signext 46, i32 256)
store i32 32, i32* %9
br label %24
24: ; preds = %46, %2
%25 = load i32, i32* %9
%26 = icmp sle i32 %25, 126
br i1 %26, label %27, label %49
27: ; preds = %24
%28 = load i32, i32* %9
%29 = icmp ne i32 %28, 123
br i1 %29, label %30, label %45
30: ; preds = %27
%31 = load i32, i32* %9
%32 = icmp ne i32 %31, 125
br i1 %32, label %33, label %45
33: ; preds = %30
%34 = load i32, i32* %9
%35 = icmp ne i32 %34, 34
br i1 %35, label %36, label %45
36: ; preds = %33
%37 = load i32, i32* %9
%38 = icmp ne i32 %37, 92
br i1 %38, label %39, label %45
39: ; preds = %36
%40 = load i32, i32* %9
%41 = trunc i32 %40 to i8
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 %43
store i8 %41, i8* %44
br label %45
45: ; preds = %39, %36, %33, %30, %27
br label %46
46: ; preds = %45
%47 = load i32, i32* %9
%48 = add nsw i32 %47, 1
store i32 %48, i32* %9
br label %24
49: ; preds = %24
store i32 1, i32* %9
br label %50
50: ; preds = %141, %49
%51 = load i32, i32* %9
%52 = load i32, i32* %4
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %144
54: ; preds = %50
%55 = load i8**, i8*** %5
%56 = load i32, i32* %9
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %55, i64 %57
%59 = load i8*, i8** %58
%60 = getelementptr inbounds i8, i8* %59, i64 0
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 45
br i1 %63, label %64, label %120
64: ; preds = %54
%65 = load i8**, i8*** %5
%66 = load i32, i32* %9
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
store i8* %69, i8** %19
%70 = load i8*, i8** %19
%71 = getelementptr inbounds i8, i8* %70, i32 1
store i8* %71, i8** %19
%72 = load i8*, i8** %19
%73 = getelementptr inbounds i8, i8* %72, i64 0
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 45
br i1 %76, label %77, label %80
77: ; preds = %64
%78 = load i8*, i8** %19
%79 = getelementptr inbounds i8, i8* %78, i32 1
store i8* %79, i8** %19
br label %80
80: ; preds = %77, %64
%81 = load i8*, i8** %19
%82 = call i64 @strcmp(i8* %81, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %110
84: ; preds = %80
%85 = load i32, i32* %9
%86 = add nsw i32 %85, 1
store i32 %86, i32* %9
%87 = load i8**, i8*** %5
%88 = load i32, i32* %9
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8*, i8** %87, i64 %89
%91 = load i8*, i8** %90
%92 = call i32 @atoi(i8* %91)
store i32 %92, i32* %6
%93 = load i32, i32* %6
%94 = icmp slt i32 %93, 512
br i1 %94, label %104, label %95
95: ; preds = %84
%96 = load i32, i32* %6
%97 = icmp sgt i32 %96, 65536
br i1 %97, label %104, label %98
98: ; preds = %95
%99 = load i32, i32* %6
%100 = load i32, i32* %6
%101 = sub nsw i32 %100, 1
%102 = and i32 %99, %101
%103 = icmp ne i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %98, %95, %84
%105 = load i32, i32* @stderr
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%107 = load i32, i32* %11
%108 = add nsw i32 %107, 1
store i32 %108, i32* %11
br label %109
109: ; preds = %104, %98
br label %141
110: ; preds = %80
%111 = load i32, i32* @stderr
%112 = load i8**, i8*** %5
%113 = load i32, i32* %9
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8*, i8** %112, i64 %114
%116 = load i8*, i8** %115
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %116)
%118 = load i32, i32* %11
%119 = add nsw i32 %118, 1
store i32 %119, i32* %11
br label %140
120: ; preds = %54
%121 = load i8*, i8** %12
%122 = icmp ne i8* %121, null
br i1 %122, label %123, label %133
123: ; preds = %120
%124 = load i32, i32* @stderr
%125 = load i8**, i8*** %5
%126 = load i32, i32* %9
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8*, i8** %125, i64 %127
%129 = load i8*, i8** %128
%130 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* %129)
%131 = load i32, i32* %11
%132 = add nsw i32 %131, 1
store i32 %132, i32* %11
br label %139
133: ; preds = %120
%134 = load i8**, i8*** %5
%135 = load i32, i32* %9
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8*, i8** %134, i64 %136
%138 = load i8*, i8** %137
store i8* %138, i8** %12
br label %139
139: ; preds = %133, %123
br label %140
140: ; preds = %139, %110
br label %141
141: ; preds = %140, %109
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
store i32 %143, i32* %9
br label %50
144: ; preds = %50
%145 = load i8*, i8** %12
%146 = icmp eq i8* %145, null
br i1 %146, label %147, label %152
147: ; preds = %144
%148 = load i32, i32* @stderr
%149 = call i32 (i32, i8*, ...) @fprintf(i32 %148, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%150 = load i32, i32* %11
%151 = add nsw i32 %150, 1
store i32 %151, i32* %11
br label %152
152: ; preds = %147, %144
%153 = load i32, i32* %11
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %162
155: ; preds = %152
%156 = load i32, i32* @stderr
%157 = load i8**, i8*** %5
%158 = getelementptr inbounds i8*, i8** %157, i64 0
%159 = load i8*, i8** %158
%160 = call i32 (i32, i8*, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %159)
%161 = call i32 @exit(i32 1)
unreachable
162: ; preds = %152
%163 = load i8*, i8** %12
%164 = call i32* @fopen(i8* %163, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32* %164, i32** %8
%165 = load i32*, i32** %8
%166 = icmp eq i32* %165, null
br i1 %166, label %167, label %172
167: ; preds = %162
%168 = load i32, i32* @stderr
%169 = load i8*, i8** %12
%170 = call i32 (i32, i8*, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i8* %169)
%171 = call i32 @exit(i32 1)
unreachable
172: ; preds = %162
%173 = load i32*, i32** %8
%174 = load i32, i32* @SEEK_END
%175 = call i32 @fseek(i32* %173, i32 0, i32 %174)
%176 = load i32*, i32** %8
%177 = call i64 @ftell(i32* %176)
store i64 %177, i64* %7
%178 = load i32*, i32** %8
%179 = call i32 @rewind(i32* %178)
%180 = load i64, i64* %7
%181 = icmp slt i64 %180, 100
br i1 %181, label %182, label %186
182: ; preds = %172
%183 = load i32, i32* @stderr
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%185 = call i32 @exit(i32 1)
unreachable
186: ; preds = %172
%187 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%188 = load i32*, i32** %8
%189 = call i32 @fread(i8* %187, i32 100, i32 1, i32* %188)
%190 = icmp ne i32 %189, 1
br i1 %190, label %191, label %195
191: ; preds = %186
%192 = load i32, i32* @stderr
%193 = call i32 (i32, i8*, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%194 = call i32 @exit(i32 1)
unreachable
195: ; preds = %186
%196 = load i32*, i32** %8
%197 = call i32 @rewind(i32* %196)
%198 = load i32, i32* %6
%199 = icmp eq i32 %198, 0
br i1 %199, label %200, label %227
200: ; preds = %195
%201 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 16
%202 = load i8, i8* %201
%203 = zext i8 %202 to i32
%204 = shl i32 %203, 8
%205 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 17
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = or i32 %204, %207
store i32 %208, i32* %6
%209 = load i32, i32* %6
%210 = icmp eq i32 %209, 1
br i1 %210, label %211, label %212
211: ; preds = %200
store i32 65536, i32* %6
br label %212
212: ; preds = %211, %200
%213 = load i32, i32* %6
%214 = icmp slt i32 %213, 512
br i1 %214, label %221, label %215
215: ; preds = %212
%216 = load i32, i32* %6
%217 = load i32, i32* %6
%218 = sub nsw i32 %217, 1
%219 = and i32 %216, %218
%220 = icmp ne i32 %219, 0
br i1 %220, label %221, label %226
221: ; preds = %215, %212
%222 = load i32, i32* @stderr
%223 = load i32, i32* %6
%224 = call i32 (i32, i8*, ...) @fprintf(i32 %222, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %223)
%225 = call i32 @exit(i32 1)
unreachable
226: ; preds = %215
br label %227
227: ; preds = %226, %195
%228 = load i8*, i8** %12
store i8* %228, i8** %13
store i32 0, i32* %9
br label %229
229: ; preds = %260, %227
%230 = load i8*, i8** %12
%231 = load i32, i32* %9
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds i8, i8* %230, i64 %232
%234 = load i8, i8* %233
%235 = icmp ne i8 %234, 0
br i1 %235, label %236, label %263
236: ; preds = %229
%237 = load i8*, i8** %12
%238 = load i32, i32* %9
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i8, i8* %237, i64 %239
%241 = load i8, i8* %240
%242 = sext i8 %241 to i32
%243 = icmp eq i32 %242, 47
br i1 %243, label %244, label %259
244: ; preds = %236
%245 = load i8*, i8** %12
%246 = load i32, i32* %9
%247 = add nsw i32 %246, 1
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i8, i8* %245, i64 %248
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
%252 = icmp ne i32 %251, 0
br i1 %252, label %253, label %259
253: ; preds = %244
%254 = load i8*, i8** %12
%255 = load i32, i32* %9
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i8, i8* %254, i64 %256
%258 = getelementptr inbounds i8, i8* %257, i64 1
store i8* %258, i8** %13
br label %259
259: ; preds = %253, %244, %236
br label %260
260: ; preds = %259
%261 = load i32, i32* %9
%262 = add nsw i32 %261, 1
store i32 %262, i32* %9
br label %229
263: ; preds = %229
%264 = load i64, i64* %7
%265 = trunc i64 %264 to i32
%266 = load i32, i32* %6
%267 = load i8*, i8** %13
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %265, i32 %266, i8* %267)
store i32 0, i32* %9
br label %269
269: ; preds = %361, %263
%270 = load i32, i32* %9
%271 = sext i32 %270 to i64
%272 = load i64, i64* %7
%273 = icmp slt i64 %271, %272
br i1 %273, label %274, label %364
274: ; preds = %269
%275 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 0
%276 = load i32*, i32** %8
%277 = call i32 @fread(i8* %275, i32 1, i32 16, i32* %276)
store i32 %277, i32* %20
%278 = load i32, i32* %20
%279 = icmp ne i32 %278, 16
br i1 %279, label %280, label %297
280: ; preds = %274
%281 = load i32, i32* @main.once
%282 = icmp ne i32 %281, 0
br i1 %282, label %283, label %289
283: ; preds = %280
%284 = load i32, i32* @stderr
%285 = load i32, i32* %9
%286 = load i32, i32* %20
%287 = add nsw i32 %285, %286
%288 = call i32 (i32, i8*, ...) @fprintf(i32 %284, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0), i32 %287)
br label %289
289: ; preds = %283, %280
%290 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 0
%291 = load i32, i32* %20
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds i8, i8* %290, i64 %292
%294 = load i32, i32* %20
%295 = sub nsw i32 16, %294
%296 = call i32 @memset(i8* %293, i8 signext 0, i32 %295)
br label %297
297: ; preds = %289, %274
%298 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 0
%299 = call i64 @allZero(i8* %298)
%300 = icmp ne i64 %299, 0
br i1 %300, label %301, label %302
301: ; preds = %297
br label %361
302: ; preds = %297
%303 = load i32, i32* %9
%304 = load i32, i32* %6
%305 = sdiv i32 %303, %304
%306 = add nsw i32 %305, 1
store i32 %306, i32* %15
%307 = load i32, i32* %14
%308 = load i32, i32* %15
%309 = icmp ne i32 %307, %308
br i1 %309, label %310, label %318
310: ; preds = %302
%311 = load i32, i32* %15
%312 = load i32, i32* %15
%313 = sub nsw i32 %312, 1
%314 = load i32, i32* %6
%315 = mul nsw i32 %313, %314
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %311, i32 %315)
%317 = load i32, i32* %15
store i32 %317, i32* %14
br label %318
318: ; preds = %310, %302
%319 = load i32, i32* %9
%320 = load i32, i32* %15
%321 = sub nsw i32 %320, 1
%322 = load i32, i32* %6
%323 = mul nsw i32 %321, %322
%324 = sub nsw i32 %319, %323
%325 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i32 %324)
store i32 0, i32* %10
br label %326
326: ; preds = %336, %318
%327 = load i32, i32* %10
%328 = icmp slt i32 %327, 16
br i1 %328, label %329, label %339
329: ; preds = %326
%330 = load i32, i32* %10
%331 = sext i32 %330 to i64
%332 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 %331
%333 = load i8, i8* %332
%334 = zext i8 %333 to i32
%335 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %334)
br label %336
336: ; preds = %329
%337 = load i32, i32* %10
%338 = add nsw i32 %337, 1
store i32 %338, i32* %10
br label %326
339: ; preds = %326
%340 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
store i32 0, i32* %10
br label %341
341: ; preds = %355, %339
%342 = load i32, i32* %10
%343 = icmp slt i32 %342, 16
br i1 %343, label %344, label %358
344: ; preds = %341
%345 = load i32, i32* %10
%346 = sext i32 %345 to i64
%347 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 %346
%348 = load i8, i8* %347
store i8 %348, i8* %21
%349 = load i8, i8* %21
%350 = zext i8 %349 to i64
%351 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 %350
%352 = load i8, i8* %351
%353 = load i32, i32* @stdout
%354 = call i32 @fputc(i8 signext %352, i32 %353)
br label %355
355: ; preds = %344
%356 = load i32, i32* %10
%357 = add nsw i32 %356, 1
store i32 %357, i32* %10
br label %341
358: ; preds = %341
%359 = load i32, i32* @stdout
%360 = call i32 @fputc(i8 signext 10, i32 %359)
br label %361
361: ; preds = %358, %301
%362 = load i32, i32* %9
%363 = add nsw i32 %362, 16
store i32 %363, i32* %9
br label %269
364: ; preds = %269
%365 = load i32*, i32** %8
%366 = call i32 @fclose(i32* %365)
%367 = load i8*, i8** %13
%368 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %367)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"pagesize\00"
@stderr = global i32 0
@.str.1 = [57 x i8] c"Page size must be a power of two between 512 and 65536.\0A\00"
@.str.2 = [20 x i8] c"Unknown option: %s\0A\00"
@.str.3 = [44 x i8] c"Already using a different input file: [%s]\0A\00"
@.str.4 = [26 x i8] c"No input file specified.\0A\00"
@.str.5 = [35 x i8] c"Usage: %s [--pagesize N] FILENAME\0A\00"
@.str.6 = [3 x i8] c"rb\00"
@.str.7 = [29 x i8] c"Cannot open input file [%s]\0A\00"
@SEEK_END = global i32 0
@.str.8 = [44 x i8] c"File too short. Minimum size is 100 bytes.\0A\00"
@.str.9 = [25 x i8] c"Cannot read file header\0A\00"
@.str.10 = [33 x i8] c"Invalid page size in header: %d\0A\00"
@.str.11 = [35 x i8] c"| size %d pagesize %d filename %s\0A\00"
@.str.12 = [47 x i8] c"Could not read input file starting at byte %d\0A\00"
@.str.13 = [21 x i8] c"| page %d offset %d\0A\00"
@.str.14 = [8 x i8] c"| %5d:\00"
@.str.15 = [6 x i8] c" %02x\00"
@.str.16 = [4 x i8] c" \00"
@stdout = global i32 0
@.str.17 = [10 x i8] c"| end %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = alloca [100 x i8]
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i8 signext 46, i32 256)
br label %12
10: ; preds = %42
%11 = icmp sgt i32 %0, 1
br i1 %11, label %45, label %98
12: ; preds = %42, %2
%13 = phi i64 [ 32, %2 ], [ %43, %42 ]
%14 = trunc i64 %13 to i32
switch i32 %14, label %15 [
i32 125, label %18
i32 123, label %18
i32 92, label %18
i32 34, label %18
]
15: ; preds = %12
%16 = trunc i64 %13 to i8
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %13
store i8 %16, i8* %17
br label %18
18: ; preds = %12, %12, %12, %12, %15
%19 = add nuw nsw i64 %13, 1
%20 = trunc i64 %19 to i32
switch i32 %20, label %21 [
i32 125, label %24
i32 123, label %24
i32 92, label %24
i32 34, label %24
]
21: ; preds = %18
%22 = trunc i64 %19 to i8
%23 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %19
store i8 %22, i8* %23
br label %24
24: ; preds = %21, %18, %18, %18, %18
%25 = add nuw nsw i64 %13, 2
%26 = trunc i64 %25 to i32
switch i32 %26, label %27 [
i32 125, label %30
i32 123, label %30
i32 92, label %30
i32 34, label %30
]
27: ; preds = %24
%28 = trunc i64 %25 to i8
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %25
store i8 %28, i8* %29
br label %30
30: ; preds = %27, %24, %24, %24, %24
%31 = add nuw nsw i64 %13, 3
%32 = trunc i64 %31 to i32
switch i32 %32, label %33 [
i32 125, label %36
i32 123, label %36
i32 92, label %36
i32 34, label %36
]
33: ; preds = %30
%34 = trunc i64 %31 to i8
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %31
store i8 %34, i8* %35
br label %36
36: ; preds = %33, %30, %30, %30, %30
%37 = add nuw nsw i64 %13, 4
%38 = trunc i64 %37 to i32
switch i32 %38, label %39 [
i32 125, label %42
i32 123, label %42
i32 92, label %42
i32 34, label %42
]
39: ; preds = %36
%40 = trunc i64 %37 to i8
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %37
store i8 %40, i8* %41
br label %42
42: ; preds = %39, %36, %36, %36, %36
%43 = add nuw nsw i64 %13, 5
%44 = icmp eq i64 %43, 127
br i1 %44, label %10, label %12
45: ; preds = %10, %89
%46 = phi i32 [ %93, %89 ], [ 0, %10 ]
%47 = phi i32 [ %94, %89 ], [ 1, %10 ]
%48 = phi i8* [ %91, %89 ], [ null, %10 ]
%49 = phi i32 [ %90, %89 ], [ 0, %10 ]
%50 = sext i32 %47 to i64
%51 = getelementptr inbounds i8*, i8** %1, i64 %50
%52 = load i8*, i8** %51
%53 = load i8, i8* %52
%54 = icmp eq i8 %53, 45
br i1 %54, label %55, label %83
55: ; preds = %45
%56 = getelementptr inbounds i8, i8* %52, i64 1
%57 = load i8, i8* %56
%58 = icmp eq i8 %57, 45
%59 = getelementptr inbounds i8, i8* %52, i64 2
%60 = select i1 %58, i8* %59, i8* %56
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %55
%64 = add nsw i32 %47, 1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %1, i64 %65
%67 = load i8*, i8** %66
%68 = call i32 @atoi(i8* %67)
%69 = add i32 %68, -512
%70 = icmp ult i32 %69, 65025
%71 = call i32 @llvm.ctpop.i32(i32 %68)
%72 = icmp ult i32 %71, 2
%73 = and i1 %70, %72
br i1 %73, label %89, label %74
74: ; preds = %63
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%77 = add nsw i32 %49, 1
br label %89
78: ; preds = %55
%79 = load i32, i32* @stderr
%80 = load i8*, i8** %51
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %80)
%82 = add nsw i32 %49, 1
br label %89
83: ; preds = %45
%84 = icmp eq i8* %48, null
br i1 %84, label %89, label %85
85: ; preds = %83
%86 = load i32, i32* @stderr
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* %52)
%88 = add nsw i32 %49, 1
br label %89
89: ; preds = %83, %78, %63, %74, %85
%90 = phi i32 [ %88, %85 ], [ %82, %78 ], [ %77, %74 ], [ %49, %63 ], [ %49, %83 ]
%91 = phi i8* [ %48, %85 ], [ %48, %78 ], [ %48, %74 ], [ %48, %63 ], [ %52, %83 ]
%92 = phi i32 [ %47, %85 ], [ %47, %78 ], [ %64, %74 ], [ %64, %63 ], [ %47, %83 ]
%93 = phi i32 [ %46, %85 ], [ %46, %78 ], [ %68, %74 ], [ %68, %63 ], [ %46, %83 ]
%94 = add nsw i32 %92, 1
%95 = icmp slt i32 %94, %0
br i1 %95, label %45, label %96
96: ; preds = %89
%97 = icmp eq i8* %91, null
br i1 %97, label %98, label %104
98: ; preds = %10, %96
%99 = phi i32 [ %93, %96 ], [ 0, %10 ]
%100 = phi i32 [ %90, %96 ], [ 0, %10 ]
%101 = load i32, i32* @stderr
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%103 = add nsw i32 %100, 1
br label %104
104: ; preds = %98, %96
%105 = phi i32 [ %99, %98 ], [ %93, %96 ]
%106 = phi i8* [ null, %98 ], [ %91, %96 ]
%107 = phi i32 [ %103, %98 ], [ %90, %96 ]
%108 = icmp eq i32 %107, 0
br i1 %108, label %114, label %109
109: ; preds = %104
%110 = load i32, i32* @stderr
%111 = load i8*, i8** %1
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %111)
%113 = call i32 @exit(i32 1)
unreachable
114: ; preds = %104
%115 = call i32* @fopen(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%116 = icmp eq i32* %115, null
br i1 %116, label %117, label %121
117: ; preds = %114
%118 = load i32, i32* @stderr
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i8* %106)
%120 = call i32 @exit(i32 1)
unreachable
121: ; preds = %114
%122 = load i32, i32* @SEEK_END
%123 = call i32 @fseek(i32* %115, i32 0, i32 %122)
%124 = call i64 @ftell(i32* %115)
%125 = call i32 @rewind(i32* %115)
%126 = icmp slt i64 %124, 100
br i1 %126, label %127, label %131
127: ; preds = %121
%128 = load i32, i32* @stderr
%129 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%130 = call i32 @exit(i32 1)
unreachable
131: ; preds = %121
%132 = call i32 @fread(i8* %7, i32 100, i32 1, i32* %115)
%133 = icmp eq i32 %132, 1
br i1 %133, label %138, label %134
134: ; preds = %131
%135 = load i32, i32* @stderr
%136 = call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%137 = call i32 @exit(i32 1)
unreachable
138: ; preds = %131
%139 = call i32 @rewind(i32* %115)
%140 = icmp eq i32 %105, 0
br i1 %140, label %141, label %160
141: ; preds = %138
%142 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 16
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = shl nuw nsw i32 %144, 8
%146 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 17
%147 = load i8, i8* %146
%148 = zext i8 %147 to i32
%149 = or i32 %145, %148
%150 = icmp eq i32 %149, 1
%151 = select i1 %150, i32 65536, i32 %149
%152 = icmp ugt i32 %151, 511
%153 = call i32 @llvm.ctpop.i32(i32 %151)
%154 = icmp ult i32 %153, 2
%155 = and i1 %152, %154
br i1 %155, label %160, label %156
156: ; preds = %141
%157 = load i32, i32* @stderr
%158 = call i32 (i32, i8*, ...) @fprintf(i32 %157, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %151)
%159 = call i32 @exit(i32 1)
unreachable
160: ; preds = %141, %138
%161 = phi i32 [ %105, %138 ], [ %151, %141 ]
br label %162
162: ; preds = %171, %160
%163 = phi i64 [ %173, %171 ], [ 0, %160 ]
%164 = phi i8* [ %178, %171 ], [ %106, %160 ]
br label %165
165: ; preds = %162, %169
%166 = phi i64 [ %170, %169 ], [ %163, %162 ]
%167 = getelementptr inbounds i8, i8* %106, i64 %166
%168 = load i8, i8* %167
switch i8 %168, label %169 [
i8 0, label %179
i8 47, label %171
]
169: ; preds = %165
%170 = add nuw i64 %166, 1
br label %165
171: ; preds = %165
%172 = getelementptr inbounds i8, i8* %106, i64 %166
%173 = add nuw i64 %166, 1
%174 = getelementptr inbounds i8, i8* %106, i64 %173
%175 = load i8, i8* %174
%176 = icmp eq i8 %175, 0
%177 = getelementptr inbounds i8, i8* %172, i64 1
%178 = select i1 %176, i8* %164, i8* %177
br label %162
179: ; preds = %165
%180 = trunc i64 %124 to i32
%181 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %180, i32 %161, i8* %164)
%182 = icmp sgt i64 %124, 0
br i1 %182, label %183, label %379
183: ; preds = %179
%184 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
%185 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 2
%186 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 3
%187 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 4
%188 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 5
%189 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 6
%190 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 7
%191 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 8
%192 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 9
%193 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 10
%194 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 11
%195 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 12
%196 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 13
%197 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 14
%198 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 15
br label %199
199: ; preds = %183, %375
%200 = phi i64 [ 0, %183 ], [ %377, %375 ]
%201 = phi i32 [ 0, %183 ], [ %376, %375 ]
%202 = call i32 @fread(i8* %6, i32 1, i32 16, i32* %115)
%203 = icmp eq i32 %202, 16
br i1 %203, label %213, label %204
204: ; preds = %199
%205 = load i32, i32* @stderr
%206 = trunc i64 %200 to i32
%207 = add nsw i32 %202, %206
%208 = call i32 (i32, i8*, ...) @fprintf(i32 %205, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0), i32 %207)
%209 = sext i32 %202 to i64
%210 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %209
%211 = sub nsw i32 16, %202
%212 = call i32 @memset(i8* %210, i8 signext 0, i32 %211)
br label %213
213: ; preds = %204, %199
%214 = call i64 @allZero(i8* %6)
%215 = icmp eq i64 %214, 0
br i1 %215, label %216, label %375
216: ; preds = %213
%217 = trunc i64 %200 to i32
%218 = sdiv i32 %217, %161
%219 = srem i32 %217, %161
%220 = add nsw i32 %218, 1
%221 = icmp eq i32 %201, %220
%222 = mul nsw i32 %218, %161
br i1 %221, label %225, label %223
223: ; preds = %216
%224 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i32 %220, i32 %222)
br label %225
225: ; preds = %216, %223
%226 = phi i32 [ %220, %223 ], [ %201, %216 ]
%227 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i32 %219)
%228 = load i8, i8* %6
%229 = zext i8 %228 to i32
%230 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %229)
%231 = load i8, i8* %184
%232 = zext i8 %231 to i32
%233 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %232)
%234 = load i8, i8* %185
%235 = zext i8 %234 to i32
%236 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %235)
%237 = load i8, i8* %186
%238 = zext i8 %237 to i32
%239 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %238)
%240 = load i8, i8* %187
%241 = zext i8 %240 to i32
%242 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %241)
%243 = load i8, i8* %188
%244 = zext i8 %243 to i32
%245 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %244)
%246 = load i8, i8* %189
%247 = zext i8 %246 to i32
%248 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %247)
%249 = load i8, i8* %190
%250 = zext i8 %249 to i32
%251 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %250)
%252 = load i8, i8* %191
%253 = zext i8 %252 to i32
%254 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %253)
%255 = load i8, i8* %192
%256 = zext i8 %255 to i32
%257 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %256)
%258 = load i8, i8* %193
%259 = zext i8 %258 to i32
%260 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %259)
%261 = load i8, i8* %194
%262 = zext i8 %261 to i32
%263 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %262)
%264 = load i8, i8* %195
%265 = zext i8 %264 to i32
%266 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %265)
%267 = load i8, i8* %196
%268 = zext i8 %267 to i32
%269 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %268)
%270 = load i8, i8* %197
%271 = zext i8 %270 to i32
%272 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %271)
%273 = load i8, i8* %198
%274 = zext i8 %273 to i32
%275 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 %274)
%276 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%277 = load i8, i8* %6
%278 = zext i8 %277 to i64
%279 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %278
%280 = load i8, i8* %279
%281 = load i32, i32* @stdout
%282 = call i32 @fputc(i8 signext %280, i32 %281)
%283 = load i8, i8* %184
%284 = zext i8 %283 to i64
%285 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %284
%286 = load i8, i8* %285
%287 = load i32, i32* @stdout
%288 = call i32 @fputc(i8 signext %286, i32 %287)
%289 = load i8, i8* %185
%290 = zext i8 %289 to i64
%291 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %290
%292 = load i8, i8* %291
%293 = load i32, i32* @stdout
%294 = call i32 @fputc(i8 signext %292, i32 %293)
%295 = load i8, i8* %186
%296 = zext i8 %295 to i64
%297 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %296
%298 = load i8, i8* %297
%299 = load i32, i32* @stdout
%300 = call i32 @fputc(i8 signext %298, i32 %299)
%301 = load i8, i8* %187
%302 = zext i8 %301 to i64
%303 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %302
%304 = load i8, i8* %303
%305 = load i32, i32* @stdout
%306 = call i32 @fputc(i8 signext %304, i32 %305)
%307 = load i8, i8* %188
%308 = zext i8 %307 to i64
%309 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %308
%310 = load i8, i8* %309
%311 = load i32, i32* @stdout
%312 = call i32 @fputc(i8 signext %310, i32 %311)
%313 = load i8, i8* %189
%314 = zext i8 %313 to i64
%315 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %314
%316 = load i8, i8* %315
%317 = load i32, i32* @stdout
%318 = call i32 @fputc(i8 signext %316, i32 %317)
%319 = load i8, i8* %190
%320 = zext i8 %319 to i64
%321 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %320
%322 = load i8, i8* %321
%323 = load i32, i32* @stdout
%324 = call i32 @fputc(i8 signext %322, i32 %323)
%325 = load i8, i8* %191
%326 = zext i8 %325 to i64
%327 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %326
%328 = load i8, i8* %327
%329 = load i32, i32* @stdout
%330 = call i32 @fputc(i8 signext %328, i32 %329)
%331 = load i8, i8* %192
%332 = zext i8 %331 to i64
%333 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %332
%334 = load i8, i8* %333
%335 = load i32, i32* @stdout
%336 = call i32 @fputc(i8 signext %334, i32 %335)
%337 = load i8, i8* %193
%338 = zext i8 %337 to i64
%339 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %338
%340 = load i8, i8* %339
%341 = load i32, i32* @stdout
%342 = call i32 @fputc(i8 signext %340, i32 %341)
%343 = load i8, i8* %194
%344 = zext i8 %343 to i64
%345 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %344
%346 = load i8, i8* %345
%347 = load i32, i32* @stdout
%348 = call i32 @fputc(i8 signext %346, i32 %347)
%349 = load i8, i8* %195
%350 = zext i8 %349 to i64
%351 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %350
%352 = load i8, i8* %351
%353 = load i32, i32* @stdout
%354 = call i32 @fputc(i8 signext %352, i32 %353)
%355 = load i8, i8* %196
%356 = zext i8 %355 to i64
%357 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %356
%358 = load i8, i8* %357
%359 = load i32, i32* @stdout
%360 = call i32 @fputc(i8 signext %358, i32 %359)
%361 = load i8, i8* %197
%362 = zext i8 %361 to i64
%363 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %362
%364 = load i8, i8* %363
%365 = load i32, i32* @stdout
%366 = call i32 @fputc(i8 signext %364, i32 %365)
%367 = load i8, i8* %198
%368 = zext i8 %367 to i64
%369 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 %368
%370 = load i8, i8* %369
%371 = load i32, i32* @stdout
%372 = call i32 @fputc(i8 signext %370, i32 %371)
%373 = load i32, i32* @stdout
%374 = call i32 @fputc(i8 signext 10, i32 %373)
br label %375
375: ; preds = %213, %225
%376 = phi i32 [ %226, %225 ], [ %201, %213 ]
%377 = add nuw i64 %200, 16
%378 = icmp sgt i64 %124, %377
br i1 %378, label %199, label %379
379: ; preds = %375, %179
%380 = call i32 @fclose(i32* %115)
%381 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %164)
ret i32 0
}