// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmergo/kmer_filtering.cpp
// Function: kmer_filtering(KmerGO_parameters&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
short kmer_filtering(KmerGO_parameters& p, std::string& loginfo)
{
	uint64 Allfilesize = 0;
	std::vector<std::string> files_vec;

	getFiles(p.matrixes_path, files_vec, true);
	for (auto f : files_vec)
	{
		Allfilesize += getFileSize(f);
	}

	//start threads
	std::vector<std::thread> sub_thread;
	for (unsigned int i = 0; i < files_vec.size(); i++)
	{
		if (p.mode == 0)
		{
			sub_thread.push_back(std::thread(categorical_feature_filtering, i, files_vec, p));
		}
		else
		{
			sub_thread.push_back(std::thread(continuous_feature_filtering, i, files_vec, p));
		}
	}
	sub_thread.push_back(std::thread(show_Progress, Allfilesize));
	for (unsigned int i = 0; i < files_vec.size(); i++)
	{
		sub_thread[i].join();
	}
	sub_thread[files_vec.size()].join();

	switch (filtering_err_number)
	{
	default:
		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
andq $0x0, 0x28(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x60(%rdi), %rsi
leaq 0x58(%rsp), %rdi
callq 0x486820
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x405ddf
leaq 0x58(%rsp), %rdi
callq 0x484210
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r13
xorl %ebp, %ebp
leaq 0x30(%rsp), %r15
leaq 0x78(%rsp), %r12
cmpq %r13, %r14
je 0x40b66f
movq %r15, %rdi
movq %r14, %rsi
callq 0x486820
movq %r12, %rdi
movq %r15, %rsi
callq 0x486820
movq %r12, %rdi
callq 0x40ba4a
addq %rax, %rbp
movq %rbp, 0x28(%rsp)
movq %r12, %rdi
callq 0x484210
movq %r15, %rdi
callq 0x484210
addq $0x20, %r14
jmp 0x40b62e
leaq 0x30(%rsp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
xorl %eax, %eax
movq %rsp, %r12
leaq 0xc(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq -0xb88(%rip), %r15      # 0x40ab0e
movl %eax, 0xc(%rsp)
movl %eax, %eax
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
jbe 0x40b709
cmpb $0x0, 0xe(%rbx)
je 0x40b6d6
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x40ba9c
movq %r14, %rdi
movq %r12, %rsi
callq 0x409b3e
jmp 0x40b6f9
movq %r12, %rdi
leaq -0x19ac(%rip), %rsi     # 0x409d34
movq %r13, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x40ba9c
movq %r14, %rdi
movq %r12, %rsi
callq 0x409b3e
movq %r12, %rdi
callq 0x4083e0
movl 0xc(%rsp), %eax
incl %eax
jmp 0x40b696
leaq 0xea(%rip), %rsi        # 0x40b7fa
movq %rsp, %rdi
leaq 0x28(%rsp), %rdx
callq 0x4083ee
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x409b3e
movq %rsp, %rdi
callq 0x4083e0
xorl %ebx, %ebx
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movl %ebx, %ebx
sarq $0x5, %rax
movq 0x30(%rsp), %rcx
cmpq %rbx, %rax
jbe 0x40b75b
leaq (%rcx,%rbx,8), %rdi
callq 0x487040
incl %ebx
jmp 0x40b734
leaq (%rcx,%rax,8), %rdi
callq 0x487040
movzwl 0x20afb5(%rip), %eax    # 0x616720
leaq 0x30(%rsp), %rdi
callq 0x408468
leaq 0x10(%rsp), %rdi
callq 0x40616a
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40b7b8
jmp 0x40b7ab
jmp 0x40b7b8
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x40b7e3
jmp 0x40b7c7
jmp 0x40b7ab
jmp 0x40b7b8
jmp 0x40b7b8
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4083e0
jmp 0x40b7bb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x408468
jmp 0x40b7e8
movq %rax, %rbx
jmp 0x40b7e8
movq %rax, %rbx
jmp 0x40b7de
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x40616a
movq %rbx, %rdi
callq 0x4b8e10