// File: manikandan5[P]Image-Matching-Stitching-Warping/./SiftHelpers.h
// Function: Image::descriptorMatching1(Image&, std::vector<Image, std::allocator<Image>>&)
static void descriptorMatching1(Image& queryImage,vector<Image>& images)
	{
		multimap<int,string> ranking;
		for(int i = 0;i<images.size();++i)
		{
			SiftDescriptorMap mapping;
			int start = clock();
			int count = Image::MatchSIFT(queryImage,images[i],mapping);
			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<<"Normal Sift Matching top 10 results"<<endl;
		while(rankingStart != rankingEnd && ++top10 <= 10)
		{
			cout<<"Image = "<<rankingStart->second<<" Count = "<<rankingStart->first<<endl;
			rankingStart++;
		}
	}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x94bf0
movl $0x0, 0x114(%rsp)
movslq 0x114(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x148(%rsp), %rdi
callq 0xb790
movq %rax, %rcx
movq 0x68(%rsp), %rax
cmpq %rcx, %rax
jae 0xc4d3
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xb170
callq 0x5360
movl %eax, 0xf4(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x148(%rsp), %rdi
movslq 0x114(%rsp), %rsi
callq 0x5e5e0
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rdx
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xb180
movl %eax, 0x64(%rsp)
jmp 0xc3a4
movl 0x64(%rsp), %eax
movl %eax, 0xf0(%rsp)
callq 0x5360
movl %eax, 0xe0(%rsp)
movq 0x148(%rsp), %rdi
movslq 0x114(%rsp), %rsi
callq 0x5e5e0
movq %rax, %rsi
leaq 0x98(%rsp), %rdi
callq 0xb7d0
jmp 0xc3e2
leaq 0xb8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x94c30
jmp 0xc401
leaq 0x118(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x94c00
movq %rax, 0x48(%rsp)
jmp 0xc41d
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x94c70
leaq 0x98(%rsp), %rdi
callq 0x5ae8
leaq 0xf8(%rsp), %rdi
callq 0xb730
movl 0x114(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x114(%rsp)
jmp 0xc31f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0xc4c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0xc4b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x94c70
leaq 0x98(%rsp), %rdi
callq 0x5ae8
leaq 0xf8(%rsp), %rdi
callq 0xb730
jmp 0xc667
leaq 0x88(%rsp), %rdi
leaq 0x118(%rsp), %rsi
movq %rsi, 0x38(%rsp)
callq 0x94c90
movq 0x38(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x94cc0
movl $0x0, 0x7c(%rsp)
movq 0xf3aba(%rip), %rdi     # 0xfffc8
leaq 0xdf02d(%rip), %rsi     # 0xeb542
callq 0x5520
movq %rax, 0x40(%rsp)
jmp 0xc521
movq 0x40(%rsp), %rdi
movq 0xf3a73(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0xc534
jmp 0xc536
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x94cf0
movb %al, 0x37(%rsp)
jmp 0xc551
movb 0x37(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x36(%rsp)
jne 0xc562
jmp 0xc577
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
cmpl $0xa, %eax
setle %al
movb %al, 0x36(%rsp)
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0xc584
jmp 0xc652
movq 0xf3a3d(%rip), %rdi     # 0xfffc8
leaq 0xdca68(%rip), %rsi     # 0xe8ffa
callq 0x5520
movq %rax, 0x28(%rsp)
jmp 0xc59e
leaq 0x88(%rsp), %rdi
callq 0x94d20
movq %rax, 0x20(%rsp)
jmp 0xc5b2
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x8, %rsi
callq 0x54b0
movq %rax, 0x18(%rsp)
jmp 0xc5cc
movq 0x18(%rsp), %rdi
leaq 0xdef8e(%rip), %rsi     # 0xeb566
callq 0x5520
movq %rax, 0x10(%rsp)
jmp 0xc5e4
leaq 0x88(%rsp), %rdi
callq 0x94d20
movq %rax, 0x8(%rsp)
jmp 0xc5f8
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl (%rax), %esi
callq 0x5940
movq %rax, (%rsp)
jmp 0xc60f
movq (%rsp), %rdi
movq 0xf3986(%rip), %rsi     # 0xfffa0
callq 0x5580
jmp 0xc621
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
xorl %edx, %edx
callq 0x94d60
jmp 0xc637
jmp 0xc536
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0xc667
leaq 0x118(%rsp), %rdi
callq 0x94da0
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0x118(%rsp), %rdi
callq 0x94da0
movq 0xe8(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)