LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl 0x10877(%rip), %eax     # 0x1c310
shll $0x3, %eax
shrl $0x4, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0xbb37
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl 0x10855(%rip), %ecx     # 0x1c310
subl $0x10, %ecx
cmpl %ecx, %eax
jae 0xbb17
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x10822(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbb0a
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x1080e(%rip), %ecx     # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbb0a
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xbb17
jmp 0xbb0c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xbab2
cmpl $0x0, -0x1c(%rbp)
jl 0xbb1f
jmp 0xbb37
jmp 0xbb21
movl 0x107e9(%rip), %ecx     # 0x1c310
shrl $0x4, %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
jmp 0xbaa2
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x41(%rbp)
jl 0xbb51
movl -0x1c(%rbp), %eax
cmpl 0x107c5(%rip), %eax     # 0x1c310
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xbb5a
jmp 0xbb5c
jmp 0xbb7b
leaq 0x7aa7(%rip), %rdi      # 0x1360a
leaq 0x775f(%rip), %rsi      # 0x132c9
movl $0x1ac, %edx            # imm = 0x1AC
leaq 0x7ab0(%rip), %rcx      # 0x13626
callq 0x41e0
movl 0x1078f(%rip), %eax     # 0x1c310
subl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8680
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq (%rcx), %rdi
movq (%rax), %rsi
movslq -0x1c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rsi
movslq -0x34(%rbp), %rdx
shlq $0x6, %rdx
callq 0x4250
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movslq -0x1c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
movslq -0x34(%rbp), %rdx
shlq $0x6, %rdx
xorl %esi, %esi
callq 0x4180
movq -0x40(%rbp), %rdi
callq 0xab10
movq -0x18(%rbp), %rdi
callq 0x8680
movq %rax, %rdi
callq 0xab10
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x106f2(%rip), %eax     # 0x1c310
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xbcae
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x106be(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbc9e
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x1069c(%rip), %ecx     # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbc9e
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdi
movq (%rax), %rsi
movslq -0x14(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x1, %rsi
movl $0x23, %edx
callq 0x4250
addq $0x20, %rsp
popq %rbp
retq
jmp 0xbca0
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbc24
leaq 0x79b8(%rip), %rdi      # 0x1366d
leaq 0x760d(%rip), %rsi      # 0x132c9
movl $0x1bf, %edx            # imm = 0x1BF
leaq 0x79c0(%rip), %rcx      # 0x13688
callq 0x41e0
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x10618(%rip), %eax     # 0x1c310
jae 0xbd7e
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x105ee(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbd6e
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x105cc(%rip), %ecx     # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbd6e
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdi
movq (%rax), %rsi
movslq -0x14(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x1, %rsi
movl $0x23, %edx
callq 0x4250
addq $0x20, %rsp
popq %rbp
retq
jmp 0xbd70
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbcef
leaq 0x7935(%rip), %rdi      # 0x136ba
leaq 0x753d(%rip), %rsi      # 0x132c9
movl $0x1c8, %edx            # imm = 0x1C8
leaq 0x793d(%rip), %rcx      # 0x136d5
callq 0x41e0
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x23, %edx
callq 0x4180
movb $0x1, -0x31(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0x10538(%rip), %eax     # 0x1c310
jae 0xbf3a
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x38(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x1050e(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbe96
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x38(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x104e8(%rip), %ecx     # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbe96
movq -0x40(%rbp), %rax
leaq -0x30(%rbp), %rdi
movq (%rax), %rsi
movslq -0x38(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x1, %rsi
movl $0x23, %edx
callq 0x4150
cmpl $0x0, %eax
jl 0xbe94
movq -0x40(%rbp), %rax
movq 0x10174(%rip), %rcx     # 0x1bfd0
movq (%rcx), %rdi
movl 0x10(%rax), %edx
leaq 0x789e(%rip), %rsi      # 0x13707
movb $0x0, %al
callq 0x43f0
movq -0x40(%rbp), %rax
leaq -0x30(%rbp), %rdi
movq (%rax), %rsi
movslq -0x38(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x1, %rsi
movl $0x23, %edx
callq 0x4250
jmp 0xbe96
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x38(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x10456(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
je 0xbf03
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x38(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x10434(%rip), %ecx     # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbf03
testb $0x1, -0x31(%rbp)
je 0xbf01
movq -0x40(%rbp), %rax
movq 0x100e3(%rip), %rcx     # 0x1bfd0
movq (%rcx), %rdi
movl 0x10(%rax), %edx
leaq 0x7832(%rip), %rsi      # 0x1372c
movb $0x0, %al
callq 0x43f0
jmp 0xbf03
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x38(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x103e9(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x31(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xbdcf
addq $0x40, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
leaq -0x18(%rbp), %rdi
callq 0x8650
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x8680
movq -0x20(%rbp), %rcx
movq (%rax), %rax
movslq (%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8680
movq -0x30(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x21(%rbp)
je 0xc20f
leaq -0x18(%rbp), %rdi
callq 0x8680
movq -0x20(%rbp), %rcx
movq (%rax), %rax
movslq (%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %ecx
movzbl 0x1013d(%rip), %eax     # 0x1c309
andl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
je 0xc207
leaq -0x18(%rbp), %rdi
callq 0x8680
movq -0x20(%rbp), %rcx
movq (%rax), %rax
movslq (%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x1010c(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
xorb $-0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xc164
leaq -0x18(%rbp), %rdi
callq 0x5f20
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
leaq -0x18(%rbp), %rdi
callq 0x8650
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8680
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8680
movq -0x38(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x29(%rbp)
je 0xc2fd
leaq -0x18(%rbp), %rdi
callq 0x8680
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %ecx
movzbl 0x1004c(%rip), %eax     # 0x1c309
andl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xc2f5
leaq -0x18(%rbp), %rdi
callq 0x8680
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0x1001e(%rip), %ecx     # 0x1c308
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xc25d
leaq -0x18(%rbp), %rdi
callq 0x8680
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8680
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq 0x8(%rcx), %rax
sete %al
movb %al, -0x3a(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x5f20
movb -0x3a(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %rsi, -0xc8(%rbp)
callq 0xc430
movq -0xc8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
callq 0xd810
leaq -0x91(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4500
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0x43b0
jmp 0xc3e1
leaq -0x91(%rbp), %rdi
callq 0x4300
movq -0xd0(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x4300
movq -0xa0(%rbp), %rdi
callq 0x44f0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
leaq -0x20(%rbp), %rdi
callq 0x8650
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x21(%rbp)
jl 0xc478
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl 0xfe9e(%rip), %eax      # 0x1c310
setb %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xc481
jmp 0xc483
jmp 0xc4a2
leaq 0x7318(%rip), %rdi      # 0x137a2
leaq 0x6e38(%rip), %rsi      # 0x132c9
movl $0x219, %edx            # imm = 0x219
leaq 0x7344(%rip), %rcx      # 0x137e1
callq 0x41e0
leaq -0x20(%rbp), %rdi
callq 0x8680
movq -0x30(%rbp), %rcx
movq (%rax), %rax
movslq (%rcx), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl 0xfe43(%rip), %ecx      # 0x1c309
andl %ecx, %eax
cmpl $0x0, %eax
je 0xc4cf
jmp 0xc4ee
leaq 0x72e4(%rip), %rdi      # 0x137ba
leaq 0x6dec(%rip), %rsi      # 0x132c9
movl $0x21a, %edx            # imm = 0x21A
leaq 0x72f8(%rip), %rcx      # 0x137e1
callq 0x41e0
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8680
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq (%rcx), %rsi
movslq (%rax), %rax
shlq $0x6, %rax
addq %rax, %rsi
addq $0x1, %rsi
movl $0x23, %edx
callq 0x4250
leaq -0x20(%rbp), %rdi
callq 0x5f20
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: davidgfnet[P]dns-db/./dns_db.h
// Function: DNS_DB::Bitmap::setBit(unsigned int, int)
void setBit(unsigned int pos, int value) {
			unsigned int idx = pos / (8*sizeof(unsigned int));
			unsigned int off = pos % (8*sizeof(unsigned int));
			if (value)
				bitm[idx] |=  (1<<off);
			else
				bitm[idx] &= ~(1<<off);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shrq $0x5, %rax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
andq $0x1f, %rax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0xc628
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xc7d0
movl -0x24(%rbp), %ecx
orl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xc64d
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
xorl $-0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xc7d0
movl -0x28(%rbp), %ecx
andl (%rax), %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x61ba(%rip), %rsi      # 0x138f5
callq 0x4060
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xd754
movb $0x0, -0x1(%rbp)
jmp 0xd802
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x22, -0x28(%rbp)
jbe 0xd773
movb $0x0, -0x1(%rbp)
jmp 0xd802
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpq $0x12, %rax
jae 0xd7c1
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movl -0x30(%rbp), %eax
movl %eax, %ecx
leaq 0xeb82(%rip), %rax      # 0x1c320
movq (%rax,%rcx,8), %rsi
callq 0x43d0
cmpl $0x0, %eax
jne 0xd7b4
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0xd7c1
jmp 0xd7b6
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd781
cmpl $0x0, -0x2c(%rbp)
jge 0xd7cd
movb $0x0, -0x1(%rbp)
jmp 0xd802
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x23, %edx
callq 0x4180
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4250
movl -0x2c(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x23, -0x14(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x22(%rax), %eax
cmpl $0x0, %eax
jne 0xd840
movq -0x8(%rbp), %rdi
callq 0x4120
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x4250
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rcx
leaq 0xea8a(%rip), %rax      # 0x1c320
movq (%rax,%rcx,8), %rsi
callq 0x4510
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x4560
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4560
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x4560
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x70(%rbp), %rdi
movl -0x1c(%rbp), %eax
movq %rax, -0x78(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0xd99f
movq -0x70(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq %rax, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0xe060
testb $0x1, %al
jne 0xd962
jmp 0xd992
movq -0x70(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq -0x70(%rbp), %rdi
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xda9e
jmp 0xd994
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd922
movq -0x70(%rbp), %rdi
callq 0xdac0
leaq -0x58(%rbp), %rdi
callq 0xe110
movl $0x1, -0x58(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x4030
jmp 0xd9c7
movq -0x18(%rbp), %rdi
callq 0x4100
movq %rax, %rdi
xorl %eax, %eax
movl $0x2, %esi
callq 0x4220
movl %eax, -0x7c(%rbp)
jmp 0xd9e4
movl -0x7c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %edi
callq 0xd8b0
movl %eax, -0x44(%rbp)
movslq -0x44(%rbp), %rsi
movl -0x48(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x1, %ecx
movq %r9, %rdi
callq 0x4520
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x48(%rbp)
jl 0xda20
jmp 0xda56
leaq 0x5ed0(%rip), %rdi      # 0x138f7
leaq 0x5ed3(%rip), %rsi      # 0x13901
movl $0x2f, %edx
leaq 0x5ed6(%rip), %rcx      # 0x13910
callq 0x41e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x65d0
jmp 0xdaab
cmpq $0x0, -0x50(%rbp)
je 0xda5f
jmp 0xda7e
leaq 0x5ee1(%rip), %rdi      # 0x13947
leaq 0x5e94(%rip), %rsi      # 0x13901
movl $0x30, %edx
leaq 0x5e97(%rip), %rcx      # 0x13910
callq 0x41e0
movq -0x70(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xe130
jmp 0xda8d
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x65d0
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x44f0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xdb55
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
cmpl $0x0, (%rax)
jle 0xdb31
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movl 0x14(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xdb48
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movl 0x14(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xdb4a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdae9
jmp 0xdb57
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
xorl %eax, %eax
cmpl $0x20000000, %ecx       # imm = 0x20000000
movb %al, -0x29(%rbp)
jle 0xdb74
cmpl $0x0, -0x10(%rbp)
setg %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xdb7d
jmp 0xdbec
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movq %rax, -0x38(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0xdbe7
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
cmpl $0x0, (%rax)
jne 0xdbda
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq -0x20(%rbp), %rdi
movl 0x14(%rax), %ecx
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x18(%rbp), %esi
callq 0xdca0
jmp 0xdbe7
jmp 0xdbdc
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xdb84
jmp 0xdb57
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xdc7b
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xdc6e
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
jmp 0xdc70
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdc1f
leaq 0x5cd0(%rip), %rdi      # 0x13952
leaq 0x5c78(%rip), %rsi      # 0x13901
movl $0x42, %edx
leaq 0x5cfe(%rip), %rcx      # 0x13993
callq 0x41e0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movslq -0xc(%rbp), %rsi
callq 0xe0f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xdccf
jmp 0xdcee
leaq 0x5ce4(%rip), %rdi      # 0x139ba
leaq 0x5c24(%rip), %rsi      # 0x13901
movl $0x6a, %edx
leaq 0x5cde(%rip), %rcx      # 0x139c7
callq 0x41e0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x14(%rax), %rsi
callq 0x4190
cmpl $0x0, %eax
jge 0xdd20
movq 0xe2c1(%rip), %rax      # 0x1bfd0
movq (%rax), %rdi
leaq 0x5cd7(%rip), %rsi      # 0x139f0
movb $0x0, %al
callq 0x43f0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x45b0
cmpl $0x0, %eax
jge 0xdd49
movq 0xe298(%rip), %rax      # 0x1bfd0
movq (%rax), %rdi
leaq 0x5cc5(%rip), %rsi      # 0x13a07
movb $0x0, %al
callq 0x43f0
movq -0x40(%rbp), %rdi
callq 0xe210
movq %rax, -0x30(%rbp)
movslq -0xc(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0xe240
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xe280
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xe1a0
movq %rax, -0x38(%rbp)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xde28
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xde1b
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq -0x20(%rbp), %rdi
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq -0x30(%rbp), %rdi
movslq 0x14(%rax), %rsi
movl $0x4, %edx
callq 0x4040
jmp 0xde28
jmp 0xde1d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xddaf
addq $0x30, %rsp
popq %rbp
retq
nop
// File: davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::fileExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool DNS_DB::FileMapper::fileExists(const std::string & file) const {
	FILE * fd = fopen(file.c_str(),"rb");
	if (fd == NULL)
		return false;
	fclose(fd);
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4100
movq %rax, %rdi
leaq 0x5bcb(%rip), %rsi      # 0x13a1e
callq 0x4310
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xde69
movb $0x0, -0x1(%rbp)
jmp 0xde76
movq -0x20(%rbp), %rdi
callq 0x42b0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xdf6b
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xdf5e
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe0f0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
jmp 0xdf60
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdf0f
leaq 0x5aaf(%rip), %rdi      # 0x13a21
leaq 0x5988(%rip), %rsi      # 0x13901
movl $0x88, %edx
leaq 0x5ae0(%rip), %rcx      # 0x13a65
callq 0x41e0
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
callq 0xe030
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xe006
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe2c0
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xdff9
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xe2c0
movl (%rax), %eax
addq $0x30, %rsp
popq %rbp
retq
jmp 0xdffb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdfaf
leaq 0x5a14(%rip), %rdi      # 0x13a21
leaq 0x58ed(%rip), %rsi      # 0x13901
movl $0x91, %edx
leaq 0x5a6d(%rip), %rcx      # 0x13a8d
callq 0x41e0
nopw %cs:(%rax,%rax)
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %eax
movq %rax, -0x30(%rbp)
callq 0xf3d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0xf1c8
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x20, %rax
jae 0xf1b8
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0xc7f0
movl (%rax), %eax
movl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb -0x11(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xf1ab
movl -0x18(%rbp), %eax
shlq $0x2, %rax
shlq $0x3, %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0xf1cf
jmp 0xf1ad
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf156
jmp 0xf1ba
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf133
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
andq $0x1f, %rax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
shrq $0x5, %rax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movl -0x20(%rbp), %eax
movq %rax, -0x38(%rbp)
callq 0xf3d0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0xf282
movq -0x30(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
callq 0xc7f0
movl (%rax), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf270
movl -0x24(%rbp), %eax
tzcntl %eax, %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
shlq $0x2, %rax
shlq $0x3, %rax
movl -0x28(%rbp), %ecx
addq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0xf289
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xf218
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movq %rax, -0x20(%rbp)
callq 0xf3d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0xf331
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xc7f0
movl (%rax), %ecx
movl %ecx, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
subl %eax, %ecx
movl %ecx, %eax
andl $0x33333333, %eax       # imm = 0x33333333
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf2c2
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xa0(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x90(%rbp)
leaq -0x14(%rbp), %rsi
callq 0xfd20
movq -0x90(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0xfd50
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xfcf0
testb $0x1, %al
jne 0xfa25
jmp 0xfb6b
movq -0x90(%rbp), %rax
movq 0x38(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x4b00
movq %rax, -0x30(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xfd80
movq -0xa8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xfdb0
jmp 0xfa5e
movq -0x90(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x14(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0xfe40
jmp 0xfa7f
movq -0xb0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xfe00
movb %dl, -0xb9(%rbp)
movq %rax, -0xb8(%rbp)
jmp 0xfa9e
movb -0xb9(%rbp), %al
movq -0xb8(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movb %al, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5ee0
movq -0x90(%rbp), %rdi
callq 0xfe80
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xc4(%rbp)
testq %rax, %rax
movss %xmm0, -0xc0(%rbp)
js 0xfb0b
movss -0xc4(%rbp), %xmm0
movss %xmm0, -0xc0(%rbp)
movss -0xc0(%rbp), %xmm0
movss 0x3fd1(%rip), %xmm1     # 0x13aec
ucomiss %xmm1, %xmm0
jbe 0xfb55
movq -0x90(%rbp), %rdi
callq 0xfbb0
jmp 0xfb2e
jmp 0xfb55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xfb60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5ee0
jmp 0xfb60
leaq -0x48(%rbp), %rdi
callq 0x5f00
jmp 0xfb6b
leaq -0x48(%rbp), %rdi
callq 0x5f00
jmp 0xfb9a
movq -0x90(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xfea0
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0xff40
movq -0x98(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x44f0
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xfe80
cmpq $0x200, %rax            # imm = 0x200
jbe 0xfcdb
movq -0x40(%rbp), %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x10(%rbp)
callq 0xfd50
movq -0x40(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0xff70
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rdi
callq 0xfd50
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xffa0
testb $0x1, %al
jne 0xfc1c
jmp 0xfc72
leaq -0x20(%rbp), %rdi
callq 0xffd0
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jae 0xfc65
leaq -0x20(%rbp), %rdi
callq 0xffd0
movq %rax, %rdi
addq $0x8, %rdi
callq 0xfff0
cmpq $0x1, %rax
jne 0xfc63
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xffd0
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xfc65
jmp 0xfc67
leaq -0x20(%rbp), %rdi
callq 0x10010
jmp 0xfbfc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x10(%rbp)
je 0xfcd4
leaq -0x18(%rbp), %rdi
callq 0xffd0
movq %rax, %rdi
addq $0x8, %rdi
callq 0xfff0
cmpq $0x1, %rax
jne 0xfc9a
jmp 0xfcb9
leaq 0x3e4f(%rip), %rdi      # 0x13af0
leaq 0x3e68(%rip), %rsi      # 0x13b10
movl $0x24, %edx
leaq 0x3e6d(%rip), %rcx      # 0x13b21
callq 0x41e0
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
callq 0x10040
movq %rax, -0x38(%rbp)
jmp 0xfcd6
jmp 0xfcdb
jmp 0xfbc4
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x10, %rdi
callq 0xc230
testb $0x1, %al
jne 0x11ef6
jmp 0x11f80
movq -0x40(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq 0x8(%rax), %rsi
movl (%rax), %edx
leaq -0x28(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x8870
movq -0x58(%rbp), %rdi
callq 0x8680
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x89e0
movq %rdx, -0x50(%rbp)
movq %rax, -0x48(%rbp)
jmp 0x11f3a
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq -0x28(%rbp), %rdi
callq 0x5f20
jmp 0x11f8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5f20
jmp 0x11f93
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
callq 0xc140
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x44f0
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x12ab0
cmpl $0x0, %eax
je 0x1241d
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x177(%rax)
movq 0x40(%rax), %rdi
callq 0x44b0
cmpl $0x0, %eax
jne 0x1241b
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x12425
jmp 0x1241d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x178(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x12652
movq -0x20(%rbp), %rax
cmpb $0x0, 0x177(%rax)
jne 0x1265b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x126a0
cmpl $-0x1, -0x14(%rbp)
je 0x12683
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movb %al, -0x21(%rbp)
callq 0x40a0
movb -0x21(%rbp), %cl
movq -0x20(%rbp), %rdi
movb %cl, (%rax)
movl $0x1, %esi
callq 0x4400
movq -0x20(%rbp), %rdi
callq 0x125a0
cmpl $-0x1, %eax
jne 0x1269a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x126a0
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: hdlguy[P]fft_demo/fft.cpp
// Function: Fft::transform(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
void Fft::transform(vector<double> &real, vector<double> &imag) {
	if (real.size() != imag.size())
		throw "Mismatched lengths";
	
	size_t n = real.size();
	if (n == 0)
		return;
	else if ((n & (n - 1)) == 0)  // Is power of 2
		transformRadix2(real, imag);
	else  // More complicated algorithm for arbitrary sizes
		transformBluestein(real, imag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2e00
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e00
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
je 0x1369
movl $0x8, %edi
callq 0x10a0
movq %rax, %rdi
leaq 0x4cea(%rip), %rax      # 0x6040
movq %rax, (%rdi)
movq 0x7c68(%rip), %rsi      # 0x8fc8
xorl %eax, %eax
movl %eax, %edx
callq 0x1170
movq -0x8(%rbp), %rdi
callq 0x2e00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x137f
jmp 0x13b2
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x13a3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x13c0
jmp 0x13b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1b80
jmp 0x13b2
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: hdlguy[P]fft_demo/fft.cpp
// Function: reverseBits(unsigned long, unsigned int)
static size_t reverseBits(size_t x, unsigned int n) {
	size_t result = 0;
	unsigned int i;
	for (i = 0; i < n; i++, x >>= 1)
		result = (result << 1) | (x & 1);
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x26be
movq -0x18(%rbp), %rax
shlq %rax
movq -0x8(%rbp), %rcx
andq $0x1, %rcx
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
jmp 0x268a
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)