// File: /workspace/github_cpp_makefile_star2_O2/j-faria[P]kima/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h
// Function: Eigen::internal::lhs_process_one_packet<4, 2l, 1l, double, double, double, double vector[2], double vector[2], double vector[2], double vector[2], Eigen::internal::gebp_traits<double, double, false, false, 1, 0>, Eigen::internal::BlasLinearMapper<double, long, 0, 1>, Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>>::operator()(Eigen::internal::blas_data_mapper<double, long, 0, 0, 1> const&, double const*, double const*, double, long, long, long, long, long, long, int, long, long, long, long, long)
EIGEN_STRONG_INLINE void operator()(
    const DataMapper& res, const LhsScalar* blockA, const RhsScalar* blockB, ResScalar alpha,
    Index peelStart, Index peelEnd, Index strideA, Index strideB, Index offsetA, Index offsetB,
    int prefetch_res_offset, Index peeled_kc, Index pk, Index cols, Index depth, Index packet_cols4)
  {
    GEBPTraits traits;

    // loops on each largest micro horizontal panel of lhs
    // (LhsProgress x depth)
    for(Index i=peelStart; i<peelEnd; i+=LhsProgress)
    {
      // loops on each largest micro vertical panel of rhs (depth * nr)
      for(Index j2=0; j2<packet_cols4; j2+=nr)
      {
        // We select a LhsProgress x nr micro block of res
        // which is entirely stored into 1 x nr registers.

        const LhsScalar* blA = &blockA[i*strideA+offsetA*(LhsProgress)];
        prefetch(&blA[0]);

        // gets res block as register
        AccPacket C0, C1, C2, C3;
        traits.initAcc(C0);
        traits.initAcc(C1);
        traits.initAcc(C2);
        traits.initAcc(C3);
        // To improve instruction pipelining, let's double the accumulation registers:
        //  even k will accumulate in C*, while odd k will accumulate in D*.
        // This trick is crutial to get good performance with FMA, otherwise it is 
        // actually faster to perform separated MUL+ADD because of a naturally
        // better instruction-level parallelism.
        AccPacket D0, D1, D2, D3;
        traits.initAcc(D0);
        traits.initAcc(D1);
        traits.initAcc(D2);
        traits.initAcc(D3);

        LinearMapper r0 = res.getLinearMapper(i, j2 + 0);
        LinearMapper r1 = res.getLinearMapper(i, j2 + 1);
        LinearMapper r2 = res.getLinearMapper(i, j2 + 2);
        LinearMapper r3 = res.getLinearMapper(i, j2 + 3);

        r0.prefetch(prefetch_res_offset);
        r1.prefetch(prefetch_res_offset);
        r2.prefetch(prefetch_res_offset);
        r3.prefetch(prefetch_res_offset);

        // performs "inner" products
        const RhsScalar* blB = &blockB[j2*strideB+offsetB*nr];
        prefetch(&blB[0]);
        LhsPacket A0, A1;

        for(Index k=0; k<peeled_kc; k+=pk)
        {
          EIGEN_ASM_COMMENT("begin gebp micro kernel 1/half/quarterX4");
          RhsPacketx4 rhs_panel;
          RhsPacket T0;

          internal::prefetch(blB+(48+0));
          peeled_kc_onestep(0, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);
          peeled_kc_onestep(1, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);
          peeled_kc_onestep(2, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);
          peeled_kc_onestep(3, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);
          internal::prefetch(blB+(48+16));
          peeled_kc_onestep(4, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);
          peeled_kc_onestep(5, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);
          peeled_kc_onestep(6, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);
          peeled_kc_onestep(7, blA, blB, traits, &A1, &rhs_panel, &T0, &D0, &D1, &D2, &D3);

          blB += pk*4*RhsProgress;
          blA += pk*LhsProgress;

          EIGEN_ASM_COMMENT("end gebp micro kernel 1/half/quarterX4");
        }
        C0 = padd(C0,D0);
        C1 = padd(C1,D1);
        C2 = padd(C2,D2);
        C3 = padd(C3,D3);

        // process remaining peeled loop
        for(Index k=peeled_kc; k<depth; k++)
        {
          RhsPacketx4 rhs_panel;
          RhsPacket T0;
          peeled_kc_onestep(0, blA, blB, traits, &A0, &rhs_panel, &T0, &C0, &C1, &C2, &C3);
          blB += 4*RhsProgress;
          blA += LhsProgress;
        }

        ResPacket R0, R1;
        ResPacket alphav = pset1<ResPacket>(alpha);

        R0 = r0.template loadPacket<ResPacket>(0);
        R1 = r1.template loadPacket<ResPacket>(0);
        traits.acc(C0, alphav, R0);
        traits.acc(C1,  alphav, R1);
        r0.storePacket(0, R0);
        r1.storePacket(0, R1);

        R0 = r2.template loadPacket<ResPacket>(0);
        R1 = r3.template loadPacket<ResPacket>(0);
        traits.acc(C2,  alphav, R0);
        traits.acc(C3,  alphav, R1);
        r2.storePacket(0, R0);
        r3.storePacket(0, R1);
      }

      // Deal with remaining columns of the rhs
      for(Index j2=packet_cols4; j2<cols; j2++)
      {
        // One column at a time
        const LhsScalar* blA = &blockA[i*strideA+offsetA*(LhsProgress)];
        prefetch(&blA[0]);

        // gets res block as register
        AccPacket C0;
        traits.initAcc(C0);

        LinearMapper r0 = res.getLinearMapper(i, j2);

        // performs "inner" products
        const RhsScalar* blB = &blockB[j2*strideB+offsetB];
        LhsPacket A0;

        for(Index k= 0; k<peeled_kc; k+=pk)
        {
          EIGEN_ASM_COMMENT("begin gebp micro kernel 1/half/quarterX1");
          RhsPacket B_0;

#define EIGEN_GEBGP_ONESTEP(K)                                          \
	      do {                                                      \
		EIGEN_ASM_COMMENT("begin step of gebp micro kernel 1/half/quarterX1"); \
		EIGEN_ASM_COMMENT("Note: these asm comments work around bug 935!"); \
    /* FIXME: why unaligned???? */ \
		traits.loadLhsUnaligned(&blA[(0+1*K)*LhsProgress], A0); \
		traits.loadRhs(&blB[(0+K)*RhsProgress], B_0);		\
		traits.madd(A0, B_0, C0, B_0, fix<0>);				\
		EIGEN_ASM_COMMENT("end step of gebp micro kernel 1/half/quarterX1"); \
	      } while(false);

          EIGEN_GEBGP_ONESTEP(0);
          EIGEN_GEBGP_ONESTEP(1);
          EIGEN_GEBGP_ONESTEP(2);
          EIGEN_GEBGP_ONESTEP(3);
          EIGEN_GEBGP_ONESTEP(4);
          EIGEN_GEBGP_ONESTEP(5);
          EIGEN_GEBGP_ONESTEP(6);
          EIGEN_GEBGP_ONESTEP(7);

          blB += pk*RhsProgress;
          blA += pk*LhsProgress;

          EIGEN_ASM_COMMENT("end gebp micro kernel 1/half/quarterX1");
        }

        // process remaining peeled loop
        for(Index k=peeled_kc; k<depth; k++)
        {
          RhsPacket B_0;
          EIGEN_GEBGP_ONESTEP(0);
          blB += RhsProgress;
          blA += LhsProgress;
        }
#undef EIGEN_GEBGP_ONESTEP
        ResPacket R0;
        ResPacket alphav = pset1<ResPacket>(alpha);
        R0 = r0.template loadPacket<ResPacket>(0);
        traits.acc(C0, alphav, R0);
        r0.storePacket(0, R0);
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %r9, 0xd0(%rsp)
movq %rdi, 0x70(%rsp)
movq 0x238(%rsp), %r10
movq 0x220(%rsp), %r11
movq 0x1f8(%rsp), %rbx
movq 0x1f0(%rsp), %r14
movq 0x208(%rsp), %rax
movq 0x200(%rsp), %r9
shlq $0x4, %r9
leaq (%rdx,%r9), %rdi
movq %rdi, 0xc8(%rsp)
movq %rax, %rdi
shlq $0x5, %rdi
addq %rcx, %rdi
movq %rdi, 0xf0(%rsp)
movq %r14, %rdi
imulq %r8, %rdi
leaq (%r9,%rdi,8), %r15
movq %r11, %rdi
shlq $0x5, %rdi
movq %rdi, 0x140(%rsp)
addq %rdx, %r15
movq %r10, %rdx
imulq %rbx, %rdx
shlq $0x3, %rax
leaq (%rax,%rdx,8), %rax
movq %r11, %rdx
shlq $0x4, %rdx
movq %rdx, 0x78(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, 0x150(%rsp)
addq %rcx, %rax
movq %rax, 0xc0(%rsp)
shlq $0x4, %r14
movq %r14, 0xb8(%rsp)
movslq 0x210(%rsp), %rax
movq %rax, 0xe8(%rsp)
leaq (,%r11,8), %r11
leaq (,%rbx,8), %rax
movq %rax, 0xd8(%rsp)
movq %rsi, 0xf8(%rsp)
movq %r11, 0xe0(%rsp)
cmpq 0xd0(%rsp), %r8
jge 0x1b26b
movq %r8, %rax
imulq 0x1f0(%rsp), %rax
movq 0xc8(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
xorl %r9d, %r9d
movq %r8, 0x110(%rsp)
movq %r15, 0x108(%rsp)
movq %rbx, 0x100(%rsp)
cmpq 0x238(%rsp), %r9
jge 0x1b0cc
prefetcht0 (%rbx)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movapd %xmm0, (%rsp)
movapd %xmm0, 0x30(%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, 0x90(%rsp)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %r9, %rdx
orq $0x1, %rdx
imulq %rcx, %rdx
movq %r9, %rsi
orq $0x2, %rsi
imulq %rcx, %rsi
movq %r9, %rdi
orq $0x3, %rdi
imulq %rcx, %rdi
imulq %r9, %rcx
leaq (%rax,%rcx,8), %rcx
leaq (%rcx,%r8,8), %r10
leaq (%rax,%rdx,8), %rcx
leaq (%rcx,%r8,8), %r11
leaq (%rax,%rsi,8), %rcx
leaq (%rcx,%r8,8), %rcx
leaq (%rax,%rdi,8), %rax
leaq (%rax,%r8,8), %rdx
movq 0xe8(%rsp), %rax
movq %r10, 0x120(%rsp)
prefetcht0 (%r10,%rax,8)
movq %r11, 0x118(%rsp)
prefetcht0 (%r11,%rax,8)
movq %rcx, 0x130(%rsp)
prefetcht0 (%rcx,%rax,8)
movq %rdx, 0x128(%rsp)
prefetcht0 (%rdx,%rax,8)
movq %r9, 0x138(%rsp)
movq %r9, %rax
imulq 0x1f8(%rsp), %rax
movq 0xf0(%rsp), %rcx
leaq (%rcx,%rax,8), %r14
prefetcht0 (%r14)
xorl %eax, %eax
cmpq 0x218(%rsp), %rax
jge 0x1af60
prefetcht0 0x180(%r14)
subq $0x8, %rsp
movq 0x78(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, 0x150(%rsp)
leaq 0x88(%rsp), %r8
leaq 0x178(%rsp), %r9
leaq 0x38(%rsp), %rbp
pushq %rbp
leaq 0x10(%rsp), %r15
pushq %r15
leaq 0x28(%rsp), %r12
pushq %r12
leaq 0x40(%rsp), %r15
pushq %r15
leaq 0x188(%rsp), %r12
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x1
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0xa8(%rsp), %r8
leaq 0x178(%rsp), %rbp
movq %rbp, %r9
leaq 0x98(%rsp), %rax
pushq %rax
leaq 0x50(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x2
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x88(%rsp), %r8
movq %rbp, %r9
leaq 0x38(%rsp), %r15
pushq %r15
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x3
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0xa8(%rsp), %r8
movq %rbp, %r9
leaq 0x98(%rsp), %rax
pushq %rax
leaq 0x50(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x30, %rsp
prefetcht0 0x200(%r14)
subq $0x8, %rsp
movq %r13, %rdi
pushq $0x4
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x88(%rsp), %r8
movq %rbp, %r9
pushq %r15
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x5
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0xa8(%rsp), %r8
movq %rbp, %r9
movq %rbp, %r15
leaq 0x98(%rsp), %rbp
pushq %rbp
leaq 0x50(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x6
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x88(%rsp), %r8
movq %r15, %r9
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
addq $0x28, %rsp
movq %r13, %rdi
pushq $0x7
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0xa8(%rsp), %r8
movq %r15, %r9
pushq %rbp
leaq 0x50(%rsp), %rax
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
pushq %r12
callq 0x1b2ac
movq 0x178(%rsp), %rax
addq $0x30, %rsp
addq 0x140(%rsp), %r14
addq 0x78(%rsp), %rbx
addq 0x220(%rsp), %rax
jmp 0x1ad14
movapd 0x20(%rsp), %xmm0
addpd 0x60(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
movapd 0x10(%rsp), %xmm0
addpd 0x50(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movapd (%rsp), %xmm0
addpd 0x40(%rsp), %xmm0
movapd %xmm0, (%rsp)
movapd 0x30(%rsp), %xmm0
addpd 0x90(%rsp), %xmm0
movapd %xmm0, 0x30(%rsp)
movq 0x218(%rsp), %r13
movq 0x108(%rsp), %r15
cmpq 0x230(%rsp), %r13
jge 0x1b01b
subq $0x8, %rsp
movq 0x78(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x88(%rsp), %r8
leaq 0x178(%rsp), %r9
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
leaq 0x188(%rsp), %rax
pushq %rax
callq 0x1b2ac
addq $0x30, %rsp
addq $0x20, %r14
addq $0x10, %rbx
incq %r13
jmp 0x1afb9
movq 0x120(%rsp), %rax
movupd (%rax), %xmm0
movq 0x118(%rsp), %rcx
movupd (%rcx), %xmm1
movapd 0x20(%rsp), %xmm2
movapd 0x150(%rsp), %xmm3
mulpd %xmm3, %xmm2
addpd %xmm0, %xmm2
movapd 0x10(%rsp), %xmm0
mulpd %xmm3, %xmm0
addpd %xmm1, %xmm0
movupd %xmm2, (%rax)
movupd %xmm0, (%rcx)
movq 0x130(%rsp), %rax
movupd (%rax), %xmm0
movq 0x128(%rsp), %rcx
movupd (%rcx), %xmm1
movapd (%rsp), %xmm2
mulpd %xmm3, %xmm2
addpd %xmm0, %xmm2
movapd 0x30(%rsp), %xmm0
mulpd %xmm3, %xmm0
addpd %xmm1, %xmm0
movupd %xmm2, (%rax)
movupd %xmm0, (%rcx)
movq 0x138(%rsp), %r9
addq $0x4, %r9
movq 0x110(%rsp), %r8
movq 0xf8(%rsp), %rsi
movq 0xe0(%rsp), %r11
movq 0x100(%rsp), %rbx
jmp 0x1ac21
movq 0xc0(%rsp), %rax
movq 0x238(%rsp), %rcx
cmpq 0x228(%rsp), %rcx
jge 0x1b25a
prefetcht0 (%rbx)
movq 0x8(%rsi), %rdx
imulq %rcx, %rdx
shlq $0x3, %rdx
addq (%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
movq %rbx, %rdi
xorl %r9d, %r9d
cmpq 0x218(%rsp), %r9
jge 0x1b1fa
movupd (%r15,%r10,2), %xmm1
movsd (%rax,%r10), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm0
movupd 0x10(%r15,%r10,2), %xmm1
movsd 0x8(%rax,%r10), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm0, %xmm2
movupd 0x20(%r15,%r10,2), %xmm0
movsd 0x10(%rax,%r10), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd %xmm2, %xmm1
movupd 0x30(%r15,%r10,2), %xmm0
movsd 0x18(%rax,%r10), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd 0x40(%r15,%r10,2), %xmm0
movsd 0x20(%rax,%r10), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd %xmm2, %xmm1
movupd 0x50(%r15,%r10,2), %xmm0
movsd 0x28(%rax,%r10), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd 0x60(%r15,%r10,2), %xmm0
movsd 0x30(%rax,%r10), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
addpd %xmm2, %xmm1
movupd 0x70(%r15,%r10,2), %xmm2
movsd 0x38(%rax,%r10), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm2, %xmm0
addpd %xmm1, %xmm0
addq 0x78(%rsp), %rdi
addq 0x220(%rsp), %r9
addq %r11, %r10
jmp 0x1b109
addq %rax, %r10
movq 0x218(%rsp), %r9
cmpq 0x230(%rsp), %r9
jge 0x1b231
movupd (%rdi), %xmm1
movsd (%r10), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm2, %xmm0
addq $0x8, %r10
addq $0x10, %rdi
incq %r9
jmp 0x1b205
movupd (%rdx,%r8,8), %xmm1
mulpd 0x150(%rsp), %xmm0
addpd %xmm1, %xmm0
movupd %xmm0, (%rdx,%r8,8)
incq %rcx
addq 0xd8(%rsp), %rax
jmp 0x1b0dc
addq $0x2, %r8
addq 0xb8(%rsp), %r15
jmp 0x1abe0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq