// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x98, %rsp
leaq 0xa0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x90(%rsp)
movsd %xmm0, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x21020
movq 0x78(%rsp), %rdi
callq 0x1fe70
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x223d2
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x32870
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x28(%rax)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0x22392
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x328c0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x22516
movq 0x58(%rsp), %rax
movl $0x0, 0x28(%rax)
movb $0x0, 0x57(%rsp)
movq 0x58(%rsp), %rdi
callq 0x21090
cmpl $0x0, %eax
jne 0x22485
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
movsd 0x88(%rsp), %xmm0
movq 0x80(%rsp), %rdx
callq 0xd9c0
movq 0x38(%rsp), %rcx
movb %al, 0x57(%rsp)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
movq 0x58(%rsp), %rax
movl 0x18(%rax), %edi
movb 0x57(%rsp), %al
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movq %rsp, %rcx
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
movsbl %al, %esi
callq 0x210d0
jmp 0x22493
movq 0x58(%rsp), %rdi
callq 0x210b0
movb %al, 0x57(%rsp)
cmpb $0x0, 0x57(%rsp)
je 0x224fb
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x224f9
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x28(%rax)
jne 0x224e7
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x32870
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x28(%rax)
jmp 0x224e9
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x224a8
jmp 0x224fb
jmp 0x224fd
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x328c0
movq %rax, 0x58(%rsp)
jmp 0x223e6
movq 0x1badb(%rip), %rax     # 0x3dff8
movq (%rax), %rdi
movl 0x74(%rsp), %edx
leaq 0x12b0b(%rip), %rsi     # 0x35036
movb $0x0, %al
callq 0x1140
movq 0x38(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x21370
addq $0x98, %rsp
retq
nopl (%rax)