// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./range_source.h
// Function: Branch::installRanges(int, int, unsigned int, unsigned char const*)
int installRanges(int c, int nextc, uint32_t qAllow, const uint8_t* qs) {
		assert(!exhausted_);
		assert(ranges_ != NULL);
		RangeState& r = ranges_[len_];
		int ret = 0;
		r.eliminated_ = true; // start with everything eliminated
		r.eq.eliminate(); // set all elim flags to 1
		assert_lt(qs[0], 127);
		assert_lt(qs[1], 127);
		assert_lt(qs[2], 127);
		assert_lt(qs[3], 127);
		assert_eq(qs[0], qs[1]);
		assert_eq(qs[0], qs[2]);
		assert_eq(qs[0], qs[3]);
		r.eq.flags.quallo = qs[0];
		if(qs[0] > qAllow) return 0;
		// Set one/both of these to true to do the accounting for
		// insertions and deletions as well as mismatches
		bool doInserts = false;
		bool doDeletes = false;
		// We can proceed on an A
		if(c != 0 && r.bots[0] > r.tops[0] && qs[0] <= qAllow) {
			r.eliminated_ = false;
			r.eq.flags.mmA = 0; // A substitution is an option
			if(doInserts) r.eq.flags.insA = 0;
			if(doDeletes && nextc == 0) r.eq.flags.del = 0;
			ret++;
		}
		// We can proceed on a C
		if(c != 1 && r.bots[1] > r.tops[1] && qs[1] <= qAllow) {
			r.eliminated_ = false;
			r.eq.flags.mmC = 0; // C substitution is an option
			if(doInserts) r.eq.flags.insC = 0;
			if(doDeletes && nextc == 1) r.eq.flags.del = 0;
			ret++;
		}
		// We can proceed on a G
		if(c != 2 && r.bots[2] > r.tops[2] && qs[2] <= qAllow) {
			r.eliminated_ = false;
			r.eq.flags.mmG = 0; // G substitution is an option
			if(doInserts) r.eq.flags.insG = 0;
			if(doDeletes && nextc == 2) r.eq.flags.del = 0;
			ret++;
		}
		// We can proceed on a T
		if(c != 3 && r.bots[3] > r.tops[3] && qs[3] <= qAllow) {
			r.eliminated_ = false;
			r.eq.flags.mmT = 0; // T substitution is an option
			if(doInserts) r.eq.flags.insT = 0;
			if(doDeletes && nextc == 3) r.eq.flags.del = 0;
			ret++;
		}
		return ret;
	}

// Assembly:
movq 0x18(%rdi), %rdx
movzwl 0xe(%rdi), %eax
leaq (%rax,%rax,2), %r9
shll $0x4, %r9d
movb $0x1, 0x28(%rdx,%r9)
movl $0x1fff, %eax           # imm = 0x1FFF
orq 0x20(%rdx,%r9), %rax
movq %rax, 0x20(%rdx,%r9)
movzbl (%r8), %r10d
andl $0x7f, %r10d
shlq $0x29, %r10
movabsq $-0xfe0000000001, %rdi  # imm = 0xFFFF01FFFFFFFFFF
andq %rax, %rdi
orq %r10, %rdi
movq %rdi, 0x20(%rdx,%r9)
movzbl (%r8), %r10d
xorl %eax, %eax
cmpl %ecx, %r10d
ja 0x2d1fe
addq %r9, %rdx
testl %esi, %esi
je 0x2d18f
movl 0x10(%rdx), %r9d
xorl %eax, %eax
cmpl (%rdx), %r9d
jbe 0x2d188
movb $0x0, 0x28(%rdx)
andq $-0x2, %rdi
movq %rdi, 0x20(%rdx)
movl $0x1, %eax
cmpl $0x1, %esi
jne 0x2d191
jmp 0x2d1b8
xorl %eax, %eax
movl 0x14(%rdx), %r9d
cmpl 0x4(%rdx), %r9d
jbe 0x2d1b3
movzbl 0x1(%r8), %r9d
cmpl %ecx, %r9d
ja 0x2d1b3
movb $0x0, 0x28(%rdx)
andq $-0x3, %rdi
movq %rdi, 0x20(%rdx)
incl %eax
cmpl $0x2, %esi
je 0x2d1df
movl 0x18(%rdx), %r9d
cmpl 0x8(%rdx), %r9d
jbe 0x2d1da
movzbl 0x2(%r8), %r9d
cmpl %ecx, %r9d
ja 0x2d1da
movb $0x0, 0x28(%rdx)
andq $-0x5, %rdi
movq %rdi, 0x20(%rdx)
incl %eax
cmpl $0x3, %esi
je 0x2d1fe
movl 0x1c(%rdx), %esi
cmpl 0xc(%rdx), %esi
jbe 0x2d1fe
movzbl 0x3(%r8), %esi
cmpl %ecx, %esi
ja 0x2d1fe
movb $0x0, 0x28(%rdx)
andq $-0x9, %rdi
movq %rdi, 0x20(%rdx)
incl %eax
retq
nop