// File: /workspace/github_c_makefile_star2_O1/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 $0x78, %rsp
movq %rsi, 0x68(%rsp)
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rbp
movl (%rbp), %esi
movq %rdx, 0x70(%rsp)
movq %rdx, %rdi
callq 0x3c40
movq %rax, %rbx
movl $0x0, 0x20(%r14)
cmpl $0x0, (%r15)
setg 0x37(%rsp)
jle 0xaef1
xorl %edx, %edx
movq %rbx, 0x58(%rsp)
movq %r15, 0x40(%rsp)
movq %rbp, 0x50(%rsp)
movl $0x5, %ecx
cmpl $0x0, (%rbp)
jle 0xaed2
movq 0x10(%r15), %rax
movq (%r14), %rcx
movq %rdx, 0x48(%rsp)
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %r15
xorl %r12d, %r12d
movq %r15, 0x38(%rsp)
movq 0x10(%rbp), %rax
movq (%rax,%r12,8), %r13
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1bc18
movl $0x7, %ecx
testl %eax, %eax
jne 0xae67
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq 0x70(%rsp), %r8
callq 0x9ffd
movq %rax, %r15
movq %rax, %rdi
callq 0x373e
movq %r14, %rbp
movl %eax, %r14d
movl 0x8(%r15), %ebx
cmpl %ebx, %eax
jne 0xae31
movq %rbp, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq 0x38(%rsp), %rcx
callq 0x1635c
cmpq 0x68(%rsp), %r13
je 0xae82
decl %ebx
cmpl %ebx, %r14d
movq %rbp, %r14
jne 0xae4e
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq 0x38(%rsp), %rcx
callq 0xa941
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x3ce4
xorl %ecx, %ecx
movq 0x50(%rsp), %rbp
movq 0x38(%rsp), %r15
cmpl $0x7, %ecx
je 0xae70
testl %ecx, %ecx
jne 0xaec8
incq %r12
movslq (%rbp), %rax
cmpq %rax, %r12
jl 0xadac
jmp 0xaeb7
movl $0x1, 0x20(%rbp)
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x3ce4
movq %rbx, %rdi
callq 0x3d3f
movl $0x1, %ecx
movq 0x38(%rsp), %r15
movq %r15, 0x60(%rsp)
movq %rbp, %r14
movq 0x50(%rsp), %rbp
jmp 0xae67
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rdx
movl $0x5, %ecx
jmp 0xaed2
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rdx
cmpl $0x5, %ecx
je 0xaedb
testl %ecx, %ecx
jne 0xaef1
incq %rdx
movslq (%r15), %rax
cmpq %rax, %rdx
setl 0x37(%rsp)
jl 0xad81
jmp 0xaef1
testb $0x1, 0x37(%rsp)
movq 0x60(%rsp), %rax
jne 0xaf07
movq %rbx, %rdi
callq 0x3d3f
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq