// File: /workspace/github_cpp_makefile_star2_O3/iPapatsoris[P]Maximum-Independent-Set/src/Graph.cpp
// Function: Graph::print(bool) const
void Graph::print(bool direction) const {
    cout << "\nNodes: " << nodeIndex.size() << " Edges: " << edgeBuffer->size() / 2 << "\n";
    for (uint32_t pos = 0 ; pos < nodeIndex.size() ; pos++) {
        if (!nodeIndex[pos].removed) {
            uint32_t node = (!mapping ? pos : (*posToId)[pos]);
            if (!nodeIndex[pos].edges) {
                cout << node << "\n";
            }
            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 nPos = (!mapping ? (*edgeBuffer)[offset] : idToPos->at((*edgeBuffer)[offset]));
                if (!nodeIndex[nPos].removed && (direction || !direction && node < (*edgeBuffer)[offset])) {
                    cout << node << "\t" << (*edgeBuffer)[offset] << "\n";
                }
            }
        }
    }
    /*cout << "Zero degree nodes: \n";
    for (uint32_t i = 0 ; i < zeroDegreeNodes.size() ; i++) {
        cout << zeroDegreeNodes[i] << "\n";
    }*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %r14
movq 0x1767b(%rip), %r15     # 0x21fd0
leaq 0xec03(%rip), %rsi      # 0x1955f
movl $0x8, %edx
movq %r15, %rdi
callq 0x2200
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r13, %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
leaq 0xebd4(%rip), %rsi      # 0x19568
movl $0x8, %edx
movq %rax, %rdi
callq 0x2200
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x2, %rsi
shrq %rsi
movq %r15, %rdi
callq 0x2120
leaq 0xebc4(%rip), %rsi      # 0x19586
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rax, %rcx
je 0xab67
xorl %r15d, %r15d
leaq (%r15,%r15,2), %r12
cmpb $0x0, 0x8(%rax,%r12,4)
jne 0xab4d
cmpb $0x1, 0x3c(%r14)
movl %r15d, (%rsp)
jne 0xaa0b
movq 0x48(%r14), %rdx
movq (%rdx), %rdx
movl (%rdx,%r15,4), %edx
movl %edx, (%rsp)
leaq (%rax,%r12,4), %rdx
cmpl $0x0, 0x4(%rdx)
jne 0xaa3f
movl (%rsp), %esi
movq 0x175b1(%rip), %rdi     # 0x21fd0
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
leaq 0xeb53(%rip), %rsi      # 0x19586
callq 0x2200
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
imulq %r13, %rdx
decq %rdx
cmpq %r15, %rdx
jne 0xaa66
movq 0x18(%r14), %rdx
movq 0x8(%rdx), %rbx
subq (%rdx), %rbx
shrq $0x2, %rbx
jmp 0xaa71
leal 0x1(%r15), %edx
leaq (%rdx,%rdx,2), %rdx
movl (%rax,%rdx,4), %ebx
movl (%rax,%r12,4), %edx
cmpl %edx, %ebx
jbe 0xab4d
movl (%rsp), %ebp
movq %rdx, %r12
shlq $0x2, %r12
subl %edx, %ebx
cmpb $0x0, 0x3c(%r14)
je 0xaab2
movq 0x18(%r14), %rax
movq 0x40(%r14), %rdi
movq (%rax), %rsi
addq %r12, %rsi
callq 0xd37a
testq %rax, %rax
je 0xab76
addq $0xc, %rax
jmp 0xaabc
movq 0x18(%r14), %rax
movq (%rax), %rax
addq %r12, %rax
movl (%rax), %eax
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
cmpb $0x0, 0x8(%rcx,%rax,4)
jne 0xab30
cmpb $0x0, 0x4(%rsp)
jne 0xaae3
movq 0x18(%r14), %rax
movq (%rax), %rax
movl (%rsp), %ecx
cmpl (%rax,%r12), %ecx
jae 0xab30
movq 0x174e6(%rip), %rdi     # 0x21fd0
movq %rbp, %rsi
callq 0x2120
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0xea6d(%rip), %rsi      # 0x19571
callq 0x2200
movq 0x18(%r14), %rax
movq (%rax), %rax
movl (%rax,%r12), %esi
movq %r13, %rdi
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
leaq 0xea5b(%rip), %rsi      # 0x19586
callq 0x2200
addq $0x4, %r12
decl %ebx
jne 0xaa89
movq (%r14), %rax
movq 0x8(%r14), %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
incl %r15d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
imulq %r13, %rdx
cmpq %r15, %rdx
ja 0xa9e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xec53(%rip), %rdi      # 0x197d0
callq 0x2280