// File: /workspace/github_cpp_makefile_star2_O1/Pyboon[P]sage/./Eigen/src/Core/products/GeneralBlockPanelKernel.h
// Function: Eigen::internal::gemm_pack_lhs<std::complex<double>, long, Eigen::internal::const_blas_data_mapper<std::complex<double>, long, 1>, 1, 1, 1, false, false>::operator()(std::complex<double>*, Eigen::internal::const_blas_data_mapper<std::complex<double>, long, 1> const&, long, long, long, long)
EIGEN_DONT_INLINE void gemm_pack_lhs<Scalar, Index, DataMapper, Pack1, Pack2, RowMajor, Conjugate, PanelMode>
  ::operator()(Scalar* blockA, const DataMapper& lhs, Index depth, Index rows, Index stride, Index offset)
{
  typedef typename packet_traits<Scalar>::type Packet;
  enum { PacketSize = packet_traits<Scalar>::size };

  EIGEN_ASM_COMMENT("EIGEN PRODUCT PACK LHS");
  EIGEN_UNUSED_VARIABLE(stride);
  EIGEN_UNUSED_VARIABLE(offset);
  eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride));
  conj_if<NumTraits<Scalar>::IsComplex && Conjugate> cj;
  Index count = 0;

//   const Index peeled_mc3 = Pack1>=3*PacketSize ? (rows/(3*PacketSize))*(3*PacketSize) : 0;
//   const Index peeled_mc2 = Pack1>=2*PacketSize ? peeled_mc3+((rows-peeled_mc3)/(2*PacketSize))*(2*PacketSize) : 0;
//   const Index peeled_mc1 = Pack1>=1*PacketSize ? (rows/(1*PacketSize))*(1*PacketSize) : 0;

  int pack = Pack1;
  Index i = 0;
  while(pack>0)
  {
    Index remaining_rows = rows-i;
    Index peeled_mc = i+(remaining_rows/pack)*pack;
    for(; i<peeled_mc; i+=pack)
    {
      if(PanelMode) count += pack * offset;

      const Index peeled_k = (depth/PacketSize)*PacketSize;
      Index k=0;
      if(pack>=PacketSize)
      {
        for(; k<peeled_k; k+=PacketSize)
        {
          for (Index m = 0; m < pack; m += PacketSize)
          {
            PacketBlock<Packet> kernel;
            for (int p = 0; p < PacketSize; ++p) kernel.packet[p] = lhs.loadPacket(i+p+m, k);
            ptranspose(kernel);
            for (int p = 0; p < PacketSize; ++p) pstore(blockA+count+m+(pack)*p, cj.pconj(kernel.packet[p]));
          }
          count += PacketSize*pack;
        }
      }
      for(; k<depth; k++)
      {
        Index w=0;
        for(; w<pack-3; w+=4)
        {
          Scalar a(cj(lhs(i+w+0, k))),
                 b(cj(lhs(i+w+1, k))),
                 c(cj(lhs(i+w+2, k))),
                 d(cj(lhs(i+w+3, k)));
          blockA[count++] = a;
          blockA[count++] = b;
          blockA[count++] = c;
          blockA[count++] = d;
        }
        if(pack%4)
          for(;w<pack;++w)
            blockA[count++] = cj(lhs(i+w, k));
      }

      if(PanelMode) count += pack * (stride-offset-depth);
    }

    pack -= PacketSize;
    if(pack<Pack2 && (pack+PacketSize)!=Pack2)
      pack = Pack2;
  }

  for(; i<rows; i++)
  {
    if(PanelMode) count += offset;
    for(Index k=0; k<depth; k++)
      blockA[count++] = cj(lhs(i, k));
    if(PanelMode) count += (stride-offset-depth);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
orq 0x30(%rsp), %r9
jne 0x12ed2
xorl %edi, %edi
testq %r8, %r8
jle 0x12e70
testq %rcx, %rcx
movl $0x0, %r9d
cmovgq %rcx, %r9
movq %rcx, %r10
negq %r10
movq %r9, %r11
subq %rcx, %r11
shlq $0x4, %r9
xorl %eax, %eax
xorl %ebx, %ebx
testq %rcx, %rcx
jle 0x12e1c
movq %rax, %r14
shlq $0x4, %r14
addq %rsi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rdx), %r13
imulq %rdi, %r13
addq (%rdx), %r13
movups (%r12,%r13), %xmm0
movaps %xmm0, (%r14,%r12)
addq $0x10, %r12
decq %r15
cmpq %r15, %r10
jne 0x12df3
subq %r15, %rax
movq %rcx, %r14
jmp 0x12e1f
xorl %r14d, %r14d
cmpq %rcx, %r14
jge 0x12e5b
movq %rax, %r14
shlq $0x4, %r14
addq %rsi, %r14
movq %r9, %r12
xorl %r15d, %r15d
movq 0x8(%rdx), %r13
imulq %rdi, %r13
addq (%rdx), %r13
movups (%r12,%r13), %xmm0
movups %xmm0, (%r14)
addq $0x10, %r14
decq %r15
addq $0x10, %r12
cmpq %r15, %r11
jne 0x12e34
subq %r15, %rax
incq %rbx
addq $0x10, %rdi
cmpq %r8, %rbx
jne 0x12dde
movq %r8, %rdi
jmp 0x12e72
xorl %eax, %eax
cmpq %r8, %rdi
jge 0x12ec8
movq %rcx, %r9
negq %r9
movq %rdi, %r10
shlq $0x4, %r10
testq %rcx, %rcx
jle 0x12ebc
movq %rax, %r11
shlq $0x4, %r11
addq %rsi, %r11
xorl %r14d, %r14d
xorl %ebx, %ebx
movq 0x8(%rdx), %r15
imulq %r10, %r15
addq (%rdx), %r15
movups (%r14,%r15), %xmm0
movups %xmm0, (%r11,%r14)
decq %rbx
addq $0x10, %r14
cmpq %rbx, %r9
jne 0x12e98
subq %rbx, %rax
incq %rdi
addq $0x10, %r10
cmpq %r8, %rdi
jne 0x12e84
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xfc86(%rip), %rdi      # 0x22b5f
leaq 0xfcda(%rip), %rsi      # 0x22bba
leaq 0xfd07(%rip), %rcx      # 0x22bee
movl $0x715, %edx            # imm = 0x715
callq 0x31b0
nop