// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/Esu.cpp
// Function: Esu::_go(int, int, int, int*)
void Esu::_go(int n, int size, int next, int *ext) {
  _current[size++] = n;

  if (size==_motif_size) {
    char s[_motif_size*_motif_size+1];
    Isomorphism::canonicalStrNauty(_g, _current, s);
    _sg->incrementString(s);

    if (Global::show_occ) {
      fprintf(Global::occ_file, "%s:", s);
      for (int i=0; i<size; i++)
	fprintf(Global::occ_file, " %d", _current[i]+1);
      fputc('\n', Global::occ_file);
    }

  } else {
    int i,j;
    int next2 = next;
    int ext2[_graph_size];

    for (i=0;i<next;i++) ext2[i] = ext[i];

    int *v  = _g->arrayNeighbours(_current[size-1]);
    int num = _g->numNeighbours(_current[size-1]);


    for (i=0;i<num;i++) {
      if (v[i]<=_current[0]) continue;
      for (j=0;j+1<size;j++)
	if (_g->isConnected(v[i],_current[j])) break;
      if (j+1==size) ext2[next2++]=v[i];      
    }

    while (next2>0) {      
      next2--;
      _go(ext2[next2], size, next2, ext2);
    }
  }
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movl -0x4(%rbp), %edx
movq 0x21dc9(%rip), %rax     # 0x2d238
movl -0x8(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x8(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
cmpl 0x21da3(%rip), %eax     # 0x2d22c
jne 0xb568
movl 0x21d97(%rip), %ecx     # 0x2d22c
imull %ecx, %ecx
movl %ecx, %eax
incl %eax
movq %rsp, %rdx
movq %rdx, -0x20(%rbp)
addl $0x10, %ecx
andl $-0x10, %ecx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x60(%rbp)
movq %rdx, %rsp
movq %rax, -0x28(%rbp)
movq 0x21d87(%rip), %rdi     # 0x2d248
movq 0x21d70(%rip), %rsi     # 0x2d238
callq 0xda80
movq -0x60(%rbp), %rsi
movq 0x21d80(%rip), %rdi     # 0x2d258
callq 0x19d30
leaq 0x3208d(%rip), %rax     # 0x3d571
testb $0x1, (%rax)
je 0xb55c
movq -0x60(%rbp), %rdx
leaq 0x32084(%rip), %rax     # 0x3d578
movq (%rax), %rdi
leaq 0x15682(%rip), %rsi     # 0x20b80
movb $0x0, %al
callq 0x33a0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xb548
leaq 0x3205d(%rip), %rax     # 0x3d578
movq (%rax), %rdi
movq 0x21d13(%rip), %rax     # 0x2d238
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x15611(%rip), %rsi     # 0x20b47
movb $0x0, %al
callq 0x33a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb50c
leaq 0x32029(%rip), %rax     # 0x3d578
movq (%rax), %rsi
movl $0xa, %edi
callq 0x3350
movq -0x20(%rbp), %rax
movq %rax, %rsp
jmp 0xb6f5
movl -0xc(%rbp), %eax
movl %eax, -0x38(%rbp)
movl 0x21cbc(%rip), %eax     # 0x2d230
movq %rsp, %rcx
movq %rcx, -0x40(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x68(%rbp)
movq %rcx, %rsp
movq %rax, -0x48(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xb5c8
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xb59f
movq 0x21c79(%rip), %rdi     # 0x2d248
movq 0x21c62(%rip), %rax     # 0x2d238
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, -0x50(%rbp)
movq 0x21c52(%rip), %rdi     # 0x2d248
movq 0x21c3b(%rip), %rax     # 0x2d238
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
movq (%rdi), %rax
callq *0x70(%rax)
movl %eax, -0x54(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0xb6c5
movq -0x50(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x21c01(%rip), %rcx     # 0x2d238
cmpl (%rcx), %eax
jg 0xb63d
jmp 0xb6b7
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0xb68a
movq 0x21bf2(%rip), %rdi     # 0x2d248
movq -0x50(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq 0x21bd0(%rip), %rax     # 0x2d238
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq (%rdi), %rax
callq *0x58(%rax)
testb $0x1, %al
jne 0xb67b
jmp 0xb67d
jmp 0xb68a
jmp 0xb67f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb644
movl -0x34(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jne 0xb6b5
movq -0x68(%rbp), %rax
movq -0x50(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0xb6b7
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xb619
jmp 0xb6c7
cmpl $0x0, -0x38(%rbp)
jle 0xb6ee
movq -0x68(%rbp), %rcx
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movslq -0x38(%rbp), %rax
movl (%rcx,%rax,4), %edi
movl -0x8(%rbp), %esi
movl -0x38(%rbp), %edx
callq 0xb450
jmp 0xb6c7
movq -0x40(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)