// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/viterbi.cpp
// Function: main
int main(int argc, char *argv[])
{
	time_t start,end;
	time(&start);

	// The following turns off sync between C and C++ streams.
	// Apparently it's faster to turn sync off, and as I don't use C streams, it's okay to turn off.
	ios_base::sync_with_stdio(false);

	parameters params(argc, argv);
	params.print_help();
	params.read_parameters();
	params.max_alleles = 2;	// Only use biallelic sites

	LOG.open(params.stream_out, params.stream_err, params.output_prefix);
	LOG.printLOG("\nViterbi - " + VCFTOOLS_VERSION + "\n");
	LOG.printLOG("(C) Adam Auton 2014\n\n");

	params.print_params();

	vector<vector<bool> > input_haplotypes;
	vector<unsigned int> positions;
	vector<string> alleles;
	vector<string> haplotype_names;
	
	// Read input haplotypes from VCF
	for (unsigned int ui=0; ui<params.vcf_filenames.size(); ui++)
	{
		LOG.printLOG("Reading " + params.vcf_filenames[ui] + "\n");
		variant_file *vf;
		if (params.vcf_format[ui])
			vf = new vcf_file(params, params.vcf_filenames[ui], ui);
		else
			vf = new bcf_file(params, params.vcf_filenames[ui], ui);

		vf->apply_filters(params);
		LOG.printLOG("After filtering, kept " + output_log::int2str(vf->N_kept_individuals()) + " out of " + output_log::int2str(vf->meta_data.N_indv) + " Individuals\n");

		if (ui==0)
		{
			vf->read_file(params, input_haplotypes, positions, haplotype_names, alleles);
			LOG.printLOG("After filtering, kept " + header::int2str(positions.size()) + " out of a possible " + header::int2str(vf->N_total_sites()) + " Sites\n");
		}
		else
		{
			int passed_sites = vf->add_file(params, input_haplotypes, positions, haplotype_names, alleles);
			LOG.printLOG("After filtering, kept " + header::int2str(passed_sites) + " out of a possible " + header::int2str(vf->N_total_sites()) + " Sites\n");
		}

		if (vf->N_total_sites() <= 0)
			LOG.warning("File does not contain any sites");
		else if (vf->N_kept_sites() <= 0)
			LOG.warning("No data left for analysis!");
		delete vf;
	}
	
	vector<vector<bool> > new_haplotypes;
	vector<unsigned int> new_positions;
	new_haplotypes.resize(haplotype_names.size());
	
	for (unsigned int ui=0; ui<positions.size(); ui++)
	{
		int allele_count = 0;
		for (unsigned int uj=0; uj<haplotype_names.size(); uj++)
			if (input_haplotypes[uj][ui])
				allele_count++;

		if (allele_count > 1 && allele_count < (haplotype_names.size()-1))
		{
			new_positions.push_back(positions[ui]);

			for (unsigned int uj=0; uj<haplotype_names.size(); uj++)
				new_haplotypes[uj].push_back(input_haplotypes[uj][ui]);
		}
		else
			LOG.one_off_warning("\tWarning: Skipping singletons.");
	}
	
	positions = new_positions;
	input_haplotypes = new_haplotypes;

	if (params.vcf_filenames.size() > 1)
		LOG.printLOG("Kept "+ header::int2str(positions.size()) + " sites that are contained in all files\n");
	if (positions.size() == 0)
		LOG.error("No data left for analysis!");
	
	string CHROM = *(params.chrs_to_keep.begin());

	vector<int> alt_allele_counts;
	alt_allele_counts.resize(input_haplotypes[0].size(), 0);
	for (unsigned int uj=0; uj<input_haplotypes[0].size(); uj++)
	{
		for (unsigned int uk=0; uk<input_haplotypes.size(); uk++)
			alt_allele_counts[uj] += input_haplotypes[uk][uj];
//		cout << positions[uj] << " " << alt_allele_counts[uj] << endl;
	}

	vector<double> map;
	if (params.map_filename == "")
	{
		set_genetic_map_at_positions(positions, params.recomb_rate, map);
	}
	else
	{
		read_genetic_map_at_positions(params.map_filename, positions, map);
	}

	if (params.run_viterbi == true)
	{
		cout << "#HAP\tCOPY\tCHR\tSTART\tEND\tN_SNPS\tMIN_ALLELE_COUNT\tMIN_ALLELE_POS\tEXACT_HAP_COUNT\tHAP_COUNT_1_PRCT_MISMATCH" << endl;
		for (int i=0; i<input_haplotypes.size(); i++)
		{
			string indv = haplotype_names[i].substr(0, haplotype_names[i].size()-2);
			if ((params.viterbi_indv.size() > 0) && (params.viterbi_indv.find(indv) == params.viterbi_indv.end()))
			{
				continue;
			}

			LOG.printLOG("Running Viterbi on " + haplotype_names[i] + "\n");
			vector<int> viterbi_path;
			viterbi(input_haplotypes, map, i, params, viterbi_path);

			// Process the viterbi path
			int N_exact_match;
			int N_one_prct_mismatch;
			int min_pos = positions[0];
			int max_pos = positions[0];
			int start_idx = 0;
			int current_haplotype = viterbi_path[0];
			int N_SNPs = 1;
			int min_freq = numeric_limits<int>::max();
			int min_freq_idx = 0;
			if (input_haplotypes[i][0] == 1)
				min_freq = alt_allele_counts[0];
			else
				min_freq = (int)input_haplotypes.size() - alt_allele_counts[0];

			for (int j=1; j<viterbi_path.size(); j++)
			{
				if (viterbi_path[j] != current_haplotype)
				{	// Output haplotype

					// Get haplotype frequency
					get_haplotype_count(input_haplotypes, i, start_idx, j-1, N_exact_match, N_one_prct_mismatch);

					cout << haplotype_names[i] << "\t" << haplotype_names[current_haplotype];
					cout << "\t" << CHROM;
					cout << "\t" << min_pos << "\t" << max_pos << "\t" << N_SNPs;
					cout << "\t" << min_freq << "\t" << positions[min_freq_idx];
					cout << "\t" << N_exact_match << "\t" << N_one_prct_mismatch << endl;
					// Reset
					min_pos = positions[j];	// Haplotype is left shifted
					max_pos = positions[j];
					start_idx = j;
					current_haplotype = viterbi_path[j];
					N_SNPs = 1;
					min_freq = numeric_limits<int>::max();
					min_freq_idx = j;
					if (input_haplotypes[i][j] == 1)
						min_freq = alt_allele_counts[j];
					else
						min_freq = (int)input_haplotypes.size() - alt_allele_counts[j];
				}
				else
				{
					max_pos = positions[j];
					N_SNPs++;
					if (input_haplotypes[i][j] == 1)
					{
						if (alt_allele_counts[j] < min_freq)
						{
							min_freq = alt_allele_counts[j];
							min_freq_idx = j;
						}
					}
					else
					{
						if (((int)input_haplotypes.size() - alt_allele_counts[j]) < min_freq)
						{
							min_freq = (int)input_haplotypes.size() - alt_allele_counts[j];
							min_freq_idx = j;
						}
					}

				}
			}
			// Output last haplotype
			get_haplotype_count(input_haplotypes, i, start_idx, viterbi_path.size()-1, N_exact_match, N_one_prct_mismatch);
			cout << haplotype_names[i] << "\t" << haplotype_names[viterbi_path[viterbi_path.size()-1]];
			cout << "\t" << CHROM;
			cout << "\t" << min_pos << "\t" << max_pos << "\t" << N_SNPs;
			cout << "\t" << min_freq << "\t" << positions[min_freq_idx];
			cout << "\t" << N_exact_match << "\t" << N_one_prct_mismatch << endl;
		}
	}
	else
	{
		cout << "#HAP\tCOPY\tCHR\tPOS\tPROB" << endl;
		for (int i=0; i<input_haplotypes.size(); i++)
		{
			string indv = haplotype_names[i].substr(0, haplotype_names[i].size()-2);
			if ((params.viterbi_indv.size() > 0) && (params.viterbi_indv.find(indv) == params.viterbi_indv.end()))
			{
				continue;
			}

			LOG.printLOG("Running Forward-backward on " + haplotype_names[i] + "\n");
			vector<int> post_path;
			vector<double> post_prob;
			fwdbck(input_haplotypes, map, i, params, post_path, post_prob);

			for (int j=0; j<positions.size(); j++)
			{
				cout << haplotype_names[i] << "\t" << haplotype_names[post_path[j]];
				cout << "\t" << CHROM << "\t" << positions[j] << "\t" << post_prob[j];
				cout << endl;
			}
		}
	}

	time(&end);
	double running_time = difftime(end,start);
	LOG.printLOG("Run Time = " + output_log::dbl2str_fixed(running_time, 2) + " seconds\n");
	LOG.close();
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x258(%rsp), %rdi
callq 0x5400
xorl %edi, %edi
callq 0x5170
leaq 0x368(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2f24c
movq %r14, %rdi
callq 0x36952
leaq 0x368(%rsp), %rdi
callq 0x2fd3e
leaq 0x5f8(%rsp), %rcx
movl $0x2, -0x88(%rcx)
movzbl 0x1a5(%rcx), %esi
movzbl 0x1a4(%rcx), %edx
leaq 0x3ff1c(%rip), %rdi     # 0x494a8
callq 0x36dcc
leaq 0x2eb9e(%rip), %rsi     # 0x38136
leaq 0x3fee9(%rip), %rdx     # 0x49488
movq %rsp, %rdi
callq 0xb777
leaq 0x2eba8(%rip), %rsi     # 0x38156
movq %rsp, %rdi
callq 0x5870
leaq 0x2f0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x95e6
movq %rdx, 0x2e0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2f0(%rsp)
jmp 0x95ed
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x2e0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3fe95(%rip), %rdi     # 0x494a8
callq 0x36e72
movq 0x2e0(%rsp), %rdi
cmpq %r14, %rdi
je 0x962a
callq 0x5410
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x963d
callq 0x5410
leaq 0x350(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2eaf2(%rip), %rsi     # 0x38142
leaq 0x2eb00(%rip), %rdx     # 0x38157
leaq 0x340(%rsp), %rdi
callq 0xc85e
leaq 0x3fe3d(%rip), %rdi     # 0x494a8
leaq 0x340(%rsp), %rsi
callq 0x36e72
movq 0x340(%rsp), %rdi
cmpq %r14, %rdi
je 0x968a
callq 0x5410
leaq 0x368(%rsp), %rdi
callq 0x31ec2
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
xorl %r14d, %r14d
movq %r14, 0xa0(%rsp)
movq %r14, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movq %r14, 0x250(%rsp)
movaps %xmm0, 0x240(%rsp)
movq %r14, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movq 0x7c0(%rsp), %rdx
cmpq %rdx, 0x7c8(%rsp)
je 0xa0db
leaq 0x60(%rsp), %r13
movq %rsp, %r15
leaq 0xf0(%rsp), %r12
movq %r14, %rbx
shlq $0x5, %rbx
addq %rbx, %rdx
movq %r15, %rdi
leaq 0x2ea41(%rip), %rsi     # 0x38158
callq 0xb777
movq %r15, %rdi
leaq 0x2ea30(%rip), %rsi     # 0x38156
callq 0x5870
leaq 0x210(%rsp), %rsi
movq %rsi, 0x200(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x975f
movq %rdx, 0x200(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x210(%rsp)
jmp 0x9765
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x208(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3fd21(%rip), %rdi     # 0x494a8
leaq 0x200(%rsp), %rsi
callq 0x36e72
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x97ae
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x97c1
callq 0x5410
movq 0x7d8(%rsp), %rax
movl %r14d, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %r14, %rax
jae 0x9806
movl $0x470, %edi            # imm = 0x470
callq 0x5460
movq %rax, %rbp
addq 0x7c0(%rsp), %rbx
movq %rax, %rdi
leaq 0x368(%rsp), %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x1072c
jmp 0x9831
movl $0x468, %edi            # imm = 0x468
callq 0x5460
movq %rax, %rbp
addq 0x7c0(%rsp), %rbx
movq %rax, %rdi
leaq 0x368(%rsp), %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0xe644
movq %rbp, %rdi
leaq 0x368(%rsp), %rsi
callq 0x2e5dc
movq %rbp, %rdi
callq 0x11532
movq %r12, %rdi
movl %eax, %esi
callq 0x37288
movl $0x16, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2e8fa(%rip), %rcx     # 0x38161
callq 0x54d0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9894
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x989a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
leaq 0x2e8ba(%rip), %rsi     # 0x38178
callq 0x5870
movq %r13, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x98e6
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x98ee
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x2a8(%rbp), %esi
leaq 0x70(%rsp), %rdi
callq 0x37288
movq 0x50(%rsp), %rcx
movl $0xf, %edi
cmpq %r13, %rcx
je 0x992a
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r8
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x9961
movl $0xf, %edi
leaq 0x80(%rsp), %r9
cmpq %r9, %rsi
je 0x995c
movq 0x80(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x996d
leaq 0x50(%rsp), %rdi
callq 0x50f0
jmp 0x997b
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x999e
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x99a4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r15, %rdi
leaq 0x2e7b6(%rip), %rsi     # 0x38181
callq 0x5870
leaq 0x1f0(%rsp), %rsi
movq %rsi, 0x1e0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9a04
movq %rdx, 0x1e0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1f0(%rsp)
jmp 0x9a0a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x1e8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3fa7c(%rip), %rdi     # 0x494a8
leaq 0x1e0(%rsp), %rsi
callq 0x36e72
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x9a53
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9a66
callq 0x5410
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x9a7d
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x9a8c
callq 0x5410
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9aa0
callq 0x5410
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x9aba
callq 0x5410
testl %r14d, %r14d
je 0x9b4a
movq %rbp, %rdi
leaq 0x368(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
leaq 0xd0(%rsp), %r8
leaq 0x240(%rsp), %r9
callq 0x12464
movq %r12, %rdi
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movl $0x16, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2e64b(%rip), %rcx     # 0x38161
callq 0x54d0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9be3
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x9be9
movq %rbp, %rdi
leaq 0x368(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
leaq 0xd0(%rsp), %r8
leaq 0x240(%rsp), %r9
callq 0x11c8a
movq 0xb8(%rsp), %rsi
subq 0xb0(%rsp), %rsi
shrq $0x2, %rsi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movl $0x16, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2e5b2(%rip), %rcx     # 0x38161
callq 0x54d0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9da6
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x9dac
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
leaq 0x2e582(%rip), %rsi     # 0x3818f
callq 0x5870
movq %r13, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9c35
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x9c3d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rdi
callq 0x1157c
leaq 0x70(%rsp), %rdi
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x50(%rsp), %rcx
movl $0xf, %edi
cmpq %r13, %rcx
je 0x9c82
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r8
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x9cb9
movl $0xf, %edi
leaq 0x80(%rsp), %r9
cmpq %r9, %rsi
je 0x9cb4
movq 0x80(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9cc5
leaq 0x50(%rsp), %rdi
callq 0x50f0
jmp 0x9cd3
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x9cf6
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9cfc
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r15, %rdi
leaq 0x2e480(%rip), %rsi     # 0x381a3
callq 0x5870
leaq 0x1b0(%rsp), %rsi
movq %rsi, 0x1a0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9d5c
movq %rdx, 0x1a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1b0(%rsp)
jmp 0x9d62
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x1a8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3f724(%rip), %rdi     # 0x494a8
leaq 0x1a0(%rsp), %rsi
callq 0x36e72
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
jmp 0x9f64
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
leaq 0x2e3bf(%rip), %rsi     # 0x3818f
callq 0x5870
movq %r13, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9df8
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x9e00
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rdi
callq 0x1157c
leaq 0x70(%rsp), %rdi
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x50(%rsp), %rcx
movl $0xf, %edi
cmpq %r13, %rcx
je 0x9e45
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r8
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x9e7c
movl $0xf, %edi
leaq 0x80(%rsp), %r9
cmpq %r9, %rsi
je 0x9e77
movq 0x80(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9e88
leaq 0x50(%rsp), %rdi
callq 0x50f0
jmp 0x9e96
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x9eb9
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9ebf
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r15, %rdi
leaq 0x2e2bd(%rip), %rsi     # 0x381a3
callq 0x5870
leaq 0x1d0(%rsp), %rsi
movq %rsi, 0x1c0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9f1f
movq %rdx, 0x1c0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1d0(%rsp)
jmp 0x9f25
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x1c8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3f561(%rip), %rdi     # 0x494a8
leaq 0x1c0(%rsp), %rsi
callq 0x36e72
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x9f6e
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9f81
callq 0x5410
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x9f98
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x9fa7
callq 0x5410
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9fbb
callq 0x5410
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x9fd5
callq 0x5410
movq %rbp, %rdi
callq 0x1157c
testl %eax, %eax
jle 0xa040
movq %rbp, %rdi
callq 0x11574
testl %eax, %eax
jg 0xa097
leaq 0x270(%rsp), %rax
movq %rax, 0x260(%rsp)
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2e1b8(%rip), %rsi     # 0x381cb
leaq 0x2e1cb(%rip), %rdx     # 0x381e5
callq 0xc85e
leaq 0x3f482(%rip), %rdi     # 0x494a8
movq %rbx, %rsi
callq 0x37146
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
jmp 0xa08d
leaq 0x290(%rsp), %rax
movq %rax, 0x280(%rsp)
leaq 0x280(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2e149(%rip), %rsi     # 0x381ab
leaq 0x2e161(%rip), %rdx     # 0x381ca
callq 0xc85e
leaq 0x3f433(%rip), %rdi     # 0x494a8
movq %rbx, %rsi
callq 0x37146
movq 0x280(%rsp), %rdi
leaq 0x290(%rsp), %rax
cmpq %rax, %rdi
je 0xa097
callq 0x5410
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x38(%rax)
incl %r14d
movq 0x7c0(%rsp), %rdx
movq 0x7c8(%rsp), %rax
subq %rdx, %rax
sarq $0x5, %rax
cmpq %r14, %rax
ja 0x9703
movq 0xd8(%rsp), %r14
subq 0xd0(%rsp), %r14
sarq $0x5, %r14
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %rdi
movaps %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rax, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %r14, %rsi
callq 0xc1f2
movq 0xb0(%rsp), %rax
cmpq %rax, 0xb8(%rsp)
je 0xa2a5
xorl %r14d, %r14d
leaq 0x330(%rsp), %rbp
leaq 0x320(%rsp), %r12
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %r8
movq %r8, %rdx
subq %rdi, %rdx
je 0xa1ba
sarq $0x5, %rdx
movq 0x90(%rsp), %rsi
movl $0x1, %r9d
movl %r14d, %ecx
shlq %cl, %r9
movq %r14, %rbx
shrq $0x6, %rbx
xorl %ecx, %ecx
movl $0x1, %r10d
movq (%rsi), %r11
movq (%r11,%rbx,8), %r11
andq %r9, %r11
cmpq $0x1, %r11
sbbl $-0x1, %ecx
movl %r10d, %r11d
addq $0x28, %rsi
incl %r10d
cmpq %r11, %rdx
ja 0xa169
cmpl $0x2, %ecx
jb 0xa1ba
decq %rdx
movl %ecx, %ecx
cmpq %rcx, %rdx
jbe 0xa1ba
leaq (%rax,%r14,4), %rdx
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xa202
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x78(%rsp)
jmp 0xa21c
movq %rbp, 0x320(%rsp)
movq %r12, %rdi
leaq 0x2e01a(%rip), %rsi     # 0x381e6
leaq 0x2e031(%rip), %rdx     # 0x38204
callq 0xc85e
leaq 0x3f2c9(%rip), %rdi     # 0x494a8
movq %r12, %rsi
callq 0x371c0
movq 0x320(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa282
callq 0x5410
jmp 0xa282
leaq 0x70(%rsp), %rdi
callq 0xdda6
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %r8
cmpq %rdi, %r8
je 0xa282
movl $0x1, %r15d
movl %r14d, %ecx
shlq %cl, %r15
movl $0x1, %r13d
xorl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rax
movq 0xf0(%rsp), %rdi
addq %rax, %rdi
movq 0x90(%rsp), %rcx
movq (%rcx,%rax), %rax
xorl %esi, %esi
testq %r15, (%rax,%rbx,8)
setne %sil
callq 0xc22e
movq 0xd8(%rsp), %rcx
subq 0xd0(%rsp), %rcx
movl %r13d, %eax
sarq $0x5, %rcx
incl %r13d
cmpq %rax, %rcx
ja 0xa235
incl %r14d
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
ja 0xa12a
leaq 0xb0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xc27c
leaq 0x90(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0xc358
movq 0x7c8(%rsp), %rax
subq 0x7c0(%rsp), %rax
cmpq $0x21, %rax
jb 0xa410
movq 0xb8(%rsp), %rsi
subq 0xb0(%rsp), %rsi
shrq $0x2, %rsi
leaq 0x50(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
leaq 0x2def5(%rip), %rcx     # 0x38205
leaq 0x50(%rsp), %rdi
movl $0x5, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa34a
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xa350
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2de9a(%rip), %rsi     # 0x3820b
callq 0x5870
leaq 0x2d0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa3a6
movq %rdx, 0x2c0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2d0(%rsp)
jmp 0xa3ad
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x2c0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3f0d5(%rip), %rdi     # 0x494a8
callq 0x36e72
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
je 0xa3ea
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa3fd
callq 0x5410
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa410
callq 0x5410
movq 0xb8(%rsp), %rax
cmpq 0xb0(%rsp), %rax
jne 0xa474
leaq 0x310(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2dd96(%rip), %rsi     # 0x381cb
leaq 0x2dda9(%rip), %rdx     # 0x381e5
leaq 0x300(%rsp), %rdi
callq 0xc85e
leaq 0x3f058(%rip), %rdi     # 0x494a8
leaq 0x300(%rsp), %rsi
movl $0x1, %edx
callq 0x36ec8
movq 0x300(%rsp), %rdi
cmpq %r14, %rdi
je 0xa474
callq 0x5410
movq 0x3d8(%rsp), %rax
movq %rsp, %rdi
leaq 0x10(%rsp), %rcx
movq %rcx, (%rdi)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
callq 0xc7c8
xorps %xmm0, %xmm0
leaq 0x160(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rcx
subq (%rax), %rcx
movl 0x18(%rax), %eax
leaq (%rax,%rcx,8), %rsi
leaq 0x50(%rsp), %rdx
movl $0x0, (%rdx)
callq 0xbac4
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rdx
subq (%rax), %rdx
shlq $0x3, %rdx
movl 0x18(%rax), %r9d
movq %rdx, %rcx
addq %r9, %rcx
je 0xa576
movq 0x98(%rsp), %rsi
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdi
xorl %ecx, %ecx
movq 0x160(%rsp), %r8
cmpq %rax, %rsi
je 0xa569
movq %rcx, %r9
movl $0x1, %r10d
shlq %cl, %r10
shrq $0x6, %r9
movl (%r8,%rcx,4), %r11d
movl $0x1, %ebx
movq %rax, %r14
movq (%r14), %r15
movq (%r15,%r9,8), %r15
andq %r10, %r15
cmpq $0x1, %r15
sbbl $-0x1, %r11d
movl %ebx, %r15d
addq $0x28, %r14
incl %ebx
cmpq %r15, %rdi
ja 0xa541
movl %r11d, (%r8,%rcx,4)
movl 0x18(%rax), %r9d
incl %ecx
movl %r9d, %r10d
addq %rdx, %r10
cmpq %rcx, %r10
ja 0xa520
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movq $0x0, 0x150(%rsp)
leaq 0x860(%rsp), %rbx
leaq 0x2f93b(%rip), %rsi     # 0x39ed7
movq %rbx, %rdi
callq 0x50e0
testl %eax, %eax
je 0xa5c2
leaq 0xb0(%rsp), %rsi
leaq 0x140(%rsp), %rdx
movq %rbx, %rdi
callq 0x6a35
jmp 0xa5e0
movsd 0x880(%rsp), %xmm0
leaq 0xb0(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x69ac
cmpb $0x1, 0x894(%rsp)
jne 0xad92
movq 0x3e9d3(%rip), %rbx     # 0x48fc8
leaq 0x2dc37(%rip), %rsi     # 0x38233
movl $0x68, %edx
movq %rbx, %rdi
callq 0x54f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq 0x3e9a1(%rip), %rdi     # 0x48fc8
callq 0x5040
movq %rax, %rdi
callq 0x52c0
movq 0x98(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0xb0f2
leaq 0x30(%rsp), %rbp
xorl %r15d, %r15d
movq 0xd0(%rsp), %rsi
movq %r15, %rax
shlq $0x5, %rax
movq 0x8(%rsi,%rax), %rcx
movq %rax, 0x118(%rsp)
addq %rax, %rsi
addq $-0x2, %rcx
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
callq 0x5480
cmpq $0x0, 0x850(%rsp)
je 0xa6af
leaq 0x828(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe5ba
leaq 0x830(%rsp), %rcx
cmpq %rcx, %rax
je 0xad4b
movq 0xd0(%rsp), %rdx
addq 0x118(%rsp), %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2dbce(%rip), %rsi     # 0x3829c
callq 0xb777
movq %rbx, %rdi
leaq 0x2da79(%rip), %rsi     # 0x38156
callq 0x5870
leaq 0x190(%rsp), %rsi
movq %rsi, 0x180(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa716
movq %rdx, 0x180(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x190(%rsp)
jmp 0xa71c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x188(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3ed6a(%rip), %rdi     # 0x494a8
leaq 0x180(%rsp), %rsi
callq 0x36e72
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0xa765
callq 0x5410
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa774
callq 0x5410
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movl %r15d, %edx
leaq 0x368(%rsp), %rcx
leaq 0x20(%rsp), %r8
callq 0x830a
movq 0x90(%rsp), %rax
leaq (%r15,%r15,4), %rcx
movq %rcx, 0x138(%rsp)
movq (%rax,%rcx,8), %rcx
testb $0x1, (%rcx)
jne 0xa7e9
movq 0x98(%rsp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ebx # imm = 0xCCCCCCCD
movq 0x160(%rsp), %r8
subl (%r8), %ebx
jmp 0xa7f4
movq 0x160(%rsp), %r8
movl (%r8), %ebx
movq 0xb0(%rsp), %rsi
movl (%rsi), %r9d
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rcx
subq %rdi, %rcx
sarq $0x2, %rcx
cmpq $0x2, %rcx
movq %r15, 0x110(%rsp)
movl %r9d, 0xe8(%rsp)
jb 0xab37
movl (%rdi), %r14d
movl $0x1, %r12d
xorl %ebp, %ebp
movl $0x1, %r13d
xorl %edx, %edx
movl %r9d, 0x4c(%rsp)
cmpl %r14d, (%rdi,%r13,4)
jne 0xa87d
movl (%rsi,%r13,4), %ecx
movl %ecx, 0x4c(%rsp)
incl %r12d
movq 0x138(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movl %r13d, %r9d
shrl $0x6, %r9d
movq (%rcx,%r9,8), %rcx
btq %r13, %rcx
jae 0xaab7
movl (%r8,%r13,4), %ecx
jmp 0xaad0
leal -0x1(%r13), %ecx
leaq 0x90(%rsp), %rdi
movl %r15d, %esi
leaq 0x120(%rsp), %r8
leaq 0xec(%rsp), %r9
callq 0x9399
movq 0xd0(%rsp), %rax
movq 0x118(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3e707(%rip), %rdi     # 0x48fc8
callq 0x54f0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f5fe(%rip), %rsi     # 0x39ed6
callq 0x54f0
movslq %r14d, %rax
movq 0xd0(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r15, %rdi
callq 0x54f0
movl $0x1, %edx
movq 0x3e6bf(%rip), %rdi     # 0x48fc8
leaq 0x2f5c6(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x3e6a3(%rip), %rdi     # 0x48fc8
callq 0x54f0
movl $0x1, %edx
movq 0x3e692(%rip), %rdi     # 0x48fc8
leaq 0x2f599(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0x3e67f(%rip), %rdi     # 0x48fc8
movl 0xe8(%rsp), %esi
callq 0x57a0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f56f(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq %r14, %rdi
movl 0x4c(%rsp), %esi
callq 0x57a0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f54c(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq %r14, %rdi
movl %r12d, %esi
callq 0x57a0
movl $0x1, %edx
movq 0x3e622(%rip), %rdi     # 0x48fc8
leaq 0x2f529(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0x3e60f(%rip), %rdi     # 0x48fc8
movl %ebx, %esi
callq 0x57a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f504(%rip), %rsi     # 0x39ed6
callq 0x54f0
movslq %ebp, %rax
movq 0xb0(%rsp), %rcx
movl (%rcx,%rax,4), %esi
movq %rbx, %rdi
callq 0x52b0
movl $0x1, %edx
movq 0x3e5cf(%rip), %rdi     # 0x48fc8
leaq 0x2f4d6(%rip), %rsi     # 0x39ed6
callq 0x54f0
movl 0x120(%rsp), %esi
movq 0x3e5b5(%rip), %rdi     # 0x48fc8
callq 0x57a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f4ac(%rip), %rsi     # 0x39ed6
callq 0x54f0
movl 0xec(%rsp), %esi
movq %rbx, %rdi
callq 0x57a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52c0
movq 0xb0(%rsp), %rsi
movl (%rsi,%r13,4), %r9d
movq 0x20(%rsp), %rdi
movl (%rdi,%r13,4), %r14d
movq 0x90(%rsp), %rax
movq 0x138(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movl %r13d, %edx
shrl $0x6, %edx
movq (%rcx,%rdx,8), %rcx
btq %r13, %rcx
movl %r9d, 0xe8(%rsp)
jae 0xaadb
movq 0x160(%rsp), %r8
movl (%r8,%r13,4), %ebx
jmp 0xaafc
movq 0x98(%rsp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
subl (%r8,%r13,4), %ecx
cmpl %ebx, %ecx
cmovll %ecx, %ebx
cmovll %r13d, %ebp
jmp 0xab15
movq 0x98(%rsp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ebx # imm = 0xCCCCCCCD
movq 0x160(%rsp), %r8
subl (%r8,%r13,4), %ebx
movl $0x1, %r12d
movl %r9d, 0x4c(%rsp)
movl %r13d, %edx
movl %r13d, %ebp
movq 0x110(%rsp), %r15
incq %r13
movq 0x28(%rsp), %rcx
subq %rdi, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0xa842
movslq %ebp, %r13
leaq 0x30(%rsp), %rbp
jmp 0xab47
movl $0x1, %r12d
xorl %edx, %edx
movl %r9d, 0x4c(%rsp)
xorl %r13d, %r13d
decl %ecx
leaq 0x90(%rsp), %rdi
movl %r15d, %esi
leaq 0x120(%rsp), %r8
leaq 0xec(%rsp), %r9
callq 0x9399
movq 0xd0(%rsp), %rax
movq 0x118(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3e43f(%rip), %rdi     # 0x48fc8
callq 0x54f0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f336(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0x28(%rsp), %rax
movslq -0x4(%rax), %rax
movq 0xd0(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r15, %rdi
callq 0x54f0
movl $0x1, %edx
movq 0x3e3f1(%rip), %rdi     # 0x48fc8
leaq 0x2f2f8(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x3e3d5(%rip), %rdi     # 0x48fc8
callq 0x54f0
movl $0x1, %edx
movq 0x3e3c4(%rip), %rdi     # 0x48fc8
leaq 0x2f2cb(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0x3e3b1(%rip), %rdi     # 0x48fc8
movl 0xe8(%rsp), %esi
callq 0x57a0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f2a1(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq %r14, %rdi
movl 0x4c(%rsp), %esi
callq 0x57a0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f27e(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq %r14, %rdi
movl %r12d, %esi
callq 0x57a0
movl $0x1, %edx
movq 0x3e354(%rip), %rdi     # 0x48fc8
leaq 0x2f25b(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0x3e341(%rip), %rdi     # 0x48fc8
movl %ebx, %esi
callq 0x57a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f236(%rip), %rsi     # 0x39ed6
callq 0x54f0
movq 0xb0(%rsp), %rax
movl (%rax,%r13,4), %esi
movq %rbx, %rdi
callq 0x52b0
movl $0x1, %edx
movq 0x3e303(%rip), %rdi     # 0x48fc8
leaq 0x2f20a(%rip), %rsi     # 0x39ed6
callq 0x54f0
movl 0x120(%rsp), %esi
movq 0x3e2e9(%rip), %rdi     # 0x48fc8
callq 0x57a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2f1e0(%rip), %rsi     # 0x39ed6
callq 0x54f0
movl 0xec(%rsp), %esi
movq %rbx, %rdi
callq 0x57a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xad43
callq 0x5410
movq 0x110(%rsp), %r15
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xad5f
callq 0x5410
movq 0x98(%rsp), %rax
subq 0x90(%rsp), %rax
incq %r15
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq %r15, %rax
ja 0xa652
jmp 0xb0f2
movq 0x3e22f(%rip), %rbx     # 0x48fc8
leaq 0x2d510(%rip), %rsi     # 0x382b0
movl $0x16, %edx
movq %rbx, %rdi
callq 0x54f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq 0x3e1fd(%rip), %rbx     # 0x48fc8
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52c0
movq 0x98(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0xb0f2
leaq 0x230(%rsp), %r13
leaq 0x50(%rsp), %rbp
leaq 0x2f0d1(%rip), %r14     # 0x39ed6
xorl %r15d, %r15d
movq 0xd0(%rsp), %rsi
movq %r15, %r12
shlq $0x5, %r12
movq 0x8(%rsi,%r12), %rcx
addq %r12, %rsi
addq $-0x2, %rcx
movq %rbp, %rdi
xorl %edx, %edx
callq 0x5480
cmpq $0x0, 0x850(%rsp)
je 0xae59
leaq 0x828(%rsp), %rdi
movq %rbp, %rsi
callq 0xe5ba
leaq 0x830(%rsp), %rcx
cmpq %rcx, %rax
je 0xb0b0
movq 0xd0(%rsp), %rdx
addq %r12, %rdx
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2d454(%rip), %rsi     # 0x382c7
callq 0xb777
movq %rbp, %rdi
leaq 0x2d2d4(%rip), %rsi     # 0x38156
callq 0x5870
movq %r13, 0x220(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xaeb3
movq %rdx, 0x220(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x230(%rsp)
jmp 0xaebb
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x228(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3e5cb(%rip), %rdi     # 0x494a8
leaq 0x220(%rsp), %rsi
callq 0x36e72
movq 0x220(%rsp), %rdi
cmpq %r13, %rdi
je 0xaefc
callq 0x5410
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
leaq 0x20(%rsp), %r13
je 0xaf15
callq 0x5410
xorl %eax, %eax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq %rax, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x140(%rsp), %rsi
movl %r15d, %edx
leaq 0x368(%rsp), %rcx
movq %r13, %r8
leaq 0x120(%rsp), %r9
callq 0x716b
movq 0xb8(%rsp), %rax
cmpq 0xb0(%rsp), %rax
je 0xb082
xorl %r13d, %r13d
movq 0xd0(%rsp), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x54f0
movq 0x20(%rsp), %rax
movslq (%rax,%r13,4), %rax
movq 0xd0(%rsp), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %rbp, %rdi
callq 0x54f0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x54f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x54f0
movq 0xb0(%rsp), %rax
movl (%rax,%r13,4), %esi
movq %rbp, %rdi
callq 0x52b0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x54f0
movq 0x120(%rsp), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbp, %rdi
callq 0x56e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5440
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52c0
incq %r13
movq 0xb8(%rsp), %rax
subq 0xb0(%rsp), %rax
sarq $0x2, %rax
cmpq %r13, %rax
ja 0xaf78
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0xb094
callq 0x5410
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
leaq 0x230(%rsp), %r13
leaq 0x50(%rsp), %rbp
je 0xb0b0
callq 0x5410
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xb0c4
callq 0x5410
movq 0x98(%rsp), %rax
subq 0x90(%rsp), %rax
incq %r15
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq %r15, %rax
ja 0xae08
leaq 0x360(%rsp), %rbx
movq %rbx, %rdi
callq 0x5400
movq (%rbx), %rdi
movq 0x258(%rsp), %rsi
callq 0x51c0
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x37444
leaq 0x2d1bc(%rip), %rcx     # 0x382e4
leaq 0x20(%rsp), %rdi
movl $0xb, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xb163
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0xb16a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2cf8e(%rip), %rsi     # 0x3811b
callq 0x5870
leaq 0x2b0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xb1c2
movq %rdx, 0x2a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2b0(%rsp)
jmp 0xb1c9
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x2a0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3e2b9(%rip), %rdi     # 0x494a8
callq 0x36e72
movq 0x2a0(%rsp), %rdi
cmpq %r15, %rdi
je 0xb206
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0xb215
callq 0x5410
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb228
callq 0x5410
leaq 0x3e279(%rip), %rdi     # 0x494a8
callq 0x36e68
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0xb246
callq 0x5410
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0xb258
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xb26b
callq 0x5410
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xb27a
callq 0x5410
leaq 0xf0(%rsp), %rdi
callq 0xc4b2
leaq 0xd0(%rsp), %rdi
callq 0xc4da
leaq 0x240(%rsp), %rdi
callq 0xc4da
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xb2b3
callq 0x5410
leaq 0x90(%rsp), %rdi
callq 0xc4b2
leaq 0x368(%rsp), %rdi
callq 0xc524
xorl %eax, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x300(%rsp), %rdi
cmpq %r14, %rdi
jne 0xb69e
jmp 0xb6a3
jmp 0xb628
movq %rax, %rbx
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
je 0xb319
callq 0x5410
jmp 0xb319
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xb331
callq 0x5410
jmp 0xb331
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xb699
jmp 0xb628
jmp 0xb4d8
movq %rax, %rbx
movq 0x2a0(%rsp), %rdi
cmpq %r15, %rdi
je 0xb363
callq 0x5410
jmp 0xb363
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0xb377
callq 0x5410
jmp 0xb377
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xb662
jmp 0xb4d8
movq %rax, %rbx
jmp 0xb67e
jmp 0xb628
movq %rax, %rbx
movq 0x340(%rsp), %rdi
cmpq %r14, %rdi
jne 0xb3da
jmp 0xb6f8
jmp 0xb3f0
movq %rax, %rbx
movq 0x2e0(%rsp), %rdi
cmpq %r14, %rdi
je 0xb3c8
callq 0x5410
jmp 0xb3c8
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb6f8
callq 0x5410
jmp 0xb6f8
jmp 0xb3f0
jmp 0xb628
jmp 0xb628
movq %rax, %rbx
jmp 0xb6f8
movq %rax, %rbx
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
jmp 0xb60b
jmp 0xb620
jmp 0xb4d8
jmp 0xb4ce
jmp 0xb4ce
jmp 0xb620
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
jmp 0xb59f
movq %rax, %rbx
movq 0x280(%rsp), %rdi
leaq 0x290(%rsp), %rax
jmp 0xb60b
jmp 0xb587
jmp 0xb620
jmp 0xb57b
jmp 0xb4e5
jmp 0xb582
jmp 0xb573
jmp 0xb634
movq %rax, %rbx
movq 0x220(%rsp), %rdi
cmpq %r13, %rdi
jne 0xb4ac
jmp 0xb4b6
jmp 0xb4b3
jmp 0xb4ce
jmp 0xb62f
movq %rax, %rbx
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0xb4b6
callq 0x5410
jmp 0xb4b6
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
jne 0xb653
jmp 0xb658
movq %rax, %rbx
jmp 0xb658
jmp 0xb4d8
movq %rax, %rbx
jmp 0xb66c
jmp 0xb620
movq %rax, %rbx
movq %rbp, %rdi
jmp 0xb614
jmp 0xb582
jmp 0xb573
jmp 0xb587
jmp 0xb57b
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
jmp 0xb59f
jmp 0xb620
jmp 0xb628
movq %rax, %rbx
movq 0x320(%rsp), %rdi
cmpq %rbp, %rdi
jne 0xb69e
jmp 0xb6a3
jmp 0xb5d5
jmp 0xb620
movq %rax, %rbx
jmp 0xb565
movq %rax, %rbx
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0xb565
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0xb60b
movq %rax, %rbx
jmp 0xb5fb
movq %rax, %rbx
jmp 0xb5e7
jmp 0xb5d5
movq %rax, %rbx
jmp 0xb5bc
movq %rax, %rbx
jmp 0xb5a9
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0xb5a9
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xb5bc
callq 0x5410
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xb5d8
callq 0x5410
jmp 0xb5d8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0xb5e7
callq 0x5410
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb5fb
callq 0x5410
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0xb6bf
callq 0x5410
jmp 0xb6bf
jmp 0xb620
movq %rax, %rbx
jmp 0xb6bf
movq %rax, %rbx
jmp 0xb6a3
jmp 0xb62f
movq %rax, %rbx
jmp 0xb649
movq %rax, %rbx
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0xb649
callq 0x5410
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xb658
callq 0x5410
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xb66c
callq 0x5410
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0xb67e
callq 0x5410
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0xb690
callq 0x5410
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xb6a3
callq 0x5410
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xb6b2
callq 0x5410
leaq 0xf0(%rsp), %rdi
callq 0xc4b2
leaq 0xd0(%rsp), %rdi
callq 0xc4da
leaq 0x240(%rsp), %rdi
callq 0xc4da
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xb6eb
callq 0x5410
leaq 0x90(%rsp), %rdi
callq 0xc4b2
leaq 0x368(%rsp), %rdi
callq 0xc524
movq %rbx, %rdi
callq 0x57d0
nop