void kernel_dgemm_diag_right_3_lib4(int kmax, double *A, int sda, double *B,
                                    double *C, int sdc, double *D, int sdd,
                                    int alg) {
  if (kmax <= 0)
    return;
  const int bs = 4;
  int k;
  double a_0, a_1, a_2, a_3, b_0, b_1, b_2, c_0, c_1, c_2, c_3;
  if (alg == -1) {
    b_0 = -B[0];
    b_1 = -B[1];
    b_2 = -B[2];
  } else {
    b_0 = B[0];
    b_1 = B[1];
    b_2 = B[2];
  }
  if (alg == 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];
      c_0 = a_0 * b_0;
      c_1 = a_1 * b_0;
      c_2 = a_2 * b_0;
      c_3 = a_3 * b_0;
      D[0 + bs * 0] = c_0;
      D[1 + bs * 0] = c_1;
      D[2 + bs * 0] = c_2;
      D[3 + bs * 0] = c_3;
      a_0 = A[0 + bs * 1];
      a_1 = A[1 + bs * 1];
      a_2 = A[2 + bs * 1];
      a_3 = A[3 + bs * 1];
      c_0 = a_0 * b_1;
      c_1 = a_1 * b_1;
      c_2 = a_2 * b_1;
      c_3 = a_3 * b_1;
      D[0 + bs * 1] = c_0;
      D[1 + bs * 1] = c_1;
      D[2 + bs * 1] = c_2;
      D[3 + bs * 1] = c_3;
      a_0 = A[0 + bs * 2];
      a_1 = A[1 + bs * 2];
      a_2 = A[2 + bs * 2];
      a_3 = A[3 + bs * 2];
      c_0 = a_0 * b_2;
      c_1 = a_1 * b_2;
      c_2 = a_2 * b_2;
      c_3 = a_3 * b_2;
      D[0 + bs * 2] = c_0;
      D[1 + bs * 2] = c_1;
      D[2 + bs * 2] = c_2;
      D[3 + bs * 2] = c_3;
      A += 4 * sda;
      D += 4 * sdd;
    }
    for (; k < kmax; k++) {
      a_0 = A[0 + bs * 0];
      c_0 = a_0 * b_0;
      D[0 + bs * 0] = c_0;
      a_0 = A[0 + bs * 1];
      c_0 = a_0 * b_0;
      D[0 + bs * 1] = c_0;
      a_0 = A[0 + bs * 2];
      c_0 = a_0 * b_0;
      D[0 + bs * 2] = c_0;
      A += 1;
      D += 1;
    }
  } else {
    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];
      c_0 = C[0 + bs * 0] + a_0 * b_0;
      c_1 = C[1 + bs * 0] + a_1 * b_0;
      c_2 = C[2 + bs * 0] + a_2 * b_0;
      c_3 = C[3 + bs * 0] + a_3 * b_0;
      D[0 + bs * 0] = c_0;
      D[1 + bs * 0] = c_1;
      D[2 + bs * 0] = c_2;
      D[3 + bs * 0] = c_3;
      a_0 = A[0 + bs * 1];
      a_1 = A[1 + bs * 1];
      a_2 = A[2 + bs * 1];
      a_3 = A[3 + bs * 1];
      c_0 = C[0 + bs * 1] + a_0 * b_1;
      c_1 = C[1 + bs * 1] + a_1 * b_1;
      c_2 = C[2 + bs * 1] + a_2 * b_1;
      c_3 = C[3 + bs * 1] + a_3 * b_1;
      D[0 + bs * 1] = c_0;
      D[1 + bs * 1] = c_1;
      D[2 + bs * 1] = c_2;
      D[3 + bs * 1] = c_3;
      a_0 = A[0 + bs * 2];
      a_1 = A[1 + bs * 2];
      a_2 = A[2 + bs * 2];
      a_3 = A[3 + bs * 2];
      c_0 = C[0 + bs * 2] + a_0 * b_2;
      c_1 = C[1 + bs * 2] + a_1 * b_2;
      c_2 = C[2 + bs * 2] + a_2 * b_2;
      c_3 = C[3 + bs * 2] + a_3 * b_2;
      D[0 + bs * 2] = c_0;
      D[1 + bs * 2] = c_1;
      D[2 + bs * 2] = c_2;
      D[3 + bs * 2] = c_3;
      A += 4 * sda;
      C += 4 * sdc;
      D += 4 * sdd;
    }
    for (; k < kmax; k++) {
      a_0 = A[0 + bs * 0];
      c_0 = C[0 + bs * 0] + a_0 * b_0;
      D[0 + bs * 0] = c_0;
      a_0 = A[0 + bs * 1];
      c_0 = C[0 + bs * 1] + a_0 * b_1;
      D[0 + bs * 1] = c_0;
      a_0 = A[0 + bs * 2];
      c_0 = C[0 + bs * 2] + a_0 * b_2;
      D[0 + bs * 2] = c_0;
      A += 1;
      C += 1;
      D += 1;
    }
  }
}


x86 assembly (clang, -O0):
<kernel_dgemm_diag_right_3_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1137 <kernel_dgemm_diag_right_3_lib4+0x37>
jmp    197d <kernel_dgemm_diag_right_3_lib4+0x87d>
movl   $0x4,-0x30(%rbp)
cmpl   $0xffffffff,0x20(%rbp)
jne    11bb <kernel_dgemm_diag_right_3_lib4+0xbb>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    11e4 <kernel_dgemm_diag_right_3_lib4+0xe4>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x0,0x20(%rbp)
jne    1525 <kernel_dgemm_diag_right_3_lib4+0x425>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    146a <kernel_dgemm_diag_right_3_lib4+0x36a>
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)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
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)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
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)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    0x18(%rbp),%ecx
shl    $0x2,%ecx
mov    0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    11f5 <kernel_dgemm_diag_right_3_lib4+0xf5>
jmp    146f <kernel_dgemm_diag_right_3_lib4+0x36f>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1520 <kernel_dgemm_diag_right_3_lib4+0x420>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    146f <kernel_dgemm_diag_right_3_lib4+0x36f>
jmp    197d <kernel_dgemm_diag_right_3_lib4+0x87d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1884 <kernel_dgemm_diag_right_3_lib4+0x784>
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    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
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    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x38(%rax),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
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    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x48(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x50(%rax),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x58(%rax),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    0x18(%rbp),%ecx
shl    $0x2,%ecx
mov    0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    152c <kernel_dgemm_diag_right_3_lib4+0x42c>
jmp    1889 <kernel_dgemm_diag_right_3_lib4+0x789>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1978 <kernel_dgemm_diag_right_3_lib4+0x878>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1889 <kernel_dgemm_diag_right_3_lib4+0x789>
jmp    197d <kernel_dgemm_diag_right_3_lib4+0x87d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_diag_right_3_lib4>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
mov    0x30(%rsp),%ebx
mov    0x28(%rsp),%ebp
mov    0x20(%rsp),%rax
movsd  (%rcx),%xmm0
cmp    $0xffffffff,%ebx
je     12ad <kernel_dgemm_diag_right_3_lib4+0x1ad>
movupd 0x8(%rcx),%xmm1
test   %ebx,%ebx
jne    12c2 <kernel_dgemm_diag_right_3_lib4+0x1c2>
xor    %r9d,%r9d
cmp    $0x4,%edi
jb     11d7 <kernel_dgemm_diag_right_3_lib4+0xd7>
lea    -0x3(%rdi),%r8d
shl    $0x2,%edx
movslq %edx,%rdx
shl    $0x2,%ebp
movslq %ebp,%rbx
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
movapd %xmm1,%xmm3
unpcklpd %xmm1,%xmm3
unpckhpd %xmm1,%xmm1
shl    $0x3,%rdx
shl    $0x3,%rbx
xor    %ecx,%ecx
nopl   (%rax)
movupd (%rsi),%xmm4
movupd 0x10(%rsi),%xmm5
mulpd  %xmm2,%xmm4
mulpd  %xmm2,%xmm5
movupd %xmm4,(%rax)
movupd %xmm5,0x10(%rax)
movupd 0x20(%rsi),%xmm4
movupd 0x30(%rsi),%xmm5
mulpd  %xmm3,%xmm4
mulpd  %xmm3,%xmm5
movupd %xmm4,0x20(%rax)
movupd %xmm5,0x30(%rax)
movupd 0x40(%rsi),%xmm4
movupd 0x50(%rsi),%xmm5
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x40(%rax)
movupd %xmm5,0x50(%rax)
add    $0x4,%ecx
add    %rdx,%rsi
add    %rbx,%rax
cmp    %r8d,%ecx
jl     1170 <kernel_dgemm_diag_right_3_lib4+0x70>
mov    %edi,%r9d
and    $0xfffffffc,%r9d
cmp    %edi,%r9d
jge    14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
mov    %r9d,%edx
not    %edx
add    %edi,%edx
je     1545 <kernel_dgemm_diag_right_3_lib4+0x445>
lea    (%rsi,%rdx,8),%rcx
add    $0x48,%rcx
cmp    %rcx,%rax
jae    120b <kernel_dgemm_diag_right_3_lib4+0x10b>
lea    (%rax,%rdx,8),%rcx
add    $0x48,%rcx
cmp    %rcx,%rsi
jb     1545 <kernel_dgemm_diag_right_3_lib4+0x445>
add    $0x1,%rdx
mov    %rdx,%r8
and    $0xfffffffffffffffe,%r8
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x2(%r8),%rcx
mov    %rcx,%r10
shr    %r10
add    $0x1,%r10
test   %rcx,%rcx
je     14ff <kernel_dgemm_diag_right_3_lib4+0x3ff>
mov    %r10,%rbx
and    $0xfffffffffffffffe,%rbx
xor    %ecx,%ecx
xchg   %ax,%ax
movupd (%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rcx,8)
movupd 0x20(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x20(%rax,%rcx,8)
movupd 0x40(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x40(%rax,%rcx,8)
movupd 0x10(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x10(%rax,%rcx,8)
movupd 0x30(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x30(%rax,%rcx,8)
movupd 0x50(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x50(%rax,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rbx
jne    1240 <kernel_dgemm_diag_right_3_lib4+0x140>
jmp    1501 <kernel_dgemm_diag_right_3_lib4+0x401>
movapd 0xd4b(%rip),%xmm2
xorpd  %xmm2,%xmm0
movupd 0x8(%rcx),%xmm1
xorpd  %xmm2,%xmm1
xor    %r10d,%r10d
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
cmp    $0x4,%edi
jb     13b9 <kernel_dgemm_diag_right_3_lib4+0x2b9>
lea    -0x3(%rdi),%r10d
shl    $0x2,%edx
movslq %edx,%r11
shl    $0x2,%r9d
movslq %r9d,%r9
shl    $0x2,%ebp
movslq %ebp,%rdx
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
shl    $0x3,%r11
shl    $0x3,%r9
shl    $0x3,%rdx
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd (%rsi),%xmm5
movupd 0x10(%rsi),%xmm6
mulpd  %xmm3,%xmm5
movupd (%r8),%xmm7
addpd  %xmm5,%xmm7
movupd 0x10(%r8),%xmm5
mulpd  %xmm3,%xmm6
addpd  %xmm5,%xmm6
movupd %xmm7,(%rax)
movupd %xmm6,0x10(%rax)
movupd 0x20(%rsi),%xmm5
movupd 0x30(%rsi),%xmm6
mulpd  %xmm4,%xmm5
movupd 0x20(%r8),%xmm7
addpd  %xmm5,%xmm7
movupd 0x30(%r8),%xmm5
mulpd  %xmm4,%xmm6
addpd  %xmm5,%xmm6
movupd %xmm7,0x20(%rax)
movupd %xmm6,0x30(%rax)
movupd 0x40(%rsi),%xmm5
movupd 0x50(%rsi),%xmm6
mulpd  %xmm2,%xmm5
movupd 0x40(%r8),%xmm7
addpd  %xmm5,%xmm7
movupd 0x50(%r8),%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm5,%xmm6
movupd %xmm7,0x40(%rax)
movupd %xmm6,0x50(%rax)
add    $0x4,%ecx
add    %r11,%rsi
add    %r9,%r8
add    %rdx,%rax
cmp    %r10d,%ecx
jl     1310 <kernel_dgemm_diag_right_3_lib4+0x210>
mov    %edi,%r10d
and    $0xfffffffc,%r10d
cmp    %edi,%r10d
jge    14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
mov    %r10d,%r11d
not    %r11d
add    %edi,%r11d
je     149e <kernel_dgemm_diag_right_3_lib4+0x39e>
lea    (%rax,%r11,8),%rdx
add    $0x48,%rdx
lea    (%rsi,%r11,8),%rcx
add    $0x48,%rcx
lea    (%r8,%r11,8),%rbp
add    $0x48,%rbp
cmp    %rcx,%rax
setb   %r9b
cmp    %rdx,%rsi
setb   %bl
cmp    %rbp,%rax
setb   %cl
cmp    %rdx,%r8
setb   %dl
test   %bl,%r9b
jne    149e <kernel_dgemm_diag_right_3_lib4+0x39e>
and    %dl,%cl
jne    149e <kernel_dgemm_diag_right_3_lib4+0x39e>
add    $0x1,%r11
mov    %r11,%r14
and    $0xfffffffffffffffe,%r14
add    %r14d,%r10d
lea    (%rsi,%r14,8),%r9
lea    (%r8,%r14,8),%rcx
lea    (%rax,%r14,8),%rdx
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
xor    %ebx,%ebx
nop
movupd (%rsi,%rbx,8),%xmm5
mulpd  %xmm3,%xmm5
movupd (%r8,%rbx,8),%xmm6
addpd  %xmm5,%xmm6
movupd %xmm6,(%rax,%rbx,8)
movupd 0x20(%rsi,%rbx,8),%xmm5
mulpd  %xmm4,%xmm5
movupd 0x20(%r8,%rbx,8),%xmm6
addpd  %xmm5,%xmm6
movupd %xmm6,0x20(%rax,%rbx,8)
movupd 0x40(%rsi,%rbx,8),%xmm5
movupd 0x40(%r8,%rbx,8),%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm6,%xmm5
movupd %xmm5,0x40(%rax,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%r14
jne    1440 <kernel_dgemm_diag_right_3_lib4+0x340>
cmp    %r14,%r11
jne    14a7 <kernel_dgemm_diag_right_3_lib4+0x3a7>
jmp    14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
mov    %rsi,%r9
mov    %r8,%rcx
mov    %rax,%rdx
sub    %r10d,%edi
xor    %eax,%eax
nopl   0x0(%rax)
movsd  (%r9,%rax,8),%xmm3
mulsd  %xmm0,%xmm3
addsd  (%rcx,%rax,8),%xmm3
movsd  %xmm3,(%rdx,%rax,8)
movsd  0x20(%r9,%rax,8),%xmm3
mulsd  %xmm1,%xmm3
addsd  0x20(%rcx,%rax,8),%xmm3
movsd  %xmm3,0x20(%rdx,%rax,8)
movsd  0x40(%r9,%rax,8),%xmm3
mulsd  %xmm2,%xmm3
addsd  0x40(%rcx,%rax,8),%xmm3
movsd  %xmm3,0x40(%rdx,%rax,8)
add    $0x1,%rax
cmp    %eax,%edi
jne    14b0 <kernel_dgemm_diag_right_3_lib4+0x3b0>
pop    %rbx
pop    %r14
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%r10b
je     1535 <kernel_dgemm_diag_right_3_lib4+0x435>
movupd (%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rcx,8)
movupd 0x20(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x20(%rax,%rcx,8)
movupd 0x40(%rsi,%rcx,8),%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,0x40(%rax,%rcx,8)
cmp    %r8,%rdx
je     14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
add    %r8d,%r9d
lea    (%rsi,%r8,8),%rsi
lea    (%rax,%r8,8),%rax
mov    %edi,%edx
sub    %r9d,%edx
mov    %r9d,%ecx
not    %ecx
test   $0x1,%dl
je     1588 <kernel_dgemm_diag_right_3_lib4+0x488>
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax)
movsd  0x20(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rax)
movsd  0x40(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rax)
add    $0x8,%rsi
add    $0x8,%rax
add    $0x1,%r9d
add    %edi,%ecx
je     14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>
sub    %r9d,%edi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rcx,8)
movsd  0x20(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rax,%rcx,8)
movsd  0x40(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rax,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rax,%rcx,8)
movsd  0x28(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rax,%rcx,8)
movsd  0x48(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rax,%rcx,8)
add    $0x2,%rcx
cmp    %ecx,%edi
jne    15a0 <kernel_dgemm_diag_right_3_lib4+0x4a0>
jmp    14fa <kernel_dgemm_diag_right_3_lib4+0x3fa>

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

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