// File: nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Clustering/../../algorithms/Clustering/clustering.h
// Function: Clustering<double>::Clustering(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, unsigned int, unsigned int, unsigned int)
Clustering(std::string assignment_method, std::vector<std::vector<T>> feature_vectors,
			uint32_t k, uint32_t lsh_l, uint32_t lsh_k): feature_vectors(feature_vectors), k(k), lsh_l(lsh_l), lsh_k(lsh_k) {
				if (assignment_method != "reverse_LSH") {
					cout << "Wrong assignment method selected\n";
					exit(EXIT_FAILURE);
				}	
				// initialize all the classs fields necessary
				this->assignment_method = assignment_method;

				// default lsh arguments
				uint32_t m = pow(2,32) - 5;
				uint32_t M = n_points / 16;
				uint32_t w = 10000;
				
				n_points = feature_vectors.size();
				assert(n_points);
				space_dim = feature_vectors.at(0).size();

				// initialize the lsh class
				lsh_instant = new LSH<T>(lsh_l, m, M, n_points, lsh_k, space_dim, w, feature_vectors);

				vector<int> assigned(n_points, 0);
				assigned_centroid = assigned;
		}

// Assembly:
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rsi, 0x80(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdi, 0x128(%rsp)
movq %rsi, 0x120(%rsp)
movq %rdx, 0x118(%rsp)
movl %ecx, 0x114(%rsp)
movl %r8d, 0x110(%rsp)
movl %r9d, 0x10c(%rsp)
movq 0x128(%rsp), %rdi
movq %rdi, 0x98(%rsp)
movl 0x114(%rsp), %eax
movl %eax, (%rdi)
addq $0x10, %rdi
movq %rdi, 0x88(%rsp)
callq 0x22c0
movq 0x98(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x90(%rsp)
callq 0x3450
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
addq $0x48, %rdi
movq %rdi, 0xa8(%rsp)
callq 0x5f70
jmp 0x637d
movq 0x98(%rsp), %rdi
addq $0x60, %rdi
movq %rdi, 0x70(%rsp)
callq 0x8370
movq 0x98(%rsp), %rax
movq 0x80(%rsp), %rdi
movl 0x110(%rsp), %ecx
movl %ecx, 0x78(%rax)
movl 0x10c(%rsp), %ecx
movl %ecx, 0x7c(%rax)
leaq 0x14ead(%rip), %rsi     # 0x1b26b
callq 0x8380
movb %al, 0x7f(%rsp)
jmp 0x63c9
movb 0x7f(%rsp), %al
testb $0x1, %al
jne 0x63d3
jmp 0x6424
movq 0x20bfe(%rip), %rdi     # 0x26fd8
leaq 0x14f76(%rip), %rsi     # 0x1b357
callq 0x2200
jmp 0x63e8
movl $0x1, %edi
callq 0x2260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x672c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x6715
movq 0x80(%rsp), %rsi
movq 0x98(%rsp), %rdi
addq $0x10, %rdi
callq 0x2030
jmp 0x643f
movl $0x2, %edi
movl $0x20, %esi
callq 0x9680
movsd %xmm0, 0x68(%rsp)
jmp 0x6456
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdi
movsd 0x68(%rsp), %xmm0
movsd 0x14d4c(%rip), %xmm1    # 0x1b1c0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
movl %ecx, 0xf8(%rsp)
movl 0x4(%rax), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, 0xf4(%rsp)
movl $0x2710, 0xf0(%rsp) # imm = 0x2710
callq 0x4df0
movq %rax, %rcx
movq 0x98(%rsp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, 0x4(%rax)
je 0x64bc
jmp 0x64db
leaq 0x14eb6(%rip), %rdi     # 0x1b379
leaq 0x14eb8(%rip), %rsi     # 0x1b382
movl $0x9b, %edx
leaq 0x14f7a(%rip), %rcx     # 0x1b450
callq 0x2170
movq 0xa0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6f30
movq %rax, 0x60(%rsp)
jmp 0x64f3
movq 0x60(%rsp), %rdi
callq 0x3f60
movq %rax, %rcx
movq 0x98(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x68, %edi
callq 0x2210
movq %rax, 0x58(%rsp)
jmp 0x651c
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rax
movb $0x1, 0xd7(%rsp)
movl 0x110(%rsp), %ecx
movl %ecx, 0x34(%rsp)
movl 0xf8(%rsp), %ecx
movq %rcx, 0x38(%rsp)
movl 0xf4(%rsp), %ecx
movl %ecx, 0x44(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x48(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x4c(%rsp)
movl 0x10c(%rsp), %eax
movl %eax, 0x50(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0x54(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x5f70
jmp 0x6589
movl 0x50(%rsp), %r9d
movl 0x48(%rsp), %r8d
movl 0x44(%rsp), %ecx
movq 0x38(%rsp), %rdx
movl 0x34(%rsp), %esi
movq 0x58(%rsp), %rdi
movl 0x4c(%rsp), %r10d
movl 0x54(%rsp), %r11d
movq %rsp, %rax
leaq 0xd8(%rsp), %rbx
movq %rbx, 0x10(%rax)
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0x96a0
jmp 0x65cc
movq 0x98(%rsp), %rax
movq 0x58(%rsp), %rcx
movb $0x0, 0xd7(%rsp)
movq %rcx, 0x80(%rax)
leaq 0xd8(%rsp), %rdi
callq 0x35b0
movq 0x98(%rsp), %rax
movslq 0x4(%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0xb4(%rsp)
leaq 0xb3(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x83b0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
leaq 0xb8(%rsp), %rdi
leaq 0xb4(%rsp), %rdx
callq 0x83c0
jmp 0x6644
leaq 0xb3(%rsp), %rdi
callq 0x8440
movq 0x98(%rsp), %rdi
addq $0x60, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x8450
jmp 0x666c
leaq 0xb8(%rsp), %rdi
callq 0x7a50
addq $0x130, %rsp            # imm = 0x130
popq %rbx
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x66b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x35b0
testb $0x1, 0xd7(%rsp)
jne 0x66c5
jmp 0x66cf
movq 0x58(%rsp), %rdi
callq 0x21f0
jmp 0x6715
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xb3(%rsp), %rdi
callq 0x8440
jmp 0x6715
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x7a50
movq 0x70(%rsp), %rdi
callq 0x7a50
movq 0xa8(%rsp), %rdi
callq 0x35b0
movq 0x90(%rsp), %rdi
callq 0x35b0
movq 0x88(%rsp), %rdi
callq 0x2150
movq 0x100(%rsp), %rdi
callq 0x2400
nopw %cs:(%rax,%rax)
nopl (%rax)