// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GpickSeeds(GhdrNd*, GlstNd**, GlstNd**)
void GpickSeeds(GHdrNd ptrChildLst, GLstNd *lstNdChildOne, GLstNd *lstNdChildTwo)
{    
	if(ptrChildLst == NULL)
		return;
	GTreeNode* tnInfoMin = (GTreeNode *)calloc(DIMENSION, sizeof(GTreeNode));
	// assert(tnInfoMin != NULL);

	GTreeNode* tnInfoMax = (GTreeNode *)calloc(DIMENSION, sizeof(GTreeNode));
	// assert(tnInfoMax != NULL);

	GLstNd lstNdTemp = NULL;
    int iCnt = 0;
	Boolean bIsFirst = TRUE;

	Region rgnRectTemp;
	Region rgnRectOut;

	double dNormSep = 0;
	double dMaxNormSep = 0;
	dimension dimMaxNormSep = 0;
	GTreeNode temp;

	switch(ptrChildLst->ptrFirstNd->tnInfo->ndType)
    {	
    	case INTNODE:   
			lstNdTemp = ptrChildLst->ptrFirstNd;
	        rgnRectTemp = GinitRgnRect(NULL, NULL);

	        rgnRectOut = GinitRgnRect(NULL, NULL);
	        while(lstNdTemp != NULL)
	        {     
	        	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
	            {     
	              	if(bIsFirst)
	                {     
						rgnRectTemp->iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
						rgnRectTemp->iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
						rgnRectOut->iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
						rgnRectOut->iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
						tnInfoMin[iCnt] = lstNdTemp->tnInfo;
						tnInfoMax[iCnt] = lstNdTemp->tnInfo;
						continue;
	                }
	                if(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] > rgnRectTemp->iBottomLeft[iCnt])
	                {     
	                    rgnRectTemp->iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
	                    tnInfoMin[iCnt] = lstNdTemp->tnInfo;
	                }
	                if(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt] < rgnRectTemp->iTopRight[iCnt])
	                {     
	                    rgnRectTemp->iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
	                    tnInfoMax[iCnt] = lstNdTemp->tnInfo;
	                }

	                if(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] < rgnRectOut->iBottomLeft[iCnt])
	                    rgnRectOut->iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];

	                if(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt] > rgnRectOut->iTopRight[iCnt])
                        rgnRectOut->iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
	            }
               
                lstNdTemp = lstNdTemp->ptrNextNd;
                if(bIsFirst)
                	bIsFirst = FALSE;
	        }

	        dNormSep = 0;
	        dMaxNormSep = 0;
	        dimMaxNormSep = 0;

	        for(iCnt = 0; iCnt < DIMENSION; iCnt++)
	        {     
	            dNormSep = fabs(rgnRectTemp->iBottomLeft[iCnt] - rgnRectTemp->iTopRight[iCnt]) / fabs(rgnRectOut->iTopRight[iCnt] - rgnRectOut->iBottomLeft[iCnt]);
	            if(dNormSep > dMaxNormSep)
	            {   
	            	dMaxNormSep = dNormSep;
	                dimMaxNormSep = iCnt;
	            }
	        }
	         
			if(tnInfoMin[(int)dimMaxNormSep] == tnInfoMax[(int)dimMaxNormSep])
			{
				lstNdTemp = ptrChildLst->ptrFirstNd;
				temp=tnInfoMax[(int)dimMaxNormSep];
				if(temp != lstNdTemp->tnInfo)
				{
					rgnRectTemp->iTopRight[(int)dimMaxNormSep] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[(int)dimMaxNormSep];
					tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->tnInfo;
					lstNdTemp = lstNdTemp->ptrNextNd;
				}
				else
				{
					rgnRectTemp->iTopRight[(int)dimMaxNormSep] = lstNdTemp->ptrNextNd->tnInfo->tdInfo->rgnRect->iTopRight[(int)dimMaxNormSep];
					tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->ptrNextNd->tnInfo;
					lstNdTemp = lstNdTemp->ptrNextNd->ptrNextNd;
				}
				while(lstNdTemp != NULL)
				{
					if(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[(int)dimMaxNormSep] < rgnRectTemp->iTopRight[(int)dimMaxNormSep] && temp != lstNdTemp->tnInfo)
					{
						rgnRectTemp->iTopRight[(int)dimMaxNormSep] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[(int)dimMaxNormSep];
			            tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->tnInfo;
					}
					lstNdTemp = lstNdTemp->ptrNextNd;
				} 
			}
	         
			// if(tnInfoMin[(int)dimMaxNormSep]==tnInfoMax[(int)dimMaxNormSep])
			// {
			// 	fprintf(stderr, "error in the code\n");
			// 	exit(-1);
			// }

			*lstNdChildOne = GdeleteLstElem(ptrChildLst, tnInfoMin[(int)dimMaxNormSep]);

			*lstNdChildTwo = GdeleteLstElem(ptrChildLst, tnInfoMax[(int)dimMaxNormSep]);

			free(rgnRectTemp->iBottomLeft);
			free(rgnRectTemp->iTopRight);
			free(rgnRectTemp);
			free(rgnRectOut->iBottomLeft);
			free(rgnRectOut->iTopRight);
			free(rgnRectOut);
	    break;


		case EXTNODE:        
			lstNdTemp = ptrChildLst->ptrFirstNd;
			rgnRectTemp = GinitRgnRect(NULL, NULL);
			rgnRectOut = GinitRgnRect(NULL, NULL);

			while(lstNdTemp != NULL)
			{     
				for(iCnt = 0; iCnt < DIMENSION; iCnt++)
			    {     
				  	if(bIsFirst)
				    {     
							rgnRectTemp->iBottomLeft[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt];
							rgnRectTemp->iTopRight[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt];
							rgnRectOut->iBottomLeft[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt];
							rgnRectOut->iTopRight[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt];
							tnInfoMin[iCnt] = lstNdTemp->tnInfo;
							tnInfoMax[iCnt] = lstNdTemp->tnInfo;
							continue;
				    }
			        if(groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt] > rgnRectTemp->iBottomLeft[iCnt])
			        {   
			            rgnRectTemp->iBottomLeft[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt];
			            tnInfoMin[iCnt] = lstNdTemp->tnInfo;
			        }
			        if(groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt] < rgnRectTemp->iTopRight[iCnt])
			        {     
			            rgnRectTemp->iTopRight[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt];
			            tnInfoMax[iCnt] = lstNdTemp->tnInfo;
			        }
			        if(groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt] < rgnRectOut->iBottomLeft[iCnt])
			            rgnRectOut->iBottomLeft[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt];
			        if(groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt] > rgnRectOut->iTopRight[iCnt])
			            rgnRectOut->iTopRight[iCnt] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt];
				}

				lstNdTemp = lstNdTemp->ptrNextNd;
				if(bIsFirst)
			    	bIsFirst = FALSE;
			}	//while

			dNormSep = 0;
			dMaxNormSep = 0;
			dimMaxNormSep = 0;
			for(iCnt = 0; iCnt < DIMENSION; iCnt++)
			{     
			   dNormSep = fabs(rgnRectTemp->iBottomLeft[iCnt] - rgnRectTemp->iTopRight[iCnt]) / fabs(rgnRectOut->iTopRight[iCnt] - rgnRectOut->iBottomLeft[iCnt]);
			   if(dNormSep > dMaxNormSep)
			   {   
			   	   dMaxNormSep = dNormSep;
			       dimMaxNormSep = iCnt;
			   }
			}

			if(tnInfoMin[(int)dimMaxNormSep] == tnInfoMax[(int)dimMaxNormSep])
			{
				lstNdTemp = ptrChildLst->ptrFirstNd;
				temp=tnInfoMax[(int)dimMaxNormSep];
				if(temp != lstNdTemp->tnInfo)
				{
					rgnRectTemp->iTopRight[(int)dimMaxNormSep] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[(int)dimMaxNormSep];
					 tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->tnInfo;
					lstNdTemp = lstNdTemp->ptrNextNd;
				}
				else
				{
					rgnRectTemp->iTopRight[(int)dimMaxNormSep] = groupList->groupItems[lstNdTemp->ptrNextNd->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[(int)dimMaxNormSep];
					tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->ptrNextNd->tnInfo;
					lstNdTemp = lstNdTemp->ptrNextNd->ptrNextNd;
				}
				while(lstNdTemp != NULL)
				{
					if(groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[(int)dimMaxNormSep] < rgnRectTemp->iTopRight[(int)dimMaxNormSep] && temp != lstNdTemp->tnInfo)
					{
						rgnRectTemp->iTopRight[(int)dimMaxNormSep] = groupList->groupItems[lstNdTemp->tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[(int)dimMaxNormSep];
			              tnInfoMax[(int)dimMaxNormSep] = lstNdTemp->tnInfo;
					}
						lstNdTemp = lstNdTemp->ptrNextNd;
				} 
			}

			*lstNdChildOne = GdeleteLstElem(ptrChildLst, tnInfoMin[(int)dimMaxNormSep]);
			*lstNdChildTwo = GdeleteLstElem(ptrChildLst, tnInfoMax[(int)dimMaxNormSep]);

			free(rgnRectTemp->iBottomLeft);
			free(rgnRectTemp->iTopRight);
			free(rgnRectTemp);
			free(rgnRectOut->iBottomLeft);
			free(rgnRectOut->iTopRight);
			free(rgnRectOut);
		break;
	}

	free(tnInfoMin);
	free(tnInfoMax);

	return;
}

// Assembly:
testq %rdi, %rdi
je 0x77c2
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
leaq 0xfd9a(%rip), %rax      # 0x17364
movslq (%rax), %r14
movl $0x8, %esi
movq %r14, %rdi
callq 0x31b0
movq %rax, -0x30(%rbp)
movl $0x8, %esi
movq %r14, %rdi
callq 0x31b0
movq %rax, %r14
movq 0x8(%r15), %r12
movq (%r12), %rax
movl (%rax), %eax
cmpl $0x1, %eax
je 0x77c3
testl %eax, %eax
jne 0x7b45
movq %r13, -0x40(%rbp)
movq %r15, -0x38(%rbp)
movq %rbx, -0x48(%rbp)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x68ff
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x68ff
movq %rax, %r13
leaq 0xfd2e(%rip), %rax      # 0x17364
movl (%rax), %eax
testl %eax, %eax
jle 0x7721
movq (%r12), %rcx
movq 0x8(%rcx), %rdx
movq (%rdx), %rdx
movq (%rdx), %rsi
movq (%r15), %rdi
xorl %r8d, %r8d
movsd (%rsi,%r8,8), %xmm0
testb $0x1, %bl
je 0x76cf
ucomisd (%rdi,%r8,8), %xmm0
jbe 0x7675
movsd %xmm0, (%rdi,%r8,8)
movq -0x30(%rbp), %r9
movq %rcx, (%r9,%r8,8)
movq 0x8(%rdx), %r9
movsd (%r9,%r8,8), %xmm0
movq 0x8(%r15), %r10
movsd (%r10,%r8,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7699
movsd %xmm0, (%r10,%r8,8)
movq %rcx, (%r14,%r8,8)
movsd (%rsi,%r8,8), %xmm0
movq (%r13), %r10
movsd (%r10,%r8,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x76b5
movsd %xmm0, (%r10,%r8,8)
movsd (%r9,%r8,8), %xmm0
movq 0x8(%r13), %r9
ucomisd (%r9,%r8,8), %xmm0
jbe 0x7715
movsd %xmm0, (%r9,%r8,8)
jmp 0x7715
movsd %xmm0, (%rdi,%r8,8)
movq 0x8(%rdx), %r9
movsd (%r9,%r8,8), %xmm0
movq 0x8(%r15), %r10
movsd %xmm0, (%r10,%r8,8)
movsd (%rsi,%r8,8), %xmm0
movq (%r13), %r10
movsd %xmm0, (%r10,%r8,8)
movsd (%r9,%r8,8), %xmm0
movq 0x8(%r13), %r9
movsd %xmm0, (%r9,%r8,8)
movq -0x30(%rbp), %r9
movq %rcx, (%r9,%r8,8)
movq %rcx, (%r14,%r8,8)
incq %r8
cmpq %r8, %rax
jne 0x7654
movq 0x10(%r12), %r12
movb $0x1, %bl
testq %r12, %r12
jne 0x7638
leaq 0xfc2c(%rip), %rax      # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x7993
movq (%r15), %rcx
movq 0x8(%r15), %rdx
movq (%r13), %rsi
movq 0x8(%r13), %rdi
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movapd 0xa99e(%rip), %xmm1     # 0x12100
xorpd %xmm2, %xmm2
movsd (%rcx,%r8,8), %xmm3
subsd (%rdx,%r8,8), %xmm3
movsd (%rdi,%r8,8), %xmm4
subsd (%rsi,%r8,8), %xmm4
divsd %xmm4, %xmm3
andpd %xmm1, %xmm3
xorps %xmm4, %xmm4
cvtsi2sd %r8d, %xmm4
movapd %xmm3, %xmm5
maxsd %xmm2, %xmm5
cmpltsd %xmm3, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm0, %xmm2
orpd %xmm4, %xmm2
movapd %xmm2, %xmm0
incq %r8
movapd %xmm5, %xmm2
cmpq %r8, %rax
jne 0x7766
cvttsd2si %xmm0, %eax
cltq
jmp 0x7995
retq
movq %r13, -0x40(%rbp)
movq %r15, -0x38(%rbp)
movq %rbx, -0x48(%rbp)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x68ff
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x68ff
movq %rax, %r13
leaq 0xfb74(%rip), %rax      # 0x17364
movl (%rax), %ecx
leaq 0xfba7(%rip), %rax      # 0x173a0
testl %ecx, %ecx
jle 0x78f1
movq (%rax), %rdx
movq (%rdx), %rsi
movq (%r12), %rdx
movq 0x8(%rdx), %rdi
movslq 0x8(%rdi), %rdi
movq (%rsi,%rdi,8), %rsi
movq 0x38(%rsi), %rsi
movq (%rsi), %rdi
movq (%r15), %r8
xorl %r9d, %r9d
movsd (%rdi,%r9,8), %xmm0
testb $0x1, %bl
je 0x789f
ucomisd (%r8,%r9,8), %xmm0
jbe 0x7845
movsd %xmm0, (%r8,%r9,8)
movq -0x30(%rbp), %r10
movq %rdx, (%r10,%r9,8)
movq 0x8(%rsi), %r10
movsd (%r10,%r9,8), %xmm0
movq 0x8(%r15), %r11
movsd (%r11,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7869
movsd %xmm0, (%r11,%r9,8)
movq %rdx, (%r14,%r9,8)
movsd (%rdi,%r9,8), %xmm0
movq (%r13), %r11
movsd (%r11,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7885
movsd %xmm0, (%r11,%r9,8)
movsd (%r10,%r9,8), %xmm0
movq 0x8(%r13), %r10
ucomisd (%r10,%r9,8), %xmm0
jbe 0x78e5
movsd %xmm0, (%r10,%r9,8)
jmp 0x78e5
movsd %xmm0, (%r8,%r9,8)
movq 0x8(%rsi), %r10
movsd (%r10,%r9,8), %xmm0
movq 0x8(%r15), %r11
movsd %xmm0, (%r11,%r9,8)
movsd (%rdi,%r9,8), %xmm0
movq (%r13), %r11
movsd %xmm0, (%r11,%r9,8)
movsd (%r10,%r9,8), %xmm0
movq 0x8(%r13), %r10
movsd %xmm0, (%r10,%r9,8)
movq -0x30(%rbp), %r10
movq %rdx, (%r10,%r9,8)
movq %rdx, (%r14,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x7824
movq 0x10(%r12), %r12
movb $0x1, %bl
testq %r12, %r12
jne 0x77f9
leaq 0xfa5c(%rip), %rcx      # 0x17364
movslq (%rcx), %rcx
testq %rcx, %rcx
jle 0x7a34
movq (%r15), %rdx
movq 0x8(%r15), %rsi
movq (%r13), %rdi
movq 0x8(%r13), %r8
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movapd 0xa7ce(%rip), %xmm1     # 0x12100
xorpd %xmm2, %xmm2
movsd (%rdx,%r9,8), %xmm3
subsd (%rsi,%r9,8), %xmm3
movsd (%r8,%r9,8), %xmm4
subsd (%rdi,%r9,8), %xmm4
divsd %xmm4, %xmm3
andpd %xmm1, %xmm3
xorps %xmm4, %xmm4
cvtsi2sd %r9d, %xmm4
movapd %xmm3, %xmm5
maxsd %xmm2, %xmm5
cmpltsd %xmm3, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm0, %xmm2
orpd %xmm4, %xmm2
movapd %xmm2, %xmm0
incq %r9
movapd %xmm5, %xmm2
cmpq %r9, %rcx
jne 0x7936
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
jmp 0x7a36
xorl %eax, %eax
movq -0x30(%rbp), %rcx
movq (%rcx,%rax,8), %rsi
leaq (%r14,%rax,8), %r12
movq (%r14,%rax,8), %rcx
cmpq %rcx, %rsi
jne 0x7aec
movq -0x38(%rbp), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx), %rdi
cmpq %rdi, %rcx
jne 0x79c5
movq 0x10(%rdx), %rdx
movq (%rdx), %rdi
movq 0x8(%rdi), %r8
movq (%r8), %r8
movq 0x8(%r8), %r8
movsd (%r8,%rax,8), %xmm0
movq 0x8(%r15), %r8
movsd %xmm0, (%r8,%rax,8)
movq %rdi, (%r12)
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
je 0x7aec
movq 0x8(%r15), %rdi
movsd (%rdi,%rax,8), %xmm0
movq (%rdx), %r8
cmpq %r8, %rcx
je 0x7a26
movq 0x8(%r8), %r9
movq (%r9), %r9
movq 0x8(%r9), %r9
movsd (%r9,%rax,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7a26
movsd %xmm1, (%rdi,%rax,8)
movq %r8, (%r12)
movapd %xmm1, %xmm0
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
jne 0x79fa
jmp 0x7aec
xorl %ecx, %ecx
movq -0x30(%rbp), %rdx
movq (%rdx,%rcx,8), %rsi
leaq (%r14,%rcx,8), %r12
movq (%r14,%rcx,8), %rdx
cmpq %rdx, %rsi
jne 0x7aec
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rdi
movq (%rdi), %r8
movq (%rax), %r9
movq (%r9), %r9
cmpq %r8, %rdx
jne 0x7a6c
movq 0x10(%rdi), %rdi
movq (%rdi), %r8
movq 0x8(%r8), %r10
movslq 0x8(%r10), %r10
movq (%r9,%r10,8), %r9
movq 0x38(%r9), %r9
movq 0x8(%r9), %r9
movsd (%r9,%rcx,8), %xmm0
movq 0x8(%r15), %r9
movsd %xmm0, (%r9,%rcx,8)
movq %r8, (%r12)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x7aec
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%r15), %r8
movsd (%r8,%rcx,8), %xmm0
movq (%rdi), %r9
cmpq %r9, %rdx
je 0x7ae3
movq 0x8(%r9), %r10
movslq 0x8(%r10), %r10
movq (%rax,%r10,8), %r10
movq 0x38(%r10), %r10
movq 0x8(%r10), %r10
movsd (%r10,%rcx,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7ae3
movsd %xmm1, (%r8,%rcx,8)
movq %r9, (%r12)
movapd %xmm1, %xmm0
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x7aad
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x4305
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x4305
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq (%r15), %rdi
callq 0x3310
movq 0x8(%r15), %rdi
callq 0x3310
movq %r15, %rdi
callq 0x3310
movq (%r13), %rdi
callq 0x3310
movq 0x8(%r13), %rdi
callq 0x3310
movq %r13, %rdi
callq 0x3310
movq -0x30(%rbp), %rdi
callq 0x3310
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3310