void kernel_dgemm_nt_2x4_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, b_0, b_1, b_2, b_3, c_00 = 0, c_01 = 0, c_02 = 0, c_03 = 0,
                                       c_10 = 0, c_11 = 0, c_12 = 0, c_13 = 0;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    b_2 = B[2 + lda * 0];
    b_3 = B[3 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_02 += a_0 * b_2;
    c_12 += a_1 * b_2;
    c_03 += a_0 * b_3;
    c_13 += a_1 * b_3;
    a_0 = A[0 + lda * 1];
    a_1 = A[1 + lda * 1];
    b_0 = B[0 + lda * 1];
    b_1 = B[1 + lda * 1];
    b_2 = B[2 + lda * 1];
    b_3 = B[3 + lda * 1];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_02 += a_0 * b_2;
    c_12 += a_1 * b_2;
    c_03 += a_0 * b_3;
    c_13 += a_1 * b_3;
    a_0 = A[0 + lda * 2];
    a_1 = A[1 + lda * 2];
    b_0 = B[0 + lda * 2];
    b_1 = B[1 + lda * 2];
    b_2 = B[2 + lda * 2];
    b_3 = B[3 + lda * 2];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_02 += a_0 * b_2;
    c_12 += a_1 * b_2;
    c_03 += a_0 * b_3;
    c_13 += a_1 * b_3;
    a_0 = A[0 + lda * 3];
    a_1 = A[1 + lda * 3];
    b_0 = B[0 + lda * 3];
    b_1 = B[1 + lda * 3];
    b_2 = B[2 + lda * 3];
    b_3 = B[3 + lda * 3];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_02 += a_0 * b_2;
    c_12 += a_1 * b_2;
    c_03 += a_0 * b_3;
    c_13 += a_1 * b_3;
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    b_2 = B[2 + lda * 0];
    b_3 = B[3 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    c_02 += a_0 * b_2;
    c_12 += a_1 * b_2;
    c_03 += a_0 * b_3;
    c_13 += a_1 * b_3;
    A += 4;
    B += 4;
  }
  double d_00, d_01, d_02, d_03, d_10, d_11, d_12, d_13;
  if (alg == 0) {
    C[0 + ldc * 0] = c_00;
    C[1 + ldc * 0] = c_10;
    C[0 + ldc * 1] = c_01;
    C[1 + ldc * 1] = c_11;
    C[0 + ldc * 2] = c_02;
    C[1 + ldc * 2] = c_12;
    C[0 + ldc * 3] = c_03;
    C[1 + ldc * 3] = c_13;
  } else {
    d_00 = D[0 + ldc * 0];
    d_10 = D[1 + ldc * 0];
    d_01 = D[0 + ldc * 1];
    d_11 = D[1 + ldc * 1];
    d_02 = D[0 + ldc * 2];
    d_12 = D[1 + ldc * 2];
    d_03 = D[0 + ldc * 3];
    d_13 = D[1 + ldc * 3];
    if (alg == 1) {
      d_00 += c_00;
      d_10 += c_10;
      d_01 += c_01;
      d_11 += c_11;
      d_02 += c_02;
      d_12 += c_12;
      d_03 += c_03;
      d_13 += c_13;
    } else {
      d_00 -= c_00;
      d_10 -= c_10;
      d_01 -= c_01;
      d_11 -= c_11;
      d_02 -= c_02;
      d_12 -= c_12;
      d_03 -= c_03;
      d_13 -= c_13;
    }
    C[0 + ldc * 0] = c_00;
    C[1 + ldc * 0] = c_10;
    C[0 + ldc * 1] = c_01;
    C[1 + ldc * 1] = c_11;
    C[0 + ldc * 2] = c_02;
    C[1 + ldc * 2] = c_12;
    C[0 + ldc * 3] = c_03;
    C[1 + ldc * 3] = c_13;
  }
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_2x4_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_2x4_lib4+0x2e>
jmp    1bc9 <kernel_dgemm_nt_2x4_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_2x4_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    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%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  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%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    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%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    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%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  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%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    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%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  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%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_2x4_lib4+0x92>
jmp    1718 <kernel_dgemm_nt_2x4_lib4+0x618>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    189a <kernel_dgemm_nt_2x4_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    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%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  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%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_2x4_lib4+0x618>
cmpl   $0x0,-0x2c(%rbp)
jne    1927 <kernel_dgemm_nt_2x4_lib4+0x827>
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x68(%rax)
jmp    1bc9 <kernel_dgemm_nt_2x4_lib4+0xac9>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xd0(%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,-0xd8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
cmpl   $0x1,-0x2c(%rbp)
jne    1a74 <kernel_dgemm_nt_2x4_lib4+0x974>
movsd  -0x70(%rbp),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1b4b <kernel_dgemm_nt_2x4_lib4+0xa4b>
movsd  -0x70(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x78(%rbp),%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%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  -0x90(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x68(%rax)
add    $0x68,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nt_2x4_lib4>:
test   %edi,%edi
jle    13a1 <kernel_dgemm_nt_2x4_lib4+0x2a1>
cmp    $0x4,%edi
jb     12b9 <kernel_dgemm_nt_2x4_lib4+0x1b9>
lea    -0x3(%rdi),%r8d
xorpd  %xmm9,%xmm9
xor    %eax,%eax
xorpd  %xmm10,%xmm10
xorpd  %xmm11,%xmm11
xorpd  %xmm4,%xmm4
nopw   0x0(%rax,%rax,1)
movupd (%rsi),%xmm0
movupd 0x20(%rsi),%xmm13
movupd 0x40(%rsi),%xmm12
movupd 0x60(%rsi),%xmm8
movsd  (%rdx),%xmm6
movsd  0x8(%rdx),%xmm5
movsd  0x10(%rdx),%xmm3
movsd  0x18(%rdx),%xmm2
unpcklpd %xmm6,%xmm6
mulpd  %xmm0,%xmm6
addpd  %xmm9,%xmm6
unpcklpd %xmm5,%xmm5
mulpd  %xmm0,%xmm5
addpd  %xmm10,%xmm5
unpcklpd %xmm3,%xmm3
mulpd  %xmm0,%xmm3
addpd  %xmm11,%xmm3
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm4,%xmm2
movsd  0x20(%rdx),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm13,%xmm4
addpd  %xmm6,%xmm4
movsd  0x28(%rdx),%xmm7
unpcklpd %xmm7,%xmm7
mulpd  %xmm13,%xmm7
addpd  %xmm5,%xmm7
movsd  0x30(%rdx),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm13,%xmm0
addpd  %xmm3,%xmm0
movsd  0x38(%rdx),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm13,%xmm1
addpd  %xmm2,%xmm1
movsd  0x40(%rdx),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm12,%xmm5
addpd  %xmm4,%xmm5
movsd  0x48(%rdx),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm12,%xmm6
addpd  %xmm7,%xmm6
movsd  0x50(%rdx),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm12,%xmm3
addpd  %xmm0,%xmm3
movsd  0x58(%rdx),%xmm7
unpcklpd %xmm7,%xmm7
mulpd  %xmm12,%xmm7
addpd  %xmm1,%xmm7
movsd  0x60(%rdx),%xmm13
unpcklpd %xmm13,%xmm13
mulpd  %xmm8,%xmm13
movapd %xmm13,%xmm9
addpd  %xmm5,%xmm9
movsd  0x68(%rdx),%xmm14
unpcklpd %xmm14,%xmm14
mulpd  %xmm8,%xmm14
movapd %xmm14,%xmm10
addpd  %xmm6,%xmm10
movsd  0x70(%rdx),%xmm15
unpcklpd %xmm15,%xmm15
mulpd  %xmm8,%xmm15
movapd %xmm15,%xmm11
addpd  %xmm3,%xmm11
movsd  0x78(%rdx),%xmm12
unpcklpd %xmm12,%xmm12
mulpd  %xmm8,%xmm12
movapd %xmm12,%xmm4
addpd  %xmm7,%xmm4
sub    $0xffffffffffffff80,%rsi
sub    $0xffffffffffffff80,%rdx
add    $0x4,%eax
cmp    %r8d,%eax
jl     1130 <kernel_dgemm_nt_2x4_lib4+0x30>
addpd  %xmm7,%xmm12
addpd  %xmm3,%xmm15
addpd  %xmm6,%xmm14
addpd  %xmm5,%xmm13
mov    %edi,%eax
and    $0xfffffffc,%eax
cmp    %edi,%eax
jl     12d7 <kernel_dgemm_nt_2x4_lib4+0x1d7>
jmp    138a <kernel_dgemm_nt_2x4_lib4+0x28a>
xorpd  %xmm13,%xmm13
xor    %eax,%eax
xorpd  %xmm14,%xmm14
xorpd  %xmm15,%xmm15
xorpd  %xmm12,%xmm12
cmp    %edi,%eax
jge    138a <kernel_dgemm_nt_2x4_lib4+0x28a>
sub    %eax,%edi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movapd %xmm12,%xmm7
movapd %xmm15,%xmm6
movapd %xmm14,%xmm5
movapd %xmm13,%xmm8
movupd (%rsi,%rax,1),%xmm3
movsd  (%rdx,%rax,1),%xmm0
movsd  0x8(%rdx,%rax,1),%xmm1
movsd  0x10(%rdx,%rax,1),%xmm2
movsd  0x18(%rdx,%rax,1),%xmm4
unpcklpd %xmm0,%xmm0
mulpd  %xmm3,%xmm0
movapd %xmm0,%xmm13
addpd  %xmm8,%xmm13
unpcklpd %xmm1,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm14
addpd  %xmm5,%xmm14
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
movapd %xmm2,%xmm15
addpd  %xmm6,%xmm15
unpcklpd %xmm4,%xmm4
mulpd  %xmm3,%xmm4
movapd %xmm4,%xmm12
addpd  %xmm7,%xmm12
add    $0x20,%rax
add    $0xffffffff,%edi
jne    12e0 <kernel_dgemm_nt_2x4_lib4+0x1e0>
addpd  %xmm7,%xmm4
addpd  %xmm6,%xmm2
addpd  %xmm5,%xmm1
addpd  %xmm8,%xmm0
movapd %xmm0,%xmm13
movapd %xmm1,%xmm14
movapd %xmm2,%xmm15
movapd %xmm4,%xmm12
movupd %xmm13,(%rcx)
movupd %xmm14,0x20(%rcx)
movupd %xmm15,0x40(%rcx)
movupd %xmm12,0x60(%rcx)
ret

LLVM IR (-O0):
define void @kernel_dgemm_nt_2x4_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** %9
%55 = getelementptr inbounds double, double* %54, i64 0
%56 = load double, double* %55
store double %56, double* %18
%57 = load double*, double** %9
%58 = getelementptr inbounds double, double* %57, i64 1
%59 = load double, double* %58
store double %59, double* %19
%60 = load double*, double** %9
%61 = getelementptr inbounds double, double* %60, i64 2
%62 = load double, double* %61
store double %62, double* %20
%63 = load double*, double** %9
%64 = getelementptr inbounds double, double* %63, i64 3
%65 = load double, double* %64
store double %65, double* %21
%66 = load double, double* %16
%67 = load double, double* %18
%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* %18
%72 = load double, double* %26
%73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
store double %73, double* %26
%74 = load double, double* %16
%75 = load double, double* %19
%76 = load double, double* %23
%77 = call double @llvm.fmuladd.f64(double %74, double %75, double %76)
store double %77, double* %23
%78 = load double, double* %17
%79 = load double, double* %19
%80 = load double, double* %27
%81 = call double @llvm.fmuladd.f64(double %78, double %79, double %80)
store double %81, double* %27
%82 = load double, double* %16
%83 = load double, double* %20
%84 = load double, double* %24
%85 = call double @llvm.fmuladd.f64(double %82, double %83, double %84)
store double %85, double* %24
%86 = load double, double* %17
%87 = load double, double* %20
%88 = load double, double* %28
%89 = call double @llvm.fmuladd.f64(double %86, double %87, double %88)
store double %89, double* %28
%90 = load double, double* %16
%91 = load double, double* %21
%92 = load double, double* %25
%93 = call double @llvm.fmuladd.f64(double %90, double %91, double %92)
store double %93, double* %25
%94 = load double, double* %17
%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** %9
%105 = getelementptr inbounds double, double* %104, i64 4
%106 = load double, double* %105
store double %106, double* %18
%107 = load double*, double** %9
%108 = getelementptr inbounds double, double* %107, i64 5
%109 = load double, double* %108
store double %109, double* %19
%110 = load double*, double** %9
%111 = getelementptr inbounds double, double* %110, i64 6
%112 = load double, double* %111
store double %112, double* %20
%113 = load double*, double** %9
%114 = getelementptr inbounds double, double* %113, i64 7
%115 = load double, double* %114
store double %115, double* %21
%116 = load double, double* %16
%117 = load double, double* %18
%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* %18
%122 = load double, double* %26
%123 = call double @llvm.fmuladd.f64(double %120, double %121, double %122)
store double %123, double* %26
%124 = load double, double* %16
%125 = load double, double* %19
%126 = load double, double* %23
%127 = call double @llvm.fmuladd.f64(double %124, double %125, double %126)
store double %127, double* %23
%128 = load double, double* %17
%129 = load double, double* %19
%130 = load double, double* %27
%131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
store double %131, double* %27
%132 = load double, double* %16
%133 = load double, double* %20
%134 = load double, double* %24
%135 = call double @llvm.fmuladd.f64(double %132, double %133, double %134)
store double %135, double* %24
%136 = load double, double* %17
%137 = load double, double* %20
%138 = load double, double* %28
%139 = call double @llvm.fmuladd.f64(double %136, double %137, double %138)
store double %139, double* %28
%140 = load double, double* %16
%141 = load double, double* %21
%142 = load double, double* %25
%143 = call double @llvm.fmuladd.f64(double %140, double %141, double %142)
store double %143, double* %25
%144 = load double, double* %17
%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** %9
%155 = getelementptr inbounds double, double* %154, i64 8
%156 = load double, double* %155
store double %156, double* %18
%157 = load double*, double** %9
%158 = getelementptr inbounds double, double* %157, i64 9
%159 = load double, double* %158
store double %159, double* %19
%160 = load double*, double** %9
%161 = getelementptr inbounds double, double* %160, i64 10
%162 = load double, double* %161
store double %162, double* %20
%163 = load double*, double** %9
%164 = getelementptr inbounds double, double* %163, i64 11
%165 = load double, double* %164
store double %165, double* %21
%166 = load double, double* %16
%167 = load double, double* %18
%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* %18
%172 = load double, double* %26
%173 = call double @llvm.fmuladd.f64(double %170, double %171, double %172)
store double %173, double* %26
%174 = load double, double* %16
%175 = load double, double* %19
%176 = load double, double* %23
%177 = call double @llvm.fmuladd.f64(double %174, double %175, double %176)
store double %177, double* %23
%178 = load double, double* %17
%179 = load double, double* %19
%180 = load double, double* %27
%181 = call double @llvm.fmuladd.f64(double %178, double %179, double %180)
store double %181, double* %27
%182 = load double, double* %16
%183 = load double, double* %20
%184 = load double, double* %24
%185 = call double @llvm.fmuladd.f64(double %182, double %183, double %184)
store double %185, double* %24
%186 = load double, double* %17
%187 = load double, double* %20
%188 = load double, double* %28
%189 = call double @llvm.fmuladd.f64(double %186, double %187, double %188)
store double %189, double* %28
%190 = load double, double* %16
%191 = load double, double* %21
%192 = load double, double* %25
%193 = call double @llvm.fmuladd.f64(double %190, double %191, double %192)
store double %193, double* %25
%194 = load double, double* %17
%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** %9
%205 = getelementptr inbounds double, double* %204, i64 12
%206 = load double, double* %205
store double %206, double* %18
%207 = load double*, double** %9
%208 = getelementptr inbounds double, double* %207, i64 13
%209 = load double, double* %208
store double %209, double* %19
%210 = load double*, double** %9
%211 = getelementptr inbounds double, double* %210, i64 14
%212 = load double, double* %211
store double %212, double* %20
%213 = load double*, double** %9
%214 = getelementptr inbounds double, double* %213, i64 15
%215 = load double, double* %214
store double %215, double* %21
%216 = load double, double* %16
%217 = load double, double* %18
%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* %18
%222 = load double, double* %26
%223 = call double @llvm.fmuladd.f64(double %220, double %221, double %222)
store double %223, double* %26
%224 = load double, double* %16
%225 = load double, double* %19
%226 = load double, double* %23
%227 = call double @llvm.fmuladd.f64(double %224, double %225, double %226)
store double %227, double* %23
%228 = load double, double* %17
%229 = load double, double* %19
%230 = load double, double* %27
%231 = call double @llvm.fmuladd.f64(double %228, double %229, double %230)
store double %231, double* %27
%232 = load double, double* %16
%233 = load double, double* %20
%234 = load double, double* %24
%235 = call double @llvm.fmuladd.f64(double %232, double %233, double %234)
store double %235, double* %24
%236 = load double, double* %17
%237 = load double, double* %20
%238 = load double, double* %28
%239 = call double @llvm.fmuladd.f64(double %236, double %237, double %238)
store double %239, double* %28
%240 = load double, double* %16
%241 = load double, double* %21
%242 = load double, double* %25
%243 = call double @llvm.fmuladd.f64(double %240, double %241, double %242)
store double %243, double* %25
%244 = load double, double* %17
%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** %9
%268 = getelementptr inbounds double, double* %267, i64 0
%269 = load double, double* %268
store double %269, double* %18
%270 = load double*, double** %9
%271 = getelementptr inbounds double, double* %270, i64 1
%272 = load double, double* %271
store double %272, double* %19
%273 = load double*, double** %9
%274 = getelementptr inbounds double, double* %273, i64 2
%275 = load double, double* %274
store double %275, double* %20
%276 = load double*, double** %9
%277 = getelementptr inbounds double, double* %276, i64 3
%278 = load double, double* %277
store double %278, double* %21
%279 = load double, double* %16
%280 = load double, double* %18
%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* %18
%285 = load double, double* %26
%286 = call double @llvm.fmuladd.f64(double %283, double %284, double %285)
store double %286, double* %26
%287 = load double, double* %16
%288 = load double, double* %19
%289 = load double, double* %23
%290 = call double @llvm.fmuladd.f64(double %287, double %288, double %289)
store double %290, double* %23
%291 = load double, double* %17
%292 = load double, double* %19
%293 = load double, double* %27
%294 = call double @llvm.fmuladd.f64(double %291, double %292, double %293)
store double %294, double* %27
%295 = load double, double* %16
%296 = load double, double* %20
%297 = load double, double* %24
%298 = call double @llvm.fmuladd.f64(double %295, double %296, double %297)
store double %298, double* %24
%299 = load double, double* %17
%300 = load double, double* %20
%301 = load double, double* %28
%302 = call double @llvm.fmuladd.f64(double %299, double %300, double %301)
store double %302, double* %28
%303 = load double, double* %16
%304 = load double, double* %21
%305 = load double, double* %25
%306 = call double @llvm.fmuladd.f64(double %303, double %304, double %305)
store double %306, double* %25
%307 = load double, double* %17
%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* %26
%326 = load double*, double** %10
%327 = getelementptr inbounds double, double* %326, i64 1
store double %325, double* %327
%328 = load double, double* %23
%329 = load double*, double** %10
%330 = getelementptr inbounds double, double* %329, i64 4
store double %328, double* %330
%331 = load double, double* %27
%332 = load double*, double** %10
%333 = getelementptr inbounds double, double* %332, i64 5
store double %331, double* %333
%334 = load double, double* %24
%335 = load double*, double** %10
%336 = getelementptr inbounds double, double* %335, i64 8
store double %334, double* %336
%337 = load double, double* %28
%338 = load double*, double** %10
%339 = getelementptr inbounds double, double* %338, i64 9
store double %337, double* %339
%340 = load double, double* %25
%341 = load double*, double** %10
%342 = getelementptr inbounds double, double* %341, i64 12
store double %340, double* %342
%343 = load double, double* %29
%344 = load double*, double** %10
%345 = getelementptr inbounds double, double* %344, i64 13
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* %34
%353 = load double*, double** %11
%354 = getelementptr inbounds double, double* %353, i64 4
%355 = load double, double* %354
store double %355, double* %31
%356 = load double*, double** %11
%357 = getelementptr inbounds double, double* %356, i64 5
%358 = load double, double* %357
store double %358, double* %35
%359 = load double*, double** %11
%360 = getelementptr inbounds double, double* %359, i64 8
%361 = load double, double* %360
store double %361, double* %32
%362 = load double*, double** %11
%363 = getelementptr inbounds double, double* %362, i64 9
%364 = load double, double* %363
store double %364, double* %36
%365 = load double*, double** %11
%366 = getelementptr inbounds double, double* %365, i64 12
%367 = load double, double* %366
store double %367, double* %33
%368 = load double*, double** %11
%369 = getelementptr inbounds double, double* %368, i64 13
%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* %26
%378 = load double, double* %34
%379 = fadd double %378, %377
store double %379, double* %34
%380 = load double, double* %23
%381 = load double, double* %31
%382 = fadd double %381, %380
store double %382, double* %31
%383 = load double, double* %27
%384 = load double, double* %35
%385 = fadd double %384, %383
store double %385, double* %35
%386 = load double, double* %24
%387 = load double, double* %32
%388 = fadd double %387, %386
store double %388, double* %32
%389 = load double, double* %28
%390 = load double, double* %36
%391 = fadd double %390, %389
store double %391, double* %36
%392 = load double, double* %25
%393 = load double, double* %33
%394 = fadd double %393, %392
store double %394, double* %33
%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* %26
%403 = load double, double* %34
%404 = fsub double %403, %402
store double %404, double* %34
%405 = load double, double* %23
%406 = load double, double* %31
%407 = fsub double %406, %405
store double %407, double* %31
%408 = load double, double* %27
%409 = load double, double* %35
%410 = fsub double %409, %408
store double %410, double* %35
%411 = load double, double* %24
%412 = load double, double* %32
%413 = fsub double %412, %411
store double %413, double* %32
%414 = load double, double* %28
%415 = load double, double* %36
%416 = fsub double %415, %414
store double %416, double* %36
%417 = load double, double* %25
%418 = load double, double* %33
%419 = fsub double %418, %417
store double %419, double* %33
%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* %26
%428 = load double*, double** %10
%429 = getelementptr inbounds double, double* %428, i64 1
store double %427, double* %429
%430 = load double, double* %23
%431 = load double*, double** %10
%432 = getelementptr inbounds double, double* %431, i64 4
store double %430, double* %432
%433 = load double, double* %27
%434 = load double*, double** %10
%435 = getelementptr inbounds double, double* %434, i64 5
store double %433, double* %435
%436 = load double, double* %24
%437 = load double*, double** %10
%438 = getelementptr inbounds double, double* %437, i64 8
store double %436, double* %438
%439 = load double, double* %28
%440 = load double*, double** %10
%441 = getelementptr inbounds double, double* %440, i64 9
store double %439, double* %441
%442 = load double, double* %25
%443 = load double*, double** %10
%444 = getelementptr inbounds double, double* %443, i64 12
store double %442, double* %444
%445 = load double, double* %29
%446 = load double*, double** %10
%447 = getelementptr inbounds double, double* %446, i64 13
store double %445, double* %447
br label %448
448: ; preds = %40, %423, %321
ret void
}

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