// File: /workspace/github_c_makefile_star2_O1/ComplexNetworks-DCC-FCUP[P]gtrieScanner/GTrie.cpp
// Function: GTrieNode::goCondUndir()
void GTrieNode::goCondUndir() {  
  int i, j, ci, mylim, glaux;
  int ncand;
  int *p;

  mylim = INT_MAX;
  if (!cond_ok) {
    i = 1;
    list< list<iPair> >::const_iterator jj, jjend;
    list<iPair>::const_iterator kk, kkend;
    for (jj=cond.begin(), jjend=cond.end(); jj!=jjend; ++jj) {
      glaux = -1;
      for (kk=(*jj).begin(), kkend=(*jj).end(); kk!=kkend; ++kk)
	if (kk->second<glk && mymap[kk->first] > mymap[kk->second])
	  break;
	else if (kk->second==glk && mymap[kk->first]>glaux)
	  glaux = mymap[kk->first];
      if (kk==kkend) {
	i = 0;
	if (glaux < mylim) mylim=glaux;
      }
    }
    if (i) return;
  }
  if (mylim == INT_MAX) mylim = 0;
    
  ncand=0;
  j=ci=INT_MAX;
  for (i=0; i<nconn; i++) {
    glaux = numnei[mymap[conn[i]]];
    if (glaux<j) {
      ci = mymap[conn[i]];
      j = glaux;
    }
  }

  glaux = j;
  ncand = ci;
  for (p=&fastnei[ncand][j-1], ci= glaux-1; ci>=0; ci--, p--) {    
    i = *p;
    if (i<mylim) break;
    if (used[i]) continue;
    mymap[glk] = i;
    
    bool *b = &adjM[i][0];
    for (j=0; j<glk; j++)
      if (out[j] != *(b+mymap[j]))
	break;
    if (j<glk) continue;
    
    if (is_graph) {
      frequency++;
      if (Global::show_occ) {
	for (int k = 0; k<=glk; k++)
	  for (int l = 0; l<=glk; l++)
	    fputc(adjM[mymap[k]][mymap[l]]?'1':'0', Global::occ_file);
	fputc(':', Global::occ_file);
	for (int k = 0; k<=glk; k++)
	  fprintf(Global::occ_file, " %d", mymap[k]+1);
	fputc('\n', Global::occ_file);
      }
    }

    used[i]=true;
    glk++;
    list<GTrieNode *>::const_iterator ii, iiend;
    for(ii=child.begin(), iiend = child.end(); ii!=iiend; ++ii)
      (*ii)->goCondUndir();
    glk--;
    used[i]=false;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
cmpb $0x0, 0x48(%rdi)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %rdi, 0x8(%rsp)
jne 0x908c
leaq 0x18(%rdi), %rdx
movq 0x18(%rdi), %rsi
xorl %eax, %eax
cmpq %rdx, %rsi
je 0x9084
movl 0x18b59(%rip), %edi     # 0x21b68
movl $0x1, %r8d
movq 0x18b24(%rip), %r9      # 0x21b40
movl %ecx, %r10d
leaq 0x10(%rsi), %r11
movq 0x10(%rsi), %rbx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %r11, %rbx
je 0x905f
movslq 0x14(%rbx), %r14
cmpl %edi, %r14d
jge 0x9048
movslq 0x10(%rbx), %r12
movl (%r9,%r12,4), %ebp
cmpl (%r9,%r14,4), %ebp
jg 0x905f
cmpl %edi, %r14d
jne 0x905a
movslq 0x10(%rbx), %r14
movl (%r9,%r14,4), %ebp
cmpl %ecx, %ebp
cmovgl %ebp, %ecx
movq (%rbx), %rbx
jmp 0x902c
cmpl %r10d, %ecx
cmovgel %r10d, %ecx
cmpq %r11, %rbx
cmovnel %r10d, %ecx
cmovel %eax, %r8d
movq (%rsi), %rsi
cmpq %rdx, %rsi
jne 0x901c
testl %r8d, %r8d
sete %al
movq 0x8(%rsp), %rdi
testb %al, %al
je 0x92ea
xorl %ebp, %ebp
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmovnel %ecx, %ebp
movslq 0x74(%rdi), %rax
testq %rax, %rax
jle 0x90e5
movq 0x18ab9(%rip), %rcx     # 0x21b60
movq 0x18a92(%rip), %rdx     # 0x21b40
movq 0x78(%rdi), %rsi
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r11d, %r11d
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movslq (%rsi,%r11,4), %r9
movslq (%rdx,%r9,4), %r9
movl (%rcx,%r9,4), %r10d
cmpl %r15d, %r10d
cmovll %r9d, %r8d
cmovll %r10d, %r15d
incq %r11
cmpq %r11, %rax
jne 0x90c1
movslq %r8d, %rax
jmp 0x90ea
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
testl %r15d, %r15d
jle 0x92ea
movq 0x18a5e(%rip), %rcx     # 0x21b58
movq (%rcx,%rax,8), %rax
movslq %r15d, %rcx
decl %r15d
leaq (%rax,%rcx,4), %r12
addq $-0x4, %r12
leaq 0x30(%rdi), %r13
leaq 0x209d1(%rip), %rbx     # 0x29ae8
movl %ebp, 0x4(%rsp)
movl (%r12), %ecx
cmpl %ebp, %ecx
jl 0x92ea
movslq %ecx, %r14
movq 0x18a17(%rip), %rax     # 0x21b48
cmpb $0x0, (%rax,%r14)
jne 0x92d6
movq 0x189fd(%rip), %rax     # 0x21b40
movslq 0x18a1e(%rip), %rdx     # 0x21b68
movl %ecx, (%rax,%rdx,4)
movslq 0x18a14(%rip), %rcx     # 0x21b68
testq %rcx, %rcx
setg %r10b
jle 0x91a7
movq 0x189ec(%rip), %rdx     # 0x21b50
movq (%rdx,%r14,8), %rdx
movq 0x60(%rdi), %rsi
movb (%rsi), %r8b
movslq (%rax), %r9
cmpb (%rdx,%r9), %r8b
jne 0x919e
leaq -0x1(%rcx), %r11
xorl %r8d, %r8d
cmpq %r8, %r11
je 0x91a7
movb 0x1(%rsi,%r8), %r9b
movslq 0x4(%rax,%r8,4), %r10
incq %r8
cmpb (%rdx,%r10), %r9b
je 0x917f
cmpq %rcx, %r8
setb %r10b
testb %r10b, %r10b
jne 0x92d6
cmpb $0x1, 0x50(%rdi)
jne 0x9290
incl 0x54(%rdi)
leaq 0x20926(%rip), %rax     # 0x29ae1
cmpb $0x1, (%rax)
jne 0x9290
movq %r14, 0x10(%rsp)
cmpl $0x0, 0x18998(%rip)     # 0x21b68
js 0x9230
xorl %ebp, %ebp
cmpl $0x0, 0x1898d(%rip)     # 0x21b68
js 0x921d
movq $-0x1, %r14
movq 0x18965(%rip), %rax     # 0x21b50
movq 0x1894e(%rip), %rcx     # 0x21b40
movslq (%rcx,%rbp,4), %rdx
movq (%rax,%rdx,8), %rax
movslq 0x4(%rcx,%r14,4), %rcx
movzbl (%rax,%rcx), %edi
orl $0x30, %edi
movq (%rbx), %rsi
callq 0x2280
movslq 0x18953(%rip), %rax     # 0x21b68
incq %r14
cmpq %rax, %r14
jl 0x91e4
leaq 0x1(%rbp), %rax
movslq 0x18940(%rip), %rcx     # 0x21b68
cmpq %rcx, %rbp
movq %rax, %rbp
jl 0x91d4
movq (%rbx), %rsi
movl $0x3a, %edi
callq 0x2280
cmpl $0x0, 0x18924(%rip)     # 0x21b68
leaq 0x89ae(%rip), %rbp      # 0x11bf9
js 0x927e
movq $-0x1, %r14
movq (%rbx), %rdi
movq 0x188e2(%rip), %rax     # 0x21b40
movl 0x4(%rax,%r14,4), %edx
incl %edx
movq %rbp, %rsi
xorl %eax, %eax
callq 0x22d0
movslq 0x188f2(%rip), %rax     # 0x21b68
incq %r14
cmpq %rax, %r14
jl 0x9254
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x2280
movq 0x10(%rsp), %r14
movq 0x188b1(%rip), %rax     # 0x21b48
movq %r14, %rbp
movb $0x1, (%rax,%r14)
incl 0x188c3(%rip)           # 0x21b68
movq (%r13), %r14
cmpq %r13, %r14
je 0x92bc
movq 0x10(%r14), %rdi
callq 0x8fd2
movq (%r14), %r14
jmp 0x92a9
decl 0x188a6(%rip)           # 0x21b68
movq 0x1887f(%rip), %rax     # 0x21b48
movb $0x0, (%rax,%rbp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %ebp
leal -0x1(%r15), %eax
addq $-0x4, %r12
testl %r15d, %r15d
movl %eax, %r15d
jg 0x911b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop