// File: /workspace/github_cpp_makefile_star2_O3/ratulSharker[P]Havec/src/vector_with_rehash_8_hash_with_N_detection_6_bytes.cpp
// Function: populateBlock6Byte(khmerInfo6Byte*, unsigned long long, char*, unsigned short)
void populateBlock6Byte(struct khmerInfo6Byte * memBlock, unsigned long long blockSize, char *fileName,unsigned short int khmerSize){

	//opening the given file
	std::ifstream inputFile;
	inputFile.open(fileName,std::fstream::in);
	std::string buf,temp="";
	bool isFirstKhmer = true;
	unsigned long long * lastFoundKHashVal;
	lastFoundKHashVal=new unsigned long long[LAST_HASH_FUNC+1];
	
	bool n_found = false;//if n found in the read, then the read processing is left inactive 
						 // till the next new read sequence is found !!!
	
	unsigned long long consumedRead = 0;
	unsigned int lastHashFuncUsed = 0;//containe the value that is last used to store last khmer
	
	//for stat purpose use only:)
	unsigned long mem_block_occupied_stat = 0,mem_block_found_stat=0;
	unsigned long list_occupied_stat = 0,list_occupied_found=0;
	unsigned long mem_block_total_number_of_occupied = 0; //exact number of khmer stored in the memblock
	unsigned long vector_total_number_of_occupied = 0; //exact number of khmer stored in the vector 
	
	//ofstream myfile;
	//myfile.open("firstKmers.txt");
	//error log if can't be opened
	if(inputFile.fail() == true){
		/*
		 * if fail to load the file -- return
		 */
		std::cout<<"Fail to open the "<<fileName << std::endl;
		return;
	}


	//if successfull then log it !!!
	std::cout<<"Consuming... "<<fileName<<std::endl;

	//parsing the fasta file
	while(getline(inputFile,buf)){//reading a line

			if(buf[0] == '>'){
				//its a sequence name -- omit it !!! -- before omit clear the temp
				
				n_found = false; //new sequence found so i can't tell that exactly that, this new read sequence is bad or not -- time to consume
				
				temp = ""; //cleaning the old remaining khmer
				
				isFirstKhmer = true;
				consumedRead++;
				if(consumedRead%1000000==0){
					std::cout<<consumedRead/1000000<<" million read consumed..."<<std::endl;
					currentDateTime();
					/*show_vect_status_6_byte();
						std::cout<<"stat from consume function :: "<<std::endl
							<<"khmer in memBlock :: "<<mem_block_occupied_stat<<std::endl
							<<"khmer in list :: "<<list_occupied_stat<<std::endl<<std::endl;
							cout<<"*********************************"<<endl;
					*/	double vm, rss;
						process_mem_usage(vm, rss);
						cout << "Memory used (GB):  " << ((vm)/1024)/1024 <<endl;
				}
				//std::cout<<buf<<std::endl;
				continue;
			}
			else if(n_found == false){//if read sequence is not bad, consume it
									//if it is bad, then just omit consuming :) till a new read sequence found
									
				//here come the one sequnece of read
				buf = temp.append(buf);//no new read sequnence is found so the next line of read must be appended to the last
				unsigned int i;
				unsigned int bufSize = buf.size();//for optimization purpose only
				unsigned int loopTime = bufSize - khmerSize;//for optimization purpose only
				unsigned int addResult; //for optimization only

				if(isFirstKhmer == true){
					//its the first read line of the multiple read lines
					i = 1;
				}
				else{
					//its not the first line of the multiple read line
					i= 0;
				}

				//if it the first line then consume it explicitly by using fullHasher
				if(isFirstKhmer == true){
				
					if(bufSize < khmerSize){
						/*cout<<"**************************************************"<<endl;						
						cout<<"Problem detected !!!"<<endl;
						cout<<"read sequence size is less then the khmer size -- processing next read :("<<endl;
						cout<<"seq :: "<<buf<<endl;
						cout<<"**************************************************"<<endl;
						*/
						continue;						
					}
					//start of a new read detected
					temp = buf.substr(0,khmerSize); //here temp denote the string khmer
					
					//std::cout<<"khmer's in the read (first):: "<<temp<<std::endl;
					
					if(bufSize > khmerSize){
						//khmer has a neighbour :) -- so put the khmer in the blockArray
						
						//saving the first khmer
						//myfile<<temp<<endl;//_revhash(lastFoundKHashVal,khmerSize)<<endl; //saving the first khmer -- revhash isn't working right now
						
						// hash function trying formation 0th->1th->2th->3th
						bool stored = false;
						for(int ii=0;ii<=LAST_HASH_FUNC;ii++){
						
							//for the first khmer all the 
							//saving signature that which hash function is being used for the first khmer
							lastFoundKHashVal[ii] = fullHasher(temp,ii); //saving the hash
							
							if(buf.length() > khmerSize ){//checking that next khmer is not invalid
								switch(toupper(buf[khmerSize])){
									case 'A':
									case 'T':
									case 'G':
									case 'C':
									break;
									
									default:
									neucleotide_status = N_FOUND_IN_NEUCLEOTIDE;
									break;
								}
							}
							
							if(neucleotide_status == N_FOUND_IN_NEUCLEOTIDE){
								n_found = true;
								break;
							}
							
							//std::cout<<"store try ("<<ii<<")"<<endl;
							
							//cout<<"trying to store-"<<temp<<" hashfunc-"<<ii<<" hashed value-"<<lastFoundKHashVal[ii]<<" neighbour "<<buf[khmerSize]<<endl;
							switch(storeKhmerInMemBlock6Byte(temp,memBlock,blockSize,lastFoundKHashVal[ii],buf[khmerSize],ii)){
							
							case MEM_BLOCK:
								mem_block_occupied_stat++;
								mem_block_total_number_of_occupied++;
								lastHashFuncUsed = ii;
								stored = true;
								break;
							case MEM_BLOCK_FOUND:
								//cout<<"mem_block_found :: "<<temp<<endl;
								mem_block_found_stat++;
								mem_block_total_number_of_occupied++;
								lastHashFuncUsed = ii;
								stored=true;
								break;
							case LIST:
								list_occupied_stat++; //this will happen only for the las time (hash Func 3)
								lastHashFuncUsed = ii;
								vector_total_number_of_occupied++;
								stored = true;
								break;
							case LIST_FOUND:
								//cout<<"list_found :: "<<temp<<endl;
								list_occupied_found++;
								vector_total_number_of_occupied++;
								lastHashFuncUsed = ii;
								stored=true;
								break;
							case ERROR:
								//std::cout<<"ERROR OCCURED"<<std::endl;
								//return;
								break;
							}
							if(stored){
								break; //break out from the for loop
							}
						}
						//for debug purpose
						//std::cout<<"inside firstkhmer "<<std::endl;
						//std::cout<<temp<<std::endl;
					}

					isFirstKhmer = false;
				}
				
				if(n_found == true){ //in the first khmer N found so abort consuming using continue statement
					continue;
				}
				
				
				
				for( ; i <= loopTime && n_found == false; i++){
					temp = buf.substr(i,khmerSize);

					//std::cout<<"khmer's in the read (intermediate) :: "<<temp<<std::endl;

					addResult = i + khmerSize;

					if(bufSize > addResult){
						
						bool stored = false;
						for(int ii=0;ii<=LAST_HASH_FUNC;ii++){
							
							if(ii<=lastHashFuncUsed){
								//last used hash func & current hashfunc is same -- so partial hasher would do the job
								
								//neighbour left so put it into the memBlock
								//cout<<"using partial hash func with last hash func value "<<lastFoundKHashVal[ii]<<" and next neighbour "<<temp[khmerSize - 1]<<endl;
								lastFoundKHashVal[ii] = partialHasher(lastFoundKHashVal[ii],temp[khmerSize - 1],khmerSize,ii);
								//lastFoundKHashVal = fullHasher(temp,ii); //saving the hash
							}  
							else{
								lastFoundKHashVal[ii] = fullHasher(temp,ii); //saving the hash
							}
							
							if(buf.length() >= addResult + 1){//checking that next khmer is not invalid
								switch(toupper(buf[addResult])){
									case 'A':
									case 'T':
									case 'G':
									case 'C':
									break;
									
									default:
									neucleotide_status = N_FOUND_IN_NEUCLEOTIDE;
									break;
								}
							}
							
							if(neucleotide_status == N_FOUND_IN_NEUCLEOTIDE){//N found in the middle of consuming
								n_found = true;
								break;
							}
							
							//std::cout<<"store try ("<<ii<<")"<<endl;
							
							//cout<<"trying to store-"<<temp<<" neighbour "<<buf[addResult]<<" hashfunc-"<<ii<<" last found hashed value "<<lastFoundKHashVal[ii]<<endl;
							//cout<<"Hash "<<temp<<" "<<buf[addResult]<<endl;
							
							switch(storeKhmerInMemBlock6Byte(temp,memBlock, blockSize, lastFoundKHashVal[ii], buf[addResult],ii)){

								case MEM_BLOCK:
									mem_block_occupied_stat++;
									mem_block_total_number_of_occupied++;
									lastHashFuncUsed = ii;
									stored = true;
									break;
								case MEM_BLOCK_FOUND:
									//cout<<"mem_block_found:: "<<temp<<endl;
									mem_block_found_stat++;
									mem_block_total_number_of_occupied++;
									lastHashFuncUsed = ii;
									stored=true;
									break;
								case LIST:
									list_occupied_stat++;
									vector_total_number_of_occupied++;
									lastHashFuncUsed = ii;
									stored = true;
									break;
								case LIST_FOUND:
									//cout<<"list_found:: "<<temp<<endl;
									list_occupied_found++;
									vector_total_number_of_occupied++;
									lastHashFuncUsed = ii;
									stored=true;
									break;
								case ERROR:
									//std::cout<<"ERROR OCCURED"<<std::endl;
									break;
								
							}

							if(stored == true){
								//if stored then just end the loop
								break;
							}
							
							//for debug purpose
							//std::cout<<"\tinside loop "<<std::endl;
							//std::cout<<"\t\t"<<temp<<std::endl;
						}
					}

				}

				//temp = temp.substr(1,khmerSize-1);//advance to next khmer one time of ahead
			}
		}

	//myfile.close();

	//spit out the stats
	std::cout<<"stat from consume function :: "<<std::endl
			<<"khmer in memBlock (distinct):: "<<mem_block_occupied_stat<<std::endl
			<<"khmer in list (distinct):: "<<list_occupied_stat<<std::endl<<std::endl;
			/*<<"khmer in memBlock (found):: "<<mem_block_found_stat<<std::endl
			<<"khmer in list (found):: "<<list_occupied_found<<std::endl<<std::endl
			<<"Khmer in memBlock(total) "<<mem_block_total_number_of_occupied<<std::endl
			<<"khmer in vector(total) "<<vector_total_number_of_occupied<<endl;*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, 0xa0(%rsp)
movq %rdi, 0x98(%rsp)
leaq 0x140(%rsp), %r14
movq %r14, %rdi
callq 0x32b0
movq %r14, %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x3140
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4aeb(%rip), %rdx      # 0xb5c8
leaq 0x18(%rsp), %rdi
movq %rdx, %rsi
callq 0x6334
leaq 0x77c3(%rip), %rax      # 0xe2b4
movl (%rax), %edi
incl %edi
shlq $0x3, %rdi
callq 0x3030
movq %rax, 0x38(%rsp)
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x160(%rsp,%rax)
je 0x6b55
movq 0x74b8(%rip), %rbx      # 0xdfd8
leaq 0x45c2(%rip), %rsi      # 0xb0e9
movl $0x11, %edx
movq %rbx, %rdi
callq 0x32c0
testq %r13, %r13
je 0x6b99
movq %r13, %rdi
callq 0x30c0
movq 0x7490(%rip), %rdi      # 0xdfd8
movq %r13, %rsi
movq %rax, %rdx
callq 0x32c0
jmp 0x6bb7
movq 0x747c(%rip), %r14      # 0xdfd8
leaq 0x4598(%rip), %rsi      # 0xb0fb
movl $0xd, %edx
movq %r14, %rdi
callq 0x32c0
leaq 0x140(%rsp), %r15
testq %r13, %r13
je 0x6bd0
movq %r13, %rdi
callq 0x30c0
movq 0x744c(%rip), %rdi      # 0xdfd8
movq %r13, %rsi
movq %rax, %rdx
callq 0x32c0
jmp 0x6be8
movq 0x7438(%rip), %rax      # 0xdfd8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x3410
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
jmp 0x738f
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x3410
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq 0x73d2(%rip), %rdi      # 0xdfd8
callq 0x3040
movq %rax, %rdi
callq 0x3180
movzwl %bx, %r14d
leaq 0x88(%rsp), %r13
xorl %r12d, %r12d
movl $0x0, 0xc(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq %r14, (%rsp)
movq %r12, 0x128(%rsp)
movb $0x1, %al
movl $0x0, 0x14(%rsp)
movl %eax, %ebp
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %edx
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0x3460
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x728c
movq 0x40(%rsp), %rsi
cmpb $0x3e, (%rsi)
je 0x7154
testb $0x1, 0x14(%rsp)
jne 0x6e95
movq 0x48(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x3090
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x3100
movl 0x48(%rsp), %r12d
testb $0x1, %bpl
je 0x6e9c
cmpl %r14d, %r12d
jb 0x6c54
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x3280
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x32f0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6d28
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3260
cmpl %r14d, %r12d
jbe 0x714d
xorl %ebx, %ebx
movq %r13, 0x78(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x5ef4
leaq 0x78(%rsp), %rdi
movl %ebx, %esi
callq 0xa251
movq %rax, %r14
movq 0x38(%rsp), %rax
movq %r14, (%rax,%rbx,8)
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x6d81
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3260
movq (%rsp), %rax
cmpq %rax, 0x48(%rsp)
jbe 0x6db8
movq 0x40(%rsp), %rax
movq (%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x3470
addl $-0x41, %eax
cmpl $0x13, %eax
ja 0x6e77
movl $0x80045, %ecx          # imm = 0x80045
btl %eax, %ecx
jae 0x6e77
leaq 0x7519(%rip), %rax      # 0xe2d8
cmpl $0x7, (%rax)
je 0x6e84
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x5ef4
movq 0x40(%rsp), %rax
movq (%rsp), %rcx
movsbl (%rax,%rcx), %r8d
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq %r14, %rcx
movl %ebx, %r9d
callq 0x672e
movl %eax, %r14d
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x6e43
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3260
cmpl $0x6, %r14d
ja 0x6e5c
movl %r14d, %eax
leaq 0x460d(%rip), %rcx      # 0xb460
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1(%rbx), %rax
leaq 0x744d(%rip), %rcx      # 0xe2b4
movl (%rcx), %ecx
cmpq %rcx, %rbx
movq %rax, %rbx
jb 0x6d33
jmp 0x6eb0
leaq 0x745a(%rip), %rax      # 0xe2d8
movl $0x7, (%rax)
movb $0x1, %al
movl %eax, 0x14(%rsp)
xorl %ebp, %ebp
movq (%rsp), %r14
jmp 0x6c54
movl %ebp, %eax
jmp 0x6c52
movl %ebp, %eax
jmp 0x6eb6
incq 0x60(%rsp)
jmp 0x6eac
incq 0x68(%rsp)
movl %ebx, 0xc(%rsp)
xorl %eax, %eax
movq (%rsp), %r14
andb $0x1, %bpl
movzbl %bpl, %ebp
movl %r12d, %ecx
subl %r14d, %ecx
movl %ecx, 0x74(%rsp)
cmpl %ebp, %ecx
jb 0x6c52
movl %eax, 0x10(%rsp)
movl %ebp, %edx
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
movq %r14, %rcx
callq 0x3280
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x32f0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6f20
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3260
leal (%r14,%rbp), %eax
cmpl %r12d, %eax
jae 0x7108
leal 0x1(%rax), %ecx
movq %rcx, 0x130(%rsp)
movl %eax, %r13d
movl 0xc(%rsp), %r15d
xorl %ebx, %ebx
cmpq %r15, %rbx
jbe 0x6fb3
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x5ef4
leaq 0xa8(%rsp), %rdi
movl %ebx, %esi
callq 0xa251
movq %rax, %r14
movq 0x38(%rsp), %rax
movq %r14, (%rax,%rbx,8)
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x6fdd
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x6fdd
movq 0x38(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movq 0x18(%rsp), %rax
movsbl -0x1(%rax,%r14), %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0xa30f
movq %rax, %r14
movq 0x38(%rsp), %rax
movq %r14, (%rax,%rbx,8)
movq 0x130(%rsp), %rax
cmpq %rax, 0x48(%rsp)
jb 0x7015
movq 0x40(%rsp), %rax
movsbl (%rax,%r13), %edi
callq 0x3470
addl $-0x41, %eax
cmpl $0x13, %eax
ja 0x711d
movl $0x80045, %ecx          # imm = 0x80045
btl %eax, %ecx
jae 0x711d
leaq 0x72bc(%rip), %rax      # 0xe2d8
cmpl $0x7, (%rax)
je 0x712a
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x5ef4
movq 0x40(%rsp), %rax
movsbl (%rax,%r13), %r8d
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq %r14, %rcx
movl %ebx, %r9d
callq 0x672e
movl %eax, %r14d
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x709c
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3260
cmpl $0x6, %r14d
ja 0x70b5
movl %r14d, %eax
leaq 0x43d0(%rip), %rcx      # 0xb47c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1(%rbx), %rax
leaq 0x71f4(%rip), %rcx      # 0xe2b4
movl (%rcx), %ecx
cmpq %rcx, %rbx
movq %rax, %rbx
movq (%rsp), %r14
jb 0x6f42
leaq 0x140(%rsp), %r15
leaq 0x88(%rsp), %r13
jmp 0x7108
incq 0x60(%rsp)
jmp 0x70f0
incq 0x68(%rsp)
movl %ebx, 0xc(%rsp)
leaq 0x140(%rsp), %r15
leaq 0x88(%rsp), %r13
movq (%rsp), %r14
movl 0x10(%rsp), %eax
incl %ebp
cmpl 0x74(%rsp), %ebp
jbe 0x6ed4
jmp 0x6c52
leaq 0x71b4(%rip), %rax      # 0xe2d8
movl $0x7, (%rax)
movb $0x1, %al
movl %eax, 0x14(%rsp)
leaq 0x140(%rsp), %r15
leaq 0x88(%rsp), %r13
movq (%rsp), %r14
movl 0x10(%rsp), %eax
jmp 0x6c52
xorl %eax, %eax
jmp 0x6eb6
movq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
leaq 0x4461(%rip), %rcx      # 0xb5c8
xorl %r8d, %r8d
callq 0x33b0
movq 0x128(%rsp), %r12
leaq 0xc8(%rsp), %rbp
incq %r12
movq %r12, %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
mulq %rcx
movq %r12, %rax
movabsq $0x790fb65668c26139, %rcx # imm = 0x790FB65668C26139
imulq %rcx, %rax
rorq $0x6, %rax
movabsq $0x10c6f7a0b5ed, %rcx   # imm = 0x10C6F7A0B5ED
cmpq %rcx, %rax
ja 0x6c40
shrq $0x12, %rdx
movq 0x6e13(%rip), %rdi      # 0xdfd8
movq %rdx, %rsi
callq 0x3160
movq %rax, %rbx
movl $0x19, %edx
movq %rax, %rdi
leaq 0x3f2a(%rip), %rsi      # 0xb109
callq 0x32c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
callq 0xa158
movq %rbp, %rdi
leaq 0x138(%rsp), %rsi
callq 0x9698
movl $0x13, %edx
movq 0x6dac(%rip), %rdi      # 0xdfd8
leaq 0x3ef0(%rip), %rsi      # 0xb123
callq 0x32c0
movsd 0xc8(%rsp), %xmm0
movsd 0x3dc7(%rip), %xmm1     # 0xb010
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movq 0x6d80(%rip), %rdi      # 0xdfd8
callq 0x33e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
jmp 0x6c40
movq 0x6d45(%rip), %rbx      # 0xdfd8
leaq 0x3e9d(%rip), %rsi      # 0xb137
movl $0x1e, %edx
movq %rbx, %rdi
leaq 0x50(%rsp), %r14
leaq 0x28(%rsp), %r15
callq 0x32c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq 0x6d09(%rip), %rdi      # 0xdfd8
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x3e70(%rip), %rsi      # 0xb156
movl $0x1f, %edx
movq %rax, %rdi
callq 0x32c0
movq %rbx, %rdi
movq 0x68(%rsp), %rsi
callq 0x3170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq %rax, %rbx
leaq 0x3e42(%rip), %rsi      # 0xb176
movl $0x1b, %edx
movq %rax, %rdi
callq 0x32c0
movq %rbx, %rdi
movq 0x60(%rsp), %rsi
callq 0x3170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x73b9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x73d0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x140(%rsp), %rdi
callq 0x3070
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x74a0
jmp 0x74a0
jmp 0x74a0
movq %rax, %rbx
jmp 0x74bf
movq %rax, %rbx
jmp 0x74db
jmp 0x74a0
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x74a3
movq 0x118(%rsp), %rsi
jmp 0x7492
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x74a3
movq 0x88(%rsp), %rsi
jmp 0x7492
jmp 0x74a0
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x74a3
movq 0xb8(%rsp), %rsi
jmp 0x7492
jmp 0x74a0
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x74a3
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x74a3
jmp 0x74a0
jmp 0x74a0
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x74bf
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x74db
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x140(%rsp), %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x3430