// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_show_seedext.c
// Function: gt_show_seedext_runner
static int gt_show_seedext_runner(GT_UNUSED int argc,
                                  GT_UNUSED const char **argv,
                                  GT_UNUSED int parsed_args,
                                  void *tool_arguments,
                                  GtError *err)
{
  int had_err = 0;
  GtShowSeedextArguments *arguments = tool_arguments;
  GtSeedextendMatchIterator *semi = NULL;
  const GtEncseq *aencseq = NULL, *bencseq = NULL;
  GtSeedExtendDisplayFlag *out_display_flag = NULL;
  GtFtPolishing_info *pol_info = NULL;
  GtGreedyextendmatchinfo *greedyextendmatchinfo = NULL;
  const GtExtendCharAccess a_extend_char_access = GT_EXTEND_CHAR_ACCESS_ANY;
  const GtExtendCharAccess b_extend_char_access = GT_EXTEND_CHAR_ACCESS_ANY;
  GtUchar *alignment_show_buffer = NULL;
  GtAlignment *alignment = NULL;
  GtSequencepairbuffer seqpairbuf = {NULL,NULL,0,0};
  GtLinspaceManagement *linspace_spacemanager = NULL;
  GtScoreHandler *linspace_scorehandler = NULL;
  const GtUchar *characters = NULL;
  GtUchar wildcardshow = (GtUchar) 'N';
  GtTimer *timer = NULL;
  const GtSeedExtendDisplaySetMode setmode
    = GT_SEED_EXTEND_DISPLAY_SET_STANDARD;

  if (gt_showtime_enabled())
  {
    timer = gt_timer_new();
    gt_timer_start(timer);
  }
  gt_error_check(err);
  gt_assert(arguments != NULL);
  /* Parse option string in first line of file specified by filename. */
  out_display_flag
    = gt_querymatch_display_flag_new(arguments->display_args,setmode,err);
  if (out_display_flag == NULL)
  {
    had_err = true;
  }
  if (!had_err)
  {
    if (arguments->optimal_alignment)
    {
      if (gt_querymatch_alignment_display(out_display_flag))
      {
        GtUword alignmentwidth
          = gt_querymatch_display_alignmentwidth(out_display_flag);
        alignment_show_buffer = gt_alignment_buffer_new(alignmentwidth);
      }
      alignment = gt_alignment_new();
      linspace_spacemanager = gt_linspace_management_new();
      linspace_scorehandler = gt_scorehandler_new(0,1,0,1);
    }
    semi = gt_seedextend_match_iterator_new(arguments->matchfilename,err);
    if (semi == NULL)
    {
      had_err = -1;
    }
  }
  /* Parse seed extensions. */
  if (!had_err)
  {
    printf("%s\n",gt_seedextend_match_iterator_Options_line(semi));
    aencseq = gt_seedextend_match_iterator_aencseq(semi);
    bencseq = gt_seedextend_match_iterator_bencseq(semi);
    /* the following are used if seed_extend is set */
    if (arguments->optimal_alignment)
    {
      characters = gt_encseq_alphabetcharacters(aencseq);
      wildcardshow = gt_encseq_alphabetwildcardshow(aencseq);
    }
    gt_querymatch_Fields_output(stdout,out_display_flag);
    if (!arguments->relax_polish)
    {
      double matchscore_bias = GT_DEFAULT_MATCHSCORE_BIAS;
      if (gt_seedextend_match_iterator_bias_parameters(semi))
      {
        matchscore_bias = gt_greedy_dna_sequence_bias_get(aencseq);
      }
      pol_info = polishing_info_new_with_bias(
                          gt_seedextend_match_iterator_errorpercentage(semi),
                          matchscore_bias,
                          gt_seedextend_match_iterator_history_size(semi));
    }
    if (arguments->verify_alignment)
    {
      gt_seedextend_match_iterator_verify_alignment_set(semi);
    }
    if (gt_querymatch_alignment_display(out_display_flag) ||
        gt_querymatch_trace_display(out_display_flag) ||
        gt_querymatch_dtrace_display(out_display_flag) ||
        gt_querymatch_cigar_display(out_display_flag) ||
        gt_querymatch_cigarX_display(out_display_flag) ||
        arguments->verify_alignment)
    {
      if (gt_seedextend_match_iterator_querymatchoutoptions_set(
                            semi,
                            !arguments->relax_polish,
                            a_extend_char_access,
                            b_extend_char_access,
                            out_display_flag,
                            err) != 0)
      {
        had_err = -1;
      }
    }
  }
  if (!had_err)
  {
    GtKarlinAltschulStat *karlin_altschul_stat = NULL;
    const bool match_has_cigar = gt_seedextend_match_iterator_has_cigar(semi),
               match_has_seed = gt_seedextend_match_iterator_has_seed(semi),
               dtrace = gt_seedextend_match_iterator_dtrace(semi);
    const GtUword trace_delta = gt_seedextend_match_iterator_trace_delta(semi);

    if (gt_querymatch_evalue_display(out_display_flag) ||
        gt_querymatch_bitscore_display(out_display_flag))
    {
      karlin_altschul_stat = gt_karlin_altschul_stat_new_gapped(
                                       gt_encseq_total_length(aencseq),
                                       gt_encseq_num_of_sequences(aencseq),
                                       bencseq);
    }
    if (arguments->sortmatches)
    {
      (void) gt_seedextend_match_iterator_all_sorted(semi,true);
    }
    while (true)
    {
      GtQuerymatch *querymatchptr = gt_seedextend_match_iterator_next(semi);
      const double evalue = gt_seedextend_match_iterator_evalue(semi),
                   bitscore = gt_seedextend_match_iterator_bitscore(semi);

      if (querymatchptr == NULL)
      {
        break;
      }
      gt_querymatch_recompute_alignment(querymatchptr,
                                        out_display_flag,
                                        match_has_cigar,
                                        dtrace,
                                        trace_delta,
                                        match_has_seed,
                                        aencseq,
                                        bencseq,
                                        karlin_altschul_stat,
                                        evalue,
                                        bitscore);
      if (arguments->optimal_alignment)
      {
        gt_querymatch_extract_sequence_pair(&seqpairbuf,
                                            aencseq,
                                            bencseq,
                                            querymatchptr);
        gt_querymatch_optimal_alignment(querymatchptr,
                                        &seqpairbuf,
                                        linspace_spacemanager,
                                        linspace_scorehandler,
                                        alignment,
                                        alignment_show_buffer,
                                        out_display_flag,
                                        characters,
                                        wildcardshow);
      }
    }
    gt_greedy_extend_matchinfo_delete(greedyextendmatchinfo);
    gt_free(seqpairbuf.a_sequence);
    gt_free(seqpairbuf.b_sequence);
    gt_karlin_altschul_stat_delete(karlin_altschul_stat);
  }
  gt_free(alignment_show_buffer);
  polishing_info_delete(pol_info);
  gt_alignment_delete(alignment);
  gt_scorehandler_delete(linspace_scorehandler);
  gt_linspace_management_delete(linspace_spacemanager);
  gt_seedextend_match_iterator_delete(semi);
  if (!had_err && gt_showtime_enabled())
  {
    printf("# TIME show_seedext %s alignment ",
           gt_querymatch_alignment_display(out_display_flag)
           ? "with" : "without");
    gt_timer_show_formatted(timer,GT_WD ".%06ld\n",stdout);
  }
  gt_querymatch_display_flag_delete(out_display_flag);
  if (gt_showtime_enabled())
  {
    gt_timer_delete(timer);
  }
  return had_err;
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movl %edi, 0x154(%rsp)
movq %rsi, 0x148(%rsp)
movl %edx, 0x144(%rsp)
movq %rcx, 0x138(%rsp)
movq %r8, 0x130(%rsp)
movl $0x0, 0x12c(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x120(%rsp)
movq $0x0, 0x118(%rsp)
movq $0x0, 0x110(%rsp)
movq $0x0, 0x108(%rsp)
movq $0x0, 0x100(%rsp)
movq $0x0, 0xf8(%rsp)
movq $0x0, 0xf0(%rsp)
movl $0x3, 0xec(%rsp)
movl $0x3, 0xe8(%rsp)
movq $0x0, 0xe0(%rsp)
movq $0x0, 0xd8(%rsp)
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x19360
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movb $0x4e, 0x8f(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x1, 0x7c(%rsp)
callq 0x11aa90
testb $0x1, %al
jne 0x6db6d
jmp 0x6db87
callq 0x121340
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1213f0
jmp 0x6db89
cmpq $0x0, 0x130(%rsp)
je 0x6dbdf
movq 0x130(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x6dba7
jmp 0x6dbdf
movq 0x5ce3f2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4a845b(%rip), %rsi    # 0x516013
leaq 0x4a8600(%rip), %rdx    # 0x5161bf
leaq 0x4bdbd5(%rip), %rcx    # 0x52b79b
leaq 0x4bda28(%rip), %r8     # 0x52b5f5
movl $0xdd, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6dbe1
jmp 0x6dbe3
cmpq $0x0, 0x120(%rsp)
jne 0x6dc26
movq 0x5ce3ab(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4a8414(%rip), %rsi    # 0x516013
leaq 0x4a967e(%rip), %rdx    # 0x517284
leaq 0x4bdb8e(%rip), %rcx    # 0x52b79b
leaq 0x4bd9e1(%rip), %r8     # 0x52b5f5
movl $0xde, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6dc28
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x130(%rsp), %rdx
movl $0x1, %esi
callq 0x265d50
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x100(%rsp)
jne 0x6dc64
movl $0x1, 0x12c(%rsp)
cmpl $0x0, 0x12c(%rsp)
jne 0x6dd2a
movq 0x120(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x6dcf1
movq 0x100(%rsp), %rdi
callq 0x265cd0
testb $0x1, %al
jne 0x6dc93
jmp 0x6dcb9
movq 0x100(%rsp), %rdi
callq 0x265c70
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movl %eax, %edi
callq 0x12bf20
movq %rax, 0xe0(%rsp)
callq 0x129e10
movq %rax, 0xd8(%rsp)
movb $0x0, %al
callq 0x1a2fe0
movq %rax, 0xa0(%rsp)
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x1d0fb0
movq %rax, 0x98(%rsp)
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x130(%rsp), %rsi
callq 0x2a9e50
movq %rax, 0x118(%rsp)
cmpq $0x0, 0x118(%rsp)
jne 0x6dd28
movl $0xffffffff, 0x12c(%rsp) # imm = 0xFFFFFFFF
jmp 0x6dd2a
cmpl $0x0, 0x12c(%rsp)
jne 0x6df4a
movq 0x118(%rsp), %rdi
callq 0x2ab0d0
movq %rax, %rsi
leaq 0x4b919d(%rip), %rdi    # 0x526eec
movb $0x0, %al
callq 0x19070
movq 0x118(%rsp), %rdi
callq 0x2aa960
movq %rax, 0x110(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aa9b0
movq %rax, 0x108(%rsp)
movq 0x120(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x6ddb7
movq 0x110(%rsp), %rdi
callq 0xb0f20
movq %rax, 0x90(%rsp)
movq 0x110(%rsp), %rdi
callq 0xb0f40
movb %al, 0x8f(%rsp)
movq 0x5ce17a(%rip), %rax    # 0x63bf38
movq (%rax), %rdi
movq 0x100(%rsp), %rsi
callq 0x266b00
movq 0x120(%rsp), %rax
testb $0x1, (%rax)
jne 0x6de82
movsd 0x4a9459(%rip), %xmm0   # 0x517240
movsd %xmm0, 0x68(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aaaa0
testb $0x1, %al
jne 0x6de00
jmp 0x6de13
movq 0x110(%rsp), %rdi
callq 0x2ab8d0
movsd %xmm0, 0x68(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aaa50
movq %rax, %xmm0
movaps 0x4aab04(%rip), %xmm1   # 0x518930
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x4aab08(%rip), %xmm1   # 0x518940
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aaa00
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movq %rax, %rdi
callq 0x24f330
movq %rax, 0xf8(%rsp)
movq 0x120(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x6de9d
movq 0x118(%rsp), %rdi
callq 0x2aad80
movq 0x100(%rsp), %rdi
callq 0x265cd0
testb $0x1, %al
jne 0x6df00
movq 0x100(%rsp), %rdi
callq 0x265830
testb $0x1, %al
jne 0x6df00
movq 0x100(%rsp), %rdi
callq 0x265850
testb $0x1, %al
jne 0x6df00
movq 0x100(%rsp), %rdi
callq 0x2657f0
testb $0x1, %al
jne 0x6df00
movq 0x100(%rsp), %rdi
callq 0x265810
testb $0x1, %al
jne 0x6df00
movq 0x120(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x6df48
movq 0x118(%rsp), %rdi
movq 0x120(%rsp), %rax
movb (%rax), %al
xorb $-0x1, %al
movq 0x100(%rsp), %r8
movq 0x130(%rsp), %r9
movzbl %al, %esi
andl $0x1, %esi
movl $0x3, %ecx
movl %ecx, %edx
callq 0x2aaef0
cmpl $0x0, %eax
je 0x6df46
movl $0xffffffff, 0x12c(%rsp) # imm = 0xFFFFFFFF
jmp 0x6df48
jmp 0x6df4a
cmpl $0x0, 0x12c(%rsp)
jne 0x6e1ac
movq $0x0, 0x60(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aab60
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aab00
andb $0x1, %al
movb %al, 0x5e(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aac90
andb $0x1, %al
movb %al, 0x5d(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aabf0
movq %rax, 0x50(%rsp)
movq 0x100(%rsp), %rdi
callq 0x265b50
testb $0x1, %al
jne 0x6dfd0
movq 0x100(%rsp), %rdi
callq 0x265b70
testb $0x1, %al
jne 0x6dfd0
jmp 0x6e009
movq 0x110(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rdi
callq 0xa9d50
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x108(%rsp), %rdx
callq 0x25f0c0
movq %rax, 0x60(%rsp)
movq 0x120(%rsp), %rax
testb $0x1, 0x1(%rax)
je 0x6e029
movq 0x118(%rsp), %rdi
movl $0x1, %esi
callq 0x2aada0
jmp 0x6e02b
movq 0x118(%rsp), %rdi
callq 0x2aa710
movq %rax, 0x48(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aacc0
movsd %xmm0, 0x40(%rsp)
movq 0x118(%rsp), %rdi
callq 0x2aad20
movsd %xmm0, 0x38(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x6e070
jmp 0x6e163
movq 0x48(%rsp), %rdi
movq 0x100(%rsp), %rsi
movb 0x5f(%rsp), %dl
movb 0x5d(%rsp), %cl
movq 0x50(%rsp), %r8
movb 0x5e(%rsp), %r9b
movq 0x110(%rsp), %r11
movq 0x108(%rsp), %r10
movq 0x60(%rsp), %rax
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
andb $0x1, %dl
andb $0x1, %cl
andb $0x1, %r9b
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %r9b, %r9d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x26aa90
movq 0x120(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x6e15e
movq 0x110(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0xa8(%rsp), %rdi
callq 0x26a900
movq 0x48(%rsp), %rdi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
movq 0xd8(%rsp), %r8
movq 0xe0(%rsp), %r9
movq 0x100(%rsp), %r10
movq 0x90(%rsp), %rax
leaq 0xa8(%rsp), %rsi
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movzbl 0x8f(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x6d530
jmp 0x6e02b
movq 0xf0(%rsp), %rdi
callq 0x2ac030
movq 0xa8(%rsp), %rdi
leaq 0x4bd476(%rip), %rsi    # 0x52b5f5
movl $0x165, %edx            # imm = 0x165
callq 0xe88c0
movq 0xb0(%rsp), %rdi
leaq 0x4bd45d(%rip), %rsi    # 0x52b5f5
movl $0x166, %edx            # imm = 0x166
callq 0xe88c0
movq 0x60(%rsp), %rdi
callq 0x25dbc0
movq 0xe0(%rsp), %rdi
leaq 0x4bd43a(%rip), %rsi    # 0x52b5f5
movl $0x169, %edx            # imm = 0x169
callq 0xe88c0
movq 0xf8(%rsp), %rdi
callq 0x24f9e0
movq 0xd8(%rsp), %rdi
callq 0x12c3e0
movq 0x98(%rsp), %rdi
callq 0x1d1150
movq 0xa0(%rsp), %rdi
callq 0x1a3080
movq 0x118(%rsp), %rdi
callq 0x2a9d30
cmpl $0x0, 0x12c(%rsp)
jne 0x6e26b
callq 0x11aa90
testb $0x1, %al
jne 0x6e21b
jmp 0x6e26b
movq 0x100(%rsp), %rdi
callq 0x265cd0
movb %al, %cl
leaq 0x4bd5a8(%rip), %rsi    # 0x52b7d9
leaq 0x4bd59c(%rip), %rax    # 0x52b7d4
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0x4bd56c(%rip), %rdi    # 0x52b7b2
movb $0x0, %al
callq 0x19070
movq 0x80(%rsp), %rdi
movq 0x5cdcdc(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4b9fda(%rip), %rsi    # 0x528240
callq 0x121520
movq 0x100(%rsp), %rdi
callq 0x265d20
callq 0x11aa90
testb $0x1, %al
jne 0x6e283
jmp 0x6e290
movq 0x80(%rsp), %rdi
callq 0x121f00
movl 0x12c(%rsp), %eax
addq $0x158, %rsp            # imm = 0x158
retq
nop