// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/adaptive_samples.cpp
// Function: CSA::AdaptiveSamples::display(std::pair<unsigned int, unsigned int>, unsigned char*)
void
AdaptiveSamples::display(pair_type range, uchar* data)
{
  if(!(this->supportsDisplay()) || isEmpty(range) || range.second >= this->index.getSize() || data == 0) { return; }

  pair_type res = this->regular_samples->inverseSA(range.first);
  usint i = res.first, pos = res.second;
  for(; i < range.first; i++)
  {
    pos = this->index.psi(pos);
    this->index.convertToSAIndex(pos);
  }
  for(; i <= range.second; i++)
  {
    data[i - range.first] = this->index.getCharacter(pos);
    pos = this->index.psi(pos);
    this->index.convertToSAIndex(pos);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rsi, %rax
shrq $0x20, %rax
movq %rax, (%rsp)
cmpl %eax, %r14d
setbe %al
andb 0x35(%rdi), %al
cmpb $0x1, %al
jne 0x14e63
cmpq $0x0, 0x8(%rsp)
je 0x14e63
movq %rdi, %r15
movq (%rdi), %rax
movq (%rsp), %rcx
cmpl %ecx, 0x4(%rax)
jbe 0x14e63
movq 0x28(%r15), %rdi
movl %r14d, %esi
callq 0x104d0
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
cmpl %r14d, %r12d
jae 0x14d6d
movq (%r15), %rbp
leaq 0x20(%rsp), %rbx
movq %r15, 0x18(%rsp)
movl 0x4(%rbp), %ecx
cmpl %r13d, %ecx
jbe 0x14d50
movq %rbx, %r15
movq 0x808(%rbp), %rcx
movl %r13d, %eax
xorl %edx, %edx
divl 0x1008(%rcx)
movl 0xc08(%rcx,%rax,4), %eax
leaq (%rcx,%rax,4), %rax
addq $0x804, %rax            # imm = 0x804
movl (%rax), %ebx
addq $0x4, %rax
cmpl %r13d, 0x4(%rcx,%rbx,8)
jb 0x14d02
movq 0x8(%rbp,%rbx,8), %rsi
movq %r15, %rdi
callq 0x1d4c4
movq 0x808(%rbp), %rax
subl (%rax,%rbx,8), %r13d
movq %r15, %rbx
movq %r15, %rdi
movl %r13d, %esi
callq 0x1d7b0
movl %eax, %r13d
movq %rbx, %rdi
callq 0x1d4ca
movq 0x18(%rsp), %r15
movq (%r15), %rbp
movl 0x820(%rbp), %eax
jmp 0x14d5b
movl 0x820(%rbp), %eax
addl %eax, %ecx
movl %ecx, %r13d
subl %eax, %r13d
incl %r12d
cmpl %r14d, %r12d
jne 0x14cd4
movl %r14d, %r12d
cmpl (%rsp), %r12d
ja 0x14e63
movq (%r15), %rbp
leaq 0x20(%rsp), %rbx
movq %r14, 0x10(%rsp)
movq 0x808(%rbp), %rcx
movl %r13d, %eax
xorl %edx, %edx
divl 0x1008(%rcx)
movl 0xc08(%rcx,%rax,4), %eax
leaq (%rcx,%rax,4), %rdx
addq $0x804, %rdx            # imm = 0x804
movl (%rdx), %eax
addq $0x4, %rdx
cmpl %r13d, 0x4(%rcx,%rax,8)
jb 0x14da8
movl %r12d, %ecx
subl %r14d, %ecx
movq 0x8(%rsp), %rdx
movb %al, (%rdx,%rcx)
movq (%r15), %rbp
movl 0x4(%rbp), %ecx
cmpl %r13d, %ecx
jbe 0x14e48
movq %r15, %r14
movq %rbx, %r15
movq 0x808(%rbp), %rcx
movl %r13d, %eax
xorl %edx, %edx
divl 0x1008(%rcx)
movl 0xc08(%rcx,%rax,4), %eax
leaq (%rcx,%rax,4), %rax
addq $0x804, %rax            # imm = 0x804
movl (%rax), %ebx
addq $0x4, %rax
cmpl %r13d, 0x4(%rcx,%rbx,8)
jb 0x14df7
movq 0x8(%rbp,%rbx,8), %rsi
movq %r15, %rdi
callq 0x1d4c4
movq 0x808(%rbp), %rax
subl (%rax,%rbx,8), %r13d
movq %r15, %rbx
movq %r15, %rdi
movl %r13d, %esi
callq 0x1d7b0
movl %eax, %r13d
movq %rbx, %rdi
callq 0x1d4ca
movq %r14, %r15
movq (%r14), %rbp
movl 0x820(%rbp), %eax
movq 0x10(%rsp), %r14
jmp 0x14e53
movl 0x820(%rbp), %eax
addl %eax, %ecx
movl %ecx, %r13d
subl %eax, %r13d
incl %r12d
cmpl (%rsp), %r12d
jbe 0x14d84
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14e77
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1d4ca
movq %rbx, %rdi
callq 0x34b0