LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7510
movslq (%rbx), %rsi
movq (%r14), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
movb 0x8c00(%rip), %cl       # 0xf289
movb 0x8bf9(%rip), %dl       # 0xf288
shlq $0x6, %rsi
addq %rsi, %rdi
addq $0x40, %rdi
movq %rdi, %rsi
cmpq %rax, %rdi
je 0x66b3
movb (%rsi), %r8b
leaq 0x40(%rsi), %rdi
testb %r8b, %cl
je 0x669a
andb %dl, %r8b
je 0x669a
cmpq %rax, %rsi
sete %bl
leaq 0x10(%rsp), %rdi
callq 0x3f74
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x90, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x671e
leaq 0x40(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x6af6
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30c0
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7510
movslq (%r14), %rax
testq %rax, %rax
js 0x678d
cmpl 0x8b46(%rip), %eax      # 0xf290
jae 0x678d
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
shlq $0x6, %rax
movb 0x8b2b(%rip), %dl       # 0xf289
testb %dl, (%rcx,%rax)
je 0x67ac
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)
leaq 0x10(%rsp), %rdi
callq 0x3f74
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x300e(%rip), %rdi      # 0x97a2
leaq 0x2b2e(%rip), %rsi      # 0x92c9
leaq 0x303f(%rip), %rcx      # 0x97e1
movl $0x219, %edx            # imm = 0x219
callq 0x31a0
leaq 0x3007(%rip), %rdi      # 0x97ba
leaq 0x2b0f(%rip), %rsi      # 0x92c9
leaq 0x3020(%rip), %rcx      # 0x97e1
movl $0x21a, %edx            # imm = 0x21A
callq 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl %esi, %ecx
shrl $0x5, %esi
pushq $0x1
popq %rax
shll %cl, %eax
testl %edx, %edx
je 0x6811
movq (%rdi), %rcx
movl %esi, %edx
orl %eax, (%rcx,%rdx,4)
retq
notl %eax
movq (%rdi), %rcx
movl %esi, %edx
andl %eax, (%rcx,%rdx,4)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x2e
popq %rsi
callq 0x30a0
testq %rax, %rax
je 0x6a95
movq %rax, %r12
movq %rax, %r15
subq %r14, %r15
cmpq $0x22, %r15
jbe 0x6aa6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %r12
leaq 0x87f0(%rip), %rbp      # 0xf2a0
xorl %r13d, %r13d
cmpq $0x12, %r13
je 0x6a95
movq (%rbp), %rsi
movq %r12, %rdi
callq 0x3340
testl %eax, %eax
je 0x6ad2
incq %r13
addq $0x8, %rbp
jmp 0x6ab3
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
andl $0x0, 0x1f(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3200
movb %r13b, (%rbx,%r15)
movb $0x1, %al
jmp 0x6a97
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpb $0x0, 0x22(%rdi)
je 0x6b0f
pushq $0x23
popq %rax
jmp 0x6b17
movq %r14, %rdi
callq 0x30e0
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 0x8762(%rip), %rax      # 0xf2a0
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3430
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/davidgfnet[P]dns-db/file_mapper.cc
// Function: fileSize(int)
unsigned int fileSize(int fd) {
	off_t c_offset = lseek(fd, 0, SEEK_CUR);
	off_t eof = lseek(fd, 0, SEEK_END);
	lseek(fd, c_offset, SEEK_SET);

	return eof;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x3470
movq %rax, %r14
pushq $0x2
popq %rdx
movl %ebx, %edi
xorl %esi, %esi
callq 0x3470
movq %rax, %r15
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3470
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorl %ecx, %ecx
pushq $0x38
popq %r14
movl %ecx, %r12d
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r14
cmpq %r12, %rax
jbe 0x6bee
imulq $0x38, %r12, %r13
leaq (%rcx,%r13), %rdi
addq $0x18, %rdi
movq %r15, %rsi
callq 0x6fb7
leal 0x1(%r12), %ecx
testb %al, %al
je 0x6ba9
movq (%rbx), %rax
incl (%rax,%r13)
movq 0x8(%rax,%r13), %rbx
jmp 0x6c7d
movq %rbx, %rdi
callq 0x6cd8
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x20(%rsp), %r14
movb $0x0, (%rax)
movl $0x1, -0x28(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3150
movq (%r15), %rdi
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x31d0
movl %eax, 0x18(%rsp)
movl %eax, %edi
callq 0x6b58
movl %eax, 0x1c(%rsp)
movslq %eax, %rsi
movl 0x18(%rsp), %r8d
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %edi, %edi
xorl %r9d, %r9d
callq 0x3440
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x18(%rsp)
js 0x6c8e
testq %rax, %rax
je 0x6ca7
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6fda
movq 0x10(%rsp), %rbx
movq %r14, %rdi
callq 0x3100
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2c60(%rip), %rdi      # 0x98f5
leaq 0x2c63(%rip), %rsi      # 0x98ff
leaq 0x2c6b(%rip), %rcx      # 0x990e
pushq $0x2f
jmp 0x6cbe
leaq 0x2c97(%rip), %rdi      # 0x9945
leaq 0x2c4a(%rip), %rsi      # 0x98ff
leaq 0x2c52(%rip), %rcx      # 0x990e
pushq $0x30
popq %rdx
callq 0x31a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/davidgfnet[P]dns-db/file_mapper.cc
// Function: DNS_DB::FileMapper::flushCached()
void DNS_DB::FileMapper::flushCached() {
	// Calculate the size of mapped stuff
	int mapped_referenced = 0;
	int mapped_cached = 0;

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x38
popq %r14
cqto
idivq %r14
xorl %edx, %edx
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rax
jbe 0x6d29
imulq $0x38, %rsi, %rdi
cmpl %edx, (%rcx,%rdi)
movl 0x14(%rcx,%rdi), %edi
movl $0x0, %r8d
cmovgl %edi, %r8d
cmovgl %edx, %edi
addl %r8d, %r15d
addl %edi, %r12d
incl %esi
jmp 0x6d00
leal (%r12,%r15), %eax
cmpl $0x20000001, %eax       # imm = 0x20000001
setge %al
testl %r12d, %r12d
setg %dil
andb %al, %dil
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r14
testb %dil, %dil
je 0x6d7b
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rax
jbe 0x6d4e
imulq $0x38, %rsi, %rdx
cmpl $0x0, (%rcx,%rdx)
je 0x6d6a
incl %esi
jmp 0x6d55
addq %rdx, %rcx
subl 0x14(%rcx), %r12d
movq %rbx, %rdi
callq 0x6dd6
jmp 0x6d29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x38
popq %rdi
cqto
idivq %rdi
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x6db8
imulq $0x38, %rdx, %rdi
incl %edx
cmpq %rsi, 0x8(%rcx,%rdi)
jne 0x6d9d
addq %rdi, %rcx
decl (%rcx)
popq %rax
retq
leaq 0x2b91(%rip), %rdi      # 0x9950
leaq 0x2b39(%rip), %rsi      # 0x98ff
leaq 0x2bc4(%rip), %rcx      # 0x9991
pushq $0x42
popq %rdx
callq 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6e5f
movq %rdi, %rbx
addq %r14, %r15
movq 0x8(%r15), %rdi
movslq 0x14(%r15), %rsi
callq 0x3170
testl %eax, %eax
js 0x6e23
movl 0x10(%r15), %edi
callq 0x34b0
testl %eax, %eax
js 0x6e41
addq (%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7006
movq 0x81a6(%rip), %rax      # 0xefd0
movq (%rax), %rcx
leaq 0x2bba(%rip), %rdi      # 0x99ee
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x3490
jmp 0x6e03
movq 0x8188(%rip), %rax      # 0xefd0
movq (%rax), %rcx
leaq 0x2bb3(%rip), %rdi      # 0x9a05
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x3490
jmp 0x6e10
leaq 0x2b52(%rip), %rdi      # 0x99b8
leaq 0x2a92(%rip), %rsi      # 0x98ff
leaq 0x2b51(%rip), %rcx      # 0x99c5
pushq $0x6a
popq %rdx
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x38
popq %rdi
cqto
idivq %rdi
xorl %r8d, %r8d
movl %r8d, %r8d
cmpq %r8, %rax
jbe 0x6eb9
imulq $0x38, %r8, %rdx
movq 0x8(%rcx,%rdx), %rdi
incl %r8d
cmpq %rsi, %rdi
jne 0x6e91
addq %rdx, %rcx
movslq 0x14(%rcx), %rsi
pushq $0x4
popq %rdx
jmp 0x3030
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x38
popq %rdi
cqto
idivq %rdi
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x6f48
imulq $0x38, %rdx, %rdi
incl %edx
cmpq %rsi, 0x8(%rcx,%rdi)
jne 0x6f2d
addq %rdi, %rcx
incl (%rcx)
popq %rax
retq
leaq 0x2ad0(%rip), %rdi      # 0x9a1f
leaq 0x29a9(%rip), %rsi      # 0x98ff
leaq 0x2b06(%rip), %rcx      # 0x9a63
movl $0x88, %edx
callq 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
pushq $0x38
popq %rdi
cqto
idivq %rdi
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x6f98
imulq $0x38, %rdx, %rdi
incl %edx
cmpq %rsi, 0x8(%rcx,%rdi)
jne 0x6f7d
addq %rdi, %rcx
movl (%rcx), %eax
popq %rcx
retq
leaq 0x2a80(%rip), %rdi      # 0x9a1f
leaq 0x2959(%rip), %rsi      # 0x98ff
leaq 0x2ade(%rip), %rcx      # 0x9a8b
movl $0x91, %edx
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O2/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
subq %rcx, %rdx
sarq $0x2, %rdx
xorl %edi, %edi
pushq $-0x1
popq %rax
xorl %r8d, %r8d
movl %r8d, %r8d
cmpq %r8, %rdx
jbe 0x7347
movl (%rcx,%r8,4), %r10d
xorl %r9d, %r9d
cmpl $0x20, %r9d
je 0x7339
btl %r9d, %r10d
setb %r11b
cmpb %sil, %r11b
je 0x7341
incl %r9d
jmp 0x7321
incl %r8d
addl $-0x20, %edi
jmp 0x7312
subl %edi, %r9d
movl %r9d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %ecx
pushq $-0x1
popq %rax
movl %eax, %r8d
shll %cl, %r8d
movl %esi, %edx
shrl $0x5, %edx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
subq %rsi, %rdi
sarq $0x2, %rdi
andl $-0x20, %ecx
movl %edx, %edx
cmpq %rdx, %rdi
jbe 0x7386
andl (%rsi,%rdx,4), %r8d
jne 0x7380
incl %edx
addl $0x20, %ecx
movl %eax, %r8d
jmp 0x7369
bsfl %r8d, %eax
addl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x2, %rdx
xorl %eax, %eax
movl $0x33333333, %esi       # imm = 0x33333333
xorl %edi, %edi
movl %edi, %edi
cmpq %rdi, %rdx
jbe 0x73ed
movl (%rcx,%rdi,4), %r8d
movl %r8d, %r9d
shrl %r9d
andl $0x55555555, %r9d       # imm = 0x55555555
subl %r9d, %r8d
movl %r8d, %r9d
andl %esi, %r9d
shrl $0x2, %r8d
andl %esi, %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
incl %edi
jmp 0x739f
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
movl %edx, (%rsi)
movq %r14, %rdi
callq 0x774a
leaq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x75a3
movq 0x38(%r14), %rdi
movl 0xc(%rsp), %esi
callq 0x38c2
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, %rsi
callq 0x7690
movl 0xc(%rsp), %eax
leaq 0x30(%rsp), %rdi
movl %eax, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
callq 0x76f6
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x784c
leaq 0x38(%rsp), %rdi
callq 0x3f74
cmpq $0x281, 0x28(%r14)      # imm = 0x281
jb 0x7599
movq %r14, %rdi
callq 0x75ea
leaq 0x18(%rsp), %rdi
callq 0x3f74
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x76be
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7716
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3f74
jmp 0x75d8
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3f74
movq %rbx, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpq $0x201, 0x28(%rbx)      # imm = 0x201
jb 0x7669
movq 0x18(%rbx), %rax
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %r15, %r14
cmpq %r15, %rax
je 0x7646
movq 0x38(%rax), %rcx
cmpq %r13, %rcx
jae 0x763c
movq 0x30(%rax), %rdx
testq %rdx, %rdx
je 0x763c
movl 0x8(%rdx), %edx
cmpl $0x1, %edx
cmoveq %rax, %r14
cmoveq %rcx, %r13
movq %rax, %rdi
callq 0x31c0
jmp 0x7617
cmpq %r12, %r13
je 0x7669
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x7673
movl 0x8(%rax), %eax
cmpl $0x1, %eax
jne 0x7673
movq %rbx, %rdi
movq %r14, %rsi
callq 0x79e8
jmp 0x7600
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2470(%rip), %rdi      # 0x9aea
leaq 0x2489(%rip), %rsi      # 0x9b0a
leaq 0x2493(%rip), %rcx      # 0x9b1b
pushq $0x24
popq %rdx
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x6658
testb %al, %al
je 0x8199
movl (%rbx), %edx
incl %edx
movl %edx, (%rbx)
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4ec2
movq (%r14), %rdi
movq 0x20(%rbx), %rsi
xorl %edx, %edx
callq 0x4f06
movq %rax, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x3f74
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x65e0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3f74
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x82f3
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x30(%rax)
movb $0x0, 0x177(%rbx)
movq 0x40(%rbx), %rdi
callq 0x33e0
testl %eax, %eax
je 0x82f5
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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)
pushq $-0x1
popq %rax
je 0x83ff
cmpb $0x0, 0x177(%rdi)
je 0x83ff
pushq %rbx
movl %esi, %ebx
cmpl $-0x1, %esi
je 0x83f1
movq 0x28(%rdi), %rax
movb %bl, (%rax)
incq 0x28(%rdi)
callq 0x8390
cmpl $-0x1, %eax
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1c8a
movq %rdx, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
cmpq %rax, %r12
jne 0x1c8a
movq %rsi, %r14
movq %rdi, %r15
sarq $0x3, %r12
leaq -0x70(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %r12, %rsi
callq 0x1cde
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r12, %rsi
callq 0x1cde
leaq -0x40(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %r12, %rsi
callq 0x1cde
leaq -0x70(%rbp), %rsi
leaq -0x58(%rbp), %rcx
leaq -0x40(%rbp), %r9
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %r8
callq 0x19ae
leaq -0x40(%rbp), %rdi
callq 0x1dc2
leaq -0x58(%rbp), %rdi
callq 0x1dc2
leaq -0x70(%rbp), %rdi
callq 0x1dc2
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x1070
leaq 0x13a7(%rip), %rcx      # 0x3040
movq %rcx, (%rax)
movq 0x3325(%rip), %rsi      # 0x4fc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x1130
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x1dc2
jmp 0x1cbe
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x1dc2
jmp 0x1ccc
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x1dc2
movq %rbx, %rdi
callq 0x1150
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8f6e
movl %edi, %eax
leaq 0x4d126(%rip), %rcx     # 0x56090
movl (%rcx,%rax,4), %eax
retq
pushq %rax
movq 0x78072(%rip), %rdi     # 0x80fe8
leaq 0x4d16b(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4d168(%rip), %rsi     # 0x560f1
movq %rax, %rdi
callq 0x8240
leaq 0x4e388(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x1d
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x10, %rsp
cmpl $0x6, %esi
ja 0x9051
movq %rdi, %rbx
movl %esi, %eax
leaq 0x4d02d(%rip), %rcx     # 0x56004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4d162(%rip), %rsi     # 0x56149
leaq 0xf(%rsp), %rdx
jmp 0x9040
leaq 0x4e223(%rip), %rsi     # 0x57218
leaq 0xb(%rsp), %rdx
jmp 0x9040
leaq 0x4f101(%rip), %rsi     # 0x58104
leaq 0xd(%rsp), %rdx
jmp 0x9040
leaq 0x4e203(%rip), %rsi     # 0x57214
leaq 0xc(%rsp), %rdx
jmp 0x9040
leaq 0x4e1e5(%rip), %rsi     # 0x57204
leaq 0xe(%rsp), %rdx
jmp 0x9040
leaq 0x4e1df(%rip), %rsi     # 0x5720c
leaq 0xa(%rsp), %rdx
jmp 0x9040
leaq 0x4d91b(%rip), %rsi     # 0x56956
leaq 0x9(%rsp), %rdx
movq %rbx, %rdi
callq 0xa292
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
movq 0x77f90(%rip), %rdi     # 0x80fe8
leaq 0x4d089(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4d086(%rip), %rsi     # 0x560f1
movq %rax, %rdi
callq 0x8240
leaq 0x4e2a6(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x33
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: ZN3arm5ShiftcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv
Shift::operator std::string() {
  std::string opcode = "";
  switch (opcode_) {
    case OpCode::ASR:
      opcode = "asr";
      break;
    case OpCode::LSL:
      opcode = "lsl";
      break;
    case OpCode::LSR:
      opcode = "lsr";
      break;
    case OpCode::ROR:
      opcode = "ror";
      break;
    case OpCode::RRX:
      return "rrx";
    default:
      MyAssert(0);
      break;
  }
  if (is_imm_) {
    return opcode + " #" + std::to_string(shift_imm_);
  } else {
    return opcode + " " + std::string(*shift_reg_);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4d095(%rip), %rsi     # 0x56149
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xa292
movl (%r14), %eax
cmpq $0x4, %rax
ja 0x91c3
leaq 0x4cf49(%rip), %rcx     # 0x56020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4d016(%rip), %rsi     # 0x560fd
jmp 0x911b
leaq 0x4d019(%rip), %rsi     # 0x56109
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xa292
jmp 0x91ae
leaq 0x4cffc(%rip), %rsi     # 0x56105
jmp 0x911b
leaq 0x4ee8d(%rip), %rsi     # 0x57f9f
jmp 0x911b
leaq 0x4cfe6(%rip), %rsi     # 0x56101
leaq 0x48(%rsp), %rdi
callq 0x8530
cmpb $0x1, 0x4(%r14)
jne 0x9164
leaq 0x4d03e(%rip), %rdx     # 0x56171
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xa334
movl 0x8(%r14), %esi
leaq 0x28(%rsp), %rdi
callq 0xa36c
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0xa2cd
jmp 0x919a
leaq 0x4d1c7(%rip), %rdx     # 0x56332
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xa334
movq 0x10(%r14), %rsi
leaq 0x28(%rsp), %rdi
callq 0xa3c6
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0xa2cd
leaq 0x28(%rsp), %rdi
callq 0x8578
leaq 0x8(%rsp), %rdi
callq 0x8578
leaq 0x48(%rsp), %rdi
callq 0x8578
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq 0x77e1e(%rip), %rdi     # 0x80fe8
leaq 0x4cf17(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4cf14(%rip), %rsi     # 0x560f1
movq %rax, %rdi
callq 0x8240
leaq 0x4e134(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x4b
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
jmp 0x9239
jmp 0x9215
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8578
jmp 0x9229
jmp 0x9226
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8578
jmp 0x923c
jmp 0x9239
jmp 0x9239
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x8578
movq %rbx, %rdi
callq 0x84d0
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
cmpl $0x1f, %eax
ja 0x938b
cmpl $0x100, %edi            # imm = 0x100
jb 0x938b
roll $0x1e, %edi
addl $0x2, %eax
jmp 0x9376
cmpl $0x20, %eax
setb %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x75f75(%rip), %rax     # 0x7f380
movq %rax, (%rdi)
movq 0x8(%rsi), %r14
movq %r14, 0x8(%rdi)
andl $0x0, 0x10(%rdi)
movq 0x30(%r14), %rdi
movq 0x38(%r14), %rsi
callq 0xac7d
cmpq 0x38(%r14), %rax
je 0x944c
addq $0x30, %r14
leaq 0x8(%rsp), %rdx
movq %rbx, (%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0xad0a
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x77b95(%rip), %rdi     # 0x80fe8
leaq 0x4cc8e(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4cc8b(%rip), %rsi     # 0x560f1
movq %rax, %rdi
callq 0x8240
leaq 0x4deab(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
pushq $0x6f
popq %rsi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::Move::EmitCode(std::ostream&)
void Move::EmitCode(std::ostream& outfile) {
  std::string opcode = this->is_mvn_ ? "mvn" : "mov";
  if (this->HasS()) opcode += "s";
  opcode += CondToString(this->cond_);
  outfile << "\t" << opcode << " " << std::string(*this->rd_);
  outfile << ", " << std::string(*this->op2_) << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4ca34(%rip), %rax     # 0x5614a
leaq 0x4fd60(%rip), %rsi     # 0x5947d
cmpb $0x0, 0x14(%rdi)
cmovneq %rax, %rsi
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xa292
cmpb $0x1, 0x15(%rbx)
jne 0x9749
leaq 0x4eb65(%rip), %rsi     # 0x582a4
leaq 0x20(%rsp), %rdi
callq 0x8520
movl 0x10(%rbx), %esi
movq %rsp, %rdi
callq 0x8fbd
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x8550
movq %rsp, %rdi
callq 0x8578
leaq 0x4c9d8(%rip), %rsi     # 0x56148
movq %r14, %rdi
callq 0x8240
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x8230
leaq 0x4cba6(%rip), %rsi     # 0x56332
movq %rax, %rdi
callq 0x8240
movq %rax, %r15
movq 0x18(%rbx), %rsi
movq %rsp, %rdi
callq 0xa3c6
movq %rsp, %rsi
movq %r15, %rdi
callq 0x8230
movq %rsp, %rdi
callq 0x8578
leaq 0x4c9a2(%rip), %rsi     # 0x5615f
movq %r14, %rdi
callq 0x8240
movq %rax, %r14
movq 0x20(%rbx), %rsi
movq %rsp, %rdi
callq 0x924e
movq %rsp, %rsi
movq %r14, %rdi
callq 0x8230
movq %rax, %rdi
callq 0x8170
movq %rsp, %rdi
callq 0x8578
leaq 0x20(%rsp), %rdi
callq 0x8578
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x981a
jmp 0x980d
jmp 0x981a
jmp 0x980d
jmp 0x981a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8578
jmp 0x981d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8578
movq %rbx, %rdi
callq 0x84d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x988c
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0x988c
addq $0x18, %rbx
leaq 0x4c8d8(%rip), %rsi     # 0x5614e
movq %rbx, %rdi
callq 0xa45f
testb %al, %al
je 0x988c
movq (%rbx), %rcx
movb $0x1, %al
cmpb $0x2e, (%rcx)
jne 0x988e
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/arm.cpp
// Function: arm::Branch::EmitCode(std::ostream&)
void Branch::EmitCode(std::ostream& outfile) {
  std::string opcode = "b";
  if (this->has_l_) opcode += "l";
  // NOTE: only for bx lr
  if (this->has_x_) opcode += "x";
  opcode += CondToString(this->cond_);
  outfile << "\t" << opcode << " " << this->label_ << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4ff71(%rip), %rsi     # 0x5982f
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xa292
cmpb $0x1, 0x38(%rbx)
jne 0x98e4
leaq 0x4e8f3(%rip), %rsi     # 0x581cd
leaq 0x8(%rsp), %rdi
callq 0x8520
cmpb $0x1, 0x39(%rbx)
jne 0x98fb
leaq 0x4ca4b(%rip), %rsi     # 0x5633c
leaq 0x8(%rsp), %rdi
callq 0x8520
movl 0x10(%rbx), %esi
leaq 0x28(%rsp), %rdi
callq 0x8fbd
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8550
leaq 0x28(%rsp), %rdi
callq 0x8578
leaq 0x4c820(%rip), %rsi     # 0x56148
movq %r14, %rdi
callq 0x8240
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x8230
leaq 0x4c9ee(%rip), %rsi     # 0x56332
movq %rax, %rdi
callq 0x8240
addq $0x18, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8230
movq %rax, %rdi
callq 0x8170
leaq 0x8(%rsp), %rdi
callq 0x8578
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8578
jmp 0x9989
jmp 0x9986
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8578
movq %rbx, %rdi
callq 0x84d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b207(%rip), %rsi     # 0x5637d
movq %rbx, %rdi
callq 0x8240
leaq 0x8(%r14), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x8230
movq %rax, %rdi
callq 0x8170
leaq 0x4b1fb(%rip), %rsi     # 0x56397
movq %rbx, %rdi
callq 0x8240
movq %rax, %rdi
movq %r15, %rsi
callq 0x8230
leaq 0x4b213(%rip), %rsi     # 0x563c9
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8230
leaq 0x4c148(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
leaq 0x4b1e6(%rip), %rsi     # 0x563d5
movq %rbx, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x38(%r14), %r15
movq 0x40(%r14), %r14
cmpq %r14, %r15
je 0xb225
movq (%r15), %rdi
movq %rbx, %rsi
callq 0xb242
movq %rbx, %rdi
callq 0x8170
addq $0x8, %r15
jmp 0xb207
leaq 0x4b1bb(%rip), %rsi     # 0x563e7
movq %rbx, %rdi
callq 0x8240
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8170
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb2e9
movq %rdi, %rbx
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rsi
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0xb3f4
movq 0x40(%r14), %rsi
cmpq %rsi, %rax
je 0xb324
movq 0x38(%r14), %r14
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %r14, %rdi
callq 0xb3f4
subq %r14, %rax
shrq $0x3, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x75cf8(%rip), %rdi     # 0x80fe8
leaq 0x4adf1(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4b0f4(%rip), %rsi     # 0x563f7
movq %rax, %rdi
callq 0x8240
leaq 0x4c00e(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0x9f, %esi
jmp 0xb35d
movq 0x75cbd(%rip), %rdi     # 0x80fe8
leaq 0x4adb6(%rip), %rsi     # 0x560e8
callq 0x8240
leaq 0x4b0b9(%rip), %rsi     # 0x563f7
movq %rax, %rdi
callq 0x8240
leaq 0x4bfd3(%rip), %rsi     # 0x57320
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
movl $0xa1, %esi
callq 0x84b0
movq %rax, %rdi
callq 0x8170
movl $0xff, %edi
callq 0x8300
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb484
leaq 0x4aef3(%rip), %rsi     # 0x56443
movq %rbx, %rdi
callq 0x8240
leaq 0x4caaa(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4aece(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %r15
movq 0x18(%r14), %r14
incl %ebp
cmpq %r14, %r15
je 0xb5ad
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x18(%rax)
addq $0x8, %r15
jmp 0xb594
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::ArrayIdentifier::PrintNode(int, std::ostream&)
void ArrayIdentifier::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "ArrayIdentifier" << LINE_NO << std::endl;
  name_.PRINT_NODE;
  ++indentation;
  PRINT_INDENT;
  outfile << "Shape" << LINE_NO << std::endl;
  for (const auto &ele : shape_list_) {
    ele->PRINT_NODE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4acce(%rip), %rsi     # 0x56461
movq %rbx, %rdi
callq 0x8240
leaq 0x4c867(%rip), %r12     # 0x58009
movq %rax, %rdi
movq %r12, %rsi
callq 0x8240
movl 0x8(%r15), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4ac88(%rip), %r13     # 0x56448
movq %rax, %rdi
movq %r13, %rsi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r15), %rdi
leal 0x1(%r14), %ebp
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x20(%rax)
movl %ebp, %edi
movq %rbx, %rsi
callq 0xb484
leaq 0x4ac7a(%rip), %rsi     # 0x56471
movq %rbx, %rdi
callq 0x8240
movq %rax, %rdi
movq %r12, %rsi
callq 0x8240
movl 0x8(%r15), %esi
movq %rax, %rdi
callq 0x84b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x18(%r15), %r12
movq 0x20(%r15), %r15
addl $0x2, %r14d
cmpq %r15, %r12
je 0xb850
movq (%r12), %rdi
movq (%rdi), %rax
movl %r14d, %esi
movq %rbx, %rdx
callq *0x20(%rax)
addq $0x10, %r12
jmp 0xb835
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::ConditionExpression::PrintNode(int, std::ostream&)
void ConditionExpression::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "ConditionExpression OP: " << OP_STRING(this->op_) << LINE_NO
          << std::endl;
  this->lhs_.PRINT_NODE;
  this->rhs_.PRINT_NODE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4ab9a(%rip), %rsi     # 0x56477
movq %rbx, %rdi
callq 0x8240
movslq 0xc(%r14), %rcx
shlq $0x5, %rcx
leaq 0x75a0c(%rip), %rdx     # 0x81300
leaq (%rcx,%rdx), %rsi
addq $-0x2040, %rsi          # imm = 0xDFC0
movq %rax, %rdi
callq 0x8230
leaq 0x4c6fb(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4ab1f(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x20(%rax)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::BinaryExpression::PrintNode(int, std::ostream&)
void BinaryExpression::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "BinaryExpression OP: " << OP_STRING(this->op_) << LINE_NO
          << std::endl;
  // this->lhs_.PRINT_NODE;
  this->lhs_->PRINT_NODE;
  this->rhs_.PRINT_NODE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4aaa9(%rip), %rsi     # 0x56490
movq %rbx, %rdi
callq 0x8240
movslq 0xc(%r14), %rcx
shlq $0x5, %rcx
leaq 0x75902(%rip), %rdx     # 0x81300
leaq (%rcx,%rdx), %rsi
addq $-0x2040, %rsi          # imm = 0xDFC0
movq %rax, %rdi
callq 0x8230
leaq 0x4c5f1(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4aa15(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x20(%rax)
movq 0x20(%r14), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::UnaryExpression::PrintNode(int, std::ostream&)
void UnaryExpression::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "UnaryExpression OP: " << OP_STRING(this->op_) << LINE_NO
          << std::endl;
  this->rhs_.PRINT_NODE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4a9d9(%rip), %rsi     # 0x564a6
movq %rbx, %rdi
callq 0x8240
movslq 0xc(%r14), %rcx
shlq $0x5, %rcx
leaq 0x7581c(%rip), %rdx     # 0x81300
leaq (%rcx,%rdx), %rsi
addq $-0x2040, %rsi          # imm = 0xDFC0
movq %rax, %rdi
callq 0x8230
leaq 0x4c50b(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4a92f(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movq 0x20(%rax), %rax
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::FunctionCall::PrintNode(int, std::ostream&)
void FunctionCall::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "FunctionCall" << LINE_NO << std::endl;
  this->name_.PRINT_NODE;
  this->args_.PRINT_NODE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4a900(%rip), %rsi     # 0x564bb
movq %rbx, %rdi
callq 0x8240
leaq 0x4c43f(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4a863(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x20(%rax)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/luooofan[P]hblzbd_compiler/src/ast.cpp
// Function: ast::VariableDefineWithInit::PrintNode(int, std::ostream&)
void VariableDefineWithInit::PrintNode(int indentation, std::ostream &outfile) {
  PRINT_INDENT;
  outfile << "DefineWithInit" << (is_const_ ? " const" : "") << LINE_NO
          << std::endl;
  name_.PRINT_NODE;
  value_.PRINT_NODE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
callq 0xb484
leaq 0x4a76f(%rip), %rsi     # 0x564c8
movq %rbx, %rdi
callq 0x8240
leaq 0x4a76f(%rip), %rcx     # 0x564d7
leaq 0x4a3da(%rip), %rsi     # 0x56149
cmpb $0x0, 0xc(%r14)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x8240
leaq 0x4c282(%rip), %rsi     # 0x58009
movq %rax, %rdi
callq 0x8240
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x84b0
leaq 0x4a6a6(%rip), %rsi     # 0x56448
movq %rax, %rdi
callq 0x8240
movq %rax, %rdi
callq 0x8170
movq 0x10(%r14), %rdi
incl %ebp
movq (%rdi), %rax
movl %ebp, %esi
movq %rbx, %rdx
callq *0x20(%rax)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
nop