LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RinitIntNd(double*, double*)
RTreeNode RinitIntNd(Dimension iBottomLeft, Dimension iTopRight)
{
	Region rgnRect = RinitRgnRect(iBottomLeft, iTopRight);
	// assert(rgnRect != NULL);

	RTreeData tdInfo = (RTreeData)calloc(1, sizeof(*tdInfo));
	// assert(tdInfo != NULL);

	if(tdInfo == NULL)
		return NULL;

	tdInfo->rgnRect = rgnRect;
	tdInfo->dataClstElem = NULL;
    RTreeNode tnInfo = (RTreeNode)calloc(1, sizeof(*tnInfo));
    // assert(tnInfo != NULL);

	if(tnInfo == NULL)
		return NULL;

	tnInfo->ndType = INTNODE;
	tnInfo->tdInfo = tdInfo;

	return tnInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x51e4
movq %rax, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
testq %rax, %rax
je 0x5372
movq %rax, %rbx
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
testq %rax, %rax
je 0x5372
movl $0x0, (%rax)
movq %rbx, 0x8(%rax)
jmp 0x5374
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RinitExtNd(data*)
RTreeNode RinitExtNd(Data dataClstElem)
{  
   if(dataClstElem == NULL)
		return NULL;

	RTreeNode tnInfo = (RTreeNode)calloc(1, sizeof(*tnInfo));
	// assert(tnInfo!= NULL);

	RTreeData tdInfo = (RTreeData)calloc(1, sizeof(*tdInfo));
	// assert(tdInfo!=NULL);

	tdInfo->dataClstElem = dataClstElem;
	tdInfo->rgnRect = NULL;

	tnInfo->ndType = EXTNODE;
	tnInfo->tdInfo = tdInfo;

	return tnInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x53c1
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rbx, 0x8(%rax)
movq $0x0, (%rax)
movl $0x1, (%r14)
movq %rax, 0x8(%r14)
jmp 0x53c4
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RcreateRoot(RhdrNd*)
RHdrNd RcreateRoot(RHdrNd hdrNdTree)
{
    RHdrNd hdrNdRoot = RinitHdrNd();
    Dimension iBottomLeft = (Dimension)calloc(DIMENSION, sizeof(double));
    // assert(iBottomLeft != NULL);

	Dimension iTopRight = (Dimension)calloc(DIMENSION,sizeof(double));
	// assert(iTopRight != NULL);

	RLstNd lstNdTemp = hdrNdTree->ptrFirstNd;
	int iCnt = 0;
	Boolean bIsFirst = TRUE;

	while(lstNdTemp != NULL)
    {	
    	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
        {   
        	if(bIsFirst)
            {   
            	iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
				iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
         	}
			else
            {   
            	if(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] < iBottomLeft[iCnt])
					iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
				
				if(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt] > iTopRight[iCnt])
					iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
    	    }
		}
		lstNdTemp = lstNdTemp->ptrNextNd;
		bIsFirst = FALSE;
	}

	hdrNdRoot->ptrFirstNd = RinitLstNd(RinitIntNd(iBottomLeft, iTopRight));
    hdrNdRoot->ptrFirstNd->ptrChildLst = hdrNdTree;
	hdrNdRoot->uiCnt = 1;

	return hdrNdRoot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x43d4
movq %rax, %r14
leaq 0x11f7b(%rip), %rax     # 0x17364
movslq (%rax), %r12
movl $0x8, %esi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r15
movl $0x8, %esi
movq %r12, %rdi
callq 0x31b0
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x5487
movl %r12d, %edx
xorl %esi, %esi
testl %edx, %edx
jle 0x547b
movq (%rcx), %rdi
movq 0x8(%rdi), %rdi
movq (%rdi), %rdi
movq (%rdi), %r8
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm0
testb $0x1, %sil
je 0x545d
movsd (%r15,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5449
movsd %xmm0, (%r15,%r9,8)
movq 0x8(%rdi), %r10
movsd (%r10,%r9,8), %xmm0
ucomisd (%rax,%r9,8), %xmm0
ja 0x546d
jmp 0x5473
movsd %xmm0, (%r15,%r9,8)
movq 0x8(%rdi), %r10
movsd (%r10,%r9,8), %xmm0
movsd %xmm0, (%rax,%r9,8)
incq %r9
cmpq %r9, %rdx
jne 0x542b
movq 0x10(%rcx), %rcx
movb $0x1, %sil
testq %rcx, %rcx
jne 0x5417
movq %r15, %rdi
movq %rax, %rsi
callq 0x5321
movq %rax, %rdi
callq 0x43f6
movq %rax, 0x8(%r14)
movq %rbx, 0x8(%rax)
movl $0x1, (%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: Rarea(region*)
double Rarea(Region rgnRect)
{
    if(rgnRect == NULL)
		return 0;
    double dArea = 1;
	int iCnt = 0;
	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
		dArea = dArea * (rgnRect->iTopRight[iCnt] - rgnRect->iBottomLeft[iCnt]);
	return dArea;
}

// Assembly:
testq %rdi, %rdi
je 0x56ec
pushq %rbp
movq %rsp, %rbp
leaq 0x11ca9(%rip), %rax     # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x56f0
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movsd 0xca0e(%rip), %xmm0     # 0x120e0
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm1
subsd (%rcx,%rsi,8), %xmm1
mulsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x56d4
jmp 0x56f8
xorps %xmm0, %xmm0
retq
movsd 0xc9e8(%rip), %xmm0     # 0x120e0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RinsertTree(RhdrNd*, RtreeNode*)
Boolean RinsertTree(RHdrNd hdrNdTree, RTreeNode tnInfo)
{
	int iCnt = 0;

	if(hdrNdTree->ptrFirstNd == NULL || hdrNdTree->ptrFirstNd->tnInfo->ndType == EXTNODE)
    {   

		
		RinsertLstElem(hdrNdTree, tnInfo);

		
		return(hdrNdTree->uiCnt > RMAXENTRIES) ? TRUE : FALSE;
    }

	if(hdrNdTree->ptrFirstNd->ptrChildLst->uiCnt == 0)
		RsetRect(hdrNdTree->ptrFirstNd, tnInfo);


	RLstNd lstNdTemp = RpickChild(hdrNdTree, tnInfo);

	if(RinsertTree(lstNdTemp->ptrChildLst, tnInfo))
	{

        RsplitNode(lstNdTemp);

	    hdrNdTree->uiCnt++;
	    return (hdrNdTree->uiCnt > RMAXENTRIES) ? TRUE : FALSE;
	}


	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x6305
movq (%rdi), %rax
cmpl $0x1, (%rax)
jne 0x6314
movq %rbx, %rdi
movq %r14, %rsi
callq 0x441f
movl (%rbx), %eax
jmp 0x6351
movq 0x8(%rdi), %rax
cmpl $0x0, (%rax)
jne 0x6325
movq %r14, %rsi
callq 0x526c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x56fa
movq %rax, %r15
movq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x62e4
testl %eax, %eax
je 0x636b
movq %r15, %rdi
callq 0x5dda
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
leaq 0x11024(%rip), %rcx     # 0x1737c
cmpl (%rcx), %eax
seta %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x635d
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RbuildRTree(dataHdr*)
RHdrNd RbuildRTree(DataHdr dataHdrLst)
{
	RHdrNd hdrNdTree = RinitHdrNd();
	hdrNdTree->ptrFirstNd = RinitLstNd(RinitIntNd(NULL, NULL));
	hdrNdTree->uiCnt++;
	hdrNdTree->ptrFirstNd->ptrChildLst = RinitHdrNd();

	int cnt = 0,i;
	for(i=0;i<dataHdrLst->uiCnt;i++)
	{
		RinsertTree(hdrNdTree, RinitExtNd((dataHdrLst->dataClstElem)+i));
		if(hdrNdTree->uiCnt > 1)
			hdrNdTree = RcreateRoot(hdrNdTree);
	}

	return	hdrNdTree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x43d4
movq %rax, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0x5321
movq %rax, %rdi
callq 0x43f6
movq %rax, 0x8(%r14)
incl (%r14)
callq 0x43d4
movq 0x8(%r14), %rcx
movq %rax, 0x8(%rcx)
cmpl $0x0, (%rbx)
jle 0x63ec
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rdi
addq %r15, %rdi
callq 0x5379
movq %r14, %rdi
movq %rax, %rsi
callq 0x62e4
cmpl $0x2, (%r14)
jb 0x63dd
movq %r14, %rdi
callq 0x53cc
movq %rax, %r14
incq %r12
movslq (%rbx), %rax
addq $0x40, %r15
cmpq %rax, %r12
jl 0x63b5
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RprintTree(RhdrNd*)
void RprintTree(RHdrNd hdrNdTree)
{   

	RLstNd lstNdTemp = hdrNdTree->ptrFirstNd;
	int iCnt = 0;
	static int iIndent = 0;
	iIndent++;

	while(lstNdTemp != NULL)
    {   
    	for(iCnt = 0; iCnt < iIndent; iCnt++)
			printf("---");

		if(lstNdTemp->tnInfo->ndType == INTNODE)
        {   
        	printf("i hav %d children..\n",lstNdTemp->ptrChildLst->uiCnt);
			printf(" BottomLeft: ");

			for(iCnt = 0; iCnt < DIMENSION; iCnt++)
				printf("%lf ", lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt]);

            printf(" TopRight: ");

			for(iCnt = 0; iCnt < DIMENSION; iCnt++)
				printf("%lf ", lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt]);

            printf("\n");
			printf("i hav %d children..\n",lstNdTemp->ptrChildLst->uiCnt);
			RprintTree(lstNdTemp->ptrChildLst);
		}
		else
        {   printf(" DataPoint: ");
    		printData(lstNdTemp->tnInfo->tdInfo->dataClstElem);
			printf("\n");
		}
		lstNdTemp = lstNdTemp->ptrNextNd;
	}
	iIndent--;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r13
incl 0x10eac(%rip)           # 0x172bc
testq %r13, %r13
je 0x6550
leaq 0xbcf0(%rip), %rbx      # 0x12110
leaq 0x10f3d(%rip), %r15     # 0x17364
leaq 0xbbfc(%rip), %r12      # 0x1202a
cmpl $0x0, 0x10e87(%rip)     # 0x172bc
jle 0x6450
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3050
incl %r14d
cmpl 0x10e6e(%rip), %r14d    # 0x172bc
jl 0x643a
movq (%r13), %rax
cmpl $0x0, (%rax)
je 0x6487
leaq 0xbce3(%rip), %rdi      # 0x12143
xorl %eax, %eax
callq 0x3050
movq (%r13), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x414d
movl $0xa, %edi
callq 0x33d0
jmp 0x6543
movq 0x8(%r13), %rax
movl (%rax), %esi
leaq 0xbc80(%rip), %rdi      # 0x12114
xorl %eax, %eax
callq 0x3050
leaq 0xbc87(%rip), %rdi      # 0x12129
xorl %eax, %eax
callq 0x3050
cmpl $0x0, (%r15)
jle 0x64db
xorl %r14d, %r14d
movq (%r13), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movsd (%rax,%r14,8), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x3050
incq %r14
movslq (%r15), %rax
cmpq %rax, %r14
jl 0x64b2
leaq 0xbc55(%rip), %rdi      # 0x12137
xorl %eax, %eax
callq 0x3050
cmpl $0x0, (%r15)
jle 0x651c
xorl %r14d, %r14d
movq (%r13), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movsd (%rax,%r14,8), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x3050
incq %r14
movslq (%r15), %rax
cmpq %rax, %r14
jl 0x64f2
movl $0xa, %edi
callq 0x33d0
movq 0x8(%r13), %rax
movl (%rax), %esi
leaq 0xbbe1(%rip), %rdi      # 0x12114
xorl %eax, %eax
callq 0x3050
movq 0x8(%r13), %rdi
callq 0x63f8
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x642e
decl 0x10d66(%rip)           # 0x172bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RfindDist(double*, double*)
double RfindDist(DataPoint iDataOne, DataPoint iDataTwo)
{   
	double dDist = 0;
	int iCnt = 0;
	int k=0;
	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
	{    
		dDist = dDist + pow(iDataOne[iCnt] - iDataTwo[iCnt], 2);
	}

	return sqrt(dDist);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10df4(%rip), %rax     # 0x17364
movslq (%rax), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x659c
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm2
subsd (%rsi,%rcx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x6582
ucomisd %xmm1, %xmm0
jb 0x65a8
sqrtsd %xmm0, %xmm0
popq %rbp
retq
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: RisContains(region*, double*)
Boolean RisContains(Region rgnRect, DataPoint iData)
{
	int iCnt = 0;
	Boolean bIsContains = TRUE;
	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
    {   
    	if((rgnRect->iBottomLeft[iCnt] > iData[iCnt]) || (rgnRect->iTopRight[iCnt] < iData[iCnt]))
        {   
        	bIsContains = FALSE;
			break;
		}
	}
	return bIsContains;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10dab(%rip), %rax     # 0x17364
movslq (%rax), %rcx
movl $0x1, %eax
testq %rcx, %rcx
jle 0x65f6
movq (%rdi), %rdx
xorl %r8d, %r8d
movsd (%rdx,%r8,8), %xmm1
movsd (%rsi,%r8,8), %xmm0
ucomisd %xmm0, %xmm1
ja 0x65f4
movq 0x8(%rdi), %r9
ucomisd (%r9,%r8,8), %xmm0
ja 0x65f4
incq %r8
cmpq %r8, %rcx
jne 0x65cc
jmp 0x65f6
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/RTree.cpp
// Function: freeRTree(RhdrNd*)
void freeRTree(RHdrNd hdrNdTree)
{

	if(hdrNdTree == NULL) 
		return;

	if(hdrNdTree->uiCnt == 0)
	{
		free(hdrNdTree);
		return;
	}
	
	RLstNd lstNdTemp = hdrNdTree->ptrFirstNd;
	RLstNd lstNdNextTemp;
	
	if(lstNdTemp!=NULL)
	{
		while(lstNdTemp != NULL)
    	{
			switch(lstNdTemp->tnInfo->ndType)
        	{   
        		case INTNODE:   
				    			free(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft);
				    			free(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight);
				    			free(lstNdTemp->tnInfo->tdInfo->rgnRect);
				    			free(lstNdTemp->tnInfo->tdInfo);
				    			free(lstNdTemp->tnInfo);				    			
				    			freeRTree(lstNdTemp->ptrChildLst);                            	
                            	lstNdNextTemp = lstNdTemp->ptrNextNd;
                            	free(lstNdTemp);
                            	break;
            	case EXTNODE:   					            
					            free(lstNdTemp->tnInfo->tdInfo);
					            free(lstNdTemp->tnInfo);
					            freeRTree(lstNdTemp->ptrChildLst);
					            lstNdNextTemp = lstNdTemp->ptrNextNd;
                            	free(lstNdTemp);	                            
		                        break;

			}
			
			lstNdTemp = lstNdNextTemp;
		}
	}	
	
	free(hdrNdTree);	
	return;

}

// Assembly:
testq %rdi, %rdi
je 0x6739
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x6727
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x6727
movq (%r14), %rax
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x66fc
testl %ecx, %ecx
jne 0x66b5
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x3310
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x3310
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x3310
movq (%r14), %rax
movq 0x8(%rax), %rdi
callq 0x3310
movq (%r14), %rdi
callq 0x3310
movq 0x8(%r14), %rdi
callq 0x6696
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x3310
movq %r15, %r14
jmp 0x66b5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3310
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GinitRgnRect(double*, double*)
Region GinitRgnRect(Dimension iBottomLeft, Dimension iTopRight)
{   

	Region rgnRect = (Region)calloc(1, sizeof(struct region));
	// assert(rgnRect!=NULL);
    
    if(iBottomLeft != NULL)
		rgnRect->iBottomLeft = iBottomLeft;
	else{
		rgnRect->iBottomLeft = (Dimension)calloc(DIMENSION, sizeof(double));
		// assert(rgnRect->iBottomLeft!=NULL);
	}

	if(iTopRight != NULL)
		rgnRect->iTopRight = iTopRight;
	else{
		rgnRect->iTopRight = (Dimension)calloc(DIMENSION, sizeof(double));
		// assert(rgnRect->iTopRight!=NULL);

	}

	return rgnRect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %rbx
testq %r15, %r15
jne 0x693d
leaq 0x10a37(%rip), %rax     # 0x17364
movslq (%rax), %rdi
movl $0x8, %esi
callq 0x31b0
movq %rax, %r15
movq %r15, (%rbx)
testq %r14, %r14
jne 0x695c
leaq 0x10a18(%rip), %rax     # 0x17364
movslq (%rax), %rdi
movl $0x8, %esi
callq 0x31b0
movq %rax, %r14
movq %r14, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GinitIntNd(double*, double*)
GTreeNode GinitIntNd(Dimension iBottomLeft, Dimension iTopRight)
{   

	Region rgnRect = GinitRgnRect(iBottomLeft, iTopRight);

	GTreeData tdInfo = (GTreeData)calloc(1, sizeof(*tdInfo));
	// assert(tdInfo!=NULL);

	tdInfo->rgnRect = rgnRect;
	tdInfo->groupElem = -1;
	
    GTreeNode tnInfo = (GTreeNode)calloc(1, sizeof(*tnInfo));
    // assert(tnInfo!=NULL);

	tnInfo->ndType = INTNODE;
	tnInfo->tdInfo = tdInfo;

	return tnInfo;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x68ff
movq %rax, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r14
movq %rbx, (%rax)
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GinitExtNd(group*)
GTreeNode GinitExtNd(Group groupElem)
{
	// assert(groupElem!=NULL);

	GTreeNode tnInfo = (GTreeNode)calloc(1, sizeof(*tnInfo));
	// assert(tnInfo!=NULL);
	
	GTreeData tdInfo = (GTreeData)calloc(1, sizeof(*tdInfo));
    // assert(tdInfo!=NULL);

	tdInfo->groupElem = groupElem->id;
	tdInfo->rgnRect = NULL;

    tnInfo->ndType = EXTNODE;	
	tnInfo->tdInfo = tdInfo;

	return tnInfo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movl (%rbx), %ecx
movl %ecx, 0x8(%rax)
movq $0x0, (%rax)
movl $0x1, (%r14)
movq %rax, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GsetRect(GlstNd*, GtreeNode*)
void GsetRect(GLstNd lstNd, GTreeNode tnInfo)
{   
	// if(lstNd->tnInfo->ndType)
	// 	fprintf(stderr, "------------------TreeNode: %d\t InsertingNode: %d------------------\n", lstNd->tnInfo->ndType, tnInfo->ndType);

    int iCnt = 0;
    switch(tnInfo->ndType)
    {   
    	case INTNODE:
			for(iCnt = 0; iCnt < DIMENSION; iCnt++)
	        {   
	        	lstNd->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] = tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
				lstNd->tnInfo->tdInfo->rgnRect->iTopRight[iCnt] = tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
	     	}
			break;
        case EXTNODE:
			for(iCnt = 0; iCnt < DIMENSION; iCnt++)
	        {   
	        	lstNd->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] = groupList->groupItems[tnInfo->tdInfo->groupElem]->bcell->minOriginalBoundary[iCnt];
				lstNd->tnInfo->tdInfo->rgnRect->iTopRight[iCnt] = groupList->groupItems[tnInfo->tdInfo->groupElem]->bcell->maxOriginalBoundary[iCnt];
			}
			break;
	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %eax
testl %eax, %eax
je 0x6a81
cmpl $0x1, %eax
jne 0x6ad2
leaq 0x10949(%rip), %rax     # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x6ad2
leaq 0x10972(%rip), %rcx     # 0x173a0
movq (%rcx), %rcx
movq (%rcx), %rcx
movq 0x8(%rsi), %rdx
movslq 0x8(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x38(%rcx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
movq (%rdi), %rsi
movq 0x8(%rsi), %rsi
movq (%rsi), %rdi
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
xorl %r8d, %r8d
movsd (%rcx,%r8,8), %xmm0
movsd %xmm0, (%rsi,%r8,8)
movsd (%rdx,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rax
jne 0x6a5f
jmp 0x6ad2
leaq 0x108dc(%rip), %rax     # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x6ad2
movq 0x8(%rsi), %rcx
movq (%rcx), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
movq (%rdi), %rsi
movq 0x8(%rsi), %rsi
movq (%rsi), %rdi
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
xorl %r8d, %r8d
movsd (%rcx,%r8,8), %xmm0
movsd %xmm0, (%rsi,%r8,8)
movsd (%rdx,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rax
jne 0x6ab2
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GinsertTree(GhdrNd*, GtreeNode*, int, int)
Boolean GinsertTree(GHdrNd hdrNdTree, GTreeNode tnInfo, int gMinEntries, int gMaxEntries)
{   
	int iCnt = 0;

	if(hdrNdTree->ptrFirstNd == NULL || hdrNdTree->ptrFirstNd->tnInfo->ndType == EXTNODE)
    {    
		GinsertLstElem(hdrNdTree, tnInfo);
		return(hdrNdTree->uiCnt > gMaxEntries) ? TRUE : FALSE;
    }
    
	if(hdrNdTree->ptrFirstNd->ptrChildLst->uiCnt == 0)
		GsetRect(hdrNdTree->ptrFirstNd, tnInfo);

	GLstNd lstNdTemp = GpickChild(hdrNdTree, tnInfo);

	if(GinsertTree(lstNdTemp->ptrChildLst, tnInfo, gMinEntries, gMaxEntries))
    {   
        GsplitNode(lstNdTemp,gMinEntries);
	    hdrNdTree->uiCnt++;
	    return (hdrNdTree->uiCnt > gMaxEntries) ? TRUE : FALSE;
	}
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x6f3a
movq (%rdi), %rax
cmpl $0x1, (%rax)
jne 0x6f4a
movq %r14, %rdi
movq %r12, %rsi
callq 0x4287
cmpl %ebx, (%r14)
jmp 0x6f96
movl %edx, %r15d
movq 0x8(%rdi), %rax
cmpl $0x0, (%rax)
jne 0x6f5e
movq %r12, %rsi
callq 0x6a01
movq %r14, %rdi
movq %r12, %rsi
callq 0x6ad4
movq %rax, %r13
movq 0x8(%rax), %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x6f13
testl %eax, %eax
je 0x6fab
movq %r13, %rdi
movl %r15d, %esi
callq 0x6faf
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
cmpl %ebx, %eax
seta %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x6f99
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GcreateRoot(GhdrNd*)
GHdrNd GcreateRoot(GHdrNd hdrNdTree)
{  
    GHdrNd hdrNdRoot = GinitHdrNd();
    double* iBottomLeft = (double*)calloc(DIMENSION, sizeof(double));
    // assert(iBottomLeft != NULL);

	double* iTopRight = (double*)calloc(DIMENSION,sizeof(double));
	// assert(iTopRight != NULL);

	GLstNd lstNdTemp = hdrNdTree->ptrFirstNd;
	int iCnt = 0;
	Boolean bIsFirst = TRUE;

	while(lstNdTemp != NULL)
    {	
    	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
        {   
        	if(bIsFirst)
            {   
            	iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];
				iTopRight[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight[iCnt];
         	}
			else
            {   
            	if(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt] < iBottomLeft[iCnt])
					iBottomLeft[iCnt] = lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft[iCnt];

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

	hdrNdRoot->ptrFirstNd = GinitLstNd(GinitIntNd(iBottomLeft, iTopRight));
    hdrNdRoot->ptrFirstNd->ptrChildLst = hdrNdTree;
	hdrNdRoot->uiCnt = 1;

	return hdrNdRoot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x423c
movq %rax, %r14
leaq 0xfe90(%rip), %rax      # 0x17364
movslq (%rax), %r12
movl $0x8, %esi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r15
movl $0x8, %esi
movq %r12, %rdi
callq 0x31b0
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x7572
movl %r12d, %edx
xorl %esi, %esi
testl %edx, %edx
jle 0x7566
movq (%rcx), %rdi
movq 0x8(%rdi), %rdi
movq (%rdi), %rdi
movq (%rdi), %r8
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm0
testb $0x1, %sil
je 0x7548
movsd (%r15,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7534
movsd %xmm0, (%r15,%r9,8)
movq 0x8(%rdi), %r10
movsd (%r10,%r9,8), %xmm0
ucomisd (%rax,%r9,8), %xmm0
ja 0x7558
jmp 0x755e
movsd %xmm0, (%r15,%r9,8)
movq 0x8(%rdi), %r10
movsd (%r10,%r9,8), %xmm0
movsd %xmm0, (%rax,%r9,8)
incq %r9
cmpq %r9, %rdx
jne 0x7516
movq 0x10(%rcx), %rcx
movb $0x1, %sil
testq %rcx, %rcx
jne 0x7502
movq %r15, %rdi
movq %rax, %rsi
callq 0x696e
movq %rax, %rdi
callq 0x425e
movq %rax, 0x8(%r14)
movq %rbx, 0x8(%rax)
movl $0x1, (%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: distance(double*, double*)
double distance(DataPoint point1, DataPoint point2)
{
	double sum = 0;
	int i;

	for(i=0;i<DIMENSION;i++)
		sum += ( (point1[i]- point2[i])*(point1[i] - point2[i]) );
	
	return sqrt(sum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xf7f5(%rip), %rax      # 0x17364
movslq (%rax), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x7b9b
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm2
subsd (%rsi,%rcx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x7b81
ucomisd %xmm1, %xmm0
jb 0x7ba7
sqrtsd %xmm0, %xmm0
popq %rbp
retq
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: GisEpsDistant(region*, group*, double)
int GisEpsDistant(Region rgnRect, Group groupElem, double eps)
{   
	int iCnt = 0;
	bool assignflag = false;

	int bIsContains = 0;
	double* point = (Dimension)calloc(DIMENSION, sizeof(double));
	// assert(point != NULL);
	for(iCnt = 0; iCnt < DIMENSION; iCnt++)
    {   
    	point[iCnt] = (rgnRect->iBottomLeft[iCnt] + rgnRect->iTopRight[iCnt])/(double)2;
	}
	// DataPoint d = (dataList->dataClstElem + groupElem->master_id)->iData;

	if(distance(point, groupElem->master) <= eps + DBL_EPSILON)bIsContains = 1;
	else if(distance(point, groupElem->master) < 2*eps + DBL_EPSILON)bIsContains = -1;

	free(point);
	return bIsContains;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %r12
leaq 0xf797(%rip), %r13      # 0x17364
movslq (%r13), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x31b0
movq %rax, %rbx
testq %r15, %r15
jle 0x7c14
movq (%r12), %rax
movq 0x8(%r12), %rcx
xorl %edx, %edx
movsd 0xa577(%rip), %xmm0     # 0x12170
movsd (%rax,%rdx,8), %xmm1
addsd (%rcx,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x7bf9
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testl %r15d, %r15d
jle 0x7c41
movq 0x28(%r14), %rax
xorl %ecx, %ecx
movsd (%rbx,%rcx,8), %xmm2
subsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %r15
jne 0x7c27
ucomisd %xmm1, %xmm0
jb 0x7c4d
sqrtsd %xmm0, %xmm0
jmp 0x7c52
callq 0x3230
movsd -0x30(%rbp), %xmm3
movsd 0xa519(%rip), %xmm1     # 0x12178
addsd %xmm3, %xmm1
movl $0x1, %r15d
ucomisd %xmm0, %xmm1
jae 0x7cd1
movslq (%r13), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x7ca0
movq 0x28(%r14), %rcx
xorl %edx, %edx
movsd (%rbx,%rdx,8), %xmm2
subsd (%rcx,%rdx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x7c86
ucomisd %xmm1, %xmm0
jb 0x7cac
sqrtsd %xmm0, %xmm0
jmp 0x7cb6
callq 0x3230
movsd -0x30(%rbp), %xmm3
addsd %xmm3, %xmm3
addsd 0xa4b6(%rip), %xmm3     # 0x12178
xorl %r15d, %r15d
ucomisd %xmm0, %xmm3
jbe 0x7cd1
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x3310
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: createCellRegOfPoint(data*, double)
Region createCellRegOfPoint(Data currDataPoint, double eps)
{
	Region tempRegion = (Region) calloc(1, sizeof(struct region));
	// assert(tempRegion!=NULL);

	tempRegion->iBottomLeft = (Dimension)calloc(DIMENSION, sizeof(double));
	// assert(tempRegion->iBottomLeft!=NULL);

	tempRegion->iTopRight = (Dimension)calloc(DIMENSION, sizeof(double));
	// assert(tempRegion->iTopRight!=NULL);

	int i = 0;
	for(i=0;i<DIMENSION;i++)
	{
		tempRegion->iBottomLeft[i] = currDataPoint->iData[i] - eps;		
		tempRegion->iTopRight[i] = currDataPoint->iData[i] + eps; 		
	}

	return tempRegion;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x28(%rbp)
movq %rdi, %r12
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %rbx
leaq 0xec73(%rip), %rax      # 0x17364
movslq (%rax), %r14
movl $0x8, %esi
movq %r14, %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, (%rbx)
movl $0x8, %esi
movq %r14, %rdi
callq 0x31b0
movsd -0x28(%rbp), %xmm1
movq %rax, 0x8(%rbx)
testq %r14, %r14
jle 0x874d
movq (%r12), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%r15,%rdx,8)
movsd (%rcx,%rdx,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r14
jne 0x8728
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: createCellRegOfDataPoint(double*, double)
Region createCellRegOfDataPoint(DataPoint currDataPoint, double eps)
{
	Region tempRegion = (Region) calloc(1, sizeof(struct region));
	// assert(tempRegion!=NULL);

	tempRegion->iBottomLeft = (Dimension)calloc(DIMENSION, sizeof(double));
	// assert(tempRegion->iBottomLeft!=NULL);

	tempRegion->iTopRight = (Dimension)calloc(DIMENSION, sizeof(double));
	// assert(tempRegion->iTopRight!=NULL);

	int i = 0;

	for(i=0;i<DIMENSION;i++)
	{
		tempRegion->iBottomLeft[i] = currDataPoint[i] - eps;		
		tempRegion->iTopRight[i] = currDataPoint[i] + eps; 		
	}

	return tempRegion;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r14
leaq 0xebd7(%rip), %rax      # 0x17364
movslq (%rax), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x31b0
movq %rax, %r12
movq %rax, (%r14)
movl $0x8, %esi
movq %r15, %rdi
callq 0x31b0
movsd -0x28(%rbp), %xmm2
movq %rax, 0x8(%r14)
testq %r15, %r15
jle 0x87e4
xorl %ecx, %ecx
movsd (%rbx,%rcx,8), %xmm0
movapd %xmm0, %xmm1
subsd %xmm2, %xmm1
movsd %xmm1, (%r12,%rcx,8)
addsd %xmm2, %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x87c0
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: insertGroupIntoRTree(GhdrNd*, group*, int, int)
GHdrNd insertGroupIntoRTree(GHdrNd hdrNdTree, Group groupNode, int gMinEntries, int gMaxEntries)
{
	GinsertTree(hdrNdTree, GinitExtNd(groupNode), gMinEntries, gMaxEntries);
		
	if(hdrNdTree->uiCnt > 1)
		hdrNdTree = GcreateRoot(hdrNdTree);

	return hdrNdTree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r13
movl $0x1, %edi
movl $0x10, %esi
callq 0x31b0
movl (%r12), %ecx
movl %ecx, 0x8(%rax)
movq $0x0, (%rax)
movl $0x1, (%r13)
movq %rax, 0x8(%r13)
movq %rbx, %rdi
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x6f13
cmpl $0x2, (%rbx)
jb 0x8ee2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x74b7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: populateAuxRTrees(dataHdr*, vectorc*)
void populateAuxRTrees(DataHdr dataList, struct vectorc* groupList)
{
	int cnt = 0,i = 0;
	int j=0;
	RHdrNd hdrNdTree = NULL;
	Group g;
	Data data;
	for(i=0; i < VECTOR_TOTAL(groupList); i++)
	{
		g = groupList->groupItems[i];
		
		hdrNdTree = RinitHdrNd();
		
		hdrNdTree->ptrFirstNd = RinitLstNd(RinitIntNd(NULL, NULL));
		hdrNdTree->uiCnt++;
		hdrNdTree->ptrFirstNd->ptrChildLst = RinitHdrNd();		

		for(j=0;j<VECTOR_TOTAL(g->total_points);j++)
		{
			data = dataList->dataClstElem + g->total_points->intItems[j];

			// if(data->debugPoint == TRUE){
			// 	printf("%lf\t%lf\t%lf\t populateAuxRTrees Method is getting inserted in rtree groupId%d\n",data->iData[0],data->iData[1],data->iData[2],g->total_points->intItems[j]);
			// }

			RinsertTree(hdrNdTree, RinitExtNd(data));
					
			if(hdrNdTree->uiCnt > 1)
				hdrNdTree = RcreateRoot(hdrNdTree);

		}
		// if(hdrNdTree == NULL)fprintf(stderr, "Errorrrrrr!\n");
		g->bcell->auxCellRTree = hdrNdTree;
		// isCorrectRTree(g->bcell->auxCellRTree);

	}

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3a4d
testl %eax, %eax
jle 0x8fcc
xorl %r12d, %r12d
movq %rbx, -0x30(%rbp)
movq (%rbx), %rax
movq (%rax,%r12,8), %r13
callq 0x43d4
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0x5321
movq %rax, %rdi
callq 0x43f6
movq %rax, 0x8(%r15)
incl (%r15)
callq 0x43d4
movq 0x8(%r15), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%r13), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0x8faa
xorl %ebx, %ebx
movq 0x10(%r13), %rax
movq 0x8(%rax), %rax
movslq (%rax,%rbx,4), %rdi
shlq $0x6, %rdi
addq 0x8(%r14), %rdi
callq 0x5379
movq %r15, %rdi
movq %rax, %rsi
callq 0x62e4
cmpl $0x2, (%r15)
jb 0x8f97
movq %r15, %rdi
callq 0x53cc
movq %rax, %r15
incq %rbx
movq 0x10(%r13), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0x8f62
movq 0x38(%r13), %rax
movq %r15, 0x20(%rax)
incq %r12
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x3a4d
cltq
cmpq %rax, %r12
jl 0x8f1f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/MuC_RTree.cpp
// Function: freeGRTree(GhdrNd*)
void freeGRTree(GHdrNd hdrNdTree)
{

	if(hdrNdTree == NULL) 
		return;

	else if(hdrNdTree->uiCnt == 0)
	{
		free(hdrNdTree);
		return;
	}
	
	GLstNd lstNdTemp = hdrNdTree->ptrFirstNd;
	GLstNd lstNdNextTemp;
	
	if(lstNdTemp!=NULL)
	{
		while(lstNdTemp != NULL)
    	{
			switch(lstNdTemp->tnInfo->ndType)
        	{   
        		case INTNODE:   
					lstNdNextTemp = lstNdTemp->ptrNextNd;
	    			free(lstNdTemp->tnInfo->tdInfo->rgnRect->iBottomLeft);
	    			free(lstNdTemp->tnInfo->tdInfo->rgnRect->iTopRight);
	    			free(lstNdTemp->tnInfo->tdInfo->rgnRect);
	    			free(lstNdTemp->tnInfo->tdInfo);
	    			free(lstNdTemp->tnInfo);
	    			freeGRTree(lstNdTemp->ptrChildLst);                            	
	            	free(lstNdTemp);
            	break;
            	case EXTNODE:   	
		            lstNdNextTemp = lstNdTemp->ptrNextNd;
		            free(lstNdTemp->tnInfo->tdInfo);

		            free(lstNdTemp->tnInfo);
		            freeGRTree(lstNdTemp->ptrChildLst);
                	free(lstNdTemp);
                break;

			}
			
			lstNdTemp = lstNdNextTemp;
		}
	}	
	
	free(hdrNdTree);	
	return;
}

// Assembly:
testq %rdi, %rdi
je 0x9084
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x9072
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x9072
movq (%r14), %rax
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x9047
testl %ecx, %ecx
jne 0x8ffa
movq 0x10(%r14), %r15
movq 0x8(%rax), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x3310
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x3310
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x3310
movq (%r14), %rax
jmp 0x904b
movq 0x10(%r14), %r15
movq 0x8(%rax), %rdi
callq 0x3310
movq (%r14), %rdi
callq 0x3310
movq 0x8(%r14), %rdi
callq 0x8fdb
movq %r14, %rdi
callq 0x3310
movq %r15, %r14
jmp 0x8ffa
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3310
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: compute_local_bounding_box(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int*, interval*)
void compute_local_bounding_box(vector< vector<double> >& objects, int* num_points, interval* box)
{
	int i, j;

	for(i = 0; i < DIMENSION; i++)
	{
		box[i].upper = (objects)[0][i];
		box[i].lower = (objects)[0][i];
	}

	for(i = 0; i < DIMENSION; i++)
	{
		for(j = 1; j < *num_points; j++)
		{
			if(box[i].lower > (objects)[j][i])
				box[i].lower = (objects)[j][i];
			else if(box[i].upper < (objects)[j][i])
				box[i].upper = (objects)[j][i];
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0xdae9(%rip), %rax      # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x98b6
movq (%rdi), %rcx
movq (%rcx), %rcx
leaq (,%rax,8), %r8
xorl %r9d, %r9d
movsd (%rcx,%r9), %xmm0
movsd %xmm0, 0x8(%rdx,%r9,2)
movsd (%rcx,%r9), %xmm0
movsd %xmm0, (%rdx,%r9,2)
addq $0x8, %r9
cmpq %r9, %r8
jne 0x9894
testl %eax, %eax
jle 0x992e
movl (%rsi), %ecx
movq (%rdi), %rsi
movq %rcx, %rdi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
cmpl $0x2, %ecx
jl 0x9926
movq %r8, %r10
shlq $0x4, %r10
leaq (%rdx,%r10), %r9
addq %rdx, %r10
addq $0x8, %r10
movsd -0x8(%r10), %xmm0
movl $0x18, %r11d
movq (%rsi,%r11), %rbx
movsd (%rbx,%r8,8), %xmm1
ucomisd %xmm1, %xmm0
movq %r9, %rbx
movapd %xmm1, %xmm2
ja 0x9915
ucomisd (%r10), %xmm1
movq %r10, %rbx
movapd %xmm0, %xmm2
jbe 0x991d
movsd %xmm1, (%rbx)
movapd %xmm2, %xmm0
addq $0x18, %r11
cmpq %r11, %rdi
jne 0x98f0
incq %r8
cmpq %rax, %r8
jne 0x98cd
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: compute_global_bounding_box(interval*, interval*, int)
void compute_global_bounding_box(Interval box, Interval gbox, int nproc)
{
	int i, j, k;

	Interval gather_local_box = (Interval) calloc(DIMENSION * nproc, sizeof(struct interval));
	// assert(gather_local_box != NULL);

	MPI_Allgather(box, sizeof(struct interval) * DIMENSION, MPI_BYTE, gather_local_box, 
			sizeof(struct interval) * DIMENSION, MPI_BYTE, MPI_COMM_WORLD);

	for(i = 0; i < DIMENSION; i++)
	{
		gbox[i].lower = gather_local_box[i].lower;
		gbox[i].upper = gather_local_box[i].upper;

		k = i;
		for(j = 0; j < nproc; j++, k += DIMENSION)
		{
			if(gbox[i].lower > gather_local_box[k].lower)
				gbox[i].lower = gather_local_box[k].lower;

			if(gbox[i].upper < gather_local_box[k].upper)
				gbox[i].upper = gather_local_box[k].upper;
		}
	}

	free(gather_local_box);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
leaq 0xda16(%rip), %rax      # 0x17364
movl (%rax), %r13d
movl %r13d, %eax
imull %edx, %eax
movslq %eax, %rdi
movl $0x10, %esi
callq 0x31b0
movq %rax, %r15
shll $0x4, %r13d
movq 0xd636(%rip), %rax      # 0x16fa8
movq %rax, (%rsp)
movq 0xd61b(%rip), %rdx      # 0x16f98
movq %r12, %rdi
movl %r13d, %esi
movq %r15, %rcx
movl %r13d, %r8d
movq %rdx, %r9
callq 0x3060
leaq 0xd9cc(%rip), %rax      # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0x9a27
movq %r15, %rcx
addq $0x8, %rcx
movq %rax, %rdx
shlq $0x4, %rdx
xorl %esi, %esi
movq %rsi, %rdi
shlq $0x4, %rdi
movsd (%r15,%rdi), %xmm0
movsd %xmm0, (%r14,%rdi)
movsd 0x8(%r15,%rdi), %xmm0
movsd %xmm0, 0x8(%r14,%rdi)
testl %ebx, %ebx
jle 0x9a1b
addq %r14, %rdi
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
movl %ebx, %r8d
movq %rcx, %r9
movsd -0x8(%r9), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x99ff
movsd %xmm2, (%rdi)
movapd %xmm2, %xmm0
movsd (%r9), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x9a13
movsd %xmm2, 0x8(%rdi)
movapd %xmm2, %xmm1
addq %rdx, %r9
decl %r8d
jne 0x99eb
incq %rsi
addq $0x10, %rcx
cmpq %rax, %rsi
jne 0x99b4
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3310
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: copy_global_box_to_each_node(interval**, interval*, int)
void copy_global_box_to_each_node(Interval* nodes_gbox, Interval gbox, int internal_nodes)
{
	int i, j;
	for(i = 0; i < internal_nodes; i++)
	{
		for(j = 0; j < DIMENSION; j++)
		{
			nodes_gbox[i][j].upper = gbox[j].upper;
			nodes_gbox[i][j].lower = gbox[j].lower;
		}
	}
}

// Assembly:
testl %edx, %edx
jle 0x9a91
pushq %rbp
movq %rsp, %rbp
leaq 0xd918(%rip), %rax      # 0x17364
movl (%rax), %eax
movl %edx, %ecx
movq %rax, %rdx
shlq $0x4, %rdx
xorl %r8d, %r8d
testl %eax, %eax
jle 0x9a88
movq (%rdi,%r8,8), %r9
xorl %r10d, %r10d
movsd 0x8(%rsi,%r10), %xmm0
movsd %xmm0, 0x8(%r9,%r10)
movsd (%rsi,%r10), %xmm0
movsd %xmm0, (%r9,%r10)
addq $0x10, %r10
cmpq %r10, %rdx
jne 0x9a65
incq %r8
cmpq %rcx, %r8
jne 0x9a5a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: findKMedian(vectorc*, int)
double findKMedian(vectorc* A, int K)
{
	int l,m;
	l=0;

	m = VECTOR_TOTAL(A) - 1;
	while (l<m) 
	{
		double x=A->doubleItems[K];
		int i=l;
		int j=m;
		do {
			while (A->doubleItems[i] < x) i++;
			while (x<A->doubleItems[j]) j--;
			if (i<=j) 
			{
				swap(A->doubleItems[i], A->doubleItems[j]);
				i++; 
				j--;
			}
		} while (i<=j);

		if (j<K) l=i;
		if (K<i) m=j;
	}

	return A->doubleItems[K];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x3a4d
movslq %r14d, %rcx
cmpl $0x2, %eax
jl 0x9b24
decl %eax
movq 0x10(%rbx), %rdx
xorl %esi, %esi
movsd (%rdx,%rcx,8), %xmm0
movl %esi, %r8d
movl %eax, %edi
movslq %r8d, %r9
decq %r9
movl %r8d, %r10d
movsd 0x8(%rdx,%r9,8), %xmm1
incq %r9
incl %r10d
ucomisd %xmm1, %xmm0
ja 0x9ac7
leal -0x1(%r10), %r8d
movslq %edi, %r11
incq %r11
movsd -0x8(%rdx,%r11,8), %xmm2
decq %r11
decl %edi
ucomisd %xmm0, %xmm2
ja 0x9ae4
cmpq %r11, %r9
jle 0x9aff
incl %edi
jmp 0x9b0e
movsd %xmm2, (%rdx,%r9,8)
movsd %xmm1, (%rdx,%r11,8)
movl %r10d, %r8d
cmpl %edi, %r8d
jle 0x9abe
cmpl %r14d, %edi
cmovll %r8d, %esi
cmpl %r14d, %r8d
cmovgl %edi, %eax
cmpl %eax, %esi
jl 0x9ab4
movq 0x10(%rbx), %rax
movsd (%rax,%rcx,8), %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: get_median(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int*, int, ompi_communicator_t*&)
double get_median(vector< vector< double> >& objects, int* num_points, int d, MPI_Comm& new_comm)
{	
	double median;

	// vector<double> data;
	vectorc* data = (vectorc*)malloc(sizeof(struct vectorc));
	// assert(data != NULL);

	VECTOR_INIT(data, DOUBLE);
	addHelper[0] = 0; 
	VECTOR_RESIZE(data, *num_points, (void*)addHelper);
	// data.resize(*num_points, 0);

	for (int k=0; k < *num_points; k++)
		data->doubleItems[k] = (objects)[k][d];

	median = findKMedian(data, VECTOR_TOTAL(data)/2);

	VECTOR_FREE(data);
	free(data);

	// data.clear();

	int proc_count;
	MPI_Comm_size(new_comm, &proc_count);

	vectorc* all_medians = (vectorc*)malloc(sizeof(struct vectorc));
	// assert(all_medians!=NULL);

	VECTOR_INIT(all_medians, DOUBLE);
	VECTOR_RESIZE(all_medians, proc_count, (void*)addHelper);

	// vector<double> all_medians;
	// all_medians.resize(proc_count);

	MPI_Allgather(&median, 1, MPI_DOUBLE, &all_medians->doubleItems[0], 1, MPI_DOUBLE, new_comm);	

	median = findKMedian(all_medians, VECTOR_TOTAL(all_medians)/2); 

	VECTOR_FREE(all_medians);
	free(all_medians);

	// all_medians.clear();	

	return median;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, %r13
movq %rdi, %r12
movl $0x30, %edi
callq 0x33a0
movq %rax, %r15
movq %rax, %rdi
movl $0x2, %esi
callq 0x39bc
leaq 0xd820(%rip), %rax      # 0x17390
movq (%rax), %rdx
movl $0x0, (%rdx)
movl (%r13), %esi
movq %r15, %rdi
callq 0x3a56
movslq (%r13), %rax
testq %rax, %rax
jle 0x9bb5
movq (%r12), %rcx
movslq %r14d, %rdx
movq 0x10(%r15), %rsi
xorl %edi, %edi
movq (%rcx), %r8
movsd (%r8,%rdx,8), %xmm0
movsd %xmm0, (%rsi,%rdi,8)
incq %rdi
addq $0x18, %rcx
cmpq %rdi, %rax
jne 0x9b9b
movq %r15, %rdi
callq 0x3a4d
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
movq %r15, %rdi
callq 0x9a92
leaq -0x38(%rbp), %r14
movsd %xmm0, (%r14)
movq %r15, %rdi
callq 0x3ca0
movq %r15, %rdi
callq 0x3310
movq (%rbx), %rdi
leaq -0x2c(%rbp), %r12
movq %r12, %rsi
callq 0x32e0
movl $0x30, %edi
callq 0x33a0
movq %rax, %r15
movq %rax, %rdi
movl $0x2, %esi
callq 0x39bc
movl (%r12), %esi
leaq 0xd775(%rip), %rax      # 0x17390
movq (%rax), %rdx
movq %r15, %rdi
callq 0x3a56
movq 0x10(%r15), %rcx
movq (%rbx), %rax
movq %rax, (%rsp)
movq 0xd380(%rip), %rdx      # 0x16fb8
movq %r14, %rdi
movl $0x1, %esi
movl $0x1, %r8d
movq %rdx, %r9
callq 0x3060
movq %r15, %rdi
callq 0x3a4d
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
movq %r15, %rdi
callq 0x9a92
movsd %xmm0, (%r14)
movq %r15, %rdi
callq 0x3ca0
movq %r15, %rdi
callq 0x3310
movsd (%r14), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: addPoints(int, int, int, std::vector<double, std::allocator<double>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, vectorc*, int*)
bool addPoints(int source, int buf_size, int dims, vector<double>& raw_data, vector< vector<double> >& remote_objects, vectorc* remote_PrIDs, int* remote_number)
{
	int i, j, k, pos, num_points = buf_size / dims;

	if(DIMENSION != dims)
		return false;

	pos = *remote_number;
	*remote_number = *remote_number + num_points;

	remote_objects.resize(*remote_number);

	for(int ll = 0; ll < *remote_number; ll++)
		remote_objects[ll].resize(dims);

	addHelper[0] = -1;
	VECTOR_RESIZE(remote_PrIDs, *remote_number, (void*)addHelper);
	// remote_PrIDs.resize(*remote_number, -1);

	k = 0;
	for(i = 0; i < num_points; i++)
	{
		for(j = 0; j < dims; j++)
			remote_objects[pos][j] = raw_data[k++];

		remote_PrIDs->intItems[pos] = source;

		pos++;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %eax
cltd
idivl %ebx
leaq 0xcb92(%rip), %rdx      # 0x17364
movl (%rdx), %edx
movl %edx, -0x38(%rbp)
cmpl %ebx, %edx
jne 0xa8cd
movq %r8, %r13
movq %rcx, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movl %edi, -0x34(%rbp)
movl %ebx, -0x2c(%rbp)
movq 0x10(%rbp), %rbx
movslq (%rbx), %r14
movl %eax, -0x30(%rbp)
movslq %eax, %rsi
addq %r14, %rsi
movl %esi, (%rbx)
movq %r8, %rdi
callq 0xb3ae
movq %rbx, %rcx
cmpl $0x0, (%rbx)
jle 0xa84a
movslq -0x2c(%rbp), %rax
movq %rax, -0x50(%rbp)
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%r13), %rdi
addq %r15, %rdi
movq -0x50(%rbp), %rsi
movq %r13, %r12
movq %rcx, %r13
callq 0xb42c
movq %r13, %rcx
movq %r12, %r13
incq %rbx
movslq (%rcx), %rax
addq $0x18, %r15
cmpq %rax, %rbx
jl 0xa81f
leaq 0xcb3f(%rip), %rax      # 0x17390
movq (%rax), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movl (%rcx), %esi
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x3a56
movq %rbx, %rdx
movl -0x30(%rbp), %r12d
testl %r12d, %r12d
movl -0x2c(%rbp), %ebx
movl -0x34(%rbp), %r15d
movq -0x40(%rbp), %rax
jle 0xa8cd
movq (%rax), %rax
movq (%r13), %rcx
movq 0x8(%rdx), %rdx
movl %ebx, %esi
xorl %edi, %edi
xorl %r8d, %r8d
testl %ebx, %ebx
jle 0xa8be
leaq (%r14,%r14,2), %r9
movq (%rcx,%r9,8), %r9
movslq %edi, %r10
leaq (%rax,%r10,8), %r11
xorl %r10d, %r10d
movsd (%r11,%r10,8), %xmm0
movsd %xmm0, (%r9,%r10,8)
incq %r10
cmpq %r10, %rsi
jne 0xa8a7
addl %r10d, %edi
movl %r15d, (%rdx,%r14,4)
incq %r14
incl %r8d
cmpl %r12d, %r8d
jne 0xa891
cmpl %ebx, -0x38(%rbp)
sete %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: updatePoints(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, vectorc*, vectorc*, int)
bool updatePoints(vector< vector<int> >& raw_ind, vectorc* remote_Indices, vectorc* remote_PrIDs, int remote_number)
{
	int i, source = -1, j = -1, prev_source = -1;

	addHelper[0] = -1;
	VECTOR_RESIZE(remote_Indices, remote_number, (void*)addHelper);

	// remote_Indices.resize(remote_number, -1);

	for(i = 0; i < remote_number; i++)
	{
		source = remote_PrIDs->intItems[i];

		if(source != prev_source)
			j = 0;

		remote_Indices->intItems[i] = raw_ind[source][j++];

		prev_source = source;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0xca91(%rip), %rax      # 0x17390
movq (%rax), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movq %rsi, %rdi
movl %ecx, %esi
callq 0x3a56
testl %ebx, %ebx
jle 0xa961
movq 0x8(%r15), %rax
movq (%r12), %rcx
movq 0x8(%r14), %rdx
movl %ebx, %esi
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
xorl %edi, %edi
xorl %r8d, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movslq (%rax,%r8,4), %r11
cmpl %r10d, %r11d
cmovnel %edi, %r9d
leaq (%r11,%r11,2), %r10
movslq %r9d, %rbx
incl %r9d
movq (%rcx,%r10,8), %r10
movl (%r10,%rbx,4), %r10d
movl %r10d, (%rdx,%r8,4)
incq %r8
movl %r11d, %r10d
cmpq %r8, %rsi
jne 0xa935
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq