// File: /workspace/github_cpp_makefile_star2_O3/riyadparvez[P]louvain-method/graph_binary.cpp
// Function: Graph::check_symmetry()
bool
Graph::check_symmetry() {
  int error=0;
  for (unsigned int node=0 ; node<nb_nodes ; node++) {
    pair<vector<unsigned int>::iterator, vector<float>::iterator > p = neighbors(node);
    for (unsigned int i=0 ; i<nb_neighbors(node) ; i++) {
      unsigned int neigh = *(p.first+i);
      float weight = *(p.second+i);
      
      pair<vector<unsigned int>::iterator, vector<float>::iterator > p_neigh = neighbors(neigh);
      for (unsigned int j=0 ; j<nb_neighbors(neigh) ; j++) {
	unsigned int neigh_neigh = *(p_neigh.first+j);
	float neigh_weight = *(p_neigh.second+j);

	if (node==neigh_neigh && weight!=neigh_weight) {
	  cout << node << " " << neigh << " " << weight << " " << neigh_weight << endl;
	  if (error++==10)
	    exit(0);
	}
      }
    }
  }
  return (error==0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl (%rdi), %eax
testl %eax, %eax
je 0x3054
movq %rdi, %r12
xorl %esi, %esi
xorl %r9d, %r9d
movq 0x60(%r12), %r10
testq %rsi, %rsi
je 0x2e2a
movq 0x18(%r12), %rcx
movq -0x8(%rcx,%rsi,8), %rcx
leaq (,%rcx,4), %rdx
addq 0x48(%r12), %rdx
movq %rdx, 0x10(%rsp)
cmpq %r10, 0x68(%r12)
movl $0x0, %edx
cmovneq %rcx, %rdx
leaq (%r10,%rdx,4), %r10
jmp 0x2e34
movq 0x48(%r12), %rcx
movq %rcx, 0x10(%rsp)
movl %eax, %ecx
cmpq %rcx, %rsi
jae 0x3065
leal -0x1(%rsi), %ecx
movq %rcx, 0x18(%rsp)
xorl %r11d, %r11d
movq %r10, 0x20(%rsp)
movq 0x18(%r12), %rcx
testq %rsi, %rsi
je 0x2e68
movq (%rcx,%rsi,8), %rdx
movq 0x18(%rsp), %r8
subq (%rcx,%r8,8), %rdx
jmp 0x2e6b
movq (%rcx), %rdx
cmpl %edx, %r11d
jae 0x303e
movl %r11d, %edx
movq 0x10(%rsp), %r8
movl (%r8,%rdx,4), %r13d
cmpl %r13d, %eax
jbe 0x308b
movq 0x60(%r12), %rbx
testq %r13, %r13
movl %r11d, (%rsp)
je 0x2ec1
leal -0x1(%r13), %r8d
movq (%rcx,%r8,8), %rcx
leaq (,%rcx,4), %r11
addq 0x48(%r12), %r11
cmpq %rbx, 0x68(%r12)
movl $0x0, %r8d
cmovneq %rcx, %r8
leaq (%rbx,%r8,4), %rbx
jmp 0x2ec6
movq 0x48(%r12), %r11
movss (%r10,%rdx,4), %xmm0
leal -0x1(%r13), %ecx
movq %rcx, 0x40(%rsp)
movss %xmm0, 0x4(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
xorl %r15d, %r15d
movq %rbx, 0x30(%rsp)
movq %r11, 0x28(%rsp)
movq 0x18(%r12), %rdx
testq %r13, %r13
je 0x2f0b
movq (%rdx,%r13,8), %rcx
movq 0x40(%rsp), %r8
subq (%rdx,%r8,8), %rcx
jmp 0x2f0d
movl (%rdx), %ecx
movl %ecx, %ecx
cmpq %rcx, %r15
jae 0x3025
movl (%r11,%r15,4), %ecx
cmpq %rcx, %rsi
jne 0x3017
movss (%rbx,%r15,4), %xmm1
movss 0x4(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jne 0x2f3c
jnp 0x3017
movq 0x908d(%rip), %rdi      # 0xbfd0
movq %rsi, %rbx
movl %r9d, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
callq 0x2140
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5793(%rip), %rsi      # 0x86fb
callq 0x2230
movq %rbp, %rdi
movq %r13, %r14
movq %r13, %rsi
callq 0x2140
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x576e(%rip), %r13      # 0x86fb
movq %r13, %rsi
callq 0x2230
movq %rbp, %rdi
movsd 0x38(%rsp), %xmm0
callq 0x2300
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2230
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movq %rbp, %rdi
callq 0x2300
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movl 0xc(%rsp), %r9d
cmpl $0xa, %r9d
je 0x3084
incl %r9d
movl (%r12), %eax
movq %rbx, %rsi
movq 0x30(%rsp), %rbx
movq %r14, %r13
movq 0x28(%rsp), %r11
incq %r15
cmpl %r13d, %eax
ja 0x2ef2
jmp 0x3065
movl (%rsp), %r11d
incl %r11d
movl %eax, %ecx
cmpq %rcx, %rsi
movq 0x20(%rsp), %r10
jb 0x2e4f
jmp 0x3065
incq %rsi
movl %eax, %ecx
cmpq %rcx, %rsi
jb 0x2df0
testl %r9d, %r9d
sete %al
jmp 0x3056
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x500f(%rip), %rdi      # 0x807b
leaq 0x5021(%rip), %rsi      # 0x8094
leaq 0x5088(%rip), %rcx      # 0x8102
movl $0x5a, %edx
callq 0x2130
xorl %edi, %edi
callq 0x2250
leaq 0x4fe9(%rip), %rdi      # 0x807b
leaq 0x4ffb(%rip), %rsi      # 0x8094
leaq 0x5005(%rip), %rcx      # 0x80a5
movl $0x84, %edx
callq 0x2130