// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa9d50
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa9d00
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x7(%rsp)
movl 0x320228(%rip), %eax    # 0x570bab
movl %eax, 0x2(%rsp)
movb 0x320222(%rip), %al     # 0x570baf
movb %al, 0x6(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x2509d1
movq 0x3eb600(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c5669(%rip), %rsi    # 0x516013
leaq 0x328e97(%rip), %rdx    # 0x579848
leaq 0x328efb(%rip), %rcx    # 0x5798b3
leaq 0x328e72(%rip), %r8     # 0x579831
movl $0x70, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2509d3
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb10b0
movq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
leaq 0x328e3e(%rip), %rsi    # 0x579831
movl $0x72, %edx
callq 0xe80f0
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb5250
movq %rax, 0x50(%rsp)
movq $0x0, 0x20(%rsp)
movb 0x7(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x250a2d
jmp 0x250b7f
movq 0x40(%rsp), %rax
addq $0x1, %rax
cmpq 0x38(%rsp), %rax
jne 0x250a4e
movb $0x1, 0x7(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x250a6e
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0xb0530
subq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x250a70
movq 0x20(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x250af0
cmpq $0x0, 0x10(%rsp)
jne 0x250aa6
movq 0x50(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x50(%rsp)
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq $0x20, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rsp)
shlq %rcx
shrq %cl, %rax
andq $0x3, %rax
movb 0x2(%rsp,%rax), %dl
movq 0x8(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x30(%rsp)
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x250a70
movq 0x8(%rsp), %rax
movq 0x30(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x60(%rsp), %rax
movl 0x10(%rax), %edi
movq 0x60(%rsp), %rax
movq (%rax), %rsi
movq 0x40(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x250ba0
movq $0x0, 0x30(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x250b5e
movq 0x50(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x50(%rsp)
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq $0x20, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x250a1e
movq 0x8(%rsp), %rdi
leaq 0x328ca6(%rip), %rsi    # 0x579831
movl $0x94, %edx
callq 0xe88c0
xorl %eax, %eax
addq $0x68, %rsp
retq
nopl (%rax)