// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %edx, %r12d
movl $0x0, 0x4(%rsp)
movslq %edx, %rax
movq %rax, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movl %r12d, %eax
subl %esi, %eax
jle 0x6aa1e
leal (%r12,%rsi), %edx
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
sarl %r8d
movq 0x18(%rdi), %r14
movslq %esi, %rdx
movsd (%r14,%rdx,8), %xmm0
movslq %r8d, %r15
movsd (%r14,%r15,8), %xmm1
testb %bpl, %bpl
je 0x6a843
ucomisd %xmm1, %xmm0
movq 0x8(%rsp), %r13
jbe 0x6a7f6
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%r15,8)
testb %bl, %bl
je 0x6a7f6
movq 0x18(%rcx), %r8
movl (%r8,%rdx,4), %r9d
movl (%r8,%r15,4), %r10d
movl %r10d, (%r8,%rdx,4)
movl %r9d, (%r8,%r15,4)
movsd (%r14,%r15,8), %xmm0
movsd (%r14,%r13,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6a82c
movsd %xmm0, (%r14,%r13,8)
movsd %xmm1, (%r14,%r15,8)
testb %bl, %bl
je 0x6a82c
movq 0x18(%rcx), %r8
movl (%r8,%r13,4), %r9d
movl (%r8,%r15,4), %r10d
movl %r10d, (%r8,%r13,4)
movl %r9d, (%r8,%r15,4)
movsd (%r14,%rdx,8), %xmm0
movsd (%r14,%r15,8), %xmm1
ucomisd %xmm1, %xmm0
ja 0x6a8ba
jmp 0x6a8de
ucomisd %xmm0, %xmm1
movq 0x8(%rsp), %r13
jbe 0x6a872
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%r15,8)
testb %bl, %bl
je 0x6a872
movq 0x18(%rcx), %r8
movl (%r8,%rdx,4), %r9d
movl (%r8,%r15,4), %r10d
movl %r10d, (%r8,%rdx,4)
movl %r9d, (%r8,%r15,4)
movsd (%r14,%r15,8), %xmm0
movsd (%r14,%r13,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x6a8a8
movsd %xmm0, (%r14,%r13,8)
movsd %xmm1, (%r14,%r15,8)
testb %bl, %bl
je 0x6a8a8
movq 0x18(%rcx), %r8
movl (%r8,%r13,4), %r9d
movl (%r8,%r15,4), %r10d
movl %r10d, (%r8,%r13,4)
movl %r9d, (%r8,%r15,4)
movsd (%r14,%rdx,8), %xmm0
movsd (%r14,%r15,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x6a8de
movsd %xmm1, (%r14,%rdx,8)
movsd %xmm0, (%r14,%r15,8)
testb %bl, %bl
je 0x6a8de
movq 0x18(%rcx), %r10
movl (%r10,%rdx,4), %r8d
movl (%r10,%r15,4), %r9d
movl %r9d, (%r10,%rdx,4)
movl %r8d, (%r10,%r15,4)
cmpl $0x3, %eax
jl 0x6aa1e
movq 0x18(%rdi), %rax
movsd (%rax,%r15,8), %xmm0
movq 0x18(%rcx), %r15
movl %esi, %r13d
movl %r12d, %edx
testb %bpl, %bpl
je 0x6a96e
movl %esi, %r13d
movl %r12d, %edx
movslq %r13d, %r14
decq %r14
movsd 0x8(%rax,%r14,8), %xmm1
incq %r14
incl %r13d
ucomisd %xmm1, %xmm0
ja 0x6a90c
leal -0x1(%r13), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%rax,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm0, %xmm2
ja 0x6a929
cmpq %r8, %r14
jle 0x6a947
incl %edx
movl %r9d, %r13d
jmp 0x6a967
testb %bl, %bl
je 0x6a95b
movl (%r15,%r14,4), %r9d
movl (%r15,%r8,4), %r10d
movl %r10d, (%r15,%r14,4)
movl %r9d, (%r15,%r8,4)
movsd %xmm2, (%rax,%r14,8)
movsd %xmm1, (%rax,%r8,8)
cmpl %edx, %r13d
jle 0x6a906
jmp 0x6a9d4
movslq %r13d, %r14
decq %r14
movsd 0x8(%rax,%r14,8), %xmm1
incq %r14
incl %r13d
ucomisd %xmm0, %xmm1
ja 0x6a974
leal -0x1(%r13), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%rax,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm2, %xmm0
ja 0x6a991
cmpq %r8, %r14
jle 0x6a9af
incl %edx
movl %r9d, %r13d
jmp 0x6a9cf
testb %bl, %bl
je 0x6a9c3
movl (%r15,%r14,4), %r9d
movl (%r15,%r8,4), %r10d
movl %r10d, (%r15,%r14,4)
movl %r9d, (%r15,%r8,4)
movsd %xmm2, (%rax,%r14,8)
movsd %xmm1, (%rax,%r8,8)
cmpl %edx, %r13d
jle 0x6a96e
cmpl %esi, %edx
jle 0x6aa02
movzbl %bpl, %r8d
movzbl %bl, %r9d
movq %rdi, %r12
movl %ebp, %r14d
movq %rcx, %rbp
movq %r11, %r15
callq 0x6a764
movq %r15, %r11
movq %rbp, %rcx
movl %r14d, %ebp
movq %r12, %rdi
movq 0x10(%rsp), %r12
cmpl %r12d, %r13d
jge 0x6aa1e
testb $0x1, 0x4(%rsp)
cmoveq %rdi, %r11
movb $0x1, %al
movl %eax, 0x4(%rsp)
movl %r13d, %esi
jmp 0x6a790
testb $0x1, 0x4(%rsp)
cmovneq %r11, %rdi
movq %rdi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop