// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForAbsImportantTrees
struct IntSet* bfsEmbeddingForAbsImportantTrees(struct Graph* g, struct EvaluationPlan p, size_t 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 = isImportantSubtreeAbsolute(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 %rcx, %rbx
movq %rdx, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdi, 0x40(%rsp)
leaq 0x90(%rsp), %r12
movq (%r12), %r14
movslq (%r14), %rax
testq %rax, %rax
jle 0x1a2c
movq 0x8(%r12), %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 0x1a14
movq %rbx, %rdi
callq 0x14aae
movq %rax, %r13
movq 0x10(%r14), %rax
movq (%rax), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x1a67
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1e8ac
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
jmp 0x1a42
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1e8d5
xorl %ebp, %ebp
testq %rax, %rax
je 0x1b7e
movq %rax, %r14
movq (%r12), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r12), %rax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
andl $0x0, 0x28(%r14)
movl 0x1c(%r14), %eax
testl %eax, %eax
je 0x1aae
cmpl $0x1, %eax
sete %r15b
jmp 0x1b37
movq (%r14), %rsi
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
callq 0x98ba
movl %eax, %r15d
incl %ebp
movslq 0x18(%r14), %rax
testb %r15b, %r15b
je 0x1b06
movq 0x38(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15417
jmp 0x1b37
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15484
testb %r15b, %r15b
jne 0x1b5e
jmp 0x1b67
movq 0x18(%r14), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x1b5e
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1e8ac
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1b3e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1e8d5
movq %rax, %r14
testq %rax, %rax
jne 0x1a95
movq 0x2b473(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1e4a7(%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