// File: /workspace/github_cpp_makefile_star2_O3/riyadparvez[P]louvain-method/main_community.cpp
// Function: main
int
main(int argc, char **argv) {
  srand(time(NULL)+getpid());

  parse_args(argc, argv);
  time_t time_begin, time_end;
  time(&time_begin);
  if (verbose)
    display_time("Begin");

  Community c(filename, filename_w, type, -1, precision);
  if (filename_part!=NULL)
    c.init_partition(filename_part);
  Graph g;
  bool improvement=true;
  double mod=c.modularity(), new_mod;
  int level=0;

  do {
    if (verbose) {
      cerr << "level " << level << ":\n";
      display_time("  start computation");
      cerr << "  network size: " 
	   << c.g.nb_nodes << " nodes, " 
	   << c.g.nb_links << " links, "
	   << c.g.total_weight << " weight." << endl;
    }

    improvement = c.one_level();
    new_mod = c.modularity();
    if (++level==display_level)
      g.display();
    if (display_level==-1)
      c.display_partition();
    g = c.partition2graph_binary();
    c = Community(g, -1, precision);

    if (verbose)
      cerr << "  modularity increased from " << mod << " to " << new_mod << endl;

    mod=new_mod;
    if (verbose)
      display_time("  end computation");

    if (filename_part!=NULL && level==1) // do at least one more computation if partition is provided
      improvement=true;
  } while(improvement);

  time(&time_end);
  if (verbose) {
    display_time("End");
    cerr << "Total duration: " << (time_end-time_begin) << " sec." << endl;
  }
  if (write_community) {
    g.write_community(filename_comm);
  }
  cerr << new_mod << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x21a0
movq %rax, %r14
callq 0x22c0
addl %eax, %r14d
movl %r14d, %edi
callq 0x21c0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x6ff4
leaq 0xc8(%rsp), %rdi
callq 0x21a0
cmpb $0x1, 0x4ff2(%rip)      # 0xc224
jne 0x7240
leaq 0x1484(%rip), %rdi      # 0x86bf
callq 0x7130
movq 0x4fb9(%rip), %rsi      # 0xc200
movq 0x4fba(%rip), %rdx      # 0xc208
movl 0x4f84(%rip), %ecx      # 0xc1d8
movsd 0x4f84(%rip), %xmm0     # 0xc1e0
leaq 0xd0(%rsp), %rdi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x3b4c
movq 0x4fa2(%rip), %rsi      # 0xc218
testq %rsi, %rsi
je 0x7288
leaq 0xd0(%rsp), %rdi
callq 0x43fe
leaq 0x10(%rsp), %rdi
callq 0x263c
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
callq 0x47c6
movsd %xmm0, 0x8(%rsp)
leaq 0x278(%rsp), %r12
movl $0x100, %eax            # imm = 0x100
leaq (%rbx,%rax), %rcx
movq %rcx, 0xb0(%rsp)
leaq 0x260(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0xb8(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpb $0x1, 0x4f44(%rip)      # 0xc224
jne 0x73e5
movl $0x6, %edx
movq 0x4cfe(%rip), %rdi      # 0xbff0
leaq 0x13cc(%rip), %rsi      # 0x86c5
callq 0x2230
movq 0x4ceb(%rip), %rdi      # 0xbff0
movl %r14d, %esi
callq 0x2350
movl $0x2, %edx
movq %rax, %rdi
leaq 0x13b0(%rip), %rsi      # 0x86cc
callq 0x2230
leaq 0x13a7(%rip), %rdi      # 0x86cf
callq 0x7130
movl $0x10, %edx
movq 0x4cb7(%rip), %rdi      # 0xbff0
leaq 0x13a3(%rip), %rsi      # 0x86e3
callq 0x2230
movl 0x108(%rsp), %esi
movq 0x4c9d(%rip), %rdi      # 0xbff0
callq 0x2140
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x138a(%rip), %rsi      # 0x86f4
callq 0x2230
movq 0x110(%rsp), %rsi
movq %rbx, %rdi
callq 0x2140
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x136c(%rip), %rsi      # 0x86fd
callq 0x2230
movsd 0x118(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x134d(%rip), %rsi      # 0x8706
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq 0xd0(%rsp), %rdi
callq 0x5144
movl %eax, %ebx
leaq 0xd0(%rsp), %rdi
callq 0x47c6
movsd %xmm0, (%rsp)
leal 0x1(%r14), %r15d
movl 0x4dd8(%rip), %eax      # 0xc1e8
cmpl %eax, %r15d
jne 0x7425
leaq 0x10(%rsp), %rdi
callq 0x2abc
movl 0x4dc3(%rip), %eax      # 0xc1e8
cmpl $-0x1, %eax
jne 0x7437
leaq 0xd0(%rsp), %rdi
callq 0x4a1c
leaq 0x260(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x4b7e
movq 0x270(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x260(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movups 0x278(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
testq %rdi, %rdi
je 0x74a8
subq %rdi, %rsi
callq 0x2200
movq 0x50(%rsp), %rax
movups 0x290(%rsp), %xmm0
movq 0x2a0(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x90(%rsp)
movq %rax, 0xa0(%rsp)
leaq 0x290(%rsp), %rax
movq %rbp, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x90(%rsp), %rdi
callq 0x3220
movq 0x58(%rsp), %rdi
movq 0x68(%rsp), %rsi
movups 0x2a8(%rsp), %xmm0
movups %xmm0, 0x58(%rsp)
movq 0x2b8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %rbp, 0x40(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r12)
testq %rdi, %rdi
je 0x753a
subq %rdi, %rsi
callq 0x2200
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
movups 0x2c0(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x80(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r12)
movq $0x0, 0x58(%r12)
testq %rdi, %rdi
je 0x75a0
subq %rdi, %rsi
callq 0x2200
movq 0x2c0(%rsp), %rdi
testq %rdi, %rdi
je 0x75a0
movq 0x2d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x2a8(%rsp), %rdi
testq %rdi, %rdi
je 0x75bd
movq 0x2b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x290(%rsp), %rdi
callq 0x3220
movq 0x278(%rsp), %rdi
testq %rdi, %rdi
je 0x75e7
movq 0x288(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x1e0(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x1f0(%rsp)
leaq 0x1f8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x7da0
leaq 0x210(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x7e20
leaq 0x228(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x7eba
leaq 0x240(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x7f3a
movsd 0x4b8f(%rip), %xmm0     # 0xc1e0
leaq 0x260(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4048
movq 0xd0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movaps 0x260(%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0xe0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x260(%rsp)
movq $0x0, 0x270(%rsp)
testq %rdi, %rdi
je 0x76bf
subq %rdi, %rsi
callq 0x2200
movq 0xe8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
movups 0x278(%rsp), %xmm0
movups %xmm0, 0xe8(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0xf8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
testq %rdi, %rdi
je 0x770d
subq %rdi, %rsi
callq 0x2200
movl 0x290(%rsp), %eax
movl %eax, 0x100(%rsp)
movq 0x30(%r12), %rax
leaq 0x108(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups 0x20(%r12), %xmm0
movups %xmm0, (%rcx)
movq 0x120(%rsp), %rdi
movq 0x130(%rsp), %rsi
movaps 0x2b0(%rsp), %xmm0
movaps %xmm0, 0x120(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x130(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x38(%r12)
movq $0x0, 0x48(%r12)
testq %rdi, %rdi
je 0x7784
subq %rdi, %rsi
callq 0x2200
movq 0x148(%rsp), %rax
movups 0x2c8(%rsp), %xmm0
movq 0x2d8(%rsp), %rcx
movq %rcx, 0x148(%rsp)
movups 0x138(%rsp), %xmm1
movups %xmm0, 0x138(%rsp)
movaps %xmm1, 0x90(%rsp)
movq %rax, 0xa0(%rsp)
movq %rbp, 0x60(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r12)
leaq 0x90(%rsp), %rdi
callq 0x3220
movq 0x150(%rsp), %rdi
movq 0x160(%rsp), %rsi
movaps 0x2e0(%rsp), %xmm0
movaps %xmm0, 0x150(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x160(%rsp)
movq %rbp, 0x78(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, 0x68(%r12)
testq %rdi, %rdi
je 0x782a
subq %rdi, %rsi
callq 0x2200
movq 0x168(%rsp), %rdi
movq 0x178(%rsp), %rsi
movups 0x2f8(%rsp), %xmm0
movups %xmm0, 0x168(%rsp)
movq 0x308(%rsp), %rax
movq %rax, 0x178(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%r12)
movq $0x0, 0x90(%r12)
testq %rdi, %rdi
je 0x787f
subq %rdi, %rsi
callq 0x2200
movl 0x310(%rsp), %eax
movl %eax, 0x180(%rsp)
movq 0x188(%rsp), %rdi
movq 0x198(%rsp), %rsi
movups 0x318(%rsp), %xmm0
movups %xmm0, 0x188(%rsp)
movq 0x328(%rsp), %rax
movq %rax, 0x198(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%r12)
movq $0x0, 0xb0(%r12)
testq %rdi, %rdi
je 0x78e2
subq %rdi, %rsi
callq 0x2200
movq 0x1a0(%rsp), %rdi
movq 0x1b0(%rsp), %rsi
movaps 0x330(%rsp), %xmm0
movaps %xmm0, 0x1a0(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x1b0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb8(%r12)
movq $0x0, 0xc8(%r12)
testq %rdi, %rdi
je 0x7937
subq %rdi, %rsi
callq 0x2200
movq 0x1b8(%rsp), %rdi
movq 0x1c8(%rsp), %rsi
movups 0x348(%rsp), %xmm0
movups %xmm0, 0x1b8(%rsp)
movq 0x358(%rsp), %rax
movq %rax, 0x1c8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r12)
movq $0x0, 0xe0(%r12)
testq %rdi, %rdi
je 0x798c
subq %rdi, %rsi
callq 0x2200
movq 0xb8(%rsp), %rax
movaps (%rax), %xmm0
movq 0xb0(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x260(%rsp), %rdi
callq 0x7cca
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x79cc
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x228(%rsp), %rdi
testq %rdi, %rdi
je 0x79e9
movq 0x238(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x210(%rsp), %rdi
callq 0x3220
movq 0x1f8(%rsp), %rdi
testq %rdi, %rdi
je 0x7a13
movq 0x208(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movb 0x480b(%rip), %al       # 0xc224
cmpb $0x1, %al
jne 0x7a9b
movl $0x1c, %edx
movq 0x45c7(%rip), %rdi      # 0xbff0
leaq 0xcdf(%rip), %rsi       # 0x870f
callq 0x2230
movq 0x45b4(%rip), %rdi      # 0xbff0
movsd 0x8(%rsp), %xmm0
callq 0x2300
movq %rax, %r13
movl $0x4, %edx
movq %rax, %rdi
leaq 0xcd3(%rip), %rsi       # 0x872c
callq 0x2230
movq %r13, %rdi
movsd (%rsp), %xmm0
callq 0x2300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movb 0x4789(%rip), %al       # 0xc224
testb $0x1, %al
je 0x7aab
leaq 0xc8b(%rip), %rdi       # 0x8731
callq 0x7130
cmpq $0x0, 0x4765(%rip)      # 0xc218
setne %al
testl %r14d, %r14d
sete %cl
andb %al, %cl
orb %cl, %bl
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl %r15d, %r14d
jne 0x72d9
leaq 0xc0(%rsp), %rdi
callq 0x21a0
cmpb $0x1, 0x473c(%rip)      # 0xc224
jne 0x7b68
leaq 0xc52(%rip), %rdi       # 0x8743
callq 0x7130
movq 0x44f3(%rip), %rdi      # 0xbff0
leaq 0xc43(%rip), %rsi       # 0x8747
movl $0x10, %edx
callq 0x2230
movq 0xc0(%rsp), %rsi
subq 0xc8(%rsp), %rsi
movq 0x44cb(%rip), %rdi      # 0xbff0
callq 0x21b0
movq %rax, %rbx
leaq 0xc24(%rip), %rsi       # 0x8758
movl $0x5, %edx
movq %rax, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
cmpb $0x1, 0x46b6(%rip)      # 0xc225
jne 0x7b82
movq 0x4698(%rip), %rsi      # 0xc210
leaq 0x10(%rsp), %rdi
callq 0x2b84
movq 0x4467(%rip), %rdi      # 0xbff0
movsd (%rsp), %xmm0
callq 0x2300
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x7bd7
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x7bee
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x40(%rsp), %rdi
callq 0x3220
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x7c0f
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0xd0(%rsp), %rdi
callq 0x7cca
xorl %eax, %eax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7c34
jmp 0x7ca7
movq %rax, %rbx
jmp 0x7cb4
jmp 0x7ca7
jmp 0x7ca7
jmp 0x7ca7
movq %rax, %rbx
jmp 0x7c76
movq %rax, %rbx
jmp 0x7c69
movq %rax, %rbx
movq 0x228(%rsp), %rdi
testq %rdi, %rdi
je 0x7c69
movq 0x238(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x210(%rsp), %rdi
callq 0x3220
movq 0x1f8(%rsp), %rdi
testq %rdi, %rdi
je 0x7caa
movq 0x208(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
jmp 0x7caa
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x5480
jmp 0x7caa
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5480
leaq 0xd0(%rsp), %rdi
callq 0x7cca
movq %rbx, %rdi
callq 0x2370
nop