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) {
  const int bs = 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) {
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + bs * 0] * x_0;
    y_1 += A[1 + bs * 0] * x_0;
    y_2 += A[2 + bs * 0] * x_0;
    y_3 += A[3 + bs * 0] * x_0;
    y_0 += A[0 + bs * 1] * x_1;
    y_1 += A[1 + bs * 1] * x_1;
    y_2 += A[2 + bs * 1] * x_1;
    y_3 += A[3 + bs * 1] * x_1;
    y_0 += A[0 + bs * 2] * x_2;
    y_1 += A[1 + bs * 2] * x_2;
    y_2 += A[2 + bs * 2] * x_2;
    y_3 += A[3 + bs * 2] * x_2;
    y_0 += A[0 + bs * 3] * x_3;
    y_1 += A[1 + bs * 3] * x_3;
    y_2 += A[2 + bs * 3] * x_3;
    y_3 += A[3 + bs * 3] * x_3;
    A += 4 * bs;
    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 + bs * 0];
    a_20 = A[2 + bs * 0];
    a_30 = A[3 + bs * 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 + bs * 1];
    a_31 = A[3 + bs * 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 + bs * 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 + bs * 0];
    a_10 = A[1 + bs * 0];
    a_20 = A[2 + bs * 0];
    a_30 = A[3 + bs * 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 + bs * 1];
    a_21 = A[2 + bs * 1];
    a_31 = A[3 + bs * 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 + bs * 2];
    a_10 = A[3 + bs * 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 + bs * 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)
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    13c2 <kernel_dtrsv_n_4_vs_lib4_new+0x2c2>
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    1153 <kernel_dtrsv_n_4_vs_lib4_new+0x53>
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     174b <kernel_dtrsv_n_4_vs_lib4_new+0x64b>
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    1575 <kernel_dtrsv_n_4_vs_lib4_new+0x475>
cmpl   $0x1,-0x4(%rbp)
jne    1528 <kernel_dtrsv_n_4_vs_lib4_new+0x428>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jne    1545 <kernel_dtrsv_n_4_vs_lib4_new+0x445>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    1562 <kernel_dtrsv_n_4_vs_lib4_new+0x462>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
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    167d <kernel_dtrsv_n_4_vs_lib4_new+0x57d>
cmpl   $0x2,-0x4(%rbp)
jne    164d <kernel_dtrsv_n_4_vs_lib4_new+0x54d>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    166a <kernel_dtrsv_n_4_vs_lib4_new+0x56a>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
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    1715 <kernel_dtrsv_n_4_vs_lib4_new+0x615>
cmpl   $0x3,-0x4(%rbp)
jne    1702 <kernel_dtrsv_n_4_vs_lib4_new+0x602>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
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    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
mov    -0x18(%rbp),%rax
movsd  0x8a9(%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    18b1 <kernel_dtrsv_n_4_vs_lib4_new+0x7b1>
cmpl   $0x1,-0x4(%rbp)
jne    1864 <kernel_dtrsv_n_4_vs_lib4_new+0x764>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x2,-0x4(%rbp)
jne    1881 <kernel_dtrsv_n_4_vs_lib4_new+0x781>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    189e <kernel_dtrsv_n_4_vs_lib4_new+0x79e>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
mov    -0x18(%rbp),%rax
movsd  0x743(%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    19c1 <kernel_dtrsv_n_4_vs_lib4_new+0x8c1>
cmpl   $0x2,-0x4(%rbp)
jne    1991 <kernel_dtrsv_n_4_vs_lib4_new+0x891>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x3,-0x4(%rbp)
jne    19ae <kernel_dtrsv_n_4_vs_lib4_new+0x8ae>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
mov    -0x18(%rbp),%rax
movsd  0x633(%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    1a61 <kernel_dtrsv_n_4_vs_lib4_new+0x961>
cmpl   $0x3,-0x4(%rbp)
jne    1a4e <kernel_dtrsv_n_4_vs_lib4_new+0x94e>
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
movsd  -0x70(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    1a9a <kernel_dtrsv_n_4_vs_lib4_new+0x99a>
mov    -0x18(%rbp),%rax
movsd  0x593(%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
xorpd  %xmm0,%xmm0
cmp    $0x4,%edx
jl     11e8 <kernel_dtrsv_n_4_vs_lib4_new+0xe8>
mov    0x8(%rsp),%r11
add    $0xfffffffd,%edx
xorpd  %xmm4,%xmm4
xor    %eax,%eax
xorpd  %xmm2,%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%rcx),%xmm5
movupd 0x10(%rcx),%xmm9
movupd 0x20(%rcx),%xmm8
movupd 0x30(%rcx),%xmm3
movsd  (%r11,%rax,8),%xmm7
movsd  0x8(%r11,%rax,8),%xmm6
movsd  0x10(%r11,%rax,8),%xmm1
movsd  0x18(%r11,%rax,8),%xmm0
unpcklpd %xmm7,%xmm7
mulpd  %xmm7,%xmm5
addpd  %xmm4,%xmm5
mulpd  %xmm9,%xmm7
addpd  %xmm2,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm6,%xmm3
addpd  %xmm7,%xmm3
mulpd  %xmm8,%xmm6
addpd  %xmm5,%xmm6
movupd 0x50(%rcx),%xmm2
movupd 0x40(%rcx),%xmm5
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm5
addpd  %xmm6,%xmm5
mulpd  %xmm2,%xmm1
addpd  %xmm3,%xmm1
movupd 0x60(%rcx),%xmm4
movupd 0x70(%rcx),%xmm3
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm3
movapd %xmm3,%xmm2
addpd  %xmm1,%xmm2
mulpd  %xmm4,%xmm0
movapd %xmm0,%xmm4
addpd  %xmm5,%xmm4
sub    $0xffffffffffffff80,%rcx
add    $0x4,%rax
cmp    %edx,%eax
jl     1130 <kernel_dtrsv_n_4_vs_lib4_new+0x30>
addpd  %xmm5,%xmm0
addpd  %xmm1,%xmm3
jmp    11ec <kernel_dtrsv_n_4_vs_lib4_new+0xec>
xorpd  %xmm3,%xmm3
movsd  (%r10),%xmm4
movsd  0x8(%r10),%xmm2
subsd  %xmm0,%xmm4
unpckhpd %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  0x10(%r10),%xmm1
subsd  %xmm3,%xmm1
movsd  0x18(%r10),%xmm0
unpckhpd %xmm3,%xmm3
subsd  %xmm3,%xmm0
test   %r8d,%r8d
je     12ba <kernel_dtrsv_n_4_vs_lib4_new+0x1ba>
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     12ff <kernel_dtrsv_n_4_vs_lib4_new+0x1ff>
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     133e <kernel_dtrsv_n_4_vs_lib4_new+0x23e>
mulsd  0x10(%r9),%xmm1
movsd  0x58(%rcx),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm1,0x10(%r10)
subsd  %xmm2,%xmm0
cmp    $0x3,%esi
je     1349 <kernel_dtrsv_n_4_vs_lib4_new+0x249>
mulsd  0x18(%r9),%xmm0
jmp    134e <kernel_dtrsv_n_4_vs_lib4_new+0x24e>
movsd  0xd3e(%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    130c <kernel_dtrsv_n_4_vs_lib4_new+0x20c>
cmp    $0x1,%edi
je     1354 <kernel_dtrsv_n_4_vs_lib4_new+0x254>
movsd  %xmm2,0x8(%r10)
jmp    133e <kernel_dtrsv_n_4_vs_lib4_new+0x23e>
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    1355 <kernel_dtrsv_n_4_vs_lib4_new+0x255>
cmp    $0x2,%edi
je     1354 <kernel_dtrsv_n_4_vs_lib4_new+0x254>
movsd  %xmm1,0x10(%r10)
cmp    $0x3,%edi
je     1354 <kernel_dtrsv_n_4_vs_lib4_new+0x254>
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     1349 <kernel_dtrsv_n_4_vs_lib4_new+0x249>
divsd  0x78(%rcx),%xmm3
mulsd  %xmm3,%xmm0
jmp    134e <kernel_dtrsv_n_4_vs_lib4_new+0x24e>

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