LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3130
testq %r14, %r14
je 0xe62b
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x3330
testq %rax, %rax
je 0xe640
movq %r15, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3130
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3290
movq %r12, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::ReadBuffer(_IO_FILE*, unsigned int, unsigned int)
ReadBuffer::ReadBuffer(FILE* 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));
  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
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, 0xc(%rdi)
movl %edx, 0x10(%rdi)
movb $0x1, 0x14(%rdi)
imull %edx, %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 0x3130
testq %r15, %r15
je 0xe724
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x3330
testq %rax, %rax
je 0xe739
movq %r12, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::moveBuffer(unsigned int const*)
void
ReadBuffer::moveBuffer(const usint* buffer)
{
  if(this->free_buffer)
  {
    delete[] this->data;
  }
  this->free_buffer = false;

  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x14(%rdi)
jne 0xe82f
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xe82f
callq 0x32b0
movb $0x0, 0x14(%rbx)
movq %r14, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::WriteBuffer::WriteBuffer(unsigned int, unsigned int)
WriteBuffer::WriteBuffer(usint _items, usint item_size) :
  item_bits(item_size),
  items(_items),
  free_buffer(true)
{
  this->size = bitsToWords(this->items * this->item_bits);
  this->data = new usint[this->size];
  memset(this->data, 0, this->size * sizeof(usint));
  this->reset();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %edx, 0xc(%rdi)
movl %esi, 0x10(%rdi)
movb $0x1, 0x14(%rdi)
imull %esi, %ebx
addl $0x1f, %ebx
shrl $0x5, %ebx
movl %ebx, 0x8(%rdi)
shll $0x2, %ebx
movq %rbx, %rdi
callq 0x3030
movq %rax, (%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3130
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%r14)
andl $0x0, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::WriteBuffer::getReadBuffer()
ReadBuffer*
WriteBuffer::getReadBuffer()
{
  ReadBuffer* buffer;
  if(this->items > 0)
  {
    buffer = new ReadBuffer(this->data, this->items, this->item_bits);
  }
  else
  {
    buffer = new ReadBuffer(this->data, this->size);
  }

  if(this->free_buffer)
  {
    buffer->claimData();
    this->free_buffer = false;
  }

  return buffer;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %ebp
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r14
movq (%rbx), %rsi
testl %ebp, %ebp
je 0xe99d
movl 0xc(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %edx
callq 0xe76c
jmp 0xe9c7
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
movq $0x1, 0xc(%r14)
movb $0x0, 0x14(%r14)
movq %rsi, (%r14)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%r14)
andl $0x0, 0x20(%r14)
cmpb $0x1, 0x14(%rbx)
jne 0xe9d6
movb $0x1, 0x14(%r14)
movb $0x0, 0x14(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::WriteBuffer::moveBuffer(unsigned int*)
void
WriteBuffer::moveBuffer(usint* buffer)
{
  if(this->free_buffer)
  {
    delete[] this->data;
  }
  this->free_buffer = false;

  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x14(%rdi)
jne 0xea2f
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xea2f
callq 0x32b0
movb $0x0, 0x14(%rbx)
movq %r14, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::BitVector(std::basic_ifstream<char, std::char_traits<char>>&)
BitVector::BitVector(std::ifstream& file) :
  rank_index(0), select_index(0)
{
  this->readHeader(file);
  this->readArray(file);

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

  this->indexForRank();
  this->indexForSelect();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x28(%rdi)
movq %rsi, %r14
andq $0x0, 0x38(%rdi)
callq 0xeaf2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xeb44
movl (%rbx), %edi
callq 0xab34
movl %eax, %ebp
movl %eax, 0x20(%rbx)
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r15
movl 0x14(%rbx), %eax
leal 0x2(,%rax,2), %edx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0xe64c
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0xeb88
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xeca8
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::readHeader(std::basic_ifstream<char, std::char_traits<char>>&)
void
BitVector::readHeader(std::ifstream& file)
{
  file.read((char*)&(this->size), sizeof(this->size));
  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));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3290
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3290
leaq 0x14(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3290
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x3290
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::indexForRank()
void
BitVector::indexForRank()
{
  delete this->rank_index;

  usint value_samples = (this->number_of_blocks + BitVector::INDEX_RATE - 1) / BitVector::INDEX_RATE;
  this->rank_rate = (this->size + value_samples - 1) / value_samples;
  value_samples = (this->size + this->rank_rate - 1) / this->rank_rate + 1;
  WriteBuffer index_buffer(value_samples, length(this->number_of_blocks - 1));

  // current is value, pointer is sample number.
  usint current = 0, pointer = 0;
  this->samples->goToItem(2);
  while(this->samples->hasNextItem())
  {
    this->samples->skipItem();
    usint limit = this->samples->readItem();  // Next sampled value.
    while(current < limit)
    {
      index_buffer.writeItem(pointer);
      current += this->rank_rate;
    }
    pointer++;
  }
  index_buffer.writeItem(this->number_of_blocks - 1);

  this->rank_index = index_buffer.getReadBuffer();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0xeba8
movq %r14, %rdi
callq 0xe7c4
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3230
movl (%rbx), %esi
movl 0x14(%rbx), %edi
leal 0x4(%rdi), %eax
xorl %ebp, %ebp
pushq $0x5
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
leal (%rsi,%rcx), %eax
decl %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movl %eax, 0x30(%rbx)
leal (%rsi,%rcx), %eax
decl %eax
xorl %edx, %edx
divl %ecx
leal 0x1(%rax), %r15d
decl %edi
callq 0xab34
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0xe8b6
movq 0x18(%rbx), %rdi
movl 0xc(%rdi), %eax
addl %eax, %eax
movl %eax, %ecx
shrl $0x5, %ecx
movl %ecx, 0x18(%rdi)
andl $0x1e, %eax
pushq $0x20
popq %rcx
subl %eax, %ecx
movl %ecx, 0x1c(%rdi)
movl $0x2, 0x20(%rdi)
pushq $0x2
popq %rax
xorl %r12d, %r12d
cmpl 0x10(%rdi), %eax
jae 0xec59
callq 0xf87a
movq 0x18(%rbx), %rdi
callq 0xabd0
movl %eax, %r15d
cmpl %r15d, %r12d
jae 0xec4e
movq %r14, %rdi
movl %ebp, %esi
callq 0xab42
addl 0x30(%rbx), %r12d
jmp 0xec39
incl %ebp
movq 0x18(%rbx), %rdi
movl 0x20(%rdi), %eax
jmp 0xec23
movl 0x14(%rbx), %esi
decl %esi
leaq 0x8(%rsp), %rdi
callq 0xab42
leaq 0x8(%rsp), %rdi
callq 0xe972
movq %rax, 0x28(%rbx)
leaq 0x8(%rsp), %rdi
callq 0xe95e
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xec93
jmp 0xec93
jmp 0xec93
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe95e
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::indexForSelect()
void
BitVector::indexForSelect()
{
  delete this->select_index;

  usint index_samples = (this->number_of_blocks + BitVector::INDEX_RATE - 1) / BitVector::INDEX_RATE;
  this->select_rate = (this->items + index_samples - 1) / index_samples;
  index_samples = (this->items + this->select_rate - 1) / this->select_rate + 1;
  WriteBuffer index_buffer(index_samples, length(this->number_of_blocks - 1));

  // current is index, pointer is sample number.
  usint current = 0, pointer = 0;
  this->samples->goToItem(2);
  while(this->samples->hasNextItem())
  {
    usint limit = this->samples->readItem();  // Next sampled index.
    this->samples->skipItem();
    while(current < limit)
    {
      index_buffer.writeItem(pointer);
      current += this->select_rate;
    }
    pointer++;
  }
  index_buffer.writeItem(this->number_of_blocks - 1);

  this->select_index = index_buffer.getReadBuffer();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0xecc8
movq %r14, %rdi
callq 0xe7c4
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3230
movl 0x4(%rbx), %esi
movl 0x14(%rbx), %edi
leal 0x4(%rdi), %eax
xorl %ebp, %ebp
pushq $0x5
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
leal (%rsi,%rcx), %eax
decl %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movl %eax, 0x40(%rbx)
leal (%rsi,%rcx), %eax
decl %eax
xorl %edx, %edx
divl %ecx
leal 0x1(%rax), %r15d
decl %edi
callq 0xab34
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0xe8b6
movq 0x18(%rbx), %rdi
movl 0xc(%rdi), %eax
addl %eax, %eax
movl %eax, %ecx
shrl $0x5, %ecx
movl %ecx, 0x18(%rdi)
andl $0x1e, %eax
pushq $0x20
popq %rcx
subl %eax, %ecx
movl %ecx, 0x1c(%rdi)
movl $0x2, 0x20(%rdi)
pushq $0x2
popq %rax
xorl %r12d, %r12d
cmpl 0x10(%rdi), %eax
jae 0xed7a
callq 0xabd0
movl %eax, %r15d
movq 0x18(%rbx), %rdi
callq 0xf87a
cmpl %r15d, %r12d
jae 0xed6f
movq %r14, %rdi
movl %ebp, %esi
callq 0xab42
addl 0x40(%rbx), %r12d
jmp 0xed5a
incl %ebp
movq 0x18(%rbx), %rdi
movl 0x20(%rdi), %eax
jmp 0xed44
movl 0x14(%rbx), %esi
decl %esi
leaq 0x8(%rsp), %rdi
callq 0xab42
leaq 0x8(%rsp), %rdi
callq 0xe972
movq %rax, 0x38(%rbx)
leaq 0x8(%rsp), %rdi
callq 0xe95e
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xedb2
jmp 0xedb2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe95e
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::BitVector(_IO_FILE*)
BitVector::BitVector(FILE* file) :
  rank_index(0), select_index(0)
{
  this->readHeader(file);
  this->readArray(file);

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

  this->indexForRank();
  this->indexForSelect();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x28(%rdi)
movq %rsi, %r14
andq $0x0, 0x38(%rdi)
callq 0xee52
movq %rbx, %rdi
movq %r14, %rsi
callq 0xeec6
movl (%rbx), %edi
callq 0xab34
movl %eax, %ebp
movl %eax, 0x20(%rbx)
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r15
movl 0x14(%rbx), %eax
leal 0x2(,%rax,2), %edx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0xe6c2
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0xeb88
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xeca8
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::readHeader(_IO_FILE*)
void
BitVector::readHeader(FILE* file)
{
  if(file == 0) { return; }
  if(!std::fread(&(this->size), sizeof(this->size), 1, file)) { return; }
  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; }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xeebe
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3330
testq %rax, %rax
je 0xeebe
leaq 0x4(%r14), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3330
testq %rax, %rax
je 0xeebe
leaq 0x14(%r14), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3330
testq %rax, %rax
je 0xeebe
addq $0x10, %r14
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3330
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::readArray(_IO_FILE*)
void
BitVector::readArray(FILE* file)
{
  if(file == 0) { return; }
  usint* array_buffer = new usint[this->block_size * this->number_of_blocks];
  if(!std::fread(array_buffer, this->block_size * sizeof(usint), this->number_of_blocks, file)) { return; }
  this->array = array_buffer;
}

// Assembly:
testq %rsi, %rsi
je 0xef1c
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x10(%rdi), %r12d
movl 0x14(%rdi), %r13d
movl %r13d, %edi
imull %r12d, %edi
shlq $0x2, %rdi
callq 0x3030
movq %rax, %r15
shlq $0x2, %r12
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x3330
testq %rax, %rax
je 0xef13
movq %r15, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::BitVector(CSA::VectorEncoder&, unsigned int)
BitVector::BitVector(VectorEncoder& encoder, usint universe_size) :
  size(universe_size), items(encoder.items),
  block_size(encoder.block_size),
  number_of_blocks(encoder.blocks),
  rank_index(0), select_index(0)
{
  if(this->items == 0)
  {
    std::cerr << "BitVector: Cannot create a bit vector with no 1-bits!" << std::endl;
    return;
  }
  this->copyArray(encoder);

  this->integer_bits = length(this->size);
  WriteBuffer sample_buffer(2 * (this->number_of_blocks + 1), this->integer_bits);

  // Compress the samples.
  for(std::list<usint*>::iterator iter = encoder.sample_blocks.begin(); iter != encoder.sample_blocks.end(); iter++)
  {
    usint* buf = *iter;
    for(usint i = 0; i < 2 * encoder.samples_in_superblock; i++)
    {
      sample_buffer.writeItem(buf[i]);
    }
  }
  for(usint i = 0; i < 2 * encoder.current_samples; i++)
  {
    sample_buffer.writeItem(encoder.samples[i]);
  }
  sample_buffer.writeItem(this->items);
  sample_buffer.writeItem(this->size);

  this->samples = sample_buffer.getReadBuffer();

  this->indexForRank();
  this->indexForSelect();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, (%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movq 0x8(%rsi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x10(%rdi)
andq $0x0, 0x28(%rdi)
andq $0x0, 0x38(%rdi)
testl %eax, %eax
je 0xf039
movq %rsi, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf07c
movl (%rbx), %edi
callq 0xab34
movl %eax, 0x20(%rbx)
movq %rbx, 0x8(%rsp)
movl 0x14(%rbx), %ecx
leal 0x2(,%rcx,2), %esi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xe8b6
leaq 0x48(%r14), %r12
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0xefbc
movq 0x10(%r13), %rbp
xorl %ebx, %ebx
movl 0x68(%r14), %eax
addl %eax, %eax
cmpq %rax, %rbx
jae 0xef91
movl (%rbp,%rbx,4), %esi
movq %r15, %rdi
callq 0xab42
incq %rbx
jmp 0xefa0
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
movl 0x6c(%r14), %eax
addl %eax, %eax
cmpq %rax, %r12
jae 0xefe4
movq 0x60(%r14), %rax
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0xab42
incq %r12
jmp 0xefc4
movq 0x8(%rsp), %rbx
movl 0x4(%rbx), %esi
leaq 0x10(%rsp), %rdi
callq 0xab42
movl (%rbx), %esi
leaq 0x10(%rsp), %rdi
callq 0xab42
leaq 0x10(%rsp), %rdi
callq 0xe972
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xeb88
movq %rbx, %rdi
callq 0xeca8
leaq 0x10(%rsp), %rdi
callq 0xe95e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xdfb0(%rip), %rdi      # 0x1cff0
leaq 0x483f(%rip), %rsi      # 0x13886
callq 0x3200
movq %rax, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3100
jmp 0xf066
jmp 0xf066
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe95e
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::copyArray(CSA::VectorEncoder&, bool)
void
BitVector::copyArray(VectorEncoder& encoder, bool use_directly)
{
  if(use_directly && encoder.array_blocks.size() == 0)
  {
    this->array = encoder.array; encoder.array = 0;
    return;
  }

  usint* array_buffer = new usint[this->block_size * this->number_of_blocks];
  usint pos = 0, total_words = this->block_size * this->number_of_blocks;

  for(std::list<usint*>::iterator iter = encoder.array_blocks.begin(); iter != encoder.array_blocks.end(); iter++)
  {
    memcpy(array_buffer + pos, *iter, encoder.superblock_bytes);
    pos += encoder.superblock_bytes / sizeof(usint);
  }

  usint remainder = std::min(total_words - pos, (usint)(encoder.superblock_bytes / sizeof(usint)));
  memcpy(array_buffer + pos, encoder.array, remainder * sizeof(usint));
  pos += remainder;
  if(pos < total_words) { memset(array_buffer + pos, 0, (total_words - pos) * sizeof(usint)); }

  this->array = array_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
testl %edx, %edx
je 0xf0aa
cmpq $0x0, 0x30(%rbx)
jne 0xf0aa
movq 0x38(%rbx), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x38(%rbx)
jmp 0xf16e
movl 0x14(%rdi), %r15d
movq %rdi, 0x20(%rsp)
imull 0x10(%rdi), %r15d
leaq (,%r15,4), %rdi
callq 0x3030
movq %rax, 0x8(%rsp)
leaq 0x20(%rbx), %r14
movq %rbx, 0x10(%rsp)
movl 0x10(%rbx), %r13d
movl %r13d, %ebx
shrl $0x2, %ebx
xorl %ebp, %ebp
movq %r15, 0x18(%rsp)
movq %r14, %r12
movq (%r12), %r12
movl %ebp, %eax
cmpq %r14, %r12
je 0xf10f
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rdi
movq 0x10(%r12), %rsi
movq %r13, %rdx
callq 0x31c0
subl %ebx, %r15d
addl %ebx, %ebp
jmp 0xf0e7
movq 0x18(%rsp), %r12
movl %r12d, %edx
subl %ebp, %edx
cmpl %edx, %ebx
cmovbl %ebx, %edx
movq 0x8(%rsp), %r14
leaq (%r14,%rax,4), %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
shll $0x2, %edx
callq 0x31c0
cmpl %ebx, %r15d
movl %ebx, %eax
cmovbl %r15d, %eax
addl %ebp, %eax
cmpl %r12d, %eax
jae 0xf165
movl %eax, %eax
leaq (%r14,%rax,4), %rdi
xorl %eax, %eax
subl %ebx, %r15d
cmovbl %eax, %r15d
shlq $0x2, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x3130
movq 0x20(%rsp), %rax
movq %r14, 0x8(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::~BitVector()
BitVector::~BitVector()
{
  delete[] this->array;
  delete this->samples;
  delete this->rank_index;
  delete this->select_index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xf1a9
callq 0x32b0
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0xf1ba
movq %r14, %rdi
callq 0xe7c4
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3230
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0xf1d6
movq %r14, %rdi
callq 0xe7c4
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3230
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0xf1f2
movq %rbx, %rdi
callq 0xe7c4
pushq $0x28
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::writeHeader(std::basic_ofstream<char, std::char_traits<char>>&) const
void
BitVector::writeHeader(std::ofstream& file) const
{
  file.write((char*)&(this->size), sizeof(this->size));
  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));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x32d0
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x32d0
leaq 0x14(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x32d0
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x32d0
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::writeHeader(_IO_FILE*) const
void
BitVector::writeHeader(FILE* file) const
{
  if(file == 0) { return; }
  std::fwrite(&(this->size), sizeof(this->size), 1, file);
  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);
}

// Assembly:
testq %rsi, %rsi
je 0xf339
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3440
leaq 0x4(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3440
leaq 0x14(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3440
addq $0x10, %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3440
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::reportSize() const
usint
BitVector::reportSize() const
{
  // We assume the reportSize() of derived classes includes any class variables of BitVector.
  usint bytes = this->block_size * this->number_of_blocks * sizeof(usint);
  if(this->samples != 0) { bytes += this->samples->reportSize(); }
  if(this->rank_index != 0) { bytes += this->rank_index->reportSize(); }
  if(this->select_index != 0) { bytes += this->select_index->reportSize(); }
  return bytes;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x10(%rdi), %ebx
imull 0x14(%rdi), %ebx
shll $0x2, %ebx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0xf37b
callq 0xe850
addl %eax, %ebx
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0xf38b
callq 0xe850
addl %eax, %ebx
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0xf39b
callq 0xe850
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::Iterator::sampleForIndex(unsigned int)
usint
BitVector::Iterator::sampleForIndex(usint index)
{
  usint low = this->parent.select_index->readItemConst(index / this->parent.select_rate);
  usint high = this->parent.number_of_blocks - 1;

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

  return low;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r12
movq (%rdi), %rcx
movq 0x38(%rcx), %rdi
movl %esi, %eax
xorl %edx, %edx
divl 0x40(%rcx)
movl %eax, %esi
callq 0x8ba2
movl %eax, %r14d
movq (%r12), %rax
movl 0x14(%rax), %r13d
decl %r13d
leaq 0x50(%r12), %r15
leal 0x2(,%r14,2), %eax
movl 0x5c(%r12), %ecx
imull %eax, %ecx
movl %ecx, %edx
shrl $0x5, %edx
movl %edx, 0x68(%r12)
andl $0x1e, %ecx
pushq $0x20
popq %rdx
subl %ecx, %edx
movl %edx, 0x6c(%r12)
movl %eax, 0x70(%r12)
cmpl %r13d, %r14d
movl %r14d, %ebp
cmovbel %r13d, %ebp
cmpl %r13d, %r14d
jae 0xf4db
movq %r15, %rdi
callq 0xabd0
cmpl %ebx, %eax
ja 0xf4d8
movq %r15, %rdi
callq 0xf87a
incl %r14d
jmp 0xf4ba
movl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::BitVector::Iterator::sampleForValue(unsigned int)
usint
BitVector::Iterator::sampleForValue(usint value)
{
  usint low = this->parent.rank_index->readItemConst(value / this->parent.rank_rate);
  usint high = this->parent.number_of_blocks - 1;

  this->samples.goToItem(2 * low + 3);
  for(; low < high; low++)
  {
    if(this->samples.readItem() > value) { return low; }
    this->samples.skipItem();
  }

  return low;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r12
movq (%rdi), %rcx
movq 0x28(%rcx), %rdi
movl %esi, %eax
xorl %edx, %edx
divl 0x30(%rcx)
movl %eax, %esi
callq 0x8ba2
movl %eax, %r14d
movq (%r12), %rax
movl 0x14(%rax), %r13d
decl %r13d
leaq 0x50(%r12), %r15
leal 0x3(,%r14,2), %eax
movl 0x5c(%r12), %ecx
imull %eax, %ecx
movl %ecx, %edx
shrl $0x5, %edx
movl %edx, 0x68(%r12)
andl $0x1f, %ecx
pushq $0x20
popq %rdx
subl %ecx, %edx
movl %edx, 0x6c(%r12)
movl %eax, 0x70(%r12)
cmpl %r13d, %r14d
movl %r14d, %ebp
cmovbel %r13d, %ebp
cmpl %r13d, %r14d
jae 0xf57b
movq %r15, %rdi
callq 0xabd0
cmpl %ebx, %eax
ja 0xf578
movq %r15, %rdi
callq 0xf87a
incl %r14d
jmp 0xf55a
movl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::VectorEncoder::VectorEncoder(unsigned int, unsigned int, bool)
VectorEncoder::VectorEncoder(usint block_bytes, usint superblock_size, bool _use_small_blocks) :
  size(0), items(0), blocks(0),
  block_size(BYTES_TO_WORDS(block_bytes)),
  superblock_bytes(superblock_size),
  use_small_blocks(_use_small_blocks),
  blocks_in_superblock(1), current_blocks(0),
  samples(0), samples_in_superblock(0), current_samples(0)
{
  this->array = new usint[this->superblock_bytes / sizeof(usint)];
  memset(this->array, 0, this->superblock_bytes);
  if(use_small_blocks)
  {
    this->blocks_in_superblock = this->superblock_bytes / (sizeof(usint) * this->block_size);
    this->buffer = new WriteBuffer(this->array, this->block_size);
    this->samples = new usint[this->superblock_bytes / sizeof(usint)];
    this->samples_in_superblock = this->superblock_bytes / (2 * sizeof(usint));
  }
  else
  {
    this->buffer = new WriteBuffer(this->array, BYTES_TO_WORDS(this->superblock_bytes));
    this->blocks = this->current_blocks = 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rdi, %r15
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
movl %esi, %r12d
addq $0x3, %r12
movq %r12, %r14
shrq $0x2, %r14
movl %r14d, 0xc(%rdi)
movl %edx, 0x10(%rdi)
movb %bpl, 0x14(%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x28(%rdi)
movq %rax, 0x10(%rsp)
movq %rax, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
movq $0x1, 0x40(%rdi)
leaq 0x48(%rdi), %rax
movq %rax, 0x50(%rdi)
movq %rax, 0x8(%rsp)
movq %rax, 0x48(%rdi)
movl %edx, %edi
andl $-0x4, %edi
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r15)
andq $0x0, 0x68(%r15)
callq 0x3030
movq %rax, %r13
movq %rax, 0x38(%r15)
movl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3130
testb %bpl, %bpl
je 0xf66b
andq $-0x4, %r12
movq %rbx, %rax
xorl %edx, %edx
divq %r12
movl %eax, 0x40(%r15)
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0xe90c
movq %rbp, 0x18(%r15)
movl 0x10(%r15), %ebx
movl %ebx, %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x60(%r15)
shrl $0x3, %ebx
movl %ebx, 0x68(%r15)
jmp 0xf69a
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r12
addq $0x3, %rbx
shrq $0x2, %rbx
movq %rax, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0xe90c
movq %r12, 0x18(%r15)
pushq $0x1
popq %rax
movl %eax, 0x44(%r15)
movl %eax, 0x8(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r12, %rdi
jmp 0xf6bd
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %rbp, %rdi
callq 0x3230
jmp 0xf6c7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0xe480
movq 0x10(%rsp), %rdi
callq 0xe480
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::VectorEncoder::~VectorEncoder()
VectorEncoder::~VectorEncoder()
{
  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 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0xf6fa
callq 0x32b0
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0xf70b
movq %r14, %rdi
callq 0xe95e
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3230
leaq 0x20(%rbx), %r14
movq %r14, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0xf735
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0xf71d
callq 0x32b0
jmp 0xf71d
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0xf743
callq 0x32b0
addq $0x48, %rbx
movq %rbx, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0xf762
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0xf74a
callq 0x32b0
jmp 0xf74a
movq %rbx, %rdi
callq 0xe480
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xe480
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::VectorEncoder::addNewBlock()
void
VectorEncoder::addNewBlock()
{
  // Do we need a new superblock for the block?
  this->blocks++; this->current_blocks++;
  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->use_small_blocks)
  {
    this->current_samples++;
    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[2 * this->current_samples - 2] = this->items - 1;
    this->samples[2 * this->current_samples - 1] = this->size - 1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x8(%rdi)
movl 0x44(%rdi), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x44(%rdi)
cmpl 0x40(%rdi), %eax
jbe 0xf7d3
leaq 0x20(%rbx), %rdi
leaq 0x38(%rbx), %rsi
callq 0xe44c
movl 0x10(%rbx), %r15d
movl %r15d, %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, %r14
movq %rax, 0x38(%rbx)
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3130
movl $0x1, 0x44(%rbx)
jmp 0xf7d7
movq 0x38(%rbx), %r14
movq 0x18(%rbx), %rdi
imull 0xc(%rbx), %r12d
leaq (%r14,%r12,4), %rsi
callq 0xea12
cmpb $0x1, 0x14(%rbx)
jne 0xf847
movl 0x6c(%rbx), %ecx
incl %ecx
movl %ecx, 0x6c(%rbx)
cmpl 0x68(%rbx), %ecx
jbe 0xf823
leaq 0x48(%rbx), %rdi
leaq 0x60(%rbx), %rsi
callq 0xe44c
movl 0x10(%rbx), %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x60(%rbx)
movl $0x1, 0x6c(%rbx)
xorl %ecx, %ecx
jmp 0xf82e
movq 0x60(%rbx), %rax
leal -0x2(,%rcx,2), %ecx
movl 0x4(%rbx), %edx
decl %edx
movl %edx, (%rax,%rcx,4)
movl (%rbx), %ecx
movl 0x6c(%rbx), %edx
decl %ecx
leal -0x1(,%rdx,2), %edx
movl %ecx, (%rax,%rdx,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.cpp
// Function: CSA::VectorEncoder::setFirstBit(unsigned int)
void
VectorEncoder::setFirstBit(usint value)
{
  this->samples[0] = 0;
  this->samples[1] = value;

  this->size = value + 1;
  this->items = 1;
  this->blocks = 1;

  this->current_blocks = 1;
  this->current_samples = 1;
}

// Assembly:
movq 0x60(%rdi), %rax
andl $0x0, (%rax)
movl %esi, 0x4(%rax)
incl %esi
movl %esi, (%rdi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x4(%rdi)
pushq $0x1
popq %rax
movl %eax, 0x44(%rdi)
movl %eax, 0x6c(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.h
// Function: CSA::ReadBuffer::skipBits(unsigned int)
inline void skipBits(usint count)
    {
      if(count < this->bits)
      {
        this->bits -= count;
        return;
      }

      count -= this->bits;
      this->pos += 1 + count / WORD_BITS;
      this->bits = WORD_BITS - count % WORD_BITS;
    }

// Assembly:
movl 0x1c(%rdi), %ecx
movl %ecx, %eax
subl %esi, %eax
ja 0xf8ae
subl %ecx, %esi
movl %esi, %eax
shrl $0x5, %eax
movl 0x18(%rdi), %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0x18(%rdi)
andl $0x1f, %esi
pushq $0x20
popq %rax
subl %esi, %eax
movl %eax, 0x1c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::rank(unsigned int, bool)
usint
DeltaVector::Iterator::rank(usint value, bool at_least)
{
  const DeltaVector& par = (const DeltaVector&)(this->parent);

  if(value >= par.size) { return par.items; }
  this->getSample(this->sampleForValue(value));

  while(this->cur < this->block_items && this->val < value)
  {
    this->val += this->buffer.readDeltaCode();
    this->cur++;
  }

  usint idx = this->sample.first + this->cur + 1;
  if(!at_least && this->val > value) { idx--; }
  if(at_least && this->val < value)
  {
    this->getSample(this->block + 1);
    idx = this->sample.first + this->cur + 1;
  }
  return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpl %esi, (%rax)
jbe 0xf966
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0xf4ec
movq %rbx, %rdi
movl %eax, %esi
callq 0xfc34
leaq 0x28(%rbx), %r15
movl 0x14(%rbx), %edx
movl 0x18(%rbx), %eax
cmpl 0x20(%rbx), %edx
jae 0xf934
cmpl %ebp, %eax
jae 0xf934
movq %r15, %rdi
callq 0xe3a2
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %edx
incl %edx
movl %edx, 0x14(%rbx)
jmp 0xf913
addl 0xc(%rbx), %edx
cmpl %ebp, %eax
setbe %cl
orb %r14b, %cl
movzbl %cl, %ecx
addl %edx, %ecx
testb %r14b, %r14b
je 0xf969
cmpl %ebp, %eax
jae 0xf969
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xfc34
movl 0xc(%rbx), %eax
movl 0x14(%rbx), %ecx
addl %eax, %ecx
incl %ecx
jmp 0xf969
movl 0x4(%rax), %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::select(unsigned int)
usint
DeltaVector::Iterator::select(usint index)
{
  const DeltaVector& par = (const DeltaVector&)(this->parent);

  if(index >= par.items) { return par.size; }
  this->getSample(this->sampleForIndex(index));

  usint lim = index - this->sample.first;
  for(; this->cur < lim; this->cur++)
  {
    this->val += this->buffer.readDeltaCode();
  }

  return this->val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
cmpl %esi, 0x4(%r12)
jbe 0xf9c8
movl %esi, %ebx
movq %rdi, %r14
callq 0xf44c
movq %r14, %rdi
movl %eax, %esi
callq 0xfc34
subl 0xc(%r14), %ebx
leaq 0x28(%r14), %r15
leaq 0x18(%r14), %r12
movl 0x14(%r14), %eax
cmpl %ebx, %eax
jae 0xf9c8
movq %r15, %rdi
callq 0xe3a2
addl %eax, 0x18(%r14)
movl 0x14(%r14), %eax
incl %eax
movl %eax, 0x14(%r14)
jmp 0xf9ac
movl (%r12), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::selectNext()
usint
DeltaVector::Iterator::selectNext()
{
  if(this->cur >= this->block_items)
  {
    this->getSample(this->block + 1);
    return this->val;
  }

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x14(%rdi), %eax
cmpl 0x20(%rdi), %eax
jae 0xf9fa
incl %eax
movl %eax, 0x14(%rbx)
leaq 0x28(%rbx), %rdi
callq 0xe3a2
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
jmp 0xfa0a
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xfc34
movl 0x18(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::valueBefore(unsigned int)
pair_type
DeltaVector::Iterator::valueBefore(usint value)
{
  const DeltaVector& par = (const DeltaVector&)(this->parent);

  if(value >= par.size) { return pair_type(par.size, par.items); }

  this->getSample(this->sampleForValue(value));
  if(this->val > value) { return pair_type(par.size, par.items); }

  while(this->cur < this->block_items && this->val < value)
  {
    usint temp = this->buffer.readDeltaCode(value - this->val);
    if(temp == 0) { break; }
    this->val += temp;
    this->cur++;
  }

  return pair_type(this->val, this->sample.first + this->cur);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r14
movl (%r14), %ecx
cmpl %esi, %ecx
jbe 0xfa38
movl %esi, %ebp
movq %rdi, %rbx
callq 0xf4ec
movq %rbx, %rdi
movl %eax, %esi
callq 0xfc34
movl 0x18(%rbx), %ecx
cmpl %ebp, %ecx
jbe 0xfa3e
movl (%r14), %ecx
movl 0x4(%r14), %edx
jmp 0xfa71
leaq 0x28(%rbx), %r14
movl 0x14(%rbx), %edx
cmpl 0x20(%rbx), %edx
jae 0xfa6e
movl %ebp, %esi
subl %ecx, %esi
jbe 0xfa6e
movq %r14, %rdi
callq 0xfcb2
movl 0x14(%rbx), %edx
movl 0x18(%rbx), %ecx
testl %eax, %eax
je 0xfa6e
addl %eax, %ecx
movl %ecx, 0x18(%rbx)
incl %edx
movl %edx, 0x14(%rbx)
jmp 0xfa45
addl 0xc(%rbx), %edx
shlq $0x20, %rdx
movl %ecx, %eax
orq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::valueAfter(unsigned int)
pair_type
DeltaVector::Iterator::valueAfter(usint value)
{
  const DeltaVector& par = (const DeltaVector&)(this->parent);

  if(value >= par.size) { return pair_type(par.size, par.items); }
  this->getSample(this->sampleForValue(value));

  while(this->cur < this->block_items && this->val < value)
  {
    this->val += this->buffer.readDeltaCode();
    this->cur++;
  }
  if(this->val < value)
  {
    this->getSample(this->block + 1);
  }

  return pair_type(this->val, this->sample.first + this->cur);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rcx
movl (%rcx), %eax
cmpl %esi, %eax
jbe 0xfae8
movl %esi, %ebp
movq %rdi, %rbx
callq 0xf4ec
movq %rbx, %rdi
movl %eax, %esi
callq 0xfc34
leaq 0x28(%rbx), %r14
movl 0x14(%rbx), %ecx
movl 0x18(%rbx), %eax
cmpl 0x20(%rbx), %ecx
jae 0xfacc
cmpl %ebp, %eax
jae 0xfacc
movq %r14, %rdi
callq 0xe3a2
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %ecx
incl %ecx
movl %ecx, 0x14(%rbx)
jmp 0xfaab
cmpl %ebp, %eax
jae 0xfae3
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xfc34
movl 0x14(%rbx), %ecx
movl 0x18(%rbx), %eax
addl 0xc(%rbx), %ecx
jmp 0xfaeb
movl 0x4(%rcx), %ecx
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::nextValue()
pair_type
DeltaVector::Iterator::nextValue()
{
  if(this->cur >= this->block_items)
  {
    this->getSample(this->block + 1);
    return pair_type(this->val, this->sample.first);
  }

  this->cur++;
  this->val += this->buffer.readDeltaCode();
  return pair_type(this->val, this->sample.first + this->cur);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x14(%rdi), %eax
cmpl 0x20(%rdi), %eax
jae 0xfb22
incl %eax
movl %eax, 0x14(%rbx)
leaq 0x28(%rbx), %rdi
callq 0xe3a2
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %ecx
addl 0xc(%rbx), %ecx
jmp 0xfb35
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xfc34
movl 0xc(%rbx), %ecx
movl 0x18(%rbx), %eax
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaVector::Iterator::isSet(unsigned int)
bool
DeltaVector::Iterator::isSet(usint value)
{
  const DeltaVector& par = (const DeltaVector&)(this->parent);

  if(value >= par.size) { return false; }
  this->getSample(this->sampleForValue(value));

  while(this->cur < this->block_items && this->val < value)
  {
    this->val += this->buffer.readDeltaCode();
    this->cur++;
  }

  return (this->val == value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpl %esi, (%rax)
jbe 0xfbad
movl %esi, %ebx
movq %rdi, %r14
callq 0xf4ec
movq %r14, %rdi
movl %eax, %esi
callq 0xfc34
leaq 0x28(%r14), %r15
movl 0x14(%r14), %ecx
movl 0x18(%r14), %eax
cmpl 0x20(%r14), %ecx
jae 0xfba6
cmpl %ebx, %eax
jae 0xfba6
movq %r15, %rdi
callq 0xe3a2
addl 0x18(%r14), %eax
movl %eax, 0x18(%r14)
movl 0x14(%r14), %ecx
incl %ecx
movl %ecx, 0x14(%r14)
jmp 0xfb80
cmpl %ebx, %eax
sete %al
jmp 0xfbaf
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/deltavector.cpp
// Function: CSA::DeltaEncoder::setBit(unsigned int)
void
DeltaEncoder::setBit(usint value)
{
  if(this->items == 0)
  {
    this->setFirstBit(value);
    return;
  }
  if(value < this->size) { return; }

  usint diff = value + 1 - this->size;
  this->size = value + 1;
  this->items++;
  if(this->buffer->writeDeltaCode(diff)) { return; }

  // Didn't fit into the block. A new sample & block required.
  this->addNewBlock();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0xfbef
movl (%rbx), %ecx
cmpl %esi, %ecx
ja 0xfbed
incl %esi
movl %esi, (%rbx)
subl %ecx, %esi
incl %eax
movl %eax, 0x4(%rbx)
movq 0x18(%rbx), %rdi
callq 0xe3de
testb %al, %al
je 0xfbf8
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0xf854
movq %rbx, %rdi
popq %rbx
jmp 0xf778
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitvector.h
// Function: CSA::BitVector::Iterator::getSample(unsigned int)
inline void getSample(usint sample_number)
        {
          this->block = sample_number;
          this->samples.goToItem(2 * sample_number);
          this->sample.first = this->samples.readItem();
          this->sample.second = this->samples.readItem();
          this->cur = 0;
          this->val = this->sample.second;
          this->block_items = this->samples.readItem() - this->sample.first - 1;
          this->buffer.moveBuffer(this->parent.array + (this->block * this->parent.block_size));
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x8(%rdi)
leaq 0x50(%rdi), %r14
addl %esi, %esi
movl 0x5c(%rdi), %eax
imull %esi, %eax
movl %eax, %ecx
shrl $0x5, %ecx
movl %ecx, 0x68(%rdi)
andl $0x1e, %eax
pushq $0x20
popq %rcx
subl %eax, %ecx
movl %ecx, 0x6c(%rdi)
movl %esi, 0x70(%rdi)
movq %r14, %rdi
callq 0xabd0
movl %eax, 0xc(%rbx)
movq %r14, %rdi
callq 0xabd0
movl %eax, 0x10(%rbx)
andl $0x0, 0x14(%rbx)
movl %eax, 0x18(%rbx)
movq %r14, %rdi
callq 0xabd0
movl 0xc(%rbx), %ecx
notl %ecx
addl %eax, %ecx
movl %ecx, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movq (%rbx), %rax
movl 0x10(%rax), %esi
imull 0x8(%rbx), %esi
shlq $0x2, %rsi
addq 0x8(%rax), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe812
nop
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/bitbuffer.h
// Function: CSA::ReadBuffer::readDeltaCode(unsigned int)
inline usint readDeltaCode(usint limit)
    {
       usint _pos = this->pos, _bits = this->bits;
       usint value = this->readDeltaCode();
       if(value > limit)
       {
         this->pos = _pos; this->bits = _bits;
         return 0;
       }
       return value;
    }

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movsd 0x18(%rdi), %xmm0
movaps %xmm0, (%rsp)
callq 0xe3a2
cmpl %ebp, %eax
jbe 0xfcd9
movaps (%rsp), %xmm0
movlps %xmm0, 0x18(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adamnovak[P]rlcsa/bits/rlevector.cpp
// Function: CSA::RLEVector::Iterator::rank(unsigned int, bool)
usint
RLEVector::Iterator::rank(usint value, bool at_least)
{
  const RLEVector& par = (const RLEVector&)(this->parent);

  if(value >= par.size) { return par.items; }

  this->valueLoop(value);

  usint idx = this->sample.first + this->cur + 1;
  if(!at_least && this->val > value)
  {
    idx--;
  }
  if(at_least && this->val < value)
  {
    this->getSample(this->block + 1);
    this->run = 0;
    idx = this->sample.first + this->cur + 1;
  }
  return idx;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpl %esi, (%rax)
jbe 0xfd57
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0xfd70
cmpl %r14d, 0x18(%rbx)
setbe %al
setb %cl
andb %bpl, %cl
cmpb $0x1, %cl
jne 0xfd5c
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xfc34
andl $0x0, 0x1c(%rbx)
movl 0xc(%rbx), %eax
movl 0x14(%rbx), %ecx
addl %ecx, %eax
incl %eax
jmp 0xfd6b
movl 0x4(%rax), %eax
jmp 0xfd6b
movl 0x14(%rbx), %ecx
addl 0xc(%rbx), %ecx
orb %al, %bpl
movzbl %bpl, %eax
addl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq