LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/strategy.cpp
// Function: update_seq_str(std::vector<xpair, std::allocator<xpair>>, int*)
vector<xpair> update_seq_str(vector<xpair> seq, int tab[SIZE])
{	
	vector<xpair> tmp_seq;
	for(int i = 0; i < seq.size(); i++)
	{	
		if(!seq[i].flag)
		{
			tmp_seq.push_back(seq[i]);
		}
	}

	for(int i = seq.size() - 1; i >= 0; i--)
	{	

		if(seq[i].flag)
		{	
			xpair new_ele;
			new_ele.src = tab[seq[i].dst];
			new_ele.dst = tab[seq[i].src];
			new_ele.flag = false;
			tmp_seq.push_back(new_ele);
		}
	}
	return tmp_seq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rdx
movq 0x8(%rsi), %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
subq %rdx, %rax
je 0x3c5e
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpb $0x0, 0x8(%rdx,%r13)
jne 0x3c3e
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3c36
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x3c3e
movq %rbx, %rdi
callq 0x4776
incq %rbp
movq (%r15), %rdx
movq 0x8(%r15), %rax
subq %rdx, %rax
sarq $0x2, %rax
imulq %r12, %rax
addq $0xc, %r13
cmpq %rbp, %rax
ja 0x3c0e
jmp 0x3c66
sarq $0x2, %rax
imulq %r12, %rax
decl %eax
js 0x3ce4
movl %eax, %r13d
leaq (,%r13,2), %rax
addq %r13, %rax
incq %r13
leaq 0x8(,%rax,4), %rbp
leaq 0xc(%rsp), %r12
movq (%r15), %rax
cmpb $0x1, (%rax,%rbp)
jne 0x3cdb
movslq -0x4(%rax,%rbp), %rcx
movl (%r14,%rcx,4), %ecx
movl %ecx, 0xc(%rsp)
movslq -0x8(%rax,%rbp), %rax
movl (%r14,%rax,4), %eax
movl %eax, 0x10(%rsp)
movb $0x0, 0x14(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3cd0
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0xc(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x3cdb
movq %rbx, %rdi
movq %r12, %rdx
callq 0x4776
addq $-0xc, %rbp
decq %r13
jg 0x3c88
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3cf8
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d0f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/strategy.cpp
// Function: get_ones(std::vector<std::bitset<32ul>, std::allocator<std::bitset<32ul>>>)
int get_ones(vector<ROW> m)
{
	int s = 0;
	for(int i = 0; i < m.size(); i++)
		s += m[i].count();
	return s;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
je 0x4508
pushq %rbx
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %esi, %esi
movabsq $0x5555555555555555, %rdi # imm = 0x5555555555555555
movabsq $0x3333333333333333, %r8 # imm = 0x3333333333333333
movabsq $0xf0f0f0f0f0f0f0f, %r9 # imm = 0xF0F0F0F0F0F0F0F
movabsq $0x101010101010101, %r10 # imm = 0x101010101010101
xorl %eax, %eax
movq (%rcx,%rsi,8), %r11
movq %r11, %rbx
shrq %rbx
andq %rdi, %rbx
subq %rbx, %r11
movq %r11, %rbx
andq %r8, %rbx
shrq $0x2, %r11
andq %r8, %r11
addq %rbx, %r11
movq %r11, %rbx
shrq $0x4, %rbx
addq %r11, %rbx
andq %r9, %rbx
imulq %r10, %rbx
shrq $0x38, %rbx
addl %ebx, %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x44c7
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: get_reduced_matrix(std::vector<xpair, std::allocator<xpair>>, std::vector<std::bitset<32ul>, std::allocator<std::bitset<32ul>>>)
vector<ROW> get_reduced_matrix(vector<xpair> seq, vector<ROW> m)
{
	vector<ROW> tmp_m(m);
	for(int i = 0; i < seq.size(); i++)
		tmp_m[seq[i].dst] ^= tmp_m[seq[i].src];
	return tmp_m;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x2ea0
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
je 0x4e57
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
movq (%rbx), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
addq $0x4, %rax
movslq -0x4(%rax), %rsi
movslq (%rax), %rdi
movq (%rdx,%rsi,8), %rsi
xorq %rsi, (%rdx,%rdi,8)
addq $0xc, %rax
decq %rcx
jne 0x4e3f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: get_identity()
vector<ROW> get_identity()
{
	vector<ROW> m;
	ROW tmp(0);
	for(int i = 0; i < SIZE; i++)
	{
		m.push_back(tmp);
		m[i][SIZE - 1 - i] = 1;
	}
	return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsp, %r14
movq %r12, (%r14)
movl $0x1f, %r15d
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4e9e
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4ea9
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4bce
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movq (%rbx), %rcx
orq %rax, (%rcx,%r12)
addq $0x8, %r12
addq $-0x1, %r15
jb 0x4e86
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4eeb
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: delete_table(int**, int)
void delete_table(int** table, int size)
{
	if(table != NULL)
	{
		for(int i = 0; i < size; i++)
			delete[] table[i];
		delete[] table;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x51af
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jle 0x51a2
movl %esi, %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x519a
callq 0x21c0
incq %r15
cmpq %r15, %r14
jne 0x518c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21c0
retq
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: exchange_set(std::vector<xpair, std::allocator<xpair>>, int, int, xpair)
bool exchange_set(vector<xpair> seq, int start, int end, xpair p)
{
	if(start <= end)
	{
		for(int i = start; i <= end; i++)
		{
			if(!exchange(p, seq[i]))
				return false;
		}
	}
	else
	{
		for(int i = start; i >= end; i--)
		{
			if(!exchange(p, seq[i]))
				return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rcx, %rax
shrq $0x20, %rax
movq (%rdi), %r9
movslq %esi, %r8
movslq %edx, %rdi
cmpl %edx, %esi
jle 0x520b
leaq (%r8,%r8,2), %rdx
incq %r8
leaq (%r9,%rdx,4), %rdx
xorl %esi, %esi
movq (%rdx), %r9
movq %r9, %r10
shrq $0x20, %r10
cmpl %r10d, %eax
sete %r11b
cmpl %r9d, %ecx
sete %bl
orb %r11b, %bl
jne 0x51f9
cmpl %r10d, %ecx
je 0x5256
cmpl %r9d, %eax
je 0x5256
decq %r8
addq $-0xc, %rdx
cmpq %rdi, %r8
setle %sil
jg 0x51d3
jmp 0x5266
leaq (%r8,%r8,2), %rsi
leaq (%r9,%rsi,4), %rsi
subl %r8d, %edx
incl %edx
xorl %r9d, %r9d
movq (%rsi), %r10
movq %r10, %r11
shrq $0x20, %r11
cmpl %r11d, %eax
sete %bl
cmpl %r10d, %ecx
sete %bpl
orb %bl, %bpl
jne 0x5241
cmpl %r11d, %ecx
je 0x5260
cmpl %r10d, %eax
je 0x5260
cmpq %rdi, %r8
leaq 0x1(%r8), %r8
setge %r9b
addq $0xc, %rsi
decl %edx
jne 0x521b
jmp 0x5266
testb $0x1, %sil
jne 0x5266
xorl %eax, %eax
jmp 0x5268
testb $0x1, %r9b
je 0x525c
movb $0x1, %al
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: check_consistence(std::vector<xpair, std::allocator<xpair>>)
bool check_consistence(vector<xpair> seq)
{
	vector<ROW> m = get_matrix();
	for(int i = 0; i < seq.size(); i++)
		m[seq[i].dst] ^= m[seq[i].src];
	if(get_ones(m) == SIZE)
		return true;
	else
		return false;

}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x4cf8
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
je 0x681b
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
movq (%rsp), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
addq $0x4, %rax
movslq -0x4(%rax), %rsi
movslq (%rax), %rdi
movq (%rdx,%rsi,8), %rsi
xorq %rsi, (%rdx,%rdi,8)
addq $0xc, %rax
decq %rcx
jne 0x6803
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2ea0
leaq 0x18(%rsp), %rdi
callq 0x4482
movl %eax, %ebx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x684b
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6861
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
cmpl $0x20, %ebx
sete %al
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x688c
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
jmp 0x688c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x68a2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::RLCSA(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int, bool)
RLCSA::RLCSA(uchar* data, usint bytes, usint block_size, usint sa_sample_rate, usint threads, bool delete_data) :
  ok(false),
  alphabet(0),
  sa_samples(0), support_locate(false), support_display(false),
  sample_rate(sa_sample_rate), end_points(0)
{
  for(usint c = 0; c < CHARS; c++) { this->array[c] = 0; }
 
  if(!data || bytes == 0)
  {
    std::cerr << "RLCSA: No input data given!" << std::endl;
    if(delete_data) { delete[] data; }
    return;
  }
  if(block_size < 2 * sizeof(usint) || block_size % sizeof(usint) != 0)
  {
    std::cerr << "RLCSA: Block size must be a multiple of " << sizeof(usint) << " bytes!" << std::endl;
    if(delete_data) { delete[] data; }
    return;
  }

  this->buildRLCSA(data, 0, bytes, block_size, threads, 0, true, delete_data);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r12
movb 0x40(%rsp), %r13b
movb $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x808(%rdi)
movw $0x0, 0x818(%rdi)
movl %r8d, 0x81c(%rdi)
movq $0x0, 0x828(%rdi)
addq $0x8, %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x3150
testq %rbx, %rbx
setne %al
testl %r15d, %r15d
setne %cl
testb %cl, %al
jne 0x5ce5
testq %rbx, %rbx
sete %bpl
movq 0x19359(%rip), %r14     # 0x1eff0
leaq 0x116d9(%rip), %rsi     # 0x17377
movl $0x1b, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
xorb $0x1, %r13b
orb %bpl, %r13b
je 0x5d98
addq $0x8, %rsp
jmp 0x5d1e
cmpl $0x8, %r14d
setae %al
testb $0x3, %r14b
sete %cl
testb %cl, %al
je 0x5d29
subq $0x8, %rsp
movzbl %r13b, %eax
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebp, %r9d
pushq %rax
pushq $0x1
pushq $0x0
callq 0x5dae
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x192c0(%rip), %r14     # 0x1eff0
leaq 0x1165c(%rip), %rsi     # 0x17393
movl $0x28, %edx
movq %r14, %rdi
callq 0x32b0
movl $0x4, %esi
movq %r14, %rdi
callq 0x3180
movq %rax, %r14
leaq 0x11661(%rip), %rsi     # 0x173bc
movl $0x7, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
testb %r13b, %r13b
je 0x5cdf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3300
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::RLCSA(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int, CSA::Sampler*, bool)
RLCSA::RLCSA(uchar* data, usint bytes, usint block_size, usint sa_sample_rate, usint threads, Sampler* sampler, bool delete_data) :
  ok(false),
  alphabet(0),
  sa_samples(0), support_locate(false), support_display(false),
  sample_rate(sa_sample_rate),
  end_points(0)
{
  for(usint c = 0; c < CHARS; c++) { this->array[c] = 0; }

  if(!data || bytes == 0)
  {
    std::cerr << "RLCSA: No input data given!" << std::endl;
    if(delete_data) { delete[] data; }
    return;
  }
  if(block_size < 2 * sizeof(usint) || block_size % sizeof(usint) != 0)
  {
    std::cerr << "RLCSA: Block size must be a multiple of " << sizeof(usint) << " bytes!" << std::endl;
    if(delete_data) { delete[] data; }
    return;
  }
  if(sampler != 0 && sampler->getStatus() != Sampler::SAMPLED)
  {
    std::cerr << "RLCSA: No samples given!" << std::endl;
    if(delete_data) { delete[] data; }
    return;
  }

  this->buildRLCSA(data, 0, bytes, block_size, threads, sampler, false, delete_data);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r12
movb 0x48(%rsp), %r13b
movq 0x40(%rsp), %rbp
movb $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x808(%rdi)
movw $0x0, 0x818(%rdi)
movl %r8d, 0x81c(%rdi)
movq $0x0, 0x828(%rdi)
addq $0x8, %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x3150
testq %rbx, %rbx
setne %al
testl %r15d, %r15d
setne %cl
testb %cl, %al
jne 0x65da
testq %rbx, %rbx
sete %bpl
movq 0x18a64(%rip), %r14     # 0x1eff0
leaq 0x10de4(%rip), %rsi     # 0x17377
movl $0x1b, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
xorb $0x1, %r13b
orb %bpl, %r13b
je 0x66b1
addq $0x8, %rsp
jmp 0x661f
cmpl $0x8, %r14d
setae %al
testb $0x3, %r14b
sete %cl
testb %cl, %al
je 0x662a
testq %rbp, %rbp
je 0x65f7
cmpl $0x2, 0xc(%rbp)
jne 0x6666
subq $0x8, %rsp
movzbl %r13b, %eax
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl 0xc(%rsp), %r9d
pushq %rax
pushq $0x0
pushq %rbp
callq 0x5dae
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x189bf(%rip), %r14     # 0x1eff0
leaq 0x10d5b(%rip), %rsi     # 0x17393
movl $0x28, %edx
movq %r14, %rdi
callq 0x32b0
movl $0x4, %esi
movq %r14, %rdi
callq 0x3180
movq %rax, %r14
leaq 0x10d60(%rip), %rsi     # 0x173bc
movl $0x7, %edx
movq %rax, %rdi
jmp 0x667c
movq 0x18983(%rip), %r14     # 0x1eff0
leaq 0x10d50(%rip), %rsi     # 0x173c4
movl $0x18, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
testb %r13b, %r13b
je 0x65d4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::strip()
void
RLCSA::strip()
{
  for(usint c = 0; c < CHARS; c++)
  {
    if(this->array[c] != 0) { this->array[c]->strip(); }
  }
  if(this->sa_samples != 0) { this->sa_samples->strip(); }
  this->end_points->strip();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x699f
callq 0x12004
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x6990
movq 0x810(%rbx), %rdi
testq %rdi, %rdi
je 0x69bc
callq 0xc5ec
movq 0x828(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12004
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::mergeEndPoints(CSA::RLCSA&, CSA::RLCSA&)
void
RLCSA::mergeEndPoints(RLCSA& index, RLCSA& increment)
{
  DeltaEncoder* endings = new DeltaEncoder(RLCSA::ENDPOINT_BLOCK_SIZE);

  DeltaVector::Iterator index_iter(*(index.end_points));
  DeltaVector::Iterator increment_iter(*(increment.end_points));

  endings->setBit(index_iter.select(0));
  for(usint i = 1; i < index.number_of_sequences; i++)
  {
    endings->setBit(index_iter.selectNext());
  }
  usint sum = index.end_points->getSize();
  delete index.end_points; index.end_points = 0;

  endings->setBit(sum + increment_iter.select(0));
  for(usint i = 1; i < increment.number_of_sequences; i++)
  {
    endings->setBit(sum + increment_iter.selectNext());
  }
  sum += increment.end_points->getSize();
  delete increment.end_points; increment.end_points = 0;

  this->end_points = new DeltaVector(*endings, sum);
  delete endings;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl $0x70, %edi
callq 0x3260
movq %rax, %rbx
movq %rax, %rdi
movl $0x10, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0x13026
movq 0x828(%r12), %rsi
leaq 0x80(%rsp), %rdi
callq 0x12744
movq 0x828(%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12744
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x128f8
movq %rbx, %rdi
movl %eax, %esi
callq 0x13036
cmpl $0x2, 0x820(%r12)
jb 0x6a7e
movl $0x1, %ebp
leaq 0x80(%rsp), %r13
movq %r13, %rdi
callq 0x12a58
movq %rbx, %rdi
movl %eax, %esi
callq 0x13036
incl %ebp
cmpl 0x820(%r12), %ebp
jb 0x6a60
movq %r14, (%rsp)
movq 0x828(%r12), %r13
movl (%r13), %r14d
movq %r13, %rdi
callq 0x12732
movl $0x48, %esi
movq %r13, %rdi
callq 0x3270
movq $0x0, 0x828(%r12)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x128f8
addl %r14d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x13036
cmpl $0x2, 0x820(%r15)
jb 0x6afc
movl $0x1, %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x12a58
addl %r14d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x13036
incl %ebp
cmpl 0x820(%r15), %ebp
jb 0x6adc
movq 0x828(%r15), %r12
movl (%r12), %ebp
movq %r12, %rdi
callq 0x12732
movl $0x48, %esi
movq %r12, %rdi
callq 0x3270
movq $0x0, 0x828(%r15)
movl $0x48, %edi
callq 0x3260
movq %rax, %r15
addl %r14d, %ebp
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x1272c
movq (%rsp), %rax
movq %r15, 0x828(%rax)
movq %rbx, %rdi
callq 0x13030
movl $0x70, %esi
movq %rbx, %rdi
callq 0x3270
leaq 0x8(%rsp), %rdi
callq 0x1274a
leaq 0x80(%rsp), %rdi
callq 0x1274a
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x48, %esi
movq %r15, %rdi
callq 0x3270
jmp 0x6bbf
movq %rax, %r14
jmp 0x6bc9
movq %rax, %r14
movl $0x70, %esi
movq %rbx, %rdi
callq 0x3270
jmp 0x6bd6
jmp 0x6bbc
jmp 0x6bbc
jmp 0x6bbc
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1274a
leaq 0x80(%rsp), %rdi
callq 0x1274a
movq %r14, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::mergeSamples(CSA::RLCSA&, CSA::RLCSA&, unsigned int*)
void
RLCSA::mergeSamples(RLCSA& index, RLCSA& increment, usint* positions)
{
  if(index.sa_samples == 0 || increment.sa_samples == 0) { return; }

  positions += increment.number_of_sequences;
  this->sa_samples = new SASamples(*(index.sa_samples), *(increment.sa_samples), positions, increment.data_size, this->number_of_sequences);

  this->support_locate = this->sa_samples->supportsLocate();
  this->support_display = this->sa_samples->supportsDisplay();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x810(%rsi), %r15
testq %r15, %r15
je 0x6c5c
movq %rdx, %r12
movq 0x810(%rdx), %r13
testq %r13, %r13
je 0x6c5c
movq %rdi, %rbx
movl 0x820(%r12), %eax
leaq (%rcx,%rax,4), %rbp
movl $0x30, %edi
callq 0x3260
movq %rax, %r14
movl 0x4(%r12), %r8d
movl 0x820(%rbx), %r9d
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xb978
movq %r14, 0x810(%rbx)
cmpq $0x0, 0x18(%r14)
setne 0x818(%rbx)
cmpq $0x0, 0x28(%r14)
setne 0x819(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::~RLCSA()
RLCSA::~RLCSA()
{
  for(usint c = 0; c < CHARS; c++) { delete this->array[c]; this->array[c] = 0; }
  delete this->alphabet; this->alphabet = 0;
  delete this->sa_samples; this->sa_samples = 0;
  delete this->end_points; this->end_points = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x8(%rbx,%r15,8), %r14
testq %r14, %r14
je 0x6cae
movq %r14, %rdi
callq 0x13382
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x8(%rbx,%r15,8)
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x6c8f
movq 0x808(%rbx), %rdi
testq %rdi, %rdi
je 0x6cd9
movl $0x1010, %esi           # imm = 0x1010
callq 0x3270
movq $0x0, 0x808(%rbx)
movq 0x810(%rbx), %r14
testq %r14, %r14
je 0x6d05
movq %r14, %rdi
callq 0xbfc0
movl $0x30, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x810(%rbx)
movq 0x828(%rbx), %r14
testq %r14, %r14
je 0x6d31
movq %r14, %rdi
callq 0x12732
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x828(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::count(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
pair_type
RLCSA::count(const std::string& pattern) const
{
  if(pattern.length() == 0) { return this->getSARange(); }

  std::string::const_reverse_iterator iter = pattern.rbegin();
  pair_type index_range = this->getCharRange((uchar)*iter);
  
  if(isEmpty(index_range)) { return index_range; }

  for(++iter; iter != pattern.rend(); ++iter)
  {
    index_range = this->LF(index_range, (uchar)*iter);
    
    if(isEmpty(index_range)) { return EMPTY_PAIR; }
  }
  
  this->convertToSARange(index_range);

  return index_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x71a8
movq %rsi, %r14
movq (%rsi), %rsi
movzbl -0x1(%rsi,%rdx), %eax
movq 0x808(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movl 0x820(%rbx), %edi
leal (%rdi,%rcx), %eax
shrq $0x20, %rcx
addl %edi, %ecx
cmpl %ecx, %eax
jbe 0x71b3
shlq $0x20, %rcx
movl %eax, %eax
jmp 0x71f8
movl 0x4(%rbx), %eax
decl %eax
shlq $0x20, %rax
jmp 0x71fb
leaq (%rsi,%rdx), %r15
decq %r15
cmpq (%r14), %r15
je 0x71ea
shlq $0x20, %rcx
movl %eax, %esi
orq %rcx, %rsi
movzbl -0x1(%r15), %edx
decq %r15
movq %rbx, %rdi
callq 0x723e
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
jbe 0x71ba
movl $0x1, %eax
jmp 0x71fb
movl 0x820(%rbx), %edx
subl %edx, %eax
subl %edx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::getCharRange(unsigned int) const
pair_type
RLCSA::getCharRange(usint c) const
{
  if(c >= CHARS) { return EMPTY_PAIR; }
  pair_type index_range = this->alphabet->getRange(c);
  this->convertToBWTRange(index_range);
  return index_range;
}

// Assembly:
movl $0x1, %eax
cmpl $0xff, %esi
ja 0x723c
movq 0x808(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rcx
movl 0x820(%rdi), %edx
leal (%rdx,%rcx), %eax
shrq $0x20, %rcx
addl %edx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::LF(std::pair<unsigned int, unsigned int>, unsigned int) const
pair_type
RLCSA::LF(pair_type range, usint c) const
{
  if(c >= CHARS || this->array[c] == 0) { return EMPTY_PAIR; }
  PsiVector::Iterator iter(*(this->array[c]));

  usint start = this->alphabet->cumulative(c) + this->number_of_sequences - 1;
  range.first = start + iter.rank(range.first, true);
  range.second = start + iter.rank(range.second);

  return range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl $0x1, %ebx
cmpl $0xff, %edx
ja 0x72c6
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %r12d
movq 0x8(%rdi,%r12,8), %rsi
testq %rsi, %rsi
je 0x72c6
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x13394
movq 0x808(%r15), %rax
movl (%rax,%r12,8), %r12d
movl 0x820(%r15), %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x133a0
movl %eax, %ebx
shrq $0x20, %r14
movq %rsp, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x133a0
movl %eax, %r14d
leal (%r12,%r15), %eax
decl %eax
addl %eax, %ebx
addl %eax, %r14d
movq %rsp, %rdi
callq 0x1339a
shlq $0x20, %r14
orq %r14, %rbx
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1339a
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::reportPositions(unsigned char*, unsigned int, unsigned int*) const
void
RLCSA::reportPositions(uchar* data, usint length, usint* positions) const
{
  if(data == 0 || length == 0 || positions == 0) { return; }

  PsiVector::Iterator** iters = this->getIterators();

  usint current = this->number_of_sequences - 1;
  positions[length] = current; // "immediately after current"
  for(sint i = (sint)(length - 1); i >= 0; i--)
  {
    usint c = (usint)data[i];
    if(this->array[c] != 0)
    {
      current = this->LF(current, c, *(iters[c]));
    }
    else
    {
      if(c < this->alphabet->getFirstChar()) // No previous characters either.
      {
        current = this->number_of_sequences - 1;
      }
      else
      {
        current = this->alphabet->cumulative(c) - 1 + this->number_of_sequences;
      }
    }
    positions[i] = current; // "immediately after current"
  }

  this->deleteIterators(iters);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
testq %rsi, %rsi
sete %al
testl %edx, %edx
sete %cl
orb %al, %cl
testq %rbx, %rbx
sete %al
orb %cl, %al
je 0x7328
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x73ca
movq %rax, %r12
movl 0x820(%r15), %esi
decl %esi
movl %ebp, %eax
movl %esi, (%rbx,%rax,4)
decl %ebp
js 0x73b4
movl %ebp, %r13d
incq %r13
movzbl -0x1(%r14,%r13), %eax
cmpq $0x0, 0x8(%r15,%rax,8)
je 0x7381
movq (%r12,%rax,8), %rdi
movq 0x808(%r15), %rcx
movl (%rcx,%rax,8), %ebp
addl 0x820(%r15), %ebp
xorl %edx, %edx
callq 0x133a0
leal (%rax,%rbp), %esi
decl %esi
jmp 0x73aa
movq 0x808(%r15), %rcx
cmpl %eax, 0x804(%rcx)
jbe 0x739b
movl 0x820(%r15), %esi
decl %esi
jmp 0x73aa
movl (%rcx,%rax,8), %eax
movl 0x820(%r15), %ecx
leal (%rax,%rcx), %esi
decl %esi
movl %esi, -0x4(%rbx,%r13,4)
decq %r13
jg 0x7350
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7442
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::getIterators() const
PsiVector::Iterator**
RLCSA::getIterators() const
{
  PsiVector::Iterator** iters = new PsiVector::Iterator*[CHARS];
  for(usint i = 0; i < CHARS; i++)
  {
    if(this->array[i] == 0) { iters[i] = 0; }
    else                    { iters[i] = new PsiVector::Iterator(*(this->array[i])); }
  }
  return iters;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x800, %edi            # imm = 0x800
callq 0x3030
movq %rax, %r14
xorl %r13d, %r13d
movq 0x8(%rbx,%r13,8), %r12
testq %r12, %r12
je 0x740a
movl $0x78, %edi
callq 0x3260
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x13394
jmp 0x740d
xorl %r15d, %r15d
movq %r15, (%r14,%r13,8)
incq %r13
cmpq $0x100, %r13            # imm = 0x100
jne 0x73e6
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x78, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::locate(std::pair<unsigned int, unsigned int>, bool, bool) const
usint*
RLCSA::locate(pair_type range, bool direct, bool steps) const
{
  if(!(this->support_locate) || isEmpty(range) || range.second >= this->data_size) { return 0; }

  usint* data = new usint[length(range)];
  if(direct) { this->directLocate(range, data, steps); }
  else       { this->locateUnsafe(range, data, steps); }

  return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x1, 0x818(%rdi)
jne 0x74f1
movq %rsi, %rbx
movq %rsi, %rax
shrq $0x20, %rax
xorl %r15d, %r15d
cmpl %eax, %ebx
ja 0x74f4
movq %rdi, %r14
cmpl %eax, 0x4(%rdi)
jbe 0x74f4
movl %ecx, %ebp
movl %edx, %r12d
subl %ebx, %eax
leaq 0x4(,%rax,4), %rax
movabsq $0x3fffffffc, %rdi      # imm = 0x3FFFFFFFC
andq %rax, %rdi
callq 0x3030
movq %rax, %r15
movzbl %bpl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
testb %r12b, %r12b
je 0x7500
callq 0x7508
jmp 0x74f4
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x756e
jmp 0x74f4
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::locate(std::pair<unsigned int, unsigned int>, unsigned int*, bool, bool) const
usint*
RLCSA::locate(pair_type range, usint* data, bool direct, bool steps) const
{
  if(!(this->support_locate) || isEmpty(range) || range.second >= this->data_size || data == 0) { return 0; }

  if(direct) { this->directLocate(range, data, steps); }
  else       { this->locateUnsafe(range, data, steps); }

  return data;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
shrq $0x20, %rdx
cmpl %edx, %esi
setbe %al
andb 0x818(%rdi), %al
cmpb $0x1, %al
jne 0x7740
xorl %eax, %eax
testq %rbx, %rbx
je 0x7753
cmpl %edx, 0x4(%rdi)
jbe 0x7753
testb %cl, %cl
je 0x7744
movzbl %r8b, %ecx
movq %rbx, %rdx
callq 0x7508
jmp 0x7750
xorl %eax, %eax
jmp 0x7753
movzbl %r8b, %ecx
movq %rbx, %rdx
callq 0x756e
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::directInverseLocate(unsigned int) const
usint
RLCSA::directInverseLocate(usint location) const
{
  // Get the SA value and SA index (in that order) of the last SA sample
  // before the given text location.
  pair_type last_sample = this->sa_samples->inverseSA(location);
  
  // TODO: catch the (size, size) sentinel.
  while(last_sample.first < location) {
    // We're not at the desired text location, so we must be before it.
    
    // Advance the text location (SA value) by 1
    last_sample.first += 1;
    
    // Advance the SA index to that corresponding to the next character. Note
    // that psi returns BWT coordinates, so we have to convert back to SA
    // coordinates.
    last_sample.second = (this->psi(last_sample.second) - 
      this->number_of_sequences);
      
  }
  
  if(last_sample.first != location) {
    // We managed to start on the wrong side of what we're trying to locate;
    // inverseSA lied to us.
    throw "Somehow skipped desired inverse locate position";
  }
  
  // Return the answer (SA index) in BWT coordinates. It will probably be
  // immediately converted back to SA coordinates, but it's worth it for
  // consistency with the directLocate function, which takes in BWT coordinates.
  return last_sample.second + this->number_of_sequences;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x810(%rdi), %rdi
callq 0xc444
movq %rax, %r14
movq %rax, %r15
shrq $0x20, %r15
cmpl %ebp, %r14d
jae 0x7a5d
movq %rsp, %r12
movl 0x4(%rbx), %eax
cmpl %r15d, %eax
jbe 0x7a3e
movq 0x808(%rbx), %rcx
movl %r15d, %eax
xorl %edx, %edx
divl 0x1008(%rcx)
movl 0xc08(%rcx,%rax,4), %eax
leaq (%rcx,%rax,4), %rax
addq $0x804, %rax            # imm = 0x804
movl (%rax), %r13d
addq $0x4, %rax
cmpl %r15d, 0x4(%rcx,%r13,8)
jb 0x7a00
movq 0x8(%rbx,%r13,8), %rsi
movq %r12, %rdi
callq 0x13394
movq 0x808(%rbx), %rax
subl (%rax,%r13,8), %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x1368a
movl %eax, %r15d
movq %r12, %rdi
callq 0x1339a
jmp 0x7a47
addl 0x820(%rbx), %eax
movl %eax, %r15d
incl %r14d
subl 0x820(%rbx), %r15d
cmpl %ebp, %r14d
jne 0x79d5
movl %ebp, %r14d
cmpl %ebp, %r14d
jne 0x7a7b
addl 0x820(%rbx), %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x3130
leaq 0xfa32(%rip), %rcx      # 0x174be
movq %rcx, (%rax)
movq 0x17522(%rip), %rsi     # 0x1efb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x3410
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1339a
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::display(unsigned int, bool) const
uchar*
RLCSA::display(usint sequence, bool include_end_marker) const
{
  if(!(this->support_display)) { return 0; }

  pair_type seq_range = this->getSequenceRange(sequence);
  if(isEmpty(seq_range)) { return 0; }

  uchar* data = new uchar[length(seq_range) + include_end_marker];
  this->displayUnsafe(seq_range, data);
  if(include_end_marker) { data[length(seq_range)] = 0; }

  return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x1, 0x819(%rdi)
jne 0x7df1
movl %edx, %ebx
movq %rdi, %r14
callq 0x7e36
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
subl %r15d, %r12d
jae 0x7e00
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movzbl %bl, %r13d
leal (%r12,%r13), %edi
incl %edi
callq 0x3030
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7edc
testb %r13b, %r13b
je 0x7df3
incl %r12d
movl %r12d, %eax
movb $0x0, (%rbx,%rax)
jmp 0x7df3
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::getSequenceRange(unsigned int) const
pair_type
RLCSA::getSequenceRange(usint number) const
{
  if(number >= this->number_of_sequences) { return EMPTY_PAIR; }

  pair_type result;
  DeltaVector::Iterator iter(*(this->end_points));
  if(number == 0)
  {
    result.first = 0;
    result.second = iter.select(number);
  }
  else
  {
    result.first = nextMultipleOf(this->sample_rate, iter.select(number - 1));
    result.second = iter.selectNext();
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl $0x1, %eax
cmpl %esi, 0x820(%rdi)
jbe 0x7ebb
movl %esi, %ebx
movq %rdi, %r14
movq 0x828(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12744
testl %ebx, %ebx
je 0x7e97
movl 0x81c(%r14), %ebp
decl %ebx
leaq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x128f8
xorl %edx, %edx
divl %ebp
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x12a58
movl %eax, %r14d
incl %ebx
imull %ebp, %ebx
jmp 0x7ea8
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x128f8
movl %eax, %r14d
leaq 0x8(%rsp), %rdi
callq 0x1274a
shlq $0x20, %r14
movl %ebx, %eax
orq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1274a
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::display(unsigned int, std::pair<unsigned int, unsigned int>) const
uchar*
RLCSA::display(usint sequence, pair_type range) const
{
  if(!(this->support_display) || isEmpty(range)) { return 0; }

  pair_type seq_range = this->getSequenceRange(sequence);
  if(isEmpty(seq_range)) { return 0; }

  range.first += seq_range.first; range.second += seq_range.first;
  if(range.second > seq_range.second) { return 0; }

  uchar* data = new uchar[length(range)];
  this->displayUnsafe(range, data);

  return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdx, %r14
shrq $0x20, %r14
cmpl %r14d, %r15d
setbe %al
andb 0x819(%rdi), %al
cmpb $0x1, %al
jne 0x81fc
movq %rdi, %rbx
callq 0x7e36
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
ja 0x81fc
addl %eax, %r14d
cmpl %ecx, %r14d
jbe 0x8208
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
addq %r15, %rax
movq %r14, %rcx
shlq $0x20, %rcx
movl %eax, %r15d
orq %rcx, %r15
subl %eax, %r14d
incl %r14d
movq %r14, %rdi
callq 0x3030
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7edc
jmp 0x81ff
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::display(unsigned int, std::pair<unsigned int, unsigned int>, unsigned char*) const
uchar*
RLCSA::display(usint sequence, pair_type range, uchar* data) const
{
  if(!(this->support_display) || isEmpty(range) || data == 0) { return 0; }

  pair_type seq_range = this->getSequenceRange(sequence);
  if(isEmpty(seq_range)) { return 0; }

  range.first += seq_range.first; range.second += seq_range.first;
  if(range.second > seq_range.second) { return 0; }

  this->displayUnsafe(range, data);
  return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, 0x819(%rdi)
jne 0x8287
movq %rcx, %rbx
movq %rdx, %r15
movq %rdx, %r12
shrq $0x20, %r12
cmpl %r12d, %r15d
seta %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
jne 0x8287
movq %rdi, %r14
callq 0x7e36
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
ja 0x8287
addl %eax, %r12d
cmpl %ecx, %r12d
jbe 0x8298
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addl %r15d, %eax
shlq $0x20, %r12
orq %r12, %rax
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7edc
jmp 0x8289
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::display(unsigned int, unsigned int, unsigned int, unsigned int&) const
uchar*
RLCSA::display(usint position, usint len, usint context, usint& result_length) const
{
  if(!(this->support_display)) { return 0; }

  pair_type range = this->getSequenceRangeForPosition(position);
  if(isEmpty(range)) { return 0; }

  range.first = position - std::min(context, position - range.first);
  range.second = std::min(range.second, position + len + context - 1);
  result_length = length(range);
  if(isEmpty(range)) { return 0; }

  uchar* data = new uchar[length(range)];
  this->displayUnsafe(range, data);

  return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x1, 0x819(%rdi)
jne 0x831a
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x8670
movq %rbx, %rdi
movl %eax, %esi
callq 0x7e36
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
ja 0x831a
movl %ebp, %edx
subl %eax, %edx
cmpl %r15d, %edx
cmovael %r15d, %edx
movl %ebp, %eax
subl %edx, %eax
addl %ebp, %r12d
leal (%r15,%r12), %edx
decl %edx
cmpl %ecx, %edx
cmovbl %edx, %ecx
movl %ecx, %edx
subl %eax, %edx
leal 0x1(%rdx), %edx
movl %edx, (%r14)
jae 0x8329
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
shlq $0x20, %rcx
movl %eax, %r15d
orq %rcx, %r15
movl %edx, %edi
callq 0x3030
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7edc
jmp 0x831d
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::displayPrefix(unsigned int, unsigned int, unsigned char*) const
usint
RLCSA::displayPrefix(usint sequence, usint len, uchar* data) const
{
  if(!(this->support_display) || len == 0 || data == 0) { return 0; }

  pair_type seq_range = this->getSequenceRange(sequence);
  if(isEmpty(seq_range)) { return 0; }

  pair_type range(seq_range.first, std::min(seq_range.second, seq_range.first + len - 1));

  this->displayUnsafe(range, data);
  return length(range);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebp, %ebp
testq %rcx, %rcx
je 0x83d8
movl %edx, %r12d
testl %edx, %edx
je 0x83d8
movq %rdi, %r14
cmpb $0x0, 0x819(%rdi)
je 0x83d8
movq %rcx, %rbx
movq %r14, %rdi
callq 0x7e36
movq %rax, %r15
movq %rax, %r13
shrq $0x20, %r13
cmpl %r13d, %r15d
ja 0x83d8
leal (%r12,%r15), %eax
decl %eax
cmpl %r13d, %eax
cmovbl %eax, %r13d
movq %r13, %rax
shlq $0x20, %rax
movl %r15d, %esi
orq %rax, %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7edc
subl %r15d, %r13d
incl %r13d
movl %r13d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::displayFromPosition(unsigned int, unsigned int, unsigned char*) const
usint
RLCSA::displayFromPosition(usint index, usint max_len, uchar* data) const
{
  if(max_len == 0 || data == 0 || index >= this->data_size) { return 0; }

  for(usint i = 0; i < max_len; i++)
  {
    data[i] = this->getCharacter(index);
    index = this->psiUnsafe(index, data[i]);
    if(index < this->number_of_sequences) { return i + 1; }
    index -= this->number_of_sequences;
  }

  return max_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorl %ebx, %ebx
testl %edx, %edx
je 0x84b8
movq %rcx, %r14
testq %rcx, %rcx
je 0x84b8
movl %esi, %r12d
movq %rdi, %r15
cmpl %esi, 0x4(%rdi)
jbe 0x84b8
movl %edx, 0x4(%rsp)
movl %edx, %eax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0x10(%rsp), %r13
movq 0x808(%r15), %rcx
movl %r12d, %eax
xorl %edx, %edx
divl 0x1008(%rcx)
movl 0xc08(%rcx,%rax,4), %eax
leaq (%rcx,%rax,4), %rdx
addq $0x804, %rdx            # imm = 0x804
movl (%rdx), %eax
addq $0x4, %rdx
cmpl %r12d, 0x4(%rcx,%rax,8)
jb 0x8456
movb %al, (%r14,%rbx)
movzbl %al, %ebp
shll $0x3, %ebp
movq 0x8(%r15,%rbp), %rsi
movq %r13, %rdi
callq 0x13394
movq 0x808(%r15), %rax
subl (%rax,%rbp), %r12d
movq %r13, %rdi
movl %r12d, %esi
callq 0x1368a
movl %eax, %r12d
movq %r13, %rdi
callq 0x1339a
subl 0x820(%r15), %r12d
jb 0x84b6
incq %rbx
cmpq 0x8(%rsp), %rbx
jne 0x8432
movl 0x4(%rsp), %eax
movl %eax, %ebx
jmp 0x84b8
incl %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1339a
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::locateRange(std::pair<unsigned int, unsigned int>) const
std::vector<usint>*
RLCSA::locateRange(pair_type range) const
{
  std::vector<usint>* results = new std::vector<usint>;
  if(!(this->support_locate)) { return results; }

  this->locateRange(range, *results);
  removeDuplicates(results, false);

  return results;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0x3260
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
cmpb $0x1, 0x818(%r15)
jne 0x8562
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x856c
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa31a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::locateRange(std::pair<unsigned int, unsigned int>, std::vector<unsigned int, std::allocator<unsigned int>>&) const
void
RLCSA::locateRange(pair_type range, std::vector<usint>& vec) const
{
  if(isEmpty(range) || range.second >= this->data_size) { return; }

  usint* data = new usint[length(range)];
  this->locateUnsafe(range, data, false);
  for(usint i = 0; i < length(range); i++) { vec.push_back(data[i]); }
  delete[] data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rsi, %rax
shrq $0x20, %rax
movl %eax, %r13d
subl %r15d, %r13d
jb 0x85fb
movq %rdi, %r12
cmpl %eax, 0x4(%rdi)
jbe 0x85fb
movq %rdx, %rbx
leal 0x1(%r13), %edi
shlq $0x2, %rdi
callq 0x3030
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x756e
incl %r13d
je 0x85ea
movl %r13d, %r12d
movq %r14, %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x85d6
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x85e1
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa9a8
addq $0x4, %r15
decq %r12
jne 0x85bd
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3300
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::locateRanges(std::vector<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&) const
std::vector<usint>*
RLCSA::locateRanges(std::vector<pair_type>& ranges) const
{
  std::vector<usint>* results = new std::vector<usint>;
  if(!(this->support_locate)) { return results; }

  for(std::vector<pair_type>::iterator iter = ranges.begin(); iter != ranges.end(); ++iter)
  {
    this->locateRange(*iter, *results);
  }
  removeDuplicates(results, false);

  return results;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0x3260
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
cmpb $0x1, 0x818(%r15)
jne 0x8661
movq (%r14), %r12
cmpq 0x8(%r14), %r12
je 0x8657
movq (%r12), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x856c
addq $0x8, %r12
jmp 0x863c
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa31a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::getSequenceForPosition(unsigned int*, unsigned int) const
usint*
RLCSA::getSequenceForPosition(usint* values, usint len) const
{
  if(values == 0) { return 0; }

  DeltaVector::Iterator iter(*(this->end_points));
  for(usint i = 0; i < len; i++)
  {
    if(values[i] > 0) { values[i] = iter.rank(values[i] - 1); }
  }

  return values;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
testq %rsi, %rsi
je 0x872d
movl %edx, %ebp
movq %rsi, %rbx
movq 0x828(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12744
testl %ebp, %ebp
je 0x8721
movl %ebp, %r15d
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movl (%rbx,%r12,4), %esi
testl %esi, %esi
je 0x8719
decl %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x12750
movl %eax, (%rbx,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x8701
leaq 0x8(%rsp), %rdi
callq 0x1274a
jmp 0x872f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1274a
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::getRelativePosition(unsigned int) const
pair_type
RLCSA::getRelativePosition(usint value) const
{
  // Get an iterator so we can use the vector of sequence endpoints.
  DeltaVector::Iterator iter(*(this->end_points));
  
  // Start out saying we're in text 0 at index whatever our index in the whole
  // string of texts is.
  pair_type result(0, value);

  // Adjust the text number to whatever text hadn't yet ended at the position
  // before the one we're interested in.
  if(value > 0) { result.first = iter.rank(value - 1); }
  if(result.first > 0)
  {
    // If we're not still in the 0th text, re-base our index in the text to
    // count from the first multiple of the SA sample rate after the end of the
    // text before this text (since we have declared text coordinates start on
    // SA sample multiples).
    result.second -= nextMultipleOf(this->sample_rate, iter.select(result.first - 1));
  }

  // Return the fixed-up relative position.
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r15
movq 0x828(%rdi), %rsi
movq %rsp, %rdi
callq 0x12744
testl %ebx, %ebx
je 0x878c
leal -0x1(%rbx), %esi
movq %rsp, %rdi
xorl %edx, %edx
callq 0x12750
movl %eax, %r14d
jmp 0x878f
xorl %r14d, %r14d
testl %r14d, %r14d
je 0x87b4
movl 0x81c(%r15), %ebp
leal -0x1(%r14), %esi
movq %rsp, %rdi
callq 0x128f8
xorl %edx, %edx
divl %ebp
notl %eax
imull %ebp, %eax
addl %ebx, %eax
movl %eax, %ebx
movq %rsp, %rdi
callq 0x1274a
shlq $0x20, %rbx
movl %r14d, %eax
orq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1274a
movq %rbx, %rdi
callq 0x3460