// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./reference.h
// Function: BitPairReference::getStretchNaive(unsigned int*, unsigned long, unsigned long, unsigned long) const
int getStretchNaive(uint32_t *destU32,
	                    size_t tidx,
	                    size_t toff,
	                    size_t count) const
	{
		uint8_t *dest = (uint8_t*)destU32;
		uint64_t reci = refRecOffs_[tidx];   // first record for target reference sequence
		uint64_t recf = refRecOffs_[tidx+1]; // last record (exclusive) for target seq
		assert_gt(recf, reci);
		uint64_t cur = 0;
		uint64_t bufOff = refOffs_[tidx];
		uint64_t off = 0;
		// For all records pertaining to the target reference sequence...
		for(uint64_t i = reci; i < recf; i++) {
			assert_geq(toff, off);
			off += recs_[i].off;
			for(; toff < off && count > 0; toff++) {
				dest[cur++] = 4;
				count--;
			}
			if(count == 0) break;
			assert_geq(toff, off);
			if(toff < off + recs_[i].len) {
				bufOff += (TIndexOffU)(toff - off); // move bufOff pointer forward
			} else {
				bufOff += recs_[i].len;
			}
			off += recs_[i].len;
			for(; toff < off && count > 0; toff++) {
				assert_lt(bufOff, bufSz_);
				const uint64_t bufElt = (bufOff) >> 2;
				const uint64_t shift = (bufOff & 3) << 1;
				dest[cur++] = (buf_[bufElt] >> shift) & 3;
				bufOff++;
				count--;
			}
			if(count == 0) break;
			assert_geq(toff, off);
		} // end for loop over records
		// In any chars are left after scanning all the records,
		// they must be ambiguous
		while(count > 0) {
			count--;
			dest[cur++] = 4;
		}
		assert_eq(0, count);
		return 0;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
leaq 0x4c0(%rdi), %rbp
movq %rbp, %rdi
movq %rdx, %rsi
callq 0x1ed3e
movq (%rax), %r12
leaq 0x1(%rbx), %rsi
movq %rbp, %rdi
callq 0x1ed3e
movq (%rax), %rax
movq %r12, (%rsp)
movq %rax, 0x18(%rsp)
cmpq %r12, %rax
jbe 0x1ec98
leaq 0x460(%r15), %rdi
movq %rbx, %rsi
callq 0x1ed3e
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x400(%r15), %rax
movq %rax, 0x20(%rsp)
xorl %r8d, %r8d
xorl %ebp, %ebp
movq %r15, 0x28(%rsp)
cmpq %r8, %r14
movq %r8, %rbx
jb 0x1eaa9
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
callq 0x1800c
addq (%rax), %rbx
cmpq %rbx, %r14
setb %al
jae 0x1e8c5
testq %r13, %r13
je 0x1e8c5
movq 0x8(%rsp), %rax
leaq (%rax,%rbp), %rdi
movq %r14, %rdx
notq %rdx
addq %rbx, %rdx
leaq -0x1(%r13), %rax
cmpq %rax, %rdx
cmovaeq %rax, %rdx
incq %rdx
movl $0x4, %esi
callq 0x4190
incq %rbp
leaq -0x1(%r13), %r12
incq %r14
cmpq %rbx, %r14
setb %al
jae 0x1e8c8
cmpq $0x1, %r13
movq %r12, %r13
jne 0x1e8a8
jmp 0x1e8c8
movq %r13, %r12
testq %r12, %r12
je 0x1e9e4
testb %al, %al
jne 0x1eb4c
movq 0x20(%rsp), %r15
movq %r15, %rdi
movq (%rsp), %r13
movq %r13, %rsi
callq 0x1800c
movq 0x8(%rax), %rax
addq %rbx, %rax
cmpq %rax, %r14
jae 0x1e901
movq %r14, %rcx
subq %rbx, %rcx
jmp 0x1e910
movq %r15, %rdi
movq %r13, %rsi
callq 0x1800c
movq 0x8(%rax), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rsp)
leaq (%rcx,%rax), %r15
movq %r13, %rsi
callq 0x1800c
addq 0x8(%rax), %rbx
cmpq %rbx, %r14
movq %rbx, %r8
jae 0x1e9b1
leaq -0x1(%r12), %rax
leal (%r15,%r15), %edx
movq 0x8(%rsp), %rcx
leaq (%rcx,%rbp), %rsi
xorl %r13d, %r13d
movq 0x28(%rsp), %r9
leaq (%r15,%r13), %rcx
cmpq 0x550(%r9), %rcx
jae 0x1e9f5
shrq $0x2, %rcx
movq 0x540(%r9), %rdi
movb (%rdi,%rcx), %dil
movl %edx, %ecx
andb $0x6, %cl
shrb %cl, %dil
andb $0x3, %dil
movb %dil, (%rsi,%r13)
leaq (%r14,%r13), %rcx
incq %rcx
leaq 0x1(%r13), %rbx
cmpq %r8, %rcx
jae 0x1e99a
addb $0x2, %dl
cmpq %r13, %rax
movq %rbx, %r13
jne 0x1e94f
subq %rbx, %r12
je 0x1e9e4
cmpq %r8, %rcx
jb 0x1ebef
addq %rbx, %r14
addq %rbx, %r15
addq %rbx, %rbp
movq %r12, %r13
movq (%rsp), %rax
incq %rax
movq %r15, 0x10(%rsp)
movq %rax, (%rsp)
cmpq 0x18(%rsp), %rax
jne 0x1e854
movq 0x8(%rsp), %rdi
addq %rbp, %rdi
movl $0x4, %esi
movq %r13, %rdx
callq 0x4190
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x185bc(%rip), %rbx     # 0x36fb8
leaq 0xd8f1(%rip), %rsi      # 0x2c2f4
movq %rbx, %rdi
movq %r9, %r14
callq 0x4310
movq 0x30(%rsp), %rsi
addq 0x10(%rsp), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xd8e0(%rip), %rsi      # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq 0x550(%r14), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xf95d(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xee06(%rip), %r14      # 0x2d865
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0xed37(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x1c4, %esi            # imm = 0x1C4
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xebf3(%rip), %rdi      # 0x2d688
leaq 0xee9e(%rip), %rcx      # 0x2d93a
movq %r14, %rsi
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x41c0
movq 0x18508(%rip), %r15     # 0x36fb8
leaq 0xd7fb(%rip), %rsi      # 0x2c2b2
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0xd7f8(%rip), %rsi      # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0xf8ba(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xed63(%rip), %rbx      # 0x2d865
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0xec94(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x1b5, %esi            # imm = 0x1B5
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xeb50(%rip), %rdi      # 0x2d688
leaq 0xedfb(%rip), %rcx      # 0x2d93a
movq %rbx, %rsi
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x41c0
movq 0x18465(%rip), %r15     # 0x36fb8
leaq 0xd758(%rip), %rsi      # 0x2c2b2
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0xd755(%rip), %rsi      # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0xf817(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xecc0(%rip), %rbx      # 0x2d865
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0xebf1(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x1bc, %esi            # imm = 0x1BC
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xeaad(%rip), %rdi      # 0x2d688
leaq 0xed58(%rip), %rcx      # 0x2d93a
movq %rbx, %rsi
movl $0x1bc, %edx            # imm = 0x1BC
callq 0x41c0
movq 0x183c2(%rip), %r15     # 0x36fb8
leaq 0xd6b5(%rip), %rsi      # 0x2c2b2
movq %r15, %rdi
movq %r8, %r12
callq 0x4310
addq %rbx, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0xd6ac(%rip), %rsi      # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0xf76e(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xec17(%rip), %rbx      # 0x2d865
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0xeb48(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x1cc, %esi            # imm = 0x1CC
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xea04(%rip), %rdi      # 0x2d688
leaq 0xecaf(%rip), %rcx      # 0x2d93a
movq %rbx, %rsi
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x41c0
movq 0x18319(%rip), %rbx     # 0x36fb8
leaq 0xd4ff(%rip), %rsi      # 0x2c1a5
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x40c0
leaq 0xd4f9(%rip), %rsi      # 0x2c1bb
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x40c0
leaq 0xf6c8(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xeb71(%rip), %r14      # 0x2d865
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0xeaa2(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x1af, %esi            # imm = 0x1AF
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xe95e(%rip), %rdi      # 0x2d688
leaq 0xec09(%rip), %rcx      # 0x2d93a
movq %r14, %rsi
movl $0x1af, %edx            # imm = 0x1AF
callq 0x41c0