// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/gff3_linesorted_out_stream.c
// Function: gff3_linesorted_out_stream_process_current_cluster
static int gff3_linesorted_out_stream_process_current_cluster(
                                               GtGFF3LinesortedOutStream *lsos,
                                               GtError *err)
{
  int had_err = 0;
  GtUword i;
  bool shown_sep = false;
  GtUword nof_nodes = gt_array_size(lsos->cur_node_set), nof_lines;
  gt_error_check(err);

  /* do not waste time on empty clusters */
  if (nof_nodes == 0) return had_err;

  /* collect and free output */
  gt_str_reset(lsos->buf);
  for (i = 0; !had_err && i < nof_nodes; i++) {
    GtGenomeNode *n = *(GtGenomeNode**) gt_array_get(lsos->cur_node_set, i);
    had_err = gt_genome_node_accept(n, lsos->gff3vis, err);
    gt_genome_node_delete(n);
  }
  gt_array_reset(lsos->cur_node_set);

  /* split buffered lines */
  gt_splitter_split(lsos->splitter, gt_str_get(lsos->buf),
                    gt_str_length(lsos->buf), '\n');
  nof_lines = gt_splitter_size(lsos->splitter);

  /* sort lines by start positions */
  lsos->outstrings = gt_splitter_get_tokens(lsos->splitter);
  gt_qsort_r(lsos->outstrings, nof_lines, sizeof (char*),
             NULL, gt_linesorted_gff3_cmp);

  /* output */
  for (i = 0; i < nof_lines-1; i++) {
    if (strlen(lsos->outstrings[i]) > 0) {
      if (strcmp(GT_GFF_TERMINATOR, lsos->outstrings[i]) == 0) {
        if (shown_sep)
          continue;
        else
          shown_sep = true;
      }
      gt_file_xprintf(lsos->outfp, "%s\n", lsos->outstrings[i]);
    }
  }

  /* cleanup */
  gt_splitter_reset(lsos->splitter);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x586a4
movq %rax, %r15
testq %r14, %r14
je 0xdff13
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0xe0047
testq %r15, %r15
je 0xe0036
movq 0x28(%rbx), %rdi
callq 0xad357
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
testl %ebp, %ebp
jne 0xdff60
cmpq %r15, %r12
jae 0xdff60
movq %r12, %rsi
callq 0x581aa
movq (%rax), %r13
movq 0x38(%rbx), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0xdd39c
movl %eax, %ebp
movq %r13, %rdi
callq 0xde013
incq %r12
jmp 0xdff2a
movl %ebp, 0x4(%rsp)
callq 0x5876c
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %r14
callq 0xad1fa
movq %rax, %r15
movq 0x28(%rbx), %rdi
callq 0xad289
pushq $0xa
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xab309
movq 0x30(%rbx), %rdi
callq 0xab625
movq %rax, %rbp
movq 0x30(%rbx), %rdi
callq 0xab54d
movq %rax, 0x48(%rbx)
leaq 0xcc(%rip), %r8         # 0xe007f
xorl %r12d, %r12d
pushq $0x8
popq %rdx
movq %rax, %rdi
movq %rbp, %rsi
xorl %ecx, %ecx
callq 0x9d5a0
decq %rbp
xorl %r15d, %r15d
cmpq %r15, %rbp
je 0xe0027
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r13
cmpb $0x0, (%r13)
je 0xe001c
leaq 0x23fbc7(%rip), %rdi    # 0x31fbae
movq %r13, %rsi
callq 0x179e0
testl %eax, %eax
sete %cl
movb $0x1, %r14b
testb %r12b, %cl
jne 0xe001f
testl %eax, %eax
sete %r14b
orb %r12b, %r14b
movq 0x20(%rbx), %rdi
leaq 0x215e30(%rip), %rsi    # 0x2f5e40
movq %r13, %rdx
xorl %eax, %eax
callq 0x8d432
jmp 0xe001f
movl %r12d, %r14d
incq %r15
movl %r14d, %r12d
jmp 0xdffcc
movq 0x30(%rbx), %rdi
callq 0xab5d7
movl 0x4(%rsp), %eax
jmp 0xe0038
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x357f1a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x204fbb(%rip), %rsi    # 0x2e5013
leaq 0x205160(%rip), %rdx    # 0x2e51bf
leaq 0x23fb15(%rip), %rcx    # 0x31fb7b
leaq 0x23fa63(%rip), %r8     # 0x31fad0
movl $0x9a, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390