// File: /workspace/github_cpp_makefile_star2_O1/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, 0x18(%rsp)
movq %rsi, %r14
movq %rsi, %rax
shrq $0x20, %rax
movq %rax, 0x8(%rsp)
cmpl %eax, %r14d
setbe %al
andb 0x35(%rdi), %al
cmpb $0x1, %al
jne 0x14ba2
cmpq $0x0, 0x18(%rsp)
je 0x14ba2
movq %rdi, %r15
movq (%rdi), %rax
movq 0x8(%rsp), %rcx
cmpl %ecx, 0x4(%rax)
jbe 0x14ba2
movq 0x28(%r15), %rdi
movl %r14d, %esi
callq 0x10454
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
cmpl %r14d, %r12d
movq %r14, 0x10(%rsp)
jae 0x14ab9
leaq 0x20(%rsp), %rbx
movq (%r15), %rbp
movl 0x4(%rbp), %eax
cmpl %r13d, %eax
jbe 0x14a97
movq %rbx, %r14
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 0x14a52
movq 0x8(%rbp,%rbx,8), %rsi
movq %r14, %rdi
callq 0x1d194
movq 0x808(%rbp), %rax
subl (%rax,%rbx,8), %r13d
movq %r14, %rbx
movq %r14, %rdi
movl %r13d, %esi
callq 0x1d48a
movl %eax, %r13d
movq %rbx, %rdi
callq 0x1d19a
movq 0x10(%rsp), %r14
jmp 0x14aa0
addl 0x820(%rbp), %eax
movl %eax, %r13d
movq (%r15), %rax
subl 0x820(%rax), %r13d
incl %r12d
cmpl %r14d, %r12d
jne 0x14a21
movl %r14d, %r12d
cmpl 0x8(%rsp), %r12d
ja 0x14ba2
leaq 0x20(%rsp), %rbx
movq (%r15), %rax
movq 0x808(%rax), %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 0x14af0
movl %r12d, %ecx
subl %r14d, %ecx
movq 0x18(%rsp), %rdx
movb %al, (%rdx,%rcx)
movq (%r15), %rbp
movl 0x4(%rbp), %eax
cmpl %r13d, %eax
jbe 0x14b81
movq %rbx, %r14
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 0x14b3c
movq 0x8(%rbp,%rbx,8), %rsi
movq %r14, %rdi
callq 0x1d194
movq 0x808(%rbp), %rax
subl (%rax,%rbx,8), %r13d
movq %r14, %rbx
movq %r14, %rdi
movl %r13d, %esi
callq 0x1d48a
movl %eax, %r13d
movq %rbx, %rdi
callq 0x1d19a
movq 0x10(%rsp), %r14
jmp 0x14b8a
addl 0x820(%rbp), %eax
movl %eax, %r13d
movq (%r15), %rax
subl 0x820(%rax), %r13d
incl %r12d
cmpl 0x8(%rsp), %r12d
jbe 0x14ac9
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14bb6
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1d19a
movq %rbx, %rdi
callq 0x34b0
nop