// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/BnG.cpp
// Function: DFBnBSolver::EvalOpen()
vector<BnBNode*> DFBnBSolver::EvalOpen()
{
    BnBNode* lt = Open.back(); Open.pop_back();

    if (Open.size() > 1)
    {
        BnBNode* rt = Open.back(); 
        if (lt->obj == 1 && !SolveNode(lt, PGTOL, NUMTOL)) lt->obj = 2;
        if (lt->warm == rt->warm) // TODO this is horrible.
        {
            Open.pop_back();
            if (rt->obj == 1 && !SolveNode(rt, PGTOL, NUMTOL)) rt->obj = 2;
            if (lt->obj < rt->obj) swap(lt, rt); // if (lt->obj > rt->obj) swap(lt, rt);
            if (rt->obj < 1) Open.push_back(rt);         
        }        
    }

    vector<BnBNode*> v;
    if (!(lt->obj == 2 || (lt->obj == 1 && !SolveNode(lt, PGTOL, NUMTOL))))
        v.push_back(lt);
    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x168(%rsi), %rax
leaq -0x8(%rax), %rcx
movq -0x8(%rax), %r15
movq %r15, (%rsp)
movq %rcx, 0x168(%rsi)
subq 0x160(%rsi), %rcx
cmpq $0x9, %rcx
jb 0x43c6a
movq -0x10(%rax), %r12
movq %r12, 0x8(%rsp)
movsd 0x60(%r15), %xmm0
ucomisd 0x18891(%rip), %xmm0    # 0x5c3f8
jne 0x43b99
jp 0x43b99
movq (%r14), %rax
movsd 0x19cba(%rip), %xmm0    # 0x5d830
movsd 0x2b33a(%rip), %xmm1    # 0x6eeb8
movq %r14, %rdi
movq %r15, %rsi
callq *0x28(%rax)
testb %al, %al
jne 0x43b99
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x60(%r15)
movq 0x48(%r15), %rax
cmpq 0x48(%r12), %rax
je 0x43bac
movq %r15, %r13
jmp 0x43c67
addq $-0x8, 0x168(%r14)
movsd 0x60(%r12), %xmm0
ucomisd 0x18835(%rip), %xmm0    # 0x5c3f8
jne 0x43c07
jp 0x43c07
movq (%r14), %rax
movsd 0x19c5e(%rip), %xmm0    # 0x5d830
movsd 0x2b2de(%rip), %xmm1    # 0x6eeb8
movq %r14, %rdi
movq %r12, %rsi
callq *0x28(%rax)
testb %al, %al
je 0x43bf0
movsd 0x60(%r12), %xmm0
jmp 0x43c07
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x60(%r12)
movsd 0x2b2b9(%rip), %xmm0    # 0x6eec0
movsd 0x60(%r15), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x43c21
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r12, %r13
jmp 0x43c2b
movq %r15, %r13
movapd %xmm0, %xmm1
movq %r12, %r15
movsd 0x187c5(%rip), %xmm0    # 0x5c3f8
ucomisd %xmm1, %xmm0
jbe 0x43c67
movq 0x168(%r14), %rsi
cmpq 0x170(%r14), %rsi
je 0x43c56
movq %r15, (%rsi)
addq $0x8, 0x168(%r14)
jmp 0x43c67
leaq 0x160(%r14), %rdi
leaq 0x8(%rsp), %rdx
callq 0x45a56
movq %r13, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movsd 0x60(%r15), %xmm0
ucomisd 0x2b238(%rip), %xmm0    # 0x6eec0
jne 0x43c8c
jnp 0x43ce0
ucomisd 0x18764(%rip), %xmm0    # 0x5c3f8
jne 0x43cd3
jp 0x43cd3
movq (%r14), %rax
movsd 0x19b8d(%rip), %xmm0    # 0x5d830
movsd 0x2b20d(%rip), %xmm1    # 0x6eeb8
movq %r14, %rdi
movq %r15, %rsi
callq *0x28(%rax)
testb %al, %al
je 0x43ce0
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x43cd5
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x43ce0
xorl %esi, %esi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x45a56
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x43d08
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x9350
movq %r14, %rdi
callq 0x9680