#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 */

/* Variables and functions */
int EXIT_SUCCESS;
int const atoi(char *);
int /*<<< orphan*/ dgemm_(char const *, char const *, int const *, int const *,
                          int const *, double const *, double *const,
                          int const *, double *const, int const *,
                          double const *, double *const, int const *);
int /*<<< orphan*/ free(void *const);
int /*<<< orphan*/ init(int, double *const, int const, int const, int const,
                        double const);
void *malloc(int);
double norm(double *const, int const, int const, int const);
int /*<<< orphan*/ printf(char *, double const);
double seconds();
int main(int argc, char *argv[]) {
  const int batchsize = (1 < argc ? atoi(argv[1]) : 0);
  const int m = (2 < argc ? atoi(argv[2]) : 13);
  const int n = (3 < argc ? atoi(argv[3]) : 5);
  const int k = (4 < argc ? atoi(argv[4]) : 7);
  const int lda =
      (5 < argc
           ? (m < atoi(argv[5]) ? atoi(argv[5]) : m)
           : (int)(((sizeof(double) * m + 1 - 1) & ~(1 - 1)) / sizeof(double)));
  const int ldb =
      (6 < argc
           ? (k < atoi(argv[6]) ? atoi(argv[6]) : k)
           : (int)(((sizeof(double) * k + 1 - 1) & ~(1 - 1)) / sizeof(double)));
  const int ldc =
      (7 < argc
           ? (m < atoi(argv[7]) ? atoi(argv[7]) : m)
           : (int)(((sizeof(double) * m + 1 - 1) & ~(1 - 1)) / sizeof(double)));
  const char transa = 'n', transb = 'n';
  const double alpha = 1, beta = 1;
  const size_t na =
      ((sizeof(double) * lda * k + 1 - 1) & ~(1 - 1)) / sizeof(double);
  const size_t nb =
      ((sizeof(double) * ldb * n + 1 - 1) & ~(1 - 1)) / sizeof(double);
  const size_t nc =
      ((sizeof(double) * ldc * n + 1 - 1) & ~(1 - 1)) / sizeof(double);
  const int size =
      (0 >= batchsize ? (int)((2ULL << 30) / (sizeof(double) * (na + nb + nc)))
                      : batchsize);
  void *const va = malloc(sizeof(double) * na * size + 1 - 1);
  void *const vb = malloc(sizeof(double) * nb * size + 1 - 1);
  void *const vc = malloc(sizeof(double) * nc * size + 1 - 1);
  double *const a = (double *)(((uintptr_t)va + 1 - 1) & ~(1 - 1));
  double *const b = (double *)(((uintptr_t)vb + 1 - 1) & ~(1 - 1));
  double *const c = (double *)(((uintptr_t)vc + 1 - 1) & ~(1 - 1));
  const double scale = 1.0 / size;
  double duration = 0;
  int i;
  for (i = 0; i < size; ++i) {
    const int j = i;
    init(25 + i, a + j * na, m, k, lda, scale);
    init(75 + i, b + j * nb, k, n, ldb, scale);
    if (0 != beta) {
      init(42 + i, c + j * nc, m, n, ldc, scale);
    }
  }
  {
    {
      duration = seconds();
      for (i = 0; i < size; ++i) {
        const int j = i;
        dgemm_(&transa, &transb, &m, &n, &k, &alpha, a + (j * na), &lda,
               b + (j * nb), &ldb, &beta, c + 0, &ldc);
      }
    }
    duration = seconds() - duration;
  }
  if (0 < duration) {
    const double gflops = 2.0 * m * n * k * 1E-9;
    printf("%.1f GFLOPS/s\n", gflops / duration * size);
  }
  printf("%.1f ms\n", 1000.0 * duration);
  {
    double check = 0;
    for (i = 0; i < size; ++i) {
      const double cn = norm(c + 0, m, n, ldc);
      if (check < cn)
        check = cn;
    }
    printf("\n%f (check)\n", check);
  }
  free(va);
  free(vb);
  free(vc);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x140,%rsp
movl   $0x0,-0x24(%rbp)
mov    %edi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    $0x1,%eax
cmp    -0x28(%rbp),%eax
jge    11c6 <main+0x46>
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0xec(%rbp)
jmp    11d3 <main+0x53>
xor    %eax,%eax
mov    %eax,-0xec(%rbp)
jmp    11d3 <main+0x53>
mov    -0xec(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    $0x2,%eax
cmp    -0x28(%rbp),%eax
jge    1202 <main+0x82>
mov    -0x30(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0xf0(%rbp)
jmp    1212 <main+0x92>
mov    $0xd,%eax
mov    %eax,-0xf0(%rbp)
jmp    1212 <main+0x92>
mov    -0xf0(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    $0x3,%eax
cmp    -0x28(%rbp),%eax
jge    1241 <main+0xc1>
mov    -0x30(%rbp),%rax
mov    0x18(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0xf4(%rbp)
jmp    1251 <main+0xd1>
mov    $0x5,%eax
mov    %eax,-0xf4(%rbp)
jmp    1251 <main+0xd1>
mov    -0xf4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    $0x4,%eax
cmp    -0x28(%rbp),%eax
jge    1280 <main+0x100>
mov    -0x30(%rbp),%rax
mov    0x20(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0xf8(%rbp)
jmp    1290 <main+0x110>
mov    $0x7,%eax
mov    %eax,-0xf8(%rbp)
jmp    1290 <main+0x110>
mov    -0xf8(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    $0x5,%eax
cmp    -0x28(%rbp),%eax
jge    12ff <main+0x17f>
mov    -0x38(%rbp),%eax
mov    %eax,-0xfc(%rbp)
mov    -0x30(%rbp),%rax
mov    0x28(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ecx
mov    -0xfc(%rbp),%eax
cmp    %ecx,%eax
jge    12e5 <main+0x165>
mov    -0x30(%rbp),%rax
mov    0x28(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x100(%rbp)
jmp    12ee <main+0x16e>
mov    -0x38(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0x100(%rbp),%eax
mov    %eax,-0x104(%rbp)
jmp    131d <main+0x19d>
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %eax,-0x104(%rbp)
mov    -0x104(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    $0x6,%eax
cmp    -0x28(%rbp),%eax
jge    138c <main+0x20c>
mov    -0x40(%rbp),%eax
mov    %eax,-0x108(%rbp)
mov    -0x30(%rbp),%rax
mov    0x30(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ecx
mov    -0x108(%rbp),%eax
cmp    %ecx,%eax
jge    1372 <main+0x1f2>
mov    -0x30(%rbp),%rax
mov    0x30(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x10c(%rbp)
jmp    137b <main+0x1fb>
mov    -0x40(%rbp),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
mov    %eax,-0x110(%rbp)
jmp    13aa <main+0x22a>
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    $0x7,%eax
cmp    -0x28(%rbp),%eax
jge    1419 <main+0x299>
mov    -0x38(%rbp),%eax
mov    %eax,-0x114(%rbp)
mov    -0x30(%rbp),%rax
mov    0x38(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ecx
mov    -0x114(%rbp),%eax
cmp    %ecx,%eax
jge    13ff <main+0x27f>
mov    -0x30(%rbp),%rax
mov    0x38(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x118(%rbp)
jmp    1408 <main+0x288>
mov    -0x38(%rbp),%eax
mov    %eax,-0x118(%rbp)
mov    -0x118(%rbp),%eax
mov    %eax,-0x11c(%rbp)
jmp    1437 <main+0x2b7>
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %eax,-0x11c(%rbp)
mov    -0x11c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movb   $0x6e,-0x4d(%rbp)
movb   $0x6e,-0x4e(%rbp)
movsd  0xbb0(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xba3(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
movslq -0x40(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %rax,-0x68(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
movslq -0x3c(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %rax,-0x70(%rbp)
movslq -0x4c(%rbp),%rax
shl    $0x3,%rax
movslq -0x3c(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
shr    $0x3,%rax
mov    %rax,-0x78(%rbp)
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
jl     14fe <main+0x37e>
mov    -0x68(%rbp),%rcx
add    -0x70(%rbp),%rcx
add    -0x78(%rbp),%rcx
shl    $0x3,%rcx
mov    $0x80000000,%eax
xor    %edx,%edx
div    %rcx
mov    %eax,-0x120(%rbp)
jmp    1507 <main+0x387>
mov    -0x34(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    -0x120(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x68(%rbp),%rax
shl    $0x3,%rax
movslq -0x7c(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    -0x70(%rbp),%rax
shl    $0x3,%rax
movslq -0x7c(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
movslq -0x7c(%rbp),%rcx
imul   %rcx,%rax
add    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x90(%rbp),%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
mov    %rax,-0xa8(%rbp)
mov    -0x98(%rbp),%rax
add    $0x1,%rax
sub    $0x1,%rax
and    $0xffffffffffffffff,%rax
mov    %rax,-0xb0(%rbp)
cvtsi2sdl -0x7c(%rbp),%xmm1
movsd  0xa23(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x0,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    16db <main+0x55b>
mov    -0xc4(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc4(%rbp),%edi
add    $0x19,%edi
mov    -0xa0(%rbp),%rsi
movslq -0xc8(%rbp),%rax
imul   -0x68(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x38(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x44(%rbp),%r8d
movsd  -0xb8(%rbp),%xmm0
ff
call   1080 <init@plt>
mov    -0xc4(%rbp),%edi
add    $0x4b,%edi
mov    -0xa8(%rbp),%rsi
movslq -0xc8(%rbp),%rax
imul   -0x70(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x40(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x48(%rbp),%r8d
movsd  -0xb8(%rbp),%xmm0
ff
call   1080 <init@plt>
mov    -0xc4(%rbp),%edi
add    $0x2a,%edi
mov    -0xb0(%rbp),%rsi
movslq -0xc8(%rbp),%rax
imul   -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x38(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x4c(%rbp),%r8d
movsd  -0xb8(%rbp),%xmm0
ff
call   1080 <init@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    15fe <main+0x47e>
mov    $0x0,%al
call   1040 <seconds@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x0,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    17ad <main+0x62d>
mov    -0xc4(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    -0xa0(%rbp),%r12
movslq -0xcc(%rbp),%rax
imul   -0x68(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r12
mov    -0xa8(%rbp),%r14
movslq -0xcc(%rbp),%rax
imul   -0x70(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r14
mov    -0xb0(%rbp),%r10
lea    -0x4d(%rbp),%rdi
lea    -0x4e(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x3c(%rbp),%rcx
lea    -0x40(%rbp),%r8
lea    -0x58(%rbp),%r9
lea    -0x44(%rbp),%r15
lea    -0x48(%rbp),%rbx
lea    -0x60(%rbp),%r11
lea    -0x4c(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1050 <dgemm_@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    16f4 <main+0x574>
mov    $0x0,%al
call   1040 <seconds@plt>
subsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1835 <main+0x6b5>
cvtsi2sdl -0x38(%rbp),%xmm1
movsd  0x82a(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x804(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
divsd  -0xc0(%rbp),%xmm0
ff
cvtsi2sdl -0x7c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
lea    0x7f0(%rip),%rdi
call   1060 <printf@plt>
movsd  0x7db(%rip),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
lea    0x7e3(%rip),%rdi
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    18d5 <main+0x755>
mov    -0xb0(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x4c(%rbp),%ecx
call   1070 <norm@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    18bc <main+0x73c>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    18c1 <main+0x741>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1866 <main+0x6e6>
movsd  -0xe0(%rbp),%xmm0
ff
lea    0x754(%rip),%rdi
call   1060 <printf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    0x26cc(%rip),%rax
mov    (%rax),%eax
add    $0x140,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
cmp    $0x1,%edi
jle    11e5 <main+0x65>
mov    %rsi,%r12
mov    %edi,%r13d
mov    0x8(%rsi),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r15d
cmp    $0x2,%r13d
je     11e8 <main+0x68>
mov    0x10(%r12),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r10d
mov    %eax,0x1c(%rsp)
cmp    $0x3,%r13d
jbe    11f6 <main+0x76>
mov    %r10d,%ebx
mov    0x18(%r12),%rdi
call   10a0 <atoi@plt>
mov    %eax,0x18(%rsp)
cmp    $0x4,%r13d
jne    15b9 <main+0x439>
mov    %ebx,%r10d
jmp    1203 <main+0x83>
xor    %r15d,%r15d
movl   $0xd,0x1c(%rsp)
mov    $0xd,%r10d
movl   $0x5,0x18(%rsp)
mov    $0x5,%eax
movl   $0x7,0x20(%rsp)
mov    $0x7,%r14d
mov    %r10d,0x2c(%rsp)
mov    %r10d,%r9d
mov    %r14d,0x28(%rsp)
mov    %r14d,%ebp
mov    %r10d,%r8d
mov    %r8d,0x24(%rsp)
movb   $0x6e,0x3(%rsp)
movb   $0x6e,0x2(%rsp)
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x90(%rsp)
mov    %rcx,0x88(%rsp)
movslq %r9d,%rcx
movslq %r14d,%rsi
imul   %rcx,%rsi
lea    0x0(,%rsi,8),%rdi
movabs $0x1fffffffffffffff,%rdx
ff ff 1f
and    %rdx,%rsi
mov    %ebp,0x60(%rsp)
movslq %ebp,%rbp
mov    %eax,0x4(%rsp)
cltq
imul   %rax,%rbp
lea    0x0(,%rbp,8),%r13
and    %rdx,%rbp
movslq %r8d,%rcx
imul   %rax,%rcx
lea    0x0(,%rcx,8),%r12
and    %rdx,%rcx
test   %r15d,%r15d
jg     12c5 <main+0x145>
lea    (%rsi,%rbp,1),%rbx
add    %rcx,%rbx
shl    $0x3,%rbx
mov    $0x80000000,%eax
cmp    %rax,%rbx
ja     12c2 <main+0x142>
mov    $0x80000000,%eax
xor    %edx,%edx
div    %ebx
mov    %eax,%r15d
jmp    12c5 <main+0x145>
xor    %r15d,%r15d
mov    %rcx,0x48(%rsp)
mov    %r8d,0x5c(%rsp)
mov    %rsi,0x50(%rsp)
mov    %r9d,0x14(%rsp)
mov    %r10d,0x64(%rsp)
imul   %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
imul   %r15d,%r13d
mov    %r13d,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
imul   %r15d,%r12d
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
cvtsi2sd %r15d,%xmm0
test   %r15d,%r15d
movsd  %xmm0,0x78(%rsp)
jle    14ad <main+0x32d>
movsd  0xcdc(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    %r15,0x70(%rsp)
mov    %r14d,0x58(%rsp)
mov    %r12,%r14
mov    %r13,%r12
mov    %rbx,%r13
mov    %r15d,%ebx
mov    0x48(%rsp),%rax
shl    $0x3,%rax
shl    $0x3,%rbp
mov    %rbp,0x68(%rsp)
shlq   $0x3,0x50(%rsp)
xor    %ebp,%ebp
mov    %r13,0x38(%rsp)
mov    %r12,0x30(%rsp)
mov    %r14,0x40(%rsp)
mov    %rax,0x48(%rsp)
mov    %rbx,0x80(%rsp)
nopw   0x0(%rax,%rax,1)
lea    0x19(%rbp),%edi
mov    %r13,%rsi
mov    0x64(%rsp),%ebx
mov    %ebx,%edx
mov    0x58(%rsp),%r15d
mov    %r15d,%ecx
mov    0x14(%rsp),%r8d
movsd  0x8(%rsp),%xmm0
call   1080 <init@plt>
lea    0x4b(%rbp),%edi
mov    %r12,%rsi
mov    %r15d,%edx
mov    0x4(%rsp),%r15d
mov    %r15d,%ecx
mov    0x60(%rsp),%r8d
movsd  0x8(%rsp),%xmm0
call   1080 <init@plt>
lea    0x2a(%rbp),%edi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    0x5c(%rsp),%r8d
movsd  0x8(%rsp),%xmm0
call   1080 <init@plt>
mov    0x48(%rsp),%rax
add    $0x1,%rbp
add    %rax,%r14
add    0x68(%rsp),%r12
add    0x50(%rsp),%r13
mov    0x80(%rsp),%rcx
cmp    %rbp,%rcx
jne    1380 <main+0x200>
mov    %rcx,%rbx
mov    0x68(%rsp),%r12
mov    0x50(%rsp),%r14
xor    %eax,%eax
call   1040 <seconds@plt>
mov    0x70(%rsp),%r15
test   %r15d,%r15d
movsd  %xmm0,0x8(%rsp)
jle    149c <main+0x31c>
mov    0x38(%rsp),%rbp
mov    0x30(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nop
sub    $0x8,%rsp
lea    0xb(%rsp),%rdi
lea    0xa(%rsp),%rsi
lea    0x24(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x98(%rsp),%r9
lea    0x2c(%rsp),%rax
push   %rax
push   0x50(%rsp)
lea    0xa0(%rsp),%rax
push   %rax
lea    0x48(%rsp),%rax
push   %rax
push   %r13
lea    0x5c(%rsp),%rax
push   %rax
push   %rbp
call   1050 <dgemm_@plt>
add    $0x40,%rsp
add    %r12,%r13
add    %r14,%rbp
add    $0xffffffffffffffff,%rbx
jne    1440 <main+0x2c0>
mov    0x38(%rsp),%rbx
mov    0x30(%rsp),%r13
mov    0x40(%rsp),%r12
jmp    14ba <main+0x33a>
xor    %eax,%eax
call   1040 <seconds@plt>
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <seconds@plt>
movapd %xmm0,%xmm2
subsd  0x8(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jbe    1523 <main+0x3a3>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x1c(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvtsi2sdl 0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xb07(%rip),%xmm0
divsd  %xmm2,%xmm0
mulsd  0x78(%rsp),%xmm0
lea    0xb06(%rip),%rdi
movsd  %xmm2,0x8(%rsp)
call   1060 <printf@plt>
movsd  0x8(%rsp),%xmm2
mulsd  0xae5(%rip),%xmm2
lea    0xaf5(%rip),%rdi
movapd %xmm2,%xmm0
call   1060 <printf@plt>
test   %r15d,%r15d
xorpd  %xmm0,%xmm0
jle    157a <main+0x3fa>
xorpd  %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0x8(%rsp)
mov    0x1c(%rsp),%esi
mov    0x18(%rsp),%edx
mov    0x24(%rsp),%ecx
mov    %r12,%rdi
call   1070 <norm@plt>
maxsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm1
add    $0xffffffff,%r15d
jne    1550 <main+0x3d0>
lea    0xaaf(%rip),%rdi
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x2a3b(%rip),%rax
mov    (%rax),%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,0x4(%rsp)
mov    0x20(%r12),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
mov    %eax,0x20(%rsp)
cmp    $0x5,%r13d
jbe    15fe <main+0x47e>
mov    0x28(%r12),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r9d
cmp    %eax,%ebx
cmovge %ebx,%r9d
mov    %r9d,0x2c(%rsp)
cmp    $0x6,%r13d
jne    160a <main+0x48a>
mov    %ebx,%r10d
mov    0x4(%rsp),%eax
jmp    1219 <main+0x99>
mov    0x4(%rsp),%eax
mov    %ebx,%r10d
jmp    1211 <main+0x91>
mov    %r9d,0x14(%rsp)
mov    0x30(%r12),%rdi
call   10a0 <atoi@plt>
cmp    %eax,%r14d
mov    %r14d,%ebp
cmovl  %eax,%ebp
mov    %ebp,0x28(%rsp)
cmp    $0x8,%r13d
jb     1644 <main+0x4c4>
mov    0x38(%r12),%rdi
call   10a0 <atoi@plt>
mov    %ebx,%r10d
cmp    %eax,%ebx
mov    %ebx,%r8d
cmovl  %eax,%r8d
jmp    164a <main+0x4ca>
mov    %ebx,%r10d
mov    %ebx,%r8d
mov    0x4(%rsp),%eax
mov    0x14(%rsp),%r9d
jmp    1224 <main+0xa4>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%.1f GFLOPS/s\0A\00"
@.str.1 = [9 x i8] c"%.1f ms\0A\00"
@.str.2 = [13 x i8] c"\0A%f (check)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
%11 = alloca double
%12 = alloca double
%13 = icmp sgt i32 %0, 1
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = bitcast i32* %3 to i8*
br label %22
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
%20 = bitcast i32* %3 to i8*
%21 = icmp eq i32 %0, 2
br i1 %21, label %22, label %25
22: ; preds = %14, %16
%23 = phi i32 [ 0, %14 ], [ %19, %16 ]
store i32 13, i32* %3
%24 = bitcast i32* %4 to i8*
br label %31
25: ; preds = %16
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
%28 = tail call i32 @atoi(i8* %27)
store i32 %28, i32* %3
%29 = bitcast i32* %4 to i8*
%30 = icmp ugt i32 %0, 3
br i1 %30, label %35, label %31
31: ; preds = %22, %25
%32 = phi i32 [ 13, %22 ], [ %28, %25 ]
%33 = phi i32 [ %23, %22 ], [ %19, %25 ]
store i32 5, i32* %4
%34 = bitcast i32* %5 to i8*
br label %41
35: ; preds = %25
%36 = getelementptr inbounds i8*, i8** %1, i64 3
%37 = load i8*, i8** %36
%38 = tail call i32 @atoi(i8* %37)
store i32 %38, i32* %4
%39 = bitcast i32* %5 to i8*
%40 = icmp eq i32 %0, 4
br i1 %40, label %41, label %46
41: ; preds = %31, %35
%42 = phi i32 [ 5, %31 ], [ %38, %35 ]
%43 = phi i32 [ %33, %31 ], [ %19, %35 ]
%44 = phi i32 [ %32, %31 ], [ %28, %35 ]
store i32 7, i32* %5
%45 = bitcast i32* %6 to i8*
br label %52
46: ; preds = %35
%47 = getelementptr inbounds i8*, i8** %1, i64 4
%48 = load i8*, i8** %47
%49 = tail call i32 @atoi(i8* %48)
store i32 %49, i32* %5
%50 = bitcast i32* %6 to i8*
%51 = icmp ugt i32 %0, 5
br i1 %51, label %58, label %52
52: ; preds = %46, %41
%53 = phi i32 [ %49, %46 ], [ 7, %41 ]
%54 = phi i32 [ %19, %46 ], [ %43, %41 ]
%55 = phi i32 [ %38, %46 ], [ %42, %41 ]
%56 = phi i32 [ %28, %46 ], [ %44, %41 ]
store i32 %56, i32* %6
%57 = bitcast i32* %7 to i8*
br label %66
58: ; preds = %46
%59 = getelementptr inbounds i8*, i8** %1, i64 5
%60 = load i8*, i8** %59
%61 = tail call i32 @atoi(i8* %60)
%62 = icmp slt i32 %28, %61
%63 = select i1 %62, i32 %61, i32 %28
store i32 %63, i32* %6
%64 = bitcast i32* %7 to i8*
%65 = icmp eq i32 %0, 6
br i1 %65, label %66, label %73
66: ; preds = %58, %52
%67 = phi i32 [ %63, %58 ], [ %56, %52 ]
%68 = phi i32 [ %28, %58 ], [ %56, %52 ]
%69 = phi i32 [ %38, %58 ], [ %55, %52 ]
%70 = phi i32 [ %19, %58 ], [ %54, %52 ]
%71 = phi i32 [ %49, %58 ], [ %53, %52 ]
store i32 %71, i32* %7
%72 = bitcast i32* %8 to i8*
br label %87
73: ; preds = %58
%74 = getelementptr inbounds i8*, i8** %1, i64 6
%75 = load i8*, i8** %74
%76 = tail call i32 @atoi(i8* %75)
%77 = icmp slt i32 %49, %76
%78 = select i1 %77, i32 %76, i32 %49
store i32 %78, i32* %7
%79 = bitcast i32* %8 to i8*
%80 = icmp ugt i32 %0, 7
br i1 %80, label %81, label %87
81: ; preds = %73
%82 = getelementptr inbounds i8*, i8** %1, i64 7
%83 = load i8*, i8** %82
%84 = tail call i32 @atoi(i8* %83)
%85 = icmp slt i32 %28, %84
%86 = select i1 %85, i32 %84, i32 %28
br label %87
87: ; preds = %73, %66, %81
%88 = phi i32 [ %28, %81 ], [ %68, %66 ], [ %28, %73 ]
%89 = phi i32 [ %78, %81 ], [ %71, %66 ], [ %78, %73 ]
%90 = phi i32 [ %49, %81 ], [ %71, %66 ], [ %49, %73 ]
%91 = phi i32 [ %19, %81 ], [ %70, %66 ], [ %19, %73 ]
%92 = phi i32 [ %38, %81 ], [ %69, %66 ], [ %38, %73 ]
%93 = phi i32 [ %63, %81 ], [ %67, %66 ], [ %63, %73 ]
%94 = phi i32 [ %86, %81 ], [ %68, %66 ], [ %28, %73 ]
store i32 %94, i32* %8
store i8 110, i8* %9
store i8 110, i8* %10
%95 = bitcast double* %11 to i8*
store double 1.000000e+00, double* %11
%96 = bitcast double* %12 to i8*
store double 1.000000e+00, double* %12
%97 = sext i32 %93 to i64
%98 = shl nsw i64 %97, 3
%99 = sext i32 %90 to i64
%100 = mul i64 %98, %99
%101 = lshr exact i64 %100, 3
%102 = sext i32 %89 to i64
%103 = shl nsw i64 %102, 3
%104 = sext i32 %92 to i64
%105 = mul i64 %103, %104
%106 = lshr exact i64 %105, 3
%107 = sext i32 %94 to i64
%108 = shl nsw i64 %107, 3
%109 = mul i64 %108, %104
%110 = lshr exact i64 %109, 3
%111 = icmp slt i32 %91, 1
br i1 %111, label %112, label %118
112: ; preds = %87
%113 = add nuw nsw i64 %101, %106
%114 = add nuw nsw i64 %113, %110
%115 = shl i64 %114, 3
%116 = udiv i64 2147483648, %115
%117 = trunc i64 %116 to i32
br label %118
118: ; preds = %87, %112
%119 = phi i32 [ %117, %112 ], [ %91, %87 ]
%120 = trunc i64 %100 to i32
%121 = mul i32 %119, %120
%122 = tail call i8* @malloc(i32 %121)
%123 = trunc i64 %105 to i32
%124 = mul i32 %119, %123
%125 = tail call i8* @malloc(i32 %124)
%126 = trunc i64 %109 to i32
%127 = mul i32 %119, %126
%128 = tail call i8* @malloc(i32 %127)
%129 = bitcast i8* %122 to double*
%130 = bitcast i8* %125 to double*
%131 = bitcast i8* %128 to double*
%132 = sitofp i32 %119 to double
%133 = fdiv double 1.000000e+00, %132
%134 = icmp sgt i32 %119, 0
br i1 %134, label %137, label %135
135: ; preds = %118
%136 = tail call double (...) @seconds()
br label %171
137: ; preds = %118
%138 = zext i32 %119 to i64
br label %139
139: ; preds = %137, %139
%140 = phi i64 [ 0, %137 ], [ %156, %139 ]
%141 = mul i64 %101, %140
%142 = getelementptr inbounds double, double* %129, i64 %141
%143 = trunc i64 %140 to i32
%144 = add i32 %143, 25
%145 = tail call i32 @init(i32 %144, double* %142, i32 %88, i32 %90, i32 %93, double %133)
%146 = mul i64 %106, %140
%147 = getelementptr inbounds double, double* %130, i64 %146
%148 = trunc i64 %140 to i32
%149 = add i32 %148, 75
%150 = tail call i32 @init(i32 %149, double* %147, i32 %90, i32 %92, i32 %89, double %133)
%151 = mul i64 %110, %140
%152 = getelementptr inbounds double, double* %131, i64 %151
%153 = trunc i64 %140 to i32
%154 = add i32 %153, 42
%155 = tail call i32 @init(i32 %154, double* %152, i32 %88, i32 %92, i32 %94, double %133)
%156 = add nuw nsw i64 %140, 1
%157 = icmp eq i64 %156, %138
br i1 %157, label %158, label %139
158: ; preds = %139
%159 = tail call double (...) @seconds()
br i1 %134, label %160, label %171
160: ; preds = %158
%161 = zext i32 %119 to i64
br label %162
162: ; preds = %160, %162
%163 = phi i64 [ 0, %160 ], [ %169, %162 ]
%164 = mul i64 %101, %163
%165 = getelementptr inbounds double, double* %129, i64 %164
%166 = mul i64 %106, %163
%167 = getelementptr inbounds double, double* %130, i64 %166
%168 = call i32 @dgemm_(i8* %9, i8* %10, i32* %3, i32* %4, i32* %5, double* %11, double* %165, i32* %6, double* %167, i32* %7, double* %12, double* %131, i32* %8)
%169 = add nuw nsw i64 %163, 1
%170 = icmp eq i64 %169, %161
br i1 %170, label %171, label %162
171: ; preds = %162, %135, %158
%172 = phi double [ %136, %135 ], [ %159, %158 ], [ %159, %162 ]
%173 = call double (...) @seconds()
%174 = fsub double %173, %172
%175 = fcmp ogt double %174, 0.000000e+00
br i1 %175, label %176, label %190
176: ; preds = %171
%177 = load i32, i32* %3
%178 = sitofp i32 %177 to double
%179 = fmul double %178, 2.000000e+00
%180 = load i32, i32* %4
%181 = sitofp i32 %180 to double
%182 = fmul double %179, %181
%183 = load i32, i32* %5
%184 = sitofp i32 %183 to double
%185 = fmul double %182, %184
%186 = fmul double %185, 1.000000e-09
%187 = fdiv double %186, %174
%188 = fmul double %187, %132
%189 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %188)
br label %190
190: ; preds = %176, %171
%191 = fmul double %174, 1.000000e+03
%192 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %191)
br i1 %134, label %193, label %204
193: ; preds = %190, %193
%194 = phi double [ %201, %193 ], [ 0.000000e+00, %190 ]
%195 = phi i32 [ %202, %193 ], [ 0, %190 ]
%196 = load i32, i32* %3
%197 = load i32, i32* %4
%198 = load i32, i32* %8
%199 = call double @norm(double* %131, i32 %196, i32 %197, i32 %198)
%200 = fcmp olt double %194, %199
%201 = select i1 %200, double %199, double %194
%202 = add nuw nsw i32 %195, 1
%203 = icmp eq i32 %202, %119
br i1 %203, label %204, label %193
204: ; preds = %193, %190
%205 = phi double [ 0.000000e+00, %190 ], [ %201, %193 ]
%206 = bitcast i32* %7 to i8*
%207 = bitcast i32* %5 to i8*
%208 = bitcast i32* %3 to i8*
%209 = bitcast i32* %4 to i8*
%210 = bitcast i32* %6 to i8*
%211 = bitcast i32* %8 to i8*
%212 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %205)
%213 = call i32 @free(i8* %122)
%214 = call i32 @free(i8* %125)
%215 = call i32 @free(i8* %128)
%216 = load i32, i32* @EXIT_SUCCESS
ret i32 %216
}