// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-spmfind.c
// Function: combine_terminal_with_wset
static void combine_terminal_with_wset(GtUword seqnum,
    GtUword seqstartpos, GtUword seqlen, GtUword w_left,
    GtUword lcp, GtBUstate_spm *state)
{
  GtUword j, suffix_readnum = seqnum;
  bool suffixseq_direct = true;

  GT_READJOINER_CORRECT_REVCOMPL(suffix_readnum, state->first_revcompl,
      state->nofreads, suffixseq_direct);

#ifdef GT_READJOINER_STATISTICS
  (state->nof_terminals)++;
  (state->nof_terminals_in_subtree)++;
  if (w_left < state->w_nextfree)
  {
    (state->nof_combinable_terminals)++;
    gt_disc_distri_add(state->w_per_terminal, state->w_nextfree - w_left);
    state->nof_t_w_combinations += state->w_nextfree - w_left;
  }
#endif
  for (j = w_left; j < state->w_nextfree; j++)
  {
    bool prefixseq_direct = true;
    WholereadInfo *w = state->w_set + j;
    GtUword prefix_readnum = w->seqnum;
    GT_READJOINER_CORRECT_REVCOMPL(prefix_readnum, state->first_revcompl,
        state->nofreads, prefixseq_direct);
    if (!state->elimtrans ||
        !gt_blindtrie_retrieve(w->blindtrie, state->totallength -
          (seqstartpos + seqlen - lcp), seqstartpos))
    {
      /* irreducible SPM */
      if (GT_READJOINER_IS_CORRECT_REVCOMPL_CASE(suffix_readnum,
            suffixseq_direct, prefix_readnum, prefixseq_direct))
      {
#ifdef GT_READJOINER_DEBUG
        gt_log_log(""GT_WU" %s "GT_WU" %s "GT_WU"\n", suffix_readnum,
                   suffixseq_direct ? "+" : "-", prefix_readnum,
                   prefixseq_direct ? "+" : "-", lcp);
#endif
        state->proc(suffix_readnum, prefix_readnum, lcp, suffixseq_direct,
            prefixseq_direct, state->procdata);
        (state->nofvalidspm)++;
#ifdef GT_READJOINER_STATISTICS
        (state->nof_overlaps_in_subtree)++;
#endif
      }
#ifdef GT_READJOINER_STATISTICS
      else
      {
        (state->nof_wrong_direction)++;
      }
#endif
    }
    else
    {
      /* transitive */
      if (prefix_readnum == suffix_readnum)
        (state->nof_transitive_withrc)++;
      else
        (state->nof_transitive_other)++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movq %r8, 0x30(%rsp)
movq %rcx, %rbp
movq %rsi, 0x28(%rsp)
movq 0x58(%r9), %rax
decq %rax
movq %rdi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rax, 0x20(%rsp)
cmpq %rdi, %rax
jae 0x1cc458
movq 0x50(%rbx), %rax
decq %rax
subq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
jb 0x1cc5bc
cmpq %rbp, 0x80(%rbx)
jbe 0x1cc5a8
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
setb 0xf(%rsp)
addq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rax
subq %rdx, %rax
movq %rax, 0x38(%rsp)
leaq 0xc0(%rbx), %rax
movq %rax, 0x40(%rsp)
movq %rbp, %r15
shlq $0x4, %r15
orq $0x8, %r15
movq 0x58(%rbx), %r13
movq 0x78(%rbx), %rax
movq -0x8(%rax,%r15), %r14
decq %r13
movq %r14, %r12
cmpq %r14, %r13
jae 0x1cc4c5
movq 0x50(%rbx), %r12
decq %r12
subq %r14, %r12
jb 0x1cc5b7
cmpb $0x1, 0x28(%rbx)
jne 0x1cc4ff
movq (%rax,%r15), %rdi
movq 0x40(%rbx), %rsi
addq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1e6921
testb %al, %al
je 0x1cc4ff
xorl %eax, %eax
cmpq 0x10(%rsp), %r12
setne %al
leaq (%rbx,%rax,8), %rax
addq $0xc8, %rax
jmp 0x1cc591
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jb 0x1cc510
cmpq %r14, %r13
jae 0x1cc559
cmpq %r14, %r13
setb %al
movq 0x20(%rsp), %rcx
cmpq 0x18(%rsp), %rcx
setb %cl
testb %al, %cl
jne 0x1cc52e
cmpq %r12, 0x10(%rsp)
je 0x1cc559
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jb 0x1cc546
cmpq 0x10(%rsp), %r12
jbe 0x1cc546
cmpq %r14, %r13
jb 0x1cc559
cmpq 0x10(%rsp), %r12
setb %al
cmpq %r14, %r13
jb 0x1cc594
andb 0xf(%rsp), %al
je 0x1cc594
xorl %r8d, %r8d
cmpq %r14, %r13
setae %r8b
xorl %ecx, %ecx
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
setae %cl
movq 0xb8(%rbx), %r9
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq 0x30(%rsp), %rdx
callq *0xb0(%rbx)
movq 0x40(%rsp), %rax
incq (%rax)
incq %rbp
addq $0x10, %r15
cmpq 0x80(%rbx), %rbp
jb 0x1cc49d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6b6b0
callq 0x6b677