// File: /workspace/github_cpp_makefile_star2_O2/canzarlab[P]Trajan/./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
// Function: Eigen::internal::general_matrix_matrix_triangular_product<long, double, 0, false, double, 1, false, 0, 1, 0>::run(long, long, double const*, long, double const*, long, double*, long, double const&, Eigen::internal::level3_blocking<double, double>&)
static EIGEN_STRONG_INLINE void run(Index size, Index depth,const LhsScalar* _lhs, Index lhsStride,
                                      const RhsScalar* _rhs, Index rhsStride, ResScalar* _res, Index resStride,
                                      const ResScalar& alpha, level3_blocking<LhsScalar,RhsScalar>& blocking)
  {
    typedef gebp_traits<LhsScalar,RhsScalar> Traits;

    typedef const_blas_data_mapper<LhsScalar, Index, LhsStorageOrder> LhsMapper;
    typedef const_blas_data_mapper<RhsScalar, Index, RhsStorageOrder> RhsMapper;
    typedef blas_data_mapper<typename Traits::ResScalar, Index, ColMajor> ResMapper;
    LhsMapper lhs(_lhs,lhsStride);
    RhsMapper rhs(_rhs,rhsStride);
    ResMapper res(_res, resStride);

    Index kc = blocking.kc();
    Index mc = (std::min)(size,blocking.mc());

    // !!! mc must be a multiple of nr:
    if(mc > Traits::nr)
      mc = (mc/Traits::nr)*Traits::nr;

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

    ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, sizeA, blocking.blockA());
    ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, blocking.blockB());

    gemm_pack_lhs<LhsScalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, LhsStorageOrder> pack_lhs;
    gemm_pack_rhs<RhsScalar, Index, RhsMapper, Traits::nr, RhsStorageOrder> pack_rhs;
    gebp_kernel<LhsScalar, RhsScalar, Index, ResMapper, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs> gebp;
    tribb_kernel<LhsScalar, RhsScalar, Index, Traits::mr, Traits::nr, ConjugateLhs, ConjugateRhs, UpLo> sybb;

    for(Index k2=0; k2<depth; k2+=kc)
    {
      const Index actual_kc = (std::min)(k2+kc,depth)-k2;

      // note that the actual rhs is the transpose/adjoint of mat
      pack_rhs(blockB, rhs.getSubMapper(k2,0), actual_kc, size);

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

        pack_lhs(blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);

        // the selected actual_mc * size panel of res is split into three different part:
        //  1 - before the diagonal => processed with gebp or skipped
        //  2 - the actual_mc x actual_mc symmetric block => processed with a special kernel
        //  3 - after the diagonal => processed with gebp or skipped
        if (UpLo==Lower)
          gebp(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc,
               (std::min)(size,i2), alpha, -1, -1, 0, 0);


        sybb(_res+resStride*i2 + i2, resStride, blockA, blockB + actual_kc*i2, actual_mc, actual_kc, alpha);

        if (UpLo==Upper)
        {
          Index j2 = i2+actual_mc;
          gebp(res.getSubMapper(i2, j2), blockA, blockB+actual_kc*j2, actual_mc,
               actual_kc, (std::max)(Index(0), size-j2), alpha, -1, -1, 0, 0);
        }
      }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, -0xb0(%rbp)
movq %r8, -0xa8(%rbp)
movq %rcx, -0x78(%rbp)
movq %rdx, %r13
movq %rsi, -0xb8(%rbp)
movq 0x28(%rbp), %r15
movq 0x10(%r15), %rax
movq 0x20(%r15), %rbx
cmpq %rdi, %rax
movq %rdi, -0x58(%rbp)
cmovgeq %rdi, %rax
movabsq $0x7ffffffffffffffc, %r14 # imm = 0x7FFFFFFFFFFFFFFC
andq %rax, %r14
cmpq $0x5, %rax
cmovlq %rax, %r14
movq %r14, -0x50(%rbp)
imulq %rbx, %r14
movq %r14, %rax
shrq $0x3d, %rax
je 0x239ea
callq 0xe355
movabsq $0x1fffffffffffffff, %r12 # imm = 0x1FFFFFFFFFFFFFFF
movq %rbx, -0x70(%rbp)
imulq -0x58(%rbp), %rbx
movq (%r15), %rax
leaq (,%r14,8), %rdi
testq %rax, %rax
je 0x23a1f
movq %rax, -0x38(%rbp)
cmpq $0x20001, %rdi          # imm = 0x20001
setae %al
xorl %ecx, %ecx
jmp 0x23a56
cmpq $0x20000, %rdi          # imm = 0x20000
ja 0x23a41
movq %rsp, %rcx
addq $0x1e, %rdi
andq $-0x10, %rdi
subq %rdi, %rcx
movq %rcx, %rsp
xorl %eax, %eax
movq %rcx, -0x38(%rbp)
jmp 0x23a56
callq 0xe382
xorl %ecx, %ecx
cmpq $0x0, (%r15)
movq %rax, -0x38(%rbp)
cmoveq %rax, %rcx
movb $0x1, %al
movq %rcx, -0x130(%rbp)
movq %r14, -0x128(%rbp)
movb %al, -0x120(%rbp)
cmpq %r12, %rbx
jbe 0x23a74
callq 0xe355
movq 0x8(%r15), %r12
leaq (,%rbx,8), %r14
testq %r12, %r12
je 0x23a89
xorl %eax, %eax
jmp 0x23abe
cmpq $0x20000, %r14          # imm = 0x20000
ja 0x23aa8
movq %rsp, %rax
leaq 0x1e(%r14), %rcx
andq $-0x10, %rcx
subq %rcx, %rax
movq %rax, %rsp
movq %rax, %r12
jmp 0x23abe
movq %r14, %rdi
callq 0xe382
movq %rax, %r12
xorl %eax, %eax
cmpq $0x0, 0x8(%r15)
cmoveq %r12, %rax
movq 0x18(%rbp), %rcx
cmpq $0x20001, %r14          # imm = 0x20001
movq %rax, -0x118(%rbp)
movq %rbx, -0x110(%rbp)
setae -0x108(%rbp)
movq -0x70(%rbp), %rdx
movq %rdx, %rax
imulq -0x78(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0xa0(%rbp)
movq -0x50(%rbp), %rax
leaq (,%rax,8), %rsi
movq %rsi, -0x88(%rbp)
leaq 0x8(,%rcx,8), %rcx
imulq %rax, %rcx
movq %rcx, -0xe0(%rbp)
xorl %ebx, %ebx
leaq -0x48(%rbp), %r8
movq %rdx, %rsi
xorl %eax, %eax
movq %r12, -0x80(%rbp)
movq -0xb8(%rbp), %r15
cmpq %rsi, %r15
movq %rsi, %rdi
cmovlq %r15, %rdi
cmpq %r15, %rax
jge 0x23d68
movq %rdi, %r14
movq %rsi, -0xd8(%rbp)
addq %rax, %rdx
cmpq %r15, %rdx
movq %rdx, -0xd0(%rbp)
cmovlq %rdx, %r15
subq %rax, %r15
movq -0xb0(%rbp), %rcx
imulq %rcx, %rax
movq -0xa8(%rbp), %rdx
leaq (%rdx,%rax,8), %rax
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
subq $0x8, %rsp
leaq -0x2b(%rbp), %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r15, %rcx
movq -0x58(%rbp), %r8
xorl %r9d, %r9d
pushq $0x0
callq 0x196d8
popq %rax
popq %rcx
movq %rbx, -0xc0(%rbp)
addq %rbx, %r14
imulq -0x88(%rbp), %r14
movq %r14, -0xe8(%rbp)
movq %r12, %rcx
movq 0x10(%rbp), %rbx
movq %rbx, %rdx
movq %r13, -0xc8(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
xorl %r12d, %r12d
movq -0x58(%rbp), %rax
movq -0x98(%rbp), %r14
cmpq %r14, %rax
cmovlq %rax, %r14
cmpq %rax, %r12
jge 0x23d2e
movq %rdx, -0xf8(%rbp)
movq %rcx, -0x100(%rbp)
movq %r12, -0x68(%rbp)
addq -0x90(%rbp), %r14
movq %r13, -0x60(%rbp)
movq %r13, -0x48(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
subq $0x8, %rsp
leaq -0x2c(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r15, %r13
leaq -0x48(%rbp), %r15
movq %r15, %rdx
movq %r13, %rcx
movq %r14, %r8
xorl %r9d, %r9d
pushq $0x0
callq 0x1779a
popq %rax
popq %rcx
movq %rbx, -0xf0(%rbp)
movq %rbx, -0x48(%rbp)
movq 0x18(%rbp), %rbx
movq %rbx, -0x40(%rbp)
movq 0x20(%rbp), %rbx
movsd (%rbx), %xmm0
subq $0x30, %rsp
xorps %xmm1, %xmm1
movups %xmm1, 0x18(%rsp)
orq $-0x1, 0x10(%rsp)
orq $-0x1, 0x8(%rsp)
movq -0x68(%rbp), %r12
movq %r12, (%rsp)
leaq -0x2a(%rbp), %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq %r14, %r8
movq %r13, %r9
callq 0x179fe
addq $0x30, %rsp
movq %r13, %r15
movq -0x50(%rbp), %rax
addq %rax, %r12
addq %rax, -0x98(%rbp)
subq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
movq -0x60(%rbp), %r13
addq %rax, %r13
movq %rbx, %r10
movq -0xf0(%rbp), %rbx
addq %rax, %rbx
movq -0xe0(%rbp), %rax
movq -0xf8(%rbp), %rsi
addq %rsi, %rax
movq %rax, -0x68(%rbp)
movq -0xe8(%rbp), %rax
movq -0x100(%rbp), %r8
leaq (%r8,%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x29(%rbp), %rdi
movq 0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %r14, %r9
pushq %r10
pushq %r15
callq 0x23dc0
popq %rax
popq %rcx
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %rdx
jmp 0x23be4
movq -0xc8(%rbp), %r13
addq -0xa0(%rbp), %r13
movq -0x70(%rbp), %rdx
movq -0xd8(%rbp), %rsi
addq %rdx, %rsi
movq -0xc0(%rbp), %rbx
subq %rdx, %rbx
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %r12
leaq -0x48(%rbp), %r8
jmp 0x23b2a
leaq -0x118(%rbp), %rdi
callq 0x15448
leaq -0x130(%rbp), %rdi
callq 0x15448
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x23d91
movq %rax, %rbx
jmp 0x23dab
jmp 0x23d9c
jmp 0x23d9c
jmp 0x23d9c
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x15448
leaq -0x130(%rbp), %rdi
callq 0x15448
movq %rbx, %rdi
callq 0x9640
nop