// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/GTrie.cpp
// Function: GTrieNode::insertCond(Graph*, std::__cxx11::list<std::pair<int, int>, std::allocator<std::pair<int, int>>>*)
void GTrieNode::insertCond(Graph *g, list<iPair> *cond) {
  int i;
  GTrieNode *gt;

  if (g->numNodes() == depth) {
    is_graph = true;
  } else {
    list<GTrieNode *>::iterator ii;
    for(ii=child.begin(); ii!=child.end(); ii++) {
      for (i=0; i<=depth; i++)
	if (g->hasEdge(depth, i) != (*ii)->out[i] ||
	    g->hasEdge(i, depth) != (*ii)->in[i])
	  break;
      if (i>depth) break;
    }
    if (ii==child.end()) {
      gt = new GTrieNode(depth+1);
      for (i=0; i<=depth; i++) {
      	gt->out[i] = g->hasEdge(depth, i);	
      	gt->in[i]  = g->hasEdge(i, depth);
	if (g->isConnected(depth, i)) 
	  gt->conn[(gt->nconn)++] = i;
	if (gt->in[i])  { (gt->total_in)++;  (gt->total_edges)++;}
	if (gt->out[i]) { (gt->total_out)++; (gt->total_edges)++;}
      }
      child.push_back(gt);
    } else {
      gt = (*ii);
    }

    gt->insertConditionsFiltered(cond);
    gt->insertCond(g, cond);

  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq -0x68(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
jne 0x109ff
movq -0x68(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x10cdf
leaq -0x30(%rbp), %rdi
callq 0x15390
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
callq 0x153b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
callq 0x15410
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x153e0
testb $0x1, %al
jne 0x10a48
jmp 0x10b1b
movl $0x0, -0x1c(%rbp)
movq -0x68(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4c(%rcx), %eax
jg 0x10af7
movq -0x68(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl -0x1c(%rbp), %edx
movq (%rdi), %rax
callq *0x50(%rax)
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15440
movq %rax, %rcx
movl -0x6c(%rbp), %eax
movq (%rcx), %rcx
movq 0x60(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movb (%rcx,%rdx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x10ae5
movq -0x68(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl 0x4c(%rax), %edx
movq (%rdi), %rax
callq *0x50(%rax)
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15440
movq %rax, %rcx
movl -0x70(%rbp), %eax
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movb (%rcx,%rdx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x10ae7
jmp 0x10af7
jmp 0x10ae9
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x10a4f
movq -0x68(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4c(%rcx), %eax
jle 0x10b05
jmp 0x10b1b
jmp 0x10b07
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x15460
movq %rax, -0x48(%rbp)
jmp 0x10a21
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
callq 0x15410
movq %rax, -0x50(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x15870
testb $0x1, %al
jne 0x10b42
jmp 0x10cb1
movl $0x80, %edi
callq 0x3270
movq %rax, %rdi
movq -0x68(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x78(%rbp)
movl 0x4c(%rax), %esi
incl %esi
callq 0xfc80
jmp 0x10b66
movq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x68(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4c(%rcx), %eax
jg 0x10c9e
movq -0x68(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl -0x1c(%rbp), %edx
movq (%rdi), %rax
callq *0x50(%rax)
movb %al, %sil
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x60(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
andb $0x1, %sil
movb %sil, (%rcx,%rdx)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl 0x4c(%rax), %edx
movq (%rdi), %rax
callq *0x50(%rax)
movb %al, %sil
movq -0x68(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
andb $0x1, %sil
movb %sil, (%rcx,%rdx)
movq -0x10(%rbp), %rdi
movl 0x4c(%rax), %esi
movl -0x1c(%rbp), %edx
movq (%rdi), %rax
callq *0x58(%rax)
testb $0x1, %al
jne 0x10bf5
jmp 0x10c36
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x28(%rbp), %rsi
movl 0x74(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x74(%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x10c36
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0x80, %esi
callq 0x3280
jmp 0x10ce8
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x1c(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x10c62
movq -0x28(%rbp), %rax
movl 0x68(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x28(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x1c(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x10c8e
movq -0x28(%rbp), %rax
movl 0x6c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x6c(%rax)
movq -0x28(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
jmp 0x10c90
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x10b75
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
leaq -0x28(%rbp), %rsi
callq 0x158a0
jmp 0x10cc1
leaq -0x30(%rbp), %rdi
callq 0x15440
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10d00
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x109c0
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)