// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/iterativeSubtreeIsomorphism.c
// Function: noniterativeRootedSubtreeCheck_intern
static struct Vertex* noniterativeRootedSubtreeCheck_intern(struct SubtreeIsoDataStore* current, struct Vertex* hRoot, struct GraphPool* gp) {

	struct Graph* g = current->g;
	struct Graph* h = current->h;

	struct CachedGraph* cachedB = initCachedGraph(gp, h->n);

	current->foundIso = 0;
	for (int vi=0; vi<g->n; ++vi) {
		struct Vertex* v = g->vertices[current->postorder[vi]];

		for (int ui=0; ui<h->n; ++ui) {
			struct Vertex* u = h->vertices[ui];

			// check if vertex labels match
			if (labelCmp(u->label, v->label) != 0) { continue; }

			// compute maximum matching
			struct Graph* B = makeBipartiteInstanceFromVerticesCached(*current, cachedB, u, u, v, gp);
			int sizeofMatching = bipartiteMatchingEvenMoreDirty(B);
			int nNeighbors = B->number;

			// is there a subgraph iso here?
			if (sizeofMatching == nNeighbors) {
				addCharacteristic(current, u, u, v);

				if (u == hRoot) {
					current->foundIso = 1;

					returnCachedGraph(cachedB);
					dumpCachedGraph(cachedB);
					return v; // early termination when subtree iso is found
				}
			}

			// compute partial subgraph isomorphisms
			if (sizeofMatching == nNeighbors - 1) {
				addNoncriticalVertexCharacteristics(current, B, u, v);
			}

			returnCachedGraph(cachedB);
		}
	}

	dumpCachedGraph(cachedB);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdi, %r13
movq 0x8(%rdi), %rbx
movq 0x10(%rdi), %r12
movl (%r12), %esi
movq %rdx, 0x60(%rsp)
movq %rdx, %rdi
callq 0x1f1c
movq %rax, %r14
andl $0x0, 0x20(%r13)
xorl %edx, %edx
movq %rax, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movq %r12, 0x58(%rsp)
movslq (%rbx), %rax
cmpq %rax, %rdx
jge 0x8949
movq 0x10(%rbx), %rax
movq (%r13), %rcx
movq %rdx, 0x48(%rsp)
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %rbx
xorl %r15d, %r15d
movq %rbx, 0x30(%rsp)
movslq (%r12), %rax
cmpq %rax, %r15
jge 0x8904
movq 0x10(%r12), %rax
movq (%rax,%r15,8), %rbp
movq (%rbp), %rdi
movq (%rbx), %rsi
callq 0x19340
testl %eax, %eax
jne 0x88fc
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq 0x60(%rsp), %r8
callq 0x7bb7
movq %rax, %r12
movq %rax, %rdi
callq 0x1aac
movl %eax, %r14d
movq %r13, %rbx
movl 0x8(%r12), %r13d
cmpl %r13d, %eax
jne 0x88c9
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbp, %rdx
movq 0x30(%rsp), %rcx
callq 0x13402
cmpq 0x50(%rsp), %rbp
je 0x8916
decl %r13d
cmpl %r13d, %r14d
movq %rbx, %r13
movq 0x30(%rsp), %rbx
jne 0x88ea
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x8461
movq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x1fd4
movq 0x58(%rsp), %r12
incq %r15
jmp 0x8838
movq 0x48(%rsp), %rdx
incq %rdx
movq 0x40(%rsp), %rbx
jmp 0x880f
movl $0x1, 0x20(%rbx)
movq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x1fd4
movq 0x30(%rsp), %rbx
movq %r14, %rdi
callq 0x2032
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x892f