// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./SiftHelpers.h
// Function: Image::reduceSift(Image&, std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>&)
static void reduceSift(Image& image,vector<vector<float>>& distributionLists)
	{
		const vector<SiftDescriptor> imageDescriptors = image.getDescriptors();
		//W is set
		float w = 400;
		
		vector<SiftDescriptor> newDescriptors;
		
		for(int i = 0;i<imageDescriptors.size() ;++i)
		{
			vector<float> descriptorValues;
			for(int j = 0;j<distributionLists.size();++j)
			{
				float sum = 0.0;
				for(int k = 0;k<128;++k)
				{
					sum += imageDescriptors[i].descriptor[k] * distributionLists[j][k];
				}
				sum/=w;
				
				descriptorValues.push_back(sum);
			}
			SiftDescriptor newDescriptor(imageDescriptors[i].row,imageDescriptors[i].col,imageDescriptors[i].sigma,imageDescriptors[i].angle,descriptorValues);	
			newDescriptors.push_back(newDescriptor);
		}
		image.setNewDescriptors(newDescriptors);	
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0x20(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x827e
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %ecx, %ecx
pushq $0x18
popq %r15
leaq 0x50(%rsp), %r13
leaq 0x80(%rsp), %rbp
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
cqto
pushq $0x28
popq %rsi
idivq %rsi
cmpq %rcx, %rax
jbe 0x44145
andq $0x0, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq %rcx, 0x28(%rsp)
imulq $0x28, %rcx, %rbx
xorl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
idivq %r15
cmpq %r12, %rax
jbe 0x440cc
andl $0x0, 0x80(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rax,%rbx), %rax
imulq $0x18, %r12, %rdx
movq (%rcx,%rdx), %rcx
xorps %xmm0, %xmm0
xorl %edx, %edx
cmpq $0x80, %rdx
je 0x440ab
movss (%rax,%rdx,4), %xmm1
mulss (%rcx,%rdx,4), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x80(%rsp)
incq %rdx
jmp 0x44086
divss 0x101cd(%rip), %xmm0    # 0x54280
movss %xmm0, 0x80(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x44790
incq %r12
jmp 0x44053
movq 0x8(%rsp), %rax
movups (%rax,%rbx), %xmm0
movaps %xmm0, 0xb0(%rsp)
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x843e
movaps 0xb0(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
leaq 0x90(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x843e
movq %rbx, %rdi
callq 0x848c
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x447b2
movq %r12, %rdi
callq 0x848c
movq %r13, %rdi
callq 0x848c
movq 0x28(%rsp), %rcx
incq %rcx
jmp 0x4401e
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x827e
movq 0x20(%rsp), %rdi
addq $0x58, %rdi
leaq 0x68(%rsp), %rsi
callq 0x449a0
leaq 0x68(%rsp), %rdi
callq 0x7f7a
leaq 0x30(%rsp), %rdi
callq 0x7f7a
leaq 0x8(%rsp), %rdi
callq 0x7f7a
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7f7a
jmp 0x441d4
movq %rax, %rbx
jmp 0x441d4
movq %rax, %rbx
movq %r12, %rdi
jmp 0x441be
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x848c
jmp 0x441ca
jmp 0x441c7
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x848c
leaq 0x30(%rsp), %rdi
callq 0x7f7a
leaq 0x8(%rsp), %rdi
callq 0x7f7a
movq %rbx, %rdi
callq 0x4950