// File: /workspace/github_c_makefile_star2_O1/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 0xa6b95
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0xa6e31
callq 0x121b54
movq %rax, %rbx
subl %ebp, %r12d
jle 0xa6bc1
movslq %ebp, %rax
leaq (%r13,%rax,8), %r13
xorl %ebp, %ebp
movq (%r13,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x121c30
incq %rbp
cmpl %ebp, %r12d
jne 0xa6bac
movq 0x10(%r14), %rdi
callq 0x120d4c
testq %rax, %rax
jne 0xa6c2d
movq %rbx, %rdi
callq 0x121e78
cmpq $0x2, %rax
jb 0xa6bf8
leaq 0x2adbfa(%rip), %rsi    # 0x3547de
movq %r15, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xa6d02
movq %rbx, %rdi
xorl %esi, %esi
callq 0x121cfa
movq %rax, %rdi
callq 0xd6450
movq %rax, %r12
movq 0x10(%r14), %rdi
movq %rax, %rsi
callq 0x1209e4
leaq 0x2adac5(%rip), %rsi    # 0x3546e5
movq %r12, %rdi
movl $0xb4, %edx
callq 0x109670
movq 0x10(%r14), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xa6e2c
movq (%r14), %r13
movq 0x10(%r14), %rdi
callq 0x120d23
movq %rax, (%rsp)
movb 0x9(%r14), %bpl
movb 0xa(%r14), %r12b
testq %r15, %r15
je 0xa6c6c
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0xa6e36
testq %rbx, %rbx
je 0xa6e27
movq %rbx, %rdi
callq 0x121e78
testq %r13, %r13
je 0xa6e27
testq %rax, %rax
je 0xa6e27
movq 0x41d2ea(%rip), %rax    # 0x4c3f80
movq (%rax), %rdx
movzbl %r12b, %edi
leaq 0x2a8c30(%rip), %rsi    # 0x34f8d4
callq 0x108ed0
movq %rax, %r12
movq %r13, %rdi
movq %r15, %rsi
callq 0xf44eb
movq %rax, %r13
testq %rax, %rax
je 0xa6ced
movq %r13, %rdi
movq %r12, %rsi
callq 0xf49aa
testb %bpl, %bpl
je 0xa6cd7
movq %r13, %rdi
callq 0xf493a
movq %r13, %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
movq %r15, %rcx
callq 0xf49ba
movl %eax, %ebp
jmp 0xa6cf2
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0xf483d
movq %r12, %rdi
callq 0x10916a
testl %ebp, %ebp
jne 0xa6e0e
cmpb $0x1, 0x8(%r14)
jne 0xa6e0e
movq 0x10(%r14), %rdi
callq 0x120d23
testq %rbx, %rbx
je 0xa6e3b
movq %rax, %r14
movq %rbx, %rdi
callq 0x121e78
testq %rax, %rax
je 0xa6d6a
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, %rdi
callq 0x104631
addq %rax, %r12
incq %r15
movq %rbx, %rdi
callq 0x121e78
cmpq %r15, %rax
ja 0xa6d3d
cvtsi2sd %r12, %xmm0
jmp 0xa6d6e
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
leaq 0x2adb40(%rip), %rsi    # 0x3548ba
movq %r14, %rdi
callq 0xa6e40
movq %rax, %r15
leaq 0x2a8c8f(%rip), %rsi    # 0x34fa1b
movq %r14, %rdi
callq 0xa6e40
movq %rax, %r12
addq %r15, %r12
leaq 0x2a8c7f(%rip), %rsi    # 0x34fa20
movq %r14, %rdi
callq 0xa6e40
movq %rax, %r15
leaq 0x2a8c72(%rip), %rsi    # 0x34fa25
movq %r14, %rdi
callq 0xa6e40
movq %rax, %r13
addq %r15, %r13
addq %r12, %r13
leaq 0x2a8c5f(%rip), %rsi    # 0x34fa2a
movq %r14, %rdi
callq 0xa6e40
movq %rax, %r15
leaq 0x2a8c52(%rip), %rsi    # 0x34fa2f
movq %r14, %rdi
callq 0xa6e40
addq %r15, %rax
addq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd (%rsp), %xmm0
mulsd 0x2ab9f0(%rip), %xmm0   # 0x3527f0
leaq 0x2adab8(%rip), %rdi    # 0x3548bf
movb $0x1, %al
callq 0x17070
movq %rbx, %rdi
callq 0x121e8b
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1a490
callq 0x1a4c7
callq 0x1a420
callq 0x1a459
callq 0x1a500