// File: /workspace/github_cpp_makefile_star2_O3/iPapatsoris[P]Maximum-Independent-Set/src/Graph.cpp
// Function: Graph::getOptimalDegree5Node() const
uint32_t Graph::getNumberOfDegreeNeighbors(const uint32_t &node, const uint32_t &degree, const uint32_t &atLeast) const {
    uint32_t count = 0;
    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 i = nodeIndex[pos].offset ; i < nextNodeOffset && neighborCount ; i++) {
        uint32_t nPos = (!mapping ? (*edgeBuffer)[i] : idToPos->at((*edgeBuffer)[i]));
        if (!nodeIndex[nPos].removed) {
            neighborCount--;
            if (nodeIndex[nPos].edges == degree) {
                count++;
                if (atLeast && count == atLeast) {
                    break;
                }
            }
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rax, %rcx
je 0x6429
movq %rdi, %r12
movl $0x1, %ebp
xorl %esi, %esi
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x40(%rsp), %r15
leaq 0x28(%rsp), %rbx
leaq 0xc(%rsp), %r13
leaq (%rsi,%rsi,2), %rdx
cmpb $0x0, 0x8(%rax,%rdx,4)
jne 0x6345
leaq (%rax,%rdx,4), %rdx
cmpl $0x5, 0x4(%rdx)
jne 0x6345
cmpb $0x1, 0x3c(%r12)
jne 0x62e6
movq 0x48(%r12), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rsi, %rdx
jbe 0x6469
movl (%rax,%rsi,4), %eax
jmp 0x62e9
leal -0x1(%rbp), %eax
movl %eax, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x6306
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x6313
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0xd7b4
movl $0x3, 0x28(%rsp)
movl $0x1, 0xc(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x2b7c
testl %eax, %eax
jne 0x6439
movq (%r12), %rax
movq 0x8(%r12), %rcx
movl %ebp, %esi
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
imulq %r14, %rdx
incl %ebp
cmpq %rsi, %rdx
ja 0x62a0
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %r14
je 0x6431
leaq 0xc(%rsp), %r13
leaq 0x28(%rsp), %r15
leaq 0x40(%rsp), %rbp
movl (%r14), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x64a8
testl %eax, %eax
jne 0x6440
leaq 0x70(%rsp), %rax
movq %rax, 0x40(%rsp)
movq $0x1, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x60(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xba5a
movb $0x1, 0xb(%rsp)
movq %r12, %rbx
movq %r12, %rdi
movq %r15, %r12
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
leaq 0xb(%rsp), %r8
callq 0x3fee
movq %rbp, %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0xc(%rsp), %r15d
callq 0xc950
cmpq $0x0, 0x38(%rsp)
jne 0x6445
addq $0x4, %r14
cmpq 0x30(%rsp), %r14
movq %r12, %r15
movq %rbx, %r12
jne 0x6387
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x6445
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x644a
movl 0x40(%rsp), %r15d
jmp 0x6445
movl 0xc(%rsp), %r15d
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x6457
movq %r14, %rdi
callq 0x21a0
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1336e(%rip), %rdi     # 0x197de
xorl %eax, %eax
callq 0x22a0
jmp 0x648e
jmp 0x648e
jmp 0x647d
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xc950
jmp 0x6491
jmp 0x648e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x64a0
callq 0x21a0
movq %rbx, %rdi
callq 0x2320