// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/ltr/gt_ltrharvest.c
// Function: gt_ltrharvest_runner
static int gt_ltrharvest_runner(GT_UNUSED int argc,
                                  GT_UNUSED const char **argv,
                                  GT_UNUSED int parsed_args,
                                  void *tool_arguments, GtError *err)
{
  GtNodeStream *ltrh_stream,
               *gff3_out_stream = NULL,
               *out_stream = NULL,
               *fasta_out_stream = NULL,
               *fasta_inner_out_stream = NULL,
               *last_stream;
  GtFile *gff3file = NULL,
         *fastaoutfile = NULL,
         *fastainneroutfile = NULL;
  LTRharvestArguments *arguments = tool_arguments;
  const GtEncseq *encseq = NULL;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  /* create a LTRharvest stream */
  ltrh_stream = gt_ltrharvest_stream_new(arguments->str_indexname,
                                         arguments->searchrange,
                                         arguments->minseedlength,
                                         arguments->minltrlength,
                                         arguments->maxltrlength,
                                         arguments->mindistance,
                                         arguments->maxdistance,
                                         arguments->similaritythreshold,
                                         arguments->xdropbelowscore,
                                         arguments->arbitscores,
                                         arguments->motif,
                                         arguments->verbosemode,
                                         arguments->nooverlaps,
                                         arguments->bestoverlaps,
                                         arguments->scan,
                                         arguments->offset,
                                         arguments->minlengthTSD,
                                         arguments->maxlengthTSD,
                                         (GtUword) arguments->vicinity,
                                         err);
  if (ltrh_stream == NULL)
    return -1;
  if (!arguments->md5)
    gt_ltrharvest_stream_disable_md5_seqids((GtLTRharvestStream*) ltrh_stream);
  else
    gt_ltrharvest_stream_enable_md5_seqids((GtLTRharvestStream*) ltrh_stream);
  if (!arguments->seqids)
    gt_ltrharvest_stream_disable_seqids((GtLTRharvestStream*) ltrh_stream);
  else
    gt_ltrharvest_stream_enable_seqids((GtLTRharvestStream*) ltrh_stream);
  last_stream = ltrh_stream;

  encseq = gt_ltrharvest_stream_get_encseq(ltrh_stream);

  if (arguments->tabout) {
    GtNodeVisitor *tabout_visitor = NULL;
    /* set visitors according to output parameter */
    if (!had_err && arguments->longoutput) {
      tabout_visitor = gt_ltrharvest_tabout_visitor_new_longoutput(encseq);
    } else {
      tabout_visitor = gt_ltrharvest_tabout_visitor_new();
    }

    /* create tabular output stream (traditional LTRharvest format) */
    out_stream = gt_ltrharvest_tabout_stream_new(last_stream, tabout_visitor);
  } else {
    out_stream = gt_gff3_out_stream_new(last_stream, NULL);
  }
  last_stream = out_stream;

  /* attach GFF3 output stream if requested */
  if (!had_err && arguments->gff3output) {
    gff3file = gt_file_open(GT_FILE_MODE_UNCOMPRESSED,
                            gt_str_get(arguments->str_gff3filename),
                            "w+",
                            err);
    if (gff3file == NULL) {
      had_err = -1;
    } else {
      gff3_out_stream = gt_gff3_out_stream_new(last_stream, gff3file);
      last_stream = gff3_out_stream;
    }
  }

  /* attach FASTA output stream if requested */
  if (!had_err && arguments->fastaoutput) {
    fastaoutfile = gt_file_open(GT_FILE_MODE_UNCOMPRESSED,
                                gt_str_get(arguments->str_fastaoutputfilename),
                                "w+",
                                err);
    if (fastaoutfile == NULL) {
      had_err = -1;
    } else {
      fasta_out_stream = gt_ltrharvest_fasta_out_stream_new(last_stream,
                                                            false,
                                                            encseq,
                                                            60UL,
                                                            fastaoutfile);
      last_stream = fasta_out_stream;
    }
  }

  /* attach FASTA inner region output stream if requested */
  if (!had_err && arguments->fastaoutputinnerregion) {
    fastainneroutfile = gt_file_open(GT_FILE_MODE_UNCOMPRESSED,
                      gt_str_get(arguments->str_fastaoutputfilenameinnerregion),
                      "w+", err);
    if (fastainneroutfile == NULL) {
      had_err = -1;
    } else {
      fasta_inner_out_stream = gt_ltrharvest_fasta_out_stream_new(last_stream,
                                                             true,
                                                             encseq,
                                                             60UL,
                                                             fastainneroutfile);
      last_stream = fasta_inner_out_stream;
    }
  }

  /* output arguments line */
  if (!had_err && arguments->tabout)
    gt_ltrharvest_showargsline(argc, argv);

  /* show long parameters */
  if (!had_err && arguments->tabout && arguments->verbosemode)
    gt_ltrharvest_showopts(arguments);

  /* print tabular output header */
  if (!had_err && arguments->tabout) {
    if (arguments->longoutput) {
      gt_ltrharvest_tabout_stream_printlongheader(arguments->minlengthTSD > 1U,
                                             arguments->allowedmismatches < 4U);
    } else {
      gt_ltrharvest_tabout_stream_printshortheader();
    }
  }

  /* pull the features through the stream and free them afterwards */
  if (!had_err)
    had_err = gt_node_stream_pull(last_stream, err);

  /* free */
  gt_node_stream_delete(gff3_out_stream);
  gt_node_stream_delete(out_stream);
  gt_node_stream_delete(fasta_out_stream);
  gt_node_stream_delete(fasta_inner_out_stream);
  gt_node_stream_delete(ltrh_stream);

  if (gff3file != NULL) gt_file_delete(gff3file);
  if (fastaoutfile != NULL) gt_file_delete(fastaoutfile);
  if (fastainneroutfile != NULL) gt_file_delete(fastainneroutfile);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %rbx
movq %rcx, %rbp
movq %rsi, 0xb8(%rsp)
movl %edi, %r14d
testq %r8, %r8
je 0x1ba587
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1bacdc
movq %r14, 0xd8(%rsp)
movq %rbx, 0xb0(%rsp)
testq %rbp, %rbp
je 0x1bacae
movq 0x50(%rbp), %rax
movq %rax, 0x88(%rsp)
movq 0x58(%rbp), %rax
movq %rax, 0x80(%rsp)
movq 0x60(%rbp), %r9
movups 0x68(%rbp), %xmm1
movsd 0x88(%rbp), %xmm0
movl 0x90(%rbp), %r8d
movq 0xf0(%rbp), %r10
movzbl 0xbb(%rbp), %r11d
movzbl 0xb5(%rbp), %ebx
movzbl 0xb4(%rbp), %ecx
movzbl 0xba(%rbp), %r14d
movq 0x80(%rbp), %r12
movl 0xa4(%rbp), %r13d
movl 0xa8(%rbp), %eax
movl 0xb0(%rbp), %r15d
movq 0x10(%rbp), %rdi
movq 0x40(%rbp), %rsi
movups 0x94(%rbp), %xmm2
movq 0x48(%rbp), %rdx
movaps %xmm2, 0xe0(%rsp)
movaps 0xe0(%rsp), %xmm2
movups %xmm2, 0x18(%rsp)
movq %r15, 0x68(%rsp)
movl %eax, 0x60(%rsp)
movl %r13d, 0x58(%rsp)
movq %r12, 0x50(%rsp)
movl %r14d, 0x48(%rsp)
movl %ecx, 0x40(%rsp)
movl %ebx, 0x38(%rsp)
movl %r11d, 0x30(%rsp)
movq %r10, 0x28(%rsp)
movl %r8d, 0x10(%rsp)
movq 0xb0(%rsp), %r14
movq %r14, 0x70(%rsp)
movups %xmm1, (%rsp)
movq 0x80(%rsp), %r8
movq 0x88(%rsp), %rcx
callq 0x1c4c25
testq %rax, %rax
je 0x1ba6a7
movq %rax, %r15
cmpb $0x0, 0xbd(%rbp)
je 0x1ba6af
movq %r15, %rdi
callq 0x1c4b53
jmp 0x1ba6b7
pushq $-0x1
popq %rbx
jmp 0x1bac9a
movq %r15, %rdi
callq 0x1c4b0d
cmpb $0x0, 0xbe(%rbp)
je 0x1ba6ca
movq %r15, %rdi
callq 0x1c4bdf
jmp 0x1ba6d2
movq %r15, %rdi
callq 0x1c4b99
movq %r15, %rdi
callq 0x1c4ab3
movq %rax, %r12
cmpb $0x1, 0xbc(%rbp)
jne 0x1ba6f9
cmpb $0x1, 0xb9(%rbp)
jne 0x1ba705
movq %r12, %rdi
callq 0x1c6d9a
jmp 0x1ba70a
movq %r15, %rdi
xorl %esi, %esi
callq 0xe07df
jmp 0x1ba715
callq 0x1c6d2e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1c6364
movq %rax, 0x88(%rsp)
cmpb $0x1, 0xb8(%rbp)
jne 0x1ba771
movq 0x38(%rbp), %rdi
callq 0xad1fa
leaq 0x12af33(%rip), %rdx    # 0x2e5669
xorl %edi, %edi
movq %rax, %rsi
movq %r14, %rcx
callq 0x8cea6
testq %rax, %rax
je 0x1baad5
movq 0x88(%rsp), %rdi
movq %rax, 0x98(%rsp)
movq %rax, %rsi
callq 0xe07df
movq %rax, %rbx
movq %rax, 0x90(%rsp)
jmp 0x1ba791
movq $0x0, 0x90(%rsp)
movq 0x88(%rsp), %rbx
movq $0x0, 0x98(%rsp)
cmpb $0x1, 0xb6(%rbp)
jne 0x1ba7e8
movq 0x28(%rbp), %rdi
callq 0xad1fa
leaq 0x12aebf(%rip), %rdx    # 0x2e5669
xorl %edi, %edi
movq %rax, %rsi
movq %r14, %rcx
callq 0x8cea6
testq %rax, %rax
je 0x1baaf6
pushq $0x3c
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rax, %r8
movq %rax, 0xa8(%rsp)
callq 0x1c3788
movq %rax, %rbx
movq %rax, 0xa0(%rsp)
jmp 0x1ba800
movq $0x0, 0xa0(%rsp)
movq $0x0, 0xa8(%rsp)
cmpb $0x1, 0xb7(%rbp)
jne 0x1ba859
movq %rbx, %r13
movq 0x30(%rbp), %rdi
callq 0xad1fa
leaq 0x12ae4d(%rip), %rdx    # 0x2e5669
xorl %edi, %edi
movq %rax, %rsi
movq %r14, %rcx
callq 0x8cea6
testq %rax, %rax
je 0x1bab22
movq %rax, %rbx
pushq $0x1
popq %rsi
pushq $0x3c
popq %rcx
movq %r13, %rdi
movq %r12, %rdx
movq %rax, %r8
callq 0x1c3788
movq %rax, %r13
movq %rbx, 0x80(%rsp)
movq %rax, %rbx
jmp 0x1ba868
xorl %r13d, %r13d
movq $0x0, 0x80(%rsp)
movb 0xbc(%rbp), %al
cmpb $0x1, %al
jne 0x1ba92d
movq %r13, 0xc0(%rsp)
movq %rbx, 0xc8(%rsp)
movq %r15, 0xd0(%rsp)
movq 0xd8(%rsp), %r14
testl %r14d, %r14d
jle 0x1bad0a
cmpq $0x0, 0xb8(%rsp)
je 0x1bad0a
leaq 0x1a4c62(%rip), %rdi    # 0x35f517
xorl %eax, %eax
callq 0x17070
leal -0x1(%r14), %ebx
movl %r14d, %r14d
pushq $0x1
popq %r13
leaq 0x1ae5db(%rip), %r12    # 0x368ea9
pushq $0x20
popq %r15
cmpq %r13, %r14
je 0x1ba8ff
movq 0xb8(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x17070
cmpq %r13, %rbx
je 0x1ba8fa
movl %r15d, %edi
callq 0x179c0
incq %r13
jmp 0x1ba8d2
pushq $0xa
popq %rdi
callq 0x179c0
movb 0xbc(%rbp), %al
movq 0xb0(%rsp), %r14
movq 0xd0(%rsp), %r15
movq 0xc8(%rsp), %rbx
movq 0xc0(%rsp), %r13
testb $0x1, %al
je 0x1babdf
cmpb $0x1, 0xbb(%rbp)
jne 0x1babdf
leaq 0x1a4de3(%rip), %rdi    # 0x35f72c
callq 0x17b60
leaq 0x1a4e0f(%rip), %rax    # 0x35f764
leaq 0x1a4df3(%rip), %rdi    # 0x35f74f
cmpb $0x0, 0xbb(%rbp)
cmovneq %rax, %rdi
callq 0x17b60
movq 0x10(%rbp), %rdi
callq 0xad1fa
leaq 0x1a4ba3(%rip), %rdi    # 0x35f51f
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0xb6(%rbp)
jne 0x1ba9a9
movq 0x28(%rbp), %rdi
callq 0xad1fa
leaq 0x1a4b93(%rip), %rdi    # 0x35f532
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0xb7(%rbp)
jne 0x1ba9cc
movq 0x30(%rbp), %rdi
callq 0xad1fa
leaq 0x1a4b84(%rip), %rdi    # 0x35f546
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0xb8(%rbp)
jne 0x1ba9ef
movq 0x38(%rbp), %rdi
callq 0xad1fa
leaq 0x1a4b82(%rip), %rdi    # 0x35f567
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movl 0x90(%rbp), %esi
leaq 0x1a4b8b(%rip), %rdi    # 0x35f587
xorl %eax, %eax
callq 0x17070
movsd 0x88(%rbp), %xmm0
leaq 0x1a4b8e(%rip), %rdi    # 0x35f5a0
movb $0x1, %al
callq 0x17070
movq 0x50(%rbp), %rsi
leaq 0x1a4b9b(%rip), %rdi    # 0x35f5bf
xorl %eax, %eax
callq 0x17070
movl 0x94(%rbp), %esi
leaq 0x1a4b9f(%rip), %rdi    # 0x35f5d7
xorl %eax, %eax
callq 0x17070
movl 0x98(%rbp), %esi
leaq 0x1a4b9f(%rip), %rdi    # 0x35f5eb
xorl %eax, %eax
callq 0x17070
movl 0x9c(%rbp), %esi
leaq 0x1a4ba2(%rip), %rdi    # 0x35f602
xorl %eax, %eax
callq 0x17070
movl 0xa0(%rbp), %esi
leaq 0x1a4ba6(%rip), %rdi    # 0x35f61a
xorl %eax, %eax
callq 0x17070
movq 0x58(%rbp), %rsi
leaq 0x1a4bab(%rip), %rdi    # 0x35f631
xorl %eax, %eax
callq 0x17070
movq 0x60(%rbp), %rsi
leaq 0x1a4bb0(%rip), %rdi    # 0x35f648
xorl %eax, %eax
callq 0x17070
movq 0x68(%rbp), %rsi
leaq 0x1a4bb5(%rip), %rdi    # 0x35f65f
xorl %eax, %eax
callq 0x17070
movq 0x70(%rbp), %rsi
leaq 0x1a4bbc(%rip), %rdi    # 0x35f678
xorl %eax, %eax
callq 0x17070
cmpb $0x0, 0xb5(%rbp)
je 0x1bab39
leaq 0x1a4cca(%rip), %rdi    # 0x35f79d
jmp 0x1bab52
movq $0x0, 0x80(%rsp)
pushq $-0x1
popq %rbx
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %edi, %edi
xorl %ebp, %ebp
xorl %r12d, %r12d
jmp 0x1bac44
movq $0x0, 0x80(%rsp)
pushq $-0x1
popq %rbx
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x98(%rsp), %r14
movq 0x90(%rsp), %rdi
jmp 0x1bac44
movq $0x0, 0x80(%rsp)
pushq $-0x1
popq %rbx
xorl %r13d, %r13d
jmp 0x1bac24
leaq 0x1a4c4a(%rip), %rax    # 0x35f78a
leaq 0x1a4c31(%rip), %rdi    # 0x35f778
cmpb $0x0, 0xb4(%rbp)
cmovneq %rax, %rdi
callq 0x17b60
movl 0xa4(%rbp), %esi
leaq 0x1a4b2d(%rip), %rdi    # 0x35f691
xorl %eax, %eax
callq 0x17070
movl 0xa8(%rbp), %esi
leaq 0x1a4b2f(%rip), %rdi    # 0x35f6a7
xorl %eax, %eax
callq 0x17070
movq 0x18(%rbp), %rdi
callq 0xad1fa
leaq 0x1a4b2e(%rip), %rdi    # 0x35f6bd
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movl 0xac(%rbp), %esi
leaq 0x1a4b32(%rip), %rdi    # 0x35f6d8
xorl %eax, %eax
callq 0x17070
movl 0xb0(%rbp), %esi
leaq 0x1a4b3e(%rip), %rdi    # 0x35f6f8
xorl %eax, %eax
callq 0x17070
movq 0x40(%rbp), %rsi
movq 0x48(%rbp), %rdx
movq %rsi, %rax
orq %rdx, %rax
je 0x1babdf
leaq 0x1a4b35(%rip), %rdi    # 0x35f70d
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0xbc(%rbp)
jne 0x1bac17
cmpb $0x1, 0xb9(%rbp)
jne 0x1bac12
xorl %edi, %edi
cmpl $0x2, 0xa4(%rbp)
setae %dil
xorl %esi, %esi
cmpl $0x4, 0xac(%rbp)
setb %sil
callq 0x1c63ef
jmp 0x1bac17
callq 0x1c6369
movq %rbx, %rdi
movq %r14, %rsi
callq 0x102b93
movl %eax, %ebx
movq 0x98(%rsp), %r14
movq 0x90(%rsp), %rdi
movq 0xa8(%rsp), %r12
movq 0xa0(%rsp), %rbp
callq 0x10297b
movq 0x88(%rsp), %rdi
callq 0x10297b
movq %rbp, %rdi
callq 0x10297b
movq %r13, %rdi
callq 0x10297b
movq %r15, %rdi
callq 0x10297b
testq %r14, %r14
je 0x1bac7b
movq %r14, %rdi
callq 0x8da06
testq %r12, %r12
je 0x1bac88
movq %r12, %rdi
callq 0x8da06
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1bac9a
callq 0x8da06
movl %ebx, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x27d2b3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x12a354(%rip), %rsi    # 0x2e5013
leaq 0x18d98d(%rip), %rdx    # 0x348653
leaq 0x1a4808(%rip), %rcx    # 0x35f4d5
leaq 0x1a437f(%rip), %r8     # 0x35f053
movl $0x25f, %r9d            # imm = 0x25F
jmp 0x1bad36
movq 0x27d285(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x12a326(%rip), %rsi    # 0x2e5013
leaq 0x12a4cb(%rip), %rdx    # 0x2e51bf
leaq 0x1a47da(%rip), %rcx    # 0x35f4d5
leaq 0x1a4351(%rip), %r8     # 0x35f053
movl $0x25e, %r9d            # imm = 0x25E
jmp 0x1bad36
movq 0x27d257(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x12a2f8(%rip), %rsi    # 0x2e5013
leaq 0x1a47c8(%rip), %rdx    # 0x35f4ea
leaq 0x1a47d3(%rip), %rcx    # 0x35f4fc
leaq 0x1a4323(%rip), %r8     # 0x35f053
movl $0x243, %r9d            # imm = 0x243
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop