// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movb $0x0, 0x3f(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x81370
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x175e7e
movq 0x50(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x175e46
jmp 0x175e7e
movq 0x4c6153(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3a01bc(%rip), %rsi    # 0x516013
leaq 0x3a0361(%rip), %rdx    # 0x5161bf
leaq 0x3dbef1(%rip), %rcx    # 0x551d56
leaq 0x3dbe3f(%rip), %r8     # 0x551cab
movl $0x9a, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x175e80
cmpq $0x0, 0x30(%rsp)
jne 0x175e95
movl 0x4c(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x17608d
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11e110
movq $0x0, 0x40(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x4c(%rsp)
movb %al, 0x1f(%rsp)
jne 0x175eca
movq 0x40(%rsp), %rax
cmpq 0x30(%rsp), %rax
setb %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x175ed4
jmp 0x175f25
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x50(%rsp), %rdx
callq 0x171f90
movl %eax, 0x4c(%rsp)
movq 0x20(%rsp), %rdi
callq 0x173180
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x175eac
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x814a0
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11dee0
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11dfa0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movl $0xa, %ecx
callq 0x11afd0
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11b5b0
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11b470
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x28(%rsp), %rsi
movl $0x8, %edx
xorl %eax, %eax
movl %eax, %ecx
leaq 0xdc(%rip), %r8         # 0x1760a0
callq 0xfb9e0
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x176077
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x192b0
cmpq $0x0, %rax
jbe 0x176062
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x3dbd6a(%rip), %rdi    # 0x551d89
callq 0x19980
cmpl $0x0, %eax
jne 0x176039
testb $0x1, 0x3f(%rsp)
je 0x176032
jmp 0x176064
movb $0x1, 0x3f(%rsp)
jmp 0x176039
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x3b0e91(%rip), %rsi    # 0x526eec
movb $0x0, %al
callq 0xddca0
jmp 0x176064
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x175fd2
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11b540
movl 0x4c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)