// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x0, (%rdi)
je 0x3083
movq %rdi, %r13
xorl %esi, %esi
xorl %r8d, %r8d
testq %rsi, %rsi
je 0x2e23
movq 0x60(%r13), %rdx
cmpq %rdx, 0x68(%r13)
je 0x2e31
movq 0x18(%r13), %rax
movq -0x8(%rax,%rsi,8), %rax
leaq (,%rax,4), %rcx
addq 0x48(%r13), %rcx
movq %rcx, (%rsp)
leaq (%rdx,%rax,4), %rdx
jmp 0x2e46
movq 0x48(%r13), %rax
movq %rax, (%rsp)
movq 0x60(%r13), %rdx
jmp 0x2e46
movq 0x18(%r13), %rax
movq -0x8(%rax,%rsi,8), %rax
shlq $0x2, %rax
addq 0x48(%r13), %rax
movq %rax, (%rsp)
movl (%r13), %ecx
cmpq %rcx, %rsi
jae 0x3094
leal -0x1(%rsi), %eax
movq %rax, 0x18(%rsp)
xorl %r10d, %r10d
movq %rdx, 0x20(%rsp)
testq %rsi, %rsi
je 0x2e7b
movq 0x18(%r13), %rdx
movq (%rdx,%rsi,8), %rax
movq 0x18(%rsp), %r9
subq (%rdx,%r9,8), %rax
jmp 0x2e82
movq 0x18(%r13), %rax
movq (%rax), %rax
cmpl %eax, %r10d
jae 0x306b
movl %r10d, %eax
movq (%rsp), %rdx
movl (%rdx,%rax,4), %ebx
cmpl %ebx, %ecx
jbe 0x30ba
testq %rbx, %rbx
movl %r10d, 0x8(%rsp)
je 0x2ece
movq 0x60(%r13), %r9
leal -0x1(%rbx), %ecx
cmpq %r9, 0x68(%r13)
je 0x2ed8
movq 0x18(%r13), %rdx
movq (%rdx,%rcx,8), %rcx
leaq (,%rcx,4), %rdx
addq 0x48(%r13), %rdx
leaq (%r9,%rcx,4), %r9
jmp 0x2ee8
movq 0x48(%r13), %rdx
movq 0x60(%r13), %r9
jmp 0x2ee8
movq 0x18(%r13), %rdx
movq (%rdx,%rcx,8), %rdx
shlq $0x2, %rdx
addq 0x48(%r13), %rdx
cmpl %ebx, (%r13)
jbe 0x3094
movq 0x20(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
leal -0x1(%rbx), %eax
movq %rax, 0x40(%rsp)
movss %xmm0, 0xc(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
xorl %r15d, %r15d
movq %r9, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
testq %rbx, %rbx
je 0x2f39
movq 0x18(%r13), %rcx
movq (%rcx,%rbx,8), %rax
movq 0x40(%rsp), %r10
subq (%rcx,%r10,8), %rax
jmp 0x2f3f
movq 0x18(%r13), %rax
movl (%rax), %eax
movl %eax, %eax
cmpq %rax, %r15
jae 0x3054
movl (%rdx,%r15,4), %eax
cmpq %rax, %rsi
jne 0x3045
movss (%r9,%r15,4), %xmm1
movss 0xc(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jne 0x2f6e
jnp 0x3045
movl %r8d, 0x14(%rsp)
movq 0x9056(%rip), %rdi      # 0xbfd0
movq %rsi, %r12
movss %xmm1, 0x10(%rsp)
callq 0x2140
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5729(%rip), %rsi      # 0x86c3
callq 0x2230
movq %rbp, %rdi
movq %rbx, %r14
movq %rbx, %rsi
callq 0x2140
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5704(%rip), %rbx      # 0x86c3
movq %rbx, %rsi
callq 0x2230
movq %rbp, %rdi
movsd 0x38(%rsp), %xmm0
callq 0x2300
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2230
xorps %xmm0, %xmm0
cvtss2sd 0x10(%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 0x14(%rsp), %r8d
cmpl $0xa, %r8d
je 0x30b3
incl %r8d
movq %r12, %rsi
movq 0x30(%rsp), %r9
movq %r14, %rbx
movq 0x28(%rsp), %rdx
incq %r15
cmpl %ebx, (%r13)
ja 0x2f21
jmp 0x3094
movl 0x8(%rsp), %r10d
incl %r10d
movl (%r13), %ecx
cmpq %rcx, %rsi
jb 0x2e63
jmp 0x3094
incq %rsi
movl (%r13), %eax
cmpq %rax, %rsi
jb 0x2df5
testl %r8d, %r8d
sete %al
jmp 0x3085
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4fe0(%rip), %rdi      # 0x807b
leaq 0x4ff2(%rip), %rsi      # 0x8094
leaq 0x5059(%rip), %rcx      # 0x8102
movl $0x5a, %edx
callq 0x2130
xorl %edi, %edi
callq 0x2250
leaq 0x4fba(%rip), %rdi      # 0x807b
leaq 0x4fcc(%rip), %rsi      # 0x8094
leaq 0x4fd6(%rip), %rcx      # 0x80a5
movl $0x84, %edx
callq 0x2130
nop