// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %rcx, -0x38(%rbp)
movq %rdx, -0x50(%rbp)
movss %xmm0, -0x64(%rbp)
movq %rsi, -0x58(%rbp)
leaq -0xb8(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq (%rdi), %rbx
movq %rdi, -0x30(%rbp)
movq 0x8(%rdi), %r12
cmpq %rbx, %r12
je 0x2eef
movl $0x28, %r14d
xorl %r15d, %r15d
leaq -0x78(%rbp), %r13
movl (%rbx,%r14), %eax
movl %eax, -0x78(%rbp)
movl %r15d, -0x74(%rbp)
leaq -0xc0(%rbp), %rdi
movq %r13, %rsi
callq 0x54c4
incq %r15
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r12
movq %r12, %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x30, %r14
cmpq %r15, %rax
ja 0x2b61
movq -0xa8(%rbp), %r13
leaq -0xb8(%rbp), %rax
cmpq %r13, %rax
je 0x2eef
movq $0x0, -0x48(%rbp)
movq %r13, -0x60(%rbp)
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r14
subq %rbx, %r14
je 0x2c47
sarq $0x3, %r14
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r14
xorl %r15d, %r15d
leaq (%r15,%r15,2), %rax
movq (%rbx,%rax,8), %r12
movq 0x8(%rbx,%rax,8), %r13
subq %r12, %r13
je 0x2c3f
sarq $0x2, %r13
movq -0x40(%rbp), %rdi
callq 0x2130
movslq 0x24(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %eax
cmpq $0x1, %r13
adcq $0x0, %r13
xorl %ecx, %ecx
cmpl (%r12,%rcx,4), %eax
je 0x2d18
incq %rcx
cmpq %rcx, %r13
jne 0x2c2d
incq %r15
cmpq %r15, %r14
ja 0x2bf6
movq -0x50(%rbp), %rdi
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
incq %rsi
callq 0x49f6
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
incq %rsi
callq 0x49b2
movslq -0x48(%rbp), %rax
leaq (%rax,%rax,2), %rax
movq %rax, -0x70(%rbp)
leaq (,%rax,8), %rcx
movq -0x50(%rbp), %rax
movq (%rax), %r15
movq %rcx, -0x80(%rbp)
addq %rcx, %r15
movq %r14, %rdi
callq 0x2130
movslq 0x24(%rax), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
movq -0x30(%rbp), %rax
addq (%rax), %rsi
movq %r15, %rdi
callq 0x4a6e
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
leaq (%rax,%rcx,8), %r15
movq %r14, %rdi
callq 0x2130
movslq 0x24(%rax), %rdx
shlq $0x2, %rdx
movq -0x58(%rbp), %rax
addq (%rax), %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x2d25
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x2d2d
movq -0x40(%rbp), %r14
movq -0x60(%rbp), %r13
jmp 0x2ed3
movq %r15, %rdi
callq 0x59d4
movq %r14, %r13
cmpq -0xa8(%rbp), %r14
je 0x2ec9
cmpq %r13, %r14
je 0x2eb1
movq %r14, %rdi
callq 0x2130
movslq 0x24(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %r15
leaq (%rax,%rax,2), %rbx
shlq $0x4, %rbx
addq %r15, %rbx
movq %r13, %rdi
callq 0x2130
movslq 0x24(%rax), %rax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
leaq (%r15,%rdx), %r12
addq $0x8, %r12
movq 0x10(%r12), %rax
cmpq %r12, %rax
je 0x2e1d
movq %rdx, -0x88(%rbp)
movq %r15, -0x90(%rbp)
movq %r13, -0x60(%rbp)
movq 0x10(%rbx), %r15
leaq 0x8(%rbx), %r13
xorl %r14d, %r14d
movq %r13, %rsi
testq %r15, %r15
je 0x2de5
movl 0x20(%rax), %edx
movq %r15, %rsi
movq %r13, %rcx
xorl %edi, %edi
cmpl %edx, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rcx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x2dbc
movq %r13, %rsi
cmpq %r13, %rcx
je 0x2de5
cmpl 0x20(%rcx), %edx
cmovlq %r13, %rcx
movq %rcx, %rsi
xorl %ecx, %ecx
cmpq %r13, %rsi
setne %cl
addl %ecx, %r14d
movq %rax, %rdi
callq 0x2230
cmpq %r12, %rax
jne 0x2dab
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movq -0x40(%rbp), %r14
movq -0x60(%rbp), %r13
movq -0x90(%rbp), %r15
movq -0x88(%rbp), %rdx
jmp 0x2e20
xorps %xmm0, %xmm0
movq 0x28(%rbx), %rax
testq %rax, %rax
js 0x2e33
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0x2e4b
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2eb1
addq %rdx, %r15
movq -0x50(%rbp), %rax
movq (%rax), %rdi
addq -0x80(%rbp), %rdi
movq %r15, %rsi
callq 0x4a6e
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
leaq (%rax,%rcx,8), %r15
movq %r13, %rdi
callq 0x2130
movslq 0x24(%rax), %rdx
shlq $0x2, %rdx
movq -0x58(%rbp), %rax
addq (%rax), %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x2ea9
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x2eb1
movq %r15, %rdi
callq 0x59d4
movq %r13, %rdi
callq 0x2130
movq %rax, %r13
cmpq -0xa8(%rbp), %rax
jne 0x2d3d
movq -0x48(%rbp), %rax
incl %eax
movq %rax, -0x48(%rbp)
movq %r14, %rdi
callq 0x2130
cmpq %r13, %rax
jne 0x2bc9
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r12
cmpq %rbx, %r12
je 0x2f10
movq %rbx, %r14
movq %r14, %rdi
callq 0x5318
addq $0x30, %r14
cmpq %r12, %r14
jne 0x2ef7
movq -0x30(%rbp), %rax
movq %rbx, 0x8(%rax)
leaq -0xc0(%rbp), %rdi
callq 0x52ba
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f32
jmp 0x2f32
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x52ba
movq %rbx, %rdi
callq 0x2340