// File: /workspace/github_cpp_makefile_star2_O3/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, -0x38(%rbp)
leaq -0x90(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0xf0(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x10(%rdi), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x7440
movq %rcx, -0x30(%rbp)
movq (%rcx), %rdi
callq 0x89aa
movq %rax, %r12
movq 0x18(%rax), %r13
addq $0x8, %r12
cmpq %r12, %r13
je 0x73ae
leaq 0x20(%r13), %rbx
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x78d6
movl (%rax), %r15d
movl 0x28(%r13), %r14d
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x78d6
addl %r15d, %r14d
movl %r14d, (%rax)
movl 0x28(%r13), %r14d
leaq -0xf8(%rbp), %rdi
movq %rbx, %rsi
callq 0x78d6
cmpl (%rax), %r14d
jle 0x739e
movl 0x28(%r13), %r14d
leaq -0xf8(%rbp), %rdi
movq %rbx, %rsi
callq 0x78d6
movl %r14d, (%rax)
movq %r13, %rdi
callq 0x31f0
movq %rax, %r13
cmpq %r12, %rax
jne 0x7341
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movq -0x38(%rbp), %rbx
movq 0x10(%rbx), %rax
cmpq 0x8(%rax), %rcx
jne 0x7325
movq -0x80(%rbp), %r14
leaq -0x90(%rbp), %rcx
cmpq %rcx, %r14
je 0x7440
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 0x78d6
movslq (%rax), %r15
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x78d6
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
leaq -0x90(%rbp), %rax
cmpq %rax, %r14
jne 0x73d8
movq 0x10(%rbx), %rax
leaq -0x60(%rbp), %rcx
xorl %edx, %edx
movl %edx, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
leaq -0xc0(%rbp), %rcx
movl %edx, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x7582
movq %rcx, -0x30(%rbp)
movq (%rcx), %rdi
callq 0x89b4
movq %rax, %r12
movq 0x18(%rax), %r13
addq $0x8, %r12
cmpq %r12, %r13
je 0x7501
leaq 0x20(%r13), %rbx
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x793e
movl (%rax), %r15d
movl 0x28(%r13), %r14d
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x793e
addl %r15d, %r14d
movl %r14d, (%rax)
movl 0x28(%r13), %r14d
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x793e
cmpl (%rax), %r14d
jle 0x74f1
movl 0x28(%r13), %r14d
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x793e
movl %r14d, (%rax)
movq %r13, %rdi
callq 0x31f0
movq %rax, %r13
cmpq %r12, %rax
jne 0x749a
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movq -0x38(%rbp), %rbx
movq 0x10(%rbx), %rax
cmpq 0x8(%rax), %rcx
jne 0x747e
movq -0x50(%rbp), %r14
leaq -0x60(%rbp), %rax
cmpq %rax, %r14
je 0x7582
leaq 0x20(%r14), %r12
movslq 0x28(%r14), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r13
subq (%rax), %r13
leaq -0xc8(%rbp), %rdi
movq %r12, %rsi
callq 0x793e
movslq (%rax), %r15
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x793e
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 0x751f
leaq -0xc8(%rbp), %rdi
callq 0x79a6
leaq -0x68(%rbp), %rdi
callq 0x79a6
leaq -0xf8(%rbp), %rdi
callq 0x7a04
leaq -0x98(%rbp), %rdi
callq 0x7a04
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x75c9
jmp 0x75e3
jmp 0x75c9
jmp 0x75e3
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x79a6
leaq -0x68(%rbp), %rdi
callq 0x79a6
jmp 0x75e6
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x7a04
leaq -0x98(%rbp), %rdi
callq 0x7a04
movq %rbx, %rdi
callq 0x3500