// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ed8a
movq %r14, %rax
andq $-0x2, %rcx
leaq (%rbx,%rcx,8), %rcx
movq 0x8(%rcx), %rsi
movq 0x8(%rbx), %rdx
testq %rsi, %rsi
je 0x2ebf8
testq %rdx, %rdx
je 0x2ec05
cmpq %rdx, %rsi
jb 0x2ec05
movq %rsi, %rdx
jmp 0x2ec0f
testq %rdx, %rdx
jne 0x2ec0d
movq (%rbx), %rsi
cmpq %rsi, (%rcx)
jae 0x2ec0d
movq %rcx, %rsi
movq %rbx, %rcx
jmp 0x2ec12
xorl %edx, %edx
movq %rbx, %rsi
leaq -0x10(%r14), %rdi
movq -0x8(%r14), %r8
testq %r8, %r8
je 0x2ec36
testq %rdx, %rdx
je 0x2ec43
cmpq %rdx, %r8
jb 0x2ec43
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
sete %r8b
jmp 0x2ec59
testq %rdx, %rdx
jne 0x2ec49
movq (%rcx), %r9
cmpq %r9, (%rdi)
jae 0x2ec49
movq %r8, %rdx
movq %rdi, %rcx
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
sete %r8b
testq %rdx, %rdx
je 0x2ec65
testb %r8b, %r8b
jne 0x2ec72
cmpq %rdi, %rdx
jae 0x2ec75
jmp 0x2ec72
testq %rdi, %rdi
jne 0x2ec75
movq (%rsi), %rdx
cmpq %rdx, (%rcx)
jae 0x2ec75
movq %rsi, %rcx
movq %r14, %r12
movq %r14, %r15
cmpq %r14, %rbx
jae 0x2ed3f
movq (%rcx), %rdx
movq 0x8(%rcx), %rsi
movq %r14, %r12
movq %rbx, %rdi
movq %rbx, %rcx
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x2ecac
testq %rsi, %rsi
je 0x2ecb9
cmpq %rsi, %r8
jb 0x2ecb9
movq (%rdi), %r9
jmp 0x2ecbf
movq (%rdi), %r9
testq %rsi, %rsi
jne 0x2ecbf
cmpq %rdx, %r9
jae 0x2ecbf
addq $0x10, %rdi
jmp 0x2ed05
cmpq %rdx, %r9
jne 0x2ece7
cmpq %rsi, %r8
jne 0x2ece7
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 0x2ed05
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 0x2ec94
movq %rbx, %rdx
movq %r12, %r15
cmpq %rbx, %rcx
je 0x2ed3c
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 0x2ed15
jmp 0x2ed3f
movq %r12, %r15
movq %r15, %rcx
subq %rbx, %rcx
subq %r12, %rax
cmpq %rax, %rcx
jle 0x2ed60
movq %r12, %rdi
movq %r14, %rsi
callq 0x2ebac
movq %r15, %rax
movq %r15, %r14
jmp 0x2ed74
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2ebac
movq %r12, %rbx
movq %r14, %rax
movq %r14, %r15
movq %rax, %rcx
subq %rbx, %rcx
sarq $0x4, %rcx
cmpq $0x10, %rcx
jg 0x2ebd4
jmp 0x2ed8d
movq %r14, %r15
cmpq %r15, %rbx
sete %al
leaq 0x10(%rbx), %rsi
cmpq %r15, %rsi
sete %cl
orb %al, %cl
jne 0x2edfd
movq %rbx, %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
movq %rsi, %rax
cmpq %rbx, %rsi
jbe 0x2eded
movq %rax, %rsi
movq %rsi, %rdi
addq $-0x10, %rsi
movq -0x8(%rdi), %r8
testq %rdx, %rdx
je 0x2edd3
testq %r8, %r8
je 0x2eddd
cmpq %r8, %rdx
jb 0x2eddd
jmp 0x2edea
testq %r8, %r8
jne 0x2edea
cmpq (%rsi), %rcx
jae 0x2edea
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
cmpq %rbx, %rsi
ja 0x2edb7
jmp 0x2eded
movq %rdi, %rsi
movq %rcx, (%rsi)
movq %rdx, 0x8(%rsi)
leaq 0x10(%rax), %rsi
cmpq %r15, %rsi
jne 0x2eda4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop