void kernel_dgemm_nt_4x2_lib4(int kmax, double *A, double *B, double *C,
                              double *D, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int ldc = 4;
  int k;
  double a_0, a_1, a_2, a_3, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0,
                                       c_20 = 0, c_21 = 0, c_30 = 0, c_31 = 0;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    a_2 = A[2 + lda * 0];
    a_3 = A[3 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + lda * 1];
    a_1 = A[1 + lda * 1];
    a_2 = A[2 + lda * 1];
    a_3 = A[3 + lda * 1];
    b_0 = B[0 + lda * 1];
    b_1 = B[1 + lda * 1];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + lda * 2];
    a_1 = A[1 + lda * 2];
    a_2 = A[2 + lda * 2];
    a_3 = A[3 + lda * 2];
    b_0 = B[0 + lda * 2];
    b_1 = B[1 + lda * 2];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + lda * 3];
    a_1 = A[1 + lda * 3];
    a_2 = A[2 + lda * 3];
    a_3 = A[3 + lda * 3];
    b_0 = B[0 + lda * 3];
    b_1 = B[1 + lda * 3];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    a_2 = A[2 + lda * 0];
    a_3 = A[3 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    A += 4;
    B += 4;
  }
  double d_00, d_01, d_10, d_11, d_20, d_21, d_30, d_31;
  if (alg == 0) {
    C[0 + ldc * 0] = c_00;
    C[1 + ldc * 0] = c_10;
    C[2 + ldc * 0] = c_20;
    C[3 + ldc * 0] = c_30;
    C[0 + ldc * 1] = c_01;
    C[1 + ldc * 1] = c_11;
    C[2 + ldc * 1] = c_21;
    C[3 + ldc * 1] = c_31;
  } else {
    d_00 = D[0 + ldc * 0];
    d_10 = D[1 + ldc * 0];
    d_20 = D[2 + ldc * 0];
    d_30 = D[3 + ldc * 0];
    d_01 = D[0 + ldc * 1];
    d_11 = D[1 + ldc * 1];
    d_21 = D[2 + ldc * 1];
    d_31 = D[3 + ldc * 1];
    if (alg == 1) {
      d_00 += c_00;
      d_10 += c_10;
      d_20 += c_20;
      d_30 += c_30;
      d_01 += c_01;
      d_11 += c_11;
      d_21 += c_21;
      d_31 += c_31;
    } else {
      d_00 -= c_00;
      d_10 -= c_10;
      d_20 -= c_20;
      d_30 -= c_30;
      d_01 -= c_01;
      d_11 -= c_11;
      d_21 -= c_21;
      d_31 -= c_31;
    }
    C[0 + ldc * 0] = c_00;
    C[1 + ldc * 0] = c_10;
    C[2 + ldc * 0] = c_20;
    C[3 + ldc * 0] = c_30;
    C[0 + ldc * 1] = c_01;
    C[1 + ldc * 1] = c_11;
    C[2 + ldc * 1] = c_21;
    C[3 + ldc * 1] = c_31;
  }
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_4x2_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x68,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112e <kernel_dgemm_nt_4x2_lib4+0x2e>
jmp    1bc9 <kernel_dgemm_nt_4x2_lib4+0xac9>
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1713 <kernel_dgemm_nt_4x2_lib4+0x613>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x38(%rbp)
jmp    1192 <kernel_dgemm_nt_4x2_lib4+0x92>
jmp    1718 <kernel_dgemm_nt_4x2_lib4+0x618>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    189a <kernel_dgemm_nt_4x2_lib4+0x79a>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1718 <kernel_dgemm_nt_4x2_lib4+0x618>
cmpl   $0x0,-0x2c(%rbp)
jne    1927 <kernel_dgemm_nt_4x2_lib4+0x827>
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x38(%rax)
jmp    1bc9 <kernel_dgemm_nt_4x2_lib4+0xac9>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
cmpl   $0x1,-0x2c(%rbp)
jne    1a74 <kernel_dgemm_nt_4x2_lib4+0x974>
movsd  -0x70(%rbp),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1b4b <kernel_dgemm_nt_4x2_lib4+0xa4b>
movsd  -0x70(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x78(%rbp),%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x38(%rax)
add    $0x68,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nt_4x2_lib4>:
test   %edi,%edi
jle    135c <kernel_dgemm_nt_4x2_lib4+0x25c>
cmp    $0x4,%edi
jb     1285 <kernel_dgemm_nt_4x2_lib4+0x185>
lea    -0x3(%rdi),%r8d
xorpd  %xmm8,%xmm8
xor    %eax,%eax
xorpd  %xmm9,%xmm9
xorpd  %xmm10,%xmm10
xorpd  %xmm11,%xmm11
nopl   0x0(%rax,%rax,1)
movupd (%rsi),%xmm4
movupd 0x10(%rsi),%xmm7
movupd 0x20(%rsi),%xmm0
movupd 0x30(%rsi),%xmm12
movsd  (%rdx),%xmm6
movsd  0x8(%rdx),%xmm5
movsd  0x20(%rdx),%xmm2
movsd  0x28(%rdx),%xmm1
unpcklpd %xmm6,%xmm6
movapd %xmm4,%xmm3
mulpd  %xmm6,%xmm3
addpd  %xmm8,%xmm3
mulpd  %xmm7,%xmm6
addpd  %xmm9,%xmm6
unpcklpd %xmm5,%xmm5
mulpd  %xmm5,%xmm4
addpd  %xmm10,%xmm4
mulpd  %xmm7,%xmm5
addpd  %xmm11,%xmm5
unpcklpd %xmm2,%xmm2
movapd %xmm0,%xmm7
mulpd  %xmm2,%xmm7
addpd  %xmm3,%xmm7
mulpd  %xmm12,%xmm2
addpd  %xmm6,%xmm2
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm0
addpd  %xmm4,%xmm0
mulpd  %xmm12,%xmm1
addpd  %xmm5,%xmm1
movupd 0x40(%rsi),%xmm5
movupd 0x50(%rsi),%xmm6
movsd  0x40(%rdx),%xmm4
unpcklpd %xmm4,%xmm4
movapd %xmm5,%xmm3
mulpd  %xmm4,%xmm3
addpd  %xmm7,%xmm3
mulpd  %xmm6,%xmm4
addpd  %xmm2,%xmm4
movsd  0x48(%rdx),%xmm7
unpcklpd %xmm7,%xmm7
mulpd  %xmm7,%xmm5
addpd  %xmm0,%xmm5
mulpd  %xmm6,%xmm7
addpd  %xmm1,%xmm7
movupd 0x60(%rsi),%xmm13
movupd 0x70(%rsi),%xmm1
movsd  0x60(%rdx),%xmm6
unpcklpd %xmm6,%xmm6
movapd %xmm13,%xmm12
mulpd  %xmm6,%xmm12
movapd %xmm12,%xmm8
addpd  %xmm3,%xmm8
mulpd  %xmm1,%xmm6
movapd %xmm6,%xmm9
addpd  %xmm4,%xmm9
movsd  0x68(%rdx),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm13
movapd %xmm13,%xmm10
addpd  %xmm5,%xmm10
mulpd  %xmm1,%xmm0
movapd %xmm0,%xmm11
addpd  %xmm7,%xmm11
sub    $0xffffffffffffff80,%rsi
sub    $0xffffffffffffff80,%rdx
add    $0x4,%eax
cmp    %r8d,%eax
jl     1130 <kernel_dgemm_nt_4x2_lib4+0x30>
addpd  %xmm7,%xmm0
addpd  %xmm5,%xmm13
addpd  %xmm4,%xmm6
addpd  %xmm3,%xmm12
mov    %edi,%eax
and    $0xfffffffc,%eax
cmp    %edi,%eax
jl     12a1 <kernel_dgemm_nt_4x2_lib4+0x1a1>
jmp    1347 <kernel_dgemm_nt_4x2_lib4+0x247>
xorpd  %xmm12,%xmm12
xor    %eax,%eax
xorpd  %xmm6,%xmm6
xorpd  %xmm13,%xmm13
xorpd  %xmm0,%xmm0
cmp    %edi,%eax
jge    1347 <kernel_dgemm_nt_4x2_lib4+0x247>
sub    %eax,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm0,%xmm4
movapd %xmm13,%xmm7
movapd %xmm6,%xmm9
movapd %xmm12,%xmm8
movupd (%rsi,%rax,1),%xmm2
movupd 0x10(%rsi,%rax,1),%xmm0
movsd  (%rdx,%rax,1),%xmm1
movsd  0x8(%rdx,%rax,1),%xmm3
unpcklpd %xmm1,%xmm1
movapd %xmm2,%xmm5
mulpd  %xmm1,%xmm5
movapd %xmm5,%xmm12
addpd  %xmm8,%xmm12
mulpd  %xmm0,%xmm1
movapd %xmm1,%xmm6
addpd  %xmm9,%xmm6
unpcklpd %xmm3,%xmm3
mulpd  %xmm3,%xmm2
movapd %xmm2,%xmm13
addpd  %xmm7,%xmm13
mulpd  %xmm0,%xmm3
movapd %xmm3,%xmm0
addpd  %xmm4,%xmm0
add    $0x20,%rax
add    $0xffffffff,%edi
jne    12b0 <kernel_dgemm_nt_4x2_lib4+0x1b0>
addpd  %xmm4,%xmm3
addpd  %xmm7,%xmm2
addpd  %xmm9,%xmm1
addpd  %xmm8,%xmm5
movapd %xmm5,%xmm12
movapd %xmm1,%xmm6
movapd %xmm2,%xmm13
movapd %xmm3,%xmm0
movupd %xmm12,(%rcx)
movupd %xmm6,0x10(%rcx)
movupd %xmm13,0x20(%rcx)
movupd %xmm0,0x30(%rcx)
ret

LLVM IR (-O0):
define void @kernel_dgemm_nt_4x2_lib4(i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
store i32 %0, i32* %7
store double* %1, double** %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store i32 %5, i32* %12
%38 = load i32, i32* %7
%39 = icmp sle i32 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %6
br label %448
41: ; preds = %6
store i32 4, i32* %13
store i32 4, i32* %14
store double 0.000000e+00, double* %22
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %26
store double 0.000000e+00, double* %27
store double 0.000000e+00, double* %28
store double 0.000000e+00, double* %29
store i32 0, i32* %15
br label %42
42: ; preds = %252, %41
%43 = load i32, i32* %15
%44 = load i32, i32* %7
%45 = sub nsw i32 %44, 3
%46 = icmp slt i32 %43, %45
br i1 %46, label %47, label %255
47: ; preds = %42
%48 = load double*, double** %8
%49 = getelementptr inbounds double, double* %48, i64 0
%50 = load double, double* %49
store double %50, double* %16
%51 = load double*, double** %8
%52 = getelementptr inbounds double, double* %51, i64 1
%53 = load double, double* %52
store double %53, double* %17
%54 = load double*, double** %8
%55 = getelementptr inbounds double, double* %54, i64 2
%56 = load double, double* %55
store double %56, double* %18
%57 = load double*, double** %8
%58 = getelementptr inbounds double, double* %57, i64 3
%59 = load double, double* %58
store double %59, double* %19
%60 = load double*, double** %9
%61 = getelementptr inbounds double, double* %60, i64 0
%62 = load double, double* %61
store double %62, double* %20
%63 = load double*, double** %9
%64 = getelementptr inbounds double, double* %63, i64 1
%65 = load double, double* %64
store double %65, double* %21
%66 = load double, double* %16
%67 = load double, double* %20
%68 = load double, double* %22
%69 = call double @llvm.fmuladd.f64(double %66, double %67, double %68)
store double %69, double* %22
%70 = load double, double* %17
%71 = load double, double* %20
%72 = load double, double* %24
%73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
store double %73, double* %24
%74 = load double, double* %18
%75 = load double, double* %20
%76 = load double, double* %26
%77 = call double @llvm.fmuladd.f64(double %74, double %75, double %76)
store double %77, double* %26
%78 = load double, double* %19
%79 = load double, double* %20
%80 = load double, double* %28
%81 = call double @llvm.fmuladd.f64(double %78, double %79, double %80)
store double %81, double* %28
%82 = load double, double* %16
%83 = load double, double* %21
%84 = load double, double* %23
%85 = call double @llvm.fmuladd.f64(double %82, double %83, double %84)
store double %85, double* %23
%86 = load double, double* %17
%87 = load double, double* %21
%88 = load double, double* %25
%89 = call double @llvm.fmuladd.f64(double %86, double %87, double %88)
store double %89, double* %25
%90 = load double, double* %18
%91 = load double, double* %21
%92 = load double, double* %27
%93 = call double @llvm.fmuladd.f64(double %90, double %91, double %92)
store double %93, double* %27
%94 = load double, double* %19
%95 = load double, double* %21
%96 = load double, double* %29
%97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
store double %97, double* %29
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i64 4
%100 = load double, double* %99
store double %100, double* %16
%101 = load double*, double** %8
%102 = getelementptr inbounds double, double* %101, i64 5
%103 = load double, double* %102
store double %103, double* %17
%104 = load double*, double** %8
%105 = getelementptr inbounds double, double* %104, i64 6
%106 = load double, double* %105
store double %106, double* %18
%107 = load double*, double** %8
%108 = getelementptr inbounds double, double* %107, i64 7
%109 = load double, double* %108
store double %109, double* %19
%110 = load double*, double** %9
%111 = getelementptr inbounds double, double* %110, i64 4
%112 = load double, double* %111
store double %112, double* %20
%113 = load double*, double** %9
%114 = getelementptr inbounds double, double* %113, i64 5
%115 = load double, double* %114
store double %115, double* %21
%116 = load double, double* %16
%117 = load double, double* %20
%118 = load double, double* %22
%119 = call double @llvm.fmuladd.f64(double %116, double %117, double %118)
store double %119, double* %22
%120 = load double, double* %17
%121 = load double, double* %20
%122 = load double, double* %24
%123 = call double @llvm.fmuladd.f64(double %120, double %121, double %122)
store double %123, double* %24
%124 = load double, double* %18
%125 = load double, double* %20
%126 = load double, double* %26
%127 = call double @llvm.fmuladd.f64(double %124, double %125, double %126)
store double %127, double* %26
%128 = load double, double* %19
%129 = load double, double* %20
%130 = load double, double* %28
%131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
store double %131, double* %28
%132 = load double, double* %16
%133 = load double, double* %21
%134 = load double, double* %23
%135 = call double @llvm.fmuladd.f64(double %132, double %133, double %134)
store double %135, double* %23
%136 = load double, double* %17
%137 = load double, double* %21
%138 = load double, double* %25
%139 = call double @llvm.fmuladd.f64(double %136, double %137, double %138)
store double %139, double* %25
%140 = load double, double* %18
%141 = load double, double* %21
%142 = load double, double* %27
%143 = call double @llvm.fmuladd.f64(double %140, double %141, double %142)
store double %143, double* %27
%144 = load double, double* %19
%145 = load double, double* %21
%146 = load double, double* %29
%147 = call double @llvm.fmuladd.f64(double %144, double %145, double %146)
store double %147, double* %29
%148 = load double*, double** %8
%149 = getelementptr inbounds double, double* %148, i64 8
%150 = load double, double* %149
store double %150, double* %16
%151 = load double*, double** %8
%152 = getelementptr inbounds double, double* %151, i64 9
%153 = load double, double* %152
store double %153, double* %17
%154 = load double*, double** %8
%155 = getelementptr inbounds double, double* %154, i64 10
%156 = load double, double* %155
store double %156, double* %18
%157 = load double*, double** %8
%158 = getelementptr inbounds double, double* %157, i64 11
%159 = load double, double* %158
store double %159, double* %19
%160 = load double*, double** %9
%161 = getelementptr inbounds double, double* %160, i64 8
%162 = load double, double* %161
store double %162, double* %20
%163 = load double*, double** %9
%164 = getelementptr inbounds double, double* %163, i64 9
%165 = load double, double* %164
store double %165, double* %21
%166 = load double, double* %16
%167 = load double, double* %20
%168 = load double, double* %22
%169 = call double @llvm.fmuladd.f64(double %166, double %167, double %168)
store double %169, double* %22
%170 = load double, double* %17
%171 = load double, double* %20
%172 = load double, double* %24
%173 = call double @llvm.fmuladd.f64(double %170, double %171, double %172)
store double %173, double* %24
%174 = load double, double* %18
%175 = load double, double* %20
%176 = load double, double* %26
%177 = call double @llvm.fmuladd.f64(double %174, double %175, double %176)
store double %177, double* %26
%178 = load double, double* %19
%179 = load double, double* %20
%180 = load double, double* %28
%181 = call double @llvm.fmuladd.f64(double %178, double %179, double %180)
store double %181, double* %28
%182 = load double, double* %16
%183 = load double, double* %21
%184 = load double, double* %23
%185 = call double @llvm.fmuladd.f64(double %182, double %183, double %184)
store double %185, double* %23
%186 = load double, double* %17
%187 = load double, double* %21
%188 = load double, double* %25
%189 = call double @llvm.fmuladd.f64(double %186, double %187, double %188)
store double %189, double* %25
%190 = load double, double* %18
%191 = load double, double* %21
%192 = load double, double* %27
%193 = call double @llvm.fmuladd.f64(double %190, double %191, double %192)
store double %193, double* %27
%194 = load double, double* %19
%195 = load double, double* %21
%196 = load double, double* %29
%197 = call double @llvm.fmuladd.f64(double %194, double %195, double %196)
store double %197, double* %29
%198 = load double*, double** %8
%199 = getelementptr inbounds double, double* %198, i64 12
%200 = load double, double* %199
store double %200, double* %16
%201 = load double*, double** %8
%202 = getelementptr inbounds double, double* %201, i64 13
%203 = load double, double* %202
store double %203, double* %17
%204 = load double*, double** %8
%205 = getelementptr inbounds double, double* %204, i64 14
%206 = load double, double* %205
store double %206, double* %18
%207 = load double*, double** %8
%208 = getelementptr inbounds double, double* %207, i64 15
%209 = load double, double* %208
store double %209, double* %19
%210 = load double*, double** %9
%211 = getelementptr inbounds double, double* %210, i64 12
%212 = load double, double* %211
store double %212, double* %20
%213 = load double*, double** %9
%214 = getelementptr inbounds double, double* %213, i64 13
%215 = load double, double* %214
store double %215, double* %21
%216 = load double, double* %16
%217 = load double, double* %20
%218 = load double, double* %22
%219 = call double @llvm.fmuladd.f64(double %216, double %217, double %218)
store double %219, double* %22
%220 = load double, double* %17
%221 = load double, double* %20
%222 = load double, double* %24
%223 = call double @llvm.fmuladd.f64(double %220, double %221, double %222)
store double %223, double* %24
%224 = load double, double* %18
%225 = load double, double* %20
%226 = load double, double* %26
%227 = call double @llvm.fmuladd.f64(double %224, double %225, double %226)
store double %227, double* %26
%228 = load double, double* %19
%229 = load double, double* %20
%230 = load double, double* %28
%231 = call double @llvm.fmuladd.f64(double %228, double %229, double %230)
store double %231, double* %28
%232 = load double, double* %16
%233 = load double, double* %21
%234 = load double, double* %23
%235 = call double @llvm.fmuladd.f64(double %232, double %233, double %234)
store double %235, double* %23
%236 = load double, double* %17
%237 = load double, double* %21
%238 = load double, double* %25
%239 = call double @llvm.fmuladd.f64(double %236, double %237, double %238)
store double %239, double* %25
%240 = load double, double* %18
%241 = load double, double* %21
%242 = load double, double* %27
%243 = call double @llvm.fmuladd.f64(double %240, double %241, double %242)
store double %243, double* %27
%244 = load double, double* %19
%245 = load double, double* %21
%246 = load double, double* %29
%247 = call double @llvm.fmuladd.f64(double %244, double %245, double %246)
store double %247, double* %29
%248 = load double*, double** %8
%249 = getelementptr inbounds double, double* %248, i64 16
store double* %249, double** %8
%250 = load double*, double** %9
%251 = getelementptr inbounds double, double* %250, i64 16
store double* %251, double** %9
br label %252
252: ; preds = %47
%253 = load i32, i32* %15
%254 = add nsw i32 %253, 4
store i32 %254, i32* %15
br label %42
255: ; preds = %42
br label %256
256: ; preds = %315, %255
%257 = load i32, i32* %15
%258 = load i32, i32* %7
%259 = icmp slt i32 %257, %258
br i1 %259, label %260, label %318
260: ; preds = %256
%261 = load double*, double** %8
%262 = getelementptr inbounds double, double* %261, i64 0
%263 = load double, double* %262
store double %263, double* %16
%264 = load double*, double** %8
%265 = getelementptr inbounds double, double* %264, i64 1
%266 = load double, double* %265
store double %266, double* %17
%267 = load double*, double** %8
%268 = getelementptr inbounds double, double* %267, i64 2
%269 = load double, double* %268
store double %269, double* %18
%270 = load double*, double** %8
%271 = getelementptr inbounds double, double* %270, i64 3
%272 = load double, double* %271
store double %272, double* %19
%273 = load double*, double** %9
%274 = getelementptr inbounds double, double* %273, i64 0
%275 = load double, double* %274
store double %275, double* %20
%276 = load double*, double** %9
%277 = getelementptr inbounds double, double* %276, i64 1
%278 = load double, double* %277
store double %278, double* %21
%279 = load double, double* %16
%280 = load double, double* %20
%281 = load double, double* %22
%282 = call double @llvm.fmuladd.f64(double %279, double %280, double %281)
store double %282, double* %22
%283 = load double, double* %17
%284 = load double, double* %20
%285 = load double, double* %24
%286 = call double @llvm.fmuladd.f64(double %283, double %284, double %285)
store double %286, double* %24
%287 = load double, double* %18
%288 = load double, double* %20
%289 = load double, double* %26
%290 = call double @llvm.fmuladd.f64(double %287, double %288, double %289)
store double %290, double* %26
%291 = load double, double* %19
%292 = load double, double* %20
%293 = load double, double* %28
%294 = call double @llvm.fmuladd.f64(double %291, double %292, double %293)
store double %294, double* %28
%295 = load double, double* %16
%296 = load double, double* %21
%297 = load double, double* %23
%298 = call double @llvm.fmuladd.f64(double %295, double %296, double %297)
store double %298, double* %23
%299 = load double, double* %17
%300 = load double, double* %21
%301 = load double, double* %25
%302 = call double @llvm.fmuladd.f64(double %299, double %300, double %301)
store double %302, double* %25
%303 = load double, double* %18
%304 = load double, double* %21
%305 = load double, double* %27
%306 = call double @llvm.fmuladd.f64(double %303, double %304, double %305)
store double %306, double* %27
%307 = load double, double* %19
%308 = load double, double* %21
%309 = load double, double* %29
%310 = call double @llvm.fmuladd.f64(double %307, double %308, double %309)
store double %310, double* %29
%311 = load double*, double** %8
%312 = getelementptr inbounds double, double* %311, i64 4
store double* %312, double** %8
%313 = load double*, double** %9
%314 = getelementptr inbounds double, double* %313, i64 4
store double* %314, double** %9
br label %315
315: ; preds = %260
%316 = load i32, i32* %15
%317 = add nsw i32 %316, 1
store i32 %317, i32* %15
br label %256
318: ; preds = %256
%319 = load i32, i32* %12
%320 = icmp eq i32 %319, 0
br i1 %320, label %321, label %346
321: ; preds = %318
%322 = load double, double* %22
%323 = load double*, double** %10
%324 = getelementptr inbounds double, double* %323, i64 0
store double %322, double* %324
%325 = load double, double* %24
%326 = load double*, double** %10
%327 = getelementptr inbounds double, double* %326, i64 1
store double %325, double* %327
%328 = load double, double* %26
%329 = load double*, double** %10
%330 = getelementptr inbounds double, double* %329, i64 2
store double %328, double* %330
%331 = load double, double* %28
%332 = load double*, double** %10
%333 = getelementptr inbounds double, double* %332, i64 3
store double %331, double* %333
%334 = load double, double* %23
%335 = load double*, double** %10
%336 = getelementptr inbounds double, double* %335, i64 4
store double %334, double* %336
%337 = load double, double* %25
%338 = load double*, double** %10
%339 = getelementptr inbounds double, double* %338, i64 5
store double %337, double* %339
%340 = load double, double* %27
%341 = load double*, double** %10
%342 = getelementptr inbounds double, double* %341, i64 6
store double %340, double* %342
%343 = load double, double* %29
%344 = load double*, double** %10
%345 = getelementptr inbounds double, double* %344, i64 7
store double %343, double* %345
br label %448
346: ; preds = %318
%347 = load double*, double** %11
%348 = getelementptr inbounds double, double* %347, i64 0
%349 = load double, double* %348
store double %349, double* %30
%350 = load double*, double** %11
%351 = getelementptr inbounds double, double* %350, i64 1
%352 = load double, double* %351
store double %352, double* %32
%353 = load double*, double** %11
%354 = getelementptr inbounds double, double* %353, i64 2
%355 = load double, double* %354
store double %355, double* %34
%356 = load double*, double** %11
%357 = getelementptr inbounds double, double* %356, i64 3
%358 = load double, double* %357
store double %358, double* %36
%359 = load double*, double** %11
%360 = getelementptr inbounds double, double* %359, i64 4
%361 = load double, double* %360
store double %361, double* %31
%362 = load double*, double** %11
%363 = getelementptr inbounds double, double* %362, i64 5
%364 = load double, double* %363
store double %364, double* %33
%365 = load double*, double** %11
%366 = getelementptr inbounds double, double* %365, i64 6
%367 = load double, double* %366
store double %367, double* %35
%368 = load double*, double** %11
%369 = getelementptr inbounds double, double* %368, i64 7
%370 = load double, double* %369
store double %370, double* %37
%371 = load i32, i32* %12
%372 = icmp eq i32 %371, 1
br i1 %372, label %373, label %398
373: ; preds = %346
%374 = load double, double* %22
%375 = load double, double* %30
%376 = fadd double %375, %374
store double %376, double* %30
%377 = load double, double* %24
%378 = load double, double* %32
%379 = fadd double %378, %377
store double %379, double* %32
%380 = load double, double* %26
%381 = load double, double* %34
%382 = fadd double %381, %380
store double %382, double* %34
%383 = load double, double* %28
%384 = load double, double* %36
%385 = fadd double %384, %383
store double %385, double* %36
%386 = load double, double* %23
%387 = load double, double* %31
%388 = fadd double %387, %386
store double %388, double* %31
%389 = load double, double* %25
%390 = load double, double* %33
%391 = fadd double %390, %389
store double %391, double* %33
%392 = load double, double* %27
%393 = load double, double* %35
%394 = fadd double %393, %392
store double %394, double* %35
%395 = load double, double* %29
%396 = load double, double* %37
%397 = fadd double %396, %395
store double %397, double* %37
br label %423
398: ; preds = %346
%399 = load double, double* %22
%400 = load double, double* %30
%401 = fsub double %400, %399
store double %401, double* %30
%402 = load double, double* %24
%403 = load double, double* %32
%404 = fsub double %403, %402
store double %404, double* %32
%405 = load double, double* %26
%406 = load double, double* %34
%407 = fsub double %406, %405
store double %407, double* %34
%408 = load double, double* %28
%409 = load double, double* %36
%410 = fsub double %409, %408
store double %410, double* %36
%411 = load double, double* %23
%412 = load double, double* %31
%413 = fsub double %412, %411
store double %413, double* %31
%414 = load double, double* %25
%415 = load double, double* %33
%416 = fsub double %415, %414
store double %416, double* %33
%417 = load double, double* %27
%418 = load double, double* %35
%419 = fsub double %418, %417
store double %419, double* %35
%420 = load double, double* %29
%421 = load double, double* %37
%422 = fsub double %421, %420
store double %422, double* %37
br label %423
423: ; preds = %398, %373
%424 = load double, double* %22
%425 = load double*, double** %10
%426 = getelementptr inbounds double, double* %425, i64 0
store double %424, double* %426
%427 = load double, double* %24
%428 = load double*, double** %10
%429 = getelementptr inbounds double, double* %428, i64 1
store double %427, double* %429
%430 = load double, double* %26
%431 = load double*, double** %10
%432 = getelementptr inbounds double, double* %431, i64 2
store double %430, double* %432
%433 = load double, double* %28
%434 = load double*, double** %10
%435 = getelementptr inbounds double, double* %434, i64 3
store double %433, double* %435
%436 = load double, double* %23
%437 = load double*, double** %10
%438 = getelementptr inbounds double, double* %437, i64 4
store double %436, double* %438
%439 = load double, double* %25
%440 = load double*, double** %10
%441 = getelementptr inbounds double, double* %440, i64 5
store double %439, double* %441
%442 = load double, double* %27
%443 = load double*, double** %10
%444 = getelementptr inbounds double, double* %443, i64 6
store double %442, double* %444
%445 = load double, double* %29
%446 = load double*, double** %10
%447 = getelementptr inbounds double, double* %446, i64 7
store double %445, double* %447
br label %448
448: ; preds = %40, %423, %321
ret void
}

LLVM IR (-O2):
define void @kernel_dgemm_nt_4x2_lib4(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3, double* nocapture readnone %4, i32 %5) {
%7 = icmp slt i32 %0, 1
br i1 %7, label %165, label %8
8: ; preds = %6
%9 = add nsw i32 %0, -3
%10 = icmp ugt i32 %0, 3
br i1 %10, label %38, label %29
11: ; preds = %38
%12 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %59, <2 x double> %45)
%13 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %77, <2 x double> %12)
%14 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %95, <2 x double> %13)
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %113, <2 x double> %14)
%16 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %59, <2 x double> %44)
%17 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %77, <2 x double> %16)
%18 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %95, <2 x double> %17)
%19 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %113, <2 x double> %18)
%20 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %55, <2 x double> %43)
%21 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %73, <2 x double> %20)
%22 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %91, <2 x double> %21)
%23 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %109, <2 x double> %22)
%24 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %55, <2 x double> %42)
%25 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %73, <2 x double> %24)
%26 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %91, <2 x double> %25)
%27 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %109, <2 x double> %26)
%28 = and i32 %0, -4
br label %29
29: ; preds = %11, %8
%30 = phi double* [ %2, %8 ], [ %117, %11 ]
%31 = phi double* [ %1, %8 ], [ %116, %11 ]
%32 = phi i32 [ 0, %8 ], [ %28, %11 ]
%33 = phi <2 x double> [ zeroinitializer, %8 ], [ %27, %11 ]
%34 = phi <2 x double> [ zeroinitializer, %8 ], [ %23, %11 ]
%35 = phi <2 x double> [ zeroinitializer, %8 ], [ %19, %11 ]
%36 = phi <2 x double> [ zeroinitializer, %8 ], [ %15, %11 ]
%37 = icmp slt i32 %32, %0
br i1 %37, label %120, label %153
38: ; preds = %8, %38
%39 = phi i32 [ %118, %38 ], [ 0, %8 ]
%40 = phi double* [ %116, %38 ], [ %1, %8 ]
%41 = phi double* [ %117, %38 ], [ %2, %8 ]
%42 = phi <2 x double> [ %110, %38 ], [ zeroinitializer, %8 ]
%43 = phi <2 x double> [ %111, %38 ], [ zeroinitializer, %8 ]
%44 = phi <2 x double> [ %114, %38 ], [ zeroinitializer, %8 ]
%45 = phi <2 x double> [ %115, %38 ], [ zeroinitializer, %8 ]
%46 = bitcast double* %40 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = getelementptr inbounds double, double* %40, i64 2
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = load double, double* %41
%52 = getelementptr inbounds double, double* %41, i64 1
%53 = load double, double* %52
%54 = insertelement <2 x double> poison, double %51, i64 0
%55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
%56 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %55, <2 x double> %42)
%57 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %55, <2 x double> %43)
%58 = insertelement <2 x double> poison, double %53, i64 0
%59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
%60 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %59, <2 x double> %44)
%61 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %59, <2 x double> %45)
%62 = getelementptr inbounds double, double* %40, i64 4
%63 = bitcast double* %62 to <2 x double>*
%64 = load <2 x double>, <2 x double>* %63
%65 = getelementptr inbounds double, double* %40, i64 6
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = getelementptr inbounds double, double* %41, i64 4
%69 = load double, double* %68
%70 = getelementptr inbounds double, double* %41, i64 5
%71 = load double, double* %70
%72 = insertelement <2 x double> poison, double %69, i64 0
%73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
%74 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %73, <2 x double> %56)
%75 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %73, <2 x double> %57)
%76 = insertelement <2 x double> poison, double %71, i64 0
%77 = shufflevector <2 x double> %76, <2 x double> poison, <2 x i32> zeroinitializer
%78 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %77, <2 x double> %60)
%79 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %77, <2 x double> %61)
%80 = getelementptr inbounds double, double* %40, i64 8
%81 = bitcast double* %80 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = getelementptr inbounds double, double* %40, i64 10
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %41, i64 8
%87 = load double, double* %86
%88 = getelementptr inbounds double, double* %41, i64 9
%89 = load double, double* %88
%90 = insertelement <2 x double> poison, double %87, i64 0
%91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
%92 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %91, <2 x double> %74)
%93 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %91, <2 x double> %75)
%94 = insertelement <2 x double> poison, double %89, i64 0
%95 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> zeroinitializer
%96 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %95, <2 x double> %78)
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %95, <2 x double> %79)
%98 = getelementptr inbounds double, double* %40, i64 12
%99 = bitcast double* %98 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = getelementptr inbounds double, double* %40, i64 14
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = getelementptr inbounds double, double* %41, i64 12
%105 = load double, double* %104
%106 = getelementptr inbounds double, double* %41, i64 13
%107 = load double, double* %106
%108 = insertelement <2 x double> poison, double %105, i64 0
%109 = shufflevector <2 x double> %108, <2 x double> poison, <2 x i32> zeroinitializer
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %109, <2 x double> %92)
%111 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %109, <2 x double> %93)
%112 = insertelement <2 x double> poison, double %107, i64 0
%113 = shufflevector <2 x double> %112, <2 x double> poison, <2 x i32> zeroinitializer
%114 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %113, <2 x double> %96)
%115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %113, <2 x double> %97)
%116 = getelementptr inbounds double, double* %40, i64 16
%117 = getelementptr inbounds double, double* %41, i64 16
%118 = add nuw nsw i32 %39, 4
%119 = icmp slt i32 %118, %9
br i1 %119, label %38, label %11
120: ; preds = %29, %120
%121 = phi i32 [ %146, %120 ], [ %32, %29 ]
%122 = phi double* [ %144, %120 ], [ %31, %29 ]
%123 = phi double* [ %145, %120 ], [ %30, %29 ]
%124 = phi <2 x double> [ %138, %120 ], [ %33, %29 ]
%125 = phi <2 x double> [ %139, %120 ], [ %34, %29 ]
%126 = phi <2 x double> [ %142, %120 ], [ %35, %29 ]
%127 = phi <2 x double> [ %143, %120 ], [ %36, %29 ]
%128 = bitcast double* %122 to <2 x double>*
%129 = load <2 x double>, <2 x double>* %128
%130 = getelementptr inbounds double, double* %122, i64 2
%131 = bitcast double* %130 to <2 x double>*
%132 = load <2 x double>, <2 x double>* %131
%133 = load double, double* %123
%134 = getelementptr inbounds double, double* %123, i64 1
%135 = load double, double* %134
%136 = insertelement <2 x double> poison, double %133, i64 0
%137 = shufflevector <2 x double> %136, <2 x double> poison, <2 x i32> zeroinitializer
%138 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %129, <2 x double> %137, <2 x double> %124)
%139 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %137, <2 x double> %125)
%140 = insertelement <2 x double> poison, double %135, i64 0
%141 = shufflevector <2 x double> %140, <2 x double> poison, <2 x i32> zeroinitializer
%142 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %129, <2 x double> %141, <2 x double> %126)
%143 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %141, <2 x double> %127)
%144 = getelementptr inbounds double, double* %122, i64 4
%145 = getelementptr inbounds double, double* %123, i64 4
%146 = add nuw nsw i32 %121, 1
%147 = icmp eq i32 %146, %0
br i1 %147, label %148, label %120
148: ; preds = %120
%149 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %141, <2 x double> %127)
%150 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %129, <2 x double> %141, <2 x double> %126)
%151 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %137, <2 x double> %125)
%152 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %129, <2 x double> %137, <2 x double> %124)
br label %153
153: ; preds = %148, %29
%154 = phi <2 x double> [ %33, %29 ], [ %152, %148 ]
%155 = phi <2 x double> [ %34, %29 ], [ %151, %148 ]
%156 = phi <2 x double> [ %35, %29 ], [ %150, %148 ]
%157 = phi <2 x double> [ %36, %29 ], [ %149, %148 ]
%158 = bitcast double* %3 to <2 x double>*
store <2 x double> %154, <2 x double>* %158
%159 = getelementptr inbounds double, double* %3, i64 2
%160 = bitcast double* %159 to <2 x double>*
store <2 x double> %155, <2 x double>* %160
%161 = getelementptr inbounds double, double* %3, i64 4
%162 = bitcast double* %161 to <2 x double>*
store <2 x double> %156, <2 x double>* %162
%163 = getelementptr inbounds double, double* %3, i64 6
%164 = bitcast double* %163 to <2 x double>*
store <2 x double> %157, <2 x double>* %164
br label %165
165: ; preds = %153, %6
ret void
}