// File: /workspace/github_cpp_makefile_star2_O2/Mengjintao[P]SWAPCounter/src/kmerGraph.cpp
// Function: kmerGraph::extractKmerGraph(parameter*, MPIEnviroment*, bloomFilter*, char*, long long, long long, long&, long&)
void kmerGraph::extractKmerGraph(parameter *parameters, MPIEnviroment *MPIcontrol, bloomFilter *bFilter, char *readBuf, long long int localEnd, long long int readRound, clock_t & commTime, clock_t & checkTime)
{
		clock_t t0, t1;
		clock_t tt0, tt1;

		long long int tot_kmer_num = 0, localTag=0, localLen=0;
		for(long long int i=0; i<localEnd&&readBuf; i++)
		{
			if(readBuf[i]=='>')	
			{	
				localTag=0;	
				if(localLen <= parameters->hashLength+1)	continue;
				tot_kmer_num += localLen-parameters->hashLength;
				localLen = 0;
			}
			else if(localTag==0&&readBuf[i]=='\n')	localTag=1, localLen=0;
			else if(localTag==1)			localLen++;
		}	
		if(localLen>parameters->hashLength+1)	tot_kmer_num += localLen-parameters->hashLength;
		size  = tot_kmer_num;

		unsigned long long *kmers = new unsigned long long [size];
		unsigned char      *arcs  = new unsigned char      [size];
		assert(kmers && arcs);	
	
		tt0 = clock();		
		tot_kmer_num=0, localTag=0, localLen=0;
		for(long long int i=0; i<localEnd&&readBuf; i++)
		{
			if(readBuf[i]=='>')	
			{	
				localTag=0;	
				if(localLen <= parameters->hashLength+1)	continue;
				long long r = addKmers(readBuf+i-localLen, readBuf+i-1, kmers+tot_kmer_num, arcs+tot_kmer_num, parameters); 
			
				if(r!=localLen-parameters->hashLength)
				{
					printf("------r = %ld %ld %ld %ld-----------\n", r, localLen, localLen-parameters->hashLength, i);
					for(char *p=readBuf+i-localLen; p<=readBuf+i;p++)	printf("%c", *p);
					printf("\n");
					fflush(stdout);
				}
				assert(r==localLen-parameters->hashLength);
				localLen = 0;
				tot_kmer_num += r;
			}
			else if(localTag==0&&readBuf[i]=='\n')	localTag=1, localLen=0;
			else if(localTag==1)			
			{
				if(readBuf[i]=='A'||readBuf[i]=='T'||readBuf[i]=='C'||readBuf[i]=='G'|| readBuf[i]=='\n');
				else	readBuf[i]='A';				
				localLen++;
			}
		}	
	
		if(localLen>parameters->hashLength+1&&readBuf)	{
//			if(readBuf[localEnd]!='>')	localLen--;
			long long r = addKmers(readBuf+localEnd-localLen, readBuf+localEnd-1, kmers+tot_kmer_num, arcs+tot_kmer_num, parameters); 
			tot_kmer_num += r;
		//	assert(r==localLen-parameters->hashLength);
		}
		assert(size==tot_kmer_num);
		size  = tot_kmer_num;
//		readRound++;

		tt1 = clock();
//		MPI_Barrier(MPI_COMM_WORLD);
//		if(MPIcontrol->rank==0)	printf("Proc %d: OK in Barrier 2, size=%lld\n", MPIcontrol->rank, size);

		//arrange kmers and arcs before the communication step
		unsigned long long *kmers_send = new unsigned long long [size];
		assert(kmers_send != NULL);
		unsigned char      *arcs_send  = new unsigned char      [size];
		assert(arcs_send != NULL);
		for(long long i=0; i < size; i++)	kmers_send[i] = arcs_send[i] = 0;

		int  *send_size = new int [MPIcontrol->nprocs];
		assert(send_size!=NULL);
		int  *recv_size = new int [MPIcontrol->nprocs];
		assert(recv_size!=NULL);
		int  *send_pos  = new int [MPIcontrol->nprocs];
		assert(send_pos!=NULL);
		int  *recv_pos  = new int [MPIcontrol->nprocs];
		assert(recv_pos!=NULL);

		for(int i=0; i<MPIcontrol->nprocs; i++)	send_size[i] = recv_size[i] = 0;

//		if(MPIcontrol->rank==0)	printf("Proc %d: OK in Barrier 2 size=%llu\n", MPIcontrol->rank, size);
//		fflush(stdout);
//		MPI_Barrier(MPI_COMM_WORLD);

		unsigned long long send_sum=0,  recv_sum=0;
		unsigned long long ProcsID;	

		for(long long i=0; i<size; i++)
		{
			ProcsID = getProcsID(kmers[i], parameters->hashLength, MPIcontrol);
			assert(ProcsID>=0 && ProcsID<(unsigned long long) MPIcontrol->nprocs);
			send_size[ProcsID]++;
		}

		checkTime += tt1-tt0;
		t0 = clock();
//		MPI_Barrier(MPI_COMM_WORLD);
		MPI_Alltoall(send_size, 1, MPI_INT, recv_size, 1, MPI_INT, MPI_COMM_WORLD);
		t1 = clock();
		commTime += (t1-t0);
		tt0 = clock();
		for(int i=0; i<MPIcontrol->nprocs; i++)	send_sum += send_size[i];
		for(int i=0; i<MPIcontrol->nprocs; i++)	recv_sum += recv_size[i];
		assert(send_sum == (unsigned long long) size);
	
//		MPI_Barrier(MPI_COMM_WORLD);
//		if(MPIcontrol->rank==0)	printf("Proc %d: OK in Barrier 3\n", MPIcontrol->rank);
//		printf("Proc %d: send_sum=%llu recv_sum=%llu\n", MPIcontrol->rank, send_sum, recv_sum);

		send_pos[0] = 0;
		for(int i=1; i<MPIcontrol->nprocs; i++)	send_pos[i] = send_pos[i-1] + send_size[i-1];
		recv_pos[0] = 0;
		for(int i=1; i<MPIcontrol->nprocs; i++)	recv_pos[i] = recv_pos[i-1] + recv_size[i-1];
//	        printf("proc%d: ", MPIcontrol->rank);
//        	for(int i=0;i<size;i++) printf("send_size[%d]=%d ", i, send_size[i]);
//        	printf("\t");
//		printf("proc%d: ", MPIcontrol->rank);
//       	for(int i=0;i<size;i++) printf("recv_size[%d]=%d ", i, recv_size[i]);

		for(long long i=0; i<size; i++)
		{
			ProcsID = getProcsID(kmers[i], parameters->hashLength, MPIcontrol);
			kmers_send[send_pos[ProcsID]]  = kmers[i]; 
			arcs_send[send_pos[ProcsID]++] = arcs[i];	
		}

		send_pos[0] = 0;
		for(int i=1; i<MPIcontrol->nprocs; i++)	send_pos[i] = send_pos[i-1] + send_size[i-1];

		delete [] kmers;
		delete [] arcs;
		kmers = NULL;  arcs=NULL;	
		if(recv_sum==0)	printf("Proc %d: recv_sum = %lld \n", MPIcontrol->rank, recv_sum);
		fflush(stdout);

//		MPI_Barrier(MPI_COMM_WORLD);
		kmers = new unsigned long long [recv_sum+1];
		assert(kmers!=NULL);
		arcs  = new unsigned char      [recv_sum+1];
		assert(arcs!=NULL);
		
//		MPI_Barrier(MPI_COMM_WORLD);
//		if(MPIcontrol->rank==0)	printf("Proc %d: OK in Barrier 4\n", MPIcontrol->rank);

		tt1 = clock();
//		checkTime += tt1-tt0;
		t0 = clock();
		MPI_Alltoallv(kmers_send,send_size,send_pos, MPI_LONG_LONG_INT, kmers,recv_size,recv_pos, MPI_LONG_LONG_INT, MPI_COMM_WORLD);	
		MPI_Alltoallv(arcs_send, send_size,send_pos, MPI_CHAR,          arcs, recv_size,recv_pos, MPI_CHAR,          MPI_COMM_WORLD);
	//	printf("Proc %d: AlltoAll Finished\n", MPIcontrol->rank);
		t1 = clock();
		commTime += (t1-t0);

		delete [] kmers_send;
		delete [] arcs_send;
		kmers_send = NULL;	arcs_send = NULL;
		size  = recv_sum;
	
		delete [] send_size;
		delete [] recv_size;
		delete [] send_pos;
		delete [] recv_pos;
		send_size = recv_size = send_pos = recv_pos = NULL;

		tt0 = clock();
		for(long long i=0;i<size;i++)
		{
			tmp[kmers[i]]++;

			if(kmolecules.find(kmers[i])!=kmolecules.end())	 kmolecules[kmers[i]]++;
			else 
			{
				int retFilter = bFilter->bloomAdd(kmers[i]);
				if( retFilter==0 )		kmolecules[kmers[i]]++;
				else if( retFilter < parameters->cutoffThreshold)	continue;	
	//			int ProcsID = getProcsID(kmers[i], parameters->hashLength, MPIcontrol);
	//			assert(ProcsID == MPIcontrol->rank);
	//			unsigned char *p = (unsigned char *) &kmolecules[kmers[i]];
	//			for(int j=0; j<8; j++) 	if(p[j]<250)	p[j] += ((arcs[i]&(1<<j))?1:0);
				else				kmolecules[kmers[i]]=parameters->cutoffThreshold;
			}
		}
	
		tt1 = clock();
		checkTime += tt1-tt0;
	
		long long int tot_kmol=0, cur_kmol=kmolecules.size();
		t0 = clock();
		MPI_Allreduce(&cur_kmol, &tot_kmol, 1, MPI_LONG_LONG_INT, MPI_SUM, MPI_COMM_WORLD);
//		if(MPIcontrol->rank==0)	printf("Proc %d: %llu Num of kmolecules is %llu(totNum is %llu)\n", MPIcontrol->rank, readRound, cur_kmol, tot_kmol);
		t1 = clock();
		commTime += (t1-t0);

		delete [] kmers;
		delete [] arcs;
		kmers=NULL;	arcs=NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, 0x60(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, %r12
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %edi, %edi
xorl %edx, %edx
xorl %r10d, %r10d
testq %r14, %r14
je 0x2a59
cmpq %rbp, %r10
jge 0x2a59
movb (%r14,%r10), %r8b
cmpb $0x3e, %r8b
jne 0x2a24
movslq 0xaf8(%rsi), %rdi
leaq 0x1(%rdi), %r8
cmpq %r8, %rdx
jle 0x2a3f
addq %rax, %rdx
subq %rdi, %rdx
movq %rdx, %rax
xorl %edi, %edi
jmp 0x2a3b
testq %rdi, %rdi
sete %r9b
cmpb $0xa, %r8b
sete %r8b
testb %r8b, %r9b
je 0x2a43
movq %rcx, %rdi
xorl %edx, %edx
jmp 0x2a54
xorl %edi, %edi
jmp 0x2a54
xorl %r8d, %r8d
cmpq $0x1, %rdi
sete %r8b
addq %r8, %rdx
movq %r8, %rdi
incq %r10
jmp 0x29f3
movslq 0xaf8(%rsi), %rcx
movq %rsi, 0x28(%rsp)
movq %rdx, %r15
subq %rcx, %r15
incq %rcx
xorl %esi, %esi
cmpq %rcx, %rdx
cmovleq %rsi, %r15
addq %rax, %r15
movq %r15, 0x70(%r12)
movq %r15, %rax
shrq $0x3d, %rax
leaq (,%r15,8), %rcx
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, 0x8(%rsp)
testq %r15, %r15
pushq $-0x1
popq %rax
cmovsq %rax, %r15
movq %r15, %rdi
movq 0x28(%rsp), %r15
callq 0x2030
movq %rax, 0x20(%rsp)
callq 0x2170
movq %rax, 0x38(%rsp)
xorl %edi, %edi
xorl %eax, %eax
xorl %r8d, %r8d
xorl %r13d, %r13d
movq %r12, 0x48(%rsp)
movq %rbp, 0x30(%rsp)
testq %r14, %r14
je 0x2c27
cmpq %rbp, %r13
jge 0x2c27
leaq (%r14,%r13), %rbx
movzbl (%r14,%r13), %ecx
cmpl $0x3e, %ecx
jne 0x2b6c
movslq 0xaf8(%r15), %rax
incq %rax
cmpq %rax, %r8
jle 0x2ba9
movq %r15, %r12
movq %rbx, %r15
subq %r8, %r15
leaq -0x1(%rbx), %rdx
movq 0x8(%rsp), %rax
leaq (%rax,%rdi,8), %rcx
movq 0x20(%rsp), %rax
movq %rdi, 0x40(%rsp)
movq %r8, 0x18(%rsp)
leaq (%rax,%rdi), %r8
movq %r15, %rsi
movq %r12, %r9
callq 0x2760
movq 0x18(%rsp), %rdx
movq %rax, %rbp
movslq 0xaf8(%r12), %rax
movq %rdx, %rcx
subq %rax, %rcx
cmpq %rcx, %rbp
jne 0x2bad
movq 0x28(%rsp), %r15
jmp 0x2bff
testq %rax, %rax
jne 0x2b81
cmpb $0xa, %cl
jne 0x2b81
pushq $0x1
popq %rax
xorl %r8d, %r8d
jmp 0x2c1f
cmpq $0x1, %rax
jne 0x2ba9
leal -0x41(%rcx), %eax
cmpl $0x13, %eax
ja 0x2b99
movl $0x80045, %edx          # imm = 0x80045
btl %eax, %edx
jb 0x2ba1
cmpl $0xa, %ecx
je 0x2ba1
movb $0x41, (%rbx)
incq %r8
pushq $0x1
popq %rax
jmp 0x2c1f
xorl %eax, %eax
jmp 0x2c1f
leaq 0x35e3(%rip), %rdi      # 0x6197
movq %rbp, %rsi
movq %r13, %r8
xorl %eax, %eax
callq 0x2040
cmpq %rbx, %r15
ja 0x2bd4
movsbl (%r15), %edi
callq 0x2330
incq %r15
jmp 0x2bc1
pushq $0xa
popq %rdi
callq 0x2330
movq 0x639d(%rip), %rax      # 0x8f80
movq (%rax), %rdi
callq 0x22a0
movq 0x28(%rsp), %r15
movslq 0xaf8(%r15), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
cmpq %rcx, %rbp
movq 0x40(%rsp), %rdi
jne 0x3165
addq %rbp, %rdi
xorl %eax, %eax
xorl %r8d, %r8d
movq 0x48(%rsp), %r12
movq 0x30(%rsp), %rbp
incq %r13
jmp 0x2ae0
testq %r14, %r14
je 0x2c6b
movslq 0xaf8(%r15), %rax
incq %rax
cmpq %rax, %r8
jle 0x2c6b
leaq (%r14,%rbp), %rsi
subq %r8, %rsi
leaq (%r14,%rbp), %rdx
decq %rdx
movq 0x8(%rsp), %rax
leaq (%rax,%rdi,8), %rcx
movq 0x20(%rsp), %r8
addq %rdi, %r8
movq %r15, %r9
movq %rdi, %rbx
callq 0x2760
movq %rbx, %rdi
addq %rax, %rdi
cmpq %rdi, 0x70(%r12)
jne 0x3184
callq 0x2170
movq %rax, 0x58(%rsp)
movq 0x70(%r12), %rbx
leaq (,%rbx,8), %rdi
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, %rbx
pushq $-0x1
popq %r15
cmovaq %r15, %rdi
callq 0x2030
movq %rax, %r12
xorl %r14d, %r14d
testq %rbx, %rbx
movq %r15, %rdi
cmovnsq %rbx, %rdi
cmovleq %r14, %rbx
callq 0x2030
cmpq %r14, %rbx
je 0x2cd4
movb $0x0, (%rax,%r14)
andq $0x0, (%r12,%r14,8)
incq %r14
jmp 0x2cc0
movq %rax, 0x40(%rsp)
movq %r12, 0x18(%rsp)
movq 0x10(%rsp), %rax
movslq 0x4(%rax), %r14
leaq (,%r14,4), %r15
testq %r14, %r14
pushq $-0x1
popq %rax
cmovsq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r12
movq %r15, %rdi
callq 0x2030
movq %rax, %rbp
movq %r15, %rdi
callq 0x2030
movq %rax, %r13
movq %r15, %rdi
callq 0x2030
xorl %edx, %edx
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
cmpq %rdx, %rcx
je 0x2d44
andl $0x0, (%rbp,%rdx,4)
andl $0x0, (%r12,%rdx,4)
incq %rdx
jmp 0x2d30
movq %rax, 0x50(%rsp)
movq %rbp, 0x30(%rsp)
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x2d86
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rsi
movq 0x28(%rsp), %rax
movl 0xaf8(%rax), %edx
movq 0x10(%rsp), %rcx
callq 0x26fe
cmpq %r14, %rax
jae 0x3146
incl (%r12,%rax,4)
incq %r15
jmp 0x2d51
movq 0x58(%rsp), %rcx
subq 0x38(%rsp), %rcx
movq 0xc0(%rsp), %rax
addq %rcx, (%rax)
callq 0x2170
movq %rax, %r15
subq $0x8, %rsp
movq 0x6212(%rip), %rdx      # 0x8fc0
pushq $0x1
popq %rsi
movq %r12, %rdi
movq 0x38(%rsp), %rcx
movl %esi, %r8d
movq %rdx, %r9
pushq 0x61d3(%rip)            # 0x8f98
callq 0x2120
popq %rcx
popq %rdx
callq 0x2170
subq %r15, %rax
movq 0xb8(%rsp), %rcx
addq %rax, (%rcx)
callq 0x2170
movq 0x10(%rsp), %rax
movslq 0x4(%rax), %rbp
xorl %ecx, %ecx
testl %ebp, %ebp
movl $0x0, %eax
cmovgl %ebp, %eax
xorl %ebx, %ebx
movq 0x50(%rsp), %rdi
cmpq %rcx, %rax
je 0x2e11
movslq (%r12,%rcx,4), %rdx
addq %rdx, %rbx
incq %rcx
jmp 0x2e00
xorl %ecx, %ecx
xorl %r8d, %r8d
movq 0x30(%rsp), %rsi
cmpq %rcx, %rax
je 0x2e2c
movslq (%rsi,%rcx,4), %rdx
addq %rdx, %r8
incq %rcx
jmp 0x2e1b
movq 0x48(%rsp), %rax
cmpq 0x70(%rax), %rbx
jne 0x31a3
andl $0x0, (%r13)
pushq $0x1
popq %rax
xorl %ecx, %ecx
cmpq %rbp, %rax
jge 0x2e59
addl -0x4(%r12,%rax,4), %ecx
movl %ecx, (%r13,%rax,4)
incq %rax
jmp 0x2e45
andl $0x0, (%rdi)
pushq $0x1
popq %rax
xorl %ecx, %ecx
cmpq %rbp, %rax
jge 0x2e72
addl -0x4(%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
jmp 0x2e61
movq %r8, 0x38(%rsp)
xorl %r14d, %r14d
testq %rbx, %rbx
cmovleq %r14, %rbx
cmpq %r14, %rbx
je 0x2ed3
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %r15
movq 0x28(%rsp), %rax
movl 0xaf8(%rax), %edx
movq %r15, %rsi
movq 0x10(%rsp), %rcx
callq 0x26fe
movslq (%r13,%rax,4), %rcx
movq 0x18(%rsp), %rdx
movq %r15, (%rdx,%rcx,8)
movq 0x20(%rsp), %rdx
movb (%rdx,%r14), %dl
leal 0x1(%rcx), %esi
movl %esi, (%r13,%rax,4)
movq 0x40(%rsp), %rax
movb %dl, (%rax,%rcx)
incq %r14
jmp 0x2e81
andl $0x0, (%r13)
pushq $0x1
popq %rax
xorl %ecx, %ecx
movq 0x38(%rsp), %r14
cmpq %rbp, %rax
jge 0x2ef6
addl -0x4(%r12,%rax,4), %ecx
movl %ecx, (%r13,%rax,4)
incq %rax
jmp 0x2ee2
movq 0x8(%rsp), %rdi
callq 0x22f0
movq 0x20(%rsp), %rdi
callq 0x22f0
testq %r14, %r14
jne 0x2f26
movq 0x10(%rsp), %rax
movl (%rax), %esi
leaq 0x333a(%rip), %rdi      # 0x6257
xorl %edx, %edx
xorl %eax, %eax
callq 0x2040
movq 0x6053(%rip), %rax      # 0x8f80
movq (%rax), %rdi
callq 0x22a0
leaq 0x1(%r14), %r15
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, %r15
leaq 0x8(,%r14,8), %rdi
pushq $-0x1
popq %rax
cmovaq %rax, %rdi
callq 0x2030
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x2030
movq %rax, %rbp
callq 0x2170
callq 0x2170
movq %rax, 0x20(%rsp)
subq $0x8, %rsp
movq 0x6021(%rip), %rcx      # 0x8fa8
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %r8
movq 0x38(%rsp), %r15
movq %r15, %r9
movq 0x5ff4(%rip), %rax      # 0x8f98
pushq %rax
pushq %rcx
movq 0x68(%rsp), %rbx
pushq %rbx
callq 0x23e0
addq $0x18, %rsp
movq 0x5fcc(%rip), %rcx      # 0x8f88
movq 0x48(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, 0x18(%rsp)
movq %rbp, %r8
movq %r15, %r9
pushq 0x5fbd(%rip)            # 0x8f98
pushq %rcx
pushq %rbx
callq 0x23e0
addq $0x20, %rsp
callq 0x2170
subq 0x20(%rsp), %rax
movq 0xb8(%rsp), %rcx
addq %rax, (%rcx)
movq 0x18(%rsp), %rdi
callq 0x22f0
movq %r14, %rdi
callq 0x22f0
movq 0x48(%rsp), %rbp
movq 0x38(%rsp), %rax
movq %rax, 0x70(%rbp)
movq %r12, %rdi
callq 0x22f0
movq %r15, %rdi
callq 0x22f0
movq %r13, %rdi
callq 0x22f0
movq %rbx, %rdi
callq 0x22f0
callq 0x2170
movq %rax, %rbx
leaq 0x38(%rbp), %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %r12
cmpq 0x70(%rbp), %r15
jge 0x30bd
movq %r14, %rdi
movq %r12, %rsi
callq 0x473a
incq (%rax)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4aae
testq %rax, %rax
je 0x308a
movq %rbp, %rdi
movq %r12, %rsi
callq 0x473a
incq (%rax)
incq %r15
addq $0x8, %r12
jmp 0x304f
movq (%r12), %rsi
movq 0x60(%rsp), %rdi
callq 0x4148
testl %eax, %eax
je 0x3073
movq 0x28(%rsp), %rcx
movslq 0xb0c(%rcx), %r13
cmpl %r13d, %eax
jl 0x3081
movq %rbp, %rdi
movq %r12, %rsi
callq 0x473a
movq %r13, (%rax)
jmp 0x3081
callq 0x2170
subq %rbx, %rax
movq 0xc0(%rsp), %rcx
addq %rax, (%rcx)
leaq 0x70(%rsp), %rbx
andq $0x0, (%rbx)
movq 0x18(%rbp), %rax
leaq 0x68(%rsp), %r14
movq %rax, (%r14)
callq 0x2170
movq %rax, %r15
movq 0x5eb4(%rip), %rcx      # 0x8fa8
movq 0x5e7d(%rip), %r8       # 0x8f78
movq 0x5e96(%rip), %r9       # 0x8f98
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22d0
callq 0x2170
subq %r15, %rax
movq 0xb8(%rsp), %rcx
addq %rax, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x22f0
movq 0x10(%rsp), %rdi
callq 0x22f0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30a6(%rip), %rdi      # 0x61f3
leaq 0x2eef(%rip), %rsi      # 0x6043
leaq 0x2fba(%rip), %rcx      # 0x6115
movl $0x12b, %edx            # imm = 0x12B
callq 0x2160
leaq 0x3051(%rip), %rdi      # 0x61bd
leaq 0x2ed0(%rip), %rsi      # 0x6043
leaq 0x2f9b(%rip), %rcx      # 0x6115
movl $0xf4, %edx
callq 0x2160
leaq 0x3055(%rip), %rdi      # 0x61e0
leaq 0x2eb1(%rip), %rsi      # 0x6043
leaq 0x2f7c(%rip), %rcx      # 0x6115
movl $0x107, %edx            # imm = 0x107
callq 0x2160
leaq 0x3087(%rip), %rdi      # 0x6231
leaq 0x2e92(%rip), %rsi      # 0x6043
leaq 0x2f5d(%rip), %rcx      # 0x6115
movl $0x138, %edx            # imm = 0x138
callq 0x2160