// File: /workspace/github_cpp_makefile_star2_O1/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 0x5c908
movq %r15, 0x20(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5ca30
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
cmpq %rdi, 0x8(%r14)
je 0x9eff
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 0x5ca30
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
callq 0x4350
movq (%r14), %rsi
addq %r13, %rsi
movq 0x20(%rsp), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x8c5c
movl %eax, %r12d
callq 0x4350
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 0x39158
movl %r12d, 0x28(%rsp)
movq %rbx, %r12
movq %rbx, 0x30(%rsp)
movq (%rsp), %rax
cmpq %r14, %rax
je 0x9e62
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x9e6b
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 0x5c776
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
movq %rbp, %r14
je 0x9eb3
callq 0x44e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
leaq 0x50(%rsp), %rbp
je 0x9ecb
callq 0x44e0
movq %rbp, %rdi
callq 0x9046
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 0x9dd2
movq 0xa0(%rsp), %rbp
movq 0xa30aa(%rip), %r14     # 0xacfb8
leaq 0x8c2a6(%rip), %rsi     # 0x961bb
movl $0x3a, %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 0xa3078(%rip), %rdi     # 0xacfb8
callq 0x4050
movq %rax, %rdi
callq 0x4370
cmpq %rbp, %rbx
je 0xa003
movl $0xb, %r15d
movq 0xa3055(%rip), %r14     # 0xacfb8
leaq 0x8c247(%rip), %r12     # 0x961b1
decl %r15d
je 0xa003
movl $0x8, %edx
movq %r14, %rdi
leaq 0x89ccf(%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 0x9f6a
leaq 0x88(%rsp), %rdi
callq 0x5c8ac
leaq 0x70(%rsp), %rdi
callq 0x5cca8
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xa07d
jmp 0xa06d
jmp 0xa06d
jmp 0xa037
movq %rax, %rbx
jmp 0xa061
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xa04e
callq 0x44e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa061
callq 0x44e0
leaq 0x50(%rsp), %rdi
callq 0x9046
jmp 0xa070
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x5c8ac
leaq 0x70(%rsp), %rdi
callq 0x5cca8
movq %rbx, %rdi
callq 0x4950