// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
movq %rax, -0x38(%rbp)
pushq $0x1
popq %rdx
leaq -0x78(%rbp), %r15
leaq -0xd8(%rbp), %r12
leaq -0xb8(%rbp), %r14
movq 0x30(%rbx), %rcx
leaq 0x100b7(%rip), %rax     # 0x1b62c
movslq (%rax), %rax
movq %rcx, %rsi
subq %rax, %rsi
cmpq %rdx, %rsi
jbe 0xb706
decq %rcx
movq %r15, %rdi
movq -0x38(%rbp), %rsi
movq %rdx, -0x30(%rbp)
callq 0x4330
movq (%rbx), %r13
leaq 0x10080(%rip), %rax     # 0x1b624
movslq (%rax), %rcx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4330
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xcf28
movq %r12, %rdi
callq 0x4160
movq -0x40(%rbp), %r13
cmpq $-0x1, %r13
je 0xb666
testq %r13, %r13
jne 0xb681
movq -0x50(%rbp), %r13
testq %r13, %r13
je 0xb666
shlq $0x20, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r13
sarq $0x20, %r13
cmpq %r13, -0x58(%rbp)
jle 0xb666
movq (%rbx), %rsi
movq %r14, %rdi
movl %r13d, %edx
callq 0xd06c
movq -0x70(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x43c0
testl %eax, %eax
jne 0xb659
leaq -0x98(%rbp), %rdi
movq %r14, %rsi
callq 0x4410
movq %rbx, %rdi
leaq -0x98(%rbp), %r12
movq %r12, %rsi
movq -0x30(%rbp), %rdx
pushq $0x1
popq %rcx
callq 0xb498
movq %r12, %rdi
callq 0x4160
movq %r14, %rdi
callq 0x4160
incq %r13
jmp 0xb600
movq %r15, %rdi
callq 0x4160
movq -0x30(%rbp), %rdx
incq %rdx
leaq -0xd8(%rbp), %r12
jmp 0xb56a
shlq $0x20, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r13
sarq $0x20, %r13
cmpq %r13, -0x48(%rbp)
jle 0xb5e2
movq (%rbx), %rsi
movq %r14, %rdi
movl %r13d, %edx
callq 0xd046
movq -0x70(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %r12
movq %r15, %rcx
callq 0x43c0
movl %eax, %r15d
movq %r14, %rdi
callq 0x4160
testl %r15d, %r15d
movq %r12, %r15
jne 0xb701
movq (%rbx), %rsi
leaq -0xf8(%rbp), %r12
movq %r12, %rdi
movl %r13d, %edx
callq 0xd046
movq %rbx, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %rdx
callq 0xb41a
movq %r12, %rdi
callq 0x4160
incq %r13
jmp 0xb696
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
jmp 0xb758
jmp 0xb749
jmp 0xb749
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
jmp 0xb758
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x4160
jmp 0xb751
jmp 0xb749
jmp 0xb74e
movq %rax, %rbx
jmp 0xb75d
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x4160
leaq -0x78(%rbp), %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4590