void kernel_dtrsv_n_4_vs_lib4_new(int km, int kn, int kmax, double *A,
                                  int use_inv_diag_A, double *inv_diag_A,
                                  double *x, double *y) {
  __builtin_prefetch(A);
  __builtin_prefetch(A + 8);
  const int lda = 4;
  int k;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0, y_2 = 0, y_3 = 0;
  k = 0;
  for (; k < kmax - 3; k += 4) {
    __builtin_prefetch(A + 4 * lda);
    __builtin_prefetch(A + 4 * lda + 8);
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[1 + lda * 0] * x_0;
    y_2 += A[2 + lda * 0] * x_0;
    y_3 += A[3 + lda * 0] * x_0;
    y_0 += A[0 + lda * 1] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[2 + lda * 1] * x_1;
    y_3 += A[3 + lda * 1] * x_1;
    y_0 += A[0 + lda * 2] * x_2;
    y_1 += A[1 + lda * 2] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[3 + lda * 2] * x_2;
    y_0 += A[0 + lda * 3] * x_3;
    y_1 += A[1 + lda * 3] * x_3;
    y_2 += A[2 + lda * 3] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += 4 * lda;
    x += 4;
  }
  y_0 = y[0] - y_0;
  y_1 = y[1] - y_1;
  y_2 = y[2] - y_2;
  y_3 = y[3] - y_3;
  double a_00, a_10, a_20, a_30, a_11, a_21, a_31;
  if (use_inv_diag_A) {
    a_00 = inv_diag_A[0];
    a_10 = A[1 + lda * 0];
    a_20 = A[2 + lda * 0];
    a_30 = A[3 + lda * 0];
    y_0 *= a_00;
    y[0] = y_0;
    y_1 -= a_10 * y_0;
    y_2 -= a_20 * y_0;
    y_3 -= a_30 * y_0;
    if (kn == 1) {
      if (km == 1)
        return;
      y[1] = y_1;
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = inv_diag_A[1];
    a_21 = A[2 + lda * 1];
    a_31 = A[3 + lda * 1];
    y_1 *= a_11;
    y[1] = y_1;
    y_2 -= a_21 * y_1;
    y_3 -= a_31 * y_1;
    if (kn == 2) {
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_00 = inv_diag_A[2];
    a_10 = A[3 + lda * 2];
    y_2 *= a_00;
    y[2] = y_2;
    y_3 -= a_10 * y_2;
    if (kn == 3) {
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = inv_diag_A[3];
    y_3 *= a_11;
    y[3] = y_3;
  } else {
    a_00 = 1.0 / A[0 + lda * 0];
    a_10 = A[1 + lda * 0];
    a_20 = A[2 + lda * 0];
    a_30 = A[3 + lda * 0];
    y_0 *= a_00;
    y[0] = y_0;
    y_1 -= a_10 * y_0;
    y_2 -= a_20 * y_0;
    y_3 -= a_30 * y_0;
    if (kn == 1) {
      if (km == 1)
        return;
      y[1] = y_1;
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = 1.0 / A[1 + lda * 1];
    a_21 = A[2 + lda * 1];
    a_31 = A[3 + lda * 1];
    y_1 *= a_11;
    y[1] = y_1;
    y_2 -= a_21 * y_1;
    y_3 -= a_31 * y_1;
    if (kn == 2) {
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_00 = 1.0 / A[2 + lda * 2];
    a_10 = A[3 + lda * 2];
    y_2 *= a_00;
    y[2] = y_2;
    y_3 -= a_10 * y_2;
    if (kn == 3) {
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = 1.0 / A[3 + lda * 3];
    y_3 *= a_11;
    y[3] = y_3;
  }
}


x86 assembly (clang, -O0):
<kernel_dtrsv_n_4_vs_lib4_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x28,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x18(%rbp),%rax
prefetcht0 (%rax)
mov    -0x18(%rbp),%rax
add    $0x40,%rax
prefetcht0 (%rax)
movl   $0x4,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    13f2 <kernel_dtrsv_n_4_vs_lib4_new+0x2f2>
mov    -0x18(%rbp),%rax
add    $0x80,%rax
prefetcht0 (%rax)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
add    $0x40,%rax
prefetcht0 (%rax)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,0x10(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    1165 <kernel_dtrsv_n_4_vs_lib4_new+0x65>
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     177b <kernel_dtrsv_n_4_vs_lib4_new+0x67b>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    15a5 <kernel_dtrsv_n_4_vs_lib4_new+0x4a5>
cmpl   $0x1,-0x4(%rbp)
jne    1558 <kernel_dtrsv_n_4_vs_lib4_new+0x458>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jne    1575 <kernel_dtrsv_n_4_vs_lib4_new+0x475>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    1592 <kernel_dtrsv_n_4_vs_lib4_new+0x492>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    16ad <kernel_dtrsv_n_4_vs_lib4_new+0x5ad>
cmpl   $0x2,-0x4(%rbp)
jne    167d <kernel_dtrsv_n_4_vs_lib4_new+0x57d>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    169a <kernel_dtrsv_n_4_vs_lib4_new+0x59a>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1745 <kernel_dtrsv_n_4_vs_lib4_new+0x645>
cmpl   $0x3,-0x4(%rbp)
jne    1732 <kernel_dtrsv_n_4_vs_lib4_new+0x632>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x18(%rbp),%rax
movsd  0x879(%rip),%xmm0
divsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    18e1 <kernel_dtrsv_n_4_vs_lib4_new+0x7e1>
cmpl   $0x1,-0x4(%rbp)
jne    1894 <kernel_dtrsv_n_4_vs_lib4_new+0x794>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jne    18b1 <kernel_dtrsv_n_4_vs_lib4_new+0x7b1>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    18ce <kernel_dtrsv_n_4_vs_lib4_new+0x7ce>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x18(%rbp),%rax
movsd  0x713(%rip),%xmm0
divsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    19f1 <kernel_dtrsv_n_4_vs_lib4_new+0x8f1>
cmpl   $0x2,-0x4(%rbp)
jne    19c1 <kernel_dtrsv_n_4_vs_lib4_new+0x8c1>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    19de <kernel_dtrsv_n_4_vs_lib4_new+0x8de>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x18(%rbp),%rax
movsd  0x603(%rip),%xmm0
divsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1a91 <kernel_dtrsv_n_4_vs_lib4_new+0x991>
cmpl   $0x3,-0x4(%rbp)
jne    1a7e <kernel_dtrsv_n_4_vs_lib4_new+0x97e>
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1aca <kernel_dtrsv_n_4_vs_lib4_new+0x9ca>
mov    -0x18(%rbp),%rax
movsd  0x563(%rip),%xmm0
divsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x28,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dtrsv_n_4_vs_lib4_new>:
mov    0x10(%rsp),%r10
prefetcht0 (%rcx)
prefetcht0 0x40(%rcx)
xorpd  %xmm5,%xmm5
cmp    $0x4,%edx
jl     11ff <kernel_dtrsv_n_4_vs_lib4_new+0xff>
mov    0x8(%rsp),%r11
add    $0xfffffffd,%edx
xorpd  %xmm7,%xmm7
xor    %eax,%eax
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
prefetcht0 0x80(%rcx)
prefetcht0 0xc0(%rcx)
movupd (%rcx),%xmm9
movupd 0x10(%rcx),%xmm5
movupd 0x20(%rcx),%xmm8
movupd 0x30(%rcx),%xmm2
movsd  (%r11,%rax,8),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm6,%xmm9
addpd  %xmm7,%xmm9
movupd 0x50(%rcx),%xmm10
movupd 0x40(%rcx),%xmm4
movupd 0x60(%rcx),%xmm11
movupd 0x70(%rcx),%xmm3
lea    0x80(%rcx),%rcx
mulpd  %xmm5,%xmm6
movsd  0x8(%r11,%rax,8),%xmm7
addpd  %xmm0,%xmm6
movsd  0x10(%r11,%rax,8),%xmm1
unpcklpd %xmm7,%xmm7
mulpd  %xmm7,%xmm2
addpd  %xmm6,%xmm2
movsd  0x18(%r11,%rax,8),%xmm5
mulpd  %xmm8,%xmm7
addpd  %xmm9,%xmm7
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm4
addpd  %xmm7,%xmm4
mulpd  %xmm10,%xmm1
addpd  %xmm2,%xmm1
unpcklpd %xmm5,%xmm5
mulpd  %xmm5,%xmm3
movapd %xmm3,%xmm0
addpd  %xmm1,%xmm0
mulpd  %xmm11,%xmm5
movapd %xmm5,%xmm7
addpd  %xmm4,%xmm7
add    $0x4,%rax
cmp    %edx,%eax
jl     1130 <kernel_dtrsv_n_4_vs_lib4_new+0x30>
addpd  %xmm4,%xmm5
addpd  %xmm1,%xmm3
jmp    1203 <kernel_dtrsv_n_4_vs_lib4_new+0x103>
xorpd  %xmm3,%xmm3
movsd  (%r10),%xmm4
movsd  0x8(%r10),%xmm2
subsd  %xmm5,%xmm4
unpckhpd %xmm5,%xmm5
subsd  %xmm5,%xmm2
movsd  0x10(%r10),%xmm1
subsd  %xmm3,%xmm1
movsd  0x18(%r10),%xmm0
unpckhpd %xmm3,%xmm3
subsd  %xmm3,%xmm0
test   %r8d,%r8d
je     12d1 <kernel_dtrsv_n_4_vs_lib4_new+0x1d1>
mulsd  (%r9),%xmm4
movsd  0x8(%rcx),%xmm3
mulsd  %xmm4,%xmm3
movsd  0x10(%rcx),%xmm5
mulsd  %xmm4,%xmm5
movsd  0x18(%rcx),%xmm6
mulsd  %xmm4,%xmm6
movsd  %xmm4,(%r10)
subsd  %xmm3,%xmm2
subsd  %xmm5,%xmm1
subsd  %xmm6,%xmm0
cmp    $0x1,%esi
je     1316 <kernel_dtrsv_n_4_vs_lib4_new+0x216>
mulsd  0x8(%r9),%xmm2
movsd  0x30(%rcx),%xmm3
mulsd  %xmm2,%xmm3
movsd  0x38(%rcx),%xmm4
mulsd  %xmm2,%xmm4
movsd  %xmm2,0x8(%r10)
subsd  %xmm3,%xmm1
subsd  %xmm4,%xmm0
cmp    $0x2,%esi
je     1355 <kernel_dtrsv_n_4_vs_lib4_new+0x255>
mulsd  0x10(%r9),%xmm1
movsd  0x58(%rcx),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm1,0x10(%r10)
subsd  %xmm2,%xmm0
cmp    $0x3,%esi
je     1360 <kernel_dtrsv_n_4_vs_lib4_new+0x260>
mulsd  0x18(%r9),%xmm0
jmp    1365 <kernel_dtrsv_n_4_vs_lib4_new+0x265>
movsd  0xd27(%rip),%xmm3
movapd %xmm3,%xmm5
divsd  (%rcx),%xmm5
mulsd  %xmm5,%xmm4
movsd  0x8(%rcx),%xmm5
mulsd  %xmm4,%xmm5
movsd  0x10(%rcx),%xmm6
mulsd  %xmm4,%xmm6
movsd  0x18(%rcx),%xmm7
mulsd  %xmm4,%xmm7
movsd  %xmm4,(%r10)
subsd  %xmm5,%xmm2
subsd  %xmm6,%xmm1
subsd  %xmm7,%xmm0
cmp    $0x1,%esi
jne    1323 <kernel_dtrsv_n_4_vs_lib4_new+0x223>
cmp    $0x1,%edi
je     136b <kernel_dtrsv_n_4_vs_lib4_new+0x26b>
movsd  %xmm2,0x8(%r10)
jmp    1355 <kernel_dtrsv_n_4_vs_lib4_new+0x255>
movapd %xmm3,%xmm4
divsd  0x28(%rcx),%xmm4
mulsd  %xmm4,%xmm2
movsd  0x30(%rcx),%xmm4
mulsd  %xmm2,%xmm4
movsd  0x38(%rcx),%xmm5
mulsd  %xmm2,%xmm5
movsd  %xmm2,0x8(%r10)
subsd  %xmm4,%xmm1
subsd  %xmm5,%xmm0
cmp    $0x2,%esi
jne    136c <kernel_dtrsv_n_4_vs_lib4_new+0x26c>
cmp    $0x2,%edi
je     136b <kernel_dtrsv_n_4_vs_lib4_new+0x26b>
movsd  %xmm1,0x10(%r10)
cmp    $0x3,%edi
je     136b <kernel_dtrsv_n_4_vs_lib4_new+0x26b>
movsd  %xmm0,0x18(%r10)
ret
movapd %xmm3,%xmm2
divsd  0x50(%rcx),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x58(%rcx),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm1,0x10(%r10)
subsd  %xmm2,%xmm0
cmp    $0x3,%esi
je     1360 <kernel_dtrsv_n_4_vs_lib4_new+0x260>
divsd  0x78(%rcx),%xmm3
mulsd  %xmm3,%xmm0
jmp    1365 <kernel_dtrsv_n_4_vs_lib4_new+0x265>

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

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