// File: /workspace/github_cpp_makefile_star2_O1/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, -0xb8(%rbp)
cmpq $0x1, %r9
jne 0x1ba60
movq %rcx, %r15
movq 0x18(%rbp), %rbx
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
cmpq %rsi, %rax
movq %rsi, -0xf8(%rbp)
movq %rsi, %r14
movq %rax, -0x140(%rbp)
cmovlq %rax, %r14
movq %r14, -0x90(%rbp)
movq %rcx, -0x60(%rbp)
imulq %rcx, %r14
movq %r14, %rax
shrq $0x3d, %rax
jne 0x1ba7f
movq %rdi, %r12
movq (%rbx), %rax
movq %rax, -0x70(%rbp)
testq %rax, %rax
movq %rdx, -0x38(%rbp)
je 0x1b381
xorl %eax, %eax
jmp 0x1b3c7
leaq (,%r14,8), %rdi
cmpq $0x4000, %r14           # imm = 0x4000
ja 0x1b3a9
movq %rsp, %rax
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rax
movq %rax, %rsp
movq %rax, -0x70(%rbp)
jmp 0x1b3c7
callq 0x6520
testb $0xf, %al
jne 0x1bade
movq %rax, -0x70(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
je 0x1bae0
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
movq -0x60(%rbp), %r13
imulq %r12, %r13
cmpq %rcx, %r13
ja 0x1baad
movq 0x8(%rbx), %rcx
movq %rcx, -0x68(%rbp)
testq %rcx, %rcx
movq %r14, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq %r13, -0xe0(%rbp)
je 0x1b41c
movq $0x0, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq -0x90(%rbp), %rbx
jmp 0x1b47f
leaq (,%r13,8), %rdi
cmpq $0x4000, %r13           # imm = 0x4000
movq -0x90(%rbp), %rbx
ja 0x1b456
movq %rsp, %rcx
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rcx
movq %rcx, %rsp
movq %rcx, -0x88(%rbp)
movq %rcx, -0x68(%rbp)
movq -0x60(%rbp), %rax
jmp 0x1b47f
callq 0x6520
testb $0xf, %al
jne 0x1bae2
movq %rax, -0x68(%rbp)
movq %rax, -0x88(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
movq -0x60(%rbp), %rax
je 0x1bb01
testq %r12, %r12
jle 0x1ba1f
movq 0x10(%rbp), %rcx
leaq 0x8(,%r15,8), %rsi
imulq %rax, %rsi
movq %rsi, -0x118(%rbp)
movq %rax, %rsi
imulq %rcx, %rsi
shlq $0x3, %rsi
movq %rsi, -0x110(%rbp)
leaq (,%rbx,8), %rsi
movq %rsi, -0x138(%rbp)
movq %rcx, %rsi
shlq $0x5, %rsi
movq %rsi, -0x150(%rbp)
leaq (,%rcx,8), %r13
xorl %ebx, %ebx
movsd 0x23b50(%rip), %xmm3    # 0x3f030
movq -0xb8(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movq %rdx, -0xb0(%rbp)
movq %r12, %r14
movq %r12, -0x120(%rbp)
cmpq %r14, %rax
movq %r14, %rcx
cmovlq %rax, %rcx
movq %rcx, -0xf0(%rbp)
movq %r12, %rsi
subq %rbx, %rsi
cmpq %rsi, %rax
movq %rsi, %r9
cmovlq %rax, %r9
leaq (%r9,%rbx), %rax
movq %rax, -0x80(%rbp)
movq %r9, %rax
imulq %r9, %rax
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, -0xe8(%rbp)
subq %r9, %rsi
movq %rsi, -0xc0(%rbp)
movq %r9, -0x78(%rbp)
jle 0x1b5a4
movq %rbx, %rax
imulq %r15, %rax
leaq (%rdx,%rax,8), %rax
movq -0x80(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq %r15, -0x48(%rbp)
subq $0x8, %rsp
leaq -0x3b(%rbp), %rdi
movq -0xe8(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq %r9, %rcx
movq -0xc0(%rbp), %r8
xorl %r9d, %r9d
pushq $0x0
callq 0x1c2ee
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x23a90(%rip), %xmm3    # 0x3f030
movq -0x78(%rbp), %r9
movq %r14, -0x128(%rbp)
movq %rbx, -0x100(%rbp)
testq %r9, %r9
jle 0x1b646
movq -0xf0(%rbp), %r12
movq %r12, %rax
shlq $0x5, %rax
movq %rax, -0x58(%rbp)
movq -0xb0(%rbp), %rax
movq -0x68(%rbp), %rbx
xorl %r14d, %r14d
testq %r14, %r14
je 0x1b631
cmpq $0x4, %r12
movl $0x4, %r8d
cmovlq %r12, %r8
movq %rax, -0xd8(%rbp)
movq %rax, -0x50(%rbp)
movq %r15, -0x48(%rbp)
subq $0x8, %rsp
leaq -0x3a(%rbp), %rdi
movq %rbx, %rsi
leaq -0x50(%rbp), %rdx
movq %r14, %rcx
pushq $0x0
callq 0x1c3ee
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x23a0a(%rip), %xmm3    # 0x3f030
movq -0x78(%rbp), %r9
movq -0xd8(%rbp), %rax
addq $0x4, %r14
addq $-0x4, %r12
addq -0x58(%rbp), %rbx
addq $0x20, %rax
cmpq %r9, %r14
jl 0x1b5db
movq -0xf8(%rbp), %r14
testq %r14, %r14
movq -0x90(%rbp), %rbx
jle 0x1b9cd
movq -0x80(%rbp), %rcx
imulq 0x10(%rbp), %rcx
movq -0xb8(%rbp), %rax
leaq (%rax,%rcx,8), %rax
movq %rax, -0x130(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %r14, %rcx
xorl %esi, %esi
movq -0x140(%rbp), %rax
cmpq %r14, %rax
movq %r14, %r12
cmovlq %rax, %r12
cmpq %rcx, %r12
movq %rcx, -0x148(%rbp)
cmovgeq %rcx, %r12
movq %rsi, -0xd0(%rbp)
subq %rsi, %r14
cmpq %rbx, %r14
cmovgeq %rbx, %r14
testq %r9, %r9
jle 0x1b904
movq -0xb8(%rbp), %rax
movq -0xd0(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x108(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0xf0(%rbp), %rcx
xorl %r10d, %r10d
movl $0x4, %eax
cmpq %rax, %rcx
movl $0x4, %esi
movq %rcx, -0x160(%rbp)
cmovlq %rcx, %rsi
cmpq $0x2, %rsi
movl $0x1, %eax
cmovlq %rax, %rsi
movq %rsi, -0xd8(%rbp)
movq %r9, %rcx
subq %r10, %rcx
cmpq $0x4, %rcx
movl $0x4, %eax
cmovlq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x100(%rbp), %rax
leaq (%r10,%rax), %rbx
testq %r10, %r10
movq %r10, -0x168(%rbp)
je 0x1b7dc
movq %rcx, -0x158(%rbp)
movq %rbx, %rax
movq 0x10(%rbp), %rcx
imulq %rcx, %rax
movq -0x108(%rbp), %rdx
leaq (%rdx,%rax,8), %rax
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %r10, %rax
imulq %r9, %rax
movq -0x68(%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 -0x80(%rbp), %rax
movq %rax, (%rsp)
leaq -0x29(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r14, %r8
movq %r10, %r9
movsd 0x23f44(%rip), %xmm0    # 0x3f700
callq 0x1c542
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x2385f(%rip), %xmm3    # 0x3f030
movq -0x78(%rbp), %r9
movq -0x158(%rbp), %rcx
testq %rcx, %rcx
jle 0x1b887
movq -0x58(%rbp), %rax
xorl %ecx, %ecx
leaq (%rcx,%rbx), %r10
testq %rcx, %rcx
je 0x1b842
leaq (%rdx,%r10,8), %rsi
movq -0x58(%rbp), %rdi
xorl %r8d, %r8d
testq %r14, %r14
jle 0x1b837
leaq (%r8,%rbx), %r11
imulq %r15, %r11
movsd (%rsi,%r11,8), %xmm0
xorl %r11d, %r11d
movsd (%rax,%r11,8), %xmm1
movsd (%rdi,%r11,8), %xmm2
mulsd %xmm0, %xmm2
subsd %xmm2, %xmm1
movsd %xmm1, (%rax,%r11,8)
incq %r11
cmpq %r11, %r12
jne 0x1b815
incq %r8
addq %r13, %rdi
cmpq %rcx, %r8
jne 0x1b7ff
testq %r14, %r14
jle 0x1b874
movq %r10, %rsi
imulq %r15, %rsi
leaq (%rdx,%rsi,8), %rsi
movapd %xmm3, %xmm0
divsd (%rsi,%r10,8), %xmm0
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %r12
jne 0x1b85e
incq %rcx
addq %r13, %rax
cmpq -0xd8(%rbp), %rcx
jne 0x1b7eb
movq 0x10(%rbp), %rcx
imulq %rcx, %rbx
movq -0x108(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
subq $0x8, %rsp
leaq -0x39(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq %r14, %r8
movq -0x168(%rbp), %rbx
pushq %rbx
callq 0x1d3de
addq $0x10, %rsp
addq $0x4, %rbx
movq -0x160(%rbp), %rcx
addq $-0x4, %rcx
movq -0x58(%rbp), %rax
addq -0x150(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x78(%rbp), %r9
cmpq %r9, %rbx
movq -0x38(%rbp), %rdx
movsd 0x23735(%rip), %xmm3    # 0x3f030
movq %rbx, %r10
jl 0x1b6f2
cmpq $0x0, -0xc0(%rbp)
movq -0x90(%rbp), %rbx
jle 0x1b994
movq -0x130(%rbp), %rax
movq -0xd0(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
subq $0x30, %rsp
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rsp)
movq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq -0xc0(%rbp), %rax
movq %rax, (%rsp)
leaq -0x29(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq -0xe8(%rbp), %rcx
movq %r14, %r8
movsd 0x23d85(%rip), %xmm0    # 0x3f700
callq 0x1c542
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x236a0(%rip), %xmm3    # 0x3f030
movq -0x78(%rbp), %r9
movq -0xd0(%rbp), %rsi
addq %rbx, %rsi
movq -0x148(%rbp), %rcx
subq %rbx, %rcx
movq -0xc8(%rbp), %rax
addq -0x138(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xf8(%rbp), %r14
cmpq %r14, %rsi
jl 0x1b68b
movq -0x60(%rbp), %rax
movq -0x100(%rbp), %rbx
addq %rax, %rbx
movq -0x128(%rbp), %r14
subq %rax, %r14
movq -0xb0(%rbp), %rcx
addq -0x118(%rbp), %rcx
movq %rcx, -0xb0(%rbp)
movq -0xa8(%rbp), %rcx
addq -0x110(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movq -0x120(%rbp), %r12
cmpq %r12, %rbx
jl 0x1b4ff
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
jb 0x1ba38
movq -0x88(%rbp), %rdi
callq 0x64d0
cmpq $0x4001, -0xa0(%rbp) # imm = 0x4001
movq -0x98(%rbp), %rdi
jb 0x1ba51
callq 0x64d0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25d2f(%rip), %rdi     # 0x41796
leaq 0x25d30(%rip), %rsi     # 0x4179e
leaq 0x26595(%rip), %rcx     # 0x4200a
movl $0xd1, %edx
callq 0x62b0
movl $0x8, %edi
callq 0x61d0
movq 0x374d8(%rip), %rcx     # 0x52f68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x37502(%rip), %rsi     # 0x52fa0
movq 0x374ab(%rip), %rdx     # 0x52f50
movq %rax, %rdi
callq 0x66c0
movq %rax, %r15
movl $0x8, %edi
callq 0x61d0
movq 0x374a7(%rip), %rcx     # 0x52f68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x374d1(%rip), %rsi     # 0x52fa0
movq 0x3747a(%rip), %rdx     # 0x52f50
movq %rax, %rdi
callq 0x66c0
jmp 0x1bae2
jmp 0x1ba7f
leaq 0x24494(%rip), %rdi     # 0x3ff7d
leaq 0x298db(%rip), %rsi     # 0x453cb
leaq 0x24541(%rip), %rcx     # 0x40038
movl $0xb8, %edx
callq 0x62b0
movl $0x8, %edi
callq 0x61d0
movq 0x37456(%rip), %rcx     # 0x52f68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x37480(%rip), %rsi     # 0x52fa0
movq 0x37429(%rip), %rdx     # 0x52f50
movq %rax, %rdi
callq 0x66c0
movq %rax, %rbx
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
jmp 0x1bb79
movq %rax, %rbx
jmp 0x1bb79
jmp 0x1bb4f
jmp 0x1bb4f
jmp 0x1bb4f
jmp 0x1bb4f
movq %rax, %rbx
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
movq -0x88(%rbp), %rdi
jb 0x1bb79
callq 0x64d0
cmpq $0x4001, %r14           # imm = 0x4001
jb 0x1bb8a
movq %r15, %rdi
callq 0x64d0
movq %rbx, %rdi
callq 0x6710