LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::OpenForRA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool CKMCFile::OpenForRA(const std::string &file_name)
{
	uint64 size;
	size_t result;

	if (file_pre || file_suf)
		return false;

	if (!OpenASingleFile(file_name + ".kmc_pre", file_pre, size, (char *)"KMCP"))
		return false;

	ReadParamsFrom_prefix_file_buf(size);

	fclose(file_pre);
	file_pre = NULL;
		
	if (!OpenASingleFile(file_name + ".kmc_suf", file_suf, size, (char *)"KMCS"))
		return false;

	sufix_file_buf = new uchar[size];
	result = fread(sufix_file_buf, 1, size, file_suf);
	if (result != size)
		return false;

	fclose(file_suf);
	file_suf = NULL;

	is_opened = opened_for_RA;
	prefix_index = 0;
	sufix_number = 0;
	return true;
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x40feae
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x40ffb1
movq %rsi, %r14
leaq 0x20(%rbx), %r15
leaq 0x18c226(%rip), %rdx    # 0x59c0fe
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x40e015
leaq 0x18cfb0(%rip), %r8     # 0x59ce9c
movq %rsp, %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x40ffc2
movl %eax, %ebp
movq %r12, %rdi
callq 0x484210
testb %bpl, %bpl
je 0x40ffb1
leaq 0x28(%rbx), %r15
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4100a0
movq 0x20(%rbx), %rdi
callq 0x4e64c0
andq $0x0, 0x20(%rbx)
leaq 0x18c195(%rip), %rdx    # 0x59c0c9
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x40e015
leaq 0x18cf56(%rip), %r8     # 0x59cea1
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x40ffc2
movl %eax, %ebp
movq %r13, %rdi
callq 0x484210
testb %bpl, %bpl
je 0x40ffb1
movq (%rsp), %r14
movq %r14, %rdi
callq 0x414e30
movq %rax, 0x60(%rbx)
movq 0x28(%rbx), %rcx
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x4e6e20
cmpq %r14, %rax
jne 0x40ffb1
movq 0x28(%rbx), %rdi
callq 0x4e64c0
andq $0x0, 0x28(%rbx)
movl $0x1, (%rbx)
andq $0x0, 0x40(%rbx)
andq $0x0, 0x68(%rbx)
movb $0x1, %al
jmp 0x40ffb3
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::OpenASingleFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _IO_FILE*&, unsigned long long&, char*)
bool CKMCFile::OpenASingleFile(const std::string &file_name, FILE *&file_handler, uint64 &size, char marker[])
{
	char _marker[4];
	size_t result;

	if ((file_handler = my_fopen(file_name.c_str(), "rb")) == NULL)
		return false;

	my_fseek(file_handler, 0, SEEK_END);
	size = my_ftell(file_handler);					//the size of a whole file

	my_fseek(file_handler, -4, SEEK_CUR);
	result = fread(_marker, 1, 4, file_handler);
	if (result == 0)
		return false;

	size = size - 4;							//the size of the file without the terminal marker
	if (strncmp(marker, _marker, 4) != 0)
	{
		fclose(file_handler);
		file_handler = NULL;
		return false;
	}

	rewind(file_handler);
	result = fread(_marker, 1, 4, file_handler);
	if (result == 0)
		return false;

	size = size - 4;							//the size of the file without initial and terminal markers 

	if (strncmp(marker, _marker, 4) != 0)
	{
		fclose(file_handler);
		file_handler = NULL;
		return false;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq (%rsi), %rdi
leaq 0x18cef6(%rip), %rsi    # 0x59ced3
callq 0x4e6bf0
movq %rax, (%rbx)
testq %rax, %rax
je 0x41004f
xorl %r12d, %r12d
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4eb710
movq (%rbx), %rdi
callq 0x4e6f20
movq %rax, (%r15)
movq (%rbx), %rdi
pushq $-0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x4eb710
movq (%rbx), %rcx
leaq 0x4(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
callq 0x4e6e20
testq %rax, %rax
je 0x410052
addq $-0x4, (%r15)
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x401048
movq (%rbx), %rdi
testl %eax, %eax
je 0x410061
callq 0x4e64c0
andq $0x0, (%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x4eba50
movq (%rbx), %rcx
leaq 0x4(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
callq 0x4e6e20
testq %rax, %rax
je 0x41004f
addq $-0x4, (%r15)
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x401048
testl %eax, %eax
je 0x41009b
movq (%rbx), %rdi
jmp 0x410046
movb $0x1, %r12b
jmp 0x410052
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::OpenForListing(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool CKMCFile::OpenForListing(const std::string &file_name)
{
	uint64 size;

	if (is_opened)
		return false;
	
	if (file_pre || file_suf)
		return false;

	if (!OpenASingleFile(file_name + ".kmc_pre", file_pre, size, (char *)"KMCP"))
		return false;

	ReadParamsFrom_prefix_file_buf(size);
	fclose(file_pre);
	file_pre = NULL;

	end_of_file = total_kmers == 0;

	if (!OpenASingleFile(file_name + ".kmc_suf", file_suf, size, (char *)"KMCS"))
		return false;

	sufix_file_buf = new uchar[part_size];

	suffix_file_total_to_read = size;
	suf_file_left_to_read = suffix_file_total_to_read;
	auto to_read = MIN(suf_file_left_to_read, part_size);
	auto readed = fread(sufix_file_buf, 1, to_read, file_suf);
	if (readed != to_read)
	{
		std::cerr << "Error: some error while reading suffix file\n";
		return false;
	}

	suf_file_left_to_read -= readed;

	is_opened = opened_for_listing;
	prefix_index = 0;
	sufix_number = 0;
	index_in_partial_buf = 0;
	return true;
}

// Assembly:
cmpl $0x0, (%rdi)
je 0x410468
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x4105a3
cmpq $0x0, 0x28(%rbx)
jne 0x4105a3
movq %rsi, %r14
leaq 0x20(%rbx), %r15
leaq 0x18bc61(%rip), %rdx    # 0x59c0fe
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x40e015
leaq 0x18c9eb(%rip), %r8     # 0x59ce9c
movq %rsp, %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x40ffc2
movl %eax, %ebp
movq %r12, %rdi
callq 0x484210
testb %bpl, %bpl
je 0x4105a3
leaq 0x28(%rbx), %r15
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4100a0
movq 0x20(%rbx), %rdi
callq 0x4e64c0
andq $0x0, 0x20(%rbx)
cmpq $0x0, 0x98(%rbx)
sete 0x18(%rbx)
leaq 0x18bbc4(%rip), %rdx    # 0x59c0c9
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x40e015
leaq 0x18c985(%rip), %r8     # 0x59cea1
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x40ffc2
movl %eax, %ebp
movq %r13, %rdi
callq 0x484210
testb %bpl, %bpl
je 0x4105a3
movq 0x203c38(%rip), %r14    # 0x614178
movq %r14, %rdi
callq 0x414e30
movq %rax, 0x60(%rbx)
movq (%rsp), %rcx
movq %rcx, 0x10(%rbx)
movq %rcx, 0x8(%rbx)
cmpq %r14, %rcx
cmovbq %rcx, %r14
movq 0x28(%rbx), %rcx
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x4e6e20
cmpq %r14, %rax
jne 0x410590
subq %r14, 0x8(%rbx)
movl $0x2, (%rbx)
andq $0x0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
movb $0x1, %al
jmp 0x4105a5
movq $0x1b6c840, %rdi        # imm = 0x1B6C840
leaq 0x18c908(%rip), %rsi    # 0x59cea6
callq 0x47de40
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::~CKMCFile()
CKMCFile::~CKMCFile()
{
	if (file_pre)
		fclose(file_pre);
	if (file_suf)
		fclose(file_suf);
	if (prefix_file_buf)
		delete[] prefix_file_buf;
	if (sufix_file_buf)
		delete[] sufix_file_buf;
	if (signature_map)
		delete[] signature_map;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x4105e8
callq 0x4e64c0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4105f6
callq 0x4e64c0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x410604
callq 0x413f40
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x410612
callq 0x413f40
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x410621
popq %rbx
jmp 0x413f40
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::CheckKmer(CKmerAPI&, float&)
bool CKMCFile::CheckKmer(CKmerAPI &kmer, float &count)
{
	uint32 int_counter;
	if (CheckKmer(kmer, int_counter))
	{
		if (mode == 0)
			count = (float)int_counter;
		else
			memcpy(&count, &int_counter, counter_size);
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
callq 0x410678
movl %eax, %ebp
testb %al, %al
je 0x41066c
cmpl $0x0, 0x7c(%r14)
je 0x41065f
movl 0x80(%r14), %edx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x401080
jmp 0x41066c
movl 0xc(%rsp), %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::CheckKmer(CKmerAPI&, unsigned int&)
bool CKMCFile::CheckKmer(CKmerAPI &kmer, uint32 &count)
{
	if(is_opened != opened_for_RA)
		return false;
	if(end_of_file)
		return false;
	
	//recognize a prefix:
	uint64 pattern_prefix_value = kmer.kmer_data[0];

	uint32 pattern_offset = (sizeof(pattern_prefix_value)* 8) - (lut_prefix_length * 2) - (kmer.byte_alignment * 2);
	int64 index_start = 0, index_stop = 0;

	pattern_prefix_value = pattern_prefix_value >> pattern_offset;  //complements with 0
	if (pattern_prefix_value >= prefix_file_buf_size)
		return false;

	if (kmc_version == 0x200)
	{
		uint32 signature = kmer.get_signature(signature_len);
		uint32 bin_start_pos = signature_map[signature];
		bin_start_pos *= single_LUT_size;				
		//look into the array with data
		index_start = *(prefix_file_buf + bin_start_pos + pattern_prefix_value);
		index_stop = *(prefix_file_buf + bin_start_pos + pattern_prefix_value + 1) - 1;
	}
	else if (kmc_version == 0)
	{
		//look into the array with data
		index_start = prefix_file_buf[pattern_prefix_value];
		index_stop = prefix_file_buf[pattern_prefix_value + 1] - 1;
	}
	uint64 tmp_count ;
	bool res = BinarySearch(index_start, index_stop, kmer, tmp_count, pattern_offset);
	count = (uint32)tmp_count;
	return res;
}

// Assembly:
cmpl $0x1, (%rdi)
jne 0x4106ea
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
cmpb $0x0, 0x18(%rdi)
jne 0x4106ed
movq %rsi, %r14
movq (%rsi), %rax
movq (%rax), %r12
movl 0x84(%r15), %ecx
addl 0xc(%rsi), %ecx
addl %ecx, %ecx
negb %cl
shrq %cl, %r12
cmpq 0x38(%r15), %r12
jae 0x4106ed
movq %rdx, %rbx
movl 0xa4(%r15), %eax
testl %eax, %eax
je 0x4106f1
cmpl $0x200, %eax            # imm = 0x200
jne 0x410703
movl 0x88(%r15), %esi
movq %r14, %rdi
callq 0x41232e
movq 0x50(%r15), %rcx
movl %eax, %edx
movl 0x48(%r15), %eax
imull (%rcx,%rdx,4), %eax
shlq $0x3, %rax
addq 0x30(%r15), %rax
jmp 0x4106f5
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x41071e
movq 0x30(%r15), %rax
movq (%rax,%r12,8), %rsi
movq 0x8(%rax,%r12,8), %rdx
decq %rdx
jmp 0x410707
xorl %edx, %edx
xorl %esi, %esi
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rcx
movq %r12, %r8
callq 0x41072a
movl (%r12), %ecx
movl %ecx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::CheckKmer(CKmerAPI&, unsigned long long&)
bool CKMCFile::CheckKmer(CKmerAPI &kmer, uint64 &count)
{
	if (is_opened != opened_for_RA)
		return false;
	if (end_of_file)
		return false;

	//recognize a prefix:
	uint64 pattern_prefix_value = kmer.kmer_data[0];

	uint32 pattern_offset = (sizeof(pattern_prefix_value)* 8) - (lut_prefix_length * 2) - (kmer.byte_alignment * 2);
	int64 index_start = 0, index_stop = 0;

	pattern_prefix_value = pattern_prefix_value >> pattern_offset;  //complements with 0
	if (pattern_prefix_value >= prefix_file_buf_size)
		return false;

	if (kmc_version == 0x200)
	{
		uint32 signature = kmer.get_signature(signature_len);
		uint32 bin_start_pos = signature_map[signature];
		bin_start_pos *= single_LUT_size;
		//look into the array with data
		index_start = *(prefix_file_buf + bin_start_pos + pattern_prefix_value);
		index_stop = *(prefix_file_buf + bin_start_pos + pattern_prefix_value + 1) - 1;
	}
	else if (kmc_version == 0)
	{
		//look into the array with data
		index_start = prefix_file_buf[pattern_prefix_value];
		index_stop = prefix_file_buf[pattern_prefix_value + 1] - 1;
	}
	return BinarySearch(index_start, index_stop, kmer, count, pattern_offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0x410968
movq %rdi, %r15
cmpb $0x0, 0x18(%rdi)
jne 0x410968
movq %rsi, %r14
movq (%rsi), %rax
movq (%rax), %r12
movl 0x84(%r15), %ecx
addl 0xc(%rsi), %ecx
addl %ecx, %ecx
negb %cl
shrq %cl, %r12
cmpq 0x38(%r15), %r12
jae 0x410968
movq %rdx, %rbx
movl 0xa4(%r15), %eax
testl %eax, %eax
je 0x410976
cmpl $0x200, %eax            # imm = 0x200
jne 0x410988
movl 0x88(%r15), %esi
movq %r14, %rdi
callq 0x41232e
movq 0x50(%r15), %rcx
movl %eax, %edx
movl 0x48(%r15), %eax
imull (%rcx,%rdx,4), %eax
shlq $0x3, %rax
addq 0x30(%r15), %rax
jmp 0x41097a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x30(%r15), %rax
movq (%rax,%r12,8), %rsi
movq 0x8(%rax,%r12,8), %rdx
decq %rdx
jmp 0x41098c
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x41072a
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::ReadNextKmer(CKmerAPI&, float&)
bool CKMCFile::ReadNextKmer(CKmerAPI &kmer, float &count)
{
	uint32 int_counter;
	if (ReadNextKmer(kmer, int_counter))
	{
		if (mode == 0)
			count = (float)int_counter;
		else
			memcpy(&count, &int_counter, counter_size);
		return true;
	}
	return false;

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
callq 0x4109fe
movl %eax, %ebp
testb %al, %al
je 0x4109f2
cmpl $0x0, 0x7c(%r14)
je 0x4109e5
movl 0x80(%r14), %edx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x401080
jmp 0x4109f2
movl 0xc(%rsp), %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::Reload_sufix_file_buf()
void CKMCFile::Reload_sufix_file_buf()
{
	auto to_read = MIN(suf_file_left_to_read, part_size);
	auto readed = fread(sufix_file_buf, 1, (size_t)to_read, file_suf);
	suf_file_left_to_read -= readed;
	if (readed != to_read)
	{
		std::cerr << "Error: some error while reading suffix file\n";
		exit(1);
	}
	index_in_partial_buf = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x203538(%rip), %r14    # 0x614178
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
cmpq %r14, %rax
cmovbq %rax, %r14
movq 0x60(%rdi), %rdi
pushq $0x1
popq %rsi
movq %r14, %rdx
callq 0x4e6e20
subq %rax, 0x8(%rbx)
cmpq %r14, %rax
jne 0x410c74
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq $0x1b6c840, %rdi        # imm = 0x1B6C840
leaq 0x18c224(%rip), %rsi    # 0x59cea6
callq 0x47de40
pushq $0x1
popq %rdi
callq 0x4d46f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::Close()
bool CKMCFile::Close()
{
	if(is_opened)
	{
		if(file_pre)
		{
			fclose(file_pre);	
			file_pre = NULL;
		}
		if(file_suf)
		{
			fclose(file_suf);
			file_suf = NULL;
		}
	
		is_opened = closed;
		end_of_file = false;
		delete [] prefix_file_buf;
		prefix_file_buf = NULL;
		delete [] sufix_file_buf;
		sufix_file_buf = NULL;
		delete[] signature_map;
		signature_map = NULL;

		return true;
	}
	else
		return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x410ee4
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x410e91
callq 0x4e64c0
andq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x410ea4
callq 0x4e64c0
andq $0x0, 0x28(%rbx)
andl $0x0, (%rbx)
movb $0x0, 0x18(%rbx)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x410eb9
callq 0x413f40
andq $0x0, 0x30(%rbx)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x410ecc
callq 0x413f40
andq $0x0, 0x60(%rbx)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x410edf
callq 0x413f40
andq $0x0, 0x50(%rbx)
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::RestartListing()
bool CKMCFile::RestartListing(void)
{
	if(is_opened == opened_for_listing)
	{
		my_fseek(file_suf , 4 , SEEK_SET);
		suf_file_left_to_read = suffix_file_total_to_read;
		auto to_read = MIN(suf_file_left_to_read, part_size);
		auto readed = fread(sufix_file_buf, 1, to_read, file_suf);
		if (readed != to_read)
		{
			std::cerr << "Error: some error while reading suffix file\n";
			return false;
		}

		suf_file_left_to_read -= readed;
		prefix_index = 0;
		sufix_number = 0;
		index_in_partial_buf = 0;

		end_of_file = total_kmers == 0;

		return true;
	}
	return false;
		
}

// Assembly:
cmpl $0x2, (%rdi)
jne 0x410f58
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
pushq $0x4
popq %rsi
xorl %edx, %edx
callq 0x4eb710
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rbx)
movq 0x20325b(%rip), %r14    # 0x614178
cmpq %r14, %rax
cmovbq %rax, %r14
movq 0x60(%rbx), %rdi
pushq $0x1
popq %rsi
movq %r14, %rdx
callq 0x4e6e20
cmpq %r14, %rax
jne 0x410f5b
subq %r14, 0x8(%rbx)
andq $0x0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
cmpq $0x0, 0x98(%rbx)
sete 0x18(%rbx)
movb $0x1, %al
jmp 0x410f70
xorl %eax, %eax
retq
movq $0x1b6c840, %rdi        # imm = 0x1B6C840
leaq 0x18bf3d(%rip), %rsi    # 0x59cea6
callq 0x47de40
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::Info(CKMCFileInfo&)
bool CKMCFile::Info(CKMCFileInfo& info)
{
	if (is_opened)
	{
		info.kmer_length = kmer_length;
		info.mode = mode;
		info.counter_size = counter_size;
		info.lut_prefix_length = lut_prefix_length;
		if (kmc_version == 0x200)
			info.signature_len = signature_len;
		else
			info.signature_len = 0; //for kmc1 there is no signature_len
		info.min_count = min_count;
		info.max_count = max_count;
		info.total_kmers = total_kmers;
		info.both_strands = both_strands;
		return true;
	}
	return false;
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
je 0x411290
movups 0x78(%rdi), %xmm0
movups %xmm0, (%rsi)
xorl %ecx, %ecx
cmpl $0x200, 0xa4(%rdi)      # imm = 0x200
jne 0x411265
movl 0x88(%rdi), %ecx
movl %ecx, 0x10(%rsi)
movl 0x8c(%rdi), %ecx
movl %ecx, 0x14(%rsi)
movq 0x90(%rdi), %rcx
movq %rcx, 0x18(%rsi)
movq 0x98(%rdi), %rcx
movq %rcx, 0x28(%rsi)
movb 0xa0(%rdi), %cl
movb %cl, 0x20(%rsi)
testl %eax, %eax
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::GetCountersForRead(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<unsigned int, std::allocator<unsigned int>>&)
bool CKMCFile::GetCountersForRead(const std::string& read, std::vector<uint32>& counters)
{
	if (is_opened != opened_for_RA)
		return false;

	if (read.length() < kmer_length)
	{
		counters.clear();
		return false;
	}

	if (kmc_version == 0x200)
	{		
		if (both_strands)
			return GetCountersForRead_kmc2_both_strands(read, counters);
		else
			return GetCountersForRead_kmc2(read, counters);
	}
	else if (kmc_version == 0)
	{
		if (both_strands)
			return GetCountersForRead_kmc1_both_strands(read,counters);
		else
			return GetCountersForRead_kmc1(read, counters);
	}
	else
		return false; //never should be here
}

// Assembly:
pushq %rax
cmpl $0x1, (%rdi)
jne 0x4112d5
movl 0x78(%rdi), %eax
cmpq %rax, 0x8(%rsi)
jae 0x4112b4
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x4112d5
movq %rax, 0x8(%rdx)
jmp 0x4112d5
movl 0xa4(%rdi), %eax
testl %eax, %eax
je 0x4112d9
cmpl $0x200, %eax            # imm = 0x200
jne 0x4112d5
cmpb $0x1, 0xa0(%rdi)
jne 0x4112e9
callq 0x4112fa
jmp 0x4112f5
xorl %eax, %eax
popq %rcx
retq
cmpb $0x1, 0xa0(%rdi)
jne 0x4112f0
callq 0x411892
jmp 0x4112f5
callq 0x411618
jmp 0x4112f5
callq 0x411c5e
movb $0x1, %al
jmp 0x4112d7
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::GetCountersForRead(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<float, std::allocator<float>>&)
bool CKMCFile::GetCountersForRead(const std::string& read, std::vector<float>& counters)
{
	if (is_opened != opened_for_RA)
		return false;
	std::vector<uint32> uint32_v;
	if (GetCountersForRead(read, uint32_v))
	{
		counters.clear();
		counters.resize(uint32_v.size());
		if (mode == 0)
		{
			for (uint32 i = 0; i < uint32_v.size(); ++i)
				counters[i] = static_cast<float>(uint32_v[i]);
		}
		else
		{
			for (uint32 i = 0; i < uint32_v.size(); ++i)
				memcpy(&counters[i], &uint32_v[i], counter_size);
		}

		return true;
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x1, (%rdi)
jne 0x411f96
movq %rdx, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
callq 0x411296
movl %eax, %ebx
testb %al, %al
je 0x411fc7
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x411f3e
movq %rax, 0x8(%r14)
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x2, %rsi
movq %r14, %rdi
callq 0x4123b8
cmpl $0x0, 0x7c(%r15)
je 0x411f9a
xorl %eax, %eax
movl %eax, %r12d
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x411fc7
leaq (,%r12,4), %rdi
addq (%r14), %rdi
leaq (%rax,%r12,4), %rsi
movl 0x80(%r15), %edx
callq 0x401080
leal 0x1(%r12), %eax
jmp 0x411f5c
xorl %ebx, %ebx
jmp 0x411fcf
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq (%r14), %rdx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x411fc7
movl (%rax,%rsi,4), %edi
cvtsi2ss %rdi, %xmm0
movss %xmm0, (%rdx,%rsi,4)
incl %esi
jmp 0x411faf
movq %rsp, %rdi
callq 0x40e69c
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40e69c
movq %rbx, %rdi
callq 0x4b8e10
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::count_for_kmer_kmc1(CKmerAPI&)
uint32 CKMCFile::count_for_kmer_kmc1(CKmerAPI& kmer)
{
	//recognize a prefix:

	uint64 pattern_prefix_value = kmer.kmer_data[0];

	uint32 pattern_offset = (sizeof(pattern_prefix_value)* 8) - (lut_prefix_length * 2) - (kmer.byte_alignment * 2);

	pattern_prefix_value = pattern_prefix_value >> pattern_offset;  //complements with 0
	if (pattern_prefix_value >= prefix_file_buf_size)
		return false;
	//look into the array with data

	int64 index_start = prefix_file_buf[pattern_prefix_value];
	int64 index_stop = prefix_file_buf[pattern_prefix_value + 1] - 1;

	uint64 counter = 0;
	if (BinarySearch(index_start, index_stop, kmer, counter, pattern_offset))
		return (uint32)counter;
	return 0;
}

// Assembly:
movq (%rsi), %rax
movq (%rax), %rdx
movl 0x84(%rdi), %ecx
addl 0xc(%rsi), %ecx
addl %ecx, %ecx
negb %cl
shrq %cl, %rdx
xorl %eax, %eax
cmpq 0x38(%rdi), %rdx
jae 0x412040
pushq %rax
movq %rsi, %r9
movq 0x30(%rdi), %rax
movq (%rax,%rdx,8), %rsi
movq 0x8(%rax,%rdx,8), %rdx
decq %rdx
movq %rsp, %r8
andq $0x0, (%r8)
movq %r9, %rcx
callq 0x41072a
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x41203c
movl (%rsp), %eax
addq $0x8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmc_file.cpp
// Function: CKMCFile::count_for_kmer_kmc2(CKmerAPI&, unsigned int)
uint32 CKMCFile::count_for_kmer_kmc2(CKmerAPI& kmer, uint32 bin_start_pos)
{
	//recognize a prefix:
	uint64 pattern_prefix_value = kmer.kmer_data[0];

	uint32 pattern_offset = (sizeof(pattern_prefix_value)* 8) - (lut_prefix_length * 2) - (kmer.byte_alignment * 2);

	pattern_prefix_value = pattern_prefix_value >> pattern_offset;  //complements with 0
	if (pattern_prefix_value >= prefix_file_buf_size)
		return false;
	//look into the array with data

	int64 index_start = *(prefix_file_buf + bin_start_pos + pattern_prefix_value);
	int64 index_stop = *(prefix_file_buf + bin_start_pos + pattern_prefix_value + 1) - 1;

	uint64 counter = 0;
	if (BinarySearch(index_start, index_stop, kmer, counter, pattern_offset))
		return (uint32)counter;
	return 0;
}

// Assembly:
movq (%rsi), %rax
movq (%rax), %r8
movl 0x84(%rdi), %ecx
addl 0xc(%rsi), %ecx
addl %ecx, %ecx
negb %cl
shrq %cl, %r8
xorl %eax, %eax
cmpq 0x38(%rdi), %r8
jae 0x412098
pushq %rax
movq %rsi, %r9
movl %edx, %eax
shlq $0x3, %rax
addq 0x30(%rdi), %rax
movq (%rax,%r8,8), %rsi
movq 0x8(%rax,%r8,8), %rdx
decq %rdx
movq %rsp, %r8
andq $0x0, (%r8)
movq %r9, %rcx
callq 0x41072a
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x412094
movl (%rsp), %eax
addq $0x8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmer_api.h
// Function: CKmerAPI::get_signature(unsigned int)
uint32 get_signature(uint32 sig_len)
	 {
		 uchar symb;
		 CMmer cur_mmr(sig_len);
		 
		 for(uint32 i = 0; i < sig_len; ++i)
		 {
			 symb = get_num_symbol(i);
			 cur_mmr.insert(symb);
		 }
		 CMmer min_mmr(cur_mmr);
		 for (uint32 i = sig_len; i < kmer_length; ++i)
		 {
			 symb = get_num_symbol(i);
			 cur_mmr.insert(symb);
			 
			 if (cur_mmr < min_mmr)
				 min_mmr = cur_mmr;
		 }
		 return min_mmr.get();
	 }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %rdi
callq 0x40fd44
xorl %ebp, %ebp
cmpl %ebp, %ebx
je 0x412373
movq %r14, %rdi
movl %ebp, %esi
callq 0x4127ba
movl (%rsp), %ecx
movzbl %al, %eax
leal (%rax,%rcx,4), %eax
andl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x8(%rsp)
incl %ebp
jmp 0x412345
movl 0x8(%rsp), %ebp
cmpl 0x8(%r14), %ebx
jae 0x4123ac
movq %r14, %rdi
movl %ebx, %esi
callq 0x4127ba
movl (%rsp), %ecx
movzbl %al, %eax
leal (%rax,%rcx,4), %eax
andl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x8(%rsp)
cmpl %ebp, %eax
cmovbl %eax, %ebp
incl %ebx
jmp 0x412377
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmer_api.h
// Function: CKmerAPI::SHR_insert2bits(unsigned char)
inline void SHR_insert2bits(uchar val)
	{
		for (uint32 i = no_of_rows - 1; i > 0; --i)
		{
			kmer_data[i] >>= 2;
			kmer_data[i] += kmer_data[i - 1] << 62;
		}
		kmer_data[0] >>= 2;
		kmer_data[no_of_rows - 1] &= ~((1ull << ((32 - (kmer_length + byte_alignment - (no_of_rows - 1) * 32)) * 2)) - 1);//mask falling of symbol
		kmer_data[0] += ((uint64)val << 62) >> (byte_alignment * 2);
	}

// Assembly:
movl 0x10(%rdi), %r8d
movq (%rdi), %rdx
leal -0x2(%r8), %eax
decl %r8d
leaq (%rdx,%r8,8), %rcx
cmpl $-0x1, %eax
je 0x41246b
movq (%rcx), %r9
movl %eax, %r10d
movq (%rdx,%r10,8), %r10
shldq $0x3e, %r9, %r10
movq %r10, (%rcx)
decl %eax
addq $-0x8, %rcx
jmp 0x41244c
shrq $0x2, (%rdx)
movl 0xc(%rdi), %eax
movl 0x8(%rdi), %edi
addl %eax, %edi
movl %r8d, %ecx
shll $0x6, %ecx
addl %edi, %edi
subl %edi, %ecx
movq (%rdx,%r8,8), %rdi
shrq %cl, %rdi
shlq %cl, %rdi
movzbl %sil, %esi
shlq $0x3e, %rsi
addl %eax, %eax
movl %eax, %ecx
shrq %cl, %rsi
movq %rdi, (%rdx,%r8,8)
addq %rsi, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmer_api.h
// Function: CKmerAPI::SHL_insert2bits(unsigned char)
inline void SHL_insert2bits(uchar val)
	{
		kmer_data[0] <<= 2;
		if (byte_alignment)
		{
			uint64 mask = ~(((1ull << 2 * byte_alignment) - 1) << (64 - 2 * byte_alignment));
			kmer_data[0] &= mask;
		}
		for (uint32 i = 1; i < no_of_rows; ++i)
		{
			kmer_data[i - 1] += kmer_data[i] >> 62;
			kmer_data[i] <<= 2;
		}
		kmer_data[no_of_rows - 1] += (uint64)val << (62 - (((kmer_length - 1 + byte_alignment) & 31) * 2));
	}

// Assembly:
movq (%rdi), %rdx
movq (%rdx), %r8
shlq $0x2, %r8
movq %r8, (%rdx)
movzbl 0xc(%rdi), %eax
testl %eax, %eax
je 0x4124d2
leal (%rax,%rax), %ecx
pushq $-0x1
popq %r9
shlq %cl, %r9
notq %r9
negb %cl
shlq %cl, %r9
notq %r9
andq %r9, %r8
movq %r8, (%rdx)
movl 0x10(%rdi), %r9d
pushq $0x1
popq %rcx
cmpq %r9, %rcx
jae 0x412501
movq (%rdx,%rcx,8), %r10
movq %r10, %r11
shrq $0x3e, %r11
addq %r11, %r8
movq %r8, -0x8(%rdx,%rcx,8)
shlq $0x2, %r10
movq %r10, (%rdx,%rcx,8)
incq %rcx
movq %r10, %r8
jmp 0x4124d9
movzbl %sil, %esi
addl 0x8(%rdi), %eax
addl %eax, %eax
addb $-0x2, %al
notb %al
andb $0x3e, %al
movl %eax, %ecx
shlq %cl, %rsi
decl %r9d
addq %rsi, (%rdx,%r9,8)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmer_api.h
// Function: CKmerAPI::get_num_symbol(unsigned int)
inline uchar get_num_symbol(unsigned int pos)
	{
		if (pos >= kmer_length)
			return 0;

		uint32 current_row = (pos + byte_alignment) / 32;
		uint32 current_pos = ((pos + byte_alignment) % 32) * 2;
		uint64 mask = 0xc000000000000000 >> current_pos;
		uint64 symbol = kmer_data[current_row] & mask;
		symbol = symbol >> (64 - current_pos - 2);
		uchar* byte_ptr = reinterpret_cast<uchar*>(&symbol);
		return *byte_ptr;

	}

// Assembly:
cmpl %esi, 0x8(%rdi)
jbe 0x4127f1
movzbl 0xc(%rdi), %r8d
addl %esi, %r8d
leal (%r8,%r8), %ecx
movl %ecx, %edx
andb $0x3e, %dl
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
shrq %cl, %rax
movq (%rdi), %rcx
shrl $0x5, %r8d
andq (%rcx,%r8,8), %rax
xorb $0x3e, %dl
movl %edx, %ecx
shrq %cl, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmc_api/kmer_api.h
// Function: CKmerAPI::_si::_si()
_si()
		{
			for (int i = 0; i < 256; i++)
                num_codes[i] = -1;
			num_codes['A'] = num_codes['a'] = 0;
			num_codes['C'] = num_codes['c'] = 1;
			num_codes['G'] = num_codes['g'] = 2;
			num_codes['T'] = num_codes['t'] = 3;
        }

// Assembly:
xorl %eax, %eax
leaq 0x1758c87(%rip), %rcx   # 0x1b6b940
cmpq $0x100, %rax            # imm = 0x100
je 0x412cca
movb $-0x1, (%rax,%rcx)
incq %rax
jmp 0x412cb9
xorl %eax, %eax
movb %al, 0x1758ccf(%rip)    # 0x1b6b9a1
movb %al, 0x1758ca9(%rip)    # 0x1b6b981
movb $0x1, %al
movb %al, 0x1758cc3(%rip)    # 0x1b6b9a3
movb %al, 0x1758c9d(%rip)    # 0x1b6b983
movb $0x2, %al
movb %al, 0x1758cb9(%rip)    # 0x1b6b9a7
movb %al, 0x1758c93(%rip)    # 0x1b6b987
movb $0x3, %al
movb %al, 0x1758cb8(%rip)    # 0x1b6b9b4
movb %al, 0x1758c92(%rip)    # 0x1b6b994
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/stats.cpp
// Function: ranksums(std::vector<float, std::allocator<float>>&, std::vector<float, std::allocator<float>>&)
float ranksums(std::vector<float>& group1, std::vector<float>& group2)
{
	uint32_t n1 = group1.size(), n2 = group2.size();
	uint32_t i;
	float s = 0;
	std::vector<float> alldata;
	std::vector<float> ranked_data;

	alldata.insert(alldata.end(), group1.begin(), group1.end());
	alldata.insert(alldata.end(), group2.begin(), group2.end());

	getrank(alldata, ranked_data);
	for (i = 0; i < n1; i++) s += ranked_data[i];
	float expected = n1 * (n1 + n2 + 1) / 2.0;
	float z = (s - expected) / sqrt(n1 * n2 * (n1 + n2 + 1) / 12.0);

	if (fabs(z) >= 5.0) return 0.0;
	else
	{
		return 2 * (1 - normdist[(int)(fabs(z) * 10)][(int)(fabs(z) * 100) % 10]);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq (%rdi), %r14
movq 0x8(%rdi), %rbx
movq 0x8(%rsi), %r12
subq (%rsi), %r12
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x40ba1a
leaq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq (%r15), %rdx
movq 0x8(%r15), %rcx
callq 0x40ba1a
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x409324
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x412d04
subq %r14, %rbx
shrq $0x2, %rbx
shrq $0x2, %r12
leaq 0x50(%rsp), %rdi
callq 0x408710
movq 0x10(%rsp), %rax
movl %ebx, %ecx
xorps %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x412fe7
addss (%rax,%rdx,4), %xmm0
incq %rdx
jmp 0x412fd8
leal (%rbx,%r12), %eax
incl %eax
imull %ebx, %r12d
imull %eax, %r12d
imull %ebx, %eax
cvtsi2sd %rax, %xmm1
mulsd 0x189f03(%rip), %xmm1   # 0x59cf08
cvtsd2ss %xmm1, %xmm1
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
cvtsi2sd %r12, %xmm1
divsd 0x189ef2(%rip), %xmm1   # 0x59cf10
sqrtsd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
andps 0x189eff(%rip), %xmm0   # 0x59cf30
xorpd %xmm1, %xmm1
ucomiss 0x189ebc(%rip), %xmm0   # 0x59cef8
jae 0x413089
movss 0x189eb6(%rip), %xmm1   # 0x59cefc
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movslq %eax, %rcx
mulss 0x189ea7(%rip), %xmm0   # 0x59cf00
cvttss2si %xmm0, %eax
pushq $0xa
popq %rsi
cltd
idivl %esi
movslq %edx, %rax
imulq $0x50, %rcx, %rcx
leaq 0x189ecf(%rip), %rdx    # 0x59cf40
addq %rcx, %rdx
movsd 0x189e9c(%rip), %xmm0   # 0x59cf18
subsd (%rdx,%rax,8), %xmm0
addsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm1
movss %xmm1, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x408710
leaq 0x30(%rsp), %rdi
callq 0x408710
movss 0xc(%rsp), %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x408710
jmp 0x4130cb
jmp 0x4130c8
jmp 0x4130c8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x408710
leaq 0x30(%rsp), %rdi
callq 0x408710
movq %rbx, %rdi
callq 0x4b8e10
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/stats.cpp
// Function: spearman_correlation_coefficient(std::vector<float, std::allocator<float>>, std::vector<float, std::allocator<float>>)
float spearman_correlation_coefficient(std::vector<float> group1, std::vector<float> group2)
{
	std::vector<float> ranked_data1, ranked_data2;
	float d2 = 0;
	uint32_t n = group1.size();

	getrank(group1, ranked_data1);
	getrank(group2, ranked_data2);

	for (uint32_t i = 0; i < n; i++) d2 += (group1[i] - group2[i]) * (group1[i] - group2[i]);

	return 1.0 - 6.0 * d2 / n / (n * n - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq 0x8(%rdi), %r15
subq (%rdi), %r15
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x409324
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x412d04
leaq 0x68(%rsp), %rdi
callq 0x408710
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x409324
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x412d04
shrq $0x2, %r15
leaq 0x50(%rsp), %rdi
callq 0x408710
movl %r15d, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x413193
movq (%r14), %rdx
movss (%rdx,%rcx,4), %xmm1
movq (%rbx), %rdx
subss (%rdx,%rcx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rcx
jmp 0x413171
cvtss2sd %xmm0, %xmm0
mulsd 0x189d81(%rip), %xmm0   # 0x59cf20
movl %r15d, %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
imull %r15d, %r15d
decl %r15d
cvtsi2sd %r15, %xmm1
divsd %xmm1, %xmm0
addsd 0x189d55(%rip), %xmm0   # 0x59cf18
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x408710
leaq 0x30(%rsp), %rdi
callq 0x408710
movss 0xc(%rsp), %xmm0
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x413206
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x408710
jmp 0x413210
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x408710
leaq 0x30(%rsp), %rdi
callq 0x408710
movq %rbx, %rdi
callq 0x4b8e10
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::logisticRegression()
void Logistic::logisticRegression() {
	double lamda = 0.1;		//step size
	double delta = 0.001;	//threshold of breaking iteration
	double objLw = Lw(param);
	Logistic_Param tpa(param.w, param.d);
	gradient(lamda);
	double newObjLw = Lw(param);
	int iter = 0;
	while (fabs(newObjLw - objLw) > delta || !samewb(tpa, param, delta)) {
		objLw = newObjLw;
		tpa = Logistic_Param(param.w, param.d);
		gradient(lamda);
		newObjLw = Lw(param);
		++iter;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0xc8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x413cdc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4138a6
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x40bd32
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x413c68
movsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x413c68
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x40bd32
movsd 0x18a7a7(%rip), %xmm0   # 0x59dee0
movq %rbx, %rdi
callq 0x41393e
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x413cdc
leaq 0x88(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4138a6
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
callq 0x40bd32
movsd 0x10(%rsp), %xmm0
leaq 0x38(%rsp), %r12
leaq 0x68(%rsp), %r13
leaq 0x18(%rsp), %r15
leaq 0xa8(%rsp), %rbp
movsd 0x8(%rsp), %xmm2
movsd %xmm0, 0x10(%rsp)
movapd %xmm0, %xmm1
subsd %xmm2, %xmm1
andpd 0x18a745(%rip), %xmm1   # 0x59def0
movsd 0x18a735(%rip), %xmm0   # 0x59dee8
ucomisd %xmm0, %xmm1
ja 0x4137cc
movq %r15, %rsi
movq %r14, %rdx
callq 0x413a8c
testb %al, %al
jne 0x41385c
movq %r12, %rdi
movq %r14, %rsi
callq 0x413c68
movsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x413c68
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x413cfe
movq %r13, %rdi
callq 0x40bd32
movq %r12, %rdi
callq 0x40bd32
movq %rbx, %rdi
movsd 0x18a6be(%rip), %xmm0   # 0x59dee0
callq 0x41393e
movq %rbp, %rdi
movq %r14, %rsi
callq 0x413cdc
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4138a6
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
callq 0x40bd32
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm0
jmp 0x413795
leaq 0x18(%rsp), %rdi
callq 0x40bd32
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %r15
jmp 0x413896
jmp 0x413893
jmp 0x413893
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x40bd32
jmp 0x413896
movq %rax, %rbx
movq %r15, %rdi
callq 0x40bd32
movq %rbx, %rdi
callq 0x4b8e10
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::Lw(Logistic_Param)
double Logistic::Lw(Logistic_Param p) {
	double l = 0.0L;
	for (uint32_t i = 0; i < dataSet.size(); i++) {
		double inner = innerWX(p, dataSet[i]);
		l += (dataSet[i].cls * inner - (log10(1 + exp(inner))));
	}
	return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
xorl %eax, %eax
movl %eax, %r15d
movq (%r14), %rdx
movq 0x8(%r14), %rax
subq %rdx, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x413931
movq %r15, %r12
shlq $0x5, %r12
addq %r12, %rdx
movq %rbx, %rsi
movsd %xmm0, 0x10(%rsp)
callq 0x413b26
movsd %xmm0, (%rsp)
movq (%r14), %rax
cvtsi2sdl 0x18(%rax,%r12), %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x4b38d0
addsd 0x18960b(%rip), %xmm0   # 0x59cf18
callq 0x4b37d0
movsd 0x8(%rsp), %xmm1
mulsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
leal 0x1(%r15), %eax
jmp 0x4138bd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::gradient(double)
void Logistic::gradient(double lam) {
	for (uint32_t i = 0; i < param.w.size(); i++) {
		double tmp = 0.0L;
		for (uint32_t j = 0; j < dataSet.size(); j++) {
			tmp += (dataSet[j].cls - logiFun(param, dataSet[j])) * dataSet[j].features[i] * lam;
		}
		param.w[i] += (tmp);
	}
	double tmp = 0.0L;
	for (uint32_t j = 0; j < dataSet.size(); j++) {
		tmp += (dataSet[j].cls - logiFun(param, dataSet[j])) * lam;
	}
	param.d += tmp;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %r15d
movq 0x20(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x413a0f
movq (%rbx), %rdx
xorl %eax, %eax
xorpd %xmm0, %xmm0
movl %eax, %r12d
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x4139f7
movq %r12, %r13
shlq $0x5, %r13
cvtsi2sdl 0x18(%rdx,%r13), %xmm1
movsd %xmm1, 0x10(%rsp)
addq %r13, %rdx
movq %rbx, %rdi
movq %r14, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x413ae6
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movq (%rbx), %rdx
movq (%rdx,%r13), %rax
cvtss2sd (%rax,%r15,4), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x18(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
leal 0x1(%r12), %eax
jmp 0x41397e
movq (%r14), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
leal 0x1(%r15), %ecx
jmp 0x41395e
xorl %eax, %eax
xorpd %xmm0, %xmm0
movl %eax, %r15d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
jbe 0x413a73
movq %r15, %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rdx
cvtsi2sdl 0x18(%rax,%rcx), %xmm1
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x413ae6
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm1
addsd %xmm1, %xmm0
leal 0x1(%r15), %eax
jmp 0x413a15
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x30(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::samewb(Logistic_Param const&, Logistic_Param const&, double)
bool Logistic::samewb(const Logistic_Param& tparam, const Logistic_Param& param, double delta) {
	for (uint32_t i = 0; i < tparam.w.size(); i++) {
		if (fabs(tparam.w[i] - param.w[i]) > delta) {
			return false;
		}
	}
	if (fabs(tparam.d - param.d) > delta) {
		return false;
	}
	return true;
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rdx), %rdi
xorl %r8d, %r8d
movapd 0x18a448(%rip), %xmm1   # 0x59def0
movl %r8d, %r8d
cmpq %r8, %rcx
jbe 0x413acc
movsd (%rax,%r8,8), %xmm2
subsd (%rdi,%r8,8), %xmm2
andpd %xmm1, %xmm2
incl %r8d
ucomisd %xmm0, %xmm2
jbe 0x413aa8
xorl %eax, %eax
retq
movsd 0x18(%rsi), %xmm1
subsd 0x18(%rdx), %xmm1
andpd 0x18a412(%rip), %xmm1   # 0x59def0
ucomisd %xmm0, %xmm1
setbe %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::innerWX(Logistic_Param const&, Logistic_Data const&)
double Logistic::innerWX(const Logistic_Param& p, const Logistic_Data& data) {
	if (p.w.size() != data.features.size()) {
		exit(0);
	}
	double innerP = 0.0L;
	for (uint32_t i = 0; i < p.w.size(); i++) {
		innerP += (p.w[i] * data.features[i]);
	}
	innerP += p.d;
	return innerP;
}

// Assembly:
pushq %rax
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rdx), %rdi
movq 0x8(%rdx), %rdx
subq %rdi, %rdx
sarq $0x2, %rdx
cmpq %rdx, %rcx
jne 0x413b6e
xorl %edx, %edx
xorpd %xmm0, %xmm0
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x413b67
cvtss2sd (%rdi,%rdx,4), %xmm1
mulsd (%rax,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incl %edx
jmp 0x413b4e
addsd 0x18(%rsi), %xmm0
popq %rax
retq
xorl %edi, %edi
callq 0x4d46f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::predictClass(std::vector<Logistic_Data, std::allocator<Logistic_Data>>&)
void Logistic::predictClass(std::vector<Logistic_Data>& testDataSet) {
	for (uint32_t i = 0; i < testDataSet.size(); i++) {
		double py1 = 0.0L;
		double py0 = 0.0L;
		double inner = innerWX(param, testDataSet[i]);
		py1 = exp(inner) / (1 + exp(inner));
		py0 = 1 - py1;
		if (py1 >= py0) testDataSet[i].cls = 1;	// class 1
		else testDataSet[i].cls = 0;	// class 0
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %r14
movq (%rsi), %rdx
xorl %eax, %eax
movl %eax, %r15d
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x413c06
movq %r15, %r12
shlq $0x5, %r12
addq %r12, %rdx
movq %r14, %rsi
callq 0x413b26
movsd %xmm0, 0x8(%rsp)
callq 0x4b38d0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x4b38d0
movsd 0x18933f(%rip), %xmm1   # 0x59cf18
addsd %xmm1, %xmm0
movsd 0x10(%rsp), %xmm2
divsd %xmm0, %xmm2
movapd %xmm1, %xmm0
subsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm2
setae %al
movq (%rbx), %rdx
movl %eax, 0x18(%rdx,%r12)
leal 0x1(%r15), %eax
jmp 0x413b90
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/williewillus[P]panda_scratchpad/src/communication/ClientSocket.cpp
// Function: communication::ClientSocket::Init()
int ClientSocket::Init() {
    	struct sockaddr_in server_addr; 

	// Communicate over TCP, IPv4
	if (( sockfd = socket( AF_INET, SOCK_STREAM, 0 )) < 0) 
    	{	 
        	cout << "Socket creation error" << endl; 
        	return -1; 
    	} 
   
    	memset(&server_addr, '0', sizeof(server_addr)); 
   	server_addr.sin_family = AF_INET; 
    	server_addr.sin_port = htons(sockport); 

    	// Convert IPv4 addresses from string to address struct in af family 
    	if ( inet_pton( AF_INET, sockaddr.c_str(), &server_addr.sin_addr ) <=0 )  
    	{ 
        	cout << "Invalid address" << endl; 
        	return -1; 
    	} 

	// Now that we've populated address and port, let's connect to the Qemu
	// socket listening on port *sockport*
	// TODO (jaya) : This is a blocking connect operation. The current timeout is too large
	// Need to use select() in non-blocking mode to reduce the timeout.
    	if ( connect(sockfd, (struct sockaddr*) &server_addr, sizeof(server_addr) ) < 0 ) 
    	{ 
        	cout << "Connection Failed" << endl;; 
        	return -1; 
    	} 
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x50f0
movl %eax, (%rbx)
testl %eax, %eax
js 0x7733
leaq -0x14(%rbp), %rdx
movabsq $0x3030303030303030, %rax # imm = 0x3030303030303030
movq %rax, (%rdx)
movl $0x30303030, 0x8(%rdx)  # imm = 0x30303030
movw $0x2, -0x4(%rdx)
movzwl 0x28(%rbx), %eax
rolw $0x8, %ax
movw %ax, -0x2(%rdx)
movq 0x8(%rbx), %rsi
pushq $0x2
popq %rdi
callq 0x5800
testl %eax, %eax
jle 0x7743
movl (%rbx), %edi
leaq -0x18(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x53d0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x7761
movq 0x12896(%rip), %rdi     # 0x19fc0
leaq 0x9d95(%rip), %rsi      # 0x114c6
jmp 0x7751
movq 0x12886(%rip), %rdi     # 0x19fc0
leaq 0x9d5f(%rip), %rsi      # 0x114a0
jmp 0x7751
movq 0x12876(%rip), %rdi     # 0x19fc0
leaq 0x9d65(%rip), %rsi      # 0x114b6
callq 0x5480
movq %rax, %rdi
callq 0x5240
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/williewillus[P]panda_scratchpad/src/communication/ClientSocket.cpp
// Function: communication::ClientSocket::BuildLoadPluginMsg(communication::SockMessage&, communication::Plugins, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ClientSocket::BuildLoadPluginMsg(SockMessage& msg, Plugins plugin_name, string start, string end ) {
	msg.q_cmd = cLoadPlugin;
	msg.need_response = false;
	msg.q_cmd_options->plugin_name =plugin_name;
	msg.q_cmd_options->start = start;
	msg.q_cmd_options->end = end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rsi, %r14
movl $0x1, (%rsi)
movb $0x0, 0x4(%rsi)
movq 0x8(%rsi), %rdi
movl %edx, (%rdi)
addq $0x8, %rdi
movq %rcx, %rsi
callq 0x52a0
movq 0x8(%r14), %rdi
addq $0x28, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x52a0
nop