#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 timespec {
  int dummy;
};
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();
void *atoi(int /*<<< orphan*/);
int /*<<< orphan*/ err(int, char *, ...);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt(int, char **, char *);
scalar_t__ malloc(int);
void *memset(char *, int /*<<< orphan*/, size_t);
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 *, ...);
size_t reader(int, size_t *);
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, *pnt, element, 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;
  size_t start, stop, run_time, call_start, call_stop,
      inner_run_time = 0, 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, line_size;
  int cpu_setsize;
  cpu_set_t mask;
  int *pattern;
  int step, c, bad;
  int *index, *index_test, lc_by_num_seg, count, num_seg = 32, huge = 0;
  unsigned int bitmask, *intstar;
  struct timespec start_t, stop_t;
  page_size = 4096;
  line_size = 64;
  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:c")) != -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;
    case 'c':
      line_size = atoi(optarg);
      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 + line_size;
  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(size_t *);
  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");
  }
  index_test = (int *)malloc(line_count * sizeof(int));
  if (index_test == NULL) {
    fprintf(stderr, " failed to malloc index_test array for line_count of %d\n",
            line_count);
    err(1, "failed to malloc index_test");
  }
  for (i = 0; i < line_count; i++)
    index_test[i] = 0;
  if (num_seg == 1) {
    for (i = 0; i < line_count; 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 = i * num_seg;
      for (j = 0; j < num_seg - 1; j++) {
        count++;
        ind = lc_by_num_seg * pattern[j];
        index[count] = (int)pattern[j] + step;
        if (index[count] >= line_count)
          printf(" count = %d, index = %d\n", count, index[count]);
      }
      count++;
      index[count] = (i + 1) * num_seg;
    }
    index[count] = 0;
  }
  index[0] = 0;
  for (i = 0; i < line_count; i++) {
    if (index[i] > line_count)
      err(1, "index[%d] = %d", i, index[i]);
    index_test[index[i]]++;
  }
  bad = 0;
  for (i = 0; i < line_count; i++) {
    if (index_test[i] != 1) {
      bad++;
      if (bad < 64)
        fprintf(stderr, "index_test[%d] = %d\n", i, index_test[i]);
    }
  }
  fprintf(stderr, "bad = %d\n", bad);
  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 = %p\n", buf1);
  zero_loop = buf_size / (size_t)var_size;
  fprintf(stderr, " buf_size = %zu, zero_loop = %zu, array_stride = %zd\n",
          buf_size, zero_loop, array_stride);
  array = (size_t *)buf1;
  ret = memset(buf1, 0, (size_t)buf_size);
  fprintf(stderr, " finished zeroing buf ret = %p\n", ret);
  for (jj = 0; jj < line_count - 1; jj++)
    array[index[jj] * array_stride] =
        (size_t)&array[index[jj + 1] * array_stride];
  fprintf(stderr, " target of last element in loop = %zx\n",
          (size_t)(array[line_count - 1] - (size_t)buf1));
  array[(size_t)array_stride * (size_t)index[line_count - 1]] =
      (size_t)&array[0];
  bad = 0;
  pnt = array;
  fprintf(stderr, " array address = %p value = %lx\n", pnt, *pnt);
  while (bad < line_count + 4) {
    pnt = (size_t *)*pnt;
    element = (size_t)(pnt - array);
    element = element / var_size;
    bad++;
    if (bad > line_count - 4)
      fprintf(stderr, "index = %d,element = %ld, address = %p, value = %lx\n",
              bad, element, pnt, *pnt);
  }
  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, array);
    stop = _rdtsc();
    run_time = stop - start;
    inner_run_time += run_time;
  }
  printf(" done\n");
  call_stop = _rdtsc();
  call_run_time = call_stop - call_start;
  printf(" run time = %zd\n", call_run_time);
  printf(" inner time = %zd\n", inner_run_time);
  printf(" average cycles per iteration = %f\n",
         (double)inner_run_time / iterations);
  return main_ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0xffffffff,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x9c4000,-0x70(%rbp)
movl   $0x64,-0x74(%rbp)
movl   $0x1,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movq   $0x0,-0xb8(%rbp)
movq   $0x0,-0xc8(%rbp)
movl   $0x0,-0xcc(%rbp)
movl   $0x20,-0x154(%rbp)
movl   $0x0,-0x158(%rbp)
movq   $0x1000,-0x108(%rbp)
movq   $0x40,-0x118(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    12a3 <main+0xd3>
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    $0x1,%edi
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    12a8 <main+0xd8>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe99(%rip),%rdx
call   10e0 <getopt@plt>
mov    %eax,-0x130(%rbp)
cmp    $0xffffffff,%eax
je     13d5 <main+0x205>
mov    -0x130(%rbp),%eax
add    $0xffffffb4,%eax
mov    %eax,%ecx
mov    %rcx,-0x180(%rbp)
sub    $0x27,%eax
ja     13b7 <main+0x1e7>
mov    -0x180(%rbp),%rax
lea    0xd2d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2cf5(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x58(%rbp)
jmp    13d0 <main+0x200>
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x5c(%rbp)
jmp    13d0 <main+0x200>
mov    0x2cc9(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x60(%rbp)
jmp    13d0 <main+0x200>
mov    0x2cb3(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x64(%rbp)
jmp    13d0 <main+0x200>
mov    0x2c9d(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x154(%rbp)
jmp    13d0 <main+0x200>
mov    0x2c84(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %eax,-0x78(%rbp)
jmp    13d0 <main+0x200>
movl   $0x1,-0x158(%rbp)
movq   $0x200000,-0x108(%rbp)
jmp    13d0 <main+0x200>
mov    0x2c54(%rip),%rax
mov    (%rax),%edi
call   10f0 <atoi@plt>
mov    %rax,-0x118(%rbp)
jmp    13d0 <main+0x200>
mov    -0x130(%rbp),%edx
mov    $0x1,%edi
lea    0xd96(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    12a8 <main+0xd8>
mov    -0x74(%rbp),%eax
imul   -0x78(%rbp),%eax
mov    %eax,-0x74(%rbp)
movq   $0x8,-0x110(%rbp)
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
mov    -0x110(%rbp),%rdx
lea    0xd70(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xcc(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1070 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    1437 <main+0x267>
mov    $0x1,%edi
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    1451 <main+0x281>
mov    0x2b8a(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%edx
lea    0xd53(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movslq -0x154(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x128(%rbp)
cmpq   $0x0,-0x128(%rbp)
jne    14a8 <main+0x2d8>
mov    0x2b49(%rip),%rax
mov    (%rax),%edi
mov    -0x154(%rbp),%edx
lea    0xd2b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
lea    0xd41(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x108(%rbp),%rax
movslq -0x64(%rbp),%rcx
imul   %rcx,%rax
add    -0x118(%rbp),%rax
mov    %eax,-0x64(%rbp)
movslq -0x60(%rbp),%rax
movslq -0x64(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x108(%rbp)
add    $0x2,%rax
mov    %rax,-0x100(%rbp)
mov    -0x108(%rbp),%rax
imul   -0x100(%rbp),%rax
ff
mov    %rax,-0xd8(%rbp)
movslq -0x64(%rbp),%rax
shr    $0x3,%rax
mov    %rax,-0x48(%rbp)
cvtsi2sdl -0x74(%rbp),%xmm0
cvtsi2sdl -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movslq -0x60(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x140(%rbp)
cmpq   $0x0,-0x140(%rbp)
jne    157a <main+0x3aa>
mov    0x2a74(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%edx
lea    0xc9b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
lea    0xcbc(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
movslq -0x60(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x148(%rbp)
cmpq   $0x0,-0x148(%rbp)
jne    15cb <main+0x3fb>
mov    0x2a23(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%edx
lea    0xc95(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
lea    0xcbb(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x60(%rbp),%eax
jge    15fe <main+0x42e>
mov    -0x148(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    15d2 <main+0x402>
cmpl   $0x1,-0x154(%rbp)
jne    1642 <main+0x472>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x60(%rbp),%eax
jge    163d <main+0x46d>
mov    -0x4c(%rbp),%edx
mov    -0x140(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1612 <main+0x442>
jmp    1803 <main+0x633>
mov    -0x128(%rbp),%rdi
mov    -0x154(%rbp),%esi
call   10d0 <rndm_list@plt>
mov    -0x60(%rbp),%eax
cltd
idivl  -0x154(%rbp)
mov    %eax,-0x14c(%rbp)
mov    -0x14c(%rbp),%eax
imul   -0x154(%rbp),%eax
cmp    -0x60(%rbp),%eax
je     16aa <main+0x4da>
mov    0x2947(%rip),%rax
mov    (%rax),%edi
mov    -0x154(%rbp),%edx
lea    0xc0b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
movl   $0x0,-0x150(%rbp)
mov    -0xd8(%rbp),%rax
movslq -0x154(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0xf0(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14c(%rbp),%eax
jge    17ee <main+0x61e>
mov    -0x4c(%rbp),%eax
imul   -0x154(%rbp),%eax
mov    %eax,-0x12c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x154(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    17b3 <main+0x5e3>
mov    -0x150(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x150(%rbp)
mov    -0x14c(%rbp),%eax
mov    -0x128(%rbp),%rcx
movslq -0x50(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
cltq
mov    %rax,-0xf8(%rbp)
mov    -0x128(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    -0x12c(%rbp),%edx
mov    -0x140(%rbp),%rax
movslq -0x150(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x140(%rbp),%rax
movslq -0x150(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x60(%rbp),%eax
jl     17a0 <main+0x5d0>
mov    -0x150(%rbp),%esi
mov    -0x140(%rbp),%rax
movslq -0x150(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xb55(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17a5 <main+0x5d5>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    16fb <main+0x52b>
mov    -0x150(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x150(%rbp)
mov    -0x4c(%rbp),%edx
add    $0x1,%edx
imul   -0x154(%rbp),%edx
mov    -0x140(%rbp),%rax
movslq -0x150(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    16d5 <main+0x505>
mov    -0x140(%rbp),%rax
movslq -0x150(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x140(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x60(%rbp),%eax
jge    188b <main+0x6bb>
mov    -0x140(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x60(%rbp),%eax
jle    185e <main+0x68e>
mov    -0x4c(%rbp),%edx
mov    -0x140(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    $0x1,%edi
lea    0xab0(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x148(%rbp),%rax
mov    -0x140(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1817 <main+0x647>
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x60(%rbp),%eax
jge    1919 <main+0x749>
mov    -0x148(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     1906 <main+0x736>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
cmpl   $0x40,-0x134(%rbp)
jge    1901 <main+0x731>
mov    0x26e8(%rip),%rax
mov    (%rax),%edi
mov    -0x4c(%rbp),%edx
mov    -0x148(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xa1c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1906 <main+0x736>
jmp    190b <main+0x73b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    189c <main+0x6cc>
mov    0x26a8(%rip),%rax
mov    (%rax),%edi
mov    -0x134(%rbp),%edx
lea    0x9fc(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
cmpl   $0x0,-0x158(%rbp)
jne    1983 <main+0x7b3>
mov    -0xd8(%rbp),%rsi
mov    0x269f(%rip),%rax
mov    (%rax),%edx
mov    0x2666(%rip),%rax
or     (%rax),%edx
mov    0x264d(%rip),%rax
mov    (%rax),%ecx
mov    0x264c(%rip),%rax
or     (%rax),%ecx
mov    -0x68(%rbp),%r8d
mov    -0x6c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x158(%rbp)
jne    19d9 <main+0x809>
mov    -0xd8(%rbp),%rsi
mov    0x2652(%rip),%rax
mov    (%rax),%edx
mov    0x2619(%rip),%rax
or     (%rax),%edx
mov    0x2600(%rip),%rax
mov    (%rax),%ecx
mov    0x25ff(%rip),%rax
or     (%rax),%ecx
mov    0x261e(%rip),%rax
or     (%rax),%ecx
mov    -0x68(%rbp),%r8d
mov    -0x6c(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1040 <mmap@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x25c4(%rip),%rcx
cmp    (%rcx),%rax
jne    1a17 <main+0x847>
mov    0x25d4(%rip),%rax
mov    (%rax),%edi
lea    0x938(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
lea    0x932(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    0x25aa(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0x923(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xd8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x110(%rbp)
mov    %rax,-0xe8(%rbp)
mov    0x2576(%rip),%rax
mov    (%rax),%edi
mov    -0xd8(%rbp),%rdx
mov    -0xe8(%rbp),%rcx
mov    -0x48(%rbp),%r8
lea    0x8ed(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xd8(%rbp),%rdx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %rax,-0x20(%rbp)
mov    0x252f(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0x8ea(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movq   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    -0x60(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jae    1b2a <main+0x95a>
mov    -0x28(%rbp),%rdx
mov    -0x140(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movslq 0x4(%rax,%rcx,4),%rax
imul   -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x28(%rbp),%rax
mov    -0x140(%rbp),%rcx
mov    -0xe0(%rbp),%rsi
movslq (%rcx,%rsi,4),%rcx
imul   -0x48(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xe0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xe0(%rbp)
jmp    1ab8 <main+0x8e8>
mov    0x2497(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    -0x60(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x18(%rbp),%rax
sub    %rax,%rdx
lea    0x85e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x140(%rbp),%rsi
mov    -0x60(%rbp),%edi
sub    $0x1,%edi
movslq %edi,%rdi
movslq (%rsi,%rdi,4),%rsi
imul   %rsi,%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x134(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    0x242e(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rdx
mov    -0x30(%rbp),%rax
mov    (%rax),%rcx
lea    0x829(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x134(%rbp),%eax
mov    -0x60(%rbp),%ecx
add    $0x4,%ecx
cmp    %ecx,%eax
jge    1c4e <main+0xa7e>
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x110(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
mov    -0x134(%rbp),%eax
mov    -0x60(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jle    1c49 <main+0xa79>
mov    0x23a4(%rip),%rax
mov    (%rax),%edi
mov    -0x134(%rbp),%edx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    (%rax),%r9
lea    0x7b6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1bb5 <main+0x9e5>
mov    -0xcc(%rbp),%edi
mov    -0x5c(%rbp),%esi
call   1070 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    1c7d <main+0xaad>
mov    $0x1,%edi
lea    0x7bc(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    1c8e <main+0xabe>
mov    -0x5c(%rbp),%esi
lea    0x7c2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x74(%rbp),%esi
mov    -0x70(%rbp),%edx
mov    -0x60(%rbp),%ecx
mov    -0x64(%rbp),%r8d
mov    -0xd8(%rbp),%r9
lea    0x7c3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1d35 <main+0xb65>
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x70(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1030 <reader@plt>
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
sub    -0x90(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
add    -0xb8(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1cc5 <main+0xaf5>
lea    0x7a3(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x181(%rbp)
call   1050 <printf@plt>
mov    -0x181(%rbp),%al
call   10b0 <_rdtsc@plt>
mov    %rax,%rcx
mov    -0x181(%rbp),%al
mov    %rcx,-0xb0(%rbp)
mov    -0xb0(%rbp),%rcx
mov    -0xa8(%rbp),%rdx
sub    %rdx,%rcx
mov    %rcx,-0xc0(%rbp)
mov    -0xc0(%rbp),%rsi
lea    0x75c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x181(%rbp),%al
mov    -0xb8(%rbp),%rsi
lea    0x754(%rip),%rdi
call   1050 <printf@plt>
movaps 0x251(%rip),%xmm1
movq   -0xb8(%rbp),%xmm0
ff
punpckldq %xmm1,%xmm0
movapd 0x24d(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x88(%rbp),%xmm0
ff
lea    0x729(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
cmp    $0x5,%edi
jg     122b <main+0x4b>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0xf50(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %eax,%eax
call   10d0 <usage@plt>
lea    0xfa6(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    $0x20,%eax
mov    %rax,0x20(%rsp)
mov    $0x1,%eax
mov    %rax,0x60(%rsp)
mov    $0x40,%eax
mov    %rax,0x18(%rsp)
mov    $0x1000,%ecx
lea    0xf92(%rip),%r12
lea    0xe5c(%rip),%r14
mov    %rax,0x30(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,0x58(%rsp)
mov    %rax,0x38(%rsp)
xor    %edx,%edx
jmp    1296 <main+0xb6>
mov    0x2d7d(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x18(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %r13,%rcx
mov    %r15d,%edx
mov    %edx,%r15d
mov    %rcx,%r13
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r12,%rdx
call   10f0 <getopt@plt>
lea    -0x4c(%rax),%edx
cmp    $0x27,%edx
ja     134f <main+0x16f>
mov    $0x200000,%ecx
movslq (%r14,%rdx,4),%rsi
add    %r14,%rsi
mov    $0x1,%edx
jmp    *%rsi
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x20(%rsp)
jmp    1290 <main+0xb0>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x38(%rsp)
jmp    1290 <main+0xb0>
mov    0x2cff(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    1290 <main+0xb0>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x60(%rsp)
jmp    1290 <main+0xb0>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x58(%rsp)
jmp    1290 <main+0xb0>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x30(%rsp)
jmp    1290 <main+0xb0>
cmp    $0xffffffff,%eax
je     136e <main+0x18e>
mov    $0x1,%edi
lea    0xe97(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10a0 <err@plt>
jmp    1290 <main+0xb0>
mov    0x2c53(%rip),%rbx
mov    (%rbx),%edi
lea    0xe8b(%rip),%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %edi,%edi
mov    0x38(%rsp),%rbp
mov    %ebp,%esi
call   1080 <pin_cpu@plt>
cmp    $0xffffffff,%eax
je     13b1 <main+0x1d1>
mov    (%rbx),%edi
lea    0xe8f(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    13c4 <main+0x1e4>
lea    0xe66(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    0x20(%rsp),%rbx
mov    0x18(%rsp),%r14
mov    0x30(%rsp),%rbp
lea    0x0(,%rbx,4),%edi
call   10b0 <malloc@plt>
mov    %rax,0x38(%rsp)
test   %rax,%rax
jne    1415 <main+0x235>
mov    0x2bd8(%rip),%rax
mov    (%rax),%edi
lea    0xe58(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xe71(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    %ebp,%edx
imul   %r13,%rdx
add    %r14,%rdx
movslq 0x8(%rsp),%rax
movslq %edx,%r14
imul   %r14,%rax
mov    %rax,%rcx
or     %r13,%rcx
shr    $0x20,%rcx
mov    %rdx,0x48(%rsp)
je     1445 <main+0x265>
xor    %edx,%edx
div    %r13
mov    %rax,%rbp
jmp    144c <main+0x26c>
xor    %edx,%edx
div    %r13d
mov    %eax,%ebp
mov    0x8(%rsp),%rax
lea    0x0(,%rax,4),%ebx
mov    %ebx,%edi
call   10b0 <malloc@plt>
mov    %rax,0x28(%rsp)
test   %rax,%rax
jne    1498 <main+0x2b8>
mov    0x2b58(%rip),%rax
mov    (%rax),%edi
lea    0xe1a(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xe3b(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
add    $0x2,%rbp
mov    %ebx,%edi
call   10b0 <malloc@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
jne    14dc <main+0x2fc>
mov    0x2b14(%rip),%rax
mov    (%rax),%edi
lea    0xe21(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xe47(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    0x8(%rsp),%rax
mov    %eax,%ecx
imul   %r13,%rbp
mov    %rbp,0x50(%rsp)
test   %eax,%eax
mov    %rcx,0x10(%rsp)
mov    %r14,0x68(%rsp)
jle    153b <main+0x35b>
lea    0x0(,%rcx,4),%rdx
mov    0x18(%rsp),%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    0x20(%rsp),%rbp
cmp    $0x1,%ebp
jne    1560 <main+0x380>
cmpl   $0x8,0x8(%rsp)
mov    0x2aa4(%rip),%r12
mov    0x28(%rsp),%r13
jae    1688 <main+0x4a8>
xor    %eax,%eax
mov    0x10(%rsp),%rdx
jmp    17f0 <main+0x610>
mov    0x20(%rsp),%rbp
cmp    $0x1,%ebp
jne    1560 <main+0x380>
mov    0x28(%rsp),%r13
movl   $0x0,0x0(%r13)
xor    %ebx,%ebx
mov    0x2a6d(%rip),%r12
jmp    18bb <main+0x6db>
mov    0x38(%rsp),%rdi
mov    %ebp,%esi
call   10e0 <rndm_list@plt>
mov    0x8(%rsp),%rcx
mov    %ecx,%eax
cltd
idiv   %ebp
mov    %eax,%r14d
imul   %ebp,%eax
cmp    %ecx,%eax
mov    0x2a43(%rip),%r12
mov    0x28(%rsp),%r13
je     15b3 <main+0x3d3>
mov    (%r12),%edi
lea    0xd9c(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xdcf(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
xor    %eax,%eax
test   %r14d,%r14d
jle    1675 <main+0x495>
lea    -0x1(%rbp),%ebx
shl    $0x2,%rbx
add    $0x4,%r13
mov    %r13,0x70(%rsp)
xor    %r13d,%r13d
xor    %r12d,%r12d
mov    %r14d,0x44(%rsp)
jmp    160b <main+0x42b>
nopl   0x0(%rax,%rax,1)
mov    0x30(%rsp),%r12d
add    $0x1,%r12d
mov    %r12d,%eax
mov    0x20(%rsp),%rbp
imul   %ebp,%eax
movslq %r13d,%rcx
add    $0x1,%r13d
mov    0x28(%rsp),%rdx
mov    %eax,0x4(%rdx,%rcx,4)
cmp    0x44(%rsp),%r12d
je     1666 <main+0x486>
cmp    $0x2,%ebp
mov    %r12d,0x30(%rsp)
jl     15e0 <main+0x400>
imul   %ebp,%r12d
movslq %r13d,%rax
mov    0x70(%rsp),%rcx
lea    (%rcx,%rax,4),%r14
xor    %ebp,%ebp
jmp    163d <main+0x45d>
nopl   0x0(%rax)
add    $0x4,%rbp
add    $0x1,%r13d
cmp    %rbp,%rbx
je     15e0 <main+0x400>
mov    0x38(%rsp),%rax
mov    (%rax,%rbp,1),%edx
add    %r12d,%edx
mov    %edx,(%r14,%rbp,1)
cmp    0x8(%rsp),%edx
jl     1630 <main+0x450>
lea    0x1(%r13),%esi
lea    0xd29(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1630 <main+0x450>
movslq %r13d,%rax
mov    0x2958(%rip),%r12
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rdx
movl   $0x0,0x0(%r13,%rax,4)
jmp    17fe <main+0x61e>
mov    0x10(%rsp),%rax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0x18,%rsi
jae    16b9 <main+0x4d9>
movdqa 0x94e(%rip),%xmm0
xor    %esi,%esi
jmp    1795 <main+0x5b5>
and    $0xfffffffffffffffc,%rdx
movdqa 0x93b(%rip),%xmm0
xor    %esi,%esi
movdqa 0x940(%rip),%xmm8
movdqa 0x947(%rip),%xmm9
movdqa 0x94e(%rip),%xmm10
movdqa 0x956(%rip),%xmm4
movdqa 0x95e(%rip),%xmm5
movdqa 0x966(%rip),%xmm6
movdqa 0x96e(%rip),%xmm7
movdqa 0x976(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,0x0(%r13,%rsi,4)
movdqu %xmm2,0x10(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%r13,%rsi,4)
movdqu %xmm3,0x30(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%r13,%rsi,4)
movdqu %xmm3,0x50(%r13,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%r13,%rsi,4)
movdqu %xmm3,0x70(%r13,%rsi,4)
add    $0x20,%rsi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rdx
jne    1710 <main+0x530>
test   %rcx,%rcx
je     17e0 <main+0x600>
lea    0x10(,%rsi,4),%rdx
add    %r13,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movdqa 0x85d(%rip),%xmm1
movdqa 0x865(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rdx,%rsi,1)
movdqu %xmm3,(%rdx,%rsi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    17c0 <main+0x5e0>
mov    0x10(%rsp),%rdx
cmp    %rdx,%rax
je     17fe <main+0x61e>
nopw   0x0(%rax,%rax,1)
mov    %eax,0x0(%r13,%rax,4)
add    $0x1,%rax
cmp    %rax,%rdx
jne    17f0 <main+0x610>
movl   $0x0,0x0(%r13)
cmpl   $0x0,0x8(%rsp)
jle    18b9 <main+0x6d9>
lea    -0x1(%rdx),%rbx
lea    0xb83(%rip),%r14
xor    %ecx,%ecx
xor    %ebp,%ebp
cmp    %edx,%ecx
jle    1858 <main+0x678>
jmp    183d <main+0x65d>
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%r13,%rbp,4),%ecx
add    $0x1,%rbp
cmp    %edx,%ecx
jle    1858 <main+0x678>
mov    $0x1,%edi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   10a0 <err@plt>
mov    0x10(%rsp),%rdx
mov    0x0(%r13,%rbp,4),%ecx
movslq %ecx,%rax
mov    0x18(%rsp),%rcx
addl   $0x1,(%rcx,%rax,4)
cmp    %rbp,%rbx
jne    1830 <main+0x650>
cmpl   $0x0,0x8(%rsp)
jle    18b9 <main+0x6d9>
lea    0xb37(%rip),%r14
xor    %ebp,%ebp
xor    %eax,%eax
jmp    188d <main+0x6ad>
nopl   (%rax)
mov    %eax,%ebx
add    $0x1,%rbp
mov    %ebx,%eax
cmp    %rbp,%rdx
je     18bb <main+0x6db>
mov    0x18(%rsp),%rcx
mov    (%rcx,%rbp,4),%ecx
cmp    $0x1,%ecx
je     1880 <main+0x6a0>
lea    0x1(%rax),%ebx
cmp    $0x3e,%eax
jg     1882 <main+0x6a2>
mov    (%r12),%edi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x10(%rsp),%rdx
jmp    1882 <main+0x6a2>
xor    %ebx,%ebx
mov    0x68(%rsp),%r14
shr    $0x3,%r14
mov    (%r12),%edi
lea    0xaf4(%rip),%rsi
xor    %ebp,%ebp
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x270f(%rip),%rax
mov    0x26d8(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
cmp    $0x1,%r15d
mov    0x26b9(%rip),%rax
mov    (%rax),%eax
cmove  %eax,%ebp
mov    0x26dd(%rip),%rcx
cmove  (%rcx),%eax
mov    0x26ab(%rip),%rcx
or     (%rcx),%ebp
or     %eax,%ebp
xor    %edi,%edi
mov    0x50(%rsp),%rbx
mov    %rbx,%rsi
mov    %ebp,%ecx
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1050 <mmap@plt>
mov    %rax,%r15
mov    0x2673(%rip),%rax
cmp    %r15,(%rax)
jne    195f <main+0x77f>
mov    (%r12),%edi
lea    0xa88(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xa87(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    (%r12),%edi
lea    0xa7c(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rcx
shr    $0x3,%rcx
mov    (%r12),%edi
lea    0xa6c(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1070 <memset@plt>
mov    (%r12),%edi
lea    0xa7d(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x8(%rsp),%rax
add    $0xffffffff,%eax
movslq %eax,%rbx
test   %ebx,%ebx
je     1a5c <main+0x87c>
cmp    $0x2,%rbx
mov    $0x1,%edx
mov    $0x1,%r8d
cmovae %rbx,%r8
mov    0x0(%r13),%ecx
cmp    $0x1,%ebx
je     1a3e <main+0x85e>
mov    %r8,%rsi
and    $0xfffffffffffffffe,%rsi
neg    %rsi
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq 0x0(%r13,%rdx,4),%rdi
imul   %r14,%rdi
lea    (%r15,%rdi,8),%rbp
movslq %ecx,%rax
imul   %r14,%rax
mov    %rbp,(%r15,%rax,8)
movslq 0x4(%r13,%rdx,4),%rcx
mov    %rcx,%rax
imul   %r14,%rax
lea    (%r15,%rax,8),%rax
mov    %rax,(%r15,%rdi,8)
lea    (%rsi,%rdx,1),%rax
add    $0x2,%rax
add    $0x2,%rdx
cmp    $0x1,%rax
jne    1a00 <main+0x820>
test   $0x1,%r8b
je     1a5c <main+0x87c>
movslq 0x0(%r13,%rdx,4),%rax
imul   %r14,%rax
lea    (%r15,%rax,8),%rax
movslq %ecx,%rcx
imul   %r14,%rcx
mov    %rax,(%r15,%rcx,8)
mov    (%r12),%edi
mov    (%r15,%rbx,8),%rdx
sub    %r15,%rdx
lea    0x9da(%rip),%rsi
xor    %ebp,%ebp
xor    %eax,%eax
call   1090 <fprintf@plt>
movslq 0x0(%r13,%rbx,4),%rax
imul   %rax,%r14
mov    %r15,(%r15,%r14,8)
mov    (%r12),%edi
mov    (%r15),%rcx
lea    0x9dd(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
cmpl   $0xfffffffd,0x8(%rsp)
jl     1b0f <main+0x92f>
mov    0x8(%rsp),%rax
lea    0x3(%rax),%r12d
test   %r12d,%r12d
cmovle %ebp,%r12d
lea    -0x4(%rax),%r13d
add    $0x1,%r12d
lea    0x9ce(%rip),%r14
mov    %r15,%rbp
xor    %eax,%eax
jmp    1ad7 <main+0x8f7>
nopl   0x0(%rax)
mov    %ebx,%eax
cmp    %ebx,%r12d
je     1b0f <main+0x92f>
mov    0x0(%rbp),%rbp
lea    0x1(%rax),%ebx
cmp    %r13d,%eax
jl     1ad0 <main+0x8f0>
mov    %rbp,%rcx
sub    %r15,%rcx
sar    $0x3,%rcx
shr    $0x3,%rcx
mov    0x24d0(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%r9
mov    %r14,%rsi
mov    %ebx,%edx
mov    %rbp,%r8
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1ad0 <main+0x8f0>
mov    0x60(%rsp),%rbp
imul   $0x64,%ebp,%r14d
xor    %edi,%edi
mov    0x58(%rsp),%rbx
mov    %ebx,%esi
call   1080 <pin_cpu@plt>
cmp    $0xffffffff,%eax
je     1b3d <main+0x95d>
lea    0x9af(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1b50 <main+0x970>
lea    0x981(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10a0 <err@plt>
mov    0x48(%rsp),%r8
lea    0x9a8(%rip),%rdi
xor    %ebx,%ebx
mov    %r14d,%esi
mov    $0x9c4000,%edx
mov    0x8(%rsp),%rcx
mov    0x50(%rsp),%r9
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   10c0 <_rdtsc@plt>
mov    %rax,%r12
test   %ebp,%ebp
jle    1bc9 <main+0x9e9>
cmp    $0x2,%r14d
mov    $0x1,%ebp
cmovge %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   10c0 <_rdtsc@plt>
mov    %rax,%r13
mov    $0x9c4000,%edi
mov    %r15,%rsi
call   1040 <reader@plt>
xor    %eax,%eax
call   10c0 <_rdtsc@plt>
sub    %r13,%rbx
add    %rax,%rbx
add    $0xffffffff,%ebp
jne    1ba0 <main+0x9c0>
cvtsi2sd %r14d,%xmm0
mulsd  0x4da(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x9dc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10c0 <_rdtsc@plt>
sub    %r12,%rax
lea    0x97e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x97e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
movq   %rbx,%xmm1
punpckldq 0x46f(%rip),%xmm1
subpd  0x477(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
divsd  0x8(%rsp),%xmm0
lea    0x959(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@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 = [16 x i8] c"i:r:l:s:S:m:L:c\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 = [57 x i8] c" failed to malloc index_test array for line_count of %d\0A\00"
@.str.12 = [28 x i8] c"failed to malloc index_test\00"
@.str.13 = [67 x i8] c" line count must be a multiple of the fifth argument num_seg = %d\0A\00"
@.str.14 = [16 x i8] c" bad line_count\00"
@.str.15 = [25 x i8] c" count = %d, index = %d\0A\00"
@.str.16 = [15 x i8] c"index[%d] = %d\00"
@.str.17 = [21 x i8] c"index_test[%d] = %d\0A\00"
@.str.18 = [10 x i8] c"bad = %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.19 = [13 x i8] c"mmap failed\0A\00"
@.str.20 = [12 x i8] c"mmap failed\00"
@.str.21 = [12 x i8] c" buf1 = %p\0A\00"
@.str.22 = [54 x i8] c" buf_size = %zu, zero_loop = %zu, array_stride = %zd\0A\00"
@.str.23 = [32 x i8] c" finished zeroing buf ret = %p\0A\00"
@.str.24 = [39 x i8] c" target of last element in loop = %zx\0A\00"
@.str.25 = [33 x i8] c" array address = %p value = %lx\0A\00"
@.str.26 = [53 x i8] c"index = %d,element = %ld, address = %p, value = %lx\0A\00"
@.str.27 = [28 x i8] c"cannot set cpu run affinity\00"
@.str.28 = [35 x i8] c" process pinned to core %d to run\0A\00"
@.str.29 = [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.30 = [7 x i8] c" done\0A\00"
@.str.31 = [17 x i8] c" run time = %zd\0A\00"
@.str.32 = [19 x i8] c" inner time = %zd\0A\00"
@.str.33 = [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 i64
%12 = alloca i64
%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 i32
%25 = alloca i32
%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 i64
%35 = alloca i32
%36 = alloca i64
%37 = alloca i64
%38 = alloca i64
%39 = alloca i64
%40 = alloca i64
%41 = alloca i64
%42 = alloca i64
%43 = alloca i64
%44 = alloca i64
%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
%55 = alloca i32
%56 = alloca i32
%57 = alloca i32
%58 = alloca i32*
%59 = alloca %struct.timespec
%60 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %11
store i32 -1, i32* %20
store i32 0, i32* %21
store i32 10240000, i32* %22
store i32 100, i32* %23
store i32 1, i32* %24
store i32 0, i32* %25
store i64 0, i64* %32
store i64 0, i64* %34
store i32 0, i32* %35
store i32 32, i32* %55
store i32 0, i32* %56
store i64 4096, i64* %42
store i64 64, i64* %44
%61 = load i32, i32* %4
%62 = icmp slt i32 %61, 6
br i1 %62, label %63, label %69
63: ; preds = %2
%64 = load i32, i32* @stderr
%65 = load i32, i32* %4
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0), i32 %65)
%67 = call i32 (...) @usage()
%68 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %69
69: ; preds = %63, %2
br label %70
70: ; preds = %109, %69
%71 = load i32, i32* %4
%72 = load i8**, i8*** %5
%73 = call i32 @getopt(i32 %71, i8** %72, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
store i32 %73, i32* %49
%74 = icmp ne i32 %73, -1
br i1 %74, label %75, label %110
75: ; preds = %70
%76 = load i32, i32* %49
switch i32 %76, label %106 [
i32 105, label %77
i32 114, label %81
i32 108, label %85
i32 115, label %89
i32 83, label %93
i32 109, label %97
i32 76, label %101
i32 99, label %102
]
77: ; preds = %75
%78 = load i32, i32* @optarg
%79 = call i8* @atoi(i32 %78)
%80 = ptrtoint i8* %79 to i32
store i32 %80, i32* %16
br label %109
81: ; preds = %75
%82 = load i32, i32* @optarg
%83 = call i8* @atoi(i32 %82)
%84 = ptrtoint i8* %83 to i32
store i32 %84, i32* %17
br label %109
85: ; preds = %75
%86 = load i32, i32* @optarg
%87 = call i8* @atoi(i32 %86)
%88 = ptrtoint i8* %87 to i32
store i32 %88, i32* %18
br label %109
89: ; preds = %75
%90 = load i32, i32* @optarg
%91 = call i8* @atoi(i32 %90)
%92 = ptrtoint i8* %91 to i32
store i32 %92, i32* %19
br label %109
93: ; preds = %75
%94 = load i32, i32* @optarg
%95 = call i8* @atoi(i32 %94)
%96 = ptrtoint i8* %95 to i32
store i32 %96, i32* %55
br label %109
97: ; preds = %75
%98 = load i32, i32* @optarg
%99 = call i8* @atoi(i32 %98)
%100 = ptrtoint i8* %99 to i32
store i32 %100, i32* %24
br label %109
101: ; preds = %75
store i32 1, i32* %56
store i64 2097152, i64* %42
br label %109
102: ; preds = %75
%103 = load i32, i32* @optarg
%104 = call i8* @atoi(i32 %103)
%105 = ptrtoint i8* %104 to i64
store i64 %105, i64* %44
br label %109
106: ; preds = %75
%107 = load i32, i32* %49
%108 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %106, %102, %101, %97, %93, %89, %85, %81, %77
br label %70
110: ; preds = %70
%111 = load i32, i32* %23
%112 = load i32, i32* %24
%113 = mul nsw i32 %111, %112
store i32 %113, i32* %23
store i64 8, i64* %43
%114 = load i32, i32* @stderr
%115 = load i64, i64* %43
%116 = call i32 (i32, i8*, ...) @fprintf(i32 %114, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 %115)
%117 = load i32, i32* %35
%118 = load i32, i32* %16
%119 = call i32 @pin_cpu(i32 %117, i32 %118)
%120 = icmp eq i32 %119, -1
br i1 %120, label %121, label %123
121: ; preds = %110
%122 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %127
123: ; preds = %110
%124 = load i32, i32* @stderr
%125 = load i32, i32* %16
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %125)
br label %127
127: ; preds = %123, %121
%128 = load i32, i32* %55
%129 = sext i32 %128 to i64
%130 = mul i64 %129, 4
%131 = trunc i64 %130 to i32
%132 = call i64 @malloc(i32 %131)
%133 = inttoptr i64 %132 to i32*
store i32* %133, i32** %47
%134 = load i32*, i32** %47
%135 = icmp eq i32* %134, null
br i1 %135, label %136, label %141
136: ; preds = %127
%137 = load i32, i32* @stderr
%138 = load i32, i32* %55
%139 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32 %138)
%140 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %141
141: ; preds = %136, %127
%142 = load i64, i64* %42
%143 = load i32, i32* %19
%144 = sext i32 %143 to i64
%145 = mul i64 %142, %144
%146 = load i64, i64* %44
%147 = add i64 %145, %146
%148 = trunc i64 %147 to i32
store i32 %148, i32* %19
%149 = load i32, i32* %18
%150 = sext i32 %149 to i64
%151 = load i32, i32* %19
%152 = sext i32 %151 to i64
%153 = mul i64 %150, %152
store i64 %153, i64* %36
%154 = load i64, i64* %36
%155 = load i64, i64* %42
%156 = udiv i64 %154, %155
%157 = add i64 %156, 2
store i64 %157, i64* %41
%158 = load i64, i64* %42
%159 = load i64, i64* %41
%160 = mul i64 %158, %159
store i64 %160, i64* %36
%161 = load i32, i32* %19
%162 = sext i32 %161 to i64
%163 = udiv i64 %162, 8
store i64 %163, i64* %12
%164 = load i32, i32* %23
%165 = sitofp i32 %164 to double
%166 = load i32, i32* %22
%167 = sitofp i32 %166 to double
%168 = fmul double %165, %167
store double %168, double* %26
%169 = load i32, i32* %18
%170 = sext i32 %169 to i64
%171 = mul i64 %170, 4
%172 = trunc i64 %171 to i32
%173 = call i64 @malloc(i32 %172)
%174 = inttoptr i64 %173 to i32*
store i32* %174, i32** %51
%175 = load i32*, i32** %51
%176 = icmp eq i32* %175, null
br i1 %176, label %177, label %182
177: ; preds = %141
%178 = load i32, i32* @stderr
%179 = load i32, i32* %18
%180 = call i32 (i32, i8*, ...) @fprintf(i32 %178, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0), i32 %179)
%181 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
br label %182
182: ; preds = %177, %141
%183 = load i32, i32* %18
%184 = sext i32 %183 to i64
%185 = mul i64 %184, 4
%186 = trunc i64 %185 to i32
%187 = call i64 @malloc(i32 %186)
%188 = inttoptr i64 %187 to i32*
store i32* %188, i32** %52
%189 = load i32*, i32** %52
%190 = icmp eq i32* %189, null
br i1 %190, label %191, label %196
191: ; preds = %182
%192 = load i32, i32* @stderr
%193 = load i32, i32* %18
%194 = call i32 (i32, i8*, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0), i32 %193)
%195 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %196
196: ; preds = %191, %182
store i32 0, i32* %13
br label %197
197: ; preds = %206, %196
%198 = load i32, i32* %13
%199 = load i32, i32* %18
%200 = icmp slt i32 %198, %199
br i1 %200, label %201, label %209
201: ; preds = %197
%202 = load i32*, i32** %52
%203 = load i32, i32* %13
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i32, i32* %202, i64 %204
store i32 0, i32* %205
br label %206
206: ; preds = %201
%207 = load i32, i32* %13
%208 = add nsw i32 %207, 1
store i32 %208, i32* %13
br label %197
209: ; preds = %197
%210 = load i32, i32* %55
%211 = icmp eq i32 %210, 1
br i1 %211, label %212, label %227
212: ; preds = %209
store i32 0, i32* %13
br label %213
213: ; preds = %223, %212
%214 = load i32, i32* %13
%215 = load i32, i32* %18
%216 = icmp slt i32 %214, %215
br i1 %216, label %217, label %226
217: ; preds = %213
%218 = load i32, i32* %13
%219 = load i32*, i32** %51
%220 = load i32, i32* %13
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds i32, i32* %219, i64 %221
store i32 %218, i32* %222
br label %223
223: ; preds = %217
%224 = load i32, i32* %13
%225 = add nsw i32 %224, 1
store i32 %225, i32* %13
br label %213
226: ; preds = %213
br label %322
227: ; preds = %209
%228 = load i32*, i32** %47
%229 = load i32, i32* %55
%230 = call i32 @rndm_list(i32* %228, i32 %229)
%231 = load i32, i32* %18
%232 = load i32, i32* %55
%233 = sdiv i32 %231, %232
store i32 %233, i32* %53
%234 = load i32, i32* %53
%235 = load i32, i32* %55
%236 = mul nsw i32 %234, %235
%237 = load i32, i32* %18
%238 = icmp ne i32 %236, %237
br i1 %238, label %239, label %244
239: ; preds = %227
%240 = load i32, i32* @stderr
%241 = load i32, i32* %55
%242 = call i32 (i32, i8*, ...) @fprintf(i32 %240, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.13, i64 0, i64 0), i32 %241)
%243 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
br label %244
244: ; preds = %239, %227
store i32 0, i32* %54
%245 = load i64, i64* %36
%246 = load i32, i32* %55
%247 = sext i32 %246 to i64
%248 = udiv i64 %245, %247
store i64 %248, i64* %39
store i32 0, i32* %13
br label %249
249: ; preds = %314, %244
%250 = load i32, i32* %13
%251 = load i32, i32* %53
%252 = icmp slt i32 %250, %251
br i1 %252, label %253, label %317
253: ; preds = %249
%254 = load i32, i32* %13
%255 = load i32, i32* %55
%256 = mul nsw i32 %254, %255
store i32 %256, i32* %48
store i32 0, i32* %14
br label %257
257: ; preds = %300, %253
%258 = load i32, i32* %14
%259 = load i32, i32* %55
%260 = sub nsw i32 %259, 1
%261 = icmp slt i32 %258, %260
br i1 %261, label %262, label %303
262: ; preds = %257
%263 = load i32, i32* %54
%264 = add nsw i32 %263, 1
store i32 %264, i32* %54
%265 = load i32, i32* %53
%266 = load i32*, i32** %47
%267 = load i32, i32* %14
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds i32, i32* %266, i64 %268
%270 = load i32, i32* %269
%271 = mul nsw i32 %265, %270
%272 = sext i32 %271 to i64
store i64 %272, i64* %40
%273 = load i32*, i32** %47
%274 = load i32, i32* %14
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds i32, i32* %273, i64 %275
%277 = load i32, i32* %276
%278 = load i32, i32* %48
%279 = add nsw i32 %277, %278
%280 = load i32*, i32** %51
%281 = load i32, i32* %54
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds i32, i32* %280, i64 %282
store i32 %279, i32* %283
%284 = load i32*, i32** %51
%285 = load i32, i32* %54
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds i32, i32* %284, i64 %286
%288 = load i32, i32* %287
%289 = load i32, i32* %18
%290 = icmp sge i32 %288, %289
br i1 %290, label %291, label %299
291: ; preds = %262
%292 = load i32, i32* %54
%293 = load i32*, i32** %51
%294 = load i32, i32* %54
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds i32, i32* %293, i64 %295
%297 = load i32, i32* %296
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i32 %292, i32 %297)
br label %299
299: ; preds = %291, %262
br label %300
300: ; preds = %299
%301 = load i32, i32* %14
%302 = add nsw i32 %301, 1
store i32 %302, i32* %14
br label %257
303: ; preds = %257
%304 = load i32, i32* %54
%305 = add nsw i32 %304, 1
store i32 %305, i32* %54
%306 = load i32, i32* %13
%307 = add nsw i32 %306, 1
%308 = load i32, i32* %55
%309 = mul nsw i32 %307, %308
%310 = load i32*, i32** %51
%311 = load i32, i32* %54
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds i32, i32* %310, i64 %312
store i32 %309, i32* %313
br label %314
314: ; preds = %303
%315 = load i32, i32* %13
%316 = add nsw i32 %315, 1
store i32 %316, i32* %13
br label %249
317: ; preds = %249
%318 = load i32*, i32** %51
%319 = load i32, i32* %54
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds i32, i32* %318, i64 %320
store i32 0, i32* %321
br label %322
322: ; preds = %317, %226
%323 = load i32*, i32** %51
%324 = getelementptr inbounds i32, i32* %323, i64 0
store i32 0, i32* %324
store i32 0, i32* %13
br label %325
325: ; preds = %356, %322
%326 = load i32, i32* %13
%327 = load i32, i32* %18
%328 = icmp slt i32 %326, %327
br i1 %328, label %329, label %359
329: ; preds = %325
%330 = load i32*, i32** %51
%331 = load i32, i32* %13
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds i32, i32* %330, i64 %332
%334 = load i32, i32* %333
%335 = load i32, i32* %18
%336 = icmp sgt i32 %334, %335
br i1 %336, label %337, label %345
337: ; preds = %329
%338 = load i32, i32* %13
%339 = load i32*, i32** %51
%340 = load i32, i32* %13
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds i32, i32* %339, i64 %341
%343 = load i32, i32* %342
%344 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.16, i64 0, i64 0), i32 %338, i32 %343)
br label %345
345: ; preds = %337, %329
%346 = load i32*, i32** %52
%347 = load i32*, i32** %51
%348 = load i32, i32* %13
%349 = sext i32 %348 to i64
%350 = getelementptr inbounds i32, i32* %347, i64 %349
%351 = load i32, i32* %350
%352 = sext i32 %351 to i64
%353 = getelementptr inbounds i32, i32* %346, i64 %352
%354 = load i32, i32* %353
%355 = add nsw i32 %354, 1
store i32 %355, i32* %353
br label %356
356: ; preds = %345
%357 = load i32, i32* %13
%358 = add nsw i32 %357, 1
store i32 %358, i32* %13
br label %325
359: ; preds = %325
store i32 0, i32* %50
store i32 0, i32* %13
br label %360
360: ; preds = %387, %359
%361 = load i32, i32* %13
%362 = load i32, i32* %18
%363 = icmp slt i32 %361, %362
br i1 %363, label %364, label %390
364: ; preds = %360
%365 = load i32*, i32** %52
%366 = load i32, i32* %13
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds i32, i32* %365, i64 %367
%369 = load i32, i32* %368
%370 = icmp ne i32 %369, 1
br i1 %370, label %371, label %386
371: ; preds = %364
%372 = load i32, i32* %50
%373 = add nsw i32 %372, 1
store i32 %373, i32* %50
%374 = load i32, i32* %50
%375 = icmp slt i32 %374, 64
br i1 %375, label %376, label %385
376: ; preds = %371
%377 = load i32, i32* @stderr
%378 = load i32, i32* %13
%379 = load i32*, i32** %52
%380 = load i32, i32* %13
%381 = sext i32 %380 to i64
%382 = getelementptr inbounds i32, i32* %379, i64 %381
%383 = load i32, i32* %382
%384 = call i32 (i32, i8*, ...) @fprintf(i32 %377, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i32 %378, i32 %383)
br label %385
385: ; preds = %376, %371
br label %386
386: ; preds = %385, %364
br label %387
387: ; preds = %386
%388 = load i32, i32* %13
%389 = add nsw i32 %388, 1
store i32 %389, i32* %13
br label %360
390: ; preds = %360
%391 = load i32, i32* @stderr
%392 = load i32, i32* %50
%393 = call i32 (i32, i8*, ...) @fprintf(i32 %391, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i32 %392)
%394 = load i32, i32* %56
%395 = icmp eq i32 %394, 0
br i1 %395, label %396, label %408
396: ; preds = %390
%397 = load i64, i64* %36
%398 = load i32, i32* @PROT_READ
%399 = load i32, i32* @PROT_WRITE
%400 = or i32 %398, %399
%401 = load i32, i32* @MAP_PRIVATE
%402 = load i32, i32* @MAP_ANON
%403 = or i32 %401, %402
%404 = load i32, i32* %20
%405 = load i32, i32* %21
%406 = call i64 @mmap(i32* null, i64 %397, i32 %400, i32 %403, i32 %404, i32 %405)
%407 = inttoptr i64 %406 to i8*
store i8* %407, i8** %6
br label %408
408: ; preds = %396, %390
%409 = load i32, i32* %56
%410 = icmp eq i32 %409, 1
br i1 %410, label %411, label %425
411: ; preds = %408
%412 = load i64, i64* %36
%413 = load i32, i32* @PROT_READ
%414 = load i32, i32* @PROT_WRITE
%415 = or i32 %413, %414
%416 = load i32, i32* @MAP_PRIVATE
%417 = load i32, i32* @MAP_ANON
%418 = or i32 %416, %417
%419 = load i32, i32* @MAP_HUGETLB
%420 = or i32 %418, %419
%421 = load i32, i32* %20
%422 = load i32, i32* %21
%423 = call i64 @mmap(i32* null, i64 %412, i32 %415, i32 %420, i32 %421, i32 %422)
%424 = inttoptr i64 %423 to i8*
store i8* %424, i8** %6
br label %425
425: ; preds = %411, %408
%426 = load i8*, i8** %6
%427 = load i8*, i8** @MAP_FAILED
%428 = icmp eq i8* %426, %427
br i1 %428, label %429, label %433
429: ; preds = %425
%430 = load i32, i32* @stderr
%431 = call i32 (i32, i8*, ...) @fprintf(i32 %430, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%432 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
br label %433
433: ; preds = %429, %425
%434 = load i32, i32* @stderr
%435 = load i8*, i8** %6
%436 = call i32 (i32, i8*, ...) @fprintf(i32 %434, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i8* %435)
%437 = load i64, i64* %36
%438 = load i64, i64* %43
%439 = udiv i64 %437, %438
store i64 %439, i64* %38
%440 = load i32, i32* @stderr
%441 = load i64, i64* %36
%442 = load i64, i64* %38
%443 = load i64, i64* %12
%444 = call i32 (i32, i8*, ...) @fprintf(i32 %440, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.22, i64 0, i64 0), i64 %441, i64 %442, i64 %443)
%445 = load i8*, i8** %6
%446 = bitcast i8* %445 to i64*
store i64* %446, i64** %8
%447 = load i8*, i8** %6
%448 = load i64, i64* %36
%449 = call i8* @memset(i8* %447, i32 0, i64 %448)
store i8* %449, i8** %7
%450 = load i32, i32* @stderr
%451 = load i8*, i8** %7
%452 = call i32 (i32, i8*, ...) @fprintf(i32 %450, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.23, i64 0, i64 0), i8* %451)
store i64 0, i64* %37
br label %453
453: ; preds = %480, %433
%454 = load i64, i64* %37
%455 = load i32, i32* %18
%456 = sub nsw i32 %455, 1
%457 = sext i32 %456 to i64
%458 = icmp ult i64 %454, %457
br i1 %458, label %459, label %483
459: ; preds = %453
%460 = load i64*, i64** %8
%461 = load i32*, i32** %51
%462 = load i64, i64* %37
%463 = add i64 %462, 1
%464 = getelementptr inbounds i32, i32* %461, i64 %463
%465 = load i32, i32* %464
%466 = sext i32 %465 to i64
%467 = load i64, i64* %12
%468 = mul i64 %466, %467
%469 = getelementptr inbounds i64, i64* %460, i64 %468
%470 = ptrtoint i64* %469 to i64
%471 = load i64*, i64** %8
%472 = load i32*, i32** %51
%473 = load i64, i64* %37
%474 = getelementptr inbounds i32, i32* %472, i64 %473
%475 = load i32, i32* %474
%476 = sext i32 %475 to i64
%477 = load i64, i64* %12
%478 = mul i64 %476, %477
%479 = getelementptr inbounds i64, i64* %471, i64 %478
store i64 %470, i64* %479
br label %480
480: ; preds = %459
%481 = load i64, i64* %37
%482 = add i64 %481, 1
store i64 %482, i64* %37
br label %453
483: ; preds = %453
%484 = load i32, i32* @stderr
%485 = load i64*, i64** %8
%486 = load i32, i32* %18
%487 = sub nsw i32 %486, 1
%488 = sext i32 %487 to i64
%489 = getelementptr inbounds i64, i64* %485, i64 %488
%490 = load i64, i64* %489
%491 = load i8*, i8** %6
%492 = ptrtoint i8* %491 to i64
%493 = sub i64 %490, %492
%494 = call i32 (i32, i8*, ...) @fprintf(i32 %484, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.24, i64 0, i64 0), i64 %493)
%495 = load i64*, i64** %8
%496 = getelementptr inbounds i64, i64* %495, i64 0
%497 = ptrtoint i64* %496 to i64
%498 = load i64*, i64** %8
%499 = load i64, i64* %12
%500 = load i32*, i32** %51
%501 = load i32, i32* %18
%502 = sub nsw i32 %501, 1
%503 = sext i32 %502 to i64
%504 = getelementptr inbounds i32, i32* %500, i64 %503
%505 = load i32, i32* %504
%506 = sext i32 %505 to i64
%507 = mul i64 %499, %506
%508 = getelementptr inbounds i64, i64* %498, i64 %507
store i64 %497, i64* %508
store i32 0, i32* %50
%509 = load i64*, i64** %8
store i64* %509, i64** %9
%510 = load i32, i32* @stderr
%511 = load i64*, i64** %9
%512 = load i64*, i64** %9
%513 = load i64, i64* %512
%514 = call i32 (i32, i8*, ...) @fprintf(i32 %510, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0), i64* %511, i64 %513)
br label %515
515: ; preds = %547, %483
%516 = load i32, i32* %50
%517 = load i32, i32* %18
%518 = add nsw i32 %517, 4
%519 = icmp slt i32 %516, %518
br i1 %519, label %520, label %548
520: ; preds = %515
%521 = load i64*, i64** %9
%522 = load i64, i64* %521
%523 = inttoptr i64 %522 to i64*
store i64* %523, i64** %9
%524 = load i64*, i64** %9
%525 = load i64*, i64** %8
%526 = ptrtoint i64* %524 to i64
%527 = ptrtoint i64* %525 to i64
%528 = sub i64 %526, %527
%529 = sdiv exact i64 %528, 8
store i64 %529, i64* %10
%530 = load i64, i64* %10
%531 = load i64, i64* %43
%532 = udiv i64 %530, %531
store i64 %532, i64* %10
%533 = load i32, i32* %50
%534 = add nsw i32 %533, 1
store i32 %534, i32* %50
%535 = load i32, i32* %50
%536 = load i32, i32* %18
%537 = sub nsw i32 %536, 4
%538 = icmp sgt i32 %535, %537
br i1 %538, label %539, label %547
539: ; preds = %520
%540 = load i32, i32* @stderr
%541 = load i32, i32* %50
%542 = load i64, i64* %10
%543 = load i64*, i64** %9
%544 = load i64*, i64** %9
%545 = load i64, i64* %544
%546 = call i32 (i32, i8*, ...) @fprintf(i32 %540, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.26, i64 0, i64 0), i32 %541, i64 %542, i64* %543, i64 %545)
br label %547
547: ; preds = %539, %520
br label %515
548: ; preds = %515
%549 = load i32, i32* %35
%550 = load i32, i32* %17
%551 = call i32 @pin_cpu(i32 %549, i32 %550)
%552 = icmp eq i32 %551, -1
br i1 %552, label %553, label %555
553: ; preds = %548
%554 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.27, i64 0, i64 0))
br label %558
555: ; preds = %548
%556 = load i32, i32* %17
%557 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.28, i64 0, i64 0), i32 %556)
br label %558
558: ; preds = %555, %553
%559 = load i32, i32* %23
%560 = load i32, i32* %22
%561 = load i32, i32* %18
%562 = load i32, i32* %19
%563 = load i64, i64* %36
%564 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.29, i64 0, i64 0), i32 %559, i32 %560, i32 %561, i32 %562, i64 %563)
%565 = call i64 (...) @_rdtsc()
store i64 %565, i64* %30
store i32 0, i32* %13
br label %566
566: ; preds = %582, %558
%567 = load i32, i32* %13
%568 = load i32, i32* %23
%569 = icmp slt i32 %567, %568
br i1 %569, label %570, label %585
570: ; preds = %566
%571 = call i64 (...) @_rdtsc()
store i64 %571, i64* %27
%572 = load i32, i32* %22
%573 = load i64*, i64** %8
%574 = call i64 @reader(i32 %572, i64* %573)
store i64 %574, i64* %11
%575 = call i64 (...) @_rdtsc()
store i64 %575, i64* %28
%576 = load i64, i64* %28
%577 = load i64, i64* %27
%578 = sub i64 %576, %577
store i64 %578, i64* %29
%579 = load i64, i64* %29
%580 = load i64, i64* %32
%581 = add i64 %580, %579
store i64 %581, i64* %32
br label %582
582: ; preds = %570
%583 = load i32, i32* %13
%584 = add nsw i32 %583, 1
store i32 %584, i32* %13
br label %566
585: ; preds = %566
%586 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.30, i64 0, i64 0))
%587 = call i64 (...) @_rdtsc()
store i64 %587, i64* %31
%588 = load i64, i64* %31
%589 = load i64, i64* %30
%590 = sub i64 %588, %589
store i64 %590, i64* %33
%591 = load i64, i64* %33
%592 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.31, i64 0, i64 0), i64 %591)
%593 = load i64, i64* %32
%594 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.32, i64 0, i64 0), i64 %593)
%595 = load i64, i64* %32
%596 = uitofp i64 %595 to double
%597 = load double, double* %26
%598 = fdiv double %596, %597
%599 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0), double %598)
%600 = load i32, i32* %25
ret i32 %600
}

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