#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 long (*triad_pt)(int, char *, char *, double *, double *, double *);
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
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;
int MAP_PRIVATE;
int PROT_READ;
int PROT_WRITE;
size_t _loc_freq();
size_t _rdtsc();
int atoi(int /*<<< orphan*/);
double drand48();
int /*<<< orphan*/ err(int, char *, ...);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int getopt(int, char **, char *);
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
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 *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ triad(int, char *, char *, double *, double *, double *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  char *buf1, *buf2, *buf3;
  char triad_name[100], triad_base[] = "triad_";
  char string1[] = "this_is_string_1";
  char string2[] = "this_is_string_2";
  char *string_array[500009], *str_arg;
  int triad_base_len = 6, C;
  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, br_path;
  off_t offset = 0;
  int len = 10240000, iter = 100, mult = 1, test_val = 0, main_ret = 0;
  double iterations, br_path_val[500009], *a, *b, *c, ranval;
  size_t start, stop, run_time, call_start, call_stop, call_run_time,
      total_bytes = 0;
  size_t sum_run_time = 0, run_time_k = 0, init_start, init_end, init_run;
  __pid_t pid = 0;
  size_t buf_size1, buf_size23, 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, 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;
  size_t total = 0;
  struct timeval start_time, stop_time;
  int ret_int;
  size_t gotten_time, freq_val;
  typedef long (*triad_pt)(int len, char *str_arg, char *str_arg2,
                           double *restrict a, double *restrict b,
                           double *restrict c);
  triad_pt *triad_array;
  page_size = 4096;
  line_size = 64;
  len = 100;
  init_start = _rdtsc();
  if (argc < 3) {
    fprintf(stderr,
            "the random conditional branch code requires at least 3 arguments  "
            "there were %d\n",
            argc);
    usage();
    err(1, "insufficient invocation arguments");
  }
  while ((C = getopt(argc, argv, "i:r:l:m:T: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 'm':
      mult = atoi(optarg);
      break;
    case 'T':
      test_val = atoi(optarg);
      break;
    default:
      err(1, "unknown option %c", C);
    }
  }
  if ((test_val != 0) && (test_val != 1) && (test_val != 2)) {
    fprintf(stderr, "invalid value for -T was %d must be 0 or 1 or 2\n",
            test_val);
    exit(1);
  }
  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);
  }
  iterations = (double)iter;
  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");
  }
  for (i = 0; i < line_count; i++) {
    ranval = drand48();
    if (test_val == 1)
      string_array[i] = string1;
    if (test_val == 2)
      string_array[i] = string2;
    if (test_val == 0) {
      string_array[i] = string1;
      if (ranval > 0.5)
        string_array[i] = string2;
    }
  }
  buf_size1 = len * sizeof(double);
  buf1 = (char *)mmap(NULL, buf_size1, PROT_READ | PROT_WRITE,
                      MAP_PRIVATE | MAP_ANON, fd, offset);
  if (buf1 == NULL) {
    fprintf(stderr, " failed to malloc buf1 for len*sizeof(double) of %zd\n",
            buf_size1);
    err(1, "failed to malloc buf1");
  }
  buf_size23 = line_count * len * sizeof(double);
  buf2 = (char *)mmap(NULL, buf_size23, PROT_READ | PROT_WRITE,
                      MAP_PRIVATE | MAP_ANON, fd, offset);
  if (buf2 == NULL) {
    fprintf(stderr,
            " failed to malloc buf2 for line_count*len*sizeof(double) of %zd\n",
            buf_size23);
    err(1, "failed to malloc buf2");
  }
  buf3 = (char *)mmap(NULL, buf_size23, PROT_READ | PROT_WRITE,
                      MAP_PRIVATE | MAP_ANON, fd, offset);
  if (buf1 == NULL) {
    fprintf(stderr,
            " failed to malloc buf3 for line_count*len*sizeof(double) of %zd\n",
            buf_size23);
    err(1, "failed to malloc buf3");
  }
  a = (double *)buf1;
  b = (double *)buf2;
  c = (double *)buf3;
  for (i = 0; i < len; i++)
    a[i] = 0;
  for (i = 0; i < line_count * len; i++)
    b[i] = 1;
  for (i = 0; i < line_count * len; i++)
    c[i] = 2;
  init_end = _rdtsc();
  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 conditional br loop %d times which loops  %d times on set "
         "of %d functions\n",
         mult, iter, line_count);
  call_start = _rdtsc();
  ret_int = gettimeofday(&start_time, NULL);
  j = 0;
  for (k = 0; k < mult; k++) {
    for (i = 0; i < line_count; i++) {
      str_arg = string_array[i];
      ret_val =
          (size_t)triad(len, str_arg, string1, a, &b[i * len], &c[i * len]);
      total += ret_val;
    }
  }
  printf(" done\n");
  call_stop = _rdtsc();
  freq_val = _loc_freq();
  ret_int = gettimeofday(&stop_time, NULL);
  gotten_time = (size_t)(stop_time.tv_sec - start_time.tv_sec) * 1000000;
  gotten_time += (size_t)(stop_time.tv_usec - start_time.tv_usec);
  call_run_time = call_stop - call_start;
  init_run = init_end - init_start;
  printf(" run time = %zd\n", call_run_time);
  printf(" sum_run time = %zd\n", sum_run_time);
  printf(" gettimeofday_run time = %zd\n", gotten_time);
  printf("frequency = %zd\n", freq_val);
  printf(" init_run = %zd, init_end = %zd, call_start = %zd\n", init_run,
         init_end, call_start);
  printf("total = %lu\n", total);
  printf(" average cycles per iteration = %f\n",
         (double)call_run_time / ((double)500009 * mult));
  return main_ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a1580,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xead(%rip),%eax
mov    %eax,-0x97(%rbp)
mov    0xea4(%rip),%ax
mov    %ax,-0x93(%rbp)
mov    0xe99(%rip),%al
mov    %al,-0x91(%rbp)
mov    0x123a(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x1234(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0x122f(%rip),%al
mov    %al,-0xa0(%rbp)
mov    0x1232(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0x122c(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0x1227(%rip),%al
mov    %al,-0xc0(%rbp)
movl   $0x6,-0x3d0a2c(%rbp)
movq   $0x0,-0x3d0a58(%rbp)
movl   $0xffffffff,-0x3d0a80(%rbp)
ff ff ff
movl   $0x0,-0x3d0a88(%rbp)
movl   $0x9c4000,-0x3d0a8c(%rbp)
movl   $0x64,-0x3d0a90(%rbp)
movl   $0x1,-0x3d0a94(%rbp)
movl   $0x0,-0x3d0a98(%rbp)
movl   $0x0,-0x3d0a9c(%rbp)
movq   $0x0,-0x7a1448(%rbp)
movq   $0x0,-0x7a1450(%rbp)
movq   $0x0,-0x7a1458(%rbp)
movl   $0x0,-0x7a1474(%rbp)
movl   $0x20,-0x7a14fc(%rbp)
movl   $0x0,-0x7a1500(%rbp)
movq   $0x0,-0x7a1528(%rbp)
movq   $0x1000,-0x7a14b8(%rbp)
movq   $0x40,-0x7a14c8(%rbp)
movl   $0x64,-0x3d0a8c(%rbp)
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0x7a1460(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    138f <main+0x19f>
mov    0x2c6d(%rip),%rax
mov    (%rax),%edi
movslq -0x8(%rbp),%rdx
lea    0xd53(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    $0x1,%edi
lea    0xd8c(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    1394 <main+0x1a4>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xd94(%rip),%rdx
call   10d0 <getopt@plt>
mov    %eax,-0x3d0a30(%rbp)
cmp    $0xffffffff,%eax
je     1483 <main+0x293>
mov    -0x3d0a30(%rbp),%eax
add    $0xffffffac,%eax
mov    %eax,%ecx
mov    %rcx,-0x7a1570(%rbp)
sub    $0x1e,%eax
ja     1465 <main+0x275>
mov    -0x7a1570(%rbp),%rax
lea    0xc61(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x3d0a70(%rbp)
jmp    147e <main+0x28e>
mov    0x2bf0(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x3d0a74(%rbp)
jmp    147e <main+0x28e>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x3d0a78(%rbp)
jmp    147e <main+0x28e>
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x3d0a94(%rbp)
jmp    147e <main+0x28e>
mov    0x2ba5(%rip),%rax
mov    (%rax),%edi
call   10e0 <atoi@plt>
mov    %eax,-0x3d0a98(%rbp)
jmp    147e <main+0x28e>
mov    -0x3d0a30(%rbp),%edx
mov    $0x1,%edi
lea    0xccb(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    1394 <main+0x1a4>
cmpl   $0x0,-0x3d0a98(%rbp)
je     14d0 <main+0x2e0>
cmpl   $0x1,-0x3d0a98(%rbp)
je     14d0 <main+0x2e0>
cmpl   $0x2,-0x3d0a98(%rbp)
je     14d0 <main+0x2e0>
mov    0x2b1f(%rip),%rax
mov    (%rax),%edi
movslq -0x3d0a98(%rbp),%rdx
lea    0xc93(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
movq   $0x8,-0x7a14c0(%rbp)
mov    0x2aee(%rip),%rax
mov    (%rax),%edi
mov    -0x7a14c0(%rbp),%rdx
lea    0xc93(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x7a1474(%rbp),%edi
mov    -0x3d0a70(%rbp),%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    1529 <main+0x339>
mov    $0x1,%edi
lea    0xc7d(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    1545 <main+0x355>
mov    0x2aa0(%rip),%rax
mov    (%rax),%edi
movslq -0x3d0a70(%rbp),%rdx
lea    0xc71(%rip),%rsi
call   1070 <fprintf@plt>
cvtsi2sdl -0x3d0a90(%rbp),%xmm0
ff
movsd  %xmm0,-0x3d0aa8(%rbp)
ff
movslq -0x3d0a78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x7a14e8(%rbp)
cmpq   $0x0,-0x7a14e8(%rbp)
jne    15ab <main+0x3bb>
mov    0x2a4d(%rip),%rax
mov    (%rax),%edi
movslq -0x3d0a78(%rbp),%rdx
lea    0xc3a(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xc5d(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
movl   $0x0,-0x3d0a64(%rbp)
mov    -0x3d0a64(%rbp),%eax
cmp    -0x3d0a78(%rbp),%eax
jge    168d <main+0x49d>
mov    $0x0,%al
call   1110 <drand48@plt>
movsd  %xmm0,-0x7a1410(%rbp)
ff
cmpl   $0x1,-0x3d0a98(%rbp)
jne    15f9 <main+0x409>
lea    -0xb0(%rbp),%rcx
movslq -0x3d0a64(%rbp),%rax
mov    %rcx,-0x3d0a20(%rbp,%rax,8)
ff
cmpl   $0x2,-0x3d0a98(%rbp)
jne    161c <main+0x42c>
lea    -0xd0(%rbp),%rcx
movslq -0x3d0a64(%rbp),%rax
mov    %rcx,-0x3d0a20(%rbp,%rax,8)
ff
cmpl   $0x0,-0x3d0a98(%rbp)
jne    1674 <main+0x484>
lea    -0xb0(%rbp),%rcx
movslq -0x3d0a64(%rbp),%rax
mov    %rcx,-0x3d0a20(%rbp,%rax,8)
ff
movsd  -0x7a1410(%rbp),%xmm0
ff
movsd  0x9c9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    166f <main+0x47f>
lea    -0xd0(%rbp),%rcx
movslq -0x3d0a64(%rbp),%rax
mov    %rcx,-0x3d0a20(%rbp,%rax,8)
ff
jmp    1674 <main+0x484>
jmp    1679 <main+0x489>
mov    -0x3d0a64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a64(%rbp)
jmp    15b5 <main+0x3c5>
movslq -0x3d0a8c(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x7a1480(%rbp)
mov    -0x7a1480(%rbp),%rsi
mov    0x2943(%rip),%rax
mov    (%rax),%edx
mov    0x2912(%rip),%rax
or     (%rax),%edx
mov    0x28f9(%rip),%rax
mov    (%rax),%ecx
mov    0x28f8(%rip),%rax
or     (%rax),%ecx
mov    -0x3d0a80(%rbp),%r8d
mov    -0x3d0a88(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1030 <mmap@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    171f <main+0x52f>
mov    0x28d9(%rip),%rax
mov    (%rax),%edi
mov    -0x7a1480(%rbp),%rdx
lea    0xb11(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xb36(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x3d0a78(%rbp),%eax
imul   -0x3d0a8c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %rax,-0x7a1488(%rbp)
mov    -0x7a1488(%rbp),%rsi
mov    0x28a9(%rip),%rax
mov    (%rax),%edx
mov    0x2878(%rip),%rax
or     (%rax),%edx
mov    0x285f(%rip),%rax
mov    (%rax),%ecx
mov    0x285e(%rip),%rax
or     (%rax),%ecx
mov    -0x3d0a80(%rbp),%r8d
mov    -0x3d0a88(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1030 <mmap@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    17b9 <main+0x5c9>
mov    0x283f(%rip),%rax
mov    (%rax),%edi
mov    -0x7a1488(%rbp),%rdx
lea    0xac3(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xaf3(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x7a1488(%rbp),%rsi
mov    0x2829(%rip),%rax
mov    (%rax),%edx
mov    0x27f8(%rip),%rax
or     (%rax),%edx
mov    0x27df(%rip),%rax
mov    (%rax),%ecx
mov    0x27de(%rip),%rax
or     (%rax),%ecx
mov    -0x3d0a80(%rbp),%r8d
mov    -0x3d0a88(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edi
call   1030 <mmap@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1839 <main+0x649>
mov    0x27bf(%rip),%rax
mov    (%rax),%edi
mov    -0x7a1488(%rbp),%rdx
lea    0xa9a(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
lea    0xaca(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x7a13f8(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x7a1400(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x7a1408(%rbp)
movl   $0x0,-0x3d0a64(%rbp)
mov    -0x3d0a64(%rbp),%eax
cmp    -0x3d0a8c(%rbp),%eax
jge    18a0 <main+0x6b0>
mov    -0x7a13f8(%rbp),%rax
movslq -0x3d0a64(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3d0a64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a64(%rbp)
jmp    1864 <main+0x674>
movl   $0x0,-0x3d0a64(%rbp)
mov    -0x3d0a64(%rbp),%eax
mov    -0x3d0a78(%rbp),%ecx
imul   -0x3d0a8c(%rbp),%ecx
cmp    %ecx,%eax
jge    18f4 <main+0x704>
mov    -0x7a1400(%rbp),%rax
movslq -0x3d0a64(%rbp),%rcx
movsd  0x735(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3d0a64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a64(%rbp)
jmp    18aa <main+0x6ba>
movl   $0x0,-0x3d0a64(%rbp)
mov    -0x3d0a64(%rbp),%eax
mov    -0x3d0a78(%rbp),%ecx
imul   -0x3d0a8c(%rbp),%ecx
cmp    %ecx,%eax
jge    1948 <main+0x758>
mov    -0x7a1408(%rbp),%rax
movslq -0x3d0a64(%rbp),%rcx
movsd  0x6d9(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3d0a64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a64(%rbp)
jmp    18fe <main+0x70e>
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0x7a1468(%rbp)
mov    -0x7a1474(%rbp),%edi
mov    -0x3d0a74(%rbp),%esi
call   1060 <pin_cpu@plt>
cmp    $0xffffffff,%eax
jne    1988 <main+0x798>
mov    $0x1,%edi
lea    0x996(%rip),%rsi
mov    $0x0,%al
call   1090 <err@plt>
jmp    199c <main+0x7ac>
mov    -0x3d0a74(%rbp),%esi
lea    0x999(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3d0a94(%rbp),%esi
mov    -0x3d0a90(%rbp),%edx
mov    -0x3d0a78(%rbp),%ecx
lea    0x99c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   10b0 <_rdtsc@plt>
mov    %rax,-0x7a1430(%rbp)
lea    -0x7a1538(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
mov    %eax,-0x7a154c(%rbp)
movl   $0x0,-0x3d0a68(%rbp)
movl   $0x0,-0x3d0a6c(%rbp)
mov    -0x3d0a6c(%rbp),%eax
cmp    -0x3d0a94(%rbp),%eax
jge    1adb <main+0x8eb>
movl   $0x0,-0x3d0a64(%rbp)
mov    -0x3d0a64(%rbp),%eax
cmp    -0x3d0a78(%rbp),%eax
jge    1ac2 <main+0x8d2>
movslq -0x3d0a64(%rbp),%rax
mov    -0x3d0a20(%rbp,%rax,8),%rax
ff
mov    %rax,-0x3d0a28(%rbp)
mov    -0x3d0a8c(%rbp),%edi
mov    -0x3d0a28(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
mov    -0x7a13f8(%rbp),%rcx
mov    -0x7a1400(%rbp),%r8
mov    -0x3d0a64(%rbp),%eax
imul   -0x3d0a8c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    -0x7a1408(%rbp),%r9
mov    -0x3d0a64(%rbp),%eax
imul   -0x3d0a8c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r9
call   1080 <triad@plt>
mov    %rax,-0x3d0a58(%rbp)
mov    -0x3d0a58(%rbp),%rax
add    -0x7a1528(%rbp),%rax
mov    %rax,-0x7a1528(%rbp)
mov    -0x3d0a64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a64(%rbp)
jmp    1a10 <main+0x820>
jmp    1ac7 <main+0x8d7>
mov    -0x3d0a6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3d0a6c(%rbp)
jmp    19f4 <main+0x804>
lea    0x8c3(%rip),%rdi
xor    %eax,%eax
mov    %eax,-0x7a1578(%rbp)
mov    %al,-0x7a1571(%rbp)
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
call   10b0 <_rdtsc@plt>
mov    %rax,%rcx
mov    -0x7a1571(%rbp),%al
mov    %rcx,-0x7a1438(%rbp)
call   1100 <_loc_freq@plt>
mov    %rax,%rcx
mov    -0x7a1578(%rbp),%eax
mov    %rcx,-0x7a1560(%rbp)
mov    %eax,%esi
lea    -0x7a1548(%rbp),%rdi
call   1050 <gettimeofday@plt>
mov    %eax,%ecx
mov    -0x7a1571(%rbp),%al
mov    %ecx,-0x7a154c(%rbp)
mov    -0x7a1540(%rbp),%rcx
mov    -0x7a1530(%rbp),%rdx
sub    %rdx,%rcx
imul   $0xf4240,%rcx,%rcx
mov    %rcx,-0x7a1558(%rbp)
mov    -0x7a1548(%rbp),%rdx
mov    -0x7a1538(%rbp),%rcx
sub    %rcx,%rdx
mov    -0x7a1558(%rbp),%rcx
add    %rdx,%rcx
mov    %rcx,-0x7a1558(%rbp)
mov    -0x7a1438(%rbp),%rcx
mov    -0x7a1430(%rbp),%rdx
sub    %rdx,%rcx
mov    %rcx,-0x7a1440(%rbp)
mov    -0x7a1468(%rbp),%rcx
mov    -0x7a1460(%rbp),%rdx
sub    %rdx,%rcx
mov    %rcx,-0x7a1470(%rbp)
mov    -0x7a1440(%rbp),%rsi
lea    0x7ec(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
mov    -0x7a1450(%rbp),%rsi
lea    0x7e4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
mov    -0x7a1558(%rbp),%rsi
lea    0x7e0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
mov    -0x7a1560(%rbp),%rsi
lea    0x7e5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
mov    -0x7a1470(%rbp),%rsi
mov    -0x7a1468(%rbp),%rdx
mov    -0x7a1430(%rbp),%rcx
lea    0x7cf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7a1571(%rbp),%al
mov    -0x7a1528(%rbp),%rsi
lea    0x7e9(%rip),%rdi
call   1040 <printf@plt>
movaps 0x3c9(%rip),%xmm1
movq   -0x7a1440(%rbp),%xmm0
ff
punpckldq %xmm1,%xmm0
movapd 0x3c5(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdl -0x3d0a94(%rbp),%xmm2
ff
movsd  0x376(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0x7a8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x3d0a9c(%rbp),%eax
add    $0x7a1580,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3d09f8,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movb   $0x0,0x60(%rsp)
movapd 0xeb1(%rip),%xmm0
movapd %xmm0,0x90(%rsp)
movb   $0x0,0xa0(%rsp)
xor    %eax,%eax
call   10d0 <_rdtsc@plt>
mov    %rax,0x40(%rsp)
cmp    $0x2,%ebx
jg     1293 <main+0x83>
mov    0x2d68(%rip),%rax
mov    (%rax),%edi
movslq %ebx,%rdx
lea    0xe8d(%rip),%rsi
call   1090 <fprintf@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
movl   $0x1,0x4(%rsp)
lea    0xed2(%rip),%r15
lea    0xed7(%rip),%r12
lea    0xda0(%rip),%r13
xor    %r14d,%r14d
mov    %rax,0x10(%rsp)
jmp    12da <main+0xca>
nopw   0x0(%rax,%rax,1)
cmp    $0xffffffff,%eax
je     1360 <main+0x150>
mov    $0x1,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10b0 <err@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
call   10f0 <getopt@plt>
lea    -0x54(%rax),%ecx
cmp    $0x1e,%ecx
ja     12c0 <main+0xb0>
movslq 0x0(%r13,%rcx,4),%rcx
add    %r13,%rcx
jmp    *%rcx
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %eax,%r14d
jmp    12da <main+0xca>
mov    0x2ce5(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %eax,0x8(%rsp)
jmp    12da <main+0xca>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %rax,0x10(%rsp)
jmp    12da <main+0xca>
mov    0x2cbc(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %eax,0x4(%rsp)
jmp    12da <main+0xca>
mov    0x2ca8(%rip),%rax
mov    (%rax),%edi
call   1100 <atoi@plt>
mov    %eax,0x18(%rsp)
jmp    12da <main+0xca>
mov    0x2c69(%rip),%r12
mov    (%r12),%edi
cmp    $0x3,%r14d
jae    1a75 <main+0x865>
lea    0xe47(%rip),%rsi
mov    $0x8,%edx
call   1090 <fprintf@plt>
xor    %edi,%edi
mov    0x8(%rsp),%ebp
mov    %ebp,%esi
call   1080 <pin_cpu@plt>
cmp    $0xffffffff,%eax
mov    0x10(%rsp),%rbx
je     13b2 <main+0x1a2>
mov    (%r12),%edi
movslq %ebp,%rdx
lea    0xe44(%rip),%rsi
call   1090 <fprintf@plt>
jmp    13c5 <main+0x1b5>
lea    0xe1f(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
lea    0x0(,%rbx,4),%edi
call   10c0 <malloc@plt>
test   %rax,%rax
jne    13fc <main+0x1ec>
movslq %ebx,%rdx
mov    (%r12),%edi
lea    0xe27(%rip),%rsi
call   1090 <fprintf@plt>
lea    0xe4f(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
mov    %ebx,%r13d
test   %ebx,%ebx
jle    1474 <main+0x264>
lea    0x50(%rsp),%rbx
lea    0x90(%rsp),%r15
xor    %ebp,%ebp
jmp    1431 <main+0x221>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,0xb0(%rsp,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r13
je     1474 <main+0x264>
xor    %eax,%eax
call   1130 <drand48@plt>
test   %r14d,%r14d
je     1460 <main+0x250>
cmp    $0x2,%r14d
je     1420 <main+0x210>
cmp    $0x1,%r14d
jne    1428 <main+0x218>
mov    %rbx,0xb0(%rsp,%rbp,8)
jmp    1428 <main+0x218>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,0xb0(%rsp,%rbp,8)
ucomisd 0xb90(%rip),%xmm0
ja     1420 <main+0x210>
jmp    1428 <main+0x218>
mov    0x2b75(%rip),%rax
mov    0x2b46(%rip),%rbx
mov    (%rbx),%edx
or     (%rax),%edx
mov    0x2b2b(%rip),%rax
mov    0x2b2c(%rip),%rbp
mov    0x0(%rbp),%ecx
or     (%rax),%ecx
mov    $0x320,%esi
xor    %edi,%edi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,0x28(%rsp)
test   %rax,%rax
jne    14e0 <main+0x2d0>
mov    (%r12),%edi
lea    0xd93(%rip),%rsi
mov    $0x320,%edx
call   1090 <fprintf@plt>
lea    0xdb8(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
mov    0x10(%rsp),%r12
imul   $0x64,%r12d,%r14d
movslq %r14d,%r15
mov    (%rbx),%edx
mov    0x2afb(%rip),%rax
or     (%rax),%edx
shl    $0x3,%r15
mov    0x0(%rbp),%ecx
mov    0x2ab3(%rip),%rax
or     (%rax),%ecx
xor    %edi,%edi
mov    %r15,%rsi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
jne    154f <main+0x33f>
mov    0x2aa5(%rip),%rax
mov    (%rax),%edi
lea    0xd6e(%rip),%rsi
mov    %r15,%rdx
call   1090 <fprintf@plt>
lea    0xda0(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
mov    (%rbx),%edx
mov    0x2a98(%rip),%rax
or     (%rax),%edx
mov    0x0(%rbp),%ecx
mov    0x2a54(%rip),%rax
or     (%rax),%ecx
xor    %edi,%edi
mov    %r15,%rsi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%rbp
mov    0x28(%rsp),%rbx
test   %rbx,%rbx
jne    15b1 <main+0x3a1>
mov    0x2a43(%rip),%rax
mov    (%rax),%edi
lea    0xd63(%rip),%rsi
mov    %r15,%rdx
call   1090 <fprintf@plt>
lea    0xd95(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
mov    $0x320,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
test   %r12d,%r12d
mov    0x20(%rsp),%rbx
jle    183e <main+0x62e>
cmp    $0x2,%r14d
mov    $0x1,%eax
cmovge %r14d,%eax
cmp    $0x4,%eax
jae    15e7 <main+0x3d7>
xor    %ecx,%ecx
jmp    16d9 <main+0x4c9>
mov    %eax,%ecx
and    $0x7ffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    1610 <main+0x400>
xor    %edi,%edi
jmp    16a5 <main+0x495>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
movapd 0x9f2(%rip),%xmm0
xchg   %ax,%ax
movupd %xmm0,(%rbx,%rdi,8)
movupd %xmm0,0x10(%rbx,%rdi,8)
movupd %xmm0,0x20(%rbx,%rdi,8)
movupd %xmm0,0x30(%rbx,%rdi,8)
movupd %xmm0,0x40(%rbx,%rdi,8)
movupd %xmm0,0x50(%rbx,%rdi,8)
movupd %xmm0,0x60(%rbx,%rdi,8)
movupd %xmm0,0x70(%rbx,%rdi,8)
movupd %xmm0,0x80(%rbx,%rdi,8)
movupd %xmm0,0x90(%rbx,%rdi,8)
movupd %xmm0,0xa0(%rbx,%rdi,8)
movupd %xmm0,0xb0(%rbx,%rdi,8)
movupd %xmm0,0xc0(%rbx,%rdi,8)
movupd %xmm0,0xd0(%rbx,%rdi,8)
movupd %xmm0,0xe0(%rbx,%rdi,8)
movupd %xmm0,0xf0(%rbx,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1620 <main+0x410>
test   %rdx,%rdx
je     16d4 <main+0x4c4>
lea    (%rbx,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movapd 0x950(%rip),%xmm0
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    16c0 <main+0x4b0>
cmp    %rax,%rcx
je     16fd <main+0x4ed>
movabs $0x3ff0000000000000,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rdx,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    16f0 <main+0x4e0>
test   %r12d,%r12d
jle    183e <main+0x62e>
cmp    $0x4,%eax
jae    1712 <main+0x502>
xor    %ecx,%ecx
jmp    1819 <main+0x609>
mov    %eax,%ecx
and    $0x7ffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    173b <main+0x52b>
xor    %edi,%edi
jmp    17d6 <main+0x5c6>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
movapd 0x8d7(%rip),%xmm0
nopl   0x0(%rax)
movupd %xmm0,0x0(%rbp,%rdi,8)
movupd %xmm0,0x10(%rbp,%rdi,8)
movupd %xmm0,0x20(%rbp,%rdi,8)
movupd %xmm0,0x30(%rbp,%rdi,8)
movupd %xmm0,0x40(%rbp,%rdi,8)
movupd %xmm0,0x50(%rbp,%rdi,8)
movupd %xmm0,0x60(%rbp,%rdi,8)
movupd %xmm0,0x70(%rbp,%rdi,8)
movupd %xmm0,0x80(%rbp,%rdi,8)
movupd %xmm0,0x90(%rbp,%rdi,8)
movupd %xmm0,0xa0(%rbp,%rdi,8)
movupd %xmm0,0xb0(%rbp,%rdi,8)
movupd %xmm0,0xc0(%rbp,%rdi,8)
movupd %xmm0,0xd0(%rbp,%rdi,8)
movupd %xmm0,0xe0(%rbp,%rdi,8)
movupd %xmm0,0xf0(%rbp,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1750 <main+0x540>
test   %rdx,%rdx
je     1814 <main+0x604>
lea    0x10(,%rdi,8),%rsi
add    %rbp,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movapd 0x82c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1800 <main+0x5f0>
cmp    %rax,%rcx
je     183e <main+0x62e>
movabs $0x4000000000000000,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rdx,0x0(%rbp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1830 <main+0x620>
xor    %eax,%eax
call   10d0 <_rdtsc@plt>
mov    %rax,%r14
xor    %edi,%edi
mov    0x18(%rsp),%ebx
mov    %ebx,%esi
call   1080 <pin_cpu@plt>
cmp    $0xffffffff,%eax
mov    %r13,0x8(%rsp)
mov    %rbp,0x48(%rsp)
mov    %r14,0x38(%rsp)
je     187b <main+0x66b>
lea    0xafc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    188e <main+0x67e>
lea    0xace(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   10b0 <err@plt>
lea    0xafa(%rip),%rdi
xor    %ebp,%ebp
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
mov    $0x64,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10d0 <_rdtsc@plt>
mov    %rax,0x30(%rsp)
lea    0x80(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    $0x0,%r15d
test   %ebx,%ebx
jle    194c <main+0x73c>
lea    0x50(%rsp),%r13
xor    %r15d,%r15d
mov    0x28(%rsp),%rbx
jmp    18f3 <main+0x6e3>
mov    0x18(%rsp),%rbp
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
mov    0x10(%rsp),%r12
je     194c <main+0x73c>
mov    %rbp,0x18(%rsp)
test   %r12d,%r12d
jle    18e0 <main+0x6d0>
mov    0x20(%rsp),%r12
mov    0x48(%rsp),%r14
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    0xb0(%rsp,%rbp,8),%rsi
mov    $0x64,%edi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    %r12,%r8
mov    %r14,%r9
call   10a0 <triad@plt>
add    %rax,%r15
add    $0x1,%rbp
add    $0x320,%r14
add    $0x320,%r12
cmp    %rbp,0x8(%rsp)
jne    1910 <main+0x700>
jmp    18e0 <main+0x6d0>
lea    0xb49(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10d0 <_rdtsc@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1120 <_loc_freq@plt>
mov    %rax,0x8(%rsp)
lea    0x70(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    0x70(%rsp),%rbx
mov    0x78(%rsp),%rax
sub    0x88(%rsp),%rax
sub    0x80(%rsp),%rbx
imul   $0xf4240,%rax,%rax
add    %rax,%rbx
mov    0x30(%rsp),%r14
sub    %r14,%r12
mov    0x38(%rsp),%r13
mov    %r13,%rbp
sub    0x40(%rsp),%rbp
lea    0xa29(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa29(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa2e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa3b(%rip),%rdi
mov    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa39(%rip),%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa55(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movq   %r12,%xmm1
punpckldq 0x603(%rip),%xmm1
subpd  0x60b(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
cvtsi2sdl 0x4(%rsp),%xmm2
addsd  %xmm1,%xmm0
mulsd  0x5b9(%rip),%xmm2
divsd  %xmm2,%xmm0
lea    0xa1e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x3d09f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movslq %r14d,%rdx
lea    0x713(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@__const.main.string1 = [17 x i8] c"this_is_string_1\00"
@__const.main.string2 = [17 x i8] c"this_is_string_2\00"
@stderr = global i32 0
@.str = [81 x i8] c"the random conditional branch code requires at least 3 arguments there were %d\0A\00"
@.str.1 = [34 x i8] c"insufficient invocation arguments\00"
@.str.2 = [12 x i8] c"i:r:l:m:T:C\00"
@optarg = global i32 0
@.str.3 = [18 x i8] c"unknown option %c\00"
@.str.4 = [49 x i8] c"invalid value for -T was %d must be 0 or 1 or 2\0A\00"
@.str.5 = [21 x i8] c"size_t in %zd bytes\0A\00"
@.str.6 = [23 x i8] c"failed to set affinity\00"
@.str.7 = [28 x i8] c" process pinned to core %d\0A\00"
@.str.8 = [52 x i8] c" failed to malloc index array for line_count of %d\0A\00"
@.str.9 = [23 x i8] c"failed to malloc index\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_PRIVATE = global i32 0
@MAP_ANON = global i32 0
@.str.10 = [54 x i8] c" failed to malloc buf1 for len*sizeof(double) of %zd\0A\00"
@.str.11 = [22 x i8] c"failed to malloc buf1\00"
@.str.12 = [65 x i8] c" failed to malloc buf2 for line_count*len*sizeof(double) of %zd\0A\00"
@.str.13 = [22 x i8] c"failed to malloc buf2\00"
@.str.14 = [65 x i8] c" failed to malloc buf3 for line_count*len*sizeof(double) of %zd\0A\00"
@.str.15 = [22 x i8] c"failed to malloc buf3\00"
@.str.16 = [28 x i8] c"cannot set cpu run affinity\00"
@.str.17 = [35 x i8] c" process pinned to core %d to run\0A\00"
@.str.18 = [84 x i8] c" calling conditional br loop %d times which loops %d times on set of %d functions\0A\00"
@.str.20 = [17 x i8] c" run time = %zd\0A\00"
@.str.21 = [21 x i8] c" sum_run time = %zd\0A\00"
@.str.22 = [30 x i8] c" gettimeofday_run time = %zd\0A\00"
@.str.23 = [17 x i8] c"frequency = %zd\0A\00"
@.str.24 = [51 x i8] c" init_run = %zd, init_end = %zd, call_start = %zd\0A\00"
@.str.25 = [13 x i8] c"total = %lu\0A\00"
@.str.26 = [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 = alloca [17 x i8]
%4 = alloca [17 x i8]
%5 = alloca [500009 x i8*]
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %4, i64 0, i64 0
%10 = bitcast [500009 x i8*]* %5 to i8*
%11 = bitcast %struct.timeval* %6 to i8*
%12 = bitcast %struct.timeval* %7 to i8*
%13 = tail call i64 (...) @_rdtsc()
%14 = icmp slt i32 %0, 3
br i1 %14, label %15, label %21
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = sext i32 %0 to i64
%18 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i64 %17)
%19 = tail call i32 (...) @usage()
%20 = 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 %21
21: ; preds = %15, %2
br label %22
22: ; preds = %21, %56
%23 = phi i32 [ 0, %21 ], [ %58, %56 ]
%24 = phi i32 [ 1, %21 ], [ %29, %56 ]
%25 = phi i32 [ undef, %21 ], [ %34, %56 ]
%26 = phi i32 [ undef, %21 ], [ %38, %56 ]
%27 = phi i32 [ undef, %21 ], [ %41, %56 ]
br label %28
28: ; preds = %22, %53
%29 = phi i32 [ %24, %22 ], [ %55, %53 ]
%30 = phi i32 [ %25, %22 ], [ %34, %53 ]
%31 = phi i32 [ %26, %22 ], [ %38, %53 ]
%32 = phi i32 [ %27, %22 ], [ %41, %53 ]
br label %33
33: ; preds = %28, %50
%34 = phi i32 [ %30, %28 ], [ %52, %50 ]
%35 = phi i32 [ %31, %28 ], [ %38, %50 ]
%36 = phi i32 [ %32, %28 ], [ %41, %50 ]
br label %37
37: ; preds = %33, %47
%38 = phi i32 [ %35, %33 ], [ %49, %47 ]
%39 = phi i32 [ %36, %33 ], [ %41, %47 ]
br label %40
40: ; preds = %37, %44
%41 = phi i32 [ %39, %37 ], [ %46, %44 ]
br label %42
42: ; preds = %40, %59
%43 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
switch i32 %43, label %59 [
i32 -1, label %61
i32 105, label %44
i32 114, label %47
i32 108, label %50
i32 109, label %53
i32 84, label %56
]
44: ; preds = %42
%45 = load i32, i32* @optarg
%46 = tail call i32 @atoi(i32 %45)
br label %40
47: ; preds = %42
%48 = load i32, i32* @optarg
%49 = tail call i32 @atoi(i32 %48)
br label %37
50: ; preds = %42
%51 = load i32, i32* @optarg
%52 = tail call i32 @atoi(i32 %51)
br label %33
53: ; preds = %42
%54 = load i32, i32* @optarg
%55 = tail call i32 @atoi(i32 %54)
br label %28
56: ; preds = %42
%57 = load i32, i32* @optarg
%58 = tail call i32 @atoi(i32 %57)
br label %22
59: ; preds = %42
%60 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %43)
br label %42
61: ; preds = %42
%62 = icmp ugt i32 %23, 2
%63 = load i32, i32* @stderr
br i1 %62, label %64, label %68
64: ; preds = %61
%65 = sext i32 %23 to i64
%66 = tail call i32 @fprintf(i32 %63, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i64 %65)
%67 = tail call i32 @exit(i32 1)
unreachable
68: ; preds = %61
%69 = tail call i32 @fprintf(i32 %63, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 8)
%70 = tail call i32 @pin_cpu(i32 0, i32 %41)
%71 = icmp eq i32 %70, -1
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %78
74: ; preds = %68
%75 = load i32, i32* @stderr
%76 = sext i32 %41 to i64
%77 = tail call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i64 %76)
br label %78
78: ; preds = %74, %72
%79 = shl i32 %34, 2
%80 = tail call i64 @malloc(i32 %79)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %78
%83 = sext i32 %34 to i64
%84 = load i32, i32* @stderr
%85 = tail call i32 @fprintf(i32 %84, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i64 %83)
%86 = tail call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
br label %87
87: ; preds = %82, %78
%88 = icmp sgt i32 %34, 0
br i1 %88, label %89, label %105
89: ; preds = %87
%90 = zext i32 %34 to i64
br label %91
91: ; preds = %89, %102
%92 = phi i64 [ 0, %89 ], [ %103, %102 ]
%93 = call double (...) @drand48()
switch i32 %23, label %102 [
i32 1, label %94
i32 2, label %96
i32 0, label %98
]
94: ; preds = %91
%95 = getelementptr inbounds [500009 x i8*], [500009 x i8*]* %5, i64 0, i64 %92
store i8* %8, i8** %95
br label %102
96: ; preds = %91
%97 = getelementptr inbounds [500009 x i8*], [500009 x i8*]* %5, i64 0, i64 %92
store i8* %9, i8** %97
br label %102
98: ; preds = %91
%99 = getelementptr inbounds [500009 x i8*], [500009 x i8*]* %5, i64 0, i64 %92
store i8* %8, i8** %99
%100 = fcmp ogt double %93, 5.000000e-01
br i1 %100, label %101, label %102
101: ; preds = %98
store i8* %9, i8** %99
br label %102
102: ; preds = %96, %94, %91, %101, %98
%103 = add nuw nsw i64 %92, 1
%104 = icmp eq i64 %103, %90
br i1 %104, label %105, label %91
105: ; preds = %102, %87
%106 = load i32, i32* @PROT_READ
%107 = load i32, i32* @PROT_WRITE
%108 = or i32 %107, %106
%109 = load i32, i32* @MAP_PRIVATE
%110 = load i32, i32* @MAP_ANON
%111 = or i32 %110, %109
%112 = call i64 @mmap(i32* null, i64 800, i32 %108, i32 %111, i32 -1, i32 0)
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %105
%115 = load i32, i32* @stderr
%116 = call i32 @fprintf(i32 %115, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i64 0, i64 0), i64 800)
%117 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
br label %118
118: ; preds = %114, %105
%119 = mul nsw i32 %34, 100
%120 = sext i32 %119 to i64
%121 = shl nsw i64 %120, 3
%122 = load i32, i32* @PROT_READ
%123 = load i32, i32* @PROT_WRITE
%124 = or i32 %123, %122
%125 = load i32, i32* @MAP_PRIVATE
%126 = load i32, i32* @MAP_ANON
%127 = or i32 %126, %125
%128 = call i64 @mmap(i32* null, i64 %121, i32 %124, i32 %127, i32 -1, i32 0)
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %134
130: ; preds = %118
%131 = load i32, i32* @stderr
%132 = call i32 @fprintf(i32 %131, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0), i64 %121)
%133 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %134
134: ; preds = %130, %118
%135 = load i32, i32* @PROT_READ
%136 = load i32, i32* @PROT_WRITE
%137 = or i32 %136, %135
%138 = load i32, i32* @MAP_PRIVATE
%139 = load i32, i32* @MAP_ANON
%140 = or i32 %139, %138
%141 = call i64 @mmap(i32* null, i64 %121, i32 %137, i32 %140, i32 -1, i32 0)
br i1 %113, label %142, label %146
142: ; preds = %134
%143 = load i32, i32* @stderr
%144 = call i32 @fprintf(i32 %143, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.14, i64 0, i64 0), i64 %121)
%145 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
br label %146
146: ; preds = %142, %134
%147 = inttoptr i64 %112 to double*
%148 = inttoptr i64 %112 to i8*
%149 = inttoptr i64 %128 to double*
%150 = inttoptr i64 %141 to double*
br i1 %88, label %151, label %312
151: ; preds = %146
%152 = call i32 @llvm.smax.i32(i32 %119, i32 1)
%153 = zext i32 %152 to i64
%154 = icmp ult i32 %152, 4
br i1 %154, label %224, label %155
155: ; preds = %151
%156 = and i64 %153, 2147483644
%157 = add nsw i64 %156, -4
%158 = lshr exact i64 %157, 2
%159 = add nuw nsw i64 %158, 1
%160 = and i64 %159, 7
%161 = icmp ult i64 %157, 28
br i1 %161, label %209, label %162
162: ; preds = %155
%163 = and i64 %159, 9223372036854775800
br label %164
164: ; preds = %164, %162
%165 = phi i64 [ 0, %162 ], [ %206, %164 ]
%166 = phi i64 [ 0, %162 ], [ %207, %164 ]
%167 = getelementptr inbounds double, double* %149, i64 %165
%168 = bitcast double* %167 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %168
%169 = getelementptr inbounds double, double* %167, i64 2
%170 = bitcast double* %169 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %170
%171 = or i64 %165, 4
%172 = getelementptr inbounds double, double* %149, i64 %171
%173 = bitcast double* %172 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %173
%174 = getelementptr inbounds double, double* %172, i64 2
%175 = bitcast double* %174 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %175
%176 = or i64 %165, 8
%177 = getelementptr inbounds double, double* %149, i64 %176
%178 = bitcast double* %177 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %178
%179 = getelementptr inbounds double, double* %177, i64 2
%180 = bitcast double* %179 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %180
%181 = or i64 %165, 12
%182 = getelementptr inbounds double, double* %149, i64 %181
%183 = bitcast double* %182 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %183
%184 = getelementptr inbounds double, double* %182, i64 2
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %185
%186 = or i64 %165, 16
%187 = getelementptr inbounds double, double* %149, i64 %186
%188 = bitcast double* %187 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %188
%189 = getelementptr inbounds double, double* %187, i64 2
%190 = bitcast double* %189 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %190
%191 = or i64 %165, 20
%192 = getelementptr inbounds double, double* %149, i64 %191
%193 = bitcast double* %192 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %193
%194 = getelementptr inbounds double, double* %192, i64 2
%195 = bitcast double* %194 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %195
%196 = or i64 %165, 24
%197 = getelementptr inbounds double, double* %149, i64 %196
%198 = bitcast double* %197 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %198
%199 = getelementptr inbounds double, double* %197, i64 2
%200 = bitcast double* %199 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %200
%201 = or i64 %165, 28
%202 = getelementptr inbounds double, double* %149, i64 %201
%203 = bitcast double* %202 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %203
%204 = getelementptr inbounds double, double* %202, i64 2
%205 = bitcast double* %204 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %205
%206 = add nuw i64 %165, 32
%207 = add i64 %166, 8
%208 = icmp eq i64 %207, %163
br i1 %208, label %209, label %164
209: ; preds = %164, %155
%210 = phi i64 [ 0, %155 ], [ %206, %164 ]
%211 = icmp eq i64 %160, 0
br i1 %211, label %222, label %212
212: ; preds = %209, %212
%213 = phi i64 [ %219, %212 ], [ %210, %209 ]
%214 = phi i64 [ %220, %212 ], [ 0, %209 ]
%215 = getelementptr inbounds double, double* %149, i64 %213
%216 = bitcast double* %215 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %216
%217 = getelementptr inbounds double, double* %215, i64 2
%218 = bitcast double* %217 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %218
%219 = add nuw i64 %213, 4
%220 = add i64 %214, 1
%221 = icmp eq i64 %220, %160
br i1 %221, label %222, label %212
222: ; preds = %212, %209
%223 = icmp eq i64 %156, %153
br i1 %223, label %226, label %224
224: ; preds = %151, %222
%225 = phi i64 [ 0, %151 ], [ %156, %222 ]
br label %302
226: ; preds = %302, %222
br i1 %88, label %227, label %312
227: ; preds = %226
%228 = call i32 @llvm.smax.i32(i32 %119, i32 1)
%229 = zext i32 %228 to i64
%230 = icmp ult i32 %152, 4
br i1 %230, label %300, label %231
231: ; preds = %227
%232 = and i64 %153, 2147483644
%233 = add nsw i64 %232, -4
%234 = lshr exact i64 %233, 2
%235 = add nuw nsw i64 %234, 1
%236 = and i64 %235, 7
%237 = icmp ult i64 %233, 28
br i1 %237, label %285, label %238
238: ; preds = %231
%239 = and i64 %235, 9223372036854775800
br label %240
240: ; preds = %240, %238
%241 = phi i64 [ 0, %238 ], [ %282, %240 ]
%242 = phi i64 [ 0, %238 ], [ %283, %240 ]
%243 = getelementptr inbounds double, double* %150, i64 %241
%244 = bitcast double* %243 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %244
%245 = getelementptr inbounds double, double* %243, i64 2
%246 = bitcast double* %245 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %246
%247 = or i64 %241, 4
%248 = getelementptr inbounds double, double* %150, i64 %247
%249 = bitcast double* %248 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %249
%250 = getelementptr inbounds double, double* %248, i64 2
%251 = bitcast double* %250 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %251
%252 = or i64 %241, 8
%253 = getelementptr inbounds double, double* %150, i64 %252
%254 = bitcast double* %253 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %254
%255 = getelementptr inbounds double, double* %253, i64 2
%256 = bitcast double* %255 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %256
%257 = or i64 %241, 12
%258 = getelementptr inbounds double, double* %150, i64 %257
%259 = bitcast double* %258 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %259
%260 = getelementptr inbounds double, double* %258, i64 2
%261 = bitcast double* %260 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %261
%262 = or i64 %241, 16
%263 = getelementptr inbounds double, double* %150, i64 %262
%264 = bitcast double* %263 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %264
%265 = getelementptr inbounds double, double* %263, i64 2
%266 = bitcast double* %265 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %266
%267 = or i64 %241, 20
%268 = getelementptr inbounds double, double* %150, i64 %267
%269 = bitcast double* %268 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %269
%270 = getelementptr inbounds double, double* %268, i64 2
%271 = bitcast double* %270 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %271
%272 = or i64 %241, 24
%273 = getelementptr inbounds double, double* %150, i64 %272
%274 = bitcast double* %273 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %274
%275 = getelementptr inbounds double, double* %273, i64 2
%276 = bitcast double* %275 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %276
%277 = or i64 %241, 28
%278 = getelementptr inbounds double, double* %150, i64 %277
%279 = bitcast double* %278 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %279
%280 = getelementptr inbounds double, double* %278, i64 2
%281 = bitcast double* %280 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %281
%282 = add nuw i64 %241, 32
%283 = add i64 %242, 8
%284 = icmp eq i64 %283, %239
br i1 %284, label %285, label %240
285: ; preds = %240, %231
%286 = phi i64 [ 0, %231 ], [ %282, %240 ]
%287 = icmp eq i64 %236, 0
br i1 %287, label %298, label %288
288: ; preds = %285, %288
%289 = phi i64 [ %295, %288 ], [ %286, %285 ]
%290 = phi i64 [ %296, %288 ], [ 0, %285 ]
%291 = getelementptr inbounds double, double* %150, i64 %289
%292 = bitcast double* %291 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %292
%293 = getelementptr inbounds double, double* %291, i64 2
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %294
%295 = add nuw i64 %289, 4
%296 = add i64 %290, 1
%297 = icmp eq i64 %296, %236
br i1 %297, label %298, label %288
298: ; preds = %288, %285
%299 = icmp eq i64 %232, %153
br i1 %299, label %312, label %300
300: ; preds = %227, %298
%301 = phi i64 [ 0, %227 ], [ %232, %298 ]
br label %307
302: ; preds = %224, %302
%303 = phi i64 [ %305, %302 ], [ %225, %224 ]
%304 = getelementptr inbounds double, double* %149, i64 %303
store double 1.000000e+00, double* %304
%305 = add nuw nsw i64 %303, 1
%306 = icmp eq i64 %305, %153
br i1 %306, label %226, label %302
307: ; preds = %300, %307
%308 = phi i64 [ %310, %307 ], [ %301, %300 ]
%309 = getelementptr inbounds double, double* %150, i64 %308
store double 2.000000e+00, double* %309
%310 = add nuw nsw i64 %308, 1
%311 = icmp eq i64 %310, %229
br i1 %311, label %312, label %307
312: ; preds = %307, %298, %146, %226
%313 = call i64 (...) @_rdtsc()
%314 = call i32 @pin_cpu(i32 0, i32 %38)
%315 = icmp eq i32 %314, -1
br i1 %315, label %316, label %318
316: ; preds = %312
%317 = call i32 (i32, i8*, ...) @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))
br label %320
318: ; preds = %312
%319 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i32 %38)
br label %320
320: ; preds = %318, %316
%321 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @.str.18, i64 0, i64 0), i32 %29, i32 100, i32 %34)
%322 = call i64 (...) @_rdtsc()
%323 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%324 = icmp sgt i32 %29, 0
br i1 %324, label %325, label %346
325: ; preds = %320
%326 = zext i32 %34 to i64
br label %327
327: ; preds = %325, %342
%328 = phi i32 [ 0, %325 ], [ %344, %342 ]
%329 = phi i64 [ 0, %325 ], [ %343, %342 ]
br i1 %88, label %330, label %342
330: ; preds = %327, %330
%331 = phi i64 [ %340, %330 ], [ 0, %327 ]
%332 = phi i64 [ %339, %330 ], [ %329, %327 ]
%333 = getelementptr inbounds [500009 x i8*], [500009 x i8*]* %5, i64 0, i64 %331
%334 = load i8*, i8** %333
%335 = mul nuw nsw i64 %331, 100
%336 = getelementptr inbounds double, double* %149, i64 %335
%337 = getelementptr inbounds double, double* %150, i64 %335
%338 = call i64 @triad(i32 100, i8* %334, i8* %8, double* %147, double* %336, double* %337)
%339 = add i64 %338, %332
%340 = add nuw nsw i64 %331, 1
%341 = icmp eq i64 %340, %326
br i1 %341, label %342, label %330
342: ; preds = %330, %327
%343 = phi i64 [ %329, %327 ], [ %339, %330 ]
%344 = add nuw nsw i32 %328, 1
%345 = icmp eq i32 %344, %29
br i1 %345, label %346, label %327
346: ; preds = %342, %320
%347 = phi i64 [ 0, %320 ], [ %343, %342 ]
%348 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%349 = call i64 (...) @_rdtsc()
%350 = call i64 (...) @_loc_freq()
%351 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
%352 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
%353 = load i64, i64* %352
%354 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 1
%355 = load i64, i64* %354
%356 = sub nsw i64 %353, %355
%357 = mul i64 %356, 1000000
%358 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%359 = load i64, i64* %358
%360 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0, i32 0
%361 = load i64, i64* %360
%362 = sub i64 %359, %361
%363 = add i64 %362, %357
%364 = sub i64 %349, %322
%365 = sub i64 %313, %13
%366 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i64 %364)
%367 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0), i64 0)
%368 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.22, i64 0, i64 0), i64 %363)
%369 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), i64 %350)
%370 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.24, i64 0, i64 0), i64 %365, i64 %313, i64 %322)
%371 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.25, i64 0, i64 0), i64 %347)
%372 = uitofp i64 %364 to double
%373 = sitofp i32 %29 to double
%374 = fmul double %373, 5.000090e+05
%375 = fdiv double %372, %374
%376 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.26, i64 0, i64 0), double %375)
ret i32 0
}