// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/iterativeSubtreeIsomorphism.c
// Function: iterativeSubtreeCheck_intern
static void iterativeSubtreeCheck_intern(struct SubtreeIsoDataStore base, struct SubtreeIsoDataStore* current, struct GraphPool* gp) {

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

	// new vertex and adjacent one
	struct Vertex* b = h->vertices[h->n - 1];
	struct Vertex* a = b->neighborhood->endPoint;

	int* parentsHa = getParents(h, a->number); // move out / rewrite

	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]];

		// add new characteristics
		if (containsCharacteristic(base, a, a, v)) {
			addCharacteristic(current, b, a, v);
		}
		if (labelCmp(v->label, b->label) == 0) {
			addCharacteristic(current, a, b, v);

			// optimized version of computeCharacteristic(*current, b, b, v, gp);
			for (struct VertexList* e=v->neighborhood; e!= NULL; e=e->next) {
				if (labelCmp(e->label, b->neighborhood->label) == 0) {
					// check if e->endPoint is not the parent of v
					if (e->endPoint->number != v->lowPoint) {
						if (containsCharacteristic(*current, b, a, e->endPoint)) {
							addCharacteristic(current, b, b, v);
							current->foundIso = 1;
							break;
						}
					}
				}
			}
		}

		// filter existing characteristics
		for (int ui=0; ui<h->n-1; ++ui) {
			struct Vertex* u = h->vertices[ui];
#ifndef BITCUBE
#ifdef INTCUBE
			int* oldCharacteristics = rawCharacteristics(base, u, v);
#endif
#ifdef BYTECUBE
			uint8_t* oldCharacteristics = rawCharacteristics(base, u, v);
#endif
			for (int yi=1; yi<=oldCharacteristics[0]; ++yi) {
				struct Vertex* y = h->vertices[oldCharacteristics[yi]];
				if (y->number == parentsHa[u->number]) { // might be a problem for y == a ?
					addCharacteristic(current, y, u, v);
				} else {
					int yuCharacteristic = computeCharacteristicCached(*current, cachedB, y, u, v, gp);
					if (yuCharacteristic) {
						addCharacteristic(current, y, u, v);
						if (y == u) {
							current->foundIso = 1;
						}
					}
				}
			}
#else
			// cache computation. yes, this makes a difference! hottest part of this code is checking if a characteristic exists in base.
			size_t cubeOffset = (v->number * base.h->n + u->number) * base.h->n;
			if (getBit(base.S, cubeOffset + u->number)) {
				int uuCharacteristic = computeCharacteristicCached(*current, cachedB, u, u, v, gp);
				if (uuCharacteristic) {
					addCharacteristic(current, u, u, v);
					current->foundIso = 1;
				}
			}
			for (struct VertexList* e=u->neighborhood; e!=NULL; e=e->next) {
				struct Vertex* y = e->endPoint;
				if (y == b) { continue; } // already dealt with above
				if (!getBit(base.S, cubeOffset + y->number)) { continue; } // this is the whole point of this algorithm
				if (y->number == parentsHa[u->number]) { // might be a problem for y == a ?
					addCharacteristic(current, y, u, v);
				} else {
					int yuCharacteristic = computeCharacteristicCached(*current, cachedB, y, u, v, gp);
					if (yuCharacteristic) {
						addCharacteristic(current, y, u, v);
					}
				}
			}
#endif
		}
	}

	free(parentsHa);
	dumpCachedGraph(cachedB);
}

// Assembly:
subq $0xc8, %rsp
leaq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa8(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x98(%rsp), %rax
movl 0x18(%rax), %esi
callq 0xed60
movq %rax, 0x90(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xa8(%rsp), %rax
movl (%rax), %esi
callq 0x2bb0
movq %rax, 0x88(%rsp)
movq 0xc0(%rsp), %rax
movl $0x0, 0x20(%rax)
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
movq 0xb0(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xf363
movq 0x30(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xc0(%rsp), %rdx
movq (%rdx), %rdx
movslq 0x84(%rsp), %rsi
movslq (%rdx,%rsi,4), %rdx
movq (%rax,%rdx,8), %rax
movq %rax, 0x78(%rsp)
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x20(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x22fd0
cmpl $0x0, %eax
je 0xefe7
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0xa0(%rsp), %rax
movq (%rax), %rsi
callq 0x2dcf0
cmpl $0x0, %eax
jne 0xf111
movq 0xc0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0xf10f
movq 0x70(%rsp), %rax
movq (%rax), %rdi
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0x2dcf0
cmpl $0x0, %eax
jne 0xf0fa
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %eax
movq 0x78(%rsp), %rcx
cmpl 0x20(%rcx), %eax
je 0xf0f8
movq 0xc0(%rsp), %rcx
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x22fd0
cmpl $0x0, %eax
je 0xf0f6
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
movq 0xc0(%rsp), %rax
movl $0x1, 0x20(%rax)
jmp 0xf10f
jmp 0xf0f8
jmp 0xf0fa
jmp 0xf0fc
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xf038
jmp 0xf111
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movq 0xa8(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xf34b
movq 0x30(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x6c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x60(%rsp)
movq 0x78(%rsp), %rcx
movl 0x18(%rcx), %ecx
movq 0x10(%rax), %rdx
imull (%rdx), %ecx
movq 0x60(%rsp), %rdx
addl 0x18(%rdx), %ecx
movq 0x10(%rax), %rdx
imull (%rdx), %ecx
movslq %ecx, %rcx
movq %rcx, 0x58(%rsp)
movq 0x18(%rax), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rax
movslq 0x18(%rax), %rax
addq %rax, %rsi
callq 0x27d0
cmpb $0x0, %al
je 0xf214
movq 0xc0(%rsp), %r9
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0xb8(%rsp), %r8
movq 0x20(%r9), %r10
movq %rsp, %rax
movq %r10, 0x20(%rax)
movups (%r9), %xmm0
movups 0x10(%r9), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe910
movl %eax, 0x54(%rsp)
cmpl $0x0, 0x54(%rsp)
je 0xf212
movq 0xc0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
movq 0xc0(%rsp), %rax
movl $0x1, 0x20(%rax)
jmp 0xf214
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0xf339
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jne 0xf250
jmp 0xf326
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x58(%rsp), %rsi
movq 0x40(%rsp), %rax
movslq 0x18(%rax), %rax
addq %rax, %rsi
callq 0x27d0
cmpb $0x0, %al
jne 0xf278
jmp 0xf326
movq 0x40(%rsp), %rax
movl 0x18(%rax), %eax
movq 0x90(%rsp), %rcx
movq 0x60(%rsp), %rdx
movslq 0x18(%rdx), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0xf2b4
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
jmp 0xf324
movq 0xc0(%rsp), %r9
movq 0x88(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0xb8(%rsp), %r8
movq 0x20(%r9), %r10
movq %rsp, %rax
movq %r10, 0x20(%rax)
movups (%r9), %xmm0
movups 0x10(%r9), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe910
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0xf322
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x23040
jmp 0xf324
jmp 0xf326
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0xf222
jmp 0xf33b
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0xf119
jmp 0xf34d
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0xef45
movq 0x90(%rsp), %rdi
callq 0x1030
movq 0x88(%rsp), %rdi
callq 0x2db0
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)