// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForLocalEasy
struct IntSet* bfsEmbeddingForLocalEasy(struct Graph* g, struct EvaluationPlan p, int nLocalTrees, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	// add minimal elements to border
	struct ShallowGraph* border = getShallowGraph(sgp);
	for (struct VertexList* e=p.poset->vertices[0]->neighborhood; e!=NULL; e=e->next) {
		addToVertexQueue(e->endPoint, border, sgp);
		e->endPoint->d = 1;
	}

	struct SpanningtreeTree sptTree = getSampledSpanningtreeTree(getBlockTreeT(g, sgp), nLocalTrees, 1, gp, sgp);

	for (struct Vertex* v=popFromVertexQueue(border, sgp); v!=NULL; v=popFromVertexQueue(border, sgp)) {
		v->d = 0;

		char match = 0;
		if (!embeddingValueKnown(v)) {
			struct Graph* pattern = (struct Graph*)(v->label);
			match = subtreeCheckForSpanningtreeTree(&sptTree, pattern, gp);
			wipeCharacteristicsForLocalEasy(sptTree);
			++nEvaluations;
			updateEvaluationPlan(p, v->number, match);
		} else {
			match = getMatch(v);
		}

		// add extensions of pattern to border
		if (match) {
			for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
				if (e->endPoint->d == 0) {
					addToVertexQueue(e->endPoint, border, sgp);
					e->endPoint->d = 1;
				}
			}
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	dumpSpanningtreeTree(sptTree, gp);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r14
movq %rdx, 0x40(%rsp)
movl %esi, %ebp
movq %rdi, %r12
leaq 0xe0(%rsp), %rbx
movq (%rbx), %r13
movq 0x8(%rbx), %rax
movl (%r13), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x1284f
movq 0x10(%r13), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
movq 0x10(%rax), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
incq %rdx
jmp 0x1282d
movq %r14, %rdi
callq 0x117e9
movq %rax, %r15
movq 0x10(%r13), %rax
movq (%rax), %r13
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x12886
movq 0x18(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ba70
movq 0x18(%r13), %rax
movl $0x1, 0x28(%rax)
jmp 0x12861
leaq 0x80(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xbe98
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rdx
movl %ebp, %esi
movq 0x40(%rsp), %rcx
movq %r14, %r8
callq 0xc605
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ba99
testq %rax, %rax
je 0x1299e
movq %rax, %r13
andl $0x0, 0x28(%rax)
movl 0x1c(%rax), %eax
testl %eax, %eax
je 0x128fc
cmpl $0x1, %eax
sete %r12b
jmp 0x12966
movq (%r13), %rsi
leaq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rdx
callq 0xcfbf
movl %eax, %r12d
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups 0x68(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0xc9af
incl %ebp
movl 0x18(%r13), %edi
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movsbl %r12b, %esi
callq 0x120b2
testb %r12b, %r12b
jne 0x12990
jmp 0x128d1
movq 0x18(%r13), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x12990
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ba70
movq 0x18(%r13), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x12970
jmp 0x128d1
movq 0x17653(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0xa687(%rip), %rsi      # 0x1d036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups 0x68(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x40(%rsp), %rdi
callq 0xca2f
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x121ee
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq