// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_hop.c
// Function: gt_hop_runner
static int gt_hop_runner(GT_UNUSED int argc, GT_UNUSED const char **argv,
    GT_UNUSED int parsed_args, void *tool_arguments, GtError *err)
{
  GtHopArguments *arguments = tool_arguments;
  GtEncseq *encseq;
  GtEncseqLoader *el;
  GtLogger *v_logger;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);
  v_logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX, stdout);
  gt_logger_log(v_logger, "Correction parameters:");
  gt_logger_log(v_logger, "hmin = "GT_WU"", arguments->hmin);
  gt_logger_log(v_logger, "read-hmin = "GT_WU"", arguments->read_hmin);
  gt_logger_log(v_logger, "altmax = %.2f", arguments->altmax);
  gt_logger_log(v_logger, "cogmin = %.2f", arguments->cogmin);
  gt_logger_log(v_logger, "mapqmin = "GT_WU"", arguments->mapqmin);
  gt_logger_log(v_logger, "qmax = "GT_WU"", arguments->qmax);
  gt_logger_log(v_logger, "covmin = "GT_WU"", arguments->covmin);
  if (arguments->clenmax == ULONG_MAX)
    gt_logger_log(v_logger, "clenmax = unlimited");
  else
    gt_logger_log(v_logger, "clenmax = "GT_WU"", arguments->clenmax);
  gt_logger_log(v_logger, "allow-multiple = %s", arguments->allow_multiple
      ? "yes" : "no");
  if (gt_str_length(arguments->annotation) > 0)
    gt_logger_log(v_logger, "restrict to %s feature in annotation %s",
        gt_str_get(arguments->atype), gt_str_get(arguments->annotation));
  gt_assert(gt_str_length(arguments->encseqinput) > 0);
  el = gt_encseq_loader_new();
  encseq = gt_encseq_loader_load(el, gt_str_get(arguments->encseqinput), err);
  if (encseq == NULL)
  {
    had_err = -1;
  }
  if (!had_err)
  {
    GtHpolProcessor *hpp;
    GtSeqposClassifier *spc = NULL;
    GtSamfileIterator *sfi = NULL;
    GtSamfileEncseqMapping *sem = NULL;
    GtAlignedSegmentsPile *asp = NULL;
    GtFile *outfile = NULL;
    GtAlphabet *dna = gt_alphabet_new_dna();
    GtSeqIterator **readset_iters = NULL;
    GtStrArray **infiles = NULL;
    GtFile **outfiles = NULL;
    GtUword nfiles = 0, i;
    hpp = gt_hpol_processor_new(encseq, arguments->hmin);
    if (gt_str_length(arguments->map) > 0)
    {
      if (!arguments->map_is_sam)
        sfi = gt_samfile_iterator_new_bam(gt_str_get(arguments->map), dna, err);
      else
        sfi = gt_samfile_iterator_new_sam(gt_str_get(arguments->map), dna,
            NULL, err);
      if (sfi == NULL)
        had_err = -1;
      sem = gt_samfile_encseq_mapping_new(sfi, encseq, err);
      if (sem == NULL)
        had_err = -1;
      if (!had_err)
      {
        asp = gt_aligned_segments_pile_new(sfi, sem);
        if (!arguments->chk)
          gt_hpol_processor_enable_segments_hlen_adjustment(hpp, asp,
              arguments->read_hmin, arguments->qmax, arguments->altmax,
              arguments->cogmin, arguments->mapqmin, arguments->covmin,
              arguments->allow_partial, arguments->allow_multiple,
              arguments->clenmax);
        else
          gt_hpol_processor_enable_aligned_segments_refregionscheck(hpp, asp);
        if (arguments->stats || arguments->state_of_truth)
          gt_hpol_processor_enable_statistics_output(hpp,
              arguments->state_of_truth, NULL);
        if (!had_err && gt_str_length(arguments->outfilename) > 0)
        {
          outfile = gt_file_new(gt_str_get(arguments->outfilename), "w", err);
          if (outfile == NULL)
            had_err = -1;
          else
            gt_hpol_processor_enable_direct_segments_output(hpp, outfile);
        }
        else if (!had_err)
        {
          nfiles = gt_str_array_size(arguments->readset);
          if (!had_err && nfiles > 0)
          {
            GtStr *outfn = gt_str_new();
            infiles = gt_calloc((size_t)nfiles, sizeof (*infiles));
            outfiles = gt_calloc((size_t)nfiles, sizeof (*outfiles));
            readset_iters = gt_malloc(sizeof (*readset_iters) * nfiles);
            for (i = 0; i < nfiles && !had_err; i++)
            {
              char *bn;
              gt_str_set(outfn, gt_str_get(arguments->outprefix));
              infiles[i] = gt_str_array_new();
              gt_str_array_add_cstr(infiles[i],
                  gt_str_array_get(arguments->readset, i));
              bn = gt_basename(gt_str_array_get(arguments->readset, i));
              gt_str_append_cstr(outfn, bn);
              outfiles[i] = gt_file_new(gt_str_get(outfn), "w", err);
              if (outfiles[i] == NULL)
                had_err = -1;
              readset_iters[i] =
                gt_seq_iterator_fastq_new(infiles[i], err);
              if (readset_iters[i] == NULL)
                had_err = -1;
              gt_seq_iterator_fastq_relax_check_of_quality_description(
                  (GtSeqIteratorFastQ*)readset_iters[i]);
              gt_free(bn);
            }
            if (!had_err)
              gt_hpol_processor_enable_sorted_segments_output(hpp, nfiles,
                  readset_iters, outfiles);
            gt_str_delete(outfn);
          }
        }
      }
    }
    if (!had_err && gt_str_length(arguments->annotation) > 0)
    {
      spc = gt_seqpos_classifier_new(gt_str_get(arguments->annotation),
          gt_str_get(arguments->atype));
      gt_hpol_processor_restrict_to_feature_type(hpp, spc);
    }
    if (!had_err)
      had_err = gt_hpol_processor_run(hpp, v_logger, err);
    gt_aligned_segments_pile_delete(asp);
    gt_samfile_iterator_delete(sfi);
    gt_samfile_encseq_mapping_delete(sem);
    gt_seqpos_classifier_delete(spc);
    gt_file_delete(outfile);
    gt_hpol_processor_delete(hpp);
    for (i = 0; i < nfiles; i++)
    {
      gt_assert(infiles != NULL);
      gt_assert(readset_iters != NULL);
      gt_assert(outfiles != NULL);
      gt_str_array_delete(infiles[i]);
      gt_seq_iterator_delete(readset_iters[i]);
      gt_file_delete(outfiles[i]);
    }
    gt_free(infiles);
    gt_free(outfiles);
    gt_free(readset_iters);
    gt_alphabet_delete(dna);
  }
  gt_logger_delete(v_logger);
  gt_encseq_delete(encseq);
  gt_encseq_loader_delete(el);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r14
movq %rcx, %rbp
testq %r8, %r8
je 0x2e667
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x2ee48
testq %rbp, %rbp
je 0x2edec
movzbl 0x60(%rbp), %edi
movq 0x409835(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2b824f(%rip), %rsi    # 0x2e68d4
callq 0x92b50
movq %rax, %r12
leaq 0x2c08a1(%rip), %rsi    # 0x2eef35
movq %rax, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x30(%rbp), %rdx
leaq 0x2c08a8(%rip), %rsi    # 0x2eef51
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x40(%rbp), %rdx
leaq 0x2c088e(%rip), %rsi    # 0x2eef4c
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movsd 0x70(%rbp), %xmm0
leaq 0x2c0888(%rip), %rsi    # 0x2eef5c
movq %r12, %rdi
movb $0x1, %al
callq 0x92e71
movsd 0x78(%rbp), %xmm0
leaq 0x2c0880(%rip), %rsi    # 0x2eef6a
movq %r12, %rdi
movb $0x1, %al
callq 0x92e71
movq 0x50(%rbp), %rdx
leaq 0x2c0879(%rip), %rsi    # 0x2eef78
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x58(%rbp), %rdx
leaq 0x2c0872(%rip), %rsi    # 0x2eef86
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x48(%rbp), %rdx
leaq 0x2c0868(%rip), %rsi    # 0x2eef91
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x38(%rbp), %rdx
cmpq $-0x1, %rdx
je 0x2e750
leaq 0x2c086e(%rip), %rsi    # 0x2eefb2
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
jmp 0x2e761
leaq 0x2c0847(%rip), %rsi    # 0x2eef9e
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
leaq 0x2f8ca5(%rip), %rax    # 0x32740d
leaq 0x33103c(%rip), %rdx    # 0x35f7ab
cmpb $0x0, 0x65(%rbp)
cmovneq %rax, %rdx
leaq 0x2c0842(%rip), %rsi    # 0x2eefc0
movq %r12, %rdi
xorl %eax, %eax
callq 0x92e71
movq 0x8(%rbp), %rdi
callq 0xad289
testq %rax, %rax
je 0x2e7c2
movq 0x20(%rbp), %rdi
callq 0xad1fa
movq %rax, %rbx
movq 0x8(%rbp), %rdi
callq 0xad1fa
leaq 0x2c0822(%rip), %rsi    # 0x2eefd4
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x92e71
movq (%rbp), %rdi
callq 0xad289
testq %rax, %rax
je 0x2ee1a
callq 0x791cd
movq %rax, %r15
movq (%rbp), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x7921d
movq %rax, %r13
testq %rax, %rax
je 0x2e85c
callq 0x56967
movq %rax, 0x40(%rsp)
movq 0x30(%rbp), %rsi
movq %r13, %rdi
callq 0xee1e0
movq %rax, 0x8(%rsp)
movq 0x10(%rbp), %rdi
callq 0xad289
testq %rax, %rax
movq %r14, 0x38(%rsp)
movq %r15, 0x70(%rsp)
movq %r13, 0x68(%rsp)
je 0x2e864
movq 0x10(%rbp), %rdi
movb 0x61(%rbp), %bl
callq 0xad1fa
testb %bl, %bl
movq %rbp, 0x60(%rsp)
movq %rax, %rdi
je 0x2e89f
movq 0x40(%rsp), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x113c50
jmp 0x2e8ac
pushq $-0x1
popq %rbx
jmp 0x2ecb0
movq $0x0, 0x18(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r14d, %r14d
movq $0x0, 0x58(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
jmp 0x2eb75
movq 0x40(%rsp), %rsi
movq %r14, %rdx
callq 0x113c3c
movq %r14, %rdx
testq %rax, %rax
sete %bpl
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0x1137e8
movq %rax, %rcx
testq %rax, %rax
sete %al
pushq $-0x1
popq %rdx
movl %edx, 0x2c(%rsp)
orb %bpl, %al
movq %r14, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
jne 0x2e90d
movq %r14, %rdi
movq %rcx, %rsi
callq 0xb4738
movq 0x60(%rsp), %rbp
cmpb $0x0, 0x62(%rbp)
movq %rax, 0x30(%rsp)
je 0x2e936
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xee38a
jmp 0x2e976
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rbp
jmp 0x2ebe6
movq 0x40(%rbp), %rdx
movq 0x58(%rbp), %rcx
movsd 0x70(%rbp), %xmm0
movsd 0x78(%rbp), %xmm1
movq 0x50(%rbp), %r8
movq 0x48(%rbp), %r9
movzbl 0x64(%rbp), %r11d
movzbl 0x65(%rbp), %r10d
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %rax, %rsi
pushq 0x38(%rbp)
pushq %r10
pushq %r11
callq 0xee643
addq $0x20, %rsp
movq 0x38(%rsp), %rbx
movb 0x63(%rbp), %al
movb 0x6a(%rbp), %cl
movl %eax, %edx
orb %cl, %dl
testb $0x1, %dl
je 0x2e9a0
notb %al
orb %cl, %al
movzbl %al, %esi
andl $0x1, %esi
movq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0xeeb20
movq 0x18(%rbp), %rdi
callq 0xad289
testq %rax, %rax
je 0x2e9e9
movq 0x18(%rbp), %rdi
callq 0xad1fa
leaq 0x304f50(%rip), %rsi    # 0x33390e
movq %rax, %rdi
movq %rbx, %rdx
callq 0x8ce05
testq %rax, %rax
je 0x2ecd9
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rax, %rsi
callq 0xeea40
jmp 0x2eb63
movq 0x80(%rbp), %rdi
callq 0xae61c
movq $0x0, 0x20(%rsp)
testq %rax, %rax
je 0x2eb63
movq %rax, %r14
movq %r12, 0x48(%rsp)
callq 0xacb84
movq %rax, 0x10(%rsp)
leaq 0x2bf825(%rip), %r12    # 0x2ee245
pushq $0x8
popq %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x1da, %ecx            # imm = 0x1DA
callq 0x9334a
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x1db, %ecx            # imm = 0x1DB
callq 0x9334a
movq %rax, %r13
movq %r14, 0x18(%rsp)
leaq (,%r14,8), %rdi
movq %r12, %rsi
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x93160
movq %rax, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq 0x18(%rsp), %rbx
jae 0x2ecf8
testl %r12d, %r12d
jne 0x2ecf8
movq 0x28(%rbp), %rdi
callq 0xad1fa
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xacc8b
callq 0xae154
movq %rax, %r12
movq %rax, (%r15,%rbx,8)
movq 0x80(%rbp), %rdi
movq %rbx, %rsi
callq 0xae386
movq %r12, %rdi
movq %rax, %rsi
callq 0xae22f
movq 0x80(%rbp), %rdi
movq %rbx, %rsi
callq 0xae386
movq %rax, %rdi
callq 0x5a384
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0xacbfb
movq %r12, %rdi
callq 0xad1fa
movq %rax, %rdi
leaq 0x304e0f(%rip), %rsi    # 0x33390e
movq 0x38(%rsp), %r12
movq %r12, %rdx
callq 0x8ce05
movq %rax, (%r13,%rbx,8)
testq %rax, %rax
sete %bpl
movq (%r15,%rbx,8), %rdi
movq %r12, %rsi
callq 0xa6e33
movq %rax, (%r14,%rbx,8)
testq %rax, %rax
sete %cl
orb %bpl, %cl
movq 0x60(%rsp), %rbp
movzbl %cl, %r12d
negl %r12d
movq %rax, %rdi
callq 0xa6df0
movq 0x20(%rsp), %rdi
leaq 0x2bf6f4(%rip), %rsi    # 0x2ee245
movl $0x1ef, %edx            # imm = 0x1EF
callq 0x936f9
incq %rbx
jmp 0x2ea71
movq $0x0, 0x18(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x8(%rbp), %rdi
callq 0xad289
testq %rax, %rax
je 0x2ebba
movq 0x8(%rbp), %rdi
callq 0xad1fa
movq %rax, %rbx
movq 0x20(%rbp), %rdi
callq 0xad1fa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x117720
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
callq 0xee319
jmp 0x2ebc8
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq 0x38(%rsp), %rdx
callq 0xeed6c
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rbx
callq 0xb4e2d
movq 0x58(%rsp), %rdi
callq 0x113bc4
movq 0x50(%rsp), %rdi
callq 0x113a59
movq 0x10(%rsp), %rdi
callq 0x117b96
movq %rbx, %rdi
callq 0x8da06
movq %rbp, %rdi
callq 0xefc7a
xorl %ebx, %ebx
movq 0x18(%rsp), %rbp
cmpq %rbx, %rbp
je 0x2ec61
testq %r15, %r15
je 0x2ed58
testq %r14, %r14
je 0x2ed86
testq %r13, %r13
je 0x2edb4
movq (%r15,%rbx,8), %rdi
callq 0xae662
movq (%r14,%rbx,8), %rdi
callq 0xa6389
movq (%r13,%rbx,8), %rdi
callq 0x8da06
incq %rbx
jmp 0x2ec20
leaq 0x2bf5dd(%rip), %rbx    # 0x2ee245
movq %r15, %rdi
movq %rbx, %rsi
movl $0x210, %edx            # imm = 0x210
callq 0x936f9
movq %r13, %rdi
movq %rbx, %rsi
movl $0x211, %edx            # imm = 0x211
callq 0x936f9
movq %r14, %rdi
movq %rbx, %rsi
movl $0x212, %edx            # imm = 0x212
callq 0x936f9
movq 0x40(%rsp), %rdi
callq 0x568b5
movq 0x70(%rsp), %r15
movq 0x68(%rsp), %r13
movl 0x2c(%rsp), %ebx
movq %r12, %rdi
callq 0x92fd0
movq %r13, %rdi
callq 0x735fd
movq %r15, %rdi
callq 0x79f01
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq $0x0, 0x18(%rsp)
jmp 0x2ed17
testl %r12d, %r12d
je 0x2ed26
movq 0x10(%rsp), %rdi
callq 0xae103
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
movq 0x48(%rsp), %r12
movq 0x8(%rsp), %rbp
movq 0x30(%rsp), %rdi
jmp 0x2ebe6
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0xeea8d
movq 0x10(%rsp), %rdi
callq 0xae103
movq $0x0, 0x20(%rsp)
movq 0x48(%rsp), %r12
jmp 0x2eb75
movq 0x409209(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b62aa(%rip), %rsi    # 0x2e5013
leaq 0x2c02b6(%rip), %rdx    # 0x2ef026
leaq 0x2c01b0(%rip), %rcx    # 0x2eef27
leaq 0x2bf4c7(%rip), %r8     # 0x2ee245
movl $0x209, %r9d            # imm = 0x209
jmp 0x2ede0
movq 0x4091db(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b627c(%rip), %rsi    # 0x2e5013
leaq 0x2c0298(%rip), %rdx    # 0x2ef036
leaq 0x2c0182(%rip), %rcx    # 0x2eef27
leaq 0x2bf499(%rip), %r8     # 0x2ee245
movl $0x20a, %r9d            # imm = 0x20A
jmp 0x2ede0
movq 0x4091ad(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b624e(%rip), %rsi    # 0x2e5013
leaq 0x2c0280(%rip), %rdx    # 0x2ef04c
leaq 0x2c0154(%rip), %rcx    # 0x2eef27
leaq 0x2bf46b(%rip), %r8     # 0x2ee245
movl $0x20b, %r9d            # imm = 0x20B
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x409175(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b6216(%rip), %rsi    # 0x2e5013
leaq 0x31984f(%rip), %rdx    # 0x348653
leaq 0x2c011c(%rip), %rcx    # 0x2eef27
leaq 0x2bf433(%rip), %r8     # 0x2ee245
movl $0x18a, %r9d            # imm = 0x18A
jmp 0x2ede0
movq 0x409147(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b61e8(%rip), %rsi    # 0x2e5013
leaq 0x2c01ca(%rip), %rdx    # 0x2eeffc
leaq 0x2c00ee(%rip), %rcx    # 0x2eef27
leaq 0x2bf405(%rip), %r8     # 0x2ee245
movl $0x19d, %r9d            # imm = 0x19D
jmp 0x2ede0
movq 0x409119(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b61ba(%rip), %rsi    # 0x2e5013
leaq 0x2b635f(%rip), %rdx    # 0x2e51bf
leaq 0x2c00c0(%rip), %rcx    # 0x2eef27
leaq 0x2bf3d7(%rip), %r8     # 0x2ee245
movl $0x189, %r9d            # imm = 0x189
jmp 0x2ede0
nopl (%rax)