// File: /workspace/github_c_makefile_star2_O3/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 0x1caac4
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 0xe7bac
movq %rax, %r13
testb %r14b, %r14b
movl %r14d, 0x14(%rsp)
je 0x1ca473
leaq (,%r13,8), %rdi
leaq 0x1e3f71(%rip), %rsi    # 0x3ae33b
movl $0x88, %edx
callq 0x104226
movq %rax, %rbx
testq %r13, %r13
je 0x1ca475
movq %rbx, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xeb9d2
movq %r13, %r15
movq %rax, %r13
leaq 0x1(%rax), %rdi
leaq 0x1e3f38(%rip), %r14    # 0x3ae33b
movq %r14, %rsi
movl $0x8d, %edx
callq 0x104226
movq %rax, %rbp
movq %r12, %rdi
movq %rbx, %rsi
callq 0xeb6ee
leaq (%rax,%r13), %rcx
decq %rcx
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0xe92be
movb $0x0, (%rbp,%r13)
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %r13
callq 0x327d78
movq 0x8(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
movq %rbp, %rdi
movq %r14, %rsi
movl $0x93, %edx
callq 0x1045eb
incq %rbx
cmpq %rbx, %r15
jne 0x1ca3e7
movq 0x8(%rsp), %rbx
jmp 0x1ca475
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 0x1ca4f1
cmpl $0x0, 0x1c(%rsp)
je 0x1ca4ef
leaq -0x1(%rdx), %rax
shrq $0x6, %rax
cmpq $0x40, %rdx
leaq 0x8(,%rax,8), %rax
movl $0x8, %ebx
cmovaeq %rax, %rbx
leaq 0x1e3e77(%rip), %rdx    # 0x3ae33b
xorl %edi, %edi
movq %rbx, %rsi
movl $0xd7, %ecx
callq 0x104461
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
callq 0x173a0
movq 0x20(%rsp), %rdx
jmp 0x1ca4f1
xorl %ebp, %ebp
cmpb $0x0, 0x30(%rsp)
je 0x1ca515
leaq -0x1(%rdx), %rsi
imulq %rdx, %rsi
shrq %rsi
leaq 0x98(%rsp), %rdi
callq 0x10ba28
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
je 0x1ca9d3
decq %r13
xorl %r15d, %r15d
leaq 0x1e3e10(%rip), %r14    # 0x3ae33b
movzbl 0x128(%rsp), %eax
movq %rax, 0x28(%rsp)
movq %r15, 0xb0(%rsp)
movb $0x1, 0xb8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeb9d2
movq %rax, 0xa8(%rsp)
leaq 0x1(%rax), %rdi
movq %r14, %rsi
movl $0xe0, %edx
callq 0x104226
movq %rax, 0xa0(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeb6ee
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xe92be
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movl 0x14(%rsp), %r14d
testb %r14b, %r14b
je 0x1ca5d3
testq %rbx, %rbx
je 0x1caabf
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 0x1ca65f
testq %rbp, %rbp
je 0x1caaa1
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rcx
testq %rax, (%rbp,%rcx,8)
jne 0x1ca993
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movl %r15d, %ecx
shrq %cl, %rax
movq %r15, %rcx
shrq $0x6, %rcx
testq %rax, (%rbp,%rcx,8)
jne 0x1ca96e
movq %r15, 0x50(%rsp)
movb $0x1, 0x58(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeb9d2
movq %rax, 0x48(%rsp)
leaq 0x1(%rax), %rdi
leaq 0x1e3cb7(%rip), %rsi    # 0x3ae33b
movl $0xf8, %edx
callq 0x104226
movq %rax, 0x40(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeb6ee
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xe92be
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movb $0x0, (%rax,%rcx)
testb %r14b, %r14b
je 0x1ca6de
testq %rbx, %rbx
je 0x1caaab
movq (%rbx,%r15,8), %rax
movq %rax, 0x60(%rsp)
cmpb $0x0, 0x34(%rsp)
je 0x1ca72b
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x10(%rax), %rdx
cmpq 0x10(%rcx), %rdx
jne 0x1ca748
cmpb $0x1, 0x18(%rcx)
jne 0x1ca748
movl 0x90(%rsp), %r8d
testl $0xfffffffd, %r8d       # imm = 0xFFFFFFFD
jne 0x1ca97f
movq (%rax), %rdi
movq 0x8(%rax), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x1ca762
movzbl %r14b, %esi
leaq 0x68(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1cab75
jmp 0x1ca78b
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 0x50f(%rip), %rax       # 0x1cac8c
pushq %rax
pushq 0x40(%rsp)
callq 0x326170
addq $0x20, %rsp
leaq 0x1e3ba9(%rip), %rsi    # 0x3ae33b
cmpl $0x0, 0x1c(%rsp)
je 0x1ca7de
testq %rbp, %rbp
je 0x1caaa6
movq 0x50(%rsp), %rcx
cmpl $0x4, %eax
je 0x1ca7c8
movq 0xb0(%rsp), %rdx
cmpl $0x3, %eax
je 0x1ca7c5
cmpl $0x2, %eax
jne 0x1ca7de
cmpq %rdx, %rcx
jne 0x1ca7c8
jmp 0x1ca7de
movq %rdx, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
shrq $0x6, %rcx
orq %rax, (%rbp,%rcx,8)
cmpb $0x0, 0x18(%rsp)
je 0x1ca952
movb $0x0, 0x58(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeb9d2
movq %rax, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0xeb9d2
cmpq %rax, %rbx
jne 0x1caab0
movq %r12, %rdi
movq %r13, %rsi
callq 0xeb6ee
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
addq %rax, %rcx
decq %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0xe92be
testb %r14b, %r14b
movq 0x8(%rsp), %rbx
je 0x1ca852
testq %rbx, %rbx
je 0x1caaba
movq (%rbx,%r13,8), %rax
movq %rax, 0x60(%rsp)
cmpb $0x0, 0x34(%rsp)
je 0x1ca89f
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x10(%rax), %rdx
cmpq 0x10(%rcx), %rdx
jne 0x1ca8bc
cmpb $0x1, 0x18(%rcx)
jne 0x1ca8bc
movl 0x90(%rsp), %r8d
testl $0xfffffffd, %r8d       # imm = 0xFFFFFFFD
jne 0x1ca989
movq (%rax), %rdi
movq 0x8(%rax), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x1ca8d6
movzbl %r14b, %esi
leaq 0x68(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1cab75
jmp 0x1ca8ff
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 0x39b(%rip), %rax       # 0x1cac8c
pushq %rax
pushq 0x40(%rsp)
callq 0x326170
addq $0x20, %rsp
leaq 0x1e3a35(%rip), %rsi    # 0x3ae33b
cmpl $0x0, 0x1c(%rsp)
je 0x1ca952
testq %rbp, %rbp
je 0x1caab5
movq 0x50(%rsp), %rcx
cmpl $0x4, %eax
je 0x1ca93c
movq 0xb0(%rsp), %rdx
cmpl $0x3, %eax
je 0x1ca939
cmpl $0x2, %eax
jne 0x1ca952
cmpq %rdx, %rcx
jne 0x1ca93c
jmp 0x1ca952
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 0x1045eb
incq 0x98(%rsp)
movq 0x20(%rsp), %rdx
incq %r15
decq %r13
cmpq %rdx, %r15
jb 0x1ca60f
jmp 0x1ca993
movl $0x2, %eax
jmp 0x1ca78b
movl $0x2, %eax
jmp 0x1ca8ff
movq 0xa0(%rsp), %rdi
leaq 0x1e3999(%rip), %r14    # 0x3ae33b
movq %r14, %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x1045eb
movq 0x20(%rsp), %rdx
movq 0xc8(%rsp), %r15
incq %r15
movq 0xd0(%rsp), %r13
decq %r13
cmpq %rdx, %r15
jne 0x1ca538
movq 0x160(%rsp), %rbx
movq 0x158(%rsp), %rax
testq %rax, %rax
je 0x1ca9f2
movq %rbp, (%rax)
movl 0x14(%rsp), %r14d
jmp 0x1caa1b
cmpq $0x0, 0x150(%rsp)
movl 0x14(%rsp), %r14d
jne 0x1caa1b
leaq 0x1e3932(%rip), %rsi    # 0x3ae33b
movq %rbp, %rdi
movl $0x126, %edx            # imm = 0x126
callq 0x1045eb
movq 0x20(%rsp), %rdx
testq %rbx, %rbx
je 0x1caa23
movq %rdx, (%rbx)
testb %r14b, %r14b
je 0x1caa83
movzbl 0x18(%rsp), %ecx
shlq %cl, %rdx
cmpq $0x0, 0x8(%rsp)
je 0x1caac9
testq %rdx, %rdx
movq 0x8(%rsp), %r15
je 0x1caa6f
xorl %r14d, %r14d
leaq 0x1e38eb(%rip), %rbx    # 0x3ae33b
movq (%r15,%r14,8), %rdi
movq %rbx, %rsi
movq %rdx, %r12
movl $0x9c, %edx
callq 0x1045eb
movq %r12, %rdx
incq %r14
cmpq %r14, %r12
jne 0x1caa50
leaq 0x1e38c5(%rip), %rsi    # 0x3ae33b
movq %r15, %rdi
movl $0x9d, %edx
callq 0x1045eb
cmpb $0x0, 0x30(%rsp)
je 0x1caa8f
callq 0x10bf8a
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6aeac
callq 0x6ad8f
callq 0x6ae73
callq 0x6adc8
callq 0x6ae01
callq 0x6ae3a
callq 0x6aee5
callq 0x6af57
callq 0x6af1e