// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rbx, %rbp
cmpq (%rsi), %rax
je 0x9b67
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 0x4360
movq (%r14), %rsi
addq %r12, %rsi
movq 0x20(%rsp), %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x8bfe
movl %eax, %ebp
callq 0x4360
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 0x374b4
movl %ebp, 0x28(%rsp)
movq %rbx, %rbp
movq %rbx, 0x30(%rsp)
movq (%rsp), %rax
cmpq %r14, %rax
je 0x9acc
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x9ad4
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 0x59c0a
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
movq %r13, %r14
je 0x9b16
callq 0x44f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %r13
je 0x9b2e
callq 0x44f0
movq %r13, %rdi
callq 0x8fce
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 0x9a4e
movq 0x80(%rsp), %rbp
movq 0x9e44a(%rip), %r14     # 0xa7fb8
leaq 0x87b48(%rip), %rsi     # 0x916bd
movl $0x23, %edx
movq %r14, %rdi
callq 0x45b0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4530
movsbl %al, %esi
movq 0x9e418(%rip), %rdi     # 0xa7fb8
callq 0x4050
movq %rax, %rdi
callq 0x4380
cmpq %rbp, %rbx
je 0x9c63
movl $0xb, %r15d
movq 0x9e3f5(%rip), %r14     # 0xa7fb8
leaq 0x87b17(%rip), %r12     # 0x916e1
decl %r15d
je 0x9c63
movl $0x8, %edx
movq %r14, %rdi
leaq 0x8559f(%rip), %rsi     # 0x8f181
callq 0x45b0
movq %rbx, %rdi
callq 0x4580
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq %r14, %rdi
callq 0x45b0
movq %rax, %r13
movl $0x9, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x45b0
movq %rbx, %rdi
callq 0x4580
movl 0x20(%rax), %esi
movq %r13, %rdi
callq 0x4930
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4530
movsbl %al, %esi
movq %r13, %rdi
callq 0x4050
movq %rax, %rdi
callq 0x4380
movq %rbx, %rdi
callq 0x4580
movq %rax, %rbx
cmpq %rbp, %rax
jne 0x9bca
leaq 0x68(%rsp), %rdi
callq 0x59d42
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9cb9
jmp 0x9c83
movq %rax, %rbx
jmp 0x9cad
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9c9a
callq 0x44f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9cad
callq 0x44f0
leaq 0x50(%rsp), %rdi
callq 0x8fce
jmp 0x9cbc
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x59d42
movq %rbx, %rdi
callq 0x4960