#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct stat {
  int st_size;
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
void *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ PROT_NONE;
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
unsigned char *calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ exiterr(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fstat(int, struct stat *);
int getpagesize();
int mincore(void *, int, unsigned char *);
void *mmap(int /*<<< orphan*/ *, int, int /*<<< orphan*/, int /*<<< orphan*/,
           int, int /*<<< orphan*/);
int /*<<< orphan*/ munmap(void *, double);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int i, j;
  int pages;
  int PAGESIZE;
  int quiet = 0;
  int verbose = 0;
  int fd;
  struct stat st;
  void *file = NULL;
  unsigned char *pageinfo = NULL;
  PAGESIZE = getpagesize();
  if (argc > 1) {
    if (!strcmp("-v", argv[1]))
      verbose = 1;
    else if (!strcmp("-q", argv[1]))
      quiet = 1;
  } else {
    fprintf(stderr,
            "usage: %s [-qv] <file> "
            "-- print out cache statistics\n",
            argv[0]);
    fprintf(stderr, "\t-v\tprint verbose cache map\n");
    fprintf(stderr, "\t-q\texit code tells if file is fully cached\n");
    exit(1);
  }
  if (quiet || verbose)
    argv++;
  fd = open(argv[1], O_RDONLY);
  if (fd == -1)
    exiterr("open");
  if (fstat(fd, &st) == -1)
    exiterr("fstat");
  if (!S_ISREG(st.st_mode)) {
    fprintf(stderr, "%s: S_ISREG: not a regular file", argv[1]);
    return EXIT_FAILURE;
  }
  if (st.st_size == 0) {
    printf("pages in cache: %d/%d (%.1f%%)  [filesize=%.1fK, "
           "pagesize=%dK]\n",
           0, 0, 0.0, 0.0, PAGESIZE / 1024);
    return EXIT_SUCCESS;
  }
  pages = (st.st_size + PAGESIZE - 1) / PAGESIZE;
  pageinfo = calloc(sizeof(*pageinfo), pages);
  if (!pageinfo)
    exiterr("calloc");
  file = mmap(NULL, st.st_size, PROT_NONE, MAP_SHARED, fd, 0);
  if (file == MAP_FAILED)
    exiterr("mmap");
  if (mincore(file, st.st_size, pageinfo) == -1)
    exiterr("mincore");
  i = j = 0;
  while (i < pages)
    if (pageinfo[i++] & 1)
      j++;
  if (quiet) {
    if (j == i)
      return EXIT_SUCCESS;
    return EXIT_FAILURE;
  }
  printf("pages in cache: %d/%d (%.1f%%)  [filesize=%.1fK, "
         "pagesize=%dK]\n",
         j, i, 100.0 * j / i, 1.0 * st.st_size / 1024, PAGESIZE / 1024);
  if (verbose) {
    printf("\ncache map:\n");
    for (i = 0; i <= (pages - 1) / 32; i++) {
      printf("%6d: |", i * 32);
      for (j = 0; j < 32; j++) {
        if (i * 32 + j == pages)
          break;
        printf("%c|", pageinfo[i * 32 + j] & 1 ? 'x' : ' ');
      }
      printf("\n");
    }
  }
  munmap(file, st.st_size);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
mov    $0x0,%al
call   10d0 <getpagesize@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    126f <main+0x9f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdf1(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1241 <main+0x71>
movl   $0x1,-0x28(%rbp)
jmp    126a <main+0x9a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdcb(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1265 <main+0x95>
movl   $0x1,-0x24(%rbp)
jmp    126a <main+0x9a>
jmp    12c5 <main+0xf5>
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd98(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
lea    0xdb7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
lea    0xdbd(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
cmpl   $0x0,-0x24(%rbp)
jne    12d9 <main+0x109>
cmpl   $0x0,-0x28(%rbp)
je     12e5 <main+0x115>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2ce4(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0xffffffff,-0x2c(%rbp)
jne    1314 <main+0x144>
lea    0xd8f(%rip),%rdi
call   1030 <exiterr@plt>
mov    -0x2c(%rbp),%edi
lea    -0x38(%rbp),%rsi
call   10f0 <fstat@plt>
cmp    $0xffffffff,%eax
jne    1335 <main+0x165>
lea    0xd73(%rip),%rdi
call   1030 <exiterr@plt>
mov    -0x34(%rbp),%edi
call   1090 <S_ISREG@plt>
cmp    $0x0,%eax
jne    1376 <main+0x1a6>
mov    0x2c7b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd4b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2c54(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1636 <main+0x466>
cmpl   $0x0,-0x38(%rbp)
jne    13b6 <main+0x1e6>
mov    -0x20(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    0xd35(%rip),%rdi
xor    %edx,%edx
xorps  %xmm1,%xmm1
mov    %edx,%esi
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x2c0c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1636 <main+0x466>
mov    -0x38(%rbp),%eax
add    -0x20(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0x1,%edi
call   1060 <calloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    13ee <main+0x21e>
lea    0xd20(%rip),%rdi
call   1030 <exiterr@plt>
mov    -0x38(%rbp),%esi
mov    0x2bf8(%rip),%rax
mov    (%rax),%edx
mov    0x2be7(%rip),%rax
mov    (%rax),%ecx
mov    -0x2c(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    0x2b8e(%rip),%rcx
cmp    (%rcx),%rax
jne    1437 <main+0x267>
lea    0xcde(%rip),%rdi
call   1030 <exiterr@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x48(%rbp),%rdx
call   10a0 <mincore@plt>
cmp    $0xffffffff,%eax
jne    145c <main+0x28c>
lea    0xcbe(%rip),%rdi
call   1030 <exiterr@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14a6 <main+0x2d6>
mov    -0x48(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     14a1 <main+0x2d1>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    146a <main+0x29a>
cmpl   $0x0,-0x24(%rbp)
je     14de <main+0x30e>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    14cd <main+0x2fd>
mov    0x2af5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1636 <main+0x466>
mov    0x2aec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1636 <main+0x466>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm1
movsd  0xb1c(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x38(%rbp),%xmm2
movsd  0xafa(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xae6(%rip),%xmm2
divsd  %xmm2,%xmm1
mov    -0x20(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    -0x4c(%rbp),%edx
mov    %eax,%ecx
lea    0xb94(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x28(%rbp)
je     161c <main+0x44c>
lea    0xbd0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cmp    %ecx,%eax
jg     1617 <main+0x447>
mov    -0x14(%rbp),%esi
shl    $0x5,%esi
lea    0xba1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x20,-0x18(%rbp)
jge    15fb <main+0x42b>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    15b8 <main+0x3e8>
jmp    15fb <main+0x42b>
mov    -0x48(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x5,%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%ecx
and    $0x1,%ecx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
lea    0xb4b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1597 <main+0x3c7>
lea    0xb26(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    155b <main+0x38b>
jmp    161c <main+0x44c>
mov    -0x40(%rbp),%rdi
cvtsi2sdl -0x38(%rbp),%xmm0
call   10b0 <munmap@plt>
mov    0x2987(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   10f0 <getpagesize@plt>
cmp    $0x2,%ebp
jl     164c <main+0x45c>
mov    %eax,%r12d
lea    0x8(%rbx),%r14
mov    0x8(%rbx),%rbp
lea    0xdfb(%rip),%rdi
mov    %rbp,%rsi
call   1090 <strcmp@plt>
mov    %eax,%r13d
test   %eax,%eax
je     124b <main+0x5b>
lea    0xde8(%rip),%rdi
mov    %rbp,%rsi
call   1090 <strcmp@plt>
test   %eax,%eax
sete   %r15b
jmp    124e <main+0x5e>
xor    %r15d,%r15d
test   %r15b,%r15b
cmovne %r14,%rbx
test   %r13d,%r13d
cmove  %r14,%rbx
mov    0x8(%rbx),%rdi
mov    0x2d71(%rip),%rax
mov    (%rax),%esi
call   10e0 <open@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    1281 <main+0x91>
lea    0xe2a(%rip),%rdi
call   1030 <exiterr@plt>
lea    0x8(%rsp),%rsi
mov    %ebp,%edi
call   1110 <fstat@plt>
cmp    $0xffffffff,%eax
jne    129e <main+0xae>
lea    0xe12(%rip),%rdi
call   1030 <exiterr@plt>
mov    0xc(%rsp),%edi
call   10b0 <S_ISREG@plt>
test   %eax,%eax
je     1368 <main+0x178>
mov    %r15d,(%rsp)
mov    0x8(%rsp),%r15d
test   %r15d,%r15d
je     138f <main+0x19f>
lea    (%r12,%r15,1),%eax
add    $0xffffffff,%eax
cltd
idiv   %r12d
mov    $0x1,%edi
mov    %rax,%rbx
mov    %eax,%esi
call   1080 <calloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    12ef <main+0xff>
lea    0xe27(%rip),%rdi
call   1030 <exiterr@plt>
mov    0x2cfa(%rip),%rax
mov    (%rax),%edx
mov    0x2ce9(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %r15d,%esi
mov    %ebp,%r8d
xor    %r9d,%r9d
call   1060 <mmap@plt>
mov    %rax,%rbp
mov    0x2c95(%rip),%rax
cmp    (%rax),%rbp
jne    132c <main+0x13c>
lea    0xdf1(%rip),%rdi
call   1030 <exiterr@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14,%rdx
call   10c0 <mincore@plt>
cmp    $0xffffffff,%eax
jne    134b <main+0x15b>
lea    0xdd7(%rip),%rdi
call   1030 <exiterr@plt>
test   %ebx,%ebx
mov    %rbp,0x10(%rsp)
jle    13c0 <main+0x1d0>
mov    %ebx,%eax
cmp    $0x8,%ebx
jae    144f <main+0x25f>
xor    %ecx,%ecx
xor    %esi,%esi
jmp    1560 <main+0x370>
mov    0x2c59(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xd35(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x2c36(%rip),%rax
jmp    158a <main+0x39a>
lea    0x3ff(%r12),%ecx
test   %r12d,%r12d
cmovns %r12d,%ecx
sar    $0xa,%ecx
lea    0xd29(%rip),%rdi
pxor   %xmm0,%xmm0
xorpd  %xmm1,%xmm1
xor    %esi,%esi
xor    %edx,%edx
mov    $0x2,%al
call   1070 <printf@plt>
jmp    1583 <main+0x393>
xor    %esi,%esi
xor    %edx,%edx
cmpb   $0x0,(%rsp)
jne    157f <main+0x38f>
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
mulsd  0xc33(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %r15d,%xmm2
divsd  %xmm1,%xmm0
movsd  0xc20(%rip),%xmm1
movsd  %xmm2,(%rsp)
mulsd  %xmm2,%xmm1
lea    0x3ff(%r12),%ecx
test   %r12d,%r12d
cmovns %r12d,%ecx
sar    $0xa,%ecx
lea    0xcb7(%rip),%rdi
mov    $0x2,%al
call   1070 <printf@plt>
test   %r13d,%r13d
jne    143b <main+0x24b>
lea    0xd03(%rip),%rdi
call   1050 <puts@plt>
cmp    $0xffffffe2,%ebx
jge    15bc <main+0x3cc>
mov    0x10(%rsp),%rdi
movq   (%rsp),%xmm0
call   10d0 <munmap@plt>
jmp    1583 <main+0x393>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     15a4 <main+0x3b4>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
pxor   %xmm2,%xmm2
xor    %esi,%esi
movdqa 0xb7f(%rip),%xmm3
pxor   %xmm0,%xmm0
pxor   %xmm1,%xmm1
nopl   0x0(%rax)
movd   (%r14,%rsi,1),%xmm5
movd   0x4(%r14,%rsi,1),%xmm4
pand   %xmm3,%xmm5
pand   %xmm3,%xmm4
punpcklbw %xmm2,%xmm5
punpcklwd %xmm2,%xmm5
paddd  %xmm0,%xmm5
punpcklbw %xmm2,%xmm4
punpcklwd %xmm2,%xmm4
paddd  %xmm1,%xmm4
movd   0x8(%r14,%rsi,1),%xmm0
movd   0xc(%r14,%rsi,1),%xmm1
pand   %xmm3,%xmm0
pand   %xmm3,%xmm1
punpcklbw %xmm2,%xmm0
punpcklwd %xmm2,%xmm0
paddd  %xmm5,%xmm0
punpcklbw %xmm2,%xmm1
punpcklwd %xmm2,%xmm1
paddd  %xmm4,%xmm1
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1490 <main+0x2a0>
test   $0x1,%dl
je     1533 <main+0x343>
movd   (%r14,%rsi,1),%xmm2
movd   0x4(%r14,%rsi,1),%xmm3
movdqa 0xaf1(%rip),%xmm4
pand   %xmm4,%xmm2
pand   %xmm4,%xmm3
pxor   %xmm4,%xmm4
punpcklbw %xmm4,%xmm2
punpcklwd %xmm4,%xmm2
paddd  %xmm2,%xmm0
punpcklbw %xmm4,%xmm3
punpcklwd %xmm4,%xmm3
paddd  %xmm3,%xmm1
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
cmp    %rax,%rcx
je     1573 <main+0x383>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r14,%rcx,1),%edx
add    $0x1,%rcx
and    $0x1,%edx
add    %edx,%esi
cmp    %rcx,%rax
jne    1560 <main+0x370>
mov    %ebx,%edx
cmpb   $0x0,(%rsp)
je     13ce <main+0x1de>
cmp    %edx,%esi
jne    159b <main+0x3ab>
mov    0x2a2e(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a1e(%rip),%rax
jmp    158a <main+0x39a>
pxor   %xmm0,%xmm0
xor    %esi,%esi
pxor   %xmm1,%xmm1
test   $0x1,%dl
jne    14fa <main+0x30a>
jmp    1533 <main+0x343>
lea    -0x1(%rbx),%eax
lea    0x1e(%rbx),%r15d
test   %eax,%eax
cmovns %eax,%r15d
sar    $0x5,%r15d
mov    %ebx,%ebp
add    $0x1,%r15d
lea    0xb52(%rip),%r12
xor    %ebx,%ebx
jmp    15ff <main+0x40f>
xchg   %ax,%ax
mov    $0xa,%edi
call   1040 <putchar@plt>
add    $0x1,%rbx
add    $0x20,%r14
add    $0xffffffffffffffe0,%rbp
cmp    %r15,%rbx
je     143b <main+0x24b>
mov    %ebx,%esi
shl    $0x5,%esi
lea    0xb1a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %r13d,%r13d
jmp    1634 <main+0x444>
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%r13
cmp    $0x20,%r13
je     15e0 <main+0x3f0>
cmp    %r13,%rbp
je     15e0 <main+0x3f0>
testb  $0x1,(%r14,%r13,1)
mov    $0x20,%esi
je     1620 <main+0x430>
mov    $0x78,%esi
jmp    1620 <main+0x430>
mov    0x2975(%rip),%rbp
mov    0x0(%rbp),%edi
mov    (%rbx),%rdx
lea    0x9c6(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0x9eb(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0x9f7(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32 }
@.str = [3 x i8] c"-v\00"
@.str.1 = [3 x i8] c"-q\00"
@stderr = global i32 0
@.str.2 = [54 x i8] c"usage: %s [-qv] <file> -- print out cache statistics\0A\00"
@.str.3 = [29 x i8] c"\09-v\09print verbose cache map\0A\00"
@.str.4 = [45 x i8] c"\09-q\09exit code tells if file is fully cached\0A\00"
@O_RDONLY = global i32 0
@.str.5 = [5 x i8] c"open\00"
@.str.6 = [6 x i8] c"fstat\00"
@.str.7 = [32 x i8] c"%s: S_ISREG: not a regular file\00"
@EXIT_FAILURE = global i32 0
@.str.8 = [64 x i8] c"pages in cache: %d/%d (%.1f%%) [filesize=%.1fK, pagesize=%dK]\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.9 = [7 x i8] c"calloc\00"
@PROT_NONE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.10 = [5 x i8] c"mmap\00"
@.str.11 = [8 x i8] c"mincore\00"
@.str.12 = [13 x i8] c"\0Acache map:\0A\00"
@.str.13 = [7 x i8] c"%6d: |\00"
@.str.14 = [4 x i8] c"%c|\00"
@.str.15 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.stat
%14 = alloca i8*
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
store i32 0, i32* %11
store i8* null, i8** %14
store i8* null, i8** %15
%16 = call i32 (...) @getpagesize()
store i32 %16, i32* %9
%17 = load i32, i32* %4
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %35
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %19
store i32 1, i32* %11
br label %34
26: ; preds = %19
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %26
store i32 1, i32* %10
br label %33
33: ; preds = %32, %26
br label %34
34: ; preds = %33, %25
br label %46
35: ; preds = %2
%36 = load i32, i32* @stderr
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i8* %39)
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %34
%47 = load i32, i32* %10
%48 = icmp ne i32 %47, 0
br i1 %48, label %52, label %49
49: ; preds = %46
%50 = load i32, i32* %11
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %49, %46
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i32 1
store i8** %54, i8*** %5
br label %55
55: ; preds = %52, %49
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = load i32, i32* @O_RDONLY
%60 = call i32 @open(i8* %58, i32 %59)
store i32 %60, i32* %12
%61 = load i32, i32* %12
%62 = icmp eq i32 %61, -1
br i1 %62, label %63, label %65
63: ; preds = %55
%64 = call i32 @exiterr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %65
65: ; preds = %63, %55
%66 = load i32, i32* %12
%67 = call i32 @fstat(i32 %66, %struct.stat* %13)
%68 = icmp eq i32 %67, -1
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i32 @exiterr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 1
%73 = load i32, i32* %72
%74 = call i32 @S_ISREG(i32 %73)
%75 = icmp ne i32 %74, 0
br i1 %75, label %83, label %76
76: ; preds = %71
%77 = load i32, i32* @stderr
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 1
%80 = load i8*, i8** %79
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %80)
%82 = load i32, i32* @EXIT_FAILURE
store i32 %82, i32* %3
br label %230
83: ; preds = %71
%84 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%85 = load i32, i32* %84
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %92
87: ; preds = %83
%88 = load i32, i32* %9
%89 = sdiv i32 %88, 1024
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 0, double 0.000000e+00, double 0.000000e+00, i32 %89)
%91 = load i32, i32* @EXIT_SUCCESS
store i32 %91, i32* %3
br label %230
92: ; preds = %83
%93 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%94 = load i32, i32* %93
%95 = load i32, i32* %9
%96 = add nsw i32 %94, %95
%97 = sub nsw i32 %96, 1
%98 = load i32, i32* %9
%99 = sdiv i32 %97, %98
store i32 %99, i32* %8
%100 = load i32, i32* %8
%101 = call i8* @calloc(i32 1, i32 %100)
store i8* %101, i8** %15
%102 = load i8*, i8** %15
%103 = icmp ne i8* %102, null
br i1 %103, label %106, label %104
104: ; preds = %92
%105 = call i32 @exiterr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %106
106: ; preds = %104, %92
%107 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%108 = load i32, i32* %107
%109 = load i32, i32* @PROT_NONE
%110 = load i32, i32* @MAP_SHARED
%111 = load i32, i32* %12
%112 = call i8* @mmap(i32* null, i32 %108, i32 %109, i32 %110, i32 %111, i32 0)
store i8* %112, i8** %14
%113 = load i8*, i8** %14
%114 = load i8*, i8** @MAP_FAILED
%115 = icmp eq i8* %113, %114
br i1 %115, label %116, label %118
116: ; preds = %106
%117 = call i32 @exiterr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %118
118: ; preds = %116, %106
%119 = load i8*, i8** %14
%120 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%121 = load i32, i32* %120
%122 = load i8*, i8** %15
%123 = call i32 @mincore(i8* %119, i32 %121, i8* %122)
%124 = icmp eq i32 %123, -1
br i1 %124, label %125, label %127
125: ; preds = %118
%126 = call i32 @exiterr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %127
127: ; preds = %125, %118
store i32 0, i32* %7
store i32 0, i32* %6
br label %128
128: ; preds = %145, %127
%129 = load i32, i32* %6
%130 = load i32, i32* %8
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %146
132: ; preds = %128
%133 = load i8*, i8** %15
%134 = load i32, i32* %6
%135 = add nsw i32 %134, 1
store i32 %135, i32* %6
%136 = sext i32 %134 to i64
%137 = getelementptr inbounds i8, i8* %133, i64 %136
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = and i32 %139, 1
%141 = icmp ne i32 %140, 0
br i1 %141, label %142, label %145
142: ; preds = %132
%143 = load i32, i32* %7
%144 = add nsw i32 %143, 1
store i32 %144, i32* %7
br label %145
145: ; preds = %142, %132
br label %128
146: ; preds = %128
%147 = load i32, i32* %10
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %157
149: ; preds = %146
%150 = load i32, i32* %7
%151 = load i32, i32* %6
%152 = icmp eq i32 %150, %151
br i1 %152, label %153, label %155
153: ; preds = %149
%154 = load i32, i32* @EXIT_SUCCESS
store i32 %154, i32* %3
br label %230
155: ; preds = %149
%156 = load i32, i32* @EXIT_FAILURE
store i32 %156, i32* %3
br label %230
157: ; preds = %146
%158 = load i32, i32* %7
%159 = load i32, i32* %6
%160 = load i32, i32* %7
%161 = sitofp i32 %160 to double
%162 = fmul double 1.000000e+02, %161
%163 = load i32, i32* %6
%164 = sitofp i32 %163 to double
%165 = fdiv double %162, %164
%166 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%167 = load i32, i32* %166
%168 = sitofp i32 %167 to double
%169 = fmul double 1.000000e+00, %168
%170 = fdiv double %169, 1.024000e+03
%171 = load i32, i32* %9
%172 = sdiv i32 %171, 1024
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0), i32 %158, i32 %159, double %165, double %170, i32 %172)
%174 = load i32, i32* %11
%175 = icmp ne i32 %174, 0
br i1 %175, label %176, label %223
176: ; preds = %157
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %6
br label %178
178: ; preds = %219, %176
%179 = load i32, i32* %6
%180 = load i32, i32* %8
%181 = sub nsw i32 %180, 1
%182 = sdiv i32 %181, 32
%183 = icmp sle i32 %179, %182
br i1 %183, label %184, label %222
184: ; preds = %178
%185 = load i32, i32* %6
%186 = mul nsw i32 %185, 32
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %186)
store i32 0, i32* %7
br label %188
188: ; preds = %214, %184
%189 = load i32, i32* %7
%190 = icmp slt i32 %189, 32
br i1 %190, label %191, label %217
191: ; preds = %188
%192 = load i32, i32* %6
%193 = mul nsw i32 %192, 32
%194 = load i32, i32* %7
%195 = add nsw i32 %193, %194
%196 = load i32, i32* %8
%197 = icmp eq i32 %195, %196
br i1 %197, label %198, label %199
198: ; preds = %191
br label %217
199: ; preds = %191
%200 = load i8*, i8** %15
%201 = load i32, i32* %6
%202 = mul nsw i32 %201, 32
%203 = load i32, i32* %7
%204 = add nsw i32 %202, %203
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i8, i8* %200, i64 %205
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = and i32 %208, 1
%210 = icmp ne i32 %209, 0
%211 = zext i1 %210 to i64
%212 = select i1 %210, i32 120, i32 32
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %212)
br label %214
214: ; preds = %199
%215 = load i32, i32* %7
%216 = add nsw i32 %215, 1
store i32 %216, i32* %7
br label %188
217: ; preds = %198, %188
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %219
219: ; preds = %217
%220 = load i32, i32* %6
%221 = add nsw i32 %220, 1
store i32 %221, i32* %6
br label %178
222: ; preds = %178
br label %223
223: ; preds = %222, %157
%224 = load i8*, i8** %14
%225 = getelementptr inbounds %struct.stat, %struct.stat* %13, i32 0, i32 0
%226 = load i32, i32* %225
%227 = sitofp i32 %226 to double
%228 = call i32 @munmap(i8* %224, double %227)
%229 = load i32, i32* @EXIT_SUCCESS
store i32 %229, i32* %3
br label %230
230: ; preds = %223, %155, %153, %87, %76
%231 = load i32, i32* %3
ret i32 %231
}

LLVM IR (-O2):
%struct.stat = type { i32, i32 }
@.str = [3 x i8] c"-v\00"
@.str.1 = [3 x i8] c"-q\00"
@stderr = global i32 0
@.str.2 = [54 x i8] c"usage: %s [-qv] <file> -- print out cache statistics\0A\00"
@.str.3 = [29 x i8] c"\09-v\09print verbose cache map\0A\00"
@.str.4 = [45 x i8] c"\09-q\09exit code tells if file is fully cached\0A\00"
@O_RDONLY = global i32 0
@.str.5 = [5 x i8] c"open\00"
@.str.6 = [6 x i8] c"fstat\00"
@.str.7 = [32 x i8] c"%s: S_ISREG: not a regular file\00"
@EXIT_FAILURE = global i32 0
@.str.8 = [64 x i8] c"pages in cache: %d/%d (%.1f%%) [filesize=%.1fK, pagesize=%dK]\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.9 = [7 x i8] c"calloc\00"
@PROT_NONE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.10 = [5 x i8] c"mmap\00"
@.str.11 = [8 x i8] c"mincore\00"
@.str.13 = [7 x i8] c"%6d: |\00"
@.str.14 = [4 x i8] c"%c|\00"
@str = [12 x i8] c"\0Acache map:\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = tail call i32 (...) @getpagesize()
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %24, label %12
12: ; preds = %7
%13 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %9)
%14 = icmp eq i32 %13, 0
br label %24
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %1
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%23 = tail call i32 @exit(i32 1)
unreachable
24: ; preds = %12, %7
%25 = phi i1 [ false, %7 ], [ %14, %12 ]
%26 = or i1 %11, %25
%27 = select i1 %26, i8** %8, i8** %1
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = load i32, i32* @O_RDONLY
%31 = tail call i32 @open(i8* %29, i32 %30)
%32 = icmp eq i32 %31, -1
br i1 %32, label %33, label %35
33: ; preds = %24
%34 = tail call i32 @exiterr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %35
35: ; preds = %33, %24
%36 = call i32 @fstat(i32 %31, %struct.stat* %3)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 @exiterr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
%41 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%42 = load i32, i32* %41
%43 = tail call i32 @S_ISREG(i32 %42)
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %40
%46 = load i32, i32* @stderr
%47 = load i8*, i8** %28
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i8* %47)
br label %211
49: ; preds = %40
%50 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = sdiv i32 %5, 1024
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 0, double 0.000000e+00, double 0.000000e+00, i32 %54)
br label %211
56: ; preds = %49
%57 = add i32 %5, -1
%58 = add i32 %57, %51
%59 = sdiv i32 %58, %5
%60 = tail call i8* @calloc(i32 1, i32 %59)
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = tail call i32 @exiterr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %64
64: ; preds = %62, %56
%65 = load i32, i32* @PROT_NONE
%66 = load i32, i32* @MAP_SHARED
%67 = tail call i8* @mmap(i32* null, i32 %51, i32 %65, i32 %66, i32 %31, i32 0)
%68 = load i8*, i8** @MAP_FAILED
%69 = icmp eq i8* %67, %68
br i1 %69, label %70, label %72
70: ; preds = %64
%71 = tail call i32 @exiterr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %72
72: ; preds = %70, %64
%73 = tail call i32 @mincore(i8* %67, i32 %51, i8* %60)
%74 = icmp eq i32 %73, -1
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call i32 @exiterr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %77
77: ; preds = %75, %72
%78 = icmp sgt i32 %59, 0
br i1 %78, label %79, label %163
79: ; preds = %77
%80 = zext i32 %59 to i64
%81 = icmp ult i32 %59, 8
br i1 %81, label %150, label %82
82: ; preds = %79
%83 = and i64 %80, 4294967288
%84 = add nsw i64 %83, -8
%85 = lshr exact i64 %84, 3
%86 = add nuw nsw i64 %85, 1
%87 = and i64 %86, 1
%88 = icmp eq i64 %84, 0
br i1 %88, label %124, label %89
89: ; preds = %82
%90 = and i64 %86, 4611686018427387902
br label %91
91: ; preds = %91, %89
%92 = phi i64 [ 0, %89 ], [ %121, %91 ]
%93 = phi <4 x i32> [ zeroinitializer, %89 ], [ %119, %91 ]
%94 = phi <4 x i32> [ zeroinitializer, %89 ], [ %120, %91 ]
%95 = phi i64 [ 0, %89 ], [ %122, %91 ]
%96 = getelementptr inbounds i8, i8* %60, i64 %92
%97 = bitcast i8* %96 to <4 x i8>*
%98 = load <4 x i8>, <4 x i8>* %97
%99 = getelementptr inbounds i8, i8* %96, i64 4
%100 = bitcast i8* %99 to <4 x i8>*
%101 = load <4 x i8>, <4 x i8>* %100
%102 = and <4 x i8> %98, <i8 1, i8 1, i8 1, i8 1>
%103 = and <4 x i8> %101, <i8 1, i8 1, i8 1, i8 1>
%104 = zext <4 x i8> %102 to <4 x i32>
%105 = zext <4 x i8> %103 to <4 x i32>
%106 = add <4 x i32> %93, %104
%107 = add <4 x i32> %94, %105
%108 = or i64 %92, 8
%109 = getelementptr inbounds i8, i8* %60, i64 %108
%110 = bitcast i8* %109 to <4 x i8>*
%111 = load <4 x i8>, <4 x i8>* %110
%112 = getelementptr inbounds i8, i8* %109, i64 4
%113 = bitcast i8* %112 to <4 x i8>*
%114 = load <4 x i8>, <4 x i8>* %113
%115 = and <4 x i8> %111, <i8 1, i8 1, i8 1, i8 1>
%116 = and <4 x i8> %114, <i8 1, i8 1, i8 1, i8 1>
%117 = zext <4 x i8> %115 to <4 x i32>
%118 = zext <4 x i8> %116 to <4 x i32>
%119 = add <4 x i32> %106, %117
%120 = add <4 x i32> %107, %118
%121 = add nuw i64 %92, 16
%122 = add i64 %95, 2
%123 = icmp eq i64 %122, %90
br i1 %123, label %124, label %91
124: ; preds = %91, %82
%125 = phi <4 x i32> [ undef, %82 ], [ %119, %91 ]
%126 = phi <4 x i32> [ undef, %82 ], [ %120, %91 ]
%127 = phi i64 [ 0, %82 ], [ %121, %91 ]
%128 = phi <4 x i32> [ zeroinitializer, %82 ], [ %119, %91 ]
%129 = phi <4 x i32> [ zeroinitializer, %82 ], [ %120, %91 ]
%130 = icmp eq i64 %87, 0
br i1 %130, label %144, label %131
131: ; preds = %124
%132 = getelementptr inbounds i8, i8* %60, i64 %127
%133 = bitcast i8* %132 to <4 x i8>*
%134 = load <4 x i8>, <4 x i8>* %133
%135 = getelementptr inbounds i8, i8* %132, i64 4
%136 = bitcast i8* %135 to <4 x i8>*
%137 = load <4 x i8>, <4 x i8>* %136
%138 = and <4 x i8> %134, <i8 1, i8 1, i8 1, i8 1>
%139 = and <4 x i8> %137, <i8 1, i8 1, i8 1, i8 1>
%140 = zext <4 x i8> %138 to <4 x i32>
%141 = zext <4 x i8> %139 to <4 x i32>
%142 = add <4 x i32> %128, %140
%143 = add <4 x i32> %129, %141
br label %144
144: ; preds = %124, %131
%145 = phi <4 x i32> [ %125, %124 ], [ %142, %131 ]
%146 = phi <4 x i32> [ %126, %124 ], [ %143, %131 ]
%147 = add <4 x i32> %146, %145
%148 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %147)
%149 = icmp eq i64 %83, %80
br i1 %149, label %163, label %150
150: ; preds = %79, %144
%151 = phi i64 [ 0, %79 ], [ %83, %144 ]
%152 = phi i32 [ 0, %79 ], [ %148, %144 ]
br label %153
153: ; preds = %150, %153
%154 = phi i64 [ %156, %153 ], [ %151, %150 ]
%155 = phi i32 [ %161, %153 ], [ %152, %150 ]
%156 = add nuw nsw i64 %154, 1
%157 = getelementptr inbounds i8, i8* %60, i64 %154
%158 = load i8, i8* %157
%159 = and i8 %158, 1
%160 = zext i8 %159 to i32
%161 = add nuw nsw i32 %155, %160
%162 = icmp eq i64 %156, %80
br i1 %162, label %163, label %153
163: ; preds = %153, %144, %77
%164 = phi i32 [ 0, %77 ], [ %148, %144 ], [ %161, %153 ]
%165 = phi i32 [ 0, %77 ], [ %59, %144 ], [ %59, %153 ]
br i1 %25, label %166, label %169
166: ; preds = %163
%167 = icmp eq i32 %164, %165
%168 = select i1 %167, i32* @EXIT_SUCCESS, i32* @EXIT_FAILURE
br label %211
169: ; preds = %163
%170 = sitofp i32 %164 to double
%171 = fmul double %170, 1.000000e+02
%172 = sitofp i32 %165 to double
%173 = fdiv double %171, %172
%174 = sitofp i32 %51 to double
%175 = fmul double %174, 0x3F50000000000000
%176 = sdiv i32 %5, 1024
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0), i32 %164, i32 %165, double %173, double %175, i32 %176)
br i1 %11, label %178, label %209
178: ; preds = %169
%179 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%180 = icmp slt i32 %59, -30
br i1 %180, label %209, label %181
181: ; preds = %178
%182 = add nsw i32 %59, -1
%183 = sdiv i32 %182, 32
%184 = zext i32 %59 to i64
%185 = add nuw nsw i32 %183, 1
%186 = zext i32 %185 to i64
br label %187
187: ; preds = %181, %205
%188 = phi i64 [ 0, %181 ], [ %207, %205 ]
%189 = shl nsw i64 %188, 5
%190 = trunc i64 %189 to i32
%191 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %190)
br label %192
192: ; preds = %187, %196
%193 = phi i64 [ 0, %187 ], [ %203, %196 ]
%194 = add nuw nsw i64 %193, %189
%195 = icmp eq i64 %194, %184
br i1 %195, label %205, label %196
196: ; preds = %192
%197 = getelementptr inbounds i8, i8* %60, i64 %194
%198 = load i8, i8* %197
%199 = and i8 %198, 1
%200 = icmp eq i8 %199, 0
%201 = select i1 %200, i32 32, i32 120
%202 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %201)
%203 = add nuw nsw i64 %193, 1
%204 = icmp eq i64 %203, 32
br i1 %204, label %205, label %192
205: ; preds = %192, %196
%206 = tail call i32 @putchar(i32 10)
%207 = add nuw nsw i64 %188, 1
%208 = icmp eq i64 %207, %186
br i1 %208, label %209, label %187
209: ; preds = %205, %178, %169
%210 = tail call i32 @munmap(i8* %67, double %174)
br label %211
211: ; preds = %166, %209, %53, %45
%212 = phi i32* [ @EXIT_SUCCESS, %53 ], [ @EXIT_SUCCESS, %209 ], [ @EXIT_FAILURE, %45 ], [ %168, %166 ]
%213 = load i32, i32* %212
ret i32 %213
}