// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_condenseq_blast.c
// Function: gt_condenseq_blast_run_coarse
static inline int
gt_condenseq_blast_run_coarse(GtCesBlastInfo *info,
                              const GtCondenseqBlastQInfo qinfo)
{
  int had_err = 0;
  GtBlastProcessCall *call;
  GtMatch            *match;
  GtMatchIterator    *mp = NULL;
  GtMatchIteratorStatus status;
  GT_UNUSED GtUword hitcounter = 0;

  if (info->timer != NULL)
    gt_timer_show_progress(info->timer, "coarse BLAST run", stderr);

  if (info->args->blastp)
    call = gt_blast_process_call_new_prot();
  else
    call = gt_blast_process_call_new_nucl();
  gt_blast_process_call_set_db(call, gt_str_get(info->fastaname));
  gt_blast_process_call_set_query(call, info->querypath);
  gt_blast_process_call_set_evalue(call, info->args->ceval);
  gt_blast_process_call_set_num_threads(call, info->args->blthreads);

  gt_logger_log(info->logger, "coarse E-value set to: %.4e", info->args->ceval);

  gt_log_log("Blast call: %s", gt_blast_process_call_get_call(call));
  mp = gt_match_iterator_blast_process_new(call, info->err);
  if (!mp)
    had_err = -1;

  gt_blast_process_call_delete(call);

  if (info->timer != NULL)
    gt_timer_show_progress(info->timer, "parse coarse blast hits", stderr);

  gt_assert(info->hits != NULL);
  if (info->seqid == NULL)
    info->seqid = gt_str_new();
  if (info->source == NULL)
    info->source = gt_str_new_cstr("CoarseBlast");
  while (!had_err &&
         (status = gt_match_iterator_next(mp, &match, info->err)) ==
         GT_MATCHER_STATUS_OK)
  {
    had_err = gt_condenseq_blast_parse_coarse_hits(match, info, qinfo);
    hitcounter++;

    if (info->gff_node_visitor != NULL) {
      const char *desc;
      GtGenomeNode *node;
      GtUword desclen;
      GtRange seqbased = info->hits[info->curr_hits - 1].range;
      GtUword uid = info->hits[info->curr_hits - 1].uid;
      GtUword seqnum = gt_condenseq_unique_range_to_seqrange(info->ces,
                                                             uid,
                                                             &seqbased);
      GtStrand strand = gt_match_get_direction(match) == GT_MATCH_DIRECT ?
        GT_STRAND_FORWARD : GT_STRAND_REVERSE;
      gt_str_reset(info->seqid);
      desc = gt_condenseq_description(info->ces, &desclen, seqnum);
      gt_str_append_cstr_nt(info->seqid, desc, desclen);
      node = gt_feature_node_new(info->seqid, "match", seqbased.start + 1,
                                 seqbased.end + 1, strand);
      gt_feature_node_set_source((GtFeatureNode *) node, info->source);
      gt_feature_node_set_attribute((GtFeatureNode *) node,
                                    "Name", "Coarse Hit");
      had_err = gt_genome_node_accept(node, info->gff_node_visitor, info->err);
      gt_genome_node_delete(node);
    }
    gt_match_delete(match);
  }
  gt_log_log("hits processed: " GT_WU, hitcounter);
  gt_str_delete(info->source);
  info->source = NULL;
  if (!had_err && status == GT_MATCHER_STATUS_ERROR)
    had_err = -1;

  gt_match_iterator_delete(mp);
  return had_err;
}

// Assembly:
subq $0xb8, %rsp
leaq 0xc0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xb0(%rsp)
movl $0x0, 0xac(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x80(%rsp)
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x25130
movq 0xb0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x616e7f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdx
leaq 0x4f4336(%rip), %rsi    # 0x519461
callq 0x121930
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
testb $0x1, 0x4c(%rax)
je 0x25151
callq 0x137040
movq %rax, 0xa0(%rsp)
jmp 0x2515e
callq 0x136fc0
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xb0(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11dee0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x137130
movq 0xa0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x50(%rax), %rsi
callq 0x137080
movq 0xa0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
movsd 0x38(%rax), %xmm0
callq 0x1371e0
movq 0xa0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x48(%rax), %esi
callq 0x137680
movq 0xb0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
movsd 0x38(%rax), %xmm0
leaq 0x4f4272(%rip), %rsi    # 0x519472
movb $0x1, %al
callq 0xe7cd0
movq 0xa0(%rsp), %rdi
callq 0x137cc0
movq %rax, %rsi
leaq 0x4f406b(%rip), %rdi    # 0x519289
movb $0x0, %al
callq 0xe7740
movq 0xa0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1a7cc0
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x2525c
movl $0xffffffff, 0xac(%rsp) # imm = 0xFFFFFFFF
movq 0xa0(%rsp), %rdi
callq 0x137ce0
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x2529a
movq 0xb0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x616d15(%rip), %rax    # 0x63bfa0
movq (%rax), %rdx
leaq 0x4f41f9(%rip), %rsi    # 0x51948e
callq 0x121930
jmp 0x2529c
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x252e3
movq 0x616cee(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f0d57(%rip), %rsi    # 0x516013
leaq 0x4f41e3(%rip), %rdx    # 0x5194a6
leaq 0x4f41ef(%rip), %rcx    # 0x5194b9
leaq 0x4f3aa7(%rip), %r8     # 0x518d78
movl $0x1e2, %r9d            # imm = 0x1E2
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x252e5
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x25308
callq 0x11d4a0
movq %rax, %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x25332
leaq 0x4f41b9(%rip), %rdi    # 0x5194d7
callq 0x11d510
movq %rax, %rcx
movq 0xb0(%rsp), %rax
movq %rcx, 0x48(%rax)
jmp 0x25334
xorl %eax, %eax
cmpl $0x0, 0xac(%rsp)
movb %al, 0x2f(%rsp)
jne 0x25376
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x98(%rsp), %rsi
callq 0x1a7950
movl %eax, 0x8c(%rsp)
cmpl $0x0, %eax
sete %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x25383
jmp 0x2557e
movq 0x38(%rsp), %rax
movq 0x98(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x25910
movl %eax, 0xac(%rsp)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2556c
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xb0(%rsp), %rcx
movq 0x60(%rcx), %rcx
subq $0x1, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, 0x58(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xb0(%rsp), %rcx
movq 0x60(%rcx), %rcx
subq $0x1, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x142940
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1a6f60
movl %eax, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, 0x44(%rsp)
movq 0xb0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x11e110
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
movq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rsi
callq 0x13e570
movq %rax, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x11d830
movq 0xb0(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x58(%rsp), %rdx
addq $0x1, %rdx
movq 0x60(%rsp), %rcx
addq $0x1, %rcx
movl 0x44(%rsp), %r8d
leaq 0x533e77(%rip), %rsi    # 0x559378
callq 0x16c7e0
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x16c170
movq 0x70(%rsp), %rdi
leaq 0x54f181(%rip), %rsi    # 0x5746ae
leaq 0x4f3faf(%rip), %rdx    # 0x5194e3
callq 0x16d660
movq 0x70(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0xb0(%rsp), %rax
movq 0x18(%rax), %rdx
callq 0x171f90
movl %eax, 0xac(%rsp)
movq 0x70(%rsp), %rdi
callq 0x173180
movq 0x98(%rsp), %rdi
callq 0x1a6fb0
jmp 0x25334
movq 0x80(%rsp), %rsi
leaq 0x4f3f61(%rip), %rdi    # 0x5194ee
movb $0x0, %al
callq 0xe7740
movq 0xb0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11f560
movq 0xb0(%rsp), %rax
movq $0x0, 0x48(%rax)
cmpl $0x0, 0xac(%rsp)
jne 0x255d4
cmpl $0x2, 0x8c(%rsp)
jne 0x255d4
movl $0xffffffff, 0xac(%rsp) # imm = 0xFFFFFFFF
movq 0x90(%rsp), %rdi
callq 0x1a7a70
movl 0xac(%rsp), %eax
addq $0xb8, %rsp
retq