LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::serialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DNS_DB::DnsIndex::serialize(std::string file) {
	// Write to file
	FILE * fd = fopen(file.c_str(),"wb");
	uint32_t s = nodes.size();
	fwrite(&s, 1, 4, fd);
	for (unsigned int i = 0; i < nodes.size(); i++) {
		fwrite(&nodes[i], 1, MAX_DNS_SIZE*2 + 4, fd);
	}
	fclose(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x563c(%rip), %rsi      # 0xa18c
callq 0x32b0
movq %rax, %r14
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq %rax
imull $0x914c1bad, %eax, %eax # imm = 0x914C1BAD
leaq 0x4(%rsp), %rdi
movl %eax, (%rdi)
movl $0x1, %esi
movl $0x4, %edx
movq %r14, %rcx
callq 0x3480
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4bce
movl $0x1, %ebp
xorl %ecx, %ecx
movabsq $0x14c1bacf914c1bad, %r15 # imm = 0x14C1BACF914C1BAD
imulq $0x4a, %rcx, %rdi
addq %rax, %rdi
movl $0x1, %esi
movl $0x4a, %edx
movq %r14, %rcx
callq 0x3480
movl %ebp, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
imulq %r15, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x4b9b
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3240
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::unserialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void DNS_DB::DnsIndex::unserialize(const std::string & file) {
	// Read from file
	if (!FileMapper::getInstance().fileExists(file)) {
		fprintf(stderr,"Warning: Could not read DB index!\n");
		return;
	}

	// Discard our own index
	nodes.clear();

	void * fptr = FileMapper::getInstance().mapFile(file);

	uint32_t nblks = *(uint32_t*)fptr;
	char * cptr = (char*)fptr;
	cptr += 4;

	for (unsigned int i = 0; i < nblks; i++) {
		Node * nodeptr = (Node*)cptr;
		nodes.push_back(*nodeptr);
		cptr += MAX_DNS_SIZE*2 + 4;
	}
	FileMapper::getInstance().unmap(fptr);

	// Find the biggest id
	current_id = 0;
	for (unsigned i = 0; i < nodes.size(); i++)
		if (nodes[i].dnsblock_id > current_id)
			current_id = nodes[i].dnsblock_id;
	current_id++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4668
movq %rax, %rdi
movq %r14, %rsi
callq 0x79b2
testb %al, %al
je 0x4ccd
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4c12
movq %rax, 0x8(%rbx)
callq 0x4668
movq %rax, %rdi
movq %r14, %rsi
callq 0x7604
movq %rax, %r14
movl (%rax), %ebp
testl %ebp, %ebp
je 0x4c66
movq %r14, %r15
addq $0x4, %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c53
movl $0x4a, %edx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x3200
addq $0x4a, 0x8(%rbx)
jmp 0x4c5e
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5a3e
addq $0x4a, %r15
decl %ebp
jne 0x4c32
callq 0x4668
movq %rax, %rdi
movq %r14, %rsi
callq 0x787c
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movl $0x0, 0x20(%rbx)
subq %rax, %rdx
je 0x4cbf
sarq %rdx
movabsq $0x14c1bacf914c1bad, %rcx # imm = 0x14C1BACF914C1BAD
imulq %rdx, %rcx
movl 0x20(%rbx), %edx
addq $0x46, %rax
movl $0x1, %esi
movl (%rax), %edi
cmpl %edx, %edi
jbe 0x4cb1
movl %edi, 0x20(%rbx)
movl %edi, %edx
movl %esi, %edi
addq $0x4a, %rax
incq %rsi
cmpq %rdi, %rcx
ja 0x4ca6
incl 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x352d
jmp 0x4cc2
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::check()
void DNS_DB::DnsIndex::check() {
	// Check consistency
	for (unsigned int i = 0; i < nodes.size(); i++) {
		if (!less(nodes[i].min, nodes[i].max)) {
			fprintf(stderr, "DB index error!!!\n");
		}
	}

	// Make sure the index is sorted
	for (unsigned int i = 1; i < nodes.size(); i++) {
		if (!less(nodes[i-1].min, nodes[i].min) ||
			!  eq(nodes[i-1].max, nodes[i].min)) {

			fprintf(stderr, "DB index error!!!\n");
		}
	}

	for (unsigned int i = 0; i < nodes.size(); i++) {
		DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[i].dnsblock_id);
		blk->check();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movabsq $0x14c1bacf914c1bad, %r12 # imm = 0x14C1BACF914C1BAD
cmpq %rax, 0x8(%rdi)
je 0x4d40
movl $0x1, %ebp
xorl %ecx, %ecx
imulq $0x4a, %rcx, %rcx
leaq (%rax,%rcx), %rdi
leaq (%rax,%rcx), %rsi
addq $0x23, %rsi
movl $0x23, %edx
callq 0x3110
testl %eax, %eax
jns 0x4d39
movl %ebp, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
imulq %r12, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x4cff
jmp 0x4d40
callq 0x3595
jmp 0x4d1d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq %rcx
imulq %r12, %rcx
cmpq $0x2, %rcx
jb 0x4dc5
movl $0x1, %ecx
movl $0x2, %r13d
leal -0x2(%r13), %edx
imulq $0x4a, %rdx, %r14
addq %rax, %r14
imulq $0x4a, %rcx, %r15
addq %rax, %r15
movl $0x23, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3110
testl %eax, %eax
jns 0x4dbe
addq $0x23, %r14
movl $0x23, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3110
testl %eax, %eax
jne 0x4dbe
movl %r13d, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
imulq %r12, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0x4d62
jmp 0x4dc5
callq 0x35b1
jmp 0x4da0
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4e21
movl $0x1, %ebp
xorl %ecx, %ecx
leaq 0x8(%rsp), %r14
movq 0x18(%rbx), %rsi
imulq $0x4a, %rcx, %rcx
movl 0x46(%rax,%rcx), %edx
movq %r14, %rdi
callq 0x8060
movq 0x8(%rsp), %rdi
callq 0x6d9e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4e07
callq 0x46de
movl %ebp, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
imulq %r12, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x4dda
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4e42
callq 0x46de
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::getIterator(char const*)
DNS_DB::DnsIndex::Iterator DNS_DB::DnsIndex::getIterator(const char * domint) {
	if (domint) {
		int n = lookupNode(domint);
		return DNS_DB::DnsIndex::Iterator(this, n, domint, database);
	}else{
		return DNS_DB::DnsIndex::Iterator(this, 0, 0, database);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x4e79
movq %rdx, %r15
movq %r14, %rdi
movq %rdx, %rsi
callq 0x49d4
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movq %r15, %rcx
jmp 0x4e87
movq 0x18(%r14), %r8
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x599a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::replaceIpv4(char const*, IPv4_Record const&, IPv4_Record const&)
void DNS_DB::DnsIndex::replaceIpv4(const char * domain, const IPv4_Record & oldrec, const IPv4_Record & newrec) {
	char domint[MAX_DNS_SIZE];
	if (!domain2idom(domain, domint)) {
		fprintf(stderr, "Domain too long!\n");
		return;
	}

	int n = lookupNode(domint);
	DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[n].dnsblock_id);
	blk->replaceDomainIpv4(domint, oldrec, newrec);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %r15
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x74c8
testb %al, %al
je 0x4f16
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x49d4
movq (%r15), %rcx
movq 0x18(%r15), %rsi
cltq
imulq $0x4a, %rax, %rax
movl 0x46(%rcx,%rax), %edx
movq %rsp, %r15
movq %r15, %rdi
callq 0x8060
movq (%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6960
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4f0a
callq 0x46de
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x35cd
jmp 0x4f0a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4f2f
callq 0x46de
movq %rbx, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_index.cc
// Function: DNS_DB::DnsIndex::hasDomain(char const*)
bool DNS_DB::DnsIndex::hasDomain(const char * domain) {
	char domint[MAX_DNS_SIZE];
	if (!domain2idom(domain, domint))
		return false;

	int n = lookupNode(domint);
	DNS_DB::DnsBlockPtr blk = database->getBlock(nodes[n].dnsblock_id);
	
	return blk->hasDomain(domint);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x74c8
testb %al, %al
je 0x55b8
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x49d4
movq (%rbx), %rcx
movq 0x18(%rbx), %rsi
cltq
imulq $0x4a, %rax, %rax
movl 0x46(%rcx,%rax), %edx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x8060
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x65f0
movl %eax, %ebx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x55ba
callq 0x46de
jmp 0x55ba
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x55d6
callq 0x46de
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::DnsBlock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
DNS_DB::DnsBlock::DnsBlock(const std::string & file, int blkid) {
	if (!FileMapper::getInstance().fileExists(file))
		FileMapper::getInstance().createFile(file, DNS_DB::DnsBlock::blockSize);
	
	void * ptr = FileMapper::getInstance().mapFile(file);

	this->blockptr = (InternalBlock *)ptr;
	this->endptr = &this->blockptr[numBlocks];
	this->blockid = blkid;
	this->bitmap.reset(new Bitmap(numBlocks));

	updateBM();

	assert(sizeof(InternalBlock) == 64);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
callq 0x4668
movq %rax, %rdi
movq %r14, %rsi
callq 0x79b2
testb %al, %al
jne 0x6108
callq 0x4668
movl 0x917f(%rip), %edx      # 0xf27c
movq %rax, %rdi
movq %r14, %rsi
callq 0x79da
callq 0x4668
movq %rax, %rdi
movq %r14, %rsi
callq 0x7604
movq %rax, (%rbx)
movl 0x915e(%rip), %r14d     # 0xf280
movq %r14, %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
movl %ebp, 0x10(%rbx)
movl $0x18, %edi
callq 0x3250
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
callq 0x7e54
leaq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x71d2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6192
movq %rax, %r14
movq %r15, %rdi
callq 0x3220
jmp 0x617b
jmp 0x6178
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x6189
callq 0x46de
movq %r14, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::lookupDomain(char const*) const
DNS_DB::DnsBlock::InternalBlock * DNS_DB::DnsBlock::lookupDomain(const char * domain) const {
	// Pick the specified element
	int p;
	int res = lookupEmptyDomainSpot(domain, &p);
	if (res != ALREADY_EXISTS || p < 0 || p >= numBlocks) return 0;

	DNS_DB::DnsBlock::InternalBlock * ptr = &blockptr[p];

	assert(ptr->header & flagDomain);
	assert(memcmp(domain, ptr->data.domain.domain, MAX_DNS_SIZE) == 0);
	
	return ptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc(%rsp), %rdx
callq 0x634e
xorl %ebx, %ebx
cmpl $-0x2, %eax
jne 0x6302
movl 0xc(%rsp), %eax
testl %eax, %eax
js 0x6302
cmpl 0x8faa(%rip), %eax      # 0xf280
jae 0x6302
movq (%r15), %rbx
shlq $0x6, %rax
movb 0x8f94(%rip), %cl       # 0xf279
testb %cl, (%rbx,%rax)
je 0x630f
addq %rax, %rbx
leaq 0x1(%rbx), %rsi
movl $0x23, %edx
movq %r14, %rdi
callq 0x3260
testl %eax, %eax
jne 0x632e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x407d(%rip), %rdi      # 0xa393
leaq 0x3fdc(%rip), %rsi      # 0xa2f9
leaq 0x4088(%rip), %rcx      # 0xa3ac
movl $0x4b, %edx
callq 0x3180
leaq 0x40cb(%rip), %rdi      # 0xa400
leaq 0x3fbd(%rip), %rsi      # 0xa2f9
leaq 0x4069(%rip), %rcx      # 0xa3ac
movl $0x4c, %edx
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::getIpsv4(int) const
std::vector <IPv4_Record> DNS_DB::DnsBlock::getIpsv4(int p) const {
	std::vector <IPv4_Record> ret;
	const DNS_DB::DnsBlock::InternalBlock * ptr = &blockptr[p];
	if (ptr == 0)
		return ret;

	assert((ptr->header & DNS_DB::DnsBlock::flagDomain) != 0);
	assert((ptr->header & DNS_DB::DnsBlock::flagUsed) != 0);

	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i].ip != 0)
					ret.push_back(ptr->data.domain.records[i]);
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i].ip != 0)
					ret.push_back(ptr->data.records.records[i]);
		}
		ptr++;
	} while (ptr != endptr && !(ptr->header & DNS_DB::DnsBlock::flagDomain) && (ptr->header & DNS_DB::DnsBlock::flagUsed));

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
testq %rax, %rax
je 0x658a
movslq %edx, %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %r15
movb (%r15), %dl
testb %dl, 0x8dbd(%rip)       # 0xf279
je 0x6597
testb %dl, 0x8db0(%rip)       # 0xf278
je 0x65b6
movq %rsi, %r14
leaq (%rcx,%rax), %r12
addq $0x4, %r12
movb 0x8d9a(%rip), %al       # 0xf279
testb %al, (%r15)
je 0x6527
movl $0x24, %r13d
cmpl $0x0, 0x8(%r15,%r13)
je 0x651b
leaq (%r15,%r13), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6513
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x651b
movq %rbx, %rdi
callq 0x72ca
addq $0xc, %r13
cmpq $0x30, %r13
je 0x64ea
jmp 0x6565
xorl %r13d, %r13d
cmpl $0x0, 0x8(%r12,%r13)
je 0x655b
leaq (%r12,%r13), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6553
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x655b
movq %rbx, %rdi
callq 0x72ca
addq $0xc, %r13
cmpq $0x3c, %r13
jne 0x652a
addq $0x40, %r15
cmpq 0x8(%r14), %r15
je 0x658a
movb (%r15), %al
testb %al, 0x8d01(%rip)       # 0xf279
jne 0x658a
addq $0x40, %r12
testb %al, 0x8cf4(%rip)       # 0xf278
jne 0x64d9
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3e9d(%rip), %rdi      # 0xa43b
leaq 0x3d54(%rip), %rsi      # 0xa2f9
leaq 0x3ec1(%rip), %rcx      # 0xa46d
movl $0x58, %edx
callq 0x3180
leaq 0x3eef(%rip), %rdi      # 0xa4ac
leaq 0x3d35(%rip), %rsi      # 0xa2f9
leaq 0x3ea2(%rip), %rcx      # 0xa46d
movl $0x59, %edx
callq 0x3180
jmp 0x65d7
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x65e7
callq 0x3220
movq %r14, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::addDomain(char const*)
DNS_DB::queryError DNS_DB::DnsBlock::addDomain(const char * domint) {
	int spot, res;
	res = lookupEmptyDomainSpot(domint, &spot);

	if (res == NO_EMPTY_SPOT) {
		// No spece between records or at the end of the block,
		// we need to do some relocs or split the chunk

		// Try to find a place again
		makeRoomMove(domint);
		res = lookupEmptyDomainSpot(domint,&spot);
		assert(res != ALREADY_EXISTS);  // We would have detected this before, obviously

		if (res == NO_EMPTY_SPOT)
			return resNoSpaceLeft;
	}
	else if (res == ALREADY_EXISTS)
		return resAlreadyExists;

	DNS_DB::DnsBlock::InternalBlock * place = &blockptr[spot];
	assert((!(place->header & DNS_DB::DnsBlock::flagUsed) && !(place->header & DNS_DB::DnsBlock::flagDomain)));

	// Insert the new register
	memset(place, 0, sizeof(InternalBlock));
	place->header = DNS_DB::DnsBlock::flagUsed | DNS_DB::DnsBlock::flagDomain;
	memcpy(place->data.domain.domain, domint, MAX_DNS_SIZE);
	bitmap->setBit(spot,true);

	#ifdef EXTRA_CHECK
	checkBM();
	#endif

	return resOK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
callq 0x634e
cmpl $-0x2, %eax
je 0x66cd
cmpl $-0x1, %eax
jne 0x6656
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6718
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x634e
movl %eax, %ecx
movl $0x1, %eax
cmpl $-0x1, %ecx
je 0x66d2
cmpl $-0x2, %ecx
je 0x66f9
movq (%rbx), %rax
movslq 0x4(%rsp), %rcx
movq %rcx, %rdi
shlq $0x6, %rdi
movb (%rax,%rdi), %r8b
movb 0x8c09(%rip), %dl       # 0xf278
testb %r8b, %dl
jne 0x66da
movb 0x8bfe(%rip), %sil      # 0xf279
testb %r8b, %sil
jne 0x66da
movl %ecx, %ecx
addq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
orb %dl, %sil
movb %sil, (%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, 0x1(%rax)
movups %xmm1, 0x11(%rax)
movl 0x1f(%r14), %edx
movl $0x1, %esi
shll %cl, %esi
movl %edx, 0x20(%rax)
movq 0x18(%rbx), %rax
movq (%rax), %rax
shrl $0x5, %ecx
orl %esi, (%rax,%rcx,4)
xorl %eax, %eax
jmp 0x66d2
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3e4e(%rip), %rdi      # 0xa52f
leaq 0x3c11(%rip), %rsi      # 0xa2f9
leaq 0x3e03(%rip), %rcx      # 0xa4f2
movl $0xff, %edx
callq 0x3180
leaq 0x3ddc(%rip), %rdi      # 0xa4dc
leaq 0x3bf2(%rip), %rsi      # 0xa2f9
leaq 0x3de4(%rip), %rcx      # 0xa4f2
movl $0xf6, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::replaceDomainIpv4(char const*, IPv4_Record const&, IPv4_Record const&)
bool DNS_DB::DnsBlock::replaceDomainIpv4(const char * domint, const IPv4_Record & oldrec, const IPv4_Record & newrec) {
	DNS_DB::DnsBlock::InternalBlock * ptr = lookupDomain(domint);
	if (ptr == 0)
		return false;

	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i] == oldrec) {
					ptr->data.domain.records[i] = newrec;
					return true;
				}
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i] == oldrec) {
					ptr->data.records.records[i] = newrec;
					return true;
				}
		}

		ptr++;
	} while ( ptr != endptr && (ptr->header & DNS_DB::DnsBlock::flagUsed) && !(ptr->header & DNS_DB::DnsBlock::flagDomain));

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x62a8
testq %rax, %rax
je 0x6a0b
movb 0x88f4(%rip), %sil      # 0xf279
movl 0x8(%r14), %edi
movl (%r14), %r8d
movl 0x4(%r14), %r9d
movq 0x8(%r15), %r10
movb 0x88dd(%rip), %r11b     # 0xf278
movq %rax, %rdx
addq $0x4, %rdx
testb %sil, (%rax)
je 0x69cb
movl $0x24, %ecx
cmpl %edi, 0x8(%rax,%rcx)
jne 0x69bf
cmpl %r8d, (%rax,%rcx)
jne 0x69bf
cmpl %r9d, 0x4(%rax,%rcx)
je 0x6a0f
addq $0xc, %rcx
cmpq $0x30, %rcx
je 0x69ac
jmp 0x69ea
xorl %ecx, %ecx
cmpl %edi, 0x8(%rdx,%rcx)
jne 0x69e0
cmpl %r8d, (%rdx,%rcx)
jne 0x69e0
cmpl %r9d, 0x4(%rdx,%rcx)
je 0x6a17
addq $0xc, %rcx
cmpq $0x3c, %rcx
jne 0x69cd
addq $0x40, %rax
cmpq %r10, %rax
je 0x6a0b
movb (%rax), %bpl
xorl %ecx, %ecx
testb %sil, %bpl
jne 0x6a28
andb %r11b, %bpl
addq $0x40, %rdx
testb %bpl, %bpl
jne 0x69a2
jmp 0x6a28
xorl %ecx, %ecx
jmp 0x6a28
addq %rcx, %rax
movq %rax, %rdx
jmp 0x6a1a
addq %rcx, %rdx
movl 0x8(%rbx), %eax
movl %eax, 0x8(%rdx)
movq (%rbx), %rax
movq %rax, (%rdx)
movb $0x1, %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::addDomainIpv4_int(char const*, IPv4_Record const&, bool)
bool DNS_DB::DnsBlock::addDomainIpv4_int(const char * domint, const IPv4_Record & iprec, bool ret) {
	DNS_DB::DnsBlock::InternalBlock * ptr = lookupDomain(domint);
	if (ptr == 0)
		return false;

	// Take a look to see whether we can make use of an existing record chain
	do {
		if (ptr->header & DNS_DB::DnsBlock::flagDomain) {
			for (int i = 0; i < 2; i++)
				if (ptr->data.domain.records[i].ip == 0) {
					ptr->data.domain.records[i] = iprec;
					return true;
				}
		}
		else {
			for (int i = 0; i < 5; i++)
				if (ptr->data.records.records[i].ip == 0) {
					ptr->data.records.records[i] = iprec;
					return true;
				}
		}

		ptr++;
	} while ( ptr != endptr && (ptr->header & DNS_DB::DnsBlock::flagUsed) && !(ptr->header & DNS_DB::DnsBlock::flagDomain));

	// We reached here, there is no block which can be reused, try to allocate
	// the next block
	if (ptr != endptr && !(ptr->header & DNS_DB::DnsBlock::flagUsed)) {
		memset(ptr, 0, sizeof(InternalBlock));
		ptr->header = DNS_DB::DnsBlock::flagUsed;
		ptr->data.records.records[0] = iprec;
		updateBM(); // FIXME do this with bit set!
		return true;
	}
	else if (ret) {
		// Try to move blocks away, only once!
		makeRoomMove(domint);
		// Try again now
		return addDomainIpv4_int(domint, iprec, false);
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x62a8
testq %rax, %rax
je 0x6b04
movb 0x880c(%rip), %sil      # 0xf279
movq 0x8(%r14), %rdx
movb 0x8800(%rip), %dil      # 0xf278
movq %rax, %rcx
testb %sil, (%rax)
je 0x6a97
movl $0x2c, %eax
cmpl $0x0, (%rcx,%rax)
je 0x6ae9
addq $0xc, %rax
cmpq $0x38, %rax
je 0x6a85
jmp 0x6aac
movl $0xc, %eax
cmpl $0x0, (%rcx,%rax)
je 0x6ae9
addq $0xc, %rax
cmpq $0x48, %rax
jne 0x6a9c
leaq 0x40(%rcx), %rax
cmpq %rdx, %rax
je 0x6ad1
movb (%rax), %r8b
testb %sil, %r8b
jne 0x6ac2
andb %dil, %r8b
jne 0x6a78
cmpq %rdx, %rax
je 0x6ad1
movb 0x87ab(%rip), %dl       # 0xf278
testb %dl, (%rax)
je 0x6b08
testb $0x1, %bpl
je 0x6b04
movq %r14, %rdi
movq %r15, %rsi
callq 0x6718
xorl %ebp, %ebp
jmp 0x6a52
movl 0x8(%rbx), %edx
movl %edx, (%rcx,%rax)
movq (%rbx), %rdx
movq %rdx, -0x8(%rcx,%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x6af9
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movb %dl, 0x40(%rcx)
movq (%rbx), %rax
movq %rax, 0x44(%rcx)
movl 0x8(%rbx), %eax
movl %eax, 0x4c(%rcx)
movq %r14, %rdi
callq 0x6192
jmp 0x6af7
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::splitBlock(char const*, std::shared_ptr<DNS_DB::DnsBlock>&)
void DNS_DB::DnsBlock::splitBlock(const char * domint, DNS_DB::DnsBlockPtr & newblk) {
	int pos = -1;
	// Just split in 1/16 chunks, to minimize spill
	for (int start = 8*numBlocks/16; start >= 0; start -= numBlocks/16) {
		for (int i = start; i < numBlocks-16; i++) {
			DNS_DB::DnsBlock::InternalBlock * ptr = &blockptr[i];
			if ((ptr->header & DNS_DB::DnsBlock::flagUsed) && (ptr->header & DNS_DB::DnsBlock::flagDomain)) {
				pos = i;
				break;
			}
		}
		if (pos >= 0) break;
	}

	assert(pos >= 0 && pos < numBlocks);

	// Just memcpy the regs after and then zero the old ones
	int regs_after  = numBlocks - pos;
	
	memcpy(newblk->blockptr, &this->blockptr[pos], sizeof(InternalBlock)*regs_after);
	memset(&this->blockptr[pos], 0, sizeof(InternalBlock)*regs_after);

	this->updateBM();
	newblk->updateBM();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl 0x8735(%rip), %eax      # 0xf280
movl %eax, %edx
shrl %edx
andl $0xfffffff, %edx        # imm = 0xFFFFFFF
leal -0x10(%rax), %esi
movq (%rdi), %rdi
movb 0x8716(%rip), %r8b      # 0xf278
movb 0x8710(%rip), %r9b      # 0xf279
movl %eax, %r10d
shrl $0x4, %r10d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %esi, %edx
jae 0x6bba
movl %edx, %r11d
movq %r11, %r15
shlq $0x6, %r15
addq %rdi, %r15
incq %r11
movl %edx, %ebp
movb (%r15), %r12b
testb %r12b, %r8b
sete %r13b
testb %r12b, %r9b
sete %r12b
orb %r13b, %r12b
cmovel %ebp, %ecx
cmpb $0x1, %r12b
jne 0x6bba
incl %ebp
addq $0x40, %r15
leaq 0x1(%r11), %r12
cmpq %rsi, %r11
movq %r12, %r11
jb 0x6b8b
testl %ecx, %ecx
jns 0x6bc3
subl %r10d, %edx
jns 0x6b75
testl %ecx, %ecx
js 0x6c1b
subl %ecx, %eax
jbe 0x6c1b
movq (%rbx), %rdx
movq (%rdx), %rdi
movl %ecx, %r15d
shlq $0x6, %r15
movq (%r14), %rsi
addq %r15, %rsi
movslq %eax, %r12
shlq $0x6, %r12
movq %r12, %rdx
callq 0x3200
addq (%r14), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3140
movq %r14, %rdi
callq 0x6192
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6192
leaq 0x3a18(%rip), %rdi      # 0xa63a
leaq 0x36d0(%rip), %rsi      # 0xa2f9
leaq 0x3a26(%rip), %rcx      # 0xa656
movl $0x1ac, %edx            # imm = 0x1AC
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::getMaxDomain(char*) const
void DNS_DB::DnsBlock::getMaxDomain(char *d) const {
	for (int i = numBlocks-1; i >= 0; i--) {
		if ((blockptr[i].header & flagUsed) && (blockptr[i].header & flagDomain)) {
			memcpy(d, blockptr[i].data.domain.domain, MAX_DNS_SIZE);
			return;
		}
	}
	assert(0 && "getMaxDomain failed");
}

// Assembly:
pushq %rax
movl 0x863f(%rip), %ecx      # 0xf280
decl %ecx
js 0x6cd4
movq (%rdi), %rax
movb 0x8625(%rip), %dil      # 0xf278
movb 0x861f(%rip), %r8b      # 0xf279
movl %ecx, %edx
movq %rdx, %r9
shlq $0x6, %r9
movb (%rax,%r9), %r10b
testb %r10b, %dil
sete %r11b
andb %r8b, %r10b
sete %r10b
orb %r11b, %r10b
cmpb $0x1, %r10b
jne 0x6caf
addq %rax, %r9
addq $-0x40, %r9
testq %rdx, %rdx
setle %cl
jle 0x6cd4
decq %rdx
movb (%r9), %r10b
testb %r10b, %dil
sete %r11b
testb %r10b, %r8b
sete %r10b
orb %r11b, %r10b
addq $-0x40, %r9
testb %r10b, %r10b
jne 0x6c85
jmp 0x6cb2
shrl $0x1f, %ecx
shlq $0x6, %rdx
movl 0x20(%rax,%rdx), %edi
movl %edi, 0x1f(%rsi)
movups 0x1(%rax,%rdx), %xmm0
movups 0x11(%rax,%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
testb %cl, %cl
jne 0x6cd4
popq %rax
retq
leaq 0x39c2(%rip), %rdi      # 0xa69d
leaq 0x3617(%rip), %rsi      # 0xa2f9
leaq 0x39cf(%rip), %rcx      # 0xa6b8
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::getMinDomain(char*) const
void DNS_DB::DnsBlock::getMinDomain(char *d) const {
	for (int i = 0; i < numBlocks; i++) {
		if ((blockptr[i].header & flagUsed) && (blockptr[i].header & flagDomain)) {
			memcpy(d, blockptr[i].data.domain.domain, MAX_DNS_SIZE);
			return;
		}
	}
	assert(0 && "getMinDomain failed");
}

// Assembly:
pushq %rax
movl 0x8585(%rip), %ecx      # 0xf280
testq %rcx, %rcx
setne %r8b
je 0x6d7e
movq (%rdi), %rax
movb 0x856b(%rip), %dl       # 0xf278
movb 0x8565(%rip), %dil      # 0xf279
movb (%rax), %r9b
testb %r9b, %dl
sete %r10b
andb %dil, %r9b
sete %r9b
orb %r10b, %r9b
cmpb $0x1, %r9b
jne 0x6d62
leaq -0x1(%rcx), %r9
xorl %r8d, %r8d
cmpq %r8, %r9
je 0x6d7e
movb 0x40(%rax), %r10b
addq $0x40, %rax
testb %r10b, %dl
sete %r11b
testb %r10b, %dil
sete %r10b
orb %r11b, %r10b
incq %r8
testb %r10b, %r10b
jne 0x6d35
cmpq %rcx, %r8
setb %r8b
movl 0x20(%rax), %ecx
movl %ecx, 0x1f(%rsi)
movups 0x1(%rax), %xmm0
movups 0x11(%rax), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
testb %r8b, %r8b
je 0x6d7e
popq %rax
retq
leaq 0x3965(%rip), %rdi      # 0xa6ea
leaq 0x356d(%rip), %rsi      # 0xa2f9
leaq 0x3972(%rip), %rcx      # 0xa705
movl $0x1c8, %edx            # imm = 0x1C8
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::check() const
void DNS_DB::DnsBlock::check() const {
	char prev[MAX_DNS_SIZE] = {0};
	bool last_empty = true; // Cannot start with IP record
	for (int i = 0; i < numBlocks; i++) {
		// Make sure all domains are in order
		if ((blockptr[i].header & flagUsed) && (blockptr[i].header & flagDomain)) {
			if (!less(prev, blockptr[i].data.domain.domain)) {
				fprintf(stderr, "Error in block %d, unsorted record!\n", blockid);
				memcpy(prev, blockptr[i].data.domain.domain, MAX_DNS_SIZE);
			}
		}
		// Make sure there is no gap between a Domain and IP records
		if ((blockptr[i].header & flagUsed) && !(blockptr[i].header & flagDomain)) {
			if (last_empty) {
				fprintf(stderr, "Error in block %d, hole found!\n", blockid);
			}
		}
		last_empty = ((blockptr[i].header & flagUsed) == 0);
	}

	
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x0, 0x1f(%rsp)
cmpl $0x0, 0x84b9(%rip)      # 0xf280
je 0x6e72
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movb $0x1, %bpl
movl $0x1, %r13d
xorl %r15d, %r15d
movq %rsp, %r12
movq (%rbx), %rsi
movb -0x1(%rsi,%r13), %al
testb %al, 0x8487(%rip)       # 0xf278
je 0x6e0f
testb %al, 0x8480(%rip)       # 0xf279
je 0x6e0f
addq %r13, %rsi
movl $0x23, %edx
movq %r12, %rdi
callq 0x3110
testl %eax, %eax
jns 0x6e5f
movq (%rbx), %rax
movb -0x1(%rax,%r13), %al
testb %al, 0x845b(%rip)       # 0xf278
je 0x6e2f
testb %al, 0x8454(%rip)       # 0xf279
sete %al
andb %bpl, %al
cmpb $0x1, %al
je 0x6e55
movq (%rbx), %rax
movb 0x8440(%rip), %cl       # 0xf278
testb %cl, -0x1(%rax,%r13)
sete %bpl
incq %r15
movl 0x8436(%rip), %eax      # 0xf280
addq $0x40, %r13
cmpq %rax, %r15
jb 0x6de3
jmp 0x6e72
movq %r14, %rdi
callq 0x36cd
jmp 0x6e2f
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x367a
jmp 0x6e0f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::Iterator::Iterator(int, char const*, DNS_DB*)
DNS_DB::DnsBlock::Iterator::Iterator (int blkid, const char * domint, DNS_DB * dbref) : block_id(blkid), db(dbref) {
	DnsBlockPtr block = db->getBlock(blkid);

	if (domint) {
		int r = block->lookupEmptyDomainSpot(domint, &p);
		assert(r == ALREADY_EXISTS);
	}
	else
		p = 0;

	while (&block->blockptr[p] != block->endptr && 
		!( (block->blockptr[p].header & flagDomain) && (block->blockptr[p].header & flagUsed)) ) {

		p++;
	}

	assert(p >= 0 && p < numBlocks);
	assert(block->blockptr[p].header & flagDomain);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %edx
movq %rdi, %rbx
movl %esi, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
leaq 0x8(%rsp), %rdi
movq %rcx, %rsi
callq 0x8060
testq %r14, %r14
je 0x6ede
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x634e
cmpl $-0x2, %eax
je 0x6ee4
leaq 0x38b6(%rip), %rdi      # 0xa77c
leaq 0x342c(%rip), %rsi      # 0xa2f9
leaq 0x38bc(%rip), %rcx      # 0xa790
movl $0x1ed, %edx            # imm = 0x1ED
callq 0x3180
movl $0x0, (%rbx)
movq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rsi
movl (%rbx), %ecx
movslq %ecx, %rdx
movq %rdx, %rax
shlq $0x6, %rax
addq (%rdi), %rax
cmpq %rsi, %rax
je 0x6f30
movb 0x8371(%rip), %dil      # 0xf279
movb 0x8369(%rip), %r8b      # 0xf278
incl %ecx
movb (%rax), %r9b
testb %r9b, %dil
je 0x6f1e
andb %r8b, %r9b
jne 0x6f2e
incq %rdx
movl %ecx, (%rbx)
addq $0x40, %rax
incl %ecx
cmpq %rsi, %rax
jne 0x6f11
movl %edx, %ecx
testl %ecx, %ecx
js 0x6f5d
cmpl 0x8346(%rip), %ecx      # 0xf280
jae 0x6f5d
movb 0x8337(%rip), %cl       # 0xf279
testb %cl, (%rax)
je 0x6f7c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6f55
callq 0x46de
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x386e(%rip), %rdi      # 0xa7d2
leaq 0x338e(%rip), %rsi      # 0xa2f9
leaq 0x381e(%rip), %rcx      # 0xa790
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x3180
leaq 0x3867(%rip), %rdi      # 0xa7ea
leaq 0x336f(%rip), %rsi      # 0xa2f9
leaq 0x37ff(%rip), %rcx      # 0xa790
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::Iterator::next()
void DNS_DB::DnsBlock::Iterator::next() {
	DnsBlockPtr block = db->getBlock(block_id);
	do {
		p++;
	} while (&block->blockptr[p] != block->endptr && 
		!( (block->blockptr[p].header & flagDomain) && (block->blockptr[p].header & flagUsed) ));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movl 0x4(%rdi), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8060
movq (%r14), %rsi
movq 0x8(%rsi), %rcx
movslq (%rbx), %rax
incq %rax
movq %rax, %rdx
shlq $0x6, %rdx
addq (%rsi), %rdx
cmpq %rcx, %rdx
je 0x6ffd
movb 0x829c(%rip), %sil      # 0xf279
movb 0x8294(%rip), %dil      # 0xf278
movb (%rdx), %r8b
testb %r8b, %sil
je 0x6ff1
andb %dil, %r8b
jne 0x6ffd
incq %rax
addq $0x40, %rdx
cmpq %rcx, %rdx
jne 0x6fe4
movl %eax, (%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x700e
callq 0x46de
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::Iterator::end() const
bool DNS_DB::DnsBlock::Iterator::end() const {
	DnsBlockPtr block = db->getBlock(block_id);
	int i = p;
	do {
		i++;
	} while (&block->blockptr[i] != block->endptr && 
		!( (block->blockptr[i].header & flagDomain) && (block->blockptr[i].header & flagUsed) ));

	return &block->blockptr[i] == block->endptr;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movl 0x4(%rdi), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8060
movslq (%rbx), %rsi
movq (%r14), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
shlq $0x6, %rsi
leaq (%rsi,%rdi), %r8
addq $0x40, %r8
cmpq %rax, %r8
sete %bl
je 0x70ab
movb 0x821e(%rip), %cl       # 0xf279
movb 0x8217(%rip), %dl       # 0xf278
movb (%r8), %r8b
testb %r8b, %cl
sete %r9b
andb %dl, %r8b
sete %r8b
orb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x70ab
addq %rdi, %rsi
addq $0x80, %rsi
cmpq %rax, %rsi
sete %bl
je 0x70ab
movb (%rsi), %dil
testb %dil, %cl
sete %r8b
testb %dil, %dl
sete %dil
orb %r8b, %dil
addq $0x40, %rsi
cmpb $0x1, %dil
je 0x7085
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x70ba
callq 0x46de
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::Iterator::getDomain[abi:cxx11]()
std::string DNS_DB::DnsBlock::Iterator::getDomain() {
	char tmp [MAX_DNS_SIZE];
	char tmp2[MAX_DNS_SIZE*2];
	getDomain(tmp);
	idom2domain(tmp, tmp2);
	return std::string(tmp2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x7120
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7567
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x30f0
leaq (%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7436
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/dns_block.cc
// Function: DNS_DB::DnsBlock::Iterator::getDomain(char*)
void DNS_DB::DnsBlock::Iterator::getDomain(char * dom) {
	DnsBlockPtr block = db->getBlock(block_id);
	assert(p >= 0 && p < numBlocks);
	assert(block->blockptr[p].header & flagDomain);
	memcpy(dom, block->blockptr[p].data.domain.domain, MAX_DNS_SIZE);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movl 0x4(%rdi), %edx
leaq 0x8(%rsp), %rdi
callq 0x8060
movslq (%r14), %rax
testq %rax, %rax
js 0x7194
cmpl 0x8134(%rip), %eax      # 0xf280
jae 0x7194
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
shlq $0x6, %rax
movb 0x8119(%rip), %dl       # 0xf279
testb %dl, (%rcx,%rax)
je 0x71b3
movl 0x20(%rcx,%rax), %edx
movl %edx, 0x1f(%rbx)
movups 0x1(%rcx,%rax), %xmm0
movups 0x11(%rcx,%rax), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x718c
callq 0x46de
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3637(%rip), %rdi      # 0xa7d2
leaq 0x3157(%rip), %rsi      # 0xa2f9
leaq 0x3668(%rip), %rcx      # 0xa811
movl $0x219, %edx            # imm = 0x219
callq 0x3180
leaq 0x3630(%rip), %rdi      # 0xa7ea
leaq 0x3138(%rip), %rsi      # 0xa2f9
leaq 0x3649(%rip), %rcx      # 0xa811
movl $0x21a, %edx            # imm = 0x21A
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/util.cc
// Function: domain2idom(char const*, char*)
bool domain2idom(const char * domain, char * intdom) {
	const char * dot = strstr(domain,".");
	if (dot == NULL) return false;

	uintptr_t length = ((uintptr_t)dot) - ((uintptr_t)domain);
	if (length > 34) return false;

	int tldn = -1;
	for (unsigned int i = 0; i < sizeof(tld_domains)/sizeof(tld_domains[0]); i++) {
		if (strcmp(dot+1, tld_domains[i]) == 0) {
			tldn = i;
			break;
		}
	}

	if (tldn < 0) return false;

	memset(intdom, 0, MAX_DNS_SIZE);
	memcpy(intdom, domain, length);
	intdom[length] = (char)tldn;
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x2e, %esi
callq 0x30c0
testq %rax, %rax
je 0x74f7
movq %rax, %r12
movq %rax, %r15
subq %r14, %r15
cmpq $0x22, %r15
jbe 0x74fb
xorl %eax, %eax
jmp 0x7558
incq %r12
leaq 0x7d8b(%rip), %rbp      # 0xf290
xorl %r13d, %r13d
movq (%rbp), %rsi
movq %r12, %rdi
callq 0x3320
testl %eax, %eax
je 0x752b
incq %r13
addq $0x8, %rbp
cmpq $0x12, %r13
jne 0x7508
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %r13d, %r13d
setns %al
js 0x7558
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movl $0x0, 0x1f(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3200
movb %r13b, (%rbx,%r15)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/util.cc
// Function: idom2domain(char const*, char*)
void idom2domain(const char * intdom, char * domain) {
	int length = MAX_DNS_SIZE;
	if (intdom[MAX_DNS_SIZE-1] == 0)
		length = strlen(intdom);

	int ext = (int)intdom[length-1];
	memcpy(domain, intdom, length-1);
	domain[length-1] = '.';
	domain[length] = 0;
	strcat(domain, tld_domains[ext]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x23, %eax
cmpb $0x0, 0x22(%rdi)
jne 0x7588
movq %r14, %rdi
callq 0x30f0
movslq %eax, %r15
leaq -0x1(%r15), %rdx
movsbq -0x1(%r14,%r15), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3200
movw $0x2e, -0x1(%rbx,%r15)
leaq 0x7ce1(%rip), %rax      # 0xf290
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: fileSize(int)
unsigned int fileSize(int fd) {
	off_t c_offset = lseek(fd, 0, SEEK_CUR);
	off_t eof = lseek(fd, 0, SEEK_END);
	lseek(fd, c_offset, SEEK_SET);

	return eof;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
xorl %esi, %esi
movl $0x1, %edx
callq 0x3460
movq %rax, %r14
movl %ebx, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x3460
movq %rax, %r15
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3460
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::mapFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void * DNS_DB::FileMapper::mapFile(const std::string & file) {
	// First of all look whether we have this mapping cached
	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].file == file) {
			files[i].refs++;
			return files[i].ptr;
		}
	}

	// Free some memory
	flushCached();

	// Create a new mapping
	MappedFile f;
	f.refs = 1;
	f.file = file;
	f.fd = open(file.c_str(), O_RDWR);
	f.size = fileSize(f.fd);
	f.ptr = mmap(0, f.size, PROT_READ|PROT_WRITE, MAP_SHARED, f.fd, 0);

	assert(f.fd >= 0);
	assert(f.ptr != 0);

	files.push_back(f);

	return f.ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq (%rdi), %r13
movq %rdi, 0x10(%rsp)
movq 0x8(%rdi), %rax
subq %r13, %rax
setne %bpl
movq %rsi, 0x8(%rsp)
je 0x768b
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rbx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rbx
movq (%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsi), %r14
movl $0x1, %r12d
xorl %ecx, %ecx
imulq $0x38, %rcx, %r15
movq 0x20(%r13,%r15), %rdx
cmpq %r14, %rdx
jne 0x767a
addq %r13, %r15
testq %rdx, %rdx
je 0x768d
movq 0x18(%r15), %rdi
movq 0x18(%rsp), %rsi
callq 0x3260
testl %eax, %eax
je 0x768d
movl %r12d, %ecx
incl %r12d
cmpq %rcx, %rbx
seta %bpl
ja 0x7652
jmp 0x7694
jmp 0x7694
incl (%r15)
movq 0x8(%r15), %rax
testb $0x1, %bpl
jne 0x774c
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x77b4
leaq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0x1, -0x28(%r15)
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x3130
movq (%r14), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
movl %eax, 0x30(%rsp)
movl %eax, %edi
callq 0x75c8
movl %eax, 0x34(%rsp)
movslq %eax, %rsi
movl 0x30(%rsp), %r8d
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x3420
movq %rax, 0x28(%rsp)
cmpl $0x0, 0x30(%rsp)
js 0x775b
testq %rax, %rax
je 0x777a
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7aee
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x774c
movq %rax, %rbx
callq 0x3220
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31c3(%rip), %rdi      # 0xa925
leaq 0x31c6(%rip), %rsi      # 0xa92f
leaq 0x31ce(%rip), %rcx      # 0xa93e
movl $0x2f, %edx
callq 0x3180
leaq 0x31f4(%rip), %rdi      # 0xa975
leaq 0x31a7(%rip), %rsi      # 0xa92f
leaq 0x31af(%rip), %rcx      # 0xa93e
movl $0x30, %edx
callq 0x3180
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x77ab
callq 0x3220
movq %rbx, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::flushCached()
void DNS_DB::FileMapper::flushCached() {
	// Calculate the size of mapped stuff
	int mapped_referenced = 0;
	int mapped_cached = 0;

	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].refs > 0)
			mapped_referenced += files[i].size;
		else
			mapped_cached += files[i].size;
	}

	// Free until we get under the maximum or until no cached stuff is mapped
	while (mapped_referenced + mapped_cached > MAX_MAPPED && mapped_cached > 0) {
		// Look for a victim
		for (unsigned int i = 0; i < files.size(); i++) {
			if (files[i].refs == 0) {
				mapped_cached -= files[i].size;
				this->deallocate(i);
				break;
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movabsq $0x6db6db6db6db6db7, %r14 # imm = 0x6DB6DB6DB6DB6DB7
subq %rax, %rcx
je 0x7811
sarq $0x3, %rcx
imulq %r14, %rcx
xorl %edx, %edx
movl $0x1, %esi
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpl %edx, (%rax)
movl 0x14(%rax), %edi
movl $0x0, %r8d
cmovgl %edi, %r8d
cmovgl %edx, %edi
addl %r8d, %r15d
addl %edi, %r12d
movl %esi, %edi
addq $0x38, %rax
incl %esi
cmpq %rdi, %rcx
ja 0x77ea
jmp 0x7817
xorl %r15d, %r15d
xorl %r12d, %r12d
testl %r12d, %r12d
jle 0x786f
leal (%r12,%r15), %eax
cmpl $0x20000001, %eax       # imm = 0x20000001
jl 0x786f
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
je 0x785f
sarq $0x3, %rcx
imulq %r14, %rcx
xorl %esi, %esi
imulq $0x38, %rsi, %rdx
cmpl $0x0, (%rax,%rdx)
je 0x7850
incl %esi
cmpq %rsi, %rcx
ja 0x783d
jmp 0x785f
addq %rdx, %rax
subl 0x14(%rax), %r12d
movq %rbx, %rdi
callq 0x78ea
testl %r12d, %r12d
jle 0x786f
leal (%r12,%r15), %eax
cmpl $0x20000000, %eax       # imm = 0x20000000
jg 0x7827
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::unmap(void*)
void DNS_DB::FileMapper::unmap(void * ptr) {
	//std::cout << "File mapper debug dump" << std::endl;
	//for (unsigned int i = 0; i < files.size(); i++)
	//	std::cout << files[i].file << " " << files[i].refs << std::endl;
	
	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].ptr == ptr) {
			files[i].refs--;
			return;
		}
	}
	assert(0 && "Couldn't find the mapped file! This should never happen\n");
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
subq %rax, %rdi
setne %cl
je 0x78cb
cmpq %rsi, 0x8(%rax)
je 0x78c3
sarq $0x3, %rdi
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdi, %rdx
movl $0x1, %edi
movl %edi, %edi
cmpq %rdi, %rdx
seta %cl
jbe 0x78cb
imulq $0x38, %rdi, %r8
incl %edi
cmpq %rsi, 0x8(%rax,%r8)
jne 0x78a9
addq %r8, %rax
decl (%rax)
testb %cl, %cl
je 0x78cb
popq %rax
retq
leaq 0x30ae(%rip), %rdi      # 0xa980
leaq 0x3056(%rip), %rsi      # 0xa92f
leaq 0x30e1(%rip), %rcx      # 0xa9c1
movl $0x42, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::deallocate(int)
void DNS_DB::FileMapper::deallocate(int p) {
	MappedFile * f = &files[p];
	// Unmap and free
	assert(f->refs == 0);
	if (munmap(f->ptr, f->size) < 0)
		fprintf(stderr, "Could not unmap file!\n");
	if (close(f->fd) < 0)
		fprintf(stderr, "Could not close file!\n");

	files.erase(files.begin() + p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq %esi, %rax
movq (%rdi), %r15
imulq $0x38, %rax, %r14
cmpl $0x0, (%r15,%r14)
jne 0x7945
movq %rdi, %rbx
addq %r14, %r15
movq 0x8(%r15), %rdi
movslq 0x14(%r15), %rsi
callq 0x3150
testl %eax, %eax
js 0x7937
movl 0x10(%r15), %edi
callq 0x3490
testl %eax, %eax
js 0x793e
addq (%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7dbc
callq 0x371e
jmp 0x7917
callq 0x373a
jmp 0x7924
leaq 0x309c(%rip), %rdi      # 0xa9e8
leaq 0x2fdc(%rip), %rsi      # 0xa92f
leaq 0x309b(%rip), %rcx      # 0xa9f5
movl $0x6a, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::flush(void*)
void DNS_DB::FileMapper::flush(void * ptr) {
	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].ptr == ptr) {
			msync(files[i].ptr, files[i].size, MS_SYNC);
			return;
		}
	}
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
je 0x79a0
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
movl $0x1, %edx
xorl %edi, %edi
imulq $0x38, %rdi, %r8
movq 0x8(%rax,%r8), %rdi
cmpq %rsi, %rdi
je 0x79a1
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x7989
retq
addq %r8, %rax
movslq 0x14(%rax), %rsi
movl $0x4, %edx
jmp 0x3040
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::refinc(void*)
void DNS_DB::FileMapper::refinc(void * ptr) {
	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].ptr == ptr) {
			files[i].refs++;
			return;
		}
	}
	assert(0 && "Couldn't find the mapped pointer! This should never happen\n");
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
subq %rax, %rdi
setne %cl
je 0x7a5f
cmpq %rsi, 0x8(%rax)
je 0x7a57
sarq $0x3, %rdi
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdi, %rdx
movl $0x1, %edi
movl %edi, %edi
cmpq %rdi, %rdx
seta %cl
jbe 0x7a5f
imulq $0x38, %rdi, %r8
incl %edi
cmpq %rsi, 0x8(%rax,%r8)
jne 0x7a3d
addq %r8, %rax
incl (%rax)
testb %cl, %cl
je 0x7a5f
popq %rax
retq
leaq 0x2fe9(%rip), %rdi      # 0xaa4f
leaq 0x2ec2(%rip), %rsi      # 0xa92f
leaq 0x301f(%rip), %rcx      # 0xaa93
movl $0x88, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::getRefs(void*) const
int DNS_DB::FileMapper::getRefs(void * ptr) const {
	for (unsigned int i = 0; i < files.size(); i++) {
		if (files[i].ptr == ptr) {
			return files[i].refs;
		}
	}
	assert(0 && "Couldn't find the mapped pointer! This should never happen\n");
	return -1;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
subq %rax, %rdi
setne %cl
je 0x7ac9
cmpq %rsi, 0x8(%rax)
je 0x7ac5
sarq $0x3, %rdi
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdi, %rdx
movl $0x1, %edi
movl %edi, %edi
cmpq %rdi, %rdx
seta %cl
jbe 0x7ac9
imulq $0x38, %rdi, %r8
incl %edi
cmpq %rsi, 0x8(%rax,%r8)
jne 0x7aab
addq %r8, %rax
movl (%rax), %eax
jmp 0x7ac9
testb %cl, %cl
je 0x7acf
popq %rcx
retq
leaq 0x2f79(%rip), %rdi      # 0xaa4f
leaq 0x2e52(%rip), %rsi      # 0xa92f
leaq 0x2fd7(%rip), %rcx      # 0xaabb
movl $0x91, %edx
callq 0x3180