// File: BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::printRangeFw(unsigned int, unsigned int) const
void Ebwt::printRangeFw(uint32_t begin, uint32_t end) const {
	assert(isInMemory());
	uint32_t occ[] = {0, 0, 0, 0};
	assert_gt(end, begin);
	for(uint32_t i = begin; i < end; i++) {
		uint8_t by = this->_ebwt[i];
		for(int j = 0; j < 4; 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);
	}
	cout << ":{" << occ[0] << "," << occ[1] << "," << occ[2] << "," << occ[3] << "}" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x18060
testb $0x1, %al
jne 0x6635
jmp 0x6637
jmp 0x6656
leaq 0x38a72(%rip), %rdi     # 0x3f0b0
leaq 0x38a78(%rip), %rsi     # 0x3f0bd
movl $0x603, %edx            # imm = 0x603
leaq 0x38a75(%rip), %rcx     # 0x3f0c6
callq 0x51e0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5190
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
ja 0x6725
movq 0x43947(%rip), %rdi     # 0x49fc0
leaq 0x38a78(%rip), %rsi     # 0x3f0f8
callq 0x5360
movq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x38a74(%rip), %rsi     # 0x3f10e
callq 0x5360
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x3af04(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x438bd(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x438f1(%rip), %rdi     # 0x49fc0
leaq 0x389e7(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x3a0a5(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x605, %esi            # imm = 0x605
callq 0x5750
movq %rax, %rdi
movq 0x4387f(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x39f5d(%rip), %rdi     # 0x4066a
leaq 0x389a9(%rip), %rsi     # 0x3f0bd
movl $0x605, %edx            # imm = 0x605
leaq 0x389a6(%rip), %rcx     # 0x3f0c6
callq 0x51e0
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x6900
movq -0x38(%rbp), %rax
movq 0xc8(%rax), %rax
movl -0x24(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x25(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x679e
movb -0x25(%rbp), %al
movl -0x2c(%rbp), %esi
movzbl %al, %edi
callq 0x6990
movl %eax, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movl -0x20(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp,%rax,4)
movslq -0x30(%rbp), %rcx
movq 0x4383d(%rip), %rdi     # 0x49fc0
leaq 0x3898a(%rip), %rax     # 0x3f114
movsbl (%rax,%rcx), %esi
callq 0x54a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6752
movl -0x20(%rbp), %ecx
addl -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
addl -0x14(%rbp), %ecx
andl $0x3, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x68f0
movq 0x43802(%rip), %rdi     # 0x49fc0
leaq 0x38954(%rip), %rsi     # 0x3f119
callq 0x5360
movq %rax, %rdi
xorl %esi, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x38951(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq 0x11ff3(%rip), %rsi     # 0x187e0
callq 0x5120
movq %rax, %rdi
xorl %esi, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x1200a(%rip), %rsi     # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x3891f(%rip), %rsi     # 0x3f134
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
addl -0x1c(%rbp), %esi
addl -0x18(%rbp), %esi
addl -0x14(%rbp), %esi
andl $0x3, %esi
callq 0x5530
movq %rax, %rdi
leaq 0x388f4(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq 0x11f96(%rip), %rsi     # 0x187e0
callq 0x5120
movq %rax, %rdi
movl -0x20(%rbp), %esi
addl -0x1c(%rbp), %esi
addl -0x18(%rbp), %esi
addl -0x14(%rbp), %esi
andl $0x3, %esi
callq 0x5530
movq %rax, %rdi
leaq 0x11fa0(%rip), %rsi     # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x3ad39(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x436f2(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x43726(%rip), %rdi     # 0x49fc0
leaq 0x3881c(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x39eda(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x60e, %esi            # imm = 0x60E
callq 0x5750
movq %rax, %rdi
movq 0x436b4(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x39d92(%rip), %rdi     # 0x4066a
leaq 0x387de(%rip), %rsi     # 0x3f0bd
movl $0x60e, %edx            # imm = 0x60E
leaq 0x387db(%rip), %rcx     # 0x3f0c6
callq 0x51e0
jmp 0x68f2
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x672b
movq 0x436b9(%rip), %rdi     # 0x49fc0
leaq 0x3882e(%rip), %rsi     # 0x3f13c
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x38f44(%rip), %rsi     # 0x3f86c
callq 0x5360
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x38f2a(%rip), %rsi     # 0x3f86c
callq 0x5360
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x38f10(%rip), %rsi     # 0x3f86c
callq 0x5360
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x5530
movq %rax, %rdi
leaq 0x387c9(%rip), %rsi     # 0x3f13f
callq 0x5360
movq %rax, %rdi
movq 0x435fb(%rip), %rsi     # 0x49f80
callq 0x53c0
addq $0x40, %rsp
popq %rbp
retq