// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForRelImportantTrees
struct IntSet* bfsEmbeddingForRelImportantTrees(struct Graph* g, struct EvaluationPlan p, double importance, 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;
	}

	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 = isImportantSubtreeRelative(g, pattern, importance, gp);
			++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);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movq %rdi, 0x40(%rsp)
leaq 0x90(%rsp), %r15
movq (%r15), %r14
movslq (%r14), %rax
testq %rax, %rax
jle 0x1c05
movq 0x8(%r15), %rdx
movq 0x10(%r14), %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 0x1bed
movq %rbx, %rdi
callq 0x14aae
movq %rax, %r12
movq 0x10(%r14), %rax
movq (%rax), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x1c40
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1e8ac
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
jmp 0x1c1b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1e8d5
xorl %ebp, %ebp
testq %rax, %rax
je 0x1d55
movq %rax, %r13
movq (%r15), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
andl $0x0, 0x28(%r13)
movl 0x1c(%r13), %eax
testl %eax, %eax
je 0x1c85
cmpl $0x1, %eax
sete %r14b
jmp 0x1d0a
movq (%r13), %rsi
movq 0x40(%rsp), %rdi
movsd 0x48(%rsp), %xmm0
movq 0x50(%rsp), %rdx
callq 0x98cc
movl %eax, %r14d
incl %ebp
movslq 0x18(%r13), %rax
testb %r14b, %r14b
je 0x1cdc
movq 0x38(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15417
jmp 0x1d0a
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15484
testb %r14b, %r14b
je 0x1d3e
movq 0x8(%r13), %r14
testq %r14, %r14
je 0x1d3e
movq 0x18(%r14), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x1d38
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1e8ac
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
jmp 0x1d13
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1e8d5
movq %rax, %r13
testq %rax, %rax
jne 0x1c6c
movq 0x2b29c(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1e2d0(%rip), %rsi     # 0x20036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15543