// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rdi, %r12
cmpb $0x1, 0x3c(%rdi)
jne 0xc745
movq 0x40(%r12), %rdi
callq 0xda16
movq %rax, %rsi
movl (%rsi), %ecx
movq (%r12), %rdx
movq 0x8(%r12), %rsi
leaq (%rcx,%rcx,2), %rax
leaq (%rdx,%rax,4), %rax
movl 0x4(%rax), %r13d
subq %rdx, %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdi
decq %rdi
cmpq %rcx, %rdi
jne 0xc78b
movq 0x18(%r12), %rdx
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
shrq $0x2, %rcx
jmp 0xc794
incl %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rdx,%rcx,4), %ecx
movl (%rax), %ebx
cmpl %ecx, %ebx
setae %al
testl %r13d, %r13d
sete %bpl
orb %al, %bpl
jne 0xc8be
movq %r14, 0x10(%rsp)
movl %ecx, %eax
movq %rax, 0x20(%rsp)
leaq (,%rbx,4), %r15
incq %rbx
cmpb $0x0, 0x3c(%r12)
je 0xc7e1
movq 0x18(%r12), %rax
movq 0x40(%r12), %rdi
movq (%rax), %rsi
addq %r15, %rsi
callq 0xda16
jmp 0xc7ec
movq 0x18(%r12), %rax
movq (%rax), %rax
addq %r15, %rax
movl (%rax), %eax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
movb $0x1, %r14b
cmpb $0x0, 0x8(%rcx,%rax,4)
jne 0xc897
cmpq $0x0, 0x8(%rsp)
je 0xc842
movq 0x18(%r12), %rax
movq (%rax), %rcx
movl (%rcx,%r15), %r8d
addq %r15, %rcx
movq %r8, %rax
xorl %edx, %edx
movq 0x8(%rsp), %rdi
divq 0x8(%rdi)
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0xdaee
testq %rax, %rax
je 0xc842
cmpq $0x0, (%rax)
jne 0xc897
movl %r13d, 0x4(%rsp)
movq 0x10(%rsp), %r13
movq 0x8(%r13), %rsi
movq 0x18(%r12), %rax
movq (%rax), %rdx
addq %r15, %rdx
movq %r13, %rdi
callq 0xe49a
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0xc88f
movq 0x8(%r13), %rcx
subq (%r13), %rcx
sarq $0x2, %rcx
cmpq %rax, %rcx
jbe 0xc88f
xorl %r14d, %r14d
movl 0x4(%rsp), %r13d
jmp 0xc897
movl 0x4(%rsp), %r13d
decl %r13d
testb %r14b, %r14b
je 0xc8be
cmpq 0x20(%rsp), %rbx
setae %al
testl %r13d, %r13d
sete %bpl
orb %al, %bpl
addq $0x4, %r15
incq %rbx
testb %bpl, %bpl
je 0xc7c2
andb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop