// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/Conditions.cpp
// Function: Conditions::symmetryConditions(Graph*, std::__cxx11::list<std::pair<int, int>, std::allocator<std::pair<int, int>>>*)
void Conditions::symmetryConditions(Graph *g, list<iPair> *cond) {
  int i, j, k, vvsize, size = g->numNodes();
  iPair p;
  VVsmallNode vv;

  cond->clear();
  findAutomorphisms(g, &vv);

  vvsize = vv.size();
  bool broken[vvsize];
  for (i=0; i<vvsize; i++) broken[i]=false;
  
  for (i=0; i<size; i++) {
    vvsize = vv.size();
    for (j=0; j<vvsize; j++)
      if (!broken[j] && vv[j][i] != i) 
	break;
      
      // There are still nodes not fixed
      if (j<vvsize)
	for (k=i+1; k<size; k++) 
	  for (j=0; j<int(vv.size()); j++)
	    if (!broken[j] && vv[j][i] == k) {
	      p.first  = i;
	      p.second = k;
	      //printf("%d < %d\n", p.first, p.second);
	      cond->push_back(p);
	      break;
	    }
      
      // Reduce set of automorphisms to set that fix 'i'
      for (j=0; j<vvsize; j++)	
	if (vv[j][i] != i)
	  broken[j]=true;
  }

  for (j=0; j<vvsize; j++)
    delete [] vv[j];
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movl %eax, -0x24(%rbp)
leaq -0x2c(%rbp), %rdi
callq 0xc9d0
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xc9f0
movq -0x10(%rbp), %rdi
callq 0xca10
movq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0xbd20
jmp 0xc671
leaq -0x48(%rbp), %rdi
callq 0xca40
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x60(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x78(%rbp)
movq %rcx, %rsp
movq %rax, -0x68(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc6e3
movq -0x78(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xc6aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xcac0
jmp 0xc8a2
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xc848
leaq -0x48(%rbp), %rdi
callq 0xca40
movl %eax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc74b
movq -0x78(%rbp), %rax
movslq -0x18(%rbp), %rcx
testb $0x1, (%rax,%rcx)
jne 0xc73e
movslq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xca60
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl -0x14(%rbp), %eax
je 0xc73e
jmp 0xc74b
jmp 0xc740
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xc709
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc7f3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xc7f1
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x7c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xca40
movq %rax, %rcx
movl -0x7c(%rbp), %eax
cmpl %ecx, %eax
jge 0xc7e1
movq -0x78(%rbp), %rax
movslq -0x18(%rbp), %rcx
testb $0x1, (%rax,%rcx)
jne 0xc7d4
movslq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xca60
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl -0x1c(%rbp), %eax
jne 0xc7d4
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xca80
jmp 0xc7d2
jmp 0xc7e1
jmp 0xc7d6
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xc773
jmp 0xc7e3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc760
jmp 0xc7f3
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc838
movslq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xca60
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl -0x14(%rbp), %eax
je 0xc82b
movq -0x78(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0xc82d
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xc7fa
jmp 0xc83a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xc6ea
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc88d
movslq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xca60
movq (%rax), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0xc880
movq -0x88(%rbp), %rdi
callq 0x3360
jmp 0xc882
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xc84f
movq -0x60(%rbp), %rax
movq %rax, %rsp
leaq -0x48(%rbp), %rdi
callq 0xcac0
movq %rbp, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3440
nopl (%rax,%rax)