// File: /workspace/github_cpp_makefile_star2_O3/ChnMasterOG[P]KmerGO2/kmergo/kmer_union.cpp
// Function: get_Son_Matrix(unsigned short, KmerGO_parameters, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::vector<float, std::allocator<float>>)
void get_Son_Matrix(uint16_t Nprocess, KmerGO_parameters p, std::vector<std::string> kmerdb_list, 
	std::vector<std::string> beacon_kmer, std::vector<float> ALLfcounter)
{
	uint32 i;
	uint32 files_number = kmerdb_list.size();
	uint32 _kmer_length;

	CKMCFile* kmer_data_base = new CKMCFile[files_number];
	FILE* out_file;
	std::string out_file_name = joinPath(p.matrixes_path, "son_matrix_" + std::to_string(Nprocess) + ".txt");

	/* open k-mer data base */
	for (i = 0; i < files_number; i++)
	{
		if (!kmer_data_base[i].OpenForListing(joinPath(p.kmercountings_path, kmerdb_list[i])))
		{
			mtx.lock();
			union_err_number = -11;
			mtx.unlock();
			std::cout << "Thread-" << std::to_string(Nprocess) << "[Error]: Can not open some k-mer database in at least one thread." << std::endl;
			return;
		}
	}

	/* open the output file */
	if ((out_file = fopen(out_file_name.c_str(), "wb")) == NULL)
	{
		mtx.lock();
		union_err_number = -12;
		mtx.unlock();
		std::cout << "Thread-" << std::to_string(Nprocess) << "[Error]: Can not open output files in at least one thread." << std::endl;
		return;
	}
	setvbuf(out_file, NULL, _IOFBF, 1 << 24);

	/* get information from the k-mer database */
	_kmer_length = kmer_data_base[0].KmerLength();
	CKmerAPI kmer_object(_kmer_length);
	CKmerAPI beacon_start_kmer_object(_kmer_length);
	CKmerAPI beacon_end_kmer_object(_kmer_length);
	CKmerAPI minimum_kmer_object(_kmer_length);
	CKmerAPI maximum_kmer_object(_kmer_length);
	uint64 counter;

	/* create beacon k-mer object: start-kmer index is 0; end-kmer index is 1 */
	beacon_start_kmer_object.from_string(beacon_kmer[0]);
	beacon_end_kmer_object.from_string(beacon_kmer[1]);

	/* create minimum/maximum k-mer object */
	std::string temp_str = "";
	for (i = 0; i < _kmer_length - 1; i++) temp_str += "A";
	minimum_kmer_object.from_string(temp_str);	// is less than "A"*_kmer_length (modified kmer_api "operator<" function)
	temp_str = "";
	for (i = 0; i < _kmer_length; i++) temp_str += "T";
	maximum_kmer_object.from_string(temp_str);

	/* write head text */
	fwrite("k-mer", 1, 5, out_file);
	for (i = 0; i < files_number; i++)
	{
		fwrite("\t", 1, 1, out_file);
		fwrite(kmerdb_list[i].c_str(), 1, kmerdb_list[i].length(), out_file);
	}
	fwrite("\n", 1, 1, out_file);
	
	/* jump to corresponding k-mer and build k-mer loser tree */
	KmerLoserTree kmer_losertree(files_number, _kmer_length);
	uint32 end_number = 0;
	bool start_flag;
	for (i = 0; i < files_number; i++)
	{
		start_flag = false;
		while (kmer_data_base[i].ReadNextKmer(kmer_object, counter))
		{
			if (!kmer_object.operator<(beacon_start_kmer_object))
			{
				kmer_losertree.kmer_list[i].operator=(kmer_object);
				kmer_losertree.counter_list[i] = counter;
				start_flag = true;
				break;
			}
		}
		if (!start_flag || !kmer_object.operator<(beacon_end_kmer_object))	// no next k-mer
		{
			end_number++;
			kmer_losertree.kmer_list[i].operator=(maximum_kmer_object);
			kmer_losertree.counter_list[i] = 0;
		}
		else
		{
			mtx.lock();
			progress++;
			mtx.unlock();
		}
	}
	if (end_number == files_number)	// end of running
	{
		for (i = 0; i < files_number; i++) kmer_data_base[i].Close();
		fclose(out_file);
		delete[] kmer_data_base;
		return;
	}
	kmer_losertree.kmer_list[files_number].operator=(minimum_kmer_object);
	kmer_losertree.build();

	/* prepare variables for main loop */
	uint32 min_index;
	uint32 no_zero_counter[2] = { 0, 0 };
	uint32 no_zero_counter_thr[2] = { 1, 1 };
	std::vector<std::string> zero_matrix;
	std::vector<std::string> write_matrix;
	CKmerAPI min_kmer(_kmer_length);
	char temp_cstr[1024];

	if (p.single_step == false)
	{
		no_zero_counter_thr[0] = p.groupA_number * 0.2;
		if (!p.groupA_name.compare("")) no_zero_counter_thr[1] = 1;
		else no_zero_counter_thr[1] = (files_number - p.groupA_number) * 0.2;
	}

	for (i = 0; i < files_number; i++)
	{
		zero_matrix.push_back("\t0");
		write_matrix.push_back("\t0");
	}

	/* main loop */
	while (true)
	{
		min_index = kmer_losertree.getMIN();
		sprintf(temp_cstr, "\t%.4f", (double)kmer_losertree.counter_list[min_index] / ALLfcounter[min_index]);	// normalization
		if (min_kmer.operator==(kmer_losertree.kmer_list[min_index]))	// new k-mer is equal to last k-mer
		{
			write_matrix[min_index] = temp_cstr;
		}
		else
		{
			if (no_zero_counter[0] >= no_zero_counter_thr[0] || no_zero_counter[1] >= no_zero_counter_thr[1])	// write last line
			{
				min_kmer.to_string(temp_str);
				fwrite(temp_str.c_str(), 1, _kmer_length, out_file);
				for (i = 0; i < files_number; i++) fwrite(write_matrix[i].c_str(), 1, write_matrix[i].length(), out_file);
				fwrite("\n", 1, 1, out_file);
			}
			no_zero_counter[0] = no_zero_counter[1] = 0;
			write_matrix = zero_matrix;
			write_matrix[min_index] = temp_cstr;
		}
		if (p.single_step == false)	// count no zero numbers
		{
			if (!p.groupA_name.compare("")) no_zero_counter[0]++;
			else if(!p.trait_information_map[kmerdb_list[min_index]].compare(p.groupA_name)) no_zero_counter[0]++;
			else no_zero_counter[1]++;
		}
		else no_zero_counter[0]++;
		min_kmer.operator=(kmer_losertree.kmer_list[min_index]);
		if (!kmer_data_base[min_index].ReadNextKmer(kmer_object, counter) || !kmer_object.operator<(beacon_end_kmer_object))	// no next k-mer
		{
			end_number++;
			kmer_object = maximum_kmer_object;
			counter = 0;
		}
		else
		{
			mtx.lock();
			progress++;	// update progress
			mtx.unlock();
		}
		if (end_number == files_number)	// end of running
		{
			if (no_zero_counter[0] >= no_zero_counter_thr[0] || no_zero_counter[1] >= no_zero_counter_thr[1])	// write last line
			{
				min_kmer.to_string(temp_str);
				fwrite(temp_str.c_str(), 1, _kmer_length, out_file);
				for (i = 0; i < files_number; i++) fwrite(write_matrix[i].c_str(), 1, write_matrix[i].length(), out_file);
				fwrite("\n", 1, 1, out_file);
			}
			break;
		}
		kmer_losertree.kmer_list[min_index].operator=(kmer_object);
		kmer_losertree.counter_list[min_index] = counter;
		kmer_losertree.adjust(min_index);
	}

	/* close files */
	for (i = 0; i < files_number; i++) kmer_data_base[i].Close();
	fclose(out_file);

	delete[] kmer_data_base;

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x698, %rsp            # imm = 0x698
movq %r8, 0x228(%rsp)
movq %rcx, 0x88(%rsp)
movq %rsi, 0x90(%rsp)
movl %edi, %ebp
movq 0x8(%rdx), %rax
movq %rdx, 0x118(%rsp)
subq (%rdx), %rax
sarq $0x5, %rax
movq %rax, 0x30(%rsp)
movl %eax, %r15d
movq %r15, %rbx
shlq $0x6, %rbx
leaq (%rbx,%rbx,2), %r14
addq $0x8, %r14
movq %r14, %rdi
callq 0x41bd90
movq %r15, (%rax)
movq %rax, 0x40(%rsp)
leaq 0x8(%rax), %r13
movq %r15, 0x60(%rsp)
testq %r15, %r15
je 0x4082bf
leaq (%rbx,%rbx,2), %r12
negq %r12
xorl %r15d, %r15d
movq %r13, %rbx
movq %rbx, %rdi
callq 0x4167d6
addq $-0xc0, %r15
addq $0xc0, %rbx
cmpq %r15, %r12
jne 0x4082a4
leaq 0x260(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x90(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq 0x250(%rsp), %rdi
callq 0x408000
movl %ebp, 0x28(%rsp)
movzwl %bp, %ebp
movl $0x1, %ebx
cmpw $0xa, %bp
jb 0x408325
movl $0x2, %ebx
cmpw $0x64, 0x28(%rsp)
jb 0x408325
movl $0x3, %ebx
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x408325
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %ebx
sbbl $0x0, %ebx
movl %ebx, %esi
leaq 0x1a0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x190(%rsp), %rdi
movl $0x2d, %edx
callq 0x48b4d0
leaq 0x190(%rsp), %r14
movq (%r14), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x407f93
leaq 0x199f4f(%rip), %rcx    # 0x5a22b0
movl $0xb, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x48cb60
leaq 0x2a0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4083a3
movq %rdx, 0x290(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2a0(%rsp)
jmp 0x4083ab
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x290(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x199eeb(%rip), %rsi    # 0x5a22bc
callq 0x48d320
leaq 0x240(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x408406
movq %rdx, 0x230(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x240(%rsp)
jmp 0x40840f
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x230(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x270(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x407aca
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x408460
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x408485
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x190(%rsp), %rdi
cmpq %r12, %rdi
je 0x4084a2
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movl %ebp, 0xc(%rsp)
movq %r13, 0x68(%rsp)
movq 0x250(%rsp), %rdi
cmpq %r15, %rdi
je 0x4084c8
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x41ae90
cmpl $0x0, 0x30(%rsp)
je 0x4085fe
movq 0x60(%rsp), %r13
shlq $0x5, %r13
xorl %ebx, %ebx
leaq 0x1e0(%rsp), %r12
leaq 0x290(%rsp), %r15
movq 0x68(%rsp), %r14
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x170(%rsp), %rdi
callq 0x408000
movq 0x118(%rsp), %rax
movq (%rax), %rax
leaq 0x1f0(%rsp), %rcx
movq %rcx, 0x1e0(%rsp)
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x408000
movq %r15, %rdi
leaq 0x170(%rsp), %rsi
movq %r12, %rdx
callq 0x407aca
movq %r14, %rdi
movq %r15, %rsi
callq 0x4165fe
movl %eax, %ebp
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x408597
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x4085bc
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x4085e1
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x41ae90
testb %bpl, %bpl
je 0x408774
addq $0xc0, %r14
addq $0x20, %rbx
cmpq %rbx, %r13
jne 0x4084f3
movq 0x270(%rsp), %rdi
leaq 0x199cfe(%rip), %rsi    # 0x5a230b
callq 0x4edac0
testq %rax, %rax
je 0x40887d
movq %rax, %rbp
movl $0x1000000, %ecx        # imm = 0x1000000
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4ee990
movq 0x68(%rsp), %rdi
callq 0x4172d8
movl %eax, %ebx
testl %eax, %eax
movq 0x118(%rsp), %r13
movl %eax, (%rsp)
je 0x4089a7
movl %ebx, %eax
andl $0x3, %eax
movb $0x4, %cl
subb %al, %cl
testl %eax, %eax
movl %ebx, %r12d
movzbl %cl, %ebx
cmovel %eax, %ebx
movb %bl, 0x1c(%rsp)
movzbl %bl, %r15d
addl %r12d, %r15d
movl %r15d, %eax
andl $0x1f, %eax
shrl $0x5, %r15d
cmpl $0x1, %eax
sbbl $-0x1, %r15d
movl %r15d, 0x20(%rsp)
leal (,%r15,8), %r14d
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0x10(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
movl %r12d, 0x18(%rsp)
movb %bl, 0xfc(%rsp)
movl %r15d, 0x100(%rsp)
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0xf0(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
movl %r12d, 0xf8(%rsp)
movb %bl, 0xe4(%rsp)
movl %r15d, 0xe8(%rsp)
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0xd8(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
movl %r12d, 0xe0(%rsp)
movb %bl, 0xa4(%rsp)
movl %r15d, 0xa8(%rsp)
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0x98(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
movl %r12d, 0xa0(%rsp)
movb %bl, 0x7c(%rsp)
movl %r15d, 0x80(%rsp)
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0x70(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
movl (%rsp), %ebx
jmp 0x408a21
leaq 0x212f6d(%rip), %rdi    # 0x61b6e8
callq 0x4fb7a0
testl %eax, %eax
jne 0x4098a7
movw $0xfff5, 0x212f49(%rip) # imm = 0xFFF5
leaq 0x212f50(%rip), %rdi    # 0x61b6e8
callq 0x4fc680
movq $0x1b71960, %rdi        # imm = 0x1B71960
leaq 0x199b16(%rip), %rsi    # 0x5a22c1
movl $0x7, %edx
callq 0x485270
leaq 0x2a0(%rsp), %r14
movl 0xc(%rsp), %ebp
movl $0x1, %ebx
movl 0x28(%rsp), %eax
cmpw $0xa, %ax
jb 0x4087f6
movl $0x2, %ebx
cmpw $0x64, %ax
jb 0x4087f6
movl $0x3, %ebx
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x4087f6
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %ebx
sbbl $0x0, %ebx
movl %ebx, %esi
leaq 0x290(%rsp), %rdi
movq %r14, (%rdi)
movl $0x2d, %edx
callq 0x48b4d0
movq 0x290(%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x407f93
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
movq $0x1b71960, %rdi        # imm = 0x1B71960
callq 0x485270
movq %rax, %rbx
leaq 0x199a85(%rip), %rsi    # 0x5a22c9
movl $0x41, %edx
movq %rax, %rdi
callq 0x485270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4663c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x484d70
movq %rax, %rdi
callq 0x484340
jmp 0x408981
leaq 0x212e64(%rip), %rdi    # 0x61b6e8
callq 0x4fb7a0
testl %eax, %eax
jne 0x4098a7
movw $0xfff4, 0x212e40(%rip) # imm = 0xFFF4
leaq 0x212e47(%rip), %rdi    # 0x61b6e8
callq 0x4fc680
movq $0x1b71960, %rdi        # imm = 0x1B71960
leaq 0x199a0d(%rip), %rsi    # 0x5a22c1
movl $0x7, %edx
callq 0x485270
leaq 0x2a0(%rsp), %r14
movl 0xc(%rsp), %ebp
movl $0x1, %ebx
movl 0x28(%rsp), %eax
cmpw $0xa, %ax
jb 0x4088ff
movl $0x2, %ebx
cmpw $0x64, %ax
jb 0x4088ff
movl $0x3, %ebx
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x4088ff
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %ebx
sbbl $0x0, %ebx
movl %ebx, %esi
leaq 0x290(%rsp), %rdi
movq %r14, (%rdi)
movl $0x2d, %edx
callq 0x48b4d0
movq 0x290(%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x407f93
movq 0x290(%rsp), %rsi
movq 0x298(%rsp), %rdx
movq $0x1b71960, %rdi        # imm = 0x1B71960
callq 0x485270
movq %rax, %rbx
leaq 0x1999c1(%rip), %rsi    # 0x5a230e
movl $0x3a, %edx
movq %rax, %rdi
callq 0x485270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4663c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x484d70
movq %rax, %rdi
callq 0x484340
movq 0x290(%rsp), %rdi
cmpq %r14, %rdi
je 0x409866
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x409866
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movl %eax, 0x20(%rsp)
movb %al, 0x1c(%rsp)
movl %eax, 0x18(%rsp)
movq %rax, 0xf0(%rsp)
movl %eax, 0x100(%rsp)
movb %al, 0xfc(%rsp)
movl %eax, 0xf8(%rsp)
movq %rax, 0xd8(%rsp)
movl %eax, 0xe8(%rsp)
movb %al, 0xe4(%rsp)
movl %eax, 0xe0(%rsp)
movq %rax, 0x98(%rsp)
movl %eax, 0xa8(%rsp)
movb %al, 0xa4(%rsp)
movl %eax, 0xa0(%rsp)
movq %rax, 0x70(%rsp)
movl %eax, 0x80(%rsp)
movb %al, 0x7c(%rsp)
movq 0x30(%rsp), %r12
movl %ebx, 0x78(%rsp)
movq 0x88(%rsp), %r14
movq (%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x408a66
movl $0x1, %ecx
xorl %r8d, %r8d
movq $0x1b70940, %rdi        # imm = 0x1B70940
movzbl (%rsi,%r8), %r8d
cmpb $-0x1, (%rdi,%r8)
je 0x408a76
movl %ecx, %r8d
incl %ecx
cmpq %r8, %rdx
ja 0x408a50
leaq 0xf0(%rsp), %rdi
callq 0x40b090
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
testq %rdx, %rdx
je 0x408aa4
movl $0x1, %eax
xorl %edi, %edi
movq $0x1b70940, %rcx        # imm = 0x1B70940
movzbl (%rsi,%rdi), %edi
cmpb $-0x1, (%rcx,%rdi)
je 0x408ab1
movl %eax, %edi
incl %eax
cmpq %rdi, %rdx
ja 0x408a91
leaq 0xd8(%rsp), %rdi
callq 0x40b090
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1be406(%rip), %rdx    # 0x5c6eca
leaq 0xb0(%rsp), %rdi
movq %rdx, %rsi
callq 0x408096
decl %ebx
je 0x408af6
leaq 0x1b036e(%rip), %r14    # 0x5b8e4d
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x48d320
decl %ebx
jne 0x408ae7
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
testq %rdx, %rdx
je 0x408b2c
movl $0x1, %eax
xorl %edi, %edi
movq $0x1b70940, %rcx        # imm = 0x1B70940
movzbl (%rsi,%rdi), %edi
cmpb $-0x1, (%rcx,%rdi)
je 0x408b46
movl %eax, %edi
incl %eax
cmpq %rdi, %rdx
ja 0x408b19
leaq 0x98(%rsp), %rdi
callq 0x40b090
movl (%rsp), %ebx
movq 0xb8(%rsp), %rdx
jmp 0x408b49
movl (%rsp), %ebx
leaq 0x1be37a(%rip), %rcx    # 0x5c6eca
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x48c7c0
testl %ebx, %ebx
je 0x408b87
leaq 0x1b02e8(%rip), %r14    # 0x5b8e55
leaq 0xb0(%rsp), %r15
movl (%rsp), %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x48d320
decl %ebx
jne 0x408b78
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
testq %rdx, %rdx
je 0x408bbd
movl $0x1, %eax
xorl %edi, %edi
movq $0x1b70940, %rcx        # imm = 0x1B70940
movzbl (%rsi,%rdi), %edi
cmpb $-0x1, (%rcx,%rdi)
je 0x408bc7
movl %eax, %edi
incl %eax
cmpq %rdi, %rdx
ja 0x408baa
leaq 0x70(%rsp), %rdi
callq 0x40b090
leaq 0x19977b(%rip), %rdi    # 0x5a2349
movl $0x1, %esi
movl $0x5, %edx
movq %rbp, %rcx
callq 0x4edf40
testl %r12d, %r12d
je 0x408c21
movq 0x60(%rsp), %rbx
shlq $0x5, %rbx
xorl %r14d, %r14d
movl $0x9, %edi
movq %rbp, %rsi
callq 0x4f24a0
movq (%r13), %rax
movq (%rax,%r14), %rdi
movq 0x8(%rax,%r14), %rdx
movl $0x1, %esi
movq %rbp, %rcx
callq 0x4edf40
addq $0x20, %r14
cmpq %r14, %rbx
jne 0x408bf1
movl $0xa, %edi
movq %rbp, %rsi
callq 0x4f24a0
leaq 0x190(%rsp), %rdi
movl %r12d, %esi
movl (%rsp), %edx
callq 0x413d74
testl %r12d, %r12d
je 0x408ed9
movl %r12d, %eax
movq %rax, 0x88(%rsp)
xorl %ebx, %ebx
leaq 0x10(%rsp), %r15
leaq 0xd0(%rsp), %r12
movl $0x0, 0xc(%rsp)
movq %rbp, 0x28(%rsp)
leaq (%rbx,%rbx,2), %r13
movq %r13, %r14
shlq $0x6, %r14
addq 0x68(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x416f24
testb %al, %al
je 0x408dd8
movl 0xf8(%rsp), %eax
movl 0x18(%rsp), %edx
cmpl %edx, %eax
jne 0x408cf3
movl 0x20(%rsp), %ecx
testq %rcx, %rcx
je 0x408cf7
movq 0xf0(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq (%rdx), %r8
movq (%rsi), %r10
cmpq %r10, %r8
ja 0x408c81
leaq -0x1(%rcx), %rdi
xorl %r9d, %r9d
cmpq %r10, %r8
jb 0x408cf7
cmpq %r9, %rdi
je 0x408cf7
movq 0x8(%rdx,%r9,8), %r8
movq 0x8(%rsi,%r9,8), %r10
incq %r9
cmpq %r10, %r8
jbe 0x408cce
movl %eax, %edx
cmpq %rcx, %r9
jb 0x408c81
jmp 0x408cf9
ja 0x408c81
jmp 0x408cf9
movl %eax, %edx
movq 0x1b0(%rsp), %rax
leaq (%rax,%r13,8), %r14
movl 0x8(%r14), %eax
cmpl %eax, %edx
jne 0x408d13
movl 0x10(%r14), %ebp
jmp 0x408d4b
testl %eax, %eax
je 0x408d28
movq (%r14), %rdi
testq %rdi, %rdi
je 0x408d28
callq 0x41aea0
movl 0x18(%rsp), %edx
movl %edx, 0x8(%r14)
movb 0x1c(%rsp), %al
movb %al, 0xc(%r14)
movl 0x20(%rsp), %ebp
movl %ebp, 0x10(%r14)
movq %rbp, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, (%r14)
testl %ebp, %ebp
je 0x408d6b
movq 0x10(%rsp), %rax
movq (%r14), %rcx
movl %ebp, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x408d5b
movl 0xd0(%rsp), %eax
movq 0x1c8(%rsp), %rcx
movl %eax, (%rcx,%rbx,4)
movl 0x18(%rsp), %eax
cmpl %eax, 0xe0(%rsp)
jne 0x408df6
movl 0x20(%rsp), %eax
testq %rax, %rax
movq 0x28(%rsp), %rbp
je 0x408dd8
movq 0xd8(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq (%rcx), %rdi
movq (%rdx), %r9
cmpq %r9, %rdi
ja 0x408dfd
leaq -0x1(%rax), %rsi
xorl %r8d, %r8d
cmpq %r9, %rdi
jb 0x408dd8
cmpq %r8, %rsi
je 0x408dd8
movq 0x8(%rcx,%r8,8), %rdi
movq 0x8(%rdx,%r8,8), %r9
incq %r8
cmpq %r9, %rdi
jbe 0x408db7
cmpq %rax, %r8
jb 0x408dfd
movq 0x1b0(%rsp), %rax
leaq (%rax,%r13,8), %r14
movl 0x78(%rsp), %eax
movl 0x8(%r14), %ecx
cmpl %ecx, %eax
jne 0x408e25
movl 0x10(%r14), %r13d
jmp 0x408e66
movq 0x28(%rsp), %rbp
jbe 0x408dd8
leaq 0x2128e4(%rip), %r14    # 0x61b6e8
movq %r14, %rdi
callq 0x4fb7a0
testl %eax, %eax
jne 0x409899
incq 0x2128c5(%rip)          # 0x61b6e0
movq %r14, %rdi
callq 0x4fc680
jmp 0x408e9b
testl %ecx, %ecx
je 0x408e3a
movq (%r14), %rdi
testq %rdi, %rdi
je 0x408e3a
callq 0x41aea0
movl 0x78(%rsp), %eax
movl %eax, 0x8(%r14)
movb 0x7c(%rsp), %al
movb %al, 0xc(%r14)
movl 0x80(%rsp), %r13d
movl %r13d, 0x10(%r14)
movq %r13, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, (%r14)
movq 0x28(%rsp), %rbp
testl %r13d, %r13d
je 0x408e88
movq 0x70(%rsp), %rax
movq (%r14), %rcx
movl %r13d, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x408e78
incl 0xc(%rsp)
movq 0x1c8(%rsp), %rax
movl $0x0, (%rax,%rbx,4)
movq 0x30(%rsp), %r13
incq %rbx
cmpq 0x88(%rsp), %rbx
jne 0x408c71
cmpl %r13d, 0xc(%rsp)
jne 0x408f31
testl %r13d, %r13d
movq 0x68(%rsp), %r14
je 0x408ed9
movl %r13d, %ebx
movq %r14, %rdi
callq 0x41713a
addq $0xc0, %r14
decq %rbx
jne 0x408ec5
movq %rbp, %rdi
callq 0x4ed390
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq %rcx, %rax
shlq $0x6, %rax
leaq (%rax,%rax,2), %rbx
addq $0x8, %rbx
testq %rcx, %rcx
je 0x408f1f
leaq (%rax,%rax,2), %r14
movq 0x40(%rsp), %r15
addq $-0xb8, %r15
leaq (%r15,%r14), %rdi
callq 0x4167fa
addq $-0xc0, %r14
jne 0x408f0d
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x41aeb0
jmp 0x4097e0
movq 0x1b0(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rbx
movl 0xa0(%rsp), %eax
movl 0x8(%rbx), %ecx
cmpl %ecx, %eax
jne 0x408f5a
movl 0x10(%rbx), %r14d
jmp 0x408f9a
testl %ecx, %ecx
je 0x408f72
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x408f72
callq 0x41aea0
movl 0xa0(%rsp), %eax
movl %eax, 0x8(%rbx)
movb 0xa4(%rsp), %al
movb %al, 0xc(%rbx)
movl 0xa8(%rsp), %r14d
movl %r14d, 0x10(%rbx)
movq %r14, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, (%rbx)
testl %r14d, %r14d
je 0x408fbf
movq 0x98(%rsp), %rax
movq (%rbx), %rcx
movl %r14d, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x408faf
leaq 0x190(%rsp), %rdi
callq 0x414006
xorl %eax, %eax
xorpd %xmm0, %xmm0
movapd %xmm0, 0x200(%rsp)
movq %rax, 0x210(%rsp)
movq %rax, 0x130(%rsp)
movapd %xmm0, 0x120(%rsp)
movl (%rsp), %ebx
testl %ebx, %ebx
je 0x40904d
movl %ebx, %eax
andl $0x3, %eax
movb $0x4, %cl
subb %al, %cl
testl %eax, %eax
movzbl %cl, %ecx
cmovel %eax, %ecx
movb %cl, 0x54(%rsp)
movzbl %cl, %r14d
addl %ebx, %r14d
movl %r14d, %eax
andl $0x1f, %eax
shrl $0x5, %r14d
cmpl $0x1, %eax
sbbl $-0x1, %r14d
movl %r14d, 0x58(%rsp)
shll $0x3, %r14d
movq %r14, %rdi
callq 0x41bd90
movq %rax, 0x48(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401098
jmp 0x409063
movq $0x0, 0x48(%rsp)
movl $0x0, 0x58(%rsp)
movb $0x0, 0x54(%rsp)
movl %ebx, 0x50(%rsp)
movl $0x1, %eax
movq %rax, 0x108(%rsp)
movq 0x90(%rsp), %rbx
cmpb $0x0, 0x100(%rbx)
je 0x409094
movl $0x1, %eax
movq %rax, 0x110(%rsp)
jmp 0x4090f4
movl 0x128(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x1991a6(%rip), %xmm0   # 0x5a2250
cvttsd2si %xmm0, %rax
movq %rax, 0x110(%rsp)
leaq 0x108(%rbx), %rdi
leaq 0x1bde05(%rip), %rsi    # 0x5c6eca
callq 0x48dd80
testl %eax, %eax
je 0x4090f4
movl %r13d, %eax
subl 0x128(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x199169(%rip), %xmm0   # 0x5a2250
cvttsd2si %xmm0, %rax
movq %rax, 0x108(%rsp)
testl %r13d, %r13d
je 0x4091b3
leaq 0x160(%rsp), %r13
leaq 0x199243(%rip), %r14    # 0x5a234f
leaq 0x19923e(%rip), %r15    # 0x5a2351
leaq 0x150(%rsp), %r12
leaq 0x120(%rsp), %rbp
movq 0x30(%rsp), %rax
movl %eax, %ebx
movq %r13, 0x150(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x408096
leaq 0x200(%rsp), %rdi
movq %r12, %rsi
callq 0x407d24
movq 0x150(%rsp), %rdi
cmpq %r13, %rdi
je 0x40916d
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq %r13, 0x150(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x408096
movq %rbp, %rdi
movq %r12, %rsi
callq 0x407d24
movq 0x150(%rsp), %rdi
cmpq %r13, %rdi
je 0x4091ab
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x41ae90
decl %ebx
jne 0x40912a
movl (%rsp), %eax
movq %rax, 0x140(%rsp)
movq 0x90(%rsp), %rax
leaq 0x108(%rax), %rcx
movq %rcx, 0x148(%rsp)
addq $0x158, %rax            # imm = 0x158
movq %rax, 0x220(%rsp)
movq 0x88(%rsp), %r12
shlq $0x5, %r12
movq $0x0, (%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x414068
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %r13d
movq 0x1c8(%rsp), %rax
movl (%rax,%r13,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq 0x228(%rsp), %rax
movq (%rax), %rax
cvtss2sd (%rax,%r13,4), %xmm1
divsd %xmm1, %xmm0
leaq 0x290(%rsp), %rdi
leaq 0x199105(%rip), %rsi    # 0x5a2352
movb $0x1, %al
callq 0x4e6e40
movq 0x1b0(%rsp), %rcx
leaq (,%r13,2), %rbx
addq %r13, %rbx
movl 0x8(%rcx,%rbx,8), %eax
cmpl 0x50(%rsp), %eax
jne 0x4092e1
movl 0x58(%rsp), %eax
testq %rax, %rax
je 0x40929a
leaq (%rcx,%rbx,8), %rcx
movq (%rcx), %rcx
movq 0x48(%rsp), %rdx
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
cmpq (%rdx,%rsi,8), %rdi
jne 0x4092e1
incq %rsi
cmpq %rsi, %rax
jne 0x409288
movq 0x120(%rsp), %rax
movq %r13, %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %r14
movq 0x8(%rax,%rcx), %rbp
leaq 0x290(%rsp), %r15
movq %r15, %rdi
callq 0x401140
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
leaq 0x212414(%rip), %r15    # 0x61b6e8
movq %rax, %r8
callq 0x48c7c0
jmp 0x4093d4
movq (%rsp), %rax
cmpl 0x110(%rsp), %eax
jae 0x4092fb
movl 0x3c(%rsp), %eax
cmpl 0x108(%rsp), %eax
jb 0x40936d
leaq 0x48(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x40ab08
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
movq 0x140(%rsp), %rdx
movq 0x28(%rsp), %rbp
movq %rbp, %rcx
callq 0x4edf40
cmpl $0x0, 0x30(%rsp)
je 0x409360
xorl %r14d, %r14d
movq 0x120(%rsp), %rax
movq (%rax,%r14), %rdi
movq 0x8(%rax,%r14), %rdx
movl $0x1, %esi
movq %rbp, %rcx
callq 0x4edf40
addq $0x20, %r14
cmpq %r14, %r12
jne 0x409339
movl $0xa, %edi
movq %rbp, %rsi
callq 0x4f24a0
leaq 0x120(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x40ac46
movq 0x120(%rsp), %rax
movq %r13, %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %r14
movq 0x8(%rax,%rcx), %rbp
leaq 0x290(%rsp), %r15
movq %r15, %rdi
callq 0x401140
movq $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
leaq 0x212324(%rip), %r15    # 0x61b6e8
movq %rax, %r8
callq 0x48c7c0
movl $0x0, 0x3c(%rsp)
movq 0x90(%rsp), %rax
cmpb $0x0, 0x100(%rax)
je 0x409581
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
movq 0x1b0(%rsp), %rax
leaq (%rax,%rbx,8), %r14
movl 0x8(%r14), %eax
movl 0x50(%rsp), %ecx
cmpl %ecx, %eax
jne 0x409411
movl 0x58(%rsp), %ebp
jmp 0x40944d
testl %ecx, %ecx
je 0x409428
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x409428
callq 0x41aea0
movl 0x8(%r14), %eax
movl %eax, 0x50(%rsp)
movb 0xc(%r14), %al
movb %al, 0x54(%rsp)
movl 0x10(%r14), %ebp
movl %ebp, 0x58(%rsp)
movq %rbp, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, 0x48(%rsp)
testl %ebp, %ebp
je 0x40946d
movq (%r14), %rax
movq 0x48(%rsp), %rcx
movl %ebp, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x40945d
movq %rbx, %rdi
shlq $0x6, %rdi
addq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x416f24
movl 0x18(%rsp), %ecx
testb %al, %al
je 0x4094f1
cmpl %ecx, 0xe0(%rsp)
jne 0x4095dd
movl 0x20(%rsp), %eax
testq %rax, %rax
je 0x4094f1
movq 0xd8(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq (%rdx), %r8
movq (%rsi), %r10
cmpq %r10, %r8
ja 0x4095e3
leaq -0x1(%rax), %rdi
xorl %r9d, %r9d
cmpq %r10, %r8
jb 0x4094f1
cmpq %r9, %rdi
je 0x4094f1
movq 0x8(%rdx,%r9,8), %r8
movq 0x8(%rsi,%r9,8), %r10
incq %r9
cmpq %r10, %r8
jbe 0x4094cc
cmpq %rax, %r9
jb 0x4095e3
movl 0x78(%rsp), %eax
cmpl %ecx, %eax
jne 0x409500
movl 0x20(%rsp), %r14d
jmp 0x409541
testl %ecx, %ecx
je 0x409517
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x409517
callq 0x41aea0
movl 0x78(%rsp), %eax
movl %eax, 0x18(%rsp)
movb 0x7c(%rsp), %al
movb %al, 0x1c(%rsp)
movl 0x80(%rsp), %r14d
movl %r14d, 0x20(%rsp)
movq %r14, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, 0x10(%rsp)
testl %r14d, %r14d
je 0x409565
movq 0x70(%rsp), %rax
movq 0x10(%rsp), %rcx
movl %r14d, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x409555
movl 0xc(%rsp), %eax
incl %eax
movq $0x0, 0xd0(%rsp)
movq 0x28(%rsp), %rbp
jmp 0x40960b
movq 0x148(%rsp), %rdi
leaq 0x1bd93a(%rip), %rsi    # 0x5c6eca
callq 0x48dd80
testl %eax, %eax
je 0x4093e9
movq %r13, %rsi
shlq $0x5, %rsi
movq 0x118(%rsp), %rax
addq (%rax), %rsi
movq 0x220(%rsp), %rdi
callq 0x40addc
movq %rax, %rdi
movq 0x148(%rsp), %rsi
callq 0x48dbd0
testl %eax, %eax
je 0x4093e9
incl 0x3c(%rsp)
jmp 0x4093f3
jbe 0x4094f1
movq %r15, %rdi
callq 0x4fb7a0
testl %eax, %eax
jne 0x4098a0
incq 0x2120e6(%rip)          # 0x61b6e0
movq %r15, %rdi
callq 0x4fc680
movq 0x28(%rsp), %rbp
movl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl 0x30(%rsp), %eax
je 0x4096b8
movq 0x1b0(%rsp), %rax
leaq (%rax,%rbx,8), %rbx
movl 0x18(%rsp), %eax
movl 0x8(%rbx), %ecx
cmpl %ecx, %eax
jne 0x409636
movl 0x10(%rbx), %r14d
jmp 0x40966d
testl %ecx, %ecx
je 0x40964b
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x40964b
callq 0x41aea0
movl 0x18(%rsp), %eax
movl %eax, 0x8(%rbx)
movb 0x1c(%rsp), %al
movb %al, 0xc(%rbx)
movl 0x20(%rsp), %r14d
movl %r14d, 0x10(%rbx)
movq %r14, %rdi
shlq $0x3, %rdi
callq 0x41bd90
movq %rax, (%rbx)
testl %r14d, %r14d
je 0x40968f
movq 0x10(%rsp), %rax
movq (%rbx), %rcx
movl %r14d, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x40967f
movl 0xd0(%rsp), %eax
movq 0x1c8(%rsp), %rcx
movl %eax, (%rcx,%r13,4)
leaq 0x190(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0x413f2e
jmp 0x4091ff
movq (%rsp), %rax
cmpl 0x110(%rsp), %eax
movq 0x68(%rsp), %r14
movq 0x30(%rsp), %r15
jae 0x4096dc
movl 0x3c(%rsp), %eax
cmpl 0x108(%rsp), %eax
jb 0x409746
leaq 0x48(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x40ab08
movq 0xb0(%rsp), %rdi
movl $0x1, %esi
movq 0x140(%rsp), %rdx
movq %rbp, %rcx
callq 0x4edf40
testl %r15d, %r15d
je 0x409739
xorl %ebx, %ebx
movq 0x120(%rsp), %rax
movq (%rax,%rbx), %rdi
movq 0x8(%rax,%rbx), %rdx
movl $0x1, %esi
movq %rbp, %rcx
callq 0x4edf40
addq $0x20, %rbx
cmpq %rbx, %r12
jne 0x409712
movl $0xa, %edi
movq %rbp, %rsi
callq 0x4f24a0
testl %r15d, %r15d
je 0x409764
movq %r14, %rdi
callq 0x41713a
addq $0xc0, %r14
decq 0x88(%rsp)
jne 0x40974b
movq %rbp, %rdi
callq 0x4ed390
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq %rcx, %rax
shlq $0x6, %rax
leaq (%rax,%rax,2), %rbx
addq $0x8, %rbx
testq %rcx, %rcx
je 0x4097aa
leaq (%rax,%rax,2), %r14
movq 0x40(%rsp), %r15
addq $-0xb8, %r15
leaq (%r15,%r14), %rdi
callq 0x4167fa
addq $-0xc0, %r14
jne 0x409798
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x41aeb0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x4097c6
callq 0x41aea0
leaq 0x120(%rsp), %rdi
callq 0x407c2a
leaq 0x200(%rsp), %rdi
callq 0x407c2a
leaq 0x190(%rsp), %rdi
callq 0x413eea
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x409812
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x409821
callq 0x41aea0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x409833
callq 0x41aea0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x409845
callq 0x41aea0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x409857
callq 0x41aea0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x409866
callq 0x41aea0
leaq 0x280(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x409887
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x41ae90
addq $0x698, %rsp            # imm = 0x698
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x402db7
movl %eax, %edi
callq 0x402db7
movl %eax, %edi
callq 0x402db7
movq %rax, %rbx
jmp 0x409acb
jmp 0x4099f6
movq %rax, %rbx
jmp 0x409b2b
movq %rax, %rbx
jmp 0x409b3d
movq %rax, %rbx
jmp 0x409b4f
movq %rax, %rbx
jmp 0x409b61
jmp 0x4099f6
jmp 0x4099f6
jmp 0x4099e9
jmp 0x4098ec
movq %rax, %rbx
jmp 0x409b1c
jmp 0x409ab9
movq %rax, %rbx
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x40991e
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x40991e
movq %rax, %rbx
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x409948
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x409948
movq %rax, %rbx
movq 0x190(%rsp), %rdi
cmpq %r12, %rdi
je 0x40996a
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x40996a
movq %rax, %rbx
movq 0x250(%rsp), %rdi
jmp 0x409b7c
jmp 0x4099e9
jmp 0x40997d
jmp 0x4099f6
movq %rax, %rbx
movq 0x290(%rsp), %rdi
cmpq %r14, %rdi
je 0x409b70
movq 0x2a0(%rsp), %rsi
jmp 0x409a71
jmp 0x409ab9
jmp 0x409ab9
jmp 0x4099af
jmp 0x409ab9
movq %rax, %rbx
movq 0x150(%rsp), %rdi
cmpq %r13, %rdi
je 0x409abc
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x409abc
jmp 0x409ae7
jmp 0x409ae7
jmp 0x409ae7
jmp 0x4099e9
movq %rax, %rbx
jmp 0x409af7
movq %rax, %rbx
jmp 0x409a26
movq %rax, %rbx
jmp 0x409b70
movq %rax, %rbx
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x409a26
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x409a50
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x409a50
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x409b70
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x409b70
movq %rax, %rbx
testq %r15, %r15
je 0x409aa7
negq %r15
movq 0x40(%rsp), %r12
addq $-0xb8, %r12
leaq (%r12,%r15), %rdi
callq 0x4167fa
addq $-0xc0, %r15
jne 0x409a95
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x41aeb0
jmp 0x409b8c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x409acb
callq 0x41aea0
leaq 0x120(%rsp), %rdi
callq 0x407c2a
leaq 0x200(%rsp), %rdi
callq 0x407c2a
jmp 0x409aea
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x413eea
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x409b1c
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x409b2b
callq 0x41aea0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x409b3d
callq 0x41aea0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x409b4f
callq 0x41aea0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x409b61
callq 0x41aea0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x409b70
callq 0x41aea0
leaq 0x280(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x409b8c
movq (%r15), %rsi
incq %rsi
callq 0x41ae90
movq %rbx, %rdi
callq 0x4bfce0