// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x33c0
movq %rax, -0x88(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
leaq -0x2d(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x35d0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x35f0
jmp 0x27c7
leaq -0x2d(%rbp), %rdi
callq 0x3670
movq -0x90(%rbp), %rdi
callq 0x33c0
movq %rax, -0xa0(%rbp)
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
leaq -0x5d(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x35d0
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rcx
leaq -0x58(%rbp), %rdi
leaq -0x5c(%rbp), %rdx
callq 0x35f0
jmp 0x2817
leaq -0x5d(%rbp), %rdi
callq 0x3670
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movq -0x90(%rbp), %rdi
movl -0x68(%rbp), %eax
movq %rax, -0xa8(%rbp)
callq 0x33c0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x292a
movl $0x0, -0x6c(%rbp)
movq -0x90(%rbp), %rdi
movl -0x6c(%rbp), %eax
movq %rax, -0xb0(%rbp)
movl -0x68(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
callq 0x3690
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x291a
movl -0x68(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x36b0
movq -0x90(%rbp), %rdi
movl $0x1, (%rax)
movl -0x68(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
movl -0x6c(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movslq (%rax), %rsi
leaq -0x28(%rbp), %rdi
callq 0x36b0
movl $0x1, (%rax)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x285e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2d(%rbp), %rdi
callq 0x3670
jmp 0x2b26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x5d(%rbp), %rdi
callq 0x3670
jmp 0x2b1d
jmp 0x291c
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x282e
movl $0x0, -0x70(%rbp)
movq -0x90(%rbp), %rdi
movl -0x70(%rbp), %eax
movq %rax, -0xb8(%rbp)
callq 0x33c0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jae 0x299b
movl -0x70(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x36b0
cmpl $0x1, (%rax)
jne 0x298e
movl -0x64(%rbp), %eax
movl %eax, -0xbc(%rbp)
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x70(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
callq 0x36b0
movl -0xbc(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x2990
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x2931
movl $0x0, -0x74(%rbp)
movq -0x90(%rbp), %rdi
movl -0x74(%rbp), %eax
movq %rax, -0xc8(%rbp)
callq 0x33c0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jae 0x2af0
movl -0x74(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x36b0
cmpl $0x1, (%rax)
jne 0x2ae0
movl $0x0, -0x78(%rbp)
movq -0x90(%rbp), %rdi
movl -0x78(%rbp), %eax
movq %rax, -0xd0(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
callq 0x3690
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jae 0x2a81
movq -0x90(%rbp), %rdi
movl -0x74(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
movl -0x78(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movslq (%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x36b0
movq -0x90(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
movl -0x78(%rbp), %eax
movl %eax, %esi
callq 0x36d0
movl -0xd4(%rbp), %ecx
movl %ecx, (%rax)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x29e9
movq -0x90(%rbp), %rdi
movl -0x74(%rbp), %eax
movl %eax, %esi
callq 0x34c0
movq %rax, -0xe0(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
callq 0x36b0
movq -0x90(%rbp), %rdi
movslq (%rax), %rsi
callq 0x34c0
movq -0xe0(%rbp), %rsi
movq %rax, %rdi
callq 0x36f0
jmp 0x2ac7
jmp 0x2ae0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3940
jmp 0x2b1d
jmp 0x2ae2
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x29a2
movq -0x90(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x3430
jmp 0x2b02
leaq -0x58(%rbp), %rdi
callq 0x3940
leaq -0x28(%rbp), %rdi
callq 0x3940
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3940
movq -0x38(%rbp), %rdi
callq 0x2240
nop