// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl %edx, %esi
jge 0x67b69
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)
leal (%rsi,%r15), %eax
movl %eax, %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
sarl %r8d
movq 0x18(%rdi), %rax
movslq %esi, %rdx
movsd (%rax,%rdx,8), %xmm1
movslq %r8d, %r11
movsd (%rax,%r11,8), %xmm0
testb %bpl, %bpl
je 0x678f7
ucomisd %xmm0, %xmm1
jbe 0x67942
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm1, (%rax,%r11,8)
testb %bl, %bl
je 0x679b2
movq 0x18(%rcx), %r10
movl (%r10,%rdx,4), %r8d
movl (%r10,%r11,4), %r9d
movl %r9d, (%r10,%rdx,4)
movl %r8d, (%r10,%r11,4)
movsd (%rax,%r13,8), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x679e6
movsd %xmm1, (%rax,%r13,8)
movsd %xmm2, (%rax,%r11,8)
jmp 0x6796a
ucomisd %xmm1, %xmm0
jbe 0x6797c
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm1, (%rax,%r11,8)
testb %bl, %bl
je 0x679cc
movq 0x18(%rcx), %r10
movl (%r10,%rdx,4), %r8d
movl (%r10,%r11,4), %r9d
movl %r9d, (%r10,%rdx,4)
movl %r8d, (%r10,%r11,4)
movsd (%rax,%r13,8), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x679f7
movsd %xmm1, (%rax,%r13,8)
movsd %xmm2, (%rax,%r11,8)
jmp 0x679a0
movsd (%rax,%r13,8), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x679ea
movsd %xmm0, (%rax,%r13,8)
movsd %xmm2, (%rax,%r11,8)
testb %bl, %bl
je 0x67976
movq 0x18(%rcx), %r10
movl (%r10,%r11,4), %r8d
movl (%r10,%r13,4), %r9d
movl %r8d, (%r10,%r13,4)
movl %r9d, (%r10,%r11,4)
movapd %xmm2, %xmm0
jmp 0x679ea
movsd (%rax,%r13,8), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x679fb
movsd %xmm0, (%rax,%r13,8)
movsd %xmm2, (%rax,%r11,8)
testb %bl, %bl
je 0x679ac
movq 0x18(%rcx), %r10
movl (%r10,%r11,4), %r8d
movl (%r10,%r13,4), %r9d
movl %r8d, (%r10,%r13,4)
movl %r9d, (%r10,%r11,4)
movapd %xmm2, %xmm0
jmp 0x679fb
movsd (%rax,%r13,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x679e6
movsd %xmm1, (%rax,%r13,8)
movsd %xmm0, (%rax,%r11,8)
jmp 0x679ea
movsd (%rax,%r13,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x679f7
movsd %xmm1, (%rax,%r13,8)
movsd %xmm0, (%rax,%r11,8)
jmp 0x679fb
movapd %xmm1, %xmm0
movsd (%rax,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
ja 0x67a06
jmp 0x67a29
movapd %xmm1, %xmm0
movsd (%rax,%rdx,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x67a29
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm1, (%rax,%r11,8)
testb %bl, %bl
je 0x67a29
movq 0x18(%rcx), %r10
movl (%r10,%rdx,4), %r8d
movl (%r10,%r11,4), %r9d
movl %r9d, (%r10,%rdx,4)
movl %r8d, (%r10,%r11,4)
movl %r15d, %edx
subl %esi, %edx
cmpl $0x3, %edx
jl 0x67b5b
movsd (%rax,%r11,8), %xmm0
movq 0x18(%rcx), %r14
movl %esi, %r12d
movl %r15d, %edx
testb %bpl, %bpl
je 0x67abb
movl %esi, %r12d
movl %r15d, %edx
movslq %r12d, %r11
decq %r11
movsd 0x8(%rax,%r11,8), %xmm1
incq %r11
incl %r12d
ucomisd %xmm1, %xmm0
ja 0x67a58
leal -0x1(%r12), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%rax,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm0, %xmm2
ja 0x67a76
cmpq %r8, %r11
jle 0x67a94
incl %edx
movl %r9d, %r12d
jmp 0x67ab4
testb %bl, %bl
je 0x67aa8
movl (%r14,%r11,4), %r9d
movl (%r14,%r8,4), %r10d
movl %r10d, (%r14,%r11,4)
movl %r9d, (%r14,%r8,4)
movsd %xmm2, (%rax,%r11,8)
movsd %xmm1, (%rax,%r8,8)
cmpl %edx, %r12d
jle 0x67a52
jmp 0x67b22
movslq %r12d, %r11
decq %r11
movsd 0x8(%rax,%r11,8), %xmm1
incq %r11
incl %r12d
ucomisd %xmm0, %xmm1
ja 0x67ac1
leal -0x1(%r12), %r9d
movslq %edx, %r8
incq %r8
movsd -0x8(%rax,%r8,8), %xmm2
decq %r8
decl %edx
ucomisd %xmm2, %xmm0
ja 0x67adf
cmpq %r8, %r11
jle 0x67afd
incl %edx
movl %r9d, %r12d
jmp 0x67b1d
testb %bl, %bl
je 0x67b11
movl (%r14,%r11,4), %r9d
movl (%r14,%r8,4), %r10d
movl %r10d, (%r14,%r11,4)
movl %r9d, (%r14,%r8,4)
movsd %xmm2, (%rax,%r11,8)
movsd %xmm1, (%rax,%r8,8)
cmpl %edx, %r12d
jle 0x67abb
cmpl %esi, %edx
jle 0x67b4f
movzbl %bpl, %r8d
movzbl %bl, %r9d
movl %ebp, %r15d
movq %rcx, %rbp
movq %r13, %r14
movq %rdi, %r13
callq 0x6785a
movq %r13, %rdi
movq %r14, %r13
movq %rbp, %rcx
movl %r15d, %ebp
movq (%rsp), %r15
movl %r12d, %esi
cmpl %r15d, %r12d
jl 0x6787d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movq %rdi, %rax
retq
nop