// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xec1e8
movq %rax, 0x30(%rsp)
movq 0x8(%rbx), %rdi
callq 0xec1d8
movq %rax, 0x28(%rsp)
testq %rbx, %rbx
je 0x1b8f7f
movq 0x8(%rbx), %rdi
callq 0xf035e
leaq 0x1(%rax), %rdi
leaq 0x1f779a(%rip), %rsi    # 0x3b05bc
movl $0x72, %edx
callq 0x1092b2
movq %rax, %r12
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rdi
callq 0xf1c71
movq %rax, %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %ecx, %ecx
movq %rcx, 0x18(%rsp)
incq %rcx
movb $0x1, %dl
movq 0x28(%rsp), %rax
movq %rcx, 0x20(%rsp)
cmpq 0x30(%rsp), %rcx
je 0x1b8e80
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xefce0
decq %rax
movl %r15d, %edx
movb %dl, 0xf(%rsp)
movq %rax, %rsi
xorl %edx, %edx
subq %rbx, %rsi
jbe 0x1b8ecd
leaq 0x1ee722(%rip), %r8     # 0x3a75b7
testq %rbp, %rbp
jne 0x1b8ea7
movq (%r13), %r14
addq $0x8, %r13
movl $0x20, %ebp
decq %rbp
leal (,%rbp,2), %ecx
movq %r14, %rdi
shrq %cl, %rdi
andl $0x3, %edi
movb (%rdi,%r8), %cl
movb %cl, (%r12,%rdx)
incq %rdx
cmpq %rdx, %rsi
jne 0x1b8e95
movq %rax, %rbx
movb $0x0, (%r12,%rdx)
movq 0x10(%rsp), %rcx
movl 0x10(%rcx), %eax
movq (%rcx), %r15
cmpl $0x1, %eax
je 0x1b8f05
testl %eax, %eax
jne 0x1b8f7a
movq %r15, %rdi
leaq 0x1f779a(%rip), %rsi    # 0x3b068e
movq 0x18(%rsp), %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x103d21
jmp 0x1b8f29
movq %r12, %rdi
callq 0x172f0
movq %r15, %rdi
leaq 0x1f7781(%rip), %rsi    # 0x3b0698
movq 0x18(%rsp), %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x103d21
testq %rbp, %rbp
movb 0xf(%rsp), %al
jne 0x1b8f3f
movq (%r13), %r14
addq $0x8, %r13
movl $0x20, %ebp
incq %rbx
decq %rbp
movl %eax, %r15d
movq 0x20(%rsp), %rcx
testb $0x1, %al
je 0x1b8e4c
leaq 0x1f7660(%rip), %rsi    # 0x3b05bc
movq %r12, %rdi
movl $0x94, %edx
callq 0x109670
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x664ee
callq 0x66525