// File: /workspace/github_cpp_makefile_star2_O3/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Clustering/../../algorithms/Clustering/clustering.h
// Function: Clustering<double>::update()
void update(void) {
			// we want to keep a map containing the true values of the vectors, in order to find the median
			std::vector<std::vector<std::vector<T>>> centroids_map(k);
			// insert the vectors in the map
			for (int i = 0; i < n_points; i++) {
				int assigned = assigned_centroid.at(i);
				centroids_map.at(assigned).push_back(feature_vectors.at(i));
			}
			// for each centroid 
			for (int i = 0; i < k; i++) {
				// for each one of its dimenions
				for (int j = 0; j < (int)space_dim; j++) {
					vector<T> current_component;
					// parse through all of its assigned vectors in order to find the median
					for (int n = 0; n < (int)centroids_map.at(i).size(); n++) {
						current_component.push_back(centroids_map.at(i).at(n).at(j));
					}
					centroids.at(i).at(j) = our_math::median(current_component);
				}
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
movslq (%rdi), %rsi
leaq 0x28(%rsp), %rdi
movq %rsp, %rdx
callq 0xa242
cmpl $0x0, 0x4(%r13)
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
jle 0x91ed
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x60(%r13), %rax
movq 0x68(%r13), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r14, %rdx
jbe 0x9419
movslq (%rax,%r14,4), %rax
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %rax, %rdx
jbe 0x9416
movq 0x48(%r13), %rsi
movq 0x50(%r13), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r14, %rdx
jbe 0x9419
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
addq %rbx, %rsi
callq 0x362a
incq %r14
movslq 0x4(%r13), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x9177
movl (%r13), %ecx
testl %ecx, %ecx
jle 0x93cb
movl 0x8(%r13), %eax
xorl %r15d, %r15d
movq %r13, 0x20(%rsp)
testl %eax, %eax
jle 0x93bc
leaq (%r15,%r15,2), %rbx
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x93ec
movl $0x8, %r12d
xorl %r13d, %r13d
movq (%rax,%rbx,8), %rsi
movq 0x8(%rax,%rbx,8), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
movslq %edx, %rdi
cmpq %rdi, %r13
jge 0x92e4
cmpq %r13, %rdx
jbe 0x93e9
movq -0x8(%rsi,%r12), %rdi
movq (%rsi,%r12), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x93e4
leaq (%rdi,%r14,8), %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x92af
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x92c1
movq %rsp, %rdi
callq 0x36a6
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
addq $0x18, %r12
cmpq %r15, %rdx
ja 0x924e
jmp 0x93ec
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x393a
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, %rcx
subq %rdi, %rcx
shrq $0x4, %rcx
movq %rax, %rdx
movslq %ecx, %r12
subq %rdi, %rdx
je 0x9346
leaq (%rdi,%r12,8), %rsi
cmpq %rax, %rsi
movq 0x20(%rsp), %r13
je 0x934b
sarq $0x3, %rdx
bsrq %rdx, %rcx
xorl $0x3f, %ecx
addl %ecx, %ecx
xorq $0x7e, %rcx
movq %rax, %rdx
callq 0xa325
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
subq %rdi, %rdx
jmp 0x934b
movq 0x20(%rsp), %r13
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x9405
movq 0x30(%r13), %rax
movq 0x38(%r13), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x9402
movq (%rax,%rbx,8), %rcx
movq 0x8(%rax,%rbx,8), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x93fd
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%rcx,%r14,8)
callq 0x2260
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x93a8
callq 0x2260
incq %r14
movslq 0x8(%r13), %rax
cmpq %rax, %r14
jl 0x9214
movl (%r13), %ecx
incq %r15
movslq %ecx, %rdx
cmpq %rdx, %r15
jl 0x9205
leaq 0x28(%rsp), %rdi
callq 0xa2c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
jmp 0x93ec
movq %r13, %r15
leaq 0x1f32(%rip), %rdi      # 0xb325
movq %r15, %rsi
xorl %eax, %eax
callq 0x2370
movq %r14, %r12
jmp 0x9405
movq %r15, %r12
leaq 0x1f19(%rip), %rdi      # 0xb325
movq %r12, %rsi
xorl %eax, %eax
callq 0x2370
movq %rax, %r14
leaq 0x1f05(%rip), %rdi      # 0xb325
movq %r14, %rsi
xorl %eax, %eax
callq 0x2370
jmp 0x942c
movq %rax, %rbx
jmp 0x945c
jmp 0x9435
jmp 0x944b
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x944e
callq 0x2260
jmp 0x944e
jmp 0x944b
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x945c
callq 0x2260
leaq 0x28(%rsp), %rdi
callq 0xa2c0
movq %rbx, %rdi
callq 0x2450