LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sasamples.cpp
// Function: CSA::SASamples::writeTo(_IO_FILE*) const
void
SASamples::writeTo(FILE* sample_file) const
{
  if(sample_file == 0) { return; }

  if(this->weighted)
  {
    std::fwrite(&(this->size), sizeof(this->size), 1, sample_file);
    std::fwrite(&(this->items), sizeof(this->items), 1, sample_file);

    SAVector::Iterator iter(*(this->indexes));
    pair_type buffer(iter.select(0), this->samples->readItem(0));
    for(usint i = 0; i < this->items; i++)
    {
      std::fwrite(&buffer, sizeof(buffer), 1, sample_file);
      buffer.first = iter.selectNext();
      buffer.second = this->samples->readItem();
    }
  }
  else
  {
    this->indexes->writeTo(sample_file);
    this->samples->writeBuffer(sample_file);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
testq %rsi, %rsi
je 0xc50a
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xc3ed
leaq 0x8(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
leaq 0xc(%r14), %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x34a0
movq 0x10(%r14), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x12ac0
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
callq 0x12c6e
movq 0x18(%r14), %rdx
movl 0xc(%rdx), %ecx
movabsq $0x2000000000, %rsi     # imm = 0x2000000000
movq %rsi, 0x18(%rdx)
movl $0x1, 0x20(%rdx)
cmpl $0x20, %ecx
jae 0xc416
xorl %esi, %esi
jmp 0xc437
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x12244
movq 0x18(%r14), %rdi
movq %rbx, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x112e6
leal -0x20(%rcx), %edi
movq (%rdx), %rsi
movl (%rsi), %r13d
shll %cl, %r13d
movabsq $0x2000000001, %rcx     # imm = 0x2000000001
movq %rcx, 0x18(%rdx)
movl $0x1, %esi
movl %edi, %ecx
testl %ecx, %ecx
je 0xc455
movl $0x20, %edi
subl %ecx, %edi
movl %edi, 0x1c(%rdx)
movq (%rdx), %rdx
movl (%rdx,%rsi,4), %edx
negl %ecx
shrl %cl, %edx
orl %r13d, %edx
movl %edx, %r13d
movl %eax, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
cmpl $0x0, (%r15)
je 0xc500
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x34a0
movq %r13, %rdi
callq 0x12dce
movl %eax, 0x8(%rsp)
movq 0x18(%r14), %rsi
incl 0x20(%rsi)
movl 0xc(%rsi), %edi
movl 0x1c(%rsi), %ecx
xorl %edx, %edx
movl %edi, %eax
subl %ecx, %eax
jae 0xc4ae
movl %edi, %eax
jmp 0xc4d3
movq (%rsi), %rdx
movl 0x18(%rsi), %edi
movl (%rdx,%rdi,4), %edx
negb %cl
shll %cl, %edx
shrl %cl, %edx
movl %eax, %ecx
shll %cl, %edx
leal 0x1(%rdi), %ecx
movl %ecx, 0x18(%rsi)
movl $0x20, 0x1c(%rsi)
movl $0x20, %ecx
testl %eax, %eax
je 0xc4f1
subl %eax, %ecx
movl %ecx, 0x1c(%rsi)
movq (%rsi), %rdi
movl 0x18(%rsi), %esi
movl (%rdi,%rsi,4), %esi
shrl %cl, %esi
negb %al
movl %eax, %ecx
shll %cl, %esi
shrl %cl, %esi
orl %esi, %edx
movl %edx, 0xc(%rsp)
incl %ebp
cmpl (%r15), %ebp
jb 0xc474
leaq 0x10(%rsp), %rdi
callq 0x12ac6
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc51e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x12ac6
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sasamples.cpp
// Function: CSA::SASamples::reportSize() const
usint
SASamples::reportSize() const
{
  usint bytes = sizeof(*this);
  bytes += this->indexes->reportSize();
  bytes += this->samples->reportSize();
  if(this->weighted) { bytes += this->inverse_indexes->reportSize(); }
  bytes += this->inverse_samples->reportSize();
  return bytes;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x12ab4
movl %eax, %r14d
movq 0x18(%rbx), %rdi
callq 0x11348
leal (%r14,%rax), %ebp
addl $0x30, %ebp
cmpb $0x1, (%rbx)
jne 0xc567
movq 0x20(%rbx), %rdi
callq 0x12ab4
addl %eax, %ebp
movq 0x28(%rbx), %rdi
callq 0x11348
addl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sasamples.cpp
// Function: CSA::SASamples::inverseSA(unsigned int) const
pair_type
SASamples::inverseSA(usint value) const
{
  if(value >= this->size) { return pair_type(this->size, this->size); }

  pair_type result;
  if(this->weighted)
  {
    SAVector::Iterator iter(*(this->inverse_indexes));
    result.first = iter.rank(value) - 1;
    result.second = this->inverse_samples->readItemConst(result.first);
    result.first = iter.select(result.first);
  }
  else
  {
    SAVector::Iterator iter(*(this->indexes));
    result.first = value - (value % this->rate);
    result.second = iter.select(this->inverse_samples->readItemConst(value / this->rate));
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl 0x8(%rdi), %r14d
movl %r14d, %ebp
cmpl %esi, %r14d
jbe 0xc6f0
movl %esi, %ebx
movq %rdi, %r15
cmpb $0x1, (%rdi)
jne 0xc600
movq 0x20(%r15), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x12ac0
xorl %r14d, %r14d
movq %r12, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x12acc
decl %eax
movq 0x28(%r15), %rdi
movl 0xc(%rdi), %r9d
movl %r9d, %ecx
imull %eax, %ecx
movl %ecx, %r8d
shrl $0x5, %r8d
andl $0x1f, %ecx
movl $0x20, %esi
movl $0x20, %r10d
subl %ecx, %r10d
movl %r9d, %edx
subl %r10d, %edx
jae 0xc69f
movl %r10d, %esi
movl %r9d, %edx
jmp 0xc6b7
movq 0x10(%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12ac0
movl %ebx, %eax
xorl %edx, %edx
divl 0x4(%r15)
movl %eax, %ecx
movl %edx, %ebp
xorl %esi, %esi
movq 0x28(%r15), %rdi
movl 0xc(%rdi), %r9d
imull %r9d, %ecx
movl %ecx, %r8d
shrl $0x5, %r8d
andl $0x1f, %ecx
movl $0x20, %edx
movl $0x20, %r10d
subl %ecx, %r10d
movl %r9d, %eax
subl %r10d, %eax
jae 0xc650
movl %r10d, %edx
movl %r9d, %eax
jmp 0xc665
movq (%rdi), %rsi
movl %r8d, %r9d
movl (%rsi,%r9,4), %esi
shll %cl, %esi
shrl %cl, %esi
movl %eax, %ecx
shll %cl, %esi
incl %r8d
testl %eax, %eax
je 0xc682
subl %eax, %edx
movq (%rdi), %rcx
movl %r8d, %edi
movl (%rcx,%rdi,4), %edi
movl %edx, %ecx
shrl %cl, %edi
negb %al
movl %eax, %ecx
shll %cl, %edi
shrl %cl, %edi
orl %edi, %esi
leaq 0x8(%rsp), %rdi
callq 0x12c6e
movl %eax, %r14d
subl %ebp, %ebx
leaq 0x8(%rsp), %rdi
callq 0x12ac6
movl %ebx, %ebp
jmp 0xc6f0
movq (%rdi), %r9
movl %r8d, %r10d
movl (%r9,%r10,4), %r14d
shll %cl, %r14d
shrl %cl, %r14d
movl %edx, %ecx
shll %cl, %r14d
incl %r8d
testl %edx, %edx
je 0xc6d8
subl %edx, %esi
movq (%rdi), %rcx
movl %r8d, %edi
movl (%rcx,%rdi,4), %edi
movl %esi, %ecx
shrl %cl, %edi
negb %dl
movl %edx, %ecx
shll %cl, %edi
shrl %cl, %edi
orl %r14d, %edi
movl %edi, %r14d
leaq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x12c6e
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x12ac6
shlq $0x20, %r14
movl %ebp, %eax
orq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc70b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x12ac6
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/alphabet.cpp
// Function: CSA::Alphabet::initialize(unsigned int const*)
void
Alphabet::initialize(const usint* counts)
{
  if(counts == 0) { return; }

  this->size = 0; this->chars = 0;
  for(usint c = 0; c < CHARS; c++)
  {
    this->index_ranges[c] = ((counts[c] > 0 || this->size > 0) ?
                             pair_type(this->size, this->size + counts[c] - 1) :
                             EMPTY_PAIR);
    if(counts[c] > 0)
    {
      this->text_chars[this->chars] = c;
      this->chars++;
    }
    size += counts[c];
  }

  this->index_rate = std::max((this->size + CHARS - 1) / CHARS, (usint)1);
  usint current = 0;

  for(usint c = 0, i = 0; c < this->chars; c++)
  {
    pair_type range = this->index_ranges[this->text_chars[c]];
    while(current <= range.second)
    {
      this->index_pointers[i] = c;
      current += this->index_rate;
      i++;
    }
  }

  this->ok = true;
}

// Assembly:
testq %rsi, %rsi
je 0xceef
pushq %rbx
xorl %ecx, %ecx
movl %ecx, 0x800(%rdi)
movl %ecx, 0xc04(%rdi)
movl $0x1, %r8d
xorl %eax, %eax
xorl %edx, %edx
xorl %r9d, %r9d
movl (%rsi,%r9,4), %r10d
subl $0x1, %r10d
setb %r11b
testl %edx, %edx
sete %bl
addl %edx, %r10d
testb %bl, %r11b
movl %edx, %r11d
cmovnel %r8d, %r11d
cmovnel %ecx, %r10d
movl %r11d, (%rdi,%r9,8)
movl %r10d, 0x4(%rdi,%r9,8)
cmpl $0x0, (%rsi,%r9,4)
je 0xce75
movl %eax, %eax
movl %r9d, 0x804(%rdi,%rax,4)
movl 0xc04(%rdi), %eax
incl %eax
movl %eax, 0xc04(%rdi)
movl (%rsi,%r9,4), %r10d
jmp 0xce78
xorl %r10d, %r10d
addl %r10d, %edx
movl %edx, 0x800(%rdi)
incq %r9
cmpq $0x100, %r9             # imm = 0x100
jne 0xce25
addl $0xff, %edx
movl %edx, %ecx
shrl $0x8, %ecx
cmpl $0x100, %edx            # imm = 0x100
movl $0x1, %edx
cmovael %ecx, %edx
movl %edx, 0x1008(%rdi)
testl %eax, %eax
popq %rbx
je 0xcee8
movl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl 0x804(%rdi,%rcx,4), %r8d
movl 0x4(%rdi,%r8,8), %r8d
cmpl %r8d, %edx
ja 0xcee0
movl %esi, %r9d
movl %ecx, 0xc08(%rdi,%r9,4)
addl 0x1008(%rdi), %edx
incl %esi
jmp 0xcec6
incq %rcx
cmpq %rax, %rcx
jne 0xceb9
movb $0x1, 0x100c(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/alphabet.cpp
// Function: CSA::Alphabet::Alphabet(_IO_FILE*)
Alphabet::Alphabet(FILE* file) :
  ok(false)
{
  if(file == 0) { return; }
  usint counts[CHARS];
  if(!std::fread(counts, CHARS * sizeof(usint), 1, file)) { return; }
  this->initialize(counts);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %r14
movq %rdi, %rbx
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x3150
movb $0x0, 0x100c(%rbx)
testq %r14, %r14
je 0xcf8f
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0xcf8f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xce00
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/alphabet.cpp
// Function: CSA::Alphabet::writeTo(_IO_FILE*) const
void
Alphabet::writeTo(FILE* file) const
{
  if(file == 0) { return; }
  for(usint c = 0; c < CHARS; c++)
  {
    usint temp = this->countOf(c);
    std::fwrite(&temp, sizeof(temp), 1, file);
  }
}

// Assembly:
testq %rsi, %rsi
je 0xd046
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x4(%rsp), %r15
movq (%r14,%r12,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
subl %eax, %ecx
incl %ecx
movl %ecx, 0x4(%rsp)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x34a0
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0xd007
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::Sampler::writeTo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
void
Sampler::writeTo(const std::string& base_name) const
{
  std::string sample_name = base_name + SA_SAMPLES_EXTENSION;
  std::ofstream sample_file(sample_name.c_str(), std::ios_base::binary);
  if(!sample_file)
  {
    std::cerr << "Sampler: Error creating sample file!" << std::endl;
    return;
  }

  for(uint i = 0; i < this->number_of_samples; i++)
  {
    sample_file.write((char*)&(this->samples[i].second), sizeof(uint));
  }
  sample_file.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x135e2(%rip), %rdx     # 0x206b0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xa0a5
movq (%r14), %rsi
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x32a0
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0xd145
movq 0x12eec(%rip), %rbx     # 0x1fff0
leaq 0xb5ef(%rip), %rsi      # 0x186fa
movl $0x24, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq 0x12eba(%rip), %rdi     # 0x1fff0
callq 0x3040
movq %rax, %rdi
callq 0x3190
jmp 0xd186
cmpl $0x0, 0x18(%rbx)
je 0xd17c
movl $0x4, %r15d
xorl %r12d, %r12d
leaq 0x28(%rsp), %r14
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x3310
incq %r12
movl 0x18(%rbx), %eax
addq $0x8, %r15
cmpq %rax, %r12
jb 0xd159
leaq 0x28(%rsp), %rdi
callq 0x3330
movq 0x12e3b(%rip), %rax     # 0x1ffc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x3200
leaq 0x120(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd1d3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0xd1f6
jmp 0xd1e9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3350
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd211
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::Sampler::getSamples(std::pair<unsigned int, unsigned int>*, unsigned int, unsigned int)
pair_type*
Sampler::getSamples(short_pair* sa, uint number_of_sequences, usint threads)
{
  if(sa == 0 || this->samples == 0 || this->status != SAMPLED) { return 0; }

  for(uint i = 0; i < this->number_of_samples; i++)
  {
    this->samples[i].first = sa[this->samples[i].second].second - number_of_sequences;
  }
  #ifdef MULTITHREAD_SUPPORT
  omp_set_num_threads(threads);
  #endif
  parallelSort(samples, samples + this->number_of_samples);

  pair_type* result = this->samples; this->samples = 0;
  this->status = NOT_READY;
  return result;
}

// Assembly:
testq %rsi, %rsi
je 0xd25b
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xd257
cmpl $0x2, 0xc(%rbx)
jne 0xd257
movl 0x18(%rbx), %eax
testq %rax, %rax
je 0xd25e
xorl %ecx, %ecx
movl 0x4(%rdi,%rcx,8), %r8d
movl 0x4(%rsi,%r8,8), %r8d
subl %edx, %r8d
movl %r8d, (%rdi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xd23c
jmp 0xd260
xorl %eax, %eax
jmp 0xd27c
xorl %eax, %eax
retq
xorl %eax, %eax
leaq (%rdi,%rax,8), %rsi
callq 0xc79b
movq 0x10(%rbx), %rax
movq $0x0, 0x10(%rbx)
movl $0x0, 0xc(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::cleanUp()
void
WeightedSampler::cleanUp()
{
  delete[] this->path_weights; this->path_weights = 0;
  delete[] this->predecessors; this->predecessors = 0;
  delete[] this->edge_weights; this->edge_weights = 0;
  delete[] this->edge_totals; this->edge_totals = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0xd542
callq 0x3300
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0xd558
callq 0x3300
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0xd56e
callq 0x3300
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xd584
callq 0x3300
movq $0x0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::buildPath(unsigned int, unsigned int*, unsigned int, unsigned int*, unsigned int)
void
WeightedSampler::buildPath(uint links, uint* path_a, uint length_a, uint* path_b, uint length_b)
{
  uint cur_a = 0, cur_b = 0;
  uint adj = length_a - links;

  while(true)
  {
    if(cur_a == cur_b + adj && path_b[cur_b] <= path_a[cur_a] && path_b[cur_b + 1] >= path_a[cur_a + 1])
    {
      break;
    }

    if(path_a[cur_a] <= path_b[cur_b]) { cur_a++; }
    else                               { cur_b++; }
  }

  // Combine the prefix of 'path_b' until 'cur_b - 1' with the suffix of 'path_a' from 'cur_a'.
  for(uint i = 0; i <= cur_b; i++) { path_a[i] = path_b[i]; }
  for(uint i = cur_b + 1, j = cur_a + 1; j < length_a; i++, j++) { path_a[i] = path_a[j]; }
}

// Assembly:
pushq %rbp
pushq %rbx
movl %ecx, %edi
subl %esi, %edi
xorl %esi, %esi
xorl %eax, %eax
leal (%rdi,%rsi), %r11d
movl %esi, %r9d
movl %eax, %r10d
cmpl %r11d, %eax
jne 0xe0de
movl (%r8,%r9,4), %r11d
movl (%rdx,%r10,4), %ebx
cmpl %ebx, %r11d
ja 0xe0e6
leal 0x1(%rsi), %r9d
movl (%r8,%r9,4), %ebp
leal 0x1(%rax), %r10d
cmpl (%rdx,%r10,4), %ebp
jb 0xe0e6
jmp 0xe0ff
movl (%rdx,%r10,4), %ebx
movl (%r8,%r9,4), %r11d
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpl %r11d, %ebx
setbe %r9b
seta %r10b
addl %r10d, %esi
addl %r9d, %eax
jmp 0xe0ae
cmpl $0x1, %r9d
movl %r9d, %esi
adcl $0x0, %esi
xorl %edi, %edi
movl (%r8,%rdi,4), %r11d
movl %r11d, (%rdx,%rdi,4)
incq %rdi
cmpq %rdi, %rsi
jne 0xe10b
cmpl %ecx, %r10d
jae 0xe13d
leaq (%rdx,%r10,4), %rsi
notl %eax
addl %ecx, %eax
xorl %ecx, %ecx
leal (%r9,%rcx), %edi
movl (%rsi,%rcx,4), %r8d
movl %r8d, (%rdx,%rdi,4)
incq %rcx
cmpl %ecx, %eax
jne 0xe12a
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::link(std::deque<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&, unsigned int, bool)
node_type
WeightedSampler::link(std::deque<node_type>& active_nodes, uint to, bool shortest)
{
  this->path_weights[to] = std::numeric_limits<sum_type>::max();
  node_type current(to, 0);
  if(shortest) { current.second = std::numeric_limits<uint>::max(); }

  for(std::deque<node_type>::iterator iter = active_nodes.begin(); iter != active_nodes.end(); ++iter)
  {
    sum_type weight = this->getPathWeight((*iter).first, to);
    if(weight > this->path_weights[to]) { return current; }
    if(weight < this->path_weights[to] ||
       (shortest && (*iter).second + 1 < current.second) ||
       (!shortest && (*iter).second + 1 > current.second))
    {
      this->path_weights[to] = weight;
      this->predecessors[to] = (*iter).first;
      current.second = (*iter).second + 1;
    }
  }

  return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x28(%rdi), %r8
movl %edx, %r9d
movl $0xffffffff, (%r8,%r9,4) # imm = 0xFFFFFFFF
movl %ecx, -0x1c(%rsp)
movl %ecx, %eax
negl %eax
movq 0x10(%rsi), %r10
movq 0x30(%rsi), %rcx
movq %rcx, -0x8(%rsp)
cmpq %rcx, %r10
je 0xe234
movq 0x20(%rsi), %r15
movq 0x28(%rsi), %rsi
movb 0x1c(%rdi), %dl
movb %dl, -0x1d(%rsp)
movq 0x38(%rdi), %rbx
movq 0x50(%rdi), %r14
movq 0x40(%rdi), %rcx
movq %rcx, -0x10(%rsp)
movq 0x30(%rdi), %rcx
movq %rcx, -0x18(%rsp)
movl (%r10), %r13d
cmpb $0x0, -0x1d(%rsp)
movq %r9, %rdx
cmovneq %r13, %rdx
movq %r13, %r11
cmovneq %r9, %r11
movl 0x20(%rdi), %ebp
movl (%r14,%r13,4), %r12d
subl (%r14,%r9,4), %r12d
movq -0x10(%rsp), %rcx
imull (%rcx,%rdx,4), %r12d
addl (%r8,%r13,4), %ebp
addl (%rbx,%r11,4), %ebp
subl (%rbx,%rdx,4), %ebp
addl %r12d, %ebp
cmpl (%r8,%r9,4), %ebp
ja 0xe234
jae 0xe218
movl %ebp, (%r8,%r9,4)
movl (%r10), %eax
movq -0x18(%rsp), %rcx
movl %eax, (%rcx,%r9,4)
movl 0x4(%r10), %eax
incl %eax
addq $0x8, %r10
cmpq %r15, %r10
jne 0xe20f
movq 0x8(%rsi), %r10
addq $0x8, %rsi
leaq 0x200(%r10), %r15
cmpq -0x8(%rsp), %r10
jne 0xe1a0
jmp 0xe234
movl 0x4(%r10), %r13d
incl %r13d
cmpb $0x0, -0x1c(%rsp)
je 0xe22d
cmpl %eax, %r13d
jb 0xe1e1
jmp 0xe1f7
cmpl %eax, %r13d
ja 0xe1e1
jmp 0xe1f7
shlq $0x20, %rax
orq %r9, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::bridge(unsigned int, unsigned int, unsigned int)
bool
WeightedSampler::bridge(uint a, uint b, uint c)
{
/*
  Note that 'c' is always less than 'this->size', and 'b' will not be added to active nodes,
  unless it offers a strictly better path to 'this->size' than 'a'.
*/

  uint low = c + 1, high = this->nodes - 1, mid = low;
  while(low < high)
  {
    if(this->isStrictlyBetter(a, b, mid))
    {
      low = mid + 1;
      mid = std::min(low + (high - low) / 2, c + 2 * (mid - c));
    }
    else { high = mid; mid = low + (high - low) / 2; }
  }
  // 'high' will now be the first position for which 'a' is not strictly better than 'b'.

  return this->isStrictlyBetter(c, b, high);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, 0x4(%rsp)
movq %rdi, %r15
leal 0x1(%r14), %r13d
movl 0x48(%rdi), %r12d
decl %r12d
cmpl %r12d, %r13d
jae 0xe337
movl %esi, %ebp
movl %r13d, %ebx
movq %r15, %rdi
movl %ebp, %esi
movl 0x4(%rsp), %edx
movl %r13d, %ecx
callq 0xe246
testb %al, %al
je 0xe323
leal 0x1(%r13), %ebx
movl %r12d, %eax
subl %ebx, %eax
shrl %eax
addl %r13d, %eax
incl %eax
subl %r14d, %r13d
leal (%r14,%r13,2), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
jmp 0xe32f
movl %r13d, %r12d
movl %r13d, %eax
subl %ebx, %eax
shrl %eax
addl %ebx, %eax
movl %eax, %r13d
cmpl %r12d, %ebx
jb 0xe2f0
movq %r15, %rdi
movl %r14d, %esi
movl 0x4(%rsp), %edx
movl %r12d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe246
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::finalLink(std::deque<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&, unsigned int, bool)
pair_type
WeightedSampler::finalLink(std::deque<node_type>& active_nodes, uint to, bool shortest)
{
  pair_type result(0, std::numeric_limits<sum_type>::max());
  result.first = (shortest ? std::numeric_limits<uint>::max() : 0);

  for(std::deque<node_type>::iterator iter = active_nodes.begin(); iter != active_nodes.end(); ++iter)
  {
    sum_type weight = this->getPathWeight((*iter).first, to);
    if(weight > result.second) { return result; }
    if(weight < result.second ||
       (shortest && (*iter).second + 1 < result.first) ||
       (!shortest && (*iter).second + 1 > result.first))
    {
      this->predecessors[to] = (*iter).first;
      result = pair_type((*iter).second + 1, weight);
    }
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, -0x24(%rsp)
movl %ecx, %eax
negl %eax
movq 0x10(%rsi), %r9
movq 0x30(%rsi), %rcx
movq %rcx, -0x8(%rsp)
cmpq %rcx, %r9
je 0xe4d0
movq 0x20(%rsi), %r14
movq 0x28(%rsi), %rsi
movq 0x28(%rdi), %rcx
movq %rcx, -0x10(%rsp)
movb 0x1c(%rdi), %cl
movb %cl, -0x25(%rsp)
movq 0x38(%rdi), %rbx
movq 0x50(%rdi), %r15
movq 0x40(%rdi), %rcx
movq %rcx, -0x18(%rsp)
movl %edx, %r13d
movq 0x30(%rdi), %rcx
movq %rcx, -0x20(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl (%r9), %r11d
movl 0x20(%rdi), %ebp
cmpb $0x0, -0x25(%rsp)
movq %r13, %r10
cmovneq %r11, %r10
movq %r11, %rcx
cmovneq %r13, %rcx
movl (%r15,%r11,4), %r12d
subl (%r15,%r13,4), %r12d
movq -0x18(%rsp), %r8
imull (%r8,%r10,4), %r12d
movq -0x10(%rsp), %r8
addl (%r8,%r11,4), %ebp
addl (%rbx,%rcx,4), %ebp
subl (%rbx,%r10,4), %ebp
addl %r12d, %ebp
cmpl %edx, %ebp
ja 0xe4ca
jae 0xe4ae
movq -0x20(%rsp), %rax
movl %r11d, (%rax,%r13,4)
movl 0x4(%r9), %eax
incl %eax
movl %ebp, %edx
addq $0x8, %r9
cmpq %r14, %r9
jne 0xe4a5
movq 0x8(%rsi), %r9
addq $0x8, %rsi
leaq 0x200(%r9), %r14
cmpq -0x8(%rsp), %r9
jne 0xe438
jmp 0xe4ca
movl 0x4(%r9), %r10d
incl %r10d
cmpb $0x0, -0x24(%rsp)
je 0xe4c3
cmpl %eax, %r10d
jb 0xe47c
jmp 0xe48d
cmpl %eax, %r10d
ja 0xe47c
jmp 0xe48d
shlq $0x20, %rdx
jmp 0xe4da
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movl %eax, %eax
orq %rdx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::getEdgeWeight(unsigned int, unsigned int)
sum_type
WeightedSampler::getEdgeWeight(uint from, uint to)
{
  if(this->use_psi)
  {
    return this->edge_weights[to] - this->edge_weights[from] -
           this->getDistance(from, to) * this->edge_totals[from] + this->adjustment;
  }
  else
  {
    return this->edge_weights[from] - this->edge_weights[to] -
           this->getDistance(from, to) * this->edge_totals[to] + this->adjustment;
  }
}

// Assembly:
movq 0x38(%rdi), %rcx
movq 0x50(%rdi), %r10
movq 0x40(%rdi), %r9
movl 0x20(%rdi), %r8d
cmpb $0x1, 0x1c(%rdi)
jne 0xe562
movl %edx, %edi
movl %esi, %edx
movq %rdx, %rsi
movq %rdi, %rax
jmp 0xe56c
movl %esi, %esi
movl %edx, %edx
movq %rdx, %rdi
movq %rsi, %rax
movl (%rcx,%rax,4), %eax
movl (%r10,%rsi,4), %esi
subl (%r10,%rdi,4), %esi
imull (%r9,%rdx,4), %esi
subl (%rcx,%rdx,4), %eax
addl %r8d, %eax
addl %esi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::SemiGreedySampler::buildSamples(unsigned int, double)
bool
SemiGreedySampler::buildSamples(uint _sample_rate, double greediness)
{
  if(_sample_rate == 0 || this->status != READY || greediness < 0.0 || greediness > 1.0)
  {
    return false;
  }

  uint number = (this->size + _sample_rate - 1) / _sample_rate;
  this->samples = new pair_type[number];
  if(greediness == 1.0) { _sample_rate = this->size; }
  else
  {
    _sample_rate = std::min((double)(this->size), _sample_rate / (1.0 - greediness));
  }

  this->buildRegularSamples(_sample_rate);
  this->addGreedySamples(number);

  this->cleanUp();
  this->status = SAMPLED;
  return true;
}

// Assembly:
testl %esi, %esi
je 0xe86a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
ucomisd 0x98a2(%rip), %xmm0     # 0x18008
ja 0xe85d
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xe85d
movq %rdi, %rbx
cmpl $0x1, 0xc(%rdi)
jne 0xe85d
movl %esi, %r15d
movsd %xmm0, 0x8(%rsp)
movl 0x8(%rbx), %r12d
leal (%r15,%r12), %ebp
decl %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r14d
leaq (,%r14,8), %rdi
callq 0x3030
cmpl %r15d, %ebp
jb 0xe7cc
leaq (%rax,%r14,8), %rcx
movq %rax, %rdx
movq $0x0, (%rdx)
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0xe7bc
movq %rax, 0x10(%rbx)
movsd 0x8(%rsp), %xmm3
ucomisd 0x982a(%rip), %xmm3     # 0x18008
movl %r12d, %ecx
jne 0xe7e5
jnp 0xe814
movl %r12d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movl %r15d, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
movsd 0x9805(%rip), %xmm2     # 0x18008
subsd %xmm3, %xmm2
divsd %xmm2, %xmm1
minsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movl %ecx, 0x28(%rbx)
testl %r12d, %r12d
je 0xe833
movl 0x18(%rbx), %edx
xorl %esi, %esi
movl %edx, %edi
movl %esi, 0x4(%rax,%rdi,8)
incl %edx
addl %ecx, %esi
cmpl %r12d, %esi
jb 0xe821
movl %edx, 0x18(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe898
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xe84c
callq 0x3300
movq $0x0, 0x20(%rbx)
movl $0x2, 0xc(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::SemiGreedySampler::buildRegularSamples(unsigned int)
void
SemiGreedySampler::buildRegularSamples(uint _sample_rate)
{
  this->sample_rate = _sample_rate;
  for(uint i = 0; i < this->size; i += this->sample_rate)
  {
    this->samples[this->number_of_samples].second = i;
    this->number_of_samples++;
  }
}

// Assembly:
movl %esi, 0x28(%rdi)
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0xe897
movq 0x10(%rdi), %rdx
movl 0x18(%rdi), %ecx
xorl %r8d, %r8d
movl %ecx, %r9d
movl %r8d, 0x4(%rdx,%r9,8)
incl %ecx
addl %esi, %r8d
cmpl %eax, %r8d
jb 0xe882
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::SemiGreedySampler::addGreedySamples(unsigned int)
void
SemiGreedySampler::addGreedySamples(uint total_samples)
{
  if(this->number_of_samples >= total_samples) { return; }

  std::sort(this->weights, this->weights + this->size);
  for(uint i = this->size - 1; this->number_of_samples < total_samples; i--)
  {
    if(this->weights[i].second % this->sample_rate != 0)
    {
      if(this->weights[i].first == 0) { break; }  // The further samples will be weight 0.
      this->samples[this->number_of_samples].second = this->weights[i].second;
      this->number_of_samples++;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl 0x18(%rdi), %esi
cmpl %ebx, %esi
jae 0xe925
movq %rdi, %r14
movl 0x8(%rdi), %eax
testq %rax, %rax
je 0xe8e3
movq 0x20(%r14), %r15
leaq (%r15,%rax,8), %r12
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xab65
movq %r15, %rdi
movq %r12, %rsi
callq 0xac14
movl 0x18(%r14), %esi
cmpl %ebx, %esi
jae 0xe925
movl 0x8(%r14), %edi
movq 0x20(%r14), %r8
movl 0x28(%r14), %r9d
movq 0x10(%r14), %r10
decl %edi
movl %edi, %edi
movl 0x4(%r8,%rdi,8), %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
testl %edx, %edx
je 0xe91f
cmpl $0x0, (%r8,%rdi,8)
je 0xe925
movl %esi, %eax
movl %ecx, 0x4(%r10,%rax,8)
incl %esi
movl %esi, 0x18(%r14)
decl %edi
cmpl %ebx, %esi
jb 0xe8f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::SuffixArray(unsigned char*, unsigned int, unsigned int)
SuffixArray::SuffixArray(uchar* _data, uint bytes, uint threads) :
  ok(false),
  data(_data), sa(0), original_sa(0), ranks(0), data_size(bytes),
  sequences(0)
{
  if(_data == 0 || bytes == 0)
  {
    std::cerr << "Error: No input data given for suffix array construction!" << std::endl;
    return;
  }

  for(uint i = 0; i < this->data_size; i++) { if(this->data[i] == '\0') { this->sequences++; } }
  if(this->data[this->data_size - 1] != '\0')
  {
    std::cerr << "Error: Input data must end with \\0!" << std::endl;
    return;
  }

  short_pair* pairs = simpleSuffixSort(this->data, this->data_size, this->sequences, threads);
  this->sa = new uint[this->data_size];
  for(uint i = 0; i < this->data_size; i++) { this->sa[i] = pairs[i].first; }
  delete[] pairs;

  this->original_sa = this->sa; this->sa += this->sequences;
  this->ok = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, (%rdi)
movq %rsi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movl %edx, 0x28(%rdi)
movl $0x0, 0x2c(%rdi)
testq %rsi, %rsi
sete %al
testl %edx, %edx
sete %dil
orb %al, %dil
je 0xf1db
movq 0x10e23(%rip), %rbx     # 0x1fff0
leaq 0x9642(%rip), %rsi      # 0x18816
movl $0x39, %edx
jmp 0xf216
leaq 0x10(%rbx), %r15
movl %edx, %edi
xorl %r8d, %r8d
xorl %eax, %eax
cmpb $0x0, (%rsi,%r8)
jne 0xf1f2
incl %eax
movl %eax, 0x2c(%rbx)
incq %r8
cmpq %r8, %rdi
jne 0xf1e6
leal -0x1(%rdx), %edi
cmpb $0x0, (%rsi,%rdi)
je 0xf250
movq 0x10de6(%rip), %rbx     # 0x1fff0
leaq 0x963f(%rip), %rsi      # 0x18850
movl $0x23, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3190
movq %rsi, %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x15dfb
movq %rax, %r14
movl 0x28(%rbx), %r12d
leaq (,%r12,4), %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testq %r12, %r12
je 0xf28c
xorl %ecx, %ecx
movl (%r14,%rcx,8), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0xf27b
jmp 0xf291
testq %r14, %r14
je 0xf29c
movq %r14, %rdi
callq 0x3300
movq (%r15), %rax
movq %rax, 0x18(%rbx)
movl 0x2c(%rbx), %ecx
leaq (%rax,%rcx,4), %rax
movq %rax, 0x10(%rbx)
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::SuffixArray(unsigned char*, unsigned int*, unsigned int, unsigned int)
SuffixArray::SuffixArray(uchar* _data, usint* ra, uint bytes, uint threads) :
  ok(false),
  data(_data), sa(0), original_sa(0), ranks(ra), data_size(bytes),
  sequences(0)
{
  if(_data == 0 || ra == 0 || bytes == 0)
  {
    std::cerr << "Error: No input data given for suffix array construction!" << std::endl;
    return;
  }

  for(uint i = 0; i < this->data_size; i++) { if(this->data[i] == '\0') { this->sequences++; } }
  if(this->data[this->data_size - 1] != '\0')
  {
    std::cerr << "Error: Input data must end with \\0!" << std::endl;
    return;
  }

  pair_type* pairs = new pair_type[this->data_size];
  for(usint i = 0; i < this->data_size; i++) { pairs[i] = pair_type(this->ranks[i], i); }
  #ifdef MULTITHREAD_SUPPORT
  omp_set_num_threads(threads);
  #endif
  parallelSort(pairs, pairs + this->data_size);
  this->sa = new uint[this->data_size];
  for(uint i = 0; i < this->data_size; i++) { this->sa[i] = pairs[i].second; }
  delete[] pairs;

  this->original_sa = this->sa; this->sa += this->sequences;
  this->ok = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movb $0x0, (%rdi)
movq %rsi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rdx, 0x20(%rdi)
movl %ecx, 0x28(%rdi)
movl $0x0, 0x2c(%rdi)
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %dl
orb %al, %dl
testl %ecx, %ecx
sete %al
orb %dl, %al
je 0xf310
movq 0x10cee(%rip), %rbx     # 0x1fff0
leaq 0x950d(%rip), %rsi      # 0x18816
movl $0x39, %edx
jmp 0xf348
movq %rdi, %rbx
movl %ecx, %r13d
xorl %eax, %eax
xorl %edx, %edx
cmpb $0x0, (%rsi,%rax)
jne 0xf325
incl %edx
movl %edx, 0x2c(%rbx)
incq %rax
cmpq %rax, %r13
jne 0xf31a
decl %ecx
cmpb $0x0, (%rsi,%rcx)
je 0xf385
movq 0x10cb4(%rip), %rbx     # 0x1fff0
leaq 0x950d(%rip), %rsi      # 0x18850
movl $0x23, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3190
leaq (,%r13,8), %r12
movq %r12, %rdi
callq 0x3030
movq %rax, %r15
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3150
movl (%r14,%rbp,4), %eax
movl %eax, (%r15,%rbp,8)
movl %ebp, 0x4(%r15,%rbp,8)
incq %rbp
cmpq %rbp, %r13
jne 0xf3a7
leaq (%r15,%r13,8), %rsi
movq %r15, %rdi
callq 0xc79b
movl 0x28(%rbx), %r14d
leaq (,%r14,4), %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testq %r14, %r14
je 0xf3f4
xorl %ecx, %ecx
movl 0x4(%r15,%rcx,8), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0xf3e4
movq %r15, %rdi
callq 0x3300
movq 0x10(%rbx), %rax
movq %rax, 0x18(%rbx)
movl 0x2c(%rbx), %ecx
leaq (%rax,%rcx,4), %rax
movq %rax, 0x10(%rbx)
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::~SuffixArray()
SuffixArray::~SuffixArray()
{
  delete[] this->data; this->data = 0;
  delete[] this->original_sa; this->sa = 0; this->original_sa = 0;
  delete[] this->ranks; this->ranks = 0;
  this->ok = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xf434
callq 0x3300
movq $0x0, 0x8(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xf44a
callq 0x3300
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xf45f
callq 0x3300
movq $0x0, 0x20(%rbx)
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::locate(std::pair<unsigned int, unsigned int>) const
uint*
SuffixArray::locate(pair_type range) const
{
  if(isEmpty(range) || range.second >= this->getSize()) { return 0; }

  uint* result = new uint[length(range)];
  for(usint i = range.first; i <= range.second; i++) { result[i - range.first] = this->sa[i]; }
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rsi, %r15
shrq $0x20, %r15
cmpl %r15d, %ebx
ja 0xf955
movq %rdi, %r14
movl 0x28(%rdi), %eax
subl 0x2c(%rdi), %eax
cmpl %r15d, %eax
jbe 0xf955
movl %r15d, %eax
subl %ebx, %eax
leaq 0x4(,%rax,4), %rax
movabsq $0x3fffffffc, %rdi      # imm = 0x3FFFFFFFC
andq %rax, %rdi
callq 0x3030
movq 0x10(%r14), %rcx
xorl %edx, %edx
leal (%rbx,%rdx), %esi
movl (%rcx,%rsi,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
leal (%rdx,%rbx), %esi
cmpl %r15d, %esi
jbe 0xf93f
jmp 0xf957
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Array(std::basic_ifstream<char, std::char_traits<char>>&)
Array::Array(std::ifstream& file) :
  delete_array(true), item_index(0)
{
  file.read((char*)&(this->items), sizeof(this->items));
  file.read((char*)&(this->number_of_blocks), sizeof(this->number_of_blocks));
  file.read((char*)&(this->block_size), sizeof(this->block_size));

  this->array = new usint[this->block_size * this->number_of_blocks];
  file.read((char*)(this->array), this->block_size * this->number_of_blocks * sizeof(usint));
  this->buffer = new ReadBuffer(this->array, this->block_size);

  this->integer_bits = length(this->items);
  this->samples = new ReadBuffer(file, this->number_of_blocks + 1, this->integer_bits);

  this->buildIndex();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, 0x18(%rdi)
movq $0x0, 0x38(%rdi)
movl $0x4, %edx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x32e0
leaq 0x20(%rbx), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x32e0
leaq 0x1c(%rbx), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x32e0
movl 0x20(%rbx), %r15d
imull 0x1c(%rbx), %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x32e0
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movq 0x10(%rbx), %rsi
movl 0x1c(%rbx), %edx
movq %rax, %rdi
callq 0x11230
movq %r15, 0x8(%rbx)
movl (%rbx), %eax
bsrl %eax, %ebp
xorl $-0x20, %ebp
addl $0x21, %ebp
testl %eax, %eax
cmovel %eax, %ebp
movl %ebp, 0x30(%rbx)
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movl 0x20(%rbx), %edx
incl %edx
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x1112e
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xfee0
jmp 0xfec8
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Array(_IO_FILE*)
Array::Array(FILE* file) :
  delete_array(true), item_index(0)
{
  if(!std::fread(&(this->items), sizeof(this->items), 1, file)) { return; }
  if(!std::fread(&(this->number_of_blocks), sizeof(this->number_of_blocks), 1, file)) { return; }
  if(!std::fread(&(this->block_size), sizeof(this->block_size), 1, file)) { return; }

  this->array = new usint[this->block_size * this->number_of_blocks];
  if(!std::fread(this->array, this->block_size * sizeof(usint), this->number_of_blocks, file)) { return; }
  this->buffer = new ReadBuffer(this->array, this->block_size);

  this->integer_bits = length(this->items);
  this->samples = new ReadBuffer(file, this->number_of_blocks + 1, this->integer_bits);

  this->buildIndex();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, 0x18(%rdi)
movq $0x0, 0x38(%rdi)
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x1022d
leaq 0x20(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x1022d
leaq 0x1c(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x1022d
movl 0x1c(%rbx), %r15d
movl 0x20(%rbx), %r12d
movl %r12d, %edi
imull %r15d, %edi
shlq $0x2, %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
shlq $0x2, %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x1022d
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movq 0x10(%rbx), %rsi
movl 0x1c(%rbx), %edx
movq %rax, %rdi
callq 0x11230
movq %r15, 0x8(%rbx)
movl (%rbx), %eax
bsrl %eax, %ebp
xorl $-0x20, %ebp
addl $0x21, %ebp
testl %eax, %eax
cmovel %eax, %ebp
movl %ebp, 0x30(%rbx)
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movl 0x20(%rbx), %edx
incl %edx
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x111a8
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xfee0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10238
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::~Array()
Array::~Array()
{
  if(this->delete_array) { delete[] this->array; }
  delete this->buffer;
  delete this->samples;
  delete this->item_index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x10557
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x10557
callq 0x3300
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x10568
movq %r14, %rdi
callq 0x112b6
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x10586
movq %r14, %rdi
callq 0x112b6
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x105a4
movq %rbx, %rdi
callq 0x112b6
movl $0x28, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3270
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::writeTo(_IO_FILE*) const
void
Array::writeTo(FILE* file) const
{
  if(file == 0) { return; }
  std::fwrite(&(this->items), sizeof(this->items), 1, file);
  std::fwrite(&(this->number_of_blocks), sizeof(this->number_of_blocks), 1, file);
  std::fwrite(&(this->block_size), sizeof(this->block_size), 1, file);
  std::fwrite(this->array, this->block_size * sizeof(usint), this->number_of_blocks, file);
  this->samples->writeTo(file);
}

// Assembly:
testq %rsi, %rsi
je 0x10698
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
leaq 0x20(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
leaq 0x1c(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
movq 0x10(%r14), %rdi
movl 0x1c(%r14), %esi
shlq $0x2, %rsi
movl 0x20(%r14), %edx
movq %rbx, %rcx
callq 0x34a0
movq 0x28(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x112e6
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::reportSize() const
usint
Array::reportSize() const
{
  usint bytes = sizeof(*this);
  bytes += this->buffer->reportSize();
  bytes += this->block_size * this->number_of_blocks * sizeof(usint);
  bytes += this->samples->reportSize();
  bytes += this->item_index->reportSize();
  return bytes;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x11348
movl 0x1c(%rbx), %ecx
imull 0x20(%rbx), %ecx
leal (%rax,%rcx,4), %ebp
movq 0x28(%rbx), %rdi
callq 0x11348
movl %eax, %r14d
addl %ebp, %r14d
movq 0x38(%rbx), %rdi
callq 0x11348
addl %r14d, %eax
addl $0x48, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Iterator::readItem(unsigned int)
usint
Array::Iterator::readItem(usint index)
{
  if(index >= this->parent.items) { return 0; }
  this->getSample(this->sampleForIndex(index));

  usint value = 0;
  while(this->sample + this->cur <= index)
  {
    value = this->buffer.readDeltaCode();
    this->cur++;
  }

  return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
xorl %ebp, %ebp
cmpl %esi, (%rax)
jbe 0x1088a
movl %esi, %ebx
movq %rdi, %r14
callq 0x10898
movq %r14, %rdi
movl %eax, %esi
callq 0x10e1c
movl 0xc(%r14), %esi
movl 0x10(%r14), %edi
leal (%rdi,%rsi), %eax
cmpl %ebx, %eax
ja 0x1088a
movq 0x18(%r14), %r8
movl 0x34(%r14), %eax
movl 0x30(%r14), %r9d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x34(%r14)
movl %r9d, %eax
movl (%r8,%rax,4), %r10d
je 0x1079b
movl %ecx, %eax
jmp 0x107af
incl %r9d
movl %r9d, 0x30(%r14)
movl $0x20, 0x34(%r14)
movl $0x20, %eax
incl %edx
btl %ecx, %r10d
jae 0x10786
movl $0x1, %r11d
movl %edx, %ecx
shll %cl, %r11d
xorl %r10d, %r10d
cmpl %edx, %eax
ja 0x107f5
subl %eax, %edx
movl %r9d, %ecx
movl (%r8,%rcx,4), %r10d
negb %al
movl %eax, %ecx
shll %cl, %r10d
shrl %cl, %r10d
movl %edx, %ecx
shll %cl, %r10d
incl %r9d
movl %r9d, 0x30(%r14)
movl $0x20, 0x34(%r14)
movl $0x20, %eax
movl %r9d, %r15d
testl %edx, %edx
je 0x10815
subl %edx, %eax
movl %eax, 0x34(%r14)
movl (%r8,%r15,4), %ebp
movl %eax, %ecx
shrl %cl, %ebp
negb %dl
movl %edx, %ecx
shll %cl, %ebp
shrl %cl, %ebp
orl %ebp, %r10d
orl %r11d, %r10d
decl %r10d
xorl %ebp, %ebp
movl %r10d, %edx
subl %eax, %edx
jae 0x10829
movl %r10d, %edx
jmp 0x1084d
movl (%r8,%r15,4), %ebp
negb %al
movl %eax, %ecx
shll %cl, %ebp
shrl %cl, %ebp
movl %edx, %ecx
shll %cl, %ebp
incl %r9d
movl %r9d, 0x30(%r14)
movl $0x20, 0x34(%r14)
movl $0x20, %eax
testl %edx, %edx
je 0x10870
subl %edx, %eax
movl %eax, 0x34(%r14)
movl %r9d, %ecx
movl (%r8,%rcx,4), %r11d
movl %eax, %ecx
shrl %cl, %r11d
negb %dl
movl %edx, %ecx
shll %cl, %r11d
shrl %cl, %r11d
orl %r11d, %ebp
leal (%rdi,%rsi), %ecx
incl %ecx
leal 0x1(%rdi), %edx
movl %edx, 0x10(%r14)
movl %edx, %edi
cmpl %ebx, %ecx
jbe 0x10781
btsl %r10d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Iterator::sampleForIndex(unsigned int)
usint
Array::Iterator::sampleForIndex(usint index)
{
  usint low = this->parent.item_index->readItemConst(index / this->parent.index_rate);
  usint high = this->parent.number_of_blocks - 1;

  this->samples.goToItem(low + 1);
  for(; low < high; low++)
  {
    if(this->samples.readItem() > index) { return low; }
  }

  return low;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r9
movq 0x38(%r9), %r10
movl %esi, %eax
xorl %edx, %edx
divl 0x40(%r9)
movl %eax, %ecx
xorl %eax, %eax
movl 0xc(%r10), %ebx
imull %ebx, %ecx
movl %ecx, %r11d
shrl $0x5, %r11d
andl $0x1f, %ecx
movl $0x20, %r8d
movl $0x20, %ebp
subl %ecx, %ebp
movl %ebx, %edx
subl %ebp, %edx
jae 0x108da
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x108ee
movq (%r10), %rax
movl %r11d, %ebx
movl (%rax,%rbx,4), %eax
shll %cl, %eax
shrl %cl, %eax
movl %edx, %ecx
shll %cl, %eax
incl %r11d
testl %edx, %edx
je 0x10915
subl %edx, %r8d
movq (%r10), %rcx
movl %r11d, %r10d
movl (%rcx,%r10,4), %r10d
movl %r8d, %ecx
shrl %cl, %r10d
negb %dl
movl %edx, %ecx
shll %cl, %r10d
shrl %cl, %r10d
orl %eax, %r10d
movl %r10d, %eax
movl 0x20(%r9), %r9d
decl %r9d
leal 0x1(%rax), %ecx
movl 0x4c(%rdi), %r10d
movl %r10d, %r8d
imull %ecx, %r8d
movl %r8d, %r11d
shrl $0x5, %r11d
movl %r11d, 0x58(%rdi)
andl $0x1f, %r8d
movl $0x20, %edx
subl %r8d, %edx
movl %edx, 0x5c(%rdi)
movl %ecx, 0x60(%rdi)
cmpl %r9d, %eax
jae 0x109bf
movq 0x40(%rdi), %rbx
leal 0x2(%rax), %ecx
movl %ecx, 0x60(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x10965
movl %r10d, %r8d
jmp 0x1098b
movl %r11d, %ecx
movl (%rbx,%rcx,4), %ebp
negb %dl
movl %edx, %ecx
shll %cl, %ebp
shrl %cl, %ebp
movl %r8d, %ecx
shll %cl, %ebp
incl %r11d
movl %r11d, 0x58(%rdi)
movl $0x20, 0x5c(%rdi)
movl $0x20, %edx
testl %r8d, %r8d
je 0x109b1
subl %r8d, %edx
movl %edx, 0x5c(%rdi)
movl %r11d, %ecx
movl (%rbx,%rcx,4), %r14d
movl %edx, %ecx
shrl %cl, %r14d
negb %r8b
movl %r8d, %ecx
shll %cl, %r14d
shrl %cl, %r14d
orl %r14d, %ebp
cmpl %esi, %ebp
ja 0x109bf
incl %eax
cmpl %eax, %r9d
jne 0x10950
movl %r9d, %eax
popq %rbx
popq %r14
popq %rbp
retq