// File: /workspace/github_cpp_makefile_star2_O2/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 0x2cbb0(%rip), %rax     # 0x33cc8
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
andq $0x0, 0x18(%rsi)
callq 0x6cf0
testb %bl, %bl
je 0x714e
leaq 0x8(%rsp), %rdi
callq 0xe6f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpq 0x18(%r14), %r12
jae 0x7135
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
movq 0x18(%rax), %rbp
cmpq %rbp, %r15
jae 0x71e3
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
movq %rax, %rdi
movq %r15, %rsi
callq 0xe62e
cmpb $0x4, (%rax)
jne 0x71b0
cmpq %rbp, %r15
jae 0x716b
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
movq %rax, %rdi
movq %r15, %rsi
callq 0xe62e
cmpb $0x4, (%rax)
jne 0x716b
incq %r15
jmp 0x718b
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
movq %rax, %rdi
movq %r15, %rsi
callq 0xe62e
movb (%rax), %r13b
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xe1f4
cmpb (%rax), %r13b
jne 0x7208
incq %rbx
incq %r15
jmp 0x716b
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
xorl %ecx, %ecx
cmpq 0x18(%rax), %r15
sete %cl
movl $0x0, %eax
cmoveq %rax, %r15
addq %rcx, %r12
jmp 0x7156
movq 0x2cda9(%rip), %rdi     # 0x33fb8
leaq 0x20f43(%rip), %rsi     # 0x28159
callq 0x42d0
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0xe568
movq %rax, %rdi
movq %r15, %rsi
callq 0xe62e
movsbl (%rax), %esi
movq %r13, %rdi
callq 0x4380
leaq 0x20f29(%rip), %rsi     # 0x2816f
movq %rax, %rdi
callq 0x42d0
movq %rax, %r13
movq (%rax), %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 0xe568
movq %rax, %rdi
movq %r15, %rsi
callq 0xe62e
movsbl (%rax), %esi
movq %r13, %rdi
callq 0x4380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x20ecf(%rip), %rsi     # 0x28174
movq %rax, %rdi
callq 0x42d0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xe1f4
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x4380
leaq 0x20ea0(%rip), %rsi     # 0x2816f
movq %rax, %rdi
callq 0x42d0
movq %rax, %r14
movq (%rax), %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 0xe1f4
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x4380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x230f3(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
movq 0x2cc7c(%rip), %rdi     # 0x33fb8
leaq 0x20dba(%rip), %rsi     # 0x280fd
callq 0x42d0
leaq 0x223ec(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0xafd, %esi            # imm = 0xAFD
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x222a8(%rip), %rdi     # 0x2961b
leaq 0x20d83(%rip), %rsi     # 0x280fd
leaq 0x2104f(%rip), %rcx     # 0x283d0
movl $0xafd, %edx            # imm = 0xAFD
callq 0x4190
jmp 0x7395
jmp 0x7395
jmp 0x7395
jmp 0x7395
jmp 0x7395
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe6f0
movq %rbx, %rdi
callq 0x45e0