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


x86 assembly (clang, -O0):
<kernel_dtrsv_t_1_lib4_new>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1128 <kernel_dtrsv_t_1_lib4_new+0x28>
jmp    15e9 <kernel_dtrsv_t_1_lib4_new+0x4e9>
movl   $0x4,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x1,-0x30(%rbp)
cmpl   $0x4,-0x4(%rbp)
jle    14e9 <kernel_dtrsv_t_1_lib4_new+0x3e9>
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%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  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  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x4,-0x30(%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    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x7,%ecx
cmp    %ecx,%eax
jge    13e6 <kernel_dtrsv_t_1_lib4_new+0x2e6>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%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  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  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  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%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    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%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  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  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  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%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    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x30(%rbp)
jmp    1213 <kernel_dtrsv_t_1_lib4_new+0x113>
jmp    13eb <kernel_dtrsv_t_1_lib4_new+0x2eb>
mov    -0x30(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    14e4 <kernel_dtrsv_t_1_lib4_new+0x3e4>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%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  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  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  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%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    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    13eb <kernel_dtrsv_t_1_lib4_new+0x2eb>
jmp    1501 <kernel_dtrsv_t_1_lib4_new+0x401>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
jmp    1506 <kernel_dtrsv_t_1_lib4_new+0x406>
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1564 <kernel_dtrsv_t_1_lib4_new+0x464>
mov    -0x28(%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
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1506 <kernel_dtrsv_t_1_lib4_new+0x406>
mov    -0x38(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     15b4 <kernel_dtrsv_t_1_lib4_new+0x4b4>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    15e9 <kernel_dtrsv_t_1_lib4_new+0x4e9>
mov    -0x28(%rbp),%rax
movsd  (%rax),%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    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dtrsv_t_1_lib4_new>:
test   %edi,%edi
jle    135b <kernel_dtrsv_t_1_lib4_new+0x25b>
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x5,%edi
jb     1288 <kernel_dtrsv_t_1_lib4_new+0x188>
movsd  0x8(%rsi),%xmm0
mulsd  0x8(%r9),%xmm0
movsd  0x10(%rsi),%xmm1
xorpd  %xmm2,%xmm2
mulsd  0x10(%r9),%xmm1
addsd  %xmm0,%xmm2
movsd  0x18(%rsi),%xmm0
mulsd  0x18(%r9),%xmm0
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
shl    $0x2,%edx
movslq %edx,%r11
lea    (%rsi,%r11,8),%rbx
lea    0x20(%r9),%rax
mov    $0x4,%r10d
cmp    $0xc,%edi
jb     1229 <kernel_dtrsv_t_1_lib4_new+0x129>
lea    -0x7(%rdi),%r15d
lea    -0xc(%rdi),%r10d
and    $0xfffffff8,%r10d
mov    %r11,%r14
shl    $0x4,%r14
lea    0x0(,%r11,8),%r12
mov    $0x4,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdx
movsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm2
mulsd  (%rax),%xmm1
addsd  %xmm0,%xmm1
mulsd  0x8(%rax),%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rbx),%xmm0
mulsd  0x10(%rax),%xmm0
addsd  %xmm2,%xmm0
movsd  0x18(%rbx),%xmm1
mulsd  0x18(%rax),%xmm1
addsd  %xmm0,%xmm1
lea    (%rbx,%r12,1),%rbx
movsd  (%rdx,%r12,1),%xmm0
movsd  0x8(%rdx,%r12,1),%xmm2
mulsd  0x20(%rax),%xmm0
addsd  %xmm1,%xmm0
mulsd  0x28(%rax),%xmm2
addsd  %xmm0,%xmm2
movsd  0x10(%rdx,%r12,1),%xmm1
mulsd  0x30(%rax),%xmm1
addsd  %xmm2,%xmm1
movsd  0x18(%rdx,%r12,1),%xmm0
mulsd  0x38(%rax),%xmm0
addsd  %xmm1,%xmm0
add    $0x8,%ebp
add    $0x40,%rax
add    %r12,%rbx
cmp    %r15d,%ebp
jl     1190 <kernel_dtrsv_t_1_lib4_new+0x90>
add    %r14,%rdx
add    $0xc,%r10d
mov    %rdx,%rbx
lea    -0x3(%rdi),%edx
cmp    %edx,%r10d
jge    129a <kernel_dtrsv_t_1_lib4_new+0x19a>
shl    $0x3,%r11
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm2
mulsd  (%rax),%xmm1
addsd  %xmm0,%xmm1
mulsd  0x8(%rax),%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rbx),%xmm1
mulsd  0x10(%rax),%xmm1
addsd  %xmm2,%xmm1
movsd  0x18(%rbx),%xmm0
mulsd  0x18(%rax),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rax
add    $0x4,%r10d
add    %r11,%rbx
cmp    %edx,%r10d
jl     1240 <kernel_dtrsv_t_1_lib4_new+0x140>
jmp    129a <kernel_dtrsv_t_1_lib4_new+0x19a>
lea    0x8(%rsi),%rbx
lea    0x8(%r9),%rax
xorpd  %xmm0,%xmm0
mov    $0x1,%r10d
cmp    %edi,%r10d
jge    1336 <kernel_dtrsv_t_1_lib4_new+0x236>
mov    %edi,%ebp
sub    %r10d,%ebp
mov    %r10d,%r11d
not    %r11d
add    %edi,%r11d
and    $0x3,%ebp
je     12de <kernel_dtrsv_t_1_lib4_new+0x1de>
neg    %ebp
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movsd  (%rbx),%xmm1
mulsd  (%rax),%xmm1
addsd  %xmm1,%xmm0
add    $0x8,%rbx
add    $0x8,%rax
add    $0xffffffff,%edx
cmp    %edx,%ebp
jne    12c0 <kernel_dtrsv_t_1_lib4_new+0x1c0>
sub    %edx,%r10d
cmp    $0x3,%r11d
jb     1336 <kernel_dtrsv_t_1_lib4_new+0x236>
sub    %r10d,%edi
xor    %edx,%edx
nopl   0x0(%rax)
movsd  (%rbx,%rdx,8),%xmm1
movsd  0x8(%rbx,%rdx,8),%xmm2
mulsd  (%rax,%rdx,8),%xmm1
mulsd  0x8(%rax,%rdx,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x10(%rbx,%rdx,8),%xmm3
mulsd  0x10(%rax,%rdx,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x18(%rbx,%rdx,8),%xmm0
mulsd  0x18(%rax,%rdx,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rdx
cmp    %edx,%edi
jne    12f0 <kernel_dtrsv_t_1_lib4_new+0x1f0>
movsd  (%r9),%xmm1
subsd  %xmm0,%xmm1
test   %ecx,%ecx
je     134a <kernel_dtrsv_t_1_lib4_new+0x24a>
mulsd  (%r8),%xmm1
jmp    134e <kernel_dtrsv_t_1_lib4_new+0x24e>
divsd  (%rsi),%xmm1
movsd  %xmm1,(%r9)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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