// File: /workspace/github_cpp_makefile_star2_O2/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, %rbp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
leaq 0x4c0(%rdi), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x1b0bc
movq (%rax), %r14
leaq 0x1(%rbx), %rsi
movq %r15, %rdi
callq 0x1b0bc
movq (%rax), %rax
movq %r14, %r15
movq %rax, 0x10(%rsp)
cmpq %r14, %rax
jbe 0x1b017
leaq 0x460(%r12), %rdi
movq %rbx, %rsi
callq 0x1b0bc
movq (%rax), %rbx
leaq 0x400(%r12), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
xorl %r10d, %r10d
movq 0x8(%rsp), %rdi
movq %r13, %r9
movq %r15, %rsi
movq %r12, 0x20(%rsp)
cmpq 0x10(%rsp), %rsi
jae 0x1ae00
cmpq %r10, %rbp
movq %r10, %r15
jb 0x1aed1
movq %r9, %r12
movq (%rsp), %rdi
movq %rsi, 0x18(%rsp)
callq 0x147d8
addq (%rax), %r15
movq %rbp, %r13
movq %r12, %rdx
movq %r12, %rax
movq %r15, %r12
movq 0x8(%rsp), %rdi
addq $-0x1, %rax
setb %cl
cmpq %r12, %r13
jae 0x1ac73
testb %cl, %cl
je 0x1ac73
movb $0x4, (%rdi,%r14)
incq %r14
incq %r13
movq %rax, %rdx
jmp 0x1ac53
testq %rdx, %rdx
je 0x1adfd
movq %rdx, 0x30(%rsp)
movq %r13, %r15
subq %r12, %r15
jb 0x1af74
movq (%rsp), %rdi
movq 0x18(%rsp), %rbp
movq %rbp, %rsi
callq 0x147d8
movq 0x8(%rax), %rax
movq %r12, 0x28(%rsp)
addq %r12, %rax
cmpq %rax, %r13
jae 0x1acb5
movq (%rsp), %rdi
jmp 0x1accb
movq (%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x147d8
movq 0x8(%rax), %r15
movq %r12, %rdi
addq %rbx, %r15
movq %rbp, %rsi
callq 0x147d8
movq 0x28(%rsp), %r10
addq 0x8(%rax), %r10
leal (%r15,%r15), %eax
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %r8
movq 0x30(%rsp), %r9
leaq (%r15,%r12), %rbx
leaq (%r12,%r13), %rbp
cmpq %r10, %rbp
jae 0x1ad3a
cmpq %r12, %r9
je 0x1ad3a
cmpq 0x550(%r8), %rbx
jae 0x1ae24
shrq $0x2, %rbx
movq 0x540(%r8), %rcx
movb (%rcx,%rbx), %dl
movl %eax, %ecx
andb $0x6, %cl
shrb %cl, %dl
andb $0x3, %dl
movb %dl, (%rdi,%r14)
incq %r14
incq %r12
addb $0x2, %al
jmp 0x1acf5
subq %r12, %r9
je 0x1adfd
movq 0x18(%rsp), %rsi
incq %rsi
cmpq %r10, %rbp
jae 0x1ac17
movq 0x1925d(%rip), %r14     # 0x33fb8
movq %r10, %rbx
leaq 0xd4e0(%rip), %rsi      # 0x28245
movq %r14, %rdi
callq 0x42d0
addq %r12, %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x40b0
leaq 0xd4da(%rip), %rsi      # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40b0
leaq 0xf67c(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xea45(%rip), %rbx      # 0x297f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0xe976(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x1cc, %esi            # imm = 0x1CC
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xe832(%rip), %rdi      # 0x2961b
leaq 0xeadd(%rip), %rcx      # 0x298cd
movq %rbx, %rsi
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x4190
xorl %r9d, %r9d
addq %r14, %rdi
xorl %eax, %eax
cmpq %rax, %r9
je 0x1ae13
movb $0x4, (%rdi,%rax)
incq %rax
jmp 0x1ae05
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1918d(%rip), %rbx     # 0x33fb8
leaq 0xd455(%rip), %rsi      # 0x28287
movq %rbx, %rdi
movq %r8, %r14
callq 0x42d0
addq %r12, %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0xd44b(%rip), %rsi      # 0x2829d
movq %rax, %rdi
callq 0x42d0
movq 0x550(%r14), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0xf5a8(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xe971(%rip), %r14      # 0x297f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0xe8a2(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x1c4, %esi            # imm = 0x1C4
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xe75e(%rip), %rdi      # 0x2961b
leaq 0xea09(%rip), %rcx      # 0x298cd
movq %r14, %rsi
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x4190
movq 0x190e0(%rip), %r14     # 0x33fb8
leaq 0xd366(%rip), %rsi      # 0x28245
movq %r14, %rdi
callq 0x42d0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x40b0
leaq 0xd363(%rip), %rsi      # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0xf505(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xe8ce(%rip), %rbx      # 0x297f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0xe7ff(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x1b5, %esi            # imm = 0x1B5
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xe6bb(%rip), %rdi      # 0x2961b
leaq 0xe966(%rip), %rcx      # 0x298cd
movq %rbx, %rsi
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x4190
movq 0x1903d(%rip), %r14     # 0x33fb8
leaq 0xd2c3(%rip), %rsi      # 0x28245
movq %r14, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r13, %rsi
callq 0x40b0
leaq 0xd2c0(%rip), %rsi      # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b0
leaq 0xf462(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xe82b(%rip), %rbx      # 0x297f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0xe75c(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x1bc, %esi            # imm = 0x1BC
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xe618(%rip), %rdi      # 0x2961b
leaq 0xe8c3(%rip), %rcx      # 0x298cd
movq %rbx, %rsi
movl $0x1bc, %edx            # imm = 0x1BC
callq 0x4190
movq 0x18f9a(%rip), %rbx     # 0x33fb8
leaq 0xd113(%rip), %rsi      # 0x28138
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x40b0
leaq 0xd10d(%rip), %rsi      # 0x2814e
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0xf3bd(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xe786(%rip), %r14      # 0x297f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0xe6b7(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x1af, %esi            # imm = 0x1AF
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xe573(%rip), %rdi      # 0x2961b
leaq 0xe81e(%rip), %rcx      # 0x298cd
movq %r14, %rsi
movl $0x1af, %edx            # imm = 0x1AF
callq 0x4190