// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/treeKernels.c
// Function: recSubtreeEnum
void recSubtreeEnum(struct Graph* current, struct ShallowGraph* forbiddenEdges, struct ShallowGraph* allEdges, int* number, struct ShallowGraphPool* sgp) {
	struct VertexList* e;
	struct VertexList* startOfForbidden = forbiddenEdges->edges;

	for (e=allEdges->edges; e; e=e->next) {

		/* check if e is in forbiddenEdges */
		struct VertexList* idx;
		char allowed = 1;
		for (idx=forbiddenEdges->edges; idx; idx=idx->next) {
			/* if edge is forbidden */
			if (((e->startPoint == idx->startPoint) && (e->endPoint == idx->endPoint))
					|| ((e->startPoint == idx->endPoint) && (e->endPoint == idx->startPoint))) {
				allowed = 0;
				break;
			}
		}

		/* if its not, list current + e and continue recursively */
		if (allowed) {

			int v = e->startPoint->number;
			int w = e->endPoint->number;

			/* if adding e produces a tree, list that tree and continue recursively
			 * this assumes, that t is a tree */
			if ((current->m == 0)
					|| ((current->vertices[v]->neighborhood != NULL) && (current->vertices[w]->neighborhood == NULL))
					|| ((current->vertices[w]->neighborhood != NULL) && (current->vertices[v]->neighborhood == NULL))) {
				struct VertexList* tmp;

				addEdge(current->vertices[v], shallowCopyEdge(e, sgp->listPool));
				addEdge(current->vertices[w], inverseEdge(e, sgp->listPool));

				++current->m;

				/* here, output is produced */
				++(*number);

				/* recursive call for (T + e, F) */
				recSubtreeEnum(current, forbiddenEdges, allEdges, number, sgp);

				/* remove edge from current, add it to forbidden list */
				tmp = current->vertices[v]->neighborhood;
				current->vertices[v]->neighborhood = tmp->next;
				dumpVertexList(sgp->listPool, tmp);

				tmp = current->vertices[w]->neighborhood;
				current->vertices[w]->neighborhood = tmp->next;
				dumpVertexList(sgp->listPool, tmp);

				--current->m;

				pushEdge(forbiddenEdges, shallowCopyEdge(e, sgp->listPool));

				recSubtreeEnum(current, forbiddenEdges, allEdges, number, sgp);

				break;

			}
		}
	}

	/* reallow all edges that were forbidden in the current recursion */
	for (e=forbiddenEdges->edges; e!=startOfForbidden; e=forbiddenEdges->edges) {
		dumpVertexList(sgp->listPool, popEdge(forbiddenEdges));
	}
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x31f77
movb $0x1, 0x37(%rsp)
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x31d26
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x31ce5
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0x31d0d
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x31d14
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x31d14
movb $0x0, 0x37(%rsp)
jmp 0x31d26
jmp 0x31d16
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x31cb5
cmpb $0x0, 0x37(%rsp)
je 0x31f62
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x18(%rax), %eax
movl %eax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x70(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x31dc8
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x31d8e
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x31dc8
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x31f60
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
jne 0x31f60
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa310
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xa660
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa370
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xa660
movq 0x70(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq 0x58(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
callq 0x31c60
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x30(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x1f410
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x2c(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x1f410
movq 0x70(%rsp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa310
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xb610
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
callq 0x31c60
jmp 0x31f77
jmp 0x31f62
jmp 0x31f64
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x31c97
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x31fc2
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
callq 0xbef0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x1f410
movq 0x68(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x31f84
addq $0x78, %rsp
retq
nopw (%rax,%rax)