// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_merge.c
// Function: gt_merge_runner
static int gt_merge_runner(int argc, const char **argv, int parsed_args,
                           void *tool_arguments, GtError *err)
{
  MergeArguments *arguments = tool_arguments;
  GtNodeStream *gff3_in_stream,
                *merge_stream,
                *gff3_out_stream;
  GtArray *genome_streams;
  GtUword i;
  int had_err;

  gt_error_check(err);
  gt_assert(arguments);

  /* alloc */
  genome_streams = gt_array_new(sizeof (GtNodeStream*));

  /* XXX: check for multiple specification of '-' */

  /* create an gff3 input stream for each given file */
  if (parsed_args < argc) {
    /* we got files to open */
    for (i = parsed_args; i < argc; i++) {
      gff3_in_stream = gt_gff3_in_stream_new_sorted(argv[i]);
      if (arguments->tidy)
        gt_gff3_in_stream_enable_tidy_mode((GtGFF3InStream*) gff3_in_stream);
      gt_array_add(genome_streams, gff3_in_stream);
    }
   }
   else {
     /* use stdin */
     gff3_in_stream = gt_gff3_in_stream_new_sorted(NULL);
     gt_array_add(genome_streams, gff3_in_stream);
   }

  /* create a merge stream */
  merge_stream = gt_merge_stream_new(genome_streams);
  gt_assert(merge_stream);

  /* create a gff3 output stream */
  gff3_out_stream = gt_gff3_out_stream_new(merge_stream, arguments->outfp);
  if (arguments->retainids)
    gt_gff3_out_stream_retain_id_attributes((GtGFF3OutStream*) gff3_out_stream);

  /* pull the features through the stream and free them afterwards */
  had_err = gt_node_stream_pull(gff3_out_stream, err);

  /* free */
  gt_node_stream_delete(gff3_out_stream);
  gt_node_stream_delete(merge_stream);
  for (i = 0; i < gt_array_size(genome_streams); i++)
    gt_node_stream_delete(*(GtNodeStream**) gt_array_get(genome_streams, i));
  gt_array_delete(genome_streams);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movl %edi, %r13d
testq %r8, %r8
je 0x33e71
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x33fd2
testq %r15, %r15
je 0x33f7e
movq %rbx, 0x10(%rsp)
pushq $0x8
popq %rdi
callq 0x5809c
movq %rax, %rbx
cmpl %r13d, %ebp
jge 0x33ecf
movslq %ebp, %r14
movslq %r13d, %r13
pushq $0x8
popq %rbp
cmpq %r13, %r14
jae 0x33ee9
movq (%r12,%r14,8), %rdi
callq 0xdef57
movq %rax, 0x8(%rsp)
cmpb $0x1, 0x11(%r15)
jne 0x33eba
movq %rax, %rdi
callq 0xdee0c
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x5851d
incq %r14
jmp 0x33e98
xorl %edi, %edi
callq 0xdef57
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x5851d
movq %rbx, %rdi
callq 0x100d59
testq %rax, %rax
je 0x33fa8
movq %rax, %r12
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0xe07df
movq %rax, %r13
cmpb $0x1, 0x10(%r15)
movq 0x10(%rsp), %r14
jne 0x33f20
movq %r13, %rdi
callq 0xe088c
movq %r13, %rdi
movq %r14, %rsi
callq 0x102b93
movl %eax, %ebp
movq %r13, %rdi
callq 0x10297b
movq %r12, %rdi
callq 0x10297b
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x586a4
cmpq %rax, %r14
jae 0x33f65
movq %rbx, %rdi
movq %r14, %rsi
callq 0x581aa
movq (%rax), %rdi
callq 0x10297b
incq %r14
jmp 0x33f40
movq %rbx, %rdi
callq 0x58eb9
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x403fe3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b1084(%rip), %rsi    # 0x2e5013
leaq 0x3146bd(%rip), %rdx    # 0x348653
leaq 0x2bcea9(%rip), %rcx    # 0x2f0e46
leaq 0x2bce47(%rip), %r8     # 0x2f0deb
pushq $0x5a
jmp 0x33ffa
movq 0x403fb9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b105a(%rip), %rsi    # 0x2e5013
leaq 0x2bce96(%rip), %rdx    # 0x2f0e56
leaq 0x2bce7f(%rip), %rcx    # 0x2f0e46
leaq 0x2bce1d(%rip), %r8     # 0x2f0deb
pushq $0x73
jmp 0x33ffa
movq 0x403f8f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b1030(%rip), %rsi    # 0x2e5013
leaq 0x2b11d5(%rip), %rdx    # 0x2e51bf
leaq 0x2bce55(%rip), %rcx    # 0x2f0e46
leaq 0x2bcdf3(%rip), %r8     # 0x2f0deb
pushq $0x59
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390