// File: simonrharris[P]SKA/src/sk_compare.cpp
// Function: compareKmerFiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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 compareKmerFiles(const std::string & queryfile, const std::vector < std::string > & subjectfiles)
{

	// Create the kmer map
	std::unordered_map < std::string, char > kmerMap;

	//std::vector < std::string > sampleNames;
	//if (collectSampleNames(subjectfiles, sampleNames, false)!=0){return 1;}
	//int numSamples=sampleNames.size();
	//std::string emptySequence (numSamples , '-');
	

	int querykmersize;
	std::vector < std::string > querySampleNames;

	std::ifstream fileStream;

	if (openFileStream(queryfile, fileStream, false)){return 1;};		
		
	readKmerHeader(fileStream, querykmersize, querySampleNames);

	char base;
	char kmerbuffer[querykmersize*2/3];
	char asciibuffer[int(ceil(float(querySampleNames.size())/6))];
	while (fileStream.read(asciibuffer, sizeof(asciibuffer))){//read the ascii representation of the taxa
		std::string asciibits (asciibuffer, sizeof(asciibuffer));
		//std::vector < bool > mybits;
		//vectorbool_from_ascii(asciibits, mybits);//read the ascii representation of the taxa to a verctor of bools
		while (fileStream.peek()!='\n' && fileStream.get(base)){
			fileStream.read(kmerbuffer, sizeof(kmerbuffer));
			std::string kmer (kmerbuffer, querykmersize*2/3);
			
			std::unordered_map < std::string, char >::iterator it = kmerMap.find(kmer);//check if the kmer is in the hash
			if ( it != kmerMap.end() ){//if the kmer is in the hash
				it->second='N';
			}
			else {
				kmerMap.insert(std::make_pair(kmer, base));
			}
		}
		fileStream.ignore(256,'\n');//skip the end ofline character
	}
	querySampleNames.clear();
	fileStream.close();

	std::cout << "Subject\tKmers unique to Query\tKmers unique to Subject\tMatches\t% kmers in Query matching\t% kmers in Subject matching\tSNPs\t%ID of matching kmers\t%ID of Query kmers\t%ID of Subject kmers\tNs in Query\tNs in Subject\tNs in both" << std::endl;
	
	for (int s = 0; s < subjectfiles.size(); ++s){
		fileStream.open(subjectfiles[s], std::ios::in);
		if (fileStream.fail()) {
			std::cerr << "Failed to open " << subjectfiles[s] << std::endl << std::endl;
			return 1;
		}
		int subjectkmersize;
		std::vector < std::string > subjectSampleNames;
		
		try {
				int returnval = readKmerHeader(fileStream, subjectkmersize, subjectSampleNames);
			}
			catch (int e){
				std::cerr << "An exception occurred when reading file " << subjectfiles[s] << ". Please check the format. Exception Nr. " << e << std::endl;
				return 1;
			}
		if (subjectkmersize!=querykmersize){
			std::cout << subjectfiles[s] << " has different kmer size to query" << std::endl;
			return 1;
		}

		
		std::vector < int > kmerjustinsubject (subjectSampleNames.size(), 0);
		std::vector < int > snps (subjectSampleNames.size(), 0);
		std::vector < int > ninsubject (subjectSampleNames.size(), 0);
		std::vector < int > ninquery (subjectSampleNames.size(), 0);
		std::vector < int > ninboth (subjectSampleNames.size(), 0);
		std::vector < int > matches (subjectSampleNames.size(), 0);

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

		while (fileStream.read(asciibuffer, sizeof(asciibuffer))){//read the ascii representation of the taxa
			std::string asciibits (asciibuffer, sizeof(asciibuffer));
			std::vector < bool > mybits;
			vectorbool_from_ascii(asciibits, mybits);//read the ascii representation of the taxa to a verctor of bools

			int nb=0;
			int nq=0;
			int ns=0;
			int m=0;
			int sn=0;
			int js=0;

			while (fileStream.peek()!='\n' && fileStream.get(base)){
				base=toupper(base);
				fileStream.read(kmerbuffer, sizeof(kmerbuffer));
				std::string kmer (kmerbuffer, querykmersize*2/3);

				std::unordered_map < std::string, char >::iterator it = kmerMap.find(kmer);//check if the kmer is in the hash
				if ( it != kmerMap.end() ){//if the kmer is in the hash
					if (it->second=='N' && base=='N'){
						nb++;
					}
					else if (it->second=='N'){
						nq++;
					}
					else if (base=='N'){
						ns++;
					}
					else if (it->second==base){
						m++;
					}
					else {
						sn++;
					}
				}
				else {
					js++;
				}
	    	}
	    	for (int i=0; i<subjectSampleNames.size(); ++i){ //add the base to all samples that are true in the bitset
				if (mybits[i]){
					ninboth[i]+=nb;
					ninquery[i]+=nq;
					ninsubject[i]+=ns;
					matches[i]+=m;
					snps[i]+=sn;
					kmerjustinsubject[i]+=js;
				}
			}
	    	fileStream.ignore(256,'\n');//skip the end ofline character
	    }
		fileStream.close();
		
		for (int i=0; i<subjectSampleNames.size(); ++i){

			int kmerjustinquery=kmerMap.size()-(matches[i]+snps[i]+ninquery[i]+ninboth[i]+ninsubject[i]);
			float percentmatchquery=float(matches[i]+snps[i]+ninquery[i]+ninboth[i])/(kmerjustinquery+matches[i]+snps[i]+ninquery[i]+ninboth[i])*100;
			float percentmatchsubject=float(matches[i]+snps[i]+ninsubject[i]+ninboth[i])/(kmerjustinsubject[i]+matches[i]+snps[i]+ninsubject[i]+ninboth[i])*100;
			float percentidofmatches=float(matches[i])/(matches[i]+snps[i])*100;
			float percentidofquery=(percentidofmatches*percentmatchquery)/100;
			float percentidofsubject=(percentidofmatches*percentmatchsubject)/100;
			
			std::cout << subjectSampleNames[i] << "\t" << kmerjustinquery << "\t" << kmerjustinsubject[i] << "\t" << (matches[i]+snps[i]+ninquery[i]+ninboth[i]+ninsubject[i]) << "\t" << percentmatchquery << "\t" << percentmatchsubject << "\t" << snps[i] << "\t" << percentidofmatches << "\t" << percentidofquery << "\t" << percentidofsubject << "\t" << ninquery[i] << "\t" << ninsubject[i] << "\t" << ninboth[i] << std::endl;

		}
	}
	return 0;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x890, %rsp            # imm = 0x890
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x20020
leaq -0x70(%rbp), %rdi
callq 0x1ab40
leaq -0x278(%rbp), %rdi
callq 0x65f0
jmp 0x1e4a3
movq -0x10(%rbp), %rdi
leaq -0x278(%rbp), %rsi
xorl %edx, %edx
callq 0xa4f0
movl %eax, -0x518(%rbp)
jmp 0x1e4bd
movl -0x518(%rbp), %eax
cmpl $0x0, %eax
je 0x1e50c
movl $0x1, -0x4(%rbp)
movl $0x1, -0x288(%rbp)
jmp 0x1ffc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1fff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1ffeb
leaq -0x278(%rbp), %rdi
leaq -0x54(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xcd40
jmp 0x1e522
movl -0x54(%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, -0x530(%rbp)
movq %rsp, %rcx
movq %rcx, -0x298(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x528(%rbp)
movq %rcx, %rsp
movq %rax, -0x2a0(%rbp)
leaq -0x70(%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, -0x520(%rbp)
testq %rax, %rax
movss %xmm0, -0x51c(%rbp)
js 0x1e5ba
movss -0x520(%rbp), %xmm0
movss %xmm0, -0x51c(%rbp)
movss -0x51c(%rbp), %xmm0
movss 0x3b0b2(%rip), %xmm1    # 0x5967c
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x60b0
cvttsd2si %xmm0, %eax
movq %rax, -0x540(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x538(%rbp)
movq %rcx, %rsp
movq %rax, -0x2a8(%rbp)
movq -0x540(%rbp), %rdx
movq -0x538(%rbp), %rsi
leaq -0x278(%rbp), %rdi
callq 0x6680
movq %rax, -0x548(%rbp)
jmp 0x1e627
movq -0x548(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x549(%rbp)
jmp 0x1e645
movb -0x549(%rbp), %al
testb $0x1, %al
jne 0x1e654
jmp 0x1e94e
leaq -0x2c9(%rbp), %rdi
movq %rdi, -0x558(%rbp)
callq 0x6910
movq -0x538(%rbp), %rsi
movq -0x540(%rbp), %rdx
movq -0x558(%rbp), %rcx
leaq -0x2c8(%rbp), %rdi
callq 0x65e0
jmp 0x1e68a
leaq -0x2c9(%rbp), %rdi
callq 0x65a0
leaq -0x278(%rbp), %rdi
callq 0x61c0
movl %eax, -0x55c(%rbp)
jmp 0x1e6aa
movl -0x55c(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x55d(%rbp)
je 0x1e705
leaq -0x278(%rbp), %rdi
leaq -0x289(%rbp), %rsi
callq 0x6720
movq %rax, -0x568(%rbp)
jmp 0x1e6d9
movq -0x568(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x569(%rbp)
jmp 0x1e6f7
movb -0x569(%rbp), %al
movb %al, -0x55d(%rbp)
jmp 0x1e705
movb -0x55d(%rbp), %al
testb $0x1, %al
jne 0x1e714
jmp 0x1e914
movq -0x530(%rbp), %rdx
movq -0x528(%rbp), %rsi
leaq -0x278(%rbp), %rdi
callq 0x6680
jmp 0x1e730
movl -0x54(%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, -0x580(%rbp)
leaq -0x2f1(%rbp), %rdi
movq %rdi, -0x578(%rbp)
callq 0x6910
movq -0x528(%rbp), %rsi
movq -0x580(%rbp), %rdx
movq -0x578(%rbp), %rcx
leaq -0x2f0(%rbp), %rdi
callq 0x65e0
jmp 0x1e78a
leaq -0x2f1(%rbp), %rdi
callq 0x65a0
leaq -0x50(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
callq 0x20040
movq %rax, -0x588(%rbp)
jmp 0x1e7af
movq -0x588(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x200a0
movq %rax, -0x308(%rbp)
leaq -0x300(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x20070
testb $0x1, %al
jne 0x1e7e9
jmp 0x1e872
leaq -0x300(%rbp), %rdi
callq 0x200d0
movb $0x4e, 0x20(%rax)
jmp 0x1e8f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x2c9(%rbp), %rdi
callq 0x65a0
jmp 0x1ffeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1e93d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x2f1(%rbp), %rdi
callq 0x65a0
jmp 0x1e93d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1e906
leaq -0x330(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
leaq -0x289(%rbp), %rdx
callq 0x20140
jmp 0x1e88e
leaq -0x50(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x20100
movb %dl, -0x591(%rbp)
movq %rax, -0x590(%rbp)
jmp 0x1e8ad
movb -0x591(%rbp), %al
movq -0x590(%rbp), %rcx
movq %rcx, -0x340(%rbp)
movb %al, -0x338(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x20180
jmp 0x1e8f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x20180
jmp 0x1e906
leaq -0x2f0(%rbp), %rdi
callq 0x6a08
jmp 0x1e696
leaq -0x2f0(%rbp), %rdi
callq 0x6a08
jmp 0x1e93d
leaq -0x278(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
callq 0x6340
jmp 0x1e92c
leaq -0x2c8(%rbp), %rdi
callq 0x6a08
jmp 0x1e604
leaq -0x2c8(%rbp), %rdi
callq 0x6a08
jmp 0x1ffeb
leaq -0x70(%rbp), %rdi
callq 0x1aca0
leaq -0x278(%rbp), %rdi
callq 0x60f0
jmp 0x1e965
movq 0x5a63c(%rip), %rdi     # 0x78fa8
leaq 0x3ae70(%rip), %rsi     # 0x597e3
callq 0x6520
movq %rax, -0x5a0(%rbp)
jmp 0x1e981
movq -0x5a0(%rbp), %rdi
movq 0x5a601(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x1e996
movl $0x0, -0x344(%rbp)
movslq -0x344(%rbp), %rax
movq %rax, -0x5a8(%rbp)
movq -0x18(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x5a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1ffaa
movq -0x18(%rbp), %rdi
movslq -0x344(%rbp), %rsi
callq 0xf2d0
movq %rax, %rsi
leaq -0x278(%rbp), %rdi
movl $0x8, %edx
callq 0x6490
jmp 0x1e9f0
movq -0x278(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x278(%rbp,%rax), %rdi
callq 0x6030
movb %al, -0x5a9(%rbp)
jmp 0x1ea10
movb -0x5a9(%rbp), %al
testb $0x1, %al
jne 0x1ea1f
jmp 0x1eaaa
movq 0x5a5ca(%rip), %rdi     # 0x78ff0
leaq 0x3aa0a(%rip), %rsi     # 0x59437
callq 0x6520
movq %rax, -0x5b8(%rbp)
jmp 0x1ea3b
movq -0x18(%rbp), %rdi
movslq -0x344(%rbp), %rsi
callq 0xf2d0
movq -0x5b8(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5c0(%rbp)
jmp 0x1ea63
movq -0x5c0(%rbp), %rdi
movq 0x5a51f(%rip), %rsi     # 0x78f90
callq 0x6570
movq %rax, -0x5c8(%rbp)
jmp 0x1ea7f
movq -0x5c8(%rbp), %rdi
movq 0x5a503(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x1ea94
movl $0x1, -0x4(%rbp)
movl $0x1, -0x288(%rbp)
jmp 0x1ffbb
leaq -0x360(%rbp), %rdi
movq %rdi, -0x5d8(%rbp)
callq 0x1ab40
movq -0x5d8(%rbp), %rdx
leaq -0x278(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0xcd40
movl %eax, -0x5cc(%rbp)
jmp 0x1eadf
movl -0x5cc(%rbp), %eax
movl %eax, -0x364(%rbp)
jmp 0x1ebf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
movl -0x284(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1ff9c
movq -0x280(%rbp), %rdi
callq 0x6200
movl (%rax), %eax
movl %eax, -0x368(%rbp)
movq 0x5a4c0(%rip), %rdi     # 0x78ff0
leaq 0x3ad88(%rip), %rsi     # 0x598bf
callq 0x6520
movq %rax, -0x5e0(%rbp)
jmp 0x1eb45
movq -0x18(%rbp), %rdi
movslq -0x344(%rbp), %rsi
callq 0xf2d0
movq -0x5e0(%rbp), %rdi
movq %rax, %rsi
callq 0x64d0
movq %rax, -0x5e8(%rbp)
jmp 0x1eb6d
movq -0x5e8(%rbp), %rdi
leaq 0x3ad6d(%rip), %rsi     # 0x598e8
callq 0x6520
movq %rax, -0x5f0(%rbp)
jmp 0x1eb89
movq -0x5f0(%rbp), %rdi
movl -0x368(%rbp), %esi
callq 0x68d0
movq %rax, -0x5f8(%rbp)
jmp 0x1eba4
movq -0x5f8(%rbp), %rdi
movq 0x5a3de(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x1ebb9
movl $0x1, -0x4(%rbp)
movl $0x1, -0x288(%rbp)
callq 0x6860
jmp 0x1ff26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
callq 0x6860
jmp 0x1ff9c
movl -0x348(%rbp), %eax
cmpl -0x54(%rbp), %eax
je 0x1ec85
movq -0x18(%rbp), %rdi
movslq -0x344(%rbp), %rsi
callq 0xf2d0
movq %rax, %rsi
movq 0x5a38f(%rip), %rdi     # 0x78fa8
callq 0x64d0
movq %rax, -0x600(%rbp)
jmp 0x1ec27
movq -0x600(%rbp), %rdi
leaq 0x3acdd(%rip), %rsi     # 0x59912
callq 0x6520
movq %rax, -0x608(%rbp)
jmp 0x1ec43
movq -0x608(%rbp), %rdi
movq 0x5a33f(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x1ec58
movl $0x1, -0x4(%rbp)
movl $0x1, -0x288(%rbp)
jmp 0x1ff26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1ff9c
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x618(%rbp)
movl $0x0, -0x384(%rbp)
leaq -0x385(%rbp), %rdi
movq %rdi, -0x610(%rbp)
callq 0x1a8f0
movq -0x618(%rbp), %rsi
movq -0x610(%rbp), %rcx
leaq -0x380(%rbp), %rdi
leaq -0x384(%rbp), %rdx
callq 0x1a910
jmp 0x1ecd8
leaq -0x385(%rbp), %rdi
callq 0x1a990
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x628(%rbp)
movl $0x0, -0x3a4(%rbp)
leaq -0x3a5(%rbp), %rdi
movq %rdi, -0x620(%rbp)
callq 0x1a8f0
movq -0x628(%rbp), %rsi
movq -0x620(%rbp), %rcx
leaq -0x3a0(%rbp), %rdi
leaq -0x3a4(%rbp), %rdx
callq 0x1a910
jmp 0x1ed37
leaq -0x3a5(%rbp), %rdi
callq 0x1a990
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x638(%rbp)
movl $0x0, -0x3c4(%rbp)
leaq -0x3c5(%rbp), %rdi
movq %rdi, -0x630(%rbp)
callq 0x1a8f0
movq -0x638(%rbp), %rsi
movq -0x630(%rbp), %rcx
leaq -0x3c0(%rbp), %rdi
leaq -0x3c4(%rbp), %rdx
callq 0x1a910
jmp 0x1ed96
leaq -0x3c5(%rbp), %rdi
callq 0x1a990
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x648(%rbp)
movl $0x0, -0x3e4(%rbp)
leaq -0x3e5(%rbp), %rdi
movq %rdi, -0x640(%rbp)
callq 0x1a8f0
movq -0x648(%rbp), %rsi
movq -0x640(%rbp), %rcx
leaq -0x3e0(%rbp), %rdi
leaq -0x3e4(%rbp), %rdx
callq 0x1a910
jmp 0x1edf5
leaq -0x3e5(%rbp), %rdi
callq 0x1a990
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x658(%rbp)
movl $0x0, -0x404(%rbp)
leaq -0x405(%rbp), %rdi
movq %rdi, -0x650(%rbp)
callq 0x1a8f0
movq -0x658(%rbp), %rsi
movq -0x650(%rbp), %rcx
leaq -0x400(%rbp), %rdi
leaq -0x404(%rbp), %rdx
callq 0x1a910
jmp 0x1ee54
leaq -0x405(%rbp), %rdi
callq 0x1a990
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, -0x668(%rbp)
movl $0x0, -0x424(%rbp)
leaq -0x425(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x1a8f0
movq -0x668(%rbp), %rsi
movq -0x660(%rbp), %rcx
leaq -0x420(%rbp), %rdi
leaq -0x424(%rbp), %rdx
callq 0x1a910
jmp 0x1eeb3
leaq -0x425(%rbp), %rdi
callq 0x1a990
movl -0x54(%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, -0x680(%rbp)
movq %rsp, %rcx
movq %rcx, -0x430(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x678(%rbp)
movq %rcx, %rsp
movq %rax, -0x438(%rbp)
leaq -0x360(%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, -0x670(%rbp)
testq %rax, %rax
movss %xmm0, -0x66c(%rbp)
js 0x1ef5a
movss -0x670(%rbp), %xmm0
movss %xmm0, -0x66c(%rbp)
movss -0x66c(%rbp), %xmm0
movss 0x3a712(%rip), %xmm1    # 0x5967c
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x60b0
cvttsd2si %xmm0, %eax
movq %rax, -0x690(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x688(%rbp)
movq %rcx, %rsp
movq %rax, -0x440(%rbp)
movq -0x690(%rbp), %rdx
movq -0x688(%rbp), %rsi
leaq -0x278(%rbp), %rdi
callq 0x6680
movq %rax, -0x698(%rbp)
jmp 0x1efc7
movq -0x698(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x699(%rbp)
jmp 0x1efe5
movb -0x699(%rbp), %al
testb $0x1, %al
jne 0x1eff4
jmp 0x1f634
leaq -0x461(%rbp), %rdi
movq %rdi, -0x6a8(%rbp)
callq 0x6910
movq -0x688(%rbp), %rsi
movq -0x690(%rbp), %rdx
movq -0x6a8(%rbp), %rcx
leaq -0x460(%rbp), %rdi
callq 0x65e0
jmp 0x1f02a
leaq -0x461(%rbp), %rdi
callq 0x65a0
leaq -0x490(%rbp), %rdi
movq %rdi, -0x6b0(%rbp)
callq 0x1acc0
movq -0x6b0(%rbp), %rsi
leaq -0x460(%rbp), %rdi
callq 0xbd50
jmp 0x1f05e
movl $0x0, -0x494(%rbp)
movl $0x0, -0x498(%rbp)
movl $0x0, -0x49c(%rbp)
movl $0x0, -0x4a0(%rbp)
movl $0x0, -0x4a4(%rbp)
movl $0x0, -0x4a8(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x61c0
movl %eax, -0x6b4(%rbp)
jmp 0x1f0ae
movl -0x6b4(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x6b5(%rbp)
je 0x1f109
leaq -0x278(%rbp), %rdi
leaq -0x426(%rbp), %rsi
callq 0x6720
movq %rax, -0x6c0(%rbp)
jmp 0x1f0dd
movq -0x6c0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6670
movb %al, -0x6c1(%rbp)
jmp 0x1f0fb
movb -0x6c1(%rbp), %al
movb %al, -0x6b5(%rbp)
jmp 0x1f109
movb -0x6b5(%rbp), %al
testb $0x1, %al
jne 0x1f118
jmp 0x1f44b
movsbl -0x426(%rbp), %edi
callq 0x6a20
movq -0x678(%rbp), %rsi
movq -0x680(%rbp), %rdx
movb %al, -0x426(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x6680
jmp 0x1f146
movl -0x54(%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, -0x6d8(%rbp)
leaq -0x4c9(%rbp), %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x6910
movq -0x678(%rbp), %rsi
movq -0x6d8(%rbp), %rdx
movq -0x6d0(%rbp), %rcx
leaq -0x4c8(%rbp), %rdi
callq 0x65e0
jmp 0x1f1a0
leaq -0x4c9(%rbp), %rdi
callq 0x65a0
leaq -0x50(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x20040
movq %rax, -0x6e0(%rbp)
jmp 0x1f1c5
movq -0x6e0(%rbp), %rax
movq %rax, -0x4d8(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x200a0
movq %rax, -0x4e0(%rbp)
leaq -0x4d8(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0x20070
testb $0x1, %al
jne 0x1f1ff
jmp 0x1f42b
leaq -0x4d8(%rbp), %rdi
callq 0x200d0
movsbl 0x20(%rax), %eax
cmpl $0x4e, %eax
jne 0x1f3a5
movsbl -0x426(%rbp), %eax
cmpl $0x4e, %eax
jne 0x1f3a5
movl -0x494(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x494(%rbp)
jmp 0x1f429
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x385(%rbp), %rdi
callq 0x1a990
jmp 0x1ff9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x3a5(%rbp), %rdi
callq 0x1a990
jmp 0x1ff90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x3c5(%rbp), %rdi
callq 0x1a990
jmp 0x1ff84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x3e5(%rbp), %rdi
callq 0x1a990
jmp 0x1ff78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x405(%rbp), %rdi
callq 0x1a990
jmp 0x1ff6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x425(%rbp), %rdi
callq 0x1a990
jmp 0x1ff60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1ff54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x461(%rbp), %rdi
callq 0x65a0
jmp 0x1ff54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x1f617
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x4c9(%rbp), %rdi
callq 0x65a0
jmp 0x1f617
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x6a08
jmp 0x1f617
leaq -0x4d8(%rbp), %rdi
callq 0x200d0
movsbl 0x20(%rax), %eax
cmpl $0x4e, %eax
jne 0x1f3cb
movl -0x498(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x498(%rbp)
jmp 0x1f427
movsbl -0x426(%rbp), %eax
cmpl $0x4e, %eax
jne 0x1f3e8
movl -0x49c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x49c(%rbp)
jmp 0x1f425
leaq -0x4d8(%rbp), %rdi
callq 0x200d0
movsbl 0x20(%rax), %eax
movsbl -0x426(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1f414
movl -0x4a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a0(%rbp)
jmp 0x1f423
movl -0x4a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a4(%rbp)
jmp 0x1f425
jmp 0x1f427
jmp 0x1f429
jmp 0x1f43a
movl -0x4a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a8(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x6a08
jmp 0x1f09a
movl $0x0, -0x4e4(%rbp)
movslq -0x4e4(%rbp), %rax
movq %rax, -0x6e8(%rbp)
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x6e8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f5e2
movslq -0x4e4(%rbp), %rsi
leaq -0x490(%rbp), %rdi
callq 0xedc0
movq %rdx, -0x6f8(%rbp)
movq %rax, -0x6f0(%rbp)
jmp 0x1f4a5
movq -0x6f8(%rbp), %rax
movq -0x6f0(%rbp), %rcx
movq %rcx, -0x4f8(%rbp)
movq %rax, -0x4f0(%rbp)
leaq -0x4f8(%rbp), %rdi
callq 0xf510
testb $0x1, %al
jne 0x1f4d6
jmp 0x1f5cc
movl -0x494(%rbp), %eax
movl %eax, -0x710(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x400(%rbp), %rdi
callq 0x1a9b0
movl -0x710(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x498(%rbp), %eax
movl %eax, -0x70c(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x1a9b0
movl -0x70c(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x49c(%rbp), %eax
movl %eax, -0x708(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x3c0(%rbp), %rdi
callq 0x1a9b0
movl -0x708(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x4a0(%rbp), %eax
movl %eax, -0x704(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x420(%rbp), %rdi
callq 0x1a9b0
movl -0x704(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x4a4(%rbp), %eax
movl %eax, -0x700(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x1a9b0
movl -0x700(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x4a8(%rbp), %eax
movl %eax, -0x6fc(%rbp)
movslq -0x4e4(%rbp), %rsi
leaq -0x380(%rbp), %rdi
callq 0x1a9b0
movl -0x6fc(%rbp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x1f5ce
movl -0x4e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4e4(%rbp)
jmp 0x1f455
leaq -0x278(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
callq 0x6340
jmp 0x1f5fa
leaq -0x490(%rbp), %rdi
callq 0xf720
leaq -0x460(%rbp), %rdi
callq 0x6a08
jmp 0x1efa4
leaq -0x490(%rbp), %rdi
callq 0xf720
leaq -0x460(%rbp), %rdi
callq 0x6a08
jmp 0x1ff54
leaq -0x278(%rbp), %rdi
callq 0x60f0
jmp 0x1f642
movl $0x0, -0x4fc(%rbp)
movslq -0x4fc(%rbp), %rax
movq %rax, -0x718(%rbp)
leaq -0x360(%rbp), %rdi
callq 0xb670
movq %rax, %rcx
movq -0x718(%rbp), %rax
cmpq %rcx, %rax
jae 0x1feca
leaq -0x50(%rbp), %rdi
callq 0x201a0
movq %rax, -0x7a8(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x420(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x1a9b0
movl (%rax), %eax
movl %eax, -0x7b8(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3a0(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x1a9b0
movq %rax, %rcx
movl -0x7b8(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7b4(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
movq %rdi, -0x790(%rbp)
callq 0x1a9b0
movq %rax, %rcx
movl -0x7b4(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7b0(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x400(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x1a9b0
movq %rax, %rcx
movl -0x7b0(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7ac(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3c0(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x1a9b0
movl -0x7ac(%rbp), %ecx
movq -0x740(%rbp), %rdi
movq %rax, %rdx
movq -0x7a8(%rbp), %rax
movl (%rdx), %edx
addl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x500(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x738(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x7a0(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x790(%rbp), %rdi
movq %rax, %rcx
movl -0x7a0(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x79c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x758(%rbp), %rdi
movq %rax, %rcx
movl -0x79c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x798(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x740(%rbp), %rdi
movq %rax, %rcx
movl -0x798(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x780(%rbp)
movl -0x500(%rbp), %eax
movl %eax, -0x794(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x738(%rbp), %rdi
movq %rax, %rcx
movl -0x794(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x788(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x790(%rbp), %rdi
movq %rax, %rcx
movl -0x788(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x784(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x758(%rbp), %rdi
movq %rax, %rcx
movl -0x784(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x77c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movss -0x780(%rbp), %xmm0
movq -0x740(%rbp), %rdi
movq %rax, %rcx
movl -0x77c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss 0x39dc0(%rip), %xmm1    # 0x59678
movss %xmm1, -0x728(%rbp)
mulss %xmm1, %xmm0
movss %xmm0, -0x504(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x738(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x778(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x768(%rbp), %rdi
movq %rax, %rcx
movl -0x778(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x774(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x758(%rbp), %rdi
movq %rax, %rcx
movl -0x774(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x770(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq %rax, %rcx
movl -0x770(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x748(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x380(%rbp), %rdi
callq 0x1a9b0
movq -0x740(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x76c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x738(%rbp), %rdi
movq %rax, %rcx
movl -0x76c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x75c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x768(%rbp), %rdi
movq %rax, %rcx
movl -0x75c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x74c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x758(%rbp), %rdi
movq %rax, %rcx
movl -0x74c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x744(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movss -0x748(%rbp), %xmm0
movq -0x740(%rbp), %rdi
movss -0x728(%rbp), %xmm1
movq %rax, %rcx
movl -0x744(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm2
divss %xmm2, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x508(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x740(%rbp), %rdi
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x72c(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movq -0x738(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x724(%rbp)
movslq -0x4fc(%rbp), %rsi
callq 0x1a9b0
movss -0x72c(%rbp), %xmm0
movss -0x728(%rbp), %xmm1
movq %rax, %rcx
movl -0x724(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm2
divss %xmm2, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x50c(%rbp)
movss -0x50c(%rbp), %xmm0
movss -0x504(%rbp), %xmm2
mulss %xmm2, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x510(%rbp)
movss -0x50c(%rbp), %xmm0
movss -0x508(%rbp), %xmm2
mulss %xmm2, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x514(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x360(%rbp), %rdi
callq 0x1ab60
movq %rax, %rsi
movq 0x594a4(%rip), %rdi     # 0x78fa8
callq 0x64d0
movq %rax, -0x720(%rbp)
jmp 0x1fb12
movq -0x720(%rbp), %rdi
leaq 0x3a791(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x7c0(%rbp)
jmp 0x1fb2e
movq -0x7c0(%rbp), %rdi
movl -0x500(%rbp), %esi
callq 0x68d0
movq %rax, -0x7c8(%rbp)
jmp 0x1fb49
movq -0x7c8(%rbp), %rdi
leaq 0x3a75a(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x7d0(%rbp)
jmp 0x1fb65
movslq -0x4fc(%rbp), %rsi
leaq -0x380(%rbp), %rdi
callq 0x1a9b0
movq -0x7d0(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x7d8(%rbp)
jmp 0x1fb8f
movq -0x7d8(%rbp), %rdi
leaq 0x3a714(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x7e0(%rbp)
jmp 0x1fbab
movslq -0x4fc(%rbp), %rsi
leaq -0x420(%rbp), %rdi
callq 0x1a9b0
movl (%rax), %eax
movl %eax, -0x7f8(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x1a9b0
movq %rax, %rcx
movl -0x7f8(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7f4(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x1a9b0
movq %rax, %rcx
movl -0x7f4(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7f0(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x400(%rbp), %rdi
callq 0x1a9b0
movq %rax, %rcx
movl -0x7f0(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x7ec(%rbp)
movslq -0x4fc(%rbp), %rsi
leaq -0x3c0(%rbp), %rdi
callq 0x1a9b0
movl -0x7ec(%rbp), %esi
movq -0x7e0(%rbp), %rdi
movl (%rax), %eax
addl %eax, %esi
callq 0x68d0
movq %rax, -0x7e8(%rbp)
jmp 0x1fc6a
movq -0x7e8(%rbp), %rdi
leaq 0x3a639(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x800(%rbp)
jmp 0x1fc86
movq -0x800(%rbp), %rdi
movss -0x504(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x808(%rbp)
jmp 0x1fca3
movq -0x808(%rbp), %rdi
leaq 0x3a600(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x810(%rbp)
jmp 0x1fcbf
movq -0x810(%rbp), %rdi
movss -0x508(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x818(%rbp)
jmp 0x1fcdc
movq -0x818(%rbp), %rdi
leaq 0x3a5c7(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x820(%rbp)
jmp 0x1fcf8
movslq -0x4fc(%rbp), %rsi
leaq -0x3a0(%rbp), %rdi
callq 0x1a9b0
movq -0x820(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x828(%rbp)
jmp 0x1fd22
movq -0x828(%rbp), %rdi
leaq 0x3a581(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x830(%rbp)
jmp 0x1fd3e
movq -0x830(%rbp), %rdi
movss -0x50c(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x838(%rbp)
jmp 0x1fd5b
movq -0x838(%rbp), %rdi
leaq 0x3a548(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x840(%rbp)
jmp 0x1fd77
movq -0x840(%rbp), %rdi
movss -0x510(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x848(%rbp)
jmp 0x1fd94
movq -0x848(%rbp), %rdi
leaq 0x3a50f(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x850(%rbp)
jmp 0x1fdb0
movq -0x850(%rbp), %rdi
movss -0x514(%rbp), %xmm0
callq 0x63f0
movq %rax, -0x858(%rbp)
jmp 0x1fdcd
movq -0x858(%rbp), %rdi
leaq 0x3a4d6(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x860(%rbp)
jmp 0x1fde9
movslq -0x4fc(%rbp), %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x1a9b0
movq -0x860(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x868(%rbp)
jmp 0x1fe13
movq -0x868(%rbp), %rdi
leaq 0x3a490(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x870(%rbp)
jmp 0x1fe2f
movslq -0x4fc(%rbp), %rsi
leaq -0x3c0(%rbp), %rdi
callq 0x1a9b0
movq -0x870(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x878(%rbp)
jmp 0x1fe59
movq -0x878(%rbp), %rdi
leaq 0x3a44a(%rip), %rsi     # 0x5a2b1
callq 0x6520
movq %rax, -0x880(%rbp)
jmp 0x1fe75
movslq -0x4fc(%rbp), %rsi
leaq -0x400(%rbp), %rdi
callq 0x1a9b0
movq -0x880(%rbp), %rdi
movl (%rax), %esi
callq 0x68d0
movq %rax, -0x888(%rbp)
jmp 0x1fe9f
movq -0x888(%rbp), %rdi
movq 0x590e3(%rip), %rsi     # 0x78f90
callq 0x6570
jmp 0x1feb4
jmp 0x1feb6
movl -0x4fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4fc(%rbp)
jmp 0x1f64c
movq -0x430(%rbp), %rax
movq %rax, %rsp
leaq -0x420(%rbp), %rdi
callq 0x1aa00
leaq -0x400(%rbp), %rdi
callq 0x1aa00
leaq -0x3e0(%rbp), %rdi
callq 0x1aa00
leaq -0x3c0(%rbp), %rdi
callq 0x1aa00
leaq -0x3a0(%rbp), %rdi
callq 0x1aa00
leaq -0x380(%rbp), %rdi
callq 0x1aa00
movl $0x0, -0x288(%rbp)
leaq -0x360(%rbp), %rdi
callq 0xfe90
movl -0x288(%rbp), %eax
testl %eax, %eax
jne 0x1ffbb
jmp 0x1ff3e
jmp 0x1ff40
movl -0x344(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x344(%rbp)
jmp 0x1e9a0
leaq -0x420(%rbp), %rdi
callq 0x1aa00
leaq -0x400(%rbp), %rdi
callq 0x1aa00
leaq -0x3e0(%rbp), %rdi
callq 0x1aa00
leaq -0x3c0(%rbp), %rdi
callq 0x1aa00
leaq -0x3a0(%rbp), %rdi
callq 0x1aa00
leaq -0x380(%rbp), %rdi
callq 0x1aa00
leaq -0x360(%rbp), %rdi
callq 0xfe90
jmp 0x1ffeb
movl $0x0, -0x4(%rbp)
movl $0x1, -0x288(%rbp)
movq -0x298(%rbp), %rax
movq %rax, %rsp
leaq -0x278(%rbp), %rdi
callq 0x6140
leaq -0x70(%rbp), %rdi
callq 0xfe90
leaq -0x50(%rbp), %rdi
callq 0x201c0
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
leaq -0x278(%rbp), %rdi
callq 0x6140
leaq -0x70(%rbp), %rdi
callq 0xfe90
leaq -0x50(%rbp), %rdi
callq 0x201c0
movq -0x280(%rbp), %rdi
callq 0x6900
nopw %cs:(%rax,%rax)
nop