// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/assembly_stats_calculator.c
// Function: gt_assembly_stats_calculator_show
void gt_assembly_stats_calculator_show(GtAssemblyStatsCalculator *asc,
    GtLogger *logger)
{
  Nstats nstats;
  unsigned int i;

  gt_assert(asc != NULL);

  /* defaults are N50/N80 */
  if (gt_array_size(asc->nstats) == 0) {
    gt_assembly_stats_calculator_register_nstat(asc, 50, NULL);
    gt_assembly_stats_calculator_register_nstat(asc, 80, NULL);
  }

  nstats.nofstats = 0;
  gt_array_sort_stable(asc->nstats, gt_assembly_stats_calculator_cmp_nstat);
  for (i = 0; i < gt_array_size(asc->nstats); i++) {
    GtUword v = *(GtUword*) gt_array_get(asc->nstats, i);
    initNstat(i, "", v, (GtUint64) (asc->sumlength * ((float) v / 100U)));
  }
  if (asc->genome_length > 0) {
    GtUword j;
    for (j = 0; j < gt_array_size(asc->nstats); j++) {
      GtUword v = *(GtUword*) gt_array_get(asc->nstats, j);
      initNstat(i + j, "G", v,
                (GtUint64) (asc->genome_length * ((float) v / 100U)));
    }
  }

  initLimit(0, 500ULL);
  initLimit(1, 1000ULL);
  initLimit(2, 10000ULL);
  initLimit(3, 100000ULL);
  initLimit(4, 1000000ULL);
  nstats.current_len = 0;
  nstats.current_num = 0;
  nstats.half_num = (GtUint64) (asc->numofseq >> 1);
  nstats.fourth_num = nstats.half_num >> 1;
  nstats.three_fourth_num = nstats.fourth_num + nstats.half_num;
  nstats.median = 0;
  nstats.first_quartile = 0;
  nstats.third_quartile = 0;
  gt_disc_distri_foreach_in_reverse_order(asc->lengths, calcNstats, &nstats);

  gt_logger_log(logger, "number of contigs:     "Formatuint64_t"",
                PRINTuint64_tcast(asc->numofseq));
  if (asc->genome_length > 0)
  {
    gt_logger_log(logger, "genome length:         "GT_WU"",
                  PRINTuint64_tcast(asc->genome_length));
  }
  gt_logger_log(logger, "total contigs length:  "Formatuint64_t"",
                PRINTuint64_tcast(asc->sumlength));
  if (asc->genome_length > 0)
  {
    gt_logger_log(logger, "   as %% of genome:     %.2f %%", (double)
                  asc->sumlength * 100 / asc->genome_length);
  }
  gt_logger_log(logger, "mean contig size:      %.2f",
                (double) asc->sumlength / asc->numofseq);
  gt_logger_log(logger, "contig size first quartile: " GT_LLU,
                nstats.first_quartile);
  gt_logger_log(logger, "median contig size:         " GT_LLU, nstats.median);
  gt_logger_log(logger, "contig size third quartile: " GT_LLU,
                nstats.third_quartile);
  gt_logger_log(logger, "longest contig:             " GT_WU, asc->maxlength);
  gt_logger_log(logger, "shortest contig:            " GT_WU, asc->minlength);
  gt_logger_log(logger, "contigs > 500 nt:           " GT_LLU " (%.2f %%)",
                nstats.larger_than_limit[0], (double)
                nstats.larger_than_limit[0] * 100 / asc->numofseq);
  gt_logger_log(logger, "contigs > 1K nt:            " GT_LLU " (%.2f %%)",
                nstats.larger_than_limit[1], (double)
                nstats.larger_than_limit[1] * 100 / asc->numofseq);
  gt_logger_log(logger, "contigs > 10K nt:           " GT_LLU " (%.2f %%)",
                nstats.larger_than_limit[2], (double)
                nstats.larger_than_limit[2] * 100 / asc->numofseq);
  gt_logger_log(logger, "contigs > 100K nt:          " GT_LLU " (%.2f %%)",
                nstats.larger_than_limit[3], (double)
                nstats.larger_than_limit[3] * 100 / asc->numofseq);
  gt_logger_log(logger, "contigs > 1M nt:            " GT_LLU " (%.2f %%)",
                nstats.larger_than_limit[4], (double)
                nstats.larger_than_limit[4] * 100 / asc->numofseq);
  for (i = 0; i < nstats.nofstats ; i++)
  {
    if (nstats.nvalue[i] > 0)
    {
      gt_logger_log(logger, "N%s%02d                "GT_WU"", nstats.name[i],
          (int) nstats.val[i], nstats.nvalue[i]);
      gt_logger_log(logger, "L%s%02d                "GT_WU"", nstats.name[i],
          (int) nstats.val[i], nstats.lvalue[i]);
    }
    else
    {
      gt_logger_log(logger, "N%s%02d                n.a.",
          nstats.name[i], (int) nstats.val[i]);
      gt_logger_log(logger, "L%s%02d                n.a.",
          nstats.name[i], (int) nstats.val[i]);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
testq %rdi, %rdi
je 0x126580
movq %rsi, %rbp
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0xd24e0
testq %rax, %rax
jne 0x125e71
movl $0x32, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x125d57
movl $0x50, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x125d57
movl $0x0, 0x240(%rsp)
movq 0x30(%r14), %rdi
leaq 0x6fe(%rip), %rsi       # 0x126585
callq 0xd2553
movq 0x30(%r14), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x125f8d
movq %rbp, %rbx
xorl %r13d, %r13d
leaq 0x2a42c5(%rip), %rbp    # 0x3ca170
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x30(%r14), %rdi
movq %r15, %rsi
callq 0xd2207
movq (%rax), %rax
movq %rbp, 0x10(%rsp,%r15,8)
movq %rax, 0x1f0(%rsp,%r15,8)
movq 0x8(%r14), %rcx
testq %rcx, %rcx
js 0x125ee0
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x125ef8
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x125f07
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0x125f1f
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss 0x22e391(%rip), %xmm1   # 0x3542b8
mulss %xmm0, %xmm1
cvttss2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss 0x251291(%rip), %xmm1   # 0x3771d0
cvttss2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0xf0(%rsp,%r15,8)
movq %r13, 0x150(%rsp,%r15,8)
movq %r13, 0x1a0(%rsp,%r15,8)
movb $0x0, 0x60(%rsp,%r15)
incl %r12d
movq 0x30(%r14), %rdi
callq 0xd24e0
movq %r12, %r15
cmpq %r12, %rax
ja 0x125eb1
movl %r12d, 0x240(%rsp)
movq %rbx, %rbp
jmp 0x125f90
xorl %r12d, %r12d
cmpq $0x0, 0x20(%r14)
je 0x1260af
movq 0x30(%r14), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x1260af
movq %rbp, 0x8(%rsp)
leaq 0x10(%rsp), %rax
leaq (%r12,%rax), %r13
addq $0x50, %r13
leaq (%rsp,%r12,8), %rbp
addq $0x1f0, %rbp            # imm = 0x1F0
xorl %ebx, %ebx
xorl %r15d, %r15d
movq 0x30(%r14), %rdi
movq %r15, %rsi
callq 0xd2207
movq (%rax), %rax
leaq 0x285096(%rip), %rcx    # 0x3ab07b
movq %rcx, -0x1e0(%rbp,%r15,8)
movq %rax, (%rbp,%r15,8)
movq 0x20(%r14), %rcx
testq %rcx, %rcx
js 0x126005
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x12601d
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x12602c
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0x126044
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss 0x22e26c(%rip), %xmm1   # 0x3542b8
mulss %xmm0, %xmm1
cvttss2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss 0x25116c(%rip), %xmm1   # 0x3771d0
cvttss2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, -0x100(%rbp,%r15,8)
movq %rbx, -0xa0(%rbp,%r15,8)
movq %rbx, -0x50(%rbp,%r15,8)
movb $0x0, (%r13,%r15)
incq %r15
movq 0x30(%r14), %rdi
callq 0xd24e0
cmpq %rax, %r15
jb 0x125fcf
addl %r15d, %r12d
movl %r12d, 0x240(%rsp)
movq 0x8(%rsp), %rbp
leaq 0x10(%rsp), %rdx
movq $0x1f4, 0xb0(%rdx) # imm = 0x1F4
xorl %eax, %eax
movq %rax, 0x88(%rdx)
movq $0x3e8, 0xb8(%rdx) # imm = 0x3E8
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rdx)
movq $0x2710, 0xc0(%rdx) # imm = 0x2710
movq $0x186a0, 0xc8(%rdx) # imm = 0x186A0
movups %xmm0, 0xa0(%rdx)
movq $0xf4240, 0xd0(%rdx) # imm = 0xF4240
movups %xmm0, 0x60(%rdx)
movq (%r14), %rcx
movq %rcx, %rsi
shrq %rsi
movq %rsi, 0x80(%rdx)
shrq $0x2, %rcx
movq %rcx, 0x78(%rdx)
addq %rsi, %rcx
movq %rcx, 0x138(%rdx)
movq %rax, 0xd8(%rdx)
movq %rax, 0x70(%rdx)
movq %rax, 0x130(%rdx)
movq 0x28(%r14), %rdi
leaq -0x4aa(%rip), %rsi      # 0x125c9e
callq 0xe5771
movq (%r14), %rdx
leaq 0x2511e2(%rip), %rsi    # 0x377339
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x20(%r14), %rdx
testq %rdx, %rdx
je 0x12617b
leaq 0x2511e3(%rip), %rsi    # 0x377354
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x8(%r14), %rdx
leaq 0x2511e9(%rip), %rsi    # 0x37736f
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x1261f8
movsd 0x8(%r14), %xmm1
movsd 0x221739(%rip), %xmm2   # 0x3478e0
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x22173e(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x223616(%rip), %xmm0   # 0x3497e0
movq %rax, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x25119c(%rip), %rsi    # 0x37738a
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movdqu (%r14), %xmm1
movdqa 0x250f8b(%rip), %xmm0   # 0x377190
pand %xmm1, %xmm0
por 0x250f8f(%rip), %xmm0   # 0x3771a0
psrlq $0x20, %xmm1
por 0x250f92(%rip), %xmm1   # 0x3771b0
subpd 0x250f9a(%rip), %xmm1   # 0x3771c0
addpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm1, %xmm0
leaq 0x25116d(%rip), %rsi    # 0x3773aa
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0x80(%rsp), %rdx
leaq 0x251170(%rip), %rsi    # 0x3773c6
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0xe8(%rsp), %rdx
leaq 0x251178(%rip), %rsi    # 0x3773e7
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x140(%rsp), %rdx
leaq 0x251180(%rip), %rsi    # 0x377408
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x18(%r14), %rdx
leaq 0x25118c(%rip), %rsi    # 0x377429
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x10(%r14), %rdx
leaq 0x251197(%rip), %rsi    # 0x377449
movq %rbp, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x98(%rsp), %rdx
movq %rdx, %xmm1
movq 0x22160f(%rip), %xmm0   # 0x3478e0
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqa %xmm0, %xmm2
movapd 0x22160f(%rip), %xmm0   # 0x3478f0
subpd %xmm0, %xmm1
movapd %xmm0, %xmm3
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x2234e3(%rip), %xmm0   # 0x3497e0
movq (%r14), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x251148(%rip), %rsi    # 0x377469
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0xa0(%rsp), %rdx
movq %rdx, %xmm1
movq 0x2215a0(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x2215a4(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x22347c(%rip), %xmm0   # 0x3497e0
movq (%r14), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x25110c(%rip), %rsi    # 0x377494
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0xa8(%rsp), %rdx
movq %rdx, %xmm1
movq 0x221539(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x22153d(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x223415(%rip), %xmm0   # 0x3497e0
movq (%r14), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x2510d0(%rip), %rsi    # 0x3774bf
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0xb0(%rsp), %rdx
movq %rdx, %xmm1
movq 0x2214d2(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x2214d6(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x2233ae(%rip), %xmm0   # 0x3497e0
movq (%r14), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x251094(%rip), %rsi    # 0x3774ea
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0xb8(%rsp), %rdx
movq %rdx, %xmm1
movq 0x22146b(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x22146f(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x223347(%rip), %xmm0   # 0x3497e0
movq (%r14), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x251058(%rip), %rsi    # 0x377515
movq %rbp, %rdi
movb $0x1, %al
callq 0x103fe1
cmpl $0x0, 0x240(%rsp)
je 0x12656e
leaq 0x25109a(%rip), %r14    # 0x377576
leaq 0x2510af(%rip), %r15    # 0x377592
leaq 0x251056(%rip), %r12    # 0x377540
leaq 0x25106a(%rip), %r13    # 0x37755b
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %rdx
movq 0x150(%rsp,%rbx,8), %r8
movl 0x1f0(%rsp,%rbx,8), %ecx
movq %rbp, %rdi
testq %r8, %r8
je 0x12653c
movq %r12, %rsi
xorl %eax, %eax
callq 0x103fe1
movl 0x1f0(%rsp,%rbx,8), %ecx
movq 0x10(%rsp,%rbx,8), %rdx
movq 0x1a0(%rsp,%rbx,8), %r8
movq %rbp, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x103fe1
jmp 0x12655f
movq %r14, %rsi
xorl %eax, %eax
callq 0x103fe1
movq 0x10(%rsp,%rbx,8), %rdx
movl 0x1f0(%rsp,%rbx,8), %ecx
movq %rbp, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x103fe1
incq %rbx
movl 0x240(%rsp), %eax
cmpq %rax, %rbx
jb 0x1264f3
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3b191