// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/sk_distance.cpp
// Function: kmerDistance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, 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>>>> const&, int, float, bool)
int kmerDistance(const std::string & prefix, const bool distancefile, const bool clusterfile, const std::vector < std::string > & kmerfiles, const int maxSNPS, const float minMatched, const bool includeSingletons)
{

	const std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();

	int numfiles=kmerfiles.size();

	std::vector < std::string > sampleNames;
	if (collectSampleNames(kmerfiles, sampleNames)!=0){return 1;}
	int numSamples=sampleNames.size();
	
	std::unordered_map < std::string, std::string > kmerMap;// Create the kmer map
	std::string emptySequence (numSamples , '-');
	int oldkmersize=0;

	std::vector < int > kmerCounts(numSamples, 0);

	std::ifstream fileStream;
	int sampleNum=0;
	for (int s = 0; s < kmerfiles.size(); ++s){
		
		if (openFileStream(kmerfiles[s], fileStream)){return 1;};

		int kmersize;
		std::vector < std::string > names;
		
		readKmerHeader(fileStream, kmersize, names);
		

		if (s==0){
			oldkmersize=kmersize;
		}

		if (kmersize!=oldkmersize){
			std::cout << "kmer files have different kmer sizes\n\n" << std::endl << std::endl;
			return 0;
		}


		char base;
		char kmerbuffer[kmersize*2/3];
		char asciibuffer[int(ceil(float(names.size())/6))];

		while (fileStream.read(asciibuffer, sizeof(asciibuffer))){
			std::string asciibits (asciibuffer, sizeof(asciibuffer));
			std::vector < bool > mybits;
			vectorbool_from_ascii(asciibits, mybits);//read the ascii representation of the taxa to a vector of bools
			
			while (fileStream.peek()!='\n' && fileStream.get(base)){
				base=toupper(base);
				fileStream.read(kmerbuffer, sizeof(kmerbuffer));
				std::string kmer (kmerbuffer, kmersize*2/3);
				for (int i=0; i<names.size(); ++i){ //add the base to all samples that are true in the bitset
					if (mybits[i]){
						kmerCounts[sampleNum+i]++;
					}
				}
				
				std::unordered_map < std::string, std::string >::iterator it = kmerMap.find(kmer);//check if the kmer is in the hash
				if ( it != kmerMap.end() ){//if the kmer is in the hash
					for (int i=0; i<names.size(); ++i){ //add the base to all samples that are true in the bitset
						if (mybits[i]){
							it->second[sampleNum+i]=base;//add the base to the string
						}
					}
				}
				else {
					std::string newsequence = emptySequence;
					for (int i=0; i<names.size(); ++i){ //add the base to all samples that are true in the bitset
						if (mybits[i]){
							newsequence[sampleNum+i] = base;
						}
					}
					kmerMap.insert(std::make_pair(kmer, newsequence));
				}
	    	}
	    	fileStream.ignore(256,'\n');//skip the end ofline character
	    }
	    sampleNum+=int(names.size()); //add the number of samples in the file to the count of total samples
		fileStream.close();
	}
	std::cout << kmerMap.size() << " kmers read from " << numSamples << " samples in " << numfiles << " files" << std::endl;

	std::vector < std::vector < int > > pairwiseSNPs( numSamples , std::vector < int >( numSamples , 0 ) );
	std::vector < std::vector < int > > pairwiseMatches( numSamples , std::vector < int >( numSamples , kmerMap.size() ) );
	std::vector < std::vector < int > > pairwiseNs( numSamples , std::vector < int >( numSamples , 0 ) );
	
	
	std::cout << "Calculating SNP distances" << std::endl;

	std::vector < std::bitset < 1000000 > >  kmerbitvector( numSamples, 0 );
	std::bitset < 1000000 > mykmerbits;
	

	while (kmerMap.size()>0){
		
		std::vector < std::vector < int >  > baseVector (6 , std::vector < int >() ) ;
		std::unordered_map < std::string, std::string >::iterator kmit = kmerMap.begin();
		std::unordered_map < std::string, std::string >::iterator endIter = kmerMap.end();
		int j=0;
	
		for (; kmit!=endIter && j<1000000; ){

			std::fill(baseVector.begin(), baseVector.end(), ( std::vector < int >() ));

			for (int i=0; i<numSamples; ++i){

				baseVector[base_score[kmit->second[i]]].push_back(i);
				if (base_score[kmit->second[i]]==5){
					kmerbitvector[i].set(j);
				}
			}

			if (baseVector[5].size()>0){
				j++;
			}

			for (int k=0; k<4; ++k){
				for (int l=k+1; l<4; ++l){
					for (std::vector < int >::iterator it=baseVector[k].begin(); it!=baseVector[k].end(); ++it){
						for (std::vector < int >::iterator it2=baseVector[l].begin(); it2!=baseVector[l].end(); ++it2){
							//count++;
							if (*it<*it2){
								pairwiseSNPs[*it][*it2]++;
							}
							else {
								pairwiseSNPs[*it2][*it]++;
							}
						}
					}
				}
			}

			kmerMap.erase(kmit++);
		}
		
		for (int i=0; i<numSamples; ++i){
			for (int j=i+1; j<numSamples; ++j){
				mykmerbits = kmerbitvector[i] | kmerbitvector[j];
				pairwiseMatches[i][j]-=mykmerbits.count();
			}
			kmerbitvector[i].reset();
		}
	}

	std::string dotfilename=prefix+".dot";
	std::ofstream dotout(dotfilename);
	dotout << "graph {" << std::endl;

	if (clusterfile){
		std::string clusterfilename=prefix+".clusters.tsv";
		std::ofstream clusterout(clusterfilename);
		std::map <int, int> clusterMap;
		std::vector < std::vector <int> > clusters;
		std::cout << "Printing clusters to " << clusterfilename << std::endl;
		clusterout << "ID\tCluster__autocolour" << std::endl;
		for (int i=0; i<numSamples; ++i){
			std::vector < int > matches;
			matches.push_back(i);
			int matchcount=0;
			for (int j=i+1; j<numSamples; ++j){
				float kmercount=std::min(kmerCounts[i], kmerCounts[j]);
				float percentmatched = float(pairwiseMatches[i][j])/kmercount;
				if (pairwiseSNPs[i][j]<=maxSNPS && percentmatched>=minMatched){
					matchcount++;
					matches.push_back(j);
					float similarity;
					if (maxSNPS>0){
						similarity=((1.0-(float(pairwiseSNPs[i][j])/float(maxSNPS)))*3.0)+1;
					}
					else {
						similarity=1.0;
					}
					dotout << "\t" << sampleNames[i] << " -- " << sampleNames[j] << " [label=\"" << pairwiseSNPs[i][j] << "\" weight=" << similarity << "] ;" << std::endl;
				}
			}
			if (matchcount==0 && includeSingletons){
				dotout << "\t" << sampleNames[i] << " ;" << std::endl; //Need to find somewhere to put this where it does what I want
			}
			int clusternum=clusters.size();
			for ( std::vector < int >::iterator it=matches.begin(); it!=matches.end(); ++it){
				std::map <int, int >::iterator it2 = clusterMap.find(*it);//check if the match is in the hash
				if ( it2 != clusterMap.end() ){//if the match is in the hash
					if (it2->second<clusternum){
						clusternum=it2->second;
					}
				}
			}
			if (clusternum==clusters.size()){
				clusters.push_back(std::vector <int>());
			}
			for ( std::vector < int >::iterator it=matches.begin(); it!=matches.end(); ++it){
				std::map < int, int >::iterator it2 = clusterMap.find(*it);//check if the match is in the hash
				if ( it2 != clusterMap.end() ){//if the match is in the hash
					if (it2->second!=clusternum){
						for ( std::vector < int >::iterator it3=clusters[it2->second].begin(); it3!=clusters[it2->second].end(); ++it3){
							clusters[clusternum].push_back(*it3);
						}
						clusters[it2->second].clear();
					}
				}
				else{
					clusterMap.insert(std::make_pair(*it, clusternum));
					clusters[clusternum].push_back(*it);
				}
			}


			for ( std::vector < int >::iterator it2=clusters[clusternum].begin(); it2!=clusters[clusternum].end(); ++it2){
				std::map < int, int >::iterator it3 = clusterMap.find(*it2);//check if the match is in the hash
				if ( it3 != clusterMap.end() ){
					it3->second=clusternum;//segfault is on this line
				}	
			}

		}
		for ( std::map < int, int >::iterator it=clusterMap.begin(); it!=clusterMap.end(); ++it){
			clusterout << sampleNames[it->first] << "\t" << it->second+1 << "\n";
		}
		clusterout.close();

		int i=0;
		for ( std::vector < std::vector < int > >::iterator it=clusters.begin(); it!=clusters.end(); ++it){
			++i;
			if (it->size()>1){
				std::string clusterfilename=prefix+".cluster."+std::to_string(i)+".txt";
				std::ofstream clusterout(clusterfilename);
				for ( std::vector < int >::iterator it2=it->begin(); it2!=it->end(); ++it2){
					clusterout << sampleNames[*it2] << "\n";
				}
				clusterout.close();
			}
		}
	}

	dotout << "}" << std::endl;
	dotout.close();
	
	if (distancefile){
		std::string distancefilename=prefix+".distances.tsv";
		std::cout << "Printing distances to " << distancefilename << std::endl;
		
		std::ofstream distanceout(distancefilename);
		distanceout << "Sample 1\tSample 2\tMatches\tMismatches\tJaccard Index\tMash-like distance\tSNPs\tSNP distance" <<std::endl;
		for (int i=0; i<numSamples; ++i){
			for (int j=i+1; j<numSamples; ++j){
				float matches=pairwiseMatches[i][j] ;
				float mismatches=(kmerCounts[i]-pairwiseMatches[i][j]+kmerCounts[j]-pairwiseMatches[i][j]);
				float myID=matches/(mismatches+matches);
				float mashlike;
				if (myID==0){
					mashlike=1.0;
				}
				else{
					mashlike=(-1.0/((oldkmersize*2)+1))*log((2*myID)/(1+myID));
				}
				distanceout << sampleNames[i] << "\t" << sampleNames[j] << "\t" << int(matches) << "\t" << int(mismatches) << "\t" << myID << "\t" << mashlike << "\t" << pairwiseSNPs[i][j] << "\t" << pairwiseSNPs[i][j]/matches << std::endl;
			}
		}
		distanceout.close();
	}

	printDuration(start);
	
	return 0;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d938, %rsp          # imm = 0x3D938
movl %r9d, -0x124(%rbp)
movss %xmm0, -0x118(%rbp)
movl %r8d, -0x3c(%rbp)
movq %rcx, %r14
movl %edx, -0x120(%rbp)
movl %esi, -0x11c(%rbp)
movq %rdi, -0xa8(%rbp)
callq 0x5050
movq %rax, -0x1a8(%rbp)
movq 0x8(%r14), %rax
subq (%r14), %rax
movq %rax, -0x158(%rbp)
xorps %xmm0, %xmm0
leaq -0x100(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
pushq $0x1
popq %r15
movq %r14, %rdi
movl %r15d, %edx
callq 0x8436
testl %eax, %eax
jne 0xf34b
movq -0xf8(%rbp), %rcx
subq -0x100(%rbp), %rcx
shrq $0x5, %rcx
leaq -0x230(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq %rcx, -0x58(%rbp)
movslq %ecx, %rbx
leaq -0x270(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x280(%rbp), %rdi
pushq $0x2d
popq %rdx
movq %rbx, %rsi
callq 0x5470
leaq -0x3d958(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x228(%rbp), %rdi
leaq -0x1f110(%rbp), %rcx
movq %rbx, %rsi
callq 0xbe22
movq %rbx, -0x150(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x5450
shrq $0x5, -0x158(%rbp)
xorl %r12d, %r12d
leaq -0x1f110(%rbp), %rbx
movl $0x0, -0xb0(%rbp)
movq $0x0, -0x48(%rbp)
movq %r14, -0x1b0(%rbp)
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0xe46f
movq %r12, %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x8c8(%rbp), %rsi
movl %r15d, %edx
callq 0x73fe
testl %eax, %eax
jne 0xf31b
xorps %xmm0, %xmm0
movaps %xmm0, -0xe0(%rbp)
andq $0x0, -0xd0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x832b
testq %r12, %r12
sete %al
movl -0x1e0(%rbp), %esi
cmpl %esi, -0x48(%rbp)
sete %cl
orb %al, %cl
movb %cl, -0x108(%rbp)
movq %rsi, -0x110(%rbp)
je 0xe10f
movq %rsp, -0x1b8(%rbp)
leal (%rsi,%rsi), %eax
cltd
pushq $0x3
popq %rcx
idivl %ecx
movq %rax, -0x38(%rbp)
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, %rsp
movq -0xd8(%rbp), %rax
subq -0xe0(%rbp), %rax
sarq $0x5, %rax
movq %r12, -0x1c0(%rbp)
js 0xe137
cvtsi2ss %rax, %xmm0
jmp 0xe14c
movq 0x27ea2(%rip), %rdi     # 0x35fb8
leaq 0x1782f(%rip), %rsi     # 0x2594c
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
jmp 0xe443
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
divss 0x1751c(%rip), %xmm0    # 0x25670
callq 0x5220
cvttss2si %xmm0, %ecx
leaq 0xf(%rcx), %rax
andq $-0x10, %rax
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, %rsp
movq %rcx, -0xb8(%rbp)
movq %rdx, -0x50(%rbp)
leaq (%rdx,%rcx), %rax
movq %rax, -0x48(%rbp)
movslq -0xb0(%rbp), %r14
leaq (,%r14,4), %r12
leaq -0x8c8(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x54c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xe402
leaq -0x6b0(%rbp), %rax
movq %rax, -0x6c0(%rbp)
leaq -0x6c0(%rbp), %r15
movq %r15, %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x7828
andq $0x0, -0x1f110(%rbp)
andl $0x0, -0x1f108(%rbp)
andq $0x0, -0x1f100(%rbp)
andl $0x0, -0x1f0f8(%rbp)
andq $0x0, -0x1f0f0(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7bb6
leaq -0x8c8(%rbp), %rdi
callq 0x5140
cmpl $0xa, %eax
je 0xe3d5
leaq -0x8c8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5550
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xe3d5
movsbl -0x80(%rbp), %edi
callq 0x56f0
movb %al, -0x80(%rbp)
leaq -0x8c8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x54c0
movl -0x1e0(%rbp), %eax
addl %eax, %eax
cltd
pushq $0x3
popq %rcx
idivl %ecx
movslq %eax, %rdx
leaq -0x4b0(%rbp), %rax
movq %rax, -0x4c0(%rbp)
movq -0x30(%rbp), %rsi
addq %rsi, %rdx
leaq -0x4c0(%rbp), %rdi
callq 0x7828
xorl %r15d, %r15d
movq -0xd8(%rbp), %rax
subq -0xe0(%rbp), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0xe2d5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x903c
testq %rdx, (%rax)
je 0xe2d0
movq -0x228(%rbp), %rax
addq %r12, %rax
incl (%rax,%r15,4)
incq %r15
jmp 0xe29b
leaq -0x260(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0x9c92
movq %rax, %r13
testq %rax, %rax
je 0xe331
xorl %r15d, %r15d
movq -0xd8(%rbp), %rax
subq -0xe0(%rbp), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0xe3c4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x903c
testq %rdx, (%rax)
je 0xe32c
movb -0x80(%rbp), %al
movq 0x28(%r13), %rcx
addq %r14, %rcx
movb %al, (%r15,%rcx)
incq %r15
jmp 0xe2f3
leaq -0x1a0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5540
xorl %r15d, %r15d
movq -0xd8(%rbp), %rax
subq -0xe0(%rbp), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0xe384
movq %rbx, %rdi
movq %r15, %rsi
callq 0x903c
testq %rdx, (%rax)
je 0xe37f
movb -0x80(%rbp), %al
movq -0x1a0(%rbp), %rcx
addq %r14, %rcx
movb %al, (%r15,%rcx)
incq %r15
jmp 0xe347
leaq -0x3d958(%rbp), %r15
movq %r15, %rdi
leaq -0x4c0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0xf830
leaq -0x260(%rbp), %rdi
movq %r15, %rsi
callq 0x9dfa
movq %r15, %rdi
callq 0x90b8
leaq -0x1a0(%rbp), %rdi
callq 0x5778
leaq -0x4c0(%rbp), %rdi
callq 0x5778
jmp 0xe20f
movl $0x100, %esi            # imm = 0x100
leaq -0x8c8(%rbp), %rdi
pushq $0xa
popq %rdx
callq 0x5260
movq %rbx, %rdi
callq 0x908a
leaq -0x6c0(%rbp), %rdi
callq 0x5778
jmp 0xe190
movq -0xe0(%rbp), %r15
movq -0xd8(%rbp), %r14
leaq -0x8c8(%rbp), %rdi
callq 0x50a0
subq %r15, %r14
shrq $0x5, %r14
addl %r14d, -0xb0(%rbp)
movq -0x1b8(%rbp), %rsp
movq -0x1b0(%rbp), %r14
pushq $0x1
popq %r15
movq -0x1c0(%rbp), %r12
leaq -0xe0(%rbp), %rdi
callq 0x911e
incq %r12
movq -0x110(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpb $0x0, -0x108(%rbp)
jne 0xe03d
jmp 0xf318
movq -0x248(%rbp), %rsi
movq 0x27b3b(%rip), %rdi     # 0x35fb8
callq 0x5280
leaq 0x174ea(%rip), %rsi     # 0x25973
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
movq -0x58(%rbp), %rsi
callq 0x56a0
leaq 0x16ffc(%rip), %rsi     # 0x254a0
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
movq -0x158(%rbp), %rsi
callq 0x56a0
leaq 0x18603(%rip), %rsi     # 0x26ac5
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
leaq -0x1f110(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x3d958(%rbp), %rdi
leaq -0x6c0(%rbp), %rcx
movq -0x150(%rbp), %rbx
movq %rbx, %rsi
callq 0xbe22
leaq -0x170(%rbp), %rdi
leaq -0x3d958(%rbp), %rdx
leaq -0x4c0(%rbp), %rcx
movq %rbx, %rsi
callq 0xf658
leaq -0x3d958(%rbp), %rdi
callq 0xc052
movl -0x248(%rbp), %eax
leaq -0x1f110(%rbp), %rdx
movl %eax, (%rdx)
leaq -0x3d958(%rbp), %rdi
leaq -0x6c0(%rbp), %rcx
movq %rbx, %rsi
callq 0xbe22
leaq -0x210(%rbp), %rdi
leaq -0x3d958(%rbp), %rdx
leaq -0x4c0(%rbp), %rcx
movq %rbx, %rsi
callq 0xf658
leaq -0x3d958(%rbp), %rdi
callq 0xc052
leaq -0x1f110(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x3d958(%rbp), %rdi
leaq -0x6c0(%rbp), %rcx
movq %rbx, %rsi
callq 0xbe22
leaq -0x298(%rbp), %rdi
leaq -0x3d958(%rbp), %rdx
leaq -0x4c0(%rbp), %rcx
movq %rbx, %rsi
callq 0xf658
leaq -0x3d958(%rbp), %rdi
callq 0xc052
movq 0x279f8(%rip), %rdi     # 0x35fb8
leaq 0x173be(%rip), %rsi     # 0x25985
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
leaq -0x3d958(%rbp), %rbx
xorl %r14d, %r14d
movl $0x1e848, %edx          # imm = 0x1E848
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5210
leaq -0x1f8(%rbp), %rdi
leaq -0x1f110(%rbp), %rcx
movq -0x150(%rbp), %rsi
movq %rbx, %rdx
callq 0xf6ae
leaq -0x3d958(%rbp), %rdi
movl $0x1e848, %edx          # imm = 0x1E848
xorl %esi, %esi
callq 0x5210
movq -0x58(%rbp), %rax
testl %eax, %eax
cmovgl %eax, %r14d
movq %r14, -0xb8(%rbp)
leaq -0x1f110(%rbp), %rbx
cmpq $0x0, -0x248(%rbp)
je 0xe904
xorps %xmm0, %xmm0
movaps %xmm0, -0x1f110(%rbp)
andq $0x0, -0x1f100(%rbp)
leaq -0x6c0(%rbp), %rdi
pushq $0x6
popq %rsi
movq %rbx, %rdx
leaq -0x4c0(%rbp), %rcx
callq 0xf658
movq %rbx, %rdi
callq 0xc052
movl $0x0, -0x30(%rbp)
movq -0x250(%rbp), %rbx
testq %rbx, %rbx
je 0xe826
cmpl $0xf4240, -0x30(%rbp)   # imm = 0xF4240
jae 0xe826
movq %rbx, -0x38(%rbp)
movq -0x6c0(%rbp), %rdi
movq -0x6b8(%rbp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, -0x1f110(%rbp)
andq $0x0, -0x1f100(%rbp)
leaq -0x1f110(%rbp), %rbx
movq %rbx, %rdx
callq 0xfc30
movq %rbx, %rdi
callq 0xc052
movl -0x30(%rbp), %r12d
xorl %eax, %eax
leaq 0x27d6e(%rip), %rdx     # 0x36450
movq -0x38(%rbp), %rsi
movl %eax, -0x1f110(%rbp)
cmpl -0x58(%rbp), %eax
jge 0xe76e
cltq
movq 0x28(%rsi), %rcx
movsbq (%rcx,%rax), %rax
movsbq (%rdx,%rax), %rax
imulq $0x18, %rax, %rdi
addq -0x6c0(%rbp), %rdi
movq %rsi, %r14
leaq -0x1f110(%rbp), %rsi
movq %rdx, %rbx
callq 0xbe78
movl -0x1f110(%rbp), %eax
movslq %eax, %rcx
movq 0x28(%r14), %rdx
movsbq (%rdx,%rcx), %rdx
cmpb $0x5, (%rbx,%rdx)
movq %rbx, %rdx
movq %r14, %rsi
jne 0xe767
imulq $0x1e848, %rcx, %rdi    # imm = 0x1E848
addq -0x1f8(%rbp), %rdi
movq %rsi, %r14
movq %r12, %rsi
movq %rdx, %rbx
pushq $0x1
popq %rdx
callq 0xf704
movl -0x1f110(%rbp), %eax
movq %rbx, %rdx
movq %r14, %rsi
incl %eax
jmp 0xe6e6
movq -0x6c0(%rbp), %rcx
movq 0x80(%rcx), %rdx
xorl %eax, %eax
cmpq 0x78(%rcx), %rdx
setne %al
movl %eax, -0x50(%rbp)
xorl %edx, %edx
pushq $0x1
popq %rsi
cmpq $0x4, %rdx
je 0xe808
imulq $0x18, %rdx, %rdi
addq %rcx, %rdi
movq %rsi, %r8
cmpq $0x4, %r8
je 0xe800
movq (%rdi), %r9
movq 0x8(%rdi), %r10
imulq $0x18, %r8, %r11
addq %rcx, %r11
cmpq %r10, %r9
je 0xe7fb
movq (%r11), %rbx
movq 0x8(%r11), %r14
movq -0x170(%rbp), %r12
cmpq %r14, %rbx
je 0xe7f5
movl (%r9), %eax
movl (%rbx), %r13d
cmpl %r13d, %eax
movl %r13d, %r15d
cmovll %eax, %r15d
cmovgl %eax, %r13d
movslq %r15d, %rax
imulq $0x18, %rax, %rax
movslq %r13d, %r15
movq (%r12,%rax), %rax
incl (%rax,%r15,4)
addq $0x4, %rbx
jmp 0xe7c4
addq $0x4, %r9
jmp 0xe7b1
incq %r8
jmp 0xe79d
incq %rdx
incq %rsi
jmp 0xe78d
movl -0x50(%rbp), %eax
addl %eax, -0x30(%rbp)
movq -0x38(%rbp), %rsi
movq (%rsi), %rbx
leaq -0x260(%rbp), %rdi
callq 0xaec4
jmp 0xe684
movl $0x1e848, %ebx          # imm = 0x1E848
xorl %r12d, %r12d
pushq $0x1
popq %r14
movq %rbx, -0x30(%rbp)
movq %r14, -0x38(%rbp)
cmpq -0xb8(%rbp), %r12
jne 0xe8b8
jmp 0xe8f3
movq -0x1f8(%rbp), %r15
imulq $0x1e848, %r12, %rsi    # imm = 0x1E848
addq %r15, %rsi
addq %rbx, %r15
movl $0x1e848, %edx          # imm = 0x1E848
leaq -0x1f110(%rbp), %r13
movq %r13, %rdi
callq 0x5360
movq %r13, %rdi
movq %r15, %rsi
callq 0xfda4
movl $0x1e848, %edx          # imm = 0x1E848
leaq -0x3d958(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x5360
movq %r15, %rdi
callq 0xfdbc
movq -0x210(%rbp), %rcx
imulq $0x18, %r12, %rdx
movq (%rcx,%rdx), %rcx
subl %eax, (%rcx,%r14,4)
incq %r14
movl $0x1e848, %eax          # imm = 0x1E848
addq %rax, %rbx
cmpl -0x58(%rbp), %r14d
jl 0xe848
imulq $0x1e848, %r12, %rdi    # imm = 0x1E848
incq %r12
addq -0x1f8(%rbp), %rdi
movl $0x1e848, %edx          # imm = 0x1E848
xorl %esi, %esi
callq 0x5210
movq -0x38(%rbp), %r14
incq %r14
movl $0x1e848, %eax          # imm = 0x1E848
movq -0x30(%rbp), %rbx
addq %rax, %rbx
jmp 0xe832
leaq -0x6c0(%rbp), %rdi
callq 0xf730
jmp 0xe62e
leaq 0x17094(%rip), %rdx     # 0x2599f
leaq -0xe0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xbe9e
leaq -0x1f110(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x5740
leaq 0x17069(%rip), %rsi     # 0x259a4
leaq -0x1f110(%rbp), %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
cmpb $0x0, -0x120(%rbp)
je 0xefde
leaq 0x17049(%rip), %rdx     # 0x259ac
leaq -0x1e0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xbe9e
leaq -0x6c0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x5740
leaq -0x198(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
andq $0x0, -0x90(%rbp)
movq 0x275f7(%rip), %rdi     # 0x35fb8
leaq 0x16ff2(%rip), %rsi     # 0x259ba
callq 0x53f0
leaq -0x1e0(%rbp), %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
leaq 0x16fe5(%rip), %rsi     # 0x259d0
leaq -0x6c0(%rbp), %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
cvtsi2ssl -0x3c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
xorl %eax, %eax
leaq -0x148(%rbp), %r14
leaq -0x1a0(%rbp), %r13
movl %eax, -0x148(%rbp)
cmpl -0x58(%rbp), %eax
jge 0xee1b
xorps %xmm0, %xmm0
movaps %xmm0, -0x4c0(%rbp)
andq $0x0, -0x4b0(%rbp)
leaq -0x4c0(%rbp), %rdi
movq %r14, %rsi
callq 0xbe78
xorl %ebx, %ebx
movq %r14, %rdi
movslq -0x148(%rbp), %rax
imulq $0x18, %rax, %rcx
movq -0x170(%rbp), %rdx
addq %rcx, %rdx
addq -0x210(%rbp), %rcx
movq -0x228(%rbp), %rsi
movslq (%rdi), %r8
leal 0x1(%r8), %edi
movl %edi, -0x80(%rbp)
cmpl -0x58(%rbp), %edi
jge 0xebfb
movq (%rdx), %r9
leaq -0x80(%rbp), %rdi
movl -0x3c(%rbp), %r10d
cmpl %r10d, 0x4(%r9,%r8,4)
jg 0xea71
movl 0x4(%rsi,%r8,4), %edi
movl (%rsi,%rax,4), %r9d
cmpl %r9d, %edi
cmovll %edi, %r9d
movq (%rcx), %rdi
cvtsi2ssl 0x4(%rdi,%r8,4), %xmm0
cvtsi2ss %r9d, %xmm1
divss %xmm1, %xmm0
ucomiss -0x118(%rbp), %xmm0
leaq -0x80(%rbp), %rdi
jb 0xea71
leaq -0x4c0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xbe78
movss 0x16526(%rip), %xmm0    # 0x25004
movss %xmm0, -0x30(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0xeb36
movslq -0x148(%rbp), %rax
movq -0x170(%rbp), %rcx
imulq $0x18, %rax, %rax
movslq -0x80(%rbp), %rdx
movq (%rcx,%rax), %rax
cvtsi2ssl (%rax,%rdx,4), %xmm0
divss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1674f(%rip), %xmm2    # 0x25268
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
mulsd 0x16e17(%rip), %xmm1    # 0x25940
addsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
leaq -0x1f110(%rbp), %rdi
leaq 0x1777d(%rip), %rsi     # 0x262c1
callq 0x53f0
movslq -0x148(%rbp), %rsi
shlq $0x5, %rsi
addq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
leaq 0x16e7a(%rip), %rsi     # 0x259e7
callq 0x53f0
movslq -0x80(%rbp), %rsi
shlq $0x5, %rsi
addq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
leaq 0x16e59(%rip), %rsi     # 0x259ec
callq 0x53f0
movslq -0x148(%rbp), %rcx
movq -0x170(%rbp), %rdx
imulq $0x18, %rcx, %rcx
movslq -0x80(%rbp), %rsi
movq (%rdx,%rcx), %rcx
movl (%rcx,%rsi,4), %esi
movq %rax, %rdi
callq 0x56a0
movq %rax, %rdi
leaq 0x16e2f(%rip), %rsi     # 0x259f6
callq 0x53f0
movq %rax, %rdi
movss -0x30(%rbp), %xmm0
callq 0x5300
movq %rax, %rdi
leaq 0x16e1d(%rip), %rsi     # 0x25a00
callq 0x53f0
incl %ebx
movq %rax, %rdi
callq 0x51c0
leaq -0x80(%rbp), %rdi
jmp 0xea4e
testl %ebx, %ebx
sete %al
testb %al, -0x124(%rbp)
je 0xec4c
leaq -0x1f110(%rbp), %rdi
leaq 0x176ab(%rip), %rsi     # 0x262c1
callq 0x53f0
movslq -0x148(%rbp), %rsi
shlq $0x5, %rsi
addq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
leaq 0x16dc2(%rip), %rsi     # 0x25a01
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq -0x98(%rbp), %rax
subq -0xa0(%rbp), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rax, %r12
movq -0x4c0(%rbp), %r15
leaq -0x80(%rbp), %rbx
cmpq -0x4b8(%rbp), %r15
je 0xeca0
movq %r13, %rdi
movq %r15, %rsi
callq 0xfe30
leaq -0x198(%rbp), %rcx
cmpq %rcx, %rax
je 0xec9a
movl 0x24(%rax), %eax
cmpl %r12d, %eax
cmovll %eax, %r12d
addq $0x4, %r15
jmp 0xec70
movslq %r12d, %r14
movq -0x98(%rbp), %rax
subq -0xa0(%rbp), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cmpq %r14, %rax
jne 0xece1
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
andq $0x0, -0x70(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rbx, %rsi
callq 0xfe82
movq %rbx, %rdi
callq 0xc052
movq -0x4c0(%rbp), %r13
movq %r12, %rax
shlq $0x20, %rax
movq %rax, -0x30(%rbp)
cmpq -0x4b8(%rbp), %r13
je 0xedb6
leaq -0x1a0(%rbp), %rdi
movq %r13, %rsi
callq 0xfe30
movq %rax, %r15
leaq -0x198(%rbp), %rax
cmpq %rax, %r15
je 0xed6a
movl 0x24(%r15), %eax
cmpl %r12d, %eax
je 0xedad
movslq %eax, %rcx
movq -0xa0(%rbp), %rdi
imulq $0x18, %rcx, %rcx
movq (%rdi,%rcx), %rbx
cltq
imulq $0x18, %rax, %rax
cmpq 0x8(%rdi,%rax), %rbx
je 0xed9a
imulq $0x18, %r14, %rax
addq %rax, %rdi
movq %rbx, %rsi
callq 0xbe78
addq $0x4, %rbx
movl 0x24(%r15), %eax
movq -0xa0(%rbp), %rdi
jmp 0xed3d
movl (%r13), %eax
orq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x1a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x1004c
imulq $0x18, %r14, %rdi
addq -0xa0(%rbp), %rdi
movq %r13, %rsi
callq 0xbe78
jmp 0xedad
addq %rax, %rdi
movq (%rdi), %rax
cmpq %rax, %rbx
leaq -0x80(%rbp), %rbx
je 0xedad
movq %rax, 0x8(%rdi)
addq $0x4, %r13
jmp 0xecf3
movq -0xa0(%rbp), %rax
imulq $0x18, %r14, %r14
movq (%rax,%r14), %rbx
leaq -0x1a0(%rbp), %r13
cmpq 0x8(%rax,%r14), %rbx
je 0xedfb
movq %r13, %rdi
movq %rbx, %rsi
callq 0xfe30
leaq -0x198(%rbp), %rcx
cmpq %rcx, %rax
je 0xedee
movl %r12d, 0x24(%rax)
addq $0x4, %rbx
movq -0xa0(%rbp), %rax
jmp 0xedcc
leaq -0x4c0(%rbp), %rdi
callq 0xc052
movl -0x148(%rbp), %eax
incl %eax
leaq -0x148(%rbp), %r14
jmp 0xea19
movq -0x188(%rbp), %r13
leaq -0x6c0(%rbp), %rbx
leaq 0x17491(%rip), %r15     # 0x262c1
leaq 0x16b3a(%rip), %r12     # 0x25971
leaq -0x198(%rbp), %rax
cmpq %rax, %r13
je 0xee8b
movslq 0x20(%r13), %rsi
shlq $0x5, %rsi
addq -0x100(%rbp), %rsi
movq %rbx, %rdi
callq 0x53a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movl 0x24(%r13), %esi
incl %esi
movq %rax, %rdi
callq 0x56a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x53f0
movq %r13, %rdi
callq 0x52a0
movq %rax, %r13
jmp 0xee37
leaq -0x6c0(%rbp), %rdi
callq 0x5560
xorl %ebx, %ebx
movq -0xa0(%rbp), %r14
leaq -0x148(%rbp), %rdi
leaq -0x4c0(%rbp), %r15
leaq 0x16abc(%rip), %r13     # 0x25971
cmpq -0x98(%rbp), %r14
je 0xefae
incl %ebx
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x5, %rax
jb 0xefa5
movq -0xa8(%rbp), %rsi
leaq 0x16b21(%rip), %rdx     # 0x25a04
callq 0xbe9e
leaq -0x2b8(%rbp), %r12
movq %r12, %rdi
movl %ebx, %esi
callq 0xf7d7
movq %r15, %rdi
leaq -0x148(%rbp), %rsi
movq %r12, %rdx
callq 0xf770
movl %ebx, -0x30(%rbp)
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x16aef(%rip), %rdx     # 0x25a0e
callq 0xf751
movq %r15, %rdi
callq 0x5778
leaq -0x2b8(%rbp), %rdi
callq 0x5778
leaq -0x148(%rbp), %rdi
movq %rdi, %rbx
callq 0x5778
movq %r15, %rdi
movq %r12, %rsi
pushq $0x10
popq %rdx
callq 0x5740
movq (%r14), %r12
cmpq 0x8(%r14), %r12
je 0xef86
movslq (%r12), %rsi
shlq $0x5, %rsi
addq -0x100(%rbp), %rsi
movq %r15, %rdi
callq 0x53a0
movq %rax, %rdi
movq %r13, %rsi
callq 0x53f0
addq $0x4, %r12
jmp 0xef58
movq %r15, %rdi
callq 0x5560
movq %r15, %rdi
callq 0x55c0
leaq -0x80(%rbp), %rdi
callq 0x5778
movq %rbx, %rdi
movl -0x30(%rbp), %ebx
addq $0x18, %r14
jmp 0xeeb5
leaq -0xa0(%rbp), %rdi
callq 0xf730
leaq -0x1a0(%rbp), %rdi
callq 0xf900
leaq -0x6c0(%rbp), %rdi
callq 0x55c0
leaq -0x1e0(%rbp), %rdi
callq 0x5778
leaq 0x16a2e(%rip), %rsi     # 0x25a13
leaq -0x1f110(%rbp), %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
leaq -0x1f110(%rbp), %rdi
callq 0x5560
cmpb $0x0, -0x11c(%rbp)
je 0xf2c4
leaq 0x169fc(%rip), %rdx     # 0x25a15
leaq -0x4c0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xbe9e
movq 0x26f85(%rip), %rdi     # 0x35fb8
leaq 0x169ea(%rip), %rsi     # 0x25a24
callq 0x53f0
leaq -0x4c0(%rbp), %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
leaq -0x6c0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x5740
leaq 0x169c8(%rip), %rsi     # 0x25a3b
leaq -0x6c0(%rbp), %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq -0x48(%rbp), %rax
leal 0x1(,%rax,2), %eax
cvtsi2sd %eax, %xmm0
movsd 0x161c2(%rip), %xmm1    # 0x25260
divsd %xmm0, %xmm1
movsd %xmm1, -0x118(%rbp)
pushq $0x1
popq %r12
pushq $0x20
popq %rbx
xorl %edx, %edx
leaq 0x17207(%rip), %r15     # 0x262c1
cmpq -0xb8(%rbp), %rdx
je 0xf2a0
leaq 0x1(%rdx), %rax
movq %rax, -0xb0(%rbp)
imulq $0x18, %rdx, %r14
movq %rdx, %rax
shlq $0x5, %rax
movq %rax, -0x48(%rbp)
movq %rbx, -0x108(%rbp)
movq %r12, -0x110(%rbp)
cmpl -0x58(%rbp), %r12d
jge 0xf27f
movq -0x210(%rbp), %rax
movq (%rax,%r14), %rax
movl (%rax,%r12,4), %eax
cvtsi2ss %eax, %xmm1
movq -0x228(%rbp), %rcx
movq %rdx, %r13
movl (%rcx,%rdx,4), %edx
addl %eax, %eax
subl %eax, %edx
addl (%rcx,%r12,4), %edx
cvtsi2ss %edx, %xmm2
movaps %xmm1, %xmm0
movss %xmm2, -0x3c(%rbp)
addss %xmm2, %xmm0
movss %xmm1, -0x30(%rbp)
divss %xmm0, %xmm1
movss %xmm1, -0x38(%rbp)
ucomiss 0x16802(%rip), %xmm1    # 0x25948
movss 0x15eb6(%rip), %xmm0    # 0x25004
movss %xmm0, -0x50(%rbp)
jne 0xf157
jnp 0xf189
movss -0x38(%rbp), %xmm1
movaps %xmm1, %xmm0
addss %xmm1, %xmm0
addss 0x15e99(%rip), %xmm1    # 0x25004
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x5340
mulsd -0x118(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x50(%rbp)
movq -0x100(%rbp), %rsi
addq -0x48(%rbp), %rsi
leaq -0x6c0(%rbp), %rdi
callq 0x53a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movq -0x100(%rbp), %rsi
addq %rbx, %rsi
movq %rax, %rdi
callq 0x53a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
cvttss2si -0x30(%rbp), %esi
movq %rax, %rdi
callq 0x56a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
cvttss2si -0x3c(%rbp), %esi
movq %rax, %rdi
callq 0x56a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movq %rax, %rdi
movss -0x38(%rbp), %xmm0
callq 0x5300
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movq %rax, %rdi
movss -0x50(%rbp), %xmm0
callq 0x5300
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movq -0x170(%rbp), %rcx
movq (%rcx,%r14), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x56a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53f0
movq -0x170(%rbp), %rcx
movq (%rcx,%r14), %rcx
cvtsi2ssl (%rcx,%r12,4), %xmm0
divss -0x30(%rbp), %xmm0
movq %rax, %rdi
callq 0x5300
movq %rax, %rdi
callq 0x51c0
incq %r12
addq $0x20, %rbx
movq %r13, %rdx
jmp 0xf0ef
movq -0x110(%rbp), %r12
incq %r12
movq -0x108(%rbp), %rbx
addq $0x20, %rbx
movq -0xb0(%rbp), %rdx
jmp 0xf0ba
leaq -0x6c0(%rbp), %rdi
callq 0x5560
leaq -0x6c0(%rbp), %rdi
callq 0x55c0
leaq -0x4c0(%rbp), %rdi
callq 0x5778
movq -0x1a8(%rbp), %rdi
callq 0x7657
leaq -0x1f110(%rbp), %rdi
callq 0x55c0
leaq -0xe0(%rbp), %rdi
callq 0x5778
leaq -0x1f8(%rbp), %rdi
callq 0xfb7a
leaq -0x298(%rbp), %rdi
callq 0xf730
leaq -0x210(%rbp), %rdi
callq 0xf730
leaq -0x170(%rbp), %rdi
callq 0xf730
xorl %r15d, %r15d
leaq -0x8c8(%rbp), %rdi
callq 0x50e0
leaq -0x228(%rbp), %rdi
callq 0xc052
leaq -0x280(%rbp), %rdi
callq 0x5778
leaq -0x260(%rbp), %rdi
callq 0xbfa8
leaq -0x100(%rbp), %rdi
callq 0x911e
movl %r15d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf3e5
jmp 0xf412
movq %rax, %rbx
jmp 0xf543
jmp 0xf412
movq %rax, %rbx
jmp 0xf57a
movq %rax, %rbx
jmp 0xf59c
jmp 0xf3ed
movq %rax, %rbx
leaq -0x3d958(%rbp), %rdi
callq 0xc052
jmp 0xf5b4
movq %rax, %rbx
jmp 0xf5b4
movq %rax, %rbx
leaq -0x3d958(%rbp), %rdi
callq 0xc052
jmp 0xf5c0
movq %rax, %rbx
jmp 0xf5c0
movq %rax, %rbx
leaq -0x3d958(%rbp), %rdi
callq 0xc052
jmp 0xf614
jmp 0xf497
jmp 0xf553
movq %rax, %rbx
jmp 0xf562
movq %rax, %rbx
jmp 0xf5a8
jmp 0xf49f
movq %rax, %rbx
jmp 0xf620
movq %rax, %rbx
jmp 0xf62c
movq %rax, %rbx
jmp 0xf638
movq %rax, %rbx
jmp 0xf56e
jmp 0xf497
jmp 0xf510
jmp 0xf4ac
movq %rax, %rbx
jmp 0xf4bb
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
callq 0x5778
jmp 0xf442
movq %rax, %rbx
leaq -0x2b8(%rbp), %rdi
callq 0x5778
jmp 0xf453
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
jmp 0xf4bf
jmp 0xf49f
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0xc052
jmp 0xf513
movq %rax, %rbx
jmp 0xf644
jmp 0xf4ca
jmp 0xf510
jmp 0xf510
movq %rax, %rbx
leaq -0x1f110(%rbp), %rdi
callq 0xc052
jmp 0xf59c
movq %rax, %rbx
jmp 0xf614
movq %rax, %rbx
jmp 0xf51f
jmp 0xf510
jmp 0xf4ca
jmp 0xf510
jmp 0xf4ca
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
callq 0x55c0
leaq -0x80(%rbp), %rdi
callq 0x5778
jmp 0xf51f
jmp 0xf510
jmp 0xf510
movq %rax, %rbx
jmp 0xf608
jmp 0xf510
jmp 0xf588
jmp 0xf58d
movq %rax, %rbx
leaq -0x1f110(%rbp), %rdi
callq 0xc052
jmp 0xf590
movq %rax, %rbx
leaq -0x3d958(%rbp), %rdi
callq 0x90b8
jmp 0xf5d1
jmp 0xf5ce
jmp 0xf5e1
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
callq 0xc052
leaq -0xa0(%rbp), %rdi
callq 0xf730
leaq -0x1a0(%rbp), %rdi
callq 0xf900
leaq -0x6c0(%rbp), %rdi
callq 0x55c0
leaq -0x1e0(%rbp), %rdi
jmp 0xf569
jmp 0xf5e1
jmp 0xf588
movq %rax, %rbx
leaq -0x6c0(%rbp), %rdi
callq 0x55c0
leaq -0x4c0(%rbp), %rdi
callq 0x5778
leaq -0x1f110(%rbp), %rdi
callq 0x55c0
leaq -0xe0(%rbp), %rdi
callq 0x5778
jmp 0xf59c
movq %rax, %rbx
jmp 0xf5f0
movq %rax, %rbx
leaq -0x6c0(%rbp), %rdi
callq 0xf730
leaq -0x1f8(%rbp), %rdi
callq 0xfb7a
leaq -0x298(%rbp), %rdi
callq 0xf730
leaq -0x210(%rbp), %rdi
callq 0xf730
leaq -0x170(%rbp), %rdi
callq 0xf730
jmp 0xf614
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x5778
jmp 0xf5e4
jmp 0xf5e1
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
callq 0x5778
leaq -0x1f110(%rbp), %rdi
callq 0x908a
leaq -0x6c0(%rbp), %rdi
callq 0x5778
leaq -0xe0(%rbp), %rdi
callq 0x911e
leaq -0x8c8(%rbp), %rdi
callq 0x50e0
leaq -0x228(%rbp), %rdi
callq 0xc052
leaq -0x280(%rbp), %rdi
callq 0x5778
leaq -0x260(%rbp), %rdi
callq 0xbfa8
leaq -0x100(%rbp), %rdi
callq 0x911e
movq %rbx, %rdi
callq 0x56c0