// File: iPapatsoris[P]Maximum-Independent-Set/src/Graph.hpp
// Function: Graph::getNextEdge(Graph::GraphTraversal&) const
void getNextEdge(GraphTraversal &graphTraversal) const {
        assert(graphTraversal.curNode != NONE && graphTraversal.curEdgeOffset != NONE);
        uint32_t pos = (!mapping ? graphTraversal.curNode : idToPos->at(graphTraversal.curNode));
        uint32_t nextNodeOffset = (pos == nodeIndex.size()-1 ? edgeBuffer->size() : nodeIndex[pos+1].offset);
        graphTraversal.curEdgeOffset++;
        bool validNeighbor = false;
        for ( ; graphTraversal.curEdgeOffset  < nextNodeOffset ; graphTraversal.curEdgeOffset++) {
            uint32_t nPos = (!mapping ? (*edgeBuffer)[graphTraversal.curEdgeOffset] : idToPos->at((*edgeBuffer)[graphTraversal.curEdgeOffset]));
            if (!nodeIndex[nPos].removed) {
                validNeighbor = true;
                break;
            }
        }
        if (!validNeighbor) {
            graphTraversal.curEdgeOffset = NONE;
        }
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rcx
xorl %eax, %eax
cmpl $-0x1, (%rcx)
movb %al, 0x37(%rsp)
je 0x19598
movq 0x48(%rsp), %rax
cmpl $-0x1, 0x4(%rax)
setne %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x195a2
jmp 0x195a4
jmp 0x195c3
leaq 0x2d103(%rip), %rdi     # 0x466ae
leaq 0x2d143(%rip), %rsi     # 0x466f5
movl $0x136, %edx            # imm = 0x136
leaq 0x2d145(%rip), %rcx     # 0x46703
callq 0x2110
movq 0x28(%rsp), %rax
testb $0x1, 0x3c(%rax)
jne 0x195db
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x195f4
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x188b0
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
movq %rax, 0x18(%rsp)
callq 0x18830
movq %rax, %rcx
movq 0x18(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x19635
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x188e0
movq %rax, 0x10(%rsp)
jmp 0x19651
movq 0x28(%rsp), %rdi
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x18850
movl (%rax), %eax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl %eax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movb $0x0, 0x3f(%rsp)
movq 0x48(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x40(%rsp), %eax
jae 0x19716
movq 0x28(%rsp), %rax
testb $0x1, 0x3c(%rax)
jne 0x196aa
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
callq 0x18900
movl (%rax), %eax
movl %eax, 0xc(%rsp)
jmp 0x196dc
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rcx
movq %rcx, (%rsp)
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
callq 0x18900
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x188b0
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %eax
movl %eax, %esi
callq 0x18850
testb $0x1, 0x8(%rax)
jne 0x19701
movb $0x1, 0x3f(%rsp)
jmp 0x19716
jmp 0x19703
movq 0x48(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x1966d
testb $0x1, 0x3f(%rsp)
jne 0x19729
movq 0x48(%rsp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
addq $0x58, %rsp
retq
nop