// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Maximum-Independent-Set/src/Graph.hpp
// Function: void Graph::remove<std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int>>>(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int>> const&, ReduceInfo&, bool const&, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>*, bool const&)
void remove(const Container &nodes, ReduceInfo &reduceInfo, const bool &fullComponent = false, std::unordered_set<uint32_t> *candidateNodes = NULL, const bool &removeZeroDegreeNodes = false) {
        for (auto it = nodes.begin() ; it != nodes.end() ; it++) {
            //std::cout << "removing " << *it << std::endl;
            uint32_t pos = (!mapping ? *it : idToPos->at(*it));
            if (!nodeIndex[pos].removed) {
                reduceInfo.nodesRemoved++;
                if (!fullComponent) {
                    uint32_t nextNodeOffset = (pos == nodeIndex.size()-1 ? edgeBuffer->size() : nodeIndex[pos+1].offset);
                    for (uint32_t offset = nodeIndex[pos].offset ; offset < nextNodeOffset ; offset++) {
                        uint32_t neighbor = (*edgeBuffer)[offset];
                        uint32_t nPos = (!mapping ? neighbor : idToPos->at(neighbor));
                        if (!nodeIndex[nPos].removed) {
                            nodeIndex[nPos].edges--;
                            if (removeZeroDegreeNodes && !nodeIndex[nPos].edges) {
                                zeroDegreeNodes.push_back(neighbor);
                                nodeIndex[nPos].removed = true;
                            }
                            if (find(std::next(it, 1), nodes.end(), neighbor) == nodes.end() &&
                            candidateNodes != NULL && (nodeIndex[nPos].edges == 2 || nodeIndex[nPos].edges == 3) && nPos < pos) {
                                candidateNodes->insert(neighbor);
                            }
                        }
                    }
                }
                //nodeIndex[pos].edges = 0;
                nodeIndex[pos].removed = true;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, 0x38(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, %r13
movq 0x18(%rsi), %r15
addq $0x8, %r13
cmpq %r13, %r15
je 0x12caa
movq %rdi, %rbp
leaq 0x20(%rdi), %rax
movq %rax, 0x20(%rsp)
cmpb $0x0, 0x3c(%rbp)
je 0x12adf
movq 0x40(%rbp), %rdi
leaq 0x20(%r15), %rsi
callq 0xda16
jmp 0x12ae3
leaq 0x20(%r15), %rax
movl (%rax), %ecx
movq (%rbp), %rax
leaq (%rcx,%rcx,2), %rdx
cmpb $0x0, 0x8(%rax,%rdx,4)
jne 0x12c96
movq %rdx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rcx
incl (%rcx)
movq 0x30(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x12c88
movq 0x8(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
decq %rcx
movq 0x10(%rsp), %rdx
cmpq %rdx, %rcx
jne 0x12b4e
movq 0x18(%rbp), %rdx
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
shrq $0x2, %rcx
jmp 0x12b58
leal 0x1(%rdx), %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %ecx
movq 0x8(%rsp), %rdx
leaq (%rax,%rdx,4), %rax
movl (%rax), %r14d
cmpl %ecx, %r14d
jae 0x12c88
movl %ecx, %eax
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax,%r14,4), %eax
movl %eax, 0x4(%rsp)
cmpb $0x1, 0x3c(%rbp)
jne 0x12b9e
movq 0x40(%rbp), %rdi
leaq 0x4(%rsp), %rsi
callq 0xda16
movl (%rax), %eax
movl %eax, %ebx
movq (%rbp), %rax
leaq (%rbx,%rbx,2), %r12
cmpb $0x0, 0x8(%rax,%r12,4)
je 0x12bbf
incq %r14
cmpq 0x48(%rsp), %r14
jne 0x12b79
jmp 0x12c88
leaq (%rax,%r12,4), %rcx
movl 0x4(%rcx), %eax
decl %eax
movl %eax, 0x4(%rcx)
movq 0x38(%rsp), %rcx
cmpb $0x1, (%rcx)
jne 0x12c0c
testl %eax, %eax
jne 0x12c0c
movq 0x28(%rbp), %rsi
cmpq 0x30(%rbp), %rsi
je 0x12bf3
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rbp)
jmp 0x12c02
movq 0x20(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xdeac
movq (%rbp), %rax
movb $0x1, 0x8(%rax,%r12,4)
movq %r15, %rdi
callq 0x2210
cmpq %r13, %rax
je 0x12c31
movl 0x4(%rsp), %r15d
cmpl %r15d, 0x20(%rax)
je 0x12c31
movq %rax, %rdi
callq 0x2210
cmpq %r13, %rax
jne 0x12c1e
cmpq $0x0, 0x18(%rsp)
movq 0x40(%rsp), %r15
je 0x12bb0
cmpq %r13, %rax
jne 0x12bb0
cmpl 0x10(%rsp), %ebx
jae 0x12bb0
movq (%rbp), %rax
movl 0x4(%rax,%r12,4), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x12bb0
movq 0x18(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0x4(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xdc3e
jmp 0x12bb0
movq (%rbp), %rax
movq 0x8(%rsp), %rcx
movb $0x1, 0x8(%rax,%rcx,4)
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
cmpq %r13, %rax
jne 0x12aca
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop