// File: /workspace/github_cpp_makefile_star2_O1/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 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rax, %rcx
movq %rcx, -0x50(%rbp)
testl %ecx, %ecx
jle 0x3807
movq %rdi, %r15
movq -0x50(%rbp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x50(%rbp)
xorl %r14d, %r14d
leaq -0x70(%rbp), %r12
movq %rdi, -0x98(%rbp)
leaq (%r14,%r14,8), %r13
shlq $0x3, %r13
movq 0x20(%r15), %rsi
addq %r13, %rsi
movq %r12, %rdi
callq 0x7084
movq -0x68(%rbp), %rbx
subq -0x70(%rbp), %rbx
sarq $0x3, %rbx
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rbx
testl %ebx, %ebx
jle 0x3628
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorps %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
xorl %r15d, %r15d
movss %xmm0, -0x38(%rbp)
movss %xmm0, -0x2c(%rbp)
movq -0x70(%rbp), %r12
addq %r15, %r12
movq %r12, %rdi
callq 0x4144
movq %r12, %rdi
callq 0x420a
movss %xmm0, -0x48(%rbp)
movq -0x70(%rbp), %r12
addq %r15, %r12
movq %r12, %rdi
callq 0x4144
movq %r12, %rdi
callq 0x41d0
movss %xmm0, -0x54(%rbp)
movq -0x70(%rbp), %r12
addq %r15, %r12
movq %r12, %rdi
callq 0x4144
subss -0x48(%rbp), %xmm0
movq %r12, %rdi
callq 0x42ca
movss -0x2c(%rbp), %xmm1
addss -0x54(%rbp), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x38(%rbp), %xmm1
addss -0x48(%rbp), %xmm1
movss %xmm1, -0x38(%rbp)
movss -0x40(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x40(%rbp)
addq $0x68, %r15
decq %rbx
jne 0x3567
xorps %xmm0, %xmm0
cvtss2sd -0x2c(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
xorps %xmm0, %xmm0
cvtss2sd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtss2sd -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x98(%rbp), %r15
leaq -0x70(%rbp), %r12
jmp 0x363a
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm0, -0x40(%rbp)
movq 0x7997(%rip), %rbx      # 0xafd8
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%rbx,%rax)
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x4a63(%rip), %rsi      # 0x80d9
callq 0x2160
addq 0x20(%r15), %r13
leaq -0x90(%rbp), %rdi
movq %r13, %rsi
callq 0x704c
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rbx, %rdi
callq 0x2160
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x36ea
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2130
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x4a28(%rip), %rsi      # 0x8121
callq 0x2160
movq %rbx, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x21a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movl $0xc, %edx
movq %rbx, %rdi
leaq 0x49ee(%rip), %rsi      # 0x8132
callq 0x2160
movq %rbx, %rdi
movsd -0x38(%rbp), %xmm0
callq 0x21a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movl $0xc, %edx
movq %rbx, %rdi
leaq 0x49b0(%rip), %rsi      # 0x813f
callq 0x2160
movq %rbx, %rdi
movsd -0x40(%rbp), %xmm0
callq 0x21a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq %r12, %rdi
callq 0x389c
incq %r14
cmpq -0x50(%rbp), %r14
jne 0x3513
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x383b
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x383e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2130
jmp 0x383e
jmp 0x383b
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x389c
movq %rbx, %rdi
callq 0x21d0
nop