// File: iPapatsoris[P]Maximum-Independent-Set/src/Alg.hpp
// Function: Alg::branchOnExtendedGranchildren(Alg::BranchingRule const&, Alg::SearchNode*) const
void branchOnExtendedGranchildren(const BranchingRule &branchingRule, SearchNode *searchNode) const {
        std::unordered_set<uint32_t> extendedGrandchildren;
        Graph::GraphTraversal graphTraversal(searchNode->graph, branchingRule.node1);
        searchNode->graph.getExtendedGrandchildren(graphTraversal, extendedGrandchildren);
        extendedGrandchildren.insert(branchingRule.node1);
        std::vector<uint32_t> &mis = searchNode->mis.getMis();
        mis.insert(mis.end(), extendedGrandchildren.begin(), extendedGrandchildren.end());
        std::unordered_set<uint32_t> neighbors;
        searchNode->graph.gatherAllNeighbors(extendedGrandchildren, neighbors);

        std::unordered_set<uint32_t> *smaller = &neighbors;
        std::unordered_set<uint32_t> *bigger = &extendedGrandchildren;
        if (smaller->size() > bigger->size()) {
            std::unordered_set<uint32_t> *tmp = smaller;
            smaller = bigger;
            bigger = tmp;
        }
        smaller->insert(bigger->begin(), bigger->end());
        searchNode->graph.remove(std::vector<uint32_t>(smaller->begin(), smaller->end()), searchNode->reductions->getReduceInfo());
    }

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x1a020
movq 0x180(%rsp), %rsi
addq $0x30, %rsi
movq 0x188(%rsp), %rdx
addq $0x4, %rdx
leaq 0x140(%rsp), %rdi
callq 0x2a70
jmp 0x3f483
movq 0x180(%rsp), %rdi
addq $0x30, %rdi
movb $0x0, 0x133(%rsp)
xorl %eax, %eax
movl %eax, %ecx
leaq 0x140(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x133(%rsp), %r8
callq 0x4f80
jmp 0x3f4ba
movq 0x188(%rsp), %rsi
addq $0x4, %rsi
leaq 0x148(%rsp), %rdi
callq 0x18960
movb %dl, 0x4f(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3f4de
movb 0x4f(%rsp), %al
movq 0x50(%rsp), %rcx
movq %rcx, 0x120(%rsp)
movb %al, 0x128(%rsp)
movq 0x180(%rsp), %rdi
subq $-0x80, %rdi
callq 0x33930
movq %rax, 0x40(%rsp)
jmp 0x3f50e
movq 0x40(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1a0e0
movq %rax, 0x108(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x1aa60
leaq 0x148(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x19220
movq 0x28(%rsp), %rdi
movq %rax, 0x100(%rsp)
callq 0x19250
movq 0x30(%rsp), %rdi
movq %rax, 0xf8(%rsp)
movq 0x110(%rsp), %rsi
movq 0x100(%rsp), %rdx
movq 0xf8(%rsp), %rcx
callq 0x3f830
movq %rax, 0x38(%rsp)
jmp 0x3f59f
movq 0x38(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1a020
movq 0x20(%rsp), %rdx
movq 0x180(%rsp), %rdi
addq $0x30, %rdi
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
leaq 0x148(%rsp), %rsi
leaq 0xb4(%rsp), %rcx
callq 0x1a270
jmp 0x3f5f1
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x148(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x191e0
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x191e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3f6a1
movq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x3f6a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x3f813
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x3f806
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x19220
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x19250
movq 0x10(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x1a490
jmp 0x3f6f4
movq 0x180(%rsp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
movq 0xa8(%rsp), %rdi
callq 0x19220
movq %rax, 0x68(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x19250
movq %rax, 0x60(%rsp)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x18d80
movq 0x8(%rsp), %rcx
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x1a4d0
jmp 0x3f752
movq 0x180(%rsp), %rax
movq 0x108(%rax), %rdi
callq 0x3f420
movq (%rsp), %rdi
movq %rax, %rdx
movb $0x0, 0x5e(%rsp)
movb $0x0, 0x5d(%rsp)
xorl %eax, %eax
movl %eax, %r8d
leaq 0x70(%rsp), %rsi
leaq 0x5e(%rsp), %rcx
leaq 0x5d(%rsp), %r9
callq 0x189b0
jmp 0x3f792
leaq 0x70(%rsp), %rdi
callq 0x18520
leaq 0x5f(%rsp), %rdi
callq 0x18e10
leaq 0xb8(%rsp), %rdi
callq 0x1a030
leaq 0x148(%rsp), %rdi
callq 0x1a030
addq $0x198, %rsp            # imm = 0x198
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x3f7fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x18520
leaq 0x5f(%rsp), %rdi
callq 0x18e10
leaq 0xb8(%rsp), %rdi
callq 0x1a030
leaq 0x148(%rsp), %rdi
callq 0x1a030
movq 0x138(%rsp), %rdi
callq 0x2310
nopl (%rax)