// File: /workspace/github_cpp_makefile_star2_O2/j-faria[P]kima/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h
// Function: Eigen::internal::triangular_solve_matrix<double, long, 2, 2, false, 1, 0, 1>::run(long, long, double const*, long, double*, long, long, Eigen::internal::level3_blocking<double, double>&)
EIGEN_DONT_INLINE void triangular_solve_matrix<Scalar,Index,OnTheRight,Mode,Conjugate,TriStorageOrder,ColMajor,OtherInnerStride>::run(
    Index size, Index otherSize,
    const Scalar* _tri, Index triStride,
    Scalar* _other, Index otherIncr, Index otherStride,
    level3_blocking<Scalar,Scalar>& blocking)
  {
    Index rows = otherSize;
    typedef typename NumTraits<Scalar>::Real RealScalar;

    typedef blas_data_mapper<Scalar, Index, ColMajor, Unaligned, OtherInnerStride> LhsMapper;
    typedef const_blas_data_mapper<Scalar, Index, TriStorageOrder> RhsMapper;
    LhsMapper lhs(_other, otherStride, otherIncr);
    RhsMapper rhs(_tri, triStride);

    typedef gebp_traits<Scalar,Scalar> Traits;
    enum {
      RhsStorageOrder   = TriStorageOrder,
      SmallPanelWidth   = EIGEN_PLAIN_ENUM_MAX(Traits::mr,Traits::nr),
      IsLower = (Mode&Lower) == Lower
    };

    Index kc = blocking.kc();                   // cache block size along the K direction
    Index mc = (std::min)(rows,blocking.mc());  // cache block size along the M direction

    std::size_t sizeA = kc*mc;
    std::size_t sizeB = kc*size;

    ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());
    ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());

    conj_if<Conjugate> conj;
    gebp_kernel<Scalar, Scalar, Index, LhsMapper, Traits::mr, Traits::nr, false, Conjugate> gebp_kernel;
    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr, RhsStorageOrder> pack_rhs;
    gemm_pack_rhs<Scalar, Index, RhsMapper, Traits::nr, RhsStorageOrder,false,true> pack_rhs_panel;
    gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, ColMajor, false, true> pack_lhs_panel;

    for(Index k2=IsLower ? size : 0;
        IsLower ? k2>0 : k2<size;
        IsLower ? k2-=kc : k2+=kc)
    {
      const Index actual_kc = (std::min)(IsLower ? k2 : size-k2, kc);
      Index actual_k2 = IsLower ? k2-actual_kc : k2 ;

      Index startPanel = IsLower ? 0 : k2+actual_kc;
      Index rs = IsLower ? actual_k2 : size - actual_k2 - actual_kc;
      Scalar* geb = blockB+actual_kc*actual_kc;

      if (rs>0) pack_rhs(geb, rhs.getSubMapper(actual_k2,startPanel), actual_kc, rs);

      // triangular packing (we only pack the panels off the diagonal,
      // neglecting the blocks overlapping the diagonal
      {
        for (Index j2=0; j2<actual_kc; j2+=SmallPanelWidth)
        {
          Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);
          Index actual_j2 = actual_k2 + j2;
          Index panelOffset = IsLower ? j2+actualPanelWidth : 0;
          Index panelLength = IsLower ? actual_kc-j2-actualPanelWidth : j2;

          if (panelLength>0)
          pack_rhs_panel(blockB+j2*actual_kc,
                         rhs.getSubMapper(actual_k2+panelOffset, actual_j2),
                         panelLength, actualPanelWidth,
                         actual_kc, panelOffset);
        }
      }

      for(Index i2=0; i2<rows; i2+=mc)
      {
        const Index actual_mc = (std::min)(mc,rows-i2);

        // triangular solver kernel
        {
          // for each small block of the diagonal (=> vertical panels of rhs)
          for (Index j2 = IsLower
                      ? (actual_kc - ((actual_kc%SmallPanelWidth) ? Index(actual_kc%SmallPanelWidth)
                                                                  : Index(SmallPanelWidth)))
                      : 0;
               IsLower ? j2>=0 : j2<actual_kc;
               IsLower ? j2-=SmallPanelWidth : j2+=SmallPanelWidth)
          {
            Index actualPanelWidth = std::min<Index>(actual_kc-j2, SmallPanelWidth);
            Index absolute_j2 = actual_k2 + j2;
            Index panelOffset = IsLower ? j2+actualPanelWidth : 0;
            Index panelLength = IsLower ? actual_kc - j2 - actualPanelWidth : j2;

            // GEBP
            if(panelLength>0)
            {
              gebp_kernel(lhs.getSubMapper(i2,absolute_j2),
                          blockA, blockB+j2*actual_kc,
                          actual_mc, panelLength, actualPanelWidth,
                          Scalar(-1),
                          actual_kc, actual_kc, // strides
                          panelOffset, panelOffset); // offsets
            }

            // unblocked triangular solve
            for (Index k=0; k<actualPanelWidth; ++k)
            {
              Index j = IsLower ? absolute_j2+actualPanelWidth-k-1 : absolute_j2+k;

              typename LhsMapper::LinearMapper r = lhs.getLinearMapper(i2,j);
              for (Index k3=0; k3<k; ++k3)
              {
                Scalar b = conj(rhs(IsLower ? j+1+k3 : absolute_j2+k3,j));
                typename LhsMapper::LinearMapper a = lhs.getLinearMapper(i2,IsLower ? j+1+k3 : absolute_j2+k3);
                for (Index i=0; i<actual_mc; ++i)
                  r(i) -= a(i) * b;
              }
              if((Mode & UnitDiag)==0)
              {
                Scalar inv_rjj = RealScalar(1)/conj(rhs(j,j));
                for (Index i=0; i<actual_mc; ++i)
                  r(i) *= inv_rjj;
              }
            }

            // pack the just computed part of lhs to A
            pack_lhs_panel(blockA, lhs.getSubMapper(i2,absolute_j2),
                           actualPanelWidth, actual_mc,
                           actual_kc, j2);
          }
        }

        if (rs>0)
          gebp_kernel(lhs.getSubMapper(i2, startPanel), blockA, geb,
                      actual_mc, actual_kc, rs, Scalar(-1),
                      -1, -1, 0, 0);
      }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r8, -0xa0(%rbp)
movq %rdx, -0x78(%rbp)
movq %rdi, -0x88(%rbp)
cmpq $0x1, %r9
jne 0x18c56
movq %rcx, %r14
movq 0x18(%rbp), %r12
movq 0x10(%r12), %rax
movq 0x20(%r12), %rcx
cmpq %rsi, %rax
movq %rsi, -0xb0(%rbp)
movq %rsi, %rbx
movq %rax, -0x118(%rbp)
cmovlq %rax, %rbx
movq %rbx, -0xa8(%rbp)
movq %rcx, -0x80(%rbp)
imulq %rcx, %rbx
movq %rbx, %rax
shrq $0x3d, %rax
je 0x185f0
callq 0x14fa3
movabsq $0x1fffffffffffffff, %r13 # imm = 0x1FFFFFFFFFFFFFFF
movq -0x80(%rbp), %r15
imulq -0x88(%rbp), %r15
movq (%r12), %rax
leaq (,%rbx,8), %rdi
movq %rax, -0x50(%rbp)
testq %rax, %rax
je 0x18629
cmpq $0x20001, %rdi          # imm = 0x20001
setae %al
xorl %ecx, %ecx
jmp 0x18661
cmpq $0x20000, %rdi          # imm = 0x20000
ja 0x1864b
movq %rsp, %rcx
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rcx
movq %rcx, %rsp
xorl %eax, %eax
movq %rcx, -0x50(%rbp)
jmp 0x18661
callq 0x14fd0
xorl %ecx, %ecx
cmpq $0x0, (%r12)
movq %rax, -0x50(%rbp)
cmoveq %rax, %rcx
movb $0x1, %al
movq %rcx, -0x168(%rbp)
movq %rbx, -0x160(%rbp)
movb %al, -0x158(%rbp)
cmpq %r13, %r15
jbe 0x1867f
callq 0x14fa3
movq 0x8(%r12), %rax
leaq (,%r15,8), %rbx
movq %rax, -0x60(%rbp)
testq %rax, %rax
movq -0x80(%rbp), %r13
je 0x1869d
xorl %edx, %edx
jmp 0x186d5
cmpq $0x20000, %rbx          # imm = 0x20000
ja 0x186bd
movq %rsp, %rdx
leaq 0x1e(%rbx), %rcx
andq $-0x10, %rcx
subq %rcx, %rdx
movq %rdx, %rsp
movq %rdx, -0x60(%rbp)
jmp 0x186d5
movq %rbx, %rdi
callq 0x14fd0
xorl %edx, %edx
cmpq $0x0, 0x8(%r12)
movq %rax, -0x60(%rbp)
cmoveq %rax, %rdx
cmpq $0x20001, %rbx          # imm = 0x20001
movq %rdx, -0x150(%rbp)
movq %r15, -0x148(%rbp)
setae -0x140(%rbp)
movq 0x10(%rbp), %rcx
leaq (,%r13,8), %rax
movq %rax, -0xe8(%rbp)
movq %r13, %rax
imulq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0xe0(%rbp)
movq -0xa8(%rbp), %rax
leaq (,%rax,8), %rax
movq %rax, -0x100(%rbp)
movq %rcx, %rax
shlq $0x5, %rax
movq %rax, -0x130(%rbp)
leaq (,%rcx,8), %r12
movsd 0x238e6(%rip), %xmm3    # 0x3c030
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rcx
xorl %ebx, %ebx
cmpq %rcx, %r13
movq %rcx, %rax
cmovlq %r13, %rax
movq %rax, -0xb8(%rbp)
movq -0x88(%rbp), %r8
subq %rbx, %r8
jle 0x18c2f
movq %rcx, -0xf0(%rbp)
cmpq %r8, %r13
movq %r8, %r9
cmovlq %r13, %r9
leaq (%r9,%rbx), %r15
movq %r9, %rax
imulq %r9, %rax
movq -0x60(%rbp), %r13
leaq (,%rax,8), %rsi
addq %r13, %rsi
subq %r9, %r8
movq %r8, -0x110(%rbp)
movq %r9, -0x58(%rbp)
movq %rsi, -0x108(%rbp)
movq %rbx, -0xc8(%rbp)
movq %r15, -0x68(%rbp)
jle 0x1881b
imulq %r14, %rbx
movq -0x78(%rbp), %rax
leaq (%rax,%rbx,8), %rax
leaq (%rax,%r15,8), %rax
movq %rax, -0x40(%rbp)
movq %r14, -0x38(%rbp)
subq $0x8, %rsp
leaq -0x2c(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r9, %rcx
xorl %r9d, %r9d
pushq $0x0
callq 0x193e0
popq %rax
popq %rcx
movsd 0x2381b(%rip), %xmm3    # 0x3c030
movq -0x58(%rbp), %r9
jmp 0x1881f
imulq %r14, %rbx
movq -0xb8(%rbp), %r15
movq %r15, %rax
shlq $0x5, %rax
movq %rax, -0x70(%rbp)
movq -0x98(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %r13, %rsi
xorl %r13d, %r13d
cmpq %r9, %r13
jge 0x188aa
testq %r13, %r13
je 0x18898
cmpq $0x4, %r15
pushq $0x4
popq %r8
movq %r15, -0x48(%rbp)
cmovlq %r15, %r8
movq %rax, %rbx
movq %rax, -0x40(%rbp)
movq %r14, -0x38(%rbp)
subq $0x8, %rsp
leaq -0x2b(%rbp), %rdi
movq %rsi, %r15
leaq -0x40(%rbp), %rdx
movq %r13, %rcx
pushq $0x0
callq 0x194da
popq %rax
popq %rcx
movsd 0x237a6(%rip), %xmm3    # 0x3c030
movq -0x58(%rbp), %r9
movq %rbx, %rax
movq %r15, %rsi
movq -0x48(%rbp), %r15
addq $0x4, %r13
addq $0x20, %rax
addq -0x70(%rbp), %rsi
addq $-0x4, %r15
jmp 0x18842
movq -0x68(%rbp), %rcx
imulq 0x10(%rbp), %rcx
movq -0xa0(%rbp), %rax
leaq (%rax,%rcx,8), %rax
movq %rax, -0xf8(%rbp)
movq -0x90(%rbp), %rdx
movq -0xb0(%rbp), %rax
movq %rax, %r15
xorl %esi, %esi
pushq $0x4
popq %rbx
movq -0x118(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, %r13
cmovlq %rcx, %r13
cmpq %r15, %r13
cmovgeq %r15, %r13
testq %r13, %r13
movl $0x0, %ecx
cmovleq %rcx, %r13
movq %rax, %r8
subq %rsi, %r8
jle 0x18be8
movq %r15, -0x128(%rbp)
movq -0xa8(%rbp), %rax
cmpq %rax, %r8
cmovgeq %rax, %r8
movq -0xa0(%rbp), %rax
movq %rsi, -0xc0(%rbp)
leaq (%rax,%rsi,8), %rax
movq %rax, -0xd8(%rbp)
movq %rdx, -0x120(%rbp)
movq %rdx, -0x48(%rbp)
movq -0xb8(%rbp), %rcx
xorl %edx, %edx
movq %r8, -0xd0(%rbp)
cmpq $0x4, %rcx
movq %rbx, %r15
cmovlq %rcx, %r15
testq %r15, %r15
movl $0x0, %eax
cmovleq %rax, %r15
movq %r9, %rax
subq %rdx, %rax
jle 0x18b3d
movq %rcx, -0x138(%rbp)
cmpq $0x4, %rax
cmovgeq %rbx, %rax
movq %rax, -0x68(%rbp)
movq -0xc8(%rbp), %rax
leaq (%rdx,%rax), %rbx
movq %rdx, -0x70(%rbp)
testq %rdx, %rdx
je 0x18a24
movq %rbx, %rax
movq 0x10(%rbp), %rcx
imulq %rcx, %rax
movq -0xd8(%rbp), %rdx
leaq (%rdx,%rax,8), %rax
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq -0x70(%rbp), %r10
movq %r10, %rax
imulq %r9, %rax
movq -0x60(%rbp), %rcx
leaq (%rcx,%rax,8), %rcx
subq $0x30, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq -0x68(%rbp), %rax
movq %rax, (%rsp)
leaq -0x29(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r10, %r9
movsd 0x23cc0(%rip), %xmm0    # 0x3c6c8
callq 0x1963e
addq $0x30, %rsp
movsd 0x23617(%rip), %xmm3    # 0x3c030
movq -0x58(%rbp), %r9
movq -0xd0(%rbp), %r8
movq -0x48(%rbp), %rax
xorl %ecx, %ecx
cmpq %r15, %rcx
je 0x18ac5
leaq (%rcx,%rbx), %rdx
movq -0x78(%rbp), %rsi
leaq (%rsi,%rdx,8), %rsi
movq -0x48(%rbp), %rdi
xorl %r11d, %r11d
cmpq %rcx, %r11
je 0x18a88
leaq (%r11,%rbx), %r10
imulq %r14, %r10
movsd (%rsi,%r10,8), %xmm0
xorl %r10d, %r10d
cmpq %r10, %r13
je 0x18a80
movsd (%rax,%r10,8), %xmm1
movsd (%rdi,%r10,8), %xmm2
mulsd %xmm0, %xmm2
subsd %xmm2, %xmm1
movsd %xmm1, (%rax,%r10,8)
incq %r10
jmp 0x18a5c
incq %r11
addq %r12, %rdi
jmp 0x18a46
movq %rdx, %rsi
imulq %r14, %rsi
movq -0x78(%rbp), %rdi
leaq (%rdi,%rsi,8), %rsi
movapd %xmm3, %xmm0
divsd (%rsi,%rdx,8), %xmm0
xorl %edx, %edx
cmpq %rdx, %r13
je 0x18aba
movsd (%rax,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rdx,8)
incq %rdx
jmp 0x18aa2
incq %rcx
addq %r12, %rax
jmp 0x18a2a
movq 0x10(%rbp), %rcx
imulq %rcx, %rbx
movq -0xd8(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
subq $0x8, %rsp
leaq -0x2a(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %r15
pushq %r15
callq 0x1a8d8
popq %rax
popq %rcx
addq $0x4, %r15
movq -0x138(%rbp), %rcx
addq $-0x4, %rcx
movq -0x48(%rbp), %rax
addq -0x130(%rbp), %rax
movq %rax, -0x48(%rbp)
pushq $0x4
popq %rbx
movsd 0x23506(%rip), %xmm3    # 0x3c030
movq -0x58(%rbp), %r9
movq -0xd0(%rbp), %r8
movq %r15, %rdx
jmp 0x18954
movq -0x110(%rbp), %rdx
testq %rdx, %rdx
movq -0x108(%rbp), %rcx
movq -0x128(%rbp), %r15
jle 0x18bba
movq -0xf8(%rbp), %rax
movq -0xc0(%rbp), %rsi
leaq (%rax,%rsi,8), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
subq $0x30, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
orq $-0x1, 0x10(%rsp)
orq $-0x1, 0x8(%rsp)
movq %rdx, (%rsp)
leaq -0x29(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movsd 0x23b23(%rip), %xmm0    # 0x3c6c8
callq 0x1963e
addq $0x30, %rsp
movsd 0x2347a(%rip), %xmm3    # 0x3c030
movq -0x58(%rbp), %r9
movq -0xa8(%rbp), %rax
movq -0xc0(%rbp), %rsi
addq %rax, %rsi
subq %rax, %r15
movq -0x120(%rbp), %rdx
addq -0x100(%rbp), %rdx
movq -0xb0(%rbp), %rax
jmp 0x188db
movq -0x80(%rbp), %r13
movq -0xc8(%rbp), %rbx
addq %r13, %rbx
movq -0xf0(%rbp), %rcx
subq %r13, %rcx
movq -0x98(%rbp), %rax
addq -0xe8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
addq -0xe0(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x1876c
leaq -0x150(%rbp), %rdi
callq 0x1aab2
leaq -0x168(%rbp), %rdi
callq 0x1aab2
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26a44(%rip), %rdi     # 0x3f6a1
leaq 0x26a45(%rip), %rsi     # 0x3f6a9
leaq 0x28050(%rip), %rcx     # 0x40cbb
movl $0xd1, %edx
callq 0x62b0
jmp 0x18c77
movq %rax, %rbx
jmp 0x18c93
jmp 0x18c84
jmp 0x18c84
jmp 0x18c84
jmp 0x18c84
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
callq 0x1aab2
leaq -0x168(%rbp), %rdi
callq 0x1aab2
movq %rbx, %rdi
callq 0x66e0
nop