// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x68(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x30(%rdx), %rbx
addq $0x4, %r15
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29ee
leaq 0x70(%rsp), %r8
movb $0x0, (%r8)
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x3fee
leaq 0x70(%rsp), %rdx
movq %r12, (%rdx)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd538
leaq 0x80(%r14), %rdi
movq 0x88(%r14), %rsi
movq 0x48(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1676c
leaq 0x48(%rsp), %rbp
leaq 0xa0(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x10(%rsp), %r13
movl $0xffffffff, (%r13)     # imm = 0xFFFFFFFF
leaq 0x70(%rsp), %r15
leaq 0x38(%rsp), %r12
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x1664d
leaq 0x8(%rbp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0xde74
testb %al, %al
jne 0x1662b
movq %r14, 0x28(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %r13
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rbp
cmpq %rbp, %r13
cmovaq %r12, %r15
movq %rax, %r14
cmovaq %rsi, %r14
movq %r15, 0x10(%rsp)
testq %r14, %r14
je 0x166ad
leaq 0x10(%rsp), %r12
leaq 0x8(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xd538
movq (%r14), %r14
testq %r14, %r14
jne 0x16689
movq 0x48(%rsp), %rax
movq 0x80(%rsp), %rsi
cmpq %rbp, %r13
cmovaq %rax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
xorl %edx, %edx
callq 0xc336
movq 0x28(%rsp), %rax
movq 0x108(%rax), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0xe(%rsp), %rcx
movb %al, (%rcx)
leaq 0xd(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xbaa6
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16705
callq 0x21a0
leaq 0x70(%rsp), %rdi
callq 0xc950
leaq 0x38(%rsp), %rdi
callq 0xc950
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1674f
callq 0x21a0
jmp 0x1674f
jmp 0x1674c
jmp 0x16745
jmp 0x16745
movq %rax, %rbx
jmp 0x16759
jmp 0x1674c
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xc950
leaq 0x38(%rsp), %rdi
callq 0xc950
movq %rbx, %rdi
callq 0x2320
nop