#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 timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ rand();
int /*<<< orphan*/ timersub(struct timeval *, struct timeval *,
                            struct timeval *);
int main(int argc, char *argv[]) {
  struct timeval start_time, end_time, wall_time;
  gettimeofday(&start_time, NULL);
  int N;
  int tid, nthreads, i, j, k;
  double **a, **b, **c;
  double *a_block, *b_block, *c_block;
  double **res;
  double *res_block;
  if (argc < 2) {
    printf("Usage: mm matrix_size\n");
    exit(-1);
  }
  N = atoi(argv[1]);
  a = (double **)malloc(N * sizeof(double *));
  b = (double **)malloc(N * sizeof(double *));
  c = (double **)malloc(N * sizeof(double *));
  a_block = (double *)malloc(N * N * sizeof(double));
  b_block = (double *)malloc(N * N * sizeof(double));
  c_block = (double *)malloc(N * N * sizeof(double));
  res = (double **)malloc(N * sizeof(double *));
  res_block = (double *)malloc(N * N * sizeof(double));
  for (i = 0; i < N; i++)
    a[i] = a_block + i * N;
  for (i = 0; i < N; i++)
    b[i] = b_block + i * N;
  for (i = 0; i < N; i++)
    c[i] = c_block + i * N;
  for (i = 0; i < N; i++)
    res[i] = res_block + i * N;
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      a[i][j] = (i + j) * ((double)rand());
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      b[i][j] = i * j * ((double)rand());
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      c[i][j] = 0.0;
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      for (k = 0; k < N; k++) {
        c[i][j] += a[i][k] * b[k][j];
      }
    }
  }
  gettimeofday(&end_time, NULL);
  timersub(&end_time, &start_time, &wall_time);
  printf("%ld.%08ld\n", (long int)wall_time.tv_sec,
         (long int)wall_time.tv_usec);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
cmpl   $0x2,-0x8(%rbp)
jge    11b8 <main+0x48>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x44(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x98(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    12be <main+0x14e>
mov    -0x78(%rbp),%rdx
mov    -0x50(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x60(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1284 <main+0x114>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    12ff <main+0x18f>
mov    -0x80(%rbp),%rdx
mov    -0x50(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x68(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    12c5 <main+0x155>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1343 <main+0x1d3>
mov    -0x88(%rbp),%rdx
mov    -0x50(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x70(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1306 <main+0x196>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    138a <main+0x21a>
mov    -0x98(%rbp),%rdx
mov    -0x50(%rbp),%eax
imul   -0x44(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x90(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    134a <main+0x1da>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1410 <main+0x2a0>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13fd <main+0x28d>
mov    -0x50(%rbp),%eax
add    -0x54(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    $0x0,%al
call   1090 <rand@plt>
movsd  -0xa0(%rbp),%xmm0
ff
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13a4 <main+0x234>
jmp    1402 <main+0x292>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1391 <main+0x221>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1497 <main+0x327>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1484 <main+0x314>
mov    -0x50(%rbp),%eax
imul   -0x54(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    $0x0,%al
call   1090 <rand@plt>
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    142a <main+0x2ba>
jmp    1489 <main+0x319>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1417 <main+0x2a7>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    14f6 <main+0x386>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    14e3 <main+0x373>
mov    -0x70(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    14b1 <main+0x341>
jmp    14e8 <main+0x378>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    149e <main+0x32e>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    15af <main+0x43f>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    159c <main+0x42c>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1589 <main+0x419>
mov    -0x60(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x70(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1523 <main+0x3b3>
jmp    158e <main+0x41e>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1510 <main+0x3a0>
jmp    15a1 <main+0x431>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    14fd <main+0x38d>
lea    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
lea    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1080 <timersub@plt>
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
lea    0xa3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x38(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
cmp    $0x1,%ebp
jg     11ca <main+0x3a>
lea    0xe50(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1090 <exit@plt>
mov    0x8(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebx
lea    0x0(,%rbx,8),%r13d
mov    %r13d,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    %r13d,%edi
call   1070 <malloc@plt>
mov    %rax,%r15
mov    %r13d,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %r13d,%ebp
imul   %ebx,%ebp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %r13d,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   1070 <malloc@plt>
test   %ebx,%ebx
jle    1799 <main+0x609>
mov    %r12,%r11
mov    %rbx,0x8(%rsp)
mov    %ebx,%r12d
lea    -0x1(%r12),%rcx
mov    %r12d,%r8d
and    $0x3,%r8d
mov    %rcx,0x18(%rsp)
cmp    $0x3,%rcx
jae    1267 <main+0xd7>
xor    %edx,%edx
jmp    12bb <main+0x12b>
mov    %r12d,%r9d
and    $0xfffffffc,%r9d
mov    %r12,%r10
shl    $0x4,%r10
mov    %r12,%rbp
shl    $0x5,%rbp
lea    0x0(,%r12,8),%rcx
lea    (%rcx,%rcx,2),%rbx
xor    %edx,%edx
mov    (%rsp),%rsi
xchg   %ax,%ax
mov    %rsi,(%r14,%rdx,8)
lea    (%rsi,%rcx,1),%rdi
mov    %rdi,0x8(%r14,%rdx,8)
lea    (%rsi,%r10,1),%rdi
mov    %rdi,0x10(%r14,%rdx,8)
lea    (%rsi,%rbx,1),%rdi
mov    %rdi,0x18(%r14,%rdx,8)
add    $0x4,%rdx
add    %rbp,%rsi
cmp    %rdx,%r9
jne    1290 <main+0x100>
test   %r8,%r8
je     12f0 <main+0x160>
lea    (%r14,%rdx,8),%rcx
imul   %r12,%rdx
mov    (%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
lea    0x0(,%r12,8),%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
mov    %rdx,(%rcx,%rdi,8)
add    $0x1,%rdi
add    %rsi,%rdx
cmp    %rdi,%r8
jne    12e0 <main+0x150>
cmpl   $0x0,0x8(%rsp)
mov    0x18(%rsp),%rcx
jle    1799 <main+0x609>
mov    %r12d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rcx
jae    1311 <main+0x181>
xor    %edx,%edx
jmp    136b <main+0x1db>
mov    %r12d,%r9d
and    $0xfffffffc,%r9d
mov    %r12,%r10
shl    $0x4,%r10
mov    %r12,%rbp
shl    $0x5,%rbp
lea    0x0(,%r12,8),%rcx
lea    (%rcx,%rcx,2),%rbx
xor    %edx,%edx
mov    0x20(%rsp),%rsi
nopl   0x0(%rax)
mov    %rsi,(%r15,%rdx,8)
lea    (%rsi,%rcx,1),%rdi
mov    %rdi,0x8(%r15,%rdx,8)
lea    (%rsi,%r10,1),%rdi
mov    %rdi,0x10(%r15,%rdx,8)
lea    (%rsi,%rbx,1),%rdi
mov    %rdi,0x18(%r15,%rdx,8)
add    $0x4,%rdx
add    %rbp,%rsi
cmp    %rdx,%r9
jne    1340 <main+0x1b0>
test   %r8,%r8
je     13a0 <main+0x210>
lea    (%r15,%rdx,8),%rcx
imul   %r12,%rdx
mov    0x20(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
lea    0x0(,%r12,8),%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rcx,%rdi,8)
add    $0x1,%rdi
add    %rsi,%rdx
cmp    %rdi,%r8
jne    1390 <main+0x200>
cmpl   $0x0,0x8(%rsp)
mov    0x18(%rsp),%rcx
jle    1799 <main+0x609>
mov    %r12d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rcx
jae    13c1 <main+0x231>
xor    %edx,%edx
jmp    141b <main+0x28b>
mov    %r12d,%r9d
and    $0xfffffffc,%r9d
mov    %r12,%r10
shl    $0x4,%r10
mov    %r12,%rbp
shl    $0x5,%rbp
lea    0x0(,%r12,8),%rcx
lea    (%rcx,%rcx,2),%rbx
xor    %edx,%edx
mov    0x10(%rsp),%rsi
nopl   0x0(%rax)
mov    %rsi,(%r11,%rdx,8)
lea    (%rsi,%rcx,1),%rdi
mov    %rdi,0x8(%r11,%rdx,8)
lea    (%rsi,%r10,1),%rdi
mov    %rdi,0x10(%r11,%rdx,8)
lea    (%rsi,%rbx,1),%rdi
mov    %rdi,0x18(%r11,%rdx,8)
add    $0x4,%rdx
add    %rbp,%rsi
cmp    %rdx,%r9
jne    13f0 <main+0x260>
test   %r8,%r8
je     1450 <main+0x2c0>
lea    (%r11,%rdx,8),%rcx
imul   %r12,%rdx
mov    0x10(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
lea    0x0(,%r12,8),%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rcx,%rdi,8)
add    $0x1,%rdi
add    %rsi,%rdx
cmp    %rdi,%r8
jne    1440 <main+0x2b0>
cmpl   $0x0,0x8(%rsp)
mov    0x18(%rsp),%rcx
jle    1799 <main+0x609>
mov    %r12d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rcx
jae    1471 <main+0x2e1>
xor    %edx,%edx
jmp    14cc <main+0x33c>
mov    %r12d,%r9d
and    $0xfffffffc,%r9d
mov    %r12,%r10
shl    $0x4,%r10
mov    %r12,%rbp
shl    $0x5,%rbp
lea    0x0(,%r12,8),%rcx
lea    (%rcx,%rcx,2),%rbx
xor    %edx,%edx
mov    %rax,%rsi
nopw   0x0(%rax,%rax,1)
mov    %rsi,0x0(%r13,%rdx,8)
lea    (%rsi,%rcx,1),%rdi
mov    %rdi,0x8(%r13,%rdx,8)
lea    (%rsi,%r10,1),%rdi
mov    %rdi,0x10(%r13,%rdx,8)
lea    (%rsi,%rbx,1),%rdi
mov    %rdi,0x18(%r13,%rdx,8)
add    $0x4,%rdx
add    %rbp,%rsi
cmp    %rdx,%r9
jne    14a0 <main+0x310>
test   %r8,%r8
je     1500 <main+0x370>
lea    0x0(,%rdx,8),%rcx
add    %r13,%rcx
imul   %r12,%rdx
lea    (%rax,%rdx,8),%rax
lea    0x0(,%r12,8),%rdx
xor    %esi,%esi
xchg   %ax,%ax
mov    %rax,(%rcx,%rsi,8)
add    $0x1,%rsi
add    %rdx,%rax
cmp    %rsi,%r8
jne    14f0 <main+0x360>
cmpl   $0x0,0x8(%rsp)
jle    1799 <main+0x609>
mov    %r11,0x10(%rsp)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%rbp,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  (%rsp),%xmm0
mov    (%r14,%rbp,8),%rax
movsd  %xmm0,(%rax,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1530 <main+0x3a0>
add    $0x1,%rbp
cmp    %r12,%rbp
jne    1520 <main+0x390>
cmpl   $0x0,0x8(%rsp)
jle    1799 <main+0x609>
xor    %r13d,%r13d
nopl   0x0(%rax)
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  (%rsp),%xmm0
mov    (%r15,%r13,8),%rax
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
add    %r13d,%ebx
cmp    %rbp,%r12
jne    1590 <main+0x400>
add    $0x1,%r13
cmp    %r12,%r13
jne    1580 <main+0x3f0>
cmpl   $0x0,0x8(%rsp)
mov    0x10(%rsp),%rbx
mov    0x18(%rsp),%rax
jle    1799 <main+0x609>
lea    0x0(,%r12,8),%rbp
mov    %r12d,%ecx
and    $0x7,%ecx
mov    %rcx,(%rsp)
cmp    $0x7,%rax
jae    1603 <main+0x473>
xor    %r13d,%r13d
jmp    16a6 <main+0x516>
mov    %r12d,%eax
and    $0xfffffff8,%eax
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x8(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x10(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x18(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x20(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x28(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x30(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
mov    0x38(%rbx,%r13,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
add    $0x8,%r13
cmp    %r13,0x20(%rsp)
jne    1620 <main+0x490>
cmpq   $0x0,(%rsp)
je     16d9 <main+0x549>
mov    0x10(%rsp),%rax
lea    (%rax,%r13,8),%r13
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbx,8),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1060 <memset@plt>
add    $0x1,%rbx
cmp    %rbx,(%rsp)
jne    16c0 <main+0x530>
cmpl   $0x0,0x8(%rsp)
mov    0x10(%rsp),%r8
mov    0x18(%rsp),%rcx
jle    1799 <main+0x609>
mov    %r12d,%eax
and    $0xfffffffe,%eax
xor    %r9d,%r9d
jmp    170d <main+0x57d>
nopl   0x0(%rax)
add    $0x1,%r9
cmp    %r12,%r9
je     1799 <main+0x609>
mov    (%r14,%r9,8),%rdx
mov    (%r8,%r9,8),%rsi
xor    %edi,%edi
jmp    1729 <main+0x599>
nopl   0x0(%rax)
add    $0x1,%rdi
cmp    %r12,%rdi
je     1700 <main+0x570>
movsd  (%rsi,%rdi,8),%xmm0
xor    %ebp,%ebp
test   %rcx,%rcx
je     1779 <main+0x5e9>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx,%rbp,8),%xmm1
mov    (%r15,%rbp,8),%rbx
mulsd  (%rbx,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rdi,8)
movsd  0x8(%rdx,%rbp,8),%xmm0
mov    0x8(%r15,%rbp,8),%rbx
mulsd  (%rbx,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi,%rdi,8)
add    $0x2,%rbp
cmp    %rbp,%rax
jne    1740 <main+0x5b0>
test   $0x1,%r12b
je     1720 <main+0x590>
movsd  (%rdx,%rbp,8),%xmm1
mov    (%r15,%rbp,8),%rbp
mulsd  0x0(%rbp,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rdi,8)
jmp    1720 <main+0x590>
lea    0x48(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x38(%rsp),%rsi
lea    0x28(%rsp),%rdx
mov    %rbx,%rdi
call   10a0 <timersub@plt>
mov    0x28(%rsp),%rdx
mov    0x30(%rsp),%rsi
lea    0x835(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
@.str = [23 x i8] c"Usage: mm matrix_size\0A\00"
@.str.1 = [11 x i8] c"%ld.%08ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = alloca %struct.timeval
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double**
%16 = alloca double**
%17 = alloca double**
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double**
%22 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%23 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 2
br i1 %25, label %26, label %29
26: ; preds = %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%28 = call i32 @exit(i32 -1)
unreachable
29: ; preds = %2
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %9
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = mul i64 %35, 8
%37 = trunc i64 %36 to i32
%38 = call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to double**
store double** %39, double*** %15
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = mul i64 %41, 8
%43 = trunc i64 %42 to i32
%44 = call i64 @malloc(i32 %43)
%45 = inttoptr i64 %44 to double**
store double** %45, double*** %16
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = mul i64 %47, 8
%49 = trunc i64 %48 to i32
%50 = call i64 @malloc(i32 %49)
%51 = inttoptr i64 %50 to double**
store double** %51, double*** %17
%52 = load i32, i32* %9
%53 = load i32, i32* %9
%54 = mul nsw i32 %52, %53
%55 = sext i32 %54 to i64
%56 = mul i64 %55, 8
%57 = trunc i64 %56 to i32
%58 = call i64 @malloc(i32 %57)
%59 = inttoptr i64 %58 to double*
store double* %59, double** %18
%60 = load i32, i32* %9
%61 = load i32, i32* %9
%62 = mul nsw i32 %60, %61
%63 = sext i32 %62 to i64
%64 = mul i64 %63, 8
%65 = trunc i64 %64 to i32
%66 = call i64 @malloc(i32 %65)
%67 = inttoptr i64 %66 to double*
store double* %67, double** %19
%68 = load i32, i32* %9
%69 = load i32, i32* %9
%70 = mul nsw i32 %68, %69
%71 = sext i32 %70 to i64
%72 = mul i64 %71, 8
%73 = trunc i64 %72 to i32
%74 = call i64 @malloc(i32 %73)
%75 = inttoptr i64 %74 to double*
store double* %75, double** %20
%76 = load i32, i32* %9
%77 = sext i32 %76 to i64
%78 = mul i64 %77, 8
%79 = trunc i64 %78 to i32
%80 = call i64 @malloc(i32 %79)
%81 = inttoptr i64 %80 to double**
store double** %81, double*** %21
%82 = load i32, i32* %9
%83 = load i32, i32* %9
%84 = mul nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = mul i64 %85, 8
%87 = trunc i64 %86 to i32
%88 = call i64 @malloc(i32 %87)
%89 = inttoptr i64 %88 to double*
store double* %89, double** %22
store i32 0, i32* %12
br label %90
90: ; preds = %105, %29
%91 = load i32, i32* %12
%92 = load i32, i32* %9
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %108
94: ; preds = %90
%95 = load double*, double** %18
%96 = load i32, i32* %12
%97 = load i32, i32* %9
%98 = mul nsw i32 %96, %97
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %95, i64 %99
%101 = load double**, double*** %15
%102 = load i32, i32* %12
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double*, double** %101, i64 %103
store double* %100, double** %104
br label %105
105: ; preds = %94
%106 = load i32, i32* %12
%107 = add nsw i32 %106, 1
store i32 %107, i32* %12
br label %90
108: ; preds = %90
store i32 0, i32* %12
br label %109
109: ; preds = %124, %108
%110 = load i32, i32* %12
%111 = load i32, i32* %9
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %127
113: ; preds = %109
%114 = load double*, double** %19
%115 = load i32, i32* %12
%116 = load i32, i32* %9
%117 = mul nsw i32 %115, %116
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %114, i64 %118
%120 = load double**, double*** %16
%121 = load i32, i32* %12
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double*, double** %120, i64 %122
store double* %119, double** %123
br label %124
124: ; preds = %113
%125 = load i32, i32* %12
%126 = add nsw i32 %125, 1
store i32 %126, i32* %12
br label %109
127: ; preds = %109
store i32 0, i32* %12
br label %128
128: ; preds = %143, %127
%129 = load i32, i32* %12
%130 = load i32, i32* %9
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %146
132: ; preds = %128
%133 = load double*, double** %20
%134 = load i32, i32* %12
%135 = load i32, i32* %9
%136 = mul nsw i32 %134, %135
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %133, i64 %137
%139 = load double**, double*** %17
%140 = load i32, i32* %12
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double*, double** %139, i64 %141
store double* %138, double** %142
br label %143
143: ; preds = %132
%144 = load i32, i32* %12
%145 = add nsw i32 %144, 1
store i32 %145, i32* %12
br label %128
146: ; preds = %128
store i32 0, i32* %12
br label %147
147: ; preds = %162, %146
%148 = load i32, i32* %12
%149 = load i32, i32* %9
%150 = icmp slt i32 %148, %149
br i1 %150, label %151, label %165
151: ; preds = %147
%152 = load double*, double** %22
%153 = load i32, i32* %12
%154 = load i32, i32* %9
%155 = mul nsw i32 %153, %154
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double, double* %152, i64 %156
%158 = load double**, double*** %21
%159 = load i32, i32* %12
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double*, double** %158, i64 %160
store double* %157, double** %161
br label %162
162: ; preds = %151
%163 = load i32, i32* %12
%164 = add nsw i32 %163, 1
store i32 %164, i32* %12
br label %147
165: ; preds = %147
store i32 0, i32* %12
br label %166
166: ; preds = %195, %165
%167 = load i32, i32* %12
%168 = load i32, i32* %9
%169 = icmp slt i32 %167, %168
br i1 %169, label %170, label %198
170: ; preds = %166
store i32 0, i32* %13
br label %171
171: ; preds = %191, %170
%172 = load i32, i32* %13
%173 = load i32, i32* %9
%174 = icmp slt i32 %172, %173
br i1 %174, label %175, label %194
175: ; preds = %171
%176 = load i32, i32* %12
%177 = load i32, i32* %13
%178 = add nsw i32 %176, %177
%179 = sitofp i32 %178 to double
%180 = call i64 (...) @rand()
%181 = sitofp i64 %180 to double
%182 = fmul double %179, %181
%183 = load double**, double*** %15
%184 = load i32, i32* %12
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double*, double** %183, i64 %185
%187 = load double*, double** %186
%188 = load i32, i32* %13
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds double, double* %187, i64 %189
store double %182, double* %190
br label %191
191: ; preds = %175
%192 = load i32, i32* %13
%193 = add nsw i32 %192, 1
store i32 %193, i32* %13
br label %171
194: ; preds = %171
br label %195
195: ; preds = %194
%196 = load i32, i32* %12
%197 = add nsw i32 %196, 1
store i32 %197, i32* %12
br label %166
198: ; preds = %166
store i32 0, i32* %12
br label %199
199: ; preds = %228, %198
%200 = load i32, i32* %12
%201 = load i32, i32* %9
%202 = icmp slt i32 %200, %201
br i1 %202, label %203, label %231
203: ; preds = %199
store i32 0, i32* %13
br label %204
204: ; preds = %224, %203
%205 = load i32, i32* %13
%206 = load i32, i32* %9
%207 = icmp slt i32 %205, %206
br i1 %207, label %208, label %227
208: ; preds = %204
%209 = load i32, i32* %12
%210 = load i32, i32* %13
%211 = mul nsw i32 %209, %210
%212 = sitofp i32 %211 to double
%213 = call i64 (...) @rand()
%214 = sitofp i64 %213 to double
%215 = fmul double %212, %214
%216 = load double**, double*** %16
%217 = load i32, i32* %12
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds double*, double** %216, i64 %218
%220 = load double*, double** %219
%221 = load i32, i32* %13
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
store double %215, double* %223
br label %224
224: ; preds = %208
%225 = load i32, i32* %13
%226 = add nsw i32 %225, 1
store i32 %226, i32* %13
br label %204
227: ; preds = %204
br label %228
228: ; preds = %227
%229 = load i32, i32* %12
%230 = add nsw i32 %229, 1
store i32 %230, i32* %12
br label %199
231: ; preds = %199
store i32 0, i32* %12
br label %232
232: ; preds = %254, %231
%233 = load i32, i32* %12
%234 = load i32, i32* %9
%235 = icmp slt i32 %233, %234
br i1 %235, label %236, label %257
236: ; preds = %232
store i32 0, i32* %13
br label %237
237: ; preds = %250, %236
%238 = load i32, i32* %13
%239 = load i32, i32* %9
%240 = icmp slt i32 %238, %239
br i1 %240, label %241, label %253
241: ; preds = %237
%242 = load double**, double*** %17
%243 = load i32, i32* %12
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double*, double** %242, i64 %244
%246 = load double*, double** %245
%247 = load i32, i32* %13
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double, double* %246, i64 %248
store double 0.000000e+00, double* %249
br label %250
250: ; preds = %241
%251 = load i32, i32* %13
%252 = add nsw i32 %251, 1
store i32 %252, i32* %13
br label %237
253: ; preds = %237
br label %254
254: ; preds = %253
%255 = load i32, i32* %12
%256 = add nsw i32 %255, 1
store i32 %256, i32* %12
br label %232
257: ; preds = %232
store i32 0, i32* %12
br label %258
258: ; preds = %309, %257
%259 = load i32, i32* %12
%260 = load i32, i32* %9
%261 = icmp slt i32 %259, %260
br i1 %261, label %262, label %312
262: ; preds = %258
store i32 0, i32* %13
br label %263
263: ; preds = %305, %262
%264 = load i32, i32* %13
%265 = load i32, i32* %9
%266 = icmp slt i32 %264, %265
br i1 %266, label %267, label %308
267: ; preds = %263
store i32 0, i32* %14
br label %268
268: ; preds = %301, %267
%269 = load i32, i32* %14
%270 = load i32, i32* %9
%271 = icmp slt i32 %269, %270
br i1 %271, label %272, label %304
272: ; preds = %268
%273 = load double**, double*** %15
%274 = load i32, i32* %12
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds double*, double** %273, i64 %275
%277 = load double*, double** %276
%278 = load i32, i32* %14
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds double, double* %277, i64 %279
%281 = load double, double* %280
%282 = load double**, double*** %16
%283 = load i32, i32* %14
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double*, double** %282, i64 %284
%286 = load double*, double** %285
%287 = load i32, i32* %13
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double, double* %286, i64 %288
%290 = load double, double* %289
%291 = load double**, double*** %17
%292 = load i32, i32* %12
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double*, double** %291, i64 %293
%295 = load double*, double** %294
%296 = load i32, i32* %13
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds double, double* %295, i64 %297
%299 = load double, double* %298
%300 = call double @llvm.fmuladd.f64(double %281, double %290, double %299)
store double %300, double* %298
br label %301
301: ; preds = %272
%302 = load i32, i32* %14
%303 = add nsw i32 %302, 1
store i32 %303, i32* %14
br label %268
304: ; preds = %268
br label %305
305: ; preds = %304
%306 = load i32, i32* %13
%307 = add nsw i32 %306, 1
store i32 %307, i32* %13
br label %263
308: ; preds = %263
br label %309
309: ; preds = %308
%310 = load i32, i32* %12
%311 = add nsw i32 %310, 1
store i32 %311, i32* %12
br label %258
312: ; preds = %258
%313 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
%314 = call i32 @timersub(%struct.timeval* %7, %struct.timeval* %6, %struct.timeval* %8)
%315 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%316 = load i64, i64* %315
%317 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%318 = load i64, i64* %317
%319 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %316, i64 %318)
%320 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@.str.1 = [11 x i8] c"%ld.%08ld\0A\00"
@str = [22 x i8] c"Usage: mm matrix_size\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = bitcast %struct.timeval* %3 to i8*
%7 = bitcast %struct.timeval* %4 to i8*
%8 = bitcast %struct.timeval* %5 to i8*
%9 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%10 = icmp slt i32 %0, 2
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%13 = tail call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = shl i32 %17, 3
%19 = tail call i64 @malloc(i32 %18)
%20 = inttoptr i64 %19 to double**
%21 = tail call i64 @malloc(i32 %18)
%22 = inttoptr i64 %21 to double**
%23 = tail call i64 @malloc(i32 %18)
%24 = inttoptr i64 %23 to double**
%25 = mul i32 %18, %17
%26 = tail call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to double*
%28 = tail call i64 @malloc(i32 %25)
%29 = inttoptr i64 %28 to double*
%30 = tail call i64 @malloc(i32 %25)
%31 = inttoptr i64 %30 to double*
%32 = tail call i64 @malloc(i32 %18)
%33 = inttoptr i64 %32 to double**
%34 = tail call i64 @malloc(i32 %25)
%35 = inttoptr i64 %34 to double*
%36 = icmp sgt i32 %17, 0
br i1 %36, label %37, label %354
37: ; preds = %14
%38 = zext i32 %17 to i64
%39 = zext i32 %17 to i64
%40 = add nsw i64 %39, -1
%41 = and i64 %39, 3
%42 = icmp ult i64 %40, 3
br i1 %42, label %45, label %43
43: ; preds = %37
%44 = and i64 %39, 4294967292
br label %64
45: ; preds = %64, %37
%46 = phi i64 [ 0, %37 ], [ %82, %64 ]
%47 = icmp eq i64 %41, 0
br i1 %47, label %57, label %48
48: ; preds = %45, %48
%49 = phi i64 [ %54, %48 ], [ %46, %45 ]
%50 = phi i64 [ %55, %48 ], [ 0, %45 ]
%51 = mul nsw i64 %49, %38
%52 = getelementptr inbounds double, double* %27, i64 %51
%53 = getelementptr inbounds double*, double** %20, i64 %49
store double* %52, double** %53
%54 = add nuw nsw i64 %49, 1
%55 = add i64 %50, 1
%56 = icmp eq i64 %55, %41
br i1 %56, label %57, label %48
57: ; preds = %48, %45
br i1 %36, label %58, label %354
58: ; preds = %57
%59 = zext i32 %17 to i64
%60 = and i64 %39, 3
%61 = icmp ult i64 %40, 3
br i1 %61, label %85, label %62
62: ; preds = %58
%63 = and i64 %39, 4294967292
br label %104
64: ; preds = %64, %43
%65 = phi i64 [ 0, %43 ], [ %82, %64 ]
%66 = phi i64 [ 0, %43 ], [ %83, %64 ]
%67 = mul nsw i64 %65, %38
%68 = getelementptr inbounds double, double* %27, i64 %67
%69 = getelementptr inbounds double*, double** %20, i64 %65
store double* %68, double** %69
%70 = or i64 %65, 1
%71 = mul nsw i64 %70, %38
%72 = getelementptr inbounds double, double* %27, i64 %71
%73 = getelementptr inbounds double*, double** %20, i64 %70
store double* %72, double** %73
%74 = or i64 %65, 2
%75 = mul nsw i64 %74, %38
%76 = getelementptr inbounds double, double* %27, i64 %75
%77 = getelementptr inbounds double*, double** %20, i64 %74
store double* %76, double** %77
%78 = or i64 %65, 3
%79 = mul nsw i64 %78, %38
%80 = getelementptr inbounds double, double* %27, i64 %79
%81 = getelementptr inbounds double*, double** %20, i64 %78
store double* %80, double** %81
%82 = add nuw nsw i64 %65, 4
%83 = add i64 %66, 4
%84 = icmp eq i64 %83, %44
br i1 %84, label %45, label %64
85: ; preds = %104, %58
%86 = phi i64 [ 0, %58 ], [ %122, %104 ]
%87 = icmp eq i64 %60, 0
br i1 %87, label %97, label %88
88: ; preds = %85, %88
%89 = phi i64 [ %94, %88 ], [ %86, %85 ]
%90 = phi i64 [ %95, %88 ], [ 0, %85 ]
%91 = mul nsw i64 %89, %59
%92 = getelementptr inbounds double, double* %29, i64 %91
%93 = getelementptr inbounds double*, double** %22, i64 %89
store double* %92, double** %93
%94 = add nuw nsw i64 %89, 1
%95 = add i64 %90, 1
%96 = icmp eq i64 %95, %60
br i1 %96, label %97, label %88
97: ; preds = %88, %85
br i1 %36, label %98, label %354
98: ; preds = %97
%99 = zext i32 %17 to i64
%100 = and i64 %39, 3
%101 = icmp ult i64 %40, 3
br i1 %101, label %125, label %102
102: ; preds = %98
%103 = and i64 %39, 4294967292
br label %144
104: ; preds = %104, %62
%105 = phi i64 [ 0, %62 ], [ %122, %104 ]
%106 = phi i64 [ 0, %62 ], [ %123, %104 ]
%107 = mul nsw i64 %105, %59
%108 = getelementptr inbounds double, double* %29, i64 %107
%109 = getelementptr inbounds double*, double** %22, i64 %105
store double* %108, double** %109
%110 = or i64 %105, 1
%111 = mul nsw i64 %110, %59
%112 = getelementptr inbounds double, double* %29, i64 %111
%113 = getelementptr inbounds double*, double** %22, i64 %110
store double* %112, double** %113
%114 = or i64 %105, 2
%115 = mul nsw i64 %114, %59
%116 = getelementptr inbounds double, double* %29, i64 %115
%117 = getelementptr inbounds double*, double** %22, i64 %114
store double* %116, double** %117
%118 = or i64 %105, 3
%119 = mul nsw i64 %118, %59
%120 = getelementptr inbounds double, double* %29, i64 %119
%121 = getelementptr inbounds double*, double** %22, i64 %118
store double* %120, double** %121
%122 = add nuw nsw i64 %105, 4
%123 = add i64 %106, 4
%124 = icmp eq i64 %123, %63
br i1 %124, label %85, label %104
125: ; preds = %144, %98
%126 = phi i64 [ 0, %98 ], [ %162, %144 ]
%127 = icmp eq i64 %100, 0
br i1 %127, label %137, label %128
128: ; preds = %125, %128
%129 = phi i64 [ %134, %128 ], [ %126, %125 ]
%130 = phi i64 [ %135, %128 ], [ 0, %125 ]
%131 = mul nsw i64 %129, %99
%132 = getelementptr inbounds double, double* %31, i64 %131
%133 = getelementptr inbounds double*, double** %24, i64 %129
store double* %132, double** %133
%134 = add nuw nsw i64 %129, 1
%135 = add i64 %130, 1
%136 = icmp eq i64 %135, %100
br i1 %136, label %137, label %128
137: ; preds = %128, %125
br i1 %36, label %138, label %354
138: ; preds = %137
%139 = zext i32 %17 to i64
%140 = and i64 %39, 3
%141 = icmp ult i64 %40, 3
br i1 %141, label %165, label %142
142: ; preds = %138
%143 = and i64 %39, 4294967292
br label %180
144: ; preds = %144, %102
%145 = phi i64 [ 0, %102 ], [ %162, %144 ]
%146 = phi i64 [ 0, %102 ], [ %163, %144 ]
%147 = mul nsw i64 %145, %99
%148 = getelementptr inbounds double, double* %31, i64 %147
%149 = getelementptr inbounds double*, double** %24, i64 %145
store double* %148, double** %149
%150 = or i64 %145, 1
%151 = mul nsw i64 %150, %99
%152 = getelementptr inbounds double, double* %31, i64 %151
%153 = getelementptr inbounds double*, double** %24, i64 %150
store double* %152, double** %153
%154 = or i64 %145, 2
%155 = mul nsw i64 %154, %99
%156 = getelementptr inbounds double, double* %31, i64 %155
%157 = getelementptr inbounds double*, double** %24, i64 %154
store double* %156, double** %157
%158 = or i64 %145, 3
%159 = mul nsw i64 %158, %99
%160 = getelementptr inbounds double, double* %31, i64 %159
%161 = getelementptr inbounds double*, double** %24, i64 %158
store double* %160, double** %161
%162 = add nuw nsw i64 %145, 4
%163 = add i64 %146, 4
%164 = icmp eq i64 %163, %103
br i1 %164, label %125, label %144
165: ; preds = %180, %138
%166 = phi i64 [ 0, %138 ], [ %198, %180 ]
%167 = icmp eq i64 %140, 0
br i1 %167, label %177, label %168
168: ; preds = %165, %168
%169 = phi i64 [ %174, %168 ], [ %166, %165 ]
%170 = phi i64 [ %175, %168 ], [ 0, %165 ]
%171 = mul nsw i64 %169, %139
%172 = getelementptr inbounds double, double* %35, i64 %171
%173 = getelementptr inbounds double*, double** %33, i64 %169
store double* %172, double** %173
%174 = add nuw nsw i64 %169, 1
%175 = add i64 %170, 1
%176 = icmp eq i64 %175, %140
br i1 %176, label %177, label %168
177: ; preds = %168, %165
br i1 %36, label %178, label %354
178: ; preds = %177
%179 = zext i32 %17 to i64
br label %201
180: ; preds = %180, %142
%181 = phi i64 [ 0, %142 ], [ %198, %180 ]
%182 = phi i64 [ 0, %142 ], [ %199, %180 ]
%183 = mul nsw i64 %181, %139
%184 = getelementptr inbounds double, double* %35, i64 %183
%185 = getelementptr inbounds double*, double** %33, i64 %181
store double* %184, double** %185
%186 = or i64 %181, 1
%187 = mul nsw i64 %186, %139
%188 = getelementptr inbounds double, double* %35, i64 %187
%189 = getelementptr inbounds double*, double** %33, i64 %186
store double* %188, double** %189
%190 = or i64 %181, 2
%191 = mul nsw i64 %190, %139
%192 = getelementptr inbounds double, double* %35, i64 %191
%193 = getelementptr inbounds double*, double** %33, i64 %190
store double* %192, double** %193
%194 = or i64 %181, 3
%195 = mul nsw i64 %194, %139
%196 = getelementptr inbounds double, double* %35, i64 %195
%197 = getelementptr inbounds double*, double** %33, i64 %194
store double* %196, double** %197
%198 = add nuw nsw i64 %181, 4
%199 = add i64 %182, 4
%200 = icmp eq i64 %199, %143
br i1 %200, label %165, label %180
201: ; preds = %219, %178
%202 = phi i64 [ 0, %178 ], [ %220, %219 ]
%203 = getelementptr inbounds double*, double** %20, i64 %202
br label %207
204: ; preds = %219
br i1 %36, label %205, label %354
205: ; preds = %204
%206 = zext i32 %17 to i64
br label %222
207: ; preds = %201, %207
%208 = phi i64 [ 0, %201 ], [ %217, %207 ]
%209 = add nuw nsw i64 %208, %202
%210 = trunc i64 %209 to i32
%211 = sitofp i32 %210 to double
%212 = tail call i64 (...) @rand()
%213 = sitofp i64 %212 to double
%214 = fmul double %211, %213
%215 = load double*, double** %203
%216 = getelementptr inbounds double, double* %215, i64 %208
store double %214, double* %216
%217 = add nuw nsw i64 %208, 1
%218 = icmp eq i64 %217, %179
br i1 %218, label %219, label %207
219: ; preds = %207
%220 = add nuw nsw i64 %202, 1
%221 = icmp eq i64 %220, %179
br i1 %221, label %204, label %201
222: ; preds = %246, %205
%223 = phi i64 [ 0, %205 ], [ %247, %246 ]
%224 = getelementptr inbounds double*, double** %22, i64 %223
%225 = trunc i64 %223 to i32
br label %234
226: ; preds = %246
br i1 %36, label %227, label %354
227: ; preds = %226
%228 = zext i32 %17 to i64
%229 = shl nuw nsw i64 %228, 3
%230 = and i64 %39, 7
%231 = icmp ult i64 %40, 7
br i1 %231, label %249, label %232
232: ; preds = %227
%233 = and i64 %39, 4294967288
br label %268
234: ; preds = %222, %234
%235 = phi i64 [ 0, %222 ], [ %244, %234 ]
%236 = trunc i64 %235 to i32
%237 = mul nsw i32 %236, %225
%238 = sitofp i32 %237 to double
%239 = tail call i64 (...) @rand()
%240 = sitofp i64 %239 to double
%241 = fmul double %238, %240
%242 = load double*, double** %224
%243 = getelementptr inbounds double, double* %242, i64 %235
store double %241, double* %243
%244 = add nuw nsw i64 %235, 1
%245 = icmp eq i64 %244, %206
br i1 %245, label %246, label %234
246: ; preds = %234
%247 = add nuw nsw i64 %223, 1
%248 = icmp eq i64 %247, %206
br i1 %248, label %226, label %222
249: ; preds = %268, %227
%250 = phi i64 [ 0, %227 ], [ %302, %268 ]
%251 = icmp eq i64 %230, 0
br i1 %251, label %261, label %252
252: ; preds = %249, %252
%253 = phi i64 [ %258, %252 ], [ %250, %249 ]
%254 = phi i64 [ %259, %252 ], [ 0, %249 ]
%255 = getelementptr inbounds double*, double** %24, i64 %253
%256 = bitcast double** %255 to i8**
%257 = load i8*, i8** %256
%258 = add nuw nsw i64 %253, 1
%259 = add i64 %254, 1
%260 = icmp eq i64 %259, %230
br i1 %260, label %261, label %252
261: ; preds = %252, %249
br i1 %36, label %262, label %354
262: ; preds = %261
%263 = zext i32 %17 to i64
%264 = and i64 %39, 1
%265 = icmp eq i64 %40, 0
%266 = and i64 %39, 4294967294
%267 = icmp eq i64 %264, 0
br label %305
268: ; preds = %268, %232
%269 = phi i64 [ 0, %232 ], [ %302, %268 ]
%270 = phi i64 [ 0, %232 ], [ %303, %268 ]
%271 = getelementptr inbounds double*, double** %24, i64 %269
%272 = bitcast double** %271 to i8**
%273 = load i8*, i8** %272
%274 = or i64 %269, 1
%275 = getelementptr inbounds double*, double** %24, i64 %274
%276 = bitcast double** %275 to i8**
%277 = load i8*, i8** %276
%278 = or i64 %269, 2
%279 = getelementptr inbounds double*, double** %24, i64 %278
%280 = bitcast double** %279 to i8**
%281 = load i8*, i8** %280
%282 = or i64 %269, 3
%283 = getelementptr inbounds double*, double** %24, i64 %282
%284 = bitcast double** %283 to i8**
%285 = load i8*, i8** %284
%286 = or i64 %269, 4
%287 = getelementptr inbounds double*, double** %24, i64 %286
%288 = bitcast double** %287 to i8**
%289 = load i8*, i8** %288
%290 = or i64 %269, 5
%291 = getelementptr inbounds double*, double** %24, i64 %290
%292 = bitcast double** %291 to i8**
%293 = load i8*, i8** %292
%294 = or i64 %269, 6
%295 = getelementptr inbounds double*, double** %24, i64 %294
%296 = bitcast double** %295 to i8**
%297 = load i8*, i8** %296
%298 = or i64 %269, 7
%299 = getelementptr inbounds double*, double** %24, i64 %298
%300 = bitcast double** %299 to i8**
%301 = load i8*, i8** %300
%302 = add nuw nsw i64 %269, 8
%303 = add i64 %270, 8
%304 = icmp eq i64 %303, %233
br i1 %304, label %249, label %268
305: ; preds = %351, %262
%306 = phi i64 [ 0, %262 ], [ %352, %351 ]
%307 = getelementptr inbounds double*, double** %20, i64 %306
%308 = getelementptr inbounds double*, double** %24, i64 %306
%309 = load double*, double** %307
%310 = load double*, double** %308
br label %311
311: ; preds = %348, %305
%312 = phi i64 [ 0, %305 ], [ %349, %348 ]
%313 = getelementptr inbounds double, double* %310, i64 %312
%314 = load double, double* %313
br i1 %265, label %337, label %315
315: ; preds = %311, %315
%316 = phi double [ %333, %315 ], [ %314, %311 ]
%317 = phi i64 [ %334, %315 ], [ 0, %311 ]
%318 = phi i64 [ %335, %315 ], [ 0, %311 ]
%319 = getelementptr inbounds double, double* %309, i64 %317
%320 = load double, double* %319
%321 = getelementptr inbounds double*, double** %22, i64 %317
%322 = load double*, double** %321
%323 = getelementptr inbounds double, double* %322, i64 %312
%324 = load double, double* %323
%325 = tail call double @llvm.fmuladd.f64(double %320, double %324, double %316)
store double %325, double* %313
%326 = or i64 %317, 1
%327 = getelementptr inbounds double, double* %309, i64 %326
%328 = load double, double* %327
%329 = getelementptr inbounds double*, double** %22, i64 %326
%330 = load double*, double** %329
%331 = getelementptr inbounds double, double* %330, i64 %312
%332 = load double, double* %331
%333 = tail call double @llvm.fmuladd.f64(double %328, double %332, double %325)
store double %333, double* %313
%334 = add nuw nsw i64 %317, 2
%335 = add i64 %318, 2
%336 = icmp eq i64 %335, %266
br i1 %336, label %337, label %315
337: ; preds = %315, %311
%338 = phi double [ %314, %311 ], [ %333, %315 ]
%339 = phi i64 [ 0, %311 ], [ %334, %315 ]
br i1 %267, label %348, label %340
340: ; preds = %337
%341 = getelementptr inbounds double, double* %309, i64 %339
%342 = load double, double* %341
%343 = getelementptr inbounds double*, double** %22, i64 %339
%344 = load double*, double** %343
%345 = getelementptr inbounds double, double* %344, i64 %312
%346 = load double, double* %345
%347 = tail call double @llvm.fmuladd.f64(double %342, double %346, double %338)
store double %347, double* %313
br label %348
348: ; preds = %337, %340
%349 = add nuw nsw i64 %312, 1
%350 = icmp eq i64 %349, %263
br i1 %350, label %351, label %311
351: ; preds = %348
%352 = add nuw nsw i64 %306, 1
%353 = icmp eq i64 %352, %263
br i1 %353, label %354, label %305
354: ; preds = %351, %14, %57, %97, %137, %177, %204, %226, %261
%355 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%356 = call i32 @timersub(%struct.timeval* %4, %struct.timeval* %3, %struct.timeval* %5)
%357 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%358 = load i64, i64* %357
%359 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%360 = load i64, i64* %359
%361 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %358, i64 %360)
%362 = call i32 @exit(i32 0)
unreachable
}