// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/main.cpp
// Function: populateMulti(dataHdr**, char*, int*, int*)
int populateMulti(DataHdr* dataList, char* argv, int* totalSize, int* dims)
{

	int myrank, numprocs;
 	MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
    MPI_Comm_rank(MPI_COMM_WORLD, &myrank);	vector< vector<double> > objects;
    
    filereadstart = MPI_Wtime();
	int localSize = fileReadMulti(argv, totalSize, dims, objects);
	filereadend = MPI_Wtime();

	MPI_Barrier(MPI_COMM_WORLD);
	vector< vector<double> > remote_objects;

	vectorc* remote_PrIDs;
	remote_PrIDs = (vectorc*)malloc(sizeof(struct vectorc));
	// assert(remote_PrIDs != NULL);
	VECTOR_INIT(remote_PrIDs, INTEGER);

	vectorc* remote_Indices;
	remote_Indices = (vectorc*)malloc(sizeof(struct vectorc));
	// assert(remote_Indices != NULL);
	VECTOR_INIT(remote_Indices, INTEGER);

	int remote_number = 0;

	int i;

	get_extra_points(objects, &localSize, remote_objects, remote_PrIDs, remote_Indices, &remote_number);

	MPI_Barrier(MPI_COMM_WORLD);

	int rs_size = remote_objects.size();

	dataliststart = MPI_Wtime();
	*dataList = initDataHdr(localSize + remote_number);
	populateDataListLocal(*dataList, objects);
	int old = (*dataList)->uiCnt;
	populateDataListRemote(*dataList, remote_objects, remote_PrIDs, remote_Indices);
	datalistend = MPI_Wtime();

    VECTOR_FREE(remote_PrIDs);
    free(remote_PrIDs);

    VECTOR_FREE(remote_Indices);
    free(remote_Indices);

	return localSize + remote_number;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x6a27(%rip), %r13      # 0x16fa8
leaq -0x74(%rbp), %rsi
movq %r13, %rdi
callq 0x32e0
leaq -0x78(%rbp), %rsi
movq %r13, %rdi
callq 0x33e0
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
callq 0x3360
movsd %xmm0, 0x6e73(%rip)     # 0x17428
leaq -0x50(%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x92ee
movl %eax, -0x2c(%rbp)
callq 0x3360
movsd %xmm0, 0x6e59(%rip)     # 0x17430
movq 0x69ca(%rip), %rdi      # 0x16fa8
callq 0x31e0
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x30, %edi
callq 0x33a0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x39bc
movl $0x30, %edi
callq 0x33a0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x39bc
leaq -0x30(%rbp), %r9
movl $0x0, (%r9)
leaq -0x50(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0xa96c
movq 0x695f(%rip), %rdi      # 0x16fa8
callq 0x31e0
callq 0x3360
movsd %xmm0, 0x6e2d(%rip)     # 0x17488
movl -0x30(%rbp), %edi
addl -0x2c(%rbp), %edi
callq 0x3d63
movq %rax, (%rbx)
leaq -0x50(%rbp), %rsi
movq %rax, %rdi
callq 0x3fe6
movq (%rbx), %rdi
leaq -0x70(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x3e09
callq 0x3360
movsd %xmm0, 0x6dfc(%rip)     # 0x17490
movq %r14, %rdi
callq 0x3ca0
movq %r14, %rdi
callq 0x3310
movq %r15, %rdi
callq 0x3ca0
movq %r15, %rdi
callq 0x3310
movl -0x30(%rbp), %ebx
addl -0x2c(%rbp), %ebx
leaq -0x70(%rbp), %rdi
callq 0x41f2
leaq -0x50(%rbp), %rdi
callq 0x41f2
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x106ec
jmp 0x106ec
jmp 0x106e7
jmp 0x106ec
jmp 0x106ec
movq %rax, %rbx
jmp 0x106f8
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x41f2
leaq -0x50(%rbp), %rdi
callq 0x41f2
movq %rbx, %rdi
callq 0x34c0