// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/match.cpp
// Function: Match::match_contig_rr()
void Match::match_contig_rr(){
  // loop through possible substrings of sequence to check for matches in readlist
  for( int i=1; i<sequence.length()-min_overlap; i++ ){
    string seq_sub( sequence.substr( i, sequence.length()-1 ));
    tuple<long,long,long,long> range = reads->get_read_range( seq_sub.substr( 0, max_sort_char ) );

    if( get<0>(range) != -1 ){
      // check reads in range against sequence 
      if( get<0>(range) != 0 ){
        for( int j=get<0>(range)-1; j<get<1>(range); j++ ){
          // check if the current read matches the sequence from this point
          if( reads->get_read(j).compare( 0, seq_sub.length(), seq_sub ) == 0 ){
            push_match( reads->get_read(j), i );
          }
        }
      }

      // check if there are revcomp reads to be checked
      if( get<2>(range) != 0 ){
        // check reverse complements
        for( int j=get<2>(range)-1; j<get<3>(range); j++ ){
          // check if the current read matches the sequence from this point
          string rc = reads->get_rc_read(j);

          if( rc.compare( 0, seq_sub.length(), seq_sub ) == 0 ){
            push_match( rc, i, true );
          }
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq 0x30(%rdi), %rcx
leaq 0xf821(%rip), %rax      # 0x1d61c
movslq (%rax), %rax
movq %rcx, %rdx
subq %rax, %rdx
cmpq $0x2, %rdx
jb 0xe037
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
movq %rax, -0x50(%rbp)
movl $0x1, %r15d
leaq -0xb0(%rbp), %r12
decq %rcx
movq %r12, %rdi
movq -0x50(%rbp), %rsi
movq %r15, %rdx
callq 0x4330
movq (%rbx), %r13
leaq 0xf7d2(%rip), %rax      # 0x1d614
movslq (%rax), %rcx
leaq -0xf0(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4330
leaq -0x90(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xffe0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0xde83
callq 0x42f0
movq -0x78(%rbp), %r13
cmpq $-0x1, %r13
je 0xdf52
testq %r13, %r13
jne 0xdf8f
movq -0x88(%rbp), %r13
testq %r13, %r13
je 0xdf52
shlq $0x20, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r13
sarq $0x20, %r13
cmpq %r13, -0x90(%rbp)
jle 0xdf52
movq (%rbx), %rsi
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movl %r13d, %edx
callq 0x10116
movq -0xa8(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x43d0
testl %eax, %eax
jne 0xdf38
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x68f6
movq %rbx, %rdi
leaq -0x70(%rbp), %rsi
movl %r15d, %edx
movl $0x1, %ecx
callq 0xdd0a
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xdf38
callq 0x42f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xdf4a
callq 0x42f0
incq %r13
jmp 0xdebf
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xdf6a
callq 0x42f0
incq %r15
movq 0x30(%rbx), %rcx
leaq 0xf6a4(%rip), %rax      # 0x1d61c
movslq (%rax), %rax
movq %rcx, %rdx
subq %rax, %rdx
cmpq %r15, %rdx
ja 0xde26
jmp 0xe037
shlq $0x20, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r13
sarq $0x20, %r13
cmpq %r13, -0x80(%rbp)
jle 0xde9a
movq (%rbx), %rsi
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movl %r13d, %edx
callq 0x100dc
movq -0xa8(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %r14
movq %r12, %rcx
callq 0x43d0
movl %eax, %r12d
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xdfec
callq 0x42f0
testl %r12d, %r12d
movq %r14, %r12
jne 0xe02f
movq (%rbx), %rsi
leaq -0xd0(%rbp), %r14
movq %r14, %rdi
movl %r13d, %edx
callq 0x100dc
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0xdc56
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0xe02f
callq 0x42f0
incq %r13
jmp 0xdfa4
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe08e
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
jmp 0xe09e
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
jmp 0xe09e
jmp 0xe08e
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xe096
callq 0x42f0
jmp 0xe096
jmp 0xe093
jmp 0xe08e
movq %rax, %rbx
jmp 0xe0a8
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xe0a8
callq 0x42f0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0xe0c0
callq 0x42f0
movq %rbx, %rdi
callq 0x4590