#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 {
  long long tv_sec;
  long long tv_usec;
};
typedef int /*<<< orphan*/ calc_product;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long long INT_MAX;
int atoi(char *);
int /*<<< orphan*/ exit(int);
double fabs(double);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, double *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(double **, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, long long, ...);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("\e[0;34m==>\e[0m Reading in values from the matrix files...");
  double matrix1[16][16], matrix2[16][16], real_product[16][16],
      calc_product[16][16];
  {
    FILE *matrix1_file = fopen("matrix1.txt", "r"),
         *matrix2_file = fopen("matrix2.txt", "r"),
         *product_file = fopen("product.txt", "r");
    for (int i = 0; i < 16; ++i) {
      for (int j = 0; j < 16; ++j) {
        fscanf(matrix1_file, "%lf", &matrix1[i][j]);
        fscanf(matrix2_file, "%lf", &matrix2[i][j]);
        fscanf(product_file, "%lf", &real_product[i][j]);
      }
    }
    fclose(matrix1_file);
    fclose(matrix2_file);
    fclose(product_file);
  }
  int block_size = 4;
  if (argc > 1) {
    block_size = atoi(argv[1]);
    if (16 % block_size != 0) {
      printf("\e[0;31m==> %d Block size is not divisible into the matrix\n",
             block_size);
      exit(1);
    }
  }
  int trials = 1;
  if (argc > 2) {
    trials = atoi(argv[2]);
  }
  long long execution_times[trials];
  printf("\e[0;34m==>\e[0m Running %d block matrix multiplcation trials...\n",
         trials);
  for (int trial = 0; trial < trials; ++trial) {
    memset(calc_product, 0, sizeof(calc_product[0][0]) * 16 * 16);
    struct timeval time_start;
    struct timeval time_end;
    gettimeofday(&time_start, NULL);
    for (int i = 0; i < 16; i += block_size) {
      for (int j = 0; j < 16; j += block_size) {
#pragma omp parallel for collapse(2)
        for (int x = 0; x < block_size; ++x) {
          for (int y = 0; y < block_size; ++y) {
            for (int k = 0; k < 16; ++k) {
#pragma omp critical
              calc_product[i + x][j + y] +=
                  matrix1[i + x][k] * matrix2[k][j + y];
            }
          }
        }
      }
    }
    gettimeofday(&time_end, NULL);
    execution_times[trial] = 1000000LL * (time_end.tv_sec - time_start.tv_sec) +
                             (time_end.tv_usec - time_start.tv_usec);
    for (int i = 0; i < 16; ++i) {
      for (int j = 0; j < 16; ++j) {
        if (fabs(calc_product[i][j] - real_product[i][j]) > 0.001) {
          printf("%dx%d: %lf expected. Was %lf\n", i, j, real_product[i][j],
                 calc_product[i][j]);
          puts("\e[0;31m==> Calculated product differs from real product!");
          exit(1);
        }
      }
    }
  }
  long long min = INT_MAX, avg = 0;
  for (int i = 0; i < trials; ++i) {
    if (execution_times[i] < min) {
      min = execution_times[i];
    }
    avg += execution_times[i];
  }
  printf("avg: %lld\n", avg / trials);
  printf("min: %lld\n", min);
  puts("\e[0;32m==>\e[0m All calculated product matches real product");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9e(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x2018(%rbp)
lea    0xe92(%rip),%rdi
lea    0xe89(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x2020(%rbp)
lea    0xe84(%rip),%rdi
lea    0xe6f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x2028(%rbp)
movl   $0x0,-0x202c(%rbp)
cmpl   $0x10,-0x202c(%rbp)
jge    1300 <main+0x170>
movl   $0x0,-0x2030(%rbp)
cmpl   $0x10,-0x2030(%rbp)
jge    12e7 <main+0x157>
mov    -0x2018(%rbp),%rdi
movslq -0x202c(%rbp),%rax
lea    -0x810(%rbp),%rdx
shl    $0x7,%rax
add    %rax,%rdx
movslq -0x2030(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xe1e(%rip),%rsi
call   1080 <fscanf@plt>
mov    -0x2020(%rbp),%rdi
movslq -0x202c(%rbp),%rax
lea    -0x1010(%rbp),%rdx
shl    $0x7,%rax
add    %rax,%rdx
movslq -0x2030(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xde8(%rip),%rsi
call   1080 <fscanf@plt>
mov    -0x2028(%rbp),%rdi
movslq -0x202c(%rbp),%rax
lea    -0x1810(%rbp),%rdx
shl    $0x7,%rax
add    %rax,%rdx
movslq -0x2030(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xdb2(%rip),%rsi
call   1080 <fscanf@plt>
mov    -0x2030(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2030(%rbp)
jmp    1224 <main+0x94>
jmp    12ec <main+0x15c>
mov    -0x202c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x202c(%rbp)
jmp    120d <main+0x7d>
mov    -0x2018(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x2020(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x2028(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x4,-0x2034(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1384 <main+0x1f4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x2034(%rbp)
mov    $0x10,%eax
cltd
idivl  -0x2034(%rbp)
cmp    $0x0,%edx
je     137f <main+0x1ef>
movslq -0x2034(%rbp),%rsi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
jmp    1384 <main+0x1f4>
movl   $0x1,-0x2038(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    13ab <main+0x21b>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x2038(%rbp)
mov    -0x2038(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x2040(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20b0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x2048(%rbp)
movslq -0x2038(%rbp),%rsi
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x204c(%rbp)
mov    -0x204c(%rbp),%eax
cmp    -0x2038(%rbp),%eax
jge    1750 <main+0x5c0>
lea    -0x2010(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1070 <memset@plt>
lea    -0x2060(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
movl   $0x0,-0x2074(%rbp)
cmpl   $0x10,-0x2074(%rbp)
jge    15bd <main+0x42d>
movl   $0x0,-0x2078(%rbp)
cmpl   $0x10,-0x2078(%rbp)
jge    15a1 <main+0x411>
movl   $0x0,-0x207c(%rbp)
mov    -0x207c(%rbp),%eax
cmp    -0x2034(%rbp),%eax
jge    1585 <main+0x3f5>
movl   $0x0,-0x2080(%rbp)
mov    -0x2080(%rbp),%eax
cmp    -0x2034(%rbp),%eax
jge    156c <main+0x3dc>
movl   $0x0,-0x2084(%rbp)
cmpl   $0x10,-0x2084(%rbp)
jge    1553 <main+0x3c3>
mov    -0x2074(%rbp),%eax
add    -0x207c(%rbp),%eax
movslq %eax,%rcx
lea    -0x810(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x2084(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x2084(%rbp),%rcx
lea    -0x1010(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
mov    -0x2078(%rbp),%ecx
add    -0x2080(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x2074(%rbp),%eax
add    -0x207c(%rbp),%eax
movslq %eax,%rcx
lea    -0x2010(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
mov    -0x2078(%rbp),%ecx
add    -0x2080(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2084(%rbp)
jmp    14a2 <main+0x312>
jmp    1558 <main+0x3c8>
mov    -0x2080(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2080(%rbp)
jmp    1486 <main+0x2f6>
jmp    1571 <main+0x3e1>
mov    -0x207c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x207c(%rbp)
jmp    146a <main+0x2da>
jmp    158a <main+0x3fa>
mov    -0x2034(%rbp),%eax
add    -0x2078(%rbp),%eax
mov    %eax,-0x2078(%rbp)
jmp    1453 <main+0x2c3>
jmp    15a6 <main+0x416>
mov    -0x2034(%rbp),%eax
add    -0x2074(%rbp),%eax
mov    %eax,-0x2074(%rbp)
jmp    143c <main+0x2ac>
lea    -0x2070(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
mov    -0x20b0(%rbp),%rax
mov    -0x2070(%rbp),%rcx
sub    -0x2060(%rbp),%rcx
imul   $0xf4240,%rcx,%rdx
mov    -0x2068(%rbp),%rcx
sub    -0x2058(%rbp),%rcx
add    %rcx,%rdx
movslq -0x204c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x2088(%rbp)
cmpl   $0x10,-0x2088(%rbp)
jge    1737 <main+0x5a7>
movl   $0x0,-0x208c(%rbp)
cmpl   $0x10,-0x208c(%rbp)
jge    171e <main+0x58e>
movslq -0x2088(%rbp),%rcx
lea    -0x2010(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x2088(%rbp),%rcx
lea    -0x1810(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x208c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0x994(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x978(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1705 <main+0x575>
movslq -0x2088(%rbp),%rsi
mov    -0x208c(%rbp),%edx
movslq -0x2088(%rbp),%rcx
lea    -0x1810(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x2088(%rbp),%rcx
lea    -0x2010(%rbp),%rax
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x208c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xa17(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0xa27(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
jmp    170a <main+0x57a>
mov    -0x208c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208c(%rbp)
jmp    1626 <main+0x496>
jmp    1723 <main+0x593>
mov    -0x2088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2088(%rbp)
jmp    160f <main+0x47f>
jmp    173c <main+0x5ac>
mov    -0x204c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204c(%rbp)
jmp    13fd <main+0x26d>
mov    0x2891(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x2098(%rbp)
movq   $0x0,-0x20a0(%rbp)
movl   $0x0,-0x20a4(%rbp)
mov    -0x20a4(%rbp),%eax
cmp    -0x2038(%rbp),%eax
jge    17f4 <main+0x664>
mov    -0x20b0(%rbp),%rax
movslq -0x20a4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmp    -0x2098(%rbp),%rax
jge    17c0 <main+0x630>
mov    -0x20b0(%rbp),%rax
movslq -0x20a4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x2098(%rbp)
mov    -0x20b0(%rbp),%rax
movslq -0x20a4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    -0x20a0(%rbp),%rax
mov    %rax,-0x20a0(%rbp)
mov    -0x20a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20a4(%rbp)
jmp    1776 <main+0x5e6>
mov    -0x20a0(%rbp),%rax
movslq -0x2038(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,%rsi
lea    0x945(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x2098(%rbp),%rsi
lea    0x93b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x938(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x2040(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x21a8,%rsp
mov    %rsi,-0xb0(%rbp)
mov    %edi,-0xc0(%rbp)
lea    0xe60(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8e(%rip),%rdi
lea    0xe93(%rip),%rbx
mov    %rbx,%rsi
call   1090 <fopen@plt>
mov    %rax,-0x80(%rbp)
lea    0xe82(%rip),%rdi
mov    %rbx,%rsi
call   1090 <fopen@plt>
mov    %rax,-0x70(%rbp)
lea    0xe7b(%rip),%rdi
mov    %rbx,%rsi
call   1090 <fopen@plt>
mov    %rax,-0x60(%rbp)
lea    -0x9d0(%rbp),%r14
lea    -0x21d0(%rbp),%rcx
lea    -0x19d0(%rbp),%rdx
xor    %edi,%edi
lea    0xe5d(%rip),%r15
mov    -0x70(%rbp),%r12
mov    -0x60(%rbp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,-0x90(%rbp)
mov    %rdx,-0xa0(%rbp)
mov    %rdi,-0xd0(%rbp)
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%r14,%rbx,1),%rdx
mov    -0x80(%rbp),%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
mov    -0x90(%rbp),%rax
lea    (%rax,%rbx,1),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
mov    -0xa0(%rbp),%rax
lea    (%rax,%rbx,1),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1080 <fscanf@plt>
add    $0x8,%rbx
cmp    $0x80,%rbx
jne    1250 <main+0xc0>
mov    -0xd0(%rbp),%rdi
add    $0x1,%rdi
sub    $0xffffffffffffff80,%r14
mov    -0x90(%rbp),%rcx
sub    $0xffffffffffffff80,%rcx
mov    -0xa0(%rbp),%rdx
sub    $0xffffffffffffff80,%rdx
cmp    $0x10,%rdi
jne    1230 <main+0xa0>
mov    -0x80(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x70(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x60(%rbp),%rdi
call   1040 <fclose@plt>
mov    $0x1,%r14d
mov    $0x4,%ebx
mov    -0xc0(%rbp),%r12d
cmp    $0x1,%r12d
jle    1330 <main+0x1a0>
mov    -0xb0(%rbp),%r15
mov    0x8(%r15),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ebx
mov    $0x10,%eax
xor    %edx,%edx
idiv   %ebx
test   %edx,%edx
jne    1bbc <main+0xa2c>
cmp    $0x3,%r12d
jb     1330 <main+0x1a0>
mov    0x10(%r15),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
mov    %rsp,%r15
mov    %r14d,%r13d
mov    %rsp,%rcx
lea    0xf(,%r13,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
movslq %r14d,%r12
lea    0xd5e(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    1a99 <main+0x909>
mov    %r13,-0x50(%rbp)
mov    %r12,-0x40(%rbp)
mov    %r15,-0x48(%rbp)
mov    %r14d,-0x2c(%rbp)
movslq %ebx,%rax
mov    %eax,%r12d
mov    %r12d,%r13d
and    $0xfffffffe,%r13d
lea    0x0(,%rax,8),%r15
mov    %rax,-0xd8(%rbp)
shl    $0x7,%rax
mov    %rax,-0xe8(%rbp)
lea    0x0(,%r12,8),%r14
and    $0xfffffffffffffff0,%r14
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,-0xe0(%rbp)
lea    -0x11d0(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1070 <memset@plt>
lea    -0x108(%rbp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
lea    -0x11d0(%rbp),%r8
xor    %ecx,%ecx
mov    -0xd8(%rbp),%r11
jmp    1414 <main+0x284>
nopw   0x0(%rax,%rax,1)
add    %r11,%rcx
add    -0xe8(%rbp),%r8
cmp    $0x10,%rcx
jge    1940 <main+0x7b0>
mov    %r8,%r9
lea    -0x1a50(%rbp),%rsi
xor    %r10d,%r10d
jmp    143f <main+0x2af>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %r11,%r10
add    %r15,%rsi
add    %r15,%r9
cmp    $0x10,%r10
jge    1400 <main+0x270>
test   %ebx,%ebx
jle    1430 <main+0x2a0>
mov    %r9,%rdx
xor    %eax,%eax
jmp    145d <main+0x2cd>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
sub    $0xffffffffffffff80,%rdx
cmp    %r12,%rax
je     1430 <main+0x2a0>
lea    (%rax,%rcx,1),%rdi
shl    $0x7,%rdi
movsd  -0x9d0(%rbp,%rdi,1),%xmm5
ff ff
movsd  -0x9c8(%rbp,%rdi,1),%xmm2
ff ff
movsd  -0x9c0(%rbp,%rdi,1),%xmm3
ff ff
movsd  -0x9b8(%rbp,%rdi,1),%xmm4
ff ff
movsd  -0x9b0(%rbp,%rdi,1),%xmm12
f6 ff ff
movsd  -0x9a8(%rbp,%rdi,1),%xmm13
f6 ff ff
movsd  -0x9a0(%rbp,%rdi,1),%xmm14
f6 ff ff
movsd  -0x998(%rbp,%rdi,1),%xmm15
f6 ff ff
movsd  -0x990(%rbp,%rdi,1),%xmm10
f6 ff ff
movsd  -0x988(%rbp,%rdi,1),%xmm11
f6 ff ff
movsd  -0x980(%rbp,%rdi,1),%xmm0
ff ff
movsd  -0x978(%rbp,%rdi,1),%xmm6
ff ff
movsd  -0x970(%rbp,%rdi,1),%xmm1
ff ff
movsd  -0x968(%rbp,%rdi,1),%xmm7
ff ff
movsd  -0x960(%rbp,%rdi,1),%xmm9
f6 ff ff
movsd  -0x958(%rbp,%rdi,1),%xmm8
f6 ff ff
cmp    $0x2,%ebx
movaps %xmm5,-0xa0(%rbp)
movaps %xmm2,-0x90(%rbp)
jae    1550 <main+0x3c0>
xor    %edi,%edi
movapd %xmm12,%xmm2
movapd %xmm13,%xmm12
movapd %xmm14,%xmm13
movapd %xmm10,%xmm14
movapd %xmm0,%xmm10
movapd %xmm15,%xmm5
movapd %xmm11,%xmm15
movapd %xmm6,%xmm11
movapd %xmm1,%xmm6
jmp    1800 <main+0x670>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movlhps %xmm5,%xmm5
movaps %xmm5,-0x80(%rbp)
movlhps %xmm2,%xmm2
movaps %xmm2,-0xd0(%rbp)
movapd %xmm3,-0xc0(%rbp)
ff
unpcklpd %xmm3,%xmm3
movapd %xmm3,-0x70(%rbp)
movapd %xmm4,-0xb0(%rbp)
ff
unpcklpd %xmm4,%xmm4
movapd %xmm4,-0x60(%rbp)
movapd %xmm12,-0x1d0(%rbp)
ff ff
unpcklpd %xmm12,%xmm12
movapd %xmm13,-0x1c0(%rbp)
ff ff
unpcklpd %xmm13,%xmm13
movapd %xmm14,-0x1b0(%rbp)
ff ff
unpcklpd %xmm14,%xmm14
movapd %xmm15,-0x1a0(%rbp)
ff ff
unpcklpd %xmm15,%xmm15
movapd %xmm10,-0x190(%rbp)
ff ff
unpcklpd %xmm10,%xmm10
movapd %xmm11,-0x180(%rbp)
ff ff
unpcklpd %xmm11,%xmm11
movapd %xmm0,-0x170(%rbp)
ff
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
movapd %xmm6,-0x160(%rbp)
ff
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
movapd %xmm1,-0x150(%rbp)
ff
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
movapd %xmm7,-0x140(%rbp)
ff
movapd %xmm7,%xmm5
unpcklpd %xmm7,%xmm5
movapd %xmm9,-0x130(%rbp)
ff ff
movapd %xmm9,%xmm6
unpcklpd %xmm9,%xmm6
movapd %xmm8,-0x120(%rbp)
ff ff
movapd %xmm8,%xmm7
unpcklpd %xmm8,%xmm7
xor    %edi,%edi
nop
movupd (%rdx,%rdi,1),%xmm8
movupd -0x780(%rsi,%rdi,1),%xmm9
f8 ff ff
mulpd  -0x80(%rbp),%xmm9
addpd  %xmm8,%xmm9
movupd -0x700(%rsi,%rdi,1),%xmm0
ff ff
mulpd  -0xd0(%rbp),%xmm0
ff
addpd  %xmm9,%xmm0
movupd -0x680(%rsi,%rdi,1),%xmm1
ff ff
mulpd  -0x70(%rbp),%xmm1
addpd  %xmm0,%xmm1
movupd -0x600(%rsi,%rdi,1),%xmm0
ff ff
mulpd  -0x60(%rbp),%xmm0
addpd  %xmm1,%xmm0
movupd -0x580(%rsi,%rdi,1),%xmm1
ff ff
mulpd  %xmm12,%xmm1
addpd  %xmm0,%xmm1
movupd -0x500(%rsi,%rdi,1),%xmm0
ff ff
mulpd  %xmm13,%xmm0
addpd  %xmm1,%xmm0
movupd -0x480(%rsi,%rdi,1),%xmm1
ff ff
mulpd  %xmm14,%xmm1
addpd  %xmm0,%xmm1
movupd -0x400(%rsi,%rdi,1),%xmm0
ff ff
mulpd  %xmm15,%xmm0
addpd  %xmm1,%xmm0
movupd -0x380(%rsi,%rdi,1),%xmm1
ff ff
mulpd  %xmm10,%xmm1
addpd  %xmm0,%xmm1
movupd -0x300(%rsi,%rdi,1),%xmm0
ff ff
mulpd  %xmm11,%xmm0
addpd  %xmm1,%xmm0
movupd -0x280(%rsi,%rdi,1),%xmm1
ff ff
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
movupd -0x200(%rsi,%rdi,1),%xmm0
ff ff
mulpd  %xmm3,%xmm0
addpd  %xmm1,%xmm0
movupd -0x180(%rsi,%rdi,1),%xmm1
ff ff
mulpd  %xmm4,%xmm1
addpd  %xmm0,%xmm1
movupd -0x100(%rsi,%rdi,1),%xmm0
ff ff
mulpd  %xmm5,%xmm0
addpd  %xmm1,%xmm0
movupd -0x80(%rsi,%rdi,1),%xmm1
mulpd  %xmm6,%xmm1
addpd  %xmm0,%xmm1
movupd (%rsi,%rdi,1),%xmm0
mulpd  %xmm7,%xmm0
addpd  %xmm1,%xmm0
movupd %xmm0,(%rdx,%rdi,1)
add    $0x10,%rdi
cmp    %rdi,%r14
jne    1640 <main+0x4b0>
mov    %r13,%rdi
cmp    %r12,%r13
movapd -0xc0(%rbp),%xmm3
ff
movapd -0xb0(%rbp),%xmm4
ff
movapd -0x1d0(%rbp),%xmm2
ff
movapd -0x1c0(%rbp),%xmm12
ff ff
movapd -0x1b0(%rbp),%xmm13
ff ff
movapd -0x1a0(%rbp),%xmm5
ff
movapd -0x190(%rbp),%xmm14
ff ff
movapd -0x180(%rbp),%xmm15
ff ff
movapd -0x170(%rbp),%xmm10
ff ff
movapd -0x160(%rbp),%xmm11
ff ff
movapd -0x150(%rbp),%xmm6
ff
movapd -0x140(%rbp),%xmm7
ff
movapd -0x130(%rbp),%xmm9
ff ff
movapd -0x120(%rbp),%xmm8
ff ff
je     1450 <main+0x2c0>
cs nopw 0x0(%rax,%rax,1)
movsd  -0x780(%rsi,%rdi,8),%xmm0
ff ff
mulsd  -0xa0(%rbp),%xmm0
ff
addsd  (%rdx,%rdi,8),%xmm0
movsd  -0x700(%rsi,%rdi,8),%xmm1
ff ff
mulsd  -0x90(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movsd  -0x680(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x600(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm4,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x580(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x500(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm12,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x480(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm13,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x400(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x380(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm14,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x300(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm15,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x280(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm10,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x200(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm11,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x180(%rsi,%rdi,8),%xmm0
ff ff
mulsd  %xmm6,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x100(%rsi,%rdi,8),%xmm1
ff ff
mulsd  %xmm7,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x80(%rsi,%rdi,8),%xmm0
mulsd  %xmm9,%xmm0
addsd  %xmm1,%xmm0
movsd  (%rsi,%rdi,8),%xmm1
mulsd  %xmm8,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx,%rdi,8)
add    $0x1,%rdi
cmp    %rdi,%r12
jne    1800 <main+0x670>
jmp    1450 <main+0x2c0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0xf8(%rbp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    -0xf8(%rbp),%rax
mov    -0xf0(%rbp),%rcx
sub    -0x108(%rbp),%rax
sub    -0x100(%rbp),%rcx
imul   $0xf4240,%rax,%rax
add    %rax,%rcx
mov    -0x38(%rbp),%rax
mov    -0xe0(%rbp),%rdi
mov    %rcx,(%rax,%rdi,8)
lea    -0x19c8(%rbp),%rcx
lea    -0x11c8(%rbp),%rsi
xor    %eax,%eax
movapd 0x665(%rip),%xmm3
movsd  0x66d(%rip),%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x8(%rsi,%rdx,8),%xmm1
movsd  -0x8(%rcx,%rdx,8),%xmm0
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
andpd  %xmm3,%xmm2
ucomisd %xmm4,%xmm2
ja     1b96 <main+0xa06>
movsd  (%rsi,%rdx,8),%xmm1
movsd  (%rcx,%rdx,8),%xmm0
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
andpd  %xmm3,%xmm2
ucomisd %xmm4,%xmm2
ja     1b92 <main+0xa02>
add    $0x2,%rdx
cmp    $0x10,%rdx
jne    19c0 <main+0x830>
add    $0x1,%rax
sub    $0xffffffffffffff80,%rsi
sub    $0xffffffffffffff80,%rcx
cmp    $0x10,%rax
jne    19b0 <main+0x820>
add    $0x1,%rdi
cmp    -0x50(%rbp),%rdi
jne    13c0 <main+0x230>
mov    0x25b5(%rip),%rax
mov    (%rax),%rbx
mov    -0x50(%rbp),%r10
test   %r10d,%r10d
jle    1aa7 <main+0x917>
lea    -0x1(%r10),%rax
mov    %r10d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rax
jae    1b0f <main+0x97f>
xor    %edx,%edx
xor    %eax,%eax
mov    -0x2c(%rbp),%r14d
mov    -0x48(%rbp),%r15
mov    -0x40(%rbp),%r12
test   %r8,%r8
je     1ab5 <main+0x925>
mov    -0x38(%rbp),%rcx
lea    (%rcx,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rdx,%rsi,8),%rcx
cmp    %rbx,%rcx
cmovl  %rcx,%rbx
add    %rcx,%rax
add    $0x1,%rsi
cmp    %rsi,%r8
jne    1a80 <main+0x8f0>
jmp    1ab5 <main+0x925>
mov    0x2548(%rip),%rax
mov    (%rax),%rbx
xor    %eax,%eax
jmp    1ab5 <main+0x925>
xor    %eax,%eax
mov    -0x2c(%rbp),%r14d
mov    -0x48(%rbp),%r15
mov    -0x40(%rbp),%r12
mov    %rax,%rcx
or     %r12,%rcx
shr    $0x20,%rcx
je     1ac8 <main+0x938>
cqto
idiv   %r12
jmp    1acd <main+0x93d>
xor    %edx,%edx
div    %r14d
lea    0x67a(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x674(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x66e(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
and    $0xfffffffc,%r10d
xor    %edx,%edx
xor    %eax,%eax
mov    -0x2c(%rbp),%r14d
mov    -0x48(%rbp),%r15
mov    -0x40(%rbp),%r12
jmp    1b40 <main+0x9b0>
cs nopw 0x0(%rax,%rax,1)
nop
add    %rdi,%rax
add    $0x4,%rdx
cmp    %rdx,%r10
je     1a64 <main+0x8d4>
mov    -0x38(%rbp),%rsi
mov    (%rsi,%rdx,8),%rcx
mov    0x8(%rsi,%rdx,8),%rsi
cmp    %rbx,%rcx
cmovl  %rcx,%rbx
add    %rcx,%rax
mov    %rsi,%rcx
cmp    %rbx,%rsi
jl     1b62 <main+0x9d2>
mov    %rbx,%rcx
add    %rax,%rsi
mov    -0x38(%rbp),%rax
mov    0x10(%rax,%rdx,8),%rdi
mov    %rdi,%r9
cmp    %rcx,%rdi
jl     1b79 <main+0x9e9>
mov    %rcx,%r9
add    %rsi,%rdi
mov    -0x38(%rbp),%rax
mov    0x18(%rax,%rdx,8),%rax
mov    %rax,%rbx
cmp    %r9,%rax
jl     1b30 <main+0x9a0>
mov    %r9,%rbx
jmp    1b30 <main+0x9a0>
add    $0x1,%rdx
mov    %eax,%esi
lea    0x558(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x568(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
movslq %ebx,%rsi
lea    0x4b6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@.str = [58 x i8] c"\1B[0;34m==>\1B[0m Reading in values from the matrix files...\00"
@.str.1 = [12 x i8] c"matrix1.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [12 x i8] c"matrix2.txt\00"
@.str.4 = [12 x i8] c"product.txt\00"
@.str.5 = [4 x i8] c"%lf\00"
@.str.6 = [59 x i8] c"\1B[0;31m==> %d Block size is not divisible into the matrix\0A\00"
@.str.7 = [64 x i8] c"\1B[0;34m==>\1B[0m Running %d block matrix multiplcation trials...\0A\00"
@.str.8 = [30 x i8] c"%dx%d: %lf expected. Was %lf\0A\00"
@.str.9 = [57 x i8] c"\1B[0;31m==> Calculated product differs from real product!\00"
@INT_MAX = global i64 0
@.str.10 = [11 x i8] c"avg: %lld\0A\00"
@.str.11 = [11 x i8] c"min: %lld\0A\00"
@.str.12 = [59 x i8] c"\1B[0;32m==>\1B[0m All calculated product matches real product\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x [16 x double]]
%4 = alloca [16 x [16 x double]]
%5 = alloca [16 x [16 x double]]
%6 = alloca [16 x [16 x double]]
%7 = alloca %struct.timeval
%8 = alloca %struct.timeval
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%10 = bitcast [16 x [16 x double]]* %3 to i8*
%11 = bitcast [16 x [16 x double]]* %4 to i8*
%12 = bitcast [16 x [16 x double]]* %5 to i8*
%13 = bitcast [16 x [16 x double]]* %6 to i8*
%14 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %2, %24
%18 = phi i64 [ 0, %2 ], [ %25, %24 ]
br label %27
19: ; preds = %24
%20 = call i32 @fclose(i32* %14)
%21 = call i32 @fclose(i32* %15)
%22 = call i32 @fclose(i32* %16)
%23 = icmp sgt i32 %0, 1
br i1 %23, label %37, label %53
24: ; preds = %27
%25 = add nuw nsw i64 %18, 1
%26 = icmp eq i64 %25, 16
br i1 %26, label %19, label %17
27: ; preds = %17, %27
%28 = phi i64 [ 0, %17 ], [ %35, %27 ]
%29 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %18, i64 %28
%30 = call i32 @fscanf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %29)
%31 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 %18, i64 %28
%32 = call i32 @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %31)
%33 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %5, i64 0, i64 %18, i64 %28
%34 = call i32 @fscanf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), double* %33)
%35 = add nuw nsw i64 %28, 1
%36 = icmp eq i64 %35, 16
br i1 %36, label %24, label %27
37: ; preds = %19
%38 = getelementptr inbounds i8*, i8** %1, i64 1
%39 = load i8*, i8** %38
%40 = call i32 @atoi(i8* %39)
%41 = srem i32 16, %40
%42 = icmp eq i32 %41, 0
br i1 %42, label %47, label %43
43: ; preds = %37
%44 = sext i32 %40 to i64
%45 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0), i64 %44)
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %37
%48 = icmp ugt i32 %0, 2
br i1 %48, label %49, label %53
49: ; preds = %47
%50 = getelementptr inbounds i8*, i8** %1, i64 2
%51 = load i8*, i8** %50
%52 = call i32 @atoi(i8* %51)
br label %53
53: ; preds = %19, %49, %47
%54 = phi i32 [ %40, %49 ], [ %40, %47 ], [ 4, %19 ]
%55 = phi i32 [ %52, %49 ], [ 1, %47 ], [ 1, %19 ]
%56 = zext i32 %55 to i64
%57 = call i8* @llvm.stacksave()
%58 = alloca i64, i64 %56
%59 = sext i32 %55 to i64
%60 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.7, i64 0, i64 0), i64 %59)
%61 = icmp sgt i32 %55, 0
br i1 %61, label %64, label %62
62: ; preds = %53
%63 = load i64, i64* @INT_MAX
br label %371
64: ; preds = %53
%65 = bitcast [16 x [16 x double]]* %6 to double**
%66 = bitcast %struct.timeval* %7 to i8*
%67 = bitcast %struct.timeval* %8 to i8*
%68 = icmp sgt i32 %54, 0
%69 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 0
%70 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 0
%71 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i64 0, i32 1
%72 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i64 0, i32 1
%73 = sext i32 %54 to i64
%74 = zext i32 %54 to i64
%75 = icmp ult i32 %54, 2
%76 = and i64 %74, 4294967294
%77 = icmp eq i64 %76, %74
br label %86
78: ; preds = %315
%79 = load i64, i64* @INT_MAX
br i1 %61, label %80, label %371
80: ; preds = %78
%81 = add nsw i64 %56, -1
%82 = and i64 %56, 3
%83 = icmp ult i64 %81, 3
br i1 %83, label %351, label %84
84: ; preds = %80
%85 = and i64 %56, 4294967292
br label %378
86: ; preds = %64, %315
%87 = phi i64 [ 0, %64 ], [ %316, %315 ]
%88 = call i32 @memset(double** %65, i32 0, i32 2048)
%89 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
br label %90
90: ; preds = %86, %105
%91 = phi i64 [ 0, %86 ], [ %106, %105 ]
br label %103
92: ; preds = %105
%93 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%94 = load i64, i64* %69
%95 = load i64, i64* %70
%96 = sub nsw i64 %94, %95
%97 = mul nsw i64 %96, 1000000
%98 = load i64, i64* %71
%99 = load i64, i64* %72
%100 = sub i64 %98, %99
%101 = add nsw i64 %100, %97
%102 = getelementptr inbounds i64, i64* %58, i64 %87
store i64 %101, i64* %102
br label %313
103: ; preds = %90, %252
%104 = phi i64 [ 0, %90 ], [ %253, %252 ]
br i1 %68, label %108, label %252
105: ; preds = %252
%106 = add nsw i64 %91, %73
%107 = icmp slt i64 %106, 16
br i1 %107, label %90, label %92
108: ; preds = %103, %310
%109 = phi i64 [ %311, %310 ], [ 0, %103 ]
%110 = add nsw i64 %109, %91
%111 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 0
%112 = load double, double* %111
%113 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 1
%114 = load double, double* %113
%115 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 2
%116 = load double, double* %115
%117 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 3
%118 = load double, double* %117
%119 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 4
%120 = load double, double* %119
%121 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 5
%122 = load double, double* %121
%123 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 6
%124 = load double, double* %123
%125 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 7
%126 = load double, double* %125
%127 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 8
%128 = load double, double* %127
%129 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 9
%130 = load double, double* %129
%131 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 10
%132 = load double, double* %131
%133 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 11
%134 = load double, double* %133
%135 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 12
%136 = load double, double* %135
%137 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 13
%138 = load double, double* %137
%139 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 14
%140 = load double, double* %139
%141 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %3, i64 0, i64 %110, i64 15
%142 = load double, double* %141
br i1 %75, label %250, label %143
143: ; preds = %108
%144 = insertelement <2 x double> poison, double %112, i64 0
%145 = shufflevector <2 x double> %144, <2 x double> poison, <2 x i32> zeroinitializer
%146 = insertelement <2 x double> poison, double %114, i64 0
%147 = shufflevector <2 x double> %146, <2 x double> poison, <2 x i32> zeroinitializer
%148 = insertelement <2 x double> poison, double %116, i64 0
%149 = shufflevector <2 x double> %148, <2 x double> poison, <2 x i32> zeroinitializer
%150 = insertelement <2 x double> poison, double %118, i64 0
%151 = shufflevector <2 x double> %150, <2 x double> poison, <2 x i32> zeroinitializer
%152 = insertelement <2 x double> poison, double %120, i64 0
%153 = shufflevector <2 x double> %152, <2 x double> poison, <2 x i32> zeroinitializer
%154 = insertelement <2 x double> poison, double %122, i64 0
%155 = shufflevector <2 x double> %154, <2 x double> poison, <2 x i32> zeroinitializer
%156 = insertelement <2 x double> poison, double %124, i64 0
%157 = shufflevector <2 x double> %156, <2 x double> poison, <2 x i32> zeroinitializer
%158 = insertelement <2 x double> poison, double %126, i64 0
%159 = shufflevector <2 x double> %158, <2 x double> poison, <2 x i32> zeroinitializer
%160 = insertelement <2 x double> poison, double %128, i64 0
%161 = shufflevector <2 x double> %160, <2 x double> poison, <2 x i32> zeroinitializer
%162 = insertelement <2 x double> poison, double %130, i64 0
%163 = shufflevector <2 x double> %162, <2 x double> poison, <2 x i32> zeroinitializer
%164 = insertelement <2 x double> poison, double %132, i64 0
%165 = shufflevector <2 x double> %164, <2 x double> poison, <2 x i32> zeroinitializer
%166 = insertelement <2 x double> poison, double %134, i64 0
%167 = shufflevector <2 x double> %166, <2 x double> poison, <2 x i32> zeroinitializer
%168 = insertelement <2 x double> poison, double %136, i64 0
%169 = shufflevector <2 x double> %168, <2 x double> poison, <2 x i32> zeroinitializer
%170 = insertelement <2 x double> poison, double %138, i64 0
%171 = shufflevector <2 x double> %170, <2 x double> poison, <2 x i32> zeroinitializer
%172 = insertelement <2 x double> poison, double %140, i64 0
%173 = shufflevector <2 x double> %172, <2 x double> poison, <2 x i32> zeroinitializer
%174 = insertelement <2 x double> poison, double %142, i64 0
%175 = shufflevector <2 x double> %174, <2 x double> poison, <2 x i32> zeroinitializer
br label %176
176: ; preds = %176, %143
%177 = phi i64 [ 0, %143 ], [ %247, %176 ]
%178 = add nsw i64 %177, %104
%179 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %6, i64 0, i64 %110, i64 %178
%180 = bitcast double* %179 to <2 x double>*
%181 = load <2 x double>, <2 x double>* %180
%182 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 0, i64 %178
%183 = bitcast double* %182 to <2 x double>*
%184 = load <2 x double>, <2 x double>* %183
%185 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %145, <2 x double> %184, <2 x double> %181)
%186 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 1, i64 %178
%187 = bitcast double* %186 to <2 x double>*
%188 = load <2 x double>, <2 x double>* %187
%189 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %147, <2 x double> %188, <2 x double> %185)
%190 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 2, i64 %178
%191 = bitcast double* %190 to <2 x double>*
%192 = load <2 x double>, <2 x double>* %191
%193 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %149, <2 x double> %192, <2 x double> %189)
%194 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 3, i64 %178
%195 = bitcast double* %194 to <2 x double>*
%196 = load <2 x double>, <2 x double>* %195
%197 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %151, <2 x double> %196, <2 x double> %193)
%198 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 4, i64 %178
%199 = bitcast double* %198 to <2 x double>*
%200 = load <2 x double>, <2 x double>* %199
%201 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %153, <2 x double> %200, <2 x double> %197)
%202 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 5, i64 %178
%203 = bitcast double* %202 to <2 x double>*
%204 = load <2 x double>, <2 x double>* %203
%205 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %155, <2 x double> %204, <2 x double> %201)
%206 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 6, i64 %178
%207 = bitcast double* %206 to <2 x double>*
%208 = load <2 x double>, <2 x double>* %207
%209 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %157, <2 x double> %208, <2 x double> %205)
%210 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 7, i64 %178
%211 = bitcast double* %210 to <2 x double>*
%212 = load <2 x double>, <2 x double>* %211
%213 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %159, <2 x double> %212, <2 x double> %209)
%214 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 8, i64 %178
%215 = bitcast double* %214 to <2 x double>*
%216 = load <2 x double>, <2 x double>* %215
%217 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %161, <2 x double> %216, <2 x double> %213)
%218 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 9, i64 %178
%219 = bitcast double* %218 to <2 x double>*
%220 = load <2 x double>, <2 x double>* %219
%221 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %163, <2 x double> %220, <2 x double> %217)
%222 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 10, i64 %178
%223 = bitcast double* %222 to <2 x double>*
%224 = load <2 x double>, <2 x double>* %223
%225 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %165, <2 x double> %224, <2 x double> %221)
%226 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 11, i64 %178
%227 = bitcast double* %226 to <2 x double>*
%228 = load <2 x double>, <2 x double>* %227
%229 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %167, <2 x double> %228, <2 x double> %225)
%230 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 12, i64 %178
%231 = bitcast double* %230 to <2 x double>*
%232 = load <2 x double>, <2 x double>* %231
%233 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %169, <2 x double> %232, <2 x double> %229)
%234 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 13, i64 %178
%235 = bitcast double* %234 to <2 x double>*
%236 = load <2 x double>, <2 x double>* %235
%237 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %171, <2 x double> %236, <2 x double> %233)
%238 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 14, i64 %178
%239 = bitcast double* %238 to <2 x double>*
%240 = load <2 x double>, <2 x double>* %239
%241 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %173, <2 x double> %240, <2 x double> %237)
%242 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 15, i64 %178
%243 = bitcast double* %242 to <2 x double>*
%244 = load <2 x double>, <2 x double>* %243
%245 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %175, <2 x double> %244, <2 x double> %241)
%246 = bitcast double* %179 to <2 x double>*
store <2 x double> %245, <2 x double>* %246
%247 = add nuw i64 %177, 2
%248 = icmp eq i64 %247, %76
br i1 %248, label %249, label %176
249: ; preds = %176
br i1 %77, label %310, label %250
250: ; preds = %108, %249
%251 = phi i64 [ 0, %108 ], [ %76, %249 ]
br label %255
252: ; preds = %310, %103
%253 = add nsw i64 %104, %73
%254 = icmp slt i64 %253, 16
br i1 %254, label %103, label %105
255: ; preds = %250, %255
%256 = phi i64 [ %308, %255 ], [ %251, %250 ]
%257 = add nsw i64 %256, %104
%258 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %6, i64 0, i64 %110, i64 %257
%259 = load double, double* %258
%260 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 0, i64 %257
%261 = load double, double* %260
%262 = call double @llvm.fmuladd.f64(double %112, double %261, double %259)
%263 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 1, i64 %257
%264 = load double, double* %263
%265 = call double @llvm.fmuladd.f64(double %114, double %264, double %262)
%266 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 2, i64 %257
%267 = load double, double* %266
%268 = call double @llvm.fmuladd.f64(double %116, double %267, double %265)
%269 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 3, i64 %257
%270 = load double, double* %269
%271 = call double @llvm.fmuladd.f64(double %118, double %270, double %268)
%272 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 4, i64 %257
%273 = load double, double* %272
%274 = call double @llvm.fmuladd.f64(double %120, double %273, double %271)
%275 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 5, i64 %257
%276 = load double, double* %275
%277 = call double @llvm.fmuladd.f64(double %122, double %276, double %274)
%278 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 6, i64 %257
%279 = load double, double* %278
%280 = call double @llvm.fmuladd.f64(double %124, double %279, double %277)
%281 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 7, i64 %257
%282 = load double, double* %281
%283 = call double @llvm.fmuladd.f64(double %126, double %282, double %280)
%284 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 8, i64 %257
%285 = load double, double* %284
%286 = call double @llvm.fmuladd.f64(double %128, double %285, double %283)
%287 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 9, i64 %257
%288 = load double, double* %287
%289 = call double @llvm.fmuladd.f64(double %130, double %288, double %286)
%290 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 10, i64 %257
%291 = load double, double* %290
%292 = call double @llvm.fmuladd.f64(double %132, double %291, double %289)
%293 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 11, i64 %257
%294 = load double, double* %293
%295 = call double @llvm.fmuladd.f64(double %134, double %294, double %292)
%296 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 12, i64 %257
%297 = load double, double* %296
%298 = call double @llvm.fmuladd.f64(double %136, double %297, double %295)
%299 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 13, i64 %257
%300 = load double, double* %299
%301 = call double @llvm.fmuladd.f64(double %138, double %300, double %298)
%302 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 14, i64 %257
%303 = load double, double* %302
%304 = call double @llvm.fmuladd.f64(double %140, double %303, double %301)
%305 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %4, i64 0, i64 15, i64 %257
%306 = load double, double* %305
%307 = call double @llvm.fmuladd.f64(double %142, double %306, double %304)
store double %307, double* %258
%308 = add nuw nsw i64 %256, 1
%309 = icmp eq i64 %308, %74
br i1 %309, label %310, label %255
310: ; preds = %255, %249
%311 = add nuw nsw i64 %109, 1
%312 = icmp eq i64 %311, %74
br i1 %312, label %252, label %108
313: ; preds = %92, %318
%314 = phi i64 [ 0, %92 ], [ %319, %318 ]
br label %321
315: ; preds = %318
%316 = add nuw nsw i64 %87, 1
%317 = icmp eq i64 %316, %56
br i1 %317, label %78, label %86
318: ; preds = %348
%319 = add nuw nsw i64 %314, 1
%320 = icmp eq i64 %319, 16
br i1 %320, label %315, label %313
321: ; preds = %348, %313
%322 = phi i64 [ 0, %313 ], [ %349, %348 ]
%323 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %6, i64 0, i64 %314, i64 %322
%324 = load double, double* %323
%325 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %5, i64 0, i64 %314, i64 %322
%326 = load double, double* %325
%327 = fsub double %324, %326
%328 = call double @llvm.fabs.f64(double %327)
%329 = fcmp ogt double %328, 1.000000e-03
br i1 %329, label %330, label %339
330: ; preds = %339, %321
%331 = phi i64 [ %322, %321 ], [ %340, %339 ]
%332 = phi double [ %324, %321 ], [ %342, %339 ]
%333 = phi double [ %326, %321 ], [ %344, %339 ]
%334 = trunc i64 %331 to i32
%335 = and i64 %314, 4294967295
%336 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i64 %335, i32 %334, double %333, double %332)
%337 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.9, i64 0, i64 0))
%338 = call i32 @exit(i32 1)
unreachable
339: ; preds = %321
%340 = or i64 %322, 1
%341 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %6, i64 0, i64 %314, i64 %340
%342 = load double, double* %341
%343 = getelementptr inbounds [16 x [16 x double]], [16 x [16 x double]]* %5, i64 0, i64 %314, i64 %340
%344 = load double, double* %343
%345 = fsub double %342, %344
%346 = call double @llvm.fabs.f64(double %345)
%347 = fcmp ogt double %346, 1.000000e-03
br i1 %347, label %330, label %348
348: ; preds = %339
%349 = add nuw nsw i64 %322, 2
%350 = icmp eq i64 %349, 16
br i1 %350, label %318, label %321
351: ; preds = %378, %80
%352 = phi i64 [ undef, %80 ], [ %404, %378 ]
%353 = phi i64 [ undef, %80 ], [ %405, %378 ]
%354 = phi i64 [ 0, %80 ], [ %406, %378 ]
%355 = phi i64 [ 0, %80 ], [ %405, %378 ]
%356 = phi i64 [ %79, %80 ], [ %404, %378 ]
%357 = icmp eq i64 %82, 0
br i1 %357, label %371, label %358
358: ; preds = %351, %358
%359 = phi i64 [ %368, %358 ], [ %354, %351 ]
%360 = phi i64 [ %367, %358 ], [ %355, %351 ]
%361 = phi i64 [ %366, %358 ], [ %356, %351 ]
%362 = phi i64 [ %369, %358 ], [ 0, %351 ]
%363 = getelementptr inbounds i64, i64* %58, i64 %359
%364 = load i64, i64* %363
%365 = icmp slt i64 %364, %361
%366 = select i1 %365, i64 %364, i64 %361
%367 = add nsw i64 %364, %360
%368 = add nuw nsw i64 %359, 1
%369 = add i64 %362, 1
%370 = icmp eq i64 %369, %82
br i1 %370, label %371, label %358
371: ; preds = %351, %358, %62, %78
%372 = phi i64 [ %79, %78 ], [ %63, %62 ], [ %352, %351 ], [ %366, %358 ]
%373 = phi i64 [ 0, %78 ], [ 0, %62 ], [ %353, %351 ], [ %367, %358 ]
%374 = sdiv i64 %373, %59
%375 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i64 %374)
%376 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i64 %372)
%377 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
378: ; preds = %378, %84
%379 = phi i64 [ 0, %84 ], [ %406, %378 ]
%380 = phi i64 [ 0, %84 ], [ %405, %378 ]
%381 = phi i64 [ %79, %84 ], [ %404, %378 ]
%382 = phi i64 [ 0, %84 ], [ %407, %378 ]
%383 = getelementptr inbounds i64, i64* %58, i64 %379
%384 = load i64, i64* %383
%385 = icmp slt i64 %384, %381
%386 = select i1 %385, i64 %384, i64 %381
%387 = add nsw i64 %384, %380
%388 = or i64 %379, 1
%389 = getelementptr inbounds i64, i64* %58, i64 %388
%390 = load i64, i64* %389
%391 = icmp slt i64 %390, %386
%392 = select i1 %391, i64 %390, i64 %386
%393 = add nsw i64 %390, %387
%394 = or i64 %379, 2
%395 = getelementptr inbounds i64, i64* %58, i64 %394
%396 = load i64, i64* %395
%397 = icmp slt i64 %396, %392
%398 = select i1 %397, i64 %396, i64 %392
%399 = add nsw i64 %396, %393
%400 = or i64 %379, 3
%401 = getelementptr inbounds i64, i64* %58, i64 %400
%402 = load i64, i64* %401
%403 = icmp slt i64 %402, %398
%404 = select i1 %403, i64 %402, i64 %398
%405 = add nsw i64 %402, %399
%406 = add nuw nsw i64 %379, 4
%407 = add i64 %382, 4
%408 = icmp eq i64 %407, %85
br i1 %408, label %351, label %378
}