// File: /workspace/github_cpp_makefile_star2_O2/lionalion[P]clusterization/clust_w2v.cpp
// Function: firstClast(std::vector<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>, std::allocator<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>>>, std::vector<int, std::allocator<int>>, float, std::vector<std::vector<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>, std::allocator<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>>>, std::allocator<std::vector<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>, std::allocator<std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float>>>>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&)
void firstClast (std::vector < std::map <int,float> > vCls, std::vector < int > vId, float th2, std::vector < std::vector <std::map<int,float> > > & vMapCls, std::vector < std::vector < int > > & vIdStr){
	std::multimap<int,int>  vMapRang;
	for (int id=0; id<vCls.size(); id++)
		vMapRang.insert(std::pair<int,int>(vCls[id].size(),id));

	int cnt=0;
	for ( std::multimap<int,int>::const_reverse_iterator fst = vMapRang.rbegin(); fst != vMapRang.rend(); ++fst){	
		
		bool flg=false;
		for (int a=0; a<vIdStr.size();a++){
			for (int b=0; b<vIdStr[a].size();b++){
				int tmp=(*fst).second;
				if(vId[ (*fst).second ] == vIdStr[a][b]){
					flg=true;
					break;
				}
			}
			if (flg==true)
				break;
		}
		
		if (flg==false){
			vMapCls.resize(vMapCls.size()+1);
			vIdStr.resize(vIdStr.size()+1);
			vMapCls[cnt].push_back(vCls[ (*fst).second ]);
			vIdStr[cnt].push_back(vId[(*fst).second ]);

			for ( std::multimap<int,int>::const_reverse_iterator scnd = fst; scnd != vMapRang.rend(); ++scnd){
				if (fst!=scnd){
					std::map<int,float>::const_iterator itv = vCls[ (*fst).second ].begin();			
					int comp=0;
					for ( std::map<int,float>::const_iterator itr = vCls[ (*scnd).second ].begin(); itr != vCls[ (*scnd).second ].end(); ++itr){
						std::map<int,float>::const_iterator itv = vCls[ (*fst).second ].begin();
						itv = vCls[ (*fst).second ].find( (*itr).first );
						if(itv != vCls[ (*fst).second ].end() )
							comp++;
					}
					
					if( vCls[ (*fst).second ].size()*th2 < comp){
						vMapCls[cnt].push_back(vCls[ (*scnd).second ]);
						vIdStr[cnt].push_back(vId[(*scnd).second ]);
					}
				}
			}
			cnt++;
		}
	}
	vCls.clear();	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, -0x48(%rbp)
movq %rdx, -0x60(%rbp)
leaq -0xa8(%rbp), %r12
andl $0x0, (%r12)
movss %xmm0, -0x6c(%rbp)
andq $0x0, 0x8(%r12)
movq %rsi, -0x68(%rbp)
movq %rdi, -0x30(%rbp)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
pushq $0x28
popq %r15
xorl %r13d, %r13d
pushq $0x30
popq %rbx
leaq -0x80(%rbp), %r14
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cqto
idivq %rbx
cmpq %r13, %rax
jbe 0x2a05
movl (%rcx,%r15), %eax
movl %eax, -0x80(%rbp)
movl %r13d, -0x7c(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
callq 0x4804
incq %r13
addq $0x30, %r15
jmp 0x29ca
movq $0x0, -0x58(%rbp)
movq -0x98(%rbp), %r14
cmpq %r14, %r12
je 0x2cb1
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
subq %rsi, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
xorl %r15d, %r15d
movq %r14, -0x40(%rbp)
movq %rsi, -0x50(%rbp)
movq %rax, -0x38(%rbp)
cmpq %rax, %r15
je 0x2aaa
imulq $0x18, %r15, %rax
movq (%rsi,%rax), %r13
movq 0x8(%rsi,%rax), %rbx
subq %r13, %rbx
sarq $0x2, %rbx
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x2a89
movq %r12, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %eax
leaq 0x1(%r14), %rcx
cmpl (%r13,%r14,4), %eax
movq %rcx, %r14
jne 0x2a5e
jmp 0x2a96
incq %r15
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rax
jmp 0x2a42
movq -0x40(%rbp), %r14
movq %r12, %rdi
callq 0x2120
movq %rax, %r12
jmp 0x2a14
movq -0x60(%rbp), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
leaq 0x1(%rax), %rsi
callq 0x413e
movq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
leaq 0x1(%rax), %rsi
callq 0x40fc
movslq -0x58(%rbp), %rax
imulq $0x18, %rax, %r13
movq -0x60(%rbp), %rax
movq (%rax), %rbx
addq %r13, %rbx
movq %r12, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
imulq $0x30, %rax, %rsi
movq -0x30(%rbp), %rax
addq (%rax), %rsi
movq %rbx, %rdi
callq 0x41a6
movq -0x48(%rbp), %rax
movq (%rax), %rbx
addq %r13, %rbx
movq %r12, %rdi
callq 0x2120
movslq 0x24(%rax), %rsi
shlq $0x2, %rsi
movq -0x68(%rbp), %rax
addq (%rax), %rsi
movq %rbx, %rdi
callq 0x4180
movq %r12, %r14
movq %r13, -0x78(%rbp)
cmpq -0x98(%rbp), %r14
je 0x2ca2
cmpq %r14, %r12
je 0x2c92
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movq %r14, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
imulq $0x30, %rax, %rax
movq 0x18(%rbx,%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x38(%rbp)
movq %r14, -0x40(%rbp)
movq %r14, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
imulq $0x30, %rax, %r15
leaq (%rbx,%r15), %r13
addq $0x8, %r13
movq %r12, %r14
movq %r12, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
movq -0x50(%rbp), %rcx
cmpq %r13, %rcx
je 0x2c0e
movq %rcx, %r13
imulq $0x30, %rax, %rax
addq %rax, %rbx
leaq 0x20(%rcx), %rsi
movq %rbx, %rdi
callq 0x5552
movq %rax, %r15
movq %r14, %r12
movq %r14, %rdi
callq 0x2120
movslq 0x24(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rbx
imulq $0x30, %rax, %rax
addq %rbx, %rax
addq $0x8, %rax
xorl %ecx, %ecx
cmpq %rax, %r15
setne %cl
addl %ecx, -0x38(%rbp)
movq %r13, %rdi
callq 0x21f0
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %r14
jmp 0x2b84
imulq $0x30, %rax, %rax
movq 0x28(%rbx,%rax), %rax
testq %rax, %rax
js 0x2c23
cvtsi2ss %rax, %xmm0
jmp 0x2c38
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movq %r14, %r12
movq -0x40(%rbp), %r14
movq -0x78(%rbp), %r13
movl -0x38(%rbp), %eax
cvtsi2ss %eax, %xmm1
mulss -0x6c(%rbp), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x2c92
addq %r15, %rbx
movq -0x60(%rbp), %rax
movq (%rax), %rdi
addq %r13, %rdi
movq %rbx, %rsi
callq 0x41a6
movq -0x48(%rbp), %rax
movq (%rax), %rbx
addq %r13, %rbx
movq %r14, %rdi
callq 0x2120
movslq 0x24(%rax), %rsi
shlq $0x2, %rsi
movq -0x68(%rbp), %rax
addq (%rax), %rsi
movq %rbx, %rdi
callq 0x4180
movq %r14, %rdi
callq 0x2120
movq %rax, %r14
jmp 0x2b43
movq -0x58(%rbp), %rax
incl %eax
movq %rax, -0x58(%rbp)
jmp 0x2a9a
movq -0x30(%rbp), %rdi
callq 0x41e2
leaq -0xb0(%rbp), %rdi
callq 0x46b0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2cde
jmp 0x2cde
jmp 0x2cde
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x46b0
movq %rbx, %rdi
callq 0x2300