void kernel_sgemm_nt_2x4_lib4(int kmax, float *A, float *B, float *D, float *C,
                              int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int ldc = 4;
  int k;
  float 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;
  }
  float 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] = d_00;
    C[1 + ldc * 0] = d_10;
    C[0 + ldc * 1] = d_01;
    C[1 + ldc * 1] = d_11;
    C[0 + ldc * 2] = d_02;
    C[1 + ldc * 2] = d_12;
    C[0 + ldc * 3] = d_03;
    C[1 + ldc * 3] = d_13;
  }
}


x86 assembly (clang, -O0):
<kernel_sgemm_nt_2x4_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%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_sgemm_nt_2x4_lib4+0x2e>
jmp    1ab4 <kernel_sgemm_nt_2x4_lib4+0x9b4>
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x70(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1688 <kernel_sgemm_nt_2x4_lib4+0x588>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x6c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  0x1c(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x6c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  0x2c(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x6c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movss  0x30(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x34(%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movss  0x30(%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movss  0x34(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movss  0x38(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  0x3c(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x6c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x38(%rbp)
jmp    1183 <kernel_sgemm_nt_2x4_lib4+0x83>
jmp    168d <kernel_sgemm_nt_2x4_lib4+0x58d>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    17f1 <kernel_sgemm_nt_2x4_lib4+0x6f1>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x6c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    168d <kernel_sgemm_nt_2x4_lib4+0x58d>
cmpl   $0x0,-0x2c(%rbp)
jne    186f <kernel_sgemm_nt_2x4_lib4+0x76f>
movss  -0x54(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x64(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x5c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x6c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0x70(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x34(%rax)
jmp    1ab4 <kernel_sgemm_nt_2x4_lib4+0x9b4>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x74(%rbp)
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
mov    -0x20(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x20(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
mov    -0x20(%rbp),%rax
movss  0x30(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movss  0x34(%rax),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
cmpl   $0x1,-0x2c(%rbp)
jne    1989 <kernel_sgemm_nt_2x4_lib4+0x889>
movss  -0x54(%rbp),%xmm0
addss  -0x74(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x64(%rbp),%xmm0
addss  -0x84(%rbp),%xmm0
ff
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x58(%rbp),%xmm0
addss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x68(%rbp),%xmm0
addss  -0x88(%rbp),%xmm0
ff
movss  %xmm0,-0x88(%rbp)
ff
movss  -0x5c(%rbp),%xmm0
addss  -0x7c(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x6c(%rbp),%xmm0
addss  -0x8c(%rbp),%xmm0
ff
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x60(%rbp),%xmm0
addss  -0x80(%rbp),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x70(%rbp),%xmm0
addss  -0x90(%rbp),%xmm0
ff
movss  %xmm0,-0x90(%rbp)
ff
jmp    1a39 <kernel_sgemm_nt_2x4_lib4+0x939>
movss  -0x54(%rbp),%xmm1
movss  -0x74(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x64(%rbp),%xmm1
movss  -0x84(%rbp),%xmm0
ff
subss  %xmm1,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x58(%rbp),%xmm1
movss  -0x78(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x68(%rbp),%xmm1
movss  -0x88(%rbp),%xmm0
ff
subss  %xmm1,%xmm0
movss  %xmm0,-0x88(%rbp)
ff
movss  -0x5c(%rbp),%xmm1
movss  -0x7c(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x6c(%rbp),%xmm1
movss  -0x8c(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x60(%rbp),%xmm1
movss  -0x80(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x70(%rbp),%xmm1
movss  -0x90(%rbp),%xmm0
ff
subss  %xmm1,%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x74(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x84(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x78(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x88(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x7c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x8c(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x80(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0x90(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,0x34(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_sgemm_nt_2x4_lib4>:
test   %edi,%edi
jle    12bd <kernel_sgemm_nt_2x4_lib4+0x1bd>
cmp    $0x4,%edi
jb     11d9 <kernel_sgemm_nt_2x4_lib4+0xd9>
lea    -0x3(%rdi),%r10d
xorps  %xmm5,%xmm5
xor    %eax,%eax
xorps  %xmm4,%xmm4
nopl   (%rax)
movsd  (%rsi),%xmm6
movsd  0x10(%rsi),%xmm10
movsd  0x20(%rsi),%xmm9
movsd  0x30(%rsi),%xmm8
movlhps %xmm6,%xmm6
movups (%rdx),%xmm3
movups 0x10(%rdx),%xmm7
movups 0x20(%rdx),%xmm2
movups 0x30(%rdx),%xmm0
movaps %xmm3,%xmm1
unpckhps %xmm3,%xmm1
unpcklps %xmm3,%xmm3
mulps  %xmm6,%xmm3
addps  %xmm5,%xmm3
mulps  %xmm6,%xmm1
addps  %xmm4,%xmm1
movlhps %xmm10,%xmm10
movaps %xmm7,%xmm4
unpcklps %xmm7,%xmm4
unpckhps %xmm7,%xmm7
mulps  %xmm10,%xmm7
addps  %xmm1,%xmm7
mulps  %xmm10,%xmm4
addps  %xmm3,%xmm4
movlhps %xmm9,%xmm9
movaps %xmm2,%xmm6
unpckhps %xmm2,%xmm6
unpcklps %xmm2,%xmm2
mulps  %xmm9,%xmm2
addps  %xmm4,%xmm2
mulps  %xmm9,%xmm6
addps  %xmm7,%xmm6
movlhps %xmm8,%xmm8
movaps %xmm0,%xmm1
unpcklps %xmm0,%xmm1
unpckhps %xmm0,%xmm0
mulps  %xmm8,%xmm0
movaps %xmm0,%xmm4
addps  %xmm6,%xmm4
mulps  %xmm8,%xmm1
movaps %xmm1,%xmm5
addps  %xmm2,%xmm5
add    $0x40,%rsi
add    $0x40,%rdx
add    $0x4,%eax
cmp    %r10d,%eax
jl     1120 <kernel_sgemm_nt_2x4_lib4+0x20>
addps  %xmm2,%xmm1
addps  %xmm6,%xmm0
mov    %edi,%eax
and    $0xfffffffc,%eax
cmp    %edi,%eax
jl     11e5 <kernel_sgemm_nt_2x4_lib4+0xe5>
jmp    1232 <kernel_sgemm_nt_2x4_lib4+0x132>
xorps  %xmm1,%xmm1
xor    %eax,%eax
xorps  %xmm0,%xmm0
cmp    %edi,%eax
jge    1232 <kernel_sgemm_nt_2x4_lib4+0x132>
sub    %eax,%edi
xor    %eax,%eax
nopl   0x0(%rax)
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
movsd  (%rsi,%rax,1),%xmm1
movlhps %xmm1,%xmm1
movups (%rdx,%rax,1),%xmm4
movaps %xmm4,%xmm5
unpcklps %xmm4,%xmm5
unpckhps %xmm4,%xmm4
mulps  %xmm1,%xmm4
movaps %xmm4,%xmm0
addps  %xmm2,%xmm0
mulps  %xmm1,%xmm5
movaps %xmm5,%xmm1
addps  %xmm3,%xmm1
add    $0x10,%rax
add    $0xffffffff,%edi
jne    11f0 <kernel_sgemm_nt_2x4_lib4+0xf0>
addps  %xmm3,%xmm5
addps  %xmm2,%xmm4
movaps %xmm5,%xmm1
movaps %xmm4,%xmm0
test   %r9d,%r9d
je     126a <kernel_sgemm_nt_2x4_lib4+0x16a>
movsd  (%rcx),%xmm2
movsd  0x10(%rcx),%xmm5
movsd  0x20(%rcx),%xmm3
movsd  0x30(%rcx),%xmm4
movlhps %xmm5,%xmm2
movlhps %xmm4,%xmm3
cmp    $0x1,%r9d
jne    125e <kernel_sgemm_nt_2x4_lib4+0x15e>
addps  %xmm3,%xmm0
addps  %xmm2,%xmm1
jmp    126a <kernel_sgemm_nt_2x4_lib4+0x16a>
subps  %xmm0,%xmm3
subps  %xmm1,%xmm2
movaps %xmm2,%xmm1
movaps %xmm3,%xmm0
movss  %xmm1,(%r8)
movaps %xmm1,%xmm2
shufps $0x55,%xmm1,%xmm2
movss  %xmm2,0x4(%r8)
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movss  %xmm2,0x10(%r8)
shufps $0xff,%xmm1,%xmm1
movss  %xmm1,0x14(%r8)
movss  %xmm0,0x20(%r8)
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
movss  %xmm1,0x24(%r8)
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
movss  %xmm1,0x30(%r8)
shufps $0xff,%xmm0,%xmm0
movss  %xmm0,0x34(%r8)
ret

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

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