// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_consensus_sa.c
// Function: gt_consensus_sa_runner
static int gt_consensus_sa_runner(GT_UNUSED int argc, const char **argv,
                                  int parsed_args,
                                  GT_UNUSED void *tool_arguments, GtError *err)
{
  GtArray *spliced_alignments;
  GtSSplicedAlignment *sa;
  GtUword i;
  int had_err = 0;
  gt_error_check(err);

  /* parse input file and store resuilts in the spliced alignment array */
  spliced_alignments = gt_array_new(sizeof (GtSSplicedAlignment*));
  had_err = gt_sspliced_alignment_parse(spliced_alignments, argv[parsed_args],
                                     err);

  if (!had_err) {
    /* sort spliced alignments */
    qsort(gt_array_get_space(spliced_alignments),
          gt_array_size(spliced_alignments),
          gt_array_elem_size(spliced_alignments),
          (GtCompare) gt_sspliced_alignment_compare_ptr);

    /* compute the consensus spliced alignments */
    gt_consensus_sa(gt_array_get_space(spliced_alignments),
                    gt_array_size(spliced_alignments),
                    gt_array_elem_size(spliced_alignments), get_genomic_range,
                    get_strand, get_exons, process_splice_form, NULL);
  }

  /* free */
  for (i = 0; i < gt_array_size(spliced_alignments); i++) {
    sa = *(GtSSplicedAlignment**) gt_array_get(spliced_alignments, i);
    gt_sspliced_alignment_delete(sa);
  }
  gt_array_delete(spliced_alignments);

  return had_err;
}

// Assembly:
subq $0x88, %rsp
movl %edi, 0x84(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movl $0x0, 0x44(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x2aa29
movq 0x60(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2a9f1
jmp 0x2aa29
movq 0x6115a8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4eb611(%rip), %rsi    # 0x516013
leaq 0x4eb7b6(%rip), %rdx    # 0x5161bf
leaq 0x4f0603(%rip), %rcx    # 0x51b013
leaq 0x4f0613(%rip), %r8     # 0x51b02a
movl $0x5a, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2aa2b
movl $0x8, %edi
callq 0x80990
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq 0x78(%rsp), %rax
movslq 0x74(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x60(%rsp), %rdx
callq 0x1e23b0
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
jne 0x2ab0d
movq 0x58(%rsp), %rdi
callq 0x81080
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
callq 0x81370
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
callq 0x813a0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
leaq 0x1b77ae(%rip), %rcx    # 0x1e2250
callq 0x19e70
movq 0x58(%rsp), %rdi
callq 0x81080
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rdi
callq 0x81370
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rdi
callq 0x813a0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
leaq 0x9d(%rip), %rcx        # 0x2ab80
leaq 0x116(%rip), %r8        # 0x2ac00
leaq 0x14f(%rip), %r9        # 0x2ac40
leaq 0x228(%rip), %rax       # 0x2ad20
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x148ba0
movq $0x0, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x2ab68
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x1e1f70
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x2ab16
movq 0x58(%rsp), %rdi
callq 0x81f80
movl 0x44(%rsp), %eax
addq $0x88, %rsp
retq
nop