// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, 0x14(%rsp)
movl %edx, %r12d
movq %rsi, %r14
movq (%rsi), %r13
movq 0x8(%rsi), %r15
cmpq %r15, %r13
je 0x7791
movq %r15, %rax
subq %r13, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x7a18
movq %r13, %rdi
movq %r15, %rsi
callq 0x7b2f
leaq 0x20(%rsp), %rsi
movl %r12d, (%rsi)
movl %ebp, 0x4(%rsi)
movq %rbx, %rdi
callq 0x7122
movq %rax, 0x18(%rsp)
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
movl 0x14(%rsp), %esi
je 0x7923
movq 0x68(%rsp), %r12
movq 0x60(%rsp), %rdi
movq 0x18(%rsp), %r13
addq $0x8, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %rbp, %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %ebx
cmpl %esi, %ebx
jne 0x7806
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x7852
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x7861
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movq %r13, %rax
testq %rcx, %rcx
je 0x7830
movq %r13, %rax
xorl %edx, %edx
cmpl %ebx, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x781a
movq %r13, %rcx
cmpq %r13, %rax
je 0x7842
cmpl 0x20(%rax), %ebx
cmovlq %r13, %rax
movq %rax, %rcx
xorl %eax, %eax
cmpq %r13, %rcx
sete %al
addl %eax, %r15d
jmp 0x7905
movq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x7ebe
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%r12), %rsi
cmpq 0x10(%r12), %rsi
je 0x788f
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r12)
leaq 0x8(%rsp), %r12
jmp 0x789f
movq %r12, %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rdx
callq 0x7ebe
movq 0x4732(%rip), %rdi      # 0xbfd8
movl %ebp, %esi
callq 0x22e0
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2230
movq %rax, %rdi
movl %r15d, %esi
callq 0x22e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movl 0x14(%rsp), %esi
movq 0x68(%rsp), %r12
movq 0x60(%rsp), %rdi
cmpl %esi, %ebx
je 0x7923
incq %rbp
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rbp, %rcx
ja 0x77d2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq