// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/./Eigen/src/Core/products/GeneralBlockPanelKernel.h
// Function: Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 1>, 4, 2, 1, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, 0x10(%rsp)
orq 0xd0(%rsp), %r9
jne 0x24ca0
movq %rdx, %rdi
movq %rcx, %r15
shrq $0x3f, %r15
addq %rcx, %r15
andq $-0x2, %r15
leaq 0x18(%rsi), %rax
movq %rax, 0x70(%rsp)
movl $0x4, %edx
xorl %r9d, %r9d
xorl %r10d, %r10d
movq %rcx, 0x78(%rsp)
movq %r15, 0x50(%rsp)
movq 0x10(%rsp), %r8
movq %r8, %rax
subq %r10, %rax
movl %edx, %r14d
cqto
idivq %r14
subq %rdx, %r8
movq %r8, 0x68(%rsp)
cmpq %r8, %r10
jge 0x24c29
cmpq $0x2, %rcx
setl %al
cmpq $0x1, %r14
sete %r8b
leal (%r14,%r14), %r13d
leal -0x3(%r14), %edx
movslq %edx, %r12
orb %al, %r8b
movb %r8b, 0xf(%rsp)
leaq (,%r10,8), %rax
movq %rax, 0x30(%rsp)
leaq (,%r14,8), %rax
movq %rax, 0x58(%rsp)
leaq 0x18(,%r10,8), %rax
movq %rax, 0x28(%rsp)
leaq 0x10(,%r10,8), %rax
movq %rax, 0x20(%rsp)
leaq 0x8(,%r10,8), %rax
movq %rax, 0x18(%rsp)
movq %r13, 0x60(%rsp)
cmpb $0x0, 0xf(%rsp)
je 0x24a2e
xorl %ebp, %ebp
jmp 0x24a8e
xorl %ebp, %ebp
leaq (%rsi,%r9,8), %rax
xorl %r11d, %r11d
leaq (%r11,%r10), %rdx
movq 0x8(%rdi), %rbx
leaq (,%rbp,8), %r8
addq (%rdi), %r8
imulq %rbx, %rdx
movups (%r8,%rdx,8), %xmm0
leaq (%r11,%r10), %rdx
incq %rdx
imulq %rbx, %rdx
movups (%r8,%rdx,8), %xmm1
movaps %xmm0, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
leaq (%rax,%r11,8), %rdx
movaps %xmm0, (%rdx)
movaps %xmm2, (%rdx,%r14,8)
addq $0x2, %r11
cmpq %r14, %r11
jb 0x24a37
addq %r13, %r9
addq $0x2, %rbp
cmpq %r15, %rbp
jl 0x24a30
cmpq %rcx, %rbp
jge 0x24bf8
movq (%rdi), %rax
movq 0x8(%rdi), %r13
movq %r13, %r15
imulq 0x30(%rsp), %r15
addq %rax, %r15
movq %r13, %rbx
shlq $0x5, %rbx
movq %r13, %rdx
imulq 0x28(%rsp), %rdx
addq %rax, %rdx
movq %r13, %r8
imulq 0x20(%rsp), %r8
addq %rax, %r8
movq %r8, 0x38(%rsp)
movq %r13, %r11
imulq 0x18(%rsp), %r11
addq %rax, %r11
leaq (%rax,%rbp,8), %r8
shlq $0x3, %r13
movq %rbp, %rax
movq %rax, 0x88(%rsp)
movq %r8, 0x40(%rsp)
cmpl $0x4, %r14d
movq %rdx, 0x90(%rsp)
movq %r11, 0x48(%rsp)
jb 0x24b78
movq 0x70(%rsp), %rax
leaq (%rax,%r9,8), %r8
movq 0x38(%rsp), %rcx
movq %rdx, %rax
movq %r15, 0x80(%rsp)
xorl %edx, %edx
movsd (%r15,%rbp,8), %xmm0
movsd (%r11,%rbp,8), %xmm1
movsd (%rcx,%rbp,8), %xmm2
movsd (%rax,%rbp,8), %xmm3
movsd %xmm0, -0x18(%r8,%rdx,8)
movsd %xmm1, -0x10(%r8,%rdx,8)
movsd %xmm2, -0x8(%r8,%rdx,8)
movsd %xmm3, (%r8,%rdx,8)
addq $0x4, %rdx
addq %rbx, %r15
addq %rbx, %rax
addq %rbx, %rcx
addq %rbx, %r11
cmpq %r12, %rdx
jl 0x24b20
addq %rdx, %r9
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %r15
jmp 0x24b7a
xorl %edx, %edx
testb $0x3, %r14b
sete %r11b
movq %r14, %rax
subq %rdx, %rax
setbe %r8b
orb %r11b, %r8b
jne 0x24bbc
addq %r10, %rdx
imulq %r13, %rdx
movq 0x40(%rsp), %r8
addq %r8, %rdx
movq 0x48(%rsp), %r11
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi,%r9,8)
incq %r9
addq %r13, %rdx
decq %rax
jne 0x24ba5
jmp 0x24bc6
movq 0x48(%rsp), %r11
movq 0x40(%rsp), %r8
movq 0x88(%rsp), %rax
incq %rax
addq $0x8, %r15
movq 0x90(%rsp), %rdx
addq $0x8, %rdx
addq $0x8, 0x38(%rsp)
addq $0x8, %r11
addq $0x8, %r8
cmpq %rcx, %rax
jne 0x24ae5
addq %r14, %r10
movq 0x58(%rsp), %rax
addq %rax, 0x30(%rsp)
addq %rax, 0x28(%rsp)
addq %rax, 0x20(%rsp)
addq %rax, 0x18(%rsp)
cmpq 0x68(%rsp), %r10
movq 0x50(%rsp), %r15
movq 0x60(%rsp), %r13
jl 0x24a23
xorl %edx, %edx
cmpq $0x2, %r14
setne %dl
leal -0x2(%r14), %eax
addl %edx, %edx
cmpl $0x4, %r14d
cmovael %eax, %edx
testl %edx, %edx
jg 0x24997
cmpq 0x10(%rsp), %r10
jge 0x24c8e
movq 0x8(%rdi), %rax
shlq $0x3, %rax
movq %rax, %r8
imulq %r10, %r8
addq (%rdi), %r8
testq %rcx, %rcx
jle 0x24c81
leaq (%rsi,%r9,8), %rdi
xorl %edx, %edx
movsd (%r8,%rdx,8), %xmm0
movsd %xmm0, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x24c6b
addq %rdx, %r9
incq %r10
addq %rax, %r8
cmpq 0x10(%rsp), %r10
jne 0x24c60
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b078(%rip), %rdi     # 0x5fd1f
leaq 0x3b0cc(%rip), %rsi     # 0x5fd7a
leaq 0x40054(%rip), %rcx     # 0x64d09
movl $0x715, %edx            # imm = 0x715
callq 0x9200
nop