LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::Array::Iterator::nextItem()
usint
Array::Iterator::nextItem()
{
  if(this->cur >= this->block_items)
  {
    this->getSample(this->block + 1);
  }

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl 0x14(%rdi), %eax
jb 0x109e0
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x10e1c
movl 0x10(%rbx), %eax
incl %eax
movl %eax, 0x10(%rbx)
movq 0x18(%rbx), %rdi
movl 0x34(%rbx), %esi
movl 0x30(%rbx), %r8d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %esi, %eax
decl %eax
movl %eax, 0x34(%rbx)
movl %r8d, %ecx
movl (%rdi,%rcx,4), %ecx
je 0x10a08
movl %eax, %esi
jmp 0x10a1b
incl %r8d
movl %r8d, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
movl $0x20, %esi
incl %edx
btl %eax, %ecx
jae 0x109f5
movl $0x1, %eax
movl %edx, %ecx
shll %cl, %eax
xorl %r9d, %r9d
cmpl %edx, %esi
ja 0x10a5e
subl %esi, %edx
movl %r8d, %ecx
movl (%rdi,%rcx,4), %r9d
negb %sil
movl %esi, %ecx
shll %cl, %r9d
shrl %cl, %r9d
movl %edx, %ecx
shll %cl, %r9d
incl %r8d
movl %r8d, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
movl $0x20, %esi
movl %r8d, %r10d
testl %edx, %edx
je 0x10a80
subl %edx, %esi
movl %esi, 0x34(%rbx)
movl (%rdi,%r10,4), %r11d
movl %esi, %ecx
shrl %cl, %r11d
negb %dl
movl %edx, %ecx
shll %cl, %r11d
shrl %cl, %r11d
orl %r11d, %r9d
orl %eax, %r9d
decl %r9d
xorl %eax, %eax
movl %r9d, %edx
subl %esi, %edx
jae 0x10a94
movl %r9d, %edx
jmp 0x10ab8
movl (%rdi,%r10,4), %eax
negb %sil
movl %esi, %ecx
shll %cl, %eax
shrl %cl, %eax
movl %edx, %ecx
shll %cl, %eax
incl %r8d
movl %r8d, 0x30(%rbx)
movl $0x20, 0x34(%rbx)
movl $0x20, %esi
testl %edx, %edx
je 0x10ad5
subl %edx, %esi
movl %esi, 0x34(%rbx)
movl %r8d, %ecx
movl (%rdi,%rcx,4), %edi
movl %esi, %ecx
shrl %cl, %edi
negb %dl
movl %edx, %ecx
shll %cl, %edi
shrl %cl, %edi
orl %edi, %eax
btsl %r9d, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::ArrayEncoder::ArrayEncoder(unsigned int, unsigned int)
ArrayEncoder::ArrayEncoder(usint block_bytes, usint superblock_size) :
  items(0), blocks(1),
  block_size(BYTES_TO_WORDS(block_bytes)),
  superblock_bytes(superblock_size)
{
  this->array = new usint[this->superblock_bytes / sizeof(usint)];
  memset(this->array, 0, this->superblock_bytes);
  this->blocks_in_superblock = this->superblock_bytes / (sizeof(usint) * this->block_size);
  this->current_blocks = 1;

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

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

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x10c49
callq 0x3300
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x10c5a
movq %r14, %rdi
callq 0x11462
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
leaq 0x18(%rbx), %r15
movq 0x18(%rbx), %r14
cmpq %r15, %r14
je 0x10c87
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x10c82
callq 0x3300
movq (%r14), %r14
jmp 0x10c6f
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x10c95
callq 0x3300
movq 0x40(%rbx), %r14
addq $0x40, %rbx
cmpq %rbx, %r14
je 0x10cbb
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x10cb0
callq 0x3300
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x10ca2
movq (%rbx), %r14
cmpq %rbx, %r14
je 0x10cd8
movq (%r14), %r12
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
movq %r12, %r14
cmpq %rbx, %r12
jne 0x10cc0
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x10cf5
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x3270
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x10ce0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/array.cpp
// Function: CSA::ArrayEncoder::writeItem(unsigned int)
void
ArrayEncoder::writeItem(usint value)
{
  this->items++;
  if(this->buffer->writeDeltaCode(value)) { return; }

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

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

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

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

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

// Assembly:
movl %esi, 0x8(%rdi)
movl 0x4c(%rdi), %r10d
movl %r10d, %ecx
imull %esi, %ecx
movl %ecx, %r9d
shrl $0x5, %r9d
movl %r9d, 0x58(%rdi)
andl $0x1f, %ecx
movl $0x20, %eax
movl $0x20, %r11d
subl %ecx, %r11d
movl %r11d, 0x5c(%rdi)
leal 0x1(%rsi), %edx
movl %edx, 0x60(%rdi)
xorl %r8d, %r8d
movl %r10d, %edx
subl %r11d, %edx
jae 0x10e62
movl %r11d, %eax
movl %r10d, %edx
jmp 0x10e86
movq 0x40(%rdi), %r8
movl %r9d, %r11d
movl (%r8,%r11,4), %r8d
shll %cl, %r8d
shrl %cl, %r8d
movl %edx, %ecx
shll %cl, %r8d
incl %r9d
movl %r9d, 0x58(%rdi)
movl $0x20, 0x5c(%rdi)
pushq %rbx
movl %r9d, %ebx
testl %edx, %edx
je 0x10ead
subl %edx, %eax
movl %eax, 0x5c(%rdi)
movq 0x40(%rdi), %rcx
movl (%rcx,%rbx,4), %r11d
movl %eax, %ecx
shrl %cl, %r11d
negb %dl
movl %edx, %ecx
shll %cl, %r11d
shrl %cl, %r11d
orl %r11d, %r8d
movl %r8d, 0xc(%rdi)
movl $0x0, 0x10(%rdi)
leal 0x2(%rsi), %ecx
movl %ecx, 0x60(%rdi)
xorl %r11d, %r11d
movl %r10d, %edx
subl %eax, %edx
jae 0x10ecd
movl %r10d, %edx
jmp 0x10ef7
movq 0x40(%rdi), %rcx
movl (%rcx,%rbx,4), %r11d
negb %al
movl %eax, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl %edx, %ecx
shll %cl, %r11d
incl %r9d
movl %r9d, 0x58(%rdi)
movl $0x20, 0x5c(%rdi)
movl $0x20, %eax
testl %edx, %edx
je 0x10f1d
subl %edx, %eax
movl %eax, 0x5c(%rdi)
movq 0x40(%rdi), %rcx
movl %r9d, %r9d
movl (%rcx,%r9,4), %r9d
movl %eax, %ecx
shrl %cl, %r9d
negb %dl
movl %edx, %ecx
shll %cl, %r9d
shrl %cl, %r9d
orl %r9d, %r11d
subl %r8d, %r11d
movl %r11d, 0x14(%rdi)
movq (%rdi), %rax
addq $0x18, %rdi
imull 0x1c(%rax), %esi
shlq $0x2, %rsi
addq 0x10(%rax), %rsi
popq %rbx
jmp 0x11306
nop
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/bitbuffer.cpp
// Function: CSA::ReadBuffer::ReadBuffer(_IO_FILE*, unsigned int)
ReadBuffer::ReadBuffer(FILE* file, usint words) :
  size(words),
  item_bits(1),
  items(0),
  free_buffer(true)
{
  usint* buffer = new usint[this->size];
  memset(buffer, 0, this->size * sizeof(usint));
  if(file != 0)
  {
    if(!std::fread(buffer, this->size * sizeof(usint), 1, file)) { return; }
  }
  this->data = buffer;
  this->reset();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x8(%rdi)
movq $0x1, 0xc(%rdi)
movb $0x1, 0x14(%rdi)
movl %edx, %r12d
shlq $0x2, %r12
movq %r12, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3150
testq %r14, %r14
je 0x11109
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x3360
testq %rax, %rax
je 0x11121
movq %r15, (%rbx)
movabsq $0x2000000000, %rax     # imm = 0x2000000000
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1120c
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x3360
testq %rax, %rax
je 0x11224
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_O3/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 0x11323
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x11323
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_O3/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 0x114ab
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 0x114bd
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 0x114e3
movb $0x1, 0x14(%rax)
movb $0x0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1153d
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1153d
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_O3/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 0x11c42
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11cc6
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 0x111a8
movq %r15, 0x18(%rbx)
movq %rbx, %rdi
callq 0x116ca
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11936
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/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 0x11cbe
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11cbe
leaq 0x4(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11cbe
leaq 0x14(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3360
testq %rax, %rax
je 0x11cbe
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_O3/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 0x11d1c
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 0x11d13
movq %r15, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
testl %edx, %edx
je 0x12043
cmpq $0x0, 0x30(%rbx)
jne 0x12043
movq 0x38(%rbx), %rax
movq %rax, 0x8(%rdi)
movq $0x0, 0x38(%rbx)
jmp 0x120fd
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(%rbx), %r14
movq 0x20(%rbx), %r12
movq %rbx, (%rsp)
movl 0x10(%rbx), %r13d
cmpq %r14, %r12
je 0x120a1
movl %r13d, %ebx
shrl $0x2, %ebx
xorl %ebp, %ebp
movl %ebp, %eax
leaq (%r15,%rax,4), %rdi
movq 0x10(%r12), %rsi
movq %r13, %rdx
callq 0x31f0
movq (%r12), %r12
addl %ebx, %ebp
cmpq %r14, %r12
jne 0x12081
jmp 0x120aa
shrl $0x2, %r13d
xorl %ebp, %ebp
movl %r13d, %ebx
movq 0x8(%rsp), %r12
movl %r12d, %r14d
subl %ebp, %r14d
cmpl %r14d, %ebx
cmovbl %ebx, %r14d
movl %ebp, %eax
leaq (%r15,%rax,4), %rdi
movq (%rsp), %rax
movq 0x38(%rax), %rsi
leal (,%r14,4), %edx
callq 0x31f0
addl %ebp, %r14d
subl %r14d, %r12d
jbe 0x120f4
movl %r14d, %eax
leaq (%r15,%rax,4), %rdi
shlq $0x2, %r12
xorl %esi, %esi
movq %r12, %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
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12135
callq 0x3300
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x12146
movq %r14, %rdi
callq 0x112b6
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x12164
movq %r14, %rdi
callq 0x112b6
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x12182
movq %rbx, %rdi
callq 0x112b6
movl $0x28, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3270
// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/bits/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 0x122f1
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_O3/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 0x12333
callq 0x11348
addl %eax, %ebx
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x12343
callq 0x11348
addl %eax, %ebx
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x12353
callq 0x11348
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12452
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x12466
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 0x1248d
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, %r8d
imull %ecx, %r8d
movl %r8d, %r11d
shrl $0x5, %r11d
movl %r11d, 0x68(%rdi)
andl $0x1e, %r8d
movl $0x20, %edx
subl %r8d, %edx
movl %edx, 0x6c(%rdi)
movl %ecx, 0x70(%rdi)
cmpl %r9d, %eax
jae 0x1257e
leal (%rax,%rax), %ebx
movq 0x50(%rdi), %r14
addl $0x3, %ebx
movl %ebx, 0x70(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x124e8
movl %r10d, %r8d
jmp 0x1250f
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 0x12535
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 0x1257e
movl %edx, %ecx
subl %r10d, %ecx
ja 0x12562
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)
leal 0x1(%rbx), %edx
movl %edx, 0x70(%rdi)
incl %eax
addl $0x2, %ebx
movl %ecx, %edx
cmpl %eax, %r9d
jne 0x124d6
movl %r9d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x125ca
movl %ebp, %r8d
movl %ebx, %edx
jmp 0x125de
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 0x12605
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, %r8d
imull %ecx, %r8d
movl %r8d, %r11d
shrl $0x5, %r11d
movl %r11d, 0x68(%rdi)
andl $0x1f, %r8d
movl $0x20, %edx
subl %r8d, %edx
movl %edx, 0x6c(%rdi)
movl %ecx, 0x70(%rdi)
cmpl %r9d, %eax
jae 0x126f6
leal (%rax,%rax), %ebx
movq 0x50(%rdi), %r14
addl $0x5, %ebx
leal -0x1(%rbx), %ecx
movl %ecx, 0x70(%rdi)
xorl %ebp, %ebp
movl %r10d, %r8d
subl %edx, %r8d
jae 0x12663
movl %r10d, %r8d
jmp 0x1268a
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 0x126b0
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 0x126f6
movl %edx, %ecx
subl %r10d, %ecx
ja 0x126dd
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 0x1264e
movl %r9d, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x127e3
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 0x1140a
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 0x12815
movl $0x28, %edi
callq 0x3260
movq %rax, %r14
addq $0x3, %r12
shrq $0x2, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x1140a
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 0x1283c
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x3270
jmp 0x12846
movq %rax, %rbx
movq 0x8(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x12868
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x12853
movq 0x10(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x1288a
movq (%rdi), %r14
movl $0x18, %esi
callq 0x3270
movq %r14, %rdi
cmpq %r15, %r14
jne 0x12875
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x128ab
callq 0x3300
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x128bc
movq %r14, %rdi
callq 0x11462
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
leaq 0x20(%rbx), %r15
movq 0x20(%rbx), %r14
cmpq %r15, %r14
je 0x128e9
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x128e4
callq 0x3300
movq (%r14), %r14
jmp 0x128d1
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x128f7
callq 0x3300
movq 0x48(%rbx), %r14
addq $0x48, %rbx
cmpq %rbx, %r14
je 0x1291d
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x12912
callq 0x3300
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x12904
movq (%rbx), %r14
cmpq %rbx, %r14
je 0x1293a
movq (%r14), %r12
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
movq %r12, %r14
cmpq %rbx, %r12
jne 0x12922
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x12957
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x3270
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x12942
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x129d7
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), %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 0x3150
movl $0x1, 0x44(%rbx)
jmp 0x129db
movq 0x38(%rbx), %r14
movq 0x18(%rbx), %rdi
imull 0xc(%rbx), %r12d
leaq (%r14,%r12,4), %rsi
callq 0x11520
cmpb $0x1, 0x14(%rbx)
jne 0x12a63
movl 0x6c(%rbx), %ecx
incl %ecx
movl %ecx, 0x6c(%rbx)
cmpl 0x68(%rbx), %ecx
jbe 0x12a3f
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)
xorl %ecx, %ecx
jmp 0x12a4a
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_O3/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 0x12c5c
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x12586
movq %rbx, %rdi
movl %eax, %esi
callq 0x135a4
movl 0x20(%rbx), %r8d
movl 0x14(%rbx), %edi
movl 0x18(%rbx), %esi
cmpl %r8d, %edi
jae 0x12c2a
movq 0x28(%rbx), %r9
movl 0x44(%rbx), %eax
movl 0x40(%rbx), %r10d
cmpl %ebp, %esi
jae 0x12c2a
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%rbx)
movl %r10d, %eax
movl (%r9,%rax,4), %r11d
je 0x12b38
movl %ecx, %eax
jmp 0x12b4b
incl %r10d
movl %r10d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r11d
jae 0x12b24
movl $0x1, %r15d
movl %edx, %ecx
shll %cl, %r15d
xorl %r11d, %r11d
cmpl %edx, %eax
ja 0x12b90
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 0x12bb2
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 0x12bc7
movl %r11d, %edx
jmp 0x12bed
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 0x12c0f
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, %esi
movl %esi, 0x18(%rbx)
incl %edi
movl %edi, 0x14(%rbx)
cmpl %r8d, %edi
jne 0x12b17
movl %r8d, %edi
addl 0xc(%rbx), %edi
cmpl %ebp, %esi
setbe %al
orb %r14b, %al
movzbl %al, %eax
addl %edi, %eax
testb %r14b, %r14b
je 0x12c5f
cmpl %ebp, %esi
jae 0x12c5f
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x135a4
movl 0xc(%rbx), %eax
movl 0x14(%rbx), %ecx
addl %ecx, %eax
incl %eax
jmp 0x12c5f
movl 0x4(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12dc1
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1240e
movq %rbx, %rdi
movl %eax, %esi
callq 0x135a4
subl 0xc(%rbx), %ebp
movl 0x14(%rbx), %esi
cmpl %ebp, %esi
jae 0x12dba
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 0x12ccb
movl %ecx, %eax
jmp 0x12cde
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r10d
jae 0x12cb7
movl $0x1, %r11d
movl %edx, %ecx
shll %cl, %r11d
xorl %r10d, %r10d
cmpl %edx, %eax
ja 0x12d23
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 0x12d45
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 0x12d5a
movl %r10d, %edx
jmp 0x12d80
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 0x12da2
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 0x12cb2
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_O3/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 0x12e92
incl %eax
movl %eax, 0x14(%rbx)
movq 0x28(%rbx), %rdi
movl 0x44(%rbx), %esi
movl 0x40(%rbx), %r8d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %esi, %eax
decl %eax
movl %eax, 0x44(%rbx)
movl %r8d, %ecx
movl (%rdi,%rcx,4), %ecx
je 0x12e06
movl %eax, %esi
jmp 0x12e19
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %esi
incl %edx
btl %eax, %ecx
jae 0x12df3
movl $0x1, %eax
movl %edx, %ecx
shll %cl, %eax
xorl %r9d, %r9d
cmpl %edx, %esi
ja 0x12e5c
subl %esi, %edx
movl %r8d, %ecx
movl (%rdi,%rcx,4), %r9d
negb %sil
movl %esi, %ecx
shll %cl, %r9d
shrl %cl, %r9d
movl %edx, %ecx
shll %cl, %r9d
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %esi
movl %r8d, %r10d
testl %edx, %edx
je 0x12e7e
subl %edx, %esi
movl %esi, 0x44(%rbx)
movl (%rdi,%r10,4), %r11d
movl %esi, %ecx
shrl %cl, %r11d
negb %dl
movl %edx, %ecx
shll %cl, %r11d
shrl %cl, %r11d
orl %r11d, %r9d
orl %eax, %r9d
decl %r9d
xorl %eax, %eax
movl %r9d, %edx
subl %esi, %edx
jae 0x12ea4
movl %r9d, %edx
jmp 0x12ec8
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x135a4
movl 0x18(%rbx), %eax
jmp 0x12eef
movl (%rdi,%r10,4), %eax
negb %sil
movl %esi, %ecx
shll %cl, %eax
shrl %cl, %eax
movl %edx, %ecx
shll %cl, %eax
incl %r8d
movl %r8d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %esi
testl %edx, %edx
je 0x12ee5
subl %edx, %esi
movl %esi, 0x44(%rbx)
movl %r8d, %ecx
movl (%rdi,%rcx,4), %edi
movl %esi, %ecx
shrl %cl, %edi
negb %dl
movl %edx, %ecx
shll %cl, %edi
shrl %cl, %edi
orl %edi, %eax
btsl %r9d, %eax
addl 0x18(%rbx), %eax
movl %eax, 0x18(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq (%rdi), %r14
movl (%r14), %esi
cmpl %ebp, %esi
jbe 0x12f27
movq %rdi, %rbx
movl %ebp, %esi
callq 0x12586
movq %rbx, %rdi
movl %eax, %esi
callq 0x135a4
movl 0x18(%rbx), %esi
cmpl %ebp, %esi
jbe 0x12f30
movl (%r14), %esi
movl 0x4(%r14), %edi
jmp 0x13089
movl 0x14(%rbx), %edi
movl 0x20(%rbx), %eax
movl %eax, (%rsp)
cmpl %eax, %edi
jae 0x13086
movq 0x28(%rbx), %r9
movl 0x40(%rbx), %r11d
movl 0x44(%rbx), %r10d
movl %ebp, 0x4(%rsp)
movl %ebp, %r15d
subl %esi, %r15d
jbe 0x13086
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r11d, %r14d
movl %r10d, %eax
movl %eax, %ecx
decl %ecx
movl %ecx, 0x44(%rbx)
movl %r14d, %eax
movl (%r9,%rax,4), %r8d
je 0x12f7c
movl %ecx, %eax
jmp 0x12f8f
incl %r14d
movl %r14d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
incl %edx
btl %ecx, %r8d
jae 0x12f68
movl $0x1, %r13d
movl %edx, %ecx
shll %cl, %r13d
xorl %r12d, %r12d
cmpl %edx, %eax
ja 0x12fd4
subl %eax, %edx
movl %r14d, %ecx
movl (%r9,%rcx,4), %r12d
negb %al
movl %eax, %ecx
shll %cl, %r12d
shrl %cl, %r12d
movl %edx, %ecx
shll %cl, %r12d
incl %r14d
movl %r14d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
movl %r14d, %r8d
testl %edx, %edx
je 0x12ff3
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl (%r9,%r8,4), %ebp
movl %eax, %ecx
shrl %cl, %ebp
negb %dl
movl %edx, %ecx
shll %cl, %ebp
shrl %cl, %ebp
orl %ebp, %r12d
orl %r13d, %r12d
decl %r12d
xorl %r13d, %r13d
movl %r12d, %edx
subl %eax, %edx
jae 0x13008
movl %r12d, %edx
jmp 0x1302e
movl (%r9,%r8,4), %r13d
negb %al
movl %eax, %ecx
shll %cl, %r13d
shrl %cl, %r13d
movl %edx, %ecx
shll %cl, %r13d
incl %r14d
movl %r14d, 0x40(%rbx)
movl $0x20, 0x44(%rbx)
movl $0x20, %eax
testl %edx, %edx
je 0x13050
subl %edx, %eax
movl %eax, 0x44(%rbx)
movl %r14d, %ecx
movl (%r9,%rcx,4), %r8d
movl %eax, %ecx
shrl %cl, %r8d
negb %dl
movl %edx, %ecx
shll %cl, %r8d
shrl %cl, %r8d
orl %r8d, %r13d
btsl %r12d, %r13d
cmpl %r15d, %r13d
ja 0x1307e
addl %r13d, %esi
movl %esi, 0x18(%rbx)
incl %edi
movl %edi, 0x14(%rbx)
movl %eax, %r10d
movl %r14d, %r11d
cmpl (%rsp), %edi
movl 0x4(%rsp), %ebp
jne 0x12f51
movl (%rsp), %eax
movl %eax, %edi
jmp 0x13086
movl %r11d, 0x40(%rbx)
movl %r10d, 0x44(%rbx)
addl 0xc(%rbx), %edi
shlq $0x20, %rdi
movl %esi, %eax
orq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop