// File: /workspace/github_cpp_makefile_star2_O2/VitorCorreaSilva[P]sistemaControle/source/empresa.cpp
// Function: Empresa::relatorioFinanceiro()
void Empresa::relatorioFinanceiro(){
	int numTimes = times.size();
	for (int i = 0; i < numTimes; ++i)
	{
		float salarios = 0;
		float totalInss = 0;
		float totalIrrf = 0;

		vector<Jogador> jogadores = times[i].getJogadores();
		int numJogadores = jogadores.size();

		for (int j = 0; j < numJogadores; ++j)
		{
			float descontoInss = jogadores[j].calcularDescontoInss(jogadores[j].getSalarioBruto());
			salarios +=  jogadores[j].calcularSalarioLiquido(jogadores[j].getSalarioBruto());
			totalInss += descontoInss;
			totalIrrf += jogadores[j].calcularDescontoIrrf(jogadores[j].getSalarioBruto() - descontoInss);
		}

		cout << fixed;
		cout.precision(2);
		cout << "Time: " << times[i].getNome() << endl;
		cout << "Total Salarios: " << salarios << endl;
		cout << "Total INSS: " << totalInss << endl;
		cout << "Total IRRF: " << totalIrrf << endl;
		cout << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
pushq $0x48
popq %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %r13
movq 0x6122(%rip), %r12      # 0x8fd8
xorl %r15d, %r15d
movq %rdi, -0x68(%rbp)
cmpq -0x70(%rbp), %r15
je 0x30aa
imulq $0x48, %r15, %rax
movq 0x20(%rbx), %rsi
movq %rax, -0x78(%rbp)
addq %rax, %rsi
movq %r13, %rdi
callq 0x5158
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
cqto
pushq $0x68
popq %rcx
idivq %rcx
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
imulq $0x68, %rax, %rbx
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
xorl %r13d, %r13d
movss %xmm0, -0x30(%rbp)
movss %xmm0, -0x2c(%rbp)
cmpq %r13, %rbx
je 0x2fa3
movq -0x60(%rbp), %r14
addq %r13, %r14
movq %r14, %rdi
callq 0x38fe
movq %r14, %rdi
callq 0x39c4
movss %xmm0, -0x40(%rbp)
movq -0x60(%rbp), %r14
addq %r13, %r14
movq %r14, %rdi
callq 0x38fe
movq %r14, %rdi
callq 0x398a
movss %xmm0, -0x44(%rbp)
movq -0x60(%rbp), %r14
addq %r13, %r14
movq %r14, %rdi
callq 0x38fe
subss -0x40(%rbp), %xmm0
movq %r14, %rdi
callq 0x3a5e
movss -0x34(%rbp), %xmm1
addss -0x44(%rbp), %xmm1
movss %xmm1, -0x34(%rbp)
movss -0x30(%rbp), %xmm1
addss -0x40(%rbp), %xmm1
movss %xmm1, -0x30(%rbp)
movss -0x2c(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x2c(%rbp)
addq $0x68, %r13
jmp 0x2f11
movq %r15, -0x40(%rbp)
movq (%r12), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r12,%rcx), %edx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%r12,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%r12,%rax)
movq %r12, %rdi
leaq 0x30ff(%rip), %rsi      # 0x60d9
callq 0x2140
movq -0x68(%rbp), %rbx
leaq -0x60(%rbp), %r13
movq %rax, %r14
movq %r12, %r15
movq -0x78(%rbp), %rsi
addq 0x20(%rbx), %rsi
leaq -0x98(%rbp), %r12
movq %r12, %rdi
callq 0x5132
movq %r14, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
callq 0x2080
movq %r15, %r12
movq %r15, %rdi
leaq 0x30f5(%rip), %rsi      # 0x6121
callq 0x2140
movq %rax, %rdi
movss -0x34(%rbp), %xmm0
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
leaq 0x30e2(%rip), %rsi      # 0x6132
callq 0x2140
movq %rax, %rdi
movss -0x30(%rbp), %xmm0
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
leaq 0x30cb(%rip), %rsi      # 0x613f
callq 0x2140
movq %rax, %rdi
movss -0x2c(%rbp), %xmm0
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
callq 0x2090
movq %r13, %rdi
callq 0x311c
movq -0x40(%rbp), %r15
incq %r15
jmp 0x2ebd
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30ce
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x2080
jmp 0x30d1
jmp 0x30ce
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x311c
movq %rbx, %rdi
callq 0x2200