// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/listSpanningTrees.c
// Function: _rec
struct ShallowGraph* __rec(int d, struct Graph* graph, struct Graph* partialTree, int* components, int n, struct ShallowGraphPool* sgp, struct GraphPool* gp) {

	struct VertexList* e;
	struct ShallowGraph* result1;
	struct ShallowGraph* result2;
	struct ShallowGraph* B;
	struct ShallowGraph* bridges;
	struct ShallowGraph* graphEdges = __getGraphAndNonGraphEdges(partialTree, getGraphEdges(graph, sgp), sgp);
	struct ShallowGraph* rest = graphEdges->next;

	if (rest->m == 0) {
		struct ShallowGraph* tree = getGraphEdges(partialTree, sgp);
		tree->next = tree->prev = tree;

		/* garbage collection */
		dumpShallowGraphCycle(sgp, graphEdges);

		return tree;
	}
	/* get edge that will be included and excluded in this __recursive step */
	e = popEdge(rest);

	/* add e to partialTree (already contained in graph) to find spanning trees containing e */
	addEdgeBetweenVertices(e->startPoint->number, e->endPoint->number, e->label, partialTree, gp);

	/* S1 */
	/* let B be the set of all edges (in graph) joining edges already connected in partialTree */
	B = __selectB(partialTree, rest, components, n, sgp);

	/* ensures, that adding an edge of graph to partialTree results in a tree in the __recursive call */
	deleteEdges(graph, B, gp);

	result1 = __rec(d+1, graph, partialTree, components, n, sgp, gp);

	/* add edges to graph again */
	addEdges(graph, B, gp);

	/* preliminary garbage collection */
	dumpShallowGraphCycle(sgp, B);

	/* delete e from partialTree and graph to find spanning trees not containing e */
	deleteEdgeBetweenVertices(graph, e, gp);
	deleteEdgeBetweenVertices(partialTree, e, gp);

	/* S2 */
	bridges = __getNonTreeBridges(graph, partialTree, sgp);

	addEdges(partialTree, bridges, gp);
	result2 = __rec(d+1, graph, partialTree, components, n, sgp, gp);

	deleteEdges(partialTree, bridges, gp);

	/* At the end, spanningTree and graph need to be same as in the beginning. */
	addEdgeBetweenVertices(e->startPoint->number, e->endPoint->number, e->label, graph, gp);

	/* garbage collection */
	dumpVertexList(sgp->listPool, e);
	dumpShallowGraphCycle(sgp, bridges);
	dumpShallowGraphCycle(sgp, graphEdges);

	return addComponent(result1, result2);
}

// Assembly:
subq $0x88, %rsp
movq 0x90(%rsp), %rax
movl %edi, 0x7c(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movl %r8d, 0x5c(%rsp)
movq %r9, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xb530
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
callq 0x12830
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x12b11
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xb530
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x20000
movq 0x10(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x12d0c
movq 0x18(%rsp), %rdi
callq 0xbef0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x18(%rax), %edi
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %esi
movq 0x48(%rsp), %rax
movq (%rax), %rdx
movq 0x68(%rsp), %rcx
movq 0x90(%rsp), %r8
callq 0xb670
movq 0x68(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl 0x5c(%rsp), %ecx
movq 0x50(%rsp), %r8
callq 0x12660
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xac50
movl 0x7c(%rsp), %edi
addl $0x1, %edi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movl 0x5c(%rsp), %r8d
movq 0x50(%rsp), %r9
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
callq 0x12a50
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xb750
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x20000
movq 0x70(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xaba0
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xaba0
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x12960
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xb750
movl 0x7c(%rsp), %edi
addl $0x1, %edi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movl 0x5c(%rsp), %r8d
movq 0x50(%rsp), %r9
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
callq 0x12a50
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0xac50
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x18(%rax), %edi
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %esi
movq 0x48(%rsp), %rax
movq (%rax), %rdx
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %r8
callq 0xb670
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x1f410
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x20000
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x20000
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xbd60
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopl (%rax)