// File: /workspace/github_cpp_makefile_star2_O2/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 0x64f1(%rip), %r13      # 0x13fb0
leaq -0x74(%rbp), %rsi
movq %r13, %rdi
callq 0x2250
leaq -0x78(%rbp), %rsi
movq %r13, %rdi
callq 0x2370
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
callq 0x22d0
movsd %xmm0, 0x6908(%rip)     # 0x143f8
leaq -0x50(%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x769b
movl %eax, -0x2c(%rbp)
callq 0x22d0
movsd %xmm0, 0x68ee(%rip)     # 0x14400
movq 0x6497(%rip), %rdi      # 0x13fb0
callq 0x2190
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
pushq $0x30
popq %rdi
callq 0x2320
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x27ac
pushq $0x30
popq %rdi
callq 0x2320
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x27ac
leaq -0x30(%rbp), %r9
andl $0x0, (%r9)
leaq -0x50(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x8a05
movq 0x6436(%rip), %rdi      # 0x13fb0
callq 0x2190
callq 0x22d0
movsd %xmm0, 0x68cc(%rip)     # 0x14458
movl -0x30(%rbp), %edi
addl -0x2c(%rbp), %edi
callq 0x2aec
movq %rax, (%rbx)
leaq -0x50(%rbp), %rsi
movq %rax, %rdi
callq 0x2cf8
movq (%rbx), %rdi
leaq -0x70(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2b7f
callq 0x22d0
movsd %xmm0, 0x689b(%rip)     # 0x14460
movq %r14, %rdi
callq 0x2a78
movq %r14, %rdi
callq 0x2280
movq %r15, %rdi
callq 0x2a78
movq %r15, %rdi
callq 0x2280
movl -0x30(%rbp), %ebx
addl -0x2c(%rbp), %ebx
leaq -0x70(%rbp), %rdi
callq 0x2ea4
leaq -0x50(%rbp), %rdi
callq 0x2ea4
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdc1d
jmp 0xdc1d
jmp 0xdc18
jmp 0xdc1d
jmp 0xdc1d
movq %rax, %rbx
jmp 0xdc29
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2ea4
leaq -0x50(%rbp), %rdi
callq 0x2ea4
movq %rbx, %rdi
callq 0x2460