// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movl %edx, %ebx
movq %rsi, %r14
leaq 0x2f640(%rip), %rax     # 0x36cb0
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x18(%rsi)
callq 0x721c
testb %bl, %bl
jne 0x781d
cmpq $0x0, 0x18(%r14)
je 0x781d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq $0x0, 0x18(%rsp)
movl %ebx, 0x24(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x109c0
movq 0x18(%rax), %rbx
cmpq %rbx, %r12
jae 0x77f3
movq %rbx, %rax
negq %rax
movq %rax, 0x30(%rsp)
leaq -0x1(%rbx), %rax
movq %rax, 0x28(%rsp)
movq %rbp, 0x10(%rsp)
movq %r12, %r13
notq %r13
movq %rbx, %r15
addq %rbx, %r13
movq %r14, %rdi
movl 0x24(%rsp), %eax
movl %eax, %r14d
testb %al, %al
cmoveq %r12, %r13
movq %rdi, %rbx
movq %rbp, %rsi
callq 0x109c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x10a86
cmpb $0x4, (%rax)
jne 0x776a
testb %r14b, %r14b
je 0x77bb
cmpq %r15, %r12
movq %rbx, %r14
jae 0x77a8
movq 0x28(%rsp), %r13
subq %r12, %r13
movq 0x10(%rsp), %rbp
movq %r15, %rbx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x109c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x10a86
cmpb $0x4, (%rax)
jne 0x77b0
incq %r12
decq %r13
movq 0x30(%rsp), %rax
addq %r12, %rax
jne 0x773a
jmp 0x77ee
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x109c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x10a86
movb (%rax), %bpl
leaq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x10648
cmpb (%rax), %bpl
jne 0x7836
incq 0x18(%rsp)
incq %r12
movq %rbx, %r14
movq 0x10(%rsp), %rbp
movq %r15, %rbx
cmpq %rbx, %r12
jb 0x76e2
jmp 0x77f3
cmpq %r15, %r12
movq %rbx, %r14
movq 0x10(%rsp), %rbp
movq %r15, %rbx
jae 0x77b0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x109c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x10a86
cmpb $0x4, (%rax)
jne 0x77b0
incq %r12
cmpq %r12, %rbx
jne 0x77cb
movq %rbx, %r12
jmp 0x77b0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x109c0
xorl %ecx, %ecx
cmpq 0x18(%rax), %r12
movl $0x0, %eax
cmoveq %rax, %r12
sete %cl
addq %rcx, %rbp
cmpq 0x18(%r14), %rbp
jb 0x76b1
leaq 0x38(%rsp), %rdi
callq 0x10b48
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f77b(%rip), %rdi     # 0x36fb8
leaq 0x258f2(%rip), %rsi     # 0x2d136
movl $0x15, %edx
callq 0x43b0
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x109c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x10a86
movb (%rax), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movq 0x2f742(%rip), %rdi     # 0x36fb8
movl $0x1, %edx
callq 0x43b0
movq %rax, %r12
leaq 0x258c2(%rip), %rsi     # 0x2d14c
movl $0x4, %edx
movq %rax, %rdi
callq 0x43b0
movq (%r12), %rax
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r12,%rax)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x109c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x10a86
movb (%rax), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r12, %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 0x25853(%rip), %rsi     # 0x2d151
movl $0x7, %edx
movq %r14, %rdi
callq 0x43b0
leaq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x10648
movb (%rax), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x43b0
movq %rax, %r14
leaq 0x25812(%rip), %rsi     # 0x2d14c
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 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x10648
movb (%rax), %al
leaq 0xf(%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 0x27973(%rip), %rsi     # 0x2f315
movl $0x1, %edx
movq %rbx, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4150
movq 0x2f5fa(%rip), %rdi     # 0x36fb8
leaq 0x25715(%rip), %rsi     # 0x2d0da
movl $0x8, %edx
callq 0x43b0
movq 0x2f5e2(%rip), %rdi     # 0x36fb8
leaq 0x26d3b(%rip), %rsi     # 0x2e718
movl $0x1, %edx
callq 0x43b0
movq 0x2f5ca(%rip), %rdi     # 0x36fb8
movl $0xafd, %esi            # imm = 0xAFD
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26bf1(%rip), %rdi     # 0x2e5f8
leaq 0x256cc(%rip), %rsi     # 0x2d0da
leaq 0x25998(%rip), %rcx     # 0x2d3ad
movl $0xafd, %edx            # imm = 0xAFD
callq 0x41c0
jmp 0x7a29
jmp 0x7a29
jmp 0x7a29
jmp 0x7a29
jmp 0x7a29
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x10b48
movq %rbx, %rdi
callq 0x4620