// File: iPapatsoris[P]Maximum-Independent-Set/src/Alg.hpp
// Function: Alg::chooseMaxMis(Alg::SearchNode*)
void chooseMaxMis(SearchNode *parent) {
        //std::cout << "no next child" << std::endl;
        SearchNode *leftChild = searchTree[parent->leftChild];
        SearchNode *rightChild = searchTree[parent->rightChild];
        assert(parent->rightChild == searchTree.size() - 1 && parent->leftChild == searchTree.size() - 2);
        parent->id = leftChild->id;
        parent->finalMis = leftChild->finalMis;
        std::vector<uint32_t> *min = rightChild->finalMis;
        if (rightChild->finalMis->size() > parent->finalMis->size()) {
            parent->id = rightChild->id;
            parent->finalMis = rightChild->finalMis;
            min = leftChild->finalMis;
        }
        delete min;
        delete searchTree.back();
        searchTree.pop_back();
        delete searchTree.back();
        searchTree.pop_back();
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0x58(%rsp), %rax
movl 0x114(%rax), %eax
movl %eax, %esi
callq 0x3a420
movq 0x28(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movl 0x118(%rax), %eax
movl %eax, %esi
callq 0x3a420
movq 0x28(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rax
movl 0x118(%rax), %eax
movq %rax, 0x30(%rsp)
callq 0x3b170
movq 0x30(%rsp), %rcx
movq %rax, %rdx
subq $0x1, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x3f(%rsp)
jne 0x3b002
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rax
movl 0x114(%rax), %eax
movq %rax, 0x20(%rsp)
callq 0x3b170
movq %rax, %rcx
movq 0x20(%rsp), %rax
subq $0x2, %rcx
cmpq %rcx, %rax
sete %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x3b00c
jmp 0x3b00e
jmp 0x3b02d
leaq 0xbbaa(%rip), %rdi      # 0x46bbf
leaq 0xbaf1(%rip), %rsi      # 0x46b0d
movl $0x134, %edx            # imm = 0x134
leaq 0xbc3b(%rip), %rcx      # 0x46c63
callq 0x2110
movq 0x50(%rsp), %rax
movl (%rax), %ecx
movq 0x58(%rsp), %rax
movl %ecx, (%rax)
movq 0x50(%rsp), %rax
movq 0x120(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x120(%rax)
movq 0x48(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq 0x120(%rax), %rdi
callq 0x188e0
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq 0x120(%rax), %rdi
callq 0x188e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3b0cf
movq 0x48(%rsp), %rax
movl (%rax), %ecx
movq 0x58(%rsp), %rax
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movq 0x120(%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x120(%rax)
movq 0x50(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x3b0f3
movq 0x10(%rsp), %rdi
callq 0x18520
movq 0x10(%rsp), %rdi
callq 0x2180
movq 0x28(%rsp), %rdi
callq 0x3f310
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x3b11f
movq 0x8(%rsp), %rdi
callq 0x38ed0
movq 0x8(%rsp), %rdi
callq 0x2180
movq 0x28(%rsp), %rdi
callq 0x3f350
movq 0x28(%rsp), %rdi
callq 0x3f310
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x3b152
movq (%rsp), %rdi
callq 0x38ed0
movq (%rsp), %rdi
callq 0x2180
movq 0x28(%rsp), %rdi
callq 0x3f350
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)