// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./SiftHelpers.h
// Function: Image::descriptorMatching2(Image&, std::vector<Image, std::allocator<Image>>&)
static void descriptorMatching2(Image& queryImage,vector<Image>& images)
	{
		vector<vector<float>> distributionLists = getUniformDistribution();
		
		//reduction in dimension
		reduceSift(queryImage,distributionLists);
		
		multimap<int,string> ranking;
		for(int i = 0;i<images.size();++i)
		{
			reduceSift(images[i],distributionLists);
			SiftDescriptorMap mapping;
			int start = clock();
			int count = MatchSIFT(queryImage,images[i],mapping,true);
			int stop = clock();
			//cout<<"Time consumption = "<<stop - start<<endl;
			ranking.insert(make_pair(count,images[i].getName()));
		}
			
		multimap<int,string>::reverse_iterator rankingStart = ranking.rbegin();
		multimap<int,string>::reverse_iterator rankingEnd = ranking.rend();
			
		int top10 = 0;
		cout<<"quantized projection function Sift matching results top 10"<<endl;
		while(rankingStart != rankingEnd && ++top10 <= 10)
		{
			cout<<"Image = "<<rankingStart->second<<" Count = "<<rankingStart->first<<endl;
			rankingStart++;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbp
movq %rdi, %r15
leaq 0x80(%rsp), %rbx
pushq $0x32
popq %rsi
movq %rbx, %rdi
callq 0x43ee4
movq %r15, 0x20(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x43fd4
leaq 0xa0(%rsp), %rbx
andl $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
leaq 0x50(%rsp), %r12
leaq 0x10(%rsp), %r15
xorl %esi, %esi
xorl %r14d, %r14d
movq (%rbp), %rdi
movq 0x8(%rbp), %rax
subq %rdi, %rax
cqto
pushq $0x70
popq %rcx
idivq %rcx
cmpq %r14, %rax
jbe 0x7e51
movq %r14, 0x30(%rsp)
movq %r15, %rbx
movq %r12, %r15
addq %rsi, %rdi
movq %rsi, %r14
leaq 0x80(%rsp), %rsi
callq 0x43fd4
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
callq 0x4350
movq %rbp, %r13
movq (%rbp), %rsi
addq %r14, %rsi
movq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0x7226
movl %eax, %r12d
callq 0x4350
movq (%r13), %rsi
movq %r14, 0x28(%rsp)
addq %r14, %rsi
movq %rsp, %rdi
callq 0x4700
movl %r12d, 0x38(%rsp)
movq %r15, %r12
movq %r15, 0x40(%rsp)
movq (%rsp), %rax
movq %rbx, %r15
cmpq %rbx, %rax
je 0x7de3
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x7dec
movups (%r15), %xmm0
movups %xmm0, (%r12)
leaq 0xa0(%rsp), %rbx
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r15, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x43d32
leaq 0x40(%rsp), %rdi
callq 0x4aa8
movq %rsp, %rdi
callq 0x4aa8
leaq 0x60(%rsp), %rdi
callq 0x7506
movq 0x30(%rsp), %r14
incq %r14
movq 0x28(%rsp), %rsi
addq $0x70, %rsi
jmp 0x7d34
movq 0xb0(%rsp), %rbp
movq 0x88160(%rip), %rdi     # 0x8ffc0
leaq 0x6f7da(%rip), %rsi     # 0x77641
callq 0x4520
movq %rax, %rdi
callq 0x4200
pushq $0xa
popq %r14
leaq 0x6d258(%rip), %r15     # 0x750d7
leaq 0x6f7b1(%rip), %r12     # 0x77637
cmpq %rbp, %rbx
je 0x7eed
subl $0x1, %r14d
jb 0x7eed
movq 0x88128(%rip), %rdi     # 0x8ffc0
movq %r15, %rsi
callq 0x4520
movq %rax, %r13
movq %rbx, %rdi
callq 0x4570
leaq 0x28(%rax), %rsi
movq %r13, %rdi
callq 0x44a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4520
movq %rax, %r13
movq %rbx, %rdi
callq 0x4570
movl 0x20(%rax), %esi
movq %r13, %rdi
callq 0x4930
movq %rax, %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x4570
movq %rax, %rbx
jmp 0x7e86
leaq 0x98(%rsp), %rdi
callq 0x43e9a
leaq 0x80(%rsp), %rdi
callq 0x441f0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x7f5a
jmp 0x7f4a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4aa8
movq %rsp, %rdi
callq 0x4aa8
jmp 0x7f3e
jmp 0x7f3b
jmp 0x7f4a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7506
jmp 0x7f4d
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x43e9a
leaq 0x80(%rsp), %rdi
callq 0x441f0
movq %rbx, %rdi
callq 0x4950