// File: 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
subq $0x5cd50, %rsp          # imm = 0x5CD50
movb %r9b, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %sil
movb %sil, -0x11(%rbp)
andb $0x1, %dl
movb %dl, -0x12(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movss %xmm0, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
callq 0x6080
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0xb670
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x5c950(%rbp)
callq 0x1ab40
movq -0x5c950(%rbp), %rsi
movq -0x20(%rbp), %rdi
movl $0x1, %edx
callq 0xced0
movl %eax, -0x5c944(%rbp)
jmp 0x21854
movl -0x5c944(%rbp), %eax
cmpl $0x0, %eax
je 0x21883
movl $0x1, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x24239
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2424a
leaq -0x58(%rbp), %rdi
callq 0xb670
movl %eax, -0x6c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1abf0
movslq -0x6c(%rbp), %rax
movq %rax, -0x5c960(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x5c958(%rbp)
callq 0x6910
movq -0x5c960(%rbp), %rsi
movq -0x5c958(%rbp), %rcx
leaq -0xc8(%rbp), %rdi
movl $0x2d, %edx
callq 0x9150
jmp 0x218da
leaq -0xc9(%rbp), %rdi
callq 0x65a0
movl $0x0, -0xd0(%rbp)
movslq -0x6c(%rbp), %rax
movq %rax, -0x5c970(%rbp)
movl $0x0, -0xec(%rbp)
leaq -0xed(%rbp), %rdi
movq %rdi, -0x5c968(%rbp)
callq 0x1a8f0
movq -0x5c970(%rbp), %rsi
movq -0x5c968(%rbp), %rcx
leaq -0xe8(%rbp), %rdi
leaq -0xec(%rbp), %rdx
callq 0x1a910
jmp 0x2193b
leaq -0xed(%rbp), %rdi
callq 0x1a990
leaq -0x2f8(%rbp), %rdi
callq 0x65f0
jmp 0x21955
movl $0x0, -0x2fc(%rbp)
movl $0x0, -0x300(%rbp)
movslq -0x300(%rbp), %rax
movq %rax, -0x5c978(%rbp)
movq -0x20(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x5c978(%rbp), %rax
cmpq %rcx, %rax
jae 0x222a9
movq -0x20(%rbp), %rdi
movslq -0x300(%rbp), %rsi
callq 0xf2d0
movq %rax, %rdi
leaq -0x2f8(%rbp), %rsi
movl $0x1, %edx
callq 0xa4f0
movl %eax, -0x5c97c(%rbp)
jmp 0x219bf
movl -0x5c97c(%rbp), %eax
cmpl $0x0, %eax
je 0x21a39
movl $0x1, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x241d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x65a0
jmp 0x2422b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xed(%rbp), %rdi
callq 0x1a990
jmp 0x2421f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24213
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24207
leaq -0x320(%rbp), %rdi
movq %rdi, -0x5c988(%rbp)
callq 0x1ab40
movq -0x5c988(%rbp), %rdx
leaq -0x2f8(%rbp), %rdi
leaq -0x304(%rbp), %rsi
callq 0xcd40
jmp 0x21a68
cmpl $0x0, -0x300(%rbp)
jne 0x21a90
movl -0x304(%rbp), %eax
movl %eax, -0xd0(%rbp)
jmp 0x21a90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x22298
movl -0x304(%rbp), %eax
cmpl -0xd0(%rbp), %eax
je 0x21afe
movq 0x57503(%rip), %rdi     # 0x78fa8
leaq 0x37e94(%rip), %rsi     # 0x59940
callq 0x6520
movq %rax, -0x5c990(%rbp)
jmp 0x21aba
movq -0x5c990(%rbp), %rdi
movq 0x574c8(%rip), %rsi     # 0x78f90
callq 0x6570
movq %rax, -0x5c998(%rbp)
jmp 0x21ad6
movq -0x5c998(%rbp), %rdi
movq 0x574ac(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x21aeb
movl $0x0, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x22269
movl -0x304(%rbp), %eax
addl %eax, %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movq %rax, -0x5c9b0(%rbp)
movq %rsp, %rcx
movq %rcx, -0x330(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x5c9a8(%rbp)
movq %rcx, %rsp
movq %rax, -0x338(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xb670
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x5c9a0(%rbp)
testq %rax, %rax
movss %xmm0, -0x5c99c(%rbp)
js 0x21b9c
movss -0x5c9a0(%rbp), %xmm0
movss %xmm0, -0x5c99c(%rbp)
movss -0x5c99c(%rbp), %xmm0
movss 0x37ad0(%rip), %xmm1    # 0x5967c
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x60b0
cvttsd2si %xmm0, %eax
movq %rax, -0x5c9c0(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x5c9b8(%rbp)
movq %rcx, %rsp
movq %rax, -0x340(%rbp)
movq -0x5c9c0(%rbp), %rdx
movq -0x5c9b8(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x6680
movq %rax, -0x5c9c8(%rbp)
jmp 0x21c09
movq -0x5c9c8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x5c9c9(%rbp)
jmp 0x21c27
movb -0x5c9c9(%rbp), %al
testb $0x1, %al
jne 0x21c36
jmp 0x2222e
leaq -0x361(%rbp), %rdi
movq %rdi, -0x5c9d8(%rbp)
callq 0x6910
movq -0x5c9b8(%rbp), %rsi
movq -0x5c9c0(%rbp), %rdx
movq -0x5c9d8(%rbp), %rcx
leaq -0x360(%rbp), %rdi
callq 0x65e0
jmp 0x21c6c
leaq -0x361(%rbp), %rdi
callq 0x65a0
leaq -0x390(%rbp), %rdi
movq %rdi, -0x5c9e0(%rbp)
callq 0x1acc0
movq -0x5c9e0(%rbp), %rsi
leaq -0x360(%rbp), %rdi
callq 0xbd50
jmp 0x21ca0
jmp 0x21ca2
leaq -0x2f8(%rbp), %rdi
callq 0x61c0
movl %eax, -0x5c9e4(%rbp)
jmp 0x21cb6
movl -0x5c9e4(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x5c9e5(%rbp)
je 0x21d11
leaq -0x2f8(%rbp), %rdi
leaq -0x321(%rbp), %rsi
callq 0x6720
movq %rax, -0x5c9f0(%rbp)
jmp 0x21ce5
movq -0x5c9f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x5c9f1(%rbp)
jmp 0x21d03
movb -0x5c9f1(%rbp), %al
movb %al, -0x5c9e5(%rbp)
jmp 0x21d11
movb -0x5c9e5(%rbp), %al
testb $0x1, %al
jne 0x21d20
jmp 0x221df
movsbl -0x321(%rbp), %edi
callq 0x6a20
movq -0x5c9a8(%rbp), %rsi
movq -0x5c9b0(%rbp), %rdx
movb %al, -0x321(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x6680
jmp 0x21d4e
movl -0x304(%rbp), %eax
addl %eax, %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
cltq
movq %rax, -0x5ca08(%rbp)
leaq -0x3b1(%rbp), %rdi
movq %rdi, -0x5ca00(%rbp)
callq 0x6910
movq -0x5c9a8(%rbp), %rsi
movq -0x5ca08(%rbp), %rdx
movq -0x5ca00(%rbp), %rcx
leaq -0x3b0(%rbp), %rdi
callq 0x65e0
jmp 0x21dab
leaq -0x3b1(%rbp), %rdi
callq 0x65a0
movl $0x0, -0x3b8(%rbp)
movslq -0x3b8(%rbp), %rax
movq %rax, -0x5ca10(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x5ca10(%rbp), %rax
cmpq %rcx, %rax
jae 0x21ed8
movslq -0x3b8(%rbp), %rsi
leaq -0x390(%rbp), %rdi
callq 0xedc0
movq %rdx, -0x5ca20(%rbp)
movq %rax, -0x5ca18(%rbp)
jmp 0x21e11
movq -0x5ca20(%rbp), %rax
movq -0x5ca18(%rbp), %rcx
movq %rcx, -0x3c8(%rbp)
movq %rax, -0x3c0(%rbp)
leaq -0x3c8(%rbp), %rdi
callq 0xf510
testb $0x1, %al
jne 0x21e42
jmp 0x21ec2
movl -0x2fc(%rbp), %eax
addl -0x3b8(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x1a9b0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x21ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x361(%rbp), %rdi
callq 0x65a0
jmp 0x22298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x22214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x3b1(%rbp), %rdi
callq 0x65a0
jmp 0x22214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x221d1
jmp 0x21ec4
movl -0x3b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3b8(%rbp)
jmp 0x21dc1
leaq -0xa8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0xf760
movq %rax, -0x5ca28(%rbp)
jmp 0x21ef4
movq -0x5ca28(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xf7c0
movq %rax, -0x3d8(%rbp)
leaq -0x3d0(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
callq 0xf790
testb $0x1, %al
jne 0x21f31
jmp 0x22021
movl $0x0, -0x3dc(%rbp)
movslq -0x3dc(%rbp), %rax
movq %rax, -0x5ca30(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x5ca30(%rbp), %rax
cmpq %rcx, %rax
jae 0x2201c
movslq -0x3dc(%rbp), %rsi
leaq -0x390(%rbp), %rdi
callq 0xedc0
movq %rdx, -0x5ca40(%rbp)
movq %rax, -0x5ca38(%rbp)
jmp 0x21f8b
movq -0x5ca40(%rbp), %rax
movq -0x5ca38(%rbp), %rcx
movq %rcx, -0x3f0(%rbp)
movq %rax, -0x3e8(%rbp)
leaq -0x3f0(%rbp), %rdi
callq 0xf510
testb $0x1, %al
jne 0x21fb9
jmp 0x22006
movb -0x321(%rbp), %al
movb %al, -0x5ca49(%rbp)
leaq -0x3d0(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movl -0x2fc(%rbp), %eax
movl -0x3dc(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x69e0
movq %rax, -0x5ca48(%rbp)
jmp 0x21ff7
movq -0x5ca48(%rbp), %rax
movb -0x5ca49(%rbp), %cl
movb %cl, (%rax)
jmp 0x22008
movl -0x3dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3dc(%rbp)
jmp 0x21f3b
jmp 0x221c0
leaq -0x410(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x6230
jmp 0x22036
movl $0x0, -0x414(%rbp)
movslq -0x414(%rbp), %rax
movq %rax, -0x5ca58(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x5ca58(%rbp), %rax
cmpq %rcx, %rax
jae 0x22128
movslq -0x414(%rbp), %rsi
leaq -0x390(%rbp), %rdi
callq 0xedc0
movq %rdx, -0x5ca68(%rbp)
movq %rax, -0x5ca60(%rbp)
jmp 0x22090
movq -0x5ca68(%rbp), %rax
movq -0x5ca60(%rbp), %rcx
movq %rcx, -0x428(%rbp)
movq %rax, -0x420(%rbp)
leaq -0x428(%rbp), %rdi
callq 0xf510
testb $0x1, %al
jne 0x220be
jmp 0x22112
movb -0x321(%rbp), %al
movb %al, -0x5ca71(%rbp)
movl -0x2fc(%rbp), %eax
movl -0x414(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rsi
leaq -0x410(%rbp), %rdi
callq 0x69e0
movq %rax, -0x5ca70(%rbp)
jmp 0x220f0
movq -0x5ca70(%rbp), %rax
movb -0x5ca71(%rbp), %cl
movb %cl, (%rax)
jmp 0x22112
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x221b2
jmp 0x22114
movl -0x414(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x414(%rbp)
jmp 0x22040
leaq -0x468(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
leaq -0x410(%rbp), %rdx
callq 0x24260
jmp 0x22144
leaq -0xa8(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0xf8b0
movb %dl, -0x5ca81(%rbp)
movq %rax, -0x5ca80(%rbp)
jmp 0x22166
movb -0x5ca81(%rbp), %al
movq -0x5ca80(%rbp), %rcx
movq %rcx, -0x478(%rbp)
movb %al, -0x470(%rbp)
leaq -0x468(%rbp), %rdi
callq 0xf930
leaq -0x410(%rbp), %rdi
callq 0x6a08
jmp 0x221c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x468(%rbp), %rdi
callq 0xf930
leaq -0x410(%rbp), %rdi
callq 0x6a08
jmp 0x221d1
leaq -0x3b0(%rbp), %rdi
callq 0x6a08
jmp 0x21ca2
leaq -0x3b0(%rbp), %rdi
callq 0x6a08
jmp 0x22214
leaq -0x2f8(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
callq 0x6340
jmp 0x221f7
leaq -0x390(%rbp), %rdi
callq 0xf720
leaq -0x360(%rbp), %rdi
callq 0x6a08
jmp 0x21be6
leaq -0x390(%rbp), %rdi
callq 0xf720
leaq -0x360(%rbp), %rdi
callq 0x6a08
jmp 0x22298
leaq -0x320(%rbp), %rdi
callq 0xb670
movl %eax, %ecx
movl -0x2fc(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x2fc(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x60f0
jmp 0x22258
movq -0x330(%rbp), %rax
movq %rax, %rsp
movl $0x0, -0x68(%rbp)
leaq -0x320(%rbp), %rdi
callq 0xfe90
movl -0x68(%rbp), %eax
testl %eax, %eax
jne 0x241d5
jmp 0x22282
jmp 0x22284
movl -0x300(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x300(%rbp)
jmp 0x21969
leaq -0x320(%rbp), %rdi
callq 0xfe90
jmp 0x24207
leaq -0xa8(%rbp), %rdi
callq 0x1aa60
movq %rax, %rsi
movq 0x56ce9(%rip), %rdi     # 0x78fa8
callq 0x6120
movq %rax, -0x5ca90(%rbp)
jmp 0x222cd
movq -0x5ca90(%rbp), %rdi
leaq 0x3768c(%rip), %rsi     # 0x59967
callq 0x6520
movq %rax, -0x5ca98(%rbp)
jmp 0x222e9
movq -0x5ca98(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x68d0
movq %rax, -0x5caa0(%rbp)
jmp 0x22301
movq -0x5caa0(%rbp), %rdi
leaq 0x371a1(%rip), %rsi     # 0x594b0
callq 0x6520
movq %rax, -0x5caa8(%rbp)
jmp 0x2231d
movq -0x5caa8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x68d0
movq %rax, -0x5cab0(%rbp)
jmp 0x22335
movq -0x5cab0(%rbp), %rdi
leaq 0x38776(%rip), %rsi     # 0x5aab9
callq 0x6520
movq %rax, -0x5cab8(%rbp)
jmp 0x22351
movq -0x5cab8(%rbp), %rdi
movq 0x56c31(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x22366
movslq -0x6c(%rbp), %rax
movq %rax, -0x5cac8(%rbp)
movl $0x0, -0x4ac(%rbp)
leaq -0x4ad(%rbp), %rdi
movq %rdi, -0x5cac0(%rbp)
callq 0x1a8f0
movq -0x5cac8(%rbp), %rsi
movq -0x5cac0(%rbp), %rcx
leaq -0x4a8(%rbp), %rdi
leaq -0x4ac(%rbp), %rdx
callq 0x1a910
jmp 0x223b1
leaq -0x4ae(%rbp), %rdi
movq %rdi, -0x5cad0(%rbp)
callq 0x242a0
movq -0x5cac8(%rbp), %rsi
movq -0x5cad0(%rbp), %rcx
leaq -0x490(%rbp), %rdi
leaq -0x4a8(%rbp), %rdx
callq 0x242c0
jmp 0x223e7
leaq -0x4ae(%rbp), %rdi
callq 0x24340
leaq -0x4a8(%rbp), %rdi
callq 0x1aa00
leaq -0x4ad(%rbp), %rdi
callq 0x1a990
movslq -0x6c(%rbp), %rax
movq %rax, -0x5cae0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1aa60
movl %eax, -0x4e4(%rbp)
leaq -0x4e5(%rbp), %rdi
movq %rdi, -0x5cad8(%rbp)
callq 0x1a8f0
movq -0x5cae0(%rbp), %rsi
movq -0x5cad8(%rbp), %rcx
leaq -0x4e0(%rbp), %rdi
leaq -0x4e4(%rbp), %rdx
callq 0x1a910
jmp 0x2245e
leaq -0x4e6(%rbp), %rdi
movq %rdi, -0x5cae8(%rbp)
callq 0x242a0
movq -0x5cae0(%rbp), %rsi
movq -0x5cae8(%rbp), %rcx
leaq -0x4c8(%rbp), %rdi
leaq -0x4e0(%rbp), %rdx
callq 0x242c0
jmp 0x22494
leaq -0x4e6(%rbp), %rdi
callq 0x24340
leaq -0x4e0(%rbp), %rdi
callq 0x1aa00
leaq -0x4e5(%rbp), %rdi
callq 0x1a990
movslq -0x6c(%rbp), %rax
movq %rax, -0x5caf8(%rbp)
movl $0x0, -0x51c(%rbp)
leaq -0x51d(%rbp), %rdi
movq %rdi, -0x5caf0(%rbp)
callq 0x1a8f0
movq -0x5caf8(%rbp), %rsi
movq -0x5caf0(%rbp), %rcx
leaq -0x518(%rbp), %rdi
leaq -0x51c(%rbp), %rdx
callq 0x1a910
jmp 0x22503
leaq -0x51e(%rbp), %rdi
movq %rdi, -0x5cb00(%rbp)
callq 0x242a0
movq -0x5caf8(%rbp), %rsi
movq -0x5cb00(%rbp), %rcx
leaq -0x500(%rbp), %rdi
leaq -0x518(%rbp), %rdx
callq 0x242c0
jmp 0x22539
leaq -0x51e(%rbp), %rdi
callq 0x24340
leaq -0x518(%rbp), %rdi
callq 0x1aa00
leaq -0x51d(%rbp), %rdi
callq 0x1a990
movq 0x56a44(%rip), %rdi     # 0x78fa8
leaq 0x3740e(%rip), %rsi     # 0x59979
callq 0x6520
movq %rax, -0x5cb08(%rbp)
jmp 0x22579
movq -0x5cb08(%rbp), %rdi
movq 0x56a09(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x2258e
movslq -0x6c(%rbp), %rax
movq %rax, -0x5cb20(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x1ed80(%rbp), %rdi
movq %rdi, -0x5cb18(%rbp)
callq 0x24360
leaq -0x1ed81(%rbp), %rdi
movq %rdi, -0x5cb10(%rbp)
callq 0x243b0
movq -0x5cb20(%rbp), %rsi
movq -0x5cb18(%rbp), %rdx
movq -0x5cb10(%rbp), %rcx
leaq -0x538(%rbp), %rdi
callq 0x243d0
jmp 0x225e6
leaq -0x1ed81(%rbp), %rdi
callq 0x24450
leaq -0x3d5d0(%rbp), %rdi
callq 0x24470
leaq -0xa8(%rbp), %rdi
callq 0x1aa60
cmpq $0x0, %rax
jbe 0x22d72
xorps %xmm0, %xmm0
movaps %xmm0, -0x3d600(%rbp)
movq $0x0, -0x3d5f0(%rbp)
leaq -0x3d600(%rbp), %rdi
movq %rdi, -0x5cb30(%rbp)
callq 0x1ac10
leaq -0x3d601(%rbp), %rdi
movq %rdi, -0x5cb28(%rbp)
callq 0x242a0
movq -0x5cb30(%rbp), %rdx
movq -0x5cb28(%rbp), %rcx
leaq -0x3d5e8(%rbp), %rdi
movl $0x6, %esi
callq 0x242c0
jmp 0x22670
leaq -0x3d601(%rbp), %rdi
callq 0x24340
leaq -0x3d600(%rbp), %rdi
callq 0x1aa00
leaq -0xa8(%rbp), %rdi
callq 0xff80
movq %rax, -0x3d610(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xf7c0
movq %rax, -0x3d618(%rbp)
movl $0x0, -0x3d61c(%rbp)
leaq -0x3d610(%rbp), %rdi
leaq -0x3d618(%rbp), %rsi
callq 0xf790
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x5cb31(%rbp)
jne 0x226dc
jmp 0x226ef
cmpl $0xf4240, -0x3d61c(%rbp) # imm = 0xF4240
setl %al
movb %al, -0x5cb31(%rbp)
movb -0x5cb31(%rbp), %al
testb $0x1, %al
jne 0x226fe
jmp 0x22c37
leaq -0x3d5e8(%rbp), %rdi
movq %rdi, -0x5cb48(%rbp)
callq 0x244d0
movq -0x5cb48(%rbp), %rdi
movq %rax, -0x3d628(%rbp)
callq 0x24500
movq %rax, -0x3d630(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x3d650(%rbp)
movq $0x0, -0x3d640(%rbp)
leaq -0x3d650(%rbp), %rdi
movq %rdi, -0x5cb40(%rbp)
callq 0x1ac10
movq -0x5cb40(%rbp), %rdx
movq -0x3d628(%rbp), %rdi
movq -0x3d630(%rbp), %rsi
callq 0x24490
jmp 0x2276f
leaq -0x3d650(%rbp), %rdi
callq 0x1aa00
movl $0x0, -0x3d654(%rbp)
movl -0x3d654(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x229c9
leaq -0x3d610(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x3d654(%rbp), %rsi
callq 0x69e0
movq %rax, -0x5cb50(%rbp)
jmp 0x227bc
movq -0x5cb50(%rbp), %rax
movsbq (%rax), %rcx
leaq 0x56dc2(%rip), %rax     # 0x79590
movsbq (%rax,%rcx), %rsi
leaq -0x3d5e8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
leaq -0x3d654(%rbp), %rsi
callq 0x1ac30
jmp 0x227f0
leaq -0x3d610(%rbp), %rdi
callq 0xf880
movq %rax, %rdi
addq $0x20, %rdi
movslq -0x3d654(%rbp), %rsi
callq 0x69e0
movq %rax, -0x5cb58(%rbp)
jmp 0x22818
movq -0x5cb58(%rbp), %rax
movsbq (%rax), %rcx
leaq 0x56d66(%rip), %rax     # 0x79590
movsbl (%rax,%rcx), %eax
cmpl $0x5, %eax
jne 0x229b3
movslq -0x3d654(%rbp), %rsi
leaq -0x538(%rbp), %rdi
callq 0x24550
movq %rax, %rdi
movslq -0x3d61c(%rbp), %rsi
movl $0x1, %edx
callq 0x24570
jmp 0x22860
jmp 0x229b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x22897
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x4ae(%rbp), %rdi
callq 0x24340
leaq -0x4a8(%rbp), %rdi
callq 0x1aa00
leaq -0x4ad(%rbp), %rdi
callq 0x1a990
jmp 0x24207
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x228da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x4e6(%rbp), %rdi
callq 0x24340
leaq -0x4e0(%rbp), %rdi
callq 0x1aa00
leaq -0x4e5(%rbp), %rdi
callq 0x1a990
jmp 0x241c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2291d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51e(%rbp), %rdi
callq 0x24340
leaq -0x518(%rbp), %rdi
callq 0x1aa00
leaq -0x51d(%rbp), %rdi
callq 0x1a990
jmp 0x241bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x241af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1ed81(%rbp), %rdi
callq 0x24450
jmp 0x241af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x3d601(%rbp), %rdi
callq 0x24340
leaq -0x3d600(%rbp), %rdi
callq 0x1aa00
jmp 0x241a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x3d650(%rbp), %rdi
callq 0x1aa00
jmp 0x22d61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x22d61
jmp 0x229b5
movl -0x3d654(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d654(%rbp)
jmp 0x22785
leaq -0x3d5e8(%rbp), %rdi
movl $0x5, %esi
callq 0x24530
movq %rax, %rdi
callq 0xf7f0
cmpq $0x0, %rax
jbe 0x229f7
movl -0x3d61c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d61c(%rbp)
movl $0x0, -0x3d658(%rbp)
cmpl $0x4, -0x3d658(%rbp)
jge 0x22bf3
movl -0x3d658(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d65c(%rbp)
cmpl $0x4, -0x3d65c(%rbp)
jge 0x22bdd
movslq -0x3d658(%rbp), %rsi
leaq -0x3d5e8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x3d668(%rbp)
movslq -0x3d658(%rbp), %rsi
leaq -0x3d5e8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c040
movq %rax, -0x3d670(%rbp)
leaq -0x3d668(%rbp), %rdi
leaq -0x3d670(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x22a8a
jmp 0x22bc7
movslq -0x3d65c(%rbp), %rsi
leaq -0x3d5e8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x3d678(%rbp)
movslq -0x3d65c(%rbp), %rsi
leaq -0x3d5e8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c040
movq %rax, -0x3d680(%rbp)
leaq -0x3d678(%rbp), %rdi
leaq -0x3d680(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x22aea
jmp 0x22bb4
leaq -0x3d668(%rbp), %rdi
callq 0x24600
movl (%rax), %eax
movl %eax, -0x5cb5c(%rbp)
leaq -0x3d678(%rbp), %rdi
callq 0x24600
movq %rax, %rcx
movl -0x5cb5c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x22b5d
leaq -0x3d668(%rbp), %rdi
callq 0x24600
movslq (%rax), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, -0x5cb68(%rbp)
leaq -0x3d678(%rbp), %rdi
callq 0x24600
movq -0x5cb68(%rbp), %rdi
movslq (%rax), %rsi
callq 0x1a9b0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x22ba1
leaq -0x3d678(%rbp), %rdi
callq 0x24600
movslq (%rax), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, -0x5cb70(%rbp)
leaq -0x3d668(%rbp), %rdi
callq 0x24600
movq -0x5cb70(%rbp), %rdi
movslq (%rax), %rsi
callq 0x1a9b0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x22ba3
leaq -0x3d678(%rbp), %rdi
callq 0x24620
jmp 0x22aac
jmp 0x22bb6
leaq -0x3d668(%rbp), %rdi
callq 0x24620
jmp 0x22a4c
jmp 0x22bc9
movl -0x3d65c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d65c(%rbp)
jmp 0x22a1d
jmp 0x22bdf
movl -0x3d658(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d658(%rbp)
jmp 0x22a01
leaq -0x3d610(%rbp), %rdi
xorl %esi, %esi
callq 0x10070
movq %rax, -0x3d688(%rbp)
movq -0x3d688(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x10030
movq %rax, -0x5cb78(%rbp)
jmp 0x22c24
movq -0x5cb78(%rbp), %rax
movq %rax, -0x3d690(%rbp)
jmp 0x226b8
movl $0x0, -0x3d694(%rbp)
movl -0x3d694(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x22d50
movl -0x3d694(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d698(%rbp)
movl -0x3d698(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x22d21
movslq -0x3d694(%rbp), %rsi
leaq -0x538(%rbp), %rdi
callq 0x24550
movq %rax, -0x5cb88(%rbp)
movslq -0x3d698(%rbp), %rsi
leaq -0x538(%rbp), %rdi
callq 0x24550
movq -0x5cb88(%rbp), %rsi
movq %rax, %rdx
leaq -0x5bee0(%rbp), %rdi
callq 0x24640
leaq -0x3d5d0(%rbp), %rdi
leaq -0x5bee0(%rbp), %rsi
movl $0x1e848, %edx          # imm = 0x1E848
callq 0x6460
leaq -0x3d5d0(%rbp), %rdi
callq 0x24680
movq %rax, -0x5cb80(%rbp)
movslq -0x3d694(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x3d698(%rbp), %rsi
callq 0x1a9b0
movq -0x5cb80(%rbp), %rdx
movslq (%rax), %rcx
subq %rdx, %rcx
movl %ecx, (%rax)
movl -0x3d698(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d698(%rbp)
jmp 0x22c5f
movslq -0x3d694(%rbp), %rsi
leaq -0x538(%rbp), %rdi
callq 0x24550
movq %rax, %rdi
callq 0x246a0
movl -0x3d694(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d694(%rbp)
jmp 0x22c41
leaq -0x3d5e8(%rbp), %rdi
callq 0x246d0
jmp 0x225fe
leaq -0x3d5e8(%rbp), %rdi
callq 0x246d0
jmp 0x241a3
movq -0x10(%rbp), %rsi
leaq 0x36c16(%rip), %rdx     # 0x59993
leaq -0x5bf00(%rbp), %rdi
callq 0x1ace0
jmp 0x22d8b
leaq -0x5c100(%rbp), %rdi
leaq -0x5bf00(%rbp), %rsi
movl $0x10, %edx
callq 0x69b0
jmp 0x22da5
leaq 0x36bec(%rip), %rsi     # 0x59998
leaq -0x5c100(%rbp), %rdi
callq 0x6520
movq %rax, -0x5cb90(%rbp)
jmp 0x22dc1
movq -0x5cb90(%rbp), %rdi
movq 0x561c1(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x22dd6
testb $0x1, -0x12(%rbp)
je 0x23bad
movq -0x10(%rbp), %rsi
leaq 0x36bb5(%rip), %rdx     # 0x599a0
leaq -0x5c120(%rbp), %rdi
callq 0x1ace0
jmp 0x22df9
leaq -0x5c320(%rbp), %rdi
leaq -0x5c120(%rbp), %rsi
movl $0x10, %edx
callq 0x69b0
jmp 0x22e13
leaq -0x5c350(%rbp), %rdi
callq 0x24730
leaq -0x5c368(%rbp), %rdi
callq 0x24750
movq 0x56176(%rip), %rdi     # 0x78fa8
leaq 0x36b75(%rip), %rsi     # 0x599ae
callq 0x6520
movq %rax, -0x5cb98(%rbp)
jmp 0x22e47
movq -0x5cb98(%rbp), %rdi
leaq -0x5c120(%rbp), %rsi
callq 0x64d0
movq %rax, -0x5cba0(%rbp)
jmp 0x22e63
movq -0x5cba0(%rbp), %rdi
movq 0x5611f(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x22e78
leaq 0x36b45(%rip), %rsi     # 0x599c4
leaq -0x5c320(%rbp), %rdi
callq 0x6520
movq %rax, -0x5cba8(%rbp)
jmp 0x22e94
movq -0x5cba8(%rbp), %rdi
movq 0x560ee(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x22ea9
movl $0x0, -0x5c36c(%rbp)
movl -0x5c36c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x237d4
leaq -0x5c388(%rbp), %rdi
movq %rdi, -0x5cbb0(%rbp)
callq 0x1ac10
movq -0x5cbb0(%rbp), %rdi
leaq -0x5c36c(%rbp), %rsi
callq 0x1ac30
jmp 0x22eea
movl $0x0, -0x5c38c(%rbp)
movl -0x5c36c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c390(%rbp)
movl -0x5c390(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x2324d
movslq -0x5c36c(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x5cbc8(%rbp)
callq 0x1a9b0
movq -0x5cbc8(%rbp), %rdi
movq %rax, -0x5cbc0(%rbp)
movslq -0x5c390(%rbp), %rsi
callq 0x1a9b0
movq -0x5cbc0(%rbp), %rdi
movq %rax, %rsi
callq 0x24770
movq %rax, -0x5cbb8(%rbp)
jmp 0x22f5e
movq -0x5cbb8(%rbp), %rax
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x5c394(%rbp)
movslq -0x5c36c(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c390(%rbp), %rsi
callq 0x1a9b0
cvtsi2ssl (%rax), %xmm0
divss -0x5c394(%rbp), %xmm0
movss %xmm0, -0x5c398(%rbp)
movslq -0x5c36c(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c390(%rbp), %rsi
callq 0x1a9b0
movl (%rax), %eax
cmpl -0x24(%rbp), %eax
jg 0x23237
movss -0x5c398(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x23237
movl -0x5c38c(%rbp), %eax
incl %eax
movl %eax, -0x5c38c(%rbp)
leaq -0x5c388(%rbp), %rdi
leaq -0x5c390(%rbp), %rsi
callq 0x1ac30
jmp 0x23009
cmpl $0x0, -0x24(%rbp)
jle 0x230de
movslq -0x5c36c(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c390(%rbp), %rsi
callq 0x1a9b0
cvtsi2ssl (%rax), %xmm0
cvtsi2ssl -0x24(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x3621a(%rip), %xmm0    # 0x59268
subsd %xmm1, %xmm0
movsd 0x368de(%rip), %xmm1    # 0x59938
mulsd %xmm1, %xmm0
movsd 0x36202(%rip), %xmm1    # 0x59268
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c39c(%rbp)
jmp 0x230ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x241a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24197
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2418b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23b9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23b78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x237c3
movss 0x35f1e(%rip), %xmm0    # 0x59004
movss %xmm0, -0x5c39c(%rbp)
leaq 0x371bc(%rip), %rsi     # 0x5a2b1
leaq -0x5c100(%rbp), %rdi
callq 0x6520
movq %rax, -0x5cbd0(%rbp)
jmp 0x2310a
movslq -0x5c36c(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq -0x5cbd0(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5cbd8(%rbp)
jmp 0x23132
movq -0x5cbd8(%rbp), %rdi
leaq 0x3689b(%rip), %rsi     # 0x599db
callq 0x6520
movq %rax, -0x5cbe0(%rbp)
jmp 0x2314e
movslq -0x5c390(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq -0x5cbe0(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5cbe8(%rbp)
jmp 0x23176
movq -0x5cbe8(%rbp), %rdi
leaq 0x3685c(%rip), %rsi     # 0x599e0
callq 0x6520
movq %rax, -0x5cbf0(%rbp)
jmp 0x23192
movslq -0x5c36c(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c390(%rbp), %rsi
callq 0x1a9b0
movq -0x5cbf0(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x5cbf8(%rbp)
jmp 0x231cb
movq -0x5cbf8(%rbp), %rdi
leaq 0x36811(%rip), %rsi     # 0x599ea
callq 0x6520
movq %rax, -0x5cc00(%rbp)
jmp 0x231e7
movq -0x5cc00(%rbp), %rdi
movss -0x5c39c(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x5cc08(%rbp)
jmp 0x23204
movq -0x5cc08(%rbp), %rdi
leaq 0x367e2(%rip), %rsi     # 0x599f4
callq 0x6520
movq %rax, -0x5cc10(%rbp)
jmp 0x23220
movq -0x5cc10(%rbp), %rdi
movq 0x55d62(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x23235
jmp 0x23237
jmp 0x23239
movl -0x5c390(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c390(%rbp)
jmp 0x22f03
cmpl $0x0, -0x5c38c(%rbp)
jne 0x232d3
testb $0x1, -0x29(%rbp)
je 0x232d3
leaq 0x3704e(%rip), %rsi     # 0x5a2b1
leaq -0x5c100(%rbp), %rdi
callq 0x6520
movq %rax, -0x5cc18(%rbp)
jmp 0x23278
movslq -0x5c36c(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq -0x5cc18(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5cc20(%rbp)
jmp 0x232a0
movq -0x5cc20(%rbp), %rdi
leaq 0x36747(%rip), %rsi     # 0x599f5
callq 0x6520
movq %rax, -0x5cc28(%rbp)
jmp 0x232bc
movq -0x5cc28(%rbp), %rdi
movq 0x55cc6(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x232d1
jmp 0x232d3
leaq -0x5c368(%rbp), %rdi
callq 0x247b0
movl %eax, -0x5c3a0(%rbp)
leaq -0x5c388(%rbp), %rdi
callq 0x1c1b0
movq %rax, -0x5c3a8(%rbp)
leaq -0x5c388(%rbp), %rdi
callq 0x1c040
movq %rax, -0x5c3b0(%rbp)
leaq -0x5c3a8(%rbp), %rdi
leaq -0x5c3b0(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x23327
jmp 0x233c6
leaq -0x5c3a8(%rbp), %rdi
callq 0x24600
movq %rax, %rsi
leaq -0x5c350(%rbp), %rdi
callq 0x247e0
movq %rax, -0x5cc30(%rbp)
jmp 0x2334b
movq -0x5cc30(%rbp), %rax
movq %rax, -0x5c3b8(%rbp)
leaq -0x5c350(%rbp), %rdi
callq 0x24840
movq %rax, -0x5c3c0(%rbp)
leaq -0x5c3b8(%rbp), %rdi
leaq -0x5c3c0(%rbp), %rsi
callq 0x24810
testb $0x1, %al
jne 0x23385
jmp 0x233b3
leaq -0x5c3b8(%rbp), %rdi
callq 0x24870
movl 0x4(%rax), %eax
cmpl -0x5c3a0(%rbp), %eax
jge 0x233b1
leaq -0x5c3b8(%rbp), %rdi
callq 0x24870
movl 0x4(%rax), %eax
movl %eax, -0x5c3a0(%rbp)
jmp 0x233b3
jmp 0x233b5
leaq -0x5c3a8(%rbp), %rdi
callq 0x24620
jmp 0x232f8
movslq -0x5c3a0(%rbp), %rax
movq %rax, -0x5cc38(%rbp)
leaq -0x5c368(%rbp), %rdi
callq 0x247b0
movq %rax, %rcx
movq -0x5cc38(%rbp), %rax
cmpq %rcx, %rax
jne 0x23457
xorps %xmm0, %xmm0
movaps %xmm0, -0x5c3e0(%rbp)
movq $0x0, -0x5c3d0(%rbp)
leaq -0x5c3e0(%rbp), %rdi
movq %rdi, -0x5cc40(%rbp)
callq 0x1ac10
movq -0x5cc40(%rbp), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24890
jmp 0x2342c
leaq -0x5c3e0(%rbp), %rdi
callq 0x1aa00
jmp 0x23457
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x5c3e0(%rbp), %rdi
callq 0x1aa00
jmp 0x237c3
leaq -0x5c388(%rbp), %rdi
callq 0x1c1b0
movq %rax, -0x5c3e8(%rbp)
leaq -0x5c388(%rbp), %rdi
callq 0x1c040
movq %rax, -0x5c3f0(%rbp)
leaq -0x5c3e8(%rbp), %rdi
leaq -0x5c3f0(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x23499
jmp 0x236b1
leaq -0x5c3e8(%rbp), %rdi
callq 0x24600
movq %rax, %rsi
leaq -0x5c350(%rbp), %rdi
callq 0x247e0
movq %rax, -0x5cc48(%rbp)
jmp 0x234bd
movq -0x5cc48(%rbp), %rax
movq %rax, -0x5c3f8(%rbp)
leaq -0x5c350(%rbp), %rdi
callq 0x24840
movq %rax, -0x5c400(%rbp)
leaq -0x5c3f8(%rbp), %rdi
leaq -0x5c400(%rbp), %rsi
callq 0x24810
testb $0x1, %al
jne 0x234fa
jmp 0x235f7
leaq -0x5c3f8(%rbp), %rdi
callq 0x24870
movl 0x4(%rax), %eax
cmpl -0x5c3a0(%rbp), %eax
je 0x235f2
leaq -0x5c3f8(%rbp), %rdi
callq 0x24870
movslq 0x4(%rax), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x5c408(%rbp)
leaq -0x5c3f8(%rbp), %rdi
callq 0x24870
movslq 0x4(%rax), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c040
movq %rax, -0x5c410(%rbp)
leaq -0x5c408(%rbp), %rdi
leaq -0x5c410(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x23584
jmp 0x235ce
movslq -0x5c3a0(%rbp), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, -0x5cc50(%rbp)
leaq -0x5c408(%rbp), %rdi
callq 0x24600
movq -0x5cc50(%rbp), %rdi
movq %rax, %rsi
callq 0x1ac30
jmp 0x235bb
jmp 0x235bd
leaq -0x5c408(%rbp), %rdi
callq 0x24620
jmp 0x23540
leaq -0x5c3f8(%rbp), %rdi
callq 0x24870
movslq 0x4(%rax), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x248c0
jmp 0x2369e
leaq -0x5c3e8(%rbp), %rdi
callq 0x24600
movq %rax, %rdi
leaq -0x5c3a0(%rbp), %rsi
callq 0x24920
movq %rax, -0x5cc58(%rbp)
jmp 0x2361b
movq -0x5cc58(%rbp), %rax
movq %rax, -0x5c418(%rbp)
leaq -0x5c350(%rbp), %rdi
leaq -0x5c418(%rbp), %rsi
callq 0x248e0
movb %dl, -0x5cc61(%rbp)
movq %rax, -0x5cc60(%rbp)
jmp 0x2364b
movb -0x5cc61(%rbp), %al
movq -0x5cc60(%rbp), %rcx
movq %rcx, -0x5c428(%rbp)
movb %al, -0x5c420(%rbp)
movslq -0x5c3a0(%rbp), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, -0x5cc70(%rbp)
leaq -0x5c3e8(%rbp), %rdi
callq 0x24600
movq -0x5cc70(%rbp), %rdi
movq %rax, %rsi
callq 0x1ac30
jmp 0x2369c
jmp 0x2369e
jmp 0x236a0
leaq -0x5c3e8(%rbp), %rdi
callq 0x24620
jmp 0x2346a
movslq -0x5c3a0(%rbp), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x5c430(%rbp)
movslq -0x5c3a0(%rbp), %rsi
leaq -0x5c368(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
callq 0x1c040
movq %rax, -0x5c438(%rbp)
leaq -0x5c430(%rbp), %rdi
leaq -0x5c438(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x23711
jmp 0x237a3
leaq -0x5c430(%rbp), %rdi
callq 0x24600
movq %rax, %rsi
leaq -0x5c350(%rbp), %rdi
callq 0x247e0
movq %rax, -0x5cc78(%rbp)
jmp 0x23735
movq -0x5cc78(%rbp), %rax
movq %rax, -0x5c440(%rbp)
leaq -0x5c350(%rbp), %rdi
callq 0x24840
movq %rax, -0x5c448(%rbp)
leaq -0x5c440(%rbp), %rdi
leaq -0x5c448(%rbp), %rsi
callq 0x24810
testb $0x1, %al
jne 0x2376f
jmp 0x23790
movl -0x5c3a0(%rbp), %eax
movl %eax, -0x5cc7c(%rbp)
leaq -0x5c440(%rbp), %rdi
callq 0x24870
movl -0x5cc7c(%rbp), %ecx
movl %ecx, 0x4(%rax)
jmp 0x23792
leaq -0x5c430(%rbp), %rdi
callq 0x24620
jmp 0x236d3
leaq -0x5c388(%rbp), %rdi
callq 0x1aa00
movl -0x5c36c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c36c(%rbp)
jmp 0x22eb3
leaq -0x5c388(%rbp), %rdi
callq 0x1aa00
jmp 0x23b78
leaq -0x5c350(%rbp), %rdi
callq 0x24950
movq %rax, -0x5c450(%rbp)
leaq -0x5c350(%rbp), %rdi
callq 0x24840
movq %rax, -0x5c458(%rbp)
leaq -0x5c450(%rbp), %rdi
leaq -0x5c458(%rbp), %rsi
callq 0x24810
testb $0x1, %al
jne 0x23816
jmp 0x238b0
leaq -0x5c450(%rbp), %rdi
callq 0x24870
movslq (%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq %rax, %rsi
leaq -0x5c320(%rbp), %rdi
callq 0x64d0
movq %rax, -0x5cc88(%rbp)
jmp 0x23846
movq -0x5cc88(%rbp), %rdi
leaq 0x36a5d(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cc90(%rbp)
jmp 0x23862
leaq -0x5c450(%rbp), %rdi
callq 0x24870
movq -0x5cc90(%rbp), %rdi
movl 0x4(%rax), %esi
incl %esi
callq 0x68d0
movq %rax, -0x5cc98(%rbp)
jmp 0x23888
movq -0x5cc98(%rbp), %rdi
leaq 0x360cf(%rip), %rsi     # 0x59965
callq 0x6520
jmp 0x2389d
jmp 0x2389f
leaq -0x5c450(%rbp), %rdi
callq 0x24980
jmp 0x237e7
leaq -0x5c320(%rbp), %rdi
callq 0x6740
jmp 0x238be
movl $0x0, -0x5c45c(%rbp)
leaq -0x5c368(%rbp), %rdi
callq 0x244d0
movq %rax, -0x5c468(%rbp)
leaq -0x5c368(%rbp), %rdi
callq 0x24500
movq %rax, -0x5c470(%rbp)
leaq -0x5c468(%rbp), %rdi
leaq -0x5c470(%rbp), %rsi
callq 0x249b0
testb $0x1, %al
jne 0x2390a
jmp 0x23b46
movl -0x5c45c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c45c(%rbp)
leaq -0x5c468(%rbp), %rdi
callq 0x249f0
movq %rax, %rdi
callq 0xf7f0
cmpq $0x1, %rax
jbe 0x23b33
movq -0x10(%rbp), %rsi
leaq 0x360b6(%rip), %rdx     # 0x599f8
leaq -0x5c4d0(%rbp), %rdi
callq 0x1ace0
jmp 0x23950
movl -0x5c45c(%rbp), %esi
leaq -0x5c4f0(%rbp), %rdi
callq 0x24b30
jmp 0x23964
leaq -0x5c4b0(%rbp), %rdi
leaq -0x5c4d0(%rbp), %rsi
leaq -0x5c4f0(%rbp), %rdx
callq 0x24a60
jmp 0x23980
leaq 0x3607b(%rip), %rdx     # 0x59a02
leaq -0x5c490(%rbp), %rdi
leaq -0x5c4b0(%rbp), %rsi
callq 0x24a10
jmp 0x2399c
leaq -0x5c4b0(%rbp), %rdi
callq 0x6a08
leaq -0x5c4f0(%rbp), %rdi
callq 0x6a08
leaq -0x5c4d0(%rbp), %rdi
callq 0x6a08
leaq -0x5c6f0(%rbp), %rdi
leaq -0x5c490(%rbp), %rsi
movl $0x10, %edx
callq 0x69b0
jmp 0x239da
leaq -0x5c468(%rbp), %rdi
callq 0x249f0
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x5c6f8(%rbp)
leaq -0x5c468(%rbp), %rdi
callq 0x249f0
movq %rax, %rdi
callq 0x1c040
movq %rax, -0x5c700(%rbp)
leaq -0x5c6f8(%rbp), %rdi
leaq -0x5c700(%rbp), %rsi
callq 0x245c0
testb $0x1, %al
jne 0x23a2c
jmp 0x23afd
leaq -0x5c6f8(%rbp), %rdi
callq 0x24600
movslq (%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq %rax, %rsi
leaq -0x5c6f0(%rbp), %rdi
callq 0x64d0
movq %rax, -0x5cca0(%rbp)
jmp 0x23a5c
movq -0x5cca0(%rbp), %rdi
leaq 0x35efb(%rip), %rsi     # 0x59965
callq 0x6520
jmp 0x23a71
jmp 0x23a73
leaq -0x5c6f8(%rbp), %rdi
callq 0x24620
jmp 0x239f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23ac4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23ab8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x5c4b0(%rbp), %rdi
callq 0x6a08
leaq -0x5c4f0(%rbp), %rdi
callq 0x6a08
leaq -0x5c4d0(%rbp), %rdi
callq 0x6a08
jmp 0x23b78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23b25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x5c6f0(%rbp), %rdi
callq 0x67d0
jmp 0x23b25
leaq -0x5c6f0(%rbp), %rdi
callq 0x6740
jmp 0x23b0b
leaq -0x5c6f0(%rbp), %rdi
callq 0x67d0
leaq -0x5c490(%rbp), %rdi
callq 0x6a08
jmp 0x23b33
leaq -0x5c490(%rbp), %rdi
callq 0x6a08
jmp 0x23b78
jmp 0x23b35
leaq -0x5c468(%rbp), %rdi
callq 0x24c50
jmp 0x238db
leaq -0x5c368(%rbp), %rdi
callq 0x246d0
leaq -0x5c350(%rbp), %rdi
callq 0x24c70
leaq -0x5c320(%rbp), %rdi
callq 0x67d0
leaq -0x5c120(%rbp), %rdi
callq 0x6a08
jmp 0x23bad
leaq -0x5c368(%rbp), %rdi
callq 0x246d0
leaq -0x5c350(%rbp), %rdi
callq 0x24c70
leaq -0x5c320(%rbp), %rdi
callq 0x67d0
leaq -0x5c120(%rbp), %rdi
callq 0x6a08
jmp 0x2418b
leaq 0x35e53(%rip), %rsi     # 0x59a07
leaq -0x5c100(%rbp), %rdi
callq 0x6520
movq %rax, -0x5cca8(%rbp)
jmp 0x23bc9
movq -0x5cca8(%rbp), %rdi
movq 0x553b9(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x23bde
leaq -0x5c100(%rbp), %rdi
callq 0x6740
jmp 0x23bec
testb $0x1, -0x11(%rbp)
je 0x2411a
movq -0x10(%rbp), %rsi
leaq 0x35e08(%rip), %rdx     # 0x59a09
leaq -0x5c720(%rbp), %rdi
callq 0x1ace0
jmp 0x23c0f
movq 0x55392(%rip), %rdi     # 0x78fa8
leaq 0x35dfb(%rip), %rsi     # 0x59a18
callq 0x6520
movq %rax, -0x5ccb0(%rbp)
jmp 0x23c2b
movq -0x5ccb0(%rbp), %rdi
leaq -0x5c720(%rbp), %rsi
callq 0x64d0
movq %rax, -0x5ccb8(%rbp)
jmp 0x23c47
movq -0x5ccb8(%rbp), %rdi
movq 0x5533b(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x23c5c
leaq -0x5c920(%rbp), %rdi
leaq -0x5c720(%rbp), %rsi
movl $0x10, %edx
callq 0x69b0
jmp 0x23c76
leaq 0x35db2(%rip), %rsi     # 0x59a2f
leaq -0x5c920(%rbp), %rdi
callq 0x6520
movq %rax, -0x5ccc0(%rbp)
jmp 0x23c92
movq -0x5ccc0(%rbp), %rdi
movq 0x552f0(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x23ca7
movl $0x0, -0x5c924(%rbp)
movl -0x5c924(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x240e4
movl -0x5c924(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c928(%rbp)
movl -0x5c928(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x240ce
movslq -0x5c924(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c928(%rbp), %rsi
callq 0x1a9b0
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x5c92c(%rbp)
movslq -0x5c924(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x1a9b0
movl (%rax), %eax
movl %eax, -0x5cccc(%rbp)
movslq -0x5c924(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c928(%rbp), %rsi
callq 0x1a9b0
movq %rax, %rcx
movl -0x5cccc(%rbp), %eax
subl (%rcx), %eax
movl %eax, -0x5ccc8(%rbp)
movslq -0x5c928(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x1a9b0
movq %rax, %rcx
movl -0x5ccc8(%rbp), %eax
addl (%rcx), %eax
movl %eax, -0x5ccc4(%rbp)
movslq -0x5c924(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c928(%rbp), %rsi
callq 0x1a9b0
movq %rax, %rcx
movl -0x5ccc4(%rbp), %eax
subl (%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x5c930(%rbp)
movss -0x5c92c(%rbp), %xmm0
movss -0x5c930(%rbp), %xmm1
addss -0x5c92c(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x5c934(%rbp)
movss -0x5c934(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x23e30
jp 0x23e30
movss 0x3520f(%rip), %xmm0    # 0x59004
movss %xmm0, -0x5c938(%rbp)
jmp 0x23e9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2410c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x5c920(%rbp), %rdi
callq 0x67d0
jmp 0x2410c
movl -0xd0(%rbp), %eax
shll %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x35429(%rip), %xmm0    # 0x59270
divsd %xmm1, %xmm0
movsd %xmm0, -0x5ccd8(%rbp)
movss 0x35ad9(%rip), %xmm0    # 0x59934
mulss -0x5c934(%rbp), %xmm0
movss 0x35199(%rip), %xmm1    # 0x59004
addss -0x5c934(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6440
movaps %xmm0, %xmm1
movsd -0x5ccd8(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c938(%rbp)
movslq -0x5c924(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq %rax, %rsi
leaq -0x5c920(%rbp), %rdi
callq 0x64d0
movq %rax, -0x5cce0(%rbp)
jmp 0x23ec3
movq -0x5cce0(%rbp), %rdi
leaq 0x363e0(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cce8(%rbp)
jmp 0x23edf
movslq -0x5c928(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x1ab60
movq -0x5cce8(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5ccf0(%rbp)
jmp 0x23f07
movq -0x5ccf0(%rbp), %rdi
leaq 0x3639c(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5ccf8(%rbp)
jmp 0x23f23
movq -0x5ccf8(%rbp), %rdi
cvttss2si -0x5c92c(%rbp), %esi
callq 0x68d0
movq %rax, -0x5cd00(%rbp)
jmp 0x23f40
movq -0x5cd00(%rbp), %rdi
leaq 0x36363(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cd08(%rbp)
jmp 0x23f5c
movq -0x5cd08(%rbp), %rdi
cvttss2si -0x5c930(%rbp), %esi
callq 0x68d0
movq %rax, -0x5cd10(%rbp)
jmp 0x23f79
movq -0x5cd10(%rbp), %rdi
leaq 0x3632a(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cd18(%rbp)
jmp 0x23f95
movq -0x5cd18(%rbp), %rdi
movss -0x5c934(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x5cd20(%rbp)
jmp 0x23fb2
movq -0x5cd20(%rbp), %rdi
leaq 0x362f1(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cd28(%rbp)
jmp 0x23fce
movq -0x5cd28(%rbp), %rdi
movss -0x5c938(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x5cd30(%rbp)
jmp 0x23feb
movq -0x5cd30(%rbp), %rdi
leaq 0x362b8(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cd38(%rbp)
jmp 0x24007
movslq -0x5c924(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c928(%rbp), %rsi
callq 0x1a9b0
movq -0x5cd38(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x5cd40(%rbp)
jmp 0x24040
movq -0x5cd40(%rbp), %rdi
leaq 0x36263(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x5cd48(%rbp)
jmp 0x2405c
movslq -0x5c924(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0x24530
movq %rax, %rdi
movslq -0x5c928(%rbp), %rsi
callq 0x1a9b0
movq -0x5cd48(%rbp), %rdi
cvtsi2ssl (%rax), %xmm0
movss -0x5c92c(%rbp), %xmm1
divss %xmm1, %xmm0
callq 0x63f0
movq %rax, -0x5cd50(%rbp)
jmp 0x240a3
movq -0x5cd50(%rbp), %rdi
movq 0x54edf(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x240b8
jmp 0x240ba
movl -0x5c928(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c928(%rbp)
jmp 0x23ccf
jmp 0x240d0
movl -0x5c924(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c924(%rbp)
jmp 0x23cb1
leaq -0x5c920(%rbp), %rdi
callq 0x6740
jmp 0x240f2
leaq -0x5c920(%rbp), %rdi
callq 0x67d0
leaq -0x5c720(%rbp), %rdi
callq 0x6a08
jmp 0x2411a
leaq -0x5c720(%rbp), %rdi
callq 0x6a08
jmp 0x2418b
movq -0x38(%rbp), %rax
movq %rax, -0x5c940(%rbp)
movq -0x5c940(%rbp), %rdi
callq 0xa8f0
jmp 0x24133
movl $0x0, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
leaq -0x5c100(%rbp), %rdi
callq 0x67d0
leaq -0x5bf00(%rbp), %rdi
callq 0x6a08
leaq -0x538(%rbp), %rdi
callq 0x24c90
leaq -0x500(%rbp), %rdi
callq 0x246d0
leaq -0x4c8(%rbp), %rdi
callq 0x246d0
leaq -0x490(%rbp), %rdi
callq 0x246d0
jmp 0x241d5
leaq -0x5c100(%rbp), %rdi
callq 0x67d0
leaq -0x5bf00(%rbp), %rdi
callq 0x6a08
leaq -0x538(%rbp), %rdi
callq 0x24c90
leaq -0x500(%rbp), %rdi
callq 0x246d0
leaq -0x4c8(%rbp), %rdi
callq 0x246d0
leaq -0x490(%rbp), %rdi
callq 0x246d0
jmp 0x24207
leaq -0x2f8(%rbp), %rdi
callq 0x6140
leaq -0xe8(%rbp), %rdi
callq 0x1aa00
leaq -0xc8(%rbp), %rdi
callq 0x6a08
leaq -0xa8(%rbp), %rdi
callq 0x1aeb0
jmp 0x24239
leaq -0x2f8(%rbp), %rdi
callq 0x6140
leaq -0xe8(%rbp), %rdi
callq 0x1aa00
leaq -0xc8(%rbp), %rdi
callq 0x6a08
leaq -0xa8(%rbp), %rdi
callq 0x1aeb0
jmp 0x2424a
leaq -0x58(%rbp), %rdi
callq 0xfe90
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0xfe90
movq -0x60(%rbp), %rdi
callq 0x6900
nopl (%rax)