// File: /workspace/github_c_makefile_star2_O2/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 0x705a1
movq %rax, 0x28(%rsp)
movq 0x8(%rbx), %rdi
callq 0x7055e
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rdi
callq 0x755c5
leaq 0x1(%rax), %rdi
leaq 0x1e9919(%rip), %rsi    # 0x34739c
pushq $0x72
popq %rdx
callq 0x93160
movq %rax, %r12
movq %rbx, (%rsp)
movq 0x8(%rbx), %rdi
callq 0x776db
movq %rax, %r13
pushq $0x20
popq %rdi
leaq 0x1e0994(%rip), %rbp    # 0x33e43c
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %eax, %eax
testb $0x1, %al
jne 0x15dbc8
leaq 0x1(%rdx), %rax
movq 0x20(%rsp), %r15
movq %rax, 0x10(%rsp)
cmpq 0x28(%rsp), %rax
sete %al
movq %rax, 0x30(%rsp)
movq %rdx, 0x8(%rsp)
je 0x15db03
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
movq %rcx, %r15
callq 0x74d9c
movq %r15, %rcx
movq 0x8(%rsp), %rdx
pushq $0x20
popq %rdi
movq %rax, %r15
decq %r15
cmpq %rcx, %r15
cmovbeq %rcx, %r15
movq %r15, %rax
subq %rcx, %rax
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x15db43
testq %rbx, %rbx
jne 0x15db28
movq (%r13), %r14
addq $0x8, %r13
movq %rdi, %rbx
decq %rbx
leal (%rbx,%rbx), %ecx
movq %r14, %rsi
shrq %cl, %rsi
andl $0x3, %esi
movb (%rsi,%rbp), %cl
movb %cl, (%r12,%r8)
incq %r8
jmp 0x15db13
movb $0x0, (%r12,%rax)
movq (%rsp), %rcx
movl 0x10(%rcx), %eax
movq (%rcx), %rdi
cmpl $0x1, %eax
je 0x15db72
testl %eax, %eax
jne 0x15dbed
leaq 0x1e98ec(%rip), %rsi    # 0x347452
movq %r12, %rcx
xorl %eax, %eax
callq 0x8d432
jmp 0x15db9d
movq %rdi, 0x18(%rsp)
movq %r12, %rdi
callq 0x172d0
movq 0x18(%rsp), %rdi
leaq 0x1e98d1(%rip), %rsi    # 0x34745c
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x8d432
testq %rbx, %rbx
pushq $0x20
popq %rdi
movq 0x30(%rsp), %rax
jne 0x15dbb5
movq (%r13), %r14
addq $0x8, %r13
movq %rdi, %rbx
incq %r15
decq %rbx
movq 0x10(%rsp), %rdx
movq %r15, %rcx
jmp 0x15dab3
leaq 0x1e97cd(%rip), %rsi    # 0x34739c
movq %r12, %rdi
movl $0x94, %edx
callq 0x936f9
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2da374(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x187415(%rip), %rsi    # 0x2e5013
leaq 0x1c8de7(%rip), %rdx    # 0x3269ec
leaq 0x1e982b(%rip), %rcx    # 0x347437
leaq 0x1e9789(%rip), %r8     # 0x34739c
pushq $0x62
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390