void kernel_dtrsv_t_2_lib4(int kmax, int inverted_diag, double *A, int sda,
                           double *x) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int bs = 4;
  int k;
  double *tA, *tx;
  tA = A;
  tx = x;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0;
  k = 2;
  if (kmax > 4) {
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    k = 4;
    A += 4 + (sda - 1) * lda;
    x += 4;
    for (; k < kmax - 7; k += 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[0 + lda * 1] * x_0;
      y_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
      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[0 + lda * 1] * x_0;
      y_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
    }
    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 + lda * 0] * x_0;
      y_1 += A[0 + lda * 1] * x_0;
      y_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
    }
  } else {
    A += 2;
    x += 2;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    A += 1;
    x += 1;
  }
  A = tA;
  x = tx;
  if (inverted_diag) {
    y_1 = x[1] - y_1;
    y_1 *= A[1 + lda * 1];
    x[1] = y_1;
    y_0 = x[0] - A[1 + lda * 0] * y_1 - y_0;
    y_0 *= A[0 + lda * 0];
    x[0] = y_0;
  } else {
    y_1 = x[1] - y_1;
    y_1 /= A[1 + lda * 1];
    x[1] = y_1;
    y_0 = x[0] - A[1 + lda * 0] * y_1 - y_0;
    y_0 /= A[0 + lda * 0];
    x[0] = y_0;
  }
}


x86 assembly (clang, -O0):
<kernel_dtrsv_t_2_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1124 <kernel_dtrsv_t_2_lib4+0x24>
jmp    186c <kernel_dtrsv_t_2_lib4+0x76c>
movl   $0x4,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x2,-0x2c(%rbp)
cmpl   $0x4,-0x4(%rbp)
jle    1686 <kernel_dtrsv_t_2_lib4+0x586>
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x4,-0x2c(%rbp)
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x2,%ecx
add    $0x4,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x7,%ecx
cmp    %ecx,%eax
jge    1503 <kernel_dtrsv_t_2_lib4+0x403>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x2c(%rbp)
jmp    1230 <kernel_dtrsv_t_2_lib4+0x130>
jmp    1508 <kernel_dtrsv_t_2_lib4+0x408>
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1681 <kernel_dtrsv_t_2_lib4+0x581>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
jmp    1508 <kernel_dtrsv_t_2_lib4+0x408>
jmp    169e <kernel_dtrsv_t_2_lib4+0x59e>
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
jmp    16a3 <kernel_dtrsv_t_2_lib4+0x5a3>
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1721 <kernel_dtrsv_t_2_lib4+0x621>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    16a3 <kernel_dtrsv_t_2_lib4+0x5a3>
mov    -0x38(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     17d2 <kernel_dtrsv_t_2_lib4+0x6d2>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    186c <kernel_dtrsv_t_2_lib4+0x76c>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dtrsv_t_2_lib4>:
test   %edi,%edi
jle    1484 <kernel_dtrsv_t_2_lib4+0x384>
push   %rbp
push   %r15
push   %r14
push   %rbx
cmp    $0x5,%edi
jb     136f <kernel_dtrsv_t_2_lib4+0x26f>
movsd  0x10(%rdx),%xmm1
movsd  0x18(%rdx),%xmm2
movhpd 0x30(%rdx),%xmm1
movsd  0x10(%r8),%xmm3
movsd  0x18(%r8),%xmm0
unpcklpd %xmm3,%xmm3
mulpd  %xmm1,%xmm3
xorpd  %xmm1,%xmm1
addpd  %xmm3,%xmm1
movhpd 0x38(%rdx),%xmm2
unpcklpd %xmm0,%xmm0
mulpd  %xmm2,%xmm0
addpd  %xmm1,%xmm0
shl    $0x2,%ecx
movslq %ecx,%r10
lea    (%rdx,%r10,8),%rax
lea    0x20(%r8),%r15
mov    $0x4,%r9d
cmp    $0xc,%edi
jb     12a8 <kernel_dtrsv_t_2_lib4+0x1a8>
lea    -0x7(%rdi),%r11d
lea    -0xc(%rdi),%r9d
and    $0xfffffff8,%r9d
mov    %r10,%r14
shl    $0x4,%r14
lea    0x0(,%r10,8),%rbx
mov    $0x4,%ebp
mov    %rax,%rcx
movsd  (%rax),%xmm2
movsd  0x8(%rax),%xmm3
movsd  0x10(%rax),%xmm4
movhpd 0x20(%rax),%xmm2
movsd  0x18(%rax),%xmm8
movsd  (%r15),%xmm6
movsd  0x8(%r15),%xmm7
movsd  0x10(%r15),%xmm5
movsd  0x18(%r15),%xmm1
unpcklpd %xmm6,%xmm6
mulpd  %xmm2,%xmm6
addpd  %xmm0,%xmm6
movhpd 0x28(%rax),%xmm3
unpcklpd %xmm7,%xmm7
mulpd  %xmm3,%xmm7
addpd  %xmm6,%xmm7
movhpd 0x30(%rax),%xmm4
unpcklpd %xmm5,%xmm5
mulpd  %xmm4,%xmm5
addpd  %xmm7,%xmm5
movhpd 0x38(%rax),%xmm8
unpcklpd %xmm1,%xmm1
mulpd  %xmm8,%xmm1
addpd  %xmm5,%xmm1
lea    (%rax,%rbx,1),%rax
movsd  (%rcx,%rbx,1),%xmm2
movsd  0x8(%rcx,%rbx,1),%xmm3
movsd  0x10(%rcx,%rbx,1),%xmm4
movsd  0x18(%rcx,%rbx,1),%xmm0
movhpd 0x20(%rcx,%rbx,1),%xmm2
movsd  0x20(%r15),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm2,%xmm5
addpd  %xmm1,%xmm5
movhpd 0x28(%rcx,%rbx,1),%xmm3
movsd  0x28(%r15),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm5,%xmm2
movhpd 0x30(%rcx,%rbx,1),%xmm4
movsd  0x30(%r15),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm2,%xmm1
movhpd 0x38(%rcx,%rbx,1),%xmm0
movsd  0x38(%r15),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
addpd  %xmm1,%xmm0
add    $0x8,%ebp
add    $0x40,%r15
add    %rbx,%rax
cmp    %r11d,%ebp
jl     1190 <kernel_dtrsv_t_2_lib4+0x90>
add    %r14,%rcx
addpd  %xmm1,%xmm2
add    $0xc,%r9d
mov    %rcx,%rax
movapd %xmm2,%xmm0
lea    -0x3(%rdi),%ecx
cmp    %ecx,%r9d
jge    1351 <kernel_dtrsv_t_2_lib4+0x251>
shl    $0x3,%r10
nopl   0x0(%rax,%rax,1)
movsd  (%rax),%xmm4
movsd  0x8(%rax),%xmm5
movsd  0x10(%rax),%xmm6
movsd  0x18(%rax),%xmm8
movhpd 0x20(%rax),%xmm4
movsd  (%r15),%xmm7
movsd  0x8(%r15),%xmm3
movsd  0x10(%r15),%xmm2
movsd  0x18(%r15),%xmm1
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm0,%xmm7
movhpd 0x28(%rax),%xmm5
unpcklpd %xmm3,%xmm3
mulpd  %xmm5,%xmm3
addpd  %xmm7,%xmm3
movhpd 0x30(%rax),%xmm6
unpcklpd %xmm2,%xmm2
mulpd  %xmm6,%xmm2
movhpd 0x38(%rax),%xmm8
addpd  %xmm3,%xmm2
unpcklpd %xmm1,%xmm1
mulpd  %xmm8,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x20,%r15
add    $0x4,%r9d
add    %r10,%rax
cmp    %ecx,%r9d
jl     12c0 <kernel_dtrsv_t_2_lib4+0x1c0>
addpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
cmp    %edi,%r9d
jge    1386 <kernel_dtrsv_t_2_lib4+0x286>
mov    %edi,%ebp
sub    %r9d,%ebp
mov    %r9d,%ecx
not    %ecx
test   $0x1,%bpl
jne    138f <kernel_dtrsv_t_2_lib4+0x28f>
add    %edi,%ecx
jne    13bd <kernel_dtrsv_t_2_lib4+0x2bd>
jmp    141c <kernel_dtrsv_t_2_lib4+0x31c>
lea    0x10(%rdx),%rax
lea    0x10(%r8),%r15
xorpd  %xmm0,%xmm0
mov    $0x2,%r9d
cmp    %edi,%r9d
jl     1356 <kernel_dtrsv_t_2_lib4+0x256>
movapd %xmm0,%xmm1
jmp    141c <kernel_dtrsv_t_2_lib4+0x31c>
movsd  (%rax),%xmm2
movhpd 0x20(%rax),%xmm2
movsd  (%r15),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
add    $0x8,%rax
add    $0x8,%r15
add    $0x1,%r9d
movapd %xmm1,%xmm0
add    %edi,%ecx
je     141c <kernel_dtrsv_t_2_lib4+0x31c>
sub    %r9d,%edi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rax,%rcx,8),%xmm3
movsd  0x8(%rax,%rcx,8),%xmm4
movhpd 0x20(%rax,%rcx,8),%xmm3
movsd  (%r15,%rcx,8),%xmm2
movsd  0x8(%r15,%rcx,8),%xmm1
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movhpd 0x28(%rax,%rcx,8),%xmm4
unpcklpd %xmm1,%xmm1
mulpd  %xmm4,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x2,%rcx
cmp    %ecx,%edi
jne    13d0 <kernel_dtrsv_t_2_lib4+0x2d0>
addpd  %xmm2,%xmm1
movsd  0x8(%r8),%xmm0
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
subsd  %xmm2,%xmm0
movsd  0x28(%rdx),%xmm2
test   %esi,%esi
je     1459 <kernel_dtrsv_t_2_lib4+0x359>
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%r8)
movsd  (%r8),%xmm2
mulsd  0x8(%rdx),%xmm0
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm2
mulsd  (%rdx),%xmm2
jmp    1479 <kernel_dtrsv_t_2_lib4+0x379>
divsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%r8)
movsd  (%r8),%xmm2
mulsd  0x8(%rdx),%xmm0
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  (%rdx),%xmm2
movsd  %xmm2,(%r8)
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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