// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-contigs-writer.c
// Function: gt_contigs_writer_write
void gt_contigs_writer_write(GtContigsWriter *contigs_writer)
{
  gt_assert(contigs_writer != NULL);

  if (contigs_writer->contig.nextfreechar > 0)
  {
    gt_assembly_stats_calculator_add(contigs_writer->asc,
        contigs_writer->contig.nextfreechar);
    /* build description */
    gt_str_append_cstr(contigs_writer->contig_desc, "contig_");
    gt_str_append_uword(contigs_writer->contig_desc,
        contigs_writer->contignum);
    contigs_writer->depthinfo.length = contigs_writer->contig.nextfreechar;
    gt_str_append_cstr(contigs_writer->contig_desc, " length=");
    gt_str_append_uword(contigs_writer->contig_desc,
        contigs_writer->depthinfo.length);
    gt_str_append_cstr(contigs_writer->contig_desc, " depth=");
    gt_str_append_uword(contigs_writer->contig_desc,
        contigs_writer->depthinfo.depth);
    if (contigs_writer->rcn != NULL)
    {
      contigs_writer->depthinfo.internal_copynum -= (float)contigs_writer->rcn[
        GT_CONTIGS_WRITER_READNUM(contigs_writer->lastseqnum,
            contigs_writer->nofseqs)];
      contigs_writer->depthinfo.lastread_copynum = (float)contigs_writer->rcn[
        GT_CONTIGS_WRITER_READNUM(contigs_writer->lastseqnum,
            contigs_writer->nofseqs)];
      gt_str_append_cstr(contigs_writer->contig_desc, " k=");
      gt_str_append_double(contigs_writer->contig_desc,
          (double)contigs_writer->depthinfo.internal_copynum, 2);
    }
    if (contigs_writer->calculate_astat)
    {
      float astat;
      float k = (float)0;
      if (contigs_writer->rcn != NULL)
        k = contigs_writer->depthinfo.internal_copynum;
      else
      {
        if (contigs_writer->depthinfo.depth > 2UL)
          k = (float)(contigs_writer->depthinfo.depth - 2UL);
      }
      astat = - (k * (float)log((double)2));
      if (contigs_writer->contig.nextfreechar + 1UL > contigs_writer->rlen)
      {
        astat += contigs_writer->arrival_rate * (
            contigs_writer->contig.nextfreechar + 1UL - contigs_writer->rlen);
      }
      gt_str_append_cstr(contigs_writer->contig_desc, " astat=");
      gt_str_append_double(contigs_writer->contig_desc, (double)astat, 6);
      contigs_writer->depthinfo.astat = astat;
    }
    gt_str_append_cstr(contigs_writer->contig_desc, " ");
    if (!contigs_writer->show_paths && contigs_writer->depthinfo.depth > 1UL)
    {
      /* show path summary only */
      gt_str_append_cstr(contigs_writer->path_desc,
          contigs_writer->depthinfo.depth > 2UL ? "-->...-->" :
          "-->");
      gt_str_append_uword(contigs_writer->path_desc,
          GT_CONTIGS_WRITER_READNUM(contigs_writer->lastseqnum,
              contigs_writer->nofseqs));
      gt_str_append_char(contigs_writer->path_desc,
          GT_CONTIGS_WRITER_LETTER(contigs_writer->lastseqnum,
              contigs_writer->nofseqs));
    }
    gt_str_append_str(contigs_writer->contig_desc, contigs_writer->path_desc);

    gt_fasta_show_entry(gt_str_get(contigs_writer->contig_desc),
        contigs_writer->contig.spacechar, contigs_writer->contig.nextfreechar,
        60UL, contigs_writer->outfp);
    if (contigs_writer->depthinfo_fp != NULL)
    {
      gt_xfwrite(&contigs_writer->depthinfo,
          sizeof (contigs_writer->depthinfo), (size_t)1,
          contigs_writer->depthinfo_fp);
    }
    contigs_writer->contignum++;
    gt_contigs_writer_reset_buffers(contigs_writer);
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x281f19
movq 0x3ba0b8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x294121(%rip), %rsi    # 0x516013
leaq 0x2feafc(%rip), %rdx    # 0x5809f5
leaq 0x2feb24(%rip), %rcx    # 0x580a24
leaq 0x2feabb(%rip), %r8     # 0x5809c2
movl $0x9f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x281f1b
movq 0x50(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jbe 0x282445
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x1331b0
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x2feaea(%rip), %rsi    # 0x580a3c
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x50(%rax), %rsi
callq 0x11d930
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x80(%rax)
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x2feab1(%rip), %rsi    # 0x580a44
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x80(%rax), %rsi
callq 0x11d930
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x2fea8b(%rip), %rsi    # 0x580a4d
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x78(%rax), %rsi
callq 0x11d930
movq 0x50(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x282120
movq 0x50(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x60(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x28202c
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x282047
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x50(%rsp), %rcx
subq 0x58(%rcx), %rax
subq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
movq 0x50(%rsp), %rax
movss 0x8c(%rax), %xmm0
subss %xmm1, %xmm0
movss %xmm0, 0x8c(%rax)
movq 0x50(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x60(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x2820ad
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x2820c8
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x50(%rsp), %rcx
subq 0x58(%rcx), %rax
subq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
movq 0x50(%rsp), %rax
movss %xmm0, 0x90(%rax)
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x2fe95e(%rip), %rsi    # 0x580a55
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x50(%rsp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x2, %esi
callq 0x11dc30
movq 0x50(%rsp), %rax
testb $0x1, 0x11(%rax)
je 0x2822b1
xorps %xmm0, %xmm0
movss %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x28215c
movq 0x50(%rsp), %rax
movss 0x8c(%rax), %xmm0
movss %xmm0, 0x48(%rsp)
jmp 0x2821bc
movq 0x50(%rsp), %rax
cmpq $0x2, 0x78(%rax)
jbe 0x2821ba
movq 0x50(%rsp), %rax
movq 0x78(%rax), %rax
addq $-0x2, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x20(%rsp)
testq %rax, %rax
movss %xmm0, 0x24(%rsp)
js 0x2821ae
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x48(%rsp)
jmp 0x2821bc
movss 0x48(%rsp), %xmm0
movss %xmm0, 0x1c(%rsp)
movsd 0x296b90(%rip), %xmm0   # 0x518d60
callq 0x195c0
movaps %xmm0, %xmm1
movss 0x1c(%rsp), %xmm0
cvtsd2ss %xmm1, %xmm1
mulss %xmm1, %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
addq $0x1, %rax
movq 0x50(%rsp), %rcx
cmpq 0x68(%rcx), %rax
jbe 0x28226c
movq 0x50(%rsp), %rcx
movsd 0x70(%rcx), %xmm0
movq 0x38(%rcx), %rax
movq 0x68(%rcx), %rcx
subq %rcx, %rax
incq %rax
movq %rax, %xmm2
movaps 0x2966fb(%rip), %xmm1   # 0x518930
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movapd 0x2966ff(%rip), %xmm1   # 0x518940
subpd %xmm1, %xmm2
movaps %xmm2, %xmm1
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm1, %xmm2
movss 0x4c(%rsp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x2fe7dd(%rip), %rsi    # 0x580a59
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movss 0x4c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x6, %esi
callq 0x11dc30
movss 0x4c(%rsp), %xmm0
movq 0x50(%rsp), %rax
movss %xmm0, 0x94(%rax)
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x3131be(%rip), %rsi    # 0x59547f
callq 0x11d550
movq 0x50(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x2823aa
movq 0x50(%rsp), %rax
cmpq $0x1, 0x78(%rax)
jbe 0x2823aa
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x78(%rax), %rcx
leaq 0x2fe769(%rip), %rsi    # 0x580a67
leaq 0x2fe75c(%rip), %rax    # 0x580a61
cmpq $0x2, %rcx
cmovaq %rax, %rsi
callq 0x11d550
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x60(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x28234a
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x282365
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x50(%rsp), %rcx
subq 0x58(%rcx), %rax
subq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11d930
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rdx
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rsi
shrq %rsi
movl $0x42, %eax
movl $0x45, %ecx
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movsbl %al, %esi
callq 0x11da70
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x11d750
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rdx
movq 0x50(%rsp), %rax
movq 0x8(%rax), %r8
movl $0x3c, %ecx
callq 0xdbd10
movq 0x50(%rsp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x28242a
movq 0x50(%rsp), %rdi
addq $0x78, %rdi
movq 0x50(%rsp), %rax
movq 0xa0(%rax), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x126d30
movq 0x50(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq 0x50(%rsp), %rdi
callq 0x281e00
addq $0x58, %rsp
retq
nopw (%rax,%rax)