// File: nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../algorithms/Search/Hypercube/headers/../../LSH/headers/hashing.h
// Function: unsigned int lsh::HashFunction::hash<double>(std::vector<double, std::allocator<double>>)
uint32_t hash(std::vector<T> x) {
				uint32_t h = 0;
				// vector a computed by the lsh method
				std::vector<int> a(dim, 0);
				// compute the values of the vector a
				for (int i = 0; i < dim; i++) {
					a[i] = floor((x.at(i) - s.at(i)) / (w * 1.0));
				}
				// compute the hash result of the vector x
				for (int i = 0; i < dim; i++) {
					// each time apply a modulo operation
					h += our_math::modulo(our_math::modulo(a.at(dim - i - 1), M) * const_m_values.at(i), M);
				}
				// return the position in the hash
				return h % M;
			}

// Assembly:
subq $0xb8, %rsp
movq %rsi, 0x48(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0xa4(%rsp)
movslq (%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x84(%rsp)
leaq 0x83(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xa630
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
leaq 0x88(%rsp), %rdi
leaq 0x84(%rsp), %rdx
callq 0x108a0
jmp 0x1044a
leaq 0x83(%rsp), %rdi
callq 0xa6c0
movl $0x0, 0x70(%rsp)
movq 0x50(%rsp), %rcx
movl 0x70(%rsp), %eax
cmpl (%rcx), %eax
jge 0x10549
movq 0x48(%rsp), %rdi
movslq 0x70(%rsp), %rsi
callq 0xa730
movq %rax, 0x40(%rsp)
jmp 0x10486
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
addq $0x10, %rdi
movslq 0x70(%rsp), %rsi
callq 0xa730
movq %rax, 0x38(%rsp)
jmp 0x104af
movq 0x50(%rsp), %rax
movq 0x38(%rsp), %rcx
movsd 0x30(%rsp), %xmm0
subsd (%rcx), %xmm0
movsd 0x1d0d(%rip), %xmm1     # 0x121d8
mulsd 0x8(%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x2360
cvttsd2si %xmm0, %eax
movl %eax, 0x2c(%rsp)
movslq 0x70(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xa7e0
movl 0x2c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x1045f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x83(%rsp), %rdi
callq 0xa6c0
jmp 0x1062d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xa800
jmp 0x1062d
movl $0x0, 0x6c(%rsp)
movq 0x50(%rsp), %rcx
movl 0x6c(%rsp), %eax
cmpl (%rcx), %eax
jge 0x105ff
movq 0x50(%rsp), %rax
movl (%rax), %ecx
movl 0x6c(%rsp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
leaq 0x88(%rsp), %rdi
callq 0x10960
movq %rax, 0x20(%rsp)
jmp 0x10588
movq 0x50(%rsp), %rax
movq 0x20(%rsp), %rcx
movl (%rcx), %edi
movl 0x2c(%rax), %esi
callq 0x10920
movl %eax, 0x1c(%rsp)
jmp 0x105a2
movq 0x50(%rsp), %rdi
addq $0x30, %rdi
movslq 0x6c(%rsp), %rsi
callq 0x10960
movq %rax, 0x10(%rsp)
jmp 0x105bc
movq 0x50(%rsp), %rax
movl 0x1c(%rsp), %edi
movq 0x10(%rsp), %rcx
movl (%rcx), %ecx
imull %ecx, %edi
movl 0x2c(%rax), %esi
callq 0x10920
movl %eax, 0xc(%rsp)
jmp 0x105dd
movl 0xc(%rsp), %eax
addl 0xa4(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10551
movq 0x50(%rsp), %rcx
movl 0xa4(%rsp), %eax
xorl %edx, %edx
divl 0x2c(%rcx)
movl %edx, 0x8(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xa800
movl 0x8(%rsp), %eax
addq $0xb8, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x23c0
nopw (%rax,%rax)