// File: afinit[P]afin/match.cpp
// Function: Match::match_contig_fr()
void Match::match_contig_fr(){
  // loop through possible substrings of sequence to check for matches in readlist
  for( int i=sequence.length()-2; i>=min_overlap; i-- ){
    string seq_sub_rc( sequence.substr( 0, i ));
    seq_sub_rc = revcomp( seq_sub_rc );
    tuple<long,long,long,long> range = reads->get_read_range( seq_sub_rc.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_rc.length(), seq_sub_rc ) == 0 ){
            string read_rc = revcomp( reads->get_read(j) );
            push_match( read_rc, i, true );
          }
        }
      }

      // 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_rc.length(), seq_sub_rc ) == 0 ){
            push_match( rc, i );
          }
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
addq $0x28, %rdi
callq 0x45e0
subq $0x2, %rax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x26d58(%rip), %rcx     # 0x3e6cc
cmpl (%rcx), %eax
jl 0x17df6
movq -0x198(%rbp), %rsi
addq $0x28, %rsi
movslq -0xc(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x43e0
movq -0x1a0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x41b0
jmp 0x179b1
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xfc10
jmp 0x179c0
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
leaq -0x50(%rbp), %rsi
movq %rsi, -0x1b8(%rbp)
callq 0x4480
movq -0x1b8(%rbp), %rdi
callq 0x4270
leaq -0x70(%rbp), %rdi
callq 0x4270
movq -0x198(%rbp), %rax
movq -0x1b0(%rbp), %rsi
movq (%rax), %rax
movq %rax, -0x1a8(%rbp)
leaq 0x26cb5(%rip), %rax     # 0x3e6c4
movslq (%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xc0(%rbp), %rdi
callq 0x43e0
jmp 0x17a24
movq -0x1a8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x1b0b0
jmp 0x17a40
leaq -0xc0(%rbp), %rdi
callq 0x4270
leaq -0xa0(%rbp), %rdi
callq 0x17fa0
cmpq $-0x1, (%rax)
je 0x17dd4
leaq -0xa0(%rbp), %rdi
callq 0x17fa0
cmpq $0x0, (%rax)
je 0x17c88
leaq -0xa0(%rbp), %rdi
callq 0x17fa0
movq (%rax), %rax
subq $0x1, %rax
movl %eax, -0xc4(%rbp)
movslq -0xc4(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x17fc0
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
cmpq (%rcx), %rax
jge 0x17c86
movq -0x198(%rbp), %rax
movq (%rax), %rsi
movl -0xc4(%rbp), %edx
leaq -0xe8(%rbp), %rdi
callq 0x1b3a0
jmp 0x17adc
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x45e0
movq -0x1d0(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0xe8(%rbp), %rdi
callq 0x44e0
movl %eax, -0x1c4(%rbp)
jmp 0x17b0e
leaq -0xe8(%rbp), %rdi
callq 0x4270
movl -0x1c4(%rbp), %eax
cmpl $0x0, %eax
jne 0x17c70
movq -0x198(%rbp), %rax
movq (%rax), %rsi
movl -0xc4(%rbp), %edx
leaq -0x128(%rbp), %rdi
callq 0x1b3a0
jmp 0x17b47
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xfc10
jmp 0x17b5c
leaq -0x128(%rbp), %rdi
callq 0x4270
leaq -0x148(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x41b0
jmp 0x17b7d
movq -0x198(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq -0x148(%rbp), %rsi
movl $0x1, %ecx
callq 0x17450
jmp 0x17b9a
leaq -0x148(%rbp), %rdi
callq 0x4270
leaq -0x108(%rbp), %rdi
callq 0x4270
jmp 0x17c70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17deb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4270
jmp 0x17deb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x4270
jmp 0x17deb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x4270
jmp 0x17deb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x4270
jmp 0x17deb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17c5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x4270
leaq -0x108(%rbp), %rdi
callq 0x4270
jmp 0x17deb
jmp 0x17c72
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x17a91
jmp 0x17c88
leaq -0xa0(%rbp), %rdi
callq 0x17fe0
cmpq $0x0, (%rax)
je 0x17dd2
leaq -0xa0(%rbp), %rdi
callq 0x17fe0
movq (%rax), %rax
subq $0x1, %rax
movl %eax, -0x14c(%rbp)
movslq -0x14c(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x18000
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
cmpq (%rcx), %rax
jge 0x17dd0
movq -0x198(%rbp), %rax
movq (%rax), %rsi
movl -0x14c(%rbp), %edx
leaq -0x170(%rbp), %rdi
callq 0x1b3f0
jmp 0x17d02
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x45e0
movq -0x1e8(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0x170(%rbp), %rdi
callq 0x44e0
movl %eax, -0x1dc(%rbp)
jmp 0x17d34
movl -0x1dc(%rbp), %eax
cmpl $0x0, %eax
jne 0x17da2
leaq -0x190(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x41b0
jmp 0x17d54
movq -0x198(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq -0x190(%rbp), %rsi
callq 0x173a0
jmp 0x17d6c
leaq -0x190(%rbp), %rdi
callq 0x4270
jmp 0x17da2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17dc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4270
jmp 0x17dc2
leaq -0x170(%rbp), %rdi
callq 0x4270
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x17cb7
leaq -0x170(%rbp), %rdi
callq 0x4270
jmp 0x17deb
jmp 0x17dd2
jmp 0x17dd4
leaq -0x30(%rbp), %rdi
callq 0x4270
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1796a
leaq -0x30(%rbp), %rdi
callq 0x4270
jmp 0x17dff
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x46c0
nopl (%rax,%rax)