// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::restore(SString<char>&) const
void Ebwt::restore(BTRefString& s) const {
	assert(isInMemory());
	s.resize(this->_eh._len);
	TIndexOffU jumps = 0;
	TIndexOffU i = this->_eh._len; // should point to final SA elt (starting with '$')
	SideLocus l(i, this->_eh, this->_ebwt);
	while(i != _zOff) {
		assert_lt(jumps, this->_eh._len);
		//if(_verbose) cout << "restore: i: " << i << endl;
		// Not a marked row; go back a char in the original string
		TIndexOffU newi = mapLF(l);
		assert_neq(newi, i);
		s[this->_eh._len - jumps - 1] = rowL(l);
		i = newi;
		l.initFromRow(i, this->_eh, this->_ebwt);
		jumps++;
	}
	assert_eq(jumps, this->_eh._len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r13
callq 0xfb60
testb %al, %al
je 0x750b
leaq 0x108(%r13), %rbp
movq 0x108(%r13), %rsi
movq %r14, %rdi
callq 0x1032c
movq 0x108(%r13), %rbx
movq 0xc8(%r13), %rcx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1070a
cmpq 0x68(%r13), %rbx
jne 0x727f
xorl %r14d, %r14d
jmp 0x7321
movq %rbx, %r15
movq %r14, 0x8(%rsp)
movq $-0x1, %rbx
xorl %r14d, %r14d
movq %rbp, (%rsp)
cmpq (%rbp), %r14
jae 0x7464
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x1038a
movq %rax, %r12
cmpq %r15, %rax
je 0x733a
movq 0xc8(%r13), %rax
addq 0x10(%rsp), %rax
movswq 0x24(%rsp), %rcx
movzbl (%rcx,%rax), %edi
movsbl 0x26(%rsp), %esi
callq 0x53b3
movl %eax, %ebp
movq 0x108(%r13), %rsi
addq %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x10648
movb %bpl, (%rax)
movq 0xc8(%r13), %rcx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq (%rsp), %rbp
movq %rbp, %rdx
callq 0x1070a
incq %r14
decq %rbx
movq %r12, %r15
cmpq 0x68(%r13), %r12
jne 0x7295
cmpq (%rbp), %r14
jne 0x752a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2fc77(%rip), %rbx     # 0x36fb8
leaq 0x25fbf(%rip), %rsi     # 0x2d307
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0x25dea(%rip), %r14     # 0x2d14c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4310
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
movq %r12, %rsi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x25da8(%rip), %rsi     # 0x2d151
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x4310
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
movq %r15, %rsi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x27f12(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25cc0(%rip), %r14     # 0x2d0da
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x272ec(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xad6, %esi            # imm = 0xAD6
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x271a8(%rip), %rdi     # 0x2e5f8
leaq 0x25f2e(%rip), %rcx     # 0x2d385
movq %r14, %rsi
movl $0xad6, %edx            # imm = 0xAD6
callq 0x41c0
movq 0x2fb4d(%rip), %r15     # 0x36fb8
leaq 0x25df2(%rip), %rsi     # 0x2d264
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x25dee(%rip), %rsi     # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq (%rsp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x27e6b(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25c19(%rip), %rbx     # 0x2d0da
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27245(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xad2, %esi            # imm = 0xAD2
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27101(%rip), %rdi     # 0x2e5f8
leaq 0x25e87(%rip), %rcx     # 0x2d385
movq %rbx, %rsi
movl $0xad2, %edx            # imm = 0xAD2
callq 0x41c0
leaq 0x25bbb(%rip), %rdi     # 0x2d0cd
leaq 0x25bc1(%rip), %rsi     # 0x2d0da
leaq 0x25e65(%rip), %rcx     # 0x2d385
movl $0xacc, %edx            # imm = 0xACC
callq 0x41c0
movq 0x2fa87(%rip), %r15     # 0x36fb8
leaq 0x25bfe(%rip), %rsi     # 0x2d136
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x25bfa(%rip), %r12     # 0x2d14c
movq %rax, %rdi
movq %r12, %rsi
callq 0x4310
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
movq %r14, %rsi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x25bb8(%rip), %rsi     # 0x2d151
movq %rax, %rdi
callq 0x4310
movq (%rbp), %rsi
movq %rax, %rdi
callq 0x40c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq (%rbp), %rsi
movq %rax, %rdi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x27d20(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25ace(%rip), %rbx     # 0x2d0da
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x270fa(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xadc, %esi            # imm = 0xADC
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26fb6(%rip), %rdi     # 0x2e5f8
leaq 0x25d3c(%rip), %rcx     # 0x2d385
movq %rbx, %rsi
movl $0xadc, %edx            # imm = 0xADC
callq 0x41c0