// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_encseq_encode.c
// Function: gt_encseq_encode_runner
static int gt_encseq_encode_runner(GT_UNUSED int argc, const char **argv,
                               int parsed_args, GT_UNUSED void *tool_arguments,
                               GtError *err)
{
  int had_err = 0,
      i;
  GtEncseqEncodeArguments *arguments =
                                      (GtEncseqEncodeArguments*) tool_arguments;
  GtStrArray *infiles;
  gt_error_check(err);

  infiles = gt_str_array_new();
  for (i = parsed_args; i < argc; i++) {
    gt_str_array_add_cstr(infiles, argv[i]);
  }

  if (gt_str_length(arguments->indexname) == 0UL) {
    if (gt_str_array_size(infiles) > 1UL) {
      gt_error_set(err,"if more than one input file is given, then "
                       "option -indexname is mandatory");
      had_err = -1;
    } else {
      char *basenameptr;
      basenameptr = gt_basename(gt_str_array_get(infiles, 0UL));
      gt_str_set(arguments->indexname, basenameptr);
      gt_free(basenameptr);
    }
  }

  if (!had_err) {
    gt_assert(gt_str_length(arguments->indexname) > 0UL);
    had_err = encode_sequence_files(infiles,
                                    arguments->eopts,
                                    gt_str_get(arguments->indexname),
                                    arguments->verbose,
                                    arguments->no_esq_header,
                                    err);
  }

  if (!had_err && arguments->showstats)
    show_encoded_statistics(infiles, gt_str_get(arguments->indexname));

  gt_str_array_delete(infiles);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movl %edi, %r12d
testq %r8, %r8
je 0xa4835
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa4aca
callq 0x11be10
movq %rax, %rbx
subl %ebp, %r12d
jle 0xa4861
movslq %ebp, %rax
leaq (%r13,%rax,8), %r13
xorl %ebp, %ebp
movq (%r13,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x11bee9
incq %rbp
cmpl %ebp, %r12d
jne 0xa484c
movq 0x10(%r14), %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0xa48cd
movq %rbx, %rdi
callq 0x11c131
cmpq $0x2, %rax
jb 0xa4898
leaq 0x2a6f4b(%rip), %rsi    # 0x34b7cf
movq %r15, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xa4aa7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rdi
callq 0xd3e84
movq %rax, %r12
movq 0x10(%r14), %rdi
movq %rax, %rsi
callq 0x11ad62
leaq 0x2a6e16(%rip), %rsi    # 0x34b6d6
movq %r12, %rdi
movl $0xb4, %edx
callq 0x1045eb
movq 0x10(%r14), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xa4ac5
movq (%r14), %r13
movq 0x10(%r14), %rdi
callq 0x11b0a1
movq %rax, (%rsp)
movb 0x9(%r14), %bpl
movb 0xa(%r14), %r12b
testq %r15, %r15
je 0xa490c
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa4acf
testq %rbx, %rbx
je 0xa4ac0
movq %rbx, %rdi
callq 0x11c131
testq %r13, %r13
je 0xa4ac0
testq %rax, %rax
je 0xa4ac0
movq 0x41464a(%rip), %rax    # 0x4b8f80
movq (%rax), %rdx
movzbl %r12b, %edi
leaq 0x2a1f90(%rip), %rsi    # 0x3468d4
callq 0x103e40
movq %rax, %r12
movq %r13, %rdi
movq %r15, %rsi
callq 0xefe3d
movq %rax, %r13
testq %rax, %rax
je 0xa498d
movq %r13, %rdi
movq %r12, %rsi
callq 0xf02fc
testb %bpl, %bpl
je 0xa4977
movq %r13, %rdi
callq 0xf028c
movq %r13, %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
movq %r15, %rcx
callq 0xf030c
movl %eax, %ebp
jmp 0xa4992
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0xf018f
movq %r12, %rdi
callq 0x1040e0
testl %ebp, %ebp
jne 0xa4aa7
xorl %ebp, %ebp
cmpb $0x1, 0x8(%r14)
jne 0xa4aa7
movq 0x10(%r14), %rdi
callq 0x11b0a1
movq %rax, %r14
movq %rbx, %rdi
callq 0x11c131
testq %rax, %rax
je 0xa4a03
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0xff72f
addq %rax, %r12
incq %r15
movq %rbx, %rdi
callq 0x11c131
cmpq %r15, %rax
ja 0xa49d6
cvtsi2sd %r12, %xmm0
jmp 0xa4a07
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
leaq 0x2a6e78(%rip), %rsi    # 0x34b88b
movq %r14, %rdi
callq 0xa4ad4
movq %rax, %r15
leaq 0x2a1ff6(%rip), %rsi    # 0x346a1b
movq %r14, %rdi
callq 0xa4ad4
movq %rax, %r12
addq %r15, %r12
leaq 0x2a1fe6(%rip), %rsi    # 0x346a20
movq %r14, %rdi
callq 0xa4ad4
movq %rax, %r15
leaq 0x2a1fd9(%rip), %rsi    # 0x346a25
movq %r14, %rdi
callq 0xa4ad4
movq %rax, %r13
addq %r15, %r13
addq %r12, %r13
leaq 0x2a1fc6(%rip), %rsi    # 0x346a2a
movq %r14, %rdi
callq 0xa4ad4
movq %rax, %r15
leaq 0x2a1fb9(%rip), %rsi    # 0x346a2f
movq %r14, %rdi
callq 0xa4ad4
addq %r15, %rax
addq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd (%rsp), %xmm0
mulsd 0x2a4d47(%rip), %xmm0   # 0x3497e0
leaq 0x2a6df0(%rip), %rdi    # 0x34b890
movb $0x1, %al
callq 0x17070
movq %rbx, %rdi
callq 0x11c144
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1a406
callq 0x1a43d
callq 0x1a396
callq 0x1a3cf