// File: /workspace/github_cpp_makefile_star2_O1/mitchellsayer[P]FastPointCloudSegmentation/src/./nanoflann.hpp
// Function: nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, ScanlinePointCloud, float>, ScanlinePointCloud, 3, unsigned long>::planeSplit(unsigned long*, unsigned long, int, float&, unsigned long&, unsigned long&)
void planeSplit(IndexType* ind, const IndexType count, int cutfeat, DistanceType &cutval, IndexType& lim1, IndexType& lim2)
		{
			/* Move vector indices for left subtree to front of list. */
			IndexType left = 0;
			IndexType right = count-1;
			for (;; ) {
				while (left<=right && dataset_get(ind[left],cutfeat)<cutval) ++left;
				while (right && left<=right && dataset_get(ind[right],cutfeat)>=cutval) --right;
				if (left>right || !right) break;  // "!right" was added to support unsigned Index types
				std::swap(ind[left], ind[right]);
				++left;
				--right;
			}
			/* If either list is empty, it means that all remaining features
			 * are identical. Split in the middle to maintain a balanced tree.
			 */
			lim1 = left;
			right = count-1;
			for (;; ) {
				while (left<=right && dataset_get(ind[left],cutfeat)<=cutval) ++left;
				while (right && left<=right && dataset_get(ind[right],cutfeat)>cutval) --right;
				if (left>right || !right) break;  // "!right" was added to support unsigned Index types
				std::swap(ind[left], ind[right]);
				++left;
				--right;
			}
			lim2 = left;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rbp), %rax
decq %rdx
movq 0x20(%rdi), %r11
movss (%r8), %xmm0
xorl %r10d, %r10d
movq %rdx, %rbx
cmpq %rbx, %r10
ja 0x754c
movq (%rsi,%r10,8), %r14
cmpl $0x1, %ecx
je 0x7523
leaq (%r14,%r14,4), %r14
testl %ecx, %ecx
jne 0x7535
shlq $0x3, %r14
addq 0x8(%r11), %r14
jmp 0x7541
movq 0x8(%r11), %r15
leaq (%r14,%r14,4), %r14
leaq (%r15,%r14,8), %r14
addq $0x4, %r14
jmp 0x7541
movq 0x8(%r11), %r15
leaq (%r15,%r14,8), %r14
addq $0x8, %r14
ucomiss (%r14), %xmm0
jbe 0x754c
incq %r10
jmp 0x7503
testq %rbx, %rbx
setne %r14b
sete %r15b
cmpq %rbx, %r10
seta %r12b
orb %r15b, %r12b
jne 0x75c6
movq (%rsi,%rbx,8), %r15
cmpl $0x1, %ecx
je 0x757e
testl %ecx, %ecx
jne 0x7590
leaq (%r15,%r15,4), %r15
shlq $0x3, %r15
addq 0x8(%r11), %r15
jmp 0x75a0
movq 0x8(%r11), %r12
leaq (%r15,%r15,4), %r15
leaq (%r12,%r15,8), %r15
addq $0x4, %r15
jmp 0x75a0
movq 0x8(%r11), %r12
leaq (%r15,%r15,4), %r15
leaq (%r12,%r15,8), %r15
addq $0x8, %r15
movss (%r15), %xmm1
ucomiss %xmm0, %xmm1
jb 0x75c6
leaq -0x1(%rbx), %r15
cmpq $0x1, %rbx
setne %r14b
cmpq %r15, %r10
ja 0x75c9
cmpq $0x1, %rbx
movq %r15, %rbx
jne 0x7563
jmp 0x75c9
movq %rbx, %r15
cmpq %r15, %r10
ja 0x75f2
testb $0x1, %r14b
je 0x75f2
movq (%rsi,%r10,8), %rbx
movq (%rsi,%r15,8), %r14
movq %r14, (%rsi,%r10,8)
movq %rbx, (%rsi,%r15,8)
incq %r10
decq %r15
movq %r15, %rbx
jmp 0x7503
movq %r10, (%r9)
movq 0x20(%rdi), %rdi
movss (%r8), %xmm0
cmpq %rdx, %r10
ja 0x7647
movq (%rsi,%r10,8), %r8
cmpl $0x1, %ecx
je 0x761e
leaq (%r8,%r8,4), %r8
testl %ecx, %ecx
jne 0x7630
shlq $0x3, %r8
addq 0x8(%rdi), %r8
jmp 0x763c
movq 0x8(%rdi), %r9
leaq (%r8,%r8,4), %r8
leaq (%r9,%r8,8), %r8
addq $0x4, %r8
jmp 0x763c
movq 0x8(%rdi), %r9
leaq (%r9,%r8,8), %r8
addq $0x8, %r8
ucomiss (%r8), %xmm0
jb 0x7647
incq %r10
jmp 0x75fe
testq %rdx, %rdx
setne %r8b
cmpq %rdx, %r10
ja 0x76bb
testq %rdx, %rdx
je 0x76bb
movq (%rsi,%rdx,8), %r9
cmpl $0x1, %ecx
je 0x7673
testl %ecx, %ecx
jne 0x7685
leaq (%r9,%r9,4), %r9
shlq $0x3, %r9
addq 0x8(%rdi), %r9
jmp 0x7695
movq 0x8(%rdi), %r11
leaq (%r9,%r9,4), %r9
leaq (%r11,%r9,8), %r9
addq $0x4, %r9
jmp 0x7695
movq 0x8(%rdi), %r11
leaq (%r9,%r9,4), %r9
leaq (%r11,%r9,8), %r9
addq $0x8, %r9
movss (%r9), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x76bb
leaq -0x1(%rdx), %r9
cmpq $0x1, %rdx
setne %r8b
cmpq %r9, %r10
ja 0x76be
cmpq $0x1, %rdx
movq %r9, %rdx
jne 0x7658
jmp 0x76be
movq %rdx, %r9
cmpq %r9, %r10
ja 0x76e7
testb $0x1, %r8b
je 0x76e7
movq (%rsi,%r10,8), %rdx
movq (%rsi,%r9,8), %r8
movq %r8, (%rsi,%r10,8)
movq %rdx, (%rsi,%r9,8)
incq %r10
decq %r9
movq %r9, %rdx
jmp 0x75fe
movq %r10, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq