// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_encseq_check.c
// Function: gt_encseq_check_runner
static int gt_encseq_check_runner(GT_UNUSED int argc, const char **argv,
                                  int parsed_args, void *tool_arguments,
                                  GtError *err)
{
  GtEncseqCheckArguments *arguments = tool_arguments;
  int had_err = 0;
  GtEncseqLoader *encseq_loader;
  GtEncseq *encseq;
  GtLogger *logger = NULL;

  gt_error_check(err);
  gt_assert(arguments);

  logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX, stdout);
  encseq_loader = gt_encseq_loader_new();
  if (arguments->mirror)
    gt_encseq_loader_mirror(encseq_loader);

  if (!(encseq = gt_encseq_loader_load(encseq_loader, argv[parsed_args], err)))
    had_err = -1;
  if (!had_err) {
    int readmode;

    gt_encseq_check_startpositions(encseq,logger);
    for (readmode = 0; readmode < 4; readmode++) {
      if (gt_alphabet_is_dna(gt_encseq_alphabet(encseq)) ||
           ((GtReadmode) readmode) == GT_READMODE_FORWARD ||
           ((GtReadmode) readmode) == GT_READMODE_REVERSE) {
        gt_logger_log(logger,"check consistency for readmode %s",
                      gt_readmode_show((GtReadmode) readmode));
        if (gt_encseq_check_consistency(encseq,
                           gt_encseq_filenames(encseq),
                           (GtReadmode) readmode,
                           arguments->scantrials,
                           arguments->multicharcmptrials,
                           gt_encseq_has_multiseq_support(encseq),
                           !arguments->nocheckunit,
                           logger,
                           err) != 0) {
          had_err = -1;
          break;
        }
      }
    }
    if (!had_err)
      gt_encseq_check_specialranges(encseq);
    if (!had_err && !arguments->mirror)
      gt_encseq_check_markpos(encseq);
    if (!had_err)
      had_err = gt_encseq_check_minmax(encseq, err);
    if (!had_err && arguments->prefixlength > 0) {
      if (gt_verifymappedstr(encseq,
                             arguments->prefixlength,
                             err) != 0) {
        had_err = -1;
      }
    }
  }
  gt_encseq_delete(encseq);
  gt_encseq_loader_delete(encseq_loader);
  gt_logger_delete(logger);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %r8, (%rsp)
testq %r8, %r8
movq %rcx, 0x8(%rsp)
je 0x259e7
movq (%rsp), %rdi
callq 0x89eb7
testb %al, %al
movq 0x8(%rsp), %rcx
jne 0x25bb7
testq %rcx, %rcx
je 0x25b8d
movzbl 0x18(%rcx), %edi
movq %rcx, %r14
movq 0x4124b2(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2c0ecc(%rip), %rsi    # 0x2e68d4
callq 0x92b50
movq %rax, 0x18(%rsp)
callq 0x791cd
cmpb $0x1, 0x19(%r14)
movq %rax, 0x10(%rsp)
jne 0x25a32
movq 0x10(%rsp), %rdi
callq 0x7d003
movq 0x10(%rsp), %rax
movslq %ebp, %rcx
movq (%r15,%rcx,8), %rsi
movq %rax, %rdi
movq (%rsp), %rdx
callq 0x7921d
movq %rax, %r13
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x25b60
movq %r13, %rdi
movq 0x18(%rsp), %rsi
callq 0x75efc
xorl %ebp, %ebp
movq 0x18(%rsp), %r12
movq %r13, %rdi
cmpl $0x4, %ebp
je 0x25b0d
callq 0x754dd
movq %rax, %rdi
callq 0x5741b
cmpl $0x2, %ebp
jb 0x25a8a
testb %al, %al
je 0x25b06
movl %ebp, %edi
callq 0xa45c4
movq %r12, %rdi
leaq 0x2c58d4(%rip), %rsi    # 0x2eb36f
movq %rax, %rdx
xorl %eax, %eax
callq 0x92e71
movq %r13, %rdi
callq 0x75d3b
movq %rax, %r15
movq %r13, %rbx
movq 0x8(%rsp), %r13
movq (%r13), %r14
movq 0x8(%r13), %rax
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
callq 0x76086
movzbl 0x1a(%r13), %r10d
movq %rbx, %r13
subq $0x8, %rsp
xorl $0x1, %r10d
movzbl %al, %r9d
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movq 0x28(%rsp), %r8
pushq 0x8(%rsp)
pushq %r12
pushq %r10
callq 0x782f6
addq $0x20, %rsp
testl %eax, %eax
jne 0x25b59
incl %ebp
jmp 0x25a68
callq 0x79f18
movq 0x8(%rsp), %rax
cmpb $0x0, 0x19(%rax)
jne 0x25b25
movq %r13, %rdi
callq 0x75251
movq %r13, %rdi
movq (%rsp), %rsi
callq 0x78208
movl %eax, %ebx
testl %eax, %eax
jne 0x25b60
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x25b5e
movq %r13, %rdi
movq (%rsp), %rdx
callq 0x1b36e4
xorl %ebx, %ebx
negl %eax
sbbl %ebx, %ebx
jmp 0x25b60
pushq $-0x1
popq %rbx
jmp 0x25b60
xorl %ebx, %ebx
movq %r13, %rdi
callq 0x735fd
movq 0x10(%rsp), %rdi
callq 0x79f01
movq 0x18(%rsp), %rdi
callq 0x92fd0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4123d4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2bf475(%rip), %rsi    # 0x2e5013
leaq 0x322aae(%rip), %rdx    # 0x348653
leaq 0x2c57ac(%rip), %rcx    # 0x2eb358
leaq 0x2c5681(%rip), %r8     # 0x2eb234
pushq $0x66
jmp 0x25bdf
movq 0x4123aa(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2bf44b(%rip), %rsi    # 0x2e5013
leaq 0x2bf5f0(%rip), %rdx    # 0x2e51bf
leaq 0x2c5782(%rip), %rcx    # 0x2eb358
leaq 0x2c5657(%rip), %r8     # 0x2eb234
pushq $0x65
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nopl (%rax)