// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/gfa_writer.c
// Function: gt_gfa_writer_show_segments
int gt_gfa_writer_show_segments(GtGfaWriter *gw, GT_UNUSED GtError *err)
{
  const GtTwobitencoding *nextencoded;
  GtTwobitencoding code = 0;
  GtUword seqnum = 0, nofseqs = gt_encseq_num_of_sequences(gw->encseq),
                pos = 0, next_stop, i,
                tlen = gt_encseq_total_length(gw->encseq), charsincode = 0;
  char *seqbuffer;
  bool last_seq = false;
  const char code2char[] = "ACGT";
  gt_assert(gw != NULL);
  seqbuffer = gt_malloc(sizeof (*seqbuffer) *
      (gt_encseq_max_seq_length(gw->encseq) + 1UL));
  nextencoded = gt_encseq_twobitencoding_export(gw->encseq);
  i = 0;
  while (!last_seq)
  {
    if (seqnum + 1UL == nofseqs)
    {
      last_seq = true;
      next_stop = tlen;
    }
    else
      next_stop = gt_encseq_seqstartpos(gw->encseq, seqnum + 1UL) - 1UL;
    for (/**/; i < next_stop; i++)
    {
      if (charsincode == 0)
      {
        code = *(nextencoded++);
        charsincode = (GtUword)GT_UNITSIN2BITENC;
      }
      seqbuffer[pos++] = code2char[code >> ((--charsincode) << 1) & 3];
    }
    seqbuffer[pos] = '\0';
    gt_gfa_writer_show_segment(gw->version, gw->file, seqnum, seqbuffer);
    pos = 0;
    /* consume separator */
    i++;
    if (charsincode == 0)
    {
      code = *(nextencoded++);
      charsincode = (GtUword)GT_UNITSIN2BITENC;
    }
    charsincode--;
    seqnum++;
  }
  gt_free(seqbuffer);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xe7bac
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0xe7b9c
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rdi
callq 0xebd5d
leaq 0x1(%rax), %rdi
leaq 0x1f6d39(%rip), %rsi    # 0x3a701c
movl $0x72, %edx
callq 0x104226
movq %rax, %r12
movq %rbx, (%rsp)
movq 0x8(%rbx), %rdi
callq 0xed62d
movq %rax, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %edx, %edx
movq %r14, 0x18(%rsp)
leaq 0x1(%rdx), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rsp)
cmpq %r14, %rcx
je 0x1b033c
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rdx, %r14
callq 0xeb6ee
movq %r14, %rdx
decq %rax
movq %rax, %r9
subq %rbx, %r9
jbe 0x1b0387
xorl %esi, %esi
leaq 0x1edd8f(%rip), %r8     # 0x39e0dc
testq %rbp, %rbp
jne 0x1b035f
movq (%r13), %r15
addq $0x8, %r13
movl $0x20, %ebp
decq %rbp
leal (,%rbp,2), %ecx
movq %r15, %rdi
shrq %cl, %rdi
andl $0x3, %edi
movb (%rdi,%r8), %cl
movb %cl, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r9
jne 0x1b034d
movq %rax, %rbx
jmp 0x1b038a
xorl %r9d, %r9d
movb $0x0, (%r12,%r9)
movq (%rsp), %rcx
movl 0x10(%rcx), %eax
movq (%rcx), %r14
cmpl $0x1, %eax
je 0x1b03bc
testl %eax, %eax
jne 0x1b0438
movq %r14, %rdi
leaq 0x1f6d22(%rip), %rsi    # 0x3a70d2
movq %r12, %rcx
xorl %eax, %eax
callq 0xfee51
jmp 0x1b03e5
movq %r12, %rdi
movq %rdx, 0x10(%rsp)
callq 0x172f0
movq %r14, %rdi
leaq 0x1f6d09(%rip), %rsi    # 0x3a70dc
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xfee51
testq %rbp, %rbp
movq 0x18(%rsp), %r14
jne 0x1b03fc
movq (%r13), %r15
addq $0x8, %r13
movl $0x20, %ebp
incq %rbx
decq %rbp
movq 0x8(%rsp), %rax
movq %rax, %rdx
cmpq %r14, %rax
jne 0x1b030e
leaq 0x1f6c02(%rip), %rsi    # 0x3a701c
movq %r12, %rdi
movl $0x94, %edx
callq 0x1045eb
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x64d66