void kernel_dgemm_nt_2x2_vs_lib4(int km, int kn, int kmax, double *A, double *B,
                                 double *C, double *D, int alg, int tc,
                                 int td) {
  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;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    b_0 = B[0 + bs * 0];
    b_1 = B[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 = A[0 + bs * 1];
    a_1 = A[1 + bs * 1];
    b_0 = B[0 + bs * 1];
    b_1 = B[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 = A[0 + bs * 2];
    a_1 = A[1 + bs * 2];
    b_0 = B[0 + bs * 2];
    b_1 = B[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 = A[0 + bs * 3];
    a_1 = A[1 + bs * 3];
    b_0 = B[0 + bs * 3];
    b_1 = B[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;
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    b_0 = B[0 + bs * 0];
    b_1 = B[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 += 4;
    B += 4;
  }
  double d_00, d_01, d_10, d_11;
  if (alg == 0) {
    if (td == 0) {
      goto store_n;
    } else {
      goto store_t;
    }
  } else {
    if (tc == 0) {
      d_00 = C[0 + bs * 0];
      d_10 = C[1 + bs * 0];
      d_01 = C[0 + bs * 1];
      d_11 = C[1 + bs * 1];
    } else {
      d_00 = C[0 + bs * 0];
      d_01 = C[1 + bs * 0];
      d_10 = C[0 + bs * 1];
      d_11 = C[1 + bs * 1];
    }
    if (alg == 1) {
      c_00 = d_00 + c_00;
      c_10 = d_10 + c_10;
      c_01 = d_01 + c_01;
      c_11 = d_11 + c_11;
    } else {
      c_00 = d_00 - c_00;
      c_10 = d_10 - c_10;
      c_01 = d_01 - c_01;
      c_11 = d_11 - c_11;
    }
    if (td == 0) {
      goto store_n;
    } else {
      goto store_t;
    }
  }
store_n:
  if (km >= 2) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    if (kn >= 2) {
      D[0 + bs * 1] = c_01;
      D[1 + bs * 1] = c_11;
    }
  } else {
    D[0 + bs * 0] = c_00;
    if (kn >= 2) {
      D[0 + bs * 1] = c_01;
    }
  }
  return;
store_t:
  if (kn >= 2) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_01;
    if (km >= 2) {
      D[0 + bs * 1] = c_10;
      D[1 + bs * 1] = c_11;
    }
  } else {
    D[0 + bs * 0] = c_00;
    if (km >= 2) {
      D[0 + bs * 1] = c_10;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_2x2_vs_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1431 <kernel_dgemm_nt_2x2_vs_lib4+0x331>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    1158 <kernel_dgemm_nt_2x2_vs_lib4+0x58>
jmp    1436 <kernel_dgemm_nt_2x2_vs_lib4+0x336>
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    150e <kernel_dgemm_nt_2x2_vs_lib4+0x40e>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1436 <kernel_dgemm_nt_2x2_vs_lib4+0x336>
cmpl   $0x0,0x18(%rbp)
jne    152c <kernel_dgemm_nt_2x2_vs_lib4+0x42c>
cmpl   $0x0,0x28(%rbp)
jne    1527 <kernel_dgemm_nt_2x2_vs_lib4+0x427>
jmp    165c <kernel_dgemm_nt_2x2_vs_lib4+0x55c>
jmp    16db <kernel_dgemm_nt_2x2_vs_lib4+0x5db>
cmpl   $0x0,0x20(%rbp)
jne    1578 <kernel_dgemm_nt_2x2_vs_lib4+0x478>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15b5 <kernel_dgemm_nt_2x2_vs_lib4+0x4b5>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cmpl   $0x1,0x18(%rbp)
jne    1606 <kernel_dgemm_nt_2x2_vs_lib4+0x506>
movsd  -0x78(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    1648 <kernel_dgemm_nt_2x2_vs_lib4+0x548>
movsd  -0x78(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x0,0x28(%rbp)
jne    1657 <kernel_dgemm_nt_2x2_vs_lib4+0x557>
jmp    165c <kernel_dgemm_nt_2x2_vs_lib4+0x55c>
jmp    16db <kernel_dgemm_nt_2x2_vs_lib4+0x5db>
cmpl   $0x2,-0x4(%rbp)
jl     16ac <kernel_dgemm_nt_2x2_vs_lib4+0x5ac>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x8(%rbp)
jl     16a7 <kernel_dgemm_nt_2x2_vs_lib4+0x5a7>
movsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    16d6 <kernel_dgemm_nt_2x2_vs_lib4+0x5d6>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x8(%rbp)
jl     16d1 <kernel_dgemm_nt_2x2_vs_lib4+0x5d1>
movsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
jmp    16d6 <kernel_dgemm_nt_2x2_vs_lib4+0x5d6>
jmp    175a <kernel_dgemm_nt_2x2_vs_lib4+0x65a>
cmpl   $0x2,-0x8(%rbp)
jl     172b <kernel_dgemm_nt_2x2_vs_lib4+0x62b>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1726 <kernel_dgemm_nt_2x2_vs_lib4+0x626>
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    1755 <kernel_dgemm_nt_2x2_vs_lib4+0x655>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1750 <kernel_dgemm_nt_2x2_vs_lib4+0x650>
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
jmp    1755 <kernel_dgemm_nt_2x2_vs_lib4+0x655>
jmp    175a <kernel_dgemm_nt_2x2_vs_lib4+0x65a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nt_2x2_vs_lib4>:
cmp    $0x4,%edx
jl     11f3 <kernel_dgemm_nt_2x2_vs_lib4+0xf3>
lea    -0x3(%rdx),%r10d
xorpd  %xmm3,%xmm3
xor    %eax,%eax
xorpd  %xmm5,%xmm5
nopw   0x0(%rax,%rax,1)
movupd (%rcx),%xmm4
movupd 0x20(%rcx),%xmm6
movupd 0x40(%rcx),%xmm9
movupd 0x60(%rcx),%xmm8
movsd  (%r8),%xmm7
movsd  0x8(%r8),%xmm2
movsd  0x20(%r8),%xmm0
movsd  0x28(%r8),%xmm1
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm5,%xmm7
unpcklpd %xmm2,%xmm2
mulpd  %xmm4,%xmm2
addpd  %xmm3,%xmm2
unpcklpd %xmm0,%xmm0
mulpd  %xmm6,%xmm0
addpd  %xmm7,%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm6,%xmm1
addpd  %xmm2,%xmm1
movsd  0x40(%r8),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm9,%xmm4
addpd  %xmm0,%xmm4
movsd  0x48(%r8),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm9,%xmm6
addpd  %xmm1,%xmm6
movsd  0x60(%r8),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm8,%xmm1
movapd %xmm1,%xmm5
addpd  %xmm4,%xmm5
movsd  0x68(%r8),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm3
addpd  %xmm6,%xmm3
sub    $0xffffffffffffff80,%rcx
sub    $0xffffffffffffff80,%r8
add    $0x4,%eax
cmp    %r10d,%eax
jl     1120 <kernel_dgemm_nt_2x2_vs_lib4+0x20>
addpd  %xmm6,%xmm0
addpd  %xmm4,%xmm1
mov    %edx,%eax
and    $0xfffffffc,%eax
jmp    11fd <kernel_dgemm_nt_2x2_vs_lib4+0xfd>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
xorpd  %xmm1,%xmm1
mov    0x10(%rsp),%r10d
cmp    %edx,%eax
jge    1263 <kernel_dgemm_nt_2x2_vs_lib4+0x163>
sub    %eax,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movapd %xmm1,%xmm2
movapd %xmm0,%xmm3
movupd (%rcx,%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    1210 <kernel_dgemm_nt_2x2_vs_lib4+0x110>
addpd  %xmm3,%xmm5
addpd  %xmm2,%xmm4
movapd %xmm5,%xmm0
movapd %xmm4,%xmm1
mov    0x20(%rsp),%r11d
mov    0x8(%rsp),%r8
test   %r10d,%r10d
je     12b3 <kernel_dgemm_nt_2x2_vs_lib4+0x1b3>
lea    0x20(%r9),%rdx
lea    0x8(%r9),%rcx
cmpl   $0x0,0x18(%rsp)
movsd  (%r9),%xmm2
movsd  0x28(%r9),%xmm3
mov    %rdx,%rax
cmove  %rcx,%rax
movsd  (%rax),%xmm5
cmove  %rdx,%rcx
movsd  (%rcx),%xmm4
unpcklpd %xmm5,%xmm2
cmp    $0x1,%r10d
jne    12de <kernel_dgemm_nt_2x2_vs_lib4+0x1de>
addpd  %xmm2,%xmm1
unpcklpd %xmm3,%xmm4
addpd  %xmm4,%xmm0
test   %r11d,%r11d
je     12f7 <kernel_dgemm_nt_2x2_vs_lib4+0x1f7>
movapd %xmm1,%xmm3
unpckhpd %xmm0,%xmm3
movapd %xmm0,%xmm2
movapd %xmm3,%xmm0
movsd  %xmm1,(%r8)
cmp    $0x2,%esi
jl     1322 <kernel_dgemm_nt_2x2_vs_lib4+0x222>
movsd  %xmm2,0x8(%r8)
cmp    $0x1,%edi
jg     130c <kernel_dgemm_nt_2x2_vs_lib4+0x20c>
ret
subpd  %xmm1,%xmm2
unpcklpd %xmm3,%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
movapd %xmm2,%xmm1
test   %r11d,%r11d
jne    12b8 <kernel_dgemm_nt_2x2_vs_lib4+0x1b8>
movlpd %xmm1,(%r8)
cmp    $0x2,%edi
jl     1329 <kernel_dgemm_nt_2x2_vs_lib4+0x229>
movhpd %xmm1,0x8(%r8)
cmp    $0x1,%esi
jle    12dd <kernel_dgemm_nt_2x2_vs_lib4+0x1dd>
movlpd %xmm0,0x20(%r8)
unpckhpd %xmm0,%xmm0
mov    $0x5,%eax
movsd  %xmm0,(%r8,%rax,8)
ret
cmp    $0x1,%edi
jle    12dd <kernel_dgemm_nt_2x2_vs_lib4+0x1dd>
jmp    132e <kernel_dgemm_nt_2x2_vs_lib4+0x22e>
cmp    $0x1,%esi
jle    12dd <kernel_dgemm_nt_2x2_vs_lib4+0x1dd>
mov    $0x4,%eax
movsd  %xmm0,(%r8,%rax,8)
ret

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

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