// File: /workspace/github_cpp_makefile_star2_O1/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 0x17fe1(%rip), %r15     # 0x22fd0
leaq 0xf569(%rip), %rsi      # 0x1a55f
movl $0x8, %edx
movq %r15, %rdi
callq 0x2200
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
leaq 0xf53a(%rip), %rsi      # 0x1a568
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 0xf52a(%rip), %rsi      # 0x1a586
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0xb1f3
xorl %r15d, %r15d
leaq (%r15,%r15,2), %rbx
cmpb $0x0, 0x8(%rax,%rbx,4)
jne 0xb1cb
cmpb $0x1, 0x3c(%r14)
movl %r15d, (%rsp)
jne 0xb0a1
movq 0x48(%r14), %rcx
movq (%rcx), %rcx
movl (%rcx,%r15,4), %ecx
movl %ecx, (%rsp)
leaq (%rax,%rbx,4), %rax
cmpl $0x0, 0x4(%rax)
jne 0xb0ce
movl (%rsp), %esi
movq 0x17f1b(%rip), %rdi     # 0x22fd0
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf4bd(%rip), %rsi      # 0x1a586
callq 0x2200
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
decq %rcx
cmpq %r15, %rcx
jne 0xb103
movq 0x18(%r14), %rdx
movq 0x8(%rdx), %rcx
subq (%rdx), %rcx
shrq $0x2, %rcx
jmp 0xb10e
leal 0x1(%r15), %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %ecx
movl (%rax,%rbx,4), %ebx
cmpl %ecx, %ebx
jae 0xb1cb
movl (%rsp), %ebp
movl %ecx, %r12d
subq %rbx, %r12
shlq $0x2, %rbx
cmpb $0x0, 0x3c(%r14)
je 0xb142
movq 0x18(%r14), %rax
movq 0x40(%r14), %rdi
movq (%rax), %rsi
addq %rbx, %rsi
callq 0xda16
jmp 0xb14c
movq 0x18(%r14), %rax
movq (%rax), %rax
addq %rbx, %rax
movl (%rax), %eax
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
cmpb $0x0, 0x8(%rcx,%rax,4)
jne 0xb1be
cmpb $0x0, 0x4(%rsp)
jne 0xb172
movq 0x18(%r14), %rax
movq (%rax), %rax
movl (%rsp), %ecx
cmpl (%rax,%rbx), %ecx
jae 0xb1be
movq 0x17e57(%rip), %rdi     # 0x22fd0
movq %rbp, %rsi
callq 0x2120
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf3de(%rip), %rsi      # 0x1a571
callq 0x2200
movq 0x18(%r14), %rax
movq (%rax), %rax
movl (%rax,%rbx), %esi
movq %r13, %rdi
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf3cd(%rip), %rsi      # 0x1a586
callq 0x2200
addq $0x4, %rbx
decq %r12
jne 0xb126
incl %r15d
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %r15, %rcx
ja 0xb079
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq