// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::printRangeBw(unsigned int, unsigned int) const
void Ebwt::printRangeBw(uint32_t begin, uint32_t end) const {
	assert(isInMemory());
	uint32_t occ[] = {0, 0, 0, 0};
	assert_gt(end, begin);
	for(uint32_t i = end-1; i >= begin; i--) {
		uint8_t by = this->_ebwt[i];
		for(int j = 3; j >= 0; j--) {
			// Unpack from lowest to highest bit pair
			int twoBit = unpack_2b_from_8b(by, j);
			occ[twoBit]++;
			cout << "ACGT"[twoBit];
		}
		assert_eq(0, (occ[0] + occ[1] + occ[2] + occ[3]) & 3);
		if(i == 0) break;
	}
	cout << ":{" << occ[0] << "," << occ[1] << "," << occ[2] << "," << occ[3] << "}" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, 0x18(%rsp)
callq 0xd5d2
testb %al, %al
je 0x53ca
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl %ebp, %r14d
jbe 0x53e9
movl %r14d, %r12d
movl %ebp, %eax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
leaq 0x22fba(%rip), %r13     # 0x28154
movq 0x2ee17(%rip), %r14     # 0x33fb8
xorl %edx, %edx
xorl %r15d, %r15d
xorl %ebx, %ebx
decq %r12
cmpq 0x20(%rsp), %r12
jb 0x5213
movq 0x18(%rsp), %rax
movq 0xc8(%rax), %rax
movzbl (%rax,%r12), %ebp
pushq $0x3
popq %r15
testl %r15d, %r15d
js 0x51ed
movl %ebp, %edi
movl %r15d, %esi
callq 0x5095
movl %eax, %eax
incl (%rsp,%rax,4)
movsbl (%rax,%r13), %esi
movq %r14, %rdi
callq 0x4380
decl %r15d
jmp 0x51c7
movl (%rsp), %ebx
movl 0x4(%rsp), %r15d
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
leal (%rdx,%rcx), %ebp
addl %r15d, %ebp
addl %ebx, %ebp
andl $0x3, %ebp
jne 0x52a4
testq %r12, %r12
jne 0x51a8
movq 0x2ed9e(%rip), %rdi     # 0x33fb8
leaq 0x22f5b(%rip), %rsi     # 0x2817c
movq %rcx, %r12
movq %rdx, %r13
callq 0x42d0
movl %ebx, %esi
movq %rax, %rdi
callq 0x41a0
leaq 0x2366f(%rip), %r14     # 0x288ac
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movl %r15d, %esi
movq %rax, %rdi
callq 0x41a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movl %r13d, %esi
movq %rax, %rdi
callq 0x41a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movl %r12d, %esi
movq %rax, %rdi
callq 0x41a0
leaq 0x22ef9(%rip), %rsi     # 0x2817f
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4130
movq 0x2ed0d(%rip), %rbx     # 0x33fb8
leaq 0x22ea7(%rip), %rsi     # 0x28159
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x45d0
leaq 0x22ea4(%rip), %r14     # 0x2816f
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
xorl %esi, %esi
callq 0x45d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x22e63(%rip), %rsi     # 0x28174
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl %ebp, %esi
callq 0x4400
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x4400
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x250af(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x22d7d(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x243a9(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x624, %esi            # imm = 0x624
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x24265(%rip), %rdi     # 0x2961b
leaq 0x22dc4(%rip), %rcx     # 0x28181
movq %r14, %rsi
movl $0x624, %edx            # imm = 0x624
callq 0x4190
leaq 0x22d1f(%rip), %rdi     # 0x280f0
leaq 0x22d25(%rip), %rsi     # 0x280fd
leaq 0x22da2(%rip), %rcx     # 0x28181
movl $0x619, %edx            # imm = 0x619
callq 0x4190
movq 0x2ebc8(%rip), %rbx     # 0x33fb8
leaq 0x22d41(%rip), %rsi     # 0x28138
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
movl %r14d, %esi
callq 0x4400
leaq 0x22d3d(%rip), %rsi     # 0x2814e
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl %ebp, %esi
callq 0x4400
leaq 0x24fee(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x22cbc(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x242e8(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x61b, %esi            # imm = 0x61B
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x241a4(%rip), %rdi     # 0x2961b
leaq 0x22d03(%rip), %rcx     # 0x28181
movq %r14, %rsi
movl $0x61b, %edx            # imm = 0x61B
callq 0x4190
nop