// File: /workspace/github_cpp_makefile_star2_O1/siolag161[P]louvain-original/graph.cpp
// Function: Graph::renumber(int)
void
Graph::renumber(int type) {
  vector<int> linked(links.size(),-1);
  vector<int> renum(links.size(),-1);
  int nb=0;
  
  for (unsigned int i=0 ; i<links.size() ; i++) {
    for (unsigned int j=0 ; j<links[i].size() ; j++) {
      linked[i]=1;
      linked[links[i][j].first]=1;
    }
  }
  
  for (unsigned int i=0 ; i<links.size() ; i++) {
    if (linked[i]==1)
      renum[i]=nb++;
  }

  for (unsigned int i=0 ; i<links.size() ; i++) {
    if (linked[i]==1) {
      for (unsigned int j=0 ; j<links[i].size() ; j++) {
	links[i][j].first = renum[links[i][j].first];
      }
      links[renum[i]]=links[i];
    }
  }
  links.resize(nb);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rsi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rdx
movl %ebp, (%rdx)
leaq 0x28(%rsp), %rdi
leaq 0xc(%rsp), %r14
movq %r14, %rcx
callq 0x2e8c
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
imulq %r15, %rsi
movl %ebp, (%r14)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
leaq 0xb(%rsp), %rcx
callq 0x2e8c
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
imulq %r15, %rax
cmpq %rcx, %rdx
je 0x26c0
movq 0x28(%rsp), %rsi
xorl %edi, %edi
movl $0x1, %r8d
leaq (%rdi,%rdi,2), %r10
movq (%rcx,%r10,8), %r9
movq 0x8(%rcx,%r10,8), %r10
subq %r9, %r10
je 0x26b5
sarq $0x3, %r10
xorl %r11d, %r11d
movl %r8d, (%rsi,%rdi,4)
movslq (%r9,%r11,8), %r14
movl %r8d, (%rsi,%r14,4)
incq %r11
movl %r11d, %r14d
cmpq %r14, %r10
ja 0x269e
incq %rdi
movl %edi, %r9d
cmpq %r9, %rax
ja 0x2685
xorl %r14d, %r14d
cmpq %rcx, %rdx
je 0x26ee
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rdx
xorl %esi, %esi
cmpl $0x1, (%rcx,%rsi,4)
jne 0x26e1
movl %r14d, (%rdx,%rsi,4)
incl %r14d
incq %rsi
movl %esi, %edi
cmpq %rdi, %rax
ja 0x26d4
movslq %r14d, %r14
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x276f
xorl %r12d, %r12d
movq 0x28(%rsp), %rcx
cmpl $0x1, (%rcx,%r12,4)
jne 0x2755
leaq (%r12,%r12,2), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rsi
subq %rdx, %rsi
je 0x273b
sarq $0x3, %rsi
movq 0x10(%rsp), %rdi
xorl %r8d, %r8d
movslq (%rdx,%r8,8), %r9
movl (%rdi,%r9,4), %r9d
movl %r9d, (%rdx,%r8,8)
incq %r8
movl %r8d, %r9d
cmpq %r9, %rsi
ja 0x2724
leaq (%rax,%rcx,8), %rsi
movq 0x10(%rsp), %rcx
movslq (%rcx,%r12,4), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0x2f0a
incl %r12d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r15, %rcx
cmpq %r12, %rcx
ja 0x26fa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e02
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2791
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27a8
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27bc
movq %rax, %rbx
jmp 0x27d6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x27d6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27ed
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2290
nop