// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_seqlensort.c
// Function: gt_seqlensort_runner
static int gt_seqlensort_runner(GT_UNUSED int argc,
                                GT_UNUSED const char **argv,
                                GT_UNUSED int parsed_args,
                                void *tool_arguments,
                                GtError *err)
{
  GtSeqlensortArguments *arguments = tool_arguments;
  int had_err = 0;
  GtUword i;
  GtReads2Twobit *r2t = NULL;

  gt_error_check(err);
  gt_assert(arguments);

  if (gt_str_length(arguments->indexname) == 0)
  {
    gt_str_append_cstr(arguments->indexname,
                       gt_str_array_get(arguments->db, 0));
  }

  r2t = gt_reads2twobit_new(arguments->indexname);

  for (i = 0; i < gt_str_array_size(arguments->db) && !had_err; i++)
    had_err = gt_reads2twobit_add_library(r2t,
                                          gt_str_array_get_str(arguments->db,
                                                               i),
                                          err);

  if (!had_err)
    had_err = gt_reads2twobit_encode(r2t, err);

  if (!had_err)
  {
    if (gt_reads2twobit_seqlen_eqlen(r2t) == 0)
    {
      gt_reads2twobit_sort(r2t, gt_seqlensort_cmp,
                           gt_reads2twobit_export_seppos(r2t));
    }
    had_err = gt_reads2twobit_write_encseq(r2t, err);
  }

  gt_reads2twobit_delete(r2t);
  return had_err;
}

// Assembly:
subq $0x78, %rsp
movl %edi, 0x74(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x64eb6
movq 0x50(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x64e7e
jmp 0x64eb6
movq 0x5d711b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4b1184(%rip), %rsi    # 0x516013
leaq 0x4b1329(%rip), %rdx    # 0x5161bf
leaq 0x4c4bcb(%rip), %rcx    # 0x529a68
leaq 0x4c4a9e(%rip), %r8     # 0x529942
movl $0x68, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x64eb8
jmp 0x64eba
cmpq $0x0, 0x48(%rsp)
jne 0x64efa
movq 0x5d70d7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4b1140(%rip), %rsi    # 0x516013
leaq 0x515c85(%rip), %rdx    # 0x57ab5f
leaq 0x4c4b87(%rip), %rcx    # 0x529a68
leaq 0x4c4a5a(%rip), %r8     # 0x529942
movl $0x69, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x64efc
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x64f3b
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0x2a0620
movq %rax, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11fcc0
movq 0x18(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x27(%rsp)
jae 0x64f8f
cmpl $0x0, 0x44(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x64f99
jmp 0x64fdf
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0x11f960
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
callq 0x2a0b30
movl %eax, 0x44(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x64f56
cmpl $0x0, 0x44(%rsp)
jne 0x64ff9
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x2a10a0
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
jne 0x6504b
movq 0x30(%rsp), %rdi
callq 0x2a4e90
cmpq $0x0, %rax
jne 0x65038
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2a4d50
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x2d(%rip), %rsi        # 0x65060
callq 0x2a48a0
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x2a41c0
movl %eax, 0x44(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2a0840
movl 0x44(%rsp), %eax
addq $0x78, %rsp
retq
nop