#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*/ off_t;
typedef int /*<<< orphan*/ cpu_set_t;
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int MAP_ANON;
char *MAP_FAILED;
int MAP_HUGETLB;
int MAP_PRIVATE;
int PROT_READ;
int PROT_WRITE;
size_t _rdtsc();
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ err(int, char *, ...);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt(int, char **, char *);
scalar_t__ malloc(int);
scalar_t__ mmap(int /*<<< orphan*/ *, size_t, int, int, int,
                int /*<<< orphan*/);
int /*<<< orphan*/ optarg;
int pin_cpu(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, double, ...);
size_t reader(int, int, double *, double *, int *);
int /*<<< orphan*/ rndm_list(int *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  char *buf1;
  void *ret;
  size_t *array, ret_val = 0;
  size_t array_stride;
  int i, j, k, cpu, cpu_run, line_count, stride, fd = -1;
  off_t offset = 0;
  int len = 10240000, iter = 100, mult = 1, main_ret = 0;
  double iterations;
  double *a, *b;
  size_t start, stop, run_time, call_start, call_stop, call_run_time,
      total_bytes = 0;
  __pid_t pid = 0;
  size_t buf_size, jj, zero_loop, buf_by_num_seg, ind;
  size_t num_pages, page_size, var_size;
  int cpu_setsize;
  cpu_set_t mask;
  int *pattern;
  int step, c;
  int *index, lc_by_num_seg, count, num_seg = 32, huge = 0;
  unsigned int bitmask, *intstar;
  page_size = 4096;
  if (argc < 6) {
    fprintf(stderr,
            "the random walker requires at least 6 arguments (only the 7th in "
            "the list below is optional), there were %d\n",
            argc);
    usage();
    err(1, "insufficient invocation arguments");
  }
  while ((c = getopt(argc, argv, "i:r:l:s:S:m:L")) != -1) {
    switch (c) {
    case 'i':
      cpu = atoi(optarg);
      break;
    case 'r':
      cpu_run = atoi(optarg);
      break;
    case 'l':
      line_count = atoi(optarg);
      break;
    case 's':
      stride = atoi(optarg);
      break;
    case 'S':
      num_seg = atoi(optarg);
      break;
    case 'm':
      mult = atoi(optarg);
      break;
    case 'L':
      huge = 1;
      page_size = 2 * 1024 * 1024;
      break;
    default:
      err(1, "unknown option %c", c);
    }
  }
  iter = iter * mult;
  var_size = sizeof(size_t);
  fprintf(stderr, "size_t in %zd bytes\n", var_size);
  if (pin_cpu(pid, cpu) == -1) {
    err(1, "failed to set affinity");
  } else {
    fprintf(stderr, " process pinned to core %d\n", cpu);
  }
  pattern = (int *)malloc(num_seg * sizeof(int));
  if (pattern == NULL) {
    fprintf(stderr, " failed to malloc pattern for size = %d\n", num_seg);
    err(1, "malloc of pattern failed");
  }
  stride = page_size * stride + 64;
  buf_size = (size_t)line_count * (size_t)stride;
  num_pages = buf_size / page_size + 2;
  buf_size = page_size * num_pages;
  array_stride = stride / sizeof(double);
  iterations = (double)iter * (double)len;
  index = (int *)malloc(line_count * sizeof(int));
  if (index == NULL) {
    fprintf(stderr, " failed to malloc index array for line_count of %d\n",
            line_count);
    err(1, "failed to malloc index");
  }
  if (num_seg == 1) {
    for (i = 0; i < line_count - 1; i++)
      index[i] = i;
  } else {
    rndm_list(pattern, num_seg);
    lc_by_num_seg = line_count / num_seg;
    if (lc_by_num_seg * num_seg != line_count) {
      fprintf(
          stderr,
          " line count must be a multiple of the fifth argument num_seg = %d\n",
          num_seg);
      err(1, " bad line_count");
    }
    count = 0;
    buf_by_num_seg = buf_size / num_seg;
    for (i = 0; i < lc_by_num_seg; i++) {
      step = 0;
      for (j = 0; j < num_seg; j++) {
        count++;
        if (j == (num_seg - 1))
          step = 1;
        ind = lc_by_num_seg * pattern[j];
        index[count] = (int)ind + i + step;
        if (index[count] >= line_count)
          printf(" count = %d, index = %d\n", count, index[count]);
      }
    }
  }
  index[0] = 0;
  for (i = 0; i < line_count; i++)
    index[i] = index[i] * array_stride;
  if (huge == 0)
    buf1 = (char *)mmap(NULL, buf_size, PROT_READ | PROT_WRITE,
                        MAP_PRIVATE | MAP_ANON, fd, offset);
  if (huge == 1)
    buf1 = (char *)mmap(NULL, buf_size, PROT_READ | PROT_WRITE,
                        MAP_PRIVATE | MAP_ANON | MAP_HUGETLB, fd, offset);
  if (buf1 == MAP_FAILED) {
    fprintf(stderr, "mmap failed\n");
    err(1, "mmap failed");
  }
  fprintf(stderr, " buf1 for a = %p\n", buf1);
  a = (double *)buf1;
  if (huge == 0)
    buf1 = (char *)mmap(NULL, buf_size, PROT_READ | PROT_WRITE,
                        MAP_PRIVATE | MAP_ANON, fd, offset);
  if (huge == 1)
    buf1 = (char *)mmap(NULL, buf_size, PROT_READ | PROT_WRITE,
                        MAP_PRIVATE | MAP_ANON | MAP_HUGETLB, fd, offset);
  if (buf1 == MAP_FAILED) {
    fprintf(stderr, "mmap failed\n");
    err(1, "mmap failed");
  }
  fprintf(stderr, " buf1 for b = %p\n", buf1);
  b = (double *)buf1;
  zero_loop = buf_size / sizeof(double);
  fprintf(stderr, " buf_size = %zu, zero_loop = %zu, array_stride = %zd\n",
          buf_size, zero_loop, array_stride);
  for (i = 0; i < zero_loop; i++)
    a[i] = 0;
  for (i = 0; i < zero_loop; i++)
    b[i] = 0;
  fprintf(stderr, " finished zeroing buf for a, b\n");
  if (pin_cpu(pid, cpu_run) == -1) {
    err(1, "cannot set cpu run affinity");
  } else {
    printf(" process pinned to core %d to run\n", cpu_run);
  }
  printf(" calling walker %d times which loops  %d times on buffer of %d lines "
         "with a stride of %d, for a total size of %zu\n",
         iter, len, line_count, stride, buf_size);
  call_start = _rdtsc();
  for (i = 0; i < iter; i++) {
    start = _rdtsc();
    ret_val = reader(len, line_count, a, b, index);
    stop = _rdtsc();
    run_time = stop - start;
  }
  call_stop = _rdtsc();
  call_run_time = call_stop - call_start;
  printf(" run time = %zd\n", call_run_time);
  printf(" average cycles per iteration = %f\n",
         (double)call_run_time / iterations);
  return main_ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0xffffffff,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x9c4000,-0x60(%rbp)
movl   $0x64,-0x64(%rbp)
movl   $0x1,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movq   $0x0,-0xc0(%rbp)
movl   $0x0,-0xc4(%rbp)
movl   $0x20,-0x134(%rbp)
movl   $0x0,-0x138(%rbp)
movq   $0x1000,-0x100(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    127d <main+0xbd>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe64(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   10b0 <usage@plt>
mov    $0x1,%edi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
jmp    1282 <main+0xc2>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xebf(%rip),%rdx
call   10d0 <getopt@plt>
mov    %eax,-0x120(%rbp)
cmp    $0xffffffff,%eax
je     1395 <main+0x1d5>
mov    -0x120(%rbp),%eax
add    $0xffffffb4,%eax
mov    %eax,%ecx
mov    %rcx,-0x150(%rbp)
sub    $0x27,%eax
ja     1377 <main+0x1b7>
mov    -0x150(%rbp),%rax
lea    0xd53(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x48(%rbp)
jmp    1390 <main+0x1d0>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x4c(%rbp)
jmp    1390 <main+0x1d0>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x50(%rbp)
jmp    1390 <main+0x1d0>
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x54(%rbp)
jmp    1390 <main+0x1d0>
mov    0x2cc3(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x134(%rbp)
jmp    1390 <main+0x1d0>
mov    0x2caa(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x68(%rbp)
jmp    1390 <main+0x1d0>
movl   $0x1,-0x138(%rbp)
movq   $0x200000,-0x100(%rbp)
jmp    1390 <main+0x1d0>
mov    -0x120(%rbp),%edx
mov    $0x1,%edi
lea    0xdd4(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
jmp    1282 <main+0xc2>
mov    -0x64(%rbp),%eax
imul   -0x68(%rbp),%eax
mov    %eax,-0x64(%rbp)
movq   $0x8,-0x108(%rbp)
mov    0x2c17(%rip),%rax
mov    (%rax),%edi
mov    -0x108(%rbp),%rdx
lea    0xdae(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xc4(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    13f7 <main+0x237>
mov    $0x1,%edi
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
jmp    1411 <main+0x251>
mov    0x2bca(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%edx
lea    0xd91(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movslq -0x134(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
jne    1468 <main+0x2a8>
mov    0x2b89(%rip),%rax
mov    (%rax),%edi
mov    -0x134(%rbp),%edx
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xd7f(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    -0x100(%rbp),%rax
movslq -0x54(%rbp),%rcx
imul   %rcx,%rax
add    $0x40,%rax
mov    %eax,-0x54(%rbp)
movslq -0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x100(%rbp)
add    $0x2,%rax
mov    %rax,-0xf8(%rbp)
mov    -0x100(%rbp),%rax
imul   -0xf8(%rbp),%rax
ff
mov    %rax,-0xd0(%rbp)
movslq -0x54(%rbp),%rax
shr    $0x3,%rax
mov    %rax,-0x38(%rbp)
cvtsi2sdl -0x64(%rbp),%xmm0
cvtsi2sdl -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movslq -0x50(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x128(%rbp)
cmpq   $0x0,-0x128(%rbp)
jne    1534 <main+0x374>
mov    0x2aba(%rip),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%edx
lea    0xcdf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xd00(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
cmpl   $0x1,-0x134(%rbp)
jne    157d <main+0x3bd>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x50(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1578 <main+0x3b8>
mov    -0x3c(%rbp),%edx
mov    -0x128(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1548 <main+0x388>
jmp    1719 <main+0x559>
mov    -0x118(%rbp),%rdi
mov    -0x134(%rbp),%esi
call   10c0 <rndm_list@plt>
mov    -0x50(%rbp),%eax
cltd
idivl  -0x134(%rbp)
mov    %eax,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
imul   -0x134(%rbp),%eax
cmp    -0x50(%rbp),%eax
je     15e5 <main+0x425>
mov    0x2a0c(%rip),%rax
mov    (%rax),%edi
mov    -0x134(%rbp),%edx
lea    0xc79(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xca9(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
movl   $0x0,-0x130(%rbp)
mov    -0xd0(%rbp),%rax
movslq -0x134(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0xe8(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x12c(%rbp),%eax
jge    1714 <main+0x554>
movl   $0x0,-0x11c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x134(%rbp),%eax
jge    1701 <main+0x541>
mov    -0x130(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x130(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x134(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    166c <main+0x4ac>
movl   $0x1,-0x11c(%rbp)
mov    -0x12c(%rbp),%eax
mov    -0x118(%rbp),%rcx
movslq -0x40(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
cltq
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    %eax,%edx
add    -0x3c(%rbp),%edx
add    -0x11c(%rbp),%edx
mov    -0x128(%rbp),%rax
movslq -0x130(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x128(%rbp),%rax
movslq -0x130(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x50(%rbp),%eax
jl     16ee <main+0x52e>
cvtsi2sdl -0x130(%rbp),%xmm0
ff
mov    -0x128(%rbp),%rax
movslq -0x130(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xbb0(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    16f3 <main+0x533>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1630 <main+0x470>
jmp    1706 <main+0x546>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1610 <main+0x450>
jmp    1719 <main+0x559>
mov    -0x128(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    176b <main+0x5ab>
mov    -0x128(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
imul   -0x38(%rbp),%rax
mov    %eax,%edx
mov    -0x128(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    172d <main+0x56d>
cmpl   $0x0,-0x138(%rbp)
jne    17b8 <main+0x5f8>
mov    -0xd0(%rbp),%rsi
mov    0x286a(%rip),%rax
mov    (%rax),%edx
mov    0x2831(%rip),%rax
or     (%rax),%edx
mov    0x2818(%rip),%rax
mov    (%rax),%ecx
mov    0x2817(%rip),%rax
or     (%rax),%ecx
mov    -0x58(%rbp),%r8d
mov    -0x5c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x138(%rbp)
jne    180e <main+0x64e>
mov    -0xd0(%rbp),%rsi
mov    0x281d(%rip),%rax
mov    (%rax),%edx
mov    0x27e4(%rip),%rax
or     (%rax),%edx
mov    0x27cb(%rip),%rax
mov    (%rax),%ecx
mov    0x27ca(%rip),%rax
or     (%rax),%ecx
mov    0x27e9(%rip),%rax
or     (%rax),%ecx
mov    -0x58(%rbp),%r8d
mov    -0x5c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x278f(%rip),%rcx
cmp    (%rcx),%rax
jne    184c <main+0x68c>
mov    0x279f(%rip),%rax
mov    (%rax),%edi
lea    0xa7e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xa78(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    0x2775(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xa69(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x80(%rbp)
cmpl   $0x0,-0x138(%rbp)
jne    18bc <main+0x6fc>
mov    -0xd0(%rbp),%rsi
mov    0x2766(%rip),%rax
mov    (%rax),%edx
mov    0x272d(%rip),%rax
or     (%rax),%edx
mov    0x2714(%rip),%rax
mov    (%rax),%ecx
mov    0x2713(%rip),%rax
or     (%rax),%ecx
mov    -0x58(%rbp),%r8d
mov    -0x5c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x138(%rbp)
jne    1912 <main+0x752>
mov    -0xd0(%rbp),%rsi
mov    0x2719(%rip),%rax
mov    (%rax),%edx
mov    0x26e0(%rip),%rax
or     (%rax),%edx
mov    0x26c7(%rip),%rax
mov    (%rax),%ecx
mov    0x26c6(%rip),%rax
or     (%rax),%ecx
mov    0x26e5(%rip),%rax
or     (%rax),%ecx
mov    -0x58(%rbp),%r8d
mov    -0x5c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x268b(%rip),%rcx
cmp    (%rcx),%rax
jne    1950 <main+0x790>
mov    0x269b(%rip),%rax
mov    (%rax),%edi
lea    0x97a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0x974(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
mov    0x2671(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0x977(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0xd0(%rbp),%rax
shr    $0x3,%rax
mov    %rax,-0xe0(%rbp)
mov    0x2639(%rip),%rax
mov    (%rax),%edi
mov    -0xd0(%rbp),%rdx
mov    -0xe0(%rbp),%rcx
mov    -0x38(%rbp),%r8
lea    0x943(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x3c(%rbp)
movslq -0x3c(%rbp),%rax
cmp    -0xe0(%rbp),%rax
jae    19e7 <main+0x827>
mov    -0x80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    19b8 <main+0x7f8>
movl   $0x0,-0x3c(%rbp)
movslq -0x3c(%rbp),%rax
cmp    -0xe0(%rbp),%rax
jae    1a20 <main+0x860>
mov    -0x88(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    19ee <main+0x82e>
mov    0x25a1(%rip),%rax
mov    (%rax),%edi
lea    0x8f3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xc4(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    1a66 <main+0x8a6>
mov    $0x1,%edi
lea    0x8e9(%rip),%rsi
mov    $0x0,%al
call   1080 <err@plt>
jmp    1a79 <main+0x8b9>
cvtsi2sdl -0x4c(%rbp),%xmm0
lea    0x8ed(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2sdl -0x64(%rbp),%xmm0
mov    -0x60(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x54(%rbp),%ecx
mov    -0xd0(%rbp),%r8
lea    0x8ed(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10a0 <_rdtsc@plt>
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1b1d <main+0x95d>
mov    $0x0,%al
call   10a0 <_rdtsc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x60(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rcx
mov    -0x128(%rbp),%r8
call   1030 <reader@plt>
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   10a0 <_rdtsc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
sub    -0x90(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1ab1 <main+0x8f1>
xor    %eax,%eax
call   10a0 <_rdtsc@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0xb8(%rbp)
movq   -0xb8(%rbp),%xmm0
ff
movaps 0x4ae(%rip),%xmm1
movaps %xmm1,-0x170(%rbp)
punpckldq %xmm1,%xmm0
movapd 0x4ab(%rip),%xmm1
movaps %xmm1,-0x160(%rbp)
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0x873(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movaps -0x170(%rbp),%xmm2
movaps -0x160(%rbp),%xmm1
movq   -0xb8(%rbp),%xmm0
ff
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
lea    0x848(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
cmp    $0x5,%edi
jg     120b <main+0x4b>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
lea    0xf70(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
call   10b0 <usage@plt>
lea    0xfc6(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    $0x20,%eax
mov    %rax,0x48(%rsp)
mov    $0x1000,%ecx
movl   $0x1,0x1c(%rsp)
lea    0xfbe(%rip),%r15
lea    0xe88(%rip),%r14
mov    %rax,0x8(%rsp)
xor    %edx,%edx
jmp    1258 <main+0x98>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,0x1c(%rsp)
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rcx
mov    (%rsp),%edx
mov    %edx,(%rsp)
mov    %rcx,0x20(%rsp)
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
call   10d0 <getopt@plt>
lea    -0x4c(%rax),%edx
cmp    $0x27,%edx
ja     12f2 <main+0x132>
mov    $0x200000,%ecx
movslq (%r14,%rdx,4),%rsi
add    %r14,%rsi
mov    $0x1,%edx
jmp    *%rsi
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %rax,0x48(%rsp)
jmp    1250 <main+0x90>
mov    0x2d54(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,%r12d
jmp    1250 <main+0x90>
mov    0x2d41(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    1250 <main+0x90>
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,0x54(%rsp)
jmp    1250 <main+0x90>
mov    0x2d15(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,%r13d
jmp    1250 <main+0x90>
cmp    $0xffffffff,%eax
je     1311 <main+0x151>
mov    $0x1,%edi
lea    0xef2(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <err@plt>
jmp    1250 <main+0x90>
mov    0x2cb0(%rip),%r14
mov    (%r14),%edi
lea    0xee5(%rip),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
mov    %r12d,%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
je     1353 <main+0x193>
mov    (%r14),%edi
lea    0xeec(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1366 <main+0x1a6>
lea    0xec2(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    0x48(%rsp),%rbx
lea    0x0(,%rbx,4),%edi
call   1090 <malloc@plt>
mov    %rax,0x60(%rsp)
test   %rax,%rax
jne    13a7 <main+0x1e7>
mov    (%r14),%edi
lea    0xec4(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xedd(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    0x20(%rsp),%rdi
imul   %edi,%r13d
or     $0x40,%r13d
mov    0x8(%rsp),%rsi
movslq %esi,%rax
movslq %r13d,%rdx
imul   %rdx,%rax
mov    %rax,%rcx
or     %rdi,%rcx
shr    $0x20,%rcx
mov    %rdx,0x58(%rsp)
je     13db <main+0x21b>
xor    %edx,%edx
div    %rdi
jmp    13df <main+0x21f>
xor    %edx,%edx
div    %edi
mov    %rax,0x10(%rsp)
lea    0x0(,%rsi,4),%edi
call   1090 <malloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1421 <main+0x261>
mov    (%r14),%edi
lea    0xe8f(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xeb0(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    %r13d,0x40(%rsp)
cmp    $0x1,%ebx
mov    %rbp,0x38(%rsp)
jne    1453 <main+0x293>
mov    0x8(%rsp),%r8
cmp    $0x2,%r8d
jl     16ec <main+0x52c>
lea    -0x1(%r8),%ebp
cmp    $0x8,%ebp
jae    157e <main+0x3be>
xor    %eax,%eax
jmp    16d5 <main+0x515>
mov    0x60(%rsp),%rdi
mov    %ebx,%esi
call   10c0 <rndm_list@plt>
mov    0x8(%rsp),%r8
mov    %r8d,%eax
cltd
idiv   %ebx
mov    %eax,%r9d
imul   %ebx,%eax
cmp    %r8d,%eax
mov    %r9d,0x44(%rsp)
je     14aa <main+0x2ea>
mov    (%r14),%edi
lea    0xe58(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe8b(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    0x44(%rsp),%r9d
mov    0x8(%rsp),%r8
test   %r9d,%r9d
jle    16ec <main+0x52c>
lea    -0x1(%rbx),%edi
mov    %ebx,%r12d
shl    $0x2,%rdi
shl    $0x2,%r12
mov    0x38(%rsp),%rax
add    $0x4,%rax
mov    %rax,0x68(%rsp)
xor    %ebp,%ebp
mov    $0x1,%r10d
xor    %r14d,%r14d
mov    %rdi,0x70(%rsp)
jmp    1502 <main+0x342>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
cmp    %r9d,%r14d
mov    0x48(%rsp),%rbx
je     16ec <main+0x52c>
test   %ebx,%ebx
jle    14f0 <main+0x330>
movslq %ebp,%rax
mov    0x68(%rsp),%rsi
lea    (%rsi,%rax,4),%r13
xor    %ebx,%ebx
xor    %r15d,%r15d
jmp    152c <main+0x36c>
nopl   0x0(%rax)
add    $0x4,%rbx
add    $0x1,%ebp
cmp    %rbx,%r12
je     14f0 <main+0x330>
cmp    %rbx,%rdi
cmove  %r10d,%r15d
mov    0x60(%rsp),%rax
mov    (%rax,%rbx,1),%esi
imul   %r9d,%esi
add    %r15d,%esi
add    %r14d,%esi
mov    %esi,0x0(%r13,%rbx,1)
cmp    %r8d,%esi
jl     1520 <main+0x360>
lea    0x1(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xdcf(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x1,%r10d
mov    0x70(%rsp),%rdi
mov    0x44(%rsp),%r9d
mov    0x8(%rsp),%r8
jmp    1520 <main+0x360>
mov    %ebp,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rdi
mov    %rdi,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x18,%rdi
jae    15b1 <main+0x3f1>
movdqa 0xa5b(%rip),%xmm0
xor    %edi,%edi
mov    0x38(%rsp),%rbx
jmp    1688 <main+0x4c8>
and    $0xfffffffffffffffc,%rsi
movdqa 0xa43(%rip),%xmm0
xor    %edi,%edi
movdqa 0xa48(%rip),%xmm8
movdqa 0xa4f(%rip),%xmm9
movdqa 0xa56(%rip),%xmm10
movdqa 0xa5e(%rip),%xmm4
movdqa 0xa66(%rip),%xmm5
movdqa 0xa6e(%rip),%xmm6
movdqa 0xa76(%rip),%xmm7
movdqa 0xa7e(%rip),%xmm1
mov    0x38(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,(%rbx,%rdi,4)
movdqu %xmm2,0x10(%rbx,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%rbx,%rdi,4)
movdqu %xmm3,0x30(%rbx,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%rbx,%rdi,4)
movdqu %xmm3,0x50(%rbx,%rdi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%rbx,%rdi,4)
movdqu %xmm3,0x70(%rbx,%rdi,4)
add    $0x20,%rdi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rsi
jne    1610 <main+0x450>
test   %rdx,%rdx
je     16d0 <main+0x510>
lea    (%rbx,%rdi,4),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movdqa 0x96d(%rip),%xmm1
movdqa 0x975(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rsi,%rdi,1)
movdqu %xmm3,(%rsi,%rdi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    16b0 <main+0x4f0>
cmp    %rbp,%rax
je     16ec <main+0x52c>
mov    0x38(%rsp),%rdx
nopw   0x0(%rax,%rax,1)
mov    %eax,(%rdx,%rax,4)
add    $0x1,%rax
cmp    %rax,%rbp
jne    16e0 <main+0x520>
mov    0x10(%rsp),%rsi
add    $0x2,%rsi
mov    0x38(%rsp),%rbp
movl   $0x0,0x0(%rbp)
test   %r8d,%r8d
mov    0x40(%rsp),%eax
jle    18a4 <main+0x6e4>
movl   $0x0,0x0(%rbp)
cmp    $0x1,%r8d
je     18a4 <main+0x6e4>
sar    $0x3,%eax
mov    %r8d,%ecx
lea    -0x1(%rcx),%r8
mov    $0x1,%edx
cmp    $0x8,%r8
jb     1890 <main+0x6d0>
mov    %r8,%rdx
and    $0xfffffffffffffff8,%rdx
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm0
lea    -0x8(%rdx),%rdi
mov    %rdi,%r9
shr    $0x3,%r9
add    $0x1,%r9
pshufd $0xf5,%xmm0,%xmm1
test   %rdi,%rdi
je     1db3 <main+0xbf3>
movabs $0x3ffffffffffffffc,%rbx
ff ff 3f
or     $0x2,%rbx
and    %r9,%rbx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movdqu 0x4(%rbp,%rdi,4),%xmm3
movdqu 0x14(%rbp,%rdi,4),%xmm4
movdqu 0x24(%rbp,%rdi,4),%xmm5
movdqu 0x34(%rbp,%rdi,4),%xmm2
pshufd $0xf5,%xmm3,%xmm6
pmuludq %xmm0,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm1,%xmm6
pshufd $0xe8,%xmm6,%xmm6
punpckldq %xmm6,%xmm3
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm1,%xmm6
pshufd $0xe8,%xmm6,%xmm6
punpckldq %xmm6,%xmm4
movdqu %xmm3,0x4(%rbp,%rdi,4)
movdqu %xmm4,0x14(%rbp,%rdi,4)
pshufd $0xf5,%xmm5,%xmm3
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm4
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm4
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm2
movdqu %xmm4,0x24(%rbp,%rdi,4)
movdqu %xmm2,0x34(%rbp,%rdi,4)
add    $0x10,%rdi
add    $0xfffffffffffffffe,%rbx
jne    1780 <main+0x5c0>
test   $0x1,%r9b
je     1886 <main+0x6c6>
shl    $0x2,%rdi
or     $0x4,%rdi
movdqu 0x0(%rbp,%rdi,1),%xmm2
movdqu 0x10(%rbp,%rdi,1),%xmm3
pshufd $0xf5,%xmm2,%xmm4
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm1,%xmm4
pshufd $0xe8,%xmm4,%xmm4
punpckldq %xmm4,%xmm2
pmuludq %xmm3,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pshufd $0xf5,%xmm3,%xmm3
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm1
punpckldq %xmm1,%xmm0
movdqu %xmm2,0x0(%rbp,%rdi,1)
movdqu %xmm0,0x10(%rbp,%rdi,1)
cmp    %rdx,%r8
je     18a4 <main+0x6e4>
or     $0x1,%rdx
nop
mov    0x0(%rbp,%rdx,4),%edi
imul   %eax,%edi
mov    %edi,0x0(%rbp,%rdx,4)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1890 <main+0x6d0>
imul   0x20(%rsp),%rsi
mov    (%rsp),%edi
test   %edi,%edi
mov    %rsi,0x10(%rsp)
je     18f3 <main+0x733>
cmp    $0x1,%edi
mov    0x2708(%rip),%r12
jne    1949 <main+0x789>
mov    0x2723(%rip),%rax
mov    0x26ec(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x26d1(%rip),%rax
mov    0x26d2(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x26ef(%rip),%rax
jmp    191c <main+0x75c>
mov    0x26f6(%rip),%rax
mov    0x26bf(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x26ac(%rip),%rax
mov    (%rax),%ecx
mov    0x269b(%rip),%rax
mov    0x26ac(%rip),%r12
test   %edi,%edi
setne  %bl
or     (%rax),%ecx
xor    %edi,%edi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%r14
mov    0x266b(%rip),%rax
cmp    %r14,(%rax)
mov    0x58(%rsp),%r15
jne    1975 <main+0x7b5>
jmp    1950 <main+0x790>
xor    %ebx,%ebx
mov    0x58(%rsp),%r15
mov    (%r12),%edi
lea    0x9ed(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x9ec(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
mov    (%r12),%edi
lea    0x9e1(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r14,%r13
cmpl   $0x0,(%rsp)
je     1a7d <main+0x8bd>
test   %bl,%bl
je     19e0 <main+0x820>
mov    0x264e(%rip),%rax
mov    0x2617(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x25fc(%rip),%rax
mov    0x25fd(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x261a(%rip),%rax
or     (%rax),%ecx
xor    %edi,%edi
mov    0x10(%rsp),%rsi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%r13
shr    $0x3,%r15
mov    0x25bd(%rip),%rax
cmp    (%rax),%r13
jne    1a15 <main+0x855>
mov    (%r12),%edi
lea    0x94d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0x94c(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
imul   $0x64,0x1c(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    (%r12),%edi
lea    0x94a(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x10(%rsp),%rbx
mov    %rbx,%rbp
shr    $0x3,%rbp
mov    (%r12),%edi
lea    0x93b(%rip),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %rbx,%rbx
je     1c62 <main+0xaa2>
cmp    $0x2,%rbp
mov    $0x1,%eax
cmovae %rbp,%rax
cmp    $0x4,%rax
jae    1ac6 <main+0x906>
xor    %ecx,%ecx
jmp    1b70 <main+0x9b0>
mov    0x256c(%rip),%rax
mov    0x2535(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x251a(%rip),%rax
mov    0x251b(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
xor    %edi,%edi
mov    0x10(%rsp),%rsi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%r13
test   %bl,%bl
jne    199b <main+0x7db>
jmp    19e0 <main+0x820>
mov    %rax,%rcx
and    $0xfffffffffffffe00,%rcx
lea    -0x4(%rcx),%rdx
shr    $0x2,%rdx
lea    0xf0(%r14),%rsi
mov    $0xffffffffffffffff,%rdi
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,-0xf0(%rsi)
ff
movupd %xmm0,-0xe0(%rsi)
ff
movupd %xmm0,-0xd0(%rsi)
ff
movupd %xmm0,-0xc0(%rsi)
ff
movupd %xmm0,-0xb0(%rsi)
ff
movupd %xmm0,-0xa0(%rsi)
ff
movupd %xmm0,-0x90(%rsi)
ff
movupd %xmm0,-0x80(%rsi)
movupd %xmm0,-0x70(%rsi)
movupd %xmm0,-0x60(%rsi)
movupd %xmm0,-0x50(%rsi)
movupd %xmm0,-0x40(%rsi)
movupd %xmm0,-0x30(%rsi)
movupd %xmm0,-0x20(%rsi)
movupd %xmm0,-0x10(%rsi)
movupd %xmm0,(%rsi)
add    $0x100,%rsi
add    $0x8,%rdi
cmp    %rdx,%rdi
jne    1af0 <main+0x930>
cmp    %rcx,%rax
je     1b81 <main+0x9c1>
nopl   0x0(%rax)
movq   $0x0,(%r14,%rcx,8)
add    $0x1,%rcx
cmp    %rax,%rcx
jne    1b70 <main+0x9b0>
cmpq   $0x0,0x10(%rsp)
je     1c62 <main+0xaa2>
cmp    $0x2,%rbp
mov    $0x1,%ecx
cmovae %rbp,%rcx
cmp    $0x4,%rax
jae    1ba7 <main+0x9e7>
xor    %edx,%edx
jmp    1c50 <main+0xa90>
mov    %rax,%rdx
and    $0xfffffffffffffe00,%rdx
lea    -0x4(%rdx),%rsi
shr    $0x2,%rsi
lea    0xf0(%r13),%rdi
mov    $0xffffffffffffffff,%rbx
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movupd %xmm0,-0xf0(%rdi)
ff
movupd %xmm0,-0xe0(%rdi)
ff
movupd %xmm0,-0xd0(%rdi)
ff
movupd %xmm0,-0xc0(%rdi)
ff
movupd %xmm0,-0xb0(%rdi)
ff
movupd %xmm0,-0xa0(%rdi)
ff
movupd %xmm0,-0x90(%rdi)
ff
movupd %xmm0,-0x80(%rdi)
movupd %xmm0,-0x70(%rdi)
movupd %xmm0,-0x60(%rdi)
movupd %xmm0,-0x50(%rdi)
movupd %xmm0,-0x40(%rdi)
movupd %xmm0,-0x30(%rdi)
movupd %xmm0,-0x20(%rdi)
movupd %xmm0,-0x10(%rdi)
movupd %xmm0,(%rdi)
add    $0x100,%rdi
add    $0x8,%rbx
cmp    %rsi,%rbx
jne    1bd0 <main+0xa10>
cmp    %rdx,%rax
je     1c62 <main+0xaa2>
nopl   0x0(%rax)
movq   $0x0,0x0(%r13,%rdx,8)
add    $0x1,%rdx
cmp    %rcx,%rdx
jne    1c50 <main+0xa90>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    (%r12),%edi
lea    0x740(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
mov    0x54(%rsp),%ebx
mov    %ebx,%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
je     1cab <main+0xaeb>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
lea    0x755(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    1cbe <main+0xafe>
lea    0x729(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <err@plt>
lea    0x755(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x9c4000,%esi
mov    0x8(%rsp),%rbp
mov    %ebp,%edx
mov    0x40(%rsp),%ecx
mov    0x10(%rsp),%r8
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   10a0 <_rdtsc@plt>
mov    %rax,%r15
cmpl   $0x0,0x1c(%rsp)
mov    0x38(%rsp),%r12
jle    1d38 <main+0xb78>
mov    0x20(%rsp),%eax
cmp    $0x2,%eax
mov    $0x1,%ebx
cmovge %eax,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <_rdtsc@plt>
mov    $0x9c4000,%edi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r13,%rcx
mov    %r12,%r8
call   1030 <reader@plt>
xor    %eax,%eax
call   10a0 <_rdtsc@plt>
add    $0xffffffff,%ebx
jne    1d10 <main+0xb50>
movsd  (%rsp),%xmm0
mulsd  0x36b(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   10a0 <_rdtsc@plt>
sub    %r15,%rax
movq   %rax,%xmm1
punpckldq 0x32f(%rip),%xmm1
subpd  0x337(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x20(%rsp)
lea    0x70b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movapd 0x20(%rsp),%xmm0
divsd  (%rsp),%xmm0
lea    0x703(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r9b
jne    1830 <main+0x670>
jmp    1886 <main+0x6c6>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [109 x i8] c"the random walker requires at least 6 arguments (only the 7th in the list below is optional), there were %d\0A\00"
@.str.1 = [34 x i8] c"insufficient invocation arguments\00"
@.str.2 = [14 x i8] c"i:r:l:s:S:m:L\00"
@optarg = global i32 0
@.str.3 = [18 x i8] c"unknown option %c\00"
@.str.4 = [21 x i8] c"size_t in %zd bytes\0A\00"
@.str.5 = [23 x i8] c"failed to set affinity\00"
@.str.6 = [28 x i8] c" process pinned to core %d\0A\00"
@.str.7 = [41 x i8] c" failed to malloc pattern for size = %d\0A\00"
@.str.8 = [25 x i8] c"malloc of pattern failed\00"
@.str.9 = [52 x i8] c" failed to malloc index array for line_count of %d\0A\00"
@.str.10 = [23 x i8] c"failed to malloc index\00"
@.str.11 = [67 x i8] c" line count must be a multiple of the fifth argument num_seg = %d\0A\00"
@.str.12 = [16 x i8] c" bad line_count\00"
@.str.13 = [25 x i8] c" count = %d, index = %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_PRIVATE = global i32 0
@MAP_ANON = global i32 0
@MAP_HUGETLB = global i32 0
@MAP_FAILED = global i8* null
@.str.14 = [13 x i8] c"mmap failed\0A\00"
@.str.15 = [12 x i8] c"mmap failed\00"
@.str.16 = [18 x i8] c" buf1 for a = %p\0A\00"
@.str.17 = [18 x i8] c" buf1 for b = %p\0A\00"
@.str.18 = [54 x i8] c" buf_size = %zu, zero_loop = %zu, array_stride = %zd\0A\00"
@.str.19 = [32 x i8] c" finished zeroing buf for a, b\0A\00"
@.str.20 = [28 x i8] c"cannot set cpu run affinity\00"
@.str.21 = [35 x i8] c" process pinned to core %d to run\0A\00"
@.str.22 = [115 x i8] c" calling walker %d times which loops %d times on buffer of %d lines with a stride of %d, for a total size of %zu\0A\00"
@.str.23 = [17 x i8] c" run time = %zd\0A\00"
@.str.24 = [36 x i8] c" average cycles per iteration = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca double
%25 = alloca double*
%26 = alloca double*
%27 = alloca i64
%28 = alloca i64
%29 = alloca i64
%30 = alloca i64
%31 = alloca i64
%32 = alloca i64
%33 = alloca i64
%34 = alloca i32
%35 = alloca i64
%36 = alloca i64
%37 = alloca i64
%38 = alloca i64
%39 = alloca i64
%40 = alloca i64
%41 = alloca i64
%42 = alloca i64
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32*
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32*
%49 = alloca i32
%50 = alloca i32
%51 = alloca i32
%52 = alloca i32
%53 = alloca i32
%54 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %9
store i32 -1, i32* %18
store i32 0, i32* %19
store i32 10240000, i32* %20
store i32 100, i32* %21
store i32 1, i32* %22
store i32 0, i32* %23
store i64 0, i64* %33
store i32 0, i32* %34
store i32 32, i32* %51
store i32 0, i32* %52
store i64 4096, i64* %41
%55 = load i32, i32* %4
%56 = icmp slt i32 %55, 6
br i1 %56, label %57, label %63
57: ; preds = %2
%58 = load i32, i32* @stderr
%59 = load i32, i32* %4
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = call i32 (...) @usage()
%62 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %63
63: ; preds = %57, %2
br label %64
64: ; preds = %93, %63
%65 = load i32, i32* %4
%66 = load i8**, i8*** %5
%67 = call i32 @getopt(i32 %65, i8** %66, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store i32 %67, i32* %47
%68 = icmp ne i32 %67, -1
br i1 %68, label %69, label %94
69: ; preds = %64
%70 = load i32, i32* %47
switch i32 %70, label %90 [
i32 105, label %71
i32 114, label %74
i32 108, label %77
i32 115, label %80
i32 83, label %83
i32 109, label %86
i32 76, label %89
]
71: ; preds = %69
%72 = load i32, i32* @optarg
%73 = call i32 @atoi(i32 %72)
store i32 %73, i32* %14
br label %93
74: ; preds = %69
%75 = load i32, i32* @optarg
%76 = call i32 @atoi(i32 %75)
store i32 %76, i32* %15
br label %93
77: ; preds = %69
%78 = load i32, i32* @optarg
%79 = call i32 @atoi(i32 %78)
store i32 %79, i32* %16
br label %93
80: ; preds = %69
%81 = load i32, i32* @optarg
%82 = call i32 @atoi(i32 %81)
store i32 %82, i32* %17
br label %93
83: ; preds = %69
%84 = load i32, i32* @optarg
%85 = call i32 @atoi(i32 %84)
store i32 %85, i32* %51
br label %93
86: ; preds = %69
%87 = load i32, i32* @optarg
%88 = call i32 @atoi(i32 %87)
store i32 %88, i32* %22
br label %93
89: ; preds = %69
store i32 1, i32* %52
store i64 2097152, i64* %41
br label %93
90: ; preds = %69
%91 = load i32, i32* %47
%92 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %91)
br label %93
93: ; preds = %90, %89, %86, %83, %80, %77, %74, %71
br label %64
94: ; preds = %64
%95 = load i32, i32* %21
%96 = load i32, i32* %22
%97 = mul nsw i32 %95, %96
store i32 %97, i32* %21
store i64 8, i64* %42
%98 = load i32, i32* @stderr
%99 = load i64, i64* %42
%100 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %99)
%101 = load i32, i32* %34
%102 = load i32, i32* %14
%103 = call i32 @pin_cpu(i32 %101, i32 %102)
%104 = icmp eq i32 %103, -1
br i1 %104, label %105, label %107
105: ; preds = %94
%106 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %111
107: ; preds = %94
%108 = load i32, i32* @stderr
%109 = load i32, i32* %14
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %108, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %109)
br label %111
111: ; preds = %107, %105
%112 = load i32, i32* %51
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 4
%115 = trunc i64 %114 to i32
%116 = call i64 @malloc(i32 %115)
%117 = inttoptr i64 %116 to i32*
store i32* %117, i32** %45
%118 = load i32*, i32** %45
%119 = icmp eq i32* %118, null
br i1 %119, label %120, label %125
120: ; preds = %111
%121 = load i32, i32* @stderr
%122 = load i32, i32* %51
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32 %122)
%124 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %125
125: ; preds = %120, %111
%126 = load i64, i64* %41
%127 = load i32, i32* %17
%128 = sext i32 %127 to i64
%129 = mul i64 %126, %128
%130 = add i64 %129, 64
%131 = trunc i64 %130 to i32
store i32 %131, i32* %17
%132 = load i32, i32* %16
%133 = sext i32 %132 to i64
%134 = load i32, i32* %17
%135 = sext i32 %134 to i64
%136 = mul i64 %133, %135
store i64 %136, i64* %35
%137 = load i64, i64* %35
%138 = load i64, i64* %41
%139 = udiv i64 %137, %138
%140 = add i64 %139, 2
store i64 %140, i64* %40
%141 = load i64, i64* %41
%142 = load i64, i64* %40
%143 = mul i64 %141, %142
store i64 %143, i64* %35
%144 = load i32, i32* %17
%145 = sext i32 %144 to i64
%146 = udiv i64 %145, 8
store i64 %146, i64* %10
%147 = load i32, i32* %21
%148 = sitofp i32 %147 to double
%149 = load i32, i32* %20
%150 = sitofp i32 %149 to double
%151 = fmul double %148, %150
store double %151, double* %24
%152 = load i32, i32* %16
%153 = sext i32 %152 to i64
%154 = mul i64 %153, 4
%155 = trunc i64 %154 to i32
%156 = call i64 @malloc(i32 %155)
%157 = inttoptr i64 %156 to i32*
store i32* %157, i32** %48
%158 = load i32*, i32** %48
%159 = icmp eq i32* %158, null
br i1 %159, label %160, label %165
160: ; preds = %125
%161 = load i32, i32* @stderr
%162 = load i32, i32* %16
%163 = call i32 (i32, i8*, ...) @fprintf(i32 %161, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0), i32 %162)
%164 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
br label %165
165: ; preds = %160, %125
%166 = load i32, i32* %51
%167 = icmp eq i32 %166, 1
br i1 %167, label %168, label %184
168: ; preds = %165
store i32 0, i32* %11
br label %169
169: ; preds = %180, %168
%170 = load i32, i32* %11
%171 = load i32, i32* %16
%172 = sub nsw i32 %171, 1
%173 = icmp slt i32 %170, %172
br i1 %173, label %174, label %183
174: ; preds = %169
%175 = load i32, i32* %11
%176 = load i32*, i32** %48
%177 = load i32, i32* %11
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds i32, i32* %176, i64 %178
store i32 %175, i32* %179
br label %180
180: ; preds = %174
%181 = load i32, i32* %11
%182 = add nsw i32 %181, 1
store i32 %182, i32* %11
br label %169
183: ; preds = %169
br label %267
184: ; preds = %165
%185 = load i32*, i32** %45
%186 = load i32, i32* %51
%187 = call i32 @rndm_list(i32* %185, i32 %186)
%188 = load i32, i32* %16
%189 = load i32, i32* %51
%190 = sdiv i32 %188, %189
store i32 %190, i32* %49
%191 = load i32, i32* %49
%192 = load i32, i32* %51
%193 = mul nsw i32 %191, %192
%194 = load i32, i32* %16
%195 = icmp ne i32 %193, %194
br i1 %195, label %196, label %201
196: ; preds = %184
%197 = load i32, i32* @stderr
%198 = load i32, i32* %51
%199 = call i32 (i32, i8*, ...) @fprintf(i32 %197, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0), i32 %198)
%200 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %201
201: ; preds = %196, %184
store i32 0, i32* %50
%202 = load i64, i64* %35
%203 = load i32, i32* %51
%204 = sext i32 %203 to i64
%205 = udiv i64 %202, %204
store i64 %205, i64* %38
store i32 0, i32* %11
br label %206
206: ; preds = %263, %201
%207 = load i32, i32* %11
%208 = load i32, i32* %49
%209 = icmp slt i32 %207, %208
br i1 %209, label %210, label %266
210: ; preds = %206
store i32 0, i32* %46
store i32 0, i32* %12
br label %211
211: ; preds = %259, %210
%212 = load i32, i32* %12
%213 = load i32, i32* %51
%214 = icmp slt i32 %212, %213
br i1 %214, label %215, label %262
215: ; preds = %211
%216 = load i32, i32* %50
%217 = add nsw i32 %216, 1
store i32 %217, i32* %50
%218 = load i32, i32* %12
%219 = load i32, i32* %51
%220 = sub nsw i32 %219, 1
%221 = icmp eq i32 %218, %220
br i1 %221, label %222, label %223
222: ; preds = %215
store i32 1, i32* %46
br label %223
223: ; preds = %222, %215
%224 = load i32, i32* %49
%225 = load i32*, i32** %45
%226 = load i32, i32* %12
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds i32, i32* %225, i64 %227
%229 = load i32, i32* %228
%230 = mul nsw i32 %224, %229
%231 = sext i32 %230 to i64
store i64 %231, i64* %39
%232 = load i64, i64* %39
%233 = trunc i64 %232 to i32
%234 = load i32, i32* %11
%235 = add nsw i32 %233, %234
%236 = load i32, i32* %46
%237 = add nsw i32 %235, %236
%238 = load i32*, i32** %48
%239 = load i32, i32* %50
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i32, i32* %238, i64 %240
store i32 %237, i32* %241
%242 = load i32*, i32** %48
%243 = load i32, i32* %50
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i32, i32* %242, i64 %244
%246 = load i32, i32* %245
%247 = load i32, i32* %16
%248 = icmp sge i32 %246, %247
br i1 %248, label %249, label %258
249: ; preds = %223
%250 = load i32, i32* %50
%251 = sitofp i32 %250 to double
%252 = load i32*, i32** %48
%253 = load i32, i32* %50
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds i32, i32* %252, i64 %254
%256 = load i32, i32* %255
%257 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), double %251, i32 %256)
br label %258
258: ; preds = %249, %223
br label %259
259: ; preds = %258
%260 = load i32, i32* %12
%261 = add nsw i32 %260, 1
store i32 %261, i32* %12
br label %211
262: ; preds = %211
br label %263
263: ; preds = %262
%264 = load i32, i32* %11
%265 = add nsw i32 %264, 1
store i32 %265, i32* %11
br label %206
266: ; preds = %206
br label %267
267: ; preds = %266, %183
%268 = load i32*, i32** %48
%269 = getelementptr inbounds i32, i32* %268, i64 0
store i32 0, i32* %269
store i32 0, i32* %11
br label %270
270: ; preds = %288, %267
%271 = load i32, i32* %11
%272 = load i32, i32* %16
%273 = icmp slt i32 %271, %272
br i1 %273, label %274, label %291
274: ; preds = %270
%275 = load i32*, i32** %48
%276 = load i32, i32* %11
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds i32, i32* %275, i64 %277
%279 = load i32, i32* %278
%280 = sext i32 %279 to i64
%281 = load i64, i64* %10
%282 = mul i64 %280, %281
%283 = trunc i64 %282 to i32
%284 = load i32*, i32** %48
%285 = load i32, i32* %11
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds i32, i32* %284, i64 %286
store i32 %283, i32* %287
br label %288
288: ; preds = %274
%289 = load i32, i32* %11
%290 = add nsw i32 %289, 1
store i32 %290, i32* %11
br label %270
291: ; preds = %270
%292 = load i32, i32* %52
%293 = icmp eq i32 %292, 0
br i1 %293, label %294, label %306
294: ; preds = %291
%295 = load i64, i64* %35
%296 = load i32, i32* @PROT_READ
%297 = load i32, i32* @PROT_WRITE
%298 = or i32 %296, %297
%299 = load i32, i32* @MAP_PRIVATE
%300 = load i32, i32* @MAP_ANON
%301 = or i32 %299, %300
%302 = load i32, i32* %18
%303 = load i32, i32* %19
%304 = call i64 @mmap(i32* null, i64 %295, i32 %298, i32 %301, i32 %302, i32 %303)
%305 = inttoptr i64 %304 to i8*
store i8* %305, i8** %6
br label %306
306: ; preds = %294, %291
%307 = load i32, i32* %52
%308 = icmp eq i32 %307, 1
br i1 %308, label %309, label %323
309: ; preds = %306
%310 = load i64, i64* %35
%311 = load i32, i32* @PROT_READ
%312 = load i32, i32* @PROT_WRITE
%313 = or i32 %311, %312
%314 = load i32, i32* @MAP_PRIVATE
%315 = load i32, i32* @MAP_ANON
%316 = or i32 %314, %315
%317 = load i32, i32* @MAP_HUGETLB
%318 = or i32 %316, %317
%319 = load i32, i32* %18
%320 = load i32, i32* %19
%321 = call i64 @mmap(i32* null, i64 %310, i32 %313, i32 %318, i32 %319, i32 %320)
%322 = inttoptr i64 %321 to i8*
store i8* %322, i8** %6
br label %323
323: ; preds = %309, %306
%324 = load i8*, i8** %6
%325 = load i8*, i8** @MAP_FAILED
%326 = icmp eq i8* %324, %325
br i1 %326, label %327, label %331
327: ; preds = %323
%328 = load i32, i32* @stderr
%329 = call i32 (i32, i8*, ...) @fprintf(i32 %328, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%330 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
br label %331
331: ; preds = %327, %323
%332 = load i32, i32* @stderr
%333 = load i8*, i8** %6
%334 = call i32 (i32, i8*, ...) @fprintf(i32 %332, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i8* %333)
%335 = load i8*, i8** %6
%336 = bitcast i8* %335 to double*
store double* %336, double** %25
%337 = load i32, i32* %52
%338 = icmp eq i32 %337, 0
br i1 %338, label %339, label %351
339: ; preds = %331
%340 = load i64, i64* %35
%341 = load i32, i32* @PROT_READ
%342 = load i32, i32* @PROT_WRITE
%343 = or i32 %341, %342
%344 = load i32, i32* @MAP_PRIVATE
%345 = load i32, i32* @MAP_ANON
%346 = or i32 %344, %345
%347 = load i32, i32* %18
%348 = load i32, i32* %19
%349 = call i64 @mmap(i32* null, i64 %340, i32 %343, i32 %346, i32 %347, i32 %348)
%350 = inttoptr i64 %349 to i8*
store i8* %350, i8** %6
br label %351
351: ; preds = %339, %331
%352 = load i32, i32* %52
%353 = icmp eq i32 %352, 1
br i1 %353, label %354, label %368
354: ; preds = %351
%355 = load i64, i64* %35
%356 = load i32, i32* @PROT_READ
%357 = load i32, i32* @PROT_WRITE
%358 = or i32 %356, %357
%359 = load i32, i32* @MAP_PRIVATE
%360 = load i32, i32* @MAP_ANON
%361 = or i32 %359, %360
%362 = load i32, i32* @MAP_HUGETLB
%363 = or i32 %361, %362
%364 = load i32, i32* %18
%365 = load i32, i32* %19
%366 = call i64 @mmap(i32* null, i64 %355, i32 %358, i32 %363, i32 %364, i32 %365)
%367 = inttoptr i64 %366 to i8*
store i8* %367, i8** %6
br label %368
368: ; preds = %354, %351
%369 = load i8*, i8** %6
%370 = load i8*, i8** @MAP_FAILED
%371 = icmp eq i8* %369, %370
br i1 %371, label %372, label %376
372: ; preds = %368
%373 = load i32, i32* @stderr
%374 = call i32 (i32, i8*, ...) @fprintf(i32 %373, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%375 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
br label %376
376: ; preds = %372, %368
%377 = load i32, i32* @stderr
%378 = load i8*, i8** %6
%379 = call i32 (i32, i8*, ...) @fprintf(i32 %377, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i8* %378)
%380 = load i8*, i8** %6
%381 = bitcast i8* %380 to double*
store double* %381, double** %26
%382 = load i64, i64* %35
%383 = udiv i64 %382, 8
store i64 %383, i64* %37
%384 = load i32, i32* @stderr
%385 = load i64, i64* %35
%386 = load i64, i64* %37
%387 = load i64, i64* %10
%388 = call i32 (i32, i8*, ...) @fprintf(i32 %384, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.18, i64 0, i64 0), i64 %385, i64 %386, i64 %387)
store i32 0, i32* %11
br label %389
389: ; preds = %399, %376
%390 = load i32, i32* %11
%391 = sext i32 %390 to i64
%392 = load i64, i64* %37
%393 = icmp ult i64 %391, %392
br i1 %393, label %394, label %402
394: ; preds = %389
%395 = load double*, double** %25
%396 = load i32, i32* %11
%397 = sext i32 %396 to i64
%398 = getelementptr inbounds double, double* %395, i64 %397
store double 0.000000e+00, double* %398
br label %399
399: ; preds = %394
%400 = load i32, i32* %11
%401 = add nsw i32 %400, 1
store i32 %401, i32* %11
br label %389
402: ; preds = %389
store i32 0, i32* %11
br label %403
403: ; preds = %413, %402
%404 = load i32, i32* %11
%405 = sext i32 %404 to i64
%406 = load i64, i64* %37
%407 = icmp ult i64 %405, %406
br i1 %407, label %408, label %416
408: ; preds = %403
%409 = load double*, double** %26
%410 = load i32, i32* %11
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds double, double* %409, i64 %411
store double 0.000000e+00, double* %412
br label %413
413: ; preds = %408
%414 = load i32, i32* %11
%415 = add nsw i32 %414, 1
store i32 %415, i32* %11
br label %403
416: ; preds = %403
%417 = load i32, i32* @stderr
%418 = call i32 (i32, i8*, ...) @fprintf(i32 %417, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0))
%419 = load i32, i32* %34
%420 = load i32, i32* %15
%421 = call i32 @pin_cpu(i32 %419, i32 %420)
%422 = icmp eq i32 %421, -1
br i1 %422, label %423, label %425
423: ; preds = %416
%424 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.20, i64 0, i64 0))
br label %429
425: ; preds = %416
%426 = load i32, i32* %15
%427 = sitofp i32 %426 to double
%428 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), double %427)
br label %429
429: ; preds = %425, %423
%430 = load i32, i32* %21
%431 = sitofp i32 %430 to double
%432 = load i32, i32* %20
%433 = load i32, i32* %16
%434 = load i32, i32* %17
%435 = load i64, i64* %35
%436 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.22, i64 0, i64 0), double %431, i32 %432, i32 %433, i32 %434, i64 %435)
%437 = call i64 (...) @_rdtsc()
store i64 %437, i64* %30
store i32 0, i32* %11
br label %438
438: ; preds = %454, %429
%439 = load i32, i32* %11
%440 = load i32, i32* %21
%441 = icmp slt i32 %439, %440
br i1 %441, label %442, label %457
442: ; preds = %438
%443 = call i64 (...) @_rdtsc()
store i64 %443, i64* %27
%444 = load i32, i32* %20
%445 = load i32, i32* %16
%446 = load double*, double** %25
%447 = load double*, double** %26
%448 = load i32*, i32** %48
%449 = call i64 @reader(i32 %444, i32 %445, double* %446, double* %447, i32* %448)
store i64 %449, i64* %9
%450 = call i64 (...) @_rdtsc()
store i64 %450, i64* %28
%451 = load i64, i64* %28
%452 = load i64, i64* %27
%453 = sub i64 %451, %452
store i64 %453, i64* %29
br label %454
454: ; preds = %442
%455 = load i32, i32* %11
%456 = add nsw i32 %455, 1
store i32 %456, i32* %11
br label %438
457: ; preds = %438
%458 = call i64 (...) @_rdtsc()
store i64 %458, i64* %31
%459 = load i64, i64* %31
%460 = load i64, i64* %30
%461 = sub i64 %459, %460
store i64 %461, i64* %32
%462 = load i64, i64* %32
%463 = uitofp i64 %462 to double
%464 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), double %463)
%465 = load i64, i64* %32
%466 = uitofp i64 %465 to double
%467 = load double, double* %24
%468 = fdiv double %466, %467
%469 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), double %468)
%470 = load i32, i32* %23
ret i32 %470
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [109 x i8] c"the random walker requires at least 6 arguments (only the 7th in the list below is optional), there were %d\0A\00"
@.str.1 = [34 x i8] c"insufficient invocation arguments\00"
@.str.2 = [14 x i8] c"i:r:l:s:S:m:L\00"
@optarg = global i32 0
@.str.3 = [18 x i8] c"unknown option %c\00"
@.str.4 = [21 x i8] c"size_t in %zd bytes\0A\00"
@.str.5 = [23 x i8] c"failed to set affinity\00"
@.str.6 = [28 x i8] c" process pinned to core %d\0A\00"
@.str.7 = [41 x i8] c" failed to malloc pattern for size = %d\0A\00"
@.str.8 = [25 x i8] c"malloc of pattern failed\00"
@.str.9 = [52 x i8] c" failed to malloc index array for line_count of %d\0A\00"
@.str.10 = [23 x i8] c"failed to malloc index\00"
@.str.11 = [67 x i8] c" line count must be a multiple of the fifth argument num_seg = %d\0A\00"
@.str.12 = [16 x i8] c" bad line_count\00"
@.str.13 = [25 x i8] c" count = %d, index = %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_PRIVATE = global i32 0
@MAP_ANON = global i32 0
@MAP_HUGETLB = global i32 0
@MAP_FAILED = global i8* null
@.str.14 = [13 x i8] c"mmap failed\0A\00"
@.str.15 = [12 x i8] c"mmap failed\00"
@.str.16 = [18 x i8] c" buf1 for a = %p\0A\00"
@.str.17 = [18 x i8] c" buf1 for b = %p\0A\00"
@.str.18 = [54 x i8] c" buf_size = %zu, zero_loop = %zu, array_stride = %zd\0A\00"
@.str.19 = [32 x i8] c" finished zeroing buf for a, b\0A\00"
@.str.20 = [28 x i8] c"cannot set cpu run affinity\00"
@.str.21 = [35 x i8] c" process pinned to core %d to run\0A\00"
@.str.22 = [115 x i8] c" calling walker %d times which loops %d times on buffer of %d lines with a stride of %d, for a total size of %zu\0A\00"
@.str.23 = [17 x i8] c" run time = %zd\0A\00"
@.str.24 = [36 x i8] c" average cycles per iteration = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 6
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = tail call i32 (...) @usage()
%8 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %4, %2
br label %10
10: ; preds = %20, %9
%11 = phi i32 [ 1, %9 ], [ %21, %20 ]
%12 = phi i64 [ 4096, %9 ], [ %22, %20 ]
%13 = phi i32 [ undef, %9 ], [ %23, %20 ]
%14 = phi i32 [ undef, %9 ], [ %24, %20 ]
%15 = phi i32 [ undef, %9 ], [ %25, %20 ]
%16 = phi i32 [ undef, %9 ], [ %26, %20 ]
%17 = phi i32 [ 32, %9 ], [ %27, %20 ]
%18 = phi i32 [ 0, %9 ], [ %28, %20 ]
%19 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
switch i32 %19, label %47 [
i32 -1, label %49
i32 105, label %29
i32 114, label %32
i32 108, label %35
i32 115, label %38
i32 83, label %41
i32 109, label %44
i32 76, label %20
]
20: ; preds = %10, %47, %44, %41, %38, %35, %32, %29
%21 = phi i32 [ %11, %47 ], [ %46, %44 ], [ %11, %41 ], [ %11, %38 ], [ %11, %35 ], [ %11, %32 ], [ %11, %29 ], [ %11, %10 ]
%22 = phi i64 [ %12, %47 ], [ %12, %44 ], [ %12, %41 ], [ %12, %38 ], [ %12, %35 ], [ %12, %32 ], [ %12, %29 ], [ 2097152, %10 ]
%23 = phi i32 [ %13, %47 ], [ %13, %44 ], [ %13, %41 ], [ %40, %38 ], [ %13, %35 ], [ %13, %32 ], [ %13, %29 ], [ %13, %10 ]
%24 = phi i32 [ %14, %47 ], [ %14, %44 ], [ %14, %41 ], [ %14, %38 ], [ %37, %35 ], [ %14, %32 ], [ %14, %29 ], [ %14, %10 ]
%25 = phi i32 [ %15, %47 ], [ %15, %44 ], [ %15, %41 ], [ %15, %38 ], [ %15, %35 ], [ %34, %32 ], [ %15, %29 ], [ %15, %10 ]
%26 = phi i32 [ %16, %47 ], [ %16, %44 ], [ %16, %41 ], [ %16, %38 ], [ %16, %35 ], [ %16, %32 ], [ %31, %29 ], [ %16, %10 ]
%27 = phi i32 [ %17, %47 ], [ %17, %44 ], [ %43, %41 ], [ %17, %38 ], [ %17, %35 ], [ %17, %32 ], [ %17, %29 ], [ %17, %10 ]
%28 = phi i32 [ %18, %47 ], [ %18, %44 ], [ %18, %41 ], [ %18, %38 ], [ %18, %35 ], [ %18, %32 ], [ %18, %29 ], [ 1, %10 ]
br label %10
29: ; preds = %10
%30 = load i32, i32* @optarg
%31 = tail call i32 @atoi(i32 %30)
br label %20
32: ; preds = %10
%33 = load i32, i32* @optarg
%34 = tail call i32 @atoi(i32 %33)
br label %20
35: ; preds = %10
%36 = load i32, i32* @optarg
%37 = tail call i32 @atoi(i32 %36)
br label %20
38: ; preds = %10
%39 = load i32, i32* @optarg
%40 = tail call i32 @atoi(i32 %39)
br label %20
41: ; preds = %10
%42 = load i32, i32* @optarg
%43 = tail call i32 @atoi(i32 %42)
br label %20
44: ; preds = %10
%45 = load i32, i32* @optarg
%46 = tail call i32 @atoi(i32 %45)
br label %20
47: ; preds = %10
%48 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %19)
br label %20
49: ; preds = %10
%50 = mul i32 %11, 100
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 8)
%53 = tail call i32 @pin_cpu(i32 0, i32 %16)
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %57
55: ; preds = %49
%56 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %60
57: ; preds = %49
%58 = load i32, i32* @stderr
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %16)
br label %60
60: ; preds = %57, %55
%61 = shl i32 %17, 2
%62 = tail call i64 @malloc(i32 %61)
%63 = inttoptr i64 %62 to i32*
%64 = icmp eq i64 %62, 0
br i1 %64, label %65, label %69
65: ; preds = %60
%66 = load i32, i32* @stderr
%67 = tail call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32 %17)
%68 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %69
69: ; preds = %65, %60
%70 = trunc i64 %12 to i32
%71 = mul i32 %13, %70
%72 = or i32 %71, 64
%73 = sext i32 %14 to i64
%74 = sext i32 %72 to i64
%75 = mul nsw i64 %74, %73
%76 = udiv i64 %75, %12
%77 = add i64 %76, 2
%78 = mul i64 %77, %12
%79 = lshr exact i64 %74, 3
%80 = sitofp i32 %50 to double
%81 = shl i32 %14, 2
%82 = tail call i64 @malloc(i32 %81)
%83 = inttoptr i64 %82 to i32*
%84 = icmp eq i64 %82, 0
br i1 %84, label %85, label %89
85: ; preds = %69
%86 = load i32, i32* @stderr
%87 = tail call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0), i32 %14)
%88 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
br label %89
89: ; preds = %85, %69
%90 = icmp eq i32 %17, 1
br i1 %90, label %91, label %167
91: ; preds = %89
%92 = icmp sgt i32 %14, 1
br i1 %92, label %93, label %215
93: ; preds = %91
%94 = add nsw i32 %14, -1
%95 = zext i32 %94 to i64
%96 = icmp ult i32 %94, 8
br i1 %96, label %159, label %97
97: ; preds = %93
%98 = and i64 %95, 4294967288
%99 = add nsw i64 %98, -8
%100 = lshr exact i64 %99, 3
%101 = add nuw nsw i64 %100, 1
%102 = and i64 %101, 3
%103 = icmp ult i64 %99, 24
br i1 %103, label %140, label %104
104: ; preds = %97
%105 = and i64 %101, 4611686018427387900
br label %106
106: ; preds = %106, %104
%107 = phi i64 [ 0, %104 ], [ %136, %106 ]
%108 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %104 ], [ %137, %106 ]
%109 = phi i64 [ 0, %104 ], [ %138, %106 ]
%110 = add <4 x i32> %108, <i32 4, i32 4, i32 4, i32 4>
%111 = getelementptr inbounds i32, i32* %83, i64 %107
%112 = bitcast i32* %111 to <4 x i32>*
store <4 x i32> %108, <4 x i32>* %112
%113 = getelementptr inbounds i32, i32* %111, i64 4
%114 = bitcast i32* %113 to <4 x i32>*
store <4 x i32> %110, <4 x i32>* %114
%115 = or i64 %107, 8
%116 = add <4 x i32> %108, <i32 8, i32 8, i32 8, i32 8>
%117 = add <4 x i32> %108, <i32 12, i32 12, i32 12, i32 12>
%118 = getelementptr inbounds i32, i32* %83, i64 %115
%119 = bitcast i32* %118 to <4 x i32>*
store <4 x i32> %116, <4 x i32>* %119
%120 = getelementptr inbounds i32, i32* %118, i64 4
%121 = bitcast i32* %120 to <4 x i32>*
store <4 x i32> %117, <4 x i32>* %121
%122 = or i64 %107, 16
%123 = add <4 x i32> %108, <i32 16, i32 16, i32 16, i32 16>
%124 = add <4 x i32> %108, <i32 20, i32 20, i32 20, i32 20>
%125 = getelementptr inbounds i32, i32* %83, i64 %122
%126 = bitcast i32* %125 to <4 x i32>*
store <4 x i32> %123, <4 x i32>* %126
%127 = getelementptr inbounds i32, i32* %125, i64 4
%128 = bitcast i32* %127 to <4 x i32>*
store <4 x i32> %124, <4 x i32>* %128
%129 = or i64 %107, 24
%130 = add <4 x i32> %108, <i32 24, i32 24, i32 24, i32 24>
%131 = add <4 x i32> %108, <i32 28, i32 28, i32 28, i32 28>
%132 = getelementptr inbounds i32, i32* %83, i64 %129
%133 = bitcast i32* %132 to <4 x i32>*
store <4 x i32> %130, <4 x i32>* %133
%134 = getelementptr inbounds i32, i32* %132, i64 4
%135 = bitcast i32* %134 to <4 x i32>*
store <4 x i32> %131, <4 x i32>* %135
%136 = add nuw i64 %107, 32
%137 = add <4 x i32> %108, <i32 32, i32 32, i32 32, i32 32>
%138 = add i64 %109, 4
%139 = icmp eq i64 %138, %105
br i1 %139, label %140, label %106
140: ; preds = %106, %97
%141 = phi i64 [ 0, %97 ], [ %136, %106 ]
%142 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %97 ], [ %137, %106 ]
%143 = icmp eq i64 %102, 0
br i1 %143, label %157, label %144
144: ; preds = %140, %144
%145 = phi i64 [ %153, %144 ], [ %141, %140 ]
%146 = phi <4 x i32> [ %154, %144 ], [ %142, %140 ]
%147 = phi i64 [ %155, %144 ], [ 0, %140 ]
%148 = add <4 x i32> %146, <i32 4, i32 4, i32 4, i32 4>
%149 = getelementptr inbounds i32, i32* %83, i64 %145
%150 = bitcast i32* %149 to <4 x i32>*
store <4 x i32> %146, <4 x i32>* %150
%151 = getelementptr inbounds i32, i32* %149, i64 4
%152 = bitcast i32* %151 to <4 x i32>*
store <4 x i32> %148, <4 x i32>* %152
%153 = add nuw i64 %145, 8
%154 = add <4 x i32> %146, <i32 8, i32 8, i32 8, i32 8>
%155 = add i64 %147, 1
%156 = icmp eq i64 %155, %102
br i1 %156, label %157, label %144
157: ; preds = %144, %140
%158 = icmp eq i64 %98, %95
br i1 %158, label %215, label %159
159: ; preds = %93, %157
%160 = phi i64 [ 0, %93 ], [ %98, %157 ]
br label %161
161: ; preds = %159, %161
%162 = phi i64 [ %165, %161 ], [ %160, %159 ]
%163 = getelementptr inbounds i32, i32* %83, i64 %162
%164 = trunc i64 %162 to i32
store i32 %164, i32* %163
%165 = add nuw nsw i64 %162, 1
%166 = icmp eq i64 %165, %95
br i1 %166, label %215, label %161
167: ; preds = %89
%168 = tail call i32 @rndm_list(i32* %63, i32 %17)
%169 = sdiv i32 %14, %17
%170 = mul nsw i32 %169, %17
%171 = icmp eq i32 %170, %14
br i1 %171, label %176, label %172
172: ; preds = %167
%173 = load i32, i32* @stderr
%174 = tail call i32 (i32, i8*, ...) @fprintf(i32 %173, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0), i32 %17)
%175 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %176
176: ; preds = %172, %167
%177 = icmp sgt i32 %169, 0
br i1 %177, label %178, label %215
178: ; preds = %176
%179 = icmp sgt i32 %17, 0
%180 = add nsw i32 %17, -1
%181 = zext i32 %180 to i64
%182 = zext i32 %17 to i64
br label %183
183: ; preds = %178, %211
%184 = phi i32 [ 0, %178 ], [ %212, %211 ]
%185 = phi i32 [ 0, %178 ], [ %213, %211 ]
br i1 %179, label %186, label %211
186: ; preds = %183
%187 = sext i32 %184 to i64
br label %188
188: ; preds = %186, %206
%189 = phi i64 [ 0, %186 ], [ %207, %206 ]
%190 = phi i64 [ %187, %186 ], [ %192, %206 ]
%191 = phi i32 [ 0, %186 ], [ %194, %206 ]
%192 = add nsw i64 %190, 1
%193 = icmp eq i64 %189, %181
%194 = select i1 %193, i32 1, i32 %191
%195 = getelementptr inbounds i32, i32* %63, i64 %189
%196 = load i32, i32* %195
%197 = mul nsw i32 %196, %169
%198 = add i32 %194, %185
%199 = add i32 %198, %197
%200 = getelementptr inbounds i32, i32* %83, i64 %192
store i32 %199, i32* %200
%201 = icmp slt i32 %199, %14
br i1 %201, label %206, label %202
202: ; preds = %188
%203 = trunc i64 %192 to i32
%204 = sitofp i32 %203 to double
%205 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), double %204, i32 %199)
br label %206
206: ; preds = %188, %202
%207 = add nuw nsw i64 %189, 1
%208 = icmp eq i64 %207, %182
br i1 %208, label %209, label %188
209: ; preds = %206
%210 = trunc i64 %192 to i32
br label %211
211: ; preds = %209, %183
%212 = phi i32 [ %184, %183 ], [ %210, %209 ]
%213 = add nuw nsw i32 %185, 1
%214 = icmp eq i32 %213, %169
br i1 %214, label %215, label %183
215: ; preds = %211, %161, %157, %176, %91
store i32 0, i32* %83
%216 = icmp sgt i32 %14, 0
br i1 %216, label %217, label %293
217: ; preds = %215
%218 = ashr exact i32 %72, 3
%219 = zext i32 %14 to i64
store i32 0, i32* %83
%220 = icmp eq i32 %14, 1
br i1 %220, label %293, label %221
221: ; preds = %217
%222 = add nsw i64 %219, -1
%223 = icmp ult i64 %222, 8
br i1 %223, label %283, label %224
224: ; preds = %221
%225 = and i64 %222, -8
%226 = or i64 %225, 1
%227 = insertelement <4 x i32> poison, i32 %218, i64 0
%228 = shufflevector <4 x i32> %227, <4 x i32> poison, <4 x i32> zeroinitializer
%229 = insertelement <4 x i32> poison, i32 %218, i64 0
%230 = shufflevector <4 x i32> %229, <4 x i32> poison, <4 x i32> zeroinitializer
%231 = add nsw i64 %225, -8
%232 = lshr exact i64 %231, 3
%233 = add nuw nsw i64 %232, 1
%234 = and i64 %233, 1
%235 = icmp eq i64 %231, 0
br i1 %235, label %266, label %236
236: ; preds = %224
%237 = and i64 %233, 4611686018427387902
br label %238
238: ; preds = %238, %236
%239 = phi i64 [ 0, %236 ], [ %263, %238 ]
%240 = phi i64 [ 0, %236 ], [ %264, %238 ]
%241 = or i64 %239, 1
%242 = getelementptr inbounds i32, i32* %83, i64 %241
%243 = bitcast i32* %242 to <4 x i32>*
%244 = load <4 x i32>, <4 x i32>* %243
%245 = getelementptr inbounds i32, i32* %242, i64 4
%246 = bitcast i32* %245 to <4 x i32>*
%247 = load <4 x i32>, <4 x i32>* %246
%248 = mul <4 x i32> %244, %228
%249 = mul <4 x i32> %247, %230
%250 = bitcast i32* %242 to <4 x i32>*
store <4 x i32> %248, <4 x i32>* %250
%251 = bitcast i32* %245 to <4 x i32>*
store <4 x i32> %249, <4 x i32>* %251
%252 = or i64 %239, 9
%253 = getelementptr inbounds i32, i32* %83, i64 %252
%254 = bitcast i32* %253 to <4 x i32>*
%255 = load <4 x i32>, <4 x i32>* %254
%256 = getelementptr inbounds i32, i32* %253, i64 4
%257 = bitcast i32* %256 to <4 x i32>*
%258 = load <4 x i32>, <4 x i32>* %257
%259 = mul <4 x i32> %255, %228
%260 = mul <4 x i32> %258, %230
%261 = bitcast i32* %253 to <4 x i32>*
store <4 x i32> %259, <4 x i32>* %261
%262 = bitcast i32* %256 to <4 x i32>*
store <4 x i32> %260, <4 x i32>* %262
%263 = add nuw i64 %239, 16
%264 = add i64 %240, 2
%265 = icmp eq i64 %264, %237
br i1 %265, label %266, label %238
266: ; preds = %238, %224
%267 = phi i64 [ 0, %224 ], [ %263, %238 ]
%268 = icmp eq i64 %234, 0
br i1 %268, label %281, label %269
269: ; preds = %266
%270 = or i64 %267, 1
%271 = getelementptr inbounds i32, i32* %83, i64 %270
%272 = bitcast i32* %271 to <4 x i32>*
%273 = load <4 x i32>, <4 x i32>* %272
%274 = getelementptr inbounds i32, i32* %271, i64 4
%275 = bitcast i32* %274 to <4 x i32>*
%276 = load <4 x i32>, <4 x i32>* %275
%277 = mul <4 x i32> %273, %228
%278 = mul <4 x i32> %276, %230
%279 = bitcast i32* %271 to <4 x i32>*
store <4 x i32> %277, <4 x i32>* %279
%280 = bitcast i32* %274 to <4 x i32>*
store <4 x i32> %278, <4 x i32>* %280
br label %281
281: ; preds = %266, %269
%282 = icmp eq i64 %222, %225
br i1 %282, label %293, label %283
283: ; preds = %221, %281
%284 = phi i64 [ 1, %221 ], [ %226, %281 ]
br label %285
285: ; preds = %283, %285
%286 = phi i64 [ %291, %285 ], [ %284, %283 ]
%287 = getelementptr inbounds i32, i32* %83, i64 %286
%288 = load i32, i32* %287
%289 = getelementptr inbounds i32, i32* %83, i64 %286
%290 = mul i32 %288, %218
store i32 %290, i32* %289
%291 = add nuw nsw i64 %286, 1
%292 = icmp eq i64 %291, %219
br i1 %292, label %293, label %285
293: ; preds = %285, %217, %281, %215
%294 = icmp eq i32 %18, 0
br i1 %294, label %295, label %300
295: ; preds = %293
%296 = load i32, i32* @PROT_READ
%297 = load i32, i32* @PROT_WRITE
%298 = or i32 %297, %296
%299 = load i32, i32* @MAP_ANON
br label %309
300: ; preds = %293
%301 = icmp eq i32 %18, 1
br i1 %301, label %302, label %320
302: ; preds = %300
%303 = load i32, i32* @PROT_READ
%304 = load i32, i32* @PROT_WRITE
%305 = or i32 %304, %303
%306 = load i32, i32* @MAP_PRIVATE
%307 = load i32, i32* @MAP_ANON
%308 = or i32 %307, %306
br label %309
309: ; preds = %295, %302
%310 = phi i32* [ @MAP_PRIVATE, %295 ], [ @MAP_HUGETLB, %302 ]
%311 = phi i32 [ %299, %295 ], [ %308, %302 ]
%312 = phi i32 [ %298, %295 ], [ %305, %302 ]
%313 = xor i1 %294, true
%314 = load i32, i32* %310
%315 = or i32 %311, %314
%316 = tail call i64 @mmap(i32* null, i64 %78, i32 %312, i32 %315, i32 -1, i32 0)
%317 = inttoptr i64 %316 to i8*
%318 = load i8*, i8** @MAP_FAILED
%319 = icmp eq i8* %318, %317
br i1 %319, label %320, label %326
320: ; preds = %300, %309
%321 = phi i8* [ %317, %309 ], [ undef, %300 ]
%322 = phi i1 [ %313, %309 ], [ false, %300 ]
%323 = load i32, i32* @stderr
%324 = tail call i32 (i32, i8*, ...) @fprintf(i32 %323, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%325 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
br label %326
326: ; preds = %320, %309
%327 = phi i8* [ %321, %320 ], [ %317, %309 ]
%328 = phi i1 [ %322, %320 ], [ %313, %309 ]
%329 = load i32, i32* @stderr
%330 = tail call i32 (i32, i8*, ...) @fprintf(i32 %329, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i8* %327)
%331 = bitcast i8* %327 to double*
br i1 %294, label %332, label %341
332: ; preds = %326
%333 = load i32, i32* @PROT_READ
%334 = load i32, i32* @PROT_WRITE
%335 = or i32 %334, %333
%336 = load i32, i32* @MAP_PRIVATE
%337 = load i32, i32* @MAP_ANON
%338 = or i32 %337, %336
%339 = tail call i64 @mmap(i32* null, i64 %78, i32 %335, i32 %338, i32 -1, i32 0)
%340 = inttoptr i64 %339 to i8*
br label %341
341: ; preds = %332, %326
%342 = phi i8* [ %340, %332 ], [ %327, %326 ]
br i1 %328, label %343, label %354
343: ; preds = %341
%344 = load i32, i32* @PROT_READ
%345 = load i32, i32* @PROT_WRITE
%346 = or i32 %345, %344
%347 = load i32, i32* @MAP_PRIVATE
%348 = load i32, i32* @MAP_ANON
%349 = or i32 %348, %347
%350 = load i32, i32* @MAP_HUGETLB
%351 = or i32 %349, %350
%352 = tail call i64 @mmap(i32* null, i64 %78, i32 %346, i32 %351, i32 -1, i32 0)
%353 = inttoptr i64 %352 to i8*
br label %354
354: ; preds = %343, %341
%355 = phi i8* [ %353, %343 ], [ %342, %341 ]
%356 = load i8*, i8** @MAP_FAILED
%357 = icmp eq i8* %355, %356
br i1 %357, label %358, label %362
358: ; preds = %354
%359 = load i32, i32* @stderr
%360 = tail call i32 (i32, i8*, ...) @fprintf(i32 %359, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%361 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
br label %362
362: ; preds = %358, %354
%363 = load i32, i32* @stderr
%364 = tail call i32 (i32, i8*, ...) @fprintf(i32 %363, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i8* %355)
%365 = bitcast i8* %355 to double*
%366 = lshr exact i64 %78, 3
%367 = load i32, i32* @stderr
%368 = tail call i32 (i32, i8*, ...) @fprintf(i32 %367, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.18, i64 0, i64 0), i64 %78, i64 %366, i64 %79)
%369 = icmp eq i64 %78, 0
br i1 %369, label %495, label %370
370: ; preds = %362
%371 = call i64 @llvm.umax.i64(i64 %366, i64 1)
%372 = icmp ult i64 %371, 4
br i1 %372, label %425, label %373
373: ; preds = %370
%374 = and i64 %371, 2305843009213693440
%375 = add nsw i64 %374, -4
%376 = lshr exact i64 %375, 2
br label %377
377: ; preds = %377, %373
%378 = phi i64 [ 0, %373 ], [ %419, %377 ]
%379 = phi i64 [ 0, %373 ], [ %420, %377 ]
%380 = getelementptr inbounds double, double* %331, i64 %378
%381 = bitcast double* %380 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %381
%382 = getelementptr inbounds double, double* %380, i64 2
%383 = bitcast double* %382 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %383
%384 = or i64 %378, 4
%385 = getelementptr inbounds double, double* %331, i64 %384
%386 = bitcast double* %385 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %386
%387 = getelementptr inbounds double, double* %385, i64 2
%388 = bitcast double* %387 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %388
%389 = or i64 %378, 8
%390 = getelementptr inbounds double, double* %331, i64 %389
%391 = bitcast double* %390 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %391
%392 = getelementptr inbounds double, double* %390, i64 2
%393 = bitcast double* %392 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %393
%394 = or i64 %378, 12
%395 = getelementptr inbounds double, double* %331, i64 %394
%396 = bitcast double* %395 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %396
%397 = getelementptr inbounds double, double* %395, i64 2
%398 = bitcast double* %397 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %398
%399 = or i64 %378, 16
%400 = getelementptr inbounds double, double* %331, i64 %399
%401 = bitcast double* %400 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %401
%402 = getelementptr inbounds double, double* %400, i64 2
%403 = bitcast double* %402 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %403
%404 = or i64 %378, 20
%405 = getelementptr inbounds double, double* %331, i64 %404
%406 = bitcast double* %405 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %406
%407 = getelementptr inbounds double, double* %405, i64 2
%408 = bitcast double* %407 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %408
%409 = or i64 %378, 24
%410 = getelementptr inbounds double, double* %331, i64 %409
%411 = bitcast double* %410 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %411
%412 = getelementptr inbounds double, double* %410, i64 2
%413 = bitcast double* %412 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %413
%414 = or i64 %378, 28
%415 = getelementptr inbounds double, double* %331, i64 %414
%416 = bitcast double* %415 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %416
%417 = getelementptr inbounds double, double* %415, i64 2
%418 = bitcast double* %417 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %418
%419 = add nuw i64 %378, 32
%420 = add i64 %379, 8
%421 = or i64 %379, 7
%422 = icmp eq i64 %421, %376
br i1 %422, label %423, label %377
423: ; preds = %377
%424 = icmp eq i64 %371, %374
br i1 %424, label %427, label %425
425: ; preds = %370, %423
%426 = phi i64 [ 0, %370 ], [ %374, %423 ]
br label %485
427: ; preds = %485, %423
br i1 %369, label %495, label %428
428: ; preds = %427
%429 = call i64 @llvm.umax.i64(i64 %366, i64 1)
%430 = icmp ult i64 %371, 4
br i1 %430, label %483, label %431
431: ; preds = %428
%432 = and i64 %371, 2305843009213693440
%433 = add nsw i64 %432, -4
%434 = lshr exact i64 %433, 2
br label %435
435: ; preds = %435, %431
%436 = phi i64 [ 0, %431 ], [ %477, %435 ]
%437 = phi i64 [ 0, %431 ], [ %478, %435 ]
%438 = getelementptr inbounds double, double* %365, i64 %436
%439 = bitcast double* %438 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %439
%440 = getelementptr inbounds double, double* %438, i64 2
%441 = bitcast double* %440 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %441
%442 = or i64 %436, 4
%443 = getelementptr inbounds double, double* %365, i64 %442
%444 = bitcast double* %443 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %444
%445 = getelementptr inbounds double, double* %443, i64 2
%446 = bitcast double* %445 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %446
%447 = or i64 %436, 8
%448 = getelementptr inbounds double, double* %365, i64 %447
%449 = bitcast double* %448 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %449
%450 = getelementptr inbounds double, double* %448, i64 2
%451 = bitcast double* %450 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %451
%452 = or i64 %436, 12
%453 = getelementptr inbounds double, double* %365, i64 %452
%454 = bitcast double* %453 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %454
%455 = getelementptr inbounds double, double* %453, i64 2
%456 = bitcast double* %455 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %456
%457 = or i64 %436, 16
%458 = getelementptr inbounds double, double* %365, i64 %457
%459 = bitcast double* %458 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %459
%460 = getelementptr inbounds double, double* %458, i64 2
%461 = bitcast double* %460 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %461
%462 = or i64 %436, 20
%463 = getelementptr inbounds double, double* %365, i64 %462
%464 = bitcast double* %463 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %464
%465 = getelementptr inbounds double, double* %463, i64 2
%466 = bitcast double* %465 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %466
%467 = or i64 %436, 24
%468 = getelementptr inbounds double, double* %365, i64 %467
%469 = bitcast double* %468 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %469
%470 = getelementptr inbounds double, double* %468, i64 2
%471 = bitcast double* %470 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %471
%472 = or i64 %436, 28
%473 = getelementptr inbounds double, double* %365, i64 %472
%474 = bitcast double* %473 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %474
%475 = getelementptr inbounds double, double* %473, i64 2
%476 = bitcast double* %475 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %476
%477 = add nuw i64 %436, 32
%478 = add i64 %437, 8
%479 = or i64 %437, 7
%480 = icmp eq i64 %479, %434
br i1 %480, label %481, label %435
481: ; preds = %435
%482 = icmp eq i64 %371, %432
br i1 %482, label %495, label %483
483: ; preds = %428, %481
%484 = phi i64 [ 0, %428 ], [ %432, %481 ]
br label %490
485: ; preds = %425, %485
%486 = phi i64 [ %488, %485 ], [ %426, %425 ]
%487 = getelementptr inbounds double, double* %331, i64 %486
store double 0.000000e+00, double* %487
%488 = add nuw nsw i64 %486, 1
%489 = icmp eq i64 %488, %371
br i1 %489, label %427, label %485
490: ; preds = %483, %490
%491 = phi i64 [ %493, %490 ], [ %484, %483 ]
%492 = getelementptr inbounds double, double* %365, i64 %491
store double 0.000000e+00, double* %492
%493 = add nuw nsw i64 %491, 1
%494 = icmp eq i64 %493, %429
br i1 %494, label %495, label %490
495: ; preds = %490, %481, %362, %427
%496 = load i32, i32* @stderr
%497 = tail call i32 (i32, i8*, ...) @fprintf(i32 %496, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0))
%498 = tail call i32 @pin_cpu(i32 0, i32 %15)
%499 = icmp eq i32 %498, -1
br i1 %499, label %500, label %502
500: ; preds = %495
%501 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.20, i64 0, i64 0))
br label %505
502: ; preds = %495
%503 = sitofp i32 %15 to double
%504 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), double %503)
br label %505
505: ; preds = %502, %500
%506 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.22, i64 0, i64 0), double %80, i32 10240000, i32 %14, i32 %72, i64 %78)
%507 = tail call i64 (...) @_rdtsc()
%508 = icmp sgt i32 %11, 0
br i1 %508, label %509, label %518
509: ; preds = %505
%510 = call i32 @llvm.smax.i32(i32 %50, i32 1)
br label %511
511: ; preds = %509, %511
%512 = phi i32 [ %516, %511 ], [ 0, %509 ]
%513 = tail call i64 (...) @_rdtsc()
%514 = tail call i64 @reader(i32 10240000, i32 %14, double* %331, double* %365, i32* %83)
%515 = tail call i64 (...) @_rdtsc()
%516 = add nuw nsw i32 %512, 1
%517 = icmp eq i32 %516, %510
br i1 %517, label %518, label %511
518: ; preds = %511, %505
%519 = fmul double %80, 1.024000e+07
%520 = tail call i64 (...) @_rdtsc()
%521 = sub i64 %520, %507
%522 = uitofp i64 %521 to double
%523 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), double %522)
%524 = fdiv double %522, %519
%525 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), double %524)
ret i32 0
}