// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, 0x20(%rsp)
leaq 0x70(%rsp), %rbx
movl $0x0, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x9bc4
movq %rsi, %r14
leaq 0x40(%rsp), %rbp
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
xorl %r15d, %r15d
movq %rbp, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
callq 0x4350
movq (%r14), %rsi
addq %r12, %rsi
movq 0x20(%rsp), %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x8c5c
movl %eax, %ebp
callq 0x4350
movq %r14, %r13
movq (%r14), %rax
leaq 0x10(%rsp), %r14
movq %r14, (%rsp)
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x39158
movl %ebp, 0x28(%rsp)
movq %rbx, %rbp
movq %rbx, 0x30(%rsp)
movq (%rsp), %rax
cmpq %r14, %rax
je 0x9b31
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x9b39
movups (%r14), %xmm0
movups %xmm0, (%rbp)
leaq 0x70(%rsp), %rbx
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %r14, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5c776
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
movq %r13, %r14
je 0x9b7b
callq 0x44e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %r13
je 0x9b93
callq 0x44e0
movq %r13, %rdi
callq 0x9046
incq %r15
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x4, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x70, %r12
cmpq %r15, %rax
ja 0x9ab3
movq 0x80(%rsp), %rbp
movq 0xa33e5(%rip), %r14     # 0xacfb8
leaq 0x8c5b3(%rip), %rsi     # 0x9618d
movl $0x23, %edx
movq %r14, %rdi
callq 0x45a0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4520
movsbl %al, %esi
movq 0xa33b3(%rip), %rdi     # 0xacfb8
callq 0x4050
movq %rax, %rdi
callq 0x4370
cmpq %rbp, %rbx
je 0x9cc8
movl $0xb, %r15d
movq 0xa3390(%rip), %r14     # 0xacfb8
leaq 0x8c582(%rip), %r12     # 0x961b1
decl %r15d
je 0x9cc8
movl $0x8, %edx
movq %r14, %rdi
leaq 0x8a00a(%rip), %rsi     # 0x93c51
callq 0x45a0
movq %rbx, %rdi
callq 0x4570
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %r14, %rdi
callq 0x45a0
movq %rax, %r13
movl $0x9, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x45a0
movq %rbx, %rdi
callq 0x4570
movl 0x20(%rax), %esi
movq %r13, %rdi
callq 0x4920
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4520
movsbl %al, %esi
movq %r13, %rdi
callq 0x4050
movq %rax, %rdi
callq 0x4370
movq %rbx, %rdi
callq 0x4570
movq %rax, %rbx
cmpq %rbp, %rax
jne 0x9c2f
leaq 0x68(%rsp), %rdi
callq 0x5c8ac
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9d1e
jmp 0x9ce8
movq %rax, %rbx
jmp 0x9d12
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9cff
callq 0x44e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9d12
callq 0x44e0
leaq 0x50(%rsp), %rdi
callq 0x9046
jmp 0x9d21
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5c8ac
movq %rbx, %rdi
callq 0x4950
nop