// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/condenseq_creator.c
// Function: ces_c_extend_seeds_brute_force
static int ces_c_extend_seeds_brute_force(GtCondenseqCreator *ces_c,
                                          GtCondenseqLink *best_link,
                                          GtError *err)
{
  int had_err = 0;
  GtRange query_bounds,
          subject_bounds;
  GtKmerStartpos match_positions;
  GtCondenseqCreatorWindow *win = &ces_c->window;
  GtCondenseqCreatorXdrop *xdrop = &ces_c->xdrop;
  GtUword best_match = GT_UNDEF_UWORD,
          idx_cur,
          querypos = ces_c->main_pos;
  const bool forward = true;
  GtXdropbest empty = {0,0,0,0,0};

  *xdrop->left = empty;
  *xdrop->right = empty;

  subject_bounds.end =
    subject_bounds.start = 0;

  match_positions = win->pos_arrs[GT_CONDENSEQ_CREATOR_LAST_WIN(win)];

  if (match_positions.no_positions == 0) /* nothing there */
    return had_err;

  /* get bounds for current */
  query_bounds.start = ces_c->current_orig_start;
  query_bounds.end = ces_c->current_seq_start + ces_c->current_seq_len;

  if (query_bounds.start < querypos) {
    gt_seqabstract_reinit_encseq(!forward,
                                 GT_READMODE_FORWARD,
                                 xdrop->current_seq_bwd,
                                 ces_c->input_es,
                                 querypos - query_bounds.start,
                                 query_bounds.start);
  }
  if (querypos < query_bounds.end) {
    gt_seqabstract_reinit_encseq(forward,
                                 GT_READMODE_FORWARD,
                                 xdrop->current_seq_fwd,
                                 ces_c->input_es,
                                 query_bounds.end - querypos,
                                 querypos);
  }

  for (idx_cur = 0;
       !had_err && idx_cur < match_positions.no_positions;
       ++idx_cur) {
    GtUword subjectpos = match_positions.startpos[idx_cur],
            new_id = match_positions.unique_ids[idx_cur];
    if (subject_bounds.end < subjectpos || subject_bounds.end == 0) {
      gt_assert(new_id != ces_c->ces->uds_nelems);
      subject_bounds.start = ces_c->ces->uniques[new_id].orig_startpos;
      subject_bounds.end = subject_bounds.start +
        ces_c->ces->uniques[new_id].len;
      gt_assert(subject_bounds.start <= subjectpos &&
                subjectpos + ces_c->kmersize <= subject_bounds.end);
    }
    had_err = ces_c_xdrop(ces_c,
                          subjectpos, querypos,
                          query_bounds,
                          subject_bounds,
                          new_id,
                          best_link,
                          &best_match,
                          err);
  }

  if (!had_err) {
    if (best_link->len < ces_c->min_align_len)
      best_link->len = 0;
    else {
      gt_assert(best_link->orig_startpos >= query_bounds.start);
      gt_assert(best_link->orig_startpos + best_link->len <= query_bounds.end);
    }
  }
  return had_err;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0xf8(%rsp)
movq %rsi, 0xf0(%rsp)
movq %rdx, 0xe8(%rsp)
movl $0x0, 0xe4(%rsp)
movq 0xf8(%rsp), %rax
addq $0xb0, %rax
movq %rax, 0xa0(%rsp)
movq 0xf8(%rsp), %rax
addq $0x58, %rax
movq %rax, 0x98(%rsp)
movq $-0x1, 0x90(%rsp)
movq 0xf8(%rsp), %rax
movq 0xf0(%rax), %rax
movq %rax, 0x80(%rsp)
movb $0x1, 0x7f(%rsp)
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x19360
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0x28, %edx
callq 0x19610
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0x28, %edx
callq 0x19610
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xc8(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xa0(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x143e30
movq 0xa0(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x143e42
movq 0xa0(%rsp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xb8(%rsp)
jne 0x143e95
movl 0xe4(%rsp), %eax
movl %eax, 0x104(%rsp)
jmp 0x14429e
movq 0xf8(%rsp), %rax
movq 0xc8(%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0xf8(%rsp), %rax
movq 0xe0(%rax), %rax
movq 0xf8(%rsp), %rcx
addq 0xd0(%rcx), %rax
movq %rax, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x143f1c
movq 0x98(%rsp), %rax
movq 0x28(%rax), %rdx
movq 0xf8(%rsp), %rax
movq (%rax), %rcx
movq 0x80(%rsp), %r8
subq 0xd0(%rsp), %r8
movq 0xd0(%rsp), %r9
xorl %esi, %esi
movl %esi, %edi
callq 0x2b0bc0
movq 0x80(%rsp), %rax
cmpq 0xd8(%rsp), %rax
jae 0x143f69
movq 0x98(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0xf8(%rsp), %rax
movq (%rax), %rcx
movq 0xd8(%rsp), %r8
subq 0x80(%rsp), %r8
movq 0x80(%rsp), %r9
movl $0x1, %edi
xorl %esi, %esi
callq 0x2b0bc0
movq $0x0, 0x88(%rsp)
xorl %eax, %eax
cmpl $0x0, 0xe4(%rsp)
movb %al, 0x33(%rsp)
jne 0x143f9c
movq 0x88(%rsp), %rax
cmpq 0xb8(%rsp), %rax
setb %al
movb %al, 0x33(%rsp)
movb 0x33(%rsp), %al
testb $0x1, %al
jne 0x143fa9
jmp 0x14419c
movq 0xa8(%rsp), %rax
movq 0x88(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movq 0xb0(%rsp), %rax
movq 0x88(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rax
cmpq 0x48(%rsp), %rax
jb 0x143ff9
cmpq $0x0, 0xc8(%rsp)
jne 0x14410e
jmp 0x143ffb
movq 0x40(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x98(%rcx), %rax
jne 0x14404d
movq 0x4f7f84(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3d1fed(%rip), %rsi    # 0x516013
leaq 0x407e9a(%rip), %rdx    # 0x54bec7
leaq 0x408277(%rip), %rcx    # 0x54c2ab
leaq 0x4079b3(%rip), %r8     # 0x54b9ee
movl $0x301, %r9d            # imm = 0x301
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14404f
movq 0xf8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, 0x40(%rsp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movq 0x10(%rcx), %rcx
imulq $0x28, 0x40(%rsp), %rdx
addq %rdx, %rcx
movl 0x20(%rcx), %ecx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x1440d2
movq 0x48(%rsp), %rax
movq 0xf8(%rsp), %rcx
movl 0x138(%rcx), %ecx
addq %rcx, %rax
cmpq 0xc8(%rsp), %rax
jbe 0x14410a
movq 0x4f7ec7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3d1f30(%rip), %rsi    # 0x516013
leaq 0x407dfe(%rip), %rdx    # 0x54bee8
leaq 0x4081ba(%rip), %rcx    # 0x54c2ab
leaq 0x4078f6(%rip), %r8     # 0x54b9ee
movl $0x306, %r9d            # imm = 0x306
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14410c
jmp 0x14410e
movq 0xf8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x40(%rsp), %r9
movq 0xf0(%rsp), %r11
movq 0xe8(%rsp), %rax
movq 0xd0(%rsp), %rcx
movq 0xd8(%rsp), %r8
leaq 0xc0(%rsp), %rbx
leaq 0x90(%rsp), %r10
movq (%rbx), %r14
movq %r14, (%rsp)
movq 0x8(%rbx), %rbx
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x1467f0
movl %eax, 0xe4(%rsp)
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x143f75
cmpl $0x0, 0xe4(%rsp)
jne 0x144290
movq 0xf0(%rsp), %rax
movl 0x10(%rax), %eax
movq 0xf8(%rsp), %rcx
cmpq 0x100(%rcx), %rax
jae 0x1441da
movq 0xf0(%rsp), %rax
movl $0x0, 0x10(%rax)
jmp 0x14428e
jmp 0x1441dc
movq 0xf0(%rsp), %rax
movq 0x8(%rax), %rax
cmpq 0xd0(%rsp), %rax
jae 0x14422a
movq 0x4f7da7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3d1e10(%rip), %rsi    # 0x516013
leaq 0x407d86(%rip), %rdx    # 0x54bf90
leaq 0x40809a(%rip), %rcx    # 0x54c2ab
leaq 0x4077d6(%rip), %r8     # 0x54b9ee
movl $0x316, %r9d            # imm = 0x316
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14422c
jmp 0x14422e
movq 0xf0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0xf0(%rsp), %rcx
movl 0x10(%rcx), %ecx
addq %rcx, %rax
cmpq 0xd8(%rsp), %rax
jbe 0x14428a
movq 0x4f7d47(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3d1db0(%rip), %rsi    # 0x516013
leaq 0x407d55(%rip), %rdx    # 0x54bfbf
leaq 0x40803a(%rip), %rcx    # 0x54c2ab
leaq 0x407776(%rip), %r8     # 0x54b9ee
movl $0x317, %r9d            # imm = 0x317
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x14428c
jmp 0x14428e
jmp 0x144290
movl 0xe4(%rsp), %eax
movl %eax, 0x104(%rsp)
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq