// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/clustering.cpp
// Function: sequentialClustering(dataHdr*)
void sequentialClustering(DataHdr dataList)
{
	int i;
	int j, k, npid, prID;
	int rank, nproc, mpi_namelen;

	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
	MPI_Comm_size(MPI_COMM_WORLD, &nproc);

	int pid;
	int root, root1, root2, tid;

    noiseNeighbours = (int**)calloc(dataList->localCnt, sizeof(int*));
    // assert(noiseNeighbours != NULL);
    
	Neighbours neigh = NULL,neigh1 = NULL;
	
	clusteringstart = MPI_Wtime();
	Data data;
	for(i = 0; i < dataList->localCnt; i++)
	{
		noiseNeighbours[i] = NULL;
		pid = i;
		data = dataList->dataClstElem + i;

		if(data->isProcessed == TRUE || data->core_tag == TRUE)
        {
            continue;   
        }

		neigh = findNeighbours3(dataList, i, EPS, NULL);
		data->isProcessed = TRUE;

		if(neigh->inner_neighbours >= MINPOINTS)
		{
			//Merging has already happened in the findNeighbours3 method. No need to duplicate merging
			continue;
		}


		if(VECTOR_TOTAL(neigh->neighbours_local_inner) + VECTOR_TOTAL(neigh->neighbours_remote_inner) + VECTOR_TOTAL(neigh->neighbours_local_outer) + VECTOR_TOTAL(neigh->neighbours_remote_outer) >= MINPOINTS)
		{
			// Current point is a core point
			// pid is a core point
			root = pid;

			data->core_tag = TRUE;
			data->ClusterID = 1;
			
			//NEEDS MODIFICATION
			Data dataroot1;
			Data dataroot2;
			for (j = 0; j < VECTOR_TOTAL(neigh->neighbours_local_inner); j++)
    		{

				Data datalocal = dataList->dataClstElem + neigh->neighbours_local_inner->intItems[j];
				npid = datalocal->id;

				root1 = npid;
				root2 = root;

				if(datalocal->core_tag == TRUE || datalocal->ClusterID == 0)
				{
					datalocal->ClusterID = 1;

					 dataroot1 = dataList->dataClstElem + root1;
					 dataroot2 = dataList->dataClstElem + root2;

					unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
					// REMS algorithm to (union) merge the trees
					
				}
			}


			//Data dataroot1;
			//Data dataroot2;
			for (j = 0; j < VECTOR_TOTAL(neigh->neighbours_local_outer); j++)
    		{

				Data datalocal = dataList->dataClstElem + neigh->neighbours_local_outer->intItems[j];
				npid = datalocal->id;

				root1 = npid;
				root2 = root;

				if(datalocal->core_tag == TRUE || datalocal->ClusterID == 0)
				{
					datalocal->ClusterID = 1;

					 dataroot1 = dataList->dataClstElem + root1;
					 dataroot2 = dataList->dataClstElem + root2;

					unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
					// REMS algorithm to (union) merge the trees
					
				}
			}
		}
		else
		{
			data->core_tag = FALSE;
			if(data->ClusterID == 1)
			{
				;
			}
			else
			{
				data->ClusterID = 0;
				Data neighbour;
				Data dataroot1;
				Data dataroot2;
	            for(j=0;j<VECTOR_TOTAL(neigh->neighbours_local_inner);j++)
	            {
	                neighbour = dataList->dataClstElem + neigh->neighbours_local_inner->intItems[j];
	                if(neighbour->core_tag == TRUE) //Border point scenario.
	                {
	                	root1 = data->id;
						root2 = neighbour->id;

						data->ClusterID = 1;

						Data dataroot1 = dataList->dataClstElem + root1;
						Data dataroot2 = dataList->dataClstElem + root2;
						unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
						// REMS algorithm to (union) merge the trees
	                    data->ClusterID = 1;
	                    neighbour->ClusterID = 1;
	                    break;
	                }
	            }

	            //Data dataroot1;
	            //Data dataroot2;
	            for(j=0;j<VECTOR_TOTAL(neigh->neighbours_local_outer);j++)
	            {
	                neighbour = dataList->dataClstElem + neigh->neighbours_local_outer->intItems[j];
	                if(neighbour->core_tag == TRUE) //Border point scenario.
	                {
	                	root1 = data->id;
						root2 = neighbour->id;

						data->ClusterID = 1;

						dataroot1 = dataList->dataClstElem + root1;
						dataroot2 = dataList->dataClstElem + root2;
						unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
						// REMS algorithm to (union) merge the trees
	                    data->ClusterID = 1;
	                    neighbour->ClusterID = 1;
	                    break;
	                }
	            }

	            if(data->ClusterID == 0)
	            {
	                noiseNeighbours[data->id] = (int*)malloc(sizeof(int)*MINPOINTS);

	                int k = 0;
	            	for(k=0;k<MINPOINTS;k++) noiseNeighbours[data->id][k] = -1;
	            	k=0;

	                for(j=0; j<VECTOR_TOTAL(neigh->neighbours_local_inner); j++)
	                {
                       	noiseNeighbours[data->id][k++] = neigh->neighbours_local_inner->intItems[j];
	                }

	                for(j=0; j<VECTOR_TOTAL(neigh->neighbours_local_outer); j++)
	                {
                       	noiseNeighbours[data->id][k++] = neigh->neighbours_local_outer->intItems[j];
	                }

	                for(j=0; j<VECTOR_TOTAL(neigh->neighbours_remote_inner); j++)
	                {
                       	noiseNeighbours[data->id][k++] = neigh->neighbours_remote_inner->intItems[j];
	                }

	                for(j=0; j<VECTOR_TOTAL(neigh->neighbours_remote_outer); j++)
	                {
                       	noiseNeighbours[data->id][k++] = neigh->neighbours_remote_outer->intItems[j];
	                }
	            }
			}
		}

		VECTOR_FREE(neigh->neighbours_local_outer);
		free(neigh->neighbours_local_outer);

		VECTOR_FREE(neigh->neighbours_remote_outer);
		free(neigh->neighbours_remote_outer);

		VECTOR_FREE(neigh->neighbours_local_inner);
		free(neigh->neighbours_local_inner);

		VECTOR_FREE(neigh->neighbours_remote_inner);
		free(neigh->neighbours_remote_inner);

		free(neigh);
		neigh = NULL;
	}

	clusteringend = MPI_Wtime();
	postprocessingstart = MPI_Wtime();
	postprocessingstart = MPI_Wtime();


	Data dataroot1;
	Data dataroot2;
	for(i=0; i<dataList->localCnt; i++)
	{
	    Data potentialNoise = dataList->dataClstElem + i;
	    
	    if(potentialNoise->ClusterID == 0 && noiseNeighbours[i] != NULL)
	    {
	    	int v;
		    for(v=0; v<MINPOINTS; v++)
		    {
		        if(noiseNeighbours[i][v] >= 0)
		        {
		            Data data = dataList->dataClstElem + noiseNeighbours[i][v];
		            if(data->core_tag == TRUE)
		            {
		            	root1 = data->id;
						root2 = potentialNoise->id;

						dataroot1 = dataList->dataClstElem + root1;
						dataroot2 = dataList->dataClstElem + root2;
						unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
						
						// REMS algorithm to (union) merge the trees
	                    data->ClusterID = 1;
		                potentialNoise->ClusterID = 1;
		                break;
		            }
		        }
		    }
		    free(noiseNeighbours[i]);
		}
	}

	free(noiseNeighbours);
	//Data data;
	Neighbours n;
	RHdrNd hdrNdTree;
	Data data2;
	Group g;
	for(i=0; i<VECTOR_TOTAL(unprocessedCore); i++)
	{
		data = dataList->dataClstElem + unprocessedCore->intItems[i];
		g = groupList->groupItems[data->group_id];
		Region region = createCellRegOfPoint(data, EPS);

		vectorc* neighbours_local_outer = (vectorc*)malloc(sizeof(struct vectorc));
		VECTOR_INIT(neighbours_local_outer, INTEGER);

		vectorc* neighbours_remote_outer = (vectorc*)malloc(sizeof(struct vectorc));
		VECTOR_INIT(neighbours_remote_outer, INTEGER);

		n = (Neighbours)malloc(sizeof(struct neighbours));

		n->neighbours_local_outer = neighbours_local_outer;
		n->neighbours_remote_outer = neighbours_remote_outer;

		hdrNdTree = g->bcell->auxCellRTree;
		for(k=0; k<VECTOR_TOTAL(g->corepoints); k++)
		{
			data2 = dataList->dataClstElem + g->corepoints->intItems[k];
			if(data2->haloPoint == FALSE)
			{
			    if(RisContains(region, data2->iData))
			    {
			    	if(distance(data->iData, data2->iData) <= EPS)
			    	{
				    	addHelper[0] = data2->id;
						VECTOR_ADD(n->neighbours_local_outer, addHelper);
			    	}
			    }
			}
		}
		Group rg;
		DataPoint d;
		Data data2;
		//RHdrNd hdrNdTree;
		for(j=0; j<VECTOR_TOTAL(g->reachable_groups); j++)
		{
			rg = groupList->groupItems[g->reachable_groups->intItems[j]];
			d = (dataList->dataClstElem + rg->master_id)->iData;
			Region potentialRegion = createCellRegOfDataPoint(d, EPS);

			if(GisOverLap(region, potentialRegion))
			{
				hdrNdTree = rg->bcell->auxCellRTree;
				for(k=0; k<VECTOR_TOTAL(rg->corepoints); k++)
				{
				    data2 = dataList->dataClstElem + rg->corepoints->intItems[k];
				    if(data2->haloPoint == FALSE)
				    {
				        if(RisContains(region, data2->iData))
			            {
			                if(distance(data->iData, data2->iData) <= EPS)
					    	{
						    	addHelper[0] = data2->id;
								VECTOR_ADD(n->neighbours_local_outer, addHelper);
					    	}
			            }
				    }
				}
			}
			free(potentialRegion->iBottomLeft);
			free(potentialRegion->iTopRight);
			free(potentialRegion);
		}
		Data temp;
		Data dataroot1;
		Data dataroot2;
		for(j=0;j<VECTOR_TOTAL(n->neighbours_local_outer);j++)
		{
			temp = dataList->dataClstElem + n->neighbours_local_outer->intItems[j];

			int root1 = temp->id;
			int root2 = data->id;
			int root;
			dataroot1 = dataList->dataClstElem + root1;
			dataroot2 = dataList->dataClstElem + root2;
			unionFindMerge(dataList, root1, root2, dataroot1, dataroot2);
	     	data->ClusterID = 1;
		}

		VECTOR_FREE(n->neighbours_remote_outer);
		VECTOR_FREE(n->neighbours_local_outer);
		free(n->neighbours_local_outer);
		free(n->neighbours_remote_outer);
		free(n);

		free(region->iBottomLeft);
		free(region->iTopRight);
		free(region);
	}
	 postprocessingend =  MPI_Wtime();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x7aea(%rip), %r14      # 0x16fa8
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x33e0
leaq -0x64(%rbp), %rsi
movq %r14, %rdi
movq %rbx, %r14
callq 0x32e0
movslq 0x4(%rbx), %rdi
movl $0x8, %esi
callq 0x31b0
leaq 0x7eba(%rip), %rbx      # 0x173a8
movq %rax, (%rbx)
callq 0x3360
leaq 0x7f5b(%rip), %rax      # 0x17458
movsd %xmm0, (%rax)
cmpl $0x0, 0x4(%r14)
movq %r14, -0x30(%rbp)
jle 0xf9c5
xorl %r13d, %r13d
movq (%rbx), %rax
movq $0x0, (%rax,%r13,8)
movq 0x8(%r14), %r12
movq %r13, %r14
shlq $0x6, %r14
cmpl $0x1, 0x2c(%r12,%r14)
je 0xf9b1
addq %r14, %r12
cmpl $0x1, 0x28(%r12)
je 0xf9b1
leaq 0x7e0d(%rip), %rax      # 0x17358
movsd (%rax), %xmm0
movq -0x30(%rbp), %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x7ff3
movq %rax, %r15
movl $0x1, 0x2c(%r12)
movl 0x28(%rax), %eax
leaq 0x7ded(%rip), %rcx      # 0x17360
cmpl (%rcx), %eax
jge 0xf9b1
movq 0x10(%r15), %rdi
callq 0x3a4d
movl %eax, -0x38(%rbp)
movq 0x8(%r15), %rdi
callq 0x3a4d
movl %eax, %ebx
addl -0x38(%rbp), %ebx
movq 0x20(%r15), %rdi
callq 0x3a4d
movl %eax, -0x38(%rbp)
movq 0x18(%r15), %rdi
callq 0x3a4d
addl -0x38(%rbp), %eax
addl %ebx, %eax
leaq 0x7daa(%rip), %rcx      # 0x17360
cmpl (%rcx), %eax
jge 0xf627
movl $0x0, 0x28(%r12)
cmpl $0x1, 0x30(%r12)
je 0xf95a
movl $0x0, 0x30(%r12)
movq 0x10(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf75e
xorl %r14d, %r14d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%r15), %rcx
movq 0x8(%rcx), %rcx
movslq (%rcx,%r14,4), %rbx
shlq $0x6, %rbx
cmpl $0x1, 0x28(%rax,%rbx)
je 0xf721
incq %r14
movq 0x10(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r14
jl 0xf5ec
jmp 0xf75e
movl $0x1, %eax
movl %eax, 0x28(%r12)
movl %eax, 0x30(%r12)
movq 0x10(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf6a7
xorl %ebx, %ebx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r8
movq 0x10(%r15), %rax
movq 0x8(%rax), %rax
movslq (%rax,%rbx,4), %rcx
shlq $0x6, %rcx
leaq (%r8,%rcx), %rax
movslq 0x1c(%r8,%rcx), %rsi
cmpl $0x1, 0x28(%r8,%rcx)
je 0xf674
cmpl $0x0, 0x30(%rax)
jne 0xf694
movl $0x1, 0x30(%rax)
movq %rsi, %rcx
shlq $0x6, %rcx
addq %r8, %rcx
addq %r14, %r8
movq -0x30(%rbp), %rdi
movl %r13d, %edx
callq 0x3d04
incq %rbx
movq 0x10(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xf645
movq 0x20(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf95a
xorl %ebx, %ebx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r8
movq 0x20(%r15), %rax
movq 0x8(%rax), %rax
movslq (%rax,%rbx,4), %rcx
shlq $0x6, %rcx
leaq (%r8,%rcx), %rax
movslq 0x1c(%r8,%rcx), %rsi
cmpl $0x1, 0x28(%r8,%rcx)
je 0xf6e9
cmpl $0x0, 0x30(%rax)
jne 0xf709
movl $0x1, 0x30(%rax)
movq %rsi, %rcx
shlq $0x6, %rcx
addq %r8, %rcx
addq %r14, %r8
movq -0x30(%rbp), %rdi
movl %r13d, %edx
callq 0x3d04
incq %rbx
movq 0x20(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xf6ba
jmp 0xf95a
addq %rax, %rbx
movslq 0x1c(%r12), %rsi
movslq 0x1c(%rbx), %rdx
movl $0x1, %r14d
movl %r14d, 0x30(%r12)
movq %rsi, %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movq %rdx, %r8
shlq $0x6, %r8
addq %rax, %r8
movq -0x30(%rbp), %rdi
callq 0x3d04
movl %r14d, 0x30(%r12)
movl %r14d, 0x30(%rbx)
movq 0x20(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf7df
xorl %r14d, %r14d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%r15), %rcx
movq 0x8(%rcx), %rcx
movslq (%rcx,%r14,4), %rbx
shlq $0x6, %rbx
cmpl $0x1, 0x28(%rax,%rbx)
je 0xf7a2
incq %r14
movq 0x20(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r14
jl 0xf76e
jmp 0xf7df
addq %rax, %rbx
movslq 0x1c(%r12), %rsi
movslq 0x1c(%rbx), %rdx
movl $0x1, %r14d
movl %r14d, 0x30(%r12)
movq %rsi, %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movq %rdx, %r8
shlq $0x6, %r8
addq %rax, %r8
movq -0x30(%rbp), %rdi
callq 0x3d04
movl %r14d, 0x30(%r12)
movl %r14d, 0x30(%rbx)
cmpl $0x0, 0x30(%r12)
jne 0xf95a
leaq 0x7b6e(%rip), %r14      # 0x17360
movslq (%r14), %rdi
shlq $0x2, %rdi
callq 0x33a0
leaq 0x7ba3(%rip), %rbx      # 0x173a8
movq (%rbx), %rcx
movslq 0x1c(%r12), %rdx
movq %rax, (%rcx,%rdx,8)
cmpl $0x0, (%r14)
jle 0xf837
movq (%rbx), %rax
xorl %ecx, %ecx
movslq 0x1c(%r12), %rdx
movq (%rax,%rdx,8), %rdx
movl $0xffffffff, (%rdx,%rcx,4) # imm = 0xFFFFFFFF
incq %rcx
movslq (%r14), %rdx
cmpq %rdx, %rcx
jl 0xf81c
movq 0x10(%r15), %rdi
callq 0x3a4d
xorl %r14d, %r14d
testl %eax, %eax
jle 0xf876
movq 0x10(%r15), %rax
movq 0x8(%rax), %rax
movl (%rax,%r14,4), %eax
movq (%rbx), %rcx
movslq 0x1c(%r12), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
movq 0x10(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r14
jl 0xf847
movq 0x20(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf8c0
movl %r14d, %r14d
xorl %ebx, %ebx
movq 0x20(%r15), %rax
movq 0x8(%rax), %rax
movl (%rax,%rbx,4), %eax
leaq 0x7b0e(%rip), %rcx      # 0x173a8
movq (%rcx), %rcx
movslq 0x1c(%r12), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
incq %rbx
movq 0x20(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xf888
movq 0x8(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf90a
movl %r14d, %r14d
xorl %ebx, %ebx
movq 0x8(%r15), %rax
movq 0x8(%rax), %rax
movl (%rax,%rbx,4), %eax
leaq 0x7ac4(%rip), %rcx      # 0x173a8
movq (%rcx), %rcx
movslq 0x1c(%r12), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
incq %rbx
movq 0x8(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xf8d2
movq 0x18(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xf95a
movl %r14d, %ebx
shlq $0x2, %rbx
xorl %r14d, %r14d
movq 0x18(%r15), %rax
movq 0x8(%rax), %rax
movl (%rax,%r14,4), %eax
leaq 0x7a74(%rip), %rcx      # 0x173a8
movq (%rcx), %rcx
movslq 0x1c(%r12), %rdx
movq (%rcx,%rdx,8), %rcx
addq %rbx, %rcx
movl %eax, (%rcx,%r14,4)
incq %r14
movq 0x18(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r14
jl 0xf921
movq 0x20(%r15), %rdi
callq 0x3ca0
movq 0x20(%r15), %rdi
callq 0x3310
movq 0x18(%r15), %rdi
callq 0x3ca0
movq 0x18(%r15), %rdi
callq 0x3310
movq 0x10(%r15), %rdi
callq 0x3ca0
movq 0x10(%r15), %rdi
callq 0x3310
movq 0x8(%r15), %rdi
callq 0x3ca0
movq 0x8(%r15), %rdi
callq 0x3310
movq %r15, %rdi
callq 0x3310
leaq 0x79f7(%rip), %rbx      # 0x173a8
incq %r13
movq -0x30(%rbp), %r14
movslq 0x4(%r14), %rax
cmpq %rax, %r13
jl 0xf513
callq 0x3360
leaq 0x7a8f(%rip), %rax      # 0x17460
movsd %xmm0, (%rax)
callq 0x3360
leaq 0x7a8f(%rip), %rbx      # 0x17470
movsd %xmm0, (%rbx)
callq 0x3360
movsd %xmm0, (%rbx)
cmpl $0x0, 0x4(%r14)
movq %r14, %r12
jle 0xfad4
xorl %ebx, %ebx
leaq 0x795b(%rip), %r14      # 0x17360
movl $0x1, %r15d
movq 0x8(%r12), %r12
movq %rbx, %rcx
shlq $0x6, %rcx
cmpl $0x0, 0x30(%r12,%rcx)
jne 0xfabf
leaq 0x797e(%rip), %rax      # 0x173a8
movq (%rax), %rax
cmpq $0x0, (%rax,%rbx,8)
je 0xfabf
movslq (%r14), %rax
testq %rax, %rax
jle 0xfaac
addq %rcx, %r12
leaq 0x795e(%rip), %rcx      # 0x173a8
movq (%rcx), %rcx
movq (%rcx,%rbx,8), %rcx
xorl %edx, %edx
movslq (%rcx,%rdx,4), %r13
testq %r13, %r13
js 0xfa70
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rdi
shlq $0x6, %r13
cmpl $0x1, 0x28(%rdi,%r13)
je 0xfa7a
incq %rdx
cmpq %rdx, %rax
jne 0xfa53
jmp 0xfaac
addq %rdi, %r13
movslq 0x1c(%r13), %rsi
movslq 0x1c(%r12), %rdx
movq %rsi, %rcx
shlq $0x6, %rcx
addq %rdi, %rcx
movq %rdx, %r8
shlq $0x6, %r8
addq %rdi, %r8
movq -0x30(%rbp), %rdi
callq 0x3d04
movl %r15d, 0x30(%r13)
movl %r15d, 0x30(%r12)
leaq 0x78f5(%rip), %rax      # 0x173a8
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
callq 0x3310
incq %rbx
movq -0x30(%rbp), %r12
movslq 0x4(%r12), %rax
cmpq %rax, %rbx
jl 0xfa0b
leaq 0x78cd(%rip), %rax      # 0x173a8
movq (%rax), %rdi
callq 0x3310
leaq 0x78f6(%rip), %rbx      # 0x173e0
movq (%rbx), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xfe18
movq %r12, %r14
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rbx), %rcx
movq 0x8(%rcx), %rcx
movq %r15, -0x60(%rbp)
movslq (%rcx,%r15,4), %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %r12
leaq 0x787e(%rip), %rdx      # 0x173a0
movq (%rdx), %rdx
movq (%rdx), %rdx
movslq 0x20(%rax,%rcx), %rax
movq (%rdx,%rax,8), %r15
leaq 0x7820(%rip), %rax      # 0x17358
movsd (%rax), %xmm0
movq %r12, %rdi
callq 0x86c1
movq %rax, -0x38(%rbp)
movl $0x30, %edi
callq 0x33a0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
callq 0x39bc
movl $0x30, %edi
callq 0x33a0
movq %rax, -0x58(%rbp)
movq %rax, %rdi
xorl %esi, %esi
callq 0x39bc
movq 0x58(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
movq %r15, -0x48(%rbp)
jle 0xfc10
xorl %ebx, %ebx
movq %r15, %rax
movq 0x8(%r14), %r15
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movslq (%rax,%rbx,4), %rax
shlq $0x6, %rax
cmpl $0x0, 0x8(%r15,%rax)
je 0xfbc6
incq %rbx
movq -0x48(%rbp), %r15
movq 0x58(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xfb8e
jmp 0xfc10
addq %rax, %r15
movq (%r15), %rsi
movq -0x38(%rbp), %rdi
callq 0x65ae
testl %eax, %eax
je 0xfbad
movq (%r12), %rdi
movq (%r15), %rsi
callq 0x7b64
leaq 0x776c(%rip), %rax      # 0x17358
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xfbad
movl 0x1c(%r15), %eax
leaq 0x778f(%rip), %rcx      # 0x17390
movq (%rcx), %rsi
movl %eax, (%rsi)
movq %r13, %rdi
callq 0x3c19
jmp 0xfbad
movq %r13, -0x40(%rbp)
movq %r12, -0x50(%rbp)
movq 0x50(%r15), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xfd4f
xorl %ebx, %ebx
leaq 0x776e(%rip), %rax      # 0x173a0
movq (%rax), %rax
movq (%rax), %rax
movq 0x50(%r15), %rcx
movq 0x8(%rcx), %rcx
movslq (%rcx,%rbx,4), %rcx
movq (%rax,%rcx,8), %r12
movq 0x8(%r14), %rax
movslq 0x30(%r12), %rcx
shlq $0x6, %rcx
movq (%rax,%rcx), %rdi
leaq 0x76f8(%rip), %rax      # 0x17358
movsd (%rax), %xmm0
callq 0x875d
movq %rax, %r13
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x68ac
testl %eax, %eax
je 0xfd1a
movq 0x58(%r12), %rdi
callq 0x3a4d
testl %eax, %eax
jle 0xfd1a
xorl %r15d, %r15d
movq 0x8(%r14), %r14
movq 0x58(%r12), %rax
movq 0x8(%rax), %rax
movslq (%rax,%r15,4), %rax
shlq $0x6, %rax
cmpl $0x0, 0x8(%r14,%rax)
je 0xfccc
incq %r15
movq 0x58(%r12), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r15
movq -0x30(%rbp), %r14
jl 0xfc95
jmp 0xfd1a
addq %rax, %r14
movq (%r14), %rsi
movq -0x38(%rbp), %rdi
callq 0x65ae
testl %eax, %eax
je 0xfcb2
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq (%r14), %rsi
callq 0x7b64
leaq 0x7663(%rip), %rax      # 0x17358
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jb 0xfcb2
movl 0x1c(%r14), %eax
leaq 0x7686(%rip), %rcx      # 0x17390
movq (%rcx), %rsi
movl %eax, (%rsi)
movq -0x40(%rbp), %rdi
callq 0x3c19
jmp 0xfcb2
movq (%r13), %rdi
callq 0x3310
movq 0x8(%r13), %rdi
callq 0x3310
movq %r13, %rdi
callq 0x3310
incq %rbx
movq -0x48(%rbp), %r15
movq 0x50(%r15), %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xfc2b
movq -0x40(%rbp), %r13
movq %r13, %rdi
callq 0x3a4d
testl %eax, %eax
movq -0x60(%rbp), %r15
movq -0x50(%rbp), %r12
jle 0xfdba
xorl %ebx, %ebx
movq 0x8(%r14), %rax
movq 0x8(%r13), %rcx
movslq (%rcx,%rbx,4), %rcx
shlq $0x6, %rcx
movslq 0x1c(%rax,%rcx), %rsi
movslq 0x1c(%r12), %rdx
movq %rsi, %rcx
shlq $0x6, %rcx
addq %rax, %rcx
movq %rdx, %r8
shlq $0x6, %r8
addq %rax, %r8
movq %r14, %rdi
callq 0x3d04
movl $0x1, 0x30(%r12)
incq %rbx
movq %r13, %rdi
callq 0x3a4d
cltq
cmpq %rax, %rbx
jl 0xfd69
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x3ca0
movq %r13, %rdi
callq 0x3ca0
movq %r13, %rdi
callq 0x3310
movq %rbx, %rdi
callq 0x3310
movq -0x38(%rbp), %rbx
movq (%rbx), %rdi
callq 0x3310
movq 0x8(%rbx), %rdi
callq 0x3310
movq %rbx, %rdi
callq 0x3310
incq %r15
leaq 0x75db(%rip), %rbx      # 0x173e0
movq (%rbx), %rdi
callq 0x3a4d
cltq
cmpq %rax, %r15
jl 0xfb00
callq 0x3360
leaq 0x7644(%rip), %rax      # 0x17468
movsd %xmm0, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq