// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]fase/FaseMain.cpp
// Function: output(Fase*)
void output(Fase* fase)
{
  printf("Finished Calculating\n");
  FILE *f = outFile;
  fprintf(f, "\tOutput:\n");
  fprintf(f, "Network: %s\n", ifilename);
  fprintf(f, "Directed: %s\n", dir ? "Yes" : "No");
  fprintf(f, "Nodes: %d\n", G->numNodes());
  fprintf(f, "Edges: %d\n", G->numEdges() / (dir ? 1 : 2));
  fprintf(f, "Subgraph Size: %d\n", K);
  if (largeScale)
    fprintf(f, "Graph Representation: Large Scale\n");
  else
    fprintf(f, "Graph Representation: Adjacency Matrix\n");

  t_end = time(0);
  struct tm *tm_start = localtime(&t_start);
  fprintf(f, "Start of Computation: %02dh%02dm%02ds %02d/%02d/%02d\n\
", tm_start->tm_hour, tm_start->tm_min, tm_start->tm_sec, tm_start->tm_mday, tm_start->tm_mon + 1, 1900 + tm_start->tm_year);
  struct tm *tm_end   = localtime(&t_end);
  fprintf(f, "End of Computation: %02dh%02dm%02ds %02d/%02d/%02d\n", tm_end->tm_hour, tm_end->tm_min, tm_end->tm_sec, tm_end->tm_mday, tm_end->tm_mon + 1, 1900 + tm_end->tm_year);
  
  fprintf(f, "\n\n\tResults:\n");
  fprintf(f, "Subgraph Occurrences: %lld\n", (long long int)(fase->getMotifCount() / prob));
  fprintf(f, "Subgraph Types: %d\n", fase->getTypes());
  fprintf(f, "Computation Time (ms): %0.4lf\n", Timer::elapsed());
  
  if (fabs(prob - 1.0) <= 10e-7)
    fprintf(f, "\nExact Enumeration, no Sampling done\n");
  else
  {
    fprintf(f, "\n\tSampling Information:\n");
    fprintf(f, "Percentage of Sampled Subgraphs: %0.2lf\%\n", 100 * prob);
    fprintf(f, "Percentage by depth:\n");
    int i;
    for (i = 0; i < K; i++)
      fprintf(f, "P[%d]: %0.3lf\%\n", i, 100 * sampProb[i]);
  }
    
  if (detailed)
  {
    fprintf(f, "\n\tDetailed Output:\n");
    for (auto element : fase->subgraphCount())
      if (samp && fabs(prob) > 10e-7)
        fprintf(f, "%s: %d occurrences\n", element.second.c_str(), (int)(element.first / prob));
      else
        fprintf(f, "%s: %d occurrences\n", element.second.c_str(), element.first);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x172c(%rip), %rdi      # 0x198d2
movb $0x0, %al
callq 0x3050
movq 0xb0b4(%rip), %rax      # 0x23268
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1725(%rip), %rsi      # 0x198e8
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rdi
leaq 0x171d(%rip), %rsi      # 0x198f2
leaq 0xaef4(%rip), %rdx      # 0x230d0
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rdi
movb 0xaedb(%rip), %cl       # 0x230c8
leaq 0x171d(%rip), %rdx      # 0x19911
leaq 0x1712(%rip), %rax      # 0x1990d
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x16f6(%rip), %rsi      # 0x198ff
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq 0xade6(%rip), %rdi      # 0x23008
movq (%rdi), %rax
callq *0x38(%rax)
movq -0xa0(%rbp), %rdi
movl %eax, %edx
leaq 0x16dc(%rip), %rsi      # 0x19914
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0xadb7(%rip), %rdi      # 0x23008
movq (%rdi), %rax
callq *0x40(%rax)
movq -0x98(%rbp), %rdi
movb 0xae63(%rip), %sil      # 0x230c8
movl $0x2, %ecx
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
cltd
idivl %ecx
movl %eax, %edx
leaq 0x169d(%rip), %rsi      # 0x1991f
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rdi
movl 0xad7d(%rip), %edx      # 0x23010
leaq 0x1690(%rip), %rsi      # 0x1992a
movb $0x0, %al
callq 0x3310
testb $0x1, 0xae24(%rip)      # 0x230cc
je 0x182be
movq -0x10(%rbp), %rdi
leaq 0x1688(%rip), %rsi      # 0x1993d
movb $0x0, %al
callq 0x3310
jmp 0x182d0
movq -0x10(%rbp), %rdi
leaq 0x1697(%rip), %rsi      # 0x19960
movb $0x0, %al
callq 0x3310
xorl %eax, %eax
movl %eax, %edi
callq 0x31d0
movq %rax, 0xaf98(%rip)      # 0x23278
leaq 0xaf89(%rip), %rdi      # 0x23270
callq 0x3170
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl (%rax), %r8d
movq -0x18(%rbp), %rax
movl 0xc(%rax), %r9d
movq -0x18(%rbp), %rax
movl 0x10(%rax), %r10d
addl $0x1, %r10d
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
leaq 0x1658(%rip), %rsi      # 0x19988
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3310
leaq 0xaf32(%rip), %rdi      # 0x23278
callq 0x3170
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl (%rax), %r8d
movq -0x20(%rbp), %rax
movl 0xc(%rax), %r9d
movq -0x20(%rbp), %rax
movl 0x10(%rax), %r10d
addl $0x1, %r10d
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
leaq 0x162f(%rip), %rsi      # 0x199be
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rdi
leaq 0x1649(%rip), %rsi      # 0x199f2
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18810
movq -0xb8(%rbp), %rdi
cvtsi2sd %eax, %xmm0
divsd 0xace9(%rip), %xmm0     # 0x230c0
cvttsd2si %xmm0, %rdx
leaq 0x161c(%rip), %rsi      # 0x199ff
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4280
movq -0xb0(%rbp), %rdi
movl %eax, %edx
leaq 0x160d(%rip), %rsi      # 0x19a1b
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
callq 0xa230
movq -0xa8(%rbp), %rdi
leaq 0x15fc(%rip), %rsi      # 0x19a2f
movb $0x1, %al
callq 0x3310
movsd 0xac7e(%rip), %xmm1     # 0x230c0
movsd 0xc4e(%rip), %xmm0      # 0x19098
subsd %xmm0, %xmm1
movaps 0xebb(%rip), %xmm0      # 0x19310
pand %xmm0, %xmm1
movsd 0xe9f(%rip), %xmm0      # 0x19300
ucomisd %xmm1, %xmm0
jb 0x1847e
movq -0x10(%rbp), %rdi
leaq 0x15dc(%rip), %rsi      # 0x19a4e
movb $0x0, %al
callq 0x3310
jmp 0x18510
movq -0x10(%rbp), %rdi
leaq 0x15eb(%rip), %rsi      # 0x19a74
movb $0x0, %al
callq 0x3310
movq -0x10(%rbp), %rdi
movsd 0xe6c(%rip), %xmm0      # 0x19308
mulsd 0xac1c(%rip), %xmm0     # 0x230c0
leaq 0x15e2(%rip), %rsi      # 0x19a8d
movb $0x1, %al
callq 0x3310
movq -0x10(%rbp), %rdi
leaq 0x15fa(%rip), %rsi      # 0x19ab7
movb $0x0, %al
callq 0x3310
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl 0xab3c(%rip), %eax      # 0x23010
jge 0x1850e
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %edx
movslq -0x24(%rbp), %rcx
movsd 0xe1f(%rip), %xmm0      # 0x19308
leaq 0xab30(%rip), %rax      # 0x23020
mulsd (%rax,%rcx,8), %xmm0
leaq 0x15d1(%rip), %rsi      # 0x19acd
movb $0x1, %al
callq 0x3310
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x184cb
jmp 0x18510
testb $0x1, 0xabb2(%rip)      # 0x230c9
je 0x1866e
movq -0x10(%rbp), %rdi
leaq 0x15b5(%rip), %rsi      # 0x19add
movb $0x0, %al
callq 0x3310
movq -0x8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x42b0
leaq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4a20
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4a50
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6fe0
testb $0x1, %al
jne 0x1857d
leaq -0x48(%rbp), %rdi
callq 0x4ac0
jmp 0x1866c
leaq -0x50(%rbp), %rdi
callq 0x6f10
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
callq 0x18830
jmp 0x18594
testb $0x1, 0xab30(%rip)      # 0x230cb
je 0x18622
movsd 0xab17(%rip), %xmm0     # 0x230c0
movaps 0xd60(%rip), %xmm1      # 0x19310
pand %xmm1, %xmm0
movsd 0xd44(%rip), %xmm1      # 0x19300
ucomisd %xmm1, %xmm0
jbe 0x18622
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x30c0
movq -0xc0(%rbp), %rdi
movq %rax, %rdx
cvtsi2sdl -0x80(%rbp), %xmm0
divsd 0xaacf(%rip), %xmm0     # 0x230c0
cvttsd2si %xmm0, %ecx
leaq 0x14f5(%rip), %rsi      # 0x19af1
movb $0x0, %al
callq 0x3310
jmp 0x18655
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4ac0
jmp 0x18677
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x30c0
movq -0xc8(%rbp), %rdi
movq %rax, %rdx
movl -0x80(%rbp), %ecx
leaq 0x14a3(%rip), %rsi      # 0x19af1
movb $0x0, %al
callq 0x3310
leaq -0x80(%rbp), %rdi
callq 0x4970
leaq -0x50(%rbp), %rdi
callq 0x7730
jmp 0x1855e
jmp 0x1866e
addq $0xe0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x3380
nopw %cs:(%rax,%rax)