// File: j-faria[P]kima/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
// Function: Eigen::internal::general_matrix_matrix_triangular_product<long, double, 0, false, double, 1, false, 0, 1, 1, 0>::run(long, long, double const*, long, double const*, long, double*, long, 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 resIncr, 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, Unaligned, ResInnerStride> ResMapper;
    LhsMapper lhs(_lhs,lhsStride);
    RhsMapper rhs(_rhs,rhsStride);
    ResMapper res(_res, resStride, resIncr);

    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, typename Traits::LhsPacket4Packing, 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, ResInnerStride, 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 + resIncr*i2, resIncr, 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 $0x3d0, %rsp            # imm = 0x3D0
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x1f8(%rbp)
movq %rsi, -0x200(%rbp)
movq %rdx, -0x208(%rbp)
movq %rcx, -0x210(%rbp)
movq %r8, -0x218(%rbp)
movq %r9, -0x220(%rbp)
movq -0x208(%rbp), %rcx
movq -0x210(%rbp), %rax
leaq -0x230(%rbp), %rdx
movq %rdx, -0x1d0(%rbp)
movq %rcx, -0x1d8(%rbp)
movq %rax, -0x1e0(%rbp)
movq -0x1d0(%rbp), %rdx
movq -0x1d8(%rbp), %rcx
movq -0x1e0(%rbp), %rax
movq %rdx, -0x198(%rbp)
movq %rcx, -0x1a0(%rbp)
movq %rax, -0x1a8(%rbp)
movq $0x1, -0x1b0(%rbp)
movq -0x198(%rbp), %rax
movq -0x1a0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1a8(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0x1b0(%rbp)
je 0x48b2d
leaq 0x7212e(%rip), %rdi     # 0xbac43
leaq 0x7212f(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x72148(%rip), %rcx     # 0xbac70
callq 0x6340
movq -0x218(%rbp), %rcx
movq -0x220(%rbp), %rax
leaq -0x240(%rbp), %rdx
movq %rdx, -0x1b8(%rbp)
movq %rcx, -0x1c0(%rbp)
movq %rax, -0x1c8(%rbp)
movq -0x1b8(%rbp), %rdx
movq -0x1c0(%rbp), %rcx
movq -0x1c8(%rbp), %rax
movq %rdx, -0x178(%rbp)
movq %rcx, -0x180(%rbp)
movq %rax, -0x188(%rbp)
movq $0x1, -0x190(%rbp)
movq -0x178(%rbp), %rax
movq -0x180(%rbp), %rcx
movq %rcx, (%rax)
movq -0x188(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0x190(%rbp)
je 0x48bd1
leaq 0x7208a(%rip), %rdi     # 0xbac43
leaq 0x7208b(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x7215c(%rip), %rcx     # 0xbad28
callq 0x6340
movq 0x10(%rbp), %rdx
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rax
leaq -0x250(%rbp), %rsi
movq %rsi, -0x158(%rbp)
movq %rdx, -0x160(%rbp)
movq %rcx, -0x168(%rbp)
movq %rax, -0x170(%rbp)
movq -0x158(%rbp), %rax
movq -0x160(%rbp), %rcx
movq %rcx, (%rax)
movq -0x168(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0x170(%rbp)
je 0x48c45
leaq 0x72016(%rip), %rdi     # 0xbac43
leaq 0x72017(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x73a74(%rip), %rcx     # 0xbc6b4
callq 0x6340
movq 0x30(%rbp), %rdi
callq 0x42550
movq %rax, -0x258(%rbp)
movq 0x30(%rbp), %rdi
callq 0x42570
movq %rax, -0x268(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x7cf0
movq (%rax), %rax
movq %rax, -0x260(%rbp)
cmpq $0x4, -0x260(%rbp)
jle 0x48ca8
movq -0x260(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
shlq $0x2, %rax
movq %rax, -0x260(%rbp)
movq -0x258(%rbp), %rax
imulq -0x260(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x258(%rbp), %rax
imulq -0x1f8(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, -0x1e8(%rbp)
jbe 0x48cfa
callq 0x2f5b0
movq 0x30(%rbp), %rdi
callq 0x42590
cmpq $0x0, %rax
je 0x48d1b
movq 0x30(%rbp), %rdi
callq 0x42590
movq %rax, -0x338(%rbp)
jmp 0x48d84
movq -0x270(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
ja 0x48d5f
movq -0x270(%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, -0x340(%rbp)
jmp 0x48d76
movq -0x270(%rbp), %rdi
shlq $0x3, %rdi
callq 0x2f650
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x338(%rbp), %rax
movq %rax, -0x280(%rbp)
movq 0x30(%rbp), %rdi
callq 0x42590
cmpq $0x0, %rax
jne 0x48db1
movq -0x280(%rbp), %rax
movq %rax, -0x348(%rbp)
jmp 0x48dbc
xorl %eax, %eax
movq %rax, -0x348(%rbp)
jmp 0x48dbc
movq -0x348(%rbp), %rsi
movq -0x270(%rbp), %rdx
movq -0x270(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
seta %al
movzbl %al, %ecx
andl $0x1, %ecx
leaq -0x298(%rbp), %rdi
callq 0x425b0
movq -0x278(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, -0x1f0(%rbp)
jbe 0x48e1a
callq 0x2f5b0
jmp 0x48e18
jmp 0x48e1a
jmp 0x48e1c
movq 0x30(%rbp), %rdi
callq 0x42600
cmpq $0x0, %rax
je 0x48e3d
movq 0x30(%rbp), %rdi
callq 0x42600
movq %rax, -0x350(%rbp)
jmp 0x48eb8
movq -0x278(%rbp), %rax
shlq $0x3, %rax
cmpq $0x20000, %rax          # imm = 0x20000
ja 0x48e81
movq -0x278(%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, -0x358(%rbp)
jmp 0x48eaa
movq -0x278(%rbp), %rdi
shlq $0x3, %rdi
callq 0x2f650
movq %rax, -0x360(%rbp)
jmp 0x48e9a
movq -0x360(%rbp), %rax
movq %rax, -0x358(%rbp)
jmp 0x48eaa
movq -0x358(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq 0x30(%rbp), %rdi
callq 0x42600
cmpq $0x0, %rax
jne 0x48ee5
movq -0x2b0(%rbp), %rax
movq %rax, -0x368(%rbp)
jmp 0x48ef0
xorl %eax, %eax
movq %rax, -0x368(%rbp)
jmp 0x48ef0
movq -0x368(%rbp), %rsi
movq -0x278(%rbp), %rdx
movq %rdx, %rax
shlq $0x3, %rax
subq $0x20001, %rax          # imm = 0x20001
setae %al
movzbl %al, %ecx
leaq -0x2c8(%rbp), %rdi
callq 0x425b0
jmp 0x48f1f
movq $0x0, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
cmpq -0x200(%rbp), %rax
jge 0x49560
movq -0x2d8(%rbp), %rax
addq -0x258(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x7cf0
movq (%rax), %rax
subq -0x2d8(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq -0x2b0(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x2d8(%rbp), %rax
leaq -0x240(%rbp), %rcx
movq %rcx, -0x140(%rbp)
movq %rax, -0x148(%rbp)
movq $0x0, -0x150(%rbp)
movq -0x140(%rbp), %rax
movq -0x148(%rbp), %rdx
movq -0x150(%rbp), %rcx
movq %rax, -0x100(%rbp)
movq %rdx, -0x108(%rbp)
movq %rcx, -0x110(%rbp)
movq -0x100(%rbp), %rdi
movq (%rdi), %rcx
movq -0x110(%rbp), %rdx
movq -0x108(%rbp), %rsi
imulq 0x8(%rdi), %rsi
addq %rsi, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq 0x8(%rax), %rax
leaq -0x138(%rbp), %rdx
movq %rdx, -0x118(%rbp)
movq %rcx, -0x120(%rbp)
movq %rax, -0x128(%rbp)
movq -0x118(%rbp), %rdx
movq -0x120(%rbp), %rcx
movq -0x128(%rbp), %rax
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movq $0x1, -0xf8(%rbp)
movq -0xe0(%rbp), %rax
movq -0xe8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xf0(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0xf8(%rbp)
je 0x49097
leaq 0x71bc4(%rip), %rdi     # 0xbac43
leaq 0x71bc5(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x71c96(%rip), %rcx     # 0xbad28
callq 0x6340
movq -0x138(%rbp), %rax
movq %rax, -0x380(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x378(%rbp)
movq -0x370(%rbp), %rsi
movq -0x378(%rbp), %rax
movq -0x380(%rbp), %rcx
movq %rcx, -0x2f8(%rbp)
movq %rax, -0x2f0(%rbp)
movq -0x2e0(%rbp), %rcx
movq -0x1f8(%rbp), %r8
subq $0x10, %rsp
movq %rsp, %rax
movq $0x0, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x2ca(%rbp), %rdi
leaq -0x2f8(%rbp), %rdx
callq 0x42620
addq $0x10, %rsp
jmp 0x49110
movq $0x0, -0x300(%rbp)
movq -0x300(%rbp), %rax
cmpq -0x1f8(%rbp), %rax
jge 0x49544
movq -0x300(%rbp), %rax
addq -0x260(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq -0x310(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x7cf0
movq (%rax), %rax
subq -0x300(%rbp), %rax
movq %rax, -0x308(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x300(%rbp), %rcx
movq -0x2d8(%rbp), %rax
leaq -0x230(%rbp), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq %rax, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq (%rdi), %rcx
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rsi
imulq 0x8(%rdi), %rsi
addq %rsi, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq 0x8(%rax), %rax
leaq -0x60(%rbp), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rdx, -0x8(%rbp)
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0x20(%rbp)
je 0x4923a
leaq 0x71a21(%rip), %rdi     # 0xbac43
leaq 0x71a22(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x71a3b(%rip), %rcx     # 0xbac70
callq 0x6340
movq -0x60(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0x388(%rbp), %rsi
movq -0x390(%rbp), %rax
movq -0x398(%rbp), %rcx
movq %rcx, -0x320(%rbp)
movq %rax, -0x318(%rbp)
movq -0x2e0(%rbp), %rcx
movq -0x308(%rbp), %r8
subq $0x10, %rsp
movq %rsp, %rax
movq $0x0, (%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq -0x2c9(%rbp), %rdi
leaq -0x320(%rbp), %rdx
callq 0x49ee0
addq $0x10, %rsp
jmp 0x492ad
movq -0x300(%rbp), %rax
leaq -0x250(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq %rax, -0xd0(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq %rax, -0x80(%rbp)
movq %rdx, -0x88(%rbp)
movq %rcx, -0x90(%rbp)
movq -0x80(%rbp), %rdi
movq (%rdi), %rcx
movq -0x88(%rbp), %rdx
movq -0x90(%rbp), %rsi
imulq 0x8(%rdi), %rsi
addq %rsi, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq 0x8(%rax), %rax
leaq -0xc0(%rbp), %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, -0xa0(%rbp)
movq %rax, -0xa8(%rbp)
movq $0x1, -0xb0(%rbp)
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x1, -0xb0(%rbp)
je 0x4938f
leaq 0x718cc(%rip), %rdi     # 0xbac43
leaq 0x718cd(%rip), %rsi     # 0xbac4b
movl $0xd1, %edx
leaq 0x7332a(%rip), %rcx     # 0xbc6b4
callq 0x6340
movq -0xc0(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq -0x3a0(%rbp), %rax
movq -0x3a8(%rbp), %rcx
movq %rcx, -0x330(%rbp)
movq %rax, -0x328(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq -0x2b0(%rbp), %rax
movq %rax, -0x3c0(%rbp)
movq -0x308(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x3b0(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x7cf0
movq -0x3c8(%rbp), %rdx
movq -0x3c0(%rbp), %rcx
movq -0x3b8(%rbp), %r8
movq -0x3b0(%rbp), %r9
movq (%rax), %rsi
movq 0x28(%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 -0x2cb(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x42ef0
addq $0x30, %rsp
jmp 0x4947c
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rcx
movq -0x300(%rbp), %r9
movq %rcx, %rdx
imulq %r9, %rdx
leaq (%rax,%rdx,8), %rax
movq 0x18(%rbp), %rdx
movq %rdx, %rsi
imulq %r9, %rsi
leaq (%rax,%rsi,8), %rsi
movq -0x280(%rbp), %r8
movq -0x2b0(%rbp), %rax
movq -0x2e0(%rbp), %r10
movq %r10, %rdi
imulq %r9, %rdi
leaq (%rax,%rdi,8), %r9
movq -0x308(%rbp), %rdi
movq 0x28(%rbp), %r11
subq $0x20, %rsp
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rdi, (%rax)
leaq -0x2cc(%rbp), %rdi
callq 0x4a4c0
addq $0x20, %rsp
jmp 0x494f4
jmp 0x494f6
movq -0x260(%rbp), %rax
addq -0x300(%rbp), %rax
movq %rax, -0x300(%rbp)
jmp 0x4911b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a0(%rbp)
movl %eax, -0x2a4(%rbp)
jmp 0x4957d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a0(%rbp)
movl %eax, -0x2a4(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x467f0
jmp 0x4957d
jmp 0x49546
movq -0x258(%rbp), %rax
addq -0x2d8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
jmp 0x48f2a
leaq -0x2c8(%rbp), %rdi
callq 0x467f0
leaq -0x298(%rbp), %rdi
callq 0x467f0
movq %rbp, %rsp
popq %rbp
retq
leaq -0x298(%rbp), %rdi
callq 0x467f0
movq -0x2a0(%rbp), %rdi
callq 0x6830
nopw %cs:(%rax,%rax)
nop