// File: /workspace/github_c_makefile_star2_O1/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 $0xb8, %rsp
movq %rcx, %r14
movq %rdx, 0x40(%rsp)
movl %esi, %ebp
movq %rdi, %r12
leaq 0xf0(%rsp), %rbx
movq (%rbx), %r13
movslq (%r13), %rax
testq %rax, %rax
jle 0x1794
movq 0x8(%rbx), %rdx
movq 0x10(%r13), %rcx
movq 0x10(%rdx), %rdx
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
andl $0x0, 0x1c(%rdi)
movq (%rdx,%rsi,8), %rdi
andl $0x0, 0x1c(%rdi)
incq %rsi
cmpq %rsi, %rax
jne 0x177c
movq %r14, %rdi
callq 0x14aae
movq %rax, %r15
movq 0x10(%r13), %rax
movq (%rax), %rax
movq 0x8(%rax), %r13
testq %r13, %r13
je 0x17cf
movq 0x18(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1e8ac
movq 0x18(%r13), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r13), %r13
jmp 0x17aa
leaq 0x90(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe85c
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x58(%rsp), %rdi
pushq $0x1
popq %rdx
movl %ebp, %esi
movq 0x40(%rsp), %rcx
movq %r14, %r8
callq 0xf05d
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e8d5
xorl %ebp, %ebp
testq %rax, %rax
je 0x1953
movq %rax, %r13
movq (%rbx), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x50(%rsp)
xorl %ebp, %ebp
andl $0x0, 0x28(%r13)
movl 0x1c(%r13), %eax
testl %eax, %eax
je 0x185d
cmpl $0x1, %eax
sete %r12b
jmp 0x1905
movq (%r13), %rsi
leaq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rdx
callq 0xfadf
movl %eax, %r12d
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups 0x78(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0xf483
incl %ebp
movslq 0x18(%r13), %rax
testb %r12b, %r12b
je 0x18da
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15417
jmp 0x1905
movq 0x48(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15484
testb %r12b, %r12b
je 0x193c
movq 0x8(%r13), %r12
testq %r12, %r12
je 0x193c
movq 0x18(%r12), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x1935
movq %r15, %rsi
movq %r14, %rdx
callq 0x1e8ac
movq 0x18(%r12), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r12), %r12
jmp 0x190e
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e8d5
movq %rax, %r13
testq %rax, %rax
jne 0x1844
movq 0x2b69e(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1e6d2(%rip), %rsi     # 0x20036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups 0x78(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x40(%rsp), %rdi
callq 0xf502
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15543
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq