// File: /workspace/github_cpp_makefile_star2_O3/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 0x1b258
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 0x1b277
movq %rdi, %r12
movq (%rbx), %rax
movq %rax, -0x70(%rbp)
testq %rax, %rax
movq %rdx, -0x38(%rbp)
je 0x1ab79
xorl %eax, %eax
jmp 0x1abbf
leaq (,%r14,8), %rdi
cmpq $0x4000, %r14           # imm = 0x4000
ja 0x1aba1
movq %rsp, %rax
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rax
movq %rax, %rsp
movq %rax, -0x70(%rbp)
jmp 0x1abbf
callq 0x6520
testb $0xf, %al
jne 0x1b2d6
movq %rax, -0x70(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
je 0x1b2d8
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
movq -0x60(%rbp), %r13
imulq %r12, %r13
cmpq %rcx, %r13
ja 0x1b2a5
movq 0x8(%rbx), %rcx
movq %rcx, -0x68(%rbp)
testq %rcx, %rcx
movq %r14, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq %r13, -0xe0(%rbp)
je 0x1ac14
movq $0x0, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq -0x90(%rbp), %rbx
jmp 0x1ac77
leaq (,%r13,8), %rdi
cmpq $0x4000, %r13           # imm = 0x4000
movq -0x90(%rbp), %rbx
ja 0x1ac4e
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 0x1ac77
callq 0x6520
testb $0xf, %al
jne 0x1b2da
movq %rax, -0x68(%rbp)
movq %rax, -0x88(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
movq -0x60(%rbp), %rax
je 0x1b2f9
testq %r12, %r12
jle 0x1b217
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 0x22358(%rip), %xmm3    # 0x3d030
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 0x1ad9c
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 0x1bae2
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x22298(%rip), %xmm3    # 0x3d030
movq -0x78(%rbp), %r9
movq %r14, -0x128(%rbp)
movq %rbx, -0x100(%rbp)
testq %r9, %r9
jle 0x1ae3e
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 0x1ae29
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 0x1bbe2
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x22212(%rip), %xmm3    # 0x3d030
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 0x1add3
movq -0xf8(%rbp), %r14
testq %r14, %r14
movq -0x90(%rbp), %rbx
jle 0x1b1c5
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 0x1b0fc
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 0x1afd4
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 0x22774(%rip), %xmm0    # 0x3d728
callq 0x1bd36
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x22067(%rip), %xmm3    # 0x3d030
movq -0x78(%rbp), %r9
movq -0x158(%rbp), %rcx
testq %rcx, %rcx
jle 0x1b07f
movq -0x58(%rbp), %rax
xorl %ecx, %ecx
leaq (%rcx,%rbx), %r10
testq %rcx, %rcx
je 0x1b03a
leaq (%rdx,%r10,8), %rsi
movq -0x58(%rbp), %rdi
xorl %r8d, %r8d
testq %r14, %r14
jle 0x1b02f
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 0x1b00d
incq %r8
addq %r13, %rdi
cmpq %rcx, %r8
jne 0x1aff7
testq %r14, %r14
jle 0x1b06c
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 0x1b056
incq %rcx
addq %r13, %rax
cmpq -0xd8(%rbp), %rcx
jne 0x1afe3
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 0x1cb9a
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 0x21f3d(%rip), %xmm3    # 0x3d030
movq %rbx, %r10
jl 0x1aeea
cmpq $0x0, -0xc0(%rbp)
movq -0x90(%rbp), %rbx
jle 0x1b18c
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 0x225b5(%rip), %xmm0    # 0x3d728
callq 0x1bd36
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x21ea8(%rip), %xmm3    # 0x3d030
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 0x1ae83
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 0x1acf7
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
jb 0x1b230
movq -0x88(%rbp), %rdi
callq 0x64d0
cmpq $0x4001, -0xa0(%rbp) # imm = 0x4001
movq -0x98(%rbp), %rdi
jb 0x1b249
callq 0x64d0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24573(%rip), %rdi     # 0x3f7d2
leaq 0x24574(%rip), %rsi     # 0x3f7da
leaq 0x24dd9(%rip), %rcx     # 0x40046
movl $0xd1, %edx
callq 0x62b0
movl $0x8, %edi
callq 0x61d0
movq 0x34ce0(%rip), %rcx     # 0x4ff68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x34d0a(%rip), %rsi     # 0x4ffa0
movq 0x34cb3(%rip), %rdx     # 0x4ff50
movq %rax, %rdi
callq 0x66c0
movq %rax, %r15
movl $0x8, %edi
callq 0x61d0
movq 0x34caf(%rip), %rcx     # 0x4ff68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x34cd9(%rip), %rsi     # 0x4ffa0
movq 0x34c82(%rip), %rdx     # 0x4ff50
movq %rax, %rdi
callq 0x66c0
jmp 0x1b2da
jmp 0x1b277
leaq 0x22cd8(%rip), %rdi     # 0x3dfb9
leaq 0x2763f(%rip), %rsi     # 0x42927
leaq 0x22d85(%rip), %rcx     # 0x3e074
movl $0xb8, %edx
callq 0x62b0
movl $0x8, %edi
callq 0x61d0
movq 0x34c5e(%rip), %rcx     # 0x4ff68
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x34c88(%rip), %rsi     # 0x4ffa0
movq 0x34c31(%rip), %rdx     # 0x4ff50
movq %rax, %rdi
callq 0x66c0
movq %rax, %rbx
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
jmp 0x1b371
movq %rax, %rbx
jmp 0x1b371
jmp 0x1b347
jmp 0x1b347
jmp 0x1b347
jmp 0x1b347
movq %rax, %rbx
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
movq -0x88(%rbp), %rdi
jb 0x1b371
callq 0x64d0
cmpq $0x4001, %r14           # imm = 0x4001
jb 0x1b382
movq %r15, %rdi
callq 0x64d0
movq %rbx, %rdi
callq 0x6710