LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3150
testq %r15, %r15
je 0x10ee8
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x3360
testq %rax, %rax
je 0x10f00
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
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11003
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x11003
callq 0x3300
movb $0x0, 0x14(%rbx)
movq %r14, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3150
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%r14)
movl $0x0, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %ebp
movl $0x28, %edi
callq 0x3260
movq (%rbx), %rcx
testl %ebp, %ebp
je 0x1118b
movl 0xc(%rbx), %edx
movl %edx, 0xc(%rax)
movl %ebp, 0x10(%rax)
movb $0x0, 0x14(%rax)
imull %ebp, %edx
addl $0x1f, %edx
shrl $0x5, %edx
movl %edx, 0x8(%rax)
jmp 0x1119d
movl 0x8(%rbx), %edx
movl %edx, 0x8(%rax)
movq $0x1, 0xc(%rax)
movb $0x0, 0x14(%rax)
movq %rcx, (%rax)
movabsq $0x2000000000, %rcx     # imm = 0x2000000000
movq %rcx, 0x18(%rax)
movl $0x0, 0x20(%rax)
cmpb $0x1, 0x14(%rbx)
jne 0x111c3
movb $0x1, 0x14(%rax)
movb $0x0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1121d
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1121d
callq 0x3300
movb $0x0, 0x14(%rbx)
movq %r14, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movq %rax, 0x38(%rdi)
callq 0x1130e
movl 0x14(%rbx), %r15d
imull 0x10(%rbx), %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x3030
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x32e0
movq %r12, 0x8(%rbx)
movl (%rbx), %eax
bsrl %eax, %ebp
xorl $-0x20, %ebp
addl $0x21, %ebp
testl %eax, %eax
cmovel %eax, %ebp
movl %ebp, 0x20(%rbx)
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movl 0x14(%rbx), %eax
leal 0x2(,%rax,2), %edx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x10e0a
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0x113aa
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x115fe
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/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x32e0
leaq 0x4(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x32e0
leaq 0x14(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x32e0
addq $0x10, %r14
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movq %rax, 0x38(%rdi)
callq 0x118f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1197a
movl (%rbx), %eax
bsrl %eax, %ebp
xorl $-0x20, %ebp
addl $0x21, %ebp
testl %eax, %eax
cmovel %eax, %ebp
movl %ebp, 0x20(%rbx)
movl $0x28, %edi
callq 0x3260
movq %rax, %r15
movl 0x14(%rbx), %eax
leal 0x2(,%rax,2), %edx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x10e84
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0x113aa
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x115fe
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/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 0x11972
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11972
leaq 0x4(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11972
leaq 0x14(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11972
addq $0x10, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3360
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x119d0
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 0x3360
testq %rax, %rax
je 0x119c7
movq %r15, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x18, %rsp
movq %rsi, %r12
testl %edx, %edx
je 0x11cd8
cmpq $0x0, 0x30(%r12)
jne 0x11cd8
movq 0x38(%r12), %rax
movq %rax, 0x8(%rdi)
movq $0x0, 0x38(%r12)
jmp 0x11d8e
movl 0x14(%rdi), %eax
movq %rdi, 0x10(%rsp)
imull 0x10(%rdi), %eax
movq %rax, 0x8(%rsp)
leaq (,%rax,4), %rdi
callq 0x3030
movq %rax, %r15
leaq 0x20(%r12), %rbx
movq 0x20(%r12), %r14
cmpq %rbx, %r14
movq %r12, (%rsp)
je 0x11d39
movl 0x10(%r12), %r13d
movl %r13d, %r12d
shrl $0x2, %r12d
xorl %ebp, %ebp
movl %ebp, %eax
leaq (%r15,%rax,4), %rdi
movq 0x10(%r14), %rsi
movq %r13, %rdx
callq 0x31f0
movq (%r14), %r14
addl %r12d, %ebp
cmpq %rbx, %r14
jne 0x11d1a
jmp 0x11d3b
xorl %ebp, %ebp
movq 0x8(%rsp), %r14
movl %r14d, %eax
subl %ebp, %eax
movq (%rsp), %rcx
movl 0x10(%rcx), %ebx
shrl $0x2, %ebx
cmpl %eax, %ebx
cmovael %eax, %ebx
movl %ebp, %eax
leaq (%r15,%rax,4), %rdi
movq 0x38(%rcx), %rsi
leal (,%rbx,4), %edx
callq 0x31f0
addl %ebp, %ebx
subl %ebx, %r14d
jbe 0x11d85
movl %ebx, %eax
leaq (%r15,%rax,4), %rdi
shlq $0x2, %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x3150
movq 0x10(%rsp), %rax
movq %r15, 0x8(%rax)
addq $0x18, %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/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 0x11dc7
callq 0x3300
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x11de5
movq %r14, %rdi
callq 0x10f96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x11e03
movq %r14, %rdi
callq 0x10f96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x11e28
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/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x3310
leaq 0x4(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3310
leaq 0x14(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3310
addq $0x10, %r14
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3310
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11f8b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
leaq 0x4(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
leaq 0x14(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x34a0
addq $0x10, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x34a0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11fcd
callq 0x11028
addl %eax, %ebx
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x11fdd
callq 0x11028
addl %eax, %ebx
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x11fed
callq 0x11028
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %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 0x120ec
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x12100
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 0x12127
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 0x14(%r9), %r9d
decl %r9d
leal 0x2(,%rax,2), %ecx
movl 0x5c(%rdi), %r10d
movl %r10d, %edx
imull %ecx, %edx
movl %edx, %r8d
shrl $0x5, %r8d
movl %r8d, 0x68(%rdi)
andl $0x1e, %edx
movl $0x20, %r8d
subl %edx, %r8d
movl %r8d, 0x6c(%rdi)
movl %ecx, 0x70(%rdi)
cmpl %r9d, %eax
jae 0x1221f
movl 0x68(%rdi), %r11d
movl 0x6c(%rdi), %edx
movl 0x70(%rdi), %ebx
movq 0x50(%rdi), %r14
addl $0x2, %ebx
leal -0x1(%rbx), %ecx
movl %ecx, 0x70(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x1218c
movl %r10d, %r8d
jmp 0x121b3
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, 0x68(%rdi)
movl $0x20, 0x6c(%rdi)
movl $0x20, %edx
testl %r8d, %r8d
je 0x121d9
subl %r8d, %edx
movl %edx, 0x6c(%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 0x1221f
movl %edx, %ecx
subl %r10d, %ecx
ja 0x12206
movl %r10d, %r8d
subl %edx, %r8d
movl %r8d, %ecx
shrl $0x5, %ecx
addl %ecx, %r11d
incl %r11d
movl %r11d, 0x68(%rdi)
andl $0x1f, %r8d
movl $0x20, %ecx
subl %r8d, %ecx
movl %ecx, 0x6c(%rdi)
movl %ebx, 0x70(%rdi)
incl %eax
addl $0x2, %ebx
movl %ecx, %edx
cmpl %eax, %r9d
jne 0x12177
movl %r9d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq (%rdi), %r9
movq 0x28(%r9), %r10
movl %esi, %eax
xorl %edx, %edx
divl 0x30(%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 0x1226a
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x1227e
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 0x122a5
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 0x14(%r9), %r9d
decl %r9d
leal 0x3(,%rax,2), %ecx
movl 0x5c(%rdi), %r10d
movl %r10d, %edx
imull %ecx, %edx
movl %edx, %r8d
shrl $0x5, %r8d
movl %r8d, 0x68(%rdi)
andl $0x1f, %edx
movl $0x20, %r8d
subl %edx, %r8d
movl %r8d, 0x6c(%rdi)
movl %ecx, 0x70(%rdi)
cmpl %r9d, %eax
jae 0x1239d
movl 0x68(%rdi), %r11d
movl 0x6c(%rdi), %edx
movl 0x70(%rdi), %ebx
movq 0x50(%rdi), %r14
addl $0x2, %ebx
leal -0x1(%rbx), %ecx
movl %ecx, 0x70(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x1230a
movl %r10d, %r8d
jmp 0x12331
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, 0x68(%rdi)
movl $0x20, 0x6c(%rdi)
movl $0x20, %edx
testl %r8d, %r8d
je 0x12357
subl %r8d, %edx
movl %edx, 0x6c(%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 0x1239d
movl %edx, %ecx
subl %r10d, %ecx
ja 0x12384
movl %r10d, %r8d
subl %edx, %r8d
movl %r8d, %ecx
shrl $0x5, %ecx
addl %ecx, %r11d
incl %r11d
movl %r11d, 0x68(%rdi)
andl $0x1f, %r8d
movl $0x20, %ecx
subl %r8d, %ecx
movl %ecx, 0x6c(%rdi)
movl %ebx, 0x70(%rdi)
incl %eax
addl $0x2, %ebx
movl %ecx, %edx
cmpl %eax, %r9d
jne 0x122f5
movl %r9d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r12d
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
movl %esi, %r14d
addq $0x3, %r14
movq %r14, %r13
shrq $0x2, %r13
movl %r13d, 0xc(%rdi)
movl %edx, 0x10(%rdi)
movb %bpl, 0x14(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rcx, 0x10(%rsp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x30(%rdi)
movq $0x1, 0x40(%rdi)
leaq 0x48(%rdi), %rcx
movq %rcx, 0x50(%rdi)
movq %rcx, 0x8(%rsp)
movq %rcx, 0x48(%rdi)
movl %edx, %edi
andl $-0x4, %edi
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movq %rax, 0x68(%rbx)
callq 0x3030
movq %rax, %r15
movq %rax, 0x38(%rbx)
movl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3150
testb %bpl, %bpl
je 0x12489
andq $-0x4, %r14
movq %r12, %rax
xorl %edx, %edx
divq %r14
movl %eax, 0x40(%rbx)
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x110ea
movq %r12, 0x18(%rbx)
movl 0x10(%rbx), %r14d
movl %r14d, %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x60(%rbx)
shrl $0x3, %r14d
movl %r14d, 0x68(%rbx)
jmp 0x124bb
movl $0x28, %edi
callq 0x3260
movq %rax, %r14
addq $0x3, %r12
shrq $0x2, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x110ea
movq %r14, 0x18(%rbx)
movl $0x1, %eax
movl %eax, 0x44(%rbx)
movl %eax, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
jmp 0x124e2
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x3270
jmp 0x124ec
movq %rax, %rbx
movq 0x8(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x1250e
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x124f9
movq 0x10(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x12530
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x1251b
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1254e
callq 0x3300
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x1256c
movq %r14, %rdi
callq 0x11142
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
leaq 0x20(%rbx), %r14
movq 0x20(%rbx), %r15
cmpq %r14, %r15
je 0x1258c
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x12587
callq 0x3300
movq (%r15), %r15
jmp 0x12574
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x1259a
callq 0x3300
movq 0x48(%rbx), %r15
addq $0x48, %rbx
cmpq %rbx, %r15
je 0x125ba
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x125b5
callq 0x3300
movq (%r15), %r15
jmp 0x125a2
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x125d7
movq (%rdi), %r15
movl $0x18, %esi
callq 0x3270
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x125c2
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x125f4
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x3270
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x125df
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x8(%rdi)
movl 0x44(%rdi), %eax
incl %eax
movl %eax, 0x44(%rdi)
cmpl 0x40(%rdi), %eax
jbe 0x1265d
leaq 0x20(%rbx), %r14
movl $0x18, %edi
callq 0x3260
movq 0x38(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3060
incq 0x30(%rbx)
movl 0x10(%rbx), %r14d
movl %r14d, %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x38(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3150
movl $0x1, 0x44(%rbx)
movl 0x44(%rbx), %esi
decl %esi
imull 0xc(%rbx), %esi
movq 0x18(%rbx), %rdi
shlq $0x2, %rsi
addq 0x38(%rbx), %rsi
callq 0x11200
cmpb $0x1, 0x14(%rbx)
jne 0x126ec
movl 0x6c(%rbx), %eax
incl %eax
movl %eax, 0x6c(%rbx)
cmpl 0x68(%rbx), %eax
jbe 0x126c5
leaq 0x48(%rbx), %r14
movl $0x18, %edi
callq 0x3260
movq 0x60(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3060
incq 0x58(%rbx)
movl 0x10(%rbx), %edi
andl $-0x4, %edi
callq 0x3030
movq %rax, 0x60(%rbx)
movl $0x1, 0x6c(%rbx)
movl 0x4(%rbx), %eax
decl %eax
movq 0x60(%rbx), %rcx
movl 0x6c(%rbx), %edx
leal -0x2(,%rdx,2), %edx
movl %eax, (%rcx,%rdx,4)
movl (%rbx), %eax
movl 0x6c(%rbx), %edx
decl %eax
leal -0x1(,%rdx,2), %edx
movl %eax, (%rcx,%rdx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x0, (%rax)
movl %esi, 0x4(%rax)
incl %esi
movl %esi, (%rdi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x4(%rdi)
movl $0x1, %eax
movl %eax, 0x44(%rdi)
movl %eax, 0x6c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpl %esi, (%rax)
jbe 0x128d8
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x12226
movq %rbx, %rdi
movl %eax, %esi
callq 0x130d8
movl 0x14(%rbx), %esi
movl 0x20(%rbx), %edi
cmpl %edi, %esi
jae 0x128ad
movl 0x18(%rbx), %r8d
movq 0x28(%rbx), %r9
movl 0x44(%rbx), %eax
movl 0x40(%rbx), %r10d
cmpl %r14d, %r8d
jae 0x128ad
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%rbx)
movl %r10d, %eax
movl (%r9,%rax,4), %r11d
je 0x127bc
movl %ecx, %eax
jmp 0x127cf
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r11d
jae 0x127a8
movl $0x1, %r15d
movl %edx, %ecx
shll %cl, %r15d
xorl %r11d, %r11d
cmpl %edx, %eax
ja 0x12814
subl %eax, %edx
movl %r10d, %ecx
movl (%r9,%rcx,4), %r11d
negb %al
movl %eax, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl %edx, %ecx
shll %cl, %r11d
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
movl %r10d, %r12d
testl %edx, %edx
je 0x12836
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl (%r9,%r12,4), %r13d
movl %eax, %ecx
shrl %cl, %r13d
negb %dl
movl %edx, %ecx
shll %cl, %r13d
shrl %cl, %r13d
orl %r13d, %r11d
orl %r15d, %r11d
decl %r11d
xorl %r15d, %r15d
movl %r11d, %edx
subl %eax, %edx
jae 0x1284b
movl %r11d, %edx
jmp 0x12871
movl (%r9,%r12,4), %r15d
negb %al
movl %eax, %ecx
shll %cl, %r15d
shrl %cl, %r15d
movl %edx, %ecx
shll %cl, %r15d
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
testl %edx, %edx
je 0x12893
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl %r10d, %ecx
movl (%r9,%rcx,4), %r12d
movl %eax, %ecx
shrl %cl, %r12d
negb %dl
movl %edx, %ecx
shll %cl, %r12d
shrl %cl, %r12d
orl %r12d, %r15d
btsl %r11d, %r15d
addl %r15d, %r8d
movl %r8d, 0x18(%rbx)
incl %esi
movl %esi, 0x14(%rbx)
cmpl %edi, %esi
jne 0x1279a
movl %edi, %esi
cmpl %r14d, 0x18(%rbx)
setbe %al
setb %cl
andb %bpl, %cl
cmpb $0x1, %cl
jne 0x128dd
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x130d8
movl 0xc(%rbx), %eax
movl 0x14(%rbx), %ecx
addl %ecx, %eax
incl %eax
jmp 0x128e9
movl 0x4(%rax), %eax
jmp 0x128e9
addl 0xc(%rbx), %esi
orb %al, %bpl
movzbl %bpl, %eax
addl %esi, %eax
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/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpl %esi, 0x4(%rax)
jbe 0x12a4b
movl %esi, %ebp
movq %rdi, %rbx
callq 0x120a8
movq %rbx, %rdi
movl %eax, %esi
callq 0x130d8
subl 0xc(%rbx), %ebp
movl 0x14(%rbx), %esi
cmpl %ebp, %esi
jae 0x12a44
movq 0x28(%rbx), %rdi
movl 0x44(%rbx), %eax
movl 0x40(%rbx), %r8d
movl 0x18(%rbx), %r9d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%rbx)
movl %r8d, %eax
movl (%rdi,%rax,4), %r10d
je 0x12955
movl %ecx, %eax
jmp 0x12968
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r10d
jae 0x12941
movl $0x1, %r11d
movl %edx, %ecx
shll %cl, %r11d
xorl %r10d, %r10d
cmpl %edx, %eax
ja 0x129ad
subl %eax, %edx
movl %r8d, %ecx
movl (%rdi,%rcx,4), %r10d
negb %al
movl %eax, %ecx
shll %cl, %r10d
shrl %cl, %r10d
movl %edx, %ecx
shll %cl, %r10d
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
movl %r8d, %r14d
testl %edx, %edx
je 0x129cf
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl (%rdi,%r14,4), %r15d
movl %eax, %ecx
shrl %cl, %r15d
negb %dl
movl %edx, %ecx
shll %cl, %r15d
shrl %cl, %r15d
orl %r15d, %r10d
orl %r11d, %r10d
decl %r10d
xorl %r11d, %r11d
movl %r10d, %edx
subl %eax, %edx
jae 0x129e4
movl %r10d, %edx
jmp 0x12a0a
movl (%rdi,%r14,4), %r11d
negb %al
movl %eax, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl %edx, %ecx
shll %cl, %r11d
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
testl %edx, %edx
je 0x12a2c
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl %r8d, %ecx
movl (%rdi,%rcx,4), %r14d
movl %eax, %ecx
shrl %cl, %r14d
negb %dl
movl %edx, %ecx
shll %cl, %r14d
shrl %cl, %r14d
orl %r14d, %r11d
btsl %r10d, %r11d
addl %r11d, %r9d
movl %r9d, 0x18(%rbx)
incl %esi
movl %esi, 0x14(%rbx)
cmpl %ebp, %esi
jb 0x1293c
addq $0x18, %rbx
movq %rbx, %rax
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12b5c
incl %eax
movl %eax, 0x14(%rbx)
movq 0x28(%rbx), %rdi
movl 0x44(%rbx), %edx
movl 0x40(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
decl %edx
movl %edx, 0x44(%rbx)
movl %ecx, %esi
movl (%rdi,%rsi,4), %esi
je 0x12a8d
movl %edx, %r8d
jmp 0x12a9f
incl %ecx
movl %ecx, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %r8d
incl %eax
btl %edx, %esi
movl %r8d, %edx
jae 0x12a7c
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
movl 0x44(%rbx), %ecx
xorl %r8d, %r8d
cmpl %eax, %ecx
ja 0x12adf
subl %ecx, %eax
movl 0x40(%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, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
testl %eax, %eax
je 0x12afe
movl 0x40(%rbx), %esi
movl 0x44(%rbx), %ecx
subl %eax, %ecx
movl %ecx, 0x44(%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 0x44(%rbx), %ecx
xorl %eax, %eax
movl %r8d, %esi
movl %r8d, %edx
subl %ecx, %esi
jb 0x12b32
movl 0x40(%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, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl %esi, %edx
testl %edx, %edx
je 0x12b50
movl 0x40(%rbx), %esi
movl 0x44(%rbx), %ecx
subl %edx, %ecx
movl %ecx, 0x44(%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
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
jmp 0x12b6c
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x130d8
movl 0x18(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
cmpl %esi, %eax
jbe 0x12b98
movl %esi, %ebp
movq %rdi, %rbx
callq 0x12226
movq %rbx, %rdi
movl %eax, %esi
callq 0x130d8
cmpl %ebp, 0x18(%rbx)
jbe 0x12b9e
movl (%r14), %eax
movl 0x4(%r14), %ecx
jmp 0x12bd6
movl 0x14(%rbx), %eax
cmpl 0x20(%rbx), %eax
jae 0x12bcd
leaq 0x28(%rbx), %r14
movl %ebp, %esi
subl 0x18(%rbx), %esi
jbe 0x12bcd
movq %r14, %rdi
callq 0x13268
testl %eax, %eax
je 0x12bcd
addl %eax, 0x18(%rbx)
movl 0x14(%rbx), %eax
incl %eax
movl %eax, 0x14(%rbx)
cmpl 0x20(%rbx), %eax
jb 0x12baa
movl 0x14(%rbx), %ecx
movl 0x18(%rbx), %eax
addl 0xc(%rbx), %ecx
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rdi), %rcx
movl (%rcx), %eax
cmpl %esi, %eax
jbe 0x12d60
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x12226
movq %rbx, %rdi
movl %eax, %esi
callq 0x130d8
movl 0x14(%rbx), %esi
movl 0x20(%rbx), %edi
cmpl %edi, %esi
jae 0x12d3b
movl 0x18(%rbx), %r8d
movq 0x28(%rbx), %r9
movl 0x44(%rbx), %eax
movl 0x40(%rbx), %r10d
cmpl %ebp, %r8d
jae 0x12d3b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%rbx)
movl %r10d, %eax
movl (%r9,%rax,4), %r11d
je 0x12c4c
movl %ecx, %eax
jmp 0x12c5f
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r11d
jae 0x12c38
movl $0x1, %r14d
movl %edx, %ecx
shll %cl, %r14d
xorl %r11d, %r11d
cmpl %edx, %eax
ja 0x12ca4
subl %eax, %edx
movl %r10d, %ecx
movl (%r9,%rcx,4), %r11d
negb %al
movl %eax, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl %edx, %ecx
shll %cl, %r11d
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
movl %r10d, %r15d
testl %edx, %edx
je 0x12cc6
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl (%r9,%r15,4), %r12d
movl %eax, %ecx
shrl %cl, %r12d
negb %dl
movl %edx, %ecx
shll %cl, %r12d
shrl %cl, %r12d
orl %r12d, %r11d
orl %r14d, %r11d
decl %r11d
xorl %r14d, %r14d
movl %r11d, %edx
subl %eax, %edx
jae 0x12cdb
movl %r11d, %edx
jmp 0x12d01
movl (%r9,%r15,4), %r14d
negb %al
movl %eax, %ecx
shll %cl, %r14d
shrl %cl, %r14d
movl %edx, %ecx
shll %cl, %r14d
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
testl %edx, %edx
je 0x12d23
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl %r10d, %ecx
movl (%r9,%rcx,4), %r15d
movl %eax, %ecx
shrl %cl, %r15d
negb %dl
movl %edx, %ecx
shll %cl, %r15d
shrl %cl, %r15d
orl %r15d, %r14d
btsl %r11d, %r14d
addl %r14d, %r8d
movl %r8d, 0x18(%rbx)
incl %esi
movl %esi, 0x14(%rbx)
cmpl %edi, %esi
jne 0x12c2a
cmpl %ebp, 0x18(%rbx)
jae 0x12d4d
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x130d8
movl 0x14(%rbx), %ecx
movl 0x18(%rbx), %eax
addl 0xc(%rbx), %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12d63
movl 0x4(%rcx), %ecx
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %esi
cmpl 0x20(%rdi), %esi
jae 0x12e86
incl %esi
movl %esi, 0x14(%rbx)
movq 0x28(%rbx), %rdi
movl 0x44(%rbx), %edx
movl 0x40(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
decl %edx
movl %edx, 0x44(%rbx)
movl %ecx, %r8d
movl (%rdi,%r8,4), %r8d
je 0x12da5
movl %edx, %r9d
jmp 0x12db7
incl %ecx
movl %ecx, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %r9d
incl %eax
btl %edx, %r8d
movl %r9d, %edx
jae 0x12d92
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
movl 0x44(%rbx), %ecx
xorl %r8d, %r8d
cmpl %eax, %ecx
ja 0x12dfa
subl %ecx, %eax
movl 0x40(%rbx), %r9d
movl (%rdi,%r9,4), %r8d
negb %cl
shll %cl, %r8d
shrl %cl, %r8d
movl %eax, %ecx
shll %cl, %r8d
leal 0x1(%r9), %ecx
movl %ecx, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
testl %eax, %eax
je 0x12e1e
movl 0x40(%rbx), %r9d
movl 0x44(%rbx), %ecx
subl %eax, %ecx
movl %ecx, 0x44(%rbx)
movl (%rdi,%r9,4), %r9d
shrl %cl, %r9d
negb %al
movl %eax, %ecx
shll %cl, %r9d
shrl %cl, %r9d
orl %r9d, %r8d
orl %edx, %r8d
decl %r8d
movl 0x44(%rbx), %ecx
xorl %r9d, %r9d
movl %r8d, %edx
movl %r8d, %eax
subl %ecx, %edx
jb 0x12e56
movl 0x40(%rbx), %eax
movl (%rdi,%rax,4), %r9d
negb %cl
shll %cl, %r9d
shrl %cl, %r9d
movl %edx, %ecx
shll %cl, %r9d
incl %eax
movl %eax, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl %edx, %eax
testl %eax, %eax
je 0x12e75
movl 0x40(%rbx), %edx
movl 0x44(%rbx), %ecx
subl %eax, %ecx
movl %ecx, 0x44(%rbx)
movl (%rdi,%rdx,4), %edx
shrl %cl, %edx
negb %al
movl %eax, %ecx
shll %cl, %edx
shrl %cl, %edx
orl %edx, %r9d
btsl %r8d, %r9d
addl 0x18(%rbx), %r9d
movl %r9d, 0x18(%rbx)
addl 0xc(%rbx), %esi
jmp 0x12e9a
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x130d8
movl 0xc(%rbx), %esi
movl 0x18(%rbx), %r9d
shlq $0x20, %rsi
movl %r9d, %eax
orq %rsi, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rdi), %rax
cmpl %esi, (%rax)
jbe 0x13023
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x12226
movq %r14, %rdi
movl %eax, %esi
callq 0x130d8
movl 0x14(%r14), %esi
movl 0x20(%r14), %edi
cmpl %edi, %esi
jae 0x13013
movl 0x18(%r14), %r8d
movq 0x28(%r14), %r9
movl 0x44(%r14), %eax
movl 0x40(%r14), %r10d
cmpl %ebx, %r8d
jae 0x13013
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%r14)
movl %r10d, %eax
movl (%r9,%rax,4), %r11d
je 0x12f24
movl %ecx, %eax
jmp 0x12f38
incl %r10d
movl %r10d, 0x40(%r14)
movl $0x20, 0x44(%r14)
movl $0x20, %eax
incl %edx
btl %ecx, %r11d
jae 0x12f0f
movl $0x1, %ebp
movl %edx, %ecx
shll %cl, %ebp
xorl %r11d, %r11d
cmpl %edx, %eax
ja 0x12f7c
subl %eax, %edx
movl %r10d, %ecx
movl (%r9,%rcx,4), %r11d
negb %al
movl %eax, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl %edx, %ecx
shll %cl, %r11d
incl %r10d
movl %r10d, 0x40(%r14)
movl $0x20, 0x44(%r14)
movl $0x20, %eax
movl %r10d, %r15d
testl %edx, %edx
je 0x12f9f
subl %edx, %eax
movl %eax, 0x44(%r14)
movl (%r9,%r15,4), %r12d
movl %eax, %ecx
shrl %cl, %r12d
negb %dl
movl %edx, %ecx
shll %cl, %r12d
shrl %cl, %r12d
orl %r12d, %r11d
orl %ebp, %r11d
decl %r11d
xorl %ebp, %ebp
movl %r11d, %edx
subl %eax, %edx
jae 0x12fb3
movl %r11d, %edx
jmp 0x12fd7
movl (%r9,%r15,4), %ebp
negb %al
movl %eax, %ecx
shll %cl, %ebp
shrl %cl, %ebp
movl %edx, %ecx
shll %cl, %ebp
incl %r10d
movl %r10d, 0x40(%r14)
movl $0x20, 0x44(%r14)
movl $0x20, %eax
testl %edx, %edx
je 0x12ffa
subl %edx, %eax
movl %eax, 0x44(%r14)
movl %r10d, %ecx
movl (%r9,%rcx,4), %r15d
movl %eax, %ecx
shrl %cl, %r15d
negb %dl
movl %edx, %ecx
shll %cl, %r15d
shrl %cl, %r15d
orl %r15d, %ebp
btsl %r11d, %ebp
addl %ebp, %r8d
movl %r8d, 0x18(%r14)
incl %esi
movl %esi, 0x14(%r14)
cmpl %edi, %esi
jne 0x12f01
cmpl %ebx, 0x18(%r14)
sete %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x13061
movl (%rbx), %ecx
cmpl %esi, %ecx
ja 0x1305f
incl %esi
movl %esi, (%rbx)
subl %ecx, %esi
incl %eax
movl %eax, 0x4(%rbx)
movq 0x18(%rbx), %rdi
callq 0x10c1e
testb %al, %al
je 0x1306a
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x126f4
movq %rbx, %rdi
popq %rbx
jmp 0x125fa
nop