// File: /workspace/github_cpp_makefile_star2_O3/Pyboon[P]sage/./Eigen/src/LU/PartialPivLU.h
// Function: Eigen::internal::partial_lu_impl<std::complex<double>, 0, int>::unblocked_lu(Eigen::Block<Eigen::Map<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0>>, -1, -1, false>&, int*, int&)
static Index unblocked_lu(MatrixType& lu, PivIndex* row_transpositions, PivIndex& nb_transpositions)
  {
    typedef scalar_score_coeff_op<Scalar> Scoring;
    typedef typename Scoring::result_type Score;
    const Index rows = lu.rows();
    const Index cols = lu.cols();
    const Index size = (std::min)(rows,cols);
    nb_transpositions = 0;
    Index first_zero_pivot = -1;
    for(Index k = 0; k < size; ++k)
    {
      Index rrows = rows-k-1;
      Index rcols = cols-k-1;

      Index row_of_biggest_in_col;
      Score biggest_in_corner
        = lu.col(k).tail(rows-k).unaryExpr(Scoring()).maxCoeff(&row_of_biggest_in_col);
      row_of_biggest_in_col += k;

      row_transpositions[k] = PivIndex(row_of_biggest_in_col);

      if(biggest_in_corner != Score(0))
      {
        if(k != row_of_biggest_in_col)
        {
          lu.row(k).swap(lu.row(row_of_biggest_in_col));
          ++nb_transpositions;
        }

        // FIXME shall we introduce a safe quotient expression in cas 1/lu.coeff(k,k)
        // overflow but not the actual quotient?
        lu.col(k).tail(rrows) /= lu.coeff(k,k);
      }
      else if(first_zero_pivot==-1)
      {
        // the pivot is exactly zero, we record the index of the first pivot which is exactly 0,
        // and continue the factorization such we still have A = PLU
        first_zero_pivot = k;
      }

      if(k<rows-1)
        lu.bottomRightCorner(rrows,rcols).noalias() -= lu.col(k).tail(rrows) * lu.row(k).tail(rcols);
    }
    return first_zero_pivot;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, 0x70(%rsp)
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %rax
cmpq %r8, %rax
movq %r8, %rcx
movq %rax, 0x48(%rsp)
cmovlq %rax, %rcx
movq %rdx, 0x38(%rsp)
movl $0x0, (%rdx)
movq %rcx, 0x68(%rsp)
testq %rcx, %rcx
jle 0x1562b
movq %rdi, %r15
leaq 0x18(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x38(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x128(%rsp), %r12
leaq -0x1(%r8), %r14
movl $0x1, %r13d
subq %r8, %r13
movq $-0x1, 0x18(%rsp)
movq $0x0, 0x30(%rsp)
movq %r14, 0x28(%rsp)
xorl %ebp, %ebp
movq %r8, 0x60(%rsp)
movq %r14, 0x40(%rsp)
movq (%r15), %rax
movq 0x8(%r15), %rcx
testq %rax, %rax
sete %dl
testq %rcx, %rcx
setns %sil
orb %dl, %sil
je 0x1564b
cmpq %rbp, 0x10(%r15)
jle 0x15662
testq %rax, %rax
sete %dl
movq %r8, %rsi
subq %rbp, %rsi
setns %dil
orb %dl, %dil
je 0x15679
movq %rcx, %rdx
subq %rsi, %rdx
movq %rdx, %rdi
orq %rsi, %rdi
js 0x15698
movq %rbp, %rbx
notq %rbx
leaq (%r8,%rbx), %rdi
movq %rdi, 0x10(%rsp)
movq 0x48(%r15), %rdi
movq %rdi, %r8
imulq %rbp, %r8
shlq $0x4, %r8
addq %r8, %rax
movq %rdx, %r8
shlq $0x4, %r8
addq %rax, %r8
movq %r8, 0xf8(%rsp)
movq %rsi, 0x100(%rsp)
movq %rax, 0x110(%rsp)
movq %rcx, 0x118(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0x10(%r12)
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x28(%r12)
movups (%rcx), %xmm0
movups %xmm0, 0x18(%r12)
movq 0x8(%rsp), %rax
movups (%rax), %xmm0
movups %xmm0, 0x38(%r12)
movq %rdi, 0x170(%rsp)
movq $0x0, 0x178(%rsp)
movq %rbp, 0x180(%rsp)
movq %rdi, 0x188(%rsp)
movq %rdx, 0x190(%rsp)
movq %rdi, 0x1a0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x1589a
movq 0x78(%rsp), %rcx
movsd 0x88(%rsp), %xmm0
leaq (%rcx,%rbp), %rax
movq 0x70(%rsp), %rdx
movl %eax, (%rdx,%rbp,4)
ucomisd 0x8337(%rip), %xmm0     # 0x1d418
jne 0x150e9
jnp 0x1532d
testq %rcx, %rcx
movq 0x10(%rsp), %r9
je 0x15243
movq (%r15), %rcx
movq 0x10(%r15), %rdx
movq %rbp, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
movq %rsi, 0xf8(%rsp)
movq %rdx, 0x108(%rsp)
testq %rcx, %rcx
sete %sil
testq %rdx, %rdx
setns %dil
orb %sil, %dil
movq 0x20(%rsp), %r8
je 0x15740
movq 0x10(%r15), %rsi
movq %rsi, -0x8(%r12)
movups (%r15), %xmm0
movups %xmm0, -0x18(%r12)
movq 0x10(%r8), %rsi
movq %rsi, 0x10(%r12)
movups (%r8), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rdi
movq 0x10(%rdi), %rsi
movq %rsi, 0x30(%r12)
movupd (%rdi), %xmm0
movupd %xmm0, 0x20(%r12)
movq %rbp, 0x160(%rsp)
movq $0x0, 0x168(%rsp)
movq $0x1, 0x170(%rsp)
movq 0x8(%r15), %rsi
cmpq %rbp, %rsi
jle 0x156b7
movq %rax, %rdi
shlq $0x4, %rdi
addq %rdi, %rcx
movq %rcx, 0x78(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x10(%r15), %rcx
leaq 0x90(%rsp), %rdi
movq %rcx, 0x10(%rdi)
movups (%r15), %xmm0
movups %xmm0, (%rdi)
movq 0x10(%r8), %rcx
movq %rcx, 0x28(%rdi)
movups (%r8), %xmm0
movups %xmm0, 0x18(%rdi)
movq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq %rcx, 0x48(%rdi)
movupd (%rdx), %xmm0
movupd %xmm0, 0x38(%rdi)
movq %rax, 0xe0(%rsp)
movq $0x0, 0xe8(%rsp)
movq $0x1, 0xf0(%rsp)
testq %rax, %rax
js 0x156b7
cmpq %rax, %rsi
jle 0x156b7
leaq 0xf8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x15800
movq 0x38(%rsp), %rax
incl (%rax)
movq 0x10(%rsp), %r9
movq (%r15), %rax
movq 0x8(%r15), %rcx
testq %rax, %rax
sete %dl
testq %rcx, %rcx
setns %sil
orb %dl, %sil
je 0x1564b
cmpq %rbp, 0x10(%r15)
movapd 0x8204(%rip), %xmm5     # 0x1d470
jle 0x15662
movq 0x48(%r15), %rdx
movq %rdx, %rsi
imulq %rbp, %rsi
shlq $0x4, %rsi
addq %rax, %rsi
sete %dil
testq %r9, %r9
setns %r8b
orb %dil, %r8b
je 0x15679
movq %rcx, %rdi
subq %r9, %rdi
orq %r9, %rdi
js 0x15698
movq %rbp, %rdi
shlq $0x4, %rdi
addq %rdi, %rsi
testq %r9, %r9
js 0x156d6
je 0x15344
movupd (%rsi), %xmm0
movapd %xmm0, %xmm1
shufpd $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1],xmm0[0]
movapd %xmm0, %xmm3
mulpd %xmm0, %xmm3
movapd %xmm3, %xmm2
shufpd $0x1, %xmm3, %xmm2      # xmm2 = xmm2[1],xmm3[0]
addpd %xmm3, %xmm2
imulq 0x30(%rsp), %rdx
addq %r13, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq %rdx, %rax
movq 0x28(%rsp), %rcx
movupd (%rax), %xmm3
movapd %xmm3, %xmm4
unpcklpd %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
mulpd %xmm0, %xmm4
xorpd %xmm5, %xmm4
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
mulpd %xmm1, %xmm3
addpd %xmm4, %xmm3
divpd %xmm2, %xmm3
movupd %xmm3, (%rax)
addq $0x10, %rax
decq %rcx
jne 0x152fa
jmp 0x15344
movq 0x18(%rsp), %rax
cmpq $-0x1, %rax
cmoveq %rbp, %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %r9
cmpq %r14, %rbp
jge 0x15608
movq (%r15), %rcx
movq 0x8(%r15), %r8
testq %rcx, %rcx
sete %al
testq %r8, %r8
setns %dl
orb %al, %dl
je 0x1564b
movq 0x10(%r15), %rsi
cmpq %rbp, %rsi
jle 0x15662
testq %rcx, %rcx
sete %al
testq %r9, %r9
setns %dl
orb %al, %dl
je 0x15679
movq %r8, %rax
subq %r9, %rax
movq %rax, %rdx
orq %r9, %rdx
js 0x15698
cmpq %rbp, %r8
jle 0x156b7
addq 0x48(%rsp), %rbx
testq %rcx, %rcx
sete %dl
testq %rbx, %rbx
setns %dil
orb %dl, %dil
je 0x1570c
movq %r13, 0x50(%rsp)
movq 0x8(%rsp), %r14
movq %rsi, %rdx
subq %rbx, %rdx
movq %rdx, %rdi
orq %rbx, %rdi
movq %rsi, 0x58(%rsp)
js 0x15726
movq 0x48(%r15), %rdi
movq %rdi, %r10
imulq %rbp, %r10
shlq $0x4, %r10
addq %rcx, %r10
movq %rax, %r9
shlq $0x4, %r9
leaq (%r10,%r9), %r11
movq %r11, 0xf8(%rsp)
movq %rbp, %r11
shlq $0x4, %r11
addq %rcx, %r11
movq 0x10(%rsp), %r13
movq %r13, 0x100(%rsp)
movq %r10, 0x110(%rsp)
movq %rdx, %r10
imulq %rdi, %r10
shlq $0x4, %r10
movq %r8, 0x118(%rsp)
movq 0x10(%r15), %r8
movq %r8, 0x10(%r12)
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x20(%rsp), %r13
movq 0x10(%r13), %r8
movq %r8, 0x28(%r12)
leaq (%r11,%r10), %r8
movups (%r13), %xmm0
movups %xmm0, 0x18(%r12)
movups (%r14), %xmm0
movups %xmm0, 0x38(%r12)
movq %rdi, 0x170(%rsp)
movl $0x0, %esi
movq %rsi, 0x178(%rsp)
movq %rbp, 0x180(%rsp)
movq %rdi, 0x188(%rsp)
movq %rax, 0x190(%rsp)
movq %rdi, 0x1a0(%rsp)
movq %r8, 0x1a8(%rsp)
movq %rbx, 0x1b8(%rsp)
movq %r11, 0x1c0(%rsp)
movq 0x58(%rsp), %rsi
movq %rsi, 0x1d0(%rsp)
movq 0x10(%r15), %rsi
movq %rsi, 0xc0(%r12)
movups (%r15), %xmm0
movups %xmm0, 0xb0(%r12)
movq 0x10(%r13), %rsi
movq %rsi, 0xd8(%r12)
testq %rcx, %rcx
sete %sil
addq %rcx, %r9
addq %r10, %r9
movups (%r13), %xmm0
movups %xmm0, 0xc8(%r12)
movupd (%r14), %xmm0
movq %r9, 0x78(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq %rbx, 0x88(%rsp)
orq %rcx, %rbx
movupd %xmm0, 0xe8(%r12)
movq %rdi, 0x220(%rsp)
setns %cl
orb %sil, %cl
movq %rbp, 0x228(%rsp)
movl $0x0, %ecx
movq %rcx, 0x230(%rsp)
movl $0x1, %ecx
movq %rcx, 0x238(%rsp)
movq %rdx, 0x248(%rsp)
movq %rcx, 0x250(%rsp)
je 0x156f5
movq 0x10(%r15), %rcx
leaq 0x90(%rsp), %rdi
movq %rcx, 0x10(%rdi)
movups (%r15), %xmm0
movups %xmm0, (%rdi)
movq 0x10(%r13), %rcx
movq %rcx, 0x28(%rdi)
movups (%r13), %xmm0
movups %xmm0, 0x18(%rdi)
movq 0x8(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq %rcx, 0x48(%rdi)
movupd (%rsi), %xmm0
movupd %xmm0, 0x38(%rdi)
movq %rax, 0xe0(%rsp)
movq %rdx, 0xe8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
leaq 0x7(%rsp), %rcx
leaq 0x6(%rsp), %r8
callq 0x15919
movq 0x40(%rsp), %r14
movq 0x50(%rsp), %r13
incq %rbp
decq 0x28(%rsp)
addq $0x10, 0x30(%rsp)
incq %r13
cmpq 0x68(%rsp), %rbp
movq 0x60(%rsp), %r8
jne 0x14fa5
jmp 0x15634
movq $-0x1, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8ac0(%rip), %rdi      # 0x1e112
leaq 0x8b63(%rip), %rsi      # 0x1e1bc
leaq 0xea4b(%rip), %rcx      # 0x240ab
jmp 0x1568e
leaq 0x8928(%rip), %rdi      # 0x1df91
leaq 0x89c8(%rip), %rsi      # 0x1e038
leaq 0xe936(%rip), %rcx      # 0x23fad
jmp 0x156cc
leaq 0x8a92(%rip), %rdi      # 0x1e112
leaq 0x8b35(%rip), %rsi      # 0x1e1bc
leaq 0xec71(%rip), %rcx      # 0x242ff
movl $0xaf, %edx
callq 0x31b0
leaq 0xd8f3(%rip), %rdi      # 0x22f92
leaq 0x8992(%rip), %rsi      # 0x1e038
leaq 0xeb0e(%rip), %rcx      # 0x241bb
movl $0x93, %edx
callq 0x31b0
leaq 0x88d3(%rip), %rdi      # 0x1df91
leaq 0x8973(%rip), %rsi      # 0x1e038
leaq 0xed6d(%rip), %rcx      # 0x24439
movl $0x7a, %edx
callq 0x31b0
leaq 0x6c2f(%rip), %rdi      # 0x1c30c
leaq 0x6cbd(%rip), %rsi      # 0x1c3a1
leaq 0xf0cb(%rip), %rcx      # 0x247b6
movl $0x4a, %edx
callq 0x31b0
leaq 0x8a16(%rip), %rdi      # 0x1e112
leaq 0x8ab9(%rip), %rsi      # 0x1e1bc
leaq 0xfb66(%rip), %rcx      # 0x25270
jmp 0x1568e
leaq 0x89ff(%rip), %rdi      # 0x1e112
leaq 0x8aa2(%rip), %rsi      # 0x1e1bc
leaq 0xf2f0(%rip), %rcx      # 0x24a11
jmp 0x1568e
leaq 0xd865(%rip), %rdi      # 0x22f92
leaq 0x8904(%rip), %rsi      # 0x1e038
leaq 0xf1aa(%rip), %rcx      # 0x248e5
jmp 0x156ad
leaq 0x89cb(%rip), %rdi      # 0x1e112
leaq 0x8a6e(%rip), %rsi      # 0x1e1bc
leaq 0xedd9(%rip), %rcx      # 0x2452e
jmp 0x1568e