// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Maximum-Independent-Set/src/Graph.cpp
// Function: Graph::buildCC(std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>> const&, std::vector<unsigned int, std::allocator<unsigned int>>&, std::vector<unsigned int, std::allocator<unsigned int>>&) const
bool Graph::buildCC(const unordered_set<uint32_t> &excludedNodes, vector<uint32_t> &component1, vector<uint32_t> &component2) const {
    component1.clear();
    component2.clear();
    uint32_t component = 0;
    unordered_set<uint32_t> exploredSet;
    stack<uint32_t> frontier;
    Graph::GraphTraversal graphTraversal(*this);
    while (graphTraversal.curNode != NONE) {
        if (excludedNodes.find(graphTraversal.curNode) == excludedNodes.end() && exploredSet.insert(graphTraversal.curNode).second) {
            if (component == 2) {
                return false;
            }
            vector<uint32_t> *componentNodes = (component == 0 ? &component1 : &component2);
            componentNodes->push_back(graphTraversal.curNode);
            frontier.push(graphTraversal.curNode);
            while (!frontier.empty()) {
                uint32_t node = frontier.top();
                frontier.pop();
                Graph::GraphTraversal neighbors(*this, node);
                while (neighbors.curEdgeOffset != NONE) {
                    node = (*edgeBuffer)[neighbors.curEdgeOffset];
                    if (excludedNodes.find(node) == excludedNodes.end() && exploredSet.insert(node).second) {
                        frontier.push(node);
                        componentNodes->push_back(node);
                    }
                    getNextEdge(neighbors);
                }
            }
            component++;
        }
        getNextNode(graphTraversal);
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0xac30
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0xac3d
movq %rax, 0x8(%rbx)
leaq 0xc0(%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 0x20(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xf874
movq %r14, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
leaq 0x8(%rsp), %rsi
movq $-0x1, (%rsi)
movq %r12, %rdi
callq 0xc034
movq $0x0, 0x10(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x90(%rsp), %r13
leaq 0x88(%rsp), %r14
movl 0x8(%rsp), %ebx
cmpq %rbp, %rbx
je 0xaf72
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movq %rbx, %rax
xorl %edx, %edx
divq %rdi
movq %rdx, %rcx
movq (%rsi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0xad26
movq (%rdx), %r8
movq %rdx, %rax
cmpl 0x8(%r8), %ebx
je 0xad26
movq %r8, %r9
movq (%r8), %r8
testq %r8, %r8
je 0xad24
movl 0x8(%r8), %esi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %eax
cmpq %rcx, %rdx
jne 0xad26
movq %r9, %rax
cmpl %esi, %ebx
jne 0xacfa
jmp 0xad26
xorl %eax, %eax
testq %rax, %rax
je 0xad35
cmpq $0x0, (%rax)
jne 0xaf60
movq %r13, 0x18(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0xdc3e
testb $0x1, %dl
je 0xaf60
cmpl $0x2, 0x10(%rsp)
je 0xaf72
cmpl $0x0, 0x10(%rsp)
movq 0x80(%rsp), %rbx
cmoveq 0x78(%rsp), %rbx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xad8d
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xad9a
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0xdeac
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xadbe
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x50(%rsp)
jmp 0xadcd
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xf9dc
movq 0x50(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0xaf54
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
je 0xadf4
movl -0x4(%rax), %ecx
addq $-0x4, %rax
movl %ecx, 0x4(%rsp)
jmp 0xae37
movq 0x68(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1fc(%rax), %eax
movl %eax, 0x4(%rsp)
callq 0x21a0
movq 0x68(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x58(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x60(%rsp)
movl $0x1fc, %ecx            # imm = 0x1FC
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
movq %r14, %rdx
callq 0xc132
movl 0x8c(%rsp), %eax
cmpq %rbp, %rax
je 0xadcd
movq 0x18(%r12), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x4(%rsp)
movq (%r15), %rdi
movq 0x8(%r15), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0xaec3
movq (%rdx), %r9
movq %rdx, %rax
cmpl 0x8(%r9), %ecx
je 0xaec3
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0xaec1
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0xaec3
movq %r10, %rax
cmpl %edi, %ecx
jne 0xae97
jmp 0xaec3
xorl %eax, %eax
testq %rax, %rax
je 0xaece
cmpq $0x0, (%rax)
jne 0xaf44
movq %r13, 0x18(%rsp)
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0xdc3e
testb $0x1, %dl
je 0xaf44
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xaf0e
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x50(%rsp)
jmp 0xaf1d
leaq 0x20(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0xf9dc
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xaf37
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xaf44
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0xdeac
movq %r12, %rdi
movq %r14, %rsi
callq 0xc4d8
jmp 0xae4c
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc034
jmp 0xacc1
cmpl $-0x1, %ebx
sete %bl
leaq 0x20(%rsp), %rdi
callq 0xd9d2
leaq 0x90(%rsp), %rdi
callq 0xcff8
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xafb4
movq %rax, %rbx
jmp 0xafc1
jmp 0xafb4
jmp 0xafb4
jmp 0xafb4
jmp 0xafb4
jmp 0xafb4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd9d2
leaq 0x90(%rsp), %rdi
callq 0xcff8
movq %rbx, %rdi
callq 0x2320