LLM4Binary/decompile-bench-makefile huggingface dataset:
// 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>>>::CollectionIterator<bool>(std::vector<hm3::SkipList, std::allocator<hm3::SkipList>> const&, bool const&, std::nullptr_t)
CollectionIterator<CONTAINER>::CollectionIterator(const CONTAINER &list, const T &param, std::nullptr_t){
	it_.reserve(list.size());

	// CONTAINER is responsible for ordering the tables,
	// in correct (probably reverse) order.
	for(const auto &table : list)
		it_.push_back({ table, param });

	tmp_index.reserve(list.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
leaq 0x28(%rdi), %r13
sarq $0x3, %rsi
movabsq $-0xf4898d5f85bb395, %rax # imm = 0xF0B7672A07A44C6B
imulq %rax, %rsi
callq 0x8288
movq (%r15), %rbp
movq 0x8(%r15), %r14
cmpq %r14, %rbp
je 0x821c
movq %r13, (%rsp)
leaq 0x8(%rsp), %r13
cmpb $0x0, (%r12)
jne 0x81cf
movq 0x8(%rbp), %rax
jmp 0x81d1
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x81f8
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rbx)
jmp 0x8203
movq %rbx, %rdi
movq %r13, %rdx
callq 0x83e8
addq $0x218, %rbp            # imm = 0x218
cmpq %r14, %rbp
jne 0x81c2
movq (%r15), %rbp
movq 0x8(%r15), %rsi
movq (%rsp), %r13
jmp 0x821f
movq %rbp, %rsi
subq %rbp, %rsi
sarq $0x3, %rsi
movabsq $-0xf4898d5f85bb395, %rax # imm = 0xF0B7672A07A44C6B
imulq %rax, %rsi
movq %r13, %rdi
callq 0x8330
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, (%rsp)
jmp 0x8251
movq %rax, %r15
movq (%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x826c
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8280
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
movq %r15, %rdi
callq 0x2240
// 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>>>::operator==(hm3::multitableiterator::CollectionIterator<std::vector<hm3::SkipList, std::allocator<hm3::SkipList>>> const&) const
bool CollectionIterator<CONTAINER>::operator==(const CollectionIterator &other) const{
	if (it_.size() != other.it_.size())
		return false;

	// this seems to skip the loop faster
	if (ended_ || other.ended_)
		return true;

	for(size_type i = 0; i < it_.size(); ++i){
		if (it_[i] != other.it_[i])
			return false;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rcx
movq %rcx, %rax
subq %rdi, %rax
movq 0x8(%rsi), %rdx
subq (%rsi), %rdx
cmpq %rdx, %rax
jne 0x8599
movb $0x1, %al
cmpb $0x0, 0x18(%r14)
jne 0x859b
cmpq %rdi, %rcx
je 0x859b
movq %rsi, %rbx
cmpb $0x0, 0x18(%rsi)
jne 0x859b
xorl %r15d, %r15d
xorl %r12d, %r12d
addq %r15, %rdi
movq (%rbx), %rsi
addq %r15, %rsi
callq 0x85a8
testb %al, %al
jne 0x8595
incq %r12
movq (%r14), %rdi
movq 0x8(%r14), %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
addq $0x10, %r15
cmpq %rcx, %r12
jb 0x8569
xorb $0x1, %al
jmp 0x859b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/stlvectorlist.cc
// Function: hm3::STLVectorList::remove(StringRef const&)
bool STLVectorList::remove(const StringRef &key){
	size_type result;
	bool const found = binarySearch_(key, result);

	if (! found){
		// the key does not exists in the vector.
		return true;
	}

	// Fix size
	Pair & data = container_[ result ];
	dataSize_ -= data.getBytes();

	// This is slow, might shiftL
	auto ptr = container_.begin() + (difference_type) result;
	container_.erase(ptr);

	return true;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
movq $0x5, (%rsp)
leaq 0x17(%rsp), %r8
leaq 0x18(%rsp), %r9
xorl %esi, %esi
callq 0x9196
testb %al, %al
je 0x8ed1
movq 0x18(%rsp), %rdi
shlq $0x3, %rdi
addq (%rbx), %rdi
callq 0xad18
subq %rax, 0x18(%rbx)
movq 0x18(%rsp), %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
movq %rbx, %rdi
callq 0x928a
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/stlvectorlist.cc
// Function: bool hm3::STLVectorList::putT_<hm3::Pair>(hm3::Pair&&)
bool STLVectorList::putT_(UPAIR&& newdata){
	const StringRef &key = newdata.getKey();

	size_type result;
	bool const found = binarySearch_(key, result);

	if (found){
		// key exists, overwrite, do not shift

		Pair & olddata = container_[ result ];

		// check if the data in database is valid
		if (! newdata.valid(olddata) ){
			// newdata will be magically destroyed.
			return false;
		}

		dataSize_ = dataSize_
					- olddata.getBytes()
					+ newdata.getBytes();

		// copy assignment
		olddata = std::forward<UPAIR>(newdata);

		return true;
	}

	// key not exists
	dataSize_ += newdata.getBytes();

	try{
		if (result == container_.size()){
			// push_back micro-optimization :)
			container_.push_back(std::forward<UPAIR>(newdata));
		}else{
			// This is slow, might shiftR
			auto ptr = container_.cbegin() + (difference_type) result;
			container_.insert(ptr, std::forward<UPAIR>(newdata));
		}
	}catch(...){
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xac00
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq 0x18(%r14), %rdx
movq $0x5, (%rsp)
leaq 0x17(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %r14, %rdi
xorl %esi, %esi
callq 0x9196
testb %al, %al
je 0x8f6e
movq 0x18(%rsp), %r15
movq (%r14), %r12
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0xad04
testb %al, %al
je 0x8fb4
leaq (%r12,%r15,8), %r15
movq 0x18(%r14), %r12
movq %r15, %rdi
callq 0xad18
subq %rax, %r12
movq %rbx, %rdi
callq 0xad18
addq %r12, %rax
movq %rax, 0x18(%r14)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xab74
movb $0x1, %bpl
jmp 0x8fb4
movq %rbx, %rdi
callq 0xad18
addq %rax, 0x18(%r14)
movq 0x18(%rsp), %rax
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rax
jne 0x8fa2
movb $0x1, %bpl
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92f2
jmp 0x8fb4
leaq (%rcx,%rax,8), %rsi
movb $0x1, %bpl
movq %r14, %rdi
movq %rbx, %rdx
callq 0x956c
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8fc5
movq %rax, %rdi
callq 0x2070
callq 0x2210
xorl %ebp, %ebp
jmp 0x8fb4
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: hm3::VectorList::shiftR_(unsigned long)
bool VectorList::shiftR_(size_type const index){
	if (! resize_(1))
		return false;

	// LLVM static analyzer thinks this is an error,
	// so I add this unused branch
	if (buffer_){
		size_t const size = dataCount_ - index - 1;

		// this is the most slow operation of them all
		xmemmove(
			& buffer_[index + 1],
			& buffer_[index],
			size * ELEMENT_SIZE
		);
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %esi
callq 0x9a00
movl %eax, %ebx
testb %al, %al
je 0x97df
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x97df
movq %r14, %rdx
notq %rdx
addq 0x18(%r15), %rdx
leaq (%rax,%r14,8), %rsi
leaq (%rax,%r14,8), %rdi
addq $0x8, %rdi
shlq $0x3, %rdx
callq 0x2200
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: hm3::VectorList::clear_(bool)
void VectorList::clear_(bool const alsoFree){
	if (alsoFree && buffer_)
		xfree(buffer_);

	dataCount_	= 0;
	dataSize_	= 0;
	reservedCount_	= 0;
	buffer_		= nullptr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x9816
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x9816
callq 0x21b0
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: hm3::VectorList::removeAll()
bool VectorList::removeAll(){
	for(auto &p : ArrayRef<Pair>{ buffer_, dataCount_ } )
		p.~Pair();

	clear_(true);

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %rbx
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x9885
shlq $0x3, %r15
movq %rbx, %rdi
callq 0xab4c
addq $0x8, %rbx
addq $-0x8, %r15
jne 0x9870
movq (%r14), %rbx
testq %rbx, %rbx
je 0x9892
movq %rbx, %rdi
callq 0x21b0
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: hm3::VectorList::remove(StringRef const&)
bool VectorList::remove(const StringRef &key){
	size_type result;
	bool const found = binarySearch_(key, result);

	if (! found){
		// the key does not exists in the vector.
		return true;
	}

	// proceed with remove
	Pair & data = buffer_[result];
	dataSize_ -= data.getBytes();
	data.~Pair();

	shiftL_(result);

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
movq $0x5, (%rsp)
leaq 0xf(%rsp), %r8
leaq 0x10(%rsp), %r9
xorl %esi, %esi
callq 0x9ce3
testb %al, %al
je 0x99b9
movq 0x10(%rsp), %r14
shlq $0x3, %r14
addq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0xad18
subq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0xab4c
movq 0x10(%rsp), %rdx
movq 0x8(%rbx), %rax
leaq (%rax,%rdx,8), %rdi
leaq (%rax,%rdx,8), %rsi
addq $0x8, %rsi
notq %rdx
addq 0x18(%rbx), %rdx
shlq $0x3, %rdx
callq 0x2200
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x9a00
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: hm3::VectorList::resize_(int)
bool VectorList::resize_(int const delta){
	if (delta == 0){
		// already resized, done :)
		return true;
	}

	if (dataCount_ == 0 && delta < 0){
		// must be an error
		return true;
	}

	size_type const new_dataCount = dataCount_ + (size_type) sgn(delta);

	if (new_dataCount == 0){
		clear_(true);
		return true;
	}

	size_type const new_reservedCount = calcNewCount_(new_dataCount);

	if (reservedCount_ == new_reservedCount){
		// already resized, done :)
		dataCount_ = new_dataCount;

		return true;
	}

	Pair *new_buffer = (Pair *) xrealloc(buffer_, new_reservedCount * ELEMENT_SIZE);

	if (new_buffer == nullptr)
		return false;

	dataCount_	= new_dataCount;
	reservedCount_	= new_reservedCount;
	buffer_		= new_buffer;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bl
testl %esi, %esi
je 0x9aa5
movq %rdi, %r14
movq 0x18(%rdi), %r15
testq %r15, %r15
sete %al
testl %esi, %esi
sets %cl
testb %al, %cl
jne 0x9aa5
sarl $0x1f, %esi
orl $0x1, %esi
movslq %esi, %rax
addq %rax, %r15
je 0x9a5f
movq (%r14), %rcx
movq 0x10(%r14), %rsi
movq %r15, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r12
cmpq $0x1, %rdx
sbbq $-0x1, %r12
imulq %rcx, %r12
cmpq %r12, %rsi
jne 0x9a7f
movq %r15, 0x18(%r14)
jmp 0x9aa5
movq 0x8(%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
je 0x9a71
callq 0x21b0
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
jmp 0x9aa5
movq 0x8(%r14), %rdi
leaq (,%r12,8), %rsi
callq 0x2220
testq %rax, %rax
je 0x9aa3
movq %r15, 0x18(%r14)
movq %r12, 0x10(%r14)
movq %rax, 0x8(%r14)
jmp 0x9aa5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/vectorlist.cc
// Function: bool hm3::VectorList::putT_<hm3::Pair>(hm3::Pair&&)
bool VectorList::putT_(UPAIR&& newdata){
	const StringRef &key = newdata.getKey();

	size_type result;
	bool const found = binarySearch_(key, result);

	if (found){
		// key exists, overwrite, do not shift

		Pair & olddata = buffer_[ result ];

		// check if the data in database is valid
		if (! newdata.valid(olddata) ){
			// newdata will be magically destroyed.
			return false;
		}

		dataSize_ = dataSize_
					- olddata.getBytes()
					+ newdata.getBytes();

		// copy assignment
		olddata = std::forward<UPAIR>(newdata);

		return true;
	}

	// key not exists, shift, then add
	if ( ! shiftR_( result ) ){
		return false;
	}

	dataSize_ += newdata.getBytes();

	// placement new with copy constructor
	void *placement = & buffer_[ result ];
	new(placement) Pair(std::forward<UPAIR>(newdata));

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xac00
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq 0x18(%r14), %rdx
movq $0x5, (%rsp)
leaq 0x17(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %r14, %rdi
xorl %esi, %esi
callq 0x9ce3
testb %al, %al
je 0x9b62
movq 0x8(%r14), %r15
movq 0x18(%rsp), %r12
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0xad04
testb %al, %al
je 0x9bc8
leaq (%r15,%r12,8), %r15
movq 0x20(%r14), %r12
movq %r15, %rdi
callq 0xad18
subq %rax, %r12
movq %rbx, %rdi
callq 0xad18
addq %r12, %rax
movq %rax, 0x20(%r14)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xab74
jmp 0x9bc1
movq 0x18(%rsp), %r15
movq %r14, %rdi
movl $0x1, %esi
callq 0x9a00
testb %al, %al
je 0x9bc6
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x9ba0
movq %r15, %rdx
notq %rdx
addq 0x18(%r14), %rdx
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $0x8, %rdi
shlq $0x3, %rdx
callq 0x2200
movq %rbx, %rdi
callq 0xad18
addq %rax, 0x20(%r14)
movq 0x18(%rsp), %rdi
shlq $0x3, %rdi
addq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xab66
movb $0x1, %bpl
jmp 0x9bc8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/linklist.cc
// Function: hm3::LinkList::removeAll()
bool LinkList::removeAll(){
	for(Node *node = head_; node; ){
		Node *copy = node;

		node = node->next;

		delete copy;
	}

	clear_();

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x9e3f
movq 0x8(%r14), %r15
movq %r14, %rdi
callq 0xab4c
movl $0x10, %esi
movq %r14, %rdi
callq 0x2190
movq %r15, %r14
testq %r15, %r15
jne 0x9e1e
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/linklist.cc
// Function: hm3::LinkList::locate_(StringRef const&, bool) const
const LinkList::Node *LinkList::locate_(const StringRef &key, bool const exact) const{
	for(const Node *node = head_; node; node = node->next){
		const Pair & data = node->data;

		int const cmp = data.cmp(key);

		if (cmp == 0)
			return node;

		if (cmp > 0)
			return exact ? nullptr : node;
			//break;
	}

	return nullptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x9e9f
movl %edx, %ebp
movq %rsi, %r14
movq (%r14), %rdx
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xac74
testl %eax, %eax
je 0x9eac
jg 0x9ea3
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x9e81
xorl %ebx, %ebx
jmp 0x9eac
xorl %eax, %eax
testb %bpl, %bpl
cmovneq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/linklist.cc
// Function: hm3::LinkList::remove(StringRef const&)
bool LinkList::remove(const StringRef &key){
	Node *prev = nullptr;
	for(Node *node = head_; node; node = node->next){
		const Pair & data = node->data;
		int const cmp = data.cmp(key);

		if (cmp == 0){
			if (prev){
				prev->next = node->next;
			}else{
				// First node...
				head_ = node->next;
			}

			dataSize_ -= data.getBytes();
			--dataCount_;

			delete node;
			return true;
		}

		if (cmp > 0)
			break;

		prev = node;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x9f42
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
movq %r14, %rdi
callq 0xac74
testl %eax, %eax
je 0x9f09
movq %r14, %r12
testl %eax, %eax
jg 0x9f42
movq 0x8(%r12), %r14
testq %r14, %r14
je 0x9f42
movq (%r15), %rdx
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0xac74
movq %r12, %rcx
movq %r14, %r12
testl %eax, %eax
jne 0x9ee0
jmp 0x9f0b
xorl %ecx, %ecx
leaq 0x8(%rcx), %rax
testq %rcx, %rcx
movq 0x8(%r14), %rcx
cmoveq %rbx, %rax
movq %rcx, (%rax)
movq %r14, %rdi
callq 0xad18
subq %rax, 0x10(%rbx)
decq 0x8(%rbx)
movq %r14, %rdi
callq 0xab4c
movl $0x10, %esi
movq %r14, %rdi
callq 0x2190
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/linklist.cc
// Function: bool hm3::LinkList::putT_<hm3::Pair>(hm3::Pair&&)
bool LinkList::putT_(UPAIR&& newdata){
	const StringRef &key = newdata.getKey();

	Node *prev = nullptr;
	for(Node *node = head_; node; node = node->next){
		Pair & olddata = node->data;

		int const cmp = olddata.cmp(key);

		if (cmp == 0){
			// handle overwrite,
			// keep the node, overwrite the data

			// check if the data in database is valid
			if (! newdata.valid(olddata)){
				// newdata will be magically destroyed.
				return false;
			}

			dataSize_ = dataSize_
					- olddata.getBytes()
					+ newdata.getBytes();

			// copy assignment
			olddata = std::forward<UPAIR>(newdata);

			return true;
		}

		if (cmp > 0)
			break;

		prev = node;
	}

	size_t const size = newdata.getBytes();

	Node *newnode = new(std::nothrow) Node(std::forward<UPAIR>(newdata));
	if (newnode == nullptr){
		// newdata will be magically destroyed.
		return false;
	}

	// put new pair here...
	if (prev){
		// we are at the middle
		newnode->next = prev->next;
		prev->next = newnode;
	}else{
		newnode->next = head_;
		head_ = newnode;
	}

	dataSize_ += size;
	dataCount_++;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xac00
movq %rax, %r12
movq (%rbx), %rax
testq %rax, %rax
je 0x9fbe
movq %rdx, %r13
xorl %ebp, %ebp
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xac74
testl %eax, %eax
je 0xa036
jg 0x9fc0
movq 0x8(%r15), %rax
movq %r15, %rbp
testq %rax, %rax
jne 0x9f95
jmp 0x9fc0
xorl %ebp, %ebp
movq %r14, %rdi
callq 0xad18
movq %rax, %r15
movq 0x5fee(%rip), %rsi      # 0xffc0
movl $0x10, %edi
callq 0x2250
testq %rax, %rax
je 0xa032
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0xab66
movq $0x0, 0x8(%r12)
leaq 0x8(%rbp), %rax
testq %rbp, %rbp
cmoveq %rbx, %rax
movq (%rax), %rcx
movq %rcx, 0x8(%r12)
movq %r12, (%rax)
movdqu 0x8(%rbx), %xmm0
movq %r15, %xmm1
movdqa 0x2210(%rip), %xmm2     # 0xc230
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x8(%rbx)
movb $0x1, %bpl
jmp 0xa071
xorl %ebp, %ebp
jmp 0xa071
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0xad04
testb %al, %al
je 0xa071
movq 0x10(%rbx), %r12
movq %r15, %rdi
callq 0xad18
subq %rax, %r12
movq %r14, %rdi
callq 0xad18
addq %r12, %rax
movq %rax, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0xab74
jmp 0xa02d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x5f34(%rip), %rsi      # 0xffc0
movq %r12, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: hm3::SkipList::locate_(StringRef const&, bool) const
auto SkipList::locate_(const StringRef &key, bool const complete_evaluation) const -> NodeLocator{
	// it is extremly dangerous to have key == nullptr here.
	if (key.empty()){
		std::logic_error exception("Key can not be nullptr in SkipList::_locate");
		throw exception;
	}

	NodeArrayC loc;

	// smart over-optimizations, such skip NULL lanes or
	// start from the middle of the list did not pay off.

	int cmp = 1;

	const Node *node = nullptr;
	const Node *prev = nullptr;

	height_type height = height_;
	while(height){
		node = prev ? prev : heads_[height - 1];

		while(node){
			const Pair & data = node->data;
			cmp = data.cmp(key);

			if (cmp >= 0)
				break;

			prev = node;
			node = node->next[height - 1];
		}


		if (complete_evaluation == false && cmp == 0)
			return { node, loc };

		loc[height - 1] = prev;

		--height;
	}

	return { cmp ? nullptr : node , loc };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %ecx, 0x4(%rsp)
cmpq $0x0, (%rdx)
je 0xa2cd
movq %rdi, 0x8(%rsp)
movzbl (%rsi), %r13d
testq %r13, %r13
je 0xa297
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movl $0x1, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movq %r15, %r12
testq %r15, %r15
jne 0xa22d
leal (%rbx,%r13), %ecx
movq 0x10(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %r12
testq %r12, %r12
je 0xa26b
movq (%r14), %rdx
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0xac74
testl %eax, %eax
jns 0xa271
leal (%rbx,%r13), %ebp
movq %r12, %r15
movq 0x8(%r12,%rbp,8), %r12
testq %r12, %r12
je 0xa266
movq (%r14), %rdx
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0xac74
testl %eax, %eax
js 0xa244
jmp 0xa271
xorl %r12d, %r12d
jmp 0xa27c
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpb $0x0, 0x4(%rsp)
jne 0xa27c
testl %eax, %eax
je 0xa29a
leal (%rbx,%r13), %ecx
movq %r15, 0x18(%rsp,%rcx,8)
decq %r13
testb %r13b, %r13b
jne 0xa212
xorl %ecx, %ecx
testl %eax, %eax
cmovneq %rcx, %r12
jmp 0xa29a
xorl %r12d, %r12d
movq 0x8(%rsp), %rbx
movq %r12, (%rbx)
movq %rbx, %rdi
addq $0x8, %rdi
leaq 0x18(%rsp), %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x2140
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fe2(%rip), %rsi      # 0xc2b6
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x21d0
movl $0x10, %edi
callq 0x20a0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2110
movq 0x5ce8(%rip), %rsi      # 0xffe8
movq 0x5cd1(%rip), %rdx      # 0xffd8
movq %r14, %rdi
callq 0x2230
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2268
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: hm3::SkipList::_getRandomHeight()
auto SkipList::_getRandomHeight() -> height_type{
	// This gives slightly better performance,
	// than divide by 3 or multply by 0.33

	// We execute rand() inside the loop,
	// but performance is fast enought.

	height_type h = 1;
	while( h < height_ && rand_() )
		h++;

	return h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movb $0x1, %bl
cmpb $0x2, (%rdi)
jb 0xa357
movq %rdi, %r14
leaq 0x5e1e(%rip), %r15      # 0x10158
movq %r15, %rdi
callq 0xa8b8
movsd 0x7196(%rip), %xmm1     # 0x114e0
ucomisd %xmm0, %xmm1
jbe 0xa357
incb %bl
cmpb (%r14), %bl
jb 0xa33a
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: hm3::SkipList::removeAll()
bool SkipList::removeAll(){
	for(const Node *node = heads_[0]; node; ){
		const Node *copy = node;

		node = node->next[0];

		delete copy;
	}

	clear_();

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
addq $0x8, %rbx
testq %r14, %r14
je 0xa420
movq 0x8(%r14), %r15
movq %r14, %rdi
callq 0xab4c
movl $0x10, %esi
movq %r14, %rdi
callq 0x2190
movq %r15, %r14
testq %r15, %r15
jne 0xa3ff
movl $0x210, %edx            # imm = 0x210
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20d0
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: hm3::SkipList::get(StringRef const&) const
const Pair &SkipList::get(const StringRef &key) const{
	if (key.empty())
		return Pair::zero();

	const auto nl = locate_(key);

	return nl.node ? nl.node->data : Pair::zero();
}

// Assembly:
movq %rsi, %rdx
cmpq $0x0, (%rsi)
je 0xa473
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xa1cc
movq (%rbx), %rax
testq %rax, %rax
jne 0xa46a
leaq 0x707e(%rip), %rax      # 0x114e8
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
leaq 0x706e(%rip), %rax      # 0x114e8
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: hm3::SkipList::printLane(unsigned char) const
void SkipList::printLane(height_type const lane) const{
	uint64_t i = 0;
	const Node *node;
	for(node = heads_[lane]; node; node = node->next[lane]){
		const Pair & data = node->data;
		data.print();

		if (++i > 10)
			break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq 0x8(%rdi,%r14,8), %rbx
testq %rbx, %rbx
je 0xa619
movl $0xb, %r15d
movq %rbx, %rdi
callq 0xad3c
decq %r15
je 0xa619
movq 0x8(%rbx,%r14,8), %rbx
testq %rbx, %rbx
jne 0xa602
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/skiplist.cc
// Function: bool hm3::SkipList::putT_<hm3::Pair>(hm3::Pair&&)
bool SkipList::putT_(UPAIR&& newdata){
	const StringRef &key = newdata.getKey();

	if (key.empty())
		return true;

	const auto nl = locate_(key);

	if (nl.node){
		// update in place. node MUST be not NULL...

		const Pair & olddata = nl.node->data;

		// check if the data in database is valid
		if (! newdata.valid(olddata) ){
			// newdata will be magically destroyed.
			return false;
		}

		dataSize_ = dataSize_
			- olddata.getBytes()
			+ newdata.getBytes();

		// copy assignment
		const_cast<Pair &>(olddata) = std::forward<UPAIR>(newdata);

		return true;
	}

	// create new node

	size_t const size = newdata.getBytes();
	height_type const height = _getRandomHeight();

	Node *newnode = new(height, true) Node(std::forward<UPAIR>(newdata));

	if (newnode == nullptr){
		// newdata will be magically destroyed.
		return false;
	}

	/* SEE REMARK ABOUT NEXT[] SIZE AT THE TOP */
	// newnode->height = height

	// place new node where it belongs

	for(height_type i = 0; i < height; ++i){
		if (nl.loc[i]){
			// we are at the middle
			const Node *node = nl.loc[i];

			newnode->next[i] = node->next[i];
			const_cast<Node *>(node)->next[i] = newnode;
		}else{
			newnode->next[i] = heads_[i];
			heads_[i] = newnode;
		}
	}

#ifdef DEBUG_PRINT_LANES
	printf("%3u Lanes-> ", height);
	for(height_type i = 0; i < height; ++i)
		printf("%p ", (void *) newnode->next[i]);
	printf("\n");
#endif

	/* SEE REMARK ABOUT NEXT[] SIZE AT THE TOP */
	// newnode->next[i] = NULL;

	dataSize_ += size;
	++dataCount_;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xac00
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
testq %rax, %rax
je 0xa763
leaq 0x10(%rsp), %r15
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xa1cc
movq (%r15), %r15
testq %r15, %r15
je 0xa6d2
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0xad04
testb %al, %al
je 0xa766
movq 0x210(%rbx), %r12
movq %r15, %rdi
callq 0xad18
subq %rax, %r12
movq %r14, %rdi
callq 0xad18
addq %r12, %rax
movq %rax, 0x210(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0xab74
jmp 0xa763
movq %r14, %rdi
callq 0xad18
movq %rax, %r15
movq %rbx, %rdi
callq 0xa324
movzbl %al, %r13d
leaq 0x8(,%r13,8), %rdi
movq 0x58c8(%rip), %rsi      # 0xffc0
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0xab66
testb %r13b, %r13b
je 0xa73e
leal (,%r13,8), %eax
xorl %ecx, %ecx
movq 0x18(%rsp,%rcx), %rdx
testq %rdx, %rdx
cmoveq %rbx, %rdx
movq 0x8(%rdx,%rcx), %rsi
movq %rsi, 0x8(%r12,%rcx)
movq %r12, 0x8(%rdx,%rcx)
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0xa71a
movdqu 0x208(%rbx), %xmm0
movq %r15, %xmm1
movdqa 0x1add(%rip), %xmm2     # 0xc230
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x208(%rbx)
movb $0x1, %bpl
movl %ebp, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/main/dbadapter.h
// Function: DBAdapter<hm3::LSMTable<std::vector<hm3::DiskTable, std::allocator<hm3::DiskTable>>>, hm3::tableloader::DirectoryTableLoader>::info[abi:cxx11]() const
std::string info() const{
		std::stringstream ss;

		ss	<< "Keys (estimated): "	<< list_.getCount(true)	<< '\n'
			<< "Size: "		<< list_.getBytes()	<< '\n'
		;

		return ss.str();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31a0
leaq 0x18(%rsp), %r15
leaq 0x54e3(%rip), %rsi      # 0xa1b7
movl $0x12, %edx
movq %r15, %rdi
callq 0x32d0
movq (%r14), %rax
movq (%rax), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x4d01
addq 0x8(%rax), %rsi
addq $0xe0, %rax
jmp 0x4cf0
movq %r15, %rdi
callq 0x3190
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x32d0
movq %rax, %r15
leaq 0x54a2(%rip), %rsi      # 0xa1ca
movl $0x6, %edx
movq %rax, %rdi
callq 0x32d0
movq (%r14), %rax
movq (%rax), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x4d55
addq 0x58(%rax), %rsi
addq $0xe0, %rax
jmp 0x4d44
movq %r15, %rdi
callq 0x3190
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x32d0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x33c0
movq 0xa22a(%rip), %rsi      # 0xefb0
leaq 0x8(%rsp), %rdi
callq 0x31d0
leaq 0x88(%rsp), %rdi
callq 0x30d0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xa1f9(%rip), %rsi      # 0xefb0
leaq 0x8(%rsp), %rdi
callq 0x31d0
leaq 0x88(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/main/dbadapter.h
// Function: DBAdapter<hm3::LSMTable<std::vector<hm3::DiskTable, std::allocator<hm3::DiskTable>>>, hm3::tableloader::DirectoryTableLoader>::get[abi:cxx11](StringRef const&) const
std::string get(const StringRef &key) const{
		const auto &p = list_.get(key);
		std::string s = p.getVal();
		std::cout << s << '\n';
		return s;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x606e
movq %r14, %rdi
callq 0x75de
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
addq %rdx, %rax
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x3d5a
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xa1b0(%rip), %rdi      # 0xefd0
callq 0x32d0
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x32d0
leaq 0x8(%rsp), %rdi
callq 0x7508
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x4e6c
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4e6c
movq (%r15), %rsi
incq %rsi
callq 0x3290
leaq 0x8(%rsp), %rdi
callq 0x7508
movq %r14, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/lsmtable_impl.h
// Function: hm3::LSMTable<std::vector<hm3::DiskTable, std::allocator<hm3::DiskTable>>>::get(StringRef const&) const
Pair LSMTable<CONTAINER>::get(const StringRef &key) const{
	// CONTAINER is responsible for ordering the tables,
	// in correct (probably reverse) order.
	for(const auto &table : container_ ){
		if (Pair pair = table.get(key))
			return pair;
	}

	return nullptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x60b3
movq %rdx, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8814
cmpq $0x0, (%rbx)
jne 0x60bd
movq %rbx, %rdi
callq 0x7508
addq $0xe0, %r15
cmpq %r12, %r15
jne 0x608b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7578
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/hm3/tableloader/directorytableloader.cc
// Function: hm3::tableloader::DirectoryTableLoader::refresh()
bool DirectoryTableLoader::refresh(){
	container_.clear();

	MyGlob gl;
	if (gl.open(path_) == false)
		return true;

	const auto &files = gl.getData();

	container_.reserve(files.size());

	// order in the iterator, does not matter
	// but order in get, still very important
	auto it_rend = files.rend();
	for (auto it = files.rbegin(); it != it_rend; ++it){
		const auto &filename = *it;

                DiskTable dt;
                dt.open(filename);
                container_.push_back( std::move(dt) );
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movq 0x28(%rdi), %r12
cmpq %r15, %r12
je 0x6b10
movq %r15, %r14
movq %r14, %rdi
callq 0x3dfa
addq $0xe0, %r14
cmpq %r12, %r14
jne 0x6af8
movq %r15, 0x28(%rbx)
movq %rsp, %rdi
movb $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movq $0x0, 0x60(%rdi)
movq 0x8(%rbx), %rax
leaq 0x68(%rsp), %rsi
movq %rax, (%rsi)
movq (%rbx), %rax
movq %rax, 0x8(%rsi)
callq 0x7268
testb %al, %al
je 0x6c21
addq $0x20, %rbx
movq 0x58(%rsp), %rsi
subq 0x50(%rsp), %rsi
sarq $0x4, %rsi
movq %rbx, %rdi
callq 0x6c60
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %r14
cmpq %r12, %r14
je 0x6c21
leaq 0x70(%rsp), %r13
xorl %ebp, %ebp
leaq 0x68(%rsp), %r15
addq $-0x10, %r14
movb %bpl, 0x68(%rsp)
movb %bpl, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movups %xmm0, 0x28(%r13)
movups %xmm0, 0x18(%r13)
movq $0x0, 0x38(%r13)
movl %ebp, 0x54(%r13)
movups %xmm0, 0x44(%r13)
movl $0x1, 0xcc(%rsp)
movups %xmm0, 0x60(%r13)
movl %ebp, 0xfc(%rsp)
movl %ebp, 0x84(%r13)
movups %xmm0, 0x74(%r13)
movb $0x1, 0x100(%rsp)
movups %xmm0, 0xc8(%r13)
movups %xmm0, 0xb8(%r13)
movups %xmm0, 0xa8(%r13)
movups %xmm0, 0x98(%r13)
movq %r15, %rdi
movq %r14, %rsi
callq 0x7cf4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6f50
movq %r15, %rdi
callq 0x3dfa
cmpq %r12, %r14
jne 0x6b7f
movq %rsp, %rdi
callq 0x6d30
movb $0x1, %al
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6c4f
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3dfa
movq %rsp, %rdi
callq 0x6d30
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O3/joncampbell123[P]floppytools/kryoflux4.cpp
// Function: main
int main(int argc,char **argv) {
    struct flux_bits fb;
    struct kryoflux_event ev;

    if (argc < 2) {
        fprintf(stderr,"%s <raw>\n",argv[0]);
        return 1;
    }

    FILE *fp = fopen(argv[1],"rb");
    if (fp == NULL) return 1;

    if (!autodetect_flux_bits_mfm(fb,ev,fp)) {
        fprintf(stderr,"Autodetect failure\n");
        return 1;
    }

    /* TODO: autodetection is possible (for MFM at least).
     *       look at the histogram code in kryoflux2.cpp */

    /* from my tests:
     *
     * distance of 10101010101010 = 49
     * change in distance to encode 1001001001001001 = 23.
     *
     * shortest is therefore 49 - 23 = 26 which is the distance to encode 111111111111 */

    fb.clear();

    do {
        kryoflux_bits_refill(fb,ev,fp);

        unsigned int c = fb.avail();
        for (unsigned int i=0;i < c;i++) printf("%u",fb.get(1));

        kryoflux_bits_refill(fb,ev,fp);
    } while (fb.avail() > 0);

    fclose(fp);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movups %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
cmpl $0x1, %edi
jle 0x1487
movq 0x8(%rsi), %rdi
leaq 0x1c4e(%rip), %rsi      # 0x300e
callq 0x1110
movl $0x1, %r14d
testq %rax, %rax
je 0x1467
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x1778
testb %al, %al
je 0x1497
leaq -0x38(%rbp), %rdi
callq 0x171c
leaq -0x38(%rbp), %r14
leaq -0x60(%rbp), %r15
leaq 0x1c1e(%rip), %r12      # 0x3025
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x164e
movq %r14, %rdi
callq 0x16d0
movl %eax, %r13d
testl %eax, %eax
je 0x1442
movq %r14, %rdi
movl $0x1, %esi
callq 0x1750
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
decl %r13d
jne 0x1424
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x164e
movq %r14, %rdi
callq 0x16d0
testl %eax, %eax
jne 0x1407
movq %rbx, %rdi
callq 0x10e0
xorl %r14d, %r14d
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1475
callq 0x10d0
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rdi
callq 0x11e2
movl $0x1, %r14d
jmp 0x1467
callq 0x11c0
jmp 0x1467
jmp 0x14a4
jmp 0x14a4
jmp 0x14a4
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x14b5
callq 0x10d0
movq %rbx, %rdi
callq 0x1170
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrUseCount.cc
// Function: HasPtr::~HasPtr()
HasPtr::~HasPtr()
{
	std::cout << "deconstructor." << std::endl;
	if (--*use == 0) {   // if the reference count goes to 0
		std::cout << "delete memory." << std::endl;
		delete ps;       // delete the string
		delete use;      // and the counter
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2d7b(%rip), %r14      # 0x3fd8
leaq 0xda0(%rip), %rsi       # 0x2004
movl $0xe, %edx
movq %r14, %rdi
callq 0x10d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x2d49(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq 0x10(%rbx), %rax
decq (%rax)
je 0x12aa
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2d27(%rip), %r14      # 0x3fd8
leaq 0xd5b(%rip), %rsi       # 0x2013
movl $0xe, %edx
movq %r14, %rdi
callq 0x10d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq 0x2cf5(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq (%rbx), %r14
testq %r14, %r14
je 0x130f
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x130f
movq (%rax), %rsi
incq %rsi
callq 0x10c0
movl $0x20, %esi
movq %r14, %rdi
callq 0x10c0
movq 0x10(%rbx), %rdi
movl $0x8, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x10c0
movq %rax, %rdi
callq 0x1615
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrUseCount.cc
// Function: HasPtr::operator=(HasPtr&&)
HasPtr& HasPtr::operator=(HasPtr&& rhs)
{
	std::cout << "move assign." << std::endl;
	if (this != &rhs) {
		if (--*use == 0) {   // do the work of the destructor
			delete ps;
			delete use;
		}
		ps = rhs.ps;         // do the work of the move constructor
		i = rhs.i;
		use = rhs.use;

		rhs.ps = nullptr;
		++*rhs.use;
	}
	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2c8b(%rip), %r15      # 0x3fd8
leaq 0xcce(%rip), %rsi       # 0x2022
movl $0xc, %edx
movq %r15, %rdi
callq 0x10d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
cmpq %r14, %rbx
je 0x13ef
movq 0x10(%rbx), %rax
decq (%rax)
jne 0x13d0
movq (%rbx), %r15
testq %r15, %r15
je 0x13b5
movq (%r15), %rdi
leaq 0x10(%r15), %rax
cmpq %rax, %rdi
je 0x13b5
movq (%rax), %rsi
incq %rsi
callq 0x10c0
movl $0x20, %esi
movq %r15, %rdi
callq 0x10c0
movq 0x10(%rbx), %rdi
movl $0x8, %esi
callq 0x10c0
movq (%r14), %rax
movq %rax, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq $0x0, (%r14)
incq (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrUseCount.cc
// Function: HasPtr::operator=(HasPtr const&)
HasPtr& HasPtr::operator=(const HasPtr& rhs)
{
	std::cout << "copy assign." << std::endl;
	++*rhs.use;  // increment the use count of the right-hand operand
	if (--*use == 0) {   // then decrement this object's counter
		delete ps;       // if no other users
		delete use;      // free this object's allocated members
	}
	ps = rhs.ps;         // copy data from rhs into this object
	i = rhs.i;
	use = rhs.use;
	return *this;        // return this object
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2bc3(%rip), %r15      # 0x3fd8
leaq 0xc13(%rip), %rsi       # 0x202f
movl $0xc, %edx
movq %r15, %rdi
callq 0x10d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq 0x10(%r14), %rax
incq (%rax)
movq 0x10(%rbx), %rcx
decq (%rcx)
jne 0x149e
movq (%rbx), %r15
testq %r15, %r15
je 0x147f
movq (%r15), %rdi
leaq 0x10(%r15), %rax
cmpq %rax, %rdi
je 0x147f
movq (%rax), %rsi
incq %rsi
callq 0x10c0
movl $0x20, %esi
movq %r15, %rdi
callq 0x10c0
movq 0x10(%rbx), %rdi
movl $0x8, %esi
callq 0x10c0
movq 0x10(%r14), %rax
movq (%r14), %rcx
movq %rcx, (%rbx)
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrUseCount.cc
// Function: f(HasPtr)
HasPtr f(HasPtr hp) // HasPtr passed by value, so it is copied
{
	HasPtr ret;
	ret = hp;        // assignment copies the given HasPtr
	// proces ret
	return ret;      // ret and hp are destroyed
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x38(%rbp), %rsi
callq 0x1624
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1502
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x10c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13fe
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x124c
jmp 0x1540
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1540
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x10c0
movq %r14, %rdi
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH13_CopyControl/examples/HasPtrUseCount.cc
// Function: main
int main()
{
	HasPtr h("hi mom!");

	// no new memory is allocated,
	// h and h2 share the same underlying string
	HasPtr h2 = h;

	HasPtr h3 = std::move(h2);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xada(%rip), %rsi       # 0x203c
leaq 0xada(%rip), %rdx       # 0x2043
leaq -0x30(%rbp), %rdi
callq 0x185c
leaq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1624
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x1594
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x10c0
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x16de
leaq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x174a
leaq -0x60(%rbp), %rdi
callq 0x124c
leaq -0x30(%rbp), %rdi
callq 0x124c
leaq -0x48(%rbp), %rdi
callq 0x124c
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x124c
jmp 0x15e5
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x124c
jmp 0x160d
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x160d
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x10c0
jmp 0x160d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH06_Functions/examples/LocalMath.cc
// Function: fact(int)
int fact(int val)
{
	int ret = 1; // local variable to hold the result as we calculate it
	while (val > 1) 
		ret *= val--;  // assign ret * val to ret and decrement val
	return ret;        // return the result
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %eax
cmpl $0x2, %edi
jl 0x130e
imull %edi, %eax
leal -0x1(%rdi), %ecx
cmpl $0x2, %edi
movl %ecx, %edi
ja 0x1301
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eschwabe[P]interview-practice/src/convert.cpp
// Function: IntToString[abi:cxx11](int const&)
string IntToString(const int& value) {

    string str;
    int tmp = value;
    bool negate_flag = false;

    if(tmp < 0) {
        negate_flag = true;
        tmp = -tmp;
    }

    if(tmp == 0) {
        str.insert(0, 1, '0');
    } else {
        while(tmp > 0) {
            char c = (tmp % 10) + '0';
            str.insert(0, 1, c);
            tmp /= 10;
        }
    }

    if(negate_flag) {
        str.insert(0, 1, '-');
    }

    return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl (%rsi), %ebp
testl %ebp, %ebp
je 0x12e1
movl %ebp, %r14d
negl %r14d
cmovsl %ebp, %r14d
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movl %r14d, %r13d
imulq %r12, %r13
shrq $0x23, %r13
leal (,%r13,2), %eax
leal (%rax,%rax,4), %eax
movl %r14d, %ecx
subl %eax, %ecx
orb $0x30, %cl
movzbl %cl, %ecx
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10f0
cmpl $0xa, %r14d
movl %r13d, %r14d
jae 0x12a0
testl %ebp, %ebp
jns 0x12f5
movb $0x2d, %al
jmp 0x12e3
movb $0x30, %al
movzbl %al, %ecx
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1309
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x131f
movq (%r15), %rsi
incq %rsi
callq 0x1090
movq %r14, %rdi
callq 0x10d0
// File: /workspace/github_cpp_makefile_star2_O3/mlugo2[P]SunshineGPU/inc/stringproc.h
// Function: tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void tokenize(const std::string& str, std::vector<std::string>& tokens, const std::string& delimiters )
{
	// Skip delimiters at beginning.
    std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
    // Find first "non-delimiter".
    std::string::size_type pos     = str.find_first_of(delimiters, lastPos);

    while (std::string::npos != pos || std::string::npos != lastPos)
    {
        // Found a token, add it to the vector.
        tokens.push_back(str.substr(lastPos, pos - lastPos));
        // Skip delimiters.  Note the "not_of"
        lastPos = str.find_first_not_of(delimiters, pos);
        // Find next "non-delimiter"
        pos = str.find_first_of(delimiters, lastPos);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %edx, %edx
callq 0x2360
movq %rax, %rbp
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r15, %rdi
movq %rax, %rdx
callq 0x2320
movq %rax, %r13
movq %rbp, %rax
andq %r13, %rax
cmpq $-0x1, %rax
je 0x268b
leaq 0x8(%rsp), %r12
movq %r13, %rcx
subq %rbp, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2280
movq %r14, %rdi
movq %r12, %rsi
callq 0x4246
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2655
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2270
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0x2360
movq %rax, %rbp
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
movq %r15, %rdi
movq %rax, %rdx
callq 0x2320
movq %rax, %r13
movq %rbp, %rax
andq %r13, %rax
cmpq $-0x1, %rax
jne 0x261a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x26b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2270
movq %rbx, %rdi
callq 0x2390