// File: /workspace/github_cpp_makefile_star2_O1/riyadparvez[P]louvain-method/community.cpp
// Function: Community::partition2graph()
void
Community::partition2graph() {
  vector<int> renumber(size, -1);
  for (int node=0 ; node<size ; node++) {
    renumber[n2c[node]]++;
  }

  int final=0;
  for (int i=0 ; i<size ; i++)
    if (renumber[i]!=-1)
      renumber[i]=final++;


  for (int i=0 ; i<size ; i++) {
    pair<vector<unsigned int>::iterator, vector<float>::iterator> p = g.neighbors(i);

    int deg = g.nb_neighbors(i);
    for (int j=0 ; j<deg ; j++) {
      int neigh = *(p.first+j);
      cout << renumber[n2c[i]] << " " << renumber[n2c[neigh]] << endl;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq 0xb0(%rdi), %rsi
leaq 0x34(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x58d6
cmpl $0x0, 0xb0(%rbx)
jle 0x4843
movq 0xb8(%rbx), %rax
movq 0x18(%rsp), %rcx
xorl %edx, %edx
movslq (%rax,%rdx,4), %rsi
incl (%rcx,%rsi,4)
incq %rdx
movslq 0xb0(%rbx), %rsi
cmpq %rsi, %rdx
jl 0x482d
cmpl $0x0, 0xb0(%rbx)
jle 0x486f
xorl %eax, %eax
movq 0x18(%rsp), %rcx
xorl %edx, %edx
cmpl $-0x1, (%rcx,%rax,4)
je 0x4860
movl %edx, (%rcx,%rax,4)
incl %edx
incq %rax
movslq 0xb0(%rbx), %rsi
cmpq %rsi, %rax
jl 0x4855
cmpl $0x0, 0xb0(%rbx)
jle 0x499c
xorl %ebp, %ebp
movl 0x38(%rbx), %eax
cmpq %rax, %rbp
jae 0x49c2
testq %rbp, %rbp
je 0x48b9
movq 0xa0(%rbx), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl %ebp, %eax
cmpq 0x98(%rbx), %rcx
movq 0x50(%rbx), %rcx
movq (%rcx,%rax,8), %rax
shlq $0x2, %rax
addq 0x80(%rbx), %rax
jmp 0x48c0
movq 0x80(%rbx), %rax
movq %rax, 0x10(%rsp)
testq %rbp, %rbp
je 0x48df
movq 0x50(%rbx), %rax
movq (%rax,%rbp,8), %r14
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addl %ebp, %ecx
subq (%rax,%rcx,8), %r14
jmp 0x48e6
movq 0x50(%rbx), %rax
movq (%rax), %r14
testl %r14d, %r14d
jle 0x4989
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movslq (%rax,%r15,4), %r13
movq 0xb8(%rbx), %rax
movslq (%rax,%rbp,4), %rax
movq 0x18(%rsp), %rcx
movl (%rcx,%rax,4), %esi
movq 0x76b4(%rip), %rdi      # 0xbfd0
callq 0x2350
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3d90(%rip), %rsi      # 0x86c3
callq 0x2230
movq 0xb8(%rbx), %rax
movslq (%rax,%r13,4), %rax
movq 0x18(%rsp), %rcx
movl (%rcx,%rax,4), %esi
movq %r12, %rdi
callq 0x2350
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
incq %r15
cmpq %r15, %r14
jne 0x48f9
incq %rbp
movslq 0xb0(%rbx), %rax
cmpq %rax, %rbp
jl 0x487e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x49b3
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36b2(%rip), %rdi      # 0x807b
leaq 0x36c4(%rip), %rsi      # 0x8094
leaq 0x36ce(%rip), %rcx      # 0x80a5
movl $0x84, %edx
callq 0x2130
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x49fb
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2370
nop