// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ec0
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 0x2ec0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
je 0x2782
sarq $0x3, %rdx
imulq %r15, %rdx
movq 0x28(%rsp), %rsi
xorl %edi, %edi
movl $0x1, %r8d
leaq (%rdi,%rdi,2), %r10
movq (%rax,%r10,8), %r9
movq 0x8(%rax,%r10,8), %r10
subq %r9, %r10
je 0x26bc
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 0x26a5
incq %rdi
movl %edi, %r9d
cmpq %r9, %rdx
ja 0x268c
xorl %r14d, %r14d
cmpq %rax, %rcx
je 0x2785
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdi
xorl %r8d, %r8d
cmpl $0x1, (%rsi,%r8,4)
jne 0x26ee
movl %r14d, (%rdi,%r8,4)
incl %r14d
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdx
ja 0x26e0
movslq %r14d, %r14
cmpq %rax, %rcx
je 0x2785
xorl %r12d, %r12d
movq 0x28(%rsp), %rdx
cmpl $0x1, (%rdx,%r12,4)
jne 0x276a
leaq (%r12,%r12,2), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x8(%rax,%rcx,8), %rdi
movq 0x10(%rsp), %rdx
subq %rsi, %rdi
je 0x274e
sarq $0x3, %rdi
xorl %r8d, %r8d
movslq (%rsi,%r8,8), %r9
movl (%rdx,%r9,4), %r9d
movl %r9d, (%rsi,%r8,8)
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdi
ja 0x2732
movq 0x10(%rsp), %rdx
leaq (%rax,%rcx,8), %rsi
movslq (%rdx,%r12,4), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0x303c
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
incl %r12d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
cmpq %r12, %rdx
ja 0x2708
jmp 0x2785
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e30
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x27a7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27be
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27d2
movq %rax, %rbx
jmp 0x27ec
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x27ec
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2803
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2290
nop