void kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new(int km, int kn, int kadd, int tri_A,
                                           double *Ap, double *Bp, int ksub,
                                           double *Am, double *Bm, int alg,
                                           double *C, double *D, double *E,
                                           int use_inv_diag_E,
                                           double *inv_diag_E) {
  const int bs = 4;
  int k;
  double a_0, a_1, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0;
  k = 0;
  if (kadd > 0) {
    if (tri_A == 1) {
      if (kadd >= 2) {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        a_0 = Ap[0 + bs * 1];
        a_1 = Ap[1 + bs * 1];
        b_0 = Bp[0 + bs * 1];
        b_1 = Bp[1 + bs * 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;
        Ap += 8;
        Bp += 8;
        k += 2;
      } else {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        k += 1;
      }
    }
    for (; k < kadd - 3; k += 4) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 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;
      a_0 = Ap[0 + bs * 1];
      a_1 = Ap[1 + bs * 1];
      b_0 = Bp[0 + bs * 1];
      b_1 = Bp[1 + bs * 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;
      a_0 = Ap[0 + bs * 2];
      a_1 = Ap[1 + bs * 2];
      b_0 = Bp[0 + bs * 2];
      b_1 = Bp[1 + bs * 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;
      a_0 = Ap[0 + bs * 3];
      a_1 = Ap[1 + bs * 3];
      b_0 = Bp[0 + bs * 3];
      b_1 = Bp[1 + bs * 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;
      Ap += 16;
      Bp += 16;
    }
    for (; k < kadd; k++) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 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;
      Ap += 4;
      Bp += 4;
    }
  }
  for (k = 0; k < ksub - 3; k += 4) {
    a_0 = Am[0 + bs * 0];
    a_1 = Am[1 + bs * 0];
    b_0 = Bm[0 + bs * 0];
    b_1 = Bm[1 + bs * 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;
    a_0 = Am[0 + bs * 1];
    a_1 = Am[1 + bs * 1];
    b_0 = Bm[0 + bs * 1];
    b_1 = Bm[1 + bs * 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;
    a_0 = Am[0 + bs * 2];
    a_1 = Am[1 + bs * 2];
    b_0 = Bm[0 + bs * 2];
    b_1 = Bm[1 + bs * 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;
    a_0 = Am[0 + bs * 3];
    a_1 = Am[1 + bs * 3];
    b_0 = Bm[0 + bs * 3];
    b_1 = Bm[1 + bs * 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;
    Am += 16;
    Bm += 16;
  }
  if (alg != 0) {
    c_00 += C[0 + bs * 0];
    c_10 += C[1 + bs * 0];
    c_01 += C[0 + bs * 1];
    c_11 += C[1 + bs * 1];
  }
  double a_00, a_10, a_11;
  if (use_inv_diag_E) {
    a_00 = inv_diag_E[0];
    c_00 *= a_00;
    c_10 *= a_00;
    D[0 + bs * 0] = c_00;
    if (km >= 2)
      D[1 + bs * 0] = c_10;
    if (kn == 1)
      return;
    a_10 = E[1 + bs * 0];
    a_11 = inv_diag_E[1];
    c_01 -= c_00 * a_10;
    c_11 -= c_10 * a_10;
    c_01 *= a_11;
    c_11 *= a_11;
    D[0 + bs * 1] = c_01;
    if (km >= 2)
      D[1 + bs * 1] = c_11;
  } else {
    a_00 = 1.0 / E[0 + bs * 0];
    c_00 *= a_00;
    c_10 *= a_00;
    D[0 + bs * 0] = c_00;
    if (km >= 2)
      D[1 + bs * 0] = c_10;
    if (kn == 1)
      return;
    a_10 = E[1 + bs * 0];
    a_11 = 1.0 / E[1 + bs * 1];
    c_01 -= c_00 * a_10;
    c_11 -= c_10 * a_10;
    c_01 *= a_11;
    c_11 *= a_11;
    D[0 + bs * 1] = c_01;
    if (km >= 2)
      D[1 + bs * 1] = c_11;
  }
}


x86 assembly (clang, -O0):
<kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    16e1 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x5e1>
cmpl   $0x1,-0x10(%rbp)
jne    1321 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x221>
cmpl   $0x2,-0xc(%rbp)
jl     12b3 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x1b3>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x28(%rbp)
jmp    131c <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x21c>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1321 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x221>
jmp    1326 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x226>
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    15ff <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x4ff>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    1326 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x226>
jmp    1604 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x504>
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16dc <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x5dc>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1604 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x504>
jmp    16e1 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x5e1>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1b31 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xa31>
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x20(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x20(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,0x18(%rbp)
mov    0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    16e8 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x5e8>
cmpl   $0x0,0x28(%rbp)
je     1b86 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xa86>
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x30(%rbp),%rax
movsd  0x20(%rax),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x30(%rbp),%rax
movsd  0x28(%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
cmpl   $0x0,0x48(%rbp)
je     1cba <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xbba>
mov    0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1be0 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xae0>
movsd  -0x60(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x1,-0x8(%rbp)
jne    1bef <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xaef>
jmp    1df4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xcf4>
mov    0x40(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x50(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x20(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1cb5 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xbb5>
movsd  -0x68(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    1df4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xcf4>
mov    0x40(%rbp),%rax
movsd  0x33a(%rip),%xmm0
divsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1d12 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xc12>
movsd  -0x60(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x1,-0x8(%rbp)
jne    1d21 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xc21>
jmp    1df4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xcf4>
mov    0x40(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x40(%rbp),%rax
movsd  0x2c5(%rip),%xmm0
divsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x20(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1def <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xcef>
movsd  -0x68(%rbp),%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    1df4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xcf4>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new>:
mov    0x8(%rsp),%r10d
test   %edx,%edx
jle    116f <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x6f>
cmp    $0x1,%ecx
jne    117c <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x7c>
movupd (%r9),%xmm0
movsd  (%r8),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
addpd  %xmm0,%xmm1
mov    $0x1,%ecx
cmp    $0x2,%edx
jb     1186 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x86>
movupd 0x20(%r9),%xmm0
movsd  0x20(%r8),%xmm2
movsd  0x28(%r8),%xmm3
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm2,%xmm1
unpcklpd %xmm3,%xmm3
mulpd  %xmm0,%xmm3
xorpd  %xmm0,%xmm0
addpd  %xmm3,%xmm0
add    $0x40,%r8
add    $0x40,%r9
mov    $0x2,%ecx
jmp    1186 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x86>
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
jmp    12d4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x1d4>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
xorpd  %xmm1,%xmm1
lea    -0x3(%rdx),%eax
cmp    %eax,%ecx
jge    1275 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x175>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%r9),%xmm3
movupd 0x20(%r9),%xmm5
movupd 0x40(%r9),%xmm9
movupd 0x60(%r9),%xmm8
movsd  (%r8),%xmm7
movsd  0x8(%r8),%xmm2
movsd  0x20(%r8),%xmm4
movsd  0x28(%r8),%xmm6
unpcklpd %xmm7,%xmm7
mulpd  %xmm3,%xmm7
addpd  %xmm1,%xmm7
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
unpcklpd %xmm4,%xmm4
mulpd  %xmm5,%xmm4
addpd  %xmm7,%xmm4
unpcklpd %xmm6,%xmm6
mulpd  %xmm5,%xmm6
addpd  %xmm2,%xmm6
movsd  0x40(%r8),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm9,%xmm3
addpd  %xmm4,%xmm3
movsd  0x48(%r8),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm9,%xmm5
addpd  %xmm6,%xmm5
movsd  0x60(%r8),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm8,%xmm4
movapd %xmm4,%xmm1
addpd  %xmm3,%xmm1
movsd  0x68(%r8),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm8,%xmm6
movapd %xmm6,%xmm0
addpd  %xmm5,%xmm0
sub    $0xffffffffffffff80,%r8
sub    $0xffffffffffffff80,%r9
add    $0x4,%ecx
cmp    %eax,%ecx
jl     11a0 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0xa0>
addpd  %xmm5,%xmm6
addpd  %xmm3,%xmm4
movapd %xmm6,%xmm0
movapd %xmm4,%xmm1
cmp    %edx,%ecx
jge    12d4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x1d4>
sub    %ecx,%edx
xor    %eax,%eax
nopl   (%rax)
movapd %xmm1,%xmm2
movapd %xmm0,%xmm3
movupd (%r9,%rax,1),%xmm0
movsd  (%r8,%rax,1),%xmm4
movsd  0x8(%r8,%rax,1),%xmm5
unpcklpd %xmm4,%xmm4
mulpd  %xmm0,%xmm4
movapd %xmm4,%xmm1
addpd  %xmm2,%xmm1
unpcklpd %xmm5,%xmm5
mulpd  %xmm0,%xmm5
movapd %xmm5,%xmm0
addpd  %xmm3,%xmm0
add    $0x20,%rax
add    $0xffffffff,%edx
jne    1280 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x180>
addpd  %xmm3,%xmm5
addpd  %xmm2,%xmm4
movapd %xmm5,%xmm0
movapd %xmm4,%xmm1
mov    0x20(%rsp),%r8d
cmp    $0x4,%r10d
jl     1497 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x397>
mov    0x18(%rsp),%r9
mov    0x10(%rsp),%rdx
add    $0xfffffffd,%r10d
xor    %ecx,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm1,-0x18(%rsp)
movapd %xmm0,%xmm10
movupd (%r9,%rcx,1),%xmm14
movupd 0x20(%r9,%rcx,1),%xmm13
movupd 0x40(%r9,%rcx,1),%xmm12
movupd 0x60(%r9,%rcx,1),%xmm11
movsd  (%rdx,%rcx,1),%xmm2
movsd  0x8(%rdx,%rcx,1),%xmm4
movsd  0x20(%rdx,%rcx,1),%xmm15
movsd  0x28(%rdx,%rcx,1),%xmm7
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
mulpd  %xmm14,%xmm3
subpd  %xmm3,%xmm1
movapd %xmm4,%xmm3
unpcklpd %xmm4,%xmm3
mulpd  %xmm14,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm15,%xmm3
unpcklpd %xmm15,%xmm3
mulpd  %xmm13,%xmm3
subpd  %xmm3,%xmm1
movapd %xmm7,%xmm3
unpcklpd %xmm7,%xmm3
mulpd  %xmm13,%xmm3
subpd  %xmm3,%xmm0
movsd  0x40(%rdx,%rcx,1),%xmm5
movsd  0x48(%rdx,%rcx,1),%xmm6
movapd %xmm5,%xmm3
unpcklpd %xmm5,%xmm3
mulpd  %xmm12,%xmm3
subpd  %xmm3,%xmm1
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
mulpd  %xmm12,%xmm3
subpd  %xmm3,%xmm0
movsd  0x60(%rdx,%rcx,1),%xmm9
movsd  0x68(%rdx,%rcx,1),%xmm8
movapd %xmm9,%xmm3
unpcklpd %xmm9,%xmm3
mulpd  %xmm11,%xmm3
subpd  %xmm3,%xmm1
movapd %xmm8,%xmm3
unpcklpd %xmm8,%xmm3
mulpd  %xmm11,%xmm3
subpd  %xmm3,%xmm0
add    $0x4,%eax
sub    $0xffffffffffffff80,%rcx
cmp    %r10d,%eax
jl     1300 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x200>
movapd 0xc02(%rip),%xmm0
xorpd  %xmm0,%xmm2
xorpd  %xmm0,%xmm4
pshufd $0x44,%xmm2,%xmm2
pshufd $0x44,%xmm4,%xmm3
xorpd  %xmm0,%xmm15
xorpd  %xmm0,%xmm7
pshufd $0x44,%xmm15,%xmm4
pshufd $0x44,%xmm7,%xmm7
xorpd  %xmm0,%xmm5
xorpd  %xmm0,%xmm6
pshufd $0x44,%xmm5,%xmm5
pshufd $0x44,%xmm6,%xmm6
xorpd  %xmm0,%xmm9
xorpd  %xmm0,%xmm8
pshufd $0x44,%xmm9,%xmm1
pshufd $0x44,%xmm8,%xmm0
mulpd  %xmm14,%xmm3
addpd  %xmm10,%xmm3
mulpd  %xmm13,%xmm7
addpd  %xmm3,%xmm7
mulpd  %xmm12,%xmm6
addpd  %xmm7,%xmm6
mulpd  %xmm11,%xmm0
addpd  %xmm6,%xmm0
mulpd  %xmm14,%xmm2
addpd  -0x18(%rsp),%xmm2
mulpd  %xmm13,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm12,%xmm5
addpd  %xmm4,%xmm5
mulpd  %xmm11,%xmm1
addpd  %xmm5,%xmm1
mov    0x40(%rsp),%edx
test   %r8d,%r8d
je     14c0 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x3c0>
mov    0x28(%rsp),%rax
movsd  (%rax),%xmm2
movsd  0x8(%rax),%xmm3
movhpd 0x20(%rax),%xmm2
addpd  %xmm2,%xmm1
movhpd 0x28(%rax),%xmm3
addpd  %xmm3,%xmm0
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%rax
test   %edx,%edx
je     151b <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x41b>
mov    0x48(%rsp),%rdx
movsd  (%rdx),%xmm2
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm0,%xmm2
movsd  %xmm5,(%rax)
cmp    $0x2,%edi
jl     14f1 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x3f1>
movsd  %xmm2,0x8(%rax)
cmp    $0x1,%esi
je     151a <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x41a>
movsd  0x8(%rcx),%xmm4
movsd  0x8(%rdx),%xmm3
unpckhpd %xmm1,%xmm1
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x20(%rax)
cmp    $0x1,%edi
jg     156e <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x46e>
ret
movsd  0xaed(%rip),%xmm3
movapd %xmm3,%xmm2
divsd  (%rcx),%xmm2
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm0,%xmm2
movsd  %xmm5,(%rax)
cmp    $0x2,%edi
jl     1545 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x445>
movsd  %xmm2,0x8(%rax)
cmp    $0x1,%esi
je     151a <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x41a>
movsd  0x8(%rcx),%xmm4
divsd  0x28(%rcx),%xmm3
unpckhpd %xmm1,%xmm1
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x20(%rax)
cmp    $0x2,%edi
jl     151a <kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new+0x41a>
mulsd  %xmm4,%xmm2
unpckhpd %xmm0,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x28(%rax)
ret

LLVM IR (-O0):
define void @kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new(i32 %0, i32 %1, i32 %2, i32 %3, double* %4, double* %5, i32 %6, double* %7, double* %8, i32 %9, double* %10, double* %11, double* %12, i32 %13, double* %14) {
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
%22 = alloca i32
%23 = alloca double*
%24 = alloca double*
%25 = alloca i32
%26 = alloca double*
%27 = alloca double*
%28 = alloca double*
%29 = alloca i32
%30 = alloca double*
%31 = alloca i32
%32 = alloca i32
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
store i32 %0, i32* %16
store i32 %1, i32* %17
store i32 %2, i32* %18
store i32 %3, i32* %19
store double* %4, double** %20
store double* %5, double** %21
store i32 %6, i32* %22
store double* %7, double** %23
store double* %8, double** %24
store i32 %9, i32* %25
store double* %10, double** %26
store double* %11, double** %27
store double* %12, double** %28
store i32 %13, i32* %29
store double* %14, double** %30
store i32 4, i32* %31
store double 0.000000e+00, double* %37
store double 0.000000e+00, double* %38
store double 0.000000e+00, double* %39
store double 0.000000e+00, double* %40
store i32 0, i32* %32
%44 = load i32, i32* %18
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %293
46: ; preds = %15
%47 = load i32, i32* %19
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %125
49: ; preds = %46
%50 = load i32, i32* %18
%51 = icmp sge i32 %50, 2
br i1 %51, label %52, label %104
52: ; preds = %49
%53 = load double*, double** %20
%54 = getelementptr inbounds double, double* %53, i64 0
%55 = load double, double* %54
store double %55, double* %33
%56 = load double*, double** %21
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
store double %58, double* %35
%59 = load double*, double** %21
%60 = getelementptr inbounds double, double* %59, i64 1
%61 = load double, double* %60
store double %61, double* %36
%62 = load double, double* %33
%63 = load double, double* %35
%64 = load double, double* %37
%65 = call double @llvm.fmuladd.f64(double %62, double %63, double %64)
store double %65, double* %37
%66 = load double, double* %33
%67 = load double, double* %36
%68 = load double, double* %38
%69 = call double @llvm.fmuladd.f64(double %66, double %67, double %68)
store double %69, double* %38
%70 = load double*, double** %20
%71 = getelementptr inbounds double, double* %70, i64 4
%72 = load double, double* %71
store double %72, double* %33
%73 = load double*, double** %20
%74 = getelementptr inbounds double, double* %73, i64 5
%75 = load double, double* %74
store double %75, double* %34
%76 = load double*, double** %21
%77 = getelementptr inbounds double, double* %76, i64 4
%78 = load double, double* %77
store double %78, double* %35
%79 = load double*, double** %21
%80 = getelementptr inbounds double, double* %79, i64 5
%81 = load double, double* %80
store double %81, double* %36
%82 = load double, double* %33
%83 = load double, double* %35
%84 = load double, double* %37
%85 = call double @llvm.fmuladd.f64(double %82, double %83, double %84)
store double %85, double* %37
%86 = load double, double* %34
%87 = load double, double* %35
%88 = load double, double* %39
%89 = call double @llvm.fmuladd.f64(double %86, double %87, double %88)
store double %89, double* %39
%90 = load double, double* %33
%91 = load double, double* %36
%92 = load double, double* %38
%93 = call double @llvm.fmuladd.f64(double %90, double %91, double %92)
store double %93, double* %38
%94 = load double, double* %34
%95 = load double, double* %36
%96 = load double, double* %40
%97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
store double %97, double* %40
%98 = load double*, double** %20
%99 = getelementptr inbounds double, double* %98, i64 8
store double* %99, double** %20
%100 = load double*, double** %21
%101 = getelementptr inbounds double, double* %100, i64 8
store double* %101, double** %21
%102 = load i32, i32* %32
%103 = add nsw i32 %102, 2
store i32 %103, i32* %32
br label %124
104: ; preds = %49
%105 = load double*, double** %20
%106 = getelementptr inbounds double, double* %105, i64 0
%107 = load double, double* %106
store double %107, double* %33
%108 = load double*, double** %21
%109 = getelementptr inbounds double, double* %108, i64 0
%110 = load double, double* %109
store double %110, double* %35
%111 = load double*, double** %21
%112 = getelementptr inbounds double, double* %111, i64 1
%113 = load double, double* %112
store double %113, double* %36
%114 = load double, double* %33
%115 = load double, double* %35
%116 = load double, double* %37
%117 = call double @llvm.fmuladd.f64(double %114, double %115, double %116)
store double %117, double* %37
%118 = load double, double* %33
%119 = load double, double* %36
%120 = load double, double* %38
%121 = call double @llvm.fmuladd.f64(double %118, double %119, double %120)
store double %121, double* %38
%122 = load i32, i32* %32
%123 = add nsw i32 %122, 1
store i32 %123, i32* %32
br label %124
124: ; preds = %104, %52
br label %125
125: ; preds = %124, %46
br label %126
126: ; preds = %248, %125
%127 = load i32, i32* %32
%128 = load i32, i32* %18
%129 = sub nsw i32 %128, 3
%130 = icmp slt i32 %127, %129
br i1 %130, label %131, label %251
131: ; preds = %126
%132 = load double*, double** %20
%133 = getelementptr inbounds double, double* %132, i64 0
%134 = load double, double* %133
store double %134, double* %33
%135 = load double*, double** %20
%136 = getelementptr inbounds double, double* %135, i64 1
%137 = load double, double* %136
store double %137, double* %34
%138 = load double*, double** %21
%139 = getelementptr inbounds double, double* %138, i64 0
%140 = load double, double* %139
store double %140, double* %35
%141 = load double*, double** %21
%142 = getelementptr inbounds double, double* %141, i64 1
%143 = load double, double* %142
store double %143, double* %36
%144 = load double, double* %33
%145 = load double, double* %35
%146 = load double, double* %37
%147 = call double @llvm.fmuladd.f64(double %144, double %145, double %146)
store double %147, double* %37
%148 = load double, double* %34
%149 = load double, double* %35
%150 = load double, double* %39
%151 = call double @llvm.fmuladd.f64(double %148, double %149, double %150)
store double %151, double* %39
%152 = load double, double* %33
%153 = load double, double* %36
%154 = load double, double* %38
%155 = call double @llvm.fmuladd.f64(double %152, double %153, double %154)
store double %155, double* %38
%156 = load double, double* %34
%157 = load double, double* %36
%158 = load double, double* %40
%159 = call double @llvm.fmuladd.f64(double %156, double %157, double %158)
store double %159, double* %40
%160 = load double*, double** %20
%161 = getelementptr inbounds double, double* %160, i64 4
%162 = load double, double* %161
store double %162, double* %33
%163 = load double*, double** %20
%164 = getelementptr inbounds double, double* %163, i64 5
%165 = load double, double* %164
store double %165, double* %34
%166 = load double*, double** %21
%167 = getelementptr inbounds double, double* %166, i64 4
%168 = load double, double* %167
store double %168, double* %35
%169 = load double*, double** %21
%170 = getelementptr inbounds double, double* %169, i64 5
%171 = load double, double* %170
store double %171, double* %36
%172 = load double, double* %33
%173 = load double, double* %35
%174 = load double, double* %37
%175 = call double @llvm.fmuladd.f64(double %172, double %173, double %174)
store double %175, double* %37
%176 = load double, double* %34
%177 = load double, double* %35
%178 = load double, double* %39
%179 = call double @llvm.fmuladd.f64(double %176, double %177, double %178)
store double %179, double* %39
%180 = load double, double* %33
%181 = load double, double* %36
%182 = load double, double* %38
%183 = call double @llvm.fmuladd.f64(double %180, double %181, double %182)
store double %183, double* %38
%184 = load double, double* %34
%185 = load double, double* %36
%186 = load double, double* %40
%187 = call double @llvm.fmuladd.f64(double %184, double %185, double %186)
store double %187, double* %40
%188 = load double*, double** %20
%189 = getelementptr inbounds double, double* %188, i64 8
%190 = load double, double* %189
store double %190, double* %33
%191 = load double*, double** %20
%192 = getelementptr inbounds double, double* %191, i64 9
%193 = load double, double* %192
store double %193, double* %34
%194 = load double*, double** %21
%195 = getelementptr inbounds double, double* %194, i64 8
%196 = load double, double* %195
store double %196, double* %35
%197 = load double*, double** %21
%198 = getelementptr inbounds double, double* %197, i64 9
%199 = load double, double* %198
store double %199, double* %36
%200 = load double, double* %33
%201 = load double, double* %35
%202 = load double, double* %37
%203 = call double @llvm.fmuladd.f64(double %200, double %201, double %202)
store double %203, double* %37
%204 = load double, double* %34
%205 = load double, double* %35
%206 = load double, double* %39
%207 = call double @llvm.fmuladd.f64(double %204, double %205, double %206)
store double %207, double* %39
%208 = load double, double* %33
%209 = load double, double* %36
%210 = load double, double* %38
%211 = call double @llvm.fmuladd.f64(double %208, double %209, double %210)
store double %211, double* %38
%212 = load double, double* %34
%213 = load double, double* %36
%214 = load double, double* %40
%215 = call double @llvm.fmuladd.f64(double %212, double %213, double %214)
store double %215, double* %40
%216 = load double*, double** %20
%217 = getelementptr inbounds double, double* %216, i64 12
%218 = load double, double* %217
store double %218, double* %33
%219 = load double*, double** %20
%220 = getelementptr inbounds double, double* %219, i64 13
%221 = load double, double* %220
store double %221, double* %34
%222 = load double*, double** %21
%223 = getelementptr inbounds double, double* %222, i64 12
%224 = load double, double* %223
store double %224, double* %35
%225 = load double*, double** %21
%226 = getelementptr inbounds double, double* %225, i64 13
%227 = load double, double* %226
store double %227, double* %36
%228 = load double, double* %33
%229 = load double, double* %35
%230 = load double, double* %37
%231 = call double @llvm.fmuladd.f64(double %228, double %229, double %230)
store double %231, double* %37
%232 = load double, double* %34
%233 = load double, double* %35
%234 = load double, double* %39
%235 = call double @llvm.fmuladd.f64(double %232, double %233, double %234)
store double %235, double* %39
%236 = load double, double* %33
%237 = load double, double* %36
%238 = load double, double* %38
%239 = call double @llvm.fmuladd.f64(double %236, double %237, double %238)
store double %239, double* %38
%240 = load double, double* %34
%241 = load double, double* %36
%242 = load double, double* %40
%243 = call double @llvm.fmuladd.f64(double %240, double %241, double %242)
store double %243, double* %40
%244 = load double*, double** %20
%245 = getelementptr inbounds double, double* %244, i64 16
store double* %245, double** %20
%246 = load double*, double** %21
%247 = getelementptr inbounds double, double* %246, i64 16
store double* %247, double** %21
br label %248
248: ; preds = %131
%249 = load i32, i32* %32
%250 = add nsw i32 %249, 4
store i32 %250, i32* %32
br label %126
251: ; preds = %126
br label %252
252: ; preds = %289, %251
%253 = load i32, i32* %32
%254 = load i32, i32* %18
%255 = icmp slt i32 %253, %254
br i1 %255, label %256, label %292
256: ; preds = %252
%257 = load double*, double** %20
%258 = getelementptr inbounds double, double* %257, i64 0
%259 = load double, double* %258
store double %259, double* %33
%260 = load double*, double** %20
%261 = getelementptr inbounds double, double* %260, i64 1
%262 = load double, double* %261
store double %262, double* %34
%263 = load double*, double** %21
%264 = getelementptr inbounds double, double* %263, i64 0
%265 = load double, double* %264
store double %265, double* %35
%266 = load double*, double** %21
%267 = getelementptr inbounds double, double* %266, i64 1
%268 = load double, double* %267
store double %268, double* %36
%269 = load double, double* %33
%270 = load double, double* %35
%271 = load double, double* %37
%272 = call double @llvm.fmuladd.f64(double %269, double %270, double %271)
store double %272, double* %37
%273 = load double, double* %34
%274 = load double, double* %35
%275 = load double, double* %39
%276 = call double @llvm.fmuladd.f64(double %273, double %274, double %275)
store double %276, double* %39
%277 = load double, double* %33
%278 = load double, double* %36
%279 = load double, double* %38
%280 = call double @llvm.fmuladd.f64(double %277, double %278, double %279)
store double %280, double* %38
%281 = load double, double* %34
%282 = load double, double* %36
%283 = load double, double* %40
%284 = call double @llvm.fmuladd.f64(double %281, double %282, double %283)
store double %284, double* %40
%285 = load double*, double** %20
%286 = getelementptr inbounds double, double* %285, i64 4
store double* %286, double** %20
%287 = load double*, double** %21
%288 = getelementptr inbounds double, double* %287, i64 4
store double* %288, double** %21
br label %289
289: ; preds = %256
%290 = load i32, i32* %32
%291 = add nsw i32 %290, 1
store i32 %291, i32* %32
br label %252
292: ; preds = %252
br label %293
293: ; preds = %292, %15
store i32 0, i32* %32
br label %294
294: ; preds = %432, %293
%295 = load i32, i32* %32
%296 = load i32, i32* %22
%297 = sub nsw i32 %296, 3
%298 = icmp slt i32 %295, %297
br i1 %298, label %299, label %435
299: ; preds = %294
%300 = load double*, double** %23
%301 = getelementptr inbounds double, double* %300, i64 0
%302 = load double, double* %301
store double %302, double* %33
%303 = load double*, double** %23
%304 = getelementptr inbounds double, double* %303, i64 1
%305 = load double, double* %304
store double %305, double* %34
%306 = load double*, double** %24
%307 = getelementptr inbounds double, double* %306, i64 0
%308 = load double, double* %307
store double %308, double* %35
%309 = load double*, double** %24
%310 = getelementptr inbounds double, double* %309, i64 1
%311 = load double, double* %310
store double %311, double* %36
%312 = load double, double* %33
%313 = load double, double* %35
%314 = load double, double* %37
%315 = fneg double %312
%316 = call double @llvm.fmuladd.f64(double %315, double %313, double %314)
store double %316, double* %37
%317 = load double, double* %34
%318 = load double, double* %35
%319 = load double, double* %39
%320 = fneg double %317
%321 = call double @llvm.fmuladd.f64(double %320, double %318, double %319)
store double %321, double* %39
%322 = load double, double* %33
%323 = load double, double* %36
%324 = load double, double* %38
%325 = fneg double %322
%326 = call double @llvm.fmuladd.f64(double %325, double %323, double %324)
store double %326, double* %38
%327 = load double, double* %34
%328 = load double, double* %36
%329 = load double, double* %40
%330 = fneg double %327
%331 = call double @llvm.fmuladd.f64(double %330, double %328, double %329)
store double %331, double* %40
%332 = load double*, double** %23
%333 = getelementptr inbounds double, double* %332, i64 4
%334 = load double, double* %333
store double %334, double* %33
%335 = load double*, double** %23
%336 = getelementptr inbounds double, double* %335, i64 5
%337 = load double, double* %336
store double %337, double* %34
%338 = load double*, double** %24
%339 = getelementptr inbounds double, double* %338, i64 4
%340 = load double, double* %339
store double %340, double* %35
%341 = load double*, double** %24
%342 = getelementptr inbounds double, double* %341, i64 5
%343 = load double, double* %342
store double %343, double* %36
%344 = load double, double* %33
%345 = load double, double* %35
%346 = load double, double* %37
%347 = fneg double %344
%348 = call double @llvm.fmuladd.f64(double %347, double %345, double %346)
store double %348, double* %37
%349 = load double, double* %34
%350 = load double, double* %35
%351 = load double, double* %39
%352 = fneg double %349
%353 = call double @llvm.fmuladd.f64(double %352, double %350, double %351)
store double %353, double* %39
%354 = load double, double* %33
%355 = load double, double* %36
%356 = load double, double* %38
%357 = fneg double %354
%358 = call double @llvm.fmuladd.f64(double %357, double %355, double %356)
store double %358, double* %38
%359 = load double, double* %34
%360 = load double, double* %36
%361 = load double, double* %40
%362 = fneg double %359
%363 = call double @llvm.fmuladd.f64(double %362, double %360, double %361)
store double %363, double* %40
%364 = load double*, double** %23
%365 = getelementptr inbounds double, double* %364, i64 8
%366 = load double, double* %365
store double %366, double* %33
%367 = load double*, double** %23
%368 = getelementptr inbounds double, double* %367, i64 9
%369 = load double, double* %368
store double %369, double* %34
%370 = load double*, double** %24
%371 = getelementptr inbounds double, double* %370, i64 8
%372 = load double, double* %371
store double %372, double* %35
%373 = load double*, double** %24
%374 = getelementptr inbounds double, double* %373, i64 9
%375 = load double, double* %374
store double %375, double* %36
%376 = load double, double* %33
%377 = load double, double* %35
%378 = load double, double* %37
%379 = fneg double %376
%380 = call double @llvm.fmuladd.f64(double %379, double %377, double %378)
store double %380, double* %37
%381 = load double, double* %34
%382 = load double, double* %35
%383 = load double, double* %39
%384 = fneg double %381
%385 = call double @llvm.fmuladd.f64(double %384, double %382, double %383)
store double %385, double* %39
%386 = load double, double* %33
%387 = load double, double* %36
%388 = load double, double* %38
%389 = fneg double %386
%390 = call double @llvm.fmuladd.f64(double %389, double %387, double %388)
store double %390, double* %38
%391 = load double, double* %34
%392 = load double, double* %36
%393 = load double, double* %40
%394 = fneg double %391
%395 = call double @llvm.fmuladd.f64(double %394, double %392, double %393)
store double %395, double* %40
%396 = load double*, double** %23
%397 = getelementptr inbounds double, double* %396, i64 12
%398 = load double, double* %397
store double %398, double* %33
%399 = load double*, double** %23
%400 = getelementptr inbounds double, double* %399, i64 13
%401 = load double, double* %400
store double %401, double* %34
%402 = load double*, double** %24
%403 = getelementptr inbounds double, double* %402, i64 12
%404 = load double, double* %403
store double %404, double* %35
%405 = load double*, double** %24
%406 = getelementptr inbounds double, double* %405, i64 13
%407 = load double, double* %406
store double %407, double* %36
%408 = load double, double* %33
%409 = load double, double* %35
%410 = load double, double* %37
%411 = fneg double %408
%412 = call double @llvm.fmuladd.f64(double %411, double %409, double %410)
store double %412, double* %37
%413 = load double, double* %34
%414 = load double, double* %35
%415 = load double, double* %39
%416 = fneg double %413
%417 = call double @llvm.fmuladd.f64(double %416, double %414, double %415)
store double %417, double* %39
%418 = load double, double* %33
%419 = load double, double* %36
%420 = load double, double* %38
%421 = fneg double %418
%422 = call double @llvm.fmuladd.f64(double %421, double %419, double %420)
store double %422, double* %38
%423 = load double, double* %34
%424 = load double, double* %36
%425 = load double, double* %40
%426 = fneg double %423
%427 = call double @llvm.fmuladd.f64(double %426, double %424, double %425)
store double %427, double* %40
%428 = load double*, double** %23
%429 = getelementptr inbounds double, double* %428, i64 16
store double* %429, double** %23
%430 = load double*, double** %24
%431 = getelementptr inbounds double, double* %430, i64 16
store double* %431, double** %24
br label %432
432: ; preds = %299
%433 = load i32, i32* %32
%434 = add nsw i32 %433, 4
store i32 %434, i32* %32
br label %294
435: ; preds = %294
%436 = load i32, i32* %25
%437 = icmp ne i32 %436, 0
br i1 %437, label %438, label %459
438: ; preds = %435
%439 = load double*, double** %26
%440 = getelementptr inbounds double, double* %439, i64 0
%441 = load double, double* %440
%442 = load double, double* %37
%443 = fadd double %442, %441
store double %443, double* %37
%444 = load double*, double** %26
%445 = getelementptr inbounds double, double* %444, i64 1
%446 = load double, double* %445
%447 = load double, double* %39
%448 = fadd double %447, %446
store double %448, double* %39
%449 = load double*, double** %26
%450 = getelementptr inbounds double, double* %449, i64 4
%451 = load double, double* %450
%452 = load double, double* %38
%453 = fadd double %452, %451
store double %453, double* %38
%454 = load double*, double** %26
%455 = getelementptr inbounds double, double* %454, i64 5
%456 = load double, double* %455
%457 = load double, double* %40
%458 = fadd double %457, %456
store double %458, double* %40
br label %459
459: ; preds = %438, %435
%460 = load i32, i32* %29
%461 = icmp ne i32 %460, 0
br i1 %461, label %462, label %518
462: ; preds = %459
%463 = load double*, double** %30
%464 = getelementptr inbounds double, double* %463, i64 0
%465 = load double, double* %464
store double %465, double* %41
%466 = load double, double* %41
%467 = load double, double* %37
%468 = fmul double %467, %466
store double %468, double* %37
%469 = load double, double* %41
%470 = load double, double* %39
%471 = fmul double %470, %469
store double %471, double* %39
%472 = load double, double* %37
%473 = load double*, double** %27
%474 = getelementptr inbounds double, double* %473, i64 0
store double %472, double* %474
%475 = load i32, i32* %16
%476 = icmp sge i32 %475, 2
br i1 %476, label %477, label %481
477: ; preds = %462
%478 = load double, double* %39
%479 = load double*, double** %27
%480 = getelementptr inbounds double, double* %479, i64 1
store double %478, double* %480
br label %481
481: ; preds = %477, %462
%482 = load i32, i32* %17
%483 = icmp eq i32 %482, 1
br i1 %483, label %484, label %485
484: ; preds = %481
br label %576
485: ; preds = %481
%486 = load double*, double** %28
%487 = getelementptr inbounds double, double* %486, i64 1
%488 = load double, double* %487
store double %488, double* %42
%489 = load double*, double** %30
%490 = getelementptr inbounds double, double* %489, i64 1
%491 = load double, double* %490
store double %491, double* %43
%492 = load double, double* %37
%493 = load double, double* %42
%494 = load double, double* %38
%495 = fneg double %492
%496 = call double @llvm.fmuladd.f64(double %495, double %493, double %494)
store double %496, double* %38
%497 = load double, double* %39
%498 = load double, double* %42
%499 = load double, double* %40
%500 = fneg double %497
%501 = call double @llvm.fmuladd.f64(double %500, double %498, double %499)
store double %501, double* %40
%502 = load double, double* %43
%503 = load double, double* %38
%504 = fmul double %503, %502
store double %504, double* %38
%505 = load double, double* %43
%506 = load double, double* %40
%507 = fmul double %506, %505
store double %507, double* %40
%508 = load double, double* %38
%509 = load double*, double** %27
%510 = getelementptr inbounds double, double* %509, i64 4
store double %508, double* %510
%511 = load i32, i32* %16
%512 = icmp sge i32 %511, 2
br i1 %512, label %513, label %517
513: ; preds = %485
%514 = load double, double* %40
%515 = load double*, double** %27
%516 = getelementptr inbounds double, double* %515, i64 5
store double %514, double* %516
br label %517
517: ; preds = %513, %485
br label %576
518: ; preds = %459
%519 = load double*, double** %28
%520 = getelementptr inbounds double, double* %519, i64 0
%521 = load double, double* %520
%522 = fdiv double 1.000000e+00, %521
store double %522, double* %41
%523 = load double, double* %41
%524 = load double, double* %37
%525 = fmul double %524, %523
store double %525, double* %37
%526 = load double, double* %41
%527 = load double, double* %39
%528 = fmul double %527, %526
store double %528, double* %39
%529 = load double, double* %37
%530 = load double*, double** %27
%531 = getelementptr inbounds double, double* %530, i64 0
store double %529, double* %531
%532 = load i32, i32* %16
%533 = icmp sge i32 %532, 2
br i1 %533, label %534, label %538
534: ; preds = %518
%535 = load double, double* %39
%536 = load double*, double** %27
%537 = getelementptr inbounds double, double* %536, i64 1
store double %535, double* %537
br label %538
538: ; preds = %534, %518
%539 = load i32, i32* %17
%540 = icmp eq i32 %539, 1
br i1 %540, label %541, label %542
541: ; preds = %538
br label %576
542: ; preds = %538
%543 = load double*, double** %28
%544 = getelementptr inbounds double, double* %543, i64 1
%545 = load double, double* %544
store double %545, double* %42
%546 = load double*, double** %28
%547 = getelementptr inbounds double, double* %546, i64 5
%548 = load double, double* %547
%549 = fdiv double 1.000000e+00, %548
store double %549, double* %43
%550 = load double, double* %37
%551 = load double, double* %42
%552 = load double, double* %38
%553 = fneg double %550
%554 = call double @llvm.fmuladd.f64(double %553, double %551, double %552)
store double %554, double* %38
%555 = load double, double* %39
%556 = load double, double* %42
%557 = load double, double* %40
%558 = fneg double %555
%559 = call double @llvm.fmuladd.f64(double %558, double %556, double %557)
store double %559, double* %40
%560 = load double, double* %43
%561 = load double, double* %38
%562 = fmul double %561, %560
store double %562, double* %38
%563 = load double, double* %43
%564 = load double, double* %40
%565 = fmul double %564, %563
store double %565, double* %40
%566 = load double, double* %38
%567 = load double*, double** %27
%568 = getelementptr inbounds double, double* %567, i64 4
store double %566, double* %568
%569 = load i32, i32* %16
%570 = icmp sge i32 %569, 2
br i1 %570, label %571, label %575
571: ; preds = %542
%572 = load double, double* %40
%573 = load double*, double** %27
%574 = getelementptr inbounds double, double* %573, i64 5
store double %572, double* %574
br label %575
575: ; preds = %571, %542
br label %576
576: ; preds = %484, %541, %575, %517
ret void
}

LLVM IR (-O2):
define void @kernel_dgemm_dtrsm_nt_2x2_vs_lib4_new(i32 %0, i32 %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5, i32 %6, double* nocapture %7, double* nocapture %8, i32 %9, double* nocapture %10, double* nocapture writeonly %11, double* nocapture %12, i32 %13, double* nocapture %14) {
%16 = icmp sgt i32 %2, 0
br i1 %16, label %17, label %151
17: ; preds = %15
%18 = icmp eq i32 %3, 1
br i1 %18, label %19, label %43
19: ; preds = %17
%20 = icmp ugt i32 %2, 1
%21 = load double, double* %4
%22 = bitcast double* %5 to <2 x double>*
%23 = load <2 x double>, <2 x double>* %22
%24 = insertelement <2 x double> poison, double %21, i64 0
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> zeroinitializer
%26 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %25, <2 x double> %23, <2 x double> zeroinitializer)
br i1 %20, label %27, label %43
27: ; preds = %19
%28 = getelementptr inbounds double, double* %4, i64 4
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %4, i64 5
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %5, i64 4
%33 = bitcast double* %32 to <2 x double>*
%34 = load <2 x double>, <2 x double>* %33
%35 = insertelement <2 x double> poison, double %29, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %36, <2 x double> %34, <2 x double> %26)
%38 = insertelement <2 x double> poison, double %31, i64 0
%39 = shufflevector <2 x double> %38, <2 x double> poison, <2 x i32> zeroinitializer
%40 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %34, <2 x double> zeroinitializer)
%41 = getelementptr inbounds double, double* %4, i64 8
%42 = getelementptr inbounds double, double* %5, i64 8
br label %43
43: ; preds = %19, %27, %17
%44 = phi double* [ %42, %27 ], [ %5, %17 ], [ %5, %19 ]
%45 = phi double* [ %41, %27 ], [ %4, %17 ], [ %4, %19 ]
%46 = phi i32 [ 2, %27 ], [ 0, %17 ], [ 1, %19 ]
%47 = phi <2 x double> [ %40, %27 ], [ zeroinitializer, %17 ], [ zeroinitializer, %19 ]
%48 = phi <2 x double> [ %37, %27 ], [ zeroinitializer, %17 ], [ %26, %19 ]
%49 = add nsw i32 %2, -3
%50 = icmp slt i32 %46, %49
br i1 %50, label %67, label %60
51: ; preds = %67
%52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %77, <2 x double> %71)
%53 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %90, <2 x double> %52)
%54 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %108, <2 x double> %103, <2 x double> %53)
%55 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %121, <2 x double> %116, <2 x double> %54)
%56 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %79, <2 x double> %77, <2 x double> %72)
%57 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> %90, <2 x double> %56)
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %105, <2 x double> %103, <2 x double> %57)
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %118, <2 x double> %116, <2 x double> %58)
br label %60
60: ; preds = %51, %43
%61 = phi double* [ %44, %43 ], [ %124, %51 ]
%62 = phi double* [ %45, %43 ], [ %123, %51 ]
%63 = phi i32 [ %46, %43 ], [ %125, %51 ]
%64 = phi <2 x double> [ %47, %43 ], [ %55, %51 ]
%65 = phi <2 x double> [ %48, %43 ], [ %59, %51 ]
%66 = icmp slt i32 %63, %2
br i1 %66, label %127, label %151
67: ; preds = %43, %67
%68 = phi i32 [ %125, %67 ], [ %46, %43 ]
%69 = phi double* [ %123, %67 ], [ %45, %43 ]
%70 = phi double* [ %124, %67 ], [ %44, %43 ]
%71 = phi <2 x double> [ %122, %67 ], [ %47, %43 ]
%72 = phi <2 x double> [ %119, %67 ], [ %48, %43 ]
%73 = load double, double* %69
%74 = getelementptr inbounds double, double* %69, i64 1
%75 = load double, double* %74
%76 = bitcast double* %70 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = insertelement <2 x double> poison, double %73, 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> %79, <2 x double> %77, <2 x double> %72)
%81 = insertelement <2 x double> poison, double %75, 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> %82, <2 x double> %77, <2 x double> %71)
%84 = getelementptr inbounds double, double* %69, i64 4
%85 = load double, double* %84
%86 = getelementptr inbounds double, double* %69, i64 5
%87 = load double, double* %86
%88 = getelementptr inbounds double, double* %70, i64 4
%89 = bitcast double* %88 to <2 x double>*
%90 = load <2 x double>, <2 x double>* %89
%91 = insertelement <2 x double> poison, double %85, i64 0
%92 = shufflevector <2 x double> %91, <2 x double> poison, <2 x i32> zeroinitializer
%93 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> %90, <2 x double> %80)
%94 = insertelement <2 x double> poison, double %87, i64 0
%95 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> zeroinitializer
%96 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %90, <2 x double> %83)
%97 = getelementptr inbounds double, double* %69, i64 8
%98 = load double, double* %97
%99 = getelementptr inbounds double, double* %69, i64 9
%100 = load double, double* %99
%101 = getelementptr inbounds double, double* %70, i64 8
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = insertelement <2 x double> poison, double %98, 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> %105, <2 x double> %103, <2 x double> %93)
%107 = insertelement <2 x double> poison, double %100, 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> %108, <2 x double> %103, <2 x double> %96)
%110 = getelementptr inbounds double, double* %69, i64 12
%111 = load double, double* %110
%112 = getelementptr inbounds double, double* %69, i64 13
%113 = load double, double* %112
%114 = getelementptr inbounds double, double* %70, i64 12
%115 = bitcast double* %114 to <2 x double>*
%116 = load <2 x double>, <2 x double>* %115
%117 = insertelement <2 x double> poison, double %111, i64 0
%118 = shufflevector <2 x double> %117, <2 x double> poison, <2 x i32> zeroinitializer
%119 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %118, <2 x double> %116, <2 x double> %106)
%120 = insertelement <2 x double> poison, double %113, i64 0
%121 = shufflevector <2 x double> %120, <2 x double> poison, <2 x i32> zeroinitializer
%122 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %121, <2 x double> %116, <2 x double> %109)
%123 = getelementptr inbounds double, double* %69, i64 16
%124 = getelementptr inbounds double, double* %70, i64 16
%125 = add nuw nsw i32 %68, 4
%126 = icmp slt i32 %125, %49
br i1 %126, label %67, label %51
127: ; preds = %60, %127
%128 = phi i32 [ %146, %127 ], [ %63, %60 ]
%129 = phi double* [ %144, %127 ], [ %62, %60 ]
%130 = phi double* [ %145, %127 ], [ %61, %60 ]
%131 = phi <2 x double> [ %143, %127 ], [ %64, %60 ]
%132 = phi <2 x double> [ %140, %127 ], [ %65, %60 ]
%133 = load double, double* %129
%134 = getelementptr inbounds double, double* %129, i64 1
%135 = load double, double* %134
%136 = bitcast double* %130 to <2 x double>*
%137 = load <2 x double>, <2 x double>* %136
%138 = insertelement <2 x double> poison, double %133, i64 0
%139 = shufflevector <2 x double> %138, <2 x double> poison, <2 x i32> zeroinitializer
%140 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %139, <2 x double> %137, <2 x double> %132)
%141 = insertelement <2 x double> poison, double %135, i64 0
%142 = shufflevector <2 x double> %141, <2 x double> poison, <2 x i32> zeroinitializer
%143 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %142, <2 x double> %137, <2 x double> %131)
%144 = getelementptr inbounds double, double* %129, i64 4
%145 = getelementptr inbounds double, double* %130, i64 4
%146 = add nuw nsw i32 %128, 1
%147 = icmp eq i32 %146, %2
br i1 %147, label %148, label %127
148: ; preds = %127
%149 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %142, <2 x double> %137, <2 x double> %131)
%150 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %139, <2 x double> %137, <2 x double> %132)
br label %151
151: ; preds = %148, %60, %15
%152 = phi <2 x double> [ zeroinitializer, %15 ], [ %64, %60 ], [ %149, %148 ]
%153 = phi <2 x double> [ zeroinitializer, %15 ], [ %65, %60 ], [ %150, %148 ]
%154 = add nsw i32 %6, -3
%155 = icmp sgt i32 %6, 3
br i1 %155, label %156, label %233
156: ; preds = %151, %156
%157 = phi i32 [ %222, %156 ], [ 0, %151 ]
%158 = phi double* [ %220, %156 ], [ %7, %151 ]
%159 = phi double* [ %221, %156 ], [ %8, %151 ]
%160 = phi <2 x double> [ %219, %156 ], [ %152, %151 ]
%161 = phi <2 x double> [ %216, %156 ], [ %153, %151 ]
%162 = load double, double* %158
%163 = getelementptr inbounds double, double* %158, i64 1
%164 = load double, double* %163
%165 = bitcast double* %159 to <2 x double>*
%166 = load <2 x double>, <2 x double>* %165
%167 = fneg double %162
%168 = fneg double %164
%169 = insertelement <2 x double> poison, double %167, i64 0
%170 = shufflevector <2 x double> %169, <2 x double> poison, <2 x i32> zeroinitializer
%171 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %170, <2 x double> %166, <2 x double> %161)
%172 = insertelement <2 x double> poison, double %168, i64 0
%173 = shufflevector <2 x double> %172, <2 x double> poison, <2 x i32> zeroinitializer
%174 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %173, <2 x double> %166, <2 x double> %160)
%175 = getelementptr inbounds double, double* %158, i64 4
%176 = load double, double* %175
%177 = getelementptr inbounds double, double* %158, i64 5
%178 = load double, double* %177
%179 = getelementptr inbounds double, double* %159, i64 4
%180 = bitcast double* %179 to <2 x double>*
%181 = load <2 x double>, <2 x double>* %180
%182 = fneg double %176
%183 = fneg double %178
%184 = insertelement <2 x double> poison, double %182, i64 0
%185 = shufflevector <2 x double> %184, <2 x double> poison, <2 x i32> zeroinitializer
%186 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %185, <2 x double> %181, <2 x double> %171)
%187 = insertelement <2 x double> poison, double %183, i64 0
%188 = shufflevector <2 x double> %187, <2 x double> poison, <2 x i32> zeroinitializer
%189 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %188, <2 x double> %181, <2 x double> %174)
%190 = getelementptr inbounds double, double* %158, i64 8
%191 = load double, double* %190
%192 = getelementptr inbounds double, double* %158, i64 9
%193 = load double, double* %192
%194 = getelementptr inbounds double, double* %159, i64 8
%195 = bitcast double* %194 to <2 x double>*
%196 = load <2 x double>, <2 x double>* %195
%197 = fneg double %191
%198 = fneg double %193
%199 = insertelement <2 x double> poison, double %197, i64 0
%200 = shufflevector <2 x double> %199, <2 x double> poison, <2 x i32> zeroinitializer
%201 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %200, <2 x double> %196, <2 x double> %186)
%202 = insertelement <2 x double> poison, double %198, i64 0
%203 = shufflevector <2 x double> %202, <2 x double> poison, <2 x i32> zeroinitializer
%204 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %203, <2 x double> %196, <2 x double> %189)
%205 = getelementptr inbounds double, double* %158, i64 12
%206 = load double, double* %205
%207 = getelementptr inbounds double, double* %158, i64 13
%208 = load double, double* %207
%209 = getelementptr inbounds double, double* %159, i64 12
%210 = bitcast double* %209 to <2 x double>*
%211 = load <2 x double>, <2 x double>* %210
%212 = fneg double %206
%213 = fneg double %208
%214 = insertelement <2 x double> poison, double %212, i64 0
%215 = shufflevector <2 x double> %214, <2 x double> poison, <2 x i32> zeroinitializer
%216 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %215, <2 x double> %211, <2 x double> %201)
%217 = insertelement <2 x double> poison, double %213, i64 0
%218 = shufflevector <2 x double> %217, <2 x double> poison, <2 x i32> zeroinitializer
%219 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %218, <2 x double> %211, <2 x double> %204)
%220 = getelementptr inbounds double, double* %158, i64 16
%221 = getelementptr inbounds double, double* %159, i64 16
%222 = add nuw nsw i32 %157, 4
%223 = icmp slt i32 %222, %154
br i1 %223, label %156, label %224
224: ; preds = %156
%225 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %173, <2 x double> %166, <2 x double> %160)
%226 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %188, <2 x double> %181, <2 x double> %225)
%227 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %203, <2 x double> %196, <2 x double> %226)
%228 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %218, <2 x double> %211, <2 x double> %227)
%229 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %170, <2 x double> %166, <2 x double> %161)
%230 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %185, <2 x double> %181, <2 x double> %229)
%231 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %200, <2 x double> %196, <2 x double> %230)
%232 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %215, <2 x double> %211, <2 x double> %231)
br label %233
233: ; preds = %224, %151
%234 = phi <2 x double> [ %152, %151 ], [ %228, %224 ]
%235 = phi <2 x double> [ %153, %151 ], [ %232, %224 ]
%236 = icmp eq i32 %9, 0
br i1 %236, label %251, label %237
237: ; preds = %233
%238 = load double, double* %10
%239 = getelementptr inbounds double, double* %10, i64 1
%240 = load double, double* %239
%241 = getelementptr inbounds double, double* %10, i64 4
%242 = load double, double* %241
%243 = insertelement <2 x double> poison, double %238, i64 0
%244 = insertelement <2 x double> %243, double %242, i64 1
%245 = fadd <2 x double> %235, %244
%246 = getelementptr inbounds double, double* %10, i64 5
%247 = load double, double* %246
%248 = insertelement <2 x double> poison, double %240, i64 0
%249 = insertelement <2 x double> %248, double %247, i64 1
%250 = fadd <2 x double> %234, %249
br label %251
251: ; preds = %237, %233
%252 = phi <2 x double> [ %250, %237 ], [ %234, %233 ]
%253 = phi <2 x double> [ %245, %237 ], [ %235, %233 ]
%254 = icmp eq i32 %13, 0
br i1 %254, label %276, label %255
255: ; preds = %251
%256 = load double, double* %14
%257 = extractelement <2 x double> %253, i64 0
%258 = fmul double %257, %256
%259 = extractelement <2 x double> %252, i64 0
%260 = fmul double %259, %256
store double %258, double* %11
%261 = icmp sgt i32 %0, 1
br i1 %261, label %262, label %264
262: ; preds = %255
%263 = getelementptr inbounds double, double* %11, i64 1
store double %260, double* %263
br label %264
264: ; preds = %262, %255
%265 = icmp eq i32 %1, 1
br i1 %265, label %308, label %266
266: ; preds = %264
%267 = getelementptr inbounds double, double* %12, i64 1
%268 = load double, double* %267
%269 = getelementptr inbounds double, double* %14, i64 1
%270 = load double, double* %269
%271 = fneg double %258
%272 = extractelement <2 x double> %253, i64 1
%273 = tail call double @llvm.fmuladd.f64(double %271, double %268, double %272)
%274 = fmul double %273, %270
%275 = getelementptr inbounds double, double* %11, i64 4
store double %274, double* %275
br i1 %261, label %299, label %308
276: ; preds = %251
%277 = load double, double* %12
%278 = fdiv double 1.000000e+00, %277
%279 = extractelement <2 x double> %253, i64 0
%280 = fmul double %279, %278
%281 = extractelement <2 x double> %252, i64 0
%282 = fmul double %281, %278
store double %280, double* %11
%283 = icmp sgt i32 %0, 1
br i1 %283, label %284, label %286
284: ; preds = %276
%285 = getelementptr inbounds double, double* %11, i64 1
store double %282, double* %285
br label %286
286: ; preds = %284, %276
%287 = icmp eq i32 %1, 1
br i1 %287, label %308, label %288
288: ; preds = %286
%289 = getelementptr inbounds double, double* %12, i64 1
%290 = load double, double* %289
%291 = getelementptr inbounds double, double* %12, i64 5
%292 = load double, double* %291
%293 = fdiv double 1.000000e+00, %292
%294 = fneg double %280
%295 = extractelement <2 x double> %253, i64 1
%296 = tail call double @llvm.fmuladd.f64(double %294, double %290, double %295)
%297 = fmul double %296, %293
%298 = getelementptr inbounds double, double* %11, i64 4
store double %297, double* %298
br i1 %283, label %299, label %308
299: ; preds = %288, %266
%300 = phi double [ %260, %266 ], [ %282, %288 ]
%301 = phi double [ %268, %266 ], [ %290, %288 ]
%302 = phi double [ %270, %266 ], [ %293, %288 ]
%303 = fneg double %300
%304 = extractelement <2 x double> %252, i64 1
%305 = tail call double @llvm.fmuladd.f64(double %303, double %301, double %304)
%306 = fmul double %305, %302
%307 = getelementptr inbounds double, double* %11, i64 5
store double %306, double* %307
br label %308
308: ; preds = %299, %266, %288, %286, %264
ret void
}