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

    typedef blas_data_mapper<Scalar, Index, ColMajor> LhsMapper;
    typedef const_blas_data_mapper<Scalar, Index, TriStorageOrder> RhsMapper;
    LhsMapper lhs(_other, otherStride);
    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, 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;

              Scalar* r = &lhs(i2,j);
              for (Index k3=0; k3<k; ++k3)
              {
                Scalar b = conj(rhs(IsLower ? j+1+k3 : absolute_j2+k3,j));
                Scalar* a = &lhs(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, LhsMapper(_other+absolute_j2*otherStride+i2, otherStride),
                           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 %r9, -0x70(%rbp)
movq %r8, -0xb8(%rbp)
movq %rcx, %r12
movq 0x10(%rbp), %rbx
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %r13
cmpq %rsi, %rax
movq %rsi, %rcx
movq %rax, -0x148(%rbp)
cmovlq %rax, %rcx
movq %rcx, -0x98(%rbp)
movq %rcx, %rax
imulq %r13, %rax
movq %rax, -0xa0(%rbp)
shrq $0x3d, %rax
jne 0x275d1
movq %rsi, %r14
movq %rdi, %r15
movq (%rbx), %rax
movq %rax, -0x68(%rbp)
testq %rax, %rax
movq %rdx, -0x38(%rbp)
je 0x26ee9
movq $0x0, -0x90(%rbp)
jmp 0x26f43
movq -0xa0(%rbp), %rax
leaq (,%rax,8), %rdi
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x26f1e
movq %rsp, %rcx
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rcx
movq %rcx, %rsp
movq %rcx, -0x90(%rbp)
movq %rcx, -0x68(%rbp)
jmp 0x26f43
callq 0x9450
testb $0xf, %al
jne 0x2762d
movq %rax, -0x68(%rbp)
movq %rax, -0x90(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
je 0x2762f
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
movq %r13, %rcx
imulq %r15, %rcx
cmpq %rax, %rcx
ja 0x275ff
movq 0x8(%rbx), %rax
movq %rax, -0x60(%rbp)
testq %rax, %rax
movq %r14, -0xf8(%rbp)
movq %rcx, -0xe0(%rbp)
je 0x26f8c
movq $0x0, -0x88(%rbp)
movq -0x98(%rbp), %rbx
jmp 0x26fe7
leaq (,%rcx,8), %rdi
cmpq $0x4000, %rcx           # imm = 0x4000
movq -0x98(%rbp), %rbx
ja 0x26fc2
movq %rsp, %rcx
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rcx
movq %rcx, %rsp
movq %rcx, -0x88(%rbp)
movq %rcx, -0x60(%rbp)
jmp 0x26fe7
callq 0x9450
testb $0xf, %al
jne 0x27631
movq %rax, -0x60(%rbp)
movq %rax, -0x88(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rdx
je 0x27650
testq %r15, %r15
jle 0x27590
leaq 0x8(,%r12,8), %rax
imulq %r13, %rax
movq %rax, -0x118(%rbp)
movq %r13, %rcx
movq -0x70(%rbp), %rax
imulq %rax, %rcx
shlq $0x3, %rcx
movq %rcx, -0x110(%rbp)
leaq (,%rbx,8), %rcx
movq %rcx, -0x140(%rbp)
movq %rax, %rcx
shlq $0x5, %rcx
movq %rcx, -0x158(%rbp)
leaq (,%rax,8), %rbx
xorl %r14d, %r14d
movsd 0x353af(%rip), %xmm3    # 0x5c3f8
movq -0xb8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rdx, -0xb0(%rbp)
movq %r15, %rcx
movq %r15, -0x128(%rbp)
movq %r13, -0x120(%rbp)
movq %rcx, -0x130(%rbp)
cmpq %rcx, %r13
cmovlq %r13, %rcx
movq %rcx, -0xf0(%rbp)
movq %r15, %rsi
subq %r14, %rsi
cmpq %rsi, %r13
movq %rsi, %r9
cmovlq %r13, %r9
leaq (%r9,%r14), %rax
movq %rax, -0x80(%rbp)
movq %r9, %rax
imulq %r9, %rax
movq -0x60(%rbp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, -0xe8(%rbp)
subq %r9, %rsi
movq %rsi, -0xc0(%rbp)
movq %r9, -0x78(%rbp)
jle 0x27118
movq %r14, %rax
imulq %r12, %rax
leaq (%rdx,%rax,8), %rax
movq -0x80(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq %r12, -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 0x1e226
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x352e4(%rip), %xmm3    # 0x5c3f8
movq -0x78(%rbp), %r9
movq %r14, -0x100(%rbp)
testq %r9, %r9
jle 0x271b3
movq -0xf0(%rbp), %r13
movq %r13, %rax
shlq $0x5, %rax
movq %rax, -0x58(%rbp)
movq -0xb0(%rbp), %rax
movq -0x60(%rbp), %r15
xorl %r14d, %r14d
testq %r14, %r14
je 0x2719e
cmpq $0x4, %r13
movl $0x4, %r8d
cmovlq %r13, %r8
movq %rax, -0xd8(%rbp)
movq %rax, -0x50(%rbp)
movq %r12, -0x48(%rbp)
subq $0x8, %rsp
leaq -0x3a(%rbp), %rdi
movq %r15, %rsi
leaq -0x50(%rbp), %rdx
movq %r14, %rcx
pushq $0x0
callq 0x276ca
addq $0x10, %rsp
movq -0x38(%rbp), %rdx
movsd 0x35265(%rip), %xmm3    # 0x5c3f8
movq -0x78(%rbp), %r9
movq -0xd8(%rbp), %rax
addq $0x4, %r14
addq $-0x4, %r13
addq -0x58(%rbp), %r15
addq $0x20, %rax
cmpq %r9, %r14
jl 0x27148
movq -0xf8(%rbp), %r15
testq %r15, %r15
movq -0x98(%rbp), %r14
jle 0x2753b
movq -0x80(%rbp), %rcx
imulq -0x70(%rbp), %rcx
movq -0xb8(%rbp), %rax
leaq (%rax,%rcx,8), %rax
movq %rax, -0x138(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %r15, %rcx
xorl %esi, %esi
movq -0x148(%rbp), %rax
cmpq %r15, %rax
movq %r15, %r13
cmovlq %rax, %r13
cmpq %rcx, %r13
movq %rcx, -0x150(%rbp)
cmovgeq %rcx, %r13
movq %rsi, -0xd0(%rbp)
subq %rsi, %r15
cmpq %r14, %r15
cmovgeq %r14, %r15
testq %r9, %r9
jle 0x27472
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, -0x168(%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), %r14
testq %r10, %r10
movq %r10, -0x170(%rbp)
je 0x27349
movq %rcx, -0x160(%rbp)
movq %r14, %rax
movq -0x70(%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 -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 -0x80(%rbp), %rax
movq %rax, (%rsp)
leaq -0x29(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %r15, %r8
movq %r10, %r9
movsd 0x350c7(%rip), %xmm0    # 0x5c3f0
callq 0x1c502
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x350ba(%rip), %xmm3    # 0x5c3f8
movq -0x78(%rbp), %r9
movq -0x160(%rbp), %rcx
testq %rcx, %rcx
jle 0x273f4
movq -0x58(%rbp), %rax
xorl %ecx, %ecx
leaq (%rcx,%r14), %r10
testq %rcx, %rcx
je 0x273af
leaq (%rdx,%r10,8), %rsi
movq -0x58(%rbp), %rdi
xorl %r8d, %r8d
testq %r15, %r15
jle 0x273a4
leaq (%r8,%r14), %r11
imulq %r12, %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, %r13
jne 0x27382
incq %r8
addq %rbx, %rdi
cmpq %rcx, %r8
jne 0x2736c
testq %r15, %r15
jle 0x273e1
movq %r10, %rsi
imulq %r12, %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, %r13
jne 0x273cb
incq %rcx
addq %rbx, %rax
cmpq -0xd8(%rbp), %rcx
jne 0x27358
movq -0x70(%rbp), %rcx
imulq %rcx, %r14
movq -0x108(%rbp), %rax
leaq (%rax,%r14,8), %rax
movq %rax, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
subq $0x8, %rsp
leaq -0x39(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq %r15, %r8
movq -0x170(%rbp), %r14
pushq %r14
callq 0x2781e
addq $0x10, %rsp
addq $0x4, %r14
movq -0x168(%rbp), %rcx
addq $-0x4, %rcx
movq -0x58(%rbp), %rax
addq -0x158(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x78(%rbp), %r9
cmpq %r9, %r14
movq -0x38(%rbp), %rdx
movsd 0x34f8f(%rip), %xmm3    # 0x5c3f8
movq %r14, %r10
jl 0x2725f
cmpq $0x0, -0xc0(%rbp)
movq -0x98(%rbp), %r14
jle 0x27502
movq -0x138(%rbp), %rax
movq -0xd0(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x70(%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 -0x68(%rbp), %rdx
movq -0xe8(%rbp), %rcx
movq %r15, %r8
movsd 0x34f07(%rip), %xmm0    # 0x5c3f0
callq 0x1c502
addq $0x30, %rsp
movq -0x38(%rbp), %rdx
movsd 0x34efa(%rip), %xmm3    # 0x5c3f8
movq -0x78(%rbp), %r9
movq -0xd0(%rbp), %rsi
addq %r14, %rsi
movq -0x150(%rbp), %rcx
subq %r14, %rcx
movq -0xc8(%rbp), %rax
addq -0x140(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xf8(%rbp), %r15
cmpq %r15, %rsi
jl 0x271f8
movq -0x120(%rbp), %r13
movq -0x100(%rbp), %r14
addq %r13, %r14
movq -0x130(%rbp), %rcx
subq %r13, %rcx
movq -0xb0(%rbp), %rax
addq -0x118(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
addq -0x110(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x128(%rbp), %r15
cmpq %r15, %r14
jl 0x2706f
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
jb 0x275a9
movq -0x88(%rbp), %rdi
callq 0x93d0
cmpq $0x4001, -0xa0(%rbp) # imm = 0x4001
movq -0x90(%rbp), %rdi
jb 0x275c2
callq 0x93d0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x9180
movq 0x5e9ce(%rip), %rcx     # 0x85fb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x5e9d8(%rip), %rsi     # 0x85fc8
movq 0x5e999(%rip), %rdx     # 0x85f90
movq %rax, %rdi
callq 0x9640
movl $0x8, %edi
callq 0x9180
movq 0x5e9a0(%rip), %rcx     # 0x85fb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x5e9aa(%rip), %rsi     # 0x85fc8
movq 0x5e96b(%rip), %rdx     # 0x85f90
movq %rax, %rdi
callq 0x9640
jmp 0x27631
jmp 0x275d1
leaq 0x35734(%rip), %rdi     # 0x5cd6c
leaq 0x357e7(%rip), %rsi     # 0x5ce26
leaq 0x357ff(%rip), %rcx     # 0x5ce45
movl $0xa1, %edx
callq 0x9200
movl $0x8, %edi
callq 0x9180
movq 0x5e94f(%rip), %rcx     # 0x85fb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x5e959(%rip), %rsi     # 0x85fc8
movq 0x5e91a(%rip), %rdx     # 0x85f90
movq %rax, %rdi
callq 0x9640
jmp 0x27680
movq %rax, %rbx
jmp 0x276a9
jmp 0x2768d
jmp 0x2768d
jmp 0x2768d
jmp 0x2768d
movq %rax, %rbx
cmpq $0x4001, -0xe0(%rbp) # imm = 0x4001
movq -0x88(%rbp), %rdi
jb 0x276a9
callq 0x93d0
cmpq $0x4001, -0xa0(%rbp) # imm = 0x4001
jb 0x276c2
movq -0x90(%rbp), %rdi
callq 0x93d0
movq %rbx, %rdi
callq 0x9680