LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::VecField()
VecField::VecField() {
 //             std::cerr << "default constructor of vecfield is working" << std::endl;
 
        Nx = 0;
        Ny = 0;
        Nz = 0;
        N = Nx*Ny*Nz;
        x = new double** [Nx];
        y = new double** [Nx];
        z = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                x[i] = new double* [Ny];
                y[i] = new double* [Ny];
                z[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        x[i][j] = new double [Nz];
                        y[i][j] = new double [Nz];
                        z[i][j] = new double [Nz];
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x38(%rdi), %rax
movq %rax, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
movb $0x0, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %edi, %edi
callq 0x2030
movq %rax, 0x10(%rbx)
xorl %edi, %edi
callq 0x2030
movq %rax, 0x18(%rbx)
xorl %edi, %edi
callq 0x2030
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::~VecField()
VecField::~VecField() {
                //std::cerr << "destructor of vecfield is working" << std::endl;

        for (int i = 0; i < Nx; ++i) {
                for (int j = 0; j < Ny; ++j) {
                        delete [] x[i][j];
                        delete [] y[i][j];
                        delete [] z[i][j];
                }
                delete [] x[i];
                delete [] y[i];
                delete [] z[i];
        }

        delete [] x;
        delete [] y;
        delete [] z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x6925
xorl %r14d, %r14d
cmpl $0x0, 0x4(%rbx)
jle 0x68e0
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x68a8
callq 0x2290
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x68be
callq 0x2290
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x68d4
callq 0x2290
incq %r15
movslq 0x4(%rbx), %rax
cmpq %rax, %r15
jl 0x6892
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x68f2
callq 0x2290
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6904
callq 0x2290
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6916
callq 0x2290
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x6889
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x6933
callq 0x2290
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6941
callq 0x2290
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x694f
callq 0x2290
movq 0x28(%rbx), %rdi
addq $0x38, %rbx
cmpq %rbx, %rdi
je 0x6971
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2210
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/field.cpp
// Function: myOctree::Field::Field(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Field::Field( int N_x, int N_y, int N_z, std::string info ) : Nx(N_x), Ny(N_y), Nz(N_z), name(info)  {
        //      std::cerr << "parametrized constructor of field is working" << std::endl;

        N = Nx*Ny*Nz;
        val = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                val[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        val[i][j] = new double [Nz];
                }
        }
	
	set_field(0.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
addq $0x18, %rdi
leaq 0x28(%r14), %rax
movq %rax, -0x40(%rbp)
movq %rax, 0x18(%r14)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
movq %rdi, -0x38(%rbp)
callq 0x39ba
movslq (%r14), %r15
movslq 0x4(%r14), %rcx
movq %rcx, %rax
movq %rcx, -0x30(%rbp)
imull %r15d, %eax
movslq 0x8(%r14), %rbx
movl %ebx, %ecx
imull %eax, %ecx
leaq (,%r15,8), %rax
testq %r15, %r15
movl %ecx, 0xc(%r14)
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
movq %r15, -0x50(%rbp)
testl %r15d, %r15d
jle 0x6a70
movq -0x30(%rbp), %rcx
leaq (,%rcx,8), %rdx
testl %ecx, %ecx
movq $-0x1, %rax
cmovsq %rax, %rdx
movq %rdx, -0x48(%rbp)
movq %rbx, %r12
shlq $0x3, %r12
testl %ebx, %ebx
cmovsq %rax, %r12
movl %ecx, %ebx
xorl %r13d, %r13d
movq -0x48(%rbp), %rdi
callq 0x2030
movq 0x10(%r14), %rcx
movq %rax, (%rcx,%r13,8)
cmpl $0x0, -0x30(%rbp)
jle 0x6a67
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x2030
movq 0x10(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x6a4b
incq %r13
cmpq -0x50(%rbp), %r13
jne 0x6a31
xorps %xmm0, %xmm0
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6ab4
jmp 0x6a8d
jmp 0x6a8d
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x6aab
movq (%rax), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/field.cpp
// Function: myOctree::Field::set_field(double)
void Field::set_field(double value) {

        for(int i=0;i<this->Nx;i++) {
                for(int j=0;j<this->Ny;j++) {
                        for(int k=0;k<this->Nz;k++) {
                                this->val[i][j][k] = value;
                        }
                }
        }
}

// Assembly:
movslq (%rdi), %rax
testq %rax, %rax
jle 0x6b01
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %ecx
movl 0x8(%rdi), %edx
xorl %esi, %esi
testl %ecx, %ecx
jle 0x6af8
movq 0x10(%rdi), %r8
xorl %r9d, %r9d
testl %edx, %edx
jle 0x6af0
movq (%r8,%rsi,8), %r10
movq (%r10,%r9,8), %r10
xorl %r11d, %r11d
movsd %xmm0, (%r10,%r11,8)
incq %r11
cmpq %r11, %rdx
jne 0x6ae2
incq %r9
cmpq %rcx, %r9
jne 0x6ad3
incq %rsi
cmpq %rax, %rsi
jne 0x6ac8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/field.cpp
// Function: myOctree::Field::Field()
Field::Field() {
        //      std::cerr << "default constructor of field is working" << std::endl;

        Nx = 0;
        Ny = 0;
        Nz = 0;
        N = Nx*Ny*Nz;
        val = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                val[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        val[i][j] = new double [Nz];
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %edi, %edi
callq 0x2030
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/field.cpp
// Function: myOctree::Field::Field(myOctree::Field const&)
Field::Field(const Field &obj) {

        //      std::cerr << "copy constructor of field is working" << std::endl;

        Nx = obj.Nx;
        Ny = obj.Ny;
        Nz = obj.Nz;
        N = obj.N;
        name = obj.name;
        //      std::cerr << "field is" << name <<  std::endl;

        val = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                val[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        val[i][j] = new double [Nz];
                        memcpy(val[i][j],obj.val[i][j],sizeof(double)*Nz);
                }
        }

        for(int i = 0; i < 3; ++ i) {
                memcpy(&(bc[i][0]), &(obj.bc[i][0]), 2 * sizeof(FieldBc));
        }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
addq $0x18, %rdi
leaq 0x28(%r15), %rax
movq %rax, -0x38(%rbp)
movq %rax, 0x18(%r15)
movq $0x0, 0x20(%r15)
movb $0x0, 0x28(%r15)
movl (%rsi), %eax
movl %eax, (%r15)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%r15)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%r15)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%r15)
addq $0x18, %rsi
movq %rdi, -0x30(%rbp)
callq 0x2120
movslq (%r15), %rbx
leaq (,%rbx,8), %rax
testq %rbx, %rbx
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, 0x10(%r15)
testl %ebx, %ebx
jle 0x6c5c
movl 0x4(%r15), %r12d
xorl %r13d, %r13d
movslq %r12d, %rax
leaq (,%rax,8), %rdi
testl %eax, %eax
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x2030
movq 0x10(%r15), %rcx
movq %rax, (%rcx,%r13,8)
testl %r12d, %r12d
jle 0x6c4d
xorl %ebx, %ebx
movslq 0x8(%r15), %rax
leaq (,%rax,8), %r12
testq %rax, %rax
movq %r12, %rdi
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x2030
movq 0x10(%r15), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%rbx,8)
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx,8), %rdi
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdx
callq 0x2190
incq %rbx
movslq 0x4(%r15), %r12
cmpq %r12, %rbx
jl 0x6bf0
movl (%r15), %ebx
incq %r13
movslq %ebx, %rax
cmpq %rax, %r13
jl 0x6bc4
xorl %eax, %eax
movq 0x38(%r14,%rax,8), %rcx
movq %rcx, 0x38(%r15,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x6c5e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c84
jmp 0x6c84
movq %rax, %r14
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6ca2
movq (%rax), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/field.cpp
// Function: myOctree::Field::~Field()
Field::~Field() {
        //      std::cerr << "delete constructor of field is working" << std::endl;

        for (int i = 0; i < Nx; ++i) {
                for (int j = 0; j < Ny; ++j)
                        delete [] val[i][j];

                delete [] val[i];
                }

        delete [] val;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x6d0a
xorl %r14d, %r14d
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x6ced
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%r15,8), %rdi
testq %rdi, %rdi
je 0x6ce2
callq 0x2290
movl 0x4(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x6cc9
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6cff
callq 0x2290
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x6cbf
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x6d18
callq 0x2290
movq 0x18(%rbx), %rdi
addq $0x28, %rbx
cmpq %rbx, %rdi
je 0x6d3a
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2210
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/output.cpp
// Function: std::NodeBc_to_string[abi:cxx11](myOctree::node_boundary_flags)
string NodeBc_to_string(myOctree::NodeBc bcc) {

	string bc;

	if(bcc==myOctree::NONE) 
		bc = "N";

	if(bcc==myOctree::BOUNDARY) 
		bc = "B";

	if(bcc==myOctree::MPI_BOUNDARY) 
		bc = "MB";


	return bc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpl $0x3, %esi
jae 0xa794
movl %esi, %eax
leaq 0x6cb2(%rip), %rdx      # 0x11428
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x6cb4(%rip), %rdx      # 0x11438
movq (%rdx,%rax,8), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xa7b8
movq (%r15), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/input.cpp
// Function: std::string_to_NodeBc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
myOctree::NodeBc string_to_NodeBc(string bc) {

	myOctree::NodeBc bcc;

	if(bc=="N")
		bcc = myOctree::NONE;

	if(bc=="B")
		bcc = myOctree::BOUNDARY;

	if(bc=="MPI_BOUNDARY")
		bcc = myOctree::MPI_BOUNDARY;
		
	return bcc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6508(%rip), %rsi      # 0x113f1
callq 0x20a0
leaq 0x64ff(%rip), %rsi      # 0x113f4
movq %rbx, %rdi
callq 0x20a0
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
leaq 0x6543(%rip), %rsi      # 0x11450
movq %rbx, %rdi
callq 0x20a0
testl %eax, %eax
movl $0x2, %eax
cmovnel %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/input.cpp
// Function: std::string_to_FieldBc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
myOctree::FieldBc string_to_FieldBc(string bc) {

	myOctree::FieldBc bcc;

	if(bc=="N")
		bcc = myOctree::none;

	if(bc=="D")
		bcc = myOctree::dirichlet;
	
	if(bc=="NE")
		bcc = myOctree::neumann;

	if(bc=="MB")
		bcc = myOctree::mpi_boundary;
		
	return bcc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x64b8(%rip), %rsi      # 0x113f1
callq 0x20a0
leaq 0x6518(%rip), %rsi      # 0x1145d
movq %rbx, %rdi
callq 0x20a0
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
leaq 0x6502(%rip), %rsi      # 0x1145f
movq %rbx, %rdi
callq 0x20a0
testl %eax, %eax
movl $0x2, %r15d
cmovnel %r14d, %r15d
leaq 0x647b(%rip), %rsi      # 0x113f3
movq %rbx, %rdi
callq 0x20a0
testl %eax, %eax
movl $0x3, %eax
cmovnel %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/input.cpp
// Function: std::read_max_level(std::basic_ifstream<char, std::char_traits<char>>&)
void read_max_level(ifstream& file) {

	string line, str;
	
	//Skips if a line is empty		
	getline(file, line);
	while(line.empty()) {
		getline(file, line);
	}

	if(line=="max_level") {

		file >> myOctree::max_level;
	
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2380
leaq -0x40(%rbp), %r14
cmpq $0x0, -0x38(%rbp)
jne 0xd343
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2380
jmp 0xd318
leaq 0x4223(%rip), %rsi      # 0x1156d
leaq -0x40(%rbp), %rdi
callq 0x20a0
testl %eax, %eax
jne 0xd366
leaq 0x82c6(%rip), %rsi      # 0x15624
movq %rbx, %rdi
callq 0x2140
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xd37b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xd390
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd39f
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xd3b7
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xd3cc
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/input.cpp
// Function: std::read_input_file()
void read_input_file() {

	int blocknumber;
	string line, str;

	ifstream file ("../input/input.pfs"); 
	if(file.fail()) {
		cerr << "Error opening input file\n";
		exit(1);
	}

	if(file.peek() == ifstream::traits_type::eof()) {
		cerr << "Nothing in the input file\n";
		exit(1);
	}

	else {

		cerr << "\nReading input files" << endl;

		read_scalar_fields(file);

		read_vector_fields(file);
	
		blocknumber = read_blocks(file);

		read_scalar_field_Bc(file, blocknumber);

		read_vector_field_Bc(file, blocknumber);

		read_max_level(file);

	}

	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x416c(%rip), %rsi      # 0x11577
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x2370
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x240(%rbp,%rax)
jne 0xd52e
leaq -0x260(%rbp), %rdi
callq 0x20d0
cmpl $-0x1, %eax
je 0xd543
movq 0x7b9f(%rip), %rbx      # 0x14ff0
leaq 0x414d(%rip), %rsi      # 0x115a5
movl $0x14, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq 0x7b6d(%rip), %rdi      # 0x14ff0
callq 0x2040
movq %rax, %rdi
callq 0x2160
leaq -0x260(%rbp), %rdi
callq 0xaf96
leaq -0x260(%rbp), %rdi
callq 0xb1e6
leaq -0x260(%rbp), %rdi
callq 0xb436
movl %eax, %ebx
leaq -0x260(%rbp), %rdi
movl %eax, %esi
callq 0xbb6e
leaq -0x260(%rbp), %rdi
movl %ebx, %esi
callq 0xc390
leaq -0x260(%rbp), %rdi
callq 0xd2bc
leaq -0x260(%rbp), %rdi
callq 0x2070
leaq -0x260(%rbp), %rdi
callq 0x2080
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xd50b
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0xd520
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x7abb(%rip), %rdi      # 0x14ff0
leaq 0x3ec5(%rip), %rsi      # 0x11401
callq 0x21f0
jmp 0xd556
movq 0x7aa6(%rip), %rdi      # 0x14ff0
leaq 0x4039(%rip), %rsi      # 0x1158a
callq 0x21f0
movl $0x1, %edi
callq 0x2260
movq %rax, %rbx
jmp 0xd574
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
callq 0x2080
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xd589
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0xd59e
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O3/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/strategy.cpp
// Function: get_trans_matrix(std::vector<std::bitset<32ul>, std::allocator<std::bitset<32ul>>>&, std::vector<std::bitset<32ul>, std::allocator<std::bitset<32ul>>>)
void get_trans_matrix(vector<ROW> &trans_m, vector<ROW> m)
{   
	trans_m.clear();
	for(int i = 0; i < m.size(); i++)
	{  
		bitset<SIZE> tmp(0);
		for (int j = 0; j < m.size(); j++)
		{
		tmp[m[0].size() - 1 - j] = m[j][m[0].size() - i - 1];
		}
		trans_m.push_back(tmp);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x3aa0
movq %rax, 0x8(%r14)
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
je 0x3b41
sarq $0x3, %rdx
xorl %r12d, %r12d
movq %rsp, %r15
movq $0x0, (%rsp)
movb $0x1f, %cl
subb %r12b, %cl
movl $0x1, %esi
shlq %cl, %rsi
cmpq $0x1, %rdx
adcq $0x0, %rdx
movl $0x1f, %edi
xorl %ecx, %ecx
movq %rcx, %r8
btsq %rdi, %r8
btrq %rdi, %rcx
testq %rsi, (%rax)
cmovneq %r8, %rcx
movq %rcx, (%rsp)
addq $0x8, %rax
leaq (%rdx,%rdi), %r8
decq %r8
decq %rdi
cmpq $0x1f, %r8
jne 0x3ade
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x3b1c
movq %rcx, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x3b27
movq %r14, %rdi
movq %r15, %rdx
callq 0x4bd0
incq %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
ja 0x3aba
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/strategy.cpp
// Function: build_table(std::vector<std::bitset<32ul>, std::allocator<std::bitset<32ul>>>, int*)
void build_table(vector<ROW> m, int tab[SIZE])
{
	int ind = 0;
	for (int i = 0; i < m.size(); i++)
	{
		for (int j = 0; j < m.size(); j++)
		{
			if (m[i].test(j))
			{
				ind = m.size() - 1 - j;
				break;
			}
		}
		tab[ind] = i;
	}
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0x3ba2
sarq $0x3, %rcx
cmpq $0x1, %rcx
movq %rcx, %rdx
adcq $0x0, %rdx
decl %ecx
xorl %edi, %edi
xorl %r8d, %r8d
movq (%rax,%rdi,8), %r10
xorl %r9d, %r9d
cmpq $0x20, %r9
je 0x3ba4
btq %r9, %r10
jb 0x3b8d
incq %r9
cmpq %r9, %rdx
jne 0x3b77
jmp 0x3b93
movl %ecx, %r8d
subl %r9d, %r8d
movslq %r8d, %r9
movl %edi, (%rsi,%r9,4)
incq %rdi
cmpq %rdx, %rdi
jne 0x3b70
popq %rax
retq
leaq 0x34cc(%rip), %rdi      # 0x7077
leaq 0x34b8(%rip), %rsi      # 0x706a
movl $0x20, %edx
movl $0x20, %ecx
xorl %eax, %eax
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c53
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpb $0x0, 0x8(%rdx,%r13)
jne 0x3c33
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3c2b
movl 0x8(%rdx), %eax
movl %eax, 0x8(%rsi)
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x3c33
movq %rbx, %rdi
callq 0x479a
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 0x3c03
jmp 0x3c5b
sarq $0x2, %rax
imulq %r12, %rax
decl %eax
js 0x3cd9
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 0x3cd0
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 0x3cc5
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0xc(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x3cd0
movq %rbx, %rdi
movq %r12, %rdx
callq 0x479a
addq $-0xc, %rbp
decq %r13
jg 0x3c7d
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ced
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d04
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4539
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 0x44f8
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4e63
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 0x4e4b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4eaa
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4eb5
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4bd0
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movq (%rbx), %rcx
orq %rax, (%rcx,%r12)
addq $0x8, %r12
addq $-0x1, %r15
jb 0x4e92
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 0x4ef7
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5199
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
jle 0x518c
movl %esi, %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x5184
callq 0x21c0
incq %r15
cmpq %r15, %r14
jne 0x5176
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21c0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq %rcx, %r8
shrq $0x20, %r8
movq (%rdi), %rax
movslq %esi, %rdi
cmpl %edx, %esi
jle 0x51ef
movslq %edx, %rdx
leaq (%rdi,%rdi,2), %rsi
incq %rdi
leaq (%rax,%rsi,4), %rsi
movq (%rsi), %r9
movq %r9, %r10
shrq $0x20, %r10
cmpl %r10d, %r8d
sete %al
cmpl %r9d, %ecx
sete %r11b
orb %al, %r11b
jne 0x51e1
xorl %eax, %eax
cmpl %r10d, %ecx
je 0x522c
cmpl %r9d, %r8d
je 0x522c
decq %rdi
addq $-0xc, %rsi
cmpq %rdx, %rdi
jg 0x51b9
jmp 0x522a
leaq (%rdi,%rdi,2), %rsi
leaq (%rax,%rsi,4), %rsi
subl %edi, %edx
incl %edx
movq (%rsi), %rdi
movq %rdi, %r9
shrq $0x20, %r9
cmpl %r9d, %r8d
sete %al
cmpl %edi, %ecx
sete %r10b
orb %al, %r10b
jne 0x5222
xorl %eax, %eax
cmpl %r9d, %ecx
je 0x522c
cmpl %edi, %r8d
je 0x522c
addq $0xc, %rsi
decl %edx
jne 0x51fb
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4cfc
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
je 0x6831
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 0x6819
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2ea0
leaq 0x18(%rsp), %rdi
callq 0x44b3
movl %eax, %ebx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6861
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6877
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 0x68a2
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
jmp 0x68a2
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x68b8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5c21
testq %rbx, %rbx
sete %bpl
movq 0x1a41d(%rip), %r14     # 0x1fff0
leaq 0x127ea(%rip), %rsi     # 0x183c4
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 0x5cd4
addq $0x8, %rsp
jmp 0x5c5a
cmpl $0x8, %r14d
setae %al
testb $0x3, %r14b
sete %cl
testb %cl, %al
je 0x5c65
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 0x5cea
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1a384(%rip), %r14     # 0x1fff0
leaq 0x1276d(%rip), %rsi     # 0x183e0
movl $0x28, %edx
movq %r14, %rdi
callq 0x32b0
movl $0x4, %esi
movq %r14, %rdi
callq 0x3180
movq %rax, %r14
leaq 0x12772(%rip), %rsi     # 0x18409
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 0x5c1b
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_O3/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 0x68f1
callq 0x1236a
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x68e2
movq 0x810(%rbx), %rdi
testq %rdi, %rdi
je 0x690e
callq 0xc720
movq 0x828(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1236a
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x134f2
movq 0x828(%r12), %rsi
leaq 0x80(%rsp), %rdi
callq 0x12ac0
movq 0x828(%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12ac0
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x12c6e
movq %rbx, %rdi
movl %eax, %esi
callq 0x13502
cmpl $0x2, 0x820(%r12)
jb 0x69d0
movl $0x1, %ebp
leaq 0x80(%rsp), %r13
movq %r13, %rdi
callq 0x12dce
movq %rbx, %rdi
movl %eax, %esi
callq 0x13502
incl %ebp
cmpl 0x820(%r12), %ebp
jb 0x69b2
movq %r14, (%rsp)
movq 0x828(%r12), %r13
movl (%r13), %r14d
movq %r13, %rdi
callq 0x12aae
movl $0x48, %esi
movq %r13, %rdi
callq 0x3270
movq $0x0, 0x828(%r12)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x12c6e
addl %r14d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x13502
cmpl $0x2, 0x820(%r15)
jb 0x6a4e
movl $0x1, %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x12dce
addl %r14d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x13502
incl %ebp
cmpl 0x820(%r15), %ebp
jb 0x6a2e
movq 0x828(%r15), %r12
movl (%r12), %ebp
movq %r12, %rdi
callq 0x12aae
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 0x12aa8
movq (%rsp), %rax
movq %r15, 0x828(%rax)
movq %rbx, %rdi
callq 0x134fc
movl $0x70, %esi
movq %rbx, %rdi
callq 0x3270
leaq 0x8(%rsp), %rdi
callq 0x12ac6
leaq 0x80(%rsp), %rdi
callq 0x12ac6
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 0x6b11
movq %rax, %r14
jmp 0x6b1b
movq %rax, %r14
movl $0x70, %esi
movq %rbx, %rdi
callq 0x3270
jmp 0x6b28
jmp 0x6b0e
jmp 0x6b0e
jmp 0x6b0e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x12ac6
leaq 0x80(%rsp), %rdi
callq 0x12ac6
movq %r14, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6bae
movq %rdx, %r12
movq 0x810(%rdx), %r13
testq %r13, %r13
je 0x6bae
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 0xba9a
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_O3/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 0x6bf3
movq %r14, %rdi
callq 0x1374a
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x8(%rbx,%r15,8)
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x6be1
movq 0x808(%rbx), %rdi
movl $0x1010, %esi           # imm = 0x1010
callq 0x3270
movq $0x0, 0x808(%rbx)
movq 0x810(%rbx), %r14
testq %r14, %r14
je 0x6c45
movq %r14, %rdi
callq 0xc0e8
movl $0x30, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x810(%rbx)
movq 0x828(%rbx), %r14
testq %r14, %r14
je 0x6c71
movq %r14, %rdi
callq 0x12aae
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x828(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x70f6
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 0x7101
shlq $0x20, %rcx
movl %eax, %eax
jmp 0x7146
movl 0x4(%rbx), %eax
decl %eax
shlq $0x20, %rax
jmp 0x7149
leaq (%rsi,%rdx), %r15
decq %r15
cmpq (%r14), %r15
je 0x7138
shlq $0x20, %rcx
movl %eax, %esi
orq %rcx, %rsi
movzbl -0x1(%r15), %edx
decq %r15
movq %rbx, %rdi
callq 0x718c
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
jbe 0x7108
movl $0x1, %eax
jmp 0x7149
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_O3/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 0x718a
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_O3/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 0x7214
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %r12d
movq 0x8(%rdi,%r12,8), %rsi
testq %rsi, %rsi
je 0x7214
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1375c
movq 0x808(%r15), %rax
movl (%rax,%r12,8), %r12d
movl 0x820(%r15), %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x13768
movl %eax, %ebx
shrq $0x20, %r14
movq %rsp, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x13768
movl %eax, %r14d
leal (%r12,%r15), %eax
decl %eax
addl %eax, %ebx
addl %eax, %r14d
movq %rsp, %rdi
callq 0x13762
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 0x13762
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7284
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 0x732a
movq %rax, %r12
movl 0x820(%r15), %esi
decl %esi
movl %ebp, %eax
movl %esi, (%rbx,%rax,4)
decl %ebp
js 0x7313
movl %ebp, %r13d
incq %r13
movzbl -0x1(%r14,%r13), %eax
cmpq $0x0, 0x8(%r15,%rax,8)
je 0x72e0
shll $0x3, %eax
movq (%r12,%rax), %rdi
movq 0x808(%r15), %rcx
movl (%rcx,%rax), %ebp
addl 0x820(%r15), %ebp
xorl %edx, %edx
callq 0x13768
leal (%rax,%rbp), %esi
decl %esi
jmp 0x7309
movq 0x808(%r15), %rcx
cmpl %eax, 0x804(%rcx)
jbe 0x72fa
movl 0x820(%r15), %esi
decl %esi
jmp 0x7309
movl (%rcx,%rax,8), %eax
movl 0x820(%r15), %ecx
leal (%rax,%rcx), %esi
decl %esi
movl %esi, -0x4(%rbx,%r13,4)
decq %r13
jg 0x72ac
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73a2
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x736a
movl $0x78, %edi
callq 0x3260
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x1375c
jmp 0x736d
xorl %r15d, %r15d
movq %r15, (%r14,%r13,8)
incq %r13
cmpq $0x100, %r13            # imm = 0x100
jne 0x7346
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_O3/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 0x7451
movq %rsi, %rbx
movq %rsi, %rax
shrq $0x20, %rax
xorl %r15d, %r15d
cmpl %eax, %ebx
ja 0x7454
movq %rdi, %r14
cmpl %eax, 0x4(%rdi)
jbe 0x7454
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 0x7460
callq 0x7468
jmp 0x7454
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x74ce
jmp 0x7454
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x77de
xorl %eax, %eax
testq %rbx, %rbx
je 0x77f1
cmpl %edx, 0x4(%rdi)
jbe 0x77f1
testb %cl, %cl
je 0x77e2
movzbl %r8b, %ecx
movq %rbx, %rdx
callq 0x7468
jmp 0x77ee
xorl %eax, %eax
jmp 0x77f1
movzbl %r8b, %ecx
movq %rbx, %rdx
callq 0x74ce
movq %rbx, %rax
popq %rbx
retq
nop