// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_finalize_descriptions_diskbased
static void gt_reads2twobit_finalize_descriptions_diskbased(
    GtReads2TwobitEncodeState *state)
{
  GtUword len;
  gt_assert(!state->invalid_mode);
  gt_assert(state->descsfp != NULL);
  gt_assert(gt_str_length(state->dbuf) > 0);
  if (state->clipdes)
    gt_reads2twobit_clip_str(state->dbuf);
  len = gt_str_length(state->dbuf);
  if (len > 0 && gt_str_get(state->dbuf)[len-1] != '\n')
  {
    gt_str_append_char(state->dbuf, '\n');
    len++;
  }
  if (len > (*state->longestdesc))
    (*state->longestdesc) = len;
  gt_xfputs(gt_str_get(state->dbuf), state->descsfp);
  (*state->n_descs)++;
  if (gt_str_length(state->dbuf2) > 0)
  {
    if (state->clipdes)
      gt_reads2twobit_clip_str(state->dbuf2);
    len = gt_str_length(state->dbuf2);
    if (gt_str_get(state->dbuf2)[len-1] != '\n')
    {
      gt_str_append_char(state->dbuf2, '\n');
      len++;
    }
    if (len > (*state->longestdesc))
      (*state->longestdesc) = len;
    gt_xfputs(gt_str_get(state->dbuf2), state->descsfp);
    (*state->n_descs)++;
  }
  gt_str_reset(state->dbuf);
  gt_str_reset(state->dbuf2);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, 0x8f1(%rax)
je 0x2a645f
movq 0x395b72(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26fbdb(%rip), %rsi    # 0x516013
leaq 0x2df302(%rip), %rdx    # 0x585741
leaq 0x2df354(%rip), %rcx    # 0x58579a
leaq 0x2deb63(%rip), %r8     # 0x584fb0
movl $0x2a1, %r9d            # imm = 0x2A1
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6461
jmp 0x2a6463
movq 0x10(%rsp), %rax
cmpq $0x0, 0x998(%rax)
jne 0x2a64aa
movq 0x395b27(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26fb90(%rip), %rsi    # 0x516013
leaq 0x2df2a0(%rip), %rdx    # 0x58572a
leaq 0x2df309(%rip), %rcx    # 0x58579a
leaq 0x2deb18(%rip), %r8     # 0x584fb0
movl $0x2a2, %r9d            # imm = 0x2A2
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a64ac
jmp 0x2a64ae
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
ja 0x2a64fd
movq 0x395ad4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26fb3d(%rip), %rsi    # 0x516013
leaq 0x2df74e(%rip), %rdx    # 0x585c2b
leaq 0x2df2b6(%rip), %rcx    # 0x58579a
leaq 0x2deac5(%rip), %r8     # 0x584fb0
movl $0x2a3, %r9d            # imm = 0x2A3
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a64ff
movq 0x10(%rsp), %rax
testb $0x1, 0x9a0(%rax)
je 0x2a651e
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x2a6710
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x11dfa0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jbe 0x2a6583
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x2a6583
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
movl $0xa, %esi
callq 0x11da70
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x9a8(%rcx), %rcx
cmpq (%rcx), %rax
jbe 0x2a65ad
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq 0x9a8(%rax), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x10(%rsp), %rax
movq 0x998(%rax), %rsi
callq 0x126bb0
movq 0x10(%rsp), %rax
movq 0x9b0(%rax), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x2a66e4
movq 0x10(%rsp), %rax
testb $0x1, 0x9a0(%rax)
je 0x2a6622
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x2a6710
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x11dfa0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x2a667f
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
movl $0xa, %esi
callq 0x11da70
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x9a8(%rcx), %rcx
cmpq (%rcx), %rax
jbe 0x2a66a9
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq 0x9a8(%rax), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x10(%rsp), %rax
movq 0x998(%rax), %rsi
callq 0x126bb0
movq 0x10(%rsp), %rax
movq 0x9b0(%rax), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x948(%rax), %rdi
callq 0x11e110
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x11e110
addq $0x18, %rsp
retq
nopl (%rax,%rax)