// File: /workspace/github_cpp_makefile_star2_O2/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 0x5e32
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r13
movq %rsi, -0x48(%rbp)
leaq 0xe65a(%rip), %rax      # 0x14334
movslq (%rax), %r14
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, %r14
movq 0x8(%r13), %r12
movq (%r12), %rax
movl (%rax), %eax
cmpl $0x1, %eax
je 0x5f29
testl %eax, %eax
jne 0x6139
movq %r13, -0x30(%rbp)
movq %rbx, -0x40(%rbp)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x51a5
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x51a5
movq %rax, %r13
leaq 0xe5f2(%rip), %rax      # 0x14334
movl (%rax), %eax
testl %eax, %eax
cmovlel %ebx, %eax
movq -0x38(%rbp), %r9
testq %r12, %r12
je 0x5e33
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x5e26
movq (%r12), %rdx
movq 0x8(%rdx), %rsi
movq (%rsi), %rdi
movq (%rdi), %rsi
movsd (%rsi,%rcx,8), %xmm0
movq (%r15), %r8
testb $0x1, %bl
je 0x5de1
ucomisd (%r8,%rcx,8), %xmm0
jbe 0x5d8e
movsd %xmm0, (%r8,%rcx,8)
movq %rdx, (%r9,%rcx,8)
movq 0x8(%rdi), %rdi
movsd (%rdi,%rcx,8), %xmm0
movq 0x8(%r15), %r8
movsd (%r8,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5db1
movsd %xmm0, (%r8,%rcx,8)
movq %rdx, (%r14,%rcx,8)
movsd (%rsi,%rcx,8), %xmm0
movq (%r13), %rdx
movsd (%rdx,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5dca
movsd %xmm0, (%rdx,%rcx,8)
movsd (%rdi,%rcx,8), %xmm0
movq 0x8(%r13), %rdx
ucomisd (%rdx,%rcx,8), %xmm0
jbe 0x5e1e
movsd %xmm0, (%rdx,%rcx,8)
jmp 0x5e1e
movsd %xmm0, (%r8,%rcx,8)
movq 0x8(%rdi), %rdi
movsd (%rdi,%rcx,8), %xmm0
movq 0x8(%r15), %r8
movsd %xmm0, (%r8,%rcx,8)
movsd (%rsi,%rcx,8), %xmm0
movq (%r13), %rsi
movsd %xmm0, (%rsi,%rcx,8)
movsd (%rdi,%rcx,8), %xmm0
movq 0x8(%r13), %rsi
movsd %xmm0, (%rsi,%rcx,8)
movq %rdx, (%r9,%rcx,8)
movq %rdx, (%r14,%rcx,8)
incq %rcx
jmp 0x5d58
movq 0x10(%r12), %r12
movb $0x1, %bl
jmp 0x5d4d
retq
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
movapd 0x929f(%rip), %xmm0     # 0xf0e0
xorpd %xmm2, %xmm2
cmpq %rcx, %rax
je 0x5e9f
movq (%r15), %rdx
movq 0x8(%r15), %rsi
movsd (%rdx,%rcx,8), %xmm3
subsd (%rsi,%rcx,8), %xmm3
movq (%r13), %rdx
movq 0x8(%r13), %rsi
movsd (%rsi,%rcx,8), %xmm4
subsd (%rdx,%rcx,8), %xmm4
divsd %xmm4, %xmm3
andpd %xmm0, %xmm3
cvtsi2sd %ecx, %xmm4
movapd %xmm3, %xmm5
maxsd %xmm1, %xmm5
cmpltsd %xmm3, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm2, %xmm1
orpd %xmm4, %xmm1
movapd %xmm1, %xmm2
incq %rcx
movapd %xmm5, %xmm1
jmp 0x5e45
cvttsd2si %xmm2, %eax
cltq
movq (%r9,%rax,8), %rsi
movq (%r14,%rax,8), %r12
cmpq %r12, %rsi
jne 0x60e1
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %r12
cmpq %r12, %rsi
jne 0x5ecd
movq 0x10(%rcx), %rcx
movq (%rcx), %r12
movq 0x8(%r12), %rdx
movq (%rdx), %rdx
movq 0x8(%rdx), %rdx
movsd (%rdx,%rax,8), %xmm0
movq 0x8(%r15), %rdx
movsd %xmm0, (%rdx,%rax,8)
movq %r12, (%r14,%rax,8)
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x60e1
movq (%rcx), %rdi
cmpq %rdi, %rsi
je 0x5eeb
movq 0x8(%rdi), %r8
movq (%r8), %r8
movq 0x8(%r8), %r8
movsd (%r8,%rax,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5eeb
movsd %xmm1, (%rdx,%rax,8)
movq %rdi, (%r14,%rax,8)
movq %rdi, %r12
movapd %xmm1, %xmm0
jmp 0x5eeb
movq %r13, -0x30(%rbp)
movq %rbx, -0x40(%rbp)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x51a5
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x51a5
movq %rax, %r13
leaq 0xe3e2(%rip), %rax      # 0x14334
movl (%rax), %ecx
testl %ecx, %ecx
cmovlel %ebx, %ecx
leaq 0xe410(%rip), %rax      # 0x14370
movq -0x38(%rbp), %r11
testq %r12, %r12
je 0x6061
movq (%rax), %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x6055
movq (%rdx), %r8
movq (%r12), %rdi
movq 0x8(%rdi), %r9
movslq 0x8(%r9), %r9
movq (%r8,%r9,8), %r8
movq 0x38(%r8), %r9
movq (%r9), %r8
movsd (%r8,%rsi,8), %xmm0
movq (%r15), %r10
testb $0x1, %bl
je 0x600b
ucomisd (%r10,%rsi,8), %xmm0
jbe 0x5fb5
movsd %xmm0, (%r10,%rsi,8)
movq %rdi, (%r11,%rsi,8)
movq 0x8(%r9), %r9
movsd (%r9,%rsi,8), %xmm0
movq 0x8(%r15), %r10
movsd (%r10,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5fd9
movsd %xmm0, (%r10,%rsi,8)
movq %rdi, (%r14,%rsi,8)
movsd (%r8,%rsi,8), %xmm0
movq (%r13), %rdi
movsd (%rdi,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5ff3
movsd %xmm0, (%rdi,%rsi,8)
movsd (%r9,%rsi,8), %xmm0
movq 0x8(%r13), %rdi
ucomisd (%rdi,%rsi,8), %xmm0
jbe 0x604d
movsd %xmm0, (%rdi,%rsi,8)
jmp 0x604d
movsd %xmm0, (%r10,%rsi,8)
movq 0x8(%r9), %r9
movsd (%r9,%rsi,8), %xmm0
movq 0x8(%r15), %r10
movsd %xmm0, (%r10,%rsi,8)
movsd (%r8,%rsi,8), %xmm0
movq (%r13), %r8
movsd %xmm0, (%r8,%rsi,8)
movsd (%r9,%rsi,8), %xmm0
movq 0x8(%r13), %r8
movsd %xmm0, (%r8,%rsi,8)
movq %rdi, (%r11,%rsi,8)
movq %rdi, (%r14,%rsi,8)
incq %rsi
jmp 0x5f72
movq 0x10(%r12), %r12
movb $0x1, %bl
jmp 0x5f64
xorpd %xmm1, %xmm1
xorl %edx, %edx
movapd 0x9071(%rip), %xmm0     # 0xf0e0
xorpd %xmm2, %xmm2
cmpq %rdx, %rcx
je 0x60cd
movq (%r15), %rsi
movq 0x8(%r15), %rdi
movsd (%rsi,%rdx,8), %xmm3
subsd (%rdi,%rdx,8), %xmm3
movq (%r13), %rsi
movq 0x8(%r13), %rdi
movsd (%rdi,%rdx,8), %xmm4
subsd (%rsi,%rdx,8), %xmm4
divsd %xmm4, %xmm3
andpd %xmm0, %xmm3
cvtsi2sd %edx, %xmm4
movapd %xmm3, %xmm5
maxsd %xmm1, %xmm5
cmpltsd %xmm3, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm2, %xmm1
orpd %xmm4, %xmm1
movapd %xmm1, %xmm2
incq %rdx
movapd %xmm5, %xmm1
jmp 0x6073
cvttsd2si %xmm2, %ecx
movslq %ecx, %rcx
movq (%r11,%rcx,8), %rsi
movq (%r14,%rcx,8), %r12
cmpq %r12, %rsi
je 0x6158
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x2fca
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2fca
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq (%r15), %rdi
callq 0x2280
movq 0x8(%r15), %rdi
callq 0x2280
movq %r15, %rdi
callq 0x2280
movq (%r13), %rdi
callq 0x2280
movq 0x8(%r13), %rdi
callq 0x2280
movq %r13, %rdi
callq 0x2280
movq -0x38(%rbp), %rdi
callq 0x2280
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2280
movq -0x30(%rbp), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx), %r12
movq (%rax), %rdi
movq (%rdi), %rdi
cmpq %r12, %rsi
jne 0x6175
movq 0x10(%rdx), %rdx
movq (%rdx), %r12
movq 0x8(%r12), %r8
movslq 0x8(%r8), %r8
movq (%rdi,%r8,8), %rdi
movq 0x38(%rdi), %rdi
movq 0x8(%rdi), %rdi
movsd (%rdi,%rcx,8), %xmm0
movq 0x8(%r15), %rdi
movsd %xmm0, (%rdi,%rcx,8)
movq %r12, (%r14,%rcx,8)
movq (%rax), %rax
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
je 0x60e1
movq (%rdx), %r8
cmpq %r8, %rsi
je 0x619f
movq (%rax), %r9
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), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x619f
movsd %xmm1, (%rdi,%rcx,8)
movq %r8, (%r14,%rcx,8)
movq %r8, %r12
movapd %xmm1, %xmm0
jmp 0x619f