// File: /workspace/github_cpp_makefile_star2_O1/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 $0x298, %rsp            # imm = 0x298
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x48(%rsp)
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rdi), %rsi
movq 0x68(%rdi), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x40805e
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x407914
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x40fd03
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r14
cmpq %r14, %rbp
je 0x40fdce
leaq 0x50(%rsp), %r15
leaq 0x90(%rsp), %r12
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x40805e
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x40805e
movq %r12, %rdi
movq %r15, %rsi
movl $0x6, %edx
callq 0x462170
movq %r12, %rdi
callq 0x46b330
movq %rax, %r13
movq %r12, %rdi
callq 0x462ea0
addq %r13, 0x48(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x40fda5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x40fdc1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x41b3a0
addq $0x20, %rbp
cmpq %r14, %rbp
jne 0x40fd23
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x40fe8e
leaq 0x28(%rsp), %r15
leaq 0xc(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x90(%rsp), %rbp
leaq -0x1641(%rip), %r14     # 0x40e7da
cmpb $0x0, 0xe(%rbx)
je 0x40fe42
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x410236
movq %rbp, %rdi
movq %r15, %rsi
callq 0x40cda2
jmp 0x40fe65
movq %r15, %rdi
leaq -0x2ee8(%rip), %rsi     # 0x40cf64
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x410236
movq %rbp, %rdi
movq %r15, %rsi
callq 0x40cda2
cmpq $0x0, 0x28(%rsp)
jne 0x40ff7d
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
ja 0x40fe1b
leaq 0x168(%rip), %rsi       # 0x40fffd
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x40b274
leaq 0x90(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x40cda2
cmpq $0x0, 0x28(%rsp)
jne 0x40ff7d
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rax, %rdi
je 0x40ff05
movl $0x1, %ebx
xorl %eax, %eax
shlq $0x3, %rax
addq 0x90(%rsp), %rax
movq %rax, %rdi
callq 0x48ee20
movq 0x18(%rsp), %rdi
subq 0x10(%rsp), %rdi
movl %ebx, %eax
sarq $0x5, %rdi
incl %ebx
cmpq %rax, %rdi
ja 0x40fed8
jmp 0x40ff09
sarq $0x5, %rdi
shlq $0x3, %rdi
addq 0x90(%rsp), %rdi
callq 0x48ee20
movzwl 0x20c7ff(%rip), %eax    # 0x61c720
leaq 0x90(%rsp), %rdi
callq 0x40b306
leaq 0x10(%rsp), %rdi
callq 0x407c92
xorl %eax, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40ff82
jmp 0x40ff75
jmp 0x40ff82
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x40ffeb
movq 0x80(%rsp), %rsi
jmp 0x40ffe3
jmp 0x40ff94
jmp 0x40ff75
jmp 0x40ff82
jmp 0x40ff82
cmpq $0x0, 0x28(%rsp)
je 0x40ff82
callq 0x41c070
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x40b306
jmp 0x40ffeb
movq %rax, %rbx
jmp 0x40ffeb
movq %rax, %rbx
jmp 0x40ffcf
movq %rax, %rbx
jmp 0x40ffb3
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x462ea0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x40ffcf
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x40ffeb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x41b3a0
leaq 0x10(%rsp), %rdi
callq 0x407c92
movq %rbx, %rdi
callq 0x4c0230