// File: CK7[P]abawaca/src/abawaca-build.cpp
// Function: main
int main(int argc, const char* argv[])
{
	size_t	window_size = 2000;
	size_t	max_snps = 15;

	if(argc < 5) {
		usage(argv[0]);
		return -1;
	}

	string	assembly_file;
	string	out_directory;
	string	sam_glob;
	string	this_sample_str;

	for(auto i=1; i<argc; i+=2) {
		if(!strcmp(argv[i], "-f"))
			assembly_file = argv[i+1];
		else if(!strcmp(argv[i], "-o"))
			out_directory = argv[i+1];
		else if(!strcmp(argv[i], "-s"))
			sam_glob = argv[i+1];
		else if(!strcmp(argv[i], "-c"))
			this_sample_str = argv[i+1];
		else {
			cerr << endl << "Unknown option " << argv[i] << endl << endl;
			return -1;
		}
	}

	if(assembly_file.size() == 0) {
		cerr << endl << "Error: assembly file was not specified (-f)" << endl << endl;
		return -1;
	}
	if(out_directory.size() == 0) {
		cerr << endl << "Error: output directory was not specified (-o)" << endl << endl;
		return -1;
	}
	if(sam_glob.size() == 0) {
		cerr << endl << "Error: glob path for sam files was not specified (-s)" << endl << endl;
		return -1;
	}
	if(this_sample_str.size() == 0) {
		cerr << endl << "Error: path for sam file for the assembly\'s reads was not specified (-f)" << endl << endl;
		return -1;
	}

	cerr << time_since_epoch() << "Reading assembly file (" << assembly_file << ")" << endl;
	map<string, Scaf*>			scafs;
	Bio::SeqIORead_fasta<Bio::DNASequence>  in(assembly_file);
	Bio::DNASequence*                       seq = NULL;
	size_t ndps = 0;
	while((seq = in.next_seq()) != NULL) {
		Scaf*	s = new Scaf(*seq, window_size);
 		scafs.insert(pair<string, Scaf*>(seq->display_id(), s));
		ndps += s->ndps();
	}

	char names_file[1024], lrn_file[1024], info_file[1024], links_file[1024];

	sprintf(names_file, "%s/abawaca.names", out_directory.c_str());
	sprintf(lrn_file, "%s/abawaca.lrn", out_directory.c_str());
	sprintf(info_file, "%s/abawaca.info", out_directory.c_str());
	sprintf(links_file, "%s/abawaca.links", out_directory.c_str());

	cerr << time_since_epoch() << "Creating .lrn (" << lrn_file << ") and .names (" << names_file << ") files" << endl;

	if(!directory_exists(out_directory.c_str())) {
		char	cmd[1024];
		sprintf(cmd, "mkdir %s", out_directory.c_str());
		system(cmd);
	}

	if(sam_glob.size() > 0) {
		vector<string>	sam_files = glob(sam_glob);
		for(auto vit=sam_files.begin(); vit!=sam_files.end(); vit++) {
			cerr  << time_since_epoch() << "Reading SAM file " << *vit << endl;
			dimension2index.insert(pair<string, size_t>(*vit, dimension_order.size()));
			dimension_order.push_back(*vit);

			size_t dimension = dimension2index[*vit];

			if(this_sample_str == *vit)
				this_sample = dimension;

			size_t 					insert_size = calc_insert_size(*vit);
			cerr  << time_since_epoch() << "Insert size is " << insert_size << endl;

			Bio::SAMReader  			reader(*vit);
			unordered_map<string, Bio::ReadMappingPtr>	reads;
			Links					links(insert_size, scafs);
			while(reader.good()) {
				Bio::ReadMappingPtr mapping(reader.next_mapping());
				if(mapping == NULL) {
					break;
				}

				if(dimension == this_sample) {
					string insert_name = mapping->read_name();
					size_t	p = insert_name.find_last_of('/');
					if(p != string::npos)
						insert_name.resize(p);
					auto rit = reads.find(insert_name);
					if(rit == reads.end()) {
						reads.insert(pair<string, Bio::ReadMappingPtr>(insert_name, mapping));
					}
					else {
						Bio::ReadMappingPtr mapping_other = rit->second;
						reads.erase(rit);
						links.add_pair(mapping, mapping_other);
					}
				}
				if(mapping->unmapped() || (mapping->num_snps() > max_snps) || mapping->multiple_hits()) {
					continue;
				}
				auto mit = scafs.find(mapping->ref_name());
				if(mit != scafs.end())
					mit->second->add_mapped_read(*mapping, dimension);
			}
			if(dimension == this_sample) {
				ofstream	oslinks(links_file);
				links.write_connections(oslinks);
				oslinks.close();
			}
		}
	}

	FILE* fout = fopen(names_file, "w");
	FILE* flrn = fopen(lrn_file, "w");
	FILE* finfo = fopen(info_file, "w");

	if(fout == NULL) {
		cerr << "Could not write to " << names_file << endl << endl;
		return -1;
	}
	if(flrn == NULL) {
		cerr << "Could not write to " << lrn_file << endl << endl;
		return -1;
	}
	if(finfo == NULL) {
		cerr << "Could not write to " << info_file << endl << endl;
		return -1;
	}

	fprintf(fout, "%c %lu\n", '%', ndps);
	fprintf(flrn, "%c %lu\n", '%', ndps);

	// We do not output the frequency of A/T
	fprintf(flrn, "%c %lu\n", '%', dimension_order.size());
	fprintf(flrn, "%c 9", '%');
	for(auto it=dimension_order.begin(); it!=dimension_order.end(); it++)
		if(*it != string("A"))
			fprintf(flrn, "\t1");
	fprintf(flrn, "\n");

	fprintf(flrn, "%c Key", '%');
	for(auto it=dimension_order.begin(); it!=dimension_order.end(); it++)
		if(*it != string("A"))
			fprintf(flrn, "\t%s", it->c_str());
	fprintf(flrn, "\n");

	int i=0;
	for(auto it=scafs.begin(); it!=scafs.end(); it++) {
		fprintf(finfo, "%s\t%lu\t%.3lf\t%.3lf\t%lu\n", it->second->get_display_id().c_str(), it->second->get_seq().size(), int(1000.0*it->second->cvg())/1000.0, int(1000.0*it->second->gc())/1000.0, it->second->Ns());
		for(auto sit=it->second->begin(); sit!=it->second->end(); sit++) {
			fprintf(fout, "%d\t%s\t%s\n", ++i, (*sit)->get_display_id().c_str(), (*sit)->get_desc().c_str());
			fprintf(flrn, "%d", i);
			for(auto mit=dimension_order.begin(); mit!=dimension_order.end(); mit++) {
				if(*mit != string("A"))
					fprintf(flrn, "\t%.3lf", int(1000.0*(*sit)->get_dimension(*mit))/1000.0);
			}
			fprintf(flrn, "\n");
		}
	}

	fclose(fout);
	fclose(flrn);
	fclose(finfo);

	cerr << time_since_epoch() << "Predicting genes and SCGs" << endl;
	string scg_file = prepare_scgs(assembly_file, out_directory);
	char data[2048];
	sprintf(data, "%s/data.txt", out_directory.c_str());
	FILE* fp = fopen(data, "w");

	if(fp == NULL) {
		cerr << "Could not write to " << data << endl << endl;
		return -1;
	}

	fprintf(fp, "SCG\t%s\n", scg_file.c_str());
	fprintf(fp, "Links\t%s\n", links_file);
	fprintf(fp, "Info\t%s\n", info_file);
	fprintf(fp, "Names\t%s\n", names_file);
	fprintf(fp, "Lrn\t%s\n", lrn_file);
	fprintf(fp, "Assembly\t%s\n", assembly_file.c_str());
	fclose(fp);

	cerr << time_since_epoch() << "Finished successfully" << endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2810, %rsp           # imm = 0x2810
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x7d0, -0x18(%rbp)     # imm = 0x7D0
movq $0xf, -0x20(%rbp)
cmpl $0x5, -0x8(%rbp)
jge 0xdd77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xd660
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xff0b
leaq -0x40(%rbp), %rdi
callq 0x4490
leaq -0x60(%rbp), %rdi
callq 0x4490
leaq -0x80(%rbp), %rdi
callq 0x4490
leaq -0xa0(%rbp), %rdi
callq 0x4490
movl $0x1, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xdf90
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x14a0e(%rip), %rsi     # 0x227db
callq 0x44a0
cmpl $0x0, %eax
jne 0xde0e
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq -0x40(%rbp), %rdi
callq 0x4460
jmp 0xddf2
jmp 0xdf7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xfee2
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x149ba(%rip), %rsi     # 0x227de
callq 0x44a0
cmpl $0x0, %eax
jne 0xde4e
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq -0x60(%rbp), %rdi
callq 0x4460
jmp 0xde49
jmp 0xdf78
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1497d(%rip), %rsi     # 0x227e1
callq 0x44a0
cmpl $0x0, %eax
jne 0xde8e
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq -0x80(%rbp), %rdi
callq 0x4460
jmp 0xde89
jmp 0xdf76
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x14940(%rip), %rsi     # 0x227e4
callq 0x44a0
cmpl $0x0, %eax
jne 0xded1
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x4460
jmp 0xdecc
jmp 0xdf74
movq 0x24118(%rip), %rdi     # 0x31ff0
movq 0x240d9(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x2480(%rbp)
jmp 0xdeed
movq -0x2480(%rbp), %rdi
leaq 0x148ec(%rip), %rsi     # 0x227e7
callq 0x42f0
movq %rax, -0x2488(%rbp)
jmp 0xdf09
movq -0x2488(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x42f0
movq %rax, -0x2490(%rbp)
jmp 0xdf2d
movq -0x2490(%rbp), %rdi
movq 0x2407d(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x2498(%rbp)
jmp 0xdf49
movq -0x2498(%rbp), %rdi
movq 0x24061(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xdf5e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfeb9
jmp 0xdf76
jmp 0xdf78
jmp 0xdf7a
jmp 0xdf7c
movl -0xa4(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xa4(%rbp)
jmp 0xdda8
leaq -0x40(%rbp), %rdi
callq 0x4210
cmpq $0x0, %rax
jne 0xe01e
movq 0x2404a(%rip), %rdi     # 0x31ff0
movq 0x2400b(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24a0(%rbp)
jmp 0xdfbb
movq -0x24a0(%rbp), %rdi
leaq 0x1482e(%rip), %rsi     # 0x227f7
callq 0x42f0
movq %rax, -0x24a8(%rbp)
jmp 0xdfd7
movq -0x24a8(%rbp), %rdi
movq 0x23fd3(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24b0(%rbp)
jmp 0xdff3
movq -0x24b0(%rbp), %rdi
movq 0x23fb7(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe008
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfeb9
leaq -0x60(%rbp), %rdi
callq 0x4210
cmpq $0x0, %rax
jne 0xe0ac
movq 0x23fbc(%rip), %rdi     # 0x31ff0
movq 0x23f7d(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24b8(%rbp)
jmp 0xe049
movq -0x24b8(%rbp), %rdi
leaq 0x147cc(%rip), %rsi     # 0x22823
callq 0x42f0
movq %rax, -0x24c0(%rbp)
jmp 0xe065
movq -0x24c0(%rbp), %rdi
movq 0x23f45(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24c8(%rbp)
jmp 0xe081
movq -0x24c8(%rbp), %rdi
movq 0x23f29(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe096
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfeb9
leaq -0x80(%rbp), %rdi
callq 0x4210
cmpq $0x0, %rax
jne 0xe13a
movq 0x23f2e(%rip), %rdi     # 0x31ff0
movq 0x23eef(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24d0(%rbp)
jmp 0xe0d7
movq -0x24d0(%rbp), %rdi
leaq 0x1476d(%rip), %rsi     # 0x22852
callq 0x42f0
movq %rax, -0x24d8(%rbp)
jmp 0xe0f3
movq -0x24d8(%rbp), %rdi
movq 0x23eb7(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24e0(%rbp)
jmp 0xe10f
movq -0x24e0(%rbp), %rdi
movq 0x23e9b(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe124
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfeb9
leaq -0xa0(%rbp), %rdi
callq 0x4210
cmpq $0x0, %rax
jne 0xe1cb
movq 0x23e9d(%rip), %rdi     # 0x31ff0
movq 0x23e5e(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24e8(%rbp)
jmp 0xe168
movq -0x24e8(%rbp), %rdi
leaq 0x14712(%rip), %rsi     # 0x22888
callq 0x42f0
movq %rax, -0x24f0(%rbp)
jmp 0xe184
movq -0x24f0(%rbp), %rdi
movq 0x23e26(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x24f8(%rbp)
jmp 0xe1a0
movq -0x24f8(%rbp), %rdi
movq 0x23e0a(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe1b5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfeb9
leaq -0xd8(%rbp), %rdi
callq 0x1e960
jmp 0xe1d9
movq 0x23e10(%rip), %rdi     # 0x31ff0
leaq -0xd8(%rbp), %rsi
callq 0x4290
movq %rax, -0x2500(%rbp)
jmp 0xe1f5
movq -0x2500(%rbp), %rdi
leaq 0x146ce(%rip), %rsi     # 0x228d1
callq 0x42f0
movq %rax, -0x2508(%rbp)
jmp 0xe211
movq -0x2508(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4290
movq %rax, -0x2510(%rbp)
jmp 0xe22a
movq -0x2510(%rbp), %rdi
leaq 0x14110(%rip), %rsi     # 0x22348
callq 0x42f0
movq %rax, -0x2518(%rbp)
jmp 0xe246
movq -0x2518(%rbp), %rdi
movq 0x23d64(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe25b
leaq -0xd8(%rbp), %rdi
callq 0x41c0
leaq -0x108(%rbp), %rdi
callq 0x11860
leaq -0x178(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4140
jmp 0xe285
leaq -0x158(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x11880
jmp 0xe29a
leaq -0x178(%rbp), %rdi
callq 0x41c0
movq $0x0, -0x180(%rbp)
movq $0x0, -0x188(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x11920
movq %rax, -0x2520(%rbp)
jmp 0xe2d1
movq -0x2520(%rbp), %rax
movq %rax, -0x180(%rbp)
cmpq $0x0, %rax
je 0xe485
movl $0x80, %edi
callq 0x4310
movq %rax, -0x2528(%rbp)
jmp 0xe2fc
movq -0x2528(%rbp), %rdi
movq -0x180(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xbc50
jmp 0xe315
movq -0x2528(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x180(%rbp), %rdi
callq 0x10720
movq %rax, -0x2530(%rbp)
jmp 0xe338
movq -0x2530(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
leaq -0x190(%rbp), %rdx
callq 0x12100
jmp 0xe354
leaq -0x108(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x120c0
movb %dl, -0x2539(%rbp)
movq %rax, -0x2538(%rbp)
jmp 0xe376
movb -0x2539(%rbp), %al
movq -0x2538(%rbp), %rcx
movq %rcx, -0x1c8(%rbp)
movb %al, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x12140
movq -0x190(%rbp), %rdi
callq 0x12160
movq %rax, -0x2548(%rbp)
jmp 0xe3b1
movq -0x2548(%rbp), %rax
addq -0x188(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0xe2bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x41c0
jmp 0xfee2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xfeab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x41c0
jmp 0xfeab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xfe9f
movq -0x2528(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
callq 0x42c0
jmp 0xfe9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x12140
jmp 0xfe9f
leaq -0x60(%rbp), %rdi
movq %rdi, -0x2558(%rbp)
callq 0x4130
movq %rax, %rdx
leaq 0x1444a(%rip), %rsi     # 0x228e9
xorl %eax, %eax
movb %al, -0x2549(%rbp)
leaq -0x5d0(%rbp), %rdi
callq 0x4080
movq -0x2558(%rbp), %rdi
callq 0x4130
movq %rax, %rdx
movb -0x2549(%rbp), %al
leaq 0x1442b(%rip), %rsi     # 0x228fa
leaq -0x9d0(%rbp), %rdi
callq 0x4080
movq -0x2558(%rbp), %rdi
callq 0x4130
movq %rax, %rdx
movb -0x2549(%rbp), %al
leaq 0x14412(%rip), %rsi     # 0x22909
leaq -0xdd0(%rbp), %rdi
callq 0x4080
movq -0x2558(%rbp), %rdi
callq 0x4130
movq %rax, %rdx
movb -0x2549(%rbp), %al
leaq 0x143fa(%rip), %rsi     # 0x22919
leaq -0x11d0(%rbp), %rdi
callq 0x4080
leaq -0x11f0(%rbp), %rdi
callq 0x1e960
jmp 0xe539
movq 0x23ab0(%rip), %rdi     # 0x31ff0
leaq -0x11f0(%rbp), %rsi
callq 0x4290
movq %rax, -0x2560(%rbp)
jmp 0xe555
movq -0x2560(%rbp), %rdi
leaq 0x143c7(%rip), %rsi     # 0x2292a
callq 0x42f0
movq %rax, -0x2568(%rbp)
jmp 0xe571
movq -0x2568(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
callq 0x42f0
movq %rax, -0x2570(%rbp)
jmp 0xe58d
movq -0x2570(%rbp), %rdi
leaq 0x1439f(%rip), %rsi     # 0x2293a
callq 0x42f0
movq %rax, -0x2578(%rbp)
jmp 0xe5a9
movq -0x2578(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0x42f0
movq %rax, -0x2580(%rbp)
jmp 0xe5c5
movq -0x2580(%rbp), %rdi
leaq 0x14376(%rip), %rsi     # 0x22949
callq 0x42f0
movq %rax, -0x2588(%rbp)
jmp 0xe5e1
movq -0x2588(%rbp), %rdi
movq 0x239c9(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe5f6
leaq -0x11f0(%rbp), %rdi
callq 0x41c0
leaq -0x60(%rbp), %rdi
callq 0x4130
movq %rax, %rdi
callq 0x1f1a0
movl %eax, -0x258c(%rbp)
jmp 0xe61b
movl -0x258c(%rbp), %eax
cmpl $0x0, %eax
jne 0xe681
leaq -0x60(%rbp), %rdi
callq 0x4130
movq %rax, %rdx
leaq 0x14318(%rip), %rsi     # 0x22951
xorl %eax, %eax
leaq -0x15f0(%rbp), %rdi
movq %rdi, -0x2598(%rbp)
callq 0x4080
movq -0x2598(%rbp), %rdi
callq 0x4250
jmp 0xe65c
jmp 0xe681
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x11f0(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
leaq -0x80(%rbp), %rdi
callq 0x4210
cmpq $0x0, %rax
jbe 0xf079
leaq -0x1608(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1f660
jmp 0xe6a6
leaq -0x1608(%rbp), %rdi
callq 0x12180
movq %rax, -0x1610(%rbp)
leaq -0x1608(%rbp), %rdi
callq 0x121f0
movq %rax, -0x1618(%rbp)
leaq -0x1610(%rbp), %rdi
leaq -0x1618(%rbp), %rsi
callq 0x121b0
testb $0x1, %al
jne 0xe6e8
jmp 0xf05a
leaq -0x1638(%rbp), %rdi
callq 0x1e960
jmp 0xe6f6
movq 0x238f3(%rip), %rdi     # 0x31ff0
leaq -0x1638(%rbp), %rsi
callq 0x4290
movq %rax, -0x25a0(%rbp)
jmp 0xe712
movq -0x25a0(%rbp), %rdi
leaq 0x1423a(%rip), %rsi     # 0x2295a
callq 0x42f0
movq %rax, -0x25a8(%rbp)
jmp 0xe72e
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq -0x25a8(%rbp), %rdi
movq %rax, %rsi
callq 0x4290
movq %rax, -0x25b0(%rbp)
jmp 0xe752
movq -0x25b0(%rbp), %rdi
movq 0x23858(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe767
leaq -0x1638(%rbp), %rdi
callq 0x41c0
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, -0x25b8(%rbp)
leaq 0x23c53(%rip), %rdi     # 0x323e0
callq 0x6640
movq -0x25b8(%rbp), %rsi
movq %rax, -0x1668(%rbp)
leaq -0x1660(%rbp), %rdi
leaq -0x1668(%rbp), %rdx
callq 0x12240
jmp 0xe7b5
leaq 0x23bf4(%rip), %rdi     # 0x323b0
leaq -0x1660(%rbp), %rsi
callq 0x10030
movb %dl, -0x25c1(%rbp)
movq %rax, -0x25c0(%rbp)
jmp 0xe7d7
movb -0x25c1(%rbp), %al
movq -0x25c0(%rbp), %rcx
movq %rcx, -0x1678(%rbp)
movb %al, -0x1670(%rbp)
leaq -0x1660(%rbp), %rdi
callq 0x100b0
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq 0x23bcd(%rip), %rdi     # 0x323e0
callq 0x100d0
jmp 0xe81a
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq 0x23b80(%rip), %rdi     # 0x323b0
callq 0x12280
movq %rax, -0x25d0(%rbp)
jmp 0xe83e
movq -0x25d0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1680(%rbp)
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x12360
testb $0x1, %al
jne 0xe870
jmp 0xe8dd
movq -0x1680(%rbp), %rax
movq %rax, 0x23b7a(%rip)     # 0x323f8
jmp 0xe8dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xf068
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1638(%rbp), %rdi
callq 0x41c0
jmp 0xf068
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1660(%rbp), %rdi
callq 0x100b0
jmp 0xf068
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq -0x16a8(%rbp), %rdi
callq 0x4140
jmp 0xe8fa
leaq -0x16a8(%rbp), %rdi
callq 0xd6d0
movq %rax, -0x25d8(%rbp)
jmp 0xe90f
leaq -0x16a8(%rbp), %rdi
callq 0x41c0
movq -0x25d8(%rbp), %rax
movq %rax, -0x1688(%rbp)
leaq -0x16c8(%rbp), %rdi
callq 0x1e960
jmp 0xe937
movq 0x236b2(%rip), %rdi     # 0x31ff0
leaq -0x16c8(%rbp), %rsi
callq 0x4290
movq %rax, -0x25e0(%rbp)
jmp 0xe953
movq -0x25e0(%rbp), %rdi
leaq 0x1400b(%rip), %rsi     # 0x2296c
callq 0x42f0
movq %rax, -0x25e8(%rbp)
jmp 0xe96f
movq -0x25e8(%rbp), %rdi
movq -0x1688(%rbp), %rsi
callq 0x40d0
movq %rax, -0x25f0(%rbp)
jmp 0xe98b
movq -0x25f0(%rbp), %rdi
movq 0x2361f(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xe9a0
leaq -0x16c8(%rbp), %rdi
callq 0x41c0
leaq -0x1610(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq -0x1728(%rbp), %rdi
callq 0x4140
jmp 0xe9c9
leaq -0x1708(%rbp), %rdi
leaq -0x1728(%rbp), %rsi
callq 0x116c0
jmp 0xe9de
leaq -0x1728(%rbp), %rdi
callq 0x41c0
leaq -0x1760(%rbp), %rdi
callq 0x123f0
movq -0x1688(%rbp), %rsi
leaq -0x17a0(%rbp), %rdi
leaq -0x108(%rbp), %rdx
callq 0x12410
jmp 0xea12
jmp 0xea14
leaq -0x1708(%rbp), %rdi
callq 0x9ee0
movb %al, -0x25f1(%rbp)
jmp 0xea28
movb -0x25f1(%rbp), %al
testb $0x1, %al
jne 0xea37
jmp 0xef7b
leaq -0x1708(%rbp), %rdi
callq 0x8b30
movq %rax, -0x2600(%rbp)
jmp 0xea4c
movq -0x2600(%rbp), %rsi
leaq -0x17b0(%rbp), %rdi
callq 0x11760
jmp 0xea61
leaq -0x17b0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11790
testb $0x1, %al
jne 0xea7a
jmp 0xeb20
movl $0xb, -0xb8(%rbp)
jmp 0xef34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x16a8(%rbp), %rdi
callq 0x41c0
jmp 0xf068
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x16c8(%rbp), %rdi
callq 0x41c0
jmp 0xf068
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1728(%rbp), %rdi
callq 0x41c0
jmp 0xf068
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xf040
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xf034
movq -0x1680(%rbp), %rax
cmpq 0x238ca(%rip), %rax     # 0x323f8
jne 0xedf1
leaq -0x17b0(%rbp), %rdi
callq 0x111b0
movq %rax, %rdi
callq 0x12450
movq %rax, -0x2608(%rbp)
jmp 0xeb51
movq -0x2608(%rbp), %rsi
leaq -0x17d0(%rbp), %rdi
callq 0x4140
jmp 0xeb66
leaq -0x17d0(%rbp), %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x4630
movq %rax, -0x17d8(%rbp)
cmpq $-0x1, -0x17d8(%rbp)
je 0xebd4
movq -0x17d8(%rbp), %rsi
leaq -0x17d0(%rbp), %rdi
callq 0x4480
jmp 0xeba4
jmp 0xebd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xef6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xede0
leaq -0x1760(%rbp), %rdi
leaq -0x17d0(%rbp), %rsi
callq 0x12470
movq %rax, -0x2610(%rbp)
jmp 0xebf0
movq -0x2610(%rbp), %rax
movq %rax, -0x17e0(%rbp)
leaq -0x1760(%rbp), %rdi
callq 0x124d0
movq %rax, -0x17e8(%rbp)
leaq -0x17e0(%rbp), %rdi
leaq -0x17e8(%rbp), %rsi
callq 0x124a0
testb $0x1, %al
jne 0xec2d
jmp 0xecb9
leaq -0x1818(%rbp), %rdi
leaq -0x17d0(%rbp), %rsi
leaq -0x17b0(%rbp), %rdx
callq 0x12540
jmp 0xec49
leaq -0x1760(%rbp), %rdi
leaq -0x1818(%rbp), %rsi
callq 0x12500
movb %dl, -0x2619(%rbp)
movq %rax, -0x2618(%rbp)
jmp 0xec6b
movb -0x2619(%rbp), %al
movq -0x2618(%rbp), %rcx
movq %rcx, -0x1828(%rbp)
movb %al, -0x1820(%rbp)
leaq -0x1818(%rbp), %rdi
callq 0x12580
jmp 0xedd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1818(%rbp), %rdi
callq 0x12580
jmp 0xede0
leaq -0x17e0(%rbp), %rdi
callq 0x125b0
movq %rax, %rsi
addq $0x20, %rsi
leaq -0x1838(%rbp), %rdi
callq 0x125e0
movq -0x17e0(%rbp), %rax
movq %rax, -0x1840(%rbp)
movq -0x1840(%rbp), %rsi
leaq -0x1760(%rbp), %rdi
callq 0x12610
movq %rax, -0x2628(%rbp)
jmp 0xed02
movq -0x2628(%rbp), %rax
movq %rax, -0x1848(%rbp)
leaq -0x1858(%rbp), %rdi
movq %rdi, -0x2638(%rbp)
leaq -0x17b0(%rbp), %rsi
callq 0x125e0
leaq -0x1868(%rbp), %rdi
movq %rdi, -0x2630(%rbp)
leaq -0x1838(%rbp), %rsi
callq 0x125e0
movq -0x2638(%rbp), %rsi
movq -0x2630(%rbp), %rdx
leaq -0x17a0(%rbp), %rdi
callq 0xc9e0
jmp 0xed60
leaq -0x1868(%rbp), %rdi
callq 0x11840
leaq -0x1858(%rbp), %rdi
callq 0x11840
leaq -0x1838(%rbp), %rdi
callq 0x11840
jmp 0xedd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xedc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1868(%rbp), %rdi
callq 0x11840
leaq -0x1858(%rbp), %rdi
callq 0x11840
leaq -0x1838(%rbp), %rdi
callq 0x11840
jmp 0xede0
leaq -0x17d0(%rbp), %rdi
callq 0x41c0
jmp 0xedf1
leaq -0x17d0(%rbp), %rdi
callq 0x41c0
jmp 0xef6a
leaq -0x17b0(%rbp), %rdi
callq 0x111b0
movq %rax, %rdi
callq 0x111d0
movb %al, -0x2639(%rbp)
jmp 0xee0d
movb -0x2639(%rbp), %al
testb $0x1, %al
jne 0xee6b
jmp 0xee19
leaq -0x17b0(%rbp), %rdi
callq 0x111b0
movq %rax, %rdi
callq 0x12650
movq %rax, -0x2648(%rbp)
jmp 0xee36
movq -0x2648(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0xee6b
leaq -0x17b0(%rbp), %rdi
callq 0x111b0
movq %rax, %rdi
callq 0x12680
movb %al, -0x2649(%rbp)
jmp 0xee5f
movb -0x2649(%rbp), %al
testb $0x1, %al
jne 0xee6b
jmp 0xee7a
movl $0xa, -0xb8(%rbp)
jmp 0xef34
leaq -0x17b0(%rbp), %rdi
callq 0x111b0
movq %rax, %rdi
callq 0x11250
movq %rax, -0x2658(%rbp)
jmp 0xee97
movq -0x2658(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x126b0
movq %rax, -0x2660(%rbp)
jmp 0xeeb3
movq -0x2660(%rbp), %rax
movq %rax, -0x1870(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x12710
movq %rax, -0x1878(%rbp)
leaq -0x1870(%rbp), %rdi
leaq -0x1878(%rbp), %rsi
callq 0x126e0
testb $0x1, %al
jne 0xeeed
jmp 0xef2a
leaq -0x1870(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rax
movq %rax, -0x2668(%rbp)
leaq -0x17b0(%rbp), %rdi
callq 0x12760
movq -0x2668(%rbp), %rdi
movq %rax, %rsi
movq -0x1680(%rbp), %rdx
callq 0xc3f0
jmp 0xef28
jmp 0xef2a
movl $0x0, -0xb8(%rbp)
leaq -0x17b0(%rbp), %rdi
callq 0x11840
movl -0xb8(%rbp), %eax
movl %eax, -0x266c(%rbp)
testl %eax, %eax
je 0xef65
jmp 0xef52
movl -0x266c(%rbp), %eax
subl $0xa, %eax
je 0xea14
jmp 0xef63
jmp 0xef7b
jmp 0xea14
leaq -0x17b0(%rbp), %rdi
callq 0x11840
jmp 0xf034
movq -0x1680(%rbp), %rax
cmpq 0x2346f(%rip), %rax     # 0x323f8
jne 0xeff6
leaq -0x1a78(%rbp), %rdi
leaq -0x11d0(%rbp), %rsi
movl $0x10, %edx
callq 0x4380
jmp 0xefa5
leaq -0x17a0(%rbp), %rdi
leaq -0x1a78(%rbp), %rsi
callq 0xc6f0
jmp 0xefba
leaq -0x1a78(%rbp), %rdi
callq 0x44b0
jmp 0xefc8
leaq -0x1a78(%rbp), %rdi
callq 0x44e0
jmp 0xeff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1a78(%rbp), %rdi
callq 0x44e0
jmp 0xf034
leaq -0x17a0(%rbp), %rdi
callq 0xc540
leaq -0x1760(%rbp), %rdi
callq 0x12790
leaq -0x1708(%rbp), %rdi
callq 0x9f90
leaq -0x1610(%rbp), %rdi
xorl %esi, %esi
callq 0x127b0
movq %rax, -0x1a80(%rbp)
jmp 0xe6b9
leaq -0x17a0(%rbp), %rdi
callq 0xc540
leaq -0x1760(%rbp), %rdi
callq 0x12790
leaq -0x1708(%rbp), %rdi
callq 0x9f90
jmp 0xf068
leaq -0x1608(%rbp), %rdi
callq 0x6660
jmp 0xf079
leaq -0x1608(%rbp), %rdi
callq 0x6660
jmp 0xfe9f
leaq 0x138fc(%rip), %rsi     # 0x2297c
leaq -0x5d0(%rbp), %rdi
callq 0x43b0
movq %rax, -0x2678(%rbp)
jmp 0xf095
movq -0x2678(%rbp), %rax
movq %rax, -0x1a88(%rbp)
leaq 0x138d2(%rip), %rsi     # 0x2297c
leaq -0x9d0(%rbp), %rdi
callq 0x43b0
movq %rax, -0x2680(%rbp)
jmp 0xf0bf
movq -0x2680(%rbp), %rax
movq %rax, -0x1a90(%rbp)
leaq 0x138a8(%rip), %rsi     # 0x2297c
leaq -0xdd0(%rbp), %rdi
callq 0x43b0
movq %rax, -0x2688(%rbp)
jmp 0xf0e9
movq -0x2688(%rbp), %rax
movq %rax, -0x1a98(%rbp)
cmpq $0x0, -0x1a88(%rbp)
jne 0xf180
movq 0x22ee8(%rip), %rdi     # 0x31ff0
leaq 0x1386f(%rip), %rsi     # 0x2297e
callq 0x42f0
movq %rax, -0x2690(%rbp)
jmp 0xf11d
movq -0x2690(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0x42f0
movq %rax, -0x2698(%rbp)
jmp 0xf139
movq -0x2698(%rbp), %rdi
movq 0x22e71(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x26a0(%rbp)
jmp 0xf155
movq -0x26a0(%rbp), %rdi
movq 0x22e55(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xf16a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfe85
cmpq $0x0, -0x1a90(%rbp)
jne 0xf209
movq 0x22e5f(%rip), %rdi     # 0x31ff0
leaq 0x137e6(%rip), %rsi     # 0x2297e
callq 0x42f0
movq %rax, -0x26a8(%rbp)
jmp 0xf1a6
movq -0x26a8(%rbp), %rdi
leaq -0x9d0(%rbp), %rsi
callq 0x42f0
movq %rax, -0x26b0(%rbp)
jmp 0xf1c2
movq -0x26b0(%rbp), %rdi
movq 0x22de8(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x26b8(%rbp)
jmp 0xf1de
movq -0x26b8(%rbp), %rdi
movq 0x22dcc(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xf1f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfe85
cmpq $0x0, -0x1a98(%rbp)
jne 0xf292
movq 0x22dd6(%rip), %rdi     # 0x31ff0
leaq 0x1375d(%rip), %rsi     # 0x2297e
callq 0x42f0
movq %rax, -0x26c0(%rbp)
jmp 0xf22f
movq -0x26c0(%rbp), %rdi
leaq -0xdd0(%rbp), %rsi
callq 0x42f0
movq %rax, -0x26c8(%rbp)
jmp 0xf24b
movq -0x26c8(%rbp), %rdi
movq 0x22d5f(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x26d0(%rbp)
jmp 0xf267
movq -0x26d0(%rbp), %rdi
movq 0x22d43(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xf27c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfe85
movq -0x1a88(%rbp), %rdi
movq -0x188(%rbp), %rcx
leaq 0x136eb(%rip), %rsi     # 0x22992
movl $0x25, %edx
movb $0x0, %al
callq 0x44c0
movq -0x1a90(%rbp), %rdi
movq -0x188(%rbp), %rcx
leaq 0x136ca(%rip), %rsi     # 0x22992
movl $0x25, %edx
movb $0x0, %al
callq 0x44c0
movq -0x1a90(%rbp), %rax
movq %rax, -0x26d8(%rbp)
leaq 0x230f7(%rip), %rdi     # 0x323e0
callq 0x6640
movq -0x26d8(%rbp), %rdi
movq %rax, %rcx
leaq 0x13693(%rip), %rsi     # 0x22992
movl $0x25, %edx
movb $0x0, %al
callq 0x44c0
movq -0x1a90(%rbp), %rdi
leaq 0x13681(%rip), %rsi     # 0x2299a
movl $0x25, %edx
movb $0x0, %al
callq 0x44c0
leaq 0x230b4(%rip), %rdi     # 0x323e0
callq 0x12180
movq %rax, -0x1aa0(%rbp)
leaq 0x230a1(%rip), %rdi     # 0x323e0
callq 0x121f0
movq %rax, -0x1aa8(%rbp)
leaq -0x1aa0(%rbp), %rdi
leaq -0x1aa8(%rbp), %rsi
callq 0x121b0
testb $0x1, %al
jne 0xf367
jmp 0xf43c
leaq -0x1aa0(%rbp), %rdi
callq 0x12220
movq %rax, -0x26e8(%rbp)
leaq -0x1ac9(%rbp), %rdi
movq %rdi, -0x26e0(%rbp)
callq 0x45d0
movq -0x26e0(%rbp), %rdx
leaq 0x13604(%rip), %rsi     # 0x2299f
leaq -0x1ac8(%rbp), %rdi
callq 0x4470
jmp 0xf3a9
movq -0x26e8(%rbp), %rdi
leaq -0x1ac8(%rbp), %rsi
callq 0x127f0
movb %al, -0x26e9(%rbp)
leaq -0x1ac8(%rbp), %rdi
callq 0x41c0
leaq -0x1ac9(%rbp), %rdi
callq 0x4370
movb -0x26e9(%rbp), %al
testb $0x1, %al
jne 0xf3e6
jmp 0xf420
movq -0x1a90(%rbp), %rdi
leaq 0x135ad(%rip), %rsi     # 0x229a1
movb $0x0, %al
callq 0x44c0
jmp 0xf420
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1ac9(%rbp), %rdi
callq 0x4370
jmp 0xfe9f
jmp 0xf422
leaq -0x1aa0(%rbp), %rdi
xorl %esi, %esi
callq 0x127b0
movq %rax, -0x1ad8(%rbp)
jmp 0xf338
movq -0x1a90(%rbp), %rdi
leaq 0x13b2c(%rip), %rsi     # 0x22f76
movb $0x0, %al
callq 0x44c0
movq -0x1a90(%rbp), %rdi
leaq 0x13545(%rip), %rsi     # 0x229a4
movl $0x25, %edx
movb $0x0, %al
callq 0x44c0
leaq 0x22f6e(%rip), %rdi     # 0x323e0
callq 0x12180
movq %rax, -0x1ae0(%rbp)
leaq 0x22f5b(%rip), %rdi     # 0x323e0
callq 0x121f0
movq %rax, -0x1ae8(%rbp)
leaq -0x1ae0(%rbp), %rdi
leaq -0x1ae8(%rbp), %rsi
callq 0x121b0
testb $0x1, %al
jne 0xf4ad
jmp 0xf5a7
leaq -0x1ae0(%rbp), %rdi
callq 0x12220
movq %rax, -0x2700(%rbp)
leaq -0x1b09(%rbp), %rdi
movq %rdi, -0x26f8(%rbp)
callq 0x45d0
movq -0x26f8(%rbp), %rdx
leaq 0x134be(%rip), %rsi     # 0x2299f
leaq -0x1b08(%rbp), %rdi
callq 0x4470
jmp 0xf4ef
movq -0x2700(%rbp), %rdi
leaq -0x1b08(%rbp), %rsi
callq 0x127f0
movb %al, -0x2701(%rbp)
leaq -0x1b08(%rbp), %rdi
callq 0x41c0
leaq -0x1b09(%rbp), %rdi
callq 0x4370
movb -0x2701(%rbp), %al
testb $0x1, %al
jne 0xf52c
jmp 0xf58b
movq -0x1a90(%rbp), %rax
movq %rax, -0x2710(%rbp)
leaq -0x1ae0(%rbp), %rdi
callq 0x12820
movq %rax, %rdi
callq 0x4130
movq -0x2710(%rbp), %rdi
movq %rax, %rdx
leaq 0x1344c(%rip), %rsi     # 0x229ab
movb $0x0, %al
callq 0x44c0
jmp 0xf58b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1b09(%rbp), %rdi
callq 0x4370
jmp 0xfe9f
jmp 0xf58d
leaq -0x1ae0(%rbp), %rdi
xorl %esi, %esi
callq 0x127b0
movq %rax, -0x1b18(%rbp)
jmp 0xf47e
movq -0x1a90(%rbp), %rdi
leaq 0x139c1(%rip), %rsi     # 0x22f76
movb $0x0, %al
callq 0x44c0
movl $0x0, -0x1b1c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x12840
movq %rax, -0x1b28(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x12710
movq %rax, -0x1b30(%rbp)
leaq -0x1b28(%rbp), %rdi
leaq -0x1b30(%rbp), %rsi
callq 0x126e0
testb $0x1, %al
jne 0xf608
jmp 0xfb16
movq -0x1a98(%rbp), %rax
movq %rax, -0x2718(%rbp)
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rsi
leaq -0x1b50(%rbp), %rdi
callq 0x12870
jmp 0xf634
leaq -0x1b50(%rbp), %rdi
callq 0x4130
movq %rax, -0x2728(%rbp)
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x11320
movq %rax, -0x2720(%rbp)
jmp 0xf665
movq -0x2720(%rbp), %rdi
callq 0x7020
movq %rax, -0x2730(%rbp)
jmp 0xf67a
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x128a0
movsd %xmm0, -0x2738(%rbp)
jmp 0xf699
movsd -0x2738(%rbp), %xmm0
movsd 0x12c17(%rip), %xmm1    # 0x222c0
mulsd %xmm1, %xmm0
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x2748(%rbp)
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x12920
movsd %xmm0, -0x2740(%rbp)
jmp 0xf6e0
movsd -0x2740(%rbp), %xmm0
movsd 0x12bd0(%rip), %xmm1    # 0x222c0
mulsd %xmm1, %xmm0
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x2758(%rbp)
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x12940
movq %rax, -0x2750(%rbp)
jmp 0xf726
movq -0x2750(%rbp), %r8
movsd -0x2758(%rbp), %xmm1
movsd -0x2748(%rbp), %xmm0
movq -0x2730(%rbp), %rcx
movq -0x2728(%rbp), %rdx
movq -0x2718(%rbp), %rdi
leaq 0x13256(%rip), %rsi     # 0x229af
movb $0x2, %al
callq 0x44c0
leaq -0x1b50(%rbp), %rdi
callq 0x41c0
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x12960
movq %rax, -0x2760(%rbp)
jmp 0xf78a
movq -0x2760(%rbp), %rax
movq %rax, -0x1b58(%rbp)
leaq -0x1b28(%rbp), %rdi
callq 0x12740
movq 0x20(%rax), %rdi
callq 0x129d0
movq %rax, -0x2768(%rbp)
jmp 0xf7b6
movq -0x2768(%rbp), %rax
movq %rax, -0x1b60(%rbp)
leaq -0x1b58(%rbp), %rdi
leaq -0x1b60(%rbp), %rsi
callq 0x12990
testb $0x1, %al
jne 0xf7e0
jmp 0xfafa
movq -0x1a88(%rbp), %rax
movq %rax, -0x2778(%rbp)
movl -0x1b1c(%rbp), %eax
incl %eax
movl %eax, -0x276c(%rbp)
movl %eax, -0x1b1c(%rbp)
leaq -0x1b58(%rbp), %rdi
callq 0x12a00
movq (%rax), %rsi
leaq -0x1b80(%rbp), %rdi
callq 0x12870
jmp 0xf81f
leaq -0x1b80(%rbp), %rdi
callq 0x4130
movq %rax, -0x2780(%rbp)
leaq -0x1b58(%rbp), %rdi
callq 0x12a00
movq (%rax), %rsi
leaq -0x1ba0(%rbp), %rdi
callq 0x12a20
jmp 0xf84f
leaq -0x1ba0(%rbp), %rdi
callq 0x4130
movq -0x2778(%rbp), %rdi
movl -0x276c(%rbp), %edx
movq -0x2780(%rbp), %rcx
movq %rax, %r8
leaq 0x1314e(%rip), %rsi     # 0x229c7
movb $0x0, %al
callq 0x44c0
leaq -0x1ba0(%rbp), %rdi
callq 0x41c0
leaq -0x1b80(%rbp), %rdi
callq 0x41c0
movq -0x1a90(%rbp), %rdi
movl -0x1b1c(%rbp), %edx
leaq 0x13125(%rip), %rsi     # 0x229d1
movb $0x0, %al
callq 0x44c0
leaq 0x22b26(%rip), %rdi     # 0x323e0
callq 0x12180
movq %rax, -0x1ba8(%rbp)
leaq 0x22b13(%rip), %rdi     # 0x323e0
callq 0x121f0
movq %rax, -0x1bb0(%rbp)
leaq -0x1ba8(%rbp), %rdi
leaq -0x1bb0(%rbp), %rsi
callq 0x121b0
testb $0x1, %al
jne 0xf8f5
jmp 0xfacb
leaq -0x1ba8(%rbp), %rdi
callq 0x12220
movq %rax, -0x2790(%rbp)
leaq -0x1bd1(%rbp), %rdi
movq %rdi, -0x2788(%rbp)
callq 0x45d0
movq -0x2788(%rbp), %rdx
leaq 0x13076(%rip), %rsi     # 0x2299f
leaq -0x1bd0(%rbp), %rdi
callq 0x4470
jmp 0xf937
movq -0x2790(%rbp), %rdi
leaq -0x1bd0(%rbp), %rsi
callq 0x127f0
movb %al, -0x2791(%rbp)
leaq -0x1bd0(%rbp), %rdi
callq 0x41c0
leaq -0x1bd1(%rbp), %rdi
callq 0x4370
movb -0x2791(%rbp), %al
testb $0x1, %al
jne 0xf977
jmp 0xfaaf
movq -0x1a90(%rbp), %rax
movq %rax, -0x27a8(%rbp)
leaq -0x1b58(%rbp), %rdi
callq 0x12a00
movq (%rax), %rax
movq %rax, -0x27a0(%rbp)
leaq -0x1ba8(%rbp), %rdi
callq 0x12220
movq %rax, %rsi
leaq -0x1bf8(%rbp), %rdi
callq 0x4140
jmp 0xf9b8
movq -0x27a0(%rbp), %rdi
leaq -0x1bf8(%rbp), %rsi
callq 0xbbc0
movsd %xmm0, -0x27b0(%rbp)
jmp 0xf9d5
movq -0x27a8(%rbp), %rdi
movsd -0x27b0(%rbp), %xmm1
movsd 0x128d4(%rip), %xmm0    # 0x222c0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cvtsi2sd %eax, %xmm0
movsd 0x128c0(%rip), %xmm1    # 0x222c0
divsd %xmm1, %xmm0
leaq 0x12fc9(%rip), %rsi     # 0x229d4
movb $0x1, %al
callq 0x44c0
leaq -0x1bf8(%rbp), %rdi
callq 0x41c0
jmp 0xfaaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1b50(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1b80(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1bd1(%rbp), %rdi
callq 0x4370
jmp 0xfe9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1bf8(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
jmp 0xfab1
leaq -0x1ba8(%rbp), %rdi
xorl %esi, %esi
callq 0x127b0
movq %rax, -0x1c00(%rbp)
jmp 0xf8c6
movq -0x1a90(%rbp), %rdi
leaq 0x1349d(%rip), %rsi     # 0x22f76
movb $0x0, %al
callq 0x44c0
leaq -0x1b58(%rbp), %rdi
xorl %esi, %esi
callq 0x12a50
movq %rax, -0x1c08(%rbp)
jmp 0xf798
jmp 0xfafc
leaq -0x1b28(%rbp), %rdi
xorl %esi, %esi
callq 0x12a90
movq %rax, -0x1c10(%rbp)
jmp 0xf5d9
movq -0x1a88(%rbp), %rdi
callq 0x4300
jmp 0xfb24
movq -0x1a90(%rbp), %rdi
callq 0x4300
jmp 0xfb32
movq -0x1a98(%rbp), %rdi
callq 0x4300
jmp 0xfb40
leaq -0x1c30(%rbp), %rdi
callq 0x1e960
jmp 0xfb4e
movq 0x2249b(%rip), %rdi     # 0x31ff0
leaq -0x1c30(%rbp), %rsi
callq 0x4290
movq %rax, -0x27b8(%rbp)
jmp 0xfb6a
movq -0x27b8(%rbp), %rdi
leaq 0x12e63(%rip), %rsi     # 0x229db
callq 0x42f0
movq %rax, -0x27c0(%rbp)
jmp 0xfb86
movq -0x27c0(%rbp), %rdi
movq 0x22424(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xfb9b
leaq -0x1c30(%rbp), %rdi
callq 0x41c0
leaq -0x1c50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0xd980
jmp 0xfbbd
leaq -0x60(%rbp), %rdi
callq 0x4130
movq %rax, %rdx
leaq 0x12e25(%rip), %rsi     # 0x229f5
xorl %eax, %eax
leaq -0x2450(%rbp), %rdi
movq %rdi, -0x27d0(%rbp)
callq 0x4080
movq -0x27d0(%rbp), %rdi
leaq 0x12d89(%rip), %rsi     # 0x2297c
callq 0x43b0
movq %rax, -0x27c8(%rbp)
jmp 0xfc01
movq -0x27c8(%rbp), %rax
movq %rax, -0x2458(%rbp)
cmpq $0x0, -0x2458(%rbp)
jne 0xfcd6
movq 0x223cc(%rip), %rdi     # 0x31ff0
leaq 0x12d53(%rip), %rsi     # 0x2297e
callq 0x42f0
movq %rax, -0x27d8(%rbp)
jmp 0xfc39
movq -0x27d8(%rbp), %rdi
leaq -0x2450(%rbp), %rsi
callq 0x42f0
movq %rax, -0x27e0(%rbp)
jmp 0xfc55
movq -0x27e0(%rbp), %rdi
movq 0x22355(%rip), %rsi     # 0x31fb8
callq 0x4340
movq %rax, -0x27e8(%rbp)
jmp 0xfc71
movq -0x27e8(%rbp), %rdi
movq 0x22339(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xfc86
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0xb8(%rbp)
jmp 0xfe69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1c30(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xfe77
movq -0x2458(%rbp), %rax
movq %rax, -0x2800(%rbp)
leaq -0x1c50(%rbp), %rdi
callq 0x4130
movq -0x2800(%rbp), %rdi
movq %rax, %rdx
leaq 0x12d00(%rip), %rsi     # 0x22a01
xorl %eax, %eax
movb %al, -0x27e9(%rbp)
callq 0x44c0
movb -0x27e9(%rbp), %al
movq -0x2458(%rbp), %rdi
leaq 0x12ce7(%rip), %rsi     # 0x22a09
leaq -0x11d0(%rbp), %rdx
callq 0x44c0
movb -0x27e9(%rbp), %al
movq -0x2458(%rbp), %rdi
leaq 0x12cd1(%rip), %rsi     # 0x22a13
leaq -0xdd0(%rbp), %rdx
callq 0x44c0
movb -0x27e9(%rbp), %al
movq -0x2458(%rbp), %rdi
leaq 0x12cba(%rip), %rsi     # 0x22a1c
leaq -0x5d0(%rbp), %rdx
callq 0x44c0
movb -0x27e9(%rbp), %al
movq -0x2458(%rbp), %rdi
leaq 0x12ca4(%rip), %rsi     # 0x22a26
leaq -0x9d0(%rbp), %rdx
callq 0x44c0
movq -0x2458(%rbp), %rax
movq %rax, -0x27f8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4130
movq -0x27f8(%rbp), %rdi
movq %rax, %rdx
movb -0x27e9(%rbp), %al
leaq 0x12c72(%rip), %rsi     # 0x22a2e
callq 0x44c0
movq -0x2458(%rbp), %rdi
callq 0x4300
jmp 0xfdcf
leaq -0x2478(%rbp), %rdi
callq 0x1e960
jmp 0xfddd
movq 0x2220c(%rip), %rdi     # 0x31ff0
leaq -0x2478(%rbp), %rsi
callq 0x4290
movq %rax, -0x2808(%rbp)
jmp 0xfdf9
movq -0x2808(%rbp), %rdi
leaq 0x12c34(%rip), %rsi     # 0x22a3b
callq 0x42f0
movq %rax, -0x2810(%rbp)
jmp 0xfe15
movq -0x2810(%rbp), %rdi
movq 0x22195(%rip), %rsi     # 0x31fb8
callq 0x4340
jmp 0xfe2a
leaq -0x2478(%rbp), %rdi
callq 0x41c0
movl $0x0, -0x4(%rbp)
movl $0x1, -0xb8(%rbp)
jmp 0xfe69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2478(%rbp), %rdi
callq 0x41c0
jmp 0xfe77
leaq -0x1c50(%rbp), %rdi
callq 0x41c0
jmp 0xfe85
leaq -0x1c50(%rbp), %rdi
callq 0x41c0
jmp 0xfe9f
leaq -0x158(%rbp), %rdi
callq 0x12ad0
leaq -0x108(%rbp), %rdi
callq 0x12af0
jmp 0xfeb9
leaq -0x158(%rbp), %rdi
callq 0x12ad0
leaq -0x108(%rbp), %rdi
callq 0x12af0
jmp 0xfee2
leaq -0xa0(%rbp), %rdi
callq 0x41c0
leaq -0x80(%rbp), %rdi
callq 0x41c0
leaq -0x60(%rbp), %rdi
callq 0x41c0
leaq -0x40(%rbp), %rdi
callq 0x41c0
jmp 0xff0b
leaq -0xa0(%rbp), %rdi
callq 0x41c0
leaq -0x80(%rbp), %rdi
callq 0x41c0
leaq -0x60(%rbp), %rdi
callq 0x41c0
leaq -0x40(%rbp), %rdi
callq 0x41c0
jmp 0xff17
movl -0x4(%rbp), %eax
addq $0x2810, %rsp           # imm = 0x2810
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x45c0
nopw %cs:(%rax,%rax)
nopl (%rax)