// File: /workspace/github_cpp_makefile_star2_O3/grmauri[P]pmm/pmm.cpp
// Function: heuBLPM(tSolucao&)
void heuBLPM(Solucao &s)
{
    int vetObjAux[MAX_OBJ]; // usado para evitar determinismo na ordem de teste dos objetos
    int mocOri, foOri, indice, aux;
    int melFO = s.funObj;
    for(int j = 0; j < numObj; j++)
        vetObjAux[j] = j;
    INICIO : ;
    foOri = s.funObj;
    for(int j = 0; j < numObj; j++)
    {
        indice = j + rand()%(numObj - j);
        mocOri = s.vetIdMocObj[vetObjAux[indice]];
        for(int i = -1; i < numMoc; i++)
        {
            if(i != mocOri)
            {
                s.vetIdMocObj[vetObjAux[indice]] = i;
                calcFO(s);
                if(s.funObj > melFO)
                {
                    melFO = s.funObj;
                    goto INICIO;
                }
                else
                {
                    s.vetIdMocObj[vetObjAux[indice]] = mocOri;
                    s.funObj = foOri;
                }
            }
        }
        aux = vetObjAux[j];
        vetObjAux[j] = vetObjAux[indice];
        vetObjAux[indice] = aux;
    }
    calcFO(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7f8, %rsp            # imm = 0x7F8
movq %rdi, %rbx
movslq 0x4b4e(%rip), %rcx      # 0x9144
testq %rcx, %rcx
jle 0x475e
movl 0x898(%rbx), %eax
leal 0x1(%rcx), %edx
andl $-0x2, %edx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x1a5f(%rip), %xmm1     # 0x6080
xorl %esi, %esi
movdqa 0x1a65(%rip), %xmm2     # 0x6090
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1a65(%rip), %xmm4     # 0x60a0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edi
notl %edi
testb $0x1, %dil
je 0x4671
movl %esi, 0x20(%rsp,%rsi,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0x4687
leal 0x1(%rsi), %edi
movl %edi, 0x24(%rsp,%rsi,4)
addq $0x2, %rsi
paddq %xmm4, %xmm1
cmpq %rsi, %rdx
jne 0x463b
testl %ecx, %ecx
jle 0x475e
movl %eax, %ebp
xorl %r14d, %r14d
callq 0x2060
movslq 0x4a97(%rip), %rdx      # 0x9144
movq %rdx, %rcx
movq %rdx, 0x8(%rsp)
subl %r14d, %ecx
cltd
idivl %ecx
movq %r14, 0x18(%rsp)
addl %r14d, %edx
movslq %edx, %rax
movq %rax, 0x10(%rsp)
movl 0x20(%rsp,%rax,4), %eax
movl %eax, 0x4(%rsp)
movl 0x4a6e(%rip), %r15d     # 0x9148
testl %r15d, %r15d
js 0x4727
movslq 0x4(%rsp), %r13
movl 0xc8(%rbx,%r13,4), %r12d
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl %r14d, %r12d
je 0x471f
movl %r14d, 0xc8(%rbx,%r13,4)
movq %rbx, %rdi
callq 0x42ff
movl 0x898(%rbx), %eax
cmpl %ebp, %eax
jg 0x4753
movl %r12d, 0xc8(%rbx,%r13,4)
movl %ebp, 0x898(%rbx)
incl %r14d
cmpl %r14d, %r15d
jne 0x46f2
movq 0x18(%rsp), %r14
movl 0x20(%rsp,%r14,4), %eax
movl 0x4(%rsp), %ecx
movl %ecx, 0x20(%rsp,%r14,4)
movq 0x10(%rsp), %rcx
movl %eax, 0x20(%rsp,%rcx,4)
incq %r14
cmpq 0x8(%rsp), %r14
jl 0x46a1
jmp 0x475e
cmpl $0x0, 0x8(%rsp)
jg 0x469c
movq %rbx, %rdi
addq $0x7f8, %rsp            # imm = 0x7F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42ff