LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: listBridgeForest
struct ShallowGraph* listBridgeForest(struct Graph* g, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	/* find biconnected Components */
	struct ShallowGraph* h = listBiconnectedComponents(g, sgp);
	// TODO replace this by a method that just creates the forest without listing cycles
	struct Graph* forest = partitionIntoForestAndCycles(h, g, gp, sgp);
	struct ShallowGraph* bridgeTrees = getConnectedComponents(forest, sgp);
	struct ShallowGraph* tmp;
	// the resulting trees need to reference the original graph g
	for (tmp=bridgeTrees; tmp!=NULL; tmp=tmp->next) {
		rebaseShallowGraphs(tmp, g);
	}
	/* garbage collection */
	dumpGraphList(gp, forest);
	return bridgeTrees;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x8ccd
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x9010
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x3337
movq %rax, %r12
movq %rax, %r13
testq %r13, %r13
je 0x18142
movq %r13, %rdi
movq %r14, %rsi
callq 0x64e8
movq 0x18(%r13), %r13
jmp 0x1812c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x116ef
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: listOrSampleSpanningTrees
struct ShallowGraph* listOrSampleSpanningTrees(struct Graph* g, int k, long int threshold, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTrees = NULL; 
	long upperBound = getGoodEstimate(g, sgp, gp);
	if ((upperBound < threshold) && (upperBound != -1)) {
		spanningTrees = listSpanningTrees(g, sgp, gp);	
	} else {
		spanningTrees = sampleSpanningTreesUsingWilson(g, k, sgp);
	}
	return spanningTrees;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r15
movq %r8, %rsi
movq %rcx, %rdx
callq 0x1b8c6
cmpq %r12, %rax
setge %cl
cmpq $-0x1, %rax
sete %al
movq %r15, %rdi
orb %cl, %al
jne 0x181ad
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa01b
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x17c80
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: runForEachConnectedComponent
struct ShallowGraph* runForEachConnectedComponent(struct ShallowGraph* (*sampler)(struct Graph*, int, long int, struct GraphPool*, struct ShallowGraphPool*), 
	struct Graph* g, int k, long int threshold, char rebase, struct GraphPool* gp, struct ShallowGraphPool* sgp) {

	struct ShallowGraph* results = NULL;
	struct Graph* connectedComponents = listConnectedComponents(g, gp);

	struct Graph* current;
	for (current=connectedComponents; current!=NULL; current=current->next) {
		struct ShallowGraph* currentResult = sampler(current, k, threshold, gp, sgp);

		// find last element in currentResult
		struct ShallowGraph* idx;	
		for (idx=currentResult; idx->next!=NULL; idx=idx->next);

		// add previous results after last element, reset results to head of current results
		if (idx) {
			idx->next = results;
			results = currentResult;
		}
	}

	// due to this line, the returned shallow graphs are pointing to g, but this
	// requires the sampler function to not alter the ->lowPoints of the vertices
	if (rebase) { rebaseShallowGraphsOnLowPoints(results, g); }
	dumpGraphList(gp, connectedComponents);
	return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movl %r8d, 0x4(%rsp)
movq %rcx, %r13
movl %edx, %ebp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq %rsi, %rdi
movq %r9, %rsi
callq 0x8ea8
movq %rax, %r15
xorl %r12d, %r12d
movq %rax, 0x10(%rsp)
testq %r15, %r15
je 0x18231
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %rbx, %rcx
movq 0x50(%rsp), %r8
callq *%r14
movq %rax, %rdx
movq %rdx, %rcx
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x18218
movq %r12, 0x18(%rcx)
movq 0x18(%r15), %r15
movq %rax, %r12
jmp 0x181fd
cmpb $0x0, 0x4(%rsp)
je 0x18245
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x6529
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x116ef
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: getNumberOfNonisomorphicSpanningForestComponentsForKSamples
int getNumberOfNonisomorphicSpanningForestComponentsForKSamples(struct Graph* g, int k, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int numberOfNonisomorphicSpanningTreeComponents = 0;

	struct Vertex* searchTree = getVertex(gp->vertexPool);

	// sample k spanning trees, canonicalize them and add them in a search tree (to avoid duplicates, i.e. isomorphic spanning trees)
	struct ShallowGraph* sample = runForEachConnectedComponent(&xsampleSpanningTreesUsingWilson, g, k, k, 1, gp, sgp);
	for (struct ShallowGraph* tree=sample; tree!=NULL; tree=tree->next) {
		if (tree->m != 0) {
			struct Graph* tmp = shallowGraphToGraph(tree, gp);
			addToSearchTree(searchTree, canonicalStringOfTree(tmp, sgp), gp, sgp);
			/* garbage collection */
			dumpGraph(gp, tmp);
		}
	}

	numberOfNonisomorphicSpanningTreeComponents = searchTree->d;

	// avoid memory leaks, access to freed memory, and free unused stuff
	dumpShallowGraphCycle(sgp, sample);
	dumpSearchTree(gp, searchTree);

	return numberOfNonisomorphicSpanningTreeComponents;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r12
movq 0x10(%rdx), %rdi
callq 0x114a5
movq %rax, %r15
movslq %ebp, %rcx
movq %r14, (%rsp)
leaq -0x5d5(%rip), %rdi      # 0x17cbf
pushq $0x1
popq %r8
movq %r12, %rsi
movl %ecx, %edx
movq %rbx, %r9
callq 0x181c4
movq %rax, %r12
movq %rax, %r13
testq %r13, %r13
je 0x182f2
cmpl $0x0, 0x10(%r13)
je 0x182ec
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5fe8
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
callq 0x579f
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x186c6
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1166e
movq 0x18(%r13), %r13
jmp 0x182ab
movl 0x28(%r15), %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x11888
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18dcd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: addStringToSearchTreeRec
static char addStringToSearchTreeRec(struct Vertex* root, struct VertexList* edge, int id, struct GraphPool* p) {

	/* if edge == NULL, stop recursion, remember, that some string ends here */
	if (edge == NULL) {
		root->visited += 1;
		if (root->visited == 1) {
			root->lowPoint = id;
			return 1;
		} else {
			return 0;
		}
	} else {
		struct VertexList* idx;
		for (idx=root->neighborhood; idx; idx=idx->next) {
			/* if the next label is already in the tree, continue recursively */
			if (strcmp(idx->label, edge->label) == 0) {
				char isNew = addStringToSearchTreeRec(idx->endPoint, edge->next, id, p);
				/* edges dangling at edge are consumed or dumped by the following recursion steps */
				edge->next = NULL;
				dumpVertexList(p->listPool, edge);
				return isNew;
			}
		}

		/* otherwise add the current edge to the tree and continue recursively */
		idx = edge->next;
		edge->startPoint = root;
		edge->endPoint = getVertex(p->vertexPool);
		addEdge(root, edge);
		// if edge is not responsible for its label, make it by making a copy of the label.
		// as search trees tend to live longer than the graphs they are derived from, this saves trouble
		// although it makes the method depend on the length of the strings.
		if (edge->isStringMaster == 0) {
			edge->label = copyString(edge->label);
			edge->isStringMaster = 1;
		}
		addStringToSearchTreeRec(edge->endPoint, idx, id, p);
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
movq %r12, %r13
testq %r15, %r15
je 0x183ff
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x18378
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1130
testl %eax, %eax
jne 0x1835d
jmp 0x183be
movq 0x8(%r15), %r13
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x114a5
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b2c
cmpl $0x0, 0x28(%r15)
jne 0x183b2
movq (%r15), %rdi
callq 0x118b2
movq %rax, (%r15)
movl $0x1, 0x28(%r15)
movq 0x18(%r15), %r12
movb $0x1, %bpl
movq %r13, %r15
jmp 0x18351
movq 0x18(%r13), %rdi
movq 0x8(%r15), %rsi
movl %ebx, %edx
movq %r14, %rcx
callq 0x18339
movl %eax, %ebx
andq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x11364
movzbl %bl, %ecx
testb $0x1, %bpl
pushq $0x1
popq %rax
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1c(%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%r12)
testl %eax, %eax
je 0x18414
xorl %ebx, %ebx
jmp 0x183e3
movl %ebx, 0x20(%r12)
movb $0x1, %bl
jmp 0x183e3
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: addStringToSearchTreeSetDRec
static char addStringToSearchTreeSetDRec(struct Vertex* root, struct VertexList* edge, int d, int id, struct GraphPool* p) {

	/* if edge == NULL, stop recursion, remember, that some string ends here */
	if (edge == NULL) {
		root->visited += 1;
		root->d = d;
		if (root->visited == 1) {
			root->lowPoint = id;
			return 1;
		} else {
			return 0;
		}
	} else {
		struct VertexList* idx;
		for (idx=root->neighborhood; idx; idx=idx->next) {
			/* if the next label is already in the tree, continue recursively */
			if (strcmp(idx->label, edge->label) == 0) {
				char isNew = addStringToSearchTreeSetDRec(idx->endPoint, edge->next, d, id, p);
				/* edges dangling at edge are consumed or dumped by the following recursion steps */
				edge->next = NULL;
				dumpVertexList(p->listPool, edge);
				return isNew;
			}
		}

		/* otherwise add the current edge to the tree and continue recursively */
		idx = edge->next;
		edge->startPoint = root;
		edge->endPoint = getVertex(p->vertexPool);
		addEdge(root, edge);
		return addStringToSearchTreeSetDRec(edge->endPoint, idx, d, id, p);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq %r12, %r13
testq %r15, %r15
je 0x184d2
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x18471
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1130
testl %eax, %eax
jne 0x18456
jmp 0x1849a
movq 0x8(%r15), %r13
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x114a5
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b2c
movq 0x18(%r15), %r12
movq %r13, %r15
jmp 0x1844e
movq 0x18(%r13), %rdi
movq 0x8(%r15), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x18436
movl %eax, %ebx
andq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x11364
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1c(%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%r12)
movl %ebp, 0x28(%r12)
testl %eax, %eax
je 0x184ec
xorl %eax, %eax
jmp 0x184f3
movl %ebx, 0x20(%r12)
movb $0x1, %al
jmp 0x184c3
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: addStringToSearchTreeSetVisitedRec
static char addStringToSearchTreeSetVisitedRec(struct Vertex* root, struct VertexList* edge, int visited, int id, struct GraphPool* p) {

	/* if edge == NULL, stop recursion, remember, that some string ends here */
	if (edge == NULL) {
		root->visited += visited;
		if (root->visited == visited) {
			root->lowPoint = id;
			return 1;
		} else {
			return 0;
		}
	} else {
		struct VertexList* idx;
		for (idx=root->neighborhood; idx; idx=idx->next) {
			/* if the next label is already in the tree, continue recursively */
			if (strcmp(idx->label, edge->label) == 0) {
				char isNew = addStringToSearchTreeSetVisitedRec(idx->endPoint, edge->next, visited, id, p);
				/* edges dangling at edge are consumed or dumped by the following recursion steps */
				edge->next = NULL;
				dumpVertexList(p->listPool, edge);
				return isNew;
			}
		}

		/* otherwise add the current edge to the tree and continue recursively */
		idx = edge->next;
		edge->startPoint = root;
		edge->endPoint = getVertex(p->vertexPool);
		addEdge(root, edge);
		return addStringToSearchTreeSetVisitedRec(edge->endPoint, idx, visited, id, p);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq %r12, %r13
testq %r15, %r15
je 0x185aa
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x18549
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1130
testl %eax, %eax
jne 0x1852e
jmp 0x18572
movq 0x8(%r15), %r13
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x114a5
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b2c
movq 0x18(%r15), %r12
movq %r13, %r15
jmp 0x18526
movq 0x18(%r13), %rdi
movq 0x8(%r15), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x1850e
movl %eax, %ebx
andq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x11364
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1c(%r12), %eax
addl %eax, %ebp
movl %ebp, 0x1c(%r12)
testl %eax, %eax
je 0x185be
xorl %eax, %eax
jmp 0x185c5
movl %ebx, 0x20(%r12)
movb $0x1, %al
jmp 0x1859b
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: printSearchTree
void printSearchTree(struct Vertex* root, int level) {
	struct VertexList* index;

	for (index=root->neighborhood; index; index=index->next) {
		printf("l%i ", level);
		printf("(%i, %i) %s\n", index->endPoint->lowPoint, index->endPoint->visited, index->label);
		printSearchTree(index->endPoint, level+1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %ebp
leaq 0x58fb(%rip), %r15      # 0x1df78
leaq 0x58f9(%rip), %r12      # 0x1df7d
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x186bd
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
movq (%r14), %rcx
movq 0x18(%r14), %rax
movl 0x1c(%rax), %edx
movl 0x20(%rax), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x10b0
movq 0x18(%r14), %rdi
movl %ebp, %esi
callq 0x18666
jmp 0x18684
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: addToSearchTree
struct Vertex* addToSearchTree(struct Vertex* root, struct ShallowGraph* strings, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph *idx;

	for (idx=strings; idx; idx=idx->next) {
		root->d += addStringToSearchTree(root, idx->edges, gp);
		root->number += 1;

		idx->edges = NULL;
	}

	dumpShallowGraphCycle(sgp, strings);

	return root;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %r13
testq %r13, %r13
je 0x18706
movq (%r13), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18320
movzbl %al, %eax
addl %eax, 0x28(%rbx)
incl 0x18(%rbx)
andq $0x0, (%r13)
movq 0x18(%r13), %r13
jmp 0x186de
movq %r14, %rdi
movq %r15, %rsi
callq 0x11888
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: addMultiSetToSearchTree
struct Vertex* addMultiSetToSearchTree(struct Vertex* root, struct ShallowGraph* strings, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph *idx;

	for (idx=strings; idx; idx=idx->next) {
		root->d += addStringToSearchTreeSetVisited(root, idx->edges, idx->data, gp);
		root->number += idx->data;
		idx->edges = NULL;
	}

	dumpShallowGraphCycle(sgp, strings);

	return root;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %r13
testq %r13, %r13
je 0x18766
movq (%r13), %rsi
movl 0x28(%r13), %edx
movq %rbx, %rdi
movq %r12, %rcx
callq 0x184f5
movzbl %al, %eax
addl %eax, 0x28(%rbx)
movl 0x28(%r13), %eax
addl %eax, 0x18(%rbx)
andq $0x0, (%r13)
movq 0x18(%r13), %r13
jmp 0x18736
movq %r14, %rdi
movq %r15, %rsi
callq 0x11888
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: resetToUniqueRec
static void resetToUniqueRec(struct Vertex* root, struct Vertex* current) {
	struct VertexList* e;
	if (current != root) {
		if (current->visited > 0) {
			current->visited = 1;
			++root->d;
			++root->number;
		}
	}

	for (e=current->neighborhood; e!=NULL; e=e->next) {
		resetToUniqueRec(root, e->endPoint);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rdi, %rsi
je 0x18932
cmpl $0x0, 0x1c(%rbx)
jle 0x18932
movl $0x1, 0x1c(%rbx)
incl 0x28(%r14)
incl 0x18(%r14)
jmp 0x18932
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x18900
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x18926
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: offsetSearchTreeIdsRec
static void offsetSearchTreeIdsRec(struct Vertex* root, struct Vertex* current, int offset) {
	struct VertexList* e;
	if (current != root) {
		if (current->lowPoint > 0) {
			current->lowPoint += offset;
		}
	}

	for (e=current->neighborhood; e!=NULL; e=e->next) {
		offsetSearchTreeIdsRec(root, e->endPoint, offset);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpq %rdi, %rsi
je 0x1897d
movl 0x20(%r14), %eax
testl %eax, %eax
jle 0x1897d
addl %ebx, %eax
movl %eax, 0x20(%r14)
jmp 0x1897d
movq 0x18(%r14), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x1894d
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1896f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: compressSearchTreeIdsRec
static void compressSearchTreeIdsRec(struct Vertex* root, struct Vertex* current) {
	struct VertexList* e;
	if (current != root) {
		if (current->lowPoint > 0) {
			++root->lowPoint;
			current->lowPoint = root->lowPoint;
		}
	}

	for (e=current->neighborhood; e!=NULL; e=e->next) {
		compressSearchTreeIdsRec(root, e->endPoint);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rdi, %rsi
je 0x189c4
cmpl $0x0, 0x20(%rbx)
jle 0x189c4
movl 0x20(%r14), %eax
incl %eax
movl %eax, 0x20(%r14)
movl %eax, 0x20(%rbx)
jmp 0x189c4
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x18994
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x189b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: filterSearchTree
char filterSearchTree(struct Vertex* current, int threshold, struct Vertex* root, struct GraphPool* gp) {
	struct VertexList* e;
	struct VertexList* dump = NULL;
	struct VertexList* good = NULL;

	for (e=current->neighborhood; e!=NULL; e=e->next) {
		e->used = filterSearchTree(e->endPoint, threshold, root, gp);
	}

	for (e=current->neighborhood; e!=NULL; ) {
		struct VertexList* next = e->next;
		if (e->used) {
			e->next = good;
			good = e;
		} else {
			e->next = dump;
			dump = e;
		}
		e = next;
	}

	for (e=good, current->neighborhood=NULL; e!=NULL; ) {
		struct VertexList* next = e->next;
		e->next = current->neighborhood;
		current->neighborhood = e;
		e = next;
	}
	dumpVertexListRecursively(gp->listPool, dump);

	/* if all children of current were deleted and current is not end of frequent
	string, delete current and notify caller that we can delete the edge */
	if (current->visited < threshold) {
		if (current->visited > 0) {
			/* "remove" string from search tree */ 
			root->number -= current->visited;
			--root->d;
		}

		/* if current is not an internal vertex, we dump it and tell the caller
		that the edge is unused. otherwise, the vertex stays and the edge is marked
		as used */
		if (current->neighborhood == NULL) {
			/* an empty search tree still consists of the root */
			if (current != root) {
				dumpVertex(gp->vertexPool, current);
			}
			return 0;
		} else {
			return 1;
		}

	} else {
		/* string is frequent. */
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %r12
movq %r12, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x18a19
movq 0x18(%r13), %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x189d5
movzbl %al, %eax
movl %eax, 0x20(%r13)
addq $0x8, %r13
jmp 0x189f2
movq (%r12), %rcx
xorl %esi, %esi
xorl %eax, %eax
testq %rcx, %rcx
je 0x18a46
movq 0x8(%rcx), %rdx
cmpl $0x0, 0x20(%rcx)
movq %rax, %rdi
cmoveq %rsi, %rdi
cmoveq %rcx, %rsi
cmovneq %rcx, %rax
movq %rdi, 0x8(%rcx)
movq %rdx, %rcx
jmp 0x18a21
xorl %ecx, %ecx
testq %rax, %rax
je 0x18a5d
movq 0x8(%rax), %rdx
movq %rcx, 0x8(%rax)
movq %rax, %rcx
movq %rdx, %rax
jmp 0x18a48
movq %rcx, 0x8(%rbx)
movq 0x18(%r14), %rdi
callq 0x1138e
movl 0x1c(%rbx), %ecx
movb $0x1, %al
cmpl %ebp, %ecx
jge 0x18a99
testl %ecx, %ecx
jle 0x18a7f
subl %ecx, 0x18(%r15)
decl 0x28(%r15)
cmpq $0x0, (%r12)
jne 0x18a99
cmpq %r15, %rbx
je 0x18a97
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x11512
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: dumpSearchTree
void dumpSearchTree(struct GraphPool* p, struct Vertex* root) {
	struct VertexList *idx, *tmp;

	idx=root->neighborhood;
	while(idx) {
		dumpSearchTree(p, idx->endPoint);
		tmp = idx;
		idx = idx->next;
		dumpVertexList(p->listPool, tmp);
	}
	dumpVertex(p->vertexPool, root);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x18e05
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x18dcd
movq 0x8(%r15), %r12
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x11364
movq %r12, %r15
jmp 0x18ddf
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11512
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: shallowCopySearchTree
struct Vertex* shallowCopySearchTree(struct Vertex* original, struct GraphPool* gp) {
	struct Vertex* copy = shallowCopyVertex(original, gp->vertexPool);
	copy->d = original->d;
	copy->lowPoint = original->lowPoint;
	copy->visited = original->visited;

	for (struct VertexList* e=original->neighborhood; e!=NULL; e=e->next) {
		struct VertexList* f = getVertexList(gp->listPool);
		f->label = e->label;
		f->startPoint = copy;
		f->endPoint = shallowCopySearchTree(e->endPoint, gp);
		addEdge(copy, f);
	}

	return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rsi
callq 0x5a70
movq %rax, %r15
movl 0x28(%r14), %eax
movl %eax, 0x28(%r15)
movq 0x1c(%r14), %rax
movq %rax, 0x1c(%r15)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x18e85
movq 0x18(%rbx), %rdi
callq 0x11307
movq %rax, %r12
movq (%r14), %rax
movq %rax, (%r12)
movq %r15, 0x10(%r12)
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x18e1c
movq %rax, 0x18(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5b2c
jmp 0x18e46
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: listStringsInSearchTree
struct ShallowGraph* listStringsInSearchTree(struct Vertex* root, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* listHead = getShallowGraph(sgp);
	struct ShallowGraph* prefix = getShallowGraph(sgp);
	recListString(listHead, root, root, prefix, sgp);
	dumpShallowGraph(sgp, prefix);
	prefix = listHead;
	listHead = listHead->next;
	prefix->next = NULL;
	dumpShallowGraph(sgp, prefix);
	return listHead;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x117e9
movq %rax, %r15
movq %rbx, %rdi
callq 0x117e9
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x18f27
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1184e
movq 0x18(%r15), %r14
andq $0x0, 0x18(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1184e
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: recListString
static void recListString(struct ShallowGraph* stringList, struct Vertex* root, struct Vertex* trueRoot, struct ShallowGraph* prefix, struct ShallowGraphPool* sgp) {
	struct VertexList* e;

	if (root != trueRoot) {
		if (root->visited != 0) {
			struct ShallowGraph* tmp = stringList->next;
			stringList->next = cloneShallowGraph(prefix, sgp);
			stringList->next->next = tmp;
		}
	}																																																																								

	for (e=root->neighborhood; e!=NULL; e=e->next) {
		
		/* after finishing this block, we want prefix to be as before, thus we have
		   to do some list magic */																																																								
		struct VertexList* lastEdge = prefix->lastEdge;
		appendEdge(prefix, shallowCopyEdge(e, sgp->listPool));

		recListString(stringList, e->endPoint, root, prefix, sgp);

		dumpVertexList(sgp->listPool, prefix->lastEdge);
		prefix->lastEdge = lastEdge;
		--prefix->m;

		if (prefix->m == 0) {
			prefix->edges = NULL;
		} else {
			lastEdge->next = NULL;
		}	
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpq %rdx, %rsi
je 0x18f63
cmpl $0x0, 0x1c(%r15)
je 0x18f63
movq 0x18(%r12), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x659e
movq %rax, 0x18(%r12)
movq %r13, 0x18(%rax)
movq %r15, %r13
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x18fc3
movq 0x8(%r14), %rbp
movq 0x10(%rbx), %rsi
movq %r13, %rdi
callq 0x5a28
movq %r14, %rdi
movq %rax, %rsi
callq 0x6620
movq 0x18(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x18f27
movq 0x10(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x11364
movq %rbp, 0x8(%r14)
addq $0x8, %rbp
decl 0x10(%r14)
cmoveq %r14, %rbp
andq $0x0, (%rbp)
jmp 0x18f66
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: recPrint
static void recPrint(struct Vertex* root, struct Vertex* trueRoot, int offset, struct ShallowGraph* prefix, FILE* stream, struct ShallowGraphPool* sgp) {
	struct VertexList* e;

	if (root != trueRoot) {
		if (root->visited != 0) {
			fprintf(stream, "%i\t%i\t", root->visited + offset, root->lowPoint);
			printCanonicalString(prefix, stream);
		}
	}																																																																								

	for (e=root->neighborhood; e!=NULL; e=e->next) {
		
		/* after finishing this block, we want prefix to be as before, thus we have
		   to do some list magic */																																																								
		struct VertexList* lastEdge = prefix->lastEdge;
		appendEdge(prefix, shallowCopyEdge(e, sgp->listPool));

		recPrint(e->endPoint, root, offset, prefix, stream, sgp);

		dumpVertexList(sgp->listPool, prefix->lastEdge);
		prefix->lastEdge = lastEdge;
		--prefix->m;

		if (prefix->m == 0) {
			prefix->edges = NULL;
		} else {
			lastEdge->next = NULL;
		}
		
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r12
cmpq %rsi, %rdi
je 0x19069
movl 0x1c(%r12), %edx
testl %edx, %edx
je 0x19069
addl %ebp, %edx
movl 0x20(%r12), %ecx
leaq 0x48b7(%rip), %rsi      # 0x1d907
movq (%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1150
movq %r15, %rdi
movq %r14, %rsi
callq 0x5041
movq %r12, %r13
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x190cb
movq 0x8(%r15), %r14
movq 0x10(%rbx), %rsi
movq %r13, %rdi
callq 0x5a28
movq %r15, %rdi
movq %rax, %rsi
callq 0x6620
movq 0x18(%r13), %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq (%rsp), %r8
movq %rbx, %r9
callq 0x1901a
movq 0x10(%rbx), %rdi
movq 0x8(%r15), %rsi
callq 0x11364
movq %r14, 0x8(%r15)
addq $0x8, %r14
decl 0x10(%r15)
cmoveq %r15, %r14
andq $0x0, (%r14)
jmp 0x1906c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: streamBuildSearchTree
int streamBuildSearchTree(FILE* stream, struct Vertex* root, int bufferSize, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int number;
	int nPatterns;
	int i;
	char* buffer = malloc(bufferSize * sizeof(char));
	int head = fscanf(stream, "# %i %i\n", &number, &nPatterns);
	int readCount = 0;

	if (head != 2) {
		free(buffer);
		return 0;
	}

	for (i=0; i<nPatterns; ++i) {
		int multiplicity;
		struct ShallowGraph* string;
		readCount += fscanf(stream, "%i\t", &multiplicity);
		string = parseCString(stream, buffer, sgp);
		addToSearchTree(root, string, gp, sgp);
	}

	if (readCount != nPatterns) {
		fprintf(stderr, "Error: Read %i patterns, should have been %i\n", readCount, nPatterns);
	}

	free(buffer);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movslq %edx, %rdi
callq 0x1180
movq %rax, 0x8(%rsp)
leaq 0x4e6a(%rip), %rsi      # 0x1dfb9
xorl %ebx, %ebx
leaq 0x14(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r13, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $0x2, %eax
jne 0x191ba
xorl %ebx, %ebx
xorl %ebp, %ebp
movl 0x4(%rsp), %ecx
cmpl %ecx, %ebx
jge 0x191b3
movq %r13, %rdi
leaq 0x478a(%rip), %rsi      # 0x1d90a
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x1060
addl %eax, %ebp
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x511a
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x186c6
incl %ebx
jmp 0x1916e
pushq $0x1
popq %rbx
cmpl %ecx, %ebp
jne 0x191d5
movq 0x8(%rsp), %rdi
callq 0x1030
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10e1c(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x4da4(%rip), %rsi      # 0x1df8a
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
jmp 0x191ba
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: streamReadPatternsAndTheirNumber
struct ShallowGraph* streamReadPatternsAndTheirNumber(FILE* stream, int bufferSize, int* number, int* nPatterns, struct ShallowGraphPool* sgp) {
	
	int i;
	struct ShallowGraph* patterns = NULL;

	char* buffer = malloc(bufferSize * sizeof(char));
	int head = fscanf(stream, " # %i %i\n", number, nPatterns);
	int writeCount = 0;

	/* fscanf should read 2 values, unless its the end of the file */
	if ((head != 2)) {
		if (head != -1) {
			fprintf(stderr, "Could not read pattern. Wrong number: %i (must be 2)\n", head);
		}
		free(buffer);
		return NULL;
	}

	for (i=0; i<*nPatterns; ++i) {
		int multiplicity;
		int id;
		struct ShallowGraph* string;
		writeCount += fscanf(stream, "%i\t%i\t", &multiplicity, &id);
		string = parseCString(stream, buffer, sgp);
		string->data = multiplicity;
		string->next = patterns;
		patterns = string;
	}	
	
	if (writeCount != *nPatterns * 2) {
		fprintf(stderr, "Error: Wrote %i patterns, should have been %i\n", writeCount, *nPatterns);
	}

	free(buffer);
	return patterns;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %r12
movslq %esi, %rdi
callq 0x1180
movq %rax, %r14
leaq 0x4d86(%rip), %rsi      # 0x1dfb8
movq %r12, %rdi
movq %r13, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x192c4
cmpl $0x2, %eax
jne 0x192aa
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
movl (%r15), %ecx
cmpl %ecx, %ebx
jge 0x19299
movq %r12, %rdi
leaq 0x46a3(%rip), %rsi      # 0x1d907
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rcx
xorl %eax, %eax
callq 0x1060
addl %eax, %ebp
movq %r12, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
callq 0x511a
movl 0x4(%rsp), %ecx
movl %ecx, 0x28(%rax)
movq %r13, 0x18(%rax)
incl %ebx
movq %rax, %r13
jmp 0x19253
leal (%rcx,%rcx), %eax
cmpl %eax, %ebp
jne 0x192e1
movq %r14, %rdi
callq 0x1030
jmp 0x192cf
movq 0x10d47(%rip), %rcx     # 0x29ff8
movq (%rcx), %rdi
leaq 0x4d07(%rip), %rsi      # 0x1dfc2
movl %eax, %edx
xorl %eax, %eax
callq 0x1150
movq %r14, %rdi
callq 0x1030
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10d10(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x4d06(%rip), %rsi      # 0x1dff8
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
jmp 0x192a0
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/searchTree.c
// Function: loadSearchTree
struct Vertex* loadSearchTree(FILE* stream, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct Vertex* root = getVertex(gp->vertexPool);
	int bufferSize = CS_STRING_CACHE_SIZE;
	streamBuildSearchTree(stream, root, bufferSize, gp, sgp);
	return root;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rsi), %rdi
callq 0x114a5
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rcx
movq %rbx, %r8
callq 0x19121
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsoUtils.c
// Function: getPostorderOfTree
int* getPostorderOfTree(struct Graph* g, int root) {
	int* order = malloc(g->n * sizeof(int));
	for (int i=0; i<g->n; ++i) {
		g->vertices[i]->visited = -1;
		order[i] = -1;
	}
	dfs(g->vertices[root], 0);
	g->vertices[root]->lowPoint = -1;
	for (int i=0; i<g->n; ++i) {
		if (g->vertices[i]->visited != -1) {
			order[g->vertices[i]->visited] = i;
		} else {
			/* should never happen if g is a tree */
			fprintf(stderr, "Vertex %i was not visited by dfs.\nThis can not happen, if g is a tree.\n", i);
		}
	}
	return order;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movslq (%rdi), %r15
movq %r15, %rdi
shlq $0x2, %rdi
callq 0x1180
movq %rax, %r14
xorl %eax, %eax
testl %r15d, %r15d
movl $0x0, %ecx
cmovgl %r15d, %ecx
movq 0x10(%rbx), %rdx
cmpq %rax, %rcx
je 0x193a2
movq (%rdx,%rax,8), %rsi
orl $-0x1, 0x1c(%rsi)
orl $-0x1, (%r14,%rax,4)
incq %rax
jmp 0x1938b
movslq %ebp, %r15
movq (%rdx,%r15,8), %rdi
xorl %esi, %esi
callq 0x19415
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
orl $-0x1, 0x20(%rax)
movq 0x10c35(%rip), %r13     # 0x29ff8
leaq 0x4c5d(%rip), %r15      # 0x1e027
xorl %r12d, %r12d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x19403
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rax
movslq 0x1c(%rax), %rax
cmpq $-0x1, %rax
je 0x193f0
movl %r12d, (%r14,%rax,4)
incq %r12
jmp 0x193cd
movq (%r13), %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1150
jmp 0x193eb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsoUtils.c
// Function: dfs
static int dfs(struct Vertex* v, int value) {

	/* to make this method save for graphs that are not trees */
	v->visited = -2;

	for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
		if (e->endPoint->visited == -1) {
			value = 1 + dfs(e->endPoint, value);
			e->endPoint->lowPoint = v->number;
		}
	}
	v->visited = value;
	return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movq %rdi, %rbx
movl $0xfffffffe, 0x1c(%rdi) # imm = 0xFFFFFFFE
movq %rdi, %r14
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x19450
movq 0x18(%r14), %rdi
cmpl $-0x1, 0x1c(%rdi)
jne 0x19428
movl %eax, %esi
callq 0x19415
incl %eax
movl 0x18(%rbx), %ecx
movq 0x18(%r14), %rdx
movl %ecx, 0x20(%rdx)
jmp 0x19428
movl %eax, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsoUtils.c
// Function: getPostorder
int* getPostorder(struct Graph* g, int root) {
	if (g->n > 0) {
		int* order = malloc(g->n * sizeof(int));
		for (int i=0; i<g->n; ++i) {
			g->vertices[i]->visited = -1;
			order[i] = -1;
		}

		int nVisited = dfs(g->vertices[root], 0);
		g->vertices[root]->lowPoint = -1;
		for (int i=0; i<g->n; ++i) {
			if (g->vertices[i]->visited == -1) {
				nVisited = dfs(g->vertices[i], nVisited + 1);
				g->vertices[i]->lowPoint = -1;

			}
			order[g->vertices[i]->visited] = i;
		}
		return order;
	} else {
		return NULL;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq (%rdi), %r15
testq %r15, %r15
jle 0x194fa
movl %esi, %ebp
movq %rdi, %rbx
leaq (,%r15,4), %rdi
callq 0x1180
movq %rax, %r14
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x194a1
movq (%rax,%rcx,8), %rdx
orl $-0x1, 0x1c(%rdx)
orl $-0x1, (%r14,%rcx,4)
incq %rcx
jmp 0x1948a
movq 0x10(%rbx), %rax
movslq %ebp, %r12
movq (%rax,%r12,8), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x19415
movq 0x10(%rbx), %rcx
movq (%rcx,%r12,8), %rdx
orl $-0x1, 0x20(%rdx)
movslq (%rbx), %rdx
cmpq %rdx, %r15
jge 0x194fd
movq (%rcx,%r15,8), %rdi
movl 0x1c(%rdi), %edx
cmpl $-0x1, %edx
jne 0x194ee
incl %eax
movl %eax, %esi
callq 0x19415
movq 0x10(%rbx), %rcx
movq (%rcx,%r15,8), %rdx
orl $-0x1, 0x20(%rdx)
movl 0x1c(%rdx), %edx
movslq %edx, %rdx
movl %r15d, (%r14,%rdx,4)
incq %r15
jmp 0x194c2
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsoUtils.c
// Function: markReachable
void markReachable(struct Vertex* a, int num) {

	a->visited = 1;

	for (struct VertexList* e=a->neighborhood; e!=NULL; e=e->next) {
		if ((e->flag == 0) && (e->endPoint->visited == 0)) {
			markReachable(e->endPoint, num);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, 0x1c(%rdi)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x1953c
cmpl $0x0, 0x24(%r14)
jne 0x19519
movq 0x18(%r14), %rdi
cmpl $0x0, 0x1c(%rdi)
jne 0x19519
movl %ebx, %esi
callq 0x19509
jmp 0x19519
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: shuffleNeighbors
struct VertexList** shuffleNeighbors(struct Vertex* v, int degV) {
	if (degV > 0) {
		struct VertexList** edgeArray = malloc(degV * sizeof(struct VertexList*));
		edgeArray[0] = v->neighborhood;
		for (int i=1; i < degV; ++i) {
			edgeArray[i] = edgeArray[i-1]->next;
		}
		shuffle(edgeArray, degV);
		return edgeArray;
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %esi, %esi
jle 0x19591
movq %rdi, %r15
movl %esi, %r14d
leaq (,%r14,8), %rdi
callq 0x1180
movq %rax, %rbx
movq 0x8(%r15), %rax
movq %rax, (%rbx)
pushq $0x1
popq %rax
cmpq %rax, %r14
je 0x19584
movq -0x8(%rbx,%rax,8), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
jmp 0x1956d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17cd2
jmp 0x19593
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: getUncoveredNeighborArray
struct VertexList** getUncoveredNeighborArray(struct Vertex* v, int* uncoveredDegree) {
	*uncoveredDegree = 0;
	for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
		if (e->endPoint->visited == 0) {
			++(*uncoveredDegree);
		}
	}
	if (*uncoveredDegree > 0) {
		struct VertexList** edgeArray = malloc(*uncoveredDegree * sizeof(struct VertexList*));
		int i=0;
		for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
			if (e->endPoint->visited == 0) {
				edgeArray[i] = e;
				++i;
			}
		}
		return edgeArray;
	} else {
		return NULL;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
andl $0x0, (%rsi)
movq %rdi, %rbx
addq $0x8, %rbx
xorl %eax, %eax
movq %rbx, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x195cb
movq 0x18(%rcx), %rdx
cmpl $0x0, 0x1c(%rdx)
jne 0x195c5
incl %eax
movl %eax, (%rsi)
addq $0x8, %rcx
jmp 0x195af
xorl %r14d, %r14d
testl %eax, %eax
jle 0x195ff
movl %eax, %edi
shlq $0x3, %rdi
callq 0x1180
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x19601
movq 0x18(%rbx), %rcx
cmpl $0x0, 0x1c(%rcx)
jne 0x195f9
movslq %r14d, %r14
movq %rbx, (%rax,%r14,8)
incl %r14d
addq $0x8, %rbx
jmp 0x195dd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: subtreeIsomorphismSampler
char subtreeIsomorphismSampler(struct Graph* g, struct Graph* h) {

	// we root h at a random vertex
	struct Vertex* currentRoot = h->vertices[rand() % h->n];
	// and select a random image vertex
	struct Vertex* rootImage = g->vertices[rand() % g->n];

	char foundIso = 0;
	if (labelCmp(currentRoot->label, rootImage->label) == 0) {
		// if the labels match, we map the root to the image
		currentRoot->visited = rootImage->number + 1;
		rootImage->visited = 1;
		// and try to embed the rest of the tree h into g accordingly
		foundIso = recursiveSubtreeIsomorphismSampler(currentRoot, g);

		// cleanup
		cleanupSubtreeIsomorphismSampler(h, g);
	}

	return foundIso;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r15
callq 0x1240
cltd
idivl (%r14)
movslq %edx, %rax
movq (%r15,%rax,8), %r15
movq 0x10(%rbx), %r12
callq 0x1240
cltd
idivl (%rbx)
movslq %edx, %rax
movq (%r12,%rax,8), %r12
movq (%r15), %rdi
movq (%r12), %rsi
callq 0x19340
testl %eax, %eax
je 0x19655
xorl %eax, %eax
jmp 0x19683
movl 0x18(%r12), %eax
incl %eax
movl %eax, 0x1c(%r15)
movl $0x1, 0x1c(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1968c
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x197de
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: cleanupSubtreeIsomorphismSampler
static void cleanupSubtreeIsomorphismSampler(struct Graph* h, struct Graph* g) {
	for (int v=0; v<h->n; ++v) {
		int image = h->vertices[v]->visited;
		h->vertices[v]->visited = 0;
		if (image) {
			g->vertices[image-1]->visited = 0;
		}
	}
}

// Assembly:
movslq (%rdi), %rax
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x19810
movq 0x10(%rdi), %rdx
movq (%rdx,%rcx,8), %r8
movslq 0x1c(%r8), %rdx
andl $0x0, 0x1c(%r8)
testq %rdx, %rdx
je 0x1980b
movq 0x10(%rsi), %r8
movq -0x8(%r8,%rdx,8), %rdx
andl $0x0, 0x1c(%rdx)
incq %rcx
jmp 0x197e3
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: subtreeIsomorphismSamplerWithProperMatching
char subtreeIsomorphismSamplerWithProperMatching(struct Graph* g, struct Graph* h, struct GraphPool* gp) {

	// we root h at a random vertex
	struct Vertex* currentRoot = h->vertices[rand() % h->n];
	// and select a random image vertex
	struct Vertex* rootImage = g->vertices[rand() % g->n];
	//	fprintf(stderr, "\nnew round: %i -> %i\n", currentRoot->number, rootEmbedding->number);

	char foundIso = 0;
	if (labelCmp(currentRoot->label, rootImage->label) == 0) {
		// if the labels match, we map the root to the image
		currentRoot->visited = rootImage->number + 1;
		rootImage->visited = 1;
		// and try to embed the rest of the tree h into g accordingly
		foundIso = recursiveSubtreeIsomorphismSamplerWithMatching(currentRoot, g, gp);

		// cleanup
		cleanupSubtreeIsomorphismSampler(h, g);
	}

	return foundIso;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r12
callq 0x1240
cltd
idivl (%r14)
movslq %edx, %rax
movq (%r12,%rax,8), %r12
movq 0x10(%rbx), %r13
callq 0x1240
cltd
idivl (%rbx)
movslq %edx, %rax
movq (%r13,%rax,8), %r13
movq (%r12), %rdi
movq (%r13), %rsi
callq 0x19340
testl %eax, %eax
je 0x19a4c
xorl %eax, %eax
jmp 0x19a7c
movl 0x18(%r13), %eax
incl %eax
movl %eax, 0x1c(%r12)
movl $0x1, 0x1c(%r13)
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x19a8b
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x197de
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: subtreeIsomorphismSamplerWithSampledMaximumMatching
int subtreeIsomorphismSamplerWithSampledMaximumMatching(struct Graph* g, struct Graph* h, struct GraphPool* gp, int computeEstimate) {

	// we root h at a random vertex
	struct Vertex* currentRoot = h->vertices[rand() % h->n];
	// and select a random image vertex with suitable label (if one exists)
	int nRootImageCandidates;
	struct Vertex* rootImage = getSuitableImage(currentRoot, g, gp->listPool, &nRootImageCandidates);
	//	struct Vertex* rootImage = g->vertices[rand() % g->n];


	int foundIso = 0;
	if (rootImage) {
		//	if (labelCmp(currentRoot->label, rootImage->label) == 0) {
		// if there is a candidate image we map the root to the image
		currentRoot->visited = rootImage->number + 1;
		rootImage->visited = 1;
		// and try to embed the rest of the tree h into g accordingly
		foundIso = recursiveSubtreeIsomorphismSamplerWithSampledMaximumMatching(currentRoot, g, gp, computeEstimate);

		// cleanup
		cleanupSubtreeIsomorphismSampler(h, g);
	}

	if (computeEstimate) {
		return foundIso * nRootImageCandidates;
	} else {
		return foundIso;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq 0x10(%rsi), %r14
callq 0x1240
cltd
movq %r12, 0x10(%rsp)
idivl (%r12)
movslq %edx, %rax
movq (%r14,%rax,8), %r13
movq 0x18(%rbx), %rbp
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebx, %ebx
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x19db5
movq (%r13), %rdi
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rsi
callq 0x19340
testl %eax, %eax
jne 0x19db0
movq %rbp, %rdi
callq 0x11307
movq %rbx, 0x8(%rax)
movq 0x10(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x18(%rax)
incl %r14d
movq %rax, %rbx
incq %r12
jmp 0x19d72
testl %r14d, %r14d
jle 0x19e22
callq 0x1240
cltd
idivl %r14d
xorl %eax, %eax
testl %edx, %edx
cmovgl %edx, %eax
movq %rbx, %rcx
subl $0x1, %eax
jb 0x19dd8
movq 0x8(%rcx), %rcx
jmp 0x19dcd
movq 0x18(%rcx), %r12
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x113b9
testq %r12, %r12
je 0x19e22
movl 0x18(%r12), %eax
incl %eax
movl %eax, 0x1c(%r13)
movl $0x1, 0x1c(%r12)
movq %r13, %rdi
movq %r15, %rsi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
callq 0x19e47
movl %eax, %ebx
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x197de
jmp 0x19e28
xorl %ebx, %ebx
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
pushq $0x1
popq %rax
cmovel %eax, %r14d
imull %ebx, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/subtreeIsomorphismSampling.c
// Function: compareLabeledNeighbors
static int compareLabeledNeighbors(const void* p1, const void* p2) {
	struct VertexList* e1 = *(struct VertexList**)p1;
	struct VertexList* e2 = *(struct VertexList**)p2;

	int cmp = labelCmp(e1->label, e2->label);
	if (cmp == 0) {
		return labelCmp(e1->endPoint->label, e2->endPoint->label);
	} else {
		return cmp;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq (%rsi), %rbx
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x19340
testl %eax, %eax
je 0x1a1ea
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%r14), %rax
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movq (%rax), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19340