// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/iterativeSubtreeIsomorphism.c
// Function: noniterativeSubtreeCheck_intern
static void noniterativeSubtreeCheck_intern(struct SubtreeIsoDataStore* current, 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);
				current->foundIso = 1;

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

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

			returnCachedGraph(cachedB);
		}
	}

	dumpCachedGraph(cachedB);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rax
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rbx
movl (%rbx), %esi
movq %rax, 0x40(%rsp)
movq %rax, %rdi
callq 0x3c40
movq %rax, %rbp
movl $0x0, 0x20(%r14)
movq %r15, 0x28(%rsp)
cmpl $0x0, (%r15)
jle 0xabd8
xorl %edx, %edx
movq %rbx, 0x30(%rsp)
cmpl $0x0, (%rbx)
movq %rdx, 0x38(%rsp)
jle 0xabb1
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq (%r14), %rcx
movslq (%rcx,%rdx,4), %rcx
movq (%rax,%rcx,8), %r12
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %r13
movq (%r13), %rdi
movq (%r12), %rsi
callq 0x1bc18
movl $0x7, %ecx
testl %eax, %eax
jne 0xab99
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq 0x40(%rsp), %r8
callq 0x9ffd
movq %r14, %rbx
movq %rbp, %r14
movq %rax, %rbp
movq %rax, %rdi
callq 0x373e
movl 0x8(%rbp), %ecx
cmpl %ecx, %eax
jne 0xab6d
movq %rbx, %rdi
movq %r13, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x1635c
movl $0x1, 0x20(%rbx)
movq %r14, %rdi
callq 0x3ce4
movq %r14, %rdi
callq 0x3d3f
movl $0x1, %ecx
movq %r14, %rbp
jmp 0xab91
decl %ecx
cmpl %ecx, %eax
jne 0xab84
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0xa941
movq %r14, %rbp
movq %r14, %rdi
callq 0x3ce4
xorl %ecx, %ecx
movq %rbx, %r14
movq 0x30(%rsp), %rbx
cmpl $0x7, %ecx
je 0xaba2
testl %ecx, %ecx
jne 0xabb6
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0xaad0
movl $0x5, %ecx
cmpl $0x5, %ecx
je 0xabbf
testl %ecx, %ecx
jne 0xabee
movq 0x38(%rsp), %rdx
incq %rdx
movq 0x28(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %rdx
jl 0xaaab
movq %rbp, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3d3f
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq