// File: /workspace/github_cpp_makefile_star2_O2/iPapatsoris[P]Maximum-Independent-Set/src/Mis.hpp
// Function: Mis::expandIncludedNodes(std::vector<unsigned int, std::allocator<unsigned int>>&, std::vector<unsigned int, std::allocator<unsigned int>>&)
void expandIncludedNodes(std::vector<uint32_t> &set, std::vector<uint32_t> &finalMis) {
        for (uint32_t i = 0 ; i < set.size() ; i++) {
            auto subsequent = subsequentNodes.find(set[i]);
            if (subsequent != subsequentNodes.end()) {
                if (std::find(set.begin(), set.end(), subsequent->second) != set.end() || std::find(finalMis.begin(), finalMis.end(), subsequent->second) != finalMis.end()) {
                    subsequentNodes.erase(subsequent);
                } else {
                    set.push_back(subsequent->second);
                }
            }
            auto res = hypernodeToInnernode.find(set[i]);
            if (res == hypernodeToInnernode.end()) {
                finalMis.push_back(set[i]);
            } else {
                assert(res->second.outerLevel);
                for (auto node : res->second.neighbors) {
                    auto innerHypernode = hypernodeToInnernode.find(node);
                    if (innerHypernode != hypernodeToInnernode.end()) {
                        assert(!innerHypernode->second.outerLevel);
                        innerHypernode->second.outerLevel = true;
                    }
                    set.push_back(node);
                }
                for (auto node : res->second.nodes) {
                    auto innerHypernode = hypernodeToInnernode.find(node);
                    if (innerHypernode != hypernodeToInnernode.end()) {
                        assert(!innerHypernode->second.outerLevel);
                        innerHypernode->second.outerLevel = true;
                    }
                }
                hypernodeToInnernode.erase(res);
            }
        }
        set.clear();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x50(%rdi), %rax
movq %rax, 0x18(%rsp)
addq $0x18, %r15
xorl %r13d, %r13d
leaq 0x14(%rsp), %rbp
movl %r13d, %r13d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0x154ca
leaq (%rax,%r13,4), %rsi
movq 0x18(%rsp), %rdi
callq 0xb89e
testq %rax, %rax
je 0x153e6
movq %rax, %r14
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0xc(%rax), %r12
movq %r12, %rdx
callq 0x1556b
cmpq 0x8(%rbx), %rax
jne 0x153d9
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r12, %rdx
callq 0x1556b
movq 0x8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
je 0x154ba
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x155f2
leaq (,%r13,4), %r12
movq (%rbx), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x156f0
testq %rax, %rax
je 0x154a2
cmpb $0x0, 0x40(%rax)
je 0x15518
movq 0x28(%rax), %r12
movq %rax, 0x20(%rsp)
movq 0x30(%rax), %r14
cmpq %r14, %r12
je 0x15458
movl (%r12), %eax
movl %eax, 0x14(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x156f0
testq %rax, %rax
je 0x15447
cmpb $0x1, 0x40(%rax)
je 0x154e2
movb $0x1, 0x40(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xa1ac
addq $0x4, %r12
jmp 0x1541c
movq 0x20(%rsp), %rax
movq 0x10(%rax), %r14
movq 0x18(%rax), %r12
cmpq %r12, %r14
je 0x15493
movl (%r14), %eax
movl %eax, 0x10(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x156f0
testq %rax, %rax
je 0x1548d
cmpb $0x1, 0x40(%rax)
je 0x154fb
movb $0x1, 0x40(%rax)
addq $0x4, %r14
jmp 0x15465
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x1576c
jmp 0x154b2
addq (%rbx), %r12
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xa1ac
incl %r13d
jmp 0x1536a
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa1ac
jmp 0x153e6
cmpq %rax, %rcx
je 0x154d3
movq %rax, 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a71(%rip), %rdi      # 0x17f5a
leaq 0x2b03(%rip), %rsi      # 0x17ff3
leaq 0x2b08(%rip), %rcx      # 0x17fff
pushq $0x3e
jmp 0x15512
leaq 0x2a58(%rip), %rdi      # 0x17f5a
leaq 0x2aea(%rip), %rsi      # 0x17ff3
leaq 0x2aef(%rip), %rcx      # 0x17fff
pushq $0x46
popq %rdx
callq 0x2100
leaq 0x2abd(%rip), %rdi      # 0x17fdc
leaq 0x2acd(%rip), %rsi      # 0x17ff3
leaq 0x2ad2(%rip), %rcx      # 0x17fff
pushq $0x3a
jmp 0x15512
nop