// File: /workspace/github_cpp_makefile_star2_O3/ratulSharker[P]Havec/src/vector_with_rehash_8_hash_with_N_detection_6_bytes.cpp
// Function: main6Byte(int, char**)
void main6Byte(int argc, char** argv) {

	//freopen("results.txt","w",stdout);
	unsigned long long size;
	int kSize;
	std::string::size_type sz = 0;
	char *filename=new char[200];
	num_of_vector = get_a_prime_above_x(500000);
	
	/*
	* new variable introduced in the 6 byte code section --- which is cutoff value
	*/
	
	if(argc < 7){//newly changed
		std::cout<<"sufficient number of argument is not passed"<<std::endl<<" 'fileName' 'khmersize' 'howManyHash' 'cut-off or no cut-off' 'print or not print' 'hashSize' 'multiplying factor'"<<std::endl;//newly changed
		return ;
	}


	/*std::string::size_type sz = 0;
	std::cout<<"Give input file name :: "<<std::endl;
	std::cin>>filename;*/

	//fetching the args
	strcpy(filename,argv[1]);
	kSize = atoi(argv[2]);
	LAST_HASH_FUNC = atoi(argv[3])-1;//0 indexing hash function used
	
	//size =  std::stoull(argv[3],&sz,10);
	size= 0;
	if(argc == 7){ //size provided as the last argument -- so process it //newly changed
		size =  std::stoull(argv[6],&sz,10);//newly changed
	}
	else if(argc == 8)//newly changed
	{
		/*
		* here we parse the multiplying by factor --- which is not optional anymore
 		*/
		size =  std::stoull(argv[6],&sz,10) * atof(argv[7]);//newly changed
	}

/* unblock this area -- you must should (blocked this code section due to low memory space)
 * warning 
 * warning
 * WARNING --- unblock this code of section before releasing
 */
 /*
	if(size < (pow(2,2 * kSize - 33)+ 536870912)){
		size = pow(2,2 * kSize - 33)+ 536870912;
	}
*/


//building the filename
	string fileName = "6_";
	fileName.append(argv[1]);

	fileName.append("_k_");
	fileName.append(argv[2]);
	fileName.append("_h_");
	fileName.append(argv[3]);

	if(argc >= 6)
	{
		fileName.append("_s_");
		fileName.append(argv[6]);

		if(argc >= 7)
		{
			fileName.append("_mf_");
			fileName.append(argv[7]);
		}
	}
	//cant contain the dot, thats why replacing it with the 
	// - char
	replace(fileName.begin(), fileName.end(), '.', '-');
	replace(fileName.begin(), fileName.end(), '/', '~');


	string outputDir = OUTPUT_DIRECTORY_NAME;
	fileName = outputDir.append(fileName);
	fileName.append(".txt");
	
	//enable this line will give you access the whole output in the cmd
	freopen(fileName.c_str(),"w",stdout);

	
	currentDateTime();
	
	/*std::cout<<"Give Kmer Size :: "<<std::endl;
	std::cin>>kSize;
	std::cout<<"Minimum space you want to give to hash's :: "<<std::endl;
	std::cin>>size;*/
	//initial memory arrangement
	size=get_a_prime_above_x(size);
	cout<<"Hash size is "<<size<<endl;

	std::cout<<"filename::"<<filename<<" ksize::"<<kSize<<" Size::"<<size<<std::endl;

	populateTwoBitReprHashMap();//populating map
	struct khmerInfo6Byte *blockArray=new struct khmerInfo6Byte[size];
	mapPointer6Byte=new vector<struct vector_trial_6_byte>[num_of_vector];
	
	//cleaning the array
	memset( blockArray, 0, sizeof(struct khmerInfo6Byte) * size);

/*	
	bool zeroFound = true;
	for(int j=0;j<size;j++){
		if(blockArray[j].count != 0){
			zeroFound = false;
			break;
		}		
	}

	if(zeroFound == false){
		cout<<"All are not set to zero"<<endl;
	}
	else{
		cout<<"All are zero"<<endl;
	}


	cout<<"After memory allocation"<<endl;
	*/
	
	currentDateTime();

	//this function will populate the whole memblock & the vector structure
	populateBlock6Byte(blockArray, size , filename , kSize);

	show_vect_status_6_byte();
	
	currentDateTime();
	
	//rechecking ...
	//reCheckTheKhmerExistence6Byte(blockArray,size,argv[1],kSize);
	show_count_status(blockArray,size);
	currentDateTime();
	
	double vm, rss;
	process_mem_usage(vm, rss);
	
	cout<<"HashTable memory allocation (GB):: "<<((double)size * 6.0 )/(1024.0 * 1024.0 * 1024.0)<<endl;
	cout<<"Vector memory allocation    (GB):: "<<(((vm)/1024.0)/1024.0) - (((double)size * 6.0 )/(1024.0 * 1024.0 * 1024.0)) <<endl;

	cout << "Total memory used (GB):  " << ((vm)/1024.0)/1024.0 <<endl;
	
	/*//newly changed
	* before deleting the block array check for the print state
	*/
	if(strcmp("p",argv[5]) == 0 ||  strcmp("P",argv[5]) == 0 ) //newly changed
	{
		//time to print the whole block array
		print6ByteHashTableAndVectorStructure(blockArray , size, kSize,mapPointer6Byte);
	}
	
	delete [] blockArray;
	
	fclose(stdout);
	return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl $0xc8, %edi
callq 0x3030
movq %rax, %r13
movl $0x7a120, %edi          # imm = 0x7A120
callq 0xa117
leaq 0x5dcb(%rip), %r15      # 0xe2e0
movq %rax, (%r15)
cmpl $0x6, %ebp
jg 0x85af
movq 0x5ab0(%rip), %rbx      # 0xdfd8
leaq 0x2d1d(%rip), %rsi      # 0xb24c
movl $0x2b, %edx
movq %rbx, %rdi
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
movq %rax, %rbx
leaq 0x305c(%rip), %rsi      # 0xb5c9
movl $0x72, %edx
movq %rax, %rdi
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
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3180
movq 0x8(%r14), %rsi
movq %r13, %rdi
callq 0x3210
movq 0x10(%r14), %rdi
callq 0x33c0
movl %eax, 0x24(%rsp)
movq 0x18(%r14), %rdi
callq 0x33c0
decl %eax
leaq 0x5cda(%rip), %rcx      # 0xe2b4
movl %eax, (%rcx)
cmpl $0x8, %ebp
je 0x8665
cmpl $0x7, %ebp
jne 0x86c8
movq %r13, %rbp
movq 0x30(%r14), %rsi
movq %rsp, %rdi
leaq 0x28(%rsp), %rdx
callq 0x5e52
movq (%rsp), %rbx
callq 0x3050
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x30(%rsp)
movl $0x0, (%r13)
leaq 0x48(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3340
cmpq %rbx, (%r15)
je 0x91e9
movq %rax, %r12
movl (%r13), %eax
testl %eax, %eax
je 0x86d0
cmpl $0x22, %eax
leaq 0x5c8d(%rip), %r15      # 0xe2e0
jne 0x86df
leaq 0x2d2c(%rip), %rdi      # 0xb38c
callq 0x3370
movq 0x30(%r14), %rsi
movq %rsp, %rdi
leaq 0x28(%rsp), %rdx
callq 0x5e52
movq (%rsp), %rbx
callq 0x3050
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x48(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3340
cmpq %rbx, (%r15)
je 0x91f5
movl (%r12), %ecx
testl %ecx, %ecx
je 0x86ff
cmpl $0x22, %ecx
leaq 0x5c26(%rip), %r15      # 0xe2e0
jne 0x870a
leaq 0x2cc9(%rip), %rdi      # 0xb38c
callq 0x3370
xorl %r12d, %r12d
jmp 0x877a
movl 0x30(%rsp), %eax
movl %eax, (%r13)
leaq 0x5c01(%rip), %r15      # 0xe2e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86fa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbp, %r13
jmp 0x877a
movl %ebp, (%r12)
leaq 0x5bd6(%rip), %r15      # 0xe2e0
movq %rax, %xmm0
punpckldq 0x2959(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2961(%rip), %xmm0     # 0xb080
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x30(%rsp)
movq 0x38(%r14), %rdi
callq 0x3300
mulsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %r12
movq %r12, %rax
sarq $0x3f, %rax
subsd 0x28c4(%rip), %xmm0     # 0xb018
cvttsd2si %xmm0, %rbx
andq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8777
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
orq %rbx, %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2eb2(%rip), %rsi      # 0xb63c
leaq 0x2ead(%rip), %rdx      # 0xb63e
movq %rsp, %rdi
callq 0x6334
movq 0x8(%r14), %rsi
movq %rsp, %rdi
callq 0x3490
leaq 0x2b43(%rip), %rsi      # 0xb2ef
movq %rsp, %rdi
callq 0x3490
movq 0x10(%r14), %rsi
movq %rsp, %rdi
callq 0x3490
leaq 0x2b2c(%rip), %rsi      # 0xb2f3
movq %rsp, %rdi
callq 0x3490
movq 0x18(%r14), %rsi
movq %rsp, %rdi
callq 0x3490
leaq 0x2b15(%rip), %rsi      # 0xb2f7
movq %rsp, %rdi
callq 0x3490
movq 0x30(%r14), %rsi
movq %rsp, %rdi
callq 0x3490
leaq 0x2afe(%rip), %rsi      # 0xb2fb
movq %rsp, %rdi
callq 0x3490
movq 0x38(%r14), %rsi
movq %rsp, %rdi
callq 0x3490
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x8855
movq (%rsp), %rcx
xorl %edx, %edx
cmpb $0x2e, (%rcx,%rdx)
jne 0x882b
movb $0x2d, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x8821
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x8855
movq (%rsp), %rcx
xorl %edx, %edx
cmpb $0x2f, (%rcx,%rdx)
jne 0x884d
movb $0x7e, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x8843
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x279f(%rip), %rsi      # 0xb004
leaq 0x279f(%rip), %rdx      # 0xb00b
leaq 0x48(%rsp), %rdi
callq 0x6334
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x3090
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3100
leaq 0x298a(%rip), %rsi      # 0xb225
movq %rsp, %rdi
callq 0x3490
movq (%rsp), %rdi
movq 0x5712(%rip), %rax      # 0xdfc0
movq (%rax), %rdx
leaq 0x298e(%rip), %rsi      # 0xb246
callq 0x3290
callq 0xa158
movq %r12, %rdi
callq 0xa117
movq %rax, %r12
movq 0x5704(%rip), %rdi      # 0xdfd8
leaq 0x2a25(%rip), %rsi      # 0xb300
movl $0xd, %edx
callq 0x32c0
movq 0x56ec(%rip), %rdi      # 0xdfd8
movq %r12, %rsi
callq 0x3160
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 0x56b3(%rip), %rdi      # 0xdfd8
leaq 0x29e2(%rip), %rsi      # 0xb30e
movl $0xa, %edx
callq 0x32c0
movq %r13, %rdi
callq 0x30c0
movq 0x5693(%rip), %rdi      # 0xdfd8
movq %r13, %rsi
movq %rax, %rdx
callq 0x32c0
movq 0x5681(%rip), %rdi      # 0xdfd8
leaq 0x29bb(%rip), %rsi      # 0xb319
movl $0x8, %edx
callq 0x32c0
movq 0x5669(%rip), %rdi      # 0xdfd8
movl 0x24(%rsp), %esi
callq 0x3420
movq %rax, %rbx
leaq 0x29a0(%rip), %rsi      # 0xb322
movl $0x7, %edx
movq %rax, %rdi
callq 0x32c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3160
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
callq 0xa23f
movq %r13, 0x68(%rsp)
movl $0x6, %ecx
movq %r12, %rax
mulq %rcx
movq $-0x1, %rdi
movq %rax, 0x30(%rsp)
cmovnoq %rax, %rdi
callq 0x3030
movq %rax, %r13
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
testq %r12, %r12
je 0x8f44
leaq (%r12,%r12,2), %rax
leaq -0x6(,%rax,2), %rax
mulq %rbp
movq %rdx, %xmm0
shrq $0x2, %rdx
addq $0x10, %rdx
andq $-0x10, %rdx
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x2, %xmm0
leaq 0x5f(%r13), %rax
xorl %ecx, %ecx
movdqa 0x2a84(%rip), %xmm3     # 0xb4c0
movdqa 0x2a8c(%rip), %xmm4     # 0xb4d0
movdqa 0x2a94(%rip), %xmm5     # 0xb4e0
movdqa 0x2a9c(%rip), %xmm6     # 0xb4f0
movdqa 0x2aa4(%rip), %xmm7     # 0xb500
movdqa 0x2aab(%rip), %xmm8     # 0xb510
movdqa 0x2ab2(%rip), %xmm9     # 0xb520
pcmpeqd %xmm10, %xmm10
movq %rcx, %xmm11
pshufd $0x44, %xmm11, %xmm11   # xmm11 = xmm11[0,1,0,1]
movdqa %xmm11, %xmm13
por %xmm8, %xmm13
movdqa %xmm0, %xmm12
pxor %xmm9, %xmm12
pxor %xmm9, %xmm13
movdqa %xmm13, %xmm15
pcmpgtd %xmm12, %xmm15
pshufd $0xa0, %xmm15, %xmm14   # xmm14 = xmm15[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm1    # xmm1 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm2    # xmm2 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm1, %xmm2
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm1    # xmm1 = xmm15[0,2,2,3,4,5,6,7]
por %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
movd %xmm1, %esi
testb $0x1, %sil
je 0x8ae9
movb $0x0, -0x5a(%rax)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8b19
movb $0x0, -0x54(%rax)
movdqa %xmm11, %xmm1
por %xmm7, %xmm1
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm13    # xmm13 = xmm2[0,0,2,2]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm14    # xmm14 = xmm1[1,1,3,3]
movdqa %xmm14, %xmm1
pand %xmm13, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
por %xmm15, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
movd %xmm1, %esi
shrl $0x10, %esi
testb $0x1, %sil
je 0x8b78
movb $0x0, -0x4e(%rax)
pshufhw $0x84, %xmm13, %xmm1    # xmm1 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm2    # xmm2 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm1, %xmm2
pshufhw $0x84, %xmm15, %xmm1    # xmm1 = xmm15[0,1,2,3,4,5,4,6]
por %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
movd %xmm1, %esi
shrl $0x18, %esi
testb $0x1, %sil
je 0x8bb0
movb $0x0, -0x48(%rax)
movdqa %xmm11, %xmm1
por %xmm6, %xmm1
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm14    # xmm14 = xmm2[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm13    # xmm13 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm1    # xmm1 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm2    # xmm2 = xmm15[0,2,2,3,4,5,6,7]
por %xmm1, %xmm2
pxor %xmm10, %xmm2
packssdw %xmm2, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x2, %xmm1, %esi
testb $0x1, %sil
je 0x8c15
movb $0x0, -0x42(%rax)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x2, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8c44
movb $0x0, -0x3c(%rax)
movdqa %xmm11, %xmm1
por %xmm5, %xmm1
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm13    # xmm13 = xmm2[0,0,2,2]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm14    # xmm14 = xmm1[1,1,3,3]
movdqa %xmm14, %xmm1
pand %xmm13, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
por %xmm15, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x3, %xmm1, %esi
testb $0x1, %sil
je 0x8ca1
movb $0x0, -0x36(%rax)
pshufhw $0x84, %xmm13, %xmm1    # xmm1 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm2    # xmm2 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm1, %xmm2
pshufhw $0x84, %xmm15, %xmm1    # xmm1 = xmm15[0,1,2,3,4,5,4,6]
por %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x3, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8cda
movb $0x0, -0x30(%rax)
movdqa %xmm11, %xmm1
por %xmm4, %xmm1
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm14    # xmm14 = xmm2[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm13    # xmm13 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm1    # xmm1 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm2    # xmm2 = xmm15[0,2,2,3,4,5,6,7]
por %xmm1, %xmm2
pxor %xmm10, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm1
pextrw $0x4, %xmm1, %esi
testb $0x1, %sil
je 0x8d3f
movb $0x0, -0x2a(%rax)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm1
pextrw $0x4, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8d6f
movb $0x0, -0x24(%rax)
movdqa %xmm11, %xmm1
por %xmm3, %xmm1
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm13    # xmm13 = xmm2[0,0,2,2]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm14    # xmm14 = xmm1[1,1,3,3]
movdqa %xmm14, %xmm1
pand %xmm13, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
por %xmm15, %xmm1
packssdw %xmm1, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x5, %xmm1, %esi
testb $0x1, %sil
je 0x8dcc
movb $0x0, -0x1e(%rax)
pshufhw $0x84, %xmm13, %xmm1    # xmm1 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm2    # xmm2 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm1, %xmm2
pshufhw $0x84, %xmm15, %xmm1    # xmm1 = xmm15[0,1,2,3,4,5,4,6]
por %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x5, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8e05
movb $0x0, -0x18(%rax)
movdqa %xmm11, %xmm1
por 0x269e(%rip), %xmm1     # 0xb4b0
pxor %xmm9, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm12, %xmm2
pshufd $0xa0, %xmm2, %xmm14    # xmm14 = xmm2[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm1
pshufd $0xf5, %xmm1, %xmm13    # xmm13 = xmm1[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm1    # xmm1 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm1
pshufd $0xf5, %xmm2, %xmm15    # xmm15 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm2    # xmm2 = xmm15[0,2,2,3,4,5,6,7]
por %xmm1, %xmm2
pxor %xmm10, %xmm2
packssdw %xmm2, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x6, %xmm1, %esi
testb $0x1, %sil
je 0x8e6e
movb $0x0, -0x12(%rax)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x6, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8e9d
movb $0x0, -0xc(%rax)
por 0x25fa(%rip), %xmm11    # 0xb4a0
pxor %xmm9, %xmm11
movdqa %xmm11, %xmm1
pcmpgtd %xmm12, %xmm1
pshufd $0xa0, %xmm1, %xmm13    # xmm13 = xmm1[0,0,2,2]
pcmpeqd %xmm12, %xmm11
pshufd $0xf5, %xmm11, %xmm11   # xmm11 = xmm11[1,1,3,3]
movdqa %xmm11, %xmm2
pand %xmm13, %xmm2
pshufd $0xf5, %xmm1, %xmm12    # xmm12 = xmm1[1,1,3,3]
por %xmm12, %xmm2
packssdw %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x7, %xmm1, %esi
testb $0x1, %sil
je 0x8efb
movb $0x0, -0x6(%rax)
pshufhw $0x84, %xmm13, %xmm1    # xmm1 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm11, %xmm2    # xmm2 = xmm11[0,1,2,3,4,5,4,6]
pand %xmm1, %xmm2
pshufhw $0x84, %xmm12, %xmm1    # xmm1 = xmm12[0,1,2,3,4,5,4,6]
por %xmm2, %xmm1
pxor %xmm10, %xmm1
packssdw %xmm1, %xmm1
packsswb %xmm1, %xmm1
pextrw $0x7, %xmm1, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0x8f33
movb $0x0, (%rax)
addq $0x10, %rcx
addq $0x60, %rax
cmpq %rcx, %rdx
jne 0x8a73
movq (%r15), %rbx
movl $0x18, %ecx
movq %rbx, %rax
mulq %rcx
seto %cl
addq $0x8, %rax
movq $-0x1, %rdi
cmovbq %rdi, %rax
testb %cl, %cl
cmoveq %rax, %rdi
callq 0x3030
movq %rax, %r15
movq %rbx, (%rax)
addq $0x8, %r15
testq %rbx, %rbx
je 0x8fa7
leaq (%rbx,%rbx,2), %rax
leaq -0x18(,%rax,8), %rax
mulq %rbp
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3120
movq %r15, 0x52f2(%rip)      # 0xe2a0
movq %r13, %rdi
xorl %esi, %esi
movq 0x30(%rsp), %rdx
callq 0x3120
callq 0xa158
movzwl 0x24(%rsp), %ecx
movq %r13, %rdi
movq %r12, %rsi
movq 0x68(%rsp), %rdx
callq 0x6a72
callq 0x63cc
callq 0xa158
movq %r13, %rdi
movq %r12, %rsi
callq 0x6512
callq 0xa158
leaq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x9698
movq 0x4fd1(%rip), %rdi      # 0xdfd8
leaq 0x231c(%rip), %rsi      # 0xb32a
movl $0x23, %edx
callq 0x32c0
movq %r12, %xmm1
punpckldq 0x204b(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2053(%rip), %xmm1     # 0xb080
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x2417(%rip), %xmm0     # 0xb458
mulsd 0x1fdf(%rip), %xmm0     # 0xb028
movq 0x4f88(%rip), %rdi      # 0xdfd8
movapd %xmm0, 0x30(%rsp)
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
movq 0x4f4c(%rip), %rdi      # 0xdfd8
leaq 0x22bb(%rip), %rsi      # 0xb34e
movl $0x23, %edx
callq 0x32c0
movsd 0x1f6b(%rip), %xmm1     # 0xb010
movsd 0x28(%rsp), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
subsd 0x30(%rsp), %xmm0
movq 0x4f18(%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
movq 0x4ee2(%rip), %rdi      # 0xdfd8
leaq 0x2275(%rip), %rsi      # 0xb372
movl $0x19, %edx
callq 0x32c0
movsd 0x28(%rsp), %xmm0
movsd 0x1efb(%rip), %xmm1     # 0xb010
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movq 0x4eb4(%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
movq 0x28(%r14), %rcx
movzbl (%rcx), %eax
cmpl $0x70, %eax
jne 0x9167
cmpb $0x0, 0x1(%rcx)
jne 0x918c
jmp 0x9176
subl $0x50, %eax
jne 0x9170
movzbl 0x1(%rcx), %eax
negl %eax
testl %eax, %eax
jne 0x918c
movq 0x5123(%rip), %rcx      # 0xe2a0
movq %r13, %rdi
movq %r12, %rsi
movl 0x24(%rsp), %edx
callq 0x80cf
movq %r13, %rdi
callq 0x3330
movq 0x4e25(%rip), %rax      # 0xdfc0
movq (%rax), %rdi
callq 0x3240
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x91bf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x91da
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x219c(%rip), %rdi      # 0xb38c
callq 0x3130
leaq 0x2190(%rip), %rdi      # 0xb38c
callq 0x3130
jmp 0x9234
jmp 0x9234
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x9227
movl %ebp, (%r12)
jmp 0x9227
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x9227
movl 0x30(%rsp), %eax
movl %eax, (%r13)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x926a
jmp 0x923b
movq %rax, %rbx
jmp 0x927c
jmp 0x9242
movq %rax, %rbx
jmp 0x9261
jmp 0x9242
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x9261
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x927c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3430