// File: iPapatsoris[P]Maximum-Independent-Set/src/Graph.hpp
// Function: bool Graph::gatherNeighbors<std::vector<unsigned int, std::allocator<unsigned int>>, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>>(unsigned int const&, std::vector<unsigned int, std::allocator<unsigned int>>&, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>> const*, unsigned int const&) const
bool gatherNeighbors(const uint32_t &node, Container &neighbors, const OriginalNodesContainer *nodes = NULL, const uint32_t &maxNeighbors = NONE) const {
        uint32_t pos = (!mapping ? node : idToPos->at(node));
        uint32_t neighborCount = nodeIndex[pos].edges;
        uint32_t nextNodeOffset = (pos == nodeIndex.size()-1 ? edgeBuffer->size() : nodeIndex[pos+1].offset);
        for (uint32_t offset = nodeIndex[pos].offset ; offset < nextNodeOffset && neighborCount; offset++) {
            uint32_t nPos = (!mapping ? (*edgeBuffer)[offset] : idToPos->at((*edgeBuffer)[offset]));
            if (!nodeIndex[nPos].removed && (nodes == NULL || nodes->find((*edgeBuffer)[offset]) == nodes->end())) {
                neighbors.insert(neighbors.end(), (*edgeBuffer)[offset]);
                if (maxNeighbors != NONE && neighbors.size() > maxNeighbors) {
                    return false;
                }
                neighborCount--;
            }
        }
        return true;
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
testb $0x1, 0x3c(%rax)
jne 0x19c82
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
jmp 0x19c9e
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0xa0(%rsp), %rsi
callq 0x188b0
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0x18850
movq 0x40(%rsp), %rdi
movl 0x4(%rax), %eax
movl %eax, 0x80(%rsp)
movl 0x84(%rsp), %eax
movq %rax, 0x30(%rsp)
callq 0x18830
movq %rax, %rcx
movq 0x30(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x19d02
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x188e0
movq %rax, 0x28(%rsp)
jmp 0x19d21
movq 0x40(%rsp), %rdi
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x18850
movl (%rax), %eax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rax
movl %eax, 0x7c(%rsp)
movl 0x84(%rsp), %eax
movl %eax, %esi
callq 0x18850
movl (%rax), %eax
movl %eax, 0x78(%rsp)
movl 0x78(%rsp), %ecx
xorl %eax, %eax
cmpl 0x7c(%rsp), %ecx
movb %al, 0x27(%rsp)
jae 0x19d62
cmpl $0x0, 0x80(%rsp)
setne %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x19d6f
jmp 0x19f18
movq 0x40(%rsp), %rax
testb $0x1, 0x3c(%rax)
jne 0x19d96
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x18900
movl (%rax), %eax
movl %eax, 0x20(%rsp)
jmp 0x19dc6
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x18(%rax), %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x18900
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x188b0
movl (%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
movl %eax, %esi
callq 0x18850
movq %rax, %rcx
xorl %eax, %eax
testb $0x1, 0x8(%rcx)
movb %al, 0x17(%rsp)
jne 0x19e5e
movb $0x1, %al
cmpq $0x0, 0x90(%rsp)
movb %al, 0x16(%rsp)
je 0x19e56
movq 0x40(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%rax), %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x18900
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1b600
movq %rax, 0x68(%rsp)
movq 0x90(%rsp), %rdi
callq 0x1b550
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1a690
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x19e6b
jmp 0x19f06
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x98(%rsp), %rdi
callq 0x1a0e0
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1aa60
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x18900
movq (%rsp), %rdi
movq %rax, %rdx
movq 0x58(%rsp), %rsi
callq 0x25ea0
movq %rax, 0x48(%rsp)
movq 0x88(%rsp), %rax
cmpl $-0x1, (%rax)
je 0x19ef5
movq 0x98(%rsp), %rdi
callq 0x188e0
movq 0x88(%rsp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jbe 0x19ef5
movb $0x0, 0xb7(%rsp)
jmp 0x19f20
movl 0x80(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x19f08
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x19d43
movb $0x1, 0xb7(%rsp)
movb 0xb7(%rsp), %al
andb $0x1, %al
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)