// File: 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
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
callq 0x81a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x84ea
jmp 0x86fb
movq -0x118(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8340
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x8505
jmp 0x84ce
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x10dd0
testb $0x1, %al
jne 0x851a
jmp 0x8622
movq -0x118(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0x138(%rbp)
movq 0x8(%rax), %rdi
callq 0x12e20
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0x10d10
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x10d90
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x12e20
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xb670
leaq -0x80(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x10d30
movq -0x128(%rbp), %rdi
callq 0x3180
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x10d60
jmp 0x85b3
leaq -0xc0(%rbp), %rdi
callq 0x3180
movq -0x130(%rbp), %rdi
movq -0x120(%rbp), %rdx
movq %rax, %rcx
movl -0x1c(%rbp), %r8d
leaq 0xfebc(%rip), %rsi      # 0x18497
movb $0x0, %al
callq 0x30a0
leaq -0xc0(%rbp), %rdi
callq 0x3210
leaq -0xa0(%rbp), %rdi
callq 0x3210
jmp 0x86d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3210
jmp 0x8704
leaq -0x80(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x10d30
movq -0x148(%rbp), %rdi
callq 0x3180
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x10d60
jmp 0x8669
leaq -0x110(%rbp), %rdi
callq 0x3180
movq -0x150(%rbp), %rdi
movq -0x140(%rbp), %rdx
movq %rax, %rcx
movl -0x1c(%rbp), %r8d
leaq 0xfe2c(%rip), %rsi      # 0x184bd
movb $0x0, %al
callq 0x30a0
leaq -0x110(%rbp), %rdi
callq 0x3210
leaq -0xf0(%rbp), %rdi
callq 0x3210
jmp 0x86d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3210
jmp 0x8704
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x80(%rbp), %rsi
callq 0x12d60
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x12e40
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0xc8(%rbp), %rdi
callq 0x35d0