// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rdi, %r12
cmpb $0x1, 0x3c(%rdi)
jne 0xc0d0
movq 0x40(%r12), %rdi
callq 0xd37a
testq %rax, %rax
je 0xc20f
movq %rax, %rsi
addq $0xc, %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 0xc116
movq 0x18(%r12), %rdx
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
shrq $0x2, %rcx
jmp 0xc11f
incl %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rdx,%rcx,4), %ecx
movl (%rax), %ebp
cmpl %ecx, %ebp
setae %al
testl %r13d, %r13d
sete %dl
orb %al, %dl
movb $0x1, %al
jne 0xc1fc
movl %ecx, %ebx
leaq (,%rbp,4), %r14
incq %rbp
cmpb $0x0, 0x3c(%r12)
je 0xc16f
movq 0x18(%r12), %rax
movq 0x40(%r12), %rdi
movq (%rax), %rsi
addq %r14, %rsi
callq 0xd37a
testq %rax, %rax
je 0xc20f
addq $0xc, %rax
jmp 0xc17a
movq 0x18(%r12), %rax
movq (%rax), %rax
addq %r14, %rax
movl (%rax), %eax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
cmpb $0x0, 0x8(%rcx,%rax,4)
jne 0xc1e5
movq 0x18(%r12), %rax
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc1af
movq (%rax), %rsi
addq %r14, %rsi
callq 0xf332
testq %rax, %rax
jne 0xc1e5
movq 0x18(%r12), %rax
movq 0x8(%r15), %rsi
movq (%rax), %rdx
addq %r14, %rdx
movq %r15, %rdi
callq 0xddfa
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0xc1e2
movq 0x8(%r15), %rcx
subq (%r15), %rcx
sarq $0x2, %rcx
cmpq %rax, %rcx
ja 0xc20b
decl %r13d
cmpq %rbx, %rbp
jae 0xc1fa
addq $0x4, %r14
incq %rbp
testl %r13d, %r13d
jne 0xc143
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0xc1fc
leaq 0xd5ba(%rip), %rdi      # 0x197d0
callq 0x2280
nop