// File: negativeview[P]Software-Business-Sim/StatusCommand.cpp
// Function: StatusCommand::executeCommand(char const*)
void StatusCommand::executeCommand(const char *line) {
	Company *playerCompany = this->_masterState->getPlayerCompany();
	int money = playerCompany->getMoney();
	vector<Person *> *employees = playerCompany->getEmployees();
	vector<Project *> *projects = playerCompany->getProjects();
	map<Platform *, int> *platformSkills = playerCompany->getPlatformSkills();

	char message[100];
	sprintf(message, "You currently have %d money", money);
	this->_masterState->addMessage(message);

	sprintf(message, "You have %lu employees", employees->size());
	this->_masterState->addMessage(message);

	sprintf(message, "You have %lu projects", projects->size());
	this->_masterState->addMessage(message);

	map<string, int> *score = new map<string, int>();
	for (vector<Project *>::iterator it = projects->begin(); it != projects->end(); ++it) {
		Project *p = *it;

		Platform *platform = p->getPlatform();
		map<string, int> *requirements = platform->getRequires();
		for (map<string, int>::iterator it2 = requirements->begin(); it2 != requirements->end(); ++it2) {
			(*score)[it2->first] -= it2->second;
		}
		map<string, int> *provides = platform->getProvides();
		for(map<string, int>::iterator it2 = provides->begin(); it2 != provides->end(); ++it2) {
			(*score)[it2->first] += it2->second;
		}

		sprintf(message, "\t%s-based %s for %s\n", platform->getFullName(), p->getLanguage()->getFullName(), p->getMarket()->getFullName());
		this->_masterState->addMessage(message);

		for(map<string, int>::iterator it2 = score->begin(); it2 != score->end(); ++it2) {
			sprintf(message, "\t%s: %d\n", it2->first.c_str(), it2->second);
			this->_masterState->addMessage(message);
		}

	}

	this->_masterState->addMessage("Your skills in platforms are as follows:");
	for (map<Platform *, int>::iterator it = platformSkills->begin(); it != platformSkills->end(); ++it) {
		sprintf(message, "\t%s: %d", it->first->getName().c_str(), it->second);
		this->_masterState->addMessage(message);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x148(%rbp)
movq 0x8(%rax), %rdi
callq 0x12e20
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xc270
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0xc250
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0xb620
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0xbe70
movq %rax, -0x38(%rbp)
leaq -0xa0(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0xec76(%rip), %rsi      # 0x18655
movb $0x0, %al
callq 0x30a0
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
leaq -0xa0(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4060
movq -0x158(%rbp), %rdi
movq %rax, %rdx
leaq 0xec4c(%rip), %rsi      # 0x18671
movb $0x0, %al
callq 0x30a0
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
leaq -0xa0(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4080
movq -0x150(%rbp), %rdi
movq %rax, %rdx
leaq 0xec1d(%rip), %rsi      # 0x18688
movb $0x0, %al
callq 0x30a0
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
movl $0x30, %edi
callq 0x3370
movq %rax, %rdi
movq %rdi, -0x140(%rbp)
xorl %esi, %esi
movl $0x30, %edx
callq 0x31e0
movq -0x140(%rbp), %rdi
callq 0x4240
movq -0x140(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9f00
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9f70
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x9f30
testb $0x1, %al
jne 0x9aff
jmp 0x9ddb
leaq -0xb0(%rbp), %rdi
callq 0x9fa0
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x8000
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x41a0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x9fc0
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x44b0
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x9ff0
testb $0x1, %al
jne 0x9b7a
jmp 0x9bd5
leaq -0xd8(%rbp), %rdi
callq 0xa020
movl 0x20(%rax), %eax
movl %eax, -0x15c(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xa020
movq -0x168(%rbp), %rdi
movq %rax, %rsi
callq 0x4260
movl -0x15c(%rbp), %edx
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
leaq -0xd8(%rbp), %rdi
callq 0x54e0
jmp 0x9b4e
movq -0xc8(%rbp), %rdi
callq 0x4200
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x9fc0
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x44b0
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x9ff0
testb $0x1, %al
jne 0x9c27
jmp 0x9c80
leaq -0xf0(%rbp), %rdi
callq 0xa020
movl 0x20(%rax), %eax
movl %eax, -0x16c(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xa020
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x4260
movl -0x16c(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
leaq -0xf0(%rbp), %rdi
callq 0x54e0
jmp 0x9bfb
leaq -0xa0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x5790
movq %rax, -0x188(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x8020
movq %rax, %rdi
callq 0x5790
movq %rax, -0x180(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x8040
movq %rax, %rdi
callq 0x5790
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rdx
movq -0x180(%rbp), %rcx
movq %rax, %r8
leaq 0xe9af(%rip), %rsi      # 0x1869e
movb $0x0, %al
callq 0x30a0
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
movq -0xa8(%rbp), %rdi
callq 0x9fc0
movq %rax, -0x100(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x44b0
movq %rax, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x9ff0
testb $0x1, %al
jne 0x9d4c
jmp 0x9dc8
leaq -0xa0(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xa020
movq %rax, %rdi
callq 0x3180
movq %rax, -0x198(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xa020
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rdx
movl 0x20(%rax), %ecx
leaq 0xe91a(%rip), %rsi      # 0x186b3
movb $0x0, %al
callq 0x30a0
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
leaq -0x100(%rbp), %rdi
callq 0x54e0
jmp 0x9d20
jmp 0x9dca
leaq -0xb0(%rbp), %rdi
callq 0xa050
jmp 0x9ad3
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xe8cf(%rip), %rsi      # 0x186bc
callq 0x12d60
movq -0x38(%rbp), %rdi
callq 0xa070
movq %rax, -0x110(%rbp)
movq -0x38(%rbp), %rdi
callq 0xa0d0
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xa0a0
testb $0x1, %al
jne 0x9e2e
jmp 0x9ec9
leaq -0xa0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xa100
movq (%rax), %rsi
leaq -0x138(%rbp), %rdi
callq 0x175f0
leaq -0x138(%rbp), %rdi
callq 0x3180
movq %rax, -0x1a8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xa100
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rdx
movl 0x8(%rax), %ecx
leaq 0xe857(%rip), %rsi      # 0x186e5
movb $0x0, %al
callq 0x30a0
leaq -0x138(%rbp), %rdi
callq 0x3210
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x12d60
leaq -0x110(%rbp), %rdi
callq 0xa130
jmp 0x9e02
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw %cs:(%rax,%rax)