// File: BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: EbwtRangeSource::tallyNs(int&, int&)
bool tallyNs(int& nsInSeed, int& nsInFtab) {
		const Ebwt& ebwt = *ebwt_;
		int ftabChars = ebwt._eh._ftabChars;
		// Count Ns in the seed region of the read and short-circuit if
		// the configuration of Ns guarantees that there will be no
		// valid alignments given the backtracking constraints.
		for(size_t i = 0; i < offRev3_; i++) {
			if((int)(*qry_)[qlen_-i-1] == 4) {
				nsInSeed++;
				if(nsInSeed == 1) {
					if(i < offRev0_) {
						return false; // Exceeded mm budget on Ns alone
					}
				} else if(nsInSeed == 2) {
					if(i < offRev1_) {
						return false; // Exceeded mm budget on Ns alone
					}
				} else if(nsInSeed == 3) {
					if(i < offRev2_) {
						return false; // Exceeded mm budget on Ns alone
					}
				} else {
					assert_gt(nsInSeed, 3);
					return false;     // Exceeded mm budget on Ns alone
				}
			}
		}
		// Calculate the number of Ns there are in the region that
		// would get jumped over if the ftab were used.
		for(size_t i = 0; i < (size_t)ftabChars && i < qlen_; i++) {
			if((int)(*qry_)[qlen_-i-1] == 4) nsInFtab++;
		}
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x68(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x124(%rax), %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movl 0x80(%rcx), %ecx
cmpq %rcx, %rax
jae 0x408de
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rax), %rsi
subq -0x38(%rbp), %rsi
subq $0x1, %rsi
callq 0x403a0
movsbl (%rax), %eax
cmpl $0x4, %eax
jne 0x408cb
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x40874
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movl 0x74(%rcx), %ecx
cmpq %rcx, %rax
jae 0x40872
movb $0x0, -0x1(%rbp)
jmp 0x40953
jmp 0x408c9
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x40898
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movl 0x78(%rcx), %ecx
cmpq %rcx, %rax
jae 0x40896
movb $0x0, -0x1(%rbp)
jmp 0x40953
jmp 0x408c7
movq -0x18(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x408bc
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movl 0x7c(%rcx), %ecx
cmpq %rcx, %rax
jae 0x408ba
movb $0x0, -0x1(%rbp)
jmp 0x40953
jmp 0x408c5
movb $0x0, -0x1(%rbp)
jmp 0x40953
jmp 0x408c7
jmp 0x408c9
jmp 0x408cb
jmp 0x408cd
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x40809
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x49(%rbp)
jae 0x4090a
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq 0x50(%rcx), %rax
setb %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x40913
jmp 0x4094f
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rax), %rsi
subq -0x40(%rbp), %rsi
subq $0x1, %rsi
callq 0x403a0
movsbl (%rax), %eax
cmpl $0x4, %eax
jne 0x4093f
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x40941
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x408e6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nop