LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x28, %rsp
movq %rdi, %r14
movq %rcx, 0x18(%rsp)
leal 0x1(%rcx), %r13d
movl 0x48(%rdi), %ebp
decl %ebp
movl %edx, 0xc(%rsp)
movl %edx, %edx
cmpl %ebp, %r13d
movq %rdx, 0x20(%rsp)
jae 0xe18b
movq 0x28(%r14), %rax
movl %esi, %ecx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x14(%rsp)
movl (%rax,%rdx,4), %eax
movl %eax, 0x10(%rsp)
movl %r13d, %r12d
movq %r14, %rdi
movl %esi, %r15d
movl %r13d, %edx
callq 0xe396
movl %eax, %ebx
addl 0x14(%rsp), %ebx
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %r13d, %edx
callq 0xe396
addl 0x10(%rsp), %eax
cmpl %eax, %ebx
jae 0xe172
leal 0x1(%r13), %r12d
movl %ebp, %eax
subl %r12d, %eax
shrl %eax
addl %r13d, %eax
incl %eax
movq 0x18(%rsp), %rcx
subl %ecx, %r13d
leal (%rcx,%r13,2), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
jmp 0xe180
movl %r13d, %ebp
movl %r13d, %eax
subl %r12d, %eax
shrl %eax
addl %r12d, %eax
movl %eax, %r13d
cmpl %ebp, %r12d
movl %r15d, %esi
jb 0xe124
movq 0x28(%r14), %r15
movq 0x18(%rsp), %rsi
movl %esi, %eax
movl (%r15,%rax,4), %r12d
movq %r14, %rdi
movl %ebp, %edx
callq 0xe396
movl %eax, %ebx
addl %r12d, %ebx
movq 0x20(%rsp), %rax
movl (%r15,%rax,4), %r15d
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebp, %edx
callq 0xe396
addl %r15d, %eax
cmpl %eax, %ebx
setb %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/sampler.cpp
// Function: CSA::WeightedSampler::isAsGood(unsigned int, unsigned int)
bool
WeightedSampler::isAsGood(uint a, uint b)
{
  sum_type a_val = this->path_weights[a], b_val = this->path_weights[b];

  if(this->use_psi)
  {
    a_val += this->getDistance(b, a) * this->edge_totals[b];
    b_val += this->edge_weights[a] - this->edge_weights[b];
    b_val += this->getDistance(a, this->nodes - 1) * (this->edge_totals[a] - this->edge_totals[b]);
  }
  else
  {
    a_val += this->getDistance(b, a) * this->edge_totals[this->nodes - 1];
    b_val += this->edge_weights[b] - this->edge_weights[a];
  }

  return (a_val <= b_val);
}

// Assembly:
pushq %r14
pushq %rbx
movq 0x28(%rdi), %rcx
movl %esi, %r8d
movl (%rcx,%r8,4), %eax
movl %edx, %r10d
movl (%rcx,%r10,4), %ecx
movq 0x50(%rdi), %rbx
movl (%rbx,%r8,4), %edx
movl (%rbx,%r10,4), %esi
movq 0x40(%rdi), %r11
cmpb $0x1, 0x1c(%rdi)
jne 0xe22d
movl (%r11,%r10,4), %r9d
movq 0x38(%rdi), %r14
movl 0x48(%rdi), %edi
decl %edi
movl (%rbx,%rdi,4), %edi
subl %edx, %edi
movl (%r11,%r8,4), %r11d
subl %r9d, %r11d
addl (%r14,%r8,4), %ecx
imull %edi, %r11d
subl (%r14,%r10,4), %ecx
addl %r11d, %ecx
jmp 0xe244
movl 0x48(%rdi), %r9d
decl %r9d
movl (%r11,%r9,4), %r9d
movq 0x38(%rdi), %rdi
addl (%rdi,%r10,4), %ecx
subl (%rdi,%r8,4), %ecx
subl %esi, %edx
imull %r9d, %edx
addl %eax, %edx
cmpl %ecx, %edx
setbe %al
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x38, %rsp
movl %ecx, 0x4(%rsp)
negl %ecx
movl %ecx, (%rsp)
movq 0x10(%rsi), %rbp
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %rbp
je 0xe353
movq 0x20(%rsi), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsi), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rdi), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rdi), %rax
movq %rax, 0x20(%rsp)
movl %edx, %eax
movq %rax, 0x18(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl (%rbp), %r15d
movq 0x28(%rsp), %rax
movl (%rax,%r15,4), %ebx
movq %rdi, %r13
movl %r15d, %esi
movl %edx, %r14d
callq 0xe396
addl %ebx, %eax
cmpl %r12d, %eax
ja 0xe34d
movl %r14d, %edx
movq %r13, %rdi
jb 0xe300
cmpb $0x0, 0x4(%rsp)
je 0xe2f6
movl 0x4(%rbp), %ecx
incl %ecx
cmpl (%rsp), %ecx
jb 0xe300
cmpb $0x0, 0x4(%rsp)
jne 0xe319
movl 0x4(%rbp), %ecx
incl %ecx
cmpl (%rsp), %ecx
jbe 0xe319
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rsi
movl %r15d, (%rcx,%rsi,4)
movl 0x4(%rbp), %ecx
incl %ecx
movl %ecx, (%rsp)
movl %eax, %r12d
addq $0x8, %rbp
cmpq 0x10(%rsp), %rbp
jne 0xe342
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rbp
addq $0x8, %rax
movq %rax, 0x8(%rsp)
leaq 0x200(%rbp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x30(%rsp), %rbp
jne 0xe2b4
shlq $0x20, %r12
jmp 0xe35d
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movl (%rsp), %eax
orq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xe3b8
movl %edx, %edi
movl %esi, %edx
movq %rdx, %rsi
movq %rdi, %rax
jmp 0xe3c2
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_O1/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 0xe6a6
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
ucomisd 0x8a66(%rip), %xmm0     # 0x17008
ja 0xe699
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0xe699
movq %rdi, %rbx
cmpl $0x1, 0xc(%rdi)
jne 0xe699
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 0xe608
leaq (%rax,%r14,8), %rcx
movq %rax, %rdx
movq $0x0, (%rdx)
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0xe5f8
movq %rax, 0x10(%rbx)
movsd 0x8(%rsp), %xmm3
ucomisd 0x89ee(%rip), %xmm3     # 0x17008
movl %r12d, %ecx
jne 0xe621
jnp 0xe650
movl %r12d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movl %r15d, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
movsd 0x89c9(%rip), %xmm2     # 0x17008
subsd %xmm3, %xmm2
divsd %xmm2, %xmm1
minsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movl %ecx, 0x28(%rbx)
testl %r12d, %r12d
je 0xe66f
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 0xe65d
movl %edx, 0x18(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe6d4
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xe688
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_O1/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 0xe6d3
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 0xe6be
movl %ecx, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl %esi, 0x18(%rdi)
jae 0xe76e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x8(%rdi), %eax
testq %rax, %rax
je 0xe71d
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 0xaa83
movq %r15, %rdi
movq %r12, %rsi
callq 0xab32
movl 0x18(%r14), %esi
cmpl %ebx, %esi
jae 0xe763
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 0xe75d
cmpl $0x0, (%r8,%rdi,8)
je 0xe763
movl %esi, %eax
movl %ecx, 0x4(%r10,%rax,8)
incl %esi
movl %esi, 0x18(%r14)
decl %edi
cmpl %ebx, %esi
jb 0xe737
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
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 0xf00a
movq 0xfff4(%rip), %rbx      # 0x1eff0
leaq 0x87c6(%rip), %rsi      # 0x177c9
movl $0x39, %edx
jmp 0xf042
movl 0x2c(%rbx), %eax
movl %edx, %edi
xorl %r8d, %r8d
cmpb $0x0, (%rsi,%r8)
jne 0xf01e
incl %eax
movl %eax, 0x2c(%rbx)
incq %r8
cmpq %r8, %rdi
jne 0xf012
leal -0x1(%rdx), %eax
cmpb $0x0, (%rsi,%rax)
je 0xf076
movq 0xffba(%rip), %rbx      # 0x1eff0
leaq 0x87c6(%rip), %rsi      # 0x17803
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
popq %rbx
popq %r14
popq %r15
jmp 0x3190
movl 0x2c(%rbx), %eax
movq %rsi, %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x157ee
movq %rax, %r14
movl 0x28(%rbx), %r15d
leaq (,%r15,4), %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testq %r15, %r15
je 0xf0b3
xorl %ecx, %ecx
movl (%r14,%rcx,8), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r15
jne 0xf0a4
testq %r14, %r14
je 0xf0c0
movq %r14, %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)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %ecx, %r15d
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 %cl
orb %al, %cl
testl %r15d, %r15d
sete %al
orb %cl, %al
je 0xf133
movq 0xfecb(%rip), %rbx      # 0x1eff0
leaq 0x869d(%rip), %rsi      # 0x177c9
movl $0x39, %edx
jmp 0xf171
movq %rdx, %r14
movq %rdi, %rbx
movl 0x2c(%rdi), %eax
movl %r15d, %ebp
xorl %ecx, %ecx
cmpb $0x0, (%rsi,%rcx)
jne 0xf14c
incl %eax
movl %eax, 0x2c(%rbx)
incq %rcx
cmpq %rcx, %rbp
jne 0xf141
leal -0x1(%r15), %eax
cmpb $0x0, (%rsi,%rax)
je 0xf1ae
movq 0xfe8b(%rip), %rbx      # 0x1eff0
leaq 0x8697(%rip), %rsi      # 0x17803
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 (,%rbp,8), %r13
movq %r13, %rdi
callq 0x3030
movq %rax, %r12
testl %r15d, %r15d
je 0xf1d3
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3150
testl %r15d, %r15d
je 0xf1ef
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
movl %ecx, (%r12,%rax,8)
movl %eax, 0x4(%r12,%rax,8)
incq %rax
cmpq %rax, %rbp
jne 0xf1da
leaq (%r12,%rbp,8), %rsi
movq %r12, %rdi
callq 0xc667
movl 0x28(%rbx), %r14d
leaq (,%r14,4), %rdi
callq 0x3030
movq %rax, 0x10(%rbx)
testq %r14, %r14
je 0xf227
xorl %ecx, %ecx
movl 0x4(%r12,%rcx,8), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0xf217
movq %r12, %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
// File: /workspace/github_cpp_makefile_star2_O1/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 0xf266
callq 0x3300
movq $0x0, 0x8(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xf27c
callq 0x3300
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xf291
callq 0x3300
movq $0x0, 0x20(%rbx)
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xf790
movq %rdi, %r14
movl 0x28(%rdi), %eax
subl 0x2c(%rdi), %eax
cmpl %r15d, %eax
jbe 0xf790
movl %r15d, %eax
subl %ebx, %eax
leaq 0x4(,%rax,4), %rax
movabsq $0x3fffffffc, %rdi      # imm = 0x3FFFFFFFC
andq %rax, %rdi
callq 0x3030
cmpl %r15d, %ebx
ja 0xf792
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 0xf77a
jmp 0xf792
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::getLCPArray(bool) const
uint*
SuffixArray::getLCPArray(bool getPLCP) const
{
  if(!(this->isOk())) { return 0; }

  uint* plcp = new uint[this->data_size];
  for(uint i = 0; i < this->data_size; i++) { plcp[i] = this->data_size; }

  // Fill in the irreducible PLCP values.
  for(uint i = 0; i < this->sequences; i++)
  {
    plcp[this->original_sa[i]] = 0;
  }
  for(uint i = this->sequences; i < this->data_size; i++)
  {
    uint j = this->original_sa[i - 1], k = this->original_sa[i];
    if(j == 0 || k == 0 || this->data[j - 1] != this->data[k - 1] || this->data[j - 1] == 0)
    {
      uint temp = 0;
      while(this->data[j + temp] == this->data[k + temp] && this->data[j + temp] != 0) { temp++; }
      plcp[k] = temp;
    }
  }

  // Fill in the rest of the values.
  for(uint i = 1; i < this->data_size; i++)
  {
    if(plcp[i] >= this->data_size) { plcp[i] = plcp[i - 1] - 1; }
  }
  if(getPLCP) { return plcp; }

  // Convert to LCP array.
  uint* lcp = new uint[this->getSize()];
  for(uint i = 0; i < this->getSize(); i++)
  {
    lcp[i] = plcp[this->sa[i]];
  }
  delete[] plcp;

  return lcp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, (%rdi)
jne 0xf8ba
movl %esi, %ebp
movq %rdi, %r14
movl 0x28(%rdi), %r12d
leaq (,%r12,4), %rdi
callq 0x3030
movq %rax, %rbx
testq %r12, %r12
je 0xf7f6
xorl %eax, %eax
movl %r12d, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0xf7ea
movl 0x2c(%r14), %r13d
testq %r13, %r13
je 0xf817
movq 0x18(%r14), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl $0x0, (%rbx,%rdx,4)
incq %rcx
cmpq %rcx, %r13
jne 0xf805
cmpl %r13d, %r12d
jbe 0xf88e
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movq %r13, %rdx
leal -0x1(%rdx), %esi
movl (%rcx,%rsi,4), %edi
movl (%rcx,%rdx,4), %r8d
movl %r8d, %esi
testl %edi, %edi
sete %r9b
testl %r8d, %r8d
sete %r8b
orb %r9b, %r8b
je 0xf86f
xorl %r8d, %r8d
leal (%rdi,%r8), %r9d
movb (%rax,%r9), %r10b
leal 0x1(%r8), %r9d
testb %r10b, %r10b
je 0xf866
addl %esi, %r8d
cmpb (%rax,%r8), %r10b
movl %r9d, %r8d
je 0xf849
decl %r9d
movl %r9d, (%rbx,%rsi,4)
jmp 0xf886
leal -0x1(%rdi), %r8d
movb (%rax,%r8), %r8b
testb %r8b, %r8b
je 0xf846
leal -0x1(%rsi), %r9d
cmpb (%rax,%r9), %r8b
jne 0xf846
incq %rdx
cmpq %r12, %rdx
jne 0xf827
cmpl $0x2, %r12d
jb 0xf8b0
movl $0x1, %eax
cmpl %r12d, (%rbx,%rax,4)
jb 0xf8a8
movl -0x4(%rbx,%rax,4), %ecx
decl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r12
jne 0xf899
testb %bpl, %bpl
je 0xf8bf
movq %rbx, %r15
jmp 0xf8f9
xorl %r15d, %r15d
jmp 0xf8f9
movl %r12d, %edi
subl %r13d, %edi
shlq $0x2, %rdi
callq 0x3030
movq %rax, %r15
subl %r13d, %r12d
je 0xf8f1
movq 0x10(%r14), %rax
movl %r12d, %ecx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl (%rbx,%rsi,4), %esi
movl %esi, (%r15,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xf8df
movq %rbx, %rdi
callq 0x3300
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10f0c
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 0x10e0a
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xfc34
jmp 0xfc1c
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/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 0xff65
leaq 0x20(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0xff65
leaq 0x1c(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0xff65
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 0xff65
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movq 0x10(%rbx), %rsi
movl 0x1c(%rbx), %edx
movq %rax, %rdi
callq 0x10f0c
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 0x10e84
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xfc34
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xff70
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10263
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x10263
callq 0x3300
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x10281
movq %r14, %rdi
callq 0x10f96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x1029f
movq %r14, %rdi
callq 0x10f96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x102c4
movq %rbx, %rdi
callq 0x10f96
movl $0x28, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3270
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::writeTo(std::basic_ofstream<char, std::char_traits<char>>&) const
void
Array::writeTo(std::ofstream& file) const
{
  file.write((char*)&(this->items), sizeof(this->items));
  file.write((char*)&(this->number_of_blocks), sizeof(this->number_of_blocks));
  file.write((char*)&(this->block_size), sizeof(this->block_size));
  file.write((char*)(this->array), this->block_size * this->number_of_blocks * sizeof(usint));
  this->samples->writeBuffer(file);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x3310
leaq 0x20(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3310
leaq 0x1c(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3310
movq 0x10(%r14), %rsi
movl 0x20(%r14), %edx
imull 0x1c(%r14), %edx
shlq $0x2, %rdx
movq %rbx, %rdi
callq 0x3310
movq 0x28(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10fb0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x103ac
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 0x10fc6
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11028
movl 0x1c(%rbx), %ecx
imull 0x20(%rbx), %ecx
leal (%rax,%rcx,4), %ebp
movq 0x28(%rbx), %rdi
callq 0x11028
movl %eax, %r14d
addl %ebp, %r14d
movq 0x38(%rbx), %rdi
callq 0x11028
addl %r14d, %eax
addl $0x48, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1059e
movl %esi, %ebx
movq %rdi, %r14
callq 0x105ac
movq %r14, %rdi
movl %eax, %esi
callq 0x10b0a
movl 0xc(%r14), %esi
movl 0x10(%r14), %edi
leal (%rdi,%rsi), %eax
cmpl %ebx, %eax
ja 0x1059e
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 0x104af
movl %ecx, %eax
jmp 0x104c3
incl %r9d
movl %r9d, 0x30(%r14)
movl $0x20, 0x34(%r14)
movl $0x20, %eax
incl %edx
btl %ecx, %r10d
jae 0x1049a
movl $0x1, %r11d
movl %edx, %ecx
shll %cl, %r11d
xorl %r10d, %r10d
cmpl %edx, %eax
ja 0x10509
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 0x10529
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 0x1053d
movl %r10d, %edx
jmp 0x10561
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 0x10584
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 0x10495
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_O1/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 %r15
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 0x105f0
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x10604
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 0x1062b
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, %edx
imull %ecx, %edx
movl %edx, %r8d
shrl $0x5, %r8d
movl %r8d, 0x58(%rdi)
andl $0x1f, %edx
movl $0x20, %r8d
subl %edx, %r8d
movl %r8d, 0x5c(%rdi)
movl %ecx, 0x60(%rdi)
cmpl %r9d, %eax
jae 0x106e1
movl 0x58(%rdi), %r11d
movl 0x5c(%rdi), %edx
movl 0x60(%rdi), %ebx
movq 0x40(%rdi), %r14
incl %ebx
movl %ebx, 0x60(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x10684
movl %r10d, %r8d
jmp 0x106ab
movl %r11d, %ecx
movl (%r14,%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 0x106d1
subl %r8d, %edx
movl %edx, 0x5c(%rdi)
movl %r11d, %ecx
movl (%r14,%rcx,4), %r15d
movl %edx, %ecx
shrl %cl, %r15d
negb %r8b
movl %r8d, %ecx
shll %cl, %r15d
shrl %cl, %r15d
orl %r15d, %ebp
cmpl %esi, %ebp
ja 0x106e1
incl %eax
incl %ebx
cmpl %eax, %r9d
jne 0x10672
movl %r9d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Iterator::nextItem()
usint
Array::Iterator::nextItem()
{
  if(this->cur >= this->block_items)
  {
    this->getSample(this->block + 1);
  }

  this->cur++;
  return this->buffer.readDeltaCode();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl 0x14(%rdi), %eax
jb 0x10701
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x10b0a
incl 0x10(%rbx)
movq 0x18(%rbx), %rdi
movl 0x34(%rbx), %edx
movl 0x30(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
decl %edx
movl %edx, 0x34(%rbx)
movl %ecx, %esi
movl (%rdi,%rsi,4), %esi
je 0x10724
movl %edx, %r8d
jmp 0x10736
incl %ecx
movl %ecx, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
movl $0x20, %r8d
incl %eax
btl %edx, %esi
movl %r8d, %edx
jae 0x10713
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
movl 0x34(%rbx), %ecx
xorl %r8d, %r8d
cmpl %eax, %ecx
ja 0x10776
subl %ecx, %eax
movl 0x30(%rbx), %esi
movl (%rdi,%rsi,4), %r8d
negb %cl
shll %cl, %r8d
shrl %cl, %r8d
movl %eax, %ecx
shll %cl, %r8d
leal 0x1(%rsi), %ecx
movl %ecx, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
testl %eax, %eax
je 0x10795
movl 0x30(%rbx), %esi
movl 0x34(%rbx), %ecx
subl %eax, %ecx
movl %ecx, 0x34(%rbx)
movl (%rdi,%rsi,4), %esi
shrl %cl, %esi
negb %al
movl %eax, %ecx
shll %cl, %esi
shrl %cl, %esi
orl %esi, %r8d
orl %edx, %r8d
decl %r8d
movl 0x34(%rbx), %ecx
xorl %eax, %eax
movl %r8d, %esi
movl %r8d, %edx
subl %ecx, %esi
jb 0x107c9
movl 0x30(%rbx), %edx
movl (%rdi,%rdx,4), %eax
negb %cl
shll %cl, %eax
shrl %cl, %eax
movl %esi, %ecx
shll %cl, %eax
leal 0x1(%rdx), %ecx
movl %ecx, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
movl %esi, %edx
testl %edx, %edx
je 0x107e7
movl 0x30(%rbx), %esi
movl 0x34(%rbx), %ecx
subl %edx, %ecx
movl %ecx, 0x34(%rbx)
movl (%rdi,%rsi,4), %esi
shrl %cl, %esi
negb %dl
movl %edx, %ecx
shll %cl, %esi
shrl %cl, %esi
orl %esi, %eax
btsl %r8d, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::ArrayEncoder::ArrayEncoder(unsigned int, unsigned int)
ArrayEncoder::ArrayEncoder(usint block_bytes, usint superblock_size) :
  items(0), blocks(1),
  block_size(BYTES_TO_WORDS(block_bytes)),
  superblock_bytes(superblock_size)
{
  this->array = new usint[this->superblock_bytes / sizeof(usint)];
  memset(this->array, 0, this->superblock_bytes);
  this->blocks_in_superblock = this->superblock_bytes / (sizeof(usint) * this->block_size);
  this->current_blocks = 1;

  this->samples = new usint[this->superblock_bytes / sizeof(usint)];
  this->samples_in_superblock = this->superblock_bytes / sizeof(usint);
  this->current_samples = 1;
  this->samples[0] = 0;

  this->buffer = new WriteBuffer(this->array, this->block_size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, (%rdi)
movl %esi, %r14d
addq $0x3, %r14
movq %r14, %rax
shrq $0x2, %rax
movq %rax, 0x10(%rsp)
movl %eax, 0x8(%rdi)
movl %edx, 0xc(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x20(%rdi)
movq %rax, 0x8(%rsp)
movq %rax, 0x18(%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x48(%rdi)
movq %rcx, (%rsp)
movq %rcx, 0x40(%rdi)
movq %rax, 0x50(%rdi)
movl %edx, %r12d
andl $-0x4, %r12d
movq %r12, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, 0x30(%rbx)
movl %ebp, %r13d
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3150
andq $-0x4, %r14
movq %r13, %rax
xorl %edx, %edx
divq %r14
movl %eax, 0x38(%rbx)
movl $0x1, 0x3c(%rbx)
movq %r12, %rdi
callq 0x3030
movq %rax, 0x58(%rbx)
shrl $0x2, %ebp
movl %ebp, 0x60(%rbx)
movl $0x1, 0x64(%rbx)
movl $0x0, (%rax)
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
callq 0x110ea
movq %r12, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x3270
jmp 0x108f2
movq %rax, %rbx
movq (%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x10913
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x108fe
movq 0x8(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x10935
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x10920
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::ArrayEncoder::~ArrayEncoder()
ArrayEncoder::~ArrayEncoder()
{
  delete[] this->array;

  delete this->buffer;
  for(std::list<usint*>::iterator iter = this->array_blocks.begin(); iter != this->array_blocks.end(); iter++)
  {
    delete[] *iter;
  }

  delete[] this->samples;
  for(std::list<usint*>::iterator iter = this->sample_blocks.begin(); iter != this->sample_blocks.end(); iter++)
  {
    delete[] *iter;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x10954
callq 0x3300
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x10972
movq %r14, %rdi
callq 0x11142
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
leaq 0x18(%rbx), %r14
movq 0x18(%rbx), %r15
cmpq %r14, %r15
je 0x10992
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x1098d
callq 0x3300
movq (%r15), %r15
jmp 0x1097a
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x109a0
callq 0x3300
movq 0x40(%rbx), %r15
addq $0x40, %rbx
cmpq %rbx, %r15
je 0x109c0
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x109bb
callq 0x3300
movq (%r15), %r15
jmp 0x109a8
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x109dd
movq (%rdi), %r15
movl $0x18, %esi
callq 0x3270
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x109c8
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x109fa
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x3270
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x109e5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::ArrayEncoder::writeItem(unsigned int)
void
ArrayEncoder::writeItem(usint value)
{
  this->items++;
  if(this->buffer->writeDeltaCode(value)) { return; }

  // Didn't fit into the block. A new block & sample required.
  this->blocks++;
  this->current_blocks++;
  this->current_samples++;

  // Do we need a new superblock for the block?
  if(this->current_blocks > this->blocks_in_superblock)
  {
    this->array_blocks.push_back(this->array);
    this->array = new usint[this->superblock_bytes / sizeof(usint)];
    memset(this->array, 0, this->superblock_bytes);
    this->current_blocks = 1;
  }
  this->buffer->moveBuffer(this->array + (this->block_size * (this->current_blocks - 1)));

  // Do we need a new superblock for the sample?
  if(this->current_samples > this->samples_in_superblock)
  {
    this->sample_blocks.push_back(this->samples);
    this->samples = new usint[this->superblock_bytes / sizeof(usint)];
    this->current_samples = 1;
  }
  this->samples[this->current_samples - 1] = this->items - 1;

  // Finally, write the item.
  this->buffer->writeDeltaCode(value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
incl (%rdi)
movq 0x10(%rdi), %rdi
callq 0x10c1e
testb %al, %al
je 0x10a1f
popq %rbx
popq %r14
popq %r15
retq
incl 0x4(%r14)
movl 0x3c(%r14), %eax
incl %eax
movl %eax, 0x3c(%r14)
incl 0x64(%r14)
cmpl 0x38(%r14), %eax
jbe 0x10a84
leaq 0x18(%r14), %r15
movl $0x18, %edi
callq 0x3260
movq 0x30(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0x28(%r14)
movl 0xc(%r14), %r15d
movl %r15d, %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x30(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3150
movl $0x1, 0x3c(%r14)
movl 0x3c(%r14), %esi
decl %esi
imull 0x8(%r14), %esi
movq 0x10(%r14), %rdi
shlq $0x2, %rsi
addq 0x30(%r14), %rsi
callq 0x11200
movl 0x64(%r14), %eax
cmpl 0x60(%r14), %eax
jbe 0x10ae7
leaq 0x40(%r14), %r15
movl $0x18, %edi
callq 0x3260
movq 0x58(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0x50(%r14)
movl 0xc(%r14), %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x58(%r14)
movl $0x1, 0x64(%r14)
movl (%r14), %eax
decl %eax
movq 0x58(%r14), %rcx
movl 0x64(%r14), %edx
decl %edx
movl %eax, (%rcx,%rdx,4)
movq 0x10(%r14), %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x10c1e
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/array.h
// Function: CSA::Array::Iterator::getSample(unsigned int)
inline void getSample(usint sample_number)
        {
          this->block = sample_number;
          this->sample = this->samples.readItem(sample_number);
          this->cur = 0;
          this->block_items = this->samples.readItem() - this->sample;
          this->buffer.moveBuffer(this->parent.array + (this->block * this->parent.block_size));
        }

// Assembly:
movl %esi, 0x8(%rdi)
movl 0x4c(%rdi), %eax
movl %eax, %ecx
imull %esi, %ecx
movl %ecx, %r10d
shrl $0x5, %r10d
movl %r10d, 0x58(%rdi)
andl $0x1f, %ecx
movl $0x20, %r11d
subl %ecx, %r11d
movl %r11d, 0x5c(%rdi)
leal 0x1(%rsi), %edx
movl %edx, 0x60(%rdi)
xorl %r9d, %r9d
movl %eax, %r8d
movl %eax, %edx
subl %r11d, %r8d
jb 0x10b6b
movq 0x40(%rdi), %rdx
movl %r10d, %r9d
movl (%rdx,%r9,4), %r9d
shll %cl, %r9d
shrl %cl, %r9d
movl %r8d, %ecx
shll %cl, %r9d
incl %r10d
movl %r10d, 0x58(%rdi)
movl $0x20, 0x5c(%rdi)
movl %r8d, %edx
testl %edx, %edx
je 0x10b93
movl 0x5c(%rdi), %ecx
subl %edx, %ecx
movl %ecx, 0x5c(%rdi)
movq 0x40(%rdi), %r8
movl 0x58(%rdi), %r10d
movl (%r8,%r10,4), %r8d
shrl %cl, %r8d
negb %dl
movl %edx, %ecx
shll %cl, %r8d
shrl %cl, %r8d
orl %r8d, %r9d
movl %r9d, 0xc(%rdi)
movl $0x0, 0x10(%rdi)
leal 0x2(%rsi), %ecx
movl %ecx, 0x60(%rdi)
movl 0x5c(%rdi), %ecx
xorl %r8d, %r8d
movl %eax, %edx
subl %ecx, %edx
jb 0x10bd9
movq 0x40(%rdi), %rax
movl 0x58(%rdi), %r10d
movl (%rax,%r10,4), %r8d
negb %cl
shll %cl, %r8d
shrl %cl, %r8d
movl %edx, %ecx
shll %cl, %r8d
leal 0x1(%r10), %eax
movl %eax, 0x58(%rdi)
movl $0x20, 0x5c(%rdi)
movl %edx, %eax
testl %eax, %eax
je 0x10bfe
movl 0x5c(%rdi), %ecx
subl %eax, %ecx
movl %ecx, 0x5c(%rdi)
movq 0x40(%rdi), %rdx
movl 0x58(%rdi), %r10d
movl (%rdx,%r10,4), %edx
shrl %cl, %edx
negb %al
movl %eax, %ecx
shll %cl, %edx
shrl %cl, %edx
orl %edx, %r8d
subl %r9d, %r8d
movl %r8d, 0x14(%rdi)
movq (%rdi), %rax
addq $0x18, %rdi
imull 0x1c(%rax), %esi
shlq $0x2, %rsi
addq 0x10(%rax), %rsi
jmp 0x10fe6
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::ReadBuffer(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int)
ReadBuffer::ReadBuffer(std::ifstream& file, usint words) :
  size(words),
  item_bits(1),
  items(0),
  free_buffer(true)
{
  usint* buffer = new usint[this->size];
  memset(buffer, 0, this->size * sizeof(usint));
  file.read((char*)buffer, this->size * sizeof(usint));
  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, 0x8(%rdi)
movq $0x1, 0xc(%rdi)
movb $0x1, 0x14(%rdi)
movl %edx, %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x3030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3150
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x32e0
movq %r12, (%r14)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%r14)
movl $0x0, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::ReadBuffer(_IO_FILE*, unsigned int)
ReadBuffer::ReadBuffer(FILE* file, usint words) :
  size(words),
  item_bits(1),
  items(0),
  free_buffer(true)
{
  usint* buffer = new usint[this->size];
  memset(buffer, 0, this->size * sizeof(usint));
  if(file != 0)
  {
    if(!std::fread(buffer, this->size * sizeof(usint), 1, file)) { return; }
  }
  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x8(%rdi)
movq $0x1, 0xc(%rdi)
movb $0x1, 0x14(%rdi)
movl %edx, %r12d
shlq $0x2, %r12
movq %r12, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3150
testq %r14, %r14
je 0x10de5
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x10dfd
movq %r15, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::ReadBuffer(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int, unsigned int)
ReadBuffer::ReadBuffer(std::ifstream& file, usint _items, usint item_size) :
  item_bits(item_size),
  items(_items),
  free_buffer(true)
{
  this->size = bitsToWords(this->items * this->item_bits);
  usint* buffer = new usint[this->size];
  memset(buffer, 0, this->size * sizeof(usint));
  file.read((char*)buffer, this->size * sizeof(usint));
  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, 0xc(%rdi)
movl %edx, 0x10(%rdi)
movb $0x1, 0x14(%rdi)
imull %ecx, %r14d
addl $0x1f, %r14d
shrl $0x5, %r14d
movl %r14d, 0x8(%rdi)
shll $0x2, %r14d
movq %r14, %rdi
callq 0x3030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3150
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x32e0
movq %r12, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop