// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/Conditions.cpp
// Function: Conditions::findAutomorphisms(Graph*, std::vector<char*, std::allocator<char*>>*)
void Conditions::findAutomorphisms(Graph *G, VVsmallNode *vv) {
  int i,j,k;
  int g;

  _subgraph_size = G->numNodes();
  GMap *f = new GMap(_subgraph_size, _subgraph_size);

  int sequence[_subgraph_size][_subgraph_size];

  for (i=0; i<_subgraph_size; i++)
    for (j=0; j<_subgraph_size; j++)
      if (G->isConnected(i,j))
	sequence[i][j] = G->numNeighbours(j);
      else
	sequence[i][j] = 0;

  for (i=0; i<_subgraph_size; i++)
    qsort(sequence[i], _subgraph_size, sizeof(int), int_compare);

  bool support[_subgraph_size*_subgraph_size];
  for (i=0; i<_subgraph_size; i++)
    for (j=0; j<_subgraph_size; j++) {
      for (k=0; k<_subgraph_size; k++)
	if (sequence[i][k] != sequence[j][k]) break;      
      if (k<_subgraph_size) support[i*_subgraph_size+j]=false;
      else support[i*_subgraph_size+j]=true;
    }

  vv->clear();
  fastf  = f;
  fastg  = G;
  fastvv = vv;
  fasts  = support;
  adj = G->adjacencyMatrix();
  for (g=0; g<_subgraph_size; g++)
    if (support[g*_subgraph_size]) {
      f->add(0,g);
      pos = 1;
      isomorphicExtensions();
      f->remove(0);
    }

  delete f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movl %eax, 0x2151e(%rip)     # 0x2d264
movl $0x18, %edi
callq 0x3270
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movl 0x21504(%rip), %edx     # 0x2d264
movl %edx, %esi
callq 0xbbe0
jmp 0xbd69
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movl 0x214ed(%rip), %eax     # 0x2d264
movl %eax, %ecx
movq %rcx, %rax
movq %rax, -0x70(%rbp)
movq %rsp, %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, %rdx
imulq %rdx, %rdx
leaq 0xf(,%rdx,4), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x68(%rbp)
movq %rdx, %rsp
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x214a5(%rip), %eax     # 0x2d264
jge 0xbe81
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x2148f(%rip), %eax     # 0x2d264
jge 0xbe71
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq (%rdi), %rax
callq *0x58(%rax)
testb $0x1, %al
jne 0xbdf1
jmp 0xbe3f
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq (%rdi), %rax
callq *0x70(%rax)
movq -0x70(%rbp), %rsi
movl %eax, %edx
movq -0x68(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq %rsi, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0xbe61
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x18, %esi
callq 0x3280
jmp 0xc0a8
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rdx
movslq -0x14(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0xbe63
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xbdcc
jmp 0xbe73
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbdb6
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x213d3(%rip), %eax     # 0x2d264
jge 0xbecd
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movslq 0x213b3(%rip), %rsi     # 0x2d264
movl $0x4, %edx
leaq -0x2fd(%rip), %rcx      # 0xbbc0
callq 0x34b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbe88
movl 0x21391(%rip), %ecx     # 0x2d264
imull %ecx, %ecx
movl %ecx, %eax
addl $0xf, %ecx
andl $-0x10, %ecx
movl %ecx, %edx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x78(%rbp)
movq %rcx, %rsp
movq %rax, -0x58(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x21363(%rip), %eax     # 0x2d264
jge 0xbfd4
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x2134d(%rip), %eax     # 0x2d264
jge 0xbfc4
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x21337(%rip), %eax     # 0x2d264
jge 0xbf77
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rsi
movslq -0x14(%rbp), %rdx
imulq %rsi, %rdx
shlq $0x2, %rdx
movq %rcx, %rax
addq %rdx, %rax
movslq -0x1c(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movslq -0x18(%rbp), %rdx
imulq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0x1c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0xbf6a
jmp 0xbf77
jmp 0xbf6c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xbf24
movl -0x1c(%rbp), %eax
cmpl 0x212e4(%rip), %eax     # 0x2d264
jge 0xbf9c
movq -0x78(%rbp), %rax
movl -0x14(%rbp), %ecx
imull 0x212d4(%rip), %ecx     # 0x2d264
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0xbfb4
movq -0x78(%rbp), %rax
movl -0x14(%rbp), %ecx
imull 0x212ba(%rip), %ecx     # 0x2d264
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
jmp 0xbfb6
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xbf0e
jmp 0xbfc6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbef8
movq -0x10(%rbp), %rdi
callq 0xc8b0
movq -0x78(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x21284(%rip)     # 0x2d270
movq -0x8(%rbp), %rcx
movq %rcx, 0x21281(%rip)     # 0x2d278
movq -0x10(%rbp), %rcx
movq %rcx, 0x2127e(%rip)     # 0x2d280
movq %rax, 0x2127f(%rip)     # 0x2d288
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, 0x21277(%rip)     # 0x2d290
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x2123b(%rip), %eax     # 0x2d264
jge 0xc077
movq -0x78(%rbp), %rax
movl -0x20(%rbp), %ecx
imull 0x2122b(%rip), %ecx     # 0x2d264
movslq %ecx, %rcx
testb $0x1, (%rax,%rcx)
je 0xc06a
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %edx
xorl %esi, %esi
callq 0xc8d0
movl $0x1, 0x2120e(%rip)     # 0x2d268
callq 0xc0c0
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xc900
jmp 0xc06c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xc020
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0xc09c
movq -0x80(%rbp), %rdi
callq 0xbcd0
movq -0x80(%rbp), %rdi
movl $0x18, %esi
callq 0x3280
movq -0x40(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)