// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq 0x19130(%rip), %rdi     # 0x21fd0
leaq 0xe6bc(%rip), %rsi      # 0x17563
callq 0x2170
movq %rax, %rdi
movq 0x8(%r14), %rax
subq (%r14), %rax
pushq $0xc
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x2110
leaq 0xe69f(%rip), %rsi      # 0x1756c
movq %rax, %rdi
callq 0x2170
movq 0x18(%r14), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
shrq %rsi
movq %rax, %rdi
callq 0x2110
leaq 0xe694(%rip), %rsi      # 0x1758a
movq %rax, %rdi
callq 0x2170
xorl %edi, %edi
movl %edi, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0xc
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x9065
movq %rdi, 0x10(%rsp)
imulq $0xc, %r12, %r15
cmpb $0x0, 0x8(%rcx,%r15)
je 0x8f38
movq 0x10(%rsp), %rdi
incl %edi
jmp 0x8f00
cmpb $0x1, 0x3c(%r14)
movq 0x10(%rsp), %r13
movl %r13d, %esi
jne 0x8f52
movq 0x48(%r14), %rdx
movq (%rdx), %rdx
movl (%rdx,%r12,4), %esi
leaq (%rcx,%r15), %rdx
cmpl $0x0, 0x4(%rdx)
movl %esi, 0xc(%rsp)
movl %esi, %ebp
jne 0x8f92
movq 0x19067(%rip), %rdi     # 0x21fd0
movq %rbp, %rsi
callq 0x2110
movq %rax, %rdi
leaq 0xe60f(%rip), %rsi      # 0x1758a
callq 0x2170
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0xc
popq %rsi
idivq %rsi
decq %rax
cmpq %r12, %rax
jne 0x8fab
movq 0x18(%r14), %rdx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
shrq $0x2, %rax
jmp 0x8fb6
leal 0x1(%r13), %eax
imulq $0xc, %rax, %rax
movl (%rcx,%rax), %eax
movl (%rcx,%r15), %r12d
movl %eax, %r15d
leaq (,%r12,4), %r13
cmpq %r15, %r12
jae 0x8f2f
cmpb $0x0, 0x3c(%r14)
je 0x8fea
movq 0x18(%r14), %rax
movq 0x40(%r14), %rdi
movq (%rax), %rsi
addq %r13, %rsi
callq 0xb880
jmp 0x8ff4
movq 0x18(%r14), %rax
movq (%rax), %rax
addq %r13, %rax
movl (%rax), %eax
movq (%r14), %rcx
imulq $0xc, %rax, %rax
cmpb $0x0, 0x8(%rcx,%rax)
jne 0x9059
testb %bl, %bl
jne 0x9019
movq 0x18(%r14), %rax
movq (%rax), %rax
movl 0xc(%rsp), %ecx
cmpl (%rax,%r13), %ecx
jae 0x9059
movq 0x18fb0(%rip), %rdi     # 0x21fd0
movq %rbp, %rsi
callq 0x2110
movq %rax, %rdi
leaq 0xe543(%rip), %rsi      # 0x17575
callq 0x2170
movq 0x18(%r14), %rcx
movq (%rcx), %rcx
movl (%rcx,%r13), %esi
movq %rax, %rdi
callq 0x2110
movq %rax, %rdi
leaq 0xe536(%rip), %rsi      # 0x1758a
callq 0x2170
incq %r12
addq $0x4, %r13
jmp 0x8fc5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq