LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movslq %edx, %rdi
callq 0x1190
movq %rax, %rbx
leaq 0x56f5(%rip), %rsi      # 0x20fe9
xorl %ebp, %ebp
leaq 0x24(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %r13, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $0x2, %eax
jne 0x1b97b
movq %rbx, 0x10(%rsp)
movl 0xc(%rsp), %ecx
xorl %ebp, %ebp
testl %ecx, %ecx
jle 0x1b96d
xorl %ebx, %ebx
movq %r15, 0x18(%rsp)
movq 0x10(%rsp), %r15
movq %r13, %rdi
leaq 0x500b(%rip), %rsi      # 0x2093f
leaq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x1060
addl %eax, %ebp
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x722f
movq %r12, %rdi
movq %rax, %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rcx
callq 0x1ae1e
incl %ebx
movl 0xc(%rsp), %ecx
cmpl %ecx, %ebx
jl 0x1b92a
cmpl %ecx, %ebp
jne 0x1b994
movq 0x10(%rsp), %rbx
movl $0x1, %ebp
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1165d(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x5615(%rip), %rsi      # 0x20fba
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
jmp 0x1b971
// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %r12
movslq %esi, %rdi
callq 0x1190
movq %rax, %rbx
leaq 0x55f6(%rip), %rsi      # 0x20fe8
movq %r12, %rdi
movq %r13, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x1bab6
cmpl $0x2, %eax
jne 0x1ba9c
movq %rbx, 0x8(%rsp)
movl (%r15), %ecx
testl %ecx, %ecx
jle 0x1ba84
xorl %ebp, %ebp
xorl %ebx, %ebx
movq %r14, 0x18(%rsp)
xorl %r14d, %r14d
movq %r15, 0x10(%rsp)
movq 0x8(%rsp), %r15
movq %r12, %rdi
leaq 0x4efc(%rip), %rsi      # 0x2093c
leaq 0x4(%rsp), %rdx
leaq 0x24(%rsp), %rcx
xorl %eax, %eax
callq 0x1060
addl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
callq 0x722f
movq %rax, %r13
movl 0x4(%rsp), %eax
movl %eax, 0x28(%r13)
movq %r14, 0x18(%r13)
incl %ebx
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movq %r13, %r14
cmpl %ecx, %ebx
jl 0x1ba36
jmp 0x1ba89
xorl %r13d, %r13d
xorl %ebp, %ebp
leal (%rcx,%rcx), %eax
cmpl %eax, %ebp
jne 0x1bad3
movq 0x8(%rsp), %rdi
callq 0x1030
jmp 0x1bac1
movq 0x11555(%rip), %rcx     # 0x2cff8
movq (%rcx), %rdi
leaq 0x5545(%rip), %rsi      # 0x20ff2
movl %eax, %edx
xorl %eax, %eax
callq 0x1160
movq %rbx, %rdi
callq 0x1030
xorl %r13d, %r13d
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1151e(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x5544(%rip), %rsi      # 0x21028
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
jmp 0x1ba90
// File: /workspace/github_c_makefile_star2_O3/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 0x1447e
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rcx
movq %rbx, %r8
callq 0x1b8c8
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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), %r12
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x1190
movq %rax, %r14
movq 0x10(%rbx), %r13
testq %r12, %r12
jle 0x1bba0
movq %r14, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x10d0
xorl %eax, %eax
movq (%r13,%rax,8), %rcx
movl $0xffffffff, 0x1c(%rcx) # imm = 0xFFFFFFFF
incq %rax
cmpq %rax, %r12
jne 0x1bb8c
movslq %ebp, %r15
movq (%r13,%r15,8), %rdi
xorl %esi, %esi
callq 0x1bc1f
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movl (%rbx), %eax
testl %eax, %eax
jle 0x1bc0d
movq 0x1142d(%rip), %r13     # 0x2cff8
leaq 0x5485(%rip), %r15      # 0x21057
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movslq 0x1c(%rcx), %rcx
cmpq $-0x1, %rcx
je 0x1bbf8
movl %r12d, (%r14,%rcx,4)
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x1bbd5
jmp 0x1bc0d
movq (%r13), %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1160
movl (%rbx), %eax
jmp 0x1bbeb
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_O3/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 0x8(%rdi), %r14
testq %r14, %r14
je 0x1bc5b
movq 0x18(%r14), %rdi
cmpl $-0x1, 0x1c(%rdi)
jne 0x1bc55
movl %eax, %esi
callq 0x1bc1f
incl %eax
movl 0x18(%rbx), %ecx
movq 0x18(%r14), %rdx
movl %ecx, 0x20(%rdx)
movq 0x8(%r14), %r14
jmp 0x1bc33
movl %eax, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movslq (%rdi), %r12
testq %r12, %r12
jle 0x1bd25
movl %esi, %ebp
movq %rdi, %r14
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x1190
movq %rax, %rbx
movq 0x10(%r14), %r13
movq %rax, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x10d0
xorl %eax, %eax
movq (%r13,%rax,8), %rcx
movl $0xffffffff, 0x1c(%rcx) # imm = 0xFFFFFFFF
incq %rax
cmpq %rax, %r12
jne 0x1bcab
movslq %ebp, %r15
movq (%r13,%r15,8), %rdi
xorl %esi, %esi
callq 0x1bc1f
movq 0x10(%r14), %rcx
movq (%rcx,%r15,8), %rdx
movl $0xffffffff, 0x20(%rdx) # imm = 0xFFFFFFFF
movl (%r14), %edx
testl %edx, %edx
jle 0x1bd27
xorl %r15d, %r15d
movq (%rcx,%r15,8), %rdi
movl 0x1c(%rdi), %esi
cmpl $-0x1, %esi
jne 0x1bd11
incl %eax
movl %eax, %esi
callq 0x1bc1f
movq 0x10(%r14), %rcx
movq (%rcx,%r15,8), %rsi
movl $0xffffffff, 0x20(%rsi) # imm = 0xFFFFFFFF
movl (%r14), %edx
movl 0x1c(%rsi), %esi
movslq %esi, %rsi
movl %r15d, (%rbx,%rsi,4)
incq %r15
movslq %edx, %rsi
cmpq %rsi, %r15
jl 0x1bce7
jmp 0x1bd27
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x1, 0x1c(%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x1bd70
movl %esi, %ebx
cmpl $0x0, 0x24(%r14)
jne 0x1bd67
movq 0x18(%r14), %rdi
cmpl $0x0, 0x1c(%rdi)
jne 0x1bd67
movl %ebx, %esi
callq 0x1bd39
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1bd4f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x1bdce
movl %esi, %ebp
movq %rdi, %r15
movl %esi, %r14d
leaq (,%r14,8), %rdi
callq 0x1190
movq %rax, %rbx
movq 0x8(%r15), %rax
movq %rax, (%rbx)
cmpl $0x1, %ebp
je 0x1bdc1
movl $0x1, %eax
movq -0x8(%rbx,%rax,8), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r14
jne 0x1bdac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a34b
jmp 0x1bdd0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl $0x0, (%rsi)
movq 0x8(%rdi), %rbx
xorl %eax, %eax
testq %rbx, %rbx
je 0x1be40
movq %rbx, %rcx
movq 0x18(%rcx), %rdx
cmpl $0x0, 0x1c(%rdx)
jne 0x1be01
incl %eax
movl %eax, (%rsi)
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1bdf3
testl %eax, %eax
jle 0x1be3e
movl %eax, %edi
shlq $0x3, %rdi
callq 0x1190
testq %rbx, %rbx
je 0x1be40
xorl %ecx, %ecx
movq 0x18(%rbx), %rdx
cmpl $0x0, 0x1c(%rdx)
jne 0x1be33
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
incl %ecx
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x1be20
jmp 0x1be40
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r15
callq 0x1250
cltd
idivl (%r14)
movslq %edx, %rax
movq (%r15,%rax,8), %r15
movq 0x10(%rbx), %r12
callq 0x1250
cltd
idivl (%rbx)
movslq %edx, %rax
movq (%r12,%rax,8), %r12
movq (%r15), %rdi
movq (%r12), %rsi
callq 0x1bb34
testl %eax, %eax
je 0x1be8e
xorl %eax, %eax
jmp 0x1bee8
movl 0x18(%r12), %eax
incl %eax
movl %eax, 0x1c(%r15)
movl $0x1, 0x1c(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1bef4
movslq (%r14), %rcx
testq %rcx, %rcx
jle 0x1bee8
movq 0x10(%r14), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
movslq 0x1c(%r8), %rdi
movl $0x0, 0x1c(%r8)
testq %rdi, %rdi
je 0x1bee0
movq 0x10(%rbx), %r8
movq -0x8(%r8,%rdi,8), %rdi
movl $0x0, 0x1c(%rdi)
incq %rsi
cmpq %rsi, %rcx
jne 0x1bebb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r12
callq 0x1250
cltd
idivl (%r14)
movslq %edx, %rax
movq (%r12,%rax,8), %r12
movq 0x10(%rbx), %r13
callq 0x1250
cltd
idivl (%rbx)
movslq %edx, %rax
movq (%r13,%rax,8), %r13
movq (%r12), %rdi
movq (%r13), %rsi
callq 0x1bb34
testl %eax, %eax
je 0x1c2df
xorl %eax, %eax
jmp 0x1c33b
movl 0x18(%r13), %eax
incl %eax
movl %eax, 0x1c(%r12)
movl $0x1, 0x1c(%r13)
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1c345
movslq (%r14), %rcx
testq %rcx, %rcx
jle 0x1c33b
movq 0x10(%r14), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
movslq 0x1c(%r8), %rdi
movl $0x0, 0x1c(%r8)
testq %rdi, %rdi
je 0x1c333
movq 0x10(%rbx), %r8
movq -0x8(%r8,%rdi,8), %rdi
movl $0x0, 0x1c(%rdi)
incq %rsi
cmpq %rsi, %rcx
jne 0x1c30e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r12d
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movq 0x10(%rsi), %r15
callq 0x1250
cltd
idivl (%r13)
cmpl $0x0, (%r14)
jle 0x1c726
movq %r13, 0x10(%rsp)
movl %r12d, 0xc(%rsp)
movslq %edx, %rax
movq (%r15,%rax,8), %r12
movq 0x18(%rbx), %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%r12), %rdi
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rsi
callq 0x1bb34
testl %eax, %eax
jne 0x1c678
movq %r13, %rdi
callq 0x141f1
movq %rbx, 0x8(%rax)
movq 0x10(%r14), %rcx
movq (%rcx,%r15,8), %rcx
movq %rcx, 0x18(%rax)
incl %ebp
movq %rax, %rbx
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1c643
xorl %r8d, %r8d
testl %ebp, %ebp
jle 0x1c72a
callq 0x1250
cltd
idivl %ebp
movq %rbx, %rax
testl %edx, %edx
jle 0x1c6a8
movq %rbx, %rax
movq 0x8(%rax), %rax
decl %edx
jne 0x1c6a0
movq 0x18(%rax), %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x142b2
testq %r15, %r15
je 0x1c731
movl 0x18(%r15), %eax
incl %eax
movl %eax, 0x1c(%r12)
movl $0x1, 0x1c(%r15)
movq %r12, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %r12d
movl %r12d, %edx
callq 0x1c757
movl %eax, %r8d
movq 0x10(%rsp), %rcx
movslq (%rcx), %rax
testq %rax, %rax
jle 0x1c739
movq 0x10(%rcx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rdi
movslq 0x1c(%rdi), %rsi
movl $0x0, 0x1c(%rdi)
testq %rsi, %rsi
je 0x1c71c
movq 0x10(%r14), %rdi
movq -0x8(%rdi,%rsi,8), %rsi
movl $0x0, 0x1c(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1c6f8
jmp 0x1c739
xorl %ebp, %ebp
jmp 0x1c736
movl 0xc(%rsp), %r12d
jmp 0x1c739
movl 0xc(%rsp), %r12d
xorl %r8d, %r8d
testl %r12d, %r12d
movl $0x1, %eax
cmovnel %ebp, %eax
imull %r8d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1bb34
testl %eax, %eax
je 0x1cbe4
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 0x1bb34
nop
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: popSupportSetElement
struct SupportSetElement* popSupportSetElement(struct SupportSet* s) {
	struct SupportSetElement* e = s->first;
	if (s->first != NULL) {
		s->first = e->next;
		s->size -= e->data.foundIso;
	}
	return e;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1cced
movq 0x28(%rax), %rcx
movq %rcx, (%rdi)
movslq 0x20(%rax), %rcx
subq %rcx, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: printSupportSet
void printSupportSet(struct SupportSet* l, FILE* out) {
	fprintf(out, "%zu elements: [", l->size);
	for (struct SupportSetElement* i=l->first; i!=NULL; i=i->next) {
		fprintf(out, "%i, ", i->data.g->number);
	}
	fprintf(out, "]\n");

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdx
leaq 0x369c(%rip), %rsi      # 0x203db
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq (%r14), %r15
testq %r15, %r15
je 0x1cd75
leaq 0x3693(%rip), %r14      # 0x203eb
movq 0x8(%r15), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1160
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x1cd58
leaq 0x32f4(%rip), %rdi      # 0x20070
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x1220
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: printSupportSetSparse
void printSupportSetSparse(struct SupportSet* l, FILE* out) {
	fprintf(out, "%i:", l->first->data.h->number);
	for (struct SupportSetElement* e=l->first; e!=NULL; e=e->next) {
		fprintf(out, " %i", e->data.g->number);
	}
	fprintf(out, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x10(%rax), %rax
movl 0x8(%rax), %edx
leaq 0x3647(%rip), %rsi      # 0x203f6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq (%r14), %r15
testq %r15, %r15
je 0x1cde5
leaq 0x47e1(%rip), %r14      # 0x215a9
movq 0x8(%r15), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1160
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x1cdc8
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1110
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: dumpSupportSetElements
void dumpSupportSetElements(struct SupportSetElement* e) {
	if (e->next != NULL) {
		dumpSupportSetElements(e->next);
	}

	dumpNewCube(e->data.S, e->data.g->n);
	free(e);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x1ce7a
callq 0x1ce68
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rdi
movl (%rax), %esi
callq 0x161f7
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: dumpSupportSetElementsWithPostorder
void dumpSupportSetElementsWithPostorder(struct SupportSetElement* e, struct GraphPool* gp) {
	if (e->next != NULL) {
		dumpSupportSetElementsWithPostorder(e->next, gp);
	}

	dumpNewCube(e->data.S, e->data.g->n);
	dumpGraph(gp, e->data.h);
	free(e->data.postorder);
	free(e);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x1cec9
movq %r14, %rsi
callq 0x1ceae
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rdi
movl (%rax), %esi
callq 0x161f7
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x14700
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: intersectTwoSupportSets
struct SupportSet* intersectTwoSupportSets(struct SupportSet* l1, struct SupportSet* l2) {
	struct SupportSet* supportList = getSupportSet();

	struct SupportSetElement* a = l1->first;
	struct SupportSetElement* b = l2->first;

	/* Once one or the other list runs out -- we're done */
	while (a != NULL && b != NULL)
	{
		if (a->data.g->number == b->data.g->number)
		{
			appendSupportSetData(supportList, a->data);
			a = a->next;
			b = b->next;
		}
		else if (a->data.g->number < b->data.g->number) /* advance the smaller list */
			a = a->next;
		else
			b = b->next;
	}
	return supportList;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x28, %esi
callq 0x1120
movq %rax, %rbx
movq (%r15), %r15
movq (%r14), %r14
testq %r15, %r15
setne %al
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1cff3
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%r15), %rax
movq 0x8(%r14), %rcx
movl 0x8(%rcx), %ecx
cmpl %ecx, 0x8(%rax)
jne 0x1cfdd
movl $0x1, %edi
movl $0x30, %esi
callq 0x1120
leaq 0x28(%r13), %rcx
testq %r13, %r13
movq 0x20(%r15), %rdx
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movq %rdx, 0x20(%rax)
cmoveq %rbx, %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rbx)
movslq 0x20(%rax), %rcx
addq %rcx, %r12
movq %r12, 0x18(%rbx)
movq 0x28(%r15), %r15
movq 0x28(%r14), %r14
movq %rax, %r13
jmp 0x1cfe9
jge 0x1cfe5
movq 0x28(%r15), %r15
jmp 0x1cfe9
movq 0x28(%r14), %r14
testq %r15, %r15
je 0x1cff3
testq %r14, %r14
jne 0x1cf7c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: intersectSupportSets
struct SupportSet* intersectSupportSets(struct SupportSet* aprioriList) {
	if (aprioriList == NULL) {
		return NULL;
	}
	if (aprioriList->next == NULL) {
		return intersectTwoSupportSets(aprioriList, aprioriList); // copy
	}

	struct SupportSet* intersection = intersectTwoSupportSets(aprioriList, aprioriList->next);
	for (struct SupportSet* support=aprioriList->next->next; support!=NULL; support=support->next) {
		struct SupportSet* tmp = intersectTwoSupportSets(intersection, support);
		dumpSupportSetCopy(intersection);
		intersection = tmp;
	}

	return intersection;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1d04f
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x1d054
callq 0x1cf3c
movq %rax, %r14
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x1d061
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1cf3c
movq %rax, %r15
movq %r14, %rdi
callq 0x1ce4c
movq 0x10(%rbx), %rbx
movq %r15, %r14
testq %rbx, %rbx
jne 0x1d02b
jmp 0x1d064
xorl %r15d, %r15d
jmp 0x1d064
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1cf3c
movq %r14, %r15
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: isSortedSupportSetOnPatterns
char isSortedSupportSetOnPatterns(struct SupportSet* l) {
	if (l->size < 2) {
		return 1;
	}
	for (struct SupportSet* e=l; e->next!=NULL; e=e->next) {
		if (e->first->data.h->number >= e->next->first->data.h->number) {
			return 0;
		}
	}
	return 1;
}

// Assembly:
movb $0x1, %al
cmpq $0x2, 0x18(%rdi)
jb 0x1d09e
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1d098
movq (%rdi), %rcx
movq 0x10(%rcx), %rcx
movl 0x8(%rcx), %ecx
movq (%rax), %rdx
movq 0x10(%rdx), %rdx
movq %rax, %rdi
cmpl 0x8(%rdx), %ecx
jl 0x1d076
testq %rax, %rax
sete %al
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: getSupportSetsOfPatterns
struct SupportSet* getSupportSetsOfPatterns(struct SupportSet* allSupportSets, struct IntSet* patternIds) {
	assert(allSupportSets != NULL);
	assert(patternIds != NULL);
	assert(isSortedUniqueIntSet(patternIds));
	assert(isSortedSupportSetOnPatterns(allSupportSets));

	struct SupportSet* selectedSupportSets = NULL;

	struct SupportSet* a = allSupportSets;
	struct IntElement* b = patternIds->first;

	size_t assert_Found = 0;

	/* Once one or the other list runs out -- we're done */
	while (a != NULL && b != NULL)
	{
		if (a->first->data.h->number == b->value) {
			struct SupportSet* supportSet = shallowCopySupportSet(a);
			supportSet->next = selectedSupportSets;
			selectedSupportSets = supportSet;

			a = a->next;
			b = b->next;

			++assert_Found;
		}
		else if (a->first->data.h->number < b->value) /* advance the smaller list */
			a = a->next;
		else
			b = b->next;
	}

	assert(assert_Found == patternIds->size);
	return selectedSupportSets;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
testq %rdi, %rdi
setne %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1d124
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %r12
movq 0x10(%r12), %rax
movl (%r15), %ecx
cmpl %ecx, 0x8(%rax)
jne 0x1d10c
movl $0x1, %edi
movl $0x28, %esi
callq 0x1120
movq %r12, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movl 0x20(%rbx), %ecx
movl %ecx, 0x20(%rax)
movq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq %r14, 0x10(%rax)
movq 0x10(%rbx), %rbx
movq 0x8(%r15), %r15
movq %rax, %r14
jmp 0x1d118
jge 0x1d114
movq 0x10(%rbx), %rbx
jmp 0x1d118
movq 0x8(%r15), %r15
testq %rbx, %rbx
je 0x1d127
testq %r15, %r15
jne 0x1d0c3
jmp 0x1d127
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: appendSupportSets
struct SupportSet* appendSupportSets(struct SupportSet* front, struct SupportSet* back) {
	struct SupportSet* tmp; 
	if (front) {
		for (tmp=front; tmp->next != NULL; tmp=tmp->next);
		tmp->next = back;
	} else {
		front = back;
	}
	return front;
}

// Assembly:
testq %rdi, %rdi
je 0x1d1b3
movq %rdi, %rax
movq %rdi, %rdx
movq %rdx, %rcx
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
jne 0x1d1a2
movq %rsi, 0x10(%rcx)
retq
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/supportSet.c
// Function: popSupportSet
struct SupportSet* popSupportSet(struct SupportSet** s) {
	struct SupportSet* head = (*s);
	(*s) = (*s)->next;
	head->next = NULL;
	return head;
}

// Assembly:
movq (%rdi), %rax
movq 0x10(%rax), %rcx
movq %rcx, (%rdi)
movq $0x0, 0x10(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeCenter.c
// Function: _markEdges
int __markEdges(struct Vertex* root, int value) {
	struct VertexList* e;
	int max = value;

	root->lowPoint = value;

	for (e=root->neighborhood; e!=NULL; e=e->next) {
		if (e->endPoint->lowPoint > value) {
			/* __markEdges returns the depth of the subtree rooted at 
			e->endPoint */
			int current = __markEdges(e->endPoint, value + 1);
			e->used = current;

			if (current > max) {
				max = current;
			}
		}
	}
	/* return the maximum depth of any subtree rooted at root */
	return max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, 0x20(%rdi)
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x1d20c
leal 0x1(%rbx), %r14d
movl %ebx, %ebp
movq 0x18(%r15), %rdi
cmpl %ebx, 0x20(%rdi)
jle 0x1d201
movl %r14d, %esi
callq 0x1d1cc
movl %eax, 0x20(%r15)
cmpl %ebp, %eax
cmovgl %eax, %ebp
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x1d1e7
jmp 0x1d20e
movl %ebx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeCenter.c
// Function: _moveCenter
void __moveCenter(struct Vertex* root, struct Vertex* parent, int value, int depth, int* centers) {
	struct VertexList* e;
	int max = INT_MIN;
	struct VertexList* max1 = NULL;
	struct VertexList* max2 = NULL;

	/* update depths to fit to the new root */
	for (e=root->neighborhood; e!=NULL; e=e->next) {
		if (e->endPoint != parent) {
			e->used -= depth;
		} else {
			e->used = value;
		}
	}

	/* find maximum depth branch */
	for (e=root->neighborhood; e!=NULL; e=e->next) {
		if (e->used > max) {
			max = e->used;
			max1 = e;
		}
	}

	/* find second maximum depth branch */
	max = INT_MIN;
	for (e=root->neighborhood; e!=NULL; e=e->next) {
		if (e != max1) {
			if (e->used > max) {
				max = e->used;
				max2 = e;
			}
		}
	}

	/* if the current node is no leaf */
	if (max2 != NULL) {

		/* if the two deepest branches have same depth, we are at the 
		center */
		if (max1->used == max2->used) {
			centers[0] = 2;
			centers[1] = root->number;
			return;
		}

		/* this is the case where the longest path has odd length
		and we get two center nodes */
		if (max1->used == max2->used + 1) {
			centers[0] = 3;
			centers[1] = root->number;
			centers[2] = max1->endPoint->number;
			return;
		}
		/* ...and the symmetric case */
		if (max2->used == max1->used + 1) {
			centers[0] = 3;
			centers[1] = root->number;
			centers[2] = max2->endPoint->number;
			return;
		}

		/* move the center to the root of the deepest branch */
		__moveCenter(max1->endPoint, root, max2->used + 1, depth + 1, centers);
	} else {
		/* if we start at a leaf */
		__moveCenter(max1->endPoint, root, 1, 1, centers);
	}	
}

// Assembly:
movq %rdi, %rax
movq 0x8(%rdi), %rdi
movq %rdi, %r9
movl %edx, %r10d
cmpq %rsi, 0x18(%r9)
je 0x1d235
movl 0x20(%r9), %r10d
subl %ecx, %r10d
movl %r10d, 0x20(%r9)
movq 0x8(%r9), %r9
testq %r9, %r9
jne 0x1d225
movl $0x80000000, %edx       # imm = 0x80000000
movq %rdi, %r9
xorl %esi, %esi
movl 0x20(%r9), %r10d
cmpl %edx, %r10d
cmovgl %r10d, %edx
cmovgq %r9, %rsi
movq 0x8(%r9), %r9
testq %r9, %r9
jne 0x1d24c
movl $0x80000000, %edx       # imm = 0x80000000
xorl %r9d, %r9d
cmpq %rsi, %rdi
je 0x1d280
movl 0x20(%rdi), %r10d
cmpl %edx, %r10d
cmovgl %r10d, %edx
cmovgq %rdi, %r9
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x1d26c
testq %r9, %r9
je 0x1d2ad
movl 0x20(%rsi), %edi
movl 0x20(%r9), %r10d
cmpl %r10d, %edi
je 0x1d2c3
leal 0x1(%r10), %edx
cmpl %edx, %edi
je 0x1d2d1
incl %edi
cmpl %edi, %r10d
je 0x1d2e5
incl %ecx
jmp 0x1d2b7
movl $0x1, %edx
movl $0x1, %ecx
movq 0x18(%rsi), %rdi
movq %rax, %rsi
jmp 0x1d21b
movl $0x2, (%r8)
movl $0x4, %ecx
jmp 0x1d2fc
movl $0x3, (%r8)
movl 0x18(%rax), %eax
movl %eax, 0x4(%r8)
movq 0x18(%rsi), %rax
jmp 0x1d2f7
movl $0x3, (%r8)
movl 0x18(%rax), %eax
movl %eax, 0x4(%r8)
movq 0x18(%r9), %rax
movl $0x8, %ecx
movl 0x18(%rax), %eax
movl %eax, (%r8,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeCenter.c
// Function: treeCenter
int* treeCenter(struct Graph* tree) {
	int* centers = malloc(3 * sizeof(int));
	int i;

	if (tree->n < 3) {
		/* if the tree consists of one or two vertices, the
		center is clear (and the root-rebase algorithm does not work)
		*/
		if (tree->n == 1) {
			centers[0] = 2;
			centers[1] = 0;
		} else {
			centers[0] = 3;
			centers[1] = 0;
			centers[2] = 1;
		} /* zero vertex trees are not allowed */
	} else {
		/* init lowpoints and do the root-rebase algorithm
		starting from the first vertex we can get a hold of */
		for (i=0; i<tree->n; ++i) {
			tree->vertices[i]->lowPoint = INT_MAX;
		}
		__markEdges(tree->vertices[0], 0);
		__moveCenter(tree->vertices[0], tree->vertices[0] /*NULL*/, 0, 0, centers);	
	}
	return centers;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0xc, %edi
callq 0x1190
movq %rax, %rbx
movslq (%r14), %rax
cmpq $0x3, %rax
jge 0x1d32f
cmpl $0x1, %eax
jne 0x1d36a
movq $0x2, (%rbx)
jmp 0x1d378
movq 0x10(%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl $0x7fffffff, 0x20(%rsi) # imm = 0x7FFFFFFF
incq %rdx
cmpq %rdx, %rax
jne 0x1d335
movq (%rcx), %rdi
xorl %esi, %esi
callq 0x1d1cc
movq 0x10(%r14), %rax
movq (%rax), %rdi
movq %rdi, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x1d21b
jmp 0x1d378
movq $0x3, (%rbx)
movl $0x1, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeCenter.c
// Function: computeDistanceToCenter
int computeDistanceToCenter(struct Graph* g, struct ShallowGraphPool* sgp) {

	struct ShallowGraph* queue = getShallowGraph(sgp);

	// copmute tree center
	int* center = treeCenter(g);

	// clean the ->lowpoints
	for (int v=0; v<g->n; ++v) {
		g->vertices[v]->lowPoint = -1;
	}

	// init the queue with (bi)center
	for (int i=1; i<center[0]; ++i) {
		addToVertexQueue(g->vertices[center[i]], queue, sgp);
		g->vertices[center[i]]->lowPoint = 0;
	}
	free(center);

	// do bfs, mark vertices according to their distance to the (bi)center
	int depth = 0;
	for (struct Vertex* v=popFromVertexQueue(queue, sgp); v!=NULL; v=popFromVertexQueue(queue, sgp)) {
		depth = v->lowPoint + 1;
		for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
			if (e->endPoint->lowPoint == -1) {
				e->endPoint->lowPoint = depth;
				addToVertexQueue(e->endPoint, queue, sgp);
			}
		}
	}
	dumpShallowGraph(sgp, queue);

	// depth is set too high by the last loop over the leaves in the outer shell
	return depth - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x1498d
movq %rax, %r14
movq %r15, %rdi
callq 0x1d304
movq %r15, %rdi
movq %rax, %r13
movslq (%r15), %r8
testq %r8, %r8
jle 0x1d3ce
movq 0x10(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl $0xffffffff, 0x20(%rsi) # imm = 0xFFFFFFFF
incq %rdx
cmpq %rdx, %r8
jne 0x1d3bb
movslq (%r13), %r12
cmpq $0x2, %r12
jl 0x1d414
movq 0x10(%rdi), %rdx
movl $0x1, %ebp
movq %rdi, (%rsp)
movslq (%r13,%rbp,4), %r15
movq (%rdx,%r15,8), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1e6f0
movq (%rsp), %rdi
movq 0x10(%rdi), %rdx
movq (%rdx,%r15,8), %rcx
movl $0x0, 0x20(%rcx)
incq %rbp
cmpq %rbp, %r12
jne 0x1d3e5
movq %r13, %rdi
callq 0x1030
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e719
testq %rax, %rax
je 0x1d472
movl 0x20(%rax), %r15d
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x1d460
leal 0x1(%r15), %ebp
movq 0x18(%r12), %rdi
cmpl $-0x1, 0x20(%rdi)
jne 0x1d456
movl %ebp, 0x20(%rdi)
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1e6f0
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1d43d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1e719
testq %rax, %rax
jne 0x1d42c
jmp 0x1d478
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
callq 0x149f4
movl %r15d, %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_O3/pwelke[P]GraphMiningTools/treeEnumeration.c
// Function: extendPatternAllWays
struct Graph* extendPatternAllWays(struct Graph* g, struct ShallowGraph* candidateEdges, struct GraphPool* gp) {
	struct Graph* rho = NULL;
	struct VertexList* e;
	for (e=candidateEdges->edges; e!=NULL; e=e->next) {
		int v;
		for (v=0; v<g->n; ++v) {
			/* if the labels are compatible */
			if (strcmp(g->vertices[v]->label, e->startPoint->label) == 0) {
				struct Graph* h = refinementGraph(g, v, e, gp);
				h->next = rho;
				rho = h;
			}
		}
	}
	return rho;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
testq %r15, %r15
je 0x1d662
movq %rdx, %rbx
movq %rdi, %r14
movl (%rdi), %ebp
xorl %r12d, %r12d
testl %ebp, %ebp
jle 0x1d657
xorl %r13d, %r13d
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movq 0x10(%r15), %rax
movq (%rax), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1d64c
movq %r14, %rdi
movl %r13d, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1d498
movq %r12, 0x18(%rax)
movl (%r14), %ebp
movq %rax, %r12
incq %r13
movslq %ebp, %rax
cmpq %rax, %r13
jl 0x1d616
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x1d60f
jmp 0x1d665
xorl %r12d, %r12d
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_O3/pwelke[P]GraphMiningTools/treeEnumeration.c
// Function: extendPatternOnLeaves
struct Graph* extendPatternOnLeaves(struct Graph* g, struct ShallowGraph* candidateEdges, struct GraphPool* gp) {

	struct Graph* rho = NULL;

	// init visited flags
	for (int v=0; v<g->n; ++v) {
		g->vertices[v]->visited = 0;
	}

	// mark leaves and neighbors of leaves
	for (int v=0; v<g->n; ++v) {
		if (isLeaf(g->vertices[v])) {
			g->vertices[v]->visited = 1;
			g->vertices[v]->neighborhood->endPoint->visited = 1;
		}
	}

	// special case: singleton vertex should be extended, as well (even though it is not a leaf)
	if (g->n == 1) {
		g->vertices[0]->visited = 1;
	}

	// add refinement edges only at leaves and neighbors of leaves
	for (int v=0; v<g->n; ++v) {
		if (g->vertices[v]->visited) {
			for (struct VertexList* e=candidateEdges->edges; e!=NULL; e=e->next) {
				/* if the labels are compatible */
				if (strcmp(g->vertices[v]->label, e->startPoint->label) == 0) {
					struct Graph* h = refinementGraph(g, v, e, gp);
					h->next = rho;
					rho = h;
				}
			}
		}
	}
	return rho;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq (%rdi), %rax
testq %rax, %rax
jle 0x1d776
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl $0x0, 0x1c(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1d69d
testl %eax, %eax
jle 0x1d776
xorl %r12d, %r12d
movl $0x1, %ebp
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x7c5f
testb %al, %al
je 0x1d6e7
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rax
movl %ebp, 0x1c(%rax)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movl %ebp, 0x1c(%rax)
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x1d6c0
cmpl $0x1, %eax
jne 0x1d70c
movq 0x10(%r15), %rax
movq (%rax), %rax
movl $0x1, 0x1c(%rax)
movl $0x1, %eax
jmp 0x1d70e
jl 0x1d776
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x10(%r15), %rcx
movq (%rcx,%r13,8), %rcx
cmpl $0x0, 0x1c(%rcx)
je 0x1d769
movq (%r14), %rbp
testq %rbp, %rbp
je 0x1d769
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1d75d
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1d498
movq %r12, 0x18(%rax)
movq %rax, %r12
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
jne 0x1d72a
movl (%r15), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x1d714
jmp 0x1d779
xorl %r12d, %r12d
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_O3/pwelke[P]GraphMiningTools/treeEnumeration.c
// Function: extendPatternOnOuterShells
struct Graph* extendPatternOnOuterShells(struct Graph* g, struct ShallowGraph* candidateEdges, struct GraphPool* gp, struct ShallowGraphPool* sgp) {

	struct Graph* rho = NULL;

	// if v->lowPoint >= outershell then we extend on v
	int outerShell = computeDistanceToCenter(g, sgp) - 1;

	// add refinement edges only at outer shell vertices
	for (int v=0; v<g->n; ++v) {
		if (g->vertices[v]->lowPoint >= outerShell) {
			for (struct VertexList* e=candidateEdges->edges; e!=NULL; e=e->next) {
				/* if the labels are compatible */
				if (strcmp(g->vertices[v]->label, e->startPoint->label) == 0) {
					struct Graph* h = refinementGraph(g, v, e, gp);
					h->next = rho;
					rho = h;
				}
			}
		}
	}
	return rho;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, (%rsp)
movq %rdi, %r15
movq %rcx, %rsi
callq 0x1d383
movl %eax, %ebp
movl (%r15), %eax
testl %eax, %eax
jle 0x1d81e
decl %ebp
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x10(%r15), %rcx
movq (%rcx,%r13,8), %rcx
cmpl %ebp, 0x20(%rcx)
jl 0x1d811
movq (%rsp), %rcx
movq (%rcx), %r14
testq %r14, %r14
je 0x1d811
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movq 0x10(%r14), %rax
movq (%rax), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1d805
movq %r15, %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1d498
movq %r12, 0x18(%rax)
movq %rax, %r12
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1d7d2
movl (%r15), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x1d7b9
jmp 0x1d821
xorl %r12d, %r12d
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_O3/pwelke[P]GraphMiningTools/treeEnumeration.c
// Function: basicFilter
struct Graph* basicFilter(struct Graph* extension, struct Vertex* listOfGraphs, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct Graph* result = NULL;
	struct Graph* g = extension;
	while (g != NULL) {
		// store second element, detach head
		struct Graph* tmp = g->next;
		g->next = NULL;

		struct ShallowGraph* string = canonicalStringOfTree(g, sgp);
		char alreadyFound = containsString(listOfGraphs, string);
		if (!alreadyFound) {
			addToSearchTree(listOfGraphs, string, gp, sgp);
			// add to result
			g->next = result;
			result = g;
		} else {
			dumpShallowGraph(sgp, string);
			dumpGraph(gp, g);
		}
		// move on
		g = tmp;
	}
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1d8bf
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq $0x0, (%rsp)
movq 0x18(%r13), %r12
movq $0x0, 0x18(%r13)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7938
movq %rax, %rbp
movq %r15, %rdi
movq %rax, %rsi
callq 0x1ad18
testb %al, %al
je 0x1d898
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x149f4
movq %r14, %rdi
movq %r13, %rsi
callq 0x14700
jmp 0x1d8b5
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1ae1e
movq (%rsp), %rax
movq %rax, 0x18(%r13)
movq %r13, (%rsp)
movq %r12, %r13
testq %r12, %r12
jne 0x1d857
jmp 0x1d8c7
movq $0x0, (%rsp)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeEnumerationRooted.c
// Function: extendRootedPatternAllWays
struct Graph* extendRootedPatternAllWays(struct Graph* g, struct ShallowGraph* candidateEdges, struct GraphPool* gp) {
	struct Graph* rho = NULL;
	struct VertexList* e;
	for (e=candidateEdges->edges; e!=NULL; e=e->next) {
		int v;
		for (v=0; v<g->n; ++v) {
			/* if the labels are compatible */
			if (strcmp(g->vertices[v]->label, e->startPoint->label) == 0) {
				struct Graph* h = refinementGraph(g, v, e, gp);
				h->next = rho;
				rho = h;
			}
		}
	}
	return rho;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
testq %r15, %r15
je 0x1dae9
movq %rdx, %rbx
movq %rdi, %r14
movl (%rdi), %ebp
xorl %r12d, %r12d
testl %ebp, %ebp
jle 0x1dade
xorl %r13d, %r13d
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movq 0x10(%r15), %rax
movq (%rax), %rsi
callq 0x1140
testl %eax, %eax
jne 0x1dad3
movq %r14, %rdi
movl %r13d, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1d498
movq %r12, 0x18(%rax)
movl (%r14), %ebp
movq %rax, %r12
incq %r13
movslq %ebp, %rax
cmpq %rax, %r13
jl 0x1da9d
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x1da96
jmp 0x1daec
xorl %r12d, %r12d
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_O3/pwelke[P]GraphMiningTools/treeKernels.c
// Function: cleanUpEdgeSort
void cleanUpEdgeSort(struct Vertex* v, struct ShallowGraphPool* sgp) {
	struct VertexList* e;
	struct VertexList* f;
	struct VertexList* first = getVertexList(sgp->listPool);
	struct ShallowGraph* fifo = getShallowGraph(sgp);

	/* create artificial edge to start bfs */
	first->endPoint = v;
	first->startPoint = v;
	appendEdge(fifo, first);

	/* bfs */
	while((e = popEdge(fifo))) {


			/* store distance */
			e->endPoint->visited = 0;

			/* put children in fifo queue */
			for (f=e->endPoint->neighborhood; f; f = f->next) {
				if (f->endPoint->visited) {
					appendEdge(fifo, shallowCopyEdge(f, sgp->listPool));
				}
			}

			dumpVertexList(sgp->listPool, e);

	}

	dumpShallowGraph(sgp, fifo);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rsi), %rdi
callq 0x141f1
movq %rax, %r12
movq %rbx, %rdi
callq 0x1498d
movq %rax, %r14
movq %r15, 0x18(%r12)
movq %r15, 0x10(%r12)
movq %rax, %rdi
movq %r12, %rsi
callq 0x8916
movq %r14, %rdi
callq 0x88ee
testq %rax, %rax
je 0x1dd47
movq %rax, %r15
movq 0x18(%r15), %rax
movl $0x0, 0x1c(%rax)
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x1dd2b
movq 0x18(%r12), %rax
cmpl $0x0, 0x1c(%rax)
je 0x1dd24
movq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x7bec
movq %r14, %rdi
movq %rax, %rsi
callq 0x8916
movq 0x8(%r12), %r12
jmp 0x1dcfd
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x14250
movq %r14, %rdi
callq 0x88ee
movq %rax, %r15
testq %rax, %rax
jne 0x1dcee
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x149f4