// File: /workspace/github_cpp_makefile_star2_O3/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 0xa640
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0xa64d
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 0xf1ca
movq %r14, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
leaq 0xc(%rsp), %rsi
movq $-0x1, (%rsi)
movq %r12, %rdi
callq 0xb94a
movl $0x0, 0x14(%rsp)
leaq 0x8(%rsp), %r13
leaq 0x88(%rsp), %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl 0xc(%rsp), %ebx
cmpl $-0x1, %ebx
je 0xa8d4
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0xf332
testq %rax, %rax
jne 0xa8c2
leaq 0x90(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0xc(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0xd538
testb $0x1, %dl
je 0xa8c2
cmpl $0x2, 0x14(%rsp)
je 0xa8d4
cmpl $0x0, 0x14(%rsp)
movq 0x80(%rsp), %rbx
cmoveq 0x78(%rsp), %rbx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xa74d
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xa75a
movq %rbx, %rdi
leaq 0xc(%rsp), %rdx
callq 0xd7b4
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xa77e
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x50(%rsp)
jmp 0xa792
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xf38e
movq 0x50(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0xa8be
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
je 0xa7b4
movl -0x4(%rax), %ecx
addq $-0x4, %rax
movl %ecx, 0x8(%rsp)
jmp 0xa7f7
movq 0x68(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1fc(%rax), %eax
movl %eax, 0x8(%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
movq %r13, %rsi
movq %r14, %rdx
callq 0xba5a
movl 0x8c(%rsp), %eax
cmpq %rbp, %rax
je 0xa78d
movq 0x18(%r12), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xf332
testq %rax, %rax
jne 0xa8ae
leaq 0x90(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq %r13, %rsi
leaq 0x18(%rsp), %rdx
callq 0xd538
testb $0x1, %dl
je 0xa8ae
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xa87c
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x50(%rsp)
jmp 0xa889
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0xf38e
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xa8a3
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xa8ae
movq %rbx, %rdi
movq %r13, %rdx
callq 0xd7b4
movq %r12, %rdi
movq %r14, %rsi
callq 0xbe2e
jmp 0xa80a
incl 0x14(%rsp)
movq %r12, %rdi
leaq 0xc(%rsp), %rsi
callq 0xb94a
jmp 0xa6cd
cmpl $-0x1, %ebx
sete %bl
leaq 0x20(%rsp), %rdi
callq 0xd330
leaq 0x90(%rsp), %rdi
callq 0xc950
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa91a
movq %rax, %rbx
jmp 0xa927
jmp 0xa91a
jmp 0xa91a
jmp 0xa91a
jmp 0xa91a
jmp 0xa91a
jmp 0xa91a
jmp 0xa91a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd330
leaq 0x90(%rsp), %rdi
callq 0xc950
movq %rbx, %rdi
callq 0x2320