// File: ratulSharker[P]Havec/src/vector_with_rehash_8_hash_with_N_detection_6_bytes.cpp
// Function: storeKhmerInMemBlock6Byte(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, khmerInfo6Byte*, unsigned long long, unsigned long long, char, unsigned int)
int storeKhmerInMemBlock6Byte(string sample,struct khmerInfo6Byte * memBlock,unsigned long long blockSize, unsigned long long khmer_h, char next_neucleotide, unsigned int whichHashFunc){

	unsigned long long index;
	unsigned long long qutioned; //this value must be under 12bit
	char neighbour_musk = 0xF0;
	char *p;

	//find the index value in the memBlock
	index = khmer_h % blockSize;
	
	qutioned = khmer_h / blockSize;//this value must be under 10bit

	//std::cout<<"data :: "<<(int)memBlock[index].data[1]<<std::endl;
	//cout<<"sample khmer "<<sample<<" kmer_h "<<khmer_h<<" hash func no "<<whichHashFunc<<endl;

	//now check the specified index is neighbourless or not (which is equivalent to -> is the space occupied)
	if((memBlock[index].data[4] & neighbour_musk) == 0){
		//no one is occupuying here put khmer_h here

		//putting the qutioned
		p = (char*) &qutioned;
		memBlock[index].data[0] = *p;
		p++;
		memBlock[index].data[1] = *p;
		p++;
		memBlock[index].data[2] = *p;
		p++;
		memBlock[index].data[3] = *p;
		p++;
		memBlock[index].data[4] = 0x01 & (*p);

		//putting "which hash value is stored"
		memBlock[index].data[4] = memBlock[index].data[4] | (whichHashFunc << 1);
		
		/*memBlock[index].data[0] = qutioned & 0xFF;
		memBlock[index].data[1] = (qutioned >> 8) & 0x0F;
		*/

		//std::cout<<"putting in the block array"<<std::endl;

		switch(toupper(next_neucleotide)){//putting the neighbour
		case 'A'://1000
			memBlock[index].data[4] = memBlock[index].data[4] | 0x80;
			break;
		case 'T'://0100
			memBlock[index].data[4] = memBlock[index].data[4] | 0x40;
			break;
		case 'C'://0010
			memBlock[index].data[4] = memBlock[index].data[4] | 0x20;
			break;
		case 'G'://0001
			memBlock[index].data[4] = memBlock[index].data[4] | 0x10;
			break;
		}
		//std::cout<<"index "<<index<<" quotioned :: "<< qutioned<< " data[0]=" <<(int)memBlock[index].data[0]<<" data[1]="<<(int)memBlock[index].data[1]<<std::endl;

		//increment the count value
		memBlock[index].count = 1; //--6 byte final update
		
		return MEM_BLOCK; //khmer putted in the mem_block so return mem_block
	}
	else if(((memBlock[index].data[4] >> 1) & 0x07) == whichHashFunc && //hash value matched
			(memBlock[index].data[0] == (qutioned & 0xFF)) &&
			(memBlock[index].data[1] == (qutioned & 0xFF00)>>8) &&
			(memBlock[index].data[2] == (qutioned & 0xFF0000)>>16) &&
			(memBlock[index].data[3] == (qutioned & 0xFF000000)>>24) &&
			((memBlock[index].data[4] & 0x01) == ((qutioned & 0x0100000000) >> 32))){
		//someone is sitting on the memBlock index & who is same as the khmer

		//now just update its neighbour
		//std::cout<<"now just update its neighbour"<<std::endl;
		switch(toupper(next_neucleotide)){//putting the neighbour
		case 'A'://1000
			memBlock[index].data[4] = memBlock[index].data[4] | 0x80;
			break;
		case 'T'://0100
			memBlock[index].data[4] = memBlock[index].data[4] | 0x40;
			break;
		case 'C'://0010
			memBlock[index].data[4] = memBlock[index].data[4] | 0x20;
			break;
		case 'G'://0001
			memBlock[index].data[4] = memBlock[index].data[4] | 0x10;
			break;
		}
		
		//counting upto 255 -- 6byte final
		if(memBlock[index].count<255){
			memBlock[index].count++;
		}
		/*//helps to compute how many khmer is not being listed
		else{
			number_of_khmer_not_listed_in_memblock_count_variable++;
		}
		*/
			
			
		return MEM_BLOCK_FOUND; //khmer putted in the mem_block so return mem_block -- simply update the neighbour table
	}
	else if(whichHashFunc == LAST_HASH_FUNC){
		//only for the last time put in the alternative mem
		//neighbour field is not blank -- someone already sitting there
		//and who sitting there is not same as the given khmer
		//and the set pointer is null so it must be initialized
		//std::cout<<"else reached index "<<index<<" quotioned::"<<qutioned<< " data[0]=" <<(int)memBlock[index].data[0]<<" data[1]="<<(int)memBlock[index].data[1]<<std::endl;
		//expand the set pointer & place the khmer in there
		vector<struct vector_trial_6_byte>::iterator it;
		int index_vect=0;
		int index_v=index%num_of_vector;

		for(it=mapPointer6Byte[index_v].begin();it!=mapPointer6Byte[index_v].end();it++)
		{
			if(it->index_val==index)
			{
				//cout<<"existing value found for index "<<index<<" for khmer "<<khmer_h<<endl;
				break;
			}
			index_vect++;
		}


		if(it == mapPointer6Byte[index_v].end()){
			struct vector_trial_6_byte temp_vect;
			temp_vect.index_val=index;
			//temp_vect.vect_pnt=pp;
			mapPointer6Byte[index_v].push_back(temp_vect);
			//cout<<"new value inserted for index "<<index<<" for khmer "<<khmer_h<<" stored in index "<<index_v<<endl;
		}

		struct khmerInfo6Byte kin;//making a demo
		kin.data[0] = kin.data[1] = kin.data[2] = kin.data[3] = kin.data[4] = 0; //cleaning the demo info
		
		//cout<<"New value inserted in list for memblock index "<<index<<" for khmer "<<khmer_h<<" stored in list in index "<<index_v<<" hash func no "<<whichHashFunc<<endl;
		
		switch(toupper(next_neucleotide)){//putting the neighbour
		case 'A'://1000
			kin.data[4] = kin.data[4] | 0x80;
			break;
		case 'T'://0100
			kin.data[4] = kin.data[4] | 0x40;
			break;
		case 'C'://0010
			kin.data[4] = kin.data[4] | 0x20;
			break;
		case 'G'://s
			kin.data[4] = kin.data[4] | 0x10;
			break;
		}

		//putting the hash function data in the newly made khmerInfo6Byte obj
		
		/*****************************************************/
		//problem occur -- limon
		/*****************************************************/
		bool isFound = false;
		for(std::vector<khmerInfo6Byte>::iterator pi = mapPointer6Byte[index_v][index_vect].vect.begin();
				pi != mapPointer6Byte[index_v][index_vect].vect.end() ; pi++)
		{
			if(
				((pi->data[4] >> 1) & 0x07) == whichHashFunc && //hash value matched
				(pi->data[0] == (qutioned & 0xFF)) &&
				(pi->data[1] == (qutioned & 0xFF00)>>8) &&
				(pi->data[2] == (qutioned & 0xFF0000)>>16) &&
				(pi->data[3] == (qutioned & 0xFF000000)>>24) &&
				((pi->data[4] & 0x01) == ((qutioned & 0x0100000000) >> 32))){
			//(pi->data[0] == (qutioned & 0xFF)) && ((pi->data[1] & 0x0F) == ((qutioned & 0x0F00) >> 8))){
				pi->data[4] = pi->data[4] | kin.data[4];
				
				/*
				 * searched khmer found in the list
				 * so simply increment the count variable
				*/
				if(pi->count < 255){
					pi->count++;
				}
				/*//helps to compute how many khmer is not being listed
				else{
					number_of_khmer_not_listed_in_vector_count_variable++;
				}
				*/
				
				
				isFound = true;
				//cout<<"isFound true"<<endl;
				break;
			}
		}
		if(isFound == false){
		
			//putting the qutioned
			p = (char*) &qutioned;
			kin.data[0] = *p;
			p++;
			kin.data[1] = *p;
			p++;
			kin.data[2] = *p;
			p++;
			kin.data[3] = *p;
			p++;
			kin.data[4] = 0x01 & (*p);
			
			//putting "which hash value is stored"
			kin.data[4] = kin.data[4] | (whichHashFunc << 1); //--optimization		

			/*
			 *  searched khmer not found in the vector
			 *  so set count to one
			 */
			kin.count = 1;
			
			
			(mapPointer6Byte[index_v])[index_vect].vect.push_back(kin);
			
			return LIST;//new entry in the list
		}

		return LIST_FOUND; //khmer found in the list so return LIST_FOUND
	}

	//none of the if-else block is reached so it caused error
	//this means that particular khmer couldn't be placed inside the memblock
	//it will basically return for hash func 0,1,2 -> for hash func 3 if it fails
	//it will be stored in the list/vector/sqlite
	return ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movb %al, -0x29(%rbp)
movl %r9d, -0x30(%rbp)
movb $-0x10, -0x41(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
movsbl -0x41(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x9fa1
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %dl, (%rax,%rcx,2)
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %dl, 0x1(%rax,%rcx,2)
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %dl, 0x2(%rax,%rcx,2)
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %dl, 0x3(%rax,%rcx,2)
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %dl
andb $0x1, %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %dl, 0x4(%rax,%rcx,2)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movzbl 0x4(%rax,%rcx,2), %edx
movl -0x30(%rbp), %esi
addl %esi, %esi
orl %esi, %edx
movb %dl, 0x4(%rax,%rcx,2)
movsbl -0x29(%rbp), %edi
callq 0x3590
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0xd8(%rbp)
subl $0x13, %eax
ja 0x9f85
movq -0xd8(%rbp), %rax
leaq 0x76e8(%rip), %rcx      # 0x115cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x80, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0x9f85
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x40, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0x9f85
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x20, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0x9f85
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x10, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movb $0x1, 0x5(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa66c
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
sarl %eax
andl $0x7, %eax
cmpl -0x30(%rbp), %eax
jne 0xa192
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff, %rcx
cmpq %rcx, %rax
jne 0xa192
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x1(%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff00, %rcx           # imm = 0xFF00
shrq $0x8, %rcx
cmpq %rcx, %rax
jne 0xa192
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x2(%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff0000, %rcx         # imm = 0xFF0000
shrq $0x10, %rcx
cmpq %rcx, %rax
jne 0xa192
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x3(%rax), %eax
movabsq $0xff000000, %rcx       # imm = 0xFF000000
andq -0x40(%rbp), %rcx
shrq $0x18, %rcx
cmpq %rcx, %rax
jne 0xa192
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
andl $0x1, %eax
cltq
movabsq $0x100000000, %rcx      # imm = 0x100000000
andq -0x40(%rbp), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jne 0xa192
movsbl -0x29(%rbp), %edi
callq 0x3590
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0xe0(%rbp)
subl $0x13, %eax
ja 0xa15a
movq -0xe0(%rbp), %rax
leaq 0x74c3(%rip), %rcx      # 0x1157c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x80, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0xa15a
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x40, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0xa15a
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x20, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
jmp 0xa15a
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x4(%rax), %eax
orl $0x10, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rdx
addq %rdx, %rax
movb %cl, 0x4(%rax)
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movzbl 0x5(%rax), %eax
cmpl $0xff, %eax
jge 0xa186
movq -0x18(%rbp), %rax
imulq $0x6, -0x38(%rbp), %rcx
addq %rcx, %rax
movb 0x5(%rax), %cl
addb $0x1, %cl
movb %cl, 0x5(%rax)
movl $0x2, -0x4(%rbp)
jmp 0xa66c
movl -0x30(%rbp), %eax
leaq 0xd1b8(%rip), %rcx      # 0x17354
cmpl (%rcx), %eax
jne 0xa661
leaq -0x58(%rbp), %rdi
callq 0xd930
movl $0x0, -0x5c(%rbp)
movq -0x38(%rbp), %rax
leaq 0xd1c1(%rip), %rcx      # 0x17380
xorl %edx, %edx
divq (%rcx)
movl %edx, %eax
movl %eax, -0x60(%rbp)
movq 0xd170(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0xd950
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0xd14d(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0xd9c0
movq %rax, -0x70(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xd980
testb $0x1, %al
jne 0xa21a
jmp 0xa248
leaq -0x58(%rbp), %rdi
callq 0xd9f0
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jne 0xa22e
jmp 0xa248
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0xda10
movq %rax, -0x78(%rbp)
jmp 0xa1ec
movq 0xd0f1(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0xd9c0
movq %rax, -0x80(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xda50
testb $0x1, %al
jne 0xa276
jmp 0xa2e6
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xda90
movq -0xe8(%rbp), %rsi
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq 0xd09e(%rip), %rax      # 0x17340
movslq -0x60(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0xdab0
jmp 0xa2b5
leaq -0xa0(%rbp), %rdi
callq 0xdb20
jmp 0xa2e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xdb20
jmp 0xa678
leaq -0xb2(%rbp), %rdi
callq 0xdb40
movb $0x0, -0xae(%rbp)
movb $0x0, -0xaf(%rbp)
movb $0x0, -0xb0(%rbp)
movb $0x0, -0xb1(%rbp)
movb $0x0, -0xb2(%rbp)
movsbl -0x29(%rbp), %edi
callq 0x3590
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0xf0(%rbp)
subl $0x13, %eax
ja 0xa38e
movq -0xf0(%rbp), %rax
leaq 0x71ef(%rip), %rcx      # 0x1152c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0xae(%rbp), %eax
orl $0x80, %eax
movb %al, -0xae(%rbp)
jmp 0xa38e
movzbl -0xae(%rbp), %eax
orl $0x40, %eax
movb %al, -0xae(%rbp)
jmp 0xa38e
movzbl -0xae(%rbp), %eax
orl $0x20, %eax
movb %al, -0xae(%rbp)
jmp 0xa38e
movzbl -0xae(%rbp), %eax
orl $0x10, %eax
movb %al, -0xae(%rbp)
movb $0x0, -0xb3(%rbp)
movq 0xcfa4(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x5c(%rbp), %rsi
callq 0xd8c0
movq %rax, %rdi
addq $0x8, %rdi
callq 0xdb60
movq %rax, -0xc0(%rbp)
movq 0xcf76(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x5c(%rbp), %rsi
callq 0xd8c0
movq %rax, %rdi
addq $0x8, %rdi
callq 0xdbd0
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xdb90
testb $0x1, %al
jne 0xa40d
jmp 0xa57a
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x4(%rax), %eax
sarl %eax
andl $0x7, %eax
cmpl -0x30(%rbp), %eax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl (%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff, %rcx
cmpq %rcx, %rax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x1(%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff00, %rcx           # imm = 0xFF00
shrq $0x8, %rcx
cmpq %rcx, %rax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x2(%rax), %eax
movq -0x40(%rbp), %rcx
andq $0xff0000, %rcx         # imm = 0xFF0000
shrq $0x10, %rcx
cmpq %rcx, %rax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x3(%rax), %eax
movabsq $0xff000000, %rcx       # imm = 0xFF000000
andq -0x40(%rbp), %rcx
shrq $0x18, %rcx
cmpq %rcx, %rax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x4(%rax), %eax
andl $0x1, %eax
cltq
movabsq $0x100000000, %rcx      # imm = 0x100000000
andq -0x40(%rbp), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
jne 0xa55e
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x4(%rax), %eax
movzbl -0xae(%rbp), %ecx
orl %ecx, %eax
movb %al, -0xf1(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movb -0xf1(%rbp), %cl
movb %cl, 0x4(%rax)
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movzbl 0x5(%rax), %eax
cmpl $0xff, %eax
jge 0xa555
leaq -0xc0(%rbp), %rdi
callq 0xdc00
movb 0x5(%rax), %cl
addb $0x1, %cl
movb %cl, 0x5(%rax)
movb $0x1, -0xb3(%rbp)
jmp 0xa57a
jmp 0xa560
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
callq 0xdc20
movq %rax, -0xd0(%rbp)
jmp 0xa3c3
movb -0xb3(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xa658
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0xb2(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0xb1(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0xb0(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0xaf(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
andl $0x1, %eax
movb %al, -0xae(%rbp)
movzbl -0xae(%rbp), %eax
movl -0x30(%rbp), %ecx
shll %ecx
orl %ecx, %eax
movb %al, -0xae(%rbp)
movb $0x1, -0xad(%rbp)
movq 0xcd18(%rip), %rdi      # 0x17340
movslq -0x60(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x5c(%rbp), %rsi
callq 0xd8c0
movq %rax, %rdi
addq $0x8, %rdi
leaq -0xb2(%rbp), %rsi
callq 0xdc60
movl $0x0, -0x4(%rbp)
jmp 0xa66c
movl $0x6, -0x4(%rbp)
jmp 0xa66c
jmp 0xa663
jmp 0xa665
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x3540
nopw %cs:(%rax,%rax)