LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/randomGraphGenerators.c
// Function: moveVertexGaussian
void moveVertexGaussian(struct Vertex* v, double moveParameter) {
	generateIntegerGaussianNoise(&(v->d), &(v->lowPoint), moveParameter);
	// mirror in unit interval
	// stupid undefined behavior of abs(INT_MIN) requires to do it ourselves:
	int a = v->d;
	int b = v->lowPoint;
	v->d = a == INT_MIN ? RAND_MAX : abs(a);
	v->lowPoint = b == INT_MIN ? RAND_MAX : abs(b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x28, %rdi
leaq 0x20(%rbx), %rsi
callq 0x18f8f
movl 0x28(%rbx), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl 0x20(%rbx), %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmovol %edx, %ecx
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movl %ecx, 0x28(%rbx)
cmovol %edx, %esi
movl %esi, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/randomGraphGenerators.c
// Function: moveOverlapGraph
void moveOverlapGraph(struct Graph* g, double moveParameter, double d, struct GraphPool* gp) {

	// move vertices
	for (int v=0; v<g->n; ++v) {
		moveVertexGaussian(g->vertices[v], moveParameter);
	}

	// dump edges
	for (int v=0; v<g->n; ++v) {
		dumpVertexListRecursively(gp->listPool, g->vertices[v]->neighborhood);
		g->vertices[v]->neighborhood = NULL;
	}
	g->m = 0;

	// add edge iff distance is smaller than d
	for (int v=0; v<g->n; ++v) {
		for (int w=v+1; w<g->n; ++w) {
			if (euclideanDistanceWrap(v, w, g) < d) {
				addEdgeBetweenVertices(v, w, intLabel(1), g, gp);
				g->vertices[v]->neighborhood->isStringMaster = 1;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movsd %xmm1, 0x10(%rsp)
movq %rdi, %r14
cmpl $0x0, (%rdi)
jle 0x1a13b
xorl %r15d, %r15d
movl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movsd %xmm0, 0x8(%rsp)
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %r12
leaq 0x28(%r12), %rdi
leaq 0x20(%r12), %rsi
movsd 0x8(%rsp), %xmm0
callq 0x18f8f
movl 0x28(%r12), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmovol %ebp, %ecx
movl 0x20(%r12), %eax
movl %ecx, 0x28(%r12)
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmovol %ebp, %ecx
movl %ecx, 0x20(%r12)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1a0eb
cmpl $0x0, (%r14)
jle 0x1a174
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rsi
callq 0x143b8
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq $0x0, 0x8(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1a144
movl $0x0, 0x4(%r14)
cmpl $0x0, (%r14)
jle 0x1a272
movl $0x1, %r13d
xorl %ebp, %ebp
movq %rbp, %r15
incq %rbp
movslq (%r14), %rax
cmpq %rax, %rbp
jge 0x1a263
movq %r13, %r12
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rcx
movq (%rax,%r12,8), %rax
movss 0x28(%rax), %xmm0
movss 0x28(%rcx), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm0
movapd 0x6ca8(%rip), %xmm3     # 0x20e70
divpd %xmm3, %xmm0
movss 0x20(%rax), %xmm1
movss 0x20(%rcx), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtdq2pd %xmm2, %xmm1
divpd %xmm3, %xmm1
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
subsd %xmm2, %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x6c4b(%rip), %xmm0     # 0x20e58
jb 0x1a215
sqrtsd %xmm0, %xmm0
jmp 0x1a21a
callq 0x1230
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1a257
movl $0x1, %edi
callq 0xdde3
movl %r15d, %edi
movl %r12d, %esi
movq %rax, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x8425
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rax
movl $0x1, 0x28(%rax)
incq %r12
cmpl %r12d, (%r14)
jg 0x1a1a3
movslq (%r14), %rax
incq %r13
cmpq %rax, %rbp
jl 0x1a18e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreeEdgesFromCactus
struct ShallowGraph* sampleSpanningTreeEdgesFromCactus(struct ShallowGraph* biconnectedComponents, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTree = getShallowGraph(sgp);
	struct ShallowGraph* idx;
	for (idx=biconnectedComponents; idx!=NULL; idx=idx->next) {
		if (idx->m == 1) {
			appendEdge(spanningTree, shallowCopyEdge(idx->edges, sgp->listPool));
		} else {
			int removalEdgeId = rand() % idx->m;
			struct VertexList* e;
			int i = 0;
			for (e=idx->edges; e!=NULL; e=e->next) {
				if (i != removalEdgeId) {
					appendEdge(spanningTree, shallowCopyEdge(e, sgp->listPool));
				}
				++i;
			}
		}
	}
	return spanningTree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x14aae
movq %rax, %r15
testq %r14, %r14
je 0x1a302
cmpl $0x1, 0x10(%r14)
jne 0x1a2c2
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x7bc0
movq %r15, %rdi
movq %rax, %rsi
callq 0x88b9
jmp 0x1a2fc
callq 0x1250
cltd
idivl 0x10(%r14)
movq (%r14), %r12
testq %r12, %r12
je 0x1a2fc
movl %edx, %ebp
subl $0x1, %ebp
jb 0x1a2f2
movq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x7bc0
movq %r15, %rdi
movq %rax, %rsi
callq 0x88b9
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1a2d6
movq 0x18(%r14), %r14
jmp 0x1a29d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreeFromCactus
struct Graph* sampleSpanningTreeFromCactus(struct Graph* original, struct ShallowGraph* biconnectedComponents, struct GraphPool* gp) {
	struct Graph* spanningTree = emptyGraph(original, gp);
	struct ShallowGraph* idx;
	for (idx=biconnectedComponents; idx!=NULL; idx=idx->next) {
		if (idx->m == 1) {
			addEdgeBetweenVertices(idx->edges->startPoint->number, idx->edges->endPoint->number, idx->edges->label, spanningTree, gp);
		} else {
			int removalEdgeId = rand() % idx->m;
			struct VertexList* e;
			int i = 0;
			for (e=idx->edges; e!=NULL; e=e->next) {
				if (i != removalEdgeId) {
					addEdgeBetweenVertices(e->startPoint->number, e->endPoint->number, e->label, spanningTree, gp);
				}
				++i;
			}
		}
	}
	return spanningTree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %rsi
callq 0x84f8
movq %rax, %r15
testq %r14, %r14
je 0x1a39c
cmpl $0x1, 0x10(%r14)
jne 0x1a354
movq (%r14), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rcx
movl 0x18(%rcx), %edi
movq 0x18(%rax), %rax
movl 0x18(%rax), %esi
movq %r15, %rcx
movq %rbx, %r8
callq 0x8425
jmp 0x1a396
callq 0x1250
cltd
idivl 0x10(%r14)
movq (%r14), %r12
testq %r12, %r12
je 0x1a396
movl %edx, %ebp
subl $0x1, %ebp
jb 0x1a38c
movq (%r12), %rdx
movq 0x10(%r12), %rax
movl 0x18(%rax), %edi
movq 0x18(%r12), %rax
movl 0x18(%rax), %esi
movq %r15, %rcx
movq %rbx, %r8
callq 0x8425
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1a368
movq 0x18(%r14), %r14
jmp 0x1a327
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingWilson
struct ShallowGraph* sampleSpanningTreesUsingWilson(struct Graph* g, int k, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTrees = NULL;
	int j;
	for (j=0; j<k; ++j) {
		struct ShallowGraph* spanningTree = randomSpanningTreeAsShallowGraph(g, sgp);
		spanningTree->next = spanningTrees;
		spanningTrees = spanningTree;
	}
	return spanningTrees;
}

// Assembly:
testl %esi, %esi
jle 0x1a3df
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ec39
movq %r15, 0x18(%rax)
movq %rax, %r15
decl %ebp
jne 0x1a3be
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: shuffle
void shuffle(struct VertexList** array, size_t n) {
    // struct timeval tv;
    // gettimeofday(&tv, NULL);
    // int usec = tv.tv_usec;
    // srand48(usec);

    if (n > 1) {
        size_t i;
        for (i = n - 1; i > 0; i--) {
            size_t j = (unsigned int) (rand() % i);
            struct VertexList* t = array[j];
            array[j] = array[i];
            array[i] = t;
        }
    }
}

// Assembly:
cmpq $0x2, %rsi
jb 0x1a464
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
decq %rbx
callq 0x1250
cltq
xorl %edx, %edx
divq %rbx
movl %edx, %eax
movq (%r14,%rax,8), %rcx
movq (%r14,%rbx,8), %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%r14,%rbx,8)
decq %rbx
jne 0x1a43a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingKruskalOnce
struct ShallowGraph* sampleSpanningTreesUsingKruskalOnce(struct Graph* g, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTree = NULL;
	int i;

	// create and shuffle array of edges of g
	struct ShallowGraph* edges = getGraphEdges(g, sgp);
	struct VertexList** edgeArray = malloc(g->m * sizeof(struct VertexList*));
	if (edges->m != 0) {
		edgeArray[0] = edges->edges;
	}
	for (i=1; i < g->m; ++i) {
		edgeArray[i] = edgeArray[i-1]->next;
	}
	shuffle(edgeArray, g->m);

	// do the kruskal
	spanningTree = kruskalMST(g, edgeArray, gp, sgp);

	// garbage collection
	dumpShallowGraphCycle(sgp, edges);
	free(edgeArray);

	return spanningTree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rsi
callq 0x8376
movq %rax, %r14
movslq 0x4(%r12), %rbp
leaq (,%rbp,8), %rdi
callq 0x1190
movq %rax, %r13
cmpl $0x0, 0x10(%r14)
je 0x1a4a7
movq (%r14), %rax
movq %rax, (%r13)
cmpl $0x2, %ebp
jl 0x1a4c7
movl $0x1, %eax
movq -0x8(%r13,%rax,8), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%r13,%rax,8)
incq %rax
cmpq %rax, %rbp
jne 0x1a4b1
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1a427
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xafb4
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14b75
movq %r13, %rdi
callq 0x1030
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingKruskal
struct ShallowGraph* sampleSpanningTreesUsingKruskal(struct Graph* g, int k, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTrees = NULL;
	int i;

	for (i=0; i<k; ++i) {
		struct ShallowGraph* tmp = sampleSpanningTreesUsingKruskalOnce(g, gp, sgp);
		tmp->next = spanningTrees;
		spanningTrees = tmp;
	}
	return spanningTrees;
}

// Assembly:
testl %esi, %esi
jle 0x1a552
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1a465
movq %r12, 0x18(%rax)
movq %rax, %r12
decl %ebp
jne 0x1a530
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingListing
struct ShallowGraph* sampleSpanningTreesUsingListing(struct Graph* g, int k, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTrees = NULL;
	struct ShallowGraph* trees = listSpanningTrees(g, sgp, gp);
	struct ShallowGraph** array;
	
	struct ShallowGraph* idx;
	int j;
	int nTrees = 0;

	/* find number of listed trees, put them in array */
	for (idx=trees; idx; idx=idx->next) ++nTrees;

	array = malloc(nTrees * sizeof(struct ShallowGraph*));
	j = 0;
	for (idx=trees; idx; idx=idx->next) {	
		array[j] = idx;
		++j;
	}

	/* sample k trees uniformly at random */
	for (j=0; j<k; ++j) {
		int rnd = rand() % nTrees;
		// can't just use the listed tree itself, as it might get selected more than once
		struct ShallowGraph* tree = cloneShallowGraph(array[rnd], sgp);
		tree->next = spanningTrees;
		spanningTrees = tree;
	}
	dumpShallowGraphCycle(sgp, trees);
	free(array);
	return spanningTrees;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %ebp
movq %rcx, %rsi
callq 0xc6e6
movq %rax, %r14
xorl %r13d, %r13d
testq %rax, %rax
je 0x1a5c6
movq %r14, %rax
incl %r13d
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x1a5ba
movl %r13d, %edi
shlq $0x3, %rdi
callq 0x1190
movq %rax, %r15
testq %r14, %r14
je 0x1a5f0
movq %r15, %rax
movq %r14, %rcx
movq %rcx, (%rax)
movq 0x18(%rcx), %rcx
addq $0x8, %rax
testq %rcx, %rcx
jne 0x1a5e0
movq %r14, (%rsp)
testl %ebp, %ebp
jle 0x1a623
xorl %r14d, %r14d
callq 0x1250
cltd
idivl %r13d
movslq %edx, %rax
movq (%r15,%rax,8), %rdi
movq %rbx, %rsi
callq 0x87fa
movq %rax, %r12
movq %r14, 0x18(%rax)
movq %rax, %r14
decl %ebp
jne 0x1a5fb
jmp 0x1a626
xorl %r12d, %r12d
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x14b75
movq %r15, %rdi
callq 0x1030
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingMix
struct ShallowGraph* sampleSpanningTreesUsingMix(struct Graph* g, int k, long int threshold, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	long upperBound = getGoodEstimate(g, sgp, gp);
	if ((upperBound < threshold) && (upperBound != -1)) {
		return sampleSpanningTreesUsingListing(g, k, gp, sgp);
	} else {
		return sampleSpanningTreesUsingWilson(g, k, sgp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movq %r8, %rsi
movq %rcx, %rdx
callq 0x1e6c6
cmpq %r12, %rax
setge %cl
cmpq $-0x1, %rax
sete %al
orb %cl, %al
jne 0x1a6a1
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1a594
testl %ebp, %ebp
jle 0x1a6c0
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ec39
movq %r15, 0x18(%rax)
movq %rax, %r15
decl %ebp
jne 0x1a6a8
jmp 0x1a6c2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingPartialListingMix
struct ShallowGraph* sampleSpanningTreesUsingPartialListingMix(struct Graph* g, int k, long int threshold, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	long upperBound = getGoodEstimate(g, sgp, gp);

	if (k != 1) {
		fprintf(stderr, "This method will only sample one spanning tree, you asked for %i\n", k);
		k = 1;
	}
	if ((upperBound < threshold) && (upperBound != -1)) {
		int i = rand() % threshold;
		int storeI = i;
		struct ShallowGraph* garbage = listKSpanningTrees(g, &i, sgp, gp);
		if (i == 0) {
			struct ShallowGraph* result = garbage->prev;
			result->prev->next=garbage;
			dumpShallowGraphCycle(sgp, garbage);
			return result;
		} else {
			// TODO: do something sensible
			struct ShallowGraph* result = garbage->prev;
			result->prev->next=garbage;
			dumpShallowGraphCycle(sgp, garbage);
			fprintf(stderr, "oversampled! i=%i leftover=%i\n", i, storeI);
			return result;
		}
	} else {
		return sampleSpanningTreesUsingWilson(g, k, sgp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r15
movq %r8, %rsi
movq %rcx, %rdx
callq 0x1e6c6
movq %rax, %r13
cmpl $0x1, %ebp
jne 0x1a7a2
cmpq %r12, %r13
setge %al
cmpq $-0x1, %r13
sete %cl
orb %al, %cl
jne 0x1a77a
callq 0x1250
cltq
cqto
idivq %r12
movq %rdx, %r12
leaq 0x4(%rsp), %r13
movl %r12d, (%r13)
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xca35
movl (%r13), %ebp
movq 0x20(%rax), %r14
movq 0x20(%r14), %rcx
movq %rax, 0x18(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14b75
testl %ebp, %ebp
je 0x1a790
movq 0x12898(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
movl 0x4(%rsp), %edx
leaq 0x681b(%rip), %rsi      # 0x20f89
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1160
jmp 0x1a790
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1ec39
movq %rax, %r14
movq $0x0, 0x18(%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1284f(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x6794(%rip), %rsi      # 0x20f47
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
jmp 0x1a700
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/sampleSubtrees.c
// Function: sampleSpanningTreesUsingCactusMix
struct ShallowGraph* sampleSpanningTreesUsingCactusMix(struct Graph* g, int k, long int threshold, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* spanningTrees = NULL;
	struct ShallowGraph* biconnectedComponents = listBiconnectedComponents(g, sgp);
	int blockCount = 0;
	struct ShallowGraph* idx;
	for (idx=biconnectedComponents; idx!=NULL; idx=idx->next) {
		if (idx->m > 1) {
			++blockCount;
		}
	}
	/* if g is a cactus graph */
	if (g->n - 1 + blockCount == g->m) {
		int j;
		for (j=0; j<k; ++j) {	
			struct ShallowGraph* spanningTree = sampleSpanningTreeEdgesFromCactus(biconnectedComponents, sgp);
			spanningTree->next = spanningTrees;
			spanningTrees = spanningTree;
		}
	} else {
		// for speedup. this is sampleSpanningTreesUsingMix
		long upperBound = getGoodEstimatePrecomputedBlocks(g, biconnectedComponents, sgp, gp);
		if ((upperBound < threshold) && (upperBound != -1)) {
			spanningTrees = sampleSpanningTreesUsingListing(g, k, gp, sgp);
		} else {
			spanningTrees = sampleSpanningTreesUsingWilson(g, k, sgp);
		}
	}
	dumpShallowGraphCycle(sgp, biconnectedComponents);
	return spanningTrees;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r15
movq %r8, %rsi
callq 0xb2bf
movq %rax, %r14
testq %rax, %rax
je 0x1a80c
xorl %eax, %eax
movq %r14, %rcx
xorl %edx, %edx
cmpl $0x2, 0x10(%rcx)
setge %dl
addl %edx, %eax
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x1a7f4
decl %eax
jmp 0x1a811
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl (%r15), %eax
cmpl 0x4(%r15), %eax
jne 0x1a83c
testl %ebp, %ebp
jle 0x1a895
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a284
movq %rax, %r12
movq %r15, 0x18(%rax)
movq %rax, %r15
decl %ebp
jne 0x1a821
jmp 0x1a898
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x1e70d
cmpq %r13, %rax
setge %cl
cmpq $-0x1, %rax
sete %al
orb %cl, %al
jne 0x1a873
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1a594
movq %rax, %r12
jmp 0x1a898
testl %ebp, %ebp
jle 0x1a895
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1ec39
movq %rax, %r12
movq %r13, 0x18(%rax)
movq %rax, %r13
decl %ebp
jne 0x1a87a
jmp 0x1a898
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14b75
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb2bf
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xb5f8
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x521f
movq %rax, %r12
testq %rax, %rax
je 0x1a912
movq %r12, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x873a
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1a8fe
movq %rbx, %rdi
movq %r15, %rsi
callq 0x148f4
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movq %r8, %rsi
movq %rcx, %rdx
callq 0x1e6c6
cmpq %r12, %rax
setge %cl
cmpq $-0x1, %rax
sete %al
orb %cl, %al
jne 0x1a97d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc6e6
testl %ebp, %ebp
jle 0x1a99c
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ec39
movq %r15, 0x18(%rax)
movq %rax, %r15
decl %ebp
jne 0x1a984
jmp 0x1a99e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movl %r8d, 0xc(%rsp)
movq %rcx, %r12
movl %edx, %r13d
movq %rdi, %rbp
movq %rsi, 0x18(%rsp)
movq %rsi, %rdi
movq %r9, 0x10(%rsp)
movq %r9, %rsi
callq 0xb490
testq %rax, %rax
movq %rax, 0x20(%rsp)
je 0x1aa2f
xorl %ebx, %ebx
movq %rax, %r15
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
movq 0x60(%rsp), %r8
callq *%rbp
movq %rax, %r14
movq %rax, %rcx
movq %rcx, %rax
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x1aa07
testq %rax, %rax
je 0x1aa21
movq %rbx, 0x18(%rax)
movq %r14, %rbx
jmp 0x1aa24
movq %rbx, %r14
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x1a9ec
jmp 0x1aa32
xorl %r14d, %r14d
cmpb $0x0, 0xc(%rsp)
je 0x1aa46
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq 0x877e
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x148f4
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x145b2
movq %rax, %r15
movslq %ebp, %rcx
movq %r14, (%rsp)
leaq -0x6b5(%rip), %rdi      # 0x1a3e2
movq %r12, %rsi
movl %ecx, %edx
movl $0x1, %r8d
movq %rbx, %r9
callq 0x1a9ac
movq %rax, %r12
testq %rax, %rax
je 0x1aafa
movq %r12, %r13
cmpl $0x0, 0x10(%r13)
je 0x1aaf1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x81e0
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
callq 0x78fc
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1af0f
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x14832
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1aab5
movl 0x28(%r15), %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x14b75
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b644
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_O1/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, 0x4(%rsp)
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
movq %r12, %rbx
testq %r15, %r15
je 0x1ac1f
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1ab81
movq (%rbx), %rdi
movq (%r15), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1ab67
jmp 0x1abd8
movq 0x8(%r15), %rbx
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x145b2
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x7cd0
cmpl $0x0, 0x28(%r15)
jne 0x1abbb
movq (%r15), %rdi
callq 0x14ba7
movq %rax, (%r15)
movl $0x1, 0x28(%r15)
movq 0x18(%r15), %r12
movzbl %r13b, %r13d
testb $0x1, %bpl
movl $0x1, %eax
cmovel %eax, %r13d
movb $0x1, %bpl
movq %rbx, %r15
jmp 0x1ab5b
movq 0x18(%rbx), %rdi
movq 0x8(%r15), %rsi
movl 0x4(%rsp), %edx
movq %r14, %rcx
callq 0x1ab41
movl %eax, %ebx
movq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x1438e
movzbl %bl, %ecx
movzbl %r13b, %eax
testb $0x1, %bpl
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 0x1ac34
xorl %eax, %eax
jmp 0x1ac3f
movl 0x4(%rsp), %eax
movl %eax, 0x20(%r12)
movb $0x1, %al
movzbl %r13b, %ecx
movzbl %al, %eax
testb $0x1, %bpl
cmovnel %ecx, %eax
jmp 0x1ac10
// File: /workspace/github_c_makefile_star2_O1/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 0x1ad07
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x1aca3
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1ac88
jmp 0x1accc
movq 0x8(%r15), %r13
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x145b2
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x7cd0
movq 0x18(%r15), %r12
movq %r13, %r15
jmp 0x1ac80
movq 0x18(%r13), %rdi
movq 0x8(%r15), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x1ac68
movl %eax, %ebx
movq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x1438e
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 0x1ad21
xorl %eax, %eax
jmp 0x1ad28
movl %ebx, 0x20(%r12)
movb $0x1, %al
jmp 0x1acf8
// File: /workspace/github_c_makefile_star2_O1/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 0x1ade2
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x1ad7e
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1ad63
jmp 0x1ada7
movq 0x8(%r15), %r13
movq %r12, 0x10(%r15)
movq 0x10(%r14), %rdi
callq 0x145b2
movq %rax, 0x18(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x7cd0
movq 0x18(%r15), %r12
movq %r13, %r15
jmp 0x1ad5b
movq 0x18(%r13), %rdi
movq 0x8(%r15), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x1ad43
movl %eax, %ebx
movq $0x0, 0x8(%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x1438e
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 0x1adf6
xorl %eax, %eax
jmp 0x1adfd
movl %ebx, 0x20(%r12)
movb $0x1, %al
jmp 0x1add3
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/searchTree.c
// Function: containsStringRec
static int containsStringRec(struct Vertex* root, struct VertexList* edge) {

	/* if edge == NULL, we are done. check if visited > 0.  */
	if (edge == NULL) {
		return root->visited;
	} 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) {
				return containsStringRec(idx->endPoint, edge->next);
			}
		}

		/* otherwise string is not contained */
		return 0;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %r14, %r14
je 0x1ae3f
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1ae35
movq (%rbx), %rdi
movq (%r14), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1ae13
movq 0x18(%rbx), %rbx
movq 0x8(%r14), %r14
jmp 0x1ae0e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x1c(%rbx), %eax
jmp 0x1ae37
// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/searchTree.c
// Function: getIDRec
static int getIDRec(struct Vertex* root, struct VertexList* edge) {

	/* if edge == NULL, we are done. check if visited > 0.  */
	if (edge == NULL) {
		if (root->visited > 0) {
			return root->lowPoint;
		} else {
			return -1;
		}
	} 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) {
				return getIDRec(idx->endPoint, edge->next);		
			}
		}

		/* otherwise string is not contained */
		return -1;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %r14, %r14
je 0x1ae7a
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1ae85
movq (%rbx), %rdi
movq (%r14), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1ae58
movq 0x18(%rbx), %rbx
movq 0x8(%r14), %r14
jmp 0x1ae53
cmpl $0x0, 0x1c(%rbx)
jle 0x1ae85
movl 0x20(%rbx), %eax
jmp 0x1ae8a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x1af06
movl %esi, %ebx
leal 0x1(%rbx), %ebp
leaq 0x60e4(%rip), %r14      # 0x20fa8
leaq 0x60e2(%rip), %r15      # 0x20fad
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
movq (%r12), %rcx
movq 0x18(%r12), %rax
movl 0x1c(%rax), %edx
movl 0x20(%rax), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b0
movq 0x18(%r12), %rdi
movl %ebp, %esi
callq 0x1aea7
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1aecb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1af5d
movq %rdx, %r12
movq %r15, %r13
movq (%r13), %rsi
movl 0x20(%rbx), %edx
incl %edx
movq %rbx, %rdi
movq %r12, %rcx
callq 0x1ab41
movzbl %al, %eax
addl %eax, 0x20(%rbx)
addl %eax, 0x28(%rbx)
incl 0x18(%rbx)
movq $0x0, (%r13)
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1af2c
movq %r14, %rdi
movq %r15, %rsi
callq 0x14b75
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1afcb
movq %rdx, %r12
movq %r15, %r13
movq (%r13), %rsi
movl 0x28(%r13), %edx
movl 0x20(%rbx), %ecx
incl %ecx
movq %rbx, %rdi
movq %r12, %r8
callq 0x1ad43
movzbl %al, %eax
addl %eax, 0x20(%rbx)
addl %eax, 0x28(%rbx)
movl 0x28(%r13), %eax
addl %eax, 0x18(%rbx)
movq $0x0, (%r13)
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1af92
movq %r14, %rdi
movq %r15, %rsi
callq 0x14b75
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %rbx
cmpq %rdi, %rsi
je 0x1b18b
cmpl $0x0, 0x1c(%rsi)
jle 0x1b18b
movl $0x1, 0x1c(%rsi)
incl 0x28(%rbx)
incl 0x18(%rbx)
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0x1b1a6
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x1b16c
movq 0x8(%r14), %r14
jmp 0x1b18f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %r14
cmpq %rdi, %rsi
je 0x1b1d3
movl 0x20(%rsi), %eax
testl %eax, %eax
jle 0x1b1d3
addl %ebx, %eax
movl %eax, 0x20(%rsi)
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x1b1f0
movq 0x18(%r15), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x1b1b8
movq 0x8(%r15), %r15
jmp 0x1b1d7
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %rbx
cmpq %rdi, %rsi
je 0x1b21b
cmpl $0x0, 0x20(%rsi)
jle 0x1b21b
movl 0x20(%rbx), %eax
incl %eax
movl %eax, 0x20(%rbx)
movl %eax, 0x20(%rsi)
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0x1b236
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x1b1fe
movq 0x8(%r14), %r14
jmp 0x1b21f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x1b27b
movq 0x18(%r12), %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1b23e
movzbl %al, %eax
movl %eax, 0x20(%r12)
movq 0x8(%r12), %r12
jmp 0x1b255
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x1b2ad
xorl %eax, %eax
xorl %esi, %esi
cmpl $0x0, 0x20(%rcx)
movq %rax, %rdx
cmoveq %rsi, %rdx
cmoveq %rcx, %rsi
cmovneq %rcx, %rax
movq 0x8(%rcx), %rdi
movq %rdx, 0x8(%rcx)
movq %rdi, %rcx
testq %rdi, %rdi
jne 0x1b288
jmp 0x1b2b1
xorl %esi, %esi
xorl %eax, %eax
testq %rax, %rax
je 0x1b2cd
xorl %edx, %edx
movq %rax, %rcx
movq 0x8(%rax), %rax
movq %rdx, 0x8(%rcx)
movq %rcx, %rdx
testq %rax, %rax
jne 0x1b2b8
jmp 0x1b2cf
xorl %ecx, %ecx
movq %rcx, 0x8(%rbx)
movq 0x18(%r14), %rdi
callq 0x143b8
movl 0x1c(%rbx), %ecx
movb $0x1, %al
cmpl %ebp, %ecx
jge 0x1b30b
testl %ecx, %ecx
jle 0x1b2f1
subl %ecx, 0x18(%r15)
decl 0x28(%r15)
cmpq $0x0, 0x8(%rbx)
jne 0x1b30b
cmpq %r15, %rbx
je 0x1b309
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x14628
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1b67f
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x1b644
movq 0x8(%r15), %r12
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x1438e
movq %r12, %r15
testq %r12, %r12
jne 0x1b65b
movq 0x10(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x14628
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq 0x10(%rsi), %rsi
callq 0x7c08
movq %rax, %r14
movl 0x28(%r15), %eax
movl %eax, 0x28(%r14)
movq 0x1c(%r15), %rax
movq %rax, 0x1c(%r14)
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x1b703
movq 0x18(%rbx), %rdi
callq 0x1432b
movq %rax, %r15
movq (%r12), %rax
movq %rax, (%r15)
movq %r14, 0x10(%r15)
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0x1b696
movq %rax, 0x18(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x7cd0
movq 0x8(%r12), %r12
jmp 0x1b6c4
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x14aae
movq %rax, %r15
movq %rbx, %rdi
callq 0x14aae
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x1b7a8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14b19
movq 0x18(%r15), %r14
movq $0x0, 0x18(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14b19
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq