// File: /workspace/github_cpp_makefile_star2_O3/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 $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x90(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rdi), %rsi
movq 0x68(%rdi), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0x408000
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x4078ac
movq %rbx, 0x78(%rsp)
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x40f9c3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rbp
cmpq %rbp, %rbx
je 0x40fb5a
xorl %r14d, %r14d
leaq 0x58(%rsp), %r15
leaq 0xa0(%rsp), %r12
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x408000
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x408000
movq %r12, %rdi
movq %r15, %rsi
movl $0x6, %edx
callq 0x461c60
movq %r12, %rdi
callq 0x46ae20
movq %rax, %r13
movq %r12, %rdi
callq 0x462990
addq %r13, %r14
movq %r14, 0x50(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x40fa6a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x40fa86
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x41ae90
addq $0x20, %rbx
cmpq %rbp, %rbx
jne 0x40f9e6
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movl $0x0, 0xc(%rsp)
cmpq 0x10(%rsp), %rax
movq 0x78(%rsp), %rbx
je 0x40fb71
leaq 0x30(%rsp), %r15
leaq 0xc(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0xa0(%rsp), %rbp
leaq -0x160f(%rip), %r14     # 0x40e4d6
cmpb $0x0, 0xe(%rbx)
je 0x40fb0c
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x40ff22
movq %rbp, %rdi
movq %r15, %rsi
callq 0x40caa6
jmp 0x40fb2f
movq %r15, %rdi
leaq -0x2eb2(%rip), %rsi     # 0x40cc64
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x40ff22
movq %rbp, %rdi
movq %r15, %rsi
callq 0x40caa6
cmpq $0x0, 0x30(%rsp)
jne 0x40fc63
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 0x40fae5
jmp 0x40fb71
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
leaq 0x16b(%rip), %rsi       # 0x40fce3
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x40afd4
leaq 0xa0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x40caa6
cmpq $0x0, 0x30(%rsp)
jne 0x40fc63
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rax, %rdi
je 0x40fbe8
movl $0x1, %ebx
xorl %eax, %eax
shlq $0x3, %rax
addq 0xa0(%rsp), %rax
movq %rax, %rdi
callq 0x48e910
movq 0x18(%rsp), %rdi
subq 0x10(%rsp), %rdi
movl %ebx, %eax
sarq $0x5, %rdi
incl %ebx
cmpq %rax, %rdi
ja 0x40fbbb
jmp 0x40fbec
sarq $0x5, %rdi
shlq $0x3, %rdi
addq 0xa0(%rsp), %rdi
callq 0x48e910
movzwl 0x20bb1c(%rip), %eax    # 0x61b720
leaq 0xa0(%rsp), %rdi
callq 0x40b054
leaq 0x10(%rsp), %rdi
callq 0x407c2a
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40fc68
jmp 0x40fc5b
jmp 0x40fc68
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x40fcd1
movq 0x90(%rsp), %rsi
jmp 0x40fcc9
jmp 0x40fc7a
jmp 0x40fc5b
jmp 0x40fc68
jmp 0x40fc68
cmpq $0x0, 0x30(%rsp)
je 0x40fc68
callq 0x41bb60
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x40b054
jmp 0x40fcd1
movq %rax, %rbx
jmp 0x40fcd1
movq %rax, %rbx
jmp 0x40fcb5
movq %rax, %rbx
jmp 0x40fc99
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x462990
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x40fcb5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x40fcd1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x41ae90
leaq 0x10(%rsp), %rdi
callq 0x407c2a
movq %rbx, %rdi
callq 0x4bfce0