// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/localEasySubtreeIsomorphism.c
// Function: getFullSpanningtreeTree
struct SpanningtreeTree getFullSpanningtreeTree(struct BlockTree blockTree, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct SpanningtreeTree sptTree = {0,0,0,0,0,0,0};
	sptTree.g = blockTree.g;
	sptTree.nRoots = blockTree.nRoots;
	sptTree.roots = blockTree.roots;
	sptTree.parents = blockTree.parents;
	sptTree.localSpanningTrees = malloc(sptTree.nRoots * sizeof(struct Graph*));
	sptTree.localPostorders = malloc(sptTree.nRoots * sizeof(struct PostorderList*));

	for (int v=0; v<sptTree.nRoots; ++v) {
		struct ShallowGraph* mergedEdges = mergeShallowGraphs(blockTree.vRootedBlocks[v], sgp);
		// TODO make destructive. shallowGraphs are not used afterwards.
		struct Graph* mergedGraph = blockConverter(mergedEdges, gp);

		struct ShallowGraph* shallowSpanningtrees = listSpanningTrees(mergedGraph, sgp, gp);
		sptTree.localSpanningTrees[v] = spanningTreeConverter(shallowSpanningtrees, mergedGraph, gp, sgp);

		sptTree.localPostorders[v] = NULL;
		struct PostorderList* tail = NULL;
		for (struct Graph* localSpanningTree=sptTree.localSpanningTrees[v]; localSpanningTree!=NULL; localSpanningTree=localSpanningTree->next) {
			struct PostorderList* tmp = __getPOL();
			tmp->postorder = getPostorder(localSpanningTree, 0);
			if (sptTree.localPostorders[v] == NULL) {
				sptTree.localPostorders[v] = tail = tmp;
			} else {
				// append at the end of the list
				tail->next = tmp;
				tail = tmp;
			}
		}

		// garbage collection
		dumpShallowGraph(sgp, mergedEdges);
		dumpGraph(gp, mergedGraph);
	}

	initCharacteristicsArrayForLocalEasy(&sptTree);

	//garbage collection
	free(blockTree.vRootedBlocks);

	return sptTree;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
xorl %esi, %esi
movl $0x38, %edx
callq 0x10b0
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movq (%rax), %rcx
movq %rcx, (%rdi)
movl 0x20(%rax), %ecx
movl %ecx, 0x30(%rdi)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rdi)
movslq 0x30(%rdi), %rdi
shlq $0x3, %rdi
callq 0x1170
movq 0x18(%rsp), %rdi
movq %rax, 0x18(%rdi)
movslq 0x30(%rdi), %rdi
shlq $0x3, %rdi
callq 0x1170
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rdi)
movl $0x0, 0x54(%rsp)
movq 0x18(%rsp), %rcx
movl 0x54(%rsp), %eax
cmpl 0x30(%rcx), %eax
jge 0x174c0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x54(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x58(%rsp), %rsi
callq 0x17250
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x16470
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x12d20
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
callq 0x166e0
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rcx
movslq 0x54(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x28(%rax), %rcx
movslq 0x54(%rsp), %rdx
movq $0x0, (%rcx,%rdx,8)
movq $0x0, 0x30(%rsp)
movq 0x18(%rax), %rax
movslq 0x54(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x17492
callq 0x197e0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x2df00
movq %rax, %rdx
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rdx, (%rcx)
movq 0x28(%rax), %rax
movslq 0x54(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x17465
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq 0x28(%rax), %rax
movslq 0x54(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x1747d
movq 0x20(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1747f
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x17405
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x1ff70
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x1fb30
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x1734b
movq 0x18(%rsp), %rdi
callq 0x16850
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq 0x8(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)