LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl 0x87f6(%rip), %eax      # 0xf280
movl %eax, %ecx
shrl %ecx
andl $0xfffffff, %ecx        # imm = 0xFFFFFFF
leal -0x10(%rax), %edx
movq (%rdi), %rsi
movb 0x87d7(%rip), %dil      # 0xf278
movb 0x87d1(%rip), %r8b      # 0xf279
movl %eax, %r9d
shrl $0x4, %r9d
cmpl %edx, %ecx
jae 0x6ad9
movl %ecx, %r15d
movq %r15, %r10
shlq $0x6, %r10
addq %rsi, %r10
movb (%r10), %r11b
testb %r11b, %dil
je 0x6acd
andb %r8b, %r11b
jne 0x6afd
incq %r15
addq $0x40, %r10
cmpq %rdx, %r15
jb 0x6ac0
subl %r9d, %ecx
jns 0x6aaf
leaq 0x3b55(%rip), %rdi      # 0xa63a
leaq 0x380d(%rip), %rsi      # 0xa2f9
leaq 0x3b63(%rip), %rcx      # 0xa656
movl $0x1ac, %edx            # imm = 0x1AC
callq 0x3180
testl %r15d, %r15d
js 0x6ade
subl %r15d, %eax
jbe 0x6ade
movq (%rbx), %rcx
movq (%rcx), %rdi
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
shlq $0x6, %r15
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 0x610a
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x610a
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8723(%rip), %edx      # 0xf280
decl %edx
js 0x6b97
movq (%rdi), %r8
movb 0x870e(%rip), %al       # 0xf278
movb 0x8709(%rip), %cl       # 0xf279
movl %edx, %edx
leaq 0x1(%rdx), %rdi
shlq $0x6, %rdx
addq %r8, %rdx
incq %rdx
movb -0x1(%rdx), %r8b
testb %r8b, %al
je 0x6b8e
andb %cl, %r8b
jne 0x6bb6
addq $-0x40, %rdx
decq %rdi
jg 0x6b80
leaq 0x3aff(%rip), %rdi      # 0xa69d
leaq 0x3754(%rip), %rsi      # 0xa2f9
leaq 0x3b0c(%rip), %rcx      # 0xa6b8
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x3180
movl 0x1f(%rdx), %eax
movl %eax, 0x1f(%rsi)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x86ad(%rip), %eax      # 0xf280
testq %rax, %rax
je 0x6c06
movq (%rdi), %rcx
movb 0x8696(%rip), %dil      # 0xf278
movb 0x8690(%rip), %r8b      # 0xf279
shlq $0x6, %rax
xorl %edx, %edx
movb (%rcx,%rdx), %r9b
testb %r9b, %dil
je 0x6bfd
andb %r8b, %r9b
jne 0x6c25
addq $0x40, %rdx
cmpq %rdx, %rax
jne 0x6bef
leaq 0x3add(%rip), %rdi      # 0xa6ea
leaq 0x36e5(%rip), %rsi      # 0xa2f9
leaq 0x3aea(%rip), %rcx      # 0xa705
movl $0x1c8, %edx            # imm = 0x1C8
callq 0x3180
movl 0x20(%rcx,%rdx), %eax
movl %eax, 0x1f(%rsi)
movups 0x1(%rcx,%rdx), %xmm0
movups 0x11(%rcx,%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x0, 0x2f(%rsp)
cmpl $0x0, 0x8611(%rip)      # 0xf280
je 0x6d7a
movq 0x8(%rsp), %rax
movq (%rax), %r14
movb $0x1, %bl
movl $0x1, %r13d
movb 0x85ec(%rip), %bpl      # 0xf278
xorl %r12d, %r12d
movb -0x1(%r14,%r13), %r15b
testb %r15b, %bpl
je 0x6ccd
testb %r15b, 0x85d9(%rip)     # 0xf279
je 0x6cb9
leaq (%r14,%r13), %rsi
movl $0x23, %edx
leaq 0x10(%rsp), %rdi
callq 0x3110
testl %eax, %eax
jns 0x6d1c
testb %r15b, 0x85b9(%rip)     # 0xf279
sete %al
andb %bl, %al
cmpb $0x1, %al
je 0x6ce8
xorl %eax, %eax
jmp 0x6ccf
movb $0x1, %al
incq %r12
movl 0x85a8(%rip), %ecx      # 0xf280
addq $0x40, %r13
movl %eax, %ebx
cmpq %rcx, %r12
jb 0x6c8f
jmp 0x6d7a
movq 0x82e1(%rip), %rax      # 0xefd0
movq (%rax), %rdi
movq 0x8(%rsp), %rbx
movl 0x10(%rbx), %edx
leaq 0x3a5b(%rip), %rsi      # 0xa75c
xorl %eax, %eax
callq 0x3340
movq (%rbx), %r14
movb 0x8566(%rip), %bpl      # 0xf278
testb %bpl, -0x1(%r14,%r13)
sete %al
jmp 0x6ccf
movq 0x82ad(%rip), %rax      # 0xefd0
movq (%rax), %rdi
movq 0x8(%rsp), %r14
movl 0x10(%r14), %edx
leaq 0x3a01(%rip), %rsi      # 0xa737
xorl %eax, %eax
callq 0x3340
movq (%r14), %r14
movl 0x1f(%r14,%r13), %eax
movl %eax, 0x2f(%rsp)
movups (%r14,%r13), %xmm0
movups 0x10(%r14,%r13), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movb -0x1(%r14,%r13), %r15b
movb 0x850e(%rip), %bpl      # 0xf278
movb $0x1, %al
testb %r15b, %bpl
jne 0x6cb9
jmp 0x6ccf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %edx
movq %rdi, %rbx
movl %esi, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
movq %rsp, %rdi
movq %rcx, %rsi
callq 0x7e88
testq %r15, %r15
je 0x6dd1
movq (%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x62c6
cmpl $-0x2, %eax
jne 0x6e85
movl (%rbx), %eax
jmp 0x6ddd
movl $0x0, (%rbx)
xorl %eax, %eax
movq (%rsp), %r14
movq 0x8(%r14), %rdx
movslq %eax, %rcx
shlq $0x6, %rcx
addq (%r14), %rcx
cmpq %rdx, %rcx
je 0x6e18
movb 0x8482(%rip), %sil      # 0xf279
movb 0x847a(%rip), %dil      # 0xf278
movb (%rcx), %r8b
testb %r8b, %sil
je 0x6e0b
andb %dil, %r8b
jne 0x6e18
incl %eax
movl %eax, (%rbx)
addq $0x40, %rcx
cmpq %rdx, %rcx
jne 0x6dfe
testl %eax, %eax
js 0x6e47
cmpl 0x845e(%rip), %eax      # 0xf280
jae 0x6e47
movb 0x844f(%rip), %al       # 0xf279
testb %al, (%rcx)
je 0x6e66
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e3d
callq 0x4628
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3984(%rip), %rdi      # 0xa7d2
leaq 0x34a4(%rip), %rsi      # 0xa2f9
leaq 0x3934(%rip), %rcx      # 0xa790
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x3180
leaq 0x397d(%rip), %rdi      # 0xa7ea
leaq 0x3485(%rip), %rsi      # 0xa2f9
leaq 0x3915(%rip), %rcx      # 0xa790
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x3180
leaq 0x38f0(%rip), %rdi      # 0xa77c
leaq 0x3466(%rip), %rsi      # 0xa2f9
leaq 0x38f6(%rip), %rcx      # 0xa790
movl $0x1ed, %edx            # imm = 0x1ED
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e88
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 0x6f05
movb 0x8394(%rip), %sil      # 0xf279
movb 0x838c(%rip), %dil      # 0xf278
movb (%rdx), %r8b
testb %r8b, %sil
je 0x6ef9
andb %dil, %r8b
jne 0x6f05
incq %rax
addq $0x40, %rdx
cmpq %rcx, %rdx
jne 0x6eec
movl %eax, (%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6f16
callq 0x4628
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e88
movslq (%rbx), %rcx
movq (%r14), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rax
shlq $0x6, %rcx
addq %rdx, %rcx
addq $0x40, %rcx
cmpq %rax, %rcx
je 0x6f89
movb 0x831a(%rip), %dl       # 0xf279
movb 0x8312(%rip), %sil      # 0xf278
movb (%rcx), %dil
testb %dil, %dl
sete %r8b
testb %dil, %sil
sete %bl
orb %r8b, %bl
cmpb $0x1, %bl
jne 0x6f8b
addq $0x40, %rcx
cmpq %rax, %rcx
jne 0x6f66
jmp 0x6f8b
movb $0x1, %bl
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6f9a
callq 0x4628
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7000
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x743d
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x30f0
leaq (%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7316
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e88
movslq (%r14), %rax
testq %rax, %rax
js 0x7074
cmpl 0x8254(%rip), %eax      # 0xf280
jae 0x7074
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
shlq $0x6, %rax
movb 0x8239(%rip), %dl       # 0xf279
testb %dl, (%rcx,%rax)
je 0x7093
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 0x706c
callq 0x4628
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3757(%rip), %rdi      # 0xa7d2
leaq 0x3277(%rip), %rsi      # 0xa2f9
leaq 0x3788(%rip), %rcx      # 0xa811
movl $0x219, %edx            # imm = 0x219
callq 0x3180
leaq 0x3750(%rip), %rdi      # 0xa7ea
leaq 0x3258(%rip), %rsi      # 0xa2f9
leaq 0x3769(%rip), %rcx      # 0xa811
movl $0x21a, %edx            # imm = 0x21A
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7405
movq %rax, %r12
movq %rax, %r15
subq %r14, %r15
cmpq $0x22, %r15
ja 0x7405
incq %r12
leaq 0x7eab(%rip), %rbp      # 0xf290
xorl %r13d, %r13d
movq (%rbp), %rsi
movq %r12, %rdi
callq 0x3320
testl %eax, %eax
je 0x7416
incq %r13
addq $0x8, %rbp
cmpq $0x12, %r13
jne 0x73e8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
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
jmp 0x7407
// File: /workspace/github_cpp_makefile_star2_O3/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 0x745e
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 0x7e0b(%rip), %rax      # 0xf290
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movq %rsi, (%rsp)
movq (%rdi), %r13
movq %rdi, 0x8(%rsp)
movq 0x8(%rdi), %rax
subq %r13, %rax
je 0x7556
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rbp # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rbp
movq (%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movl $0x1, %ebx
xorl %eax, %eax
imulq $0x38, %rax, %r14
cmpq %r12, 0x20(%r13,%r14)
jne 0x754d
addq %r13, %r14
testq %r12, %r12
je 0x75ff
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3260
testl %eax, %eax
je 0x75ff
movl %ebx, %eax
incl %ebx
cmpq %rax, %rbp
ja 0x751f
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x7670
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0x1, -0x28(%r15)
movq (%rsp), %r14
movq %r14, %rsi
callq 0x3130
movq (%r14), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
movl %eax, 0x20(%rsp)
movl %eax, %edi
callq 0x749c
movl %eax, 0x24(%rsp)
movslq %eax, %rsi
movl 0x20(%rsp), %r8d
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x3420
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x20(%rsp)
js 0x7618
testq %rax, %rax
je 0x7637
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x797a
movq 0x18(%rsp), %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x7606
callq 0x3220
jmp 0x7606
incl (%r14)
movq 0x8(%r14), %rbx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3306(%rip), %rdi      # 0xa925
leaq 0x3309(%rip), %rsi      # 0xa92f
leaq 0x3311(%rip), %rcx      # 0xa93e
movl $0x2f, %edx
callq 0x3180
leaq 0x3337(%rip), %rdi      # 0xa975
leaq 0x32ea(%rip), %rsi      # 0xa92f
leaq 0x32f2(%rip), %rcx      # 0xa93e
movl $0x30, %edx
callq 0x3180
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x7668
callq 0x3220
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x7732
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %r14 # imm = 0x6DB6DB6DB6DB6DB7
imulq %r14, %rcx
xorl %edx, %edx
movl $0x1, %esi
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpl %edx, (%rax)
movl 0x14(%rax), %edi
movl $0x0, %r8d
cmovgl %edi, %r8d
cmovgl %edx, %edi
addl %r8d, %r12d
addl %edi, %r15d
movl %esi, %edi
addq $0x38, %rax
incl %esi
cmpq %rdi, %rcx
ja 0x76aa
testl %r15d, %r15d
jle 0x7727
leal (%r15,%r12), %eax
cmpl $0x20000001, %eax       # imm = 0x20000001
jl 0x7727
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
je 0x7717
sarq $0x3, %rcx
imulq %r14, %rcx
xorl %esi, %esi
imulq $0x38, %rsi, %rdx
cmpl $0x0, (%rax,%rdx)
je 0x7708
incl %esi
cmpq %rsi, %rcx
ja 0x76f5
jmp 0x7717
addq %rdx, %rax
subl 0x14(%rax), %r15d
movq %rbx, %rdi
callq 0x7794
testl %r15d, %r15d
jle 0x7727
leal (%r15,%r12), %eax
cmpl $0x20000000, %eax       # imm = 0x20000000
jg 0x76df
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %rdx
subq %rax, %rdx
je 0x776e
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
movl $0x1, %edx
xorl %edi, %edi
imulq $0x38, %rdi, %rdi
cmpq %rsi, 0x8(%rax,%rdi)
je 0x778d
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x775a
leaq 0x320b(%rip), %rdi      # 0xa980
leaq 0x31b3(%rip), %rsi      # 0xa92f
leaq 0x323e(%rip), %rcx      # 0xa9c1
movl $0x42, %edx
callq 0x3180
addq %rdi, %rax
decl (%rax)
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x77ef
movq %rdi, %rbx
addq %r14, %r15
movq 0x8(%r15), %rdi
movslq 0x14(%r15), %rsi
callq 0x3150
testl %eax, %eax
js 0x77e1
movl 0x10(%r15), %edi
callq 0x3490
testl %eax, %eax
js 0x77e8
addq (%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7c24
callq 0x3659
jmp 0x77c1
callq 0x3675
jmp 0x77ce
leaq 0x31f2(%rip), %rdi      # 0xa9e8
leaq 0x3132(%rip), %rsi      # 0xa92f
leaq 0x31f1(%rip), %rcx      # 0xa9f5
movl $0x6a, %edx
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O3/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 0x784a
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 0x784b
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x7833
retq
addq %r8, %rax
movslq 0x14(%rax), %rsi
movl $0x4, %edx
jmp 0x3040
// File: /workspace/github_cpp_makefile_star2_O3/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), %rdx
subq %rax, %rdx
je 0x78f4
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
movl $0x1, %edx
xorl %edi, %edi
imulq $0x38, %rdi, %rdi
cmpq %rsi, 0x8(%rax,%rdi)
je 0x7913
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x78e0
leaq 0x3154(%rip), %rdi      # 0xaa4f
leaq 0x302d(%rip), %rsi      # 0xa92f
leaq 0x318a(%rip), %rcx      # 0xaa93
movl $0x88, %edx
callq 0x3180
addq %rdi, %rax
incl (%rax)
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rdx
subq %rax, %rdx
je 0x7954
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rdx, %rcx
movl $0x1, %edx
xorl %edi, %edi
imulq $0x38, %rdi, %rdi
cmpq %rsi, 0x8(%rax,%rdi)
je 0x7973
movl %edx, %edi
incl %edx
cmpq %rdi, %rcx
ja 0x7940
leaq 0x30f4(%rip), %rdi      # 0xaa4f
leaq 0x2fcd(%rip), %rsi      # 0xa92f
leaq 0x3152(%rip), %rcx      # 0xaabb
movl $0x91, %edx
callq 0x3180
addq %rdi, %rax
movl (%rax), %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/bitmap.cc
// Function: DNS_DB::Bitmap::getFirst(bool) const
int DNS_DB::Bitmap::getFirst(bool value) const {
	for (unsigned int idx = 0; idx < bitm.size(); idx++) {
		for (unsigned int off = 0; off < sizeof(unsigned int)*8; off++) {
			if (((bitm[idx] & (1<<off)) != 0) == value)
				return idx*sizeof(unsigned int)*8 + off;
		}
	}
	return -1;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subq %rcx, %rdx
je 0x7d24
sarq $0x2, %rdx
xorl %edi, %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
movl (%rcx,%r9,4), %r10d
xorl %r9d, %r9d
btl %r9d, %r10d
setb %r11b
cmpb %sil, %r11b
je 0x7d1e
incl %r9d
cmpl $0x20, %r9d
jne 0x7cf8
incl %r8d
addl $-0x20, %edi
movq %r8, %r9
cmpq %r8, %rdx
ja 0x7cf1
jmp 0x7d24
subl %edi, %r9d
movl %r9d, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/bitmap.cc
// Function: DNS_DB::Bitmap::getRightSet(unsigned int) const
int DNS_DB::Bitmap::getRightSet(unsigned int pos) const {
	unsigned int residue = pos%(8*sizeof(unsigned int));
	unsigned int mask = ((~0)<<residue);
	for (unsigned int idx = pos/(8*sizeof(unsigned int)); idx < bitm.size(); idx++) {
		unsigned int val = bitm[idx] & mask;
		if (val != 0) {
			unsigned int off = __builtin_ctz(val);
			return idx*sizeof(unsigned int)*8 + off;
		}
		mask = ~0;
	}
	return -1;
}

// Assembly:
movl %esi, %r8d
shrl $0x5, %r8d
movq (%rdi), %rdx
movq 0x8(%rdi), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %r8, %rdi
jbe 0x7d6b
movl %esi, %ecx
shll %cl, %eax
movl %r8d, %ecx
shll $0x5, %ecx
leal 0x1(%r8), %esi
andl (%rdx,%r8,4), %eax
jne 0x7d6c
movl %esi, %r8d
addl $0x20, %ecx
incl %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %r8, %rdi
ja 0x7d53
retq
bsfl %eax, %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/bitmap.cc
// Function: DNS_DB::Bitmap::bitCount() const
int DNS_DB::Bitmap::bitCount() const {
	int ret = 0;
	for (unsigned int i = 0; i < bitm.size(); i++) {
		ret += __builtin_popcount(bitm[i]);
	}
	return ret;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
je 0x7dda
sarq $0x2, %rdx
xorl %esi, %esi
movl $0x33333333, %edi       # imm = 0x33333333
xorl %eax, %eax
movl (%rcx,%rsi,4), %r8d
movl %r8d, %r9d
shrl %r9d
andl $0x55555555, %r9d       # imm = 0x55555555
subl %r9d, %r8d
movl %r8d, %r9d
andl %edi, %r9d
shrl $0x2, %r8d
andl %edi, %r8d
addl %r9d, %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
addl %r8d, %r9d
andl $0xf0f0f0f, %r9d        # imm = 0xF0F0F0F
imull $0x1010101, %r9d, %r8d  # imm = 0x1010101
shrl $0x18, %r8d
addl %r8d, %eax
incq %rsi
movl %esi, %r8d
cmpq %r8, %rdx
ja 0x7d8b
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/block_manager.cc
// Function: DNS_DB::BlockManager::getBlock(int)
DNS_DB::DnsBlockPtr DNS_DB::BlockManager::getBlock(int id) {
	if (blocks.find(id) == blocks.end()) {
		DnsBlock * nbl = db->getNewBlock(id);
		CachedBlock cb;
		cb.b.reset(nbl);
		
		blocks.insert({id, cb});

		if (blocks.size() > BlockManager_flush_trigger)
			flushUnusedBlocks();
	}
	return blocks.at(id).b;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x7ed1
leaq 0x8(%r14), %rdx
movq %rdx, %rcx
xorl %esi, %esi
cmpl %ebp, 0x20(%rax)
setl %sil
cmovgeq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x7eac
cmpq %rdx, %rcx
je 0x7ed1
cmpl %ebp, 0x20(%rcx)
jle 0x7f6f
movq 0x38(%r14), %rdi
movl %ebp, %esi
callq 0x3c36
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rax, %rsi
callq 0x80a8
movl %ebp, 0x30(%rsp)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x7f29
movq 0x70a5(%rip), %rcx      # 0xefc0
cmpb $0x0, (%rcx)
je 0x7f25
incl 0x8(%rax)
jmp 0x7f29
lock
incl 0x8(%rax)
movq 0x20(%rsp), %rax
leaq 0x30(%rsp), %rsi
movq %rax, 0x18(%rsi)
movq %r14, %rdi
callq 0x81da
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7f4e
callq 0x4628
cmpq $0x281, 0x28(%r14)      # imm = 0x281
jb 0x7f60
movq %r14, %rdi
callq 0x7fde
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7f6f
callq 0x4628
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x80ec
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x7fa4
movq 0x702a(%rip), %rcx      # 0xefc0
cmpb $0x0, (%rcx)
je 0x7fa0
incl 0x8(%rax)
jmp 0x7fa4
lock
incl 0x8(%rax)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7fc7
callq 0x4628
jmp 0x7fc7
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7fd6
callq 0x4628
movq %rbx, %rdi
callq 0x3400
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/block_manager.cc
// Function: DNS_DB::BlockManager::flushUnusedBlocks()
void DNS_DB::BlockManager::flushUnusedBlocks() {
	// Remove the blocks with less "t"
	while (blocks.size() > BlockManager_flush_maximum) {
		// Look for candidate:
		unsigned long min = (unsigned)~0;
		std::map < int, CachedBlock >::iterator cand = blocks.end();
		for (std::map< int, CachedBlock >::iterator it = blocks.begin(); it != blocks.end(); ++it) {
			if (it->second.t < min) {
				if (it->second.b.use_count() == 1) {
					cand = it;
					min = it->second.t;
				}
			}
		}

		// Now delete this block if there is only one reference to it
		if (min != (unsigned)~0) {
			assert(cand->second.b.use_count() == 1);
			blocks.erase(cand);
		}
		else
			break;
	}

	// Make sure no repeated IDs
	#ifdef EXTRA_CHECK
	std::map <int,int> rep;
	for (std::map< int, CachedBlock >::iterator it = blocks.begin(); it != blocks.end(); ++it) {
		int id = it->second.b->getID();
		assert (rep[id] == 0);
		rep[id]++;
	}
	#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq $0x201, 0x28(%rdi)      # imm = 0x201
jb 0x807e
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq 0x18(%rdi), %rax
cmpq %r15, %rax
je 0x807e
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %r15, %r14
movq 0x38(%rax), %rcx
cmpq %r13, %rcx
jae 0x8034
movq 0x30(%rax), %rdx
testq %rdx, %rdx
je 0x8034
movl 0x8(%rdx), %edx
cmpl $0x1, %edx
cmoveq %rax, %r14
cmoveq %rcx, %r13
movq %rax, %rdi
callq 0x31b0
cmpq %r15, %rax
jne 0x8014
cmpq %r12, %r13
je 0x807e
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x8088
movl 0x8(%rax), %eax
cmpl $0x1, %eax
jne 0x8088
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8308
cmpq $0x201, 0x28(%rbx)      # imm = 0x201
jb 0x807e
movq 0x18(%rbx), %rax
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %r15, %r14
cmpq %r15, %rax
jne 0x8014
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2a8b(%rip), %rdi      # 0xab1a
leaq 0x2aa4(%rip), %rsi      # 0xab3a
leaq 0x2aae(%rip), %rcx      # 0xab4b
movl $0x24, %edx
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/./dns_db.h
// Function: DNS_DB::DnsIndex::Iterator::next()
void next() {
				if (block_it.end()) {
					p++;
					block_it = idx->getBlock(p)->getIterator(db, 0);
				}
				else
					block_it.next();
			}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x6f1e
testb %al, %al
je 0x8db4
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rcx
movq (%rcx), %rdx
movq 0x18(%rcx), %rsi
cltq
imulq $0x4a, %rax, %rax
movl 0x46(%rdx,%rax), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x7e88
movq (%r14), %rax
movq 0x20(%rbx), %rcx
movl 0x10(%rax), %esi
leaq 0x18(%rsp), %rdi
xorl %edx, %edx
callq 0x6d8a
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8dac
callq 0x4628
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x6ea4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8dd5
callq 0x4628
movq %rbx, %rdi
callq 0x3400
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/ext/gzstream.cc
// Function: gzstreambuf::close()
gzstreambuf * gzstreambuf::close() {
    if ( is_open()) {
        sync();
        opened = 0;
        if ( gzclose( file) == Z_OK)
            return this;
    }
    return (gzstreambuf*)0;
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x177(%rdi)
je 0x8ee7
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x30(%rax)
movb $0x0, 0x177(%rbx)
movq 0x40(%rbx), %rdi
callq 0x33d0
testl %eax, %eax
je 0x8ee9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidgfnet[P]dns-db/ext/gzstream.cc
// Function: gzstreambuf::overflow(int)
int gzstreambuf::overflow( int c) { // used for output buffer only
    if ( ! ( mode & std::ios::out) || ! opened)
        return EOF;
    if (c != EOF) {
        *pptr() = c;
        pbump(1);
    }
    if ( flush_buffer() == EOF)
        return EOF;
    return c;
}

// Assembly:
testb $0x10, 0x178(%rdi)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
je 0x8fff
cmpb $0x0, 0x177(%rdi)
je 0x8fff
pushq %rbx
movl %esi, %ebx
cmpl $-0x1, %esi
je 0x8ff1
movq 0x28(%rdi), %rax
movb %bl, (%rax)
incq 0x28(%rdi)
callq 0x8f88
cmpl $-0x1, %eax
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/hdlguy[P]fft_demo/fft.cpp
// Function: Fft::convolve(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>>&)
void Fft::convolve(const vector<double> &x, const vector<double> &y, vector<double> &out) {
	if (x.size() != y.size() || x.size() != out.size())
		throw "Mismatched lengths";
	size_t n = x.size();
	vector<double> ximag(n), yimag(n), zimag(n);
	convolve(x, ximag, y, yimag, out, zimag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq 0x8(%rdi), %r12
subq (%rdi), %r12
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq %rax, %r12
jne 0x1e1f
movq %rdx, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
cmpq %rax, %r12
jne 0x1e1f
movq %rsi, %r14
movq %rdi, %r15
sarq $0x3, %r12
leaq -0x70(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %r12, %rsi
callq 0x1e84
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r12, %rsi
callq 0x1e84
leaq -0x40(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %r12, %rsi
callq 0x1e84
leaq -0x70(%rbp), %rsi
leaq -0x58(%rbp), %rcx
leaq -0x40(%rbp), %r9
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %r8
callq 0x1abd
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1df6
callq 0x10c0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x1e04
callq 0x10c0
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x1e12
callq 0x10c0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x1070
leaq 0x1210(%rip), %rcx      # 0x3040
movq %rcx, (%rax)
movq 0x318e(%rip), %rsi      # 0x4fc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x1140
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1e5a
callq 0x10c0
jmp 0x1e5a
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x1e6d
callq 0x10c0
jmp 0x1e6d
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x1e7b
callq 0x10c0
movq %rbx, %rdi
callq 0x1160
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::GetOppositeCond(arm::Cond)
Cond GetOppositeCond(Cond cond) {
  switch (cond) {
    case Cond::AL:
      return Cond::AL;
    case Cond::EQ:
      return Cond::NE;
    case Cond::NE:
      return Cond::EQ;
    case Cond::GT:
      return Cond::LE;
    case Cond::GE:
      return Cond::LT;
    case Cond::LT:
      return Cond::GE;
    case Cond::LE:
      return Cond::GT;
    default:
      MyAssert(0);
      break;
  }
}

// Assembly:
cmpl $0x7, %edi
jae 0x9a5e
movl %edi, %eax
leaq 0x6463a(%rip), %rcx     # 0x6e094
movl (%rcx,%rax,4), %eax
retq
pushq %rax
movq 0x85582(%rip), %rdi     # 0x8efe8
leaq 0x646fb(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x646f8(%rip), %rsi     # 0x6e171
movq %rax, %rdi
callq 0x8280
leaq 0x65938(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x1d, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::CondToString[abi:cxx11](arm::Cond)
std::string CondToString(Cond cond) {
  switch (cond) {
    case Cond::AL:
      return "";
    case Cond::EQ:
      return "eq";
    case Cond::NE:
      return "ne";
    case Cond::GT:
      return "gt";
    case Cond::GE:
      return "ge";
    case Cond::LT:
      return "lt";
    case Cond::LE:
      return "le";
    default:
      MyAssert(0);
      break;
  }
  return "";
}

// Assembly:
pushq %rbx
cmpl $0x6, %esi
ja 0x9b7c
movq %rdi, %rbx
movl %esi, %eax
leaq 0x64543(%rip), %rcx     # 0x6e008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x646ed(%rip), %rdx     # 0x6e1c9
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x9b72
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x657c3(%rip), %rsi     # 0x6f2b8
leaq 0x657be(%rip), %rdx     # 0x6f2ba
jmp 0x9b6f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x66698(%rip), %rsi     # 0x701a4
leaq 0x66693(%rip), %rdx     # 0x701a6
jmp 0x9b6f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x65791(%rip), %rsi     # 0x6f2b4
leaq 0x6578c(%rip), %rdx     # 0x6f2b6
jmp 0x9b6f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6576a(%rip), %rsi     # 0x6f2a4
leaq 0x65765(%rip), %rdx     # 0x6f2a6
jmp 0x9b6f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x6575b(%rip), %rsi     # 0x6f2ac
leaq 0x65756(%rip), %rdx     # 0x6f2ae
jmp 0x9b6f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x64e8a(%rip), %rsi     # 0x6e9f2
leaq 0x64e85(%rip), %rdx     # 0x6e9f4
movq %rbx, %rdi
callq 0xc772
movq %rbx, %rax
popq %rbx
retq
movq 0x85465(%rip), %rdi     # 0x8efe8
leaq 0x645de(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x645db(%rip), %rsi     # 0x6e171
movq %rax, %rdi
callq 0x8280
leaq 0x6581b(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x33, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::Operand2::CheckImm8m(int)
bool Operand2::CheckImm8m(int imm) {
  // NOTE: assign a int to unsigned int
  unsigned int encoding = imm;
  for (int ror = 0; ror < 32; ror += 2) {
    // 如果encoding的前24bit都是0 说明imm能被表示成一个8bit循环右移偶数位得到
    if (!(encoding & ~0xFFu)) {
      return true;
    }
    encoding = (encoding << 30u) | (encoding >> 2u);
  }
  return false;
}

// Assembly:
movb $0x1, %al
cmpl $0x100, %edi            # imm = 0x100
jb 0xa3ee
xorl %ecx, %ecx
cmpl $0x1e, %ecx
setb %al
jae 0xa3ee
roll $0x1e, %edi
addl $0x2, %ecx
cmpl $0xff, %edi
ja 0xa3d8
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::Instruction::Instruction(arm::Instruction*)
Instruction::Instruction(Instruction* inst) : parent_(inst->parent_) {
  auto& inst_list = parent_->inst_list_;
  auto it = std::find(inst_list.begin(), inst_list.end(), inst);
  MyAssert(it != inst_list.end());
  inst_list.insert(it, this);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
leaq 0x82f15(%rip), %rax     # 0x8d380
movq %rax, (%rdi)
movq 0x8(%rsi), %r14
movq %r14, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
movq 0x30(%r14), %rdi
movq 0x38(%r14), %rsi
callq 0xc97b
cmpq 0x38(%r14), %rax
je 0xa4af
addq $0x30, %r14
leaq 0x8(%rsp), %rdx
movq %rbx, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0xca26
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x84b32(%rip), %rdi     # 0x8efe8
leaq 0x63cab(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x63ca8(%rip), %rsi     # 0x6e171
movq %rax, %rdi
callq 0x8280
leaq 0x64ee8(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x6f, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::Branch::IsCall()
bool Branch::IsCall() {
  // 所有的标签都要由.开头
  if (this->has_l_ && this->label_.size() > 0 && this->label_ != "lr" && this->label_[0] != '.') {
    return true;
  } else {
    return false;
  }
}

// Assembly:
pushq %rbx
cmpb $0x1, 0x38(%rdi)
jne 0xab8c
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0xab8c
addq $0x18, %rbx
leaq 0x63658(%rip), %rsi     # 0x6e1ce
movq %rbx, %rdi
callq 0x8100
testl %eax, %eax
je 0xab8c
movq (%rbx), %rcx
movb $0x1, %al
cmpb $0x2e, (%rcx)
jne 0xab8e
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm_struct.cpp
// Function: ArmFunction::EmitCode(std::ostream&)
void ArmFunction::EmitCode(std::ostream& out) {
  out << ".global " << this->name_ << std::endl;
  out << "\t.type " << this->name_ << ", %function" << std::endl;
  out << this->name_ << ":" << std::endl;
#ifdef GENARM_WITH_COMMENT
  out << "@ call_func: ";
  for (auto func : this->call_func_list_) {
    out << func->name_ << " ";
  }
  out << std::endl;
  out << "@ arg_num: " << this->arg_num_ << " ";        // << std::endl;
  out << "@ stack_size: " << this->stack_size_ << " ";  // << std::endl;
  out << "@ virtual_reg_max: " << this->virtual_reg_max << " ";
  out << std::endl;
#endif
  out << "@ Function Begin:" << std::endl;
  for (auto bb : bb_list_) {
    bb->EmitCode(out);
    out << std::endl;
  }
  out << "@ Function End." << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x61287(%rip), %rsi     # 0x6e3fd
movl $0x8, %edx
movq %rbx, %rdi
callq 0x8330
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
leaq 0x61253(%rip), %rsi     # 0x6e417
movl $0x7, %edx
movq %rbx, %rdi
callq 0x8330
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
leaq 0x6125e(%rip), %rsi     # 0x6e449
movl $0xb, %edx
movq %rax, %rdi
callq 0x8330
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x8330
movq %rax, %r15
leaq 0x62187(%rip), %rsi     # 0x6f3c0
movl $0x1, %edx
movq %rax, %rdi
callq 0x8330
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
leaq 0x611e1(%rip), %rsi     # 0x6e455
movl $0x11, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x38(%r14), %r15
movq 0x40(%r14), %r14
cmpq %r14, %r15
je 0xd2ed
movq (%r15), %rdi
movq %rbx, %rsi
callq 0xd32e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
addq $0x8, %r15
jmp 0xd2b0
leaq 0x61173(%rip), %rsi     # 0x6e467
movl $0xf, %edx
movq %rbx, %rdi
callq 0x8330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8030
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x81f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/arm_struct.cpp
// Function: ArmBasicBlock::IndexInFunc()
int ArmBasicBlock::IndexInFunc() {
  MyAssert(nullptr != this->func_);
  auto& bbs = this->func_->bb_list_;
  MyAssert(std::find(bbs.begin(), bbs.end(), this) != bbs.end());
  return std::distance(bbs.begin(), std::find(bbs.begin(), bbs.end(), this));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0xd3ff
movq %rdi, %rbx
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rsi
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0xd510
movq 0x40(%r14), %rsi
cmpq %rsi, %rax
je 0xd43a
movq 0x38(%r14), %r14
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %r14, %rdi
callq 0xd510
subq %r14, %rax
shrq $0x3, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x81be2(%rip), %rdi     # 0x8efe8
leaq 0x60d5b(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x6105e(%rip), %rsi     # 0x6e477
movq %rax, %rdi
callq 0x8280
leaq 0x61f98(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0x9f, %esi
jmp 0xd473
movq 0x81ba7(%rip), %rdi     # 0x8efe8
leaq 0x60d20(%rip), %rsi     # 0x6e168
callq 0x8280
leaq 0x61023(%rip), %rsi     # 0x6e477
movq %rax, %rdi
callq 0x8280
leaq 0x61f5d(%rip), %rsi     # 0x6f3c0
movq %rax, %rdi
callq 0x8280
movq %rax, %rdi
movl $0xa1, %esi
callq 0x8520
movq %rax, %rdi
callq 0x8180
movl $0xff, %edi
callq 0x8380
// File: /workspace/github_cpp_makefile_star2_O3/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::Root::PrintNode(int, std::ostream&)
void Root::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "Root" << LINE_NO << std::endl;
  for (const auto &ele : compunit_list_) {
    ele->PRINT_NODE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xd5bc
leaq 0x60dfb(%rip), %rsi     # 0x6e4a7
movl $0x4, %edx
movq %rbx, %rdi
callq 0x8330
leaq 0x629e9(%rip), %rsi     # 0x700a9
movl $0x2, %edx
movq %rbx, %rdi
callq 0x8330
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x8520
movq %rax, %r15
leaq 0x60dc9(%rip), %rsi     # 0x6e4ac
movl $0x2, %edx
movq %rax, %rdi
callq 0x8330
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8270
movsbl %al, %esi
movq %r15, %rdi
callq 0x8030
movq %rax, %rdi
callq 0x81f0
movq 0x10(%r14), %r15
movq 0x18(%r14), %r14
cmpq %r14, %r15
je 0xd73d
incl %ebp
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x18(%rax)
addq $0x8, %r15
cmpq %r14, %r15
jne 0xd726
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq