void kernel_dgemm_nn_2x2_vs_lib4(int km, int kn, int kmax, double *A, double *B,
                                 int sdb, 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[0 + 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 * 1];
    a_1 = A[1 + bs * 1];
    b_0 = B[1 + bs * 0];
    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[2 + bs * 0];
    b_1 = B[2 + 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 * 3];
    a_1 = A[1 + bs * 3];
    b_0 = B[3 + bs * 0];
    b_1 = B[3 + 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 += 16;
    B += 4 * sdb;
  }
  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[0 + 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 += 4;
    B += 1;
  }
  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_nn_2x2_vs_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
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    %r9d,-0x24(%rbp)
movl   $0x4,-0x28(%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,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    143f <kernel_dgemm_nn_2x2_vs_lib4+0x33f>
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  0x20(%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  0x8(%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  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x30(%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  0x18(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x38(%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    -0x24(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
jmp    115c <kernel_dgemm_nn_2x2_vs_lib4+0x5c>
jmp    1444 <kernel_dgemm_nn_2x2_vs_lib4+0x344>
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    151c <kernel_dgemm_nn_2x2_vs_lib4+0x41c>
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  0x20(%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    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1444 <kernel_dgemm_nn_2x2_vs_lib4+0x344>
cmpl   $0x0,0x20(%rbp)
jne    153a <kernel_dgemm_nn_2x2_vs_lib4+0x43a>
cmpl   $0x0,0x30(%rbp)
jne    1535 <kernel_dgemm_nn_2x2_vs_lib4+0x435>
jmp    166a <kernel_dgemm_nn_2x2_vs_lib4+0x56a>
jmp    16e9 <kernel_dgemm_nn_2x2_vs_lib4+0x5e9>
cmpl   $0x0,0x28(%rbp)
jne    1586 <kernel_dgemm_nn_2x2_vs_lib4+0x486>
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15c3 <kernel_dgemm_nn_2x2_vs_lib4+0x4c3>
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cmpl   $0x1,0x20(%rbp)
jne    1614 <kernel_dgemm_nn_2x2_vs_lib4+0x514>
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    1656 <kernel_dgemm_nn_2x2_vs_lib4+0x556>
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,0x30(%rbp)
jne    1665 <kernel_dgemm_nn_2x2_vs_lib4+0x565>
jmp    166a <kernel_dgemm_nn_2x2_vs_lib4+0x56a>
jmp    16e9 <kernel_dgemm_nn_2x2_vs_lib4+0x5e9>
cmpl   $0x2,-0x4(%rbp)
jl     16ba <kernel_dgemm_nn_2x2_vs_lib4+0x5ba>
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x8(%rbp)
jl     16b5 <kernel_dgemm_nn_2x2_vs_lib4+0x5b5>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    16e4 <kernel_dgemm_nn_2x2_vs_lib4+0x5e4>
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x8(%rbp)
jl     16df <kernel_dgemm_nn_2x2_vs_lib4+0x5df>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
jmp    16e4 <kernel_dgemm_nn_2x2_vs_lib4+0x5e4>
jmp    1768 <kernel_dgemm_nn_2x2_vs_lib4+0x668>
cmpl   $0x2,-0x8(%rbp)
jl     1739 <kernel_dgemm_nn_2x2_vs_lib4+0x639>
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     1734 <kernel_dgemm_nn_2x2_vs_lib4+0x634>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
jmp    1763 <kernel_dgemm_nn_2x2_vs_lib4+0x663>
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x4(%rbp)
jl     175e <kernel_dgemm_nn_2x2_vs_lib4+0x65e>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
jmp    1763 <kernel_dgemm_nn_2x2_vs_lib4+0x663>
jmp    1768 <kernel_dgemm_nn_2x2_vs_lib4+0x668>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nn_2x2_vs_lib4>:
cmp    $0x4,%edx
jl     1202 <kernel_dgemm_nn_2x2_vs_lib4+0x102>
lea    -0x3(%rdx),%r10d
shl    $0x2,%r9d
movslq %r9d,%r9
shl    $0x3,%r9
xorpd  %xmm4,%xmm4
xor    %eax,%eax
xorpd  %xmm5,%xmm5
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%rcx),%xmm7
movupd 0x20(%rcx),%xmm3
movupd 0x40(%rcx),%xmm9
movupd 0x60(%rcx),%xmm8
movsd  (%r8),%xmm0
movsd  0x8(%r8),%xmm6
movsd  0x10(%r8),%xmm2
movsd  0x18(%r8),%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm7,%xmm0
addpd  %xmm5,%xmm0
movsd  0x20(%r8),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm7,%xmm5
addpd  %xmm4,%xmm5
unpcklpd %xmm6,%xmm6
mulpd  %xmm3,%xmm6
addpd  %xmm0,%xmm6
movsd  0x28(%r8),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm3,%xmm0
addpd  %xmm5,%xmm0
unpcklpd %xmm2,%xmm2
mulpd  %xmm9,%xmm2
addpd  %xmm6,%xmm2
movsd  0x30(%r8),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm9,%xmm6
addpd  %xmm0,%xmm6
unpcklpd %xmm1,%xmm1
mulpd  %xmm8,%xmm1
movapd %xmm1,%xmm5
addpd  %xmm2,%xmm5
movsd  0x38(%r8),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm4
addpd  %xmm6,%xmm4
sub    $0xffffffffffffff80,%rcx
add    $0x4,%eax
add    %r9,%r8
cmp    %r10d,%eax
jl     1130 <kernel_dgemm_nn_2x2_vs_lib4+0x30>
addpd  %xmm6,%xmm0
addpd  %xmm2,%xmm1
mov    %edx,%eax
and    $0xfffffffc,%eax
jmp    120c <kernel_dgemm_nn_2x2_vs_lib4+0x10c>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
xorpd  %xmm1,%xmm1
mov    0x18(%rsp),%r9d
cmp    %edx,%eax
jge    1275 <kernel_dgemm_nn_2x2_vs_lib4+0x175>
sub    %eax,%edx
xor    %eax,%eax
nopl   0x0(%rax)
movapd %xmm1,%xmm2
movapd %xmm0,%xmm3
movupd (%rcx),%xmm0
movsd  (%r8,%rax,8),%xmm4
movsd  0x20(%r8,%rax,8),%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,%rcx
add    $0x1,%rax
cmp    %eax,%edx
jne    1220 <kernel_dgemm_nn_2x2_vs_lib4+0x120>
addpd  %xmm3,%xmm5
addpd  %xmm2,%xmm4
movapd %xmm5,%xmm0
movapd %xmm4,%xmm1
mov    0x28(%rsp),%r10d
mov    0x10(%rsp),%r8
test   %r9d,%r9d
je     12c8 <kernel_dgemm_nn_2x2_vs_lib4+0x1c8>
mov    0x8(%rsp),%rax
lea    0x20(%rax),%rcx
lea    0x8(%rax),%rdx
cmpl   $0x0,0x20(%rsp)
movsd  (%rax),%xmm2
movsd  0x28(%rax),%xmm3
mov    %rcx,%rax
cmove  %rdx,%rax
movsd  (%rax),%xmm5
cmove  %rcx,%rdx
movsd  (%rdx),%xmm4
unpcklpd %xmm5,%xmm2
cmp    $0x1,%r9d
jne    12f3 <kernel_dgemm_nn_2x2_vs_lib4+0x1f3>
addpd  %xmm2,%xmm1
unpcklpd %xmm3,%xmm4
addpd  %xmm4,%xmm0
test   %r10d,%r10d
je     130c <kernel_dgemm_nn_2x2_vs_lib4+0x20c>
movapd %xmm1,%xmm3
unpckhpd %xmm0,%xmm3
movapd %xmm0,%xmm2
movapd %xmm3,%xmm0
movsd  %xmm1,(%r8)
cmp    $0x2,%esi
jl     1337 <kernel_dgemm_nn_2x2_vs_lib4+0x237>
movsd  %xmm2,0x8(%r8)
cmp    $0x1,%edi
jg     1321 <kernel_dgemm_nn_2x2_vs_lib4+0x221>
ret
subpd  %xmm1,%xmm2
unpcklpd %xmm3,%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
movapd %xmm2,%xmm1
test   %r10d,%r10d
jne    12cd <kernel_dgemm_nn_2x2_vs_lib4+0x1cd>
movlpd %xmm1,(%r8)
cmp    $0x2,%edi
jl     133e <kernel_dgemm_nn_2x2_vs_lib4+0x23e>
movhpd %xmm1,0x8(%r8)
cmp    $0x1,%esi
jle    12f2 <kernel_dgemm_nn_2x2_vs_lib4+0x1f2>
movlpd %xmm0,0x20(%r8)
unpckhpd %xmm0,%xmm0
mov    $0x5,%eax
movsd  %xmm0,(%r8,%rax,8)
ret
cmp    $0x1,%edi
jle    12f2 <kernel_dgemm_nn_2x2_vs_lib4+0x1f2>
jmp    1343 <kernel_dgemm_nn_2x2_vs_lib4+0x243>
cmp    $0x1,%esi
jle    12f2 <kernel_dgemm_nn_2x2_vs_lib4+0x1f2>
mov    $0x4,%eax
movsd  %xmm0,(%r8,%rax,8)
ret

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

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