// File: /workspace/github_cpp_makefile_star2_O3/KokiKishimoto[P]cp_decomposition/testcp.cpp
// Function: TestCP::generate_rank(std::vector<RankScore, std::allocator<RankScore>>&, int, int, int, std::map<std::pair<int, int>, std::set<int, std::less<int>, std::allocator<int>>, std::less<std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int> const, std::set<int, std::less<int>, std::allocator<int>>>>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
void generate_rank(std::vector<RankScore>& scores_ent, int relation, int ent1, int ent2, std::map<Key, std::set<int> >& entSet, std::vector<double>& rank, std::vector<double>& rank_filter){
		std::sort(scores_ent.begin(), scores_ent.end());
		Key k_e(relation, ent2);
		const std::set<int>& hypo_e = entSet[k_e];
		int k = 0;
		for (int i=0; i<scores_ent.size(); ++i) {
			RankScore& re = scores_ent[i];
			if (re.id == ent1) {
				rank.push_back(i);
				rank_filter.push_back(k);
				std::cout << i << ' ' << k << std::endl;
				break;
			}
			if (hypo_e.find(re.id) == hypo_e.end()) {
				++k;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movl %r8d, %r12d
movl %ecx, %ebp
movq %rsi, %rbx
movq (%rsi), %r13
movq 0x8(%rsi), %r14
cmpq %r14, %r13
je 0x75da
movq %r14, %rax
subq %r13, %rax
sarq $0x4, %rax
movl %edx, 0xc(%rsp)
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x782a
movq %r13, %rdi
movq %r14, %rsi
callq 0x7941
movl 0xc(%rsp), %edx
leaq 0x10(%rsp), %rsi
movl %edx, (%rsi)
movl %r12d, 0x4(%rsi)
movq %r15, %rdi
callq 0x6f90
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
je 0x7739
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %rdi
sarq $0x4, %rdx
movq 0x10(%rax), %rsi
addq $0x8, %rax
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r15, %r8
shlq $0x4, %r8
movl 0x8(%rcx,%r8), %r8d
cmpl %ebp, %r8d
je 0x768a
testq %rsi, %rsi
je 0x7674
movq %rsi, %r10
movq %rax, %r9
xorl %r11d, %r11d
cmpl %r8d, 0x20(%r10)
setl %r11b
cmovgeq %r10, %r9
movq 0x10(%r10,%r11,8), %r10
testq %r10, %r10
jne 0x763c
movq %rax, %r10
cmpq %rax, %r9
je 0x7668
cmpl 0x20(%r9), %r8d
cmovlq %rax, %r9
movq %r9, %r10
xorl %r8d, %r8d
cmpq %rax, %r10
sete %r8b
jmp 0x767a
movl $0x1, %r8d
addl %r8d, %ebx
incq %r15
cmpq %rdx, %r15
jne 0x7620
jmp 0x7739
cvtsi2sd %r15d, %xmm0
movsd %xmm0, (%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x76ac
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x76b4
movq %rsp, %rdx
callq 0x7cc2
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, (%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x76d8
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
jmp 0x76e3
movq %rsp, %rdx
movq %r14, %rdi
callq 0x7cc2
movq 0x38ee(%rip), %rdi      # 0xafd8
movl %r15d, %esi
callq 0x22e0
movq %rsp, %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
movl %ebx, %esi
callq 0x22e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq