// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq %rdi, %r13
callq 0xf948
testb %al, %al
je 0x753c
leaq 0x108(%r13), %r15
movq 0x108(%r13), %rsi
movq %rbx, %rdi
callq 0x10114
movq 0x108(%r13), %r12
movq 0xc8(%r13), %rcx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x104f2
cmpq 0x68(%r13), %r12
jne 0x72b9
xorl %r14d, %r14d
jmp 0x7356
movq %rbx, 0x8(%rsp)
movq $-0x1, %rbx
xorl %r14d, %r14d
movq %r15, %rbp
cmpq (%r15), %r14
jae 0x7498
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x10172
cmpq %r12, %rax
je 0x736e
movq %rax, %r15
movq 0xc8(%r13), %rax
addq 0x10(%rsp), %rax
movswq 0x24(%rsp), %rcx
movzbl (%rcx,%rax), %edi
movsbl 0x26(%rsp), %esi
callq 0x53e3
movl %eax, %r12d
movq 0x108(%r13), %rsi
addq %rbx, %rsi
movq 0x8(%rsp), %rdi
callq 0x10430
movb %r12b, (%rax)
movq 0xc8(%r13), %rcx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x104f2
incq %r14
decq %rbx
movq %r15, %r12
cmpq 0x68(%r13), %r15
movq %rbp, %r15
jne 0x72c8
cmpq (%r15), %r14
jne 0x755b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2fc43(%rip), %rbx     # 0x36fb8
leaq 0x2501b(%rip), %rsi     # 0x2c397
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0x24e46(%rip), %r14     # 0x2c1dc
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 0x24e04(%rip), %rsi     # 0x2c1e1
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %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 %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 0x26f6e(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x24d1c(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x26348(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xad6, %esi            # imm = 0xAD6
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26204(%rip), %rdi     # 0x2d688
leaq 0x24f8a(%rip), %rcx     # 0x2c415
movq %r14, %rsi
movl $0xad6, %edx            # imm = 0xAD6
callq 0x41c0
movq 0x2fb19(%rip), %r15     # 0x36fb8
leaq 0x24e4e(%rip), %rsi     # 0x2c2f4
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x24e4a(%rip), %rsi     # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq (%rbp), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x26eca(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x24c78(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x262a4(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xad2, %esi            # imm = 0xAD2
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26160(%rip), %rdi     # 0x2d688
leaq 0x24ee6(%rip), %rcx     # 0x2c415
movq %rbx, %rsi
movl $0xad2, %edx            # imm = 0xAD2
callq 0x41c0
leaq 0x24c1a(%rip), %rdi     # 0x2c15d
leaq 0x24c20(%rip), %rsi     # 0x2c16a
leaq 0x24ec4(%rip), %rcx     # 0x2c415
movl $0xacc, %edx            # imm = 0xACC
callq 0x41c0
movq %r15, %rbx
movq 0x2fa53(%rip), %r15     # 0x36fb8
leaq 0x24c5a(%rip), %rsi     # 0x2c1c6
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x24c56(%rip), %r12     # 0x2c1dc
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 0x24c14(%rip), %rsi     # 0x2c1e1
movq %rax, %rdi
callq 0x4310
movq (%rbx), %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 (%rbx), %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 0x26d7e(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x24b2c(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x26158(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xadc, %esi            # imm = 0xADC
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26014(%rip), %rdi     # 0x2d688
leaq 0x24d9a(%rip), %rcx     # 0x2c415
movq %rbx, %rsi
movl $0xadc, %edx            # imm = 0xADC
callq 0x41c0