// File: /workspace/github_cpp_makefile_star2_O1/negativeview[P]Software-Business-Sim/Company.cpp
// Function: Company::recomputeCompanySkills()
void Company::recomputeCompanySkills() {
	map<Platform *, int> tmpSkillListTotals;
	map<Platform *, int> highestSkill;

	for (vector<Person *>::iterator it = this->_employees->begin(); it != this->_employees->end(); ++it) {
		Person *employee = *it;
		map<Platform *, int> *employeePlatformSkills = employee->getPlatformSkills();
		for (map<Platform *, int>::iterator it2 = employeePlatformSkills->begin(); it2 != employeePlatformSkills->end(); ++it2) {
			int existingSkill = tmpSkillListTotals[it2->first];
			existingSkill += it2->second;
			tmpSkillListTotals[it2->first] = existingSkill;

			if (it2->second > highestSkill[it2->first])
				highestSkill[it2->first] = it2->second;
		}
	}

	for (map<Platform *, int>::iterator it3 = tmpSkillListTotals.begin(); it3 != tmpSkillListTotals.end(); ++it3) {
		(*this->_platformSkills)[it3->first] = ((it3->second / this->_employees->size()) + highestSkill[it3->first]) / 2;
	}

	map<Language *, int> tmpLanguageListTotals;
	map<Language *, int> highestLanguage;

	for (vector<Person *>::iterator it = this->_employees->begin(); it != this->_employees->end(); ++it) {
		Person *employee = *it;
		map<Language *, int> *employeeLanguageSkills = employee->getLanguageSkills();
		for (map<Language *, int>::iterator it2 = employeeLanguageSkills->begin(); it2 != employeeLanguageSkills->end(); ++it2) {
			int existingSkill = tmpLanguageListTotals[it2->first];
			existingSkill += it2->second;
			tmpLanguageListTotals[it2->first] = existingSkill;

			if (it2->second > highestLanguage[it2->first])
				highestLanguage[it2->first] = it2->second;
		}
	}

	for (map<Language *, int>::iterator it3 = tmpLanguageListTotals.begin(); it3 != tmpLanguageListTotals.end(); ++it3) {
		(*this->_languageSkills)[it3->first] = ((it3->second / this->_employees->size()) + highestLanguage[it3->first]) / 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq -0x90(%rbp), %rcx
xorl %eax, %eax
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xf0(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x10(%rdi), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
movq %rdi, -0x38(%rbp)
je 0x7419
movq %rcx, -0x30(%rbp)
movq (%rcx), %rdi
callq 0x8a2e
movq %rax, %r12
movq 0x18(%rax), %r13
addq $0x8, %r12
cmpq %r12, %r13
je 0x73ff
leaq 0x20(%r13), %rbx
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x7930
movl (%rax), %r15d
movl 0x28(%r13), %r14d
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x7930
addl %r15d, %r14d
movl %r14d, (%rax)
movl 0x28(%r13), %r14d
leaq -0xf8(%rbp), %rdi
movq %rbx, %rsi
callq 0x7930
cmpl (%rax), %r14d
jle 0x73ef
movl 0x28(%r13), %r14d
leaq -0xf8(%rbp), %rdi
movq %rbx, %rsi
callq 0x7930
movl %r14d, (%rax)
movq %r13, %rdi
callq 0x31f0
movq %rax, %r13
cmpq %r12, %rax
jne 0x7392
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movq -0x38(%rbp), %rbx
movq 0x10(%rbx), %rax
cmpq 0x8(%rax), %rcx
jne 0x7376
movq -0x80(%rbp), %r14
leaq -0x90(%rbp), %rax
cmpq %rax, %r14
je 0x7483
leaq 0x20(%r14), %r12
movslq 0x28(%r14), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r13
subq (%rax), %r13
leaq -0xf8(%rbp), %rdi
movq %r12, %rsi
callq 0x7930
movslq (%rax), %r15
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x7930
movq %rax, %rcx
sarq $0x3, %r13
movq -0x30(%rbp), %rax
xorl %edx, %edx
divq %r13
addq %r15, %rax
shrq %rax
movl %eax, (%rcx)
movq %r14, %rdi
callq 0x31f0
movq %rax, %r14
jmp 0x741d
leaq -0x60(%rbp), %rcx
xorl %eax, %eax
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xc0(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x10(%rbx), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x755d
movq %rcx, -0x30(%rbp)
movq (%rcx), %rdi
callq 0x8a38
movq %rax, %r12
movq 0x18(%rax), %r13
addq $0x8, %r12
cmpq %r12, %r13
je 0x7548
leaq 0x20(%r13), %rbx
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x799a
movl (%rax), %r15d
movl 0x28(%r13), %r14d
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x799a
addl %r15d, %r14d
movl %r14d, (%rax)
movl 0x28(%r13), %r14d
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x799a
cmpl (%rax), %r14d
jle 0x7538
movl 0x28(%r13), %r14d
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x799a
movl %r14d, (%rax)
movq %r13, %rdi
callq 0x31f0
movq %rax, %r13
cmpq %r12, %rax
jne 0x74e1
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movq -0x38(%rbp), %rbx
movq 0x10(%rbx), %rax
jmp 0x74bb
movq -0x50(%rbp), %r14
leaq -0x60(%rbp), %rax
cmpq %rax, %r14
je 0x75c4
leaq 0x20(%r14), %r12
movslq 0x28(%r14), %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r13
subq (%rax), %r13
leaq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x799a
movslq (%rax), %r15
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x799a
movq %rax, %rcx
sarq $0x3, %r13
movq -0x38(%rbp), %rax
xorl %edx, %edx
divq %r13
addq %r15, %rax
shrq %rax
movl %eax, (%rcx)
movq %r14, %rdi
callq 0x31f0
movq %rax, %r14
jmp 0x7561
leaq -0xc8(%rbp), %rdi
callq 0x7a04
leaq -0x68(%rbp), %rdi
callq 0x7a04
leaq -0xf8(%rbp), %rdi
callq 0x7a62
leaq -0x98(%rbp), %rdi
callq 0x7a62
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x760b
jmp 0x7625
jmp 0x760b
jmp 0x7625
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x7a04
leaq -0x68(%rbp), %rdi
callq 0x7a04
jmp 0x7628
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x7a62
leaq -0x98(%rbp), %rdi
callq 0x7a62
movq %rbx, %rdi
callq 0x3500