// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmergo/kmer_counting.cpp
// Function: kmer_counting(KmerGO_parameters&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
short kmer_counting(KmerGO_parameters& p, std::string& loginfo)
{
	std::vector<std::string> suffix{ ".fasta", ".fa", ".fna", ".fasta.gz", ".fa.gz", ".fna.gz", ".fastq", ".fq", ".fastq.gz", ".fq.gz" };
	std::vector<std::string> kmc_ftype{ "-fm", "-fm", "-fm", "-fm", "-fm", "-fm", "-fq", "-fq", "-fq", "-fq" };

	std::string current_path, cmd, file_type = "?";
	std::vector<std::string> kmer_files, ap_kmer_files;
	uint32 r, i, j;

	current_path = getCWD();
	getFiles(p.samples_path, kmer_files, false);
	getFiles(p.samples_path, ap_kmer_files, true);

	for (i = 0; i < kmer_files.size(); i++)
	{
		std::cout << kmer_files[i] << std::endl;
		for (j = 0; j < suffix.size(); j++)
		{
			if (!suffix[j].compare(0, suffix[j].length(), kmer_files[i], kmer_files[i].length() - suffix[j].length(), suffix[j].length()))
			{
				file_type = kmc_ftype[j];
				break;
			}
		}
		if (file_type.compare("?") == 0) continue;	// skip illegal files
		cmd = joinPath(current_path, "bin/kmc -k") + std::to_string(p.k_value) + " -ci" + std::to_string(p.ci_value) +
			" -cs" + std::to_string(p.cs_value) + " " + file_type + " " + ap_kmer_files[i] + " " + 
			joinPath(p.kmercountings_path, kmer_files[i]) + " " + p.temp_path;
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "Running kmc error.";
			return 2;
		}
		cmd = joinPath(current_path, "bin/kmc_tools transform ") + joinPath(p.kmercountings_path, kmer_files[i]) + " sort " +
			joinPath(p.kmercountings_path, kmer_files[i]) + "_sort";
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "Running kmc_tools error.";
			return 3;
		}
		cmd = "mv " + joinPath(p.kmercountings_path, kmer_files[i]) + "_sort.kmc_suf " + 
			joinPath(p.kmercountings_path, kmer_files[i]) + ".kmc_suf";
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "Moving k-mer database error.";
			return 4;
		}
		cmd = "mv " + joinPath(p.kmercountings_path, kmer_files[i]) + "_sort.kmc_pre " + 
			joinPath(p.kmercountings_path, kmer_files[i]) + ".kmc_pre";
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "Moving k-mer database error.";
			return 4;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
leaq 0x19758c(%rip), %rsi    # 0x59c004
leaq 0x3b8(%rsp), %r14
leaq 0x80(%rsp), %rdx
movq %r14, %rdi
callq 0x405d40
leaq 0x3d8(%rsp), %r15
leaq 0x197bfd(%rip), %rsi    # 0x59c69c
leaq 0x148(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x3f8(%rsp), %r15
leaq 0x19754d(%rip), %rsi    # 0x59c00b
leaq 0x100(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x418(%rsp), %r15
leaq 0x197533(%rip), %rsi    # 0x59c010
leaq 0xe0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x438(%rsp), %r15
leaq 0x19751e(%rip), %rsi    # 0x59c01a
leaq 0x40(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x458(%rsp), %r15
leaq 0x197509(%rip), %rsi    # 0x59c021
leaq 0xa0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x478(%rsp), %r15
leaq 0x1974f2(%rip), %rsi    # 0x59c029
leaq 0x60(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x498(%rsp), %r15
leaq 0x1974dd(%rip), %rsi    # 0x59c030
leaq 0xc0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x4b8(%rsp), %r15
leaq 0x1974c2(%rip), %rsi    # 0x59c034
leaq 0x168(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x4d8(%rsp), %r15
leaq 0x1974ad(%rip), %rsi    # 0x59c03e
leaq 0x1a0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
movq %rbx, 0x38(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
pushq $0xa
popq %rdx
leaq 0x358(%rsp), %rcx
callq 0x405d7c
movl $0x120, %ebx            # imm = 0x120
leaq (%rsp,%rbx), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x484210
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x404bcb
leaq 0x197459(%rip), %rsi    # 0x59c045
leaq 0x3b8(%rsp), %r14
leaq 0x80(%rsp), %rdx
movq %r14, %rdi
callq 0x405d40
leaq 0x3d8(%rsp), %r15
leaq 0x197432(%rip), %rsi    # 0x59c045
leaq 0x148(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x3f8(%rsp), %r15
leaq 0x197413(%rip), %rsi    # 0x59c045
leaq 0x100(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x418(%rsp), %r15
leaq 0x1973f4(%rip), %rsi    # 0x59c045
leaq 0xe0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x438(%rsp), %r15
leaq 0x1973d5(%rip), %rsi    # 0x59c045
leaq 0x40(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x458(%rsp), %r15
leaq 0x1973b9(%rip), %rsi    # 0x59c045
leaq 0xa0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x478(%rsp), %r15
leaq 0x19739e(%rip), %rsi    # 0x59c049
leaq 0x60(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x498(%rsp), %r15
leaq 0x197382(%rip), %rsi    # 0x59c049
leaq 0xc0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x4b8(%rsp), %r15
leaq 0x197363(%rip), %rsi    # 0x59c049
leaq 0x168(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x4d8(%rsp), %r15
leaq 0x197344(%rip), %rsi    # 0x59c049
leaq 0x1a0(%rsp), %rdx
movq %r15, %rdi
callq 0x405d40
leaq 0x1c0(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
pushq $0xa
popq %rdx
leaq 0x358(%rsp), %rcx
callq 0x405d7c
movl $0x120, %ebx            # imm = 0x120
leaq (%rsp,%rbx), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x484210
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x404d3a
leaq 0x3c8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x1972ca(%rip), %rsi    # 0x59c04d
leaq 0x148(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x405d40
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movaps %xmm0, 0x120(%rsp)
andq $0x0, 0x130(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x405db5
leaq 0x3b8(%rsp), %rdi
leaq 0x100(%rsp), %rbx
movq %rbx, %rsi
callq 0x484260
movq %rbx, %rdi
callq 0x484210
movq 0x18(%rsp), %rax
leaq 0x20(%rax), %rbx
leaq 0x398(%rsp), %rdi
movq %rbx, %rsi
callq 0x486820
leaq 0x398(%rsp), %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x405ddf
leaq 0x398(%rsp), %rdi
callq 0x484210
leaq 0x378(%rsp), %rdi
movq %rbx, %rsi
callq 0x486820
leaq 0x378(%rsp), %rdi
leaq 0x120(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x405ddf
leaq 0x378(%rsp), %rdi
callq 0x484210
movq 0x18(%rsp), %rax
leaq 0x40(%rax), %rcx
movq %rcx, 0x8(%rsp)
addq $0xc0, %rax
movq %rax, 0x138(%rsp)
xorl %r13d, %r13d
movl %r13d, %r13d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x40576d
movq %r13, 0x140(%rsp)
shlq $0x5, %r13
addq %r13, %rsi
movq $0x1b6c960, %rdi        # imm = 0x1B6C960
callq 0x486ac0
movq %rax, %rdi
callq 0x47d720
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x188(%rsp), %rdi
movq 0x190(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x404f1c
movq %r12, %rbx
shlq $0x5, %rbx
movq 0x8(%rdi,%rbx), %rdx
addq %rbx, %rdi
movq 0x20(%rsp), %rcx
movq 0x8(%rcx,%r13), %r8
addq %r13, %rcx
subq %rdx, %r8
xorl %esi, %esi
movq %rdx, %r9
callq 0x486360
incl %r12d
testl %eax, %eax
jne 0x404eb5
addq 0x1c0(%rsp), %rbx
leaq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0x483e40
leaq 0x148(%rsp), %rdi
leaq 0x197122(%rip), %rsi    # 0x59c04d
callq 0x486420
testl %eax, %eax
je 0x405746
leaq 0x2d8(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
callq 0x486820
leaq 0x6b8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1970f0(%rip), %rsi    # 0x59c04f
leaq 0x17(%rsp), %rdx
callq 0x405d40
leaq 0x698(%rsp), %r12
leaq 0x2f8(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
movq %rbp, %rdx
callq 0x405fcb
movq 0x18(%rsp), %rax
movzwl (%rax), %esi
movq %r12, %rdi
callq 0x4060ae
leaq 0x658(%rsp), %r14
movq %r14, %rdi
leaq 0x2f8(%rsp), %rsi
movq %r12, %rdx
callq 0x405f64
leaq 0x318(%rsp), %rdi
movq %r14, %rsi
leaq 0x197094(%rip), %rdx    # 0x59c05a
callq 0x405f45
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
leaq 0x638(%rsp), %r14
movq %r14, %rdi
callq 0x406107
leaq 0x678(%rsp), %rbx
movq %rbx, %rdi
leaq 0x318(%rsp), %rsi
movq %r14, %rdx
callq 0x405f64
leaq 0x338(%rsp), %rdi
movq %rbx, %rsi
leaq 0x19704f(%rip), %rdx    # 0x59c05f
callq 0x405f45
movq 0x18(%rsp), %rax
movl 0x8(%rax), %esi
leaq 0x618(%rsp), %rbx
movq %rbx, %rdi
callq 0x406107
leaq 0x358(%rsp), %r14
movq %r14, %rdi
leaq 0x338(%rsp), %rsi
movq %rbx, %rdx
callq 0x405f64
leaq 0x1a0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x197348(%rip), %rdx    # 0x59c3a5
callq 0x405f45
movq %r14, %rbx
leaq 0x168(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
leaq 0x148(%rsp), %rdx
callq 0x405f26
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x197310(%rip), %rdx    # 0x59c3a5
callq 0x405f45
movq 0x120(%rsp), %rdx
addq %r13, %rdx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x405f26
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
leaq 0x1972de(%rip), %rdx    # 0x59c3a5
callq 0x405f45
leaq 0x2b8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x5d8(%rsp), %r14
movq %r14, %rdi
callq 0x486820
leaq 0x5f8(%rsp), %r15
movq %r15, %rdi
leaq 0x2b8(%rsp), %rsi
movq %r14, %rdx
callq 0x405fcb
leaq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
movq %r15, %rdx
callq 0x405f64
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x197267(%rip), %rdx    # 0x59c3a5
callq 0x405f45
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq 0x138(%rsp), %rdx
callq 0x405f26
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
movq %r15, %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
leaq 0x5f8(%rsp), %rdi
callq 0x484210
leaq 0x5d8(%rsp), %rdi
callq 0x484210
leaq 0x2b8(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x168(%rsp), %rdi
callq 0x484210
leaq 0x1a0(%rsp), %rdi
callq 0x484210
movq %rbx, %rdi
callq 0x484210
leaq 0x618(%rsp), %rdi
callq 0x484210
leaq 0x338(%rsp), %rdi
callq 0x484210
leaq 0x678(%rsp), %rdi
callq 0x484210
leaq 0x638(%rsp), %rdi
callq 0x484210
leaq 0x318(%rsp), %rdi
callq 0x484210
leaq 0x658(%rsp), %rdi
callq 0x484210
movq %r12, %rdi
callq 0x484210
leaq 0x2f8(%rsp), %rdi
callq 0x484210
movq %rbp, %rdi
callq 0x484210
leaq 0x2d8(%rsp), %rdi
callq 0x484210
movq 0x80(%rsp), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x405771
leaq 0x298(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
callq 0x486820
leaq 0x5b8(%rsp), %r14
movq %r14, %rdi
leaq 0x196dce(%rip), %rsi    # 0x59c077
leaq 0x1a0(%rsp), %rdx
callq 0x405d40
leaq 0x168(%rsp), %rbx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
leaq 0x298(%rsp), %rsi
movq %r14, %rdx
callq 0x405fcb
leaq 0xc0(%rsp), %r14
leaq 0xa0(%rsp), %r12
leaq 0x278(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x598(%rsp), %r15
movq %r15, %rdi
callq 0x486820
movq %r14, %rdi
leaq 0x278(%rsp), %rsi
movq %r15, %rdx
callq 0x405fcb
movq %r12, %rdi
leaq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0x405f64
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
leaq 0x196d4e(%rip), %rdx    # 0x59c090
callq 0x405f45
leaq 0x258(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x578(%rsp), %r15
movq %r15, %rdi
callq 0x486820
movq %rbx, %rdi
leaq 0x258(%rsp), %rsi
movq %r15, %rdx
callq 0x405fcb
leaq 0xe0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x405f64
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x196ce6(%rip), %rdx    # 0x59c097
callq 0x405f45
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x484260
movq %r15, %rdi
callq 0x484210
movq %rbp, %rdi
callq 0x484210
movq %rbx, %rdi
callq 0x484210
leaq 0x578(%rsp), %rdi
callq 0x484210
leaq 0x258(%rsp), %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
movq %r12, %rdi
callq 0x484210
movq %r14, %rdi
callq 0x484210
leaq 0x598(%rsp), %rdi
callq 0x484210
leaq 0x278(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0x5b8(%rsp), %rdi
callq 0x484210
leaq 0x298(%rsp), %rdi
callq 0x484210
movq 0x80(%rsp), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x405788
leaq 0x238(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x558(%rsp), %rbx
movq %rbx, %rdi
callq 0x486820
leaq 0x60(%rsp), %r14
leaq 0xa0(%rsp), %r15
movq %r14, %rdi
leaq 0x238(%rsp), %rsi
movq %rbx, %rdx
callq 0x405fcb
leaq 0xc0(%rsp), %rbx
movq %r15, %rdi
leaq 0x196bf5(%rip), %rsi    # 0x59c0b6
movq %r14, %rdx
callq 0x406146
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
leaq 0x196be2(%rip), %rdx    # 0x59c0ba
callq 0x405f45
leaq 0x218(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x538(%rsp), %r12
movq %r12, %rdi
callq 0x486820
movq %rbx, %rdi
leaq 0x218(%rsp), %rsi
movq %r12, %rdx
callq 0x405fcb
leaq 0xe0(%rsp), %r12
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0x405f64
leaq 0x100(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x196b82(%rip), %rdx    # 0x59c0c9
callq 0x405f45
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x484260
movq %rbp, %rdi
callq 0x484210
movq %r12, %rdi
callq 0x484210
movq %rbx, %rdi
callq 0x484210
leaq 0x538(%rsp), %rdi
callq 0x484210
leaq 0x218(%rsp), %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
movq %r15, %rdi
callq 0x484210
movq %r14, %rdi
callq 0x484210
leaq 0x558(%rsp), %rdi
callq 0x484210
leaq 0x238(%rsp), %rdi
callq 0x484210
movq 0x80(%rsp), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x405756
leaq 0x1f8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
movq 0x20(%rsp), %rsi
addq %r13, %rsi
leaq 0x518(%rsp), %rbx
movq %rbx, %rdi
callq 0x486820
leaq 0x60(%rsp), %r14
leaq 0xa0(%rsp), %r15
movq %r14, %rdi
leaq 0x1f8(%rsp), %rsi
movq %rbx, %rdx
callq 0x405fcb
leaq 0xc0(%rsp), %rbx
movq %r15, %rdi
leaq 0x196a83(%rip), %rsi    # 0x59c0b6
movq %r14, %rdx
callq 0x406146
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
leaq 0x196aa5(%rip), %rdx    # 0x59c0ef
callq 0x405f45
leaq 0x1d8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
addq 0x20(%rsp), %r13
leaq 0x4f8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x486820
movq %rbx, %rdi
leaq 0x1d8(%rsp), %rsi
movq %r12, %rdx
callq 0x405fcb
leaq 0x40(%rsp), %r12
leaq 0xe0(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x405f64
leaq 0x100(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
leaq 0x196a42(%rip), %rdx    # 0x59c0fe
callq 0x405f45
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x484260
movq %rbp, %rdi
callq 0x484210
movq %r13, %rdi
callq 0x484210
movq %rbx, %rdi
callq 0x484210
leaq 0x4f8(%rsp), %rdi
callq 0x484210
leaq 0x1d8(%rsp), %rdi
callq 0x484210
movq %r12, %rdi
callq 0x484210
movq %r15, %rdi
callq 0x484210
movq %r14, %rdi
callq 0x484210
leaq 0x518(%rsp), %rdi
callq 0x484210
leaq 0x1f8(%rsp), %rdi
callq 0x484210
movq 0x80(%rsp), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x405756
movq 0x140(%rsp), %r13
incl %r13d
jmp 0x404e72
movw $0x4, %bx
leaq 0x196971(%rip), %rsi    # 0x59c0d2
movq 0x38(%rsp), %rdi
callq 0x4851c0
jmp 0x40579d
xorl %ebx, %ebx
jmp 0x40579d
movw $0x2, %bx
leaq 0x1968e8(%rip), %rsi    # 0x59c064
movq 0x38(%rsp), %rdi
callq 0x4851c0
jmp 0x40579d
movw $0x3, %bx
leaq 0x19690a(%rip), %rsi    # 0x59c09d
movq 0x38(%rsp), %rdi
callq 0x4851c0
leaq 0x120(%rsp), %rdi
callq 0x40616a
leaq 0x20(%rsp), %rdi
callq 0x40616a
leaq 0x148(%rsp), %rdi
callq 0x484210
leaq 0x80(%rsp), %rdi
callq 0x484210
leaq 0x3b8(%rsp), %rdi
callq 0x484210
leaq 0x1c0(%rsp), %rdi
callq 0x40616a
leaq 0x188(%rsp), %rdi
callq 0x40616a
movl %ebx, %eax
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x378(%rsp), %rdi
jmp 0x405cd3
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
jmp 0x405cd3
jmp 0x405cdc
movq %rax, %rbx
jmp 0x405d03
movq %rax, %rbx
movl $0x120, %r12d           # imm = 0x120
leaq (%rsp,%r12), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x484210
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0x40583f
movb $0x1, %al
jmp 0x405872
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
jmp 0x40586d
movq %rax, %rbx
xorl %eax, %eax
cmpq %r15, %r14
sete %cl
testb %al, %al
jne 0x405d2a
testb %cl, %cl
jne 0x405d2a
addq $-0x20, %r15
movq %r15, %rdi
callq 0x484210
cmpq %r14, %r15
jne 0x405888
jmp 0x405d2a
movq %rax, %rbx
jmp 0x405d2a
movq %rax, %rbx
movl $0x120, %r12d           # imm = 0x120
leaq (%rsp,%r12), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x484210
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0x4058af
movb $0x1, %al
jmp 0x4058e2
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
jmp 0x4058dd
movq %rax, %rbx
xorl %eax, %eax
cmpq %r15, %r14
sete %cl
testb %al, %al
jne 0x405d37
testb %cl, %cl
jne 0x405d37
addq $-0x20, %r15
movq %r15, %rdi
callq 0x484210
cmpq %r14, %r15
jne 0x4058f8
jmp 0x405d37
movq %rax, %rbx
jmp 0x405d37
jmp 0x405cdc
jmp 0x405cdc
movq %rax, %rbx
jmp 0x4059a0
movq %rax, %rbx
jmp 0x405989
movq %rax, %rbx
jmp 0x405972
movq %rax, %rbx
jmp 0x405958
movq %rax, %rbx
jmp 0x4059ad
movq %rax, %rbx
jmp 0x405996
movq %rax, %rbx
jmp 0x40597f
movq %rax, %rbx
jmp 0x405965
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x4f8(%rsp), %rdi
callq 0x484210
leaq 0x1d8(%rsp), %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0x518(%rsp), %rdi
callq 0x484210
leaq 0x1f8(%rsp), %rdi
jmp 0x405cd3
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x484210
jmp 0x4059e3
movq %rax, %rbx
jmp 0x4059f0
movq %rax, %rbx
jmp 0x405a0f
movq %rax, %rbx
jmp 0x405a26
movq %rax, %rbx
jmp 0x405a3d
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x538(%rsp), %rdi
callq 0x484210
jmp 0x405a02
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0x558(%rsp), %rdi
callq 0x484210
leaq 0x238(%rsp), %rdi
jmp 0x405cd3
movq %rax, %rbx
jmp 0x405a19
movq %rax, %rbx
jmp 0x405a30
jmp 0x405cdc
jmp 0x405cdc
movq %rax, %rbx
jmp 0x405b03
movq %rax, %rbx
jmp 0x405ad2
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x484210
jmp 0x405a8d
movq %rax, %rbx
jmp 0x405b10
movq %rax, %rbx
jmp 0x405adc
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x484210
jmp 0x405aa9
movq %rax, %rbx
jmp 0x405b1a
movq %rax, %rbx
jmp 0x405ae9
movq %rax, %rbx
leaq 0x578(%rsp), %rdi
callq 0x484210
jmp 0x405ac5
movq %rax, %rbx
jmp 0x405b27
movq %rax, %rbx
jmp 0x405af6
movq %rax, %rbx
leaq 0x258(%rsp), %rdi
callq 0x484210
leaq 0x40(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x598(%rsp), %rdi
callq 0x484210
leaq 0x278(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0x5b8(%rsp), %rdi
callq 0x484210
leaq 0x298(%rsp), %rdi
jmp 0x405cd3
movq %rax, %rbx
jmp 0x405ca4
movq %rax, %rbx
jmp 0x405c49
movq %rax, %rbx
jmp 0x405bf1
movq %rax, %rbx
jmp 0x405cb1
movq %rax, %rbx
jmp 0x405c56
movq %rax, %rbx
jmp 0x405bfe
movq %rax, %rbx
jmp 0x405cbe
movq %rax, %rbx
jmp 0x405c63
movq %rax, %rbx
jmp 0x405c0b
movq %rax, %rbx
jmp 0x405ccb
movq %rax, %rbx
jmp 0x405c70
movq %rax, %rbx
jmp 0x405c18
jmp 0x405cdc
movq %rax, %rbx
jmp 0x405c7d
movq %rax, %rbx
jmp 0x405c22
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x484210
jmp 0x405bc8
movq %rax, %rbx
jmp 0x405c8a
movq %rax, %rbx
jmp 0x405c2f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x484210
jmp 0x405be4
movq %rax, %rbx
jmp 0x405c97
movq %rax, %rbx
jmp 0x405c3c
movq %rax, %rbx
leaq 0x5f8(%rsp), %rdi
callq 0x484210
leaq 0x5d8(%rsp), %rdi
callq 0x484210
leaq 0x2b8(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0x60(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x168(%rsp), %rdi
callq 0x484210
leaq 0x1a0(%rsp), %rdi
callq 0x484210
leaq 0x358(%rsp), %rdi
callq 0x484210
leaq 0x618(%rsp), %rdi
callq 0x484210
leaq 0x338(%rsp), %rdi
callq 0x484210
leaq 0x678(%rsp), %rdi
callq 0x484210
leaq 0x638(%rsp), %rdi
callq 0x484210
leaq 0x318(%rsp), %rdi
callq 0x484210
leaq 0x658(%rsp), %rdi
callq 0x484210
leaq 0x698(%rsp), %rdi
callq 0x484210
leaq 0x2f8(%rsp), %rdi
callq 0x484210
leaq 0x6b8(%rsp), %rdi
callq 0x484210
leaq 0x2d8(%rsp), %rdi
callq 0x484210
jmp 0x405cdf
jmp 0x405cdc
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x40616a
leaq 0x20(%rsp), %rdi
callq 0x40616a
leaq 0x148(%rsp), %rdi
callq 0x484210
leaq 0x80(%rsp), %rdi
callq 0x484210
leaq 0x3b8(%rsp), %rdi
callq 0x484210
leaq 0x1c0(%rsp), %rdi
callq 0x40616a
leaq 0x188(%rsp), %rdi
callq 0x40616a
movq %rbx, %rdi
callq 0x4b8e10
nop