// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/multitableiterator/collectioniterator_impl.h
// Function: hm3::multitableiterator::CollectionIterator<std::vector<hm3::SkipList, std::allocator<hm3::SkipList>>>::dereference_() const
const Pair &CollectionIterator<CONTAINER>::dereference_() const{
	std::vector<size_type>	indexes;
	const Pair		*cpair = nullptr;

	// step 1: find first minimal add other minimals into index
	for(size_type i = 0; i < it_.size(); ++i){
		const Pair &pair = *it_[i];

		// skip if is null
		if ( ! pair )
			continue;

		// initialize
		if (cpair == nullptr){
			indexes.clear();
			indexes.push_back(i);
			cpair = &pair;

			continue;
		}

		int const cmp = pair.cmp(*cpair);

		// if is smaller, start over
		if (cmp < 0){
			indexes.clear();
			indexes.push_back(i);
			cpair = &pair;

			continue;
		}

		// same, add to list.
		if (cmp == 0){
			indexes.push_back(i);

			// if newer, swap
			if ( pair.cmpTime(*cpair) > 0 )
				cpair = &pair;
		}
	}

	// SETTING MUTABLE VARIABLES
	if (cpair){
		tmp_pair = cpair;
		tmp_index = std::move(indexes);

		return *tmp_pair;
	}else{
		tmp_pair = cpair;

		return Pair::zero();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x8796
xorl %r12d, %r12d
leaq 0x8ed1(%rip), %r14      # 0x114e8
leaq 0x20(%rsp), %r15
xorl %ecx, %ecx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rbp
leaq (%rax,%rcx), %rsi
addq $0x8, %rsi
movq %rbp, %rdi
callq 0xa632
movq %r14, %r13
testb %al, %al
jne 0x8648
movq %rbp, %rdi
callq 0xa62e
movq %rax, %r13
cmpq $0x0, (%r13)
je 0x86fc
testq %r12, %r12
je 0x869e
movq %r12, %rdi
callq 0xac00
movq %r13, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xac74
testl %eax, %eax
js 0x86cb
jne 0x86fc
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x8732
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x873d
movq (%rsp), %rax
movq 0x8(%rsp), %rsi
cmpq %rax, %rsi
je 0x86b4
movq %rax, 0x8(%rsp)
movq %rax, %rsi
cmpq 0x10(%rsp), %rsi
jne 0x86e8
movq %rsp, %rdi
movq %r15, %rdx
callq 0x87f4
movq %r13, %r12
jmp 0x86fc
movq (%rsp), %rax
movq 0x8(%rsp), %rsi
cmpq %rax, %rsi
je 0x86e1
movq %rax, 0x8(%rsp)
movq %rax, %rsi
cmpq 0x10(%rsp), %rsi
je 0x8722
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
movq %r13, %r12
movq 0x20(%rsp), %rcx
incq %rcx
movq %rcx, 0x20(%rsp)
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %rdx, %rcx
jb 0x861e
jmp 0x8751
movq %rsp, %rdi
movq %r15, %rdx
callq 0x87f4
movq %r13, %r12
jmp 0x86fc
movq %rsp, %rdi
movq %r15, %rdx
callq 0x87f4
movq %r13, %rdi
movq %r12, %rsi
callq 0xacb8
testl %eax, %eax
jg 0x86f9
movq %r12, %r13
jmp 0x86f9
testq %r12, %r12
je 0x8796
movq %r12, 0x20(%rbx)
movq 0x28(%rbx), %rdi
movq 0x38(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x87cd
subq %rdi, %rsi
callq 0x2190
movq 0x20(%rbx), %r12
jmp 0x87a5
movq $0x0, 0x20(%rbx)
leaq 0x8d43(%rip), %r12      # 0x114e8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x87bb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
jmp 0x87a9
jmp 0x87d3
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x87ec
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2240