// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x1, 0x17(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jbe 0x28aeb2
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x58(%rcx), %rax
jb 0x28aeb2
jmp 0x28ae43
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x50(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x28ae92
movq 0x3b113f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28b1a8(%rip), %rsi    # 0x516013
leaq 0x2f6331(%rip), %rdx    # 0x5811a3
leaq 0x2f6354(%rip), %rcx    # 0x5811cd
leaq 0x2f6283(%rip), %r8     # 0x581103
movl $0x150, %r9d            # imm = 0x150
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x28ae94
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
subq $0x1, %rax
subq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0x17(%rsp)
jmp 0x28aeb7
movb $0x1, 0x17(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x28b0d5
movb $0x1, 0x16(%rsp)
movq 0x28(%rsp), %rax
movq 0x78(%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jbe 0x28af8c
movq (%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x58(%rcx), %rax
jb 0x28af8c
jmp 0x28af20
movq (%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x50(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x28af6e
movq 0x3b1063(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28b0cc(%rip), %rsi    # 0x516013
leaq 0x2f629a(%rip), %rdx    # 0x5811e8
leaq 0x2f6278(%rip), %rcx    # 0x5811cd
leaq 0x2f61a7(%rip), %r8     # 0x581103
movl $0x162, %r9d            # imm = 0x162
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x28af70
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
subq $0x1, %rax
subq (%rsp), %rax
movq %rax, (%rsp)
movb $0x0, 0x16(%rsp)
jmp 0x28af91
movb $0x1, 0x16(%rsp)
movq 0x28(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0x28afd2
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rsp), %rax
addq 0x40(%rsp), %rax
subq 0x30(%rsp), %rax
subq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0x2b87b0
testb $0x1, %al
jne 0x28b083
testb $0x1, 0x17(%rsp)
je 0x28afe0
testb $0x1, 0x16(%rsp)
jne 0x28b02b
movq 0x18(%rsp), %rax
cmpq (%rsp), %rax
jne 0x28aff9
testb $0x1, 0x17(%rsp)
jne 0x28b02b
testb $0x1, 0x16(%rsp)
jne 0x28b02b
testb $0x1, 0x17(%rsp)
je 0x28b012
testb $0x1, 0x16(%rsp)
jne 0x28b012
movq (%rsp), %rax
cmpq 0x18(%rsp), %rax
ja 0x28b02b
testb $0x1, 0x17(%rsp)
jne 0x28b081
testb $0x1, 0x16(%rsp)
je 0x28b081
movq (%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x28b081
movq 0x28(%rsp), %rax
movq 0xb0(%rax), %rax
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
movq 0x30(%rsp), %rdx
movb 0x17(%rsp), %cl
movb 0x16(%rsp), %r8b
movq 0x28(%rsp), %r9
movq 0xb8(%r9), %r9
andb $0x1, %cl
andb $0x1, %r8b
movzbl %cl, %ecx
movzbl %r8b, %r8d
callq *%rax
movq 0x28(%rsp), %rax
movq 0xc0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc0(%rax)
jmp 0x28b0c0
movq (%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x28b0a7
movq 0x28(%rsp), %rax
movq 0xc8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc8(%rax)
jmp 0x28b0be
movq 0x28(%rsp), %rax
movq 0xd0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xd0(%rax)
jmp 0x28b0c0
jmp 0x28b0c2
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x28aec1
addq $0x58, %rsp
retq
nopw (%rax,%rax)