void kernel_dsyrk_nn_4x2_lib4(int kmax, double *A, double *B, int sdb,
                              double *C, double *D, int alg) {
  const int bs = 4;
  int k;
  double a_0, a_1, a_2, a_3, b_0, b_1, c_00 = 0, c_10 = 0, c_11 = 0, c_20 = 0,
                                       c_21 = 0, c_30 = 0, c_31 = 0;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    a_2 = A[2 + bs * 0];
    a_3 = A[3 + 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_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + bs * 1];
    a_1 = A[1 + bs * 1];
    a_2 = A[2 + bs * 1];
    a_3 = A[3 + 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_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + bs * 2];
    a_1 = A[1 + bs * 2];
    a_2 = A[2 + bs * 2];
    a_3 = A[3 + 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_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    a_0 = A[0 + bs * 3];
    a_1 = A[1 + bs * 3];
    a_2 = A[2 + bs * 3];
    a_3 = A[3 + 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_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    A += 16;
    B += 4 * sdb;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    a_2 = A[2 + bs * 0];
    a_3 = A[3 + 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_20 += a_2 * b_0;
    c_30 += a_3 * b_0;
    c_11 += a_1 * b_1;
    c_21 += a_2 * b_1;
    c_31 += a_3 * b_1;
    A += 4;
    B += 1;
  }
  double d_00, d_10, d_11, d_20, d_21, d_30, d_31;
  if (alg == 0) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    D[2 + bs * 0] = c_20;
    D[3 + bs * 0] = c_30;
    D[1 + bs * 1] = c_11;
    D[2 + bs * 1] = c_21;
    D[3 + bs * 1] = c_31;
  } else {
    d_00 = C[0 + bs * 0];
    d_10 = C[1 + bs * 0];
    d_20 = C[2 + bs * 0];
    d_30 = C[3 + bs * 0];
    d_11 = C[1 + bs * 1];
    d_21 = C[2 + bs * 1];
    d_31 = C[3 + bs * 1];
    if (alg == 1) {
      d_00 += c_00;
      d_10 += c_10;
      d_20 += c_20;
      d_30 += c_30;
      d_11 += c_11;
      d_21 += c_21;
      d_31 += c_31;
    } else {
      d_00 -= c_00;
      d_10 -= c_10;
      d_20 -= c_20;
      d_30 -= c_30;
      d_11 -= c_11;
      d_21 -= c_21;
      d_31 -= c_31;
    }
    D[0 + bs * 0] = d_00;
    D[1 + bs * 0] = d_10;
    D[2 + bs * 0] = d_20;
    D[3 + bs * 0] = d_30;
    D[1 + bs * 1] = d_11;
    D[2 + bs * 1] = d_21;
    D[3 + bs * 1] = d_31;
  }
}


x86 assembly (clang, -O0):
<kernel_dsyrk_nn_4x2_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x58,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1676 <kernel_dsyrk_nn_4x2_lib4+0x576>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x38(%rbp)
jmp    1173 <kernel_dsyrk_nn_4x2_lib4+0x73>
jmp    167b <kernel_dsyrk_nn_4x2_lib4+0x57b>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    17db <kernel_dsyrk_nn_4x2_lib4+0x6db>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    167b <kernel_dsyrk_nn_4x2_lib4+0x57b>
cmpl   $0x0,0x10(%rbp)
jne    1857 <kernel_dsyrk_nn_4x2_lib4+0x757>
movsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
jmp    1aac <kernel_dsyrk_nn_4x2_lib4+0x9ac>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
cmpl   $0x1,0x10(%rbp)
jne    197b <kernel_dsyrk_nn_4x2_lib4+0x87b>
movsd  -0x70(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1a36 <kernel_dsyrk_nn_4x2_lib4+0x936>
movsd  -0x70(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x78(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xd0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
add    $0x58,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dsyrk_nn_4x2_lib4>:
cmp    $0x4,%edi
jl     12a6 <kernel_dsyrk_nn_4x2_lib4+0x1a6>
lea    -0x3(%rdi),%r10d
shl    $0x2,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
xorpd  %xmm6,%xmm6
xor    %eax,%eax
xorpd  %xmm11,%xmm11
xorpd  %xmm7,%xmm7
xorpd  %xmm2,%xmm2
nopw   0x0(%rax,%rax,1)
movupd (%rsi),%xmm13
movupd 0x10(%rsi),%xmm5
movupd 0x20(%rsi),%xmm9
movupd 0x30(%rsi),%xmm8
movsd  0x20(%rdx),%xmm12
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm3
movsd  0x10(%rdx),%xmm4
movsd  0x18(%rdx),%xmm10
unpcklpd %xmm0,%xmm0
movapd %xmm13,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm6,%xmm1
mulpd  %xmm5,%xmm0
addpd  %xmm7,%xmm0
shufpd $0x1,%xmm5,%xmm13
unpckhpd %xmm5,%xmm5
mulsd  %xmm12,%xmm5
unpcklpd %xmm12,%xmm12
mulpd  %xmm13,%xmm12
addpd  %xmm2,%xmm12
addsd  %xmm11,%xmm5
movsd  0x28(%rdx),%xmm2
unpcklpd %xmm3,%xmm3
movapd %xmm9,%xmm6
mulpd  %xmm3,%xmm6
addpd  %xmm1,%xmm6
mulpd  %xmm8,%xmm3
addpd  %xmm0,%xmm3
shufpd $0x1,%xmm8,%xmm9
unpckhpd %xmm8,%xmm8
mulsd  %xmm2,%xmm8
unpcklpd %xmm2,%xmm2
mulpd  %xmm9,%xmm2
addpd  %xmm12,%xmm2
addsd  %xmm5,%xmm8
movupd 0x40(%rsi),%xmm7
movupd 0x50(%rsi),%xmm1
movsd  0x30(%rdx),%xmm0
unpcklpd %xmm4,%xmm4
movapd %xmm7,%xmm5
mulpd  %xmm4,%xmm5
addpd  %xmm6,%xmm5
mulpd  %xmm1,%xmm4
addpd  %xmm3,%xmm4
shufpd $0x1,%xmm1,%xmm7
unpckhpd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm7,%xmm0
addpd  %xmm2,%xmm0
addsd  %xmm8,%xmm1
movupd 0x60(%rsi),%xmm2
movupd 0x70(%rsi),%xmm11
movsd  0x38(%rdx),%xmm3
unpcklpd %xmm10,%xmm10
movapd %xmm2,%xmm8
mulpd  %xmm10,%xmm8
movapd %xmm8,%xmm6
addpd  %xmm5,%xmm6
mulpd  %xmm11,%xmm10
movapd %xmm10,%xmm7
addpd  %xmm4,%xmm7
shufpd $0x1,%xmm11,%xmm2
unpckhpd %xmm11,%xmm11
mulsd  %xmm3,%xmm11
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,%xmm2
addpd  %xmm0,%xmm2
addsd  %xmm1,%xmm11
sub    $0xffffffffffffff80,%rsi
add    $0x4,%eax
add    %rcx,%rdx
cmp    %r10d,%eax
jl     1130 <kernel_dsyrk_nn_4x2_lib4+0x30>
addpd  %xmm0,%xmm3
addpd  %xmm4,%xmm10
addpd  %xmm5,%xmm8
mov    %edi,%ecx
and    $0xfffffffc,%ecx
jmp    12bb <kernel_dsyrk_nn_4x2_lib4+0x1bb>
xorpd  %xmm8,%xmm8
xorpd  %xmm11,%xmm11
xor    %ecx,%ecx
xorpd  %xmm10,%xmm10
xorpd  %xmm3,%xmm3
mov    0x8(%rsp),%eax
cmp    %edi,%ecx
jge    135e <kernel_dsyrk_nn_4x2_lib4+0x25e>
sub    %ecx,%edi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movapd %xmm3,%xmm0
movapd %xmm10,%xmm2
movapd %xmm8,%xmm1
movupd (%rsi),%xmm3
movupd 0x10(%rsi),%xmm7
movsd  0x20(%rdx,%rcx,8),%xmm6
movsd  (%rdx,%rcx,8),%xmm4
unpcklpd %xmm4,%xmm4
movapd %xmm3,%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm5,%xmm8
addpd  %xmm1,%xmm8
mulpd  %xmm7,%xmm4
movapd %xmm4,%xmm10
addpd  %xmm2,%xmm10
shufpd $0x1,%xmm7,%xmm3
unpckhpd %xmm7,%xmm7
mulsd  %xmm6,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm3,%xmm6
movapd %xmm6,%xmm3
addpd  %xmm0,%xmm3
addsd  %xmm7,%xmm11
add    $0x1,%rcx
add    $0x20,%rsi
cmp    %ecx,%edi
jne    12d0 <kernel_dsyrk_nn_4x2_lib4+0x1d0>
addpd  %xmm0,%xmm6
addpd  %xmm2,%xmm4
addpd  %xmm1,%xmm5
movapd %xmm5,%xmm8
movapd %xmm4,%xmm10
movapd %xmm6,%xmm3
test   %eax,%eax
je     13b9 <kernel_dsyrk_nn_4x2_lib4+0x2b9>
movupd (%r8),%xmm4
movupd 0x10(%r8),%xmm1
movupd 0x28(%r8),%xmm0
movsd  0x38(%r8),%xmm2
cmp    $0x1,%eax
jne    1393 <kernel_dsyrk_nn_4x2_lib4+0x293>
addpd  %xmm4,%xmm8
addpd  %xmm1,%xmm10
addpd  %xmm0,%xmm3
addsd  %xmm2,%xmm11
jmp    13b9 <kernel_dsyrk_nn_4x2_lib4+0x2b9>
subpd  %xmm8,%xmm4
subpd  %xmm10,%xmm1
subpd  %xmm3,%xmm0
subsd  %xmm11,%xmm2
movapd %xmm2,%xmm11
movapd %xmm4,%xmm8
movapd %xmm1,%xmm10
movapd %xmm0,%xmm3
movupd %xmm8,(%r9)
movupd %xmm10,0x10(%r9)
movupd %xmm3,0x28(%r9)
movsd  %xmm11,0x38(%r9)
ret

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

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