// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x138, %rsp            # imm = 0x138
movl %r9d, 0x38(%rsp)
movl %r8d, 0x3c(%rsp)
movq %rdx, %r8
movl 0x38(%rsp), %edx
movl %esi, %r9d
movl 0x3c(%rsp), %esi
movl %edi, %eax
movb %cl, %dil
movb %al, %r10b
movq 0x180(%rsp), %rax
movq 0x178(%rsp), %rax
movq 0x170(%rsp), %rax
movb 0x168(%rsp), %al
movq 0x160(%rsp), %rcx
movq 0x158(%rsp), %rcx
movq 0x150(%rsp), %rcx
movb 0x148(%rsp), %cl
movq 0x140(%rsp), %r11
andb $0x1, %r10b
movb %r10b, 0x137(%rsp)
movl %r9d, 0x130(%rsp)
movq %r8, 0x128(%rsp)
andb $0x1, %dil
movb %dil, 0x127(%rsp)
andb $0x1, %sil
movb %sil, 0x126(%rsp)
andb $0x1, %dl
movb %dl, 0x125(%rsp)
movsd %xmm0, 0x118(%rsp)
andb $0x1, %cl
movb %cl, 0x117(%rsp)
andb $0x1, %al
movb %al, 0x116(%rsp)
movq $0x0, 0x108(%rsp)
movq $0x0, 0x100(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x128(%rsp)
jne 0x2867ec
movq 0x3b57e5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f84e(%rip), %rsi    # 0x516013
leaq 0x2ebc16(%rip), %rdx    # 0x5723e2
leaq 0x2fa821(%rip), %rcx    # 0x580ff4
leaq 0x2fa71e(%rip), %r8     # 0x580ef8
movl $0xc8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2867ee
movl 0x130(%rsp), %eax
movl %eax, 0x78(%rsp)
cmpl $0x2, 0x130(%rsp)
jne 0x286815
testb $0x1, 0x116(%rsp)
je 0x286815
movl $0x3, 0x78(%rsp)
movq 0x128(%rsp), %rdi
callq 0xa9d50
movq %rax, 0xd0(%rsp)
testb $0x1, 0x125(%rsp)
je 0x28684e
movq 0x128(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x287280
movq %rax, 0x48(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xd8(%rsp)
testb $0x1, 0x127(%rsp)
je 0x28687b
movq 0xd0(%rsp), %rax
shrq %rax
movq %rax, 0xd0(%rsp)
cmpq $0x0, 0x170(%rsp)
je 0x28689b
movq 0x170(%rsp), %rax
movq %rax, 0x108(%rsp)
jmp 0x286926
cmpl $0x0, 0x130(%rsp)
je 0x286924
movq 0xd0(%rsp), %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x2868c3
movl $0x1, %eax
movq %rax, 0x30(%rsp)
jmp 0x2868dc
movq 0xd0(%rsp), %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x2fa5fe(%rip), %rdx    # 0x580ef8
movl $0xd7, %ecx
callq 0xe8540
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
movq 0x40(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
jmp 0x286926
testb $0x1, 0x126(%rsp)
je 0x286958
movq 0xd0(%rsp), %rsi
movq 0xd0(%rsp), %rax
subq $0x1, %rax
imulq %rax, %rsi
shrq %rsi
leaq 0x100(%rsp), %rdi
callq 0xf9830
movq $0x0, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
cmpq 0xd0(%rsp), %rax
jae 0x286fde
movq 0xf8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movb $0x1, 0xc0(%rsp)
movq 0x128(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0xb09f0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
leaq 0x2fa532(%rip), %rsi    # 0x580ef8
movl $0xe0, %edx
callq 0xe80f0
movq %rax, 0xa8(%rsp)
movq 0x128(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0xb0530
movq %rax, 0xe8(%rsp)
movq 0x128(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movq 0xe8(%rsp), %rcx
addq 0xb0(%rsp), %rcx
subq $0x1, %rcx
callq 0xac570
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rcx
movb $0x0, (%rax,%rcx)
testb $0x1, 0x125(%rsp)
je 0x286aa1
jmp 0x286a46
cmpq $0x0, 0x48(%rsp)
jne 0x286a86
movq 0x3b554b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f5b4(%rip), %rsi    # 0x516013
leaq 0x2fa5a3(%rip), %rdx    # 0x581009
leaq 0x2fa587(%rip), %rcx    # 0x580ff4
leaq 0x2fa484(%rip), %r8     # 0x580ef8
movl $0xe6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x286a88
movq 0x48(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xc8(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
cmpq 0xd0(%rsp), %rax
jae 0x286fac
testb $0x1, 0x116(%rsp)
je 0x286ba2
jmp 0x286ad7
cmpq $0x0, 0x108(%rsp)
jne 0x286b1a
movq 0x3b54b7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f520(%rip), %rsi    # 0x516013
leaq 0x2fa522(%rip), %rdx    # 0x58101c
leaq 0x2fa4f3(%rip), %rcx    # 0x580ff4
leaq 0x2fa3f0(%rip), %r8     # 0x580ef8
movl $0xee, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x286b1c
movq 0x108(%rsp), %rax
movq 0xf8(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0xf8(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x286b5e
jmp 0x286fac
movq 0x108(%rsp), %rax
movq 0xf0(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0xf0(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x286ba0
jmp 0x286f93
jmp 0x286ba2
movq 0xf0(%rsp), %rax
movq %rax, 0x90(%rsp)
movb $0x1, 0x98(%rsp)
movq 0x128(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
leaq 0x2fa30a(%rip), %rsi    # 0x580ef8
movl $0xf8, %edx
callq 0xe80f0
movq %rax, 0x80(%rsp)
movq 0x128(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xb0530
movq %rax, 0xe8(%rsp)
movq 0x128(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movq 0xe8(%rsp), %rcx
addq 0x88(%rsp), %rcx
subq $0x1, %rcx
callq 0xac570
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movb $0x0, (%rax,%rcx)
testb $0x1, 0x125(%rsp)
je 0x286cc9
jmp 0x286c6e
cmpq $0x0, 0x48(%rsp)
jne 0x286cae
movq 0x3b5323(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f38c(%rip), %rsi    # 0x516013
leaq 0x2fa37b(%rip), %rdx    # 0x581009
leaq 0x2fa35f(%rip), %rcx    # 0x580ff4
leaq 0x2fa25c(%rip), %r8     # 0x580ef8
movl $0xff, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x286cb0
movq 0x48(%rsp), %rax
movq 0xf0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
testb $0x1, 0x137(%rsp)
je 0x286d00
movsd 0x118(%rsp), %xmm0
movq 0x140(%rsp), %rsi
movb 0x117(%rsp), %al
leaq 0x50(%rsp), %rdi
andb $0x1, %al
movzbl %al, %edx
callq 0x2873e0
movl %eax, 0x2c(%rsp)
jmp 0x286d2f
movb 0x125(%rsp), %cl
movq 0x140(%rsp), %rdx
movb 0x117(%rsp), %al
leaq 0x50(%rsp), %rdi
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %esi
movzbl %al, %ecx
callq 0x287540
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x110(%rsp)
cmpl $0x0, 0x130(%rsp)
je 0x286d68
movl 0x110(%rsp), %edi
movq 0xb8(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0x108(%rsp), %rcx
callq 0x2877c0
testb $0x1, 0x127(%rsp)
je 0x286f66
movq 0xd8(%rsp), %rax
subq 0xf0(%rsp), %rax
subq $0x1, %rax
movq %rax, 0xe0(%rsp)
movb $0x0, 0x98(%rsp)
movq 0x128(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x20(%rsp)
movq 0x128(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0xb09f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
je 0x286e0e
movq 0x3b51c3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f22c(%rip), %rsi    # 0x516013
leaq 0x2fa23f(%rip), %rdx    # 0x58102d
leaq 0x2fa1ff(%rip), %rcx    # 0x580ff4
leaq 0x2fa0fc(%rip), %r8     # 0x580ef8
movl $0x10e, %r9d            # imm = 0x10E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x286e10
movq 0x128(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0xb0530
movq %rax, 0xe8(%rsp)
movq 0x128(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movq 0xe8(%rsp), %rcx
addq 0x88(%rsp), %rcx
subq $0x1, %rcx
callq 0xac570
testb $0x1, 0x125(%rsp)
je 0x286ec5
jmp 0x286e6a
cmpq $0x0, 0x48(%rsp)
jne 0x286eaa
movq 0x3b5127(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28f190(%rip), %rsi    # 0x516013
leaq 0x2fa17f(%rip), %rdx    # 0x581009
leaq 0x2fa163(%rip), %rcx    # 0x580ff4
leaq 0x2fa060(%rip), %r8     # 0x580ef8
movl $0x114, %r9d            # imm = 0x114
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x286eac
movq 0x48(%rsp), %rax
movq 0xe0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
testb $0x1, 0x137(%rsp)
je 0x286efc
movsd 0x118(%rsp), %xmm0
movq 0x140(%rsp), %rsi
movb 0x117(%rsp), %al
leaq 0x50(%rsp), %rdi
andb $0x1, %al
movzbl %al, %edx
callq 0x2873e0
movl %eax, 0x1c(%rsp)
jmp 0x286f2b
movb 0x125(%rsp), %cl
movq 0x140(%rsp), %rdx
movb 0x117(%rsp), %al
leaq 0x50(%rsp), %rdi
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %esi
movzbl %al, %ecx
callq 0x287540
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x110(%rsp)
cmpl $0x0, 0x130(%rsp)
je 0x286f64
movl 0x110(%rsp), %edi
movq 0xb8(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0x108(%rsp), %rcx
callq 0x2877c0
jmp 0x286f66
movq 0x80(%rsp), %rdi
leaq 0x2f9f83(%rip), %rsi    # 0x580ef8
movl $0x11d, %edx            # imm = 0x11D
callq 0xe88c0
movq 0x100(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x100(%rsp)
movq 0xf0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf0(%rsp)
jmp 0x286ab1
movq 0xa8(%rsp), %rdi
leaq 0x2f9f3d(%rip), %rsi    # 0x580ef8
movl $0x120, %edx            # imm = 0x120
callq 0xe88c0
movq 0xf8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
jmp 0x286964
cmpq $0x0, 0x178(%rsp)
je 0x286ffe
movq 0x108(%rsp), %rcx
movq 0x178(%rsp), %rax
movq %rcx, (%rax)
jmp 0x287024
cmpq $0x0, 0x170(%rsp)
jne 0x287022
movq 0x108(%rsp), %rdi
leaq 0x2f9ee0(%rip), %rsi    # 0x580ef8
movl $0x126, %edx            # imm = 0x126
callq 0xe88c0
jmp 0x287024
cmpq $0x0, 0x180(%rsp)
je 0x287042
movq 0xd0(%rsp), %rcx
movq 0x180(%rsp), %rax
movq %rcx, (%rax)
testb $0x1, 0x125(%rsp)
je 0x28708e
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
testb $0x1, 0x127(%rsp)
je 0x287072
movq 0xd0(%rsp), %rax
shlq %rax
movq %rax, 0x8(%rsp)
jmp 0x28707f
movq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2878e0
testb $0x1, 0x126(%rsp)
je 0x28709d
callq 0xfa220
addq $0x138, %rsp            # imm = 0x138
retq
nopw %cs:(%rax,%rax)