// File: grmauri[P]pmm/pmm.cpp
// Function: calcFOBIN(tSolucaoBIN&)
void calcFOBIN(SolucaoBIN &s)
{
    memset(&s.vetPesMoc, 0, sizeof(s.vetPesMoc));
    memset(&s.vetQtdMocObj, 0, sizeof(s.vetQtdMocObj));
    s.funObj = 0;
    for(int i = 0; i < numMoc; i++)
        for(int j = 0; j < numObj; j++)
        {
            s.funObj += s.matSol[i][j] * vetValObj[j];
            s.vetPesMoc[i] += s.matSol[i][j] * vetPesObj[j];
            s.vetQtdMocObj[j] += s.matSol[i][j];
        }
    for(int i = 0; i < numMoc; i++)
        s.funObj -= PESO * MAX(0, s.vetPesMoc[i] - vetCapMoc[i]);
    for(int j = 0; j < numObj; j++)
        s.funObj -= PESO2 * MAX(0, s.vetQtdMocObj[j] - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x7d0, %rdi            # imm = 0x7D0
xorl %esi, %esi
movl $0xc8, %edx
callq 0x20d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x7d0, %edx            # imm = 0x7D0
callq 0x20d0
movq -0x8(%rbp), %rax
movl $0x0, 0x18f38(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x4127(%rip), %eax      # 0xa1a8
jge 0x616a
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x410d(%rip), %eax      # 0xa1a4
jge 0x615a
movq -0x8(%rbp), %rax
addq $0x898, %rax            # imm = 0x898
movslq -0xc(%rbp), %rcx
imulq $0x7d0, %rcx, %rcx      # imm = 0x7D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x10(%rbp), %rdx
leaq 0x40e9(%rip), %rax      # 0xa1b0
imull (%rax,%rdx,4), %ecx
movq -0x8(%rbp), %rax
addl 0x18f38(%rax), %ecx
movl %ecx, 0x18f38(%rax)
movq -0x8(%rbp), %rax
addq $0x898, %rax            # imm = 0x898
movslq -0xc(%rbp), %rcx
imulq $0x7d0, %rcx, %rcx      # imm = 0x7D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movslq -0x10(%rbp), %rcx
leaq 0x487b(%rip), %rax      # 0xa980
imull (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
addl 0x7d0(%rax,%rcx,4), %edx
movl %edx, 0x7d0(%rax,%rcx,4)
movq -0x8(%rbp), %rax
addq $0x898, %rax            # imm = 0x898
movslq -0xc(%rbp), %rcx
imulq $0x7d0, %rcx, %rcx      # imm = 0x7D0
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x608e
jmp 0x615c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6078
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x402e(%rip), %eax      # 0xa1a8
jge 0x61e9
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x7d0(%rax,%rcx,4), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x4fba(%rip), %rax      # 0xb150
subl (%rax,%rdx,4), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x61a6
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x61c6
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x7d0(%rax,%rcx,4), %eax
movslq -0x14(%rbp), %rdx
leaq 0x4f90(%rip), %rcx      # 0xb150
subl (%rcx,%rdx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
imull $0x64, %eax, %edx
movq -0x8(%rbp), %rax
movl 0x18f38(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x18f38(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6171
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x3fab(%rip), %eax      # 0xa1a4
jge 0x624a
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
subl $0x1, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x6216
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x6227
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
imull $0x32, %eax, %edx
movq -0x8(%rbp), %rax
movl 0x18f38(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x18f38(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x61f0
addq $0x20, %rsp
popq %rbp
retq