// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>& cimg_library::CImg<double>::_quicksort<int>(int, int, cimg_library::CImg<int>&, bool, bool)
CImg<T>& _quicksort(const int indm, const int indM, CImg<t>& permutations,
                        const bool is_increasing, const bool is_permutations) {
      if (indm<indM) {
        const int mid = (indm + indM)/2;
        if (is_increasing) {
          if ((*this)[indm]>(*this)[mid]) {
            cimg::swap((*this)[indm],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indm],permutations[mid]);
          }
          if ((*this)[mid]>(*this)[indM]) {
            cimg::swap((*this)[indM],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indM],permutations[mid]);
          }
          if ((*this)[indm]>(*this)[mid]) {
            cimg::swap((*this)[indm],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indm],permutations[mid]);
          }
        } else {
          if ((*this)[indm]<(*this)[mid]) {
            cimg::swap((*this)[indm],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indm],permutations[mid]);
          }
          if ((*this)[mid]<(*this)[indM]) {
            cimg::swap((*this)[indM],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indM],permutations[mid]);
          }
          if ((*this)[indm]<(*this)[mid]) {
            cimg::swap((*this)[indm],(*this)[mid]);
            if (is_permutations) cimg::swap(permutations[indm],permutations[mid]);
          }
        }
        if (indM - indm>=3) {
          const T pivot = (*this)[mid];
          int i = indm, j = indM;
          if (is_increasing) {
            do {
              while ((*this)[i]<pivot) ++i;
              while ((*this)[j]>pivot) --j;
              if (i<=j) {
                if (is_permutations) cimg::swap(permutations[i],permutations[j]);
                cimg::swap((*this)[i++],(*this)[j--]);
              }
            } while (i<=j);
          } else {
            do {
              while ((*this)[i]>pivot) ++i;
              while ((*this)[j]<pivot) --j;
              if (i<=j) {
                if (is_permutations) cimg::swap(permutations[i],permutations[j]);
                cimg::swap((*this)[i++],(*this)[j--]);
              }
            } while (i<=j);
          }
          if (indm<j) _quicksort(indm,j,permutations,is_increasing,is_permutations);
          if (i<indM) _quicksort(i,indM,permutations,is_increasing,is_permutations);
        }
      }
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %edx, %r15d
movslq %edx, %r13
movq %r15, (%rsp)
movl %r15d, %r11d
subl %esi, %r11d
jle 0x4e52b
leal (%rsi,%r15), %eax
cltd
pushq $0x2
popq %r8
idivl %r8d
movq 0x18(%rdi), %r14
movslq %esi, %rdx
movsd (%r14,%rdx,8), %xmm0
cltq
movsd (%r14,%rax,8), %xmm1
testb %bpl, %bpl
je 0x4e31f
ucomisd %xmm1, %xmm0
jbe 0x4e34b
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%rax,8)
testb %bl, %bl
je 0x4e34f
movq 0x18(%rcx), %r8
movl (%r8,%rdx,4), %r9d
movl (%r8,%rax,4), %r10d
movl %r10d, (%r8,%rdx,4)
movl %r9d, (%r8,%rax,4)
jmp 0x4e34f
ucomisd %xmm0, %xmm1
jbe 0x4e381
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%rax,8)
testb %bl, %bl
je 0x4e385
movq 0x18(%rcx), %r8
movl (%r8,%rdx,4), %r9d
movl (%r8,%rax,4), %r10d
movl %r10d, (%r8,%rdx,4)
movl %r9d, (%r8,%rax,4)
jmp 0x4e385
movapd %xmm1, %xmm0
movsd (%r14,%r13,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4e3b7
movsd %xmm0, (%r14,%r13,8)
movsd %xmm1, (%r14,%rax,8)
testb %bl, %bl
je 0x4e3bb
movq 0x18(%rcx), %r8
movl (%r8,%r13,4), %r9d
movl (%r8,%rax,4), %r10d
movl %r10d, (%r8,%r13,4)
movl %r9d, (%r8,%rax,4)
jmp 0x4e3bb
movapd %xmm1, %xmm0
movsd (%r14,%r13,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x4e3c9
movsd %xmm0, (%r14,%r13,8)
movsd %xmm1, (%r14,%rax,8)
testb %bl, %bl
je 0x4e3cd
movq 0x18(%rcx), %r8
movl (%r8,%r13,4), %r9d
movl (%r8,%rax,4), %r10d
movl %r10d, (%r8,%r13,4)
movl %r9d, (%r8,%rax,4)
jmp 0x4e3cd
movapd %xmm0, %xmm1
movsd (%r14,%rdx,8), %xmm0
ucomisd %xmm1, %xmm0
ja 0x4e3d9
jmp 0x4e3fd
movapd %xmm0, %xmm1
movsd (%r14,%rdx,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x4e3fd
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%rax,8)
testb %bl, %bl
je 0x4e3fd
movq 0x18(%rcx), %r8
movl (%r8,%rdx,4), %r9d
movl (%r8,%rax,4), %r10d
movl %r10d, (%r8,%rdx,4)
movl %r9d, (%r8,%rax,4)
cmpl $0x3, %r11d
jl 0x4e52b
movsd (%r14,%rax,8), %xmm0
movq 0x18(%rcx), %rax
movl %esi, %r12d
movl %r15d, %edx
testb %bpl, %bpl
je 0x4e48b
movl %esi, %r12d
movl %r15d, %edx
movslq %r12d, %r11
decq %r11
movsd 0x8(%r14,%r11,8), %xmm1
incq %r11
incl %r12d
ucomisd %xmm1, %xmm0
ja 0x4e428
leal -0x1(%r12), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%r14,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm0, %xmm2
ja 0x4e446
cmpq %r8, %r11
jle 0x4e464
incl %edx
movl %r9d, %r12d
jmp 0x4e484
testb %bl, %bl
je 0x4e478
movl (%rax,%r11,4), %r9d
movl (%rax,%r8,4), %r10d
movl %r10d, (%rax,%r11,4)
movl %r9d, (%rax,%r8,4)
movsd %xmm2, (%r14,%r11,8)
movsd %xmm1, (%r14,%r8,8)
cmpl %edx, %r12d
jle 0x4e422
jmp 0x4e4f2
movslq %r12d, %r11
decq %r11
movsd 0x8(%r14,%r11,8), %xmm1
incq %r11
incl %r12d
ucomisd %xmm0, %xmm1
ja 0x4e491
leal -0x1(%r12), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%r14,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm2, %xmm0
ja 0x4e4af
cmpq %r8, %r11
jle 0x4e4cd
incl %edx
movl %r9d, %r12d
jmp 0x4e4ed
testb %bl, %bl
je 0x4e4e1
movl (%rax,%r11,4), %r9d
movl (%rax,%r8,4), %r10d
movl %r10d, (%rax,%r11,4)
movl %r9d, (%rax,%r8,4)
movsd %xmm2, (%r14,%r11,8)
movsd %xmm1, (%r14,%r8,8)
cmpl %edx, %r12d
jle 0x4e48b
cmpl %esi, %edx
jle 0x4e51f
movzbl %bpl, %r8d
movzbl %bl, %r9d
movl %ebp, %r15d
movq %rcx, %rbp
movq %r13, %r14
movq %rdi, %r13
callq 0x4e2a6
movq %r13, %rdi
movq %r14, %r13
movq %rbp, %rcx
movl %r15d, %ebp
movq (%rsp), %r15
movl %r12d, %esi
cmpl %r15d, %r12d
jl 0x4e2c1
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop