// File: /workspace/github_c_makefile_star2_O3/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 0xabab2
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0xac1ea
testq %rbp, %rbp
je 0xac1e0
movzbl 0x60(%rbp), %edi
movq 0x40d412(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x29ae04(%rip), %rsi    # 0x3468d4
callq 0x103e40
movq %rax, %r12
leaq 0x2a3456(%rip), %rsi    # 0x34ef35
movq %rax, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x30(%rbp), %rdx
leaq 0x2a345d(%rip), %rsi    # 0x34ef51
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x40(%rbp), %rdx
leaq 0x2a3443(%rip), %rsi    # 0x34ef4c
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movsd 0x70(%rbp), %xmm0
leaq 0x2a343d(%rip), %rsi    # 0x34ef5c
movq %r12, %rdi
movb $0x1, %al
callq 0x103fe1
movsd 0x78(%rbp), %xmm0
leaq 0x2a3435(%rip), %rsi    # 0x34ef6a
movq %r12, %rdi
movb $0x1, %al
callq 0x103fe1
movq 0x50(%rbp), %rdx
leaq 0x2a342e(%rip), %rsi    # 0x34ef78
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x58(%rbp), %rdx
leaq 0x2a3427(%rip), %rsi    # 0x34ef86
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x48(%rbp), %rdx
leaq 0x2a341d(%rip), %rsi    # 0x34ef91
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x38(%rbp), %rdx
cmpq $-0x1, %rdx
je 0xabb9b
leaq 0x2a3423(%rip), %rsi    # 0x34efb2
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0xabbac
leaq 0x2a33fc(%rip), %rsi    # 0x34ef9e
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
leaq 0x2db45a(%rip), %rax    # 0x38700d
leaq 0x3137a1(%rip), %rdx    # 0x3bf35b
cmpb $0x0, 0x65(%rbp)
cmovneq %rax, %rdx
leaq 0x2a33f7(%rip), %rsi    # 0x34efc0
movq %r12, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x8(%rbp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xabc0d
movq 0x20(%rbp), %rdi
callq 0x11b0a1
movq %rax, %rbx
movq 0x8(%rbp), %rdi
callq 0x11b0a1
leaq 0x2a33d7(%rip), %rsi    # 0x34efd4
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x103fe1
movq (%rbp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xac1e5
callq 0xef0cd
movq %rax, %r13
movq (%rbp), %rdi
callq 0x11b0a1
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xef129
movq %rax, %r15
testq %rax, %rax
je 0xabca2
callq 0xd0ece
movq %rax, 0x48(%rsp)
movq 0x30(%rbp), %rsi
movq %r15, %rdi
callq 0x152338
movq %rax, 0x8(%rsp)
movq 0x10(%rbp), %rdi
callq 0x11b0ca
testq %rax, %rax
movq %r13, 0x70(%rsp)
movq %r15, 0x68(%rsp)
je 0xabcac
movq 0x10(%rbp), %rdi
movb 0x61(%rbp), %bl
callq 0x11b0a1
testb %bl, %bl
movq %rbp, 0x10(%rsp)
movq %rax, %rdi
je 0xabcf2
movq 0x48(%rsp), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x170afc
jmp 0xabcff
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xac189
movq %r14, 0x40(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movq $0x0, 0x60(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x58(%rsp)
jmp 0xac046
movq 0x48(%rsp), %rsi
movq %r14, %rdx
callq 0x170ae8
movq %rax, %r13
testq %rax, %rax
sete %bpl
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x170720
movq %rax, %rcx
testq %rax, %rax
sete %al
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
orb %bpl, %al
movq %r13, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
jne 0xabd61
movq %r13, %rdi
movq %rcx, %rsi
callq 0x1208e0
movq 0x10(%rsp), %rbp
cmpb $0x0, 0x62(%rbp)
movq %rax, 0x38(%rsp)
je 0xabd8a
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x152445
jmp 0xabdca
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rbp
jmp 0xac0bc
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 0x15265a
addq $0x20, %rsp
movb 0x63(%rbp), %al
movb 0x6a(%rbp), %cl
movl %eax, %edx
orb %cl, %dl
testb $0x1, %dl
je 0xabdef
notb %al
orb %cl, %al
movzbl %al, %esi
andl $0x1, %esi
movq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x15290d
movq 0x18(%rbp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xabe55
movq 0x18(%rbp), %rdi
callq 0x11b0a1
leaq 0x2e77a8(%rip), %rsi    # 0x3935b5
movq %rax, %rdi
movq %r14, %rdx
callq 0xfea8a
testq %rax, %rax
je 0xabff9
movq %r14, 0x40(%rsp)
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rsi
callq 0x152891
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
jmp 0xac046
movq %r14, 0x40(%rsp)
movq 0x80(%rbp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xac025
movq %rax, %rbx
movq %r12, 0x50(%rsp)
callq 0x11ac6c
movq %rax, 0x18(%rsp)
leaq 0x2a23bd(%rip), %r14    # 0x34e245
movl $0x8, %esi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x1da, %ecx            # imm = 0x1DA
callq 0x10436a
movq %rax, %r15
movl $0x8, %esi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x1db, %ecx            # imm = 0x1DB
callq 0x10436a
movq %rax, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
leaq (,%rbx,8), %rdi
movq %r14, %rsi
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x104226
movq %rax, %r14
xorl %ebx, %ebx
movq 0x10(%rsp), %r13
movq 0x28(%r13), %rdi
callq 0x11b0a1
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %rax, %rsi
callq 0x11ad62
callq 0x11be10
movq %rax, %r12
movq %rax, (%r15,%rbx,8)
movq 0x80(%r13), %rdi
movq %rbx, %rsi
callq 0x11bfb3
movq %r12, %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0x80(%r13), %rdi
movq %rbx, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0xd3e84
movq %rax, %r12
movq %rbp, %rdi
movq %rax, %rsi
callq 0x11acf3
movq %rbp, %rdi
callq 0x11b0a1
movq %rax, %rdi
leaq 0x2e7661(%rip), %rsi    # 0x3935b5
movq 0x40(%rsp), %rbp
movq %rbp, %rdx
callq 0xfea8a
movq 0x20(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
testq %rax, %rax
setne %r13b
movq (%r15,%rbx,8), %rdi
movq %rbp, %rsi
callq 0x114cc9
movq %rax, (%r14,%rbx,8)
testq %rax, %rax
setne %bpl
andb %r13b, %bpl
movq %rax, %rdi
callq 0x114cb9
movq %r12, %rdi
leaq 0x2a22a8(%rip), %rsi    # 0x34e245
movl $0x1ef, %edx            # imm = 0x1EF
callq 0x1045eb
incq %rbx
cmpq 0x28(%rsp), %rbx
jae 0xabfba
testb %bpl, %bpl
jne 0xabed9
testb %bpl, %bpl
je 0xac1b2
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
movq 0x20(%rsp), %rcx
callq 0x1528ab
movq 0x18(%rsp), %rdi
callq 0x11bdbf
movq $0x0, 0x18(%rsp)
movq 0x50(%rsp), %r12
movq 0x10(%rsp), %rbp
jmp 0xac046
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rbp
movq 0x38(%rsp), %rdi
jmp 0xac0bc
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movq $0x0, 0x18(%rsp)
movq 0x8(%rbp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xac08b
movq 0x8(%rbp), %rdi
callq 0x11b0a1
movq %rax, %rbx
movq 0x20(%rbp), %rdi
callq 0x11b0a1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x173878
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
callq 0x15242a
jmp 0xac099
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0x152b26
movl %eax, 0x34(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %rbx
callq 0x120cfa
movq 0x60(%rsp), %rdi
callq 0x170a6a
movq 0x58(%rsp), %rdi
callq 0x170950
movq 0x10(%rsp), %rdi
callq 0x173b68
movq %rbx, %rdi
callq 0xff22c
movq %rbp, %rdi
callq 0x15397e
testq %r13, %r13
movq 0x20(%rsp), %rbp
je 0xac13a
testq %r15, %r15
je 0xac1ef
testq %r14, %r14
je 0xac1f4
testq %rbp, %rbp
je 0xac1f9
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
callq 0x11c144
movq (%r14,%rbx,8), %rdi
callq 0x11437f
movq (%rbp,%rbx,8), %rdi
callq 0xff22c
incq %rbx
cmpq %rbx, %r13
jne 0xac116
leaq 0x2a2104(%rip), %rbx    # 0x34e245
movq %r15, %rdi
movq %rbx, %rsi
movl $0x210, %edx            # imm = 0x210
callq 0x1045eb
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x211, %edx            # imm = 0x211
callq 0x1045eb
movq %r14, %rdi
movq %rbx, %rsi
movl $0x212, %edx            # imm = 0x212
callq 0x1045eb
movq 0x48(%rsp), %rdi
callq 0xd0e1c
movq 0x68(%rsp), %r15
movl 0x34(%rsp), %ebx
movq 0x70(%rsp), %r13
movq %r12, %rdi
callq 0x1040e0
movq %r15, %rdi
callq 0xea375
movq %r13, %rdi
callq 0xefbe3
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rdi
callq 0x11bdbf
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
movq 0x50(%rsp), %r12
movq 0x8(%rsp), %rbp
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r13
jmp 0xac0bc
callq 0x1bb97
callq 0x1bb5e
callq 0x1ba7a
callq 0x1bb25
callq 0x1baec
callq 0x1bab3
nop