// File: /workspace/github_cpp_makefile_star2_O1/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: void pugi::impl::(anonymous namespace)::sort<pugi::xpath_node*, pugi::impl::(anonymous namespace)::duplicate_comparator>(pugi::xpath_node*, pugi::xpath_node*, pugi::impl::(anonymous namespace)::duplicate_comparator const&)
void sort(I begin, I end, const Pred& pred)
	{
		// sort large chunks
		while (end - begin > 16)
		{
			// find median element
			I middle = begin + (end - begin) / 2;
			I median = median3(begin, middle, end - 1, pred);

			// partition in three chunks (< = >)
			I eqbeg, eqend;
			partition3(begin, end, *median, pred, &eqbeg, &eqend);

			// loop on larger half
			if (eqbeg - begin > end - eqend)
			{
				sort(eqend, end, pred);
				end = eqbeg;
			}
			else
			{
				sort(begin, eqbeg, pred);
				begin = eqend;
			}
		}

		// insertion sort small chunk
		insertion_sort(begin, end, pred);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
cmpq $0x11, %rcx
jl 0x2f360
movq %r14, %rax
andq $-0x2, %rcx
leaq (%rbx,%rcx,8), %rdx
movq 0x8(%rdx), %rcx
movq 0x8(%rbx), %rsi
testq %rcx, %rcx
je 0x2f1a8
testq %rsi, %rsi
sete %dil
cmpq %rsi, %rcx
setb %cl
orb %dil, %cl
jmp 0x2f1bb
testq %rsi, %rsi
sete %sil
movq (%rbx), %rcx
cmpq %rcx, (%rdx)
setb %cl
andb %sil, %cl
testb %cl, %cl
movq %rbx, %rcx
cmovneq %rdx, %rcx
cmovneq %rbx, %rdx
leaq -0x10(%r14), %rsi
movq -0x8(%r14), %rdi
movq 0x8(%rdx), %r8
testq %rdi, %rdi
je 0x2f1ec
testq %r8, %r8
sete %r9b
cmpq %r8, %rdi
setb %dil
orb %r9b, %dil
jmp 0x2f200
testq %r8, %r8
sete %r8b
movq (%rdx), %rdi
cmpq %rdi, (%rsi)
setb %dil
andb %r8b, %dil
testb %dil, %dil
cmovneq %rsi, %rdx
movq 0x8(%rdx), %rsi
movq 0x8(%rcx), %rdi
testq %rsi, %rsi
je 0x2f227
testq %rdi, %rdi
sete %r8b
cmpq %rdi, %rsi
setb %sil
orb %r8b, %sil
jmp 0x2f23b
testq %rdi, %rdi
sete %dil
movq (%rcx), %rsi
cmpq %rsi, (%rdx)
setb %sil
andb %dil, %sil
testb %sil, %sil
cmovneq %rcx, %rdx
movq %rbx, %rcx
movq %r14, %r12
cmpq %r14, %rbx
jae 0x2f2e8
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
movq %r14, %r12
movq %rbx, %rdi
movq %rbx, %rcx
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x2f27d
testq %rdx, %rdx
sete %r10b
cmpq %rdx, %r8
setb %r9b
orb %r10b, %r9b
jmp 0x2f28e
testq %rdx, %rdx
sete %r10b
cmpq %rsi, (%rdi)
setb %r9b
andb %r10b, %r9b
testb %r9b, %r9b
je 0x2f299
addq $0x10, %rdi
jmp 0x2f2df
cmpq %rsi, (%rdi)
jne 0x2f2c1
cmpq %rdx, %r8
jne 0x2f2c1
movups (%rcx), %xmm0
movaps %xmm0, (%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rcx)
addq $0x10, %rcx
movaps (%rsp), %xmm0
movups %xmm0, (%rdi)
addq $0x10, %rdi
jmp 0x2f2df
movups (%rdi), %xmm0
movaps %xmm0, (%rsp)
movups -0x10(%r12), %xmm0
movups %xmm0, (%rdi)
movaps (%rsp), %xmm0
movups %xmm0, -0x10(%r12)
addq $-0x10, %r12
cmpq %r12, %rdi
jb 0x2f261
movq %rbx, %rdx
movq %r12, %r15
cmpq %rbx, %rcx
je 0x2f318
movups (%rdx), %xmm0
movaps %xmm0, (%rsp)
movups -0x10(%r15), %xmm0
movups %xmm0, (%rdx)
movaps (%rsp), %xmm0
movups %xmm0, -0x10(%r15)
addq $-0x10, %r15
addq $0x10, %rdx
cmpq %rcx, %rdx
jne 0x2f2f3
movq %r15, %rcx
subq %rbx, %rcx
subq %r12, %rax
cmpq %rax, %rcx
jle 0x2f336
movq %r12, %rdi
movq %r14, %rsi
callq 0x2f159
movq %r15, %r14
jmp 0x2f347
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2f159
movq %r14, %r15
movq %r12, %rbx
movq %r15, %rcx
subq %rbx, %rcx
sarq $0x4, %rcx
movq %r15, %rax
cmpq $0x10, %rcx
jg 0x2f181
jmp 0x2f363
movq %r14, %r15
cmpq %r15, %rbx
sete %al
leaq 0x10(%rbx), %rsi
cmpq %r15, %rsi
sete %cl
orb %al, %cl
jne 0x2f3e6
movq %rbx, %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
movq %rsi, %rax
cmpq %rbx, %rsi
jbe 0x2f3d6
movq %rax, %rdi
leaq -0x10(%rdi), %rsi
movq -0x8(%rdi), %r8
testq %rdx, %rdx
je 0x2f3ad
testq %r8, %r8
sete %r9b
cmpq %r8, %rdx
setb %r8b
orb %r9b, %r8b
jmp 0x2f3be
testq %r8, %r8
sete %r9b
cmpq (%rsi), %rcx
setb %r8b
andb %r9b, %r8b
testb %r8b, %r8b
je 0x2f3d3
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
cmpq %rbx, %rsi
ja 0x2f38d
jmp 0x2f3d6
movq %rdi, %rsi
movq %rcx, (%rsi)
movq %rdx, 0x8(%rsi)
leaq 0x10(%rax), %rsi
cmpq %r15, %rsi
jne 0x2f37a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq