// File: /workspace/github_cpp_makefile_star2_O3/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 $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
movl $0x32, %esi
callq 0x59d9e
movq %r15, 0x20(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x59ec6
leaq 0x90(%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 (%r14), %rdi
movq %rbx, %rbp
cmpq %rdi, 0x8(%r14)
je 0x9ea4
leaq 0x40(%rsp), %r12
xorl %r13d, %r13d
leaq 0x50(%rsp), %rbp
xorl %r15d, %r15d
movq %r12, %rbx
addq %r13, %rdi
leaq 0x70(%rsp), %rsi
callq 0x59ec6
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
callq 0x4360
movq (%r14), %rsi
addq %r13, %rsi
movq 0x20(%rsp), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x8bfe
movl %eax, %r12d
callq 0x4360
movq %r14, %rbp
movq (%r14), %rax
leaq 0x10(%rsp), %r14
movq %r14, (%rsp)
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x374b4
movl %r12d, 0x28(%rsp)
movq %rbx, %r12
movq %rbx, 0x30(%rsp)
movq (%rsp), %rax
cmpq %r14, %rax
je 0x9dff
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x9e08
movups (%r14), %xmm0
movups %xmm0, (%r12)
leaq 0x90(%rsp), %rbx
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %r14, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x59c0a
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
movq %rbp, %r14
je 0x9e50
callq 0x44f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %rbp
je 0x9e68
callq 0x44f0
movq %rbp, %rdi
callq 0x8fce
incq %r15
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
sarq $0x4, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x70, %r13
cmpq %r15, %rax
ja 0x9d6f
movq 0xa0(%rsp), %rbp
movq 0x9e10d(%rip), %r14     # 0xa7fb8
leaq 0x87839(%rip), %rsi     # 0x916eb
movl $0x3a, %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 0x9e0db(%rip), %rdi     # 0xa7fb8
callq 0x4050
movq %rax, %rdi
callq 0x4380
cmpq %rbp, %rbx
je 0x9fa0
movl $0xb, %r15d
movq 0x9e0b8(%rip), %r14     # 0xa7fb8
leaq 0x877da(%rip), %r12     # 0x916e1
decl %r15d
je 0x9fa0
movl $0x8, %edx
movq %r14, %rdi
leaq 0x85262(%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 0x9f07
leaq 0x88(%rsp), %rdi
callq 0x59d42
leaq 0x70(%rsp), %rdi
callq 0x5a156
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xa01a
jmp 0xa00a
jmp 0xa00a
jmp 0x9fd4
movq %rax, %rbx
jmp 0x9ffe
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x9feb
callq 0x44f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9ffe
callq 0x44f0
leaq 0x50(%rsp), %rdi
callq 0x8fce
jmp 0xa00d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x59d42
leaq 0x70(%rsp), %rdi
callq 0x5a156
movq %rbx, %rdi
callq 0x4960