// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-pairwise.c
// Function: rdj_pairwise_generic
static inline void rdj_pairwise_generic(bool use_dp, GtOvlfindMode m,
    GtEncseq *encseq, bool revcompl, bool show_progressbar, bool use_kmp,
    double max_error, GtUword min_length, bool find_nonmaximal,
    GtSpmproc proc, GtSpmprocA proc_a, void* procdata, bool cntfilter,
    GtBitsequence *cntreads_in, GtBitsequence **cntreads_out,
    GtUword *nofreads)
{
  GtContfind containment_status;
  GtBitsequence *cntreads = NULL;
  GtUint64 progress = 0;
  GtUword i, j, startpos, v_seqnum, nofsequences, n;
  struct Read u, v;
  struct Data d;
  gt_kmp_t** kmp_values = NULL;

  GT_RDJ_PAIRWISE_INIT_STRUCT_DATA(d, proc, proc_a, procdata, &u, &v, 0);

  gt_assert(encseq != NULL);

  d.mode = m;
  if ((m == GT_OVLFIND_ALL) && cntfilter)
    d.mode = GT_OVLFIND_PROPER_SPM;

  n = gt_encseq_num_of_sequences(encseq);
  if (use_kmp)
    kmp_values = prepare_kmp_values(encseq, n);
  nofsequences = n;
  if (revcompl)
    n = n >> 1;
  if (cntreads_in != NULL)
    cntreads = cntreads_in;
  else if (m != GT_OVLFIND_SPM)
    GT_INITBITTAB(cntreads, n);
  if (show_progressbar) gt_progressbar_start(&progress, (GtUint64)n *
      ((GtUint64)n - 1ULL) / 2ULL);

  for (i = 0; i < n; i++)
  {
    u.seqnum = i;
    u.direct = true;
    u.len = gt_encseq_seqlength(encseq, i);
    u.seq = gt_malloc(sizeof (char) * (u.len + 1));
    startpos = gt_encseq_seqstartpos(encseq, i);
    gt_encseq_extract_decoded(encseq, u.seq, startpos, startpos + u.len - 1);
    u.seq[u.len] = '\0';
    if (use_kmp)
    {
      gt_assert(kmp_values != NULL);
      u.pi = kmp_values[i];
    }

    for (j = i; j < n; j++)
    {
      if (cntfilter)
      {
        gt_assert(cntreads != NULL);
        if ((bool)GT_ISIBITSET(cntreads, i)) break;
        if ((bool)GT_ISIBITSET(cntreads, j)) continue;
      }

      v.seqnum = j;

      /* find overlaps using direct v */
      v.direct = true;
      v.len = gt_encseq_seqlength(encseq, j);
      v.seq = gt_malloc(sizeof (char) * (v.len + 1));
      startpos = gt_encseq_seqstartpos(encseq, j);
      gt_encseq_extract_decoded(encseq, v.seq, startpos,
          startpos + v.len - 1);
      v.seq[v.len] = '\0';
      if (use_kmp)
      {
        gt_assert(kmp_values != NULL);
        v.pi = kmp_values[j];
      }
      containment_status = use_dp
          ? find_approx_overlaps(&d, max_error, min_length, find_nonmaximal)
          : find_exact_overlaps(&d, use_kmp, min_length, find_nonmaximal);
      if (m != GT_OVLFIND_SPM)
        mark_contained(containment_status, u.seqnum, v.seqnum, cntreads);

      /* find overlaps using reverse complement of v */
      if (revcompl)
      {
        v_seqnum =  nofsequences - j - 1;
        v.direct = false;
        gt_assert(gt_encseq_seqlength(encseq, j) ==
            gt_encseq_seqlength(encseq, v_seqnum));
        startpos = gt_encseq_seqstartpos(encseq, v_seqnum);
        gt_encseq_extract_decoded(encseq, v.seq, startpos,
            startpos + v.len - 1);
        if (use_kmp)
        {
          gt_assert(kmp_values != NULL);
          v.pi = kmp_values[v_seqnum];
        }
        containment_status = use_dp
          ? find_approx_overlaps(&d, max_error, min_length, find_nonmaximal)
          : find_exact_overlaps(&d, use_kmp, min_length, find_nonmaximal);
        if (m != GT_OVLFIND_SPM)
          mark_contained(containment_status, u.seqnum, v.seqnum, cntreads);
      }
      gt_free(v.seq);
      progress++;
    }
    gt_free(u.seq);
  }

  if (cntreads_out != NULL)
    *cntreads_out = cntreads;
  else if (cntreads_in == NULL)
    gt_free(cntreads);
  if (nofreads != NULL)
    *nofreads = n;
  if (use_kmp)
    free_kmp_values(kmp_values, revcompl ? n << 1 : n);
  if (show_progressbar)
    gt_progressbar_stop();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movsd %xmm0, 0x38(%rsp)
movl %r8d, 0x30(%rsp)
movl %ecx, 0x18(%rsp)
movl %edi, 0x34(%rsp)
movq 0x140(%rsp), %rax
movaps 0x130(%rsp), %xmm0
movq $0x0, 0x98(%rsp)
movups %xmm0, 0x68(%rsp)
movq %rax, 0x78(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
testq %rdx, %rdx
je 0x1d3d1f
movl %r9d, %r14d
movq %rdx, %r12
cmpb $0x0, 0x148(%rsp)
movl $0x3, %eax
cmovel %esi, %eax
cmpl $0x2, %esi
movl %esi, 0x1c(%rsp)
cmovnel %esi, %eax
movl %eax, 0x90(%rsp)
movq %rdx, %rdi
callq 0xec1e8
movq %rax, %r13
testb %r14b, %r14b
movl %r14d, 0x14(%rsp)
je 0x1d36cf
leaq (,%r13,8), %rdi
leaq 0x1e4315(%rip), %rsi    # 0x3b793b
movl $0x88, %edx
callq 0x1092b2
movq %rax, %rbx
testq %r13, %r13
je 0x1d36d1
movq %rbx, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xeffd3
movq %r13, %r15
movq %rax, %r13
leaq 0x1(%rax), %rdi
leaq 0x1e42dc(%rip), %r14    # 0x3b793b
movq %r14, %rsi
movl $0x8d, %edx
callq 0x1092b2
movq %rax, %rbp
movq %r12, %rdi
movq %rbx, %rsi
callq 0xefce0
leaq (%rax,%r13), %rcx
decq %rcx
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0xed87b
movb $0x0, (%rbp,%r13)
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %r13
callq 0x33276c
movq 0x8(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
movq %rbp, %rdi
movq %r14, %rsi
movl $0x93, %edx
callq 0x109670
incq %rbx
cmpq %rbx, %r15
jne 0x1d3643
movq 0x8(%rsp), %rbx
jmp 0x1d36d1
xorl %ebx, %ebx
movq %r13, %rdx
movl 0x18(%rsp), %ecx
shrq %cl, %rdx
movq 0x150(%rsp), %rax
movq %rax, %rbp
testq %rax, %rax
movq %rbx, 0x8(%rsp)
movq %rdx, 0x20(%rsp)
jne 0x1d374d
cmpl $0x0, 0x1c(%rsp)
je 0x1d374b
leaq -0x1(%rdx), %rax
shrq $0x6, %rax
cmpq $0x40, %rdx
leaq 0x8(,%rax,8), %rax
movl $0x8, %ebx
cmovaeq %rax, %rbx
leaq 0x1e421b(%rip), %rdx    # 0x3b793b
xorl %edi, %edi
movq %rbx, %rsi
movl $0xd7, %ecx
callq 0x1094e6
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
callq 0x173a0
movq 0x20(%rsp), %rdx
jmp 0x1d374d
xorl %ebp, %ebp
cmpb $0x0, 0x30(%rsp)
je 0x1d3771
leaq -0x1(%rdx), %rsi
imulq %rdx, %rsi
shrq %rsi
leaq 0x98(%rsp), %rdi
callq 0x110c6c
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
je 0x1d3c2f
decq %r13
xorl %r15d, %r15d
leaq 0x1e41b4(%rip), %r14    # 0x3b793b
movzbl 0x128(%rsp), %eax
movq %rax, 0x28(%rsp)
movq %r15, 0xb0(%rsp)
movb $0x1, 0xb8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeffd3
movq %rax, 0xa8(%rsp)
leaq 0x1(%rax), %rdi
movq %r14, %rsi
movl $0xe0, %edx
callq 0x1092b2
movq %rax, 0xa0(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xefce0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xed87b
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movl 0x14(%rsp), %r14d
testb %r14b, %r14b
je 0x1d382f
testq %rbx, %rbx
je 0x1d3d1a
movq (%rbx,%r15,8), %rax
movq %rax, 0xc0(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movl %r15d, %ecx
shrq %cl, %rax
movq %rax, 0xe0(%rsp)
movq %r15, %rax
shrq $0x6, %rax
movq %rax, 0xd8(%rsp)
movq %r13, 0xd0(%rsp)
movq %r15, 0xc8(%rsp)
movq 0x20(%rsp), %rdx
cmpb $0x0, 0x148(%rsp)
je 0x1d38bb
testq %rbp, %rbp
je 0x1d3cfc
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rcx
testq %rax, (%rbp,%rcx,8)
jne 0x1d3bef
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movl %r15d, %ecx
shrq %cl, %rax
movq %r15, %rcx
shrq $0x6, %rcx
testq %rax, (%rbp,%rcx,8)
jne 0x1d3bca
movq %r15, 0x50(%rsp)
movb $0x1, 0x58(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeffd3
movq %rax, 0x48(%rsp)
leaq 0x1(%rax), %rdi
leaq 0x1e405b(%rip), %rsi    # 0x3b793b
movl $0xf8, %edx
callq 0x1092b2
movq %rax, 0x40(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xefce0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xed87b
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movb $0x0, (%rax,%rcx)
testb %r14b, %r14b
je 0x1d393a
testq %rbx, %rbx
je 0x1d3d06
movq (%rbx,%r15,8), %rax
movq %rax, 0x60(%rsp)
cmpb $0x0, 0x34(%rsp)
je 0x1d3987
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x10(%rax), %rdx
cmpq 0x10(%rcx), %rdx
jne 0x1d39a4
cmpb $0x1, 0x18(%rcx)
jne 0x1d39a4
movl 0x90(%rsp), %r8d
testl $0xfffffffd, %r8d       # imm = 0xFFFFFFFD
jne 0x1d3bdb
movq (%rax), %rdi
movq 0x8(%rax), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x1d39be
movzbl %r14b, %esi
leaq 0x68(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1d3dd0
jmp 0x1d39e7
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
movl 0x90(%rsp), %r8d
subq $0x8, %rsp
movsd 0x40(%rsp), %xmm0
movq 0x128(%rsp), %r9
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x50e(%rip), %rax       # 0x1d3ee7
pushq %rax
pushq 0x40(%rsp)
callq 0x33081c
addq $0x20, %rsp
leaq 0x1e3f4d(%rip), %rsi    # 0x3b793b
cmpl $0x0, 0x1c(%rsp)
je 0x1d3a3a
testq %rbp, %rbp
je 0x1d3d01
movq 0x50(%rsp), %rcx
cmpl $0x4, %eax
je 0x1d3a24
movq 0xb0(%rsp), %rdx
cmpl $0x3, %eax
je 0x1d3a21
cmpl $0x2, %eax
jne 0x1d3a3a
cmpq %rdx, %rcx
jne 0x1d3a24
jmp 0x1d3a3a
movq %rdx, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
shrq $0x6, %rcx
orq %rax, (%rbp,%rcx,8)
cmpb $0x0, 0x18(%rsp)
je 0x1d3bae
movb $0x0, 0x58(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeffd3
movq %rax, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0xeffd3
cmpq %rax, %rbx
jne 0x1d3d0b
movq %r12, %rdi
movq %r13, %rsi
callq 0xefce0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xed87b
testb %r14b, %r14b
movq 0x8(%rsp), %rbx
je 0x1d3aae
testq %rbx, %rbx
je 0x1d3d15
movq (%rbx,%r13,8), %rax
movq %rax, 0x60(%rsp)
cmpb $0x0, 0x34(%rsp)
je 0x1d3afb
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x10(%rax), %rdx
cmpq 0x10(%rcx), %rdx
jne 0x1d3b18
cmpb $0x1, 0x18(%rcx)
jne 0x1d3b18
movl 0x90(%rsp), %r8d
testl $0xfffffffd, %r8d       # imm = 0xFFFFFFFD
jne 0x1d3be5
movq (%rax), %rdi
movq 0x8(%rax), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x1d3b32
movzbl %r14b, %esi
leaq 0x68(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1d3dd0
jmp 0x1d3b5b
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
movl 0x90(%rsp), %r8d
subq $0x8, %rsp
movsd 0x40(%rsp), %xmm0
movq 0x128(%rsp), %r9
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0x39a(%rip), %rax       # 0x1d3ee7
pushq %rax
pushq 0x40(%rsp)
callq 0x33081c
addq $0x20, %rsp
leaq 0x1e3dd9(%rip), %rsi    # 0x3b793b
cmpl $0x0, 0x1c(%rsp)
je 0x1d3bae
testq %rbp, %rbp
je 0x1d3d10
movq 0x50(%rsp), %rcx
cmpl $0x4, %eax
je 0x1d3b98
movq 0xb0(%rsp), %rdx
cmpl $0x3, %eax
je 0x1d3b95
cmpl $0x2, %eax
jne 0x1d3bae
cmpq %rdx, %rcx
jne 0x1d3b98
jmp 0x1d3bae
movq %rdx, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
shrq $0x6, %rcx
orq %rax, (%rbp,%rcx,8)
movq 0x40(%rsp), %rdi
movl $0x11d, %edx            # imm = 0x11D
callq 0x109670
incq 0x98(%rsp)
movq 0x20(%rsp), %rdx
incq %r15
decq %r13
cmpq %rdx, %r15
jb 0x1d386b
jmp 0x1d3bef
movl $0x2, %eax
jmp 0x1d39e7
movl $0x2, %eax
jmp 0x1d3b5b
movq 0xa0(%rsp), %rdi
leaq 0x1e3d3d(%rip), %r14    # 0x3b793b
movq %r14, %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x109670
movq 0x20(%rsp), %rdx
movq 0xc8(%rsp), %r15
incq %r15
movq 0xd0(%rsp), %r13
decq %r13
cmpq %rdx, %r15
jne 0x1d3794
movq 0x160(%rsp), %rbx
movq 0x158(%rsp), %rax
testq %rax, %rax
je 0x1d3c4e
movq %rbp, (%rax)
movl 0x14(%rsp), %r14d
jmp 0x1d3c77
cmpq $0x0, 0x150(%rsp)
movl 0x14(%rsp), %r14d
jne 0x1d3c77
leaq 0x1e3cd6(%rip), %rsi    # 0x3b793b
movq %rbp, %rdi
movl $0x126, %edx            # imm = 0x126
callq 0x109670
movq 0x20(%rsp), %rdx
testq %rbx, %rbx
je 0x1d3c7f
movq %rdx, (%rbx)
testb %r14b, %r14b
je 0x1d3cde
movl 0x18(%rsp), %ecx
shlq %cl, %rdx
cmpq $0x0, 0x8(%rsp)
je 0x1d3d24
testq %rdx, %rdx
movq 0x8(%rsp), %r15
je 0x1d3cca
xorl %r14d, %r14d
leaq 0x1e3c90(%rip), %rbx    # 0x3b793b
movq (%r15,%r14,8), %rdi
movq %rbx, %rsi
movq %rdx, %r12
movl $0x9c, %edx
callq 0x109670
movq %r12, %rdx
incq %r14
cmpq %r14, %r12
jne 0x1d3cab
leaq 0x1e3c6a(%rip), %rsi    # 0x3b793b
movq %r15, %rdi
movl $0x9d, %edx
callq 0x109670
cmpb $0x0, 0x30(%rsp)
je 0x1d3cea
callq 0x111189
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6c7bf
callq 0x6c6a2
callq 0x6c786
callq 0x6c6db
callq 0x6c714
callq 0x6c74d
callq 0x6c7f8
callq 0x6c86a
callq 0x6c831