// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::invert(bool)
CImg<T>& invert(const bool use_LU=true) {
      if (_width!=_height || _depth!=1 || _spectrum!=1)
        throw CImgInstanceException(_cimg_instance
                                    "invert(): Instance is not a square matrix.",
                                    cimg_instance);
#ifdef cimg_use_lapack
      int INFO = (int)use_LU, N = _width, LWORK = 4*N, *const IPIV = new int[N];
      Tfloat
        *const lapA = new Tfloat[N*N],
        *const WORK = new Tfloat[LWORK];
      cimg_forXY(*this,k,l) lapA[k*N+l] = (Tfloat)((*this)(k,l));
      cimg::getrf(N,lapA,IPIV,INFO);
      if (INFO)
        cimg::warn(_cimg_instance
                   "invert(): LAPACK function dgetrf_() returned error code %d.",
                   cimg_instance,
                   INFO);
      else {
        cimg::getri(N,lapA,IPIV,WORK,LWORK,INFO);
        if (INFO)
          cimg::warn(_cimg_instance
                     "invert(): LAPACK function dgetri_() returned error code %d.",
                     cimg_instance,
                     INFO);
      }
      if (!INFO) cimg_forXY(*this,k,l) (*this)(k,l) = (T)(lapA[k*N+l]); else fill(0);
      delete[] IPIV; delete[] lapA; delete[] WORK;
#else
      const double dete = _width>3?-1.0:det();
      if (dete!=0.0 && _width==2) {
        const double
          a = _data[0], c = _data[1],
          b = _data[2], d = _data[3];
        _data[0] = (T)(d/dete); _data[1] = (T)(-c/dete);
        _data[2] = (T)(-b/dete); _data[3] = (T)(a/dete);
      } else if (dete!=0.0 && _width==3) {
        const double
          a = _data[0], d = _data[1], g = _data[2],
          b = _data[3], e = _data[4], h = _data[5],
          c = _data[6], f = _data[7], i = _data[8];
        _data[0] = (T)((i*e-f*h)/dete), _data[1] = (T)((g*f-i*d)/dete), _data[2] = (T)((d*h-g*e)/dete);
        _data[3] = (T)((h*c-i*b)/dete), _data[4] = (T)((i*a-c*g)/dete), _data[5] = (T)((g*b-a*h)/dete);
        _data[6] = (T)((b*f-e*c)/dete), _data[7] = (T)((d*c-a*f)/dete), _data[8] = (T)((a*e-d*b)/dete);
      } else {
        if (use_LU) { // LU-based inverse computation
          CImg<Tfloat> A(*this), indx, col(1,_width);
          bool d;
          A._LU(indx,d);
          cimg_forX(*this,j) {
            col.fill(0);
            col(j) = 1;
            col._solve(A,indx);
            cimg_forX(*this,i) (*this)(j,i) = (T)col(i);
          }
        } else { // SVD-based inverse computation
          CImg<Tfloat> U(_width,_width), S(1,_width), V(_width,_width);
          SVD(U,S,V,false);
          U.transpose();
          cimg_forY(S,k) if (S[k]!=0) S[k]=1/S[k];
          S.diagonal();
          *this = V*S*U;
        }
      }
#endif
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movl (%rdi), %edx
cmpl 0x4(%rdi), %edx
jne 0x785b
cmpl $0x1, 0x8(%rbx)
jne 0x785b
cmpl $0x1, 0xc(%rbx)
jne 0x785b
movl %esi, %ebp
cmpl $0x3, %edx
jbe 0x7513
testb %bpl, %bpl
je 0x7582
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x8a36
movq $0x0, 0x38(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movb $0x0, 0x30(%rsp)
movl (%rbx), %edx
movq %rsp, %rdi
movl $0x1, %esi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x8666
leaq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x65532
cmpl $0x0, (%rbx)
jle 0x74c9
xorl %r13d, %r13d
movabsq $0x3ff0000000000000, %rbp # imm = 0x3FF0000000000000
movq %rsp, %r14
leaq 0x48(%rsp), %r15
leaq 0x20(%rsp), %r12
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
sete %dl
movl (%rsp), %ecx
movl 0x4(%rsp), %eax
testl %ecx, %ecx
sete %sil
orb %dl, %sil
testl %eax, %eax
sete %r8b
movl 0x8(%rsp), %edx
testl %edx, %edx
sete %r9b
orb %r8b, %r9b
orb %sil, %r9b
movl 0xc(%rsp), %esi
testl %esi, %esi
sete %r8b
orb %r9b, %r8b
jne 0x747d
movl %ecx, %ecx
movl %eax, %eax
imulq %rcx, %rax
movl %edx, %ecx
movl %esi, %edx
imulq %rcx, %rdx
imulq %rax, %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x4290
movq 0x18(%rsp), %rdi
movq %rbp, (%rdi,%r13,8)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x658c2
movslq (%rbx), %rax
testq %rax, %rax
jle 0x74bd
movq 0x18(%rsp), %rcx
movq 0x18(%rbx), %rdx
movl %r13d, %esi
xorl %edi, %edi
movsd (%rcx,%rdi,8), %xmm0
movl %esi, %r8d
movsd %xmm0, (%rdx,%r8,8)
incq %rdi
addl %eax, %esi
cmpq %rdi, %rax
jne 0x74a5
incq %r13
cmpq %rax, %r13
jl 0x7419
cmpb $0x0, 0x10(%rsp)
jne 0x74df
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x74df
callq 0x4690
cmpb $0x0, 0x30(%rsp)
jne 0x74f5
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x74f5
callq 0x4690
cmpb $0x0, 0x58(%rsp)
jne 0x7846
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7846
jmp 0x76f4
movq %rbx, %rdi
callq 0x652ae
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl (%rbx), %edx
setp %al
setne %cl
orb %al, %cl
cmpl $0x2, %edx
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x76fe
movq 0x18(%rbx), %rax
movapd 0x66b77(%rip), %xmm1    # 0x6e0c0
movsd 0x8(%rax), %xmm2
movsd 0x10(%rax), %xmm3
movsd 0x18(%rax), %xmm4
xorpd %xmm1, %xmm2
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
xorpd %xmm1, %xmm3
movhpd (%rax), %xmm3           # xmm3 = xmm3[0],mem[0]
divpd %xmm0, %xmm4
movupd %xmm4, (%rax)
divpd %xmm0, %xmm3
movupd %xmm3, 0x10(%rax)
jmp 0x7846
leaq 0x48(%rsp), %rdi
movl %edx, %esi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x8666
movl (%rbx), %edx
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x8666
movl (%rbx), %edx
movq %rsp, %rdi
movl %edx, %esi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x8666
leaq 0x48(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
xorpd %xmm0, %xmm0
movq %rbx, %rdi
xorl %r8d, %r8d
movl $0x28, %r9d
callq 0x659e4
leaq 0x48(%rsp), %rdi
callq 0x66fbc
movslq 0x24(%rsp), %rax
testq %rax, %rax
jle 0x7637
movq 0x38(%rsp), %rcx
xorl %edx, %edx
xorpd %xmm0, %xmm0
movsd 0x669fb(%rip), %xmm1    # 0x6e010
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x7622
jnp 0x762f
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
movsd %xmm3, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x7615
leaq 0x20(%rsp), %rdi
callq 0x67148
leaq 0x88(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x671b2
leaq 0x68(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x671b2
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x67336
cmpb $0x0, 0x78(%rsp)
jne 0x7693
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x7693
callq 0x4690
cmpb $0x0, 0x98(%rsp)
jne 0x76af
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x76af
callq 0x4690
cmpb $0x0, 0x10(%rsp)
jne 0x76c5
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x76c5
callq 0x4690
cmpb $0x0, 0x30(%rsp)
jne 0x76db
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x76db
callq 0x4690
cmpb $0x0, 0x58(%rsp)
jne 0x7846
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7846
callq 0x4690
jmp 0x7846
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
cmpl $0x3, %edx
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x739a
movq 0x18(%rbx), %rax
movsd (%rax), %xmm7
movsd 0x8(%rax), %xmm8
movupd 0x38(%rax), %xmm1
movsd 0x10(%rax), %xmm6
movapd %xmm1, %xmm9
shufpd $0x1, %xmm6, %xmm9      # xmm9 = xmm9[1],xmm6[0]
movapd %xmm0, %xmm3
unpcklpd %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
movupd 0x18(%rax), %xmm2
movupd 0x28(%rax), %xmm4
movapd %xmm4, %xmm10
unpcklpd %xmm8, %xmm10           # xmm10 = xmm10[0],xmm8[0]
mulpd %xmm1, %xmm10
movapd %xmm2, %xmm5
movapd %xmm2, %xmm11
shufpd $0x1, %xmm1, %xmm11     # xmm11 = xmm11[1],xmm1[0]
mulpd %xmm9, %xmm11
subpd %xmm10, %xmm11
divpd %xmm3, %xmm11
pshufd $0x4e, %xmm9, %xmm10    # xmm10 = xmm9[2,3,0,1]
pxor 0x66935(%rip), %xmm10   # 0x6e0c0
movupd %xmm11, (%rax)
movapd %xmm2, %xmm9
shufpd $0x1, %xmm2, %xmm9      # xmm9 = xmm9[1],xmm2[0]
mulpd %xmm10, %xmm9
movapd %xmm1, %xmm10
shufpd $0x1, %xmm2, %xmm10     # xmm10 = xmm10[1],xmm2[0]
movapd %xmm2, %xmm11
movapd %xmm2, %xmm12
unpcklpd %xmm8, %xmm12           # xmm12 = xmm12[0],xmm8[0]
mulsd %xmm8, %xmm2
unpcklpd %xmm4, %xmm8            # xmm8 = xmm8[0],xmm4[0]
mulpd %xmm4, %xmm8
addpd %xmm9, %xmm8
unpckhpd %xmm5, %xmm5            # xmm5 = xmm5[1,1]
divpd %xmm3, %xmm8
movupd %xmm8, 0x10(%rax)
movapd %xmm4, %xmm8
shufpd $0x1, %xmm7, %xmm8      # xmm8 = xmm8[1],xmm7[0]
shufpd $0x1, %xmm7, %xmm11     # xmm11 = xmm11[1],xmm7[0]
mulsd %xmm7, %xmm5
unpcklpd %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0]
unpcklpd %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0]
mulpd %xmm8, %xmm6
mulpd %xmm7, %xmm10
subpd %xmm6, %xmm10
divpd %xmm3, %xmm10
movupd %xmm10, 0x20(%rax)
movapd %xmm4, %xmm6
shufpd $0x1, %xmm1, %xmm6      # xmm6 = xmm6[1],xmm1[0]
mulpd %xmm6, %xmm11
movsd %xmm1, %xmm4            # xmm4 = xmm1[0],xmm4[1]
mulpd %xmm12, %xmm4
subpd %xmm11, %xmm4
divpd %xmm3, %xmm4
movupd %xmm4, 0x30(%rax)
subsd %xmm2, %xmm5
divsd %xmm0, %xmm5
movsd %xmm5, 0x40(%rax)
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x66fec(%rip), %rax     # 0x6e868
leaq 0x683bf(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x87889(%rip), %r11     # 0x8f11f
leaq 0x8b8d4(%rip), %rsi     # 0x93171
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xbfac
addq $0x20, %rsp
leaq 0xa037f(%rip), %rsi     # 0xa7c38
movq 0xa0710(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
cmpb $0x0, 0x78(%rsp)
jne 0x78e9
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x78e9
callq 0x4690
jmp 0x78e9
movq %rax, %rbx
cmpb $0x0, 0x98(%rsp)
jne 0x796a
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x796a
callq 0x4690
jmp 0x796a
jmp 0x7967
movq %rax, %rbx
jmp 0x7980
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x7931
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7931
callq 0x4690
jmp 0x7931
movq %rax, %rbx
jmp 0x7996
movq %rax, %rbx
cmpb $0x0, 0x30(%rsp)
jne 0x7947
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x7947
callq 0x4690
cmpb $0x0, 0x58(%rsp)
jne 0x79ac
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x79ac
jmp 0x79a7
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
jmp 0x79ac
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x7980
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7980
callq 0x4690
cmpb $0x0, 0x30(%rsp)
jne 0x7996
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x7996
callq 0x4690
cmpb $0x0, 0x58(%rsp)
jne 0x79ac
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x79ac
callq 0x4690
movq %rbx, %rdi
callq 0x4960