// File: riyadparvez[P]louvain-method/community.cpp
// Function: Community::Community(char*, char*, int, int, double)
Community::Community(char * filename, char * filename_w, int type, int nbp, double minm) {
  g = Graph(filename, filename_w, type);
  size = g.nb_nodes;

  neigh_weight.resize(size,-1);
  neigh_pos.resize(size);
  neigh_last=0;

  n2c.resize(size);
  in.resize(size);
  tot.resize(size);

  for (int i=0 ; i<size ; i++) {
    n2c[i] = i;
    tot[i] = g.weighted_degree(i);
    in[i]  = g.nb_selfloops(i);
  }

  nb_pass = nbp;
  min_modularity = minm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
callq 0x9e80
movq -0xd0(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3310
movq -0xd0(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0xc8(%rbp)
callq 0x2500
jmp 0x7e0d
movq -0xe0(%rbp), %rdi
addq $0xb8, %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3580
movq -0xe0(%rbp), %rdi
addq $0xd0, %rdi
movq %rdi, -0xf0(%rbp)
callq 0x9e80
movq -0xe0(%rbp), %rdi
addq $0xe8, %rdi
movq %rdi, -0xe8(%rbp)
callq 0x9e80
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0xb0(%rbp), %rdi
callq 0x2570
jmp 0x7e74
movq -0xe0(%rbp), %rdi
addq $0x38, %rdi
leaq -0xb0(%rbp), %rsi
movq %rsi, -0x100(%rbp)
callq 0x9ea0
movq -0x100(%rbp), %rdi
callq 0x9f30
movq -0xe0(%rbp), %rdi
movl 0x38(%rdi), %eax
movl %eax, 0xb0(%rdi)
movslq 0xb0(%rdi), %rsi
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdx
callq 0x9f80
jmp 0x7ed4
movq -0xe0(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movslq 0xb0(%rax), %rsi
callq 0x3420
jmp 0x7ef0
movq -0xe0(%rbp), %rax
movl $0x0, 0x30(%rax)
movq %rax, %rdi
addq $0xb8, %rdi
movslq 0xb0(%rax), %rsi
callq 0xa030
jmp 0x7f16
movq -0xe0(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movslq 0xb0(%rax), %rsi
callq 0xa0c0
jmp 0x7f35
movq -0xe0(%rbp), %rax
movq %rax, %rdi
addq $0xe8, %rdi
movslq 0xb0(%rax), %rsi
callq 0xa0c0
jmp 0x7f54
movl $0x0, -0xbc(%rbp)
movq -0xe0(%rbp), %rcx
movl -0xbc(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jge 0x808d
movq -0xe0(%rbp), %rdi
movslq -0xbc(%rbp), %rsi
movl %esi, %eax
movl %eax, -0x10c(%rbp)
addq $0xb8, %rdi
callq 0x3ab0
movl -0x10c(%rbp), %ecx
movq -0xe0(%rbp), %rdi
movl %ecx, (%rax)
addq $0x38, %rdi
movl -0xbc(%rbp), %esi
callq 0x36a0
movsd %xmm0, -0x108(%rbp)
jmp 0x7fc1
movq -0xe0(%rbp), %rdi
addq $0xe8, %rdi
movslq -0xbc(%rbp), %rsi
callq 0xa150
movsd -0x108(%rbp), %xmm0
movq -0xe0(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x38, %rdi
movl -0xbc(%rbp), %esi
callq 0xa170
movsd %xmm0, -0x118(%rbp)
jmp 0x8007
movq -0xe0(%rbp), %rdi
addq $0xd0, %rdi
movslq -0xbc(%rbp), %rsi
callq 0xa150
movsd -0x118(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x7f5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x80b3
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xa2a0
movq -0xf0(%rbp), %rdi
callq 0xa2a0
movq -0xf8(%rbp), %rdi
callq 0x3640
movq -0xc8(%rbp), %rdi
callq 0x9f30
jmp 0x80b3
movq -0xe0(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, 0x100(%rax)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x108(%rax)
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0x3820
movq -0xd0(%rbp), %rdi
callq 0xa2a0
movq -0x30(%rbp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)