// File: /workspace/github_cpp_makefile_star2_O3/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../algorithms/Search/Hypercube/headers/../../LSH/headers/hashing.h
// Function: lsh::HashFunction::HashFunction(int, double, unsigned int, unsigned int)
HashFunction(int dim, double w, uint32_t m, uint32_t M) : dim(dim), w(w), s(dim, 0), m(m), M(M), const_m_values(dim) {
				// we want to use a uniform real distributor, thus we must initialize it
				// we want to randomize the input each time
				std::random_device mch;
				std::default_random_engine generator(mch());
				std::uniform_real_distribution<double> distribution(0.0, w);
				// initialize the random vector in the space `dim` using the uniform distribution
				for (int i = 0; i < this->dim; i++) {
					s.at(i) = distribution(generator);
				}

				// initialize the const m vector
				for (int i = 0; i < this->dim; i++) {
					const_m_values[i] = our_math::modular_power(m, i, M);
				}
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x13a8, %rsp           # imm = 0x13A8
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
movl %esi, (%rdi)
movsd %xmm0, 0x18(%rsp)
movsd %xmm0, 0x8(%rdi)
leaq 0x10(%rdi), %r13
movslq %esi, %r15
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x10(%rsp), %rcx
movq %r13, %rdi
movq %r15, %rsi
callq 0x6496
movl %ebp, 0x28(%r14)
movl %ebx, 0x2c(%r14)
leaq 0x30(%r14), %r12
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x65b8
leaq 0x20(%rsp), %rdi
callq 0x61a2
leaq 0x20(%rsp), %rdi
callq 0x22c0
movl %eax, %ecx
leaq (%rcx,%rcx,2), %rcx
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x1e, %edx
movl %edx, %ecx
shll $0x1f, %ecx
orl %edx, %ecx
leal (%rax,%rcx), %edx
cmpl $0x1, %edx
adcl %eax, %ecx
movq %rcx, 0x10(%rsp)
cmpl $0x0, (%r14)
jle 0x60c8
movq %r13, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x665f
movq 0x10(%r14), %rax
movq 0x18(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r13, %rdx
jbe 0x60e4
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r13
movslq (%r14), %rax
cmpq %rax, %r13
jl 0x6040
testl %eax, %eax
jle 0x60c8
movq (%r12), %rdi
xorl %r8d, %r8d
movl $0x1, %ecx
testq %r8, %r8
je 0x60b9
movl %ebp, %esi
movl %r8d, %r9d
movl %esi, %eax
cltd
idivl %ebx
movl %edx, %esi
testb $0x1, %r9b
je 0x60a8
imull %esi, %ecx
movl %ecx, %eax
cltd
idivl %ebx
movl %edx, %ecx
movl %r9d, %eax
shrl %eax
imull %esi, %esi
cmpl $0x1, %r9d
movl %eax, %r9d
ja 0x6091
movl %ecx, (%rdi,%r8,4)
incq %r8
movslq (%r14), %rax
cmpq %rax, %r8
jl 0x6082
leaq 0x20(%rsp), %rdi
callq 0x2210
addq $0x13a8, %rsp           # imm = 0x13A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x227a(%rip), %rdi      # 0x8365
movq %r13, %rsi
xorl %eax, %eax
callq 0x2320
jmp 0x6149
movq %r13, 0x8(%rsp)
jmp 0x6114
movq %r13, 0x8(%rsp)
movq %rax, %rbx
jmp 0x6121
movq %r13, 0x8(%rsp)
movq %rax, %rbx
jmp 0x612f
jmp 0x6114
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2210
movq (%r12), %rdi
testq %rdi, %rdi
je 0x612f
callq 0x2220
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6141
callq 0x2220
movq %rbx, %rdi
callq 0x2400
movq %rax, %rdi
callq 0x360b
nop