// File: /workspace/github_cpp_makefile_star2_O3/rtackx[P]ComSim/projection.cpp
// Function: Projection::get_intersection(Node*&, Node*&) const
set<Node*> Projection::get_intersection(Node*& node1, Node*& node2) const
{
	vector<Node*> set_node1, set_node2;
	vector<Node*> neighbors_node1, neighbors_node2;

	neighbors_node1.reserve(node1->nb_neighbors);
	neighbors_node2.reserve(node2->nb_neighbors);
	for(auto k : node1->neighbor_weights)
		neighbors_node1.push_back(k.first);
	for(auto k : node2->neighbor_weights)
		neighbors_node2.push_back(k.first);

	set<Node*> intersection;

	sort(neighbors_node1.begin(), neighbors_node1.end());
	sort(neighbors_node2.begin(), neighbors_node2.end());

	set_intersection(neighbors_node1.begin(), neighbors_node1.end(),
					 neighbors_node2.begin(), neighbors_node2.end(),
					 inserter(intersection, intersection.begin()));

	return intersection;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x20(%rsp), %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq (%rdx), %rax
movl 0x28(%rax), %esi
callq 0x645c
movq (%r14), %rax
movl 0x28(%rax), %esi
movq %rsp, %rdi
callq 0x645c
movq (%r15), %rax
movq 0x40(%rax), %r13
testq %r13, %r13
je 0x5b63
leaq 0x20(%rsp), %r15
leaq 0x40(%rsp), %r12
movups 0x8(%r13), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x5b4f
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0x5b5a
movq %r15, %rdi
movq %r12, %rdx
callq 0x69c8
movq (%r13), %r13
testq %r13, %r13
jne 0x5b29
movq (%r14), %rax
movq 0x40(%rax), %r12
testq %r12, %r12
je 0x5bb2
movq %rsp, %r14
leaq 0x40(%rsp), %r15
movups 0x8(%r12), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x5b9e
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x5ba9
movq %r14, %rdi
movq %r15, %rdx
callq 0x69c8
movq (%r12), %r12
testq %r12, %r12
jne 0x5b77
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
cmpq %r15, %r14
je 0x5c0b
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x6cb2
movq %r14, %rdi
movq %r15, %rsi
callq 0x6d9b
movq (%rsp), %r15
movq 0x8(%rsp), %r14
cmpq %r14, %r15
je 0x5c4f
movq %r14, %rax
subq %r15, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6cb2
movq %r15, %rdi
movq %r14, %rsi
callq 0x6d9b
movq (%rsp), %r15
movq 0x8(%rsp), %r14
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rbx), %r9
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x70e9
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5c79
callq 0x2220
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5c88
callq 0x2220
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5caa
movq %rax, %r14
movq %rbx, %rdi
callq 0x64ee
jmp 0x5cad
jmp 0x5caa
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5cbb
callq 0x2220
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5cca
callq 0x2220
movq %r14, %rdi
callq 0x23d0