// File: /workspace/github_cpp_makefile_star2_O2/ChnMasterOG[P]KmerGO2/kmergo/kmer_assembly.cpp
// Function: kmer_assembly(KmerGO_parameters&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
short kmer_assembly(KmerGO_parameters& p, std::string& loginfo)
{
	std::string onput_file_name_A = joinPath(p.results_path, "Afeatures.fa");
	std::string onput_file_name_B = joinPath(p.results_path, "Bfeatures.fa");
	std::ofstream output_file_A(onput_file_name_A);
	std::ofstream output_file_B(onput_file_name_B);
	std::vector<std::string> files_vec;
	std::string line;
	std::string NameA, NameB;
	uint64 countA = 0, countB = 0;

	getFiles(p.features_path, files_vec, false);

	for (auto f : files_vec)
	{
		if (f.compare(0, 11, "categorical") == 0)
		{
			if (p.mode != 0)
			{
				loginfo = "Mode Error!";
				return 1;
			}
		}
		else if (f.compare(0, 10, "continuous") == 0)
		{
			if (p.mode != 1)
			{
				loginfo = "Mode Error!";
				return 1;
			}
		}
		else
		{
			loginfo = "Unrecognized Files!";
			return 1;
		}
		std::ifstream input_file(joinPath(p.features_path, f));
		std::getline(input_file, line);	// skip headtext
		while (std::getline(input_file, line))
		{
			if (line[line.size() - 1] == '\r')
			{
				line = line.substr(0, line.size() - 1);
			}
			std::string label;
			if (p.mode == 0)
			{
				label = line.substr(line.rfind('\t') + 1);
			}
			else
			{
				label = "Result";
			}
			if (NameA.empty())
			{
				NameA = label;
			}
			else if (NameB.empty() && NameA.compare(label) != 0)
			{
				NameB = label;
			}
			if (NameA.compare(label) == 0)
			{
				countA++;
				output_file_A << '>' << std::to_string(countA) << '\n' << line.substr(0, line.find('\t')) << '\n';
			}
			else if (NameB.compare(label) == 0)
			{
				countB++;
				output_file_B << '>' << std::to_string(countB) << '\n' << line.substr(0, line.find('\t')) << '\n';
			}
		}
	}

	uint32 r, r1 = 0, r2 = 0;
	std::string cmd, current_path;
	current_path = getCWD();

	if (!NameA.empty())
	{
		cmd = "mv " + onput_file_name_A + " " + joinPath(p.results_path, NameA + "_specific.fa");
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "mv Command Error!";
			return 3;
		}
	}
	else
	{
		cmd = "rm " + joinPath(p.results_path, "Afeatures.fa");
		r = system(cmd.c_str());
	}
	if (!NameB.empty())
	{
		cmd = "mv " + onput_file_name_B + " " + joinPath(p.results_path, NameB + "_specific.fa");
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "mv Command Error!";
			return 3;
		}
	}
	else
	{
		cmd = "rm " + joinPath(p.results_path, "Bfeatures.fa");
		r = system(cmd.c_str());
	}

	if (!NameA.empty())
	{
		cmd = joinPath(current_path, "bin/cap3 ") + joinPath(p.results_path, NameA + "_specific.fa") + " -i 30  -j 31  -o 18  -s 300";
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "CAP3 Software Error!";
			return 2;
		}
		cmd = "mv " + joinPath(p.results_path, NameA + "_specific.fa") + " " + joinPath(p.results_path, NameA + "_specific_kmer.fa");
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "mv Command Error!";
			return 3;
		}
	}
	else
	{
		r1 = 1;
	}
	
	if (!NameB.empty())
	{
		cmd = joinPath(current_path, "bin/cap3 ") + joinPath(p.results_path, NameB + "_specific.fa") + " -i 30  -j 31  -o 18  -s 300";
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "CAP3 Software Error!";
			return 2;
		}
		cmd = "mv " + joinPath(p.results_path, NameB + "_specific.fa") + " " + joinPath(p.results_path, NameB + "_specific_kmer.fa");
		r = system(cmd.c_str());
		if (r)
		{
			loginfo = "mv Command Error!";
			return 3;
		}
	}
	else
	{
		r2 = 1;
	}
	
	if (r1 && r2)
	{
		loginfo = "No specific k-mer!";
		return 5;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb98, %rsp            # imm = 0xB98
movq %rsi, 0x90(%rsp)
movq %rdi, 0x98(%rsp)
leaq 0xa0(%rdi), %rsi
leaq 0x570(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0x486820
leaq 0x18fa43(%rip), %rsi    # 0x59c63b
leaq 0x530(%rsp), %rdi
leaq 0x590(%rsp), %rdx
callq 0x405d40
leaq 0x190(%rsp), %rdi
leaq 0x570(%rsp), %rsi
leaq 0x530(%rsp), %rdx
callq 0x405fcb
leaq 0x530(%rsp), %rdi
callq 0x484210
leaq 0x570(%rsp), %rdi
callq 0x484210
leaq 0x510(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f9eb(%rip), %rsi    # 0x59c648
leaq 0x4f0(%rsp), %rdi
leaq 0x590(%rsp), %rdx
callq 0x405d40
leaq 0x170(%rsp), %rdi
leaq 0x510(%rsp), %rsi
leaq 0x4f0(%rsp), %rdx
callq 0x405fcb
leaq 0x4f0(%rsp), %rdi
callq 0x484210
leaq 0x510(%rsp), %rdi
callq 0x484210
leaq 0x998(%rsp), %rdi
leaq 0x190(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x45a470
leaq 0x798(%rsp), %rdi
leaq 0x170(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x45a470
andq $0x0, 0x130(%rsp)
leaq 0x160(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0xd0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x120(%rsp)
movb %dl, (%rax)
movq 0x98(%rsp), %rax
leaq 0x80(%rax), %rsi
leaq 0x4d0(%rsp), %rdi
movq %rsi, 0x138(%rsp)
callq 0x486820
leaq 0x4d0(%rsp), %rdi
leaq 0x120(%rsp), %rsi
xorl %edx, %edx
callq 0x405ddf
leaq 0x4d0(%rsp), %rdi
callq 0x484210
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rax
movq %rax, 0x140(%rsp)
xorl %ebx, %ebx
leaq 0x50(%rsp), %r14
leaq 0x150(%rsp), %r15
xorl %ebp, %ebp
cmpq 0x140(%rsp), %rsi
je 0x40d138
leaq 0xe0(%rsp), %r12
movq %r12, %rdi
movq %rsi, 0x148(%rsp)
callq 0x486820
movq %r12, %rdi
xorl %esi, %esi
pushq $0xb
popq %rdx
leaq 0x18f887(%rip), %rcx    # 0x59c655
callq 0x486490
testl %eax, %eax
je 0x40ce09
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
leaq 0x18f882(%rip), %rcx    # 0x59c66d
callq 0x486490
leaq 0x18f881(%rip), %rsi    # 0x59c678
testl %eax, %eax
jne 0x40ce1e
movq 0x98(%rsp), %rax
cmpb $0x1, 0xe(%rax)
jmp 0x40ce15
movq 0x98(%rsp), %rax
cmpb $0x0, 0xe(%rax)
leaq 0x18f845(%rip), %rsi    # 0x59c661
je 0x40ce33
movq 0x90(%rsp), %rdi
callq 0x4851c0
xorl %r12d, %r12d
jmp 0x40d10d
leaq 0x4b0(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x486820
leaq 0x550(%rsp), %r12
movq %r12, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x486820
movq %r14, %rdi
leaq 0x4b0(%rsp), %rsi
movq %r12, %rdx
callq 0x405fcb
leaq 0x590(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
pushq $0x8
popq %rdx
callq 0x45a300
movq %r14, %rdi
callq 0x484210
leaq 0x550(%rsp), %rdi
callq 0x484210
leaq 0x4b0(%rsp), %rdi
callq 0x484210
movq %r12, %rdi
movq %r15, %rsi
callq 0x486ad0
leaq 0x590(%rsp), %rdi
movq %r15, %rsi
callq 0x486ad0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x40d0fd
movq 0x150(%rsp), %rax
movq 0x158(%rsp), %rcx
cmpb $0xd, -0x1(%rax,%rcx)
jne 0x40cf12
decq %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x486a40
movq %r15, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
andq $0x0, 0x58(%rsp)
movb $0x0, 0x60(%rsp)
movq 0x98(%rsp), %rax
cmpb $0x0, 0xe(%rax)
je 0x40cf46
movq %r14, %rdi
leaq 0x18f74d(%rip), %rsi    # 0x59c68c
callq 0x4851c0
jmp 0x40cf82
movq %r15, %rdi
pushq $0x9
popq %rsi
pushq $-0x1
popq %r12
movq %r12, %rdx
callq 0x485eb0
leaq 0x1(%rax), %rdx
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x486a40
movq %r14, %rdi
movq %r13, %rsi
callq 0x484260
movq %r13, %rdi
callq 0x484210
cmpq $0x0, 0xc8(%rsp)
leaq 0xc0(%rsp), %rdi
je 0x40cfb4
cmpq $0x0, 0xa8(%rsp)
jne 0x40cfbc
movq %r14, %rsi
callq 0x486270
leaq 0xa0(%rsp), %rdi
testl %eax, %eax
je 0x40cfbc
movq %r14, %rsi
callq 0x483e40
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x486270
testl %eax, %eax
je 0x40d065
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x486270
testl %eax, %eax
jne 0x40d0f0
leaq 0x798(%rsp), %rdi
pushq $0x3e
popq %rsi
callq 0x47dd70
movq %rax, %r12
incq %rbp
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x40dfd3
movq %r12, %rdi
movq %r13, %rsi
callq 0x486ac0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x47dd70
movq %rax, %r12
movq %r15, %rdi
pushq $0x9
popq %rsi
xorl %edx, %edx
callq 0x485da0
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x486a40
movq %r12, %rdi
movq %r13, %rsi
callq 0x486ac0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x47dd70
jmp 0x40d0dc
leaq 0x998(%rsp), %rdi
pushq $0x3e
popq %rsi
callq 0x47dd70
movq %rax, %r12
incq %rbx
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x40dfd3
movq %r12, %rdi
movq %r13, %rsi
callq 0x486ac0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x47dd70
movq %rax, %r12
movq %r15, %rdi
pushq $0x9
popq %rsi
xorl %edx, %edx
callq 0x485da0
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x486a40
movq %r12, %rdi
movq %r13, %rsi
callq 0x486ac0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x47dd70
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
movq %r14, %rdi
callq 0x484210
jmp 0x40ceb6
leaq 0x590(%rsp), %rdi
callq 0x45b030
movb $0x1, %r12b
leaq 0xe0(%rsp), %rdi
callq 0x484210
movq 0x148(%rsp), %rsi
addq $0x20, %rsi
testb %r12b, %r12b
jne 0x40cd99
movw $0x1, %bx
jmp 0x40d93e
leaq 0x5a0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x50(%rsp), %rdi
callq 0x405db5
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x484260
movq %rbx, %rdi
callq 0x484210
cmpq $0x0, 0xc8(%rsp)
je 0x40d28e
leaq 0x18ef19(%rip), %rsi    # 0x59c0b6
leaq 0x30(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x408269
leaq 0x18f1ef(%rip), %rdx    # 0x59c3a5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x405f45
leaq 0x490(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f4b5(%rip), %rdx    # 0x59c693
leaq 0x470(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x490(%rsp), %rsi
leaq 0x470(%rsp), %rdx
callq 0x405fcb
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x405f64
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x470(%rsp), %rdi
callq 0x484210
leaq 0x490(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x40d437
jmp 0x40d335
leaq 0x450(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f394(%rip), %rsi    # 0x59c63b
leaq 0x430(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x405d40
leaq 0x10(%rsp), %rdi
leaq 0x450(%rsp), %rsi
leaq 0x430(%rsp), %rdx
callq 0x405fcb
leaq 0x18edb2(%rip), %rsi    # 0x59c08c
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x406146
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x430(%rsp), %rdi
callq 0x484210
leaq 0x450(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
cmpq $0x0, 0xa8(%rsp)
je 0x40d454
leaq 0x18ed6b(%rip), %rsi    # 0x59c0b6
leaq 0x30(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x408269
leaq 0x18f041(%rip), %rdx    # 0x59c3a5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x405f45
leaq 0x410(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f307(%rip), %rdx    # 0x59c693
leaq 0x3f0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x410(%rsp), %rsi
leaq 0x3f0(%rsp), %rdx
callq 0x405fcb
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x405f64
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x3f0(%rsp), %rdi
callq 0x484210
leaq 0x410(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
je 0x40d4fb
movw $0x3, %bx
leaq 0x18f25e(%rip), %rsi    # 0x59c6a0
movq 0x90(%rsp), %rdi
callq 0x4851c0
jmp 0x40d924
leaq 0x3d0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f1db(%rip), %rsi    # 0x59c648
leaq 0x3b0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x405d40
leaq 0x10(%rsp), %rdi
leaq 0x3d0(%rsp), %rsi
leaq 0x3b0(%rsp), %rdx
callq 0x405fcb
leaq 0x18ebec(%rip), %rsi    # 0x59c08c
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x406146
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x3b0(%rsp), %rdi
callq 0x484210
leaq 0x3d0(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
cmpq $0x0, 0xc8(%rsp)
je 0x40d7be
leaq 0x390(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x486820
leaq 0x18f18c(%rip), %rsi    # 0x59c6b2
leaq 0x370(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x405d40
leaq 0x30(%rsp), %rdi
leaq 0x390(%rsp), %rsi
leaq 0x370(%rsp), %rdx
callq 0x405fcb
leaq 0x350(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f125(%rip), %rdx    # 0x59c693
leaq 0x330(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x350(%rsp), %rsi
leaq 0x330(%rsp), %rdx
callq 0x405fcb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x405f64
leaq 0x18f104(%rip), %rdx    # 0x59c6bc
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x405f45
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x330(%rsp), %rdi
callq 0x484210
leaq 0x350(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x370(%rsp), %rdi
callq 0x484210
leaq 0x390(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x40d90c
leaq 0x310(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f031(%rip), %rdx    # 0x59c693
leaq 0x2f0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x310(%rsp), %rsi
leaq 0x2f0(%rsp), %rdx
callq 0x405fcb
leaq 0x18ea1e(%rip), %rsi    # 0x59c0b6
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x406146
leaq 0x18ecf7(%rip), %rdx    # 0x59c3a5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x405f45
leaq 0x2d0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18f018(%rip), %rdx    # 0x59c6ee
leaq 0x2b0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x40e015
leaq 0x100(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
leaq 0x2b0(%rsp), %rdx
callq 0x405fcb
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0x405f64
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x100(%rsp), %rdi
callq 0x484210
leaq 0x2b0(%rsp), %rdi
callq 0x484210
leaq 0x2d0(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x2f0(%rsp), %rdi
callq 0x484210
leaq 0x310(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x40d437
cmpq $0x0, 0xa8(%rsp)
jne 0x40d7cd
jmp 0x40db3c
cmpq $0x0, 0xa8(%rsp)
je 0x40d9ba
leaq 0x290(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x486820
leaq 0x18eec9(%rip), %rsi    # 0x59c6b2
leaq 0x270(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x405d40
leaq 0x30(%rsp), %rdi
leaq 0x290(%rsp), %rsi
leaq 0x270(%rsp), %rdx
callq 0x405fcb
leaq 0x250(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18ee62(%rip), %rdx    # 0x59c693
leaq 0x230(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x250(%rsp), %rsi
leaq 0x230(%rsp), %rdx
callq 0x405fcb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x405f64
leaq 0x18ee41(%rip), %rdx    # 0x59c6bc
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x405f45
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x230(%rsp), %rdi
callq 0x484210
leaq 0x250(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x270(%rsp), %rdi
callq 0x484210
leaq 0x290(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
je 0x40d9d7
movw $0x2, %bx
leaq 0x18edc2(%rip), %rsi    # 0x59c6d9
movq 0x90(%rsp), %rdi
callq 0x4851c0
leaq 0xe0(%rsp), %rdi
callq 0x484210
leaq 0x590(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x150(%rsp), %rdi
callq 0x484210
leaq 0x120(%rsp), %rdi
callq 0x40616a
leaq 0x798(%rsp), %rdi
callq 0x45aef0
leaq 0x998(%rsp), %rdi
callq 0x45aef0
leaq 0x170(%rsp), %rdi
callq 0x484210
leaq 0x190(%rsp), %rdi
callq 0x484210
movl %ebx, %eax
addq $0xb98, %rsp            # imm = 0xB98
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x5, %bx
leaq 0x18ed3b(%rip), %rsi    # 0x59c700
movq 0x90(%rsp), %rdi
callq 0x4851c0
jmp 0x40d924
leaq 0x210(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18eca3(%rip), %rdx    # 0x59c693
leaq 0x1f0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x40e015
leaq 0x70(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x1f0(%rsp), %rdx
callq 0x405fcb
leaq 0x18e690(%rip), %rsi    # 0x59c0b6
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x406146
leaq 0x18e969(%rip), %rdx    # 0x59c3a5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x405f45
leaq 0x1d0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x486820
leaq 0x18ec8a(%rip), %rdx    # 0x59c6ee
leaq 0x1b0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x40e015
leaq 0x100(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0x405fcb
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0x405f64
leaq 0x590(%rsp), %rbx
leaq 0x50(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484260
movq %r14, %rdi
callq 0x484210
leaq 0x100(%rsp), %rdi
callq 0x484210
leaq 0x1b0(%rsp), %rdi
callq 0x484210
leaq 0x1d0(%rsp), %rdi
callq 0x484210
leaq 0x10(%rsp), %rdi
callq 0x484210
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x1f0(%rsp), %rdi
callq 0x484210
leaq 0x210(%rsp), %rdi
callq 0x484210
movq (%rbx), %rdi
callq 0x4de250
testl %eax, %eax
jne 0x40d437
xorl %ebx, %ebx
jmp 0x40d924
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0x484210
jmp 0x40db58
movq %rax, %r14
leaq 0x1b0(%rsp), %rdi
callq 0x484210
jmp 0x40db6a
movq %rax, %r14
leaq 0x1d0(%rsp), %rdi
callq 0x484210
jmp 0x40db7c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40db8b
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x1f0(%rsp), %rdi
callq 0x484210
leaq 0x210(%rsp), %rdi
jmp 0x40de34
movq %rax, %r14
jmp 0x40db95
movq %rax, %r14
jmp 0x40db9f
movq %rax, %r14
jmp 0x40dbac
jmp 0x40deab
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0x484210
jmp 0x40dbe2
movq %rax, %r14
leaq 0x2b0(%rsp), %rdi
callq 0x484210
jmp 0x40dbf4
movq %rax, %r14
leaq 0x2d0(%rsp), %rdi
callq 0x484210
jmp 0x40dc06
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40dc15
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x70(%rsp), %rdi
callq 0x484210
leaq 0x2f0(%rsp), %rdi
callq 0x484210
leaq 0x310(%rsp), %rdi
jmp 0x40de34
movq %rax, %r14
jmp 0x40dc1f
movq %rax, %r14
jmp 0x40dc29
movq %rax, %r14
jmp 0x40dc36
jmp 0x40deab
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40dc69
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x484210
jmp 0x40dc78
movq %rax, %r14
leaq 0x230(%rsp), %rdi
callq 0x484210
jmp 0x40dc8a
movq %rax, %r14
leaq 0x250(%rsp), %rdi
callq 0x484210
jmp 0x40dc9c
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x270(%rsp), %rdi
callq 0x484210
leaq 0x290(%rsp), %rdi
jmp 0x40de34
movq %rax, %r14
jmp 0x40dca6
movq %rax, %r14
jmp 0x40dcb3
jmp 0x40deab
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40dce1
movq %rax, %r14
leaq 0x3b0(%rsp), %rdi
callq 0x484210
jmp 0x40dcf3
movq %rax, %r14
leaq 0x3d0(%rsp), %rdi
jmp 0x40de34
jmp 0x40deab
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40dd17
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x484210
jmp 0x40dd26
movq %rax, %r14
leaq 0x330(%rsp), %rdi
callq 0x484210
jmp 0x40dd38
movq %rax, %r14
leaq 0x350(%rsp), %rdi
callq 0x484210
jmp 0x40dd4a
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
leaq 0x370(%rsp), %rdi
callq 0x484210
leaq 0x390(%rsp), %rdi
jmp 0x40de34
movq %rax, %r14
jmp 0x40dd54
movq %rax, %r14
jmp 0x40dd61
jmp 0x40deab
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40dd8f
movq %rax, %r14
leaq 0x430(%rsp), %rdi
callq 0x484210
jmp 0x40dda1
movq %rax, %r14
leaq 0x450(%rsp), %rdi
jmp 0x40de34
jmp 0x40deab
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x484210
jmp 0x40ddc5
movq %rax, %r14
leaq 0x3f0(%rsp), %rdi
callq 0x484210
jmp 0x40ddd7
movq %rax, %r14
leaq 0x410(%rsp), %rdi
jmp 0x40de16
jmp 0x40de1d
jmp 0x40de2c
jmp 0x40deab
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x484210
jmp 0x40ddfc
movq %rax, %r14
leaq 0x470(%rsp), %rdi
callq 0x484210
jmp 0x40de0e
movq %rax, %r14
leaq 0x490(%rsp), %rdi
callq 0x484210
jmp 0x40de20
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40de2f
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
jmp 0x40deae
jmp 0x40deab
jmp 0x40deab
movq %rax, %r14
leaq 0x4d0(%rsp), %rdi
jmp 0x40df5e
jmp 0x40deff
movq %rax, %r14
jmp 0x40dfa4
movq %rax, %r14
jmp 0x40dfb1
movq %rax, %r14
leaq 0x4f0(%rsp), %rdi
callq 0x484210
jmp 0x40de79
movq %rax, %r14
leaq 0x510(%rsp), %rdi
jmp 0x40dfb9
movq %rax, %r14
jmp 0x40dfbe
movq %rax, %r14
leaq 0x530(%rsp), %rdi
callq 0x484210
jmp 0x40dea3
movq %rax, %r14
movq %rbx, %rdi
jmp 0x40dfc6
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0x484210
leaq 0x590(%rsp), %rdi
jmp 0x40df5e
jmp 0x40df37
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x484210
jmp 0x40dedc
movq %rax, %r14
leaq 0x550(%rsp), %rdi
callq 0x484210
jmp 0x40deee
movq %rax, %r14
leaq 0x4b0(%rsp), %rdi
callq 0x484210
jmp 0x40df56
jmp 0x40df08
movq %rax, %r14
jmp 0x40df63
jmp 0x40df3c
jmp 0x40df28
movq %rax, %r14
jmp 0x40df56
jmp 0x40df28
jmp 0x40df3c
jmp 0x40df3c
jmp 0x40df28
jmp 0x40df19
jmp 0x40df37
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x484210
jmp 0x40df2b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x484210
jmp 0x40df3f
movq %rax, %r14
jmp 0x40df49
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x484210
leaq 0x590(%rsp), %rdi
callq 0x45b030
leaq 0xe0(%rsp), %rdi
callq 0x484210
leaq 0xa0(%rsp), %rdi
callq 0x484210
leaq 0xc0(%rsp), %rdi
callq 0x484210
leaq 0x150(%rsp), %rdi
callq 0x484210
leaq 0x120(%rsp), %rdi
callq 0x40616a
leaq 0x798(%rsp), %rdi
callq 0x45aef0
leaq 0x998(%rsp), %rdi
callq 0x45aef0
leaq 0x170(%rsp), %rdi
callq 0x484210
leaq 0x190(%rsp), %rdi
callq 0x484210
movq %r14, %rdi
callq 0x4b8e10