// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
movzwl 0xe(%rcx), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movb $0x1, 0x28(%rax)
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
callq 0x46c10
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $0x7f, %rdx
shlq $0x29, %rdx
movabsq $-0xfe0000000001, %rsi  # imm = 0xFFFF01FFFFFFFFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x44701
movl $0x0, -0x4(%rbp)
jmp 0x4493d
movb $0x0, -0x35(%rbp)
movb $0x0, -0x36(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x44793
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jbe 0x44793
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl -0x1c(%rbp), %eax
ja 0x44793
movq -0x30(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x2, %rcx
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x35(%rbp)
je 0x44767
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x101, %rcx           # imm = 0xFEFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x36(%rbp)
je 0x4478a
cmpl $0x0, -0x18(%rbp)
jne 0x4478a
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x1001, %rcx          # imm = 0xEFFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x4481f
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x4481f
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl -0x1c(%rbp), %eax
ja 0x4481f
movq -0x30(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x3, %rcx
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x35(%rbp)
je 0x447f3
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x201, %rcx           # imm = 0xFDFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x36(%rbp)
je 0x44816
cmpl $0x1, -0x18(%rbp)
jne 0x44816
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x1001, %rcx          # imm = 0xEFFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x2, -0x14(%rbp)
je 0x448ab
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x448ab
movq -0x28(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x1c(%rbp), %eax
ja 0x448ab
movq -0x30(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x5, %rcx
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x35(%rbp)
je 0x4487f
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x401, %rcx           # imm = 0xFBFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x36(%rbp)
je 0x448a2
cmpl $0x2, -0x18(%rbp)
jne 0x448a2
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x1001, %rcx          # imm = 0xEFFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x3, -0x14(%rbp)
je 0x44937
movq -0x30(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jbe 0x44937
movq -0x28(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl -0x1c(%rbp), %eax
ja 0x44937
movq -0x30(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x9, %rcx
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x35(%rbp)
je 0x4490b
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x801, %rcx           # imm = 0xF7FF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
testb $0x1, -0x36(%rbp)
je 0x4492e
cmpl $0x3, -0x18(%rbp)
jne 0x4492e
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
andq $-0x1001, %rcx          # imm = 0xEFFF
orq $0x0, %rcx
movq %rcx, 0x20(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)