// File: 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:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
leaq 0x160(%rsp), %rdi
movq %rdi, 0x78(%rsp)
movl $0x32, %esi
callq 0x959f0
movq 0x78(%rsp), %rsi
movq 0x180(%rsp), %rdi
callq 0x95b40
jmp 0xc732
leaq 0x120(%rsp), %rdi
callq 0x94bf0
movl $0x0, 0x11c(%rsp)
movslq 0x11c(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x178(%rsp), %rdi
callq 0xb790
movq %rax, %rcx
movq 0x70(%rsp), %rax
cmpq %rcx, %rax
jae 0xc95a
movq 0x178(%rsp), %rdi
movslq 0x11c(%rsp), %rsi
callq 0x5e5e0
movq %rax, %rdi
leaq 0x160(%rsp), %rsi
callq 0x95b40
jmp 0xc79c
leaq 0x100(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xb170
callq 0x5360
movl %eax, 0xfc(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x11c(%rsp), %rsi
callq 0x5e5e0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq %rax, %rsi
movl $0x1, %ecx
callq 0xb180
movl %eax, 0x6c(%rsp)
jmp 0xc7f9
movl 0x6c(%rsp), %eax
movl %eax, 0xf8(%rsp)
callq 0x5360
movl %eax, 0xf4(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x11c(%rsp), %rsi
callq 0x5e5e0
movq %rax, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xb7d0
jmp 0xc837
leaq 0xc8(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x94c30
jmp 0xc856
leaq 0x120(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x94c00
movq %rax, 0x50(%rsp)
jmp 0xc872
movq 0x50(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x94c70
leaq 0xa8(%rsp), %rdi
callq 0x5ae8
leaq 0x100(%rsp), %rdi
callq 0xb730
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0xc74a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xcb00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xcaf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xc948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xc93b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x94c70
leaq 0xa8(%rsp), %rdi
callq 0x5ae8
leaq 0x100(%rsp), %rdi
callq 0xb730
jmp 0xcaf3
leaq 0x98(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movq %rsi, 0x40(%rsp)
callq 0x94c90
movq 0x40(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x94cc0
movl $0x0, 0x8c(%rsp)
movq 0xf3630(%rip), %rdi     # 0xfffc8
leaq 0xdebd1(%rip), %rsi     # 0xeb570
callq 0x5520
movq %rax, 0x48(%rsp)
jmp 0xc9ab
movq 0x48(%rsp), %rdi
movq 0xf35e9(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0xc9be
jmp 0xc9c0
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x94cf0
movb %al, 0x3f(%rsp)
jmp 0xc9db
movb 0x3f(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x3e(%rsp)
jne 0xc9ec
jmp 0xca07
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
cmpl $0xa, %eax
setle %al
movb %al, 0x3e(%rsp)
movb 0x3e(%rsp), %al
testb $0x1, %al
jne 0xca14
jmp 0xcad1
movq 0xf35ad(%rip), %rdi     # 0xfffc8
leaq 0xdc5d8(%rip), %rsi     # 0xe8ffa
callq 0x5520
movq %rax, 0x30(%rsp)
jmp 0xca2e
leaq 0x98(%rsp), %rdi
callq 0x94d20
movq %rax, 0x28(%rsp)
jmp 0xca42
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x8, %rsi
callq 0x54b0
movq %rax, 0x20(%rsp)
jmp 0xca5c
movq 0x20(%rsp), %rdi
leaq 0xdeafe(%rip), %rsi     # 0xeb566
callq 0x5520
movq %rax, 0x18(%rsp)
jmp 0xca74
leaq 0x98(%rsp), %rdi
callq 0x94d20
movq %rax, 0x10(%rsp)
jmp 0xca88
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movl (%rax), %esi
callq 0x5940
movq %rax, 0x8(%rsp)
jmp 0xcaa0
movq 0x8(%rsp), %rdi
movq 0xf34f4(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0xcab3
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
xorl %edx, %edx
callq 0x94d60
jmp 0xcacc
jmp 0xc9c0
leaq 0x120(%rsp), %rdi
callq 0x94da0
leaq 0x160(%rsp), %rdi
callq 0x95f30
addq $0x188, %rsp            # imm = 0x188
retq
leaq 0x120(%rsp), %rdi
callq 0x94da0
leaq 0x160(%rsp), %rdi
callq 0x95f30
movq 0x158(%rsp), %rdi
callq 0x5970
nopw (%rax,%rax)