LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/ReadMappingReader.cpp
// Function: Bio::SAMReader::next_mapping()
ReadMapping* SAMReader::next_mapping()
{
	// The following loop should have an effect just once - at the beginning. Otherwise it should result with an entry 
	// every time it reads a line 
	static char* 	next_line = (char*)calloc(1024, sizeof(char));
	static size_t	next_line_size = 1024;
	next_line[0] = 0;
	do {
		// We do the following because we don't know whether the size of next_line is sufficient for storing the next line. 
		// If not we will increase the size of next_line until we have enough space. Eventually next_line will be able to 
		// store the longest line in the file.
		char 	*p = next_line;
		size_t	s = next_line_size;
		while(fgets(p, s, m_fp)) {
			if((*(p+strlen(p)-1) == '\n') || !this->good())
				break;
			if(strlen(p) != s-1) {
				// This is weird!
			}
			// Else - we did not read the whole line, need to increase next_line's size and continue reading
			next_line_size *= 2;
			next_line = (char*)realloc(next_line, next_line_size);
			p = next_line+strlen(next_line); 
			s = next_line_size - strlen(next_line);
		}
		if(next_line[0] == '@')
			m_total_to_read -= strlen(next_line);		
	} while(this->good() && ((next_line[0] == 0) || (next_line[0] == '@')));
	if(next_line[0] == 0) {
		return NULL;
	}
//		return new ReadMapping(SAMReader::_end);
	m_total_read += strlen(next_line);
	chomp(next_line);

	return new ReadMapping(next_line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x117c9(%rip), %al      # 0x18318
testb %al, %al
je 0x6c58
movq 0x117b2(%rip), %r14     # 0x18310
movb $0x0, (%r14)
movl 0x11778(%rip), %esi     # 0x182e0
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4470
testq %rax, %rax
je 0x6bda
movq %r14, %rdi
callq 0x4130
cmpb $0xa, -0x1(%r14,%rax)
je 0x6bda
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
testb %al, %al
je 0x6bda
movq 0x11743(%rip), %r15     # 0x182e0
addq %r15, %r15
movq %r15, 0x11739(%rip)     # 0x182e0
movq 0x11762(%rip), %rdi     # 0x18310
movq %r15, %rsi
callq 0x44a0
movq %rax, %r14
movq %rax, 0x11750(%rip)     # 0x18310
movq %rax, %rdi
callq 0x4130
addq %rax, %r14
subl %eax, %r15d
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movl %r15d, %esi
jmp 0x6b6f
movq 0x1172f(%rip), %rdi     # 0x18310
cmpb $0x40, (%rdi)
jne 0x6bef
callq 0x4130
subq %rax, 0x30(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq 0x11711(%rip), %r14     # 0x18310
movzbl (%r14), %ecx
testb %al, %al
je 0x6c12
testb $-0x41, %cl
je 0x6b62
jmp 0x6c16
testl %ecx, %ecx
je 0x6c48
movq %r14, %rdi
callq 0x4130
addq %rax, 0x38(%rbx)
movq %r14, %rdi
callq 0xf054
movl $0xe8, %edi
callq 0x42b0
movq %rax, %rbx
movq 0x116d2(%rip), %rsi     # 0x18310
movq %rax, %rdi
callq 0x5570
jmp 0x6c4a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x45c4
jmp 0x6b57
movq %rax, %r14
movq %rbx, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x44f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/abawaca-build.cpp
// Function: Scaf_segment::add_mapped_read(Bio::ReadMapping const&, unsigned long)
void Scaf_segment::add_mapped_read(const Bio::ReadMapping& rmapped, size_t dimension)
{
	if(dimensions.size() <= dimension)
		dimensions.resize(dimension+1);

	size_t s = (rmapped.ref_pos() < start)? start : rmapped.ref_pos();
	size_t e = ((rmapped.ref_pos()+rmapped.read_length()-1) > end)? end : (rmapped.ref_pos()+rmapped.read_length()-1);
	dimensions[dimension] += double(e-s+1)/(this->end-this->start+1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x78(%rdi), %rax
movq 0x80(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rdx, %rcx
ja 0x8d1f
leaq 0x78(%r14), %r12
leaq 0x1(%rbx), %rsi
movq %r12, %rdi
callq 0xbb94
movq (%r12), %rax
movq 0x50(%r15), %rcx
movq 0x48(%r14), %rdx
cmpq %rdx, %rcx
movq %rdx, %rsi
cmovaq %rcx, %rsi
movq 0x90(%r15), %rdi
movq 0x50(%r14), %r8
addq %rdi, %rcx
decq %rcx
cmpq %r8, %rcx
cmovaeq %r8, %rcx
subq %rsi, %rcx
incq %rcx
movq %rcx, %xmm0
movq 0x85e4(%rip), %xmm1     # 0x11340
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x85e8(%rip), %xmm2     # 0x11350
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
subq %rdx, %r8
incq %r8
movq %r8, %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm3
addsd (%rax,%rbx,8), %xmm3
movsd %xmm3, (%rax,%rbx,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/abawaca-build.cpp
// Function: Scaf::add_mapped_read(Bio::ReadMapping const&, unsigned long)
void Scaf::add_mapped_read(const Bio::ReadMapping& rmapped, size_t dimension)
{
	size_t s=rmapped.ref_pos(), e=rmapped.ref_pos()+rmapped.read_length()-1;
	for(auto it=segment_coords.begin(); it!=segment_coords.end(); it++) {
		if(s > it->second)
			continue;
		if(e < it->first)
			break;
		segments[it-segment_coords.begin()]->add_mapped_read(rmapped, dimension);
	}

	if(dimension == this_sample)
		this->nbps += rmapped.read_length();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %r12
movq 0x50(%rdi), %rax
cmpq %rax, %r12
je 0x92b8
movq 0x50(%r14), %r13
movq 0x90(%r14), %rcx
addq %r13, %rcx
decq %rcx
movq %rcx, -0x38(%rbp)
movq %r12, %r15
cmpq 0x8(%r12), %r13
ja 0x92ab
movq -0x38(%rbp), %rax
cmpq (%r12), %rax
jb 0x92b8
movq %r15, %rax
subq 0x48(%rbx), %rax
movq 0x60(%rbx), %rcx
sarq %rax
movq (%rcx,%rax), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rdx
callq 0x8ce0
movq 0x50(%rbx), %rax
addq $0x10, %r12
addq $0x10, %r15
cmpq %rax, %r12
jne 0x9278
movq -0x30(%rbp), %rax
cmpq %rax, 0xf0ad(%rip)      # 0x18370
jne 0x92d0
movq 0x90(%r14), %rax
addq %rax, 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/abawaca-build.cpp
// Function: Links::~Links()
Links::~Links()
{
	set<Links::Link*> links_to_delete;

	for(auto it=links.begin(); it!=links.end(); it++) {
		for(auto sit=it->second.begin(); sit!=it->second.end(); sit++) {
			links_to_delete.insert(sit->second);
		}
	}

	for(auto sit=links_to_delete.begin(); sit!=links_to_delete.end(); sit++)
		delete(*sit);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r12
leaq -0x58(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x20(%rdi), %r14
leaq 0x10(%rdi), %rbx
cmpq %rbx, %r14
je 0x93b8
movq %r12, -0x30(%rbp)
leaq -0x60(%rbp), %r15
movq 0x60(%r14), %r12
leaq 0x50(%r14), %r13
cmpq %r13, %r12
je 0x9353
leaq 0x48(%r12), %rsi
movq %r15, %rdi
callq 0xdae0
movq %r12, %rdi
callq 0x41d0
movq %rax, %r12
cmpq %r13, %rax
jne 0x9336
movq %r14, %rdi
callq 0x41d0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x9329
movq -0x48(%rbp), %r14
leaq -0x58(%rbp), %rbx
cmpq %rbx, %r14
movq -0x30(%rbp), %r12
je 0x93b8
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x93a0
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %rax
cmpq %rax, %rdi
je 0x938f
callq 0x4280
movq (%r15), %rdi
leaq 0x10(%r15), %rax
cmpq %rax, %rdi
je 0x93a0
callq 0x4280
movq %r15, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x4330
movq %rax, %r14
cmpq %rbx, %rax
jne 0x9374
addq $0x8, %r12
leaq -0x60(%rbp), %rdi
callq 0xc702
movq %r12, %rdi
callq 0xc75a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x7529
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/abawaca-build.cpp
// Function: Links::write_connections(std::basic_ofstream<char, std::char_traits<char>>&) const
void Links::write_connections(ofstream& os) const
{
	set<Links::Link*> links_to_write;

	for(auto it=links.begin(); it!=links.end(); it++) {
		for(auto sit=it->second.begin(); sit!=it->second.end(); sit++) {
			links_to_write.insert(sit->second);
		}
	}

	for(auto sit=links_to_write.begin(); sit!=links_to_write.end(); sit++)
		os << (*sit)->side1.seq << '\t' << (*sit)->side1.end << '\t' << (*sit)->side2.seq << '\t' << (*sit)->side2.end << '\t' << (*sit)->count << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq -0x60(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x20(%rdi), %r15
addq $0x10, %r14
cmpq %r14, %r15
je 0x9564
movq %rsi, -0x38(%rbp)
leaq -0x68(%rbp), %r12
movq 0x60(%r15), %r13
leaq 0x50(%r15), %rbx
cmpq %rbx, %r13
je 0x9456
leaq 0x48(%r13), %rsi
movq %r12, %rdi
callq 0xdae0
movq %r13, %rdi
callq 0x4330
movq %rax, %r13
cmpq %rbx, %rax
jne 0x943a
movq %r15, %rdi
callq 0x4330
movq %rax, %r15
cmpq %r14, %rax
jne 0x942d
movq -0x50(%rbp), %r14
leaq -0x60(%rbp), %r13
cmpq %r13, %r14
movq -0x38(%rbp), %rbx
je 0x9564
leaq -0x29(%rbp), %r15
movq 0x20(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4320
movb $0x9, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4320
movq 0x20(%r14), %rcx
movq 0x20(%rcx), %rsi
movq %rax, %rdi
callq 0x41b0
movb $0x9, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4320
movq 0x20(%r14), %rcx
movq 0x28(%rcx), %rsi
movq 0x30(%rcx), %rdx
movq %rax, %rdi
callq 0x4320
movb $0x9, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4320
movq 0x20(%r14), %rcx
movq 0x48(%rcx), %rsi
movq %rax, %rdi
callq 0x41b0
movb $0x9, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4320
movq 0x20(%r14), %rcx
movq 0x50(%rcx), %rsi
movq %rax, %rdi
callq 0x41b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4290
movsbl %al, %esi
movq %r12, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x41c0
movq %r14, %rdi
callq 0x4330
movq %rax, %r14
cmpq %r13, %rax
jne 0x947f
leaq -0x68(%rbp), %rdi
callq 0xc702
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x957e
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xc702
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/abawaca-build.cpp
// Function: calc_insert_size(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
size_t calc_insert_size(string sam_file)
{
	Bio::SAMReader  reader(sam_file);
	size_t s = 0;
	size_t	n = 0;

	while(reader.good() && (n<20000)) {
		Bio::ReadMappingPtr mapping(reader.next_mapping());
		if(mapping == NULL) {
			break;
		}

		// Note: bowtie2 computes the wrong TLEN for inserts connecting the two ends of a circular scaffold
		if(mapping->mapped() && mapping->pair_mapped() && (mapping->insert_size() > 0) && (mapping->direction() == Bio::ReadMapping::forward)) {
			s += mapping->insert_size();
			n++;
		}
	}

	return (n>0)? s/n : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x63a2
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0xbd42
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x9dcc
callq 0x4280
leaq -0x30(%rbp), %r14
xorl %ebx, %ebx
leaq -0x98(%rbp), %r15
xorl %r12d, %r12d
movq -0x90(%rbp), %rdi
callq 0x4440
testl %eax, %eax
jne 0x9e4d
cmpq $0x4e1f, %r12           # imm = 0x4E1F
ja 0x9e4d
movq %r15, %rdi
callq 0x6b3c
movq %rax, -0x38(%rbp)
movq %r14, %rdi
movq %rax, %rsi
callq 0xe120
movq -0x38(%rbp), %r13
testq %r13, %r13
je 0x9e3a
movq 0x28(%r13), %rax
testb $0xc, %al
jne 0x9e3a
movslq 0x80(%r13), %rcx
testq %rcx, %rcx
setle %dl
andl $0x10, %eax
shrl $0x4, %eax
orb %dl, %al
jne 0x9e3a
addq %rcx, %rbx
incq %r12
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x9e48
callq 0xc952
testq %r13, %r13
jne 0x9ddc
testq %r12, %r12
je 0x9e5f
movq %rbx, %rax
xorl %edx, %edx
divq %r12
movq %rax, %rbx
jmp 0x9e61
xorl %ebx, %ebx
leaq -0x98(%rbp), %rdi
callq 0x80d8
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x9ea1
callq 0x4280
jmp 0x9ea1
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x80d8
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/NameContainer.cpp
// Function: NameContainer::NameContainer()
NameContainer::NameContainer() {
	this->_firstNames = new vector<const char *>();
	this->_lastNames = new vector<const char *>();

	this->_setupLastNames();
	this->_setupFirstNames();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x3300
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %r14d, %r14d
movq %r14, 0x10(%rax)
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x3300
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r14, 0x10(%rax)
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x442c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x47ce
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandList.cpp
// Function: CommandList::CommandList(MasterState*)
CommandList::CommandList(MasterState *ms) {
	this->_commands = new vector<CommandFunctor *>();

	this->_commands->push_back(new EmployeesCommand(ms));
	this->_commands->push_back(new HireCommand(ms));
	this->_commands->push_back(new InterviewCommand(ms));
	this->_commands->push_back(new PeopleCommand(ms));
	this->_commands->push_back(new ProjectCommand(ms));
	this->_commands->push_back(new StatusCommand(ms));
	this->_commands->push_back(new WaitCommand(ms));
	this->_commands->push_back(new QuitCommand(ms));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x3300
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, (%r14)
movl $0x50, %edi
callq 0x3300
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5888
leaq -0x28(%rbp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5348
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5c7c
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x65c8
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5f28
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x61c8
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r12
movl $0x50, %edi
callq 0x3300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x60c8
leaq -0x28(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, %rdi
callq 0x50b0
movq (%r14), %r15
movl $0x50, %edi
callq 0x3300
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x687c
leaq -0x28(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, %rdi
callq 0x50b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x50, %esi
movq %r14, %rdi
jmp 0x4fb7
jmp 0x4fac
jmp 0x4fac
jmp 0x4fac
jmp 0x4fac
jmp 0x4fac
movq %rax, %rbx
movl $0x50, %esi
movq %r15, %rdi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
movq %rax, %rbx
movl $0x50, %esi
movq %r12, %rdi
jmp 0x4fb7
nop
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandList.cpp
// Function: CommandList::executeCommand(char const*)
void CommandList::executeCommand(const char *command) {
	if (command[0] != '\0') {
		int found = 0;
		for (vector<CommandFunctor *>::iterator it = this->_commands->begin(); it != this->_commands->end(); ++it) {
			CommandFunctor *commandFunctor = *it;
			string prefix = commandFunctor->getPrefix();

			if (strncmp(prefix.c_str(), command, strlen(prefix.c_str())) == 0) {
				commandFunctor->executeCommand(command);
				return;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, (%rsi)
je 0x5077
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %r15
cmpq 0x8(%rax), %r15
je 0x5077
movq %rsi, %rbx
movq (%r15), %r12
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x6a0c
movq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x3170
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3180
testl %eax, %eax
je 0x5052
leaq -0x38(%rbp), %rax
cmpq %rax, %r13
je 0x5043
movq -0x38(%rbp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x3320
addq $0x8, %r15
movq (%r14), %rax
cmpq 0x8(%rax), %r15
jne 0x4ffe
jmp 0x5077
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *(%rax)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5077
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3320
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x50a2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/HireCommand.cpp
// Function: HireCommand::doHireMenu()
Person *HireCommand::doHireMenu() {
	Person *ret = NULL;

	int n_choices = this->_masterState->getPlayerCompany()->getKnownPeople()->size();
    keypad(stdscr, TRUE);
	MENU *my_menu = this->setupMenu((vector<NamedObject *> *)(this->_masterState->getPlayerCompany()->getKnownPeople()));
	WINDOW *my_menu_win = this->setupWindow(my_menu, "Applicants");
	refresh();

    int c;
    int done = 0;
	while(!done) {
		c = wgetch(my_menu_win);
		switch(c) {
			case KEY_DOWN:
				menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
			case 10:	// Enter key, select the user.
				{
					ITEM *currentItem = current_item(my_menu);
					ret = (Person *)item_userptr(currentItem);
					done = 1;
				}
				break;
			case 27:
				done = 1;
				break;
		}
		wrefresh(my_menu_win);
	}

	/* Unpost and free all the memory taken up */
	unpost_menu(my_menu);

	ITEM **my_items = menu_items(my_menu);
	for(int i = 0; i < n_choices; ++i)
		free_item(my_items[i]);
	endwin();
	free_menu(my_menu);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x9abc
movq %rax, %rdi
callq 0x76c0
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x3, %r12
movq 0xab72(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3130
movq 0x8(%r14), %rdi
callq 0x9abc
movq %rax, %rdi
callq 0x76c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x6a68
movq %rax, %rbx
leaq 0x5c70(%rip), %rdx      # 0xb101
movq %r14, %rdi
movq %rax, %rsi
callq 0x6b2c
movq %rax, %r14
callq 0x34e0
movq %r14, %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
jg 0x54c6
movl $0x203, %esi            # imm = 0x203
je 0x54d2
cmpl $0xa, %eax
je 0x54e9
cmpl $0x1b, %eax
jne 0x54da
jmp 0x54e4
cmpl $0x103, %eax            # imm = 0x103
jne 0x54da
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3380
jmp 0x54a4
xorl %r15d, %r15d
jmp 0x54fc
movq %rbx, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x34b0
movq %rax, %r15
movq %r14, %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x30b0
testl %r12d, %r12d
jle 0x5537
movq %rax, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
callq 0x33c0
incq %r13
cmpq %r13, %r12
jne 0x5526
callq 0x33a0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/HireCommand.cpp
// Function: HireCommand::doGetWage(Person*)
int HireCommand::doGetWage(Person *p) {
	FIELD *field[2];
	FORM *my_form;

	field[0] = new_field(1, 10, 4, 35, 0, 0);
	field[1] = NULL;

	set_field_back(field[0], A_UNDERLINE);
	field_opts_off(field[0], O_AUTOSKIP);
	set_field_type(field[0], TYPE_INTEGER, 0, 1, 1000000);

	my_form = new_form(field);
	post_form(my_form);
	refresh();

	mvprintw(4, 10, "Offer Amount (per year):");
	refresh();

	int ch;
	while (true) {
		ch = getch();
		switch(ch) {
			case KEY_DOWN:
				form_driver(my_form, REQ_NEXT_FIELD);
				form_driver(my_form, REQ_END_LINE);
				break;
			case KEY_UP:
				form_driver(my_form, REQ_PREV_FIELD);
				form_driver(my_form, REQ_END_LINE);
				break;
//			case KEY_DEL:
//				form_driver(my_form, REQ_DEL_PREV);
//				break;
			case 10:
				{
					// Lame attempt to force the buffer to be filled out.
					form_driver(my_form, REQ_NEXT_FIELD);

					char *buffer = field_buffer(field[0], 0);
					return atoi(buffer);
				}
				break;
			default:
				form_driver(my_form, ch);
				break;
		}
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x1, %edi
movl $0xa, %esi
movl $0x4, %edx
movl $0x23, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3140
movq %rax, %rbx
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movq %rax, %rdi
movl $0x20000, %esi          # imm = 0x20000
callq 0x3420
movq %rbx, %rdi
movl $0x40, %esi
callq 0x30a0
movq 0xaa25(%rip), %rax      # 0xffd8
movq (%rax), %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
movl $0xf4240, %r8d          # imm = 0xF4240
xorl %eax, %eax
callq 0x3510
movq %r14, %rdi
callq 0x3460
movq %rax, %rbx
movq %rax, %rdi
callq 0x32d0
callq 0x34e0
leaq 0x5ecb(%rip), %rdx      # 0xb4b7
movl $0x4, %edi
movl $0xa, %esi
xorl %eax, %eax
callq 0x3400
callq 0x34e0
movq 0xa9c7(%rip), %r14      # 0xffd0
movq (%r14), %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
je 0x562d
cmpl $0x103, %eax            # imm = 0x103
je 0x5626
cmpl $0xa, %eax
jne 0x563f
jmp 0x564b
movl $0x205, %esi            # imm = 0x205
jmp 0x5632
movl $0x204, %esi            # imm = 0x204
movq %rbx, %rdi
callq 0x3530
movl $0x219, %eax            # imm = 0x219
movq %rbx, %rdi
movl %eax, %esi
callq 0x3530
jmp 0x5609
movq %rbx, %rdi
movl $0x204, %esi            # imm = 0x204
callq 0x3530
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x3430
movq %rax, %rdi
callq 0x34a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/HireCommand.cpp
// Function: HireCommand::executeCommand(char const*)
void HireCommand::executeCommand(const char *line) {
	while (true) {
		Person *toHire = this->doHireMenu();
		if (toHire == NULL)
			return;

		int hireAmount = this->doGetWage(toHire);
		if (hireAmount < 0)
			continue;

		char message[100];

		if (toHire->acceptWages(hireAmount)) {
			toHire->hire(this->_masterState->getPlayerCompany());
			toHire->setSalary(hireAmount);
			this->_masterState->getPlayerCompany()->addEmployee(toHire);
			sprintf(message, "%s %s joined your company for %d/year", toHire->getFirstName().c_str(), toHire->getLastName().c_str(), hireAmount);
		} else {
			sprintf(message, "%s %s rejected your offer of %d/year", toHire->getFirstName().c_str(), toHire->getLastName().c_str(), hireAmount);
		}
		this->_masterState->addMessage(message);
		this->_masterState->advanceTime(1);
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x542a
testq %rax, %rax
je 0x57a8
movq %rax, %r15
callq 0x5556
testl %eax, %eax
js 0x5689
movl %eax, %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x8a38
testb %al, %al
je 0x571a
movq 0x8(%rbx), %rdi
callq 0x9abc
movq %r15, %rdi
movq %rax, %rsi
callq 0x89be
movq %r15, %rdi
movl %r14d, %esi
callq 0x8a24
movq 0x8(%rbx), %rdi
callq 0x9abc
movq %rax, %rdi
movq %r15, %rsi
callq 0x723c
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x89c8
movq (%r12), %r12
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x89f6
leaq -0x50(%rbp), %r15
movq -0x10(%r15), %rcx
leaq 0x5db8(%rip), %rsi      # 0xb4d0
jmp 0x5748
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x89c8
movq (%r12), %r12
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x89f6
leaq -0x50(%rbp), %r15
movq -0x10(%r15), %rcx
leaq 0x5dae(%rip), %rsi      # 0xb4f6
leaq -0xd0(%rbp), %rdi
movq %r12, %rdx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x3080
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x5771
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3320
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x578a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x3320
movq 0x8(%rbx), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x9a3e
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0x9ac6
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57ba
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57d6
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/InterviewCommand.cpp
// Function: InterviewCommand::executeCommand(char const*)
void InterviewCommand::executeCommand(const char *line) {
	while (true) {
		Person *toInterview = this->personChoiceMenu("Applicants");
		if (toInterview == NULL)
			return;

		bool learnedAnything = false;
		list<Trait *> *believedTraits = toInterview->getBelievedTraits();
		for (list<Trait *>::iterator it = believedTraits->begin(); it != believedTraits->end(); ++it) {
			Trait *t = *it;
			if (rand() % 2 == 0) {
				if (t->discoverMore()) {
					learnedAnything = true;
					char message[100];
					sprintf(message, "Learned more about %s %s's %s", toInterview->getFirstName().c_str(), toInterview->getLastName().c_str(), t->getName().c_str());
					this->_masterState->addMessage(message);
				}
			}
		}

		if (!learnedAnything) {
			this->_masterState->addMessage("That was a thoroughly disappointing interview, in which you learned nothing.");
		}
		this->_masterState->advanceTime(1);

		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r13
leaq 0x5385(%rip), %rsi      # 0xb101
callq 0x6fa2
testq %rax, %rax
je 0x5ec8
movq %rax, %r14
movq %rax, %rdi
callq 0x8b20
movq (%rax), %rbx
cmpq %rax, %rbx
je 0x5eaa
movq %rax, %r15
xorl %r12d, %r12d
movq %r13, -0x30(%rbp)
movq 0x10(%rbx), %r13
callq 0x30c0
testb $0x1, %al
jne 0x5dc4
movq %r13, %rdi
callq 0xa798
testb %al, %al
jne 0x5dd1
movq (%rbx), %rbx
cmpq %r15, %rbx
jne 0x5dab
jmp 0x5ea0
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x89c8
movq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x89f6
movq -0x58(%rbp), %r12
leaq -0x98(%rbp), %rdi
movq %r13, %rsi
callq 0xa7b6
movq -0x98(%rbp), %r8
leaq -0x100(%rbp), %rdi
leaq 0x5741(%rip), %rsi      # 0xb55a
movq -0x38(%rbp), %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3080
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %r13
je 0x5e4d
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3320
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5e66
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x3320
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5e7f
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3320
movq 0x8(%r13), %rdi
leaq -0x100(%rbp), %rsi
callq 0x9a3e
movq (%rbx), %rbx
movb $0x1, %r12b
cmpq %r15, %rbx
jne 0x5dab
jmp 0x5eba
testb $0x1, %r12b
movq -0x30(%rbp), %r13
jne 0x5eba
movq 0x8(%r13), %rdi
leaq 0x56c3(%rip), %rsi      # 0xb578
callq 0x9a3e
movq 0x8(%r13), %rdi
movl $0x1, %esi
callq 0x9ac6
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5efb
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x3320
jmp 0x5efb
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5f14
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/ProjectCommand.cpp
// Function: ProjectCommand::executeCommand(char const*)
void ProjectCommand::executeCommand(const char *line) {
	Language *language = this->languageChoiceMenu();
	if (language == NULL)
		return;

	Platform *platform = this->platformChoiceMenu();
	if (platform == NULL)
		return;

	Market *market = this->marketChoiceMenu();
	if (market == NULL)
		return;

	Project *project = new Project(this->_masterState->getPlayerCompany(), language, platform, market);
	this->_masterState->getPlayerCompany()->addProject(project);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6c60
testq %rax, %rax
je 0x6094
movq %rax, %r14
movq %rbx, %rdi
callq 0x6d76
testq %rax, %rax
je 0x6094
movq %rax, %r12
movq %rbx, %rdi
callq 0x6e8c
testq %rax, %rax
je 0x6094
movq %rax, %r13
movl $0x28, %edi
callq 0x3300
movq %rax, %r15
movq 0x8(%rbx), %rdi
callq 0x9abc
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x5308
movq 0x8(%rbx), %rdi
callq 0x9abc
movq %rax, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7206
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
nop
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/PeopleCommand.cpp
// Function: PeopleCommand::executeCommand(char const*)
void PeopleCommand::executeCommand(const char *line) {
	vector<Person *> *allPeople = this->_masterState->getPlayerCompany()->getKnownPeople();

	for (vector<Person *>::iterator it = allPeople->begin(); it != allPeople->end(); ++it) {
		Person *currentPerson = *it;

		char message[100];

		sprintf(message, "%s %s", currentPerson->getFirstName().c_str(), currentPerson->getLastName().c_str());
		this->_masterState->addMessage(message);
		
		Company *company = currentPerson->getCompany();
		
		list<Trait *> *personTraits;
		if (company && company == this->_masterState->getPlayerCompany())
			personTraits = currentPerson->getRealTraits();
		else
			personTraits = currentPerson->getBelievedTraits();

		for (list<Trait *>::iterator it2 = personTraits->begin(); it2 != personTraits->end(); ++it2) {
			Trait *t = *it2;
			sprintf(message, "    %10s: %s", t->getName().c_str(), t->getDiscoveryModifiedText().c_str());
			this->_masterState->addMessage(message);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r13
movq 0x8(%rdi), %rdi
callq 0x9abc
movq %rax, %rdi
callq 0x76c0
movq (%rax), %rbx
movq %rax, -0x70(%rbp)
cmpq 0x8(%rax), %rbx
je 0x683a
movq (%rbx), %r14
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x89c8
movq -0x48(%rbp), %r15
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x89f6
movq -0x68(%rbp), %rcx
leaq -0xe0(%rbp), %rdi
leaq 0x5022(%rip), %rsi      # 0xb736
movq %r15, %rdx
xorl %eax, %eax
callq 0x3080
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6737
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6750
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3320
movq 0x8(%r13), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x9a3e
movq %r14, %rdi
callq 0x89a0
testq %rax, %rax
movq %rbx, -0x78(%rbp)
je 0x6782
movq %rax, %r15
movq 0x8(%r13), %rdi
callq 0x9abc
cmpq %rax, %r15
je 0x678c
movq %r14, %rdi
callq 0x8b20
jmp 0x6794
movq %r14, %rdi
callq 0x8b16
movq %rax, %r14
movq (%rax), %rbx
cmpq %r14, %rbx
je 0x6829
movq 0x10(%rbx), %r12
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0xa7b6
movq -0x48(%rbp), %r15
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0xa7e4
movq -0x68(%rbp), %rcx
leaq -0xe0(%rbp), %rdi
leaq 0x4f67(%rip), %rsi      # 0xb73c
movq %r15, %rdx
xorl %eax, %eax
callq 0x3080
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x67f8
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6811
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3320
movq 0x8(%r13), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x9a3e
movq (%rbx), %rbx
jmp 0x679a
movq -0x78(%rbp), %rbx
addq $0x8, %rbx
movq -0x70(%rbp), %rax
jmp 0x66d9
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x684e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x686a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3320
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::setupMenu(std::vector<NamedObject*, std::allocator<NamedObject*>>*)
MENU *CommandFunctor::setupMenu(vector<NamedObject *> *people) {
    int n_choices = people->size();
    ITEM **my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *));

    int i = 0;
    for (vector<NamedObject *>::iterator it = people->begin(); it != people->end(); ++it) {
    	NamedObject *p = *it;
    	my_items[i] = new_item(p->getTag(), p->getFullName());
    	set_item_userptr(my_items[i], p);
    	i++;
    }
    // Add the sigil.
    my_items[i] = new_item(NULL, NULL);

	MENU *my_menu = new_menu((ITEM **)my_items);

	return my_menu;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq (%rsi), %r13
movq 0x8(%rsi), %rbx
movq %rbx, %rax
subq %r13, %rax
shlq $0x1d, %rax
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %rax, %rdi
sarq $0x20, %rdi
movl $0x8, %esi
callq 0x31e0
movq %rax, %r14
cmpq %r13, %rbx
je 0x6b07
xorl %ebx, %ebx
movq %r14, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq (%r13), %r15
movq %r15, %rdi
callq 0x43a8
movq %rax, %r12
movq %r15, %rdi
callq 0x43b2
movq %r12, %rdi
movq %rax, %rsi
callq 0x3330
movq %rax, (%r14)
movq %rax, %rdi
movq %r15, %rsi
movq -0x38(%rbp), %r15
callq 0x3150
addq $0x8, %r13
addq $0x8, %r14
decq %rbx
cmpq 0x8(%r15), %r13
jne 0x6aba
negl %ebx
movq -0x30(%rbp), %r14
jmp 0x6b09
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x3330
movq %rax, (%r14,%rbx,8)
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::setupWindow(tagMENU*, char const*)
WINDOW *CommandFunctor::setupWindow(MENU *my_menu, const char *title) {
	WINDOW *my_menu_win = newwin(10, 40, 4, 4);
	keypad(my_menu_win, TRUE);

    set_menu_win(my_menu, my_menu_win);
    set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1));

    box(my_menu_win, 0, 0);
    mvwprintw(my_menu_win, 1, 2, title);
	mvwaddch(my_menu_win, 2, 0, ACS_LTEE);
	mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38);
	mvwaddch(my_menu_win, 2, 39, ACS_RTEE);

	post_menu(my_menu);
	wrefresh(my_menu_win);

	return my_menu_win;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movl $0xa, %edi
movl $0x28, %esi
movl $0x4, %edx
movl $0x4, %ecx
callq 0x3340
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
callq 0x3130
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31d0
movq %r14, %rdi
movl $0x6, %esi
movl $0x26, %edx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x3240
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3060
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3540
movq %r14, %rdi
movl $0x1, %esi
movl $0x2, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x3090
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x3350
cmpl $-0x1, %eax
je 0x6be4
movq 0x93da(%rip), %rax      # 0xffb0
movl 0x1d0(%rax), %esi
movq %r14, %rdi
callq 0x30e0
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x3350
cmpl $-0x1, %eax
je 0x6c15
movq 0x93ae(%rip), %rax      # 0xffb0
movl 0x1c4(%rax), %esi
movq %r14, %rdi
movl $0x26, %edx
callq 0x32a0
movq %r14, %rdi
movl $0x2, %esi
movl $0x27, %edx
callq 0x3350
cmpl $-0x1, %eax
je 0x6c41
movq 0x937d(%rip), %rax      # 0xffb0
movl 0x1d4(%rax), %esi
movq %r14, %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x3440
movq %r14, %rdi
callq 0x3380
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::languageChoiceMenu()
Language *CommandFunctor::languageChoiceMenu() {
	Language *ret = NULL;

	int n_choices = this->_masterState->getLanguages()->size();
    keypad(stdscr, TRUE);
	MENU *my_menu = this->setupMenu((vector<NamedObject *> *)(this->_masterState->getLanguages()));
	WINDOW *my_menu_win = this->setupWindow(my_menu, "Language");
	refresh();

    int c;
    int done = 0;
	while(!done) {
		c = wgetch(my_menu_win);
		switch(c) {
			case KEY_DOWN:
				menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
			case 10:	// Enter key, select the user.
				{
					ITEM *currentItem = current_item(my_menu);
					ret = (Language *)item_userptr(currentItem);
					done = 1;
				}
				break;
			case 27:
				done = 1;
				break;
		}
		wrefresh(my_menu_win);
	}

	/* Unpost and free all the memory taken up */
	unpost_menu(my_menu);

	ITEM **my_items = menu_items(my_menu);
	for(int i = 0; i < n_choices; ++i)
		free_item(my_items[i]);
	endwin();
	free_menu(my_menu);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x9ab2
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x3, %r12
movq 0x9344(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3130
movq 0x8(%rbx), %rdi
callq 0x9ab2
movq %rax, %rsi
callq 0x6a68
movq %rax, %rbx
leaq 0x4acf(%rip), %rdx      # 0xb783
movq %rax, %rsi
callq 0x6b2c
movq %rax, %r14
callq 0x34e0
movq %r14, %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
jg 0x6ce6
movl $0x203, %esi            # imm = 0x203
je 0x6cf2
cmpl $0xa, %eax
je 0x6d09
cmpl $0x1b, %eax
jne 0x6cfa
jmp 0x6d04
cmpl $0x103, %eax            # imm = 0x103
jne 0x6cfa
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3380
jmp 0x6cc4
xorl %r15d, %r15d
jmp 0x6d1c
movq %rbx, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x34b0
movq %rax, %r15
movq %r14, %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x30b0
testl %r12d, %r12d
jle 0x6d57
movq %rax, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
callq 0x33c0
incq %r13
cmpq %r13, %r12
jne 0x6d46
callq 0x33a0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::platformChoiceMenu()
Platform *CommandFunctor::platformChoiceMenu() {
	Platform *ret = NULL;

	int n_choices = this->_masterState->getPlatforms()->size();
    keypad(stdscr, TRUE);
	MENU *my_menu = this->setupMenu((vector<NamedObject *> *)(this->_masterState->getPlatforms()));
	WINDOW *my_menu_win = this->setupWindow(my_menu, "Platform");
	refresh();

    int c;
    int done = 0;
	while(!done) {
		c = wgetch(my_menu_win);
		switch(c) {
			case KEY_DOWN:
				menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
			case 10:	// Enter key, select the user.
				{
					ITEM *currentItem = current_item(my_menu);
					ret = (Platform *)item_userptr(currentItem);
					done = 1;
				}
				break;
			case 27:
				done = 1;
				break;
		}
		wrefresh(my_menu_win);
	}

	/* Unpost and free all the memory taken up */
	unpost_menu(my_menu);

	ITEM **my_items = menu_items(my_menu);
	for(int i = 0; i < n_choices; ++i)
		free_item(my_items[i]);
	endwin();
	free_menu(my_menu);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x9aa8
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x3, %r12
movq 0x922e(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3130
movq 0x8(%rbx), %rdi
callq 0x9aa8
movq %rax, %rsi
callq 0x6a68
movq %rax, %rbx
leaq 0x49c2(%rip), %rdx      # 0xb78c
movq %rax, %rsi
callq 0x6b2c
movq %rax, %r14
callq 0x34e0
movq %r14, %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
jg 0x6dfc
movl $0x203, %esi            # imm = 0x203
je 0x6e08
cmpl $0xa, %eax
je 0x6e1f
cmpl $0x1b, %eax
jne 0x6e10
jmp 0x6e1a
cmpl $0x103, %eax            # imm = 0x103
jne 0x6e10
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3380
jmp 0x6dda
xorl %r15d, %r15d
jmp 0x6e32
movq %rbx, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x34b0
movq %rax, %r15
movq %r14, %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x30b0
testl %r12d, %r12d
jle 0x6e6d
movq %rax, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
callq 0x33c0
incq %r13
cmpq %r13, %r12
jne 0x6e5c
callq 0x33a0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::marketChoiceMenu()
Market *CommandFunctor::marketChoiceMenu() {
	Market *ret = NULL;

	int n_choices = this->_masterState->getMarkets()->size();
    keypad(stdscr, TRUE);
	MENU *my_menu = this->setupMenu((vector<NamedObject *> *)(this->_masterState->getMarkets()));
	WINDOW *my_menu_win = this->setupWindow(my_menu, "Market");
	refresh();

    int c;
    int done = 0;
	while(!done) {
		c = wgetch(my_menu_win);
		switch(c) {
			case KEY_DOWN:
				menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
			case 10:	// Enter key, select the user.
				{
					ITEM *currentItem = current_item(my_menu);
					ret = (Market *)item_userptr(currentItem);
					done = 1;
				}
				break;
			case 27:
				done = 1;
				break;
		}
		wrefresh(my_menu_win);
	}

	/* Unpost and free all the memory taken up */
	unpost_menu(my_menu);

	ITEM **my_items = menu_items(my_menu);
	for(int i = 0; i < n_choices; ++i)
		free_item(my_items[i]);
	endwin();
	free_menu(my_menu);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x99ec
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x3, %r12
movq 0x9118(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3130
movq 0x8(%rbx), %rdi
callq 0x99ec
movq %rax, %rsi
callq 0x6a68
movq %rax, %rbx
leaq 0x48b5(%rip), %rdx      # 0xb795
movq %rax, %rsi
callq 0x6b2c
movq %rax, %r14
callq 0x34e0
movq %r14, %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
jg 0x6f12
movl $0x203, %esi            # imm = 0x203
je 0x6f1e
cmpl $0xa, %eax
je 0x6f35
cmpl $0x1b, %eax
jne 0x6f26
jmp 0x6f30
cmpl $0x103, %eax            # imm = 0x103
jne 0x6f26
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3380
jmp 0x6ef0
xorl %r15d, %r15d
jmp 0x6f48
movq %rbx, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x34b0
movq %rax, %r15
movq %r14, %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x30b0
testl %r12d, %r12d
jle 0x6f83
movq %rax, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
callq 0x33c0
incq %r13
cmpq %r13, %r12
jne 0x6f72
callq 0x33a0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/CommandFunctor.cpp
// Function: CommandFunctor::personChoiceMenu(char const*)
Person *CommandFunctor::personChoiceMenu(const char *title) {
	Person *ret = NULL;

	int n_choices = this->_masterState->getPlayerCompany()->getKnownPeople()->size();
    keypad(stdscr, TRUE);
	MENU *my_menu = this->setupMenu((vector<NamedObject *> *)(this->_masterState->getPlayerCompany()->getKnownPeople()));
	WINDOW *my_menu_win = this->setupWindow(my_menu, title);
	refresh();

    int c;
    int done = 0;
	while(!done) {
		c = wgetch(my_menu_win);
		switch(c) {
			case KEY_DOWN:
				menu_driver(my_menu, REQ_DOWN_ITEM);
				break;
			case KEY_UP:
				menu_driver(my_menu, REQ_UP_ITEM);
				break;
			case 10:	// Enter key, select the user.
				{
					ITEM *currentItem = current_item(my_menu);
					ret = (Person *)item_userptr(currentItem);
					done = 1;
				}
				break;
			case 27:
				done = 1;
				break;
		}
		wrefresh(my_menu_win);
	}

	/* Unpost and free all the memory taken up */
	unpost_menu(my_menu);

	ITEM **my_items = menu_items(my_menu);
	for(int i = 0; i < n_choices; ++i)
		free_item(my_items[i]);
	endwin();
	free_menu(my_menu);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x9abc
movq %rax, %rdi
callq 0x76c0
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x3, %r12
movq 0x8ff7(%rip), %rax      # 0xffd0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3130
movq 0x8(%rbx), %rdi
callq 0x9abc
movq %rax, %rdi
callq 0x76c0
movq %rax, %rsi
callq 0x6a68
movq %rax, %rbx
movq %rax, %rsi
movq %r14, %rdx
callq 0x6b2c
movq %rax, %r14
callq 0x34e0
movq %r14, %rdi
callq 0x3120
cmpl $0x102, %eax            # imm = 0x102
jg 0x7037
movl $0x203, %esi            # imm = 0x203
je 0x7043
cmpl $0xa, %eax
je 0x705a
cmpl $0x1b, %eax
jne 0x704b
jmp 0x7055
cmpl $0x103, %eax            # imm = 0x103
jne 0x704b
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x3380
jmp 0x7015
xorl %r15d, %r15d
jmp 0x706d
movq %rbx, %rdi
callq 0x3490
movq %rax, %rdi
callq 0x34b0
movq %rax, %r15
movq %r14, %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x30b0
testl %r12d, %r12d
jle 0x70a8
movq %rax, %r14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
callq 0x33c0
incq %r13
cmpq %r13, %r12
jne 0x7097
callq 0x33a0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/negativeview[P]Software-Business-Sim/Company.cpp
// Function: Company::addEmployee(Person*)
void Company::addEmployee(Person *person) {
	this->_employees->push_back(person);
	this->recomputeCompanySkills();

	for (vector<Person *>::iterator it = this->_knownPeople->begin(); it != this->_knownPeople->end(); ++it) {
		Person *p = *it;
		if (p == person) {
			this->_knownPeople->erase(it);
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, -0x10(%rbp)
movq 0x10(%rdi), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x7264
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x726d
leaq -0x10(%rbp), %rdx
callq 0x7ba2
movq %rbx, %rdi
callq 0x72c8
movq 0x18(%rbx), %rbx
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
cmpq %rax, %rdi
je 0x72c1
movq -0x10(%rbp), %rcx
movq %rax, %rdx
subq %rdi, %rdx
addq $-0x8, %rdx
cmpq %rcx, (%rdi)
je 0x72a7
addq $0x8, %rdi
addq $-0x8, %rdx
cmpq %rax, %rdi
jne 0x7293
jmp 0x72c1
leaq 0x8(%rdi), %rsi
cmpq %rax, %rsi
je 0x72b9
callq 0x34c0
movq 0x8(%rbx), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq