// File: 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
subq $0x3a0, %rsp            # imm = 0x3A0
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x1c8(%rbp)
movq %rsi, -0x1d0(%rbp)
movq %rdx, -0x1d8(%rbp)
movq %rcx, -0x1e0(%rbp)
movq %r8, -0x1e8(%rbp)
movq %r9, -0x1f0(%rbp)
movq -0x1d8(%rbp), %rcx
movq -0x1e0(%rbp), %rax
leaq -0x200(%rbp), %rdx
movq %rdx, -0x188(%rbp)
movq %rcx, -0x190(%rbp)
movq %rax, -0x198(%rbp)
movq -0x188(%rbp), %rdx
movq -0x190(%rbp), %rcx
movq -0x198(%rbp), %rax
movq %rdx, -0x158(%rbp)
movq %rcx, -0x160(%rbp)
movq %rax, -0x168(%rbp)
movq -0x158(%rbp), %rax
movq -0x160(%rbp), %rcx
movq %rcx, (%rax)
movq -0x168(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x1e8(%rbp), %rcx
movq -0x1f0(%rbp), %rax
leaq -0x210(%rbp), %rdx
movq %rdx, -0x1a0(%rbp)
movq %rcx, -0x1a8(%rbp)
movq %rax, -0x1b0(%rbp)
movq -0x1a0(%rbp), %rdx
movq -0x1a8(%rbp), %rcx
movq -0x1b0(%rbp), %rax
movq %rdx, -0x170(%rbp)
movq %rcx, -0x178(%rbp)
movq %rax, -0x180(%rbp)
movq -0x170(%rbp), %rax
movq -0x178(%rbp), %rcx
movq %rcx, (%rax)
movq -0x180(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %rax
leaq -0x220(%rbp), %rdx
movq %rdx, -0x140(%rbp)
movq %rcx, -0x148(%rbp)
movq %rax, -0x150(%rbp)
movq -0x140(%rbp), %rax
movq -0x148(%rbp), %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x28(%rbp), %rdi
callq 0x3a2b0
movq %rax, -0x228(%rbp)
movq 0x28(%rbp), %rdi
callq 0x3a2d0
movq %rax, -0x238(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x2b810
movq (%rax), %rax
movq %rax, -0x230(%rbp)
cmpq $0x4, -0x230(%rbp)
jle 0x6bea8
movq -0x230(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
shlq $0x2, %rax
movq %rax, -0x230(%rbp)
movq -0x228(%rbp), %rax
imulq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x228(%rbp), %rax
imulq -0x1c8(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, -0x1b8(%rbp)
jbe 0x6befa
callq 0x19700
movq 0x28(%rbp), %rdi
callq 0x3a320
cmpq $0x0, %rax
je 0x6bf1b
movq 0x28(%rbp), %rdi
callq 0x3a320
movq %rax, -0x308(%rbp)
jmp 0x6bf84
movq -0x240(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
ja 0x6bf5f
movq -0x240(%rbp), %rax
leaq 0x1e(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
addq $0x10, %rax
subq $0x1, %rax
andq $-0x10, %rax
movq %rax, -0x310(%rbp)
jmp 0x6bf76
movq -0x240(%rbp), %rdi
shlq $0x3, %rdi
callq 0x197a0
movq %rax, -0x310(%rbp)
movq -0x310(%rbp), %rax
movq %rax, -0x308(%rbp)
movq -0x308(%rbp), %rax
movq %rax, -0x250(%rbp)
movq 0x28(%rbp), %rdi
callq 0x3a320
cmpq $0x0, %rax
jne 0x6bfb1
movq -0x250(%rbp), %rax
movq %rax, -0x318(%rbp)
jmp 0x6bfbc
xorl %eax, %eax
movq %rax, -0x318(%rbp)
jmp 0x6bfbc
movq -0x318(%rbp), %rsi
movq -0x240(%rbp), %rdx
movq -0x240(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
seta %al
movzbl %al, %ecx
andl $0x1, %ecx
leaq -0x268(%rbp), %rdi
callq 0x2e590
movq -0x248(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, -0x1c0(%rbp)
jbe 0x6c01a
callq 0x19700
jmp 0x6c018
jmp 0x6c01a
jmp 0x6c01c
movq 0x28(%rbp), %rdi
callq 0x3a340
cmpq $0x0, %rax
je 0x6c03d
movq 0x28(%rbp), %rdi
callq 0x3a340
movq %rax, -0x320(%rbp)
jmp 0x6c0b8
movq -0x248(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
ja 0x6c081
movq -0x248(%rbp), %rax
leaq 0x1e(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
addq $0x10, %rax
subq $0x1, %rax
andq $-0x10, %rax
movq %rax, -0x328(%rbp)
jmp 0x6c0aa
movq -0x248(%rbp), %rdi
shlq $0x3, %rdi
callq 0x197a0
movq %rax, -0x330(%rbp)
jmp 0x6c09a
movq -0x330(%rbp), %rax
movq %rax, -0x328(%rbp)
jmp 0x6c0aa
movq -0x328(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x320(%rbp), %rax
movq %rax, -0x280(%rbp)
movq 0x28(%rbp), %rdi
callq 0x3a340
cmpq $0x0, %rax
jne 0x6c0e5
movq -0x280(%rbp), %rax
movq %rax, -0x338(%rbp)
jmp 0x6c0f0
xorl %eax, %eax
movq %rax, -0x338(%rbp)
jmp 0x6c0f0
movq -0x338(%rbp), %rsi
movq -0x248(%rbp), %rdx
movq %rdx, %rax
shlq $0x3, %rax
subq $0x20001, %rax          # imm = 0x20001
setae %al
movzbl %al, %ecx
leaq -0x298(%rbp), %rdi
callq 0x2e590
jmp 0x6c11f
movq $0x0, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rax
cmpq -0x1d0(%rbp), %rax
jge 0x6c6c1
movq -0x2a8(%rbp), %rax
movq -0x228(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x2b8(%rbp)
leaq -0x2b8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x2b810
movq (%rax), %rax
movq -0x2a8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x2b0(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x2a8(%rbp), %rax
leaq -0x210(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rsi
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
imulq %rdi, %rsi
addq %rsi, %rdx
leaq (%rcx,%rdx,8), %rcx
movq 0x8(%rax), %rax
leaq -0x58(%rbp), %rdx
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rdx, -0x8(%rbp)
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x340(%rbp)
movq -0x350(%rbp), %rsi
movq -0x340(%rbp), %rax
movq -0x348(%rbp), %rcx
movq %rcx, -0x2c8(%rbp)
movq %rax, -0x2c0(%rbp)
movq -0x2b0(%rbp), %rcx
movq -0x1c8(%rbp), %r8
subq $0x10, %rsp
movq %rsp, %rax
movq $0x0, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x29a(%rbp), %rdi
leaq -0x2c8(%rbp), %rdx
callq 0x41f70
addq $0x10, %rsp
jmp 0x6c291
movq $0x0, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rax
cmpq -0x1c8(%rbp), %rax
jge 0x6c6a5
movq -0x2d0(%rbp), %rax
movq -0x230(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x2e0(%rbp)
leaq -0x2e0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x2b810
movq (%rax), %rax
movq -0x2d0(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x368(%rbp)
movq -0x2d0(%rbp), %rcx
movq -0x2a8(%rbp), %rax
leaq -0x200(%rbp), %rdx
movq %rdx, -0x128(%rbp)
movq %rcx, -0x130(%rbp)
movq %rax, -0x138(%rbp)
movq -0x128(%rbp), %rax
movq -0x130(%rbp), %rdx
movq -0x138(%rbp), %rcx
movq %rax, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rdx
movq -0xf8(%rbp), %rsi
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
imulq %rdi, %rsi
addq %rsi, %rdx
leaq (%rcx,%rdx,8), %rcx
movq 0x8(%rax), %rax
leaq -0x120(%rbp), %rdx
movq %rdx, -0x100(%rbp)
movq %rcx, -0x108(%rbp)
movq %rax, -0x110(%rbp)
movq -0x100(%rbp), %rdx
movq -0x108(%rbp), %rcx
movq -0x110(%rbp), %rax
movq %rdx, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xd0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xe0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x120(%rbp), %rax
movq %rax, -0x360(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x368(%rbp), %rsi
movq -0x358(%rbp), %rax
movq -0x360(%rbp), %rcx
movq %rcx, -0x2f0(%rbp)
movq %rax, -0x2e8(%rbp)
movq -0x2b0(%rbp), %rcx
movq -0x2d8(%rbp), %r8
subq $0x10, %rsp
movq %rsp, %rax
movq $0x0, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x299(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3a360
addq $0x10, %rsp
jmp 0x6c457
movq -0x2d0(%rbp), %rax
leaq -0x220(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
movq -0xc0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq %rax, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq %rcx, -0x88(%rbp)
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rsi
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
imulq %rdi, %rsi
addq %rsi, %rdx
leaq (%rcx,%rdx,8), %rcx
movq 0x8(%rax), %rax
leaq -0xb0(%rbp), %rdx
movq %rdx, -0x90(%rbp)
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb0(%rbp), %rax
movq %rax, -0x378(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rax
movq -0x378(%rbp), %rcx
movq %rcx, -0x300(%rbp)
movq %rax, -0x2f8(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0x2d8(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x2b0(%rbp), %rax
movq %rax, -0x380(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x2b810
movq -0x398(%rbp), %rdx
movq -0x390(%rbp), %rcx
movq -0x388(%rbp), %r8
movq -0x380(%rbp), %r9
movq (%rax), %rsi
movq 0x20(%rbp), %rax
movsd (%rax), %xmm0
subq $0x30, %rsp
movq %rsp, %rax
movq %rsi, (%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x18(%rax)
movq $-0x1, 0x10(%rax)
movq $-0x1, 0x8(%rax)
leaq -0x29b(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x3af50
addq $0x30, %rsp
jmp 0x6c5ec
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rdx
movq -0x2d0(%rbp), %r9
movq %rdx, %rcx
imulq %r9, %rcx
leaq (%rax,%rcx,8), %rax
leaq (%rax,%r9,8), %rsi
movq -0x250(%rbp), %rcx
movq -0x280(%rbp), %rax
movq -0x2b0(%rbp), %rdi
movq %rdi, %r8
imulq %r9, %r8
leaq (%rax,%r8,8), %r8
movq -0x2d8(%rbp), %r9
movq 0x20(%rbp), %r10
subq $0x10, %rsp
movq %rsp, %rax
movq %r10, 0x8(%rax)
movq %rdi, (%rax)
leaq -0x29c(%rbp), %rdi
callq 0x6c700
addq $0x10, %rsp
jmp 0x6c655
jmp 0x6c657
movq -0x230(%rbp), %rax
addq -0x2d0(%rbp), %rax
movq %rax, -0x2d0(%rbp)
jmp 0x6c29c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x270(%rbp)
movl %eax, -0x274(%rbp)
jmp 0x6c6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x270(%rbp)
movl %eax, -0x274(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x30e60
jmp 0x6c6de
jmp 0x6c6a7
movq -0x228(%rbp), %rax
addq -0x2a8(%rbp), %rax
movq %rax, -0x2a8(%rbp)
jmp 0x6c12a
leaq -0x298(%rbp), %rdi
callq 0x30e60
leaq -0x268(%rbp), %rdi
callq 0x30e60
movq %rbp, %rsp
popq %rbp
retq
leaq -0x268(%rbp), %rdi
callq 0x30e60
movq -0x270(%rbp), %rdi
callq 0xa7c0
nopw %cs:(%rax,%rax)