// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::checkOrigs(EList<SString<char>, 128> const&, bool) const
void Ebwt::checkOrigs(const EList<BTRefString >& os, bool mirror) const
{
	BTRefString rest;
	restore(rest);
	TIndexOffU restOff = 0;
	size_t i = 0, j = 0;
	if(mirror) {
		// TODO: FIXME
		return;
	}
	while(i < os.size()) {
		size_t olen = os[i].length();
		for(; j < olen; j++) {
			size_t joff = j;
			if(mirror) joff = olen - j - 1;
			if((int)os[i][joff] == 4) {
				// Skip over Ns
				if(!mirror) {
					while(j < olen && (int)os[i][j] == 4) j++;
				} else {
					while(j < olen && (int)os[i][olen-j-1] == 4) j++;
				}
				j--;
				continue;
			}

			assert_eq(os[i][joff], rest[restOff]);
			restOff++;
		}
		if(j == os[i].length()) {
			// Moved to next sequence
			i++;
			j = 0;
		} else {
			// Just jumped over a gap
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
leaq 0x2f60e(%rip), %rax     # 0x36cb0
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x18(%rsi)
callq 0x7256
testb %bl, %bl
jne 0x7792
cmpq $0x0, 0x18(%r14)
je 0x7792
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq 0x18(%rax), %rbp
cmpq %rbp, %r15
jae 0x7768
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x1086c
cmpb $0x4, (%rax)
jne 0x7732
cmpq %rbp, %r15
jae 0x76e8
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x1086c
cmpb $0x4, (%rax)
jne 0x76e8
incq %r15
cmpq %r15, %rbp
jne 0x770d
jmp 0x7765
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x1086c
movb (%rax), %r13b
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x10430
cmpb (%rax), %r13b
jne 0x77ab
incq %rbx
incq %r15
jmp 0x76e8
movq %rbp, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
xorl %ecx, %ecx
cmpq 0x18(%rax), %r15
movl $0x0, %eax
cmoveq %rax, %r15
sete %cl
addq %rcx, %r12
cmpq 0x18(%r14), %r12
jb 0x76d9
leaq 0x8(%rsp), %rdi
callq 0x1092e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f806(%rip), %rdi     # 0x36fb8
leaq 0x24a0d(%rip), %rsi     # 0x2c1c6
movl $0x15, %edx
callq 0x43b0
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x1086c
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movq 0x2f7cf(%rip), %rdi     # 0x36fb8
movl $0x1, %edx
callq 0x43b0
movq %rax, %r13
leaq 0x249df(%rip), %rsi     # 0x2c1dc
movl $0x4, %edx
movq %rax, %rdi
callq 0x43b0
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r13,%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x107a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x1086c
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x43b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r14,%rax)
leaq 0x24972(%rip), %rsi     # 0x2c1e1
movl $0x7, %edx
movq %r14, %rdi
callq 0x43b0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x10430
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
movq %rax, %r14
leaq 0x24933(%rip), %rsi     # 0x2c1dc
movl $0x4, %edx
movq %rax, %rdi
callq 0x43b0
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x10430
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0x26a96(%rip), %rsi     # 0x2e3a5
movl $0x1, %edx
movq %rbx, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4150
movq 0x2f68d(%rip), %rdi     # 0x36fb8
leaq 0x24838(%rip), %rsi     # 0x2c16a
movl $0x8, %edx
callq 0x43b0
movq 0x2f675(%rip), %rdi     # 0x36fb8
leaq 0x25e5e(%rip), %rsi     # 0x2d7a8
movl $0x1, %edx
callq 0x43b0
movq 0x2f65d(%rip), %rdi     # 0x36fb8
movl $0xafd, %esi            # imm = 0xAFD
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x25d14(%rip), %rdi     # 0x2d688
leaq 0x247ef(%rip), %rsi     # 0x2c16a
leaq 0x24abb(%rip), %rcx     # 0x2c43d
movl $0xafd, %edx            # imm = 0xAFD
callq 0x41c0
jmp 0x7994
jmp 0x7994
jmp 0x7994
jmp 0x7994
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1092e
movq %rbx, %rdi
callq 0x4620
nop