// File: /workspace/github_cpp_makefile_star2_O1/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 0x6492
movq (%r14), %rax
movl 0x28(%rax), %esi
movq %rsp, %rdi
callq 0x6492
movq (%r15), %rax
movq 0x40(%rax), %r13
testq %r13, %r13
je 0x5bdd
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 0x5bc9
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0x5bd4
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a20
movq (%r13), %r13
testq %r13, %r13
jne 0x5ba3
movq (%r14), %rax
movq 0x40(%rax), %r12
testq %r12, %r12
je 0x5c2c
movq %rsp, %r14
leaq 0x40(%rsp), %r15
movups 0x8(%r12), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x5c18
movq 0x40(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x5c23
movq %r14, %rdi
movq %r15, %rdx
callq 0x6a20
movq (%r12), %r12
testq %r12, %r12
jne 0x5bf1
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 0x5c85
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 0x6d42
movq %r14, %rdi
movq %r15, %rsi
callq 0x6e2b
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r15, %r14
je 0x5cc0
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 0x6d42
movq %r14, %rdi
movq %r15, %rsi
callq 0x6e2b
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
movq 0x18(%rbx), %r9
movq %rbx, %r8
callq 0x71f5
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5ced
callq 0x2220
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5cfc
callq 0x2220
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5d1e
movq %rax, %r14
movq %rbx, %rdi
callq 0x6520
jmp 0x5d21
jmp 0x5d1e
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5d2f
callq 0x2220
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5d3e
callq 0x2220
movq %r14, %rdi
callq 0x23d0