// File: /workspace/github_c_makefile_star2_O1/ComplexNetworks-DCC-FCUP[P]gtrieScanner/GTrie.cpp
// Function: GTrieNode::showAsText(_IO_FILE*)
void GTrieNode::showAsText(FILE *f) {
  int i;
  for (i=0; i<depth; i++) fprintf(f,"   ");
  fprintf(f,"[");
  for (i=0; i<depth; i++) 
    fprintf(f,"%s", out[i]?"1":"0");
  fprintf(f,"][");
  for (i=0; i<depth; i++) 
    fprintf(f,"%s", in[i]?"1":"0");
  fprintf(f,"] ");

  if (cond_ok) fprintf(f,"{}");
  else {    
    list< list<iPair> >:: iterator jj;
    list<iPair>:: iterator kk;
    for (jj=cond.begin(); jj!=cond.end(); jj++) {
      fputc('|', f);
      for (kk=(*jj).begin(); kk!=(*jj).end(); kk++) {
	if (kk!=(*jj).begin()) fputc(' ', f);
	fprintf(f,"%d<%d", kk->first, kk->second);
      }
      fputc('|', f);
    }
  }

  fputc('+', f);

  if (cond_this_ok) fprintf(f,"{}");
  else {
    list< list<int> >:: iterator jjj;
    list<int>:: iterator kkk;
    for (jjj=this_node_cond.begin(); jjj!=this_node_cond.end(); jjj++) {
      fputc('|', f);
      if ((*jjj).size()==0) fprintf(f,"{}");
      else {
	for (kkk=(*jjj).begin(); kkk!=(*jjj).end(); kkk++) {
	  if (kkk!=(*jjj).begin()) fputc(',', f);
	  fprintf(f,"%d", *kkk);	
	}
	fprintf(f,"<%d", depth-1);
      }
      fputc('|', f);
    }
  }
      
  fputc(' ', f);
        
  fprintf(f,"%s\n", is_graph?"isGraph":"");

  list<GTrieNode *>::iterator ii;
  for(ii=child.begin(); ii!=child.end(); ii++)
    (*ii)->showAsText(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x4c(%rdi)
jle 0x83d7
xorl %ebp, %ebp
leaq 0xa0b1(%rip), %r15      # 0x1246b
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x23e0
incl %ebp
cmpl 0x4c(%r14), %ebp
jl 0x83ba
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x2280
cmpl $0x0, 0x4c(%r14)
jle 0x8421
xorl %r15d, %r15d
leaq 0x960f(%rip), %r12      # 0x11a04
leaq 0x9904(%rip), %r13      # 0x11d00
movq 0x60(%r14), %rax
cmpb $0x0, (%rax,%r15)
movq %r12, %rdi
jne 0x840d
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2220
incq %r15
movslq 0x4c(%r14), %rax
cmpq %rax, %r15
jl 0x83fc
leaq 0x98da(%rip), %rdi      # 0x11d02
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23e0
cmpl $0x0, 0x4c(%r14)
jle 0x8477
leaq 0x95bc(%rip), %r15      # 0x11a04
leaq 0x98b1(%rip), %r12      # 0x11d00
xorl %r13d, %r13d
movq 0x58(%r14), %rax
cmpb $0x0, (%rax,%r13)
movq %r15, %rdi
jne 0x8463
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2220
incq %r13
movslq 0x4c(%r14), %rax
cmpq %rax, %r13
jl 0x8452
leaq 0x9887(%rip), %rdi      # 0x11d05
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23e0
cmpb $0x1, 0x48(%r14)
jne 0x84b2
leaq 0x986a(%rip), %rdi      # 0x11d08
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23e0
jmp 0x852b
leaq 0x18(%r14), %rax
movq 0x18(%r14), %r13
movq %rax, (%rsp)
cmpq %rax, %r13
je 0x852b
leaq 0x9841(%rip), %r15      # 0x11d0b
movl $0x7c, %edi
movq %rbx, %rsi
callq 0x2280
leaq 0x10(%r13), %rbp
movq 0x10(%r13), %r12
cmpq %rbp, %r12
je 0x8514
cmpq (%rbp), %r12
je 0x84f7
movl $0x20, %edi
movq %rbx, %rsi
callq 0x2280
movl 0x10(%r12), %edx
movl 0x14(%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d0
movq (%r12), %r12
jmp 0x84df
movl $0x7c, %edi
movq %rbx, %rsi
callq 0x2280
movq (%r13), %r13
cmpq (%rsp), %r13
jne 0x84ca
movl $0x2b, %edi
movq %rbx, %rsi
callq 0x2280
cmpb $0x0, 0x49(%r14)
je 0x855d
leaq 0x97c2(%rip), %rdi      # 0x11d08
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23e0
jmp 0x8606
movq (%r14), %rbp
cmpq %r14, %rbp
je 0x8606
leaq 0x968a(%rip), %r13      # 0x11bfa
movl $0x7c, %edi
movq %rbx, %rsi
callq 0x2280
cmpq $0x0, 0x20(%rbp)
je 0x85d3
leaq 0x10(%rbp), %r15
movq (%r15), %r12
cmpq %r15, %r12
je 0x85ba
cmpq (%r15), %r12
je 0x85a2
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x2280
movl 0x10(%r12), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x22d0
movq (%r12), %r12
jmp 0x858b
movl 0x4c(%r14), %edx
decl %edx
movq %rbx, %rdi
leaq 0x9743(%rip), %rsi      # 0x11d0d
xorl %eax, %eax
callq 0x22d0
jmp 0x85ec
movl $0x2, %esi
movl $0x1, %edx
leaq 0x9724(%rip), %rdi      # 0x11d08
movq %rbx, %rcx
callq 0x23e0
movl $0x7c, %edi
movq %rbx, %rsi
callq 0x2280
movq (%rbp), %rbp
cmpq %r14, %rbp
jne 0x8570
movl $0x20, %edi
movq %rbx, %rsi
callq 0x2280
leaq 0x96f7(%rip), %rax      # 0x11d11
leaq 0x8a87(%rip), %rdx      # 0x110a8
cmpb $0x0, 0x50(%r14)
cmovneq %rax, %rdx
leaq 0x9eac(%rip), %rsi      # 0x124dd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22d0
movq 0x30(%r14), %r15
addq $0x30, %r14
cmpq %r14, %r15
je 0x8659
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x839a
movq (%r15), %r15
jmp 0x8643
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq