// File: /workspace/github_c_makefile_star2_O3/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 0x1ba5
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 0x1b8d
movq %rbx, %rdi
callq 0x1498d
movq %rax, %r12
movq 0x10(%r14), %rax
movq (%rax), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x1be0
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1e6f0
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
jmp 0x1bbb
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1e719
xorl %ebp, %ebp
testq %rax, %rax
je 0x1cf5
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 0x1c25
cmpl $0x1, %eax
sete %r14b
jmp 0x1caa
movq (%r13), %rsi
movq 0x40(%rsp), %rdi
movsd 0x48(%rsp), %xmm0
movq 0x50(%rsp), %rdx
callq 0x98d8
movl %eax, %r14d
incl %ebp
movslq 0x18(%r13), %rax
testb %r14b, %r14b
je 0x1c7c
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 0x15312
jmp 0x1caa
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 0x1537f
testb %r14b, %r14b
je 0x1cde
movq 0x8(%r13), %r14
testq %r14, %r14
je 0x1cde
movq 0x18(%r14), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x1cd8
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1e6f0
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
jmp 0x1cb3
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1e719
movq %rax, %r13
testq %rax, %rax
jne 0x1c0c
movq 0x2b2fc(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1e330(%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 0x1543e