void kernel_dgemm_dtrsm_nt_2x2_vs_lib4(int km, int kn, int tri, int kadd,
                                       int ksub, double *Ap, double *Bp,
                                       double *Am, double *Bm, double *C,
                                       double *D, double *fact, int alg) {
  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 == 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;
  a_00 = fact[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 = fact[1];
  a_11 = fact[2];
  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>:
push   %rbp
mov    %rsp,%rbp
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%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,-0x10(%rbp)
jle    16db <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x5db>
cmpl   $0x1,-0xc(%rbp)
jne    131b <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x21b>
cmpl   $0x2,-0x10(%rbp)
jl     12ad <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x1ad>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x20(%rbp)
mov    0x10(%rbp),%rax
add    $0x40,%rax
mov    %rax,0x10(%rbp)
mov    -0x28(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x28(%rbp)
jmp    1316 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x216>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    131b <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x21b>
jmp    1320 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x220>
mov    -0x28(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    15f9 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x4f9>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,0x10(%rbp)
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    1320 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x220>
jmp    15fe <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x4fe>
mov    -0x28(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    16d6 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x5d6>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%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    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,0x10(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    15fe <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x4fe>
jmp    16db <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x5db>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1b2b <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xa2b>
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    16e2 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x5e2>
cmpl   $0x0,0x40(%rbp)
je     1b80 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xa80>
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x38(%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    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1bd0 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xad0>
movsd  -0x60(%rbp),%xmm0
mov    0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x1,-0x8(%rbp)
jne    1bdf <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xadf>
jmp    1ca5 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xba5>
mov    0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x38(%rbp),%rax
movsd  0x10(%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    0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1ca5 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xba5>
movsd  -0x68(%rbp),%xmm0
mov    0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_dtrsm_nt_2x2_vs_lib4>:
test   %ecx,%ecx
jle    116d <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x6d>
mov    0x8(%rsp),%rax
cmp    $0x1,%edx
jne    117a <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x7a>
movupd (%rax),%xmm1
movsd  (%r9),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
addpd  %xmm1,%xmm0
mov    $0x1,%edx
cmp    $0x2,%ecx
jb     1184 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x84>
movupd 0x20(%rax),%xmm1
movsd  0x20(%r9),%xmm2
movsd  0x28(%r9),%xmm3
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm2,%xmm0
unpcklpd %xmm3,%xmm3
mulpd  %xmm1,%xmm3
xorpd  %xmm1,%xmm1
addpd  %xmm3,%xmm1
add    $0x40,%r9
add    $0x40,%rax
mov    $0x2,%edx
jmp    1184 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x84>
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
jmp    12d3 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x1d3>
xorpd  %xmm1,%xmm1
xor    %edx,%edx
xorpd  %xmm0,%xmm0
lea    -0x3(%rcx),%r10d
cmp    %r10d,%edx
jge    1274 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x174>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%rax),%xmm3
movupd 0x20(%rax),%xmm5
movupd 0x40(%rax),%xmm9
movupd 0x60(%rax),%xmm8
movsd  (%r9),%xmm7
movsd  0x8(%r9),%xmm2
movsd  0x20(%r9),%xmm4
movsd  0x28(%r9),%xmm6
unpcklpd %xmm7,%xmm7
mulpd  %xmm3,%xmm7
addpd  %xmm0,%xmm7
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm1,%xmm2
unpcklpd %xmm4,%xmm4
mulpd  %xmm5,%xmm4
addpd  %xmm7,%xmm4
unpcklpd %xmm6,%xmm6
mulpd  %xmm5,%xmm6
addpd  %xmm2,%xmm6
movsd  0x40(%r9),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm9,%xmm3
addpd  %xmm4,%xmm3
movsd  0x48(%r9),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm9,%xmm5
addpd  %xmm6,%xmm5
movsd  0x60(%r9),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm8,%xmm4
movapd %xmm4,%xmm0
addpd  %xmm3,%xmm0
movsd  0x68(%r9),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm8,%xmm6
movapd %xmm6,%xmm1
addpd  %xmm5,%xmm1
sub    $0xffffffffffffff80,%r9
sub    $0xffffffffffffff80,%rax
add    $0x4,%edx
cmp    %r10d,%edx
jl     11a0 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0xa0>
addpd  %xmm5,%xmm6
addpd  %xmm3,%xmm4
movapd %xmm6,%xmm1
movapd %xmm4,%xmm0
cmp    %ecx,%edx
jge    12d3 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x1d3>
sub    %edx,%ecx
xor    %edx,%edx
nopl   0x0(%rax)
movapd %xmm0,%xmm2
movapd %xmm1,%xmm3
movupd (%rax,%rdx,1),%xmm1
movsd  (%r9,%rdx,1),%xmm4
movsd  0x8(%r9,%rdx,1),%xmm5
unpcklpd %xmm4,%xmm4
mulpd  %xmm1,%xmm4
movapd %xmm4,%xmm0
addpd  %xmm2,%xmm0
unpcklpd %xmm5,%xmm5
mulpd  %xmm1,%xmm5
movapd %xmm5,%xmm1
addpd  %xmm3,%xmm1
add    $0x20,%rdx
add    $0xffffffff,%ecx
jne    1280 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x180>
addpd  %xmm3,%xmm5
addpd  %xmm2,%xmm4
movapd %xmm5,%xmm1
movapd %xmm4,%xmm0
mov    0x38(%rsp),%r9d
cmp    $0x4,%r8d
jl     1497 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x397>
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%rdx
add    $0xfffffffd,%r8d
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm0,-0x18(%rsp)
movapd %xmm1,%xmm10
movupd (%r10,%rax,1),%xmm14
movupd 0x20(%r10,%rax,1),%xmm13
movupd 0x40(%r10,%rax,1),%xmm12
movupd 0x60(%r10,%rax,1),%xmm11
movsd  (%rdx,%rax,1),%xmm2
movsd  0x8(%rdx,%rax,1),%xmm4
movsd  0x20(%rdx,%rax,1),%xmm15
movsd  0x28(%rdx,%rax,1),%xmm7
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
mulpd  %xmm14,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm4,%xmm3
unpcklpd %xmm4,%xmm3
mulpd  %xmm14,%xmm3
subpd  %xmm3,%xmm1
movapd %xmm15,%xmm3
unpcklpd %xmm15,%xmm3
mulpd  %xmm13,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm7,%xmm3
unpcklpd %xmm7,%xmm3
mulpd  %xmm13,%xmm3
subpd  %xmm3,%xmm1
movsd  0x40(%rdx,%rax,1),%xmm5
movsd  0x48(%rdx,%rax,1),%xmm6
movapd %xmm5,%xmm3
unpcklpd %xmm5,%xmm3
mulpd  %xmm12,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
mulpd  %xmm12,%xmm3
subpd  %xmm3,%xmm1
movsd  0x60(%rdx,%rax,1),%xmm9
movsd  0x68(%rdx,%rax,1),%xmm8
movapd %xmm9,%xmm3
unpcklpd %xmm9,%xmm3
mulpd  %xmm11,%xmm3
subpd  %xmm3,%xmm0
movapd %xmm8,%xmm3
unpcklpd %xmm8,%xmm3
mulpd  %xmm11,%xmm3
subpd  %xmm3,%xmm1
add    $0x4,%ecx
sub    $0xffffffffffffff80,%rax
cmp    %r8d,%ecx
jl     1300 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+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,%xmm0
pshufd $0x44,%xmm8,%xmm1
mulpd  %xmm14,%xmm3
addpd  %xmm10,%xmm3
mulpd  %xmm13,%xmm7
addpd  %xmm3,%xmm7
mulpd  %xmm12,%xmm6
addpd  %xmm7,%xmm6
mulpd  %xmm11,%xmm1
addpd  %xmm6,%xmm1
mulpd  %xmm14,%xmm2
addpd  -0x18(%rsp),%xmm2
mulpd  %xmm13,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm12,%xmm5
addpd  %xmm4,%xmm5
mulpd  %xmm11,%xmm0
addpd  %xmm5,%xmm0
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%rax
test   %r9d,%r9d
je     14c6 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x3c6>
mov    0x20(%rsp),%rdx
movsd  (%rdx),%xmm2
movsd  0x8(%rdx),%xmm3
movhpd 0x20(%rdx),%xmm2
addpd  %xmm2,%xmm0
movhpd 0x28(%rdx),%xmm3
addpd  %xmm3,%xmm1
movsd  (%rcx),%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm2
movsd  %xmm3,(%rax)
cmp    $0x2,%edi
jl     14e4 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x3e4>
movsd  %xmm2,0x8(%rax)
cmp    $0x1,%esi
je     1522 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x422>
movsd  0x8(%rcx),%xmm5
movsd  0x10(%rcx),%xmm4
unpckhpd %xmm0,%xmm0
mulsd  %xmm5,%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,0x20(%rax)
cmp    $0x2,%edi
jl     1522 <kernel_dgemm_dtrsm_nt_2x2_vs_lib4+0x422>
unpckhpd %xmm1,%xmm1
mulsd  %xmm5,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm1
movsd  %xmm1,0x28(%rax)
ret

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

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