LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/lwm_initAndCollect.c
// Function: getSupportSetsOfVerticesForPatternEnumeration
struct SupportSet* getSupportSetsOfVerticesForPatternEnumeration(struct Graph** db, int nGraphs, struct Vertex* frequentVertices, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	(void)sgp; // unused
	// init levelwise search data structures for patterns with one vertex

	// data structures for iterative levelwise search
	struct SupportSet* vertexSupportSets = NULL;
	struct SupportSet* vertexSupportSetsTail = NULL;

	int id = 1;
	for (struct VertexList* e=frequentVertices->neighborhood; e!=NULL; e=e->next) {

		struct Graph* candidate = createGraph(1, gp);
		candidate->vertices[0]->label = e->label;
		e->endPoint->lowPoint = id;

		struct SupportSet* vertexSupport = initPatternEnumerationForVertices(db, nGraphs, candidate, id);

		if (vertexSupportSetsTail != NULL) {
			vertexSupportSetsTail->next = vertexSupport;
			vertexSupportSetsTail = vertexSupport;
		} else {
			vertexSupportSets = vertexSupport;
			vertexSupportSetsTail = vertexSupport;
		}
		++id;
	}
	return vertexSupportSets;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x30(%rsp)
movq %rdx, %r14
movq %rdi, %r15
movslq %esi, %rbx
pushq $0x1
popq %rax
leaq 0x68(%rsp), %r12
movl %eax, 0x2c(%rsp)
xorl %r13d, %r13d
xorl %eax, %eax
movq 0x8(%r14), %r14
testq %r14, %r14
je 0xfc48
movq %r13, 0x40(%rsp)
movq %rax, 0x38(%rsp)
pushq $0x1
popq %rdi
movq 0x30(%rsp), %rsi
callq 0x630e
movq %rax, %rbp
movq (%r14), %rax
movq 0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx)
movq %r14, 0x48(%rsp)
movq 0x18(%r14), %rax
movl 0x2c(%rsp), %r14d
movl %r14d, 0x20(%rax)
xorl %eax, %eax
callq 0x1a3dc
movq %rax, %r13
movl %r14d, 0x8(%rbp)
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0xfc24
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq (%r15,%r14,8), %rax
movq %rax, 0x58(%rsp)
movq %rbp, 0x60(%rsp)
andq $0x0, 0x50(%rsp)
movl $0x1, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0x1a223
incq %r14
jmp 0xfbd1
movq %r13, %rax
movq 0x40(%rsp), %rcx
testq %rcx, %rcx
je 0xfc3a
movq %r13, 0x10(%rcx)
movq 0x38(%rsp), %rax
incl 0x2c(%rsp)
movq 0x48(%rsp), %r14
jmp 0xfb7a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/lwm_initAndCollect.c
// Function: garbageCollectPatternEnumeration
void garbageCollectPatternEnumeration(void** y, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct IterativeBfsForForestsDataStructures* dataStructures = (struct IterativeBfsForForestsDataStructures*)y;

	dumpSearchTree(gp, dataStructures->initialFrequentPatterns);
	dumpShallowGraphCycle(sgp, dataStructures->extensionEdges);
	dumpGraph(gp, dataStructures->extensionEdgesVertexStore);

	for (int i=0; i<dataStructures->nGraphs; ++i) {
		dumpGraph(gp, dataStructures->db[i]);
	}

	free(dataStructures->db);
	free(dataStructures);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq %r14, %rdi
callq 0x18dcd
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x11888
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x1166e
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
movq (%rbx), %rdi
cmpq %rax, %r15
jge 0xfdd8
movq (%rdi,%r15,8), %rsi
movq %r14, %rdi
callq 0x1166e
incq %r15
jmp 0xfdbb
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
nop
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/lwm_miningAndExtension.c
// Function: getCandidateSupportSuperSet
struct SupportSet* getCandidateSupportSuperSet(struct IntSet* parentIds, struct SupportSet* previousLevelSupportLists, int parentIdToKeep) {
	assert(parentIds != NULL);
	assert(previousLevelSupportLists != NULL);
	assert(containsInt(parentIds, parentIdToKeep));

	// obtain support sets of parents
	struct SupportSet* parentSupportSets = getSupportSetsOfPatterns(previousLevelSupportLists, parentIds);

	// move desired parent support set to head of list to keep the correct subtreeIsoDataStores
	parentSupportSets = supportSetChangeHead(parentSupportSets, parentIdToKeep);

	// compute a candidate support set that is the intersection of the support sets of the apriori parents of the extension
	struct SupportSet* candidateSupportSuperSet = intersectSupportSets(parentSupportSets);

	// garbage collection
	while (parentSupportSets) {
		struct SupportSet* tmp = parentSupportSets->next;
		free(parentSupportSets);
		parentSupportSets = tmp;
	}

	return candidateSupportSuperSet;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1a60c
movq %rax, %rdi
movl %ebx, %esi
callq 0x1a684
movq %rax, %rbx
movq %rax, %rdi
callq 0x1a57c
movq %rax, %r14
testq %rbx, %rbx
je 0xfe2f
movq 0x10(%rbx), %r15
movq %rbx, %rdi
callq 0x1030
movq %r15, %rbx
jmp 0xfe19
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: createListPool
struct ListPool* createListPool(unsigned int initNumberOfElements){
	struct ListPool* newPool;

	if (MEM_DEBUG) {
		// this allows the dump methods to free everything that is dumped
		initNumberOfElements = 1;
	}

	if ((newPool = malloc(sizeof(struct ListPool)))) {
		if ((newPool->unused = malloc(initNumberOfElements * sizeof(struct VertexList)))) {
			unsigned int i;
			/* we have allocated an array, but need a list, thus set ponters accordingly */
			for (i=0; i<initNumberOfElements-1; ++i) {
				(newPool->unused[i]).next = &(newPool->unused[i+1]);
			}
			(newPool->unused[initNumberOfElements-1]).next = NULL;
			newPool->poolPointer = newPool->unused;
			newPool->initNumberOfElements = initNumberOfElements;
		} else {
			printf("Error while initializing object pool for list elements\n");
			return NULL;
		}
	} else {
		printf("Error while initializing object pool for list elements\n");
		return NULL;
	}
	return newPool;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
pushq $0x20
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x11289
movq %rax, %rbx
movl %r14d, %eax
imulq $0x30, %rax, %rdi
callq 0x1180
movq %rax, (%rbx)
testq %rax, %rax
je 0x11289
leal -0x1(%r14), %ecx
movq %rax, %rdx
addq $0x30, %rdx
movq %rcx, %rsi
subq $0x1, %rsi
jb 0x11299
movq %rdx, -0x28(%rdx)
addq $0x30, %rdx
jmp 0x11279
leaq 0xc82c(%rip), %rdi      # 0x1dabc
callq 0x1070
xorl %ebx, %ebx
jmp 0x112ab
imulq $0x30, %rcx, %rcx
andq $0x0, 0x8(%rax,%rcx)
movq %rax, 0x18(%rbx)
movl %r14d, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: freeListPool
void freeListPool(struct ListPool *p) {
	while (p->unused) {
		p->tmp = p->unused->next;
		if ((p->unused < p->poolPointer) || (p->unused > &(p->poolPointer[p->initNumberOfElements-1]))) {
			free(p->unused);
		}
		p->unused = p->tmp;
	}
	if (!MEM_DEBUG) {
		free(p->poolPointer);
	}
	free(p);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x112f5
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x112e4
movl 0x10(%rbx), %edx
decl %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x112ed
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0x112bd
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: getVertexList
struct VertexList* getVertexList(struct ListPool* p){
	if (p->unused) {
		/* get first of the unused elements */
		p->tmp = p->unused;
		p->unused = p->tmp->next;
	} else {
		/* allocate memory for new struct */
		if (!(p->tmp = malloc(sizeof(struct VertexList)))) {
			/* malloc did not work */
			printf("Error allocating memory\n");
			return NULL;
		} 
	}
	
	/* The malloc worked or we had an element left. So we initialize the struct */
	wipeVertexList(p->tmp);

	return p->tmp;
		
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x11320
movq %rax, 0x8(%rbx)
movq 0x8(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x11331
pushq $0x30
popq %rdi
callq 0x1180
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x11345
xorps %xmm0, %xmm0
movups %xmm0, 0x1c(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc7a7(%rip), %rdi      # 0x1daf3
callq 0x1070
xorl %eax, %eax
jmp 0x11343
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: dumpVertexList
void dumpVertexList(struct ListPool* p, struct VertexList* l) {
	/* free the label string, if l manages it */
	if (l->isStringMaster) {
		free(l->label);
	}

	if (MEM_DEBUG) {
		free(l);
	} else {
		/* add l to the unused list */
		l->next = p->unused;
		p->unused = l;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x28(%rsi)
je 0x1137c
movq (%rbx), %rdi
callq 0x1030
movq (%r14), %rax
movq %rax, 0x8(%rbx)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: dumpVertexListLinearly
void dumpVertexListLinearly(struct ListPool* p, struct VertexList* e) {
	struct VertexList* tmp;
	while (e) {
		tmp = e->next;
		dumpVertexList(p,e);
		e = tmp;
	}

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x113d6
movq 0x8(%rsi), %r14
movq %rbx, %rdi
callq 0x11364
movq %r14, %rsi
jmp 0x113c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: createVertexPool
struct VertexPool* createVertexPool(unsigned int initNumberOfElements){
	struct VertexPool* newPool;

	if (MEM_DEBUG) {
		// this allows the dump methods to free everything that is dumped
		initNumberOfElements = 1;
	}

	if ((newPool = malloc(sizeof(struct VertexPool)))) {
		if ((newPool->unused = malloc(initNumberOfElements * sizeof(struct Vertex)))) {
			unsigned int i;
			/* we have allocated an array, but need a list, thus set ponters accordingly */
			for (i=0; i<initNumberOfElements-1; ++i) {
				(newPool->unused[i]).next = &(newPool->unused[i+1]);
			}
			(newPool->unused[initNumberOfElements-1]).next = NULL;
			newPool->poolPointer = newPool->unused;
			newPool->initNumberOfElements = initNumberOfElements;
		} else {
			printf("Error while initializing object pool for list elements\n");
			return NULL;
		}
	} else {
		printf("Error while initializing object pool for list elements\n");
		return NULL;
	}
	
	return newPool;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
pushq $0x20
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x11427
movq %rax, %rbx
movl %r14d, %eax
imulq $0x30, %rax, %rdi
callq 0x1180
movq %rax, (%rbx)
testq %rax, %rax
je 0x11427
leal -0x1(%r14), %ecx
movq %rax, %rdx
addq $0x30, %rdx
movq %rcx, %rsi
subq $0x1, %rsi
jb 0x11437
movq %rdx, -0x20(%rdx)
addq $0x30, %rdx
jmp 0x11417
leaq 0xc68e(%rip), %rdi      # 0x1dabc
callq 0x1070
xorl %ebx, %ebx
jmp 0x11449
imulq $0x30, %rcx, %rcx
andq $0x0, 0x10(%rax,%rcx)
movq %rax, 0x18(%rbx)
movl %r14d, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: freeVertexPool
void freeVertexPool(struct VertexPool *p) {
	while (p->unused) {
		p->tmp = p->unused->next;
		if ((p->unused < p->poolPointer) || (p->unused > &(p->poolPointer[p->initNumberOfElements-1]))) {
			free(p->unused);
		}
		p->unused = p->tmp;
	}
	if (!MEM_DEBUG) {
		free(p->poolPointer);
	}
	free(p);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x11493
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x11482
movl 0x10(%rbx), %edx
decl %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x1148b
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0x1145b
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: getVertex
struct Vertex* getVertex(struct VertexPool* p){
		if (p->unused) {
		/* get first of the unused elements */
		p->tmp = p->unused;
		p->unused = p->tmp->next;
	} else {
		/* allocate memory for new struct */
		if (!(p->tmp = malloc(sizeof(struct Vertex)))) {
			/* malloc did not work */
			printf("Error allocating memory\n");
			return NULL;
		} 
	}
	
	/* The malloc worked or we had an element left. So we initialize the struct */
	wipeVertex(p->tmp);
	
	return p->tmp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x114be
movq %rax, 0x8(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x114cf
pushq $0x30
popq %rdi
callq 0x1180
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x114e3
xorps %xmm0, %xmm0
movups %xmm0, 0x1c(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc609(%rip), %rdi      # 0x1daf3
callq 0x1070
xorl %eax, %eax
jmp 0x114e1
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: dumpVertex
void dumpVertex(struct VertexPool* p, struct Vertex* v){
	
	if (v->isStringMaster) {
		free(v->label);
	}

	if (MEM_DEBUG) {
		free(v);
	} else {
		/* add v to the unused list */
		v->next = p->unused;
		p->unused = v;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x24(%rsi)
je 0x1152a
movq (%rbx), %rdi
callq 0x1030
movq (%r14), %rax
movq %rax, 0x10(%rbx)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: createGraphPool
struct GraphPool* createGraphPool(unsigned int initNumberOfElements, struct VertexPool* vp, struct ListPool* lp) {
	struct GraphPool* newPool;

	if (MEM_DEBUG) {
		// this allows the dump methods to free everything that is dumped
		initNumberOfElements = 1;
	}

	if ((newPool = malloc(sizeof(struct GraphPool)))) {
		/* set the listpool and vertexpool of the graphpool according to the input. good for dumping actions */
		newPool->vertexPool = vp;
		newPool->listPool = lp;

		
		if ((newPool->unused = malloc(initNumberOfElements * sizeof(struct Graph)))) {
			unsigned int i;
			/* we have allocated an array, but need a list, thus set ponters accordingly */
			for (i=0; i<initNumberOfElements-1; ++i) {
				(newPool->unused[i]).next = &(newPool->unused[i+1]);
			}
			(newPool->unused[initNumberOfElements-1]).next = NULL;
			newPool->poolPointer = newPool->unused;
			newPool->initNumberOfElements = initNumberOfElements;
		} else {
			printf("Error while initializing object pool for list elements\n");
			return NULL;
		}
	} else {
		printf("Error while initializing object pool for list elements\n");
		return NULL;
	}
	
	return newPool;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r14d
pushq $0x30
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x11597
movq %rax, %rbx
movq %r12, 0x10(%rax)
movq %r15, 0x18(%rax)
movl %r14d, %edi
shlq $0x5, %rdi
callq 0x1180
movq %rax, (%rbx)
testq %rax, %rax
je 0x11597
leal -0x1(%r14), %ecx
movq %rax, %rdx
addq $0x20, %rdx
movq %rcx, %rsi
subq $0x1, %rsi
jb 0x115a7
movq %rdx, -0x8(%rdx)
addq $0x20, %rdx
jmp 0x11587
leaq 0xc51e(%rip), %rdi      # 0x1dabc
callq 0x1070
xorl %ebx, %ebx
jmp 0x115b9
shlq $0x5, %rcx
andq $0x0, 0x18(%rax,%rcx)
movq %rax, 0x28(%rbx)
movl %r14d, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: freeGraphPool
void freeGraphPool(struct GraphPool *p) {
	while (p->unused) {
		p->tmp = p->unused->next;
		if ((p->unused < p->poolPointer) || (p->unused > &(p->poolPointer[p->initNumberOfElements-1]))) {
			free(p->unused);
		}
		p->unused = p->tmp;
	}
	if (!MEM_DEBUG) {
		free(p->poolPointer);
	}
	free(p);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x11607
movq 0x18(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x28(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x115f6
movl 0x20(%rbx), %edx
decl %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x115ff
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0x115cf
movq 0x28(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: getGraph
struct Graph* getGraph(struct GraphPool* p) {
	if (p->unused) {
		/* get first of the unused elements */
		p->tmp = p->unused;
		p->unused = p->tmp->next;
	} else {
		/* allocate memory for new struct */
		if (!(p->tmp = malloc(sizeof(struct Graph)))) {
			/* malloc did not work */
			printf("Error allocating memory\n");
			return NULL;
		} 
	}
	
	/* malloc worked or there was an unused element left, initialize stuff */
	wipeGraph(p->tmp);
	
	return p->tmp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x11632
movq %rax, 0x8(%rbx)
movq 0x18(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x11643
pushq $0x20
popq %rdi
callq 0x1180
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x11653
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc499(%rip), %rdi      # 0x1daf3
callq 0x1070
xorl %eax, %eax
jmp 0x11651
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: dumpGraph
void dumpGraph(struct GraphPool* p, struct Graph *g) {
	struct VertexList *tmp;
	int i;
	/* dump content */
	if (g->vertices) {
		for (i=0; i<g->n; ++i) {
			if (g->vertices[i]) {
				while (g->vertices[i]->neighborhood) {
					tmp = g->vertices[i]->neighborhood->next;
					dumpVertexList(p->listPool, g->vertices[i]->neighborhood);
					g->vertices[i]->neighborhood = tmp;
				}
				dumpVertex(p->vertexPool, g->vertices[i]);
			}
		}
	
		free(g->vertices);
	}
	
	if (MEM_DEBUG) {
		free(g);
	} else {
		/* append g to the unused list */
		g->next = p->unused;
		p->unused = g;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
je 0x116d9
xorl %r15d, %r15d
movslq (%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jge 0x116d4
movq (%rdi,%r15,8), %rsi
testq %rsi, %rsi
jne 0x116bd
jmp 0x116cf
movq 0x8(%rax), %r12
movq 0x18(%r14), %rdi
movq %rax, %rsi
callq 0x11364
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rcx
movq %r12, 0x8(%rcx)
movq (%rax,%r15,8), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
jne 0x1169d
movq 0x10(%r14), %rdi
callq 0x11512
incq %r15
jmp 0x11686
callq 0x1030
movq (%r14), %rax
movq %rax, 0x18(%rbx)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: createShallowGraphPool
struct ShallowGraphPool* createShallowGraphPool(unsigned int initNumberOfElements, struct ListPool* lp){
	struct ShallowGraphPool* newPool;
	
	if (MEM_DEBUG) {
		// this allows the dump methods to free everything that is dumped
		initNumberOfElements = 1;
	}

	if ((newPool = malloc(sizeof(struct ShallowGraphPool)))) {
		/* set the listpool of the graphpool according to the input. good for dumping actions */
		newPool->listPool = lp;
		if ((newPool->unused = malloc(initNumberOfElements * sizeof(struct ShallowGraph)))) {
			unsigned int i;
			/* we have allocated an array, but need a list, thus set ponters accordingly */
			for (i=0; i<initNumberOfElements-1; ++i) {
				(newPool->unused[i]).next = &(newPool->unused[i+1]);
			}
			(newPool->unused[initNumberOfElements-1]).next = NULL;
			newPool->poolPointer = newPool->unused;
			newPool->initNumberOfElements = initNumberOfElements;
		} else {
			printf("Error while initializing object pool for list elements\n");
			return NULL;
		}
	} else {
		printf("Error while initializing object pool for list elements\n");
		return NULL;
	}
	
	return newPool;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movl %edi, %r14d
pushq $0x28
popq %rdi
callq 0x1180
testq %rax, %rax
je 0x1176d
movq %rax, %rbx
movq %r15, 0x10(%rax)
movl %r14d, %eax
imulq $0x30, %rax, %rdi
callq 0x1180
movq %rax, (%rbx)
testq %rax, %rax
je 0x1176d
leal -0x1(%r14), %ecx
movq %rax, %rdx
addq $0x30, %rdx
movq %rcx, %rsi
subq $0x1, %rsi
jb 0x1177d
movq %rdx, -0x18(%rdx)
addq $0x30, %rdx
jmp 0x1175d
leaq 0xc348(%rip), %rdi      # 0x1dabc
callq 0x1070
xorl %ebx, %ebx
jmp 0x1178f
imulq $0x30, %rcx, %rcx
andq $0x0, 0x18(%rax,%rcx)
movq %rax, 0x20(%rbx)
movl %r14d, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: freeShallowGraphPool
void freeShallowGraphPool(struct ShallowGraphPool *p) {
	while (p->unused) {
		p->tmp = p->unused->next;
		if ((p->unused < p->poolPointer) || (p->unused > &(p->poolPointer[p->initNumberOfElements-1]))) {
			free(p->unused);
		}
		p->unused = p->tmp;
	}
	if (!MEM_DEBUG) {
		free(p->poolPointer);
	}
	free(p);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x117d7
movq 0x18(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x20(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x117c6
movl 0x18(%rbx), %edx
decl %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x117cf
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0x1179f
movq 0x20(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: getShallowGraph
struct ShallowGraph* getShallowGraph(struct ShallowGraphPool *p) {
	
	if (p->unused) {
		/* get first of the unused elements */
		p->tmp = p->unused;
		p->unused = p->tmp->next;
	} else {
		/* allocate memory for new struct */
		if (!(p->tmp = malloc(sizeof(struct ShallowGraph)))) {
			/* malloc did not work */
			printf("Error allocating memory\n");
			return NULL;
		} 
	}
	
	/* The malloc worked or we had an element left. So we initialize the struct */
	wipeShallowGraph(p->tmp);
	
	return p->tmp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x11802
movq %rax, 0x8(%rbx)
movq 0x18(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x11813
pushq $0x30
popq %rdi
callq 0x1180
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x1182b
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andl $0x0, 0x10(%rax)
movups %xmm0, 0x18(%rax)
andl $0x0, 0x28(%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc2c1(%rip), %rdi      # 0x1daf3
callq 0x1070
xorl %eax, %eax
jmp 0x11829
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: dumpShallowGraph
void dumpShallowGraph(struct ShallowGraphPool *p, struct ShallowGraph* g) {

	/* dump edges */
	while (g->edges) {
		p->listPool->tmp = g->edges;
		g->edges = g->edges->next;
		dumpVertexList(p->listPool, p->listPool->tmp);
	}

	if (MEM_DEBUG) {
		free(g);
	} else {
		/* add g to the unused list */
		g->next = p->unused;
		p->unused = g;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x11876
movq 0x10(%r14), %rdi
movq %rsi, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, (%rbx)
callq 0x11364
jmp 0x11858
movq (%r14), %rax
movq %rax, 0x18(%rbx)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/memoryManagement.c
// Function: copyString
char* copyString(char* string) {
	int i;
	char* copy;

	for (i=0; string[i] != 0; ++i);

	copy = malloc((i + 1) * sizeof(char));

	for (i=0; string[i] != 0; ++i) {
		copy[i] = string[i];
	}
	copy[i] = 0;

	return copy;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpb $0x0, (%rbx,%rax)
leaq 0x1(%rax), %rax
jne 0x118b8
movl %eax, %edi
callq 0x1180
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
testb %dl, %dl
je 0x118da
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x118cb
movb $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: getRandomPermutation
int* getRandomPermutation(int n) {
	int* permutation = malloc(n * sizeof(int));
	if (permutation) {
		for (int i=0; i<n; ++i) {
			permutation[i] = i+1;
		}
		shuffleArray(permutation, n);
	} else {
		fprintf(stderr, "Error allocating memory for permutation\n");
	}
	return permutation;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movslq %edi, %rdi
shlq $0x2, %rdi
callq 0x1180
movq %rax, %rbx
testq %rax, %rax
je 0x11948
xorl %eax, %eax
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
cmpq %rax, %rcx
je 0x1191a
leaq 0x1(%rax), %rdx
movl %edx, (%rbx,%rax,4)
movq %rdx, %rax
jmp 0x11909
movl %ebp, %r14d
cmpl $0x2, %r14d
jl 0x11964
leaq -0x1(%r14), %r15
callq 0x1240
cltd
idivl %r14d
movslq %edx, %rax
movl (%rbx,%rax,4), %ecx
movl -0x4(%rbx,%r14,4), %edx
movl %edx, (%rbx,%rax,4)
movl %ecx, -0x4(%rbx,%r14,4)
movq %r15, %r14
jmp 0x1191d
movq 0x186a9(%rip), %rax     # 0x29ff8
movq (%rax), %rcx
leaq 0xc1b2(%rip), %rdi      # 0x1db0b
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: posetPermutationMark
int posetPermutationMark(int* permutation, size_t n, struct Graph* F) {
	for (int v=0; v<F->n; ++v) {
		F->vertices[v]->visited = 0;
	}
	size_t shrunkSize = 0;
	for (size_t i=0; i<n; ++i) {
		struct Vertex* v = F->vertices[permutation[i]];
		if (v->visited == 0) {
			markConnectedComponent(v, 1);
			++shrunkSize;
		} else {
			permutation[i] = -1;
		}
	}
	return shrunkSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%rdx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x119a5
movq 0x10(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
andl $0x0, 0x1c(%rdx)
incq %rcx
jmp 0x1198f
xorl %r12d, %r12d
pushq $0x1
popq %rbp
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x119db
movq 0x10(%rbx), %rax
movslq (%r15,%r13,4), %rcx
movq (%rax,%rcx,8), %rdi
cmpl $0x0, 0x1c(%rdi)
je 0x119cc
orl $-0x1, (%r15,%r13,4)
jmp 0x119d6
movl %ebp, %esi
callq 0x9307
incl %r12d
incq %r13
jmp 0x119ae
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: posetPermutationShrink
int* posetPermutationShrink(int* permutation, size_t n, size_t shrunkSize) {
	int* condensedSequence = malloc(shrunkSize * sizeof(int));
	size_t posInCondensed = 0;
	for (size_t i=0; i<n; ++i) {
		if (permutation[i] != -1) {
			condensedSequence[posInCondensed] = permutation[i];
			++posInCondensed;
		}
	}
	free(permutation);
	return condensedSequence;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq (,%rdx,4), %rdi
callq 0x1180
movq %rax, %r15
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x11a25
movl (%rbx,%rcx,4), %edx
cmpl $-0x1, %edx
je 0x11a20
movl %edx, (%r15,%rax,4)
incq %rax
incq %rcx
jmp 0x11a0c
movq %rbx, %rdi
callq 0x1030
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: reverseGraph
struct Graph* reverseGraph(struct Graph* g, struct GraphPool* gp) {
	struct Graph* reverse = emptyGraph(g, gp);
	for (int v=0; v<g->n; ++v) {
		for (struct VertexList* e=g->vertices[v]->neighborhood; e!=NULL; e=e->next) {
			struct VertexList* f = shallowCopyEdge(e, gp->listPool);
			f->startPoint = reverse->vertices[e->endPoint->number];
			f->endPoint = reverse->vertices[e->startPoint->number];
			addEdge(f->startPoint, f);
		}
	}
	reverse->m = g->m;
	return reverse;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x62b2
movq %rax, %r15
xorl %r13d, %r13d
movslq (%rbx), %rax
cmpq %rax, %r13
jge 0x11acc
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %r12
movq 0x8(%r12), %r12
testq %r12, %r12
je 0x11ac7
movq 0x18(%r14), %rsi
movq %r12, %rdi
callq 0x5a28
movq 0x10(%r15), %rcx
movq 0x18(%r12), %rdx
movslq 0x18(%rdx), %rdx
movq (%rcx,%rdx,8), %rdi
movq %rdi, 0x10(%rax)
movq 0x10(%r12), %rdx
movslq 0x18(%rdx), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x18(%rax)
movq %rax, %rsi
callq 0x5b2c
jmp 0x11a81
incq %r13
jmp 0x11a71
movl 0x4(%rbx), %eax
movl %eax, 0x4(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: buildMinHashEvaluationPlan
struct EvaluationPlan buildMinHashEvaluationPlan(int** shrunkPermutations, size_t* permutationSizes, size_t K, struct Graph* F, struct GraphPool* gp) {
	struct EvaluationPlan p = {0};
	p.poset = F;
	p.reversePoset = reverseGraph(F, gp);
	p.sketchSize = K;
	p.shrunkPermutations = shrunkPermutations;

	size_t maxPermutationSize = 0;
	for (size_t i=0; i<K; ++i) {
		p.orderLength += permutationSizes[i];
		if (permutationSizes[i] > maxPermutationSize) {
			maxPermutationSize = permutationSizes[i];
		}
	}
	p.order = malloc(p.orderLength * sizeof(struct PosPair));
	if (p.order) {
		// fix some evaluation order.
		size_t position = 0;
		for (size_t level=0; level<maxPermutationSize; ++level) {
			size_t old_pos = position;
			for (size_t i=0; i<K; ++i) {
				if (level < permutationSizes[i]) {
					p.order[position].level = level;
					p.order[position].permutation = i;
					++position;
				}
			}
			// sort current level of the permutations based on the pattern id. This ensures that lower level
			// patterns come before higher level patterns in each level of the order.
			qsort_r(&(p.order[old_pos]), position - old_pos, sizeof(struct PosPair), &posPairSorter, &p);
		}

	} else {
		fprintf(stderr, "could not allocate space for evaluation plan. this program will break now.\n");
		p.poset = NULL;
		p.order = NULL;
		p.shrunkPermutations = NULL;
		p.orderLength = 0;
		p.sketchSize = 0;

	}

	free(permutationSizes); // we do not need this information any more
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %r8, (%rdi)
movq %r8, %rdi
movq %r9, %rsi
callq 0x11a57
movq %rax, 0x8(%rbx)
movq %r15, 0x28(%rbx)
movq %r12, 0x18(%rbx)
xorl %edi, %edi
xorl %eax, %eax
xorl %ebp, %ebp
cmpq %rax, %r15
je 0x11b2f
movq (%r14,%rax,8), %rcx
addq %rcx, %rdi
cmpq %rbp, %rcx
cmovaq %rcx, %rbp
incq %rax
jmp 0x11b17
movq %rdi, 0x20(%rbx)
shlq $0x4, %rdi
callq 0x1180
leaq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x11bb2
xorl %edi, %edi
xorl %r13d, %r13d
cmpq %rbp, %r13
je 0x11be0
movq (%rsp), %rax
movq (%rax), %rax
movq %rdi, %r12
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x11b8a
cmpq (%r14,%rcx,8), %r13
jae 0x11b85
movq %r12, %rdx
shlq $0x4, %rdx
movq %r13, (%rax,%rdx)
movq %rcx, 0x8(%rax,%rdx)
incq %r12
incq %rcx
jmp 0x11b67
movq %r12, %rsi
subq %rdi, %rsi
shlq $0x4, %rdi
addq 0x10(%rbx), %rdi
pushq $0x10
popq %rdx
leaq -0x16c(%rip), %rcx      # 0x11a36
movq %rbx, %r8
callq 0x1170
incq %r13
movq %r12, %rdi
jmp 0x11b52
movq 0x1843f(%rip), %rax     # 0x29ff8
movq (%rax), %rcx
leaq 0xbf71(%rip), %rdi      # 0x1db34
pushq $0x4b
popq %rsi
pushq $0x1
popq %rdx
callq 0x1210
andq $0x0, (%rbx)
xorps %xmm0, %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %r14, %rdi
callq 0x1030
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_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: dumpEvaluationPlan
struct EvaluationPlan dumpEvaluationPlan(struct EvaluationPlan p, struct GraphPool* gp) {
	free(p.order);
	for (size_t i=0; i<p.sketchSize; ++i) {
		free(p.shrunkPermutations[i]);
	}
	free(p.shrunkPermutations);
	for (int v=1; v<p.poset->n; ++v) { // start from 1, as empty pattern has no graph attached
		dumpGraph(gp, (struct Graph*)(p.poset->vertices[v]->label));
		p.poset->vertices[v]->label = NULL;
	}
	dumpGraph(gp, p.reversePoset);
	dumpGraph(gp, p.poset);
	struct EvaluationPlan empty = {0};
	return empty;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %r12
movq 0x10(%r12), %rdi
callq 0x1030
movq 0x18(%r12), %r15
movq 0x28(%r12), %r13
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x11c39
movq (%r15,%rbp,8), %rdi
callq 0x1030
incq %rbp
jmp 0x11c26
movq %r15, %rdi
callq 0x1030
movq (%r12), %r15
pushq $0x1
popq %r13
movslq (%r15), %rax
cmpq %rax, %r13
jge 0x11c75
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1166e
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rax
andq $0x0, (%rax)
incq %r13
jmp 0x11c49
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x1166e
movq %r14, %rdi
movq %r15, %rsi
callq 0x1166e
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
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_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: updateEvaluationPlan
void updateEvaluationPlan(struct EvaluationPlan p, int patternId, char match) {
	if (match) {
		rayOfLight(p.reversePoset->vertices[patternId], p);
	} else {
		rayOfDoom(p.poset->vertices[patternId], p);
	}
}

// Assembly:
leaq 0x8(%rsp), %rax
testb %sil, %sil
je 0x120cd
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movslq %edi, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x120dd
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq %edi, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x12142
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: rayOfLight
static void rayOfLight(struct Vertex* v, struct EvaluationPlan p) {

	/* mark vertex as visited */
	v->visited = 1;
	p.poset->vertices[v->number]->visited = 1;


	/*recursive call for all neighbors that are not visited so far */
	for (struct VertexList* index = v->neighborhood; index; index = index->next) {
		if (index->endPoint->visited != 1) {
			rayOfLight(index->endPoint, p);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %r14
pushq $0x1
popq %rax
movl %eax, 0x1c(%rdi)
movq (%r14), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rdi), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, 0x1c(%rcx)
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1213a
movq 0x18(%rbx), %rdi
cmpl $0x1, 0x1c(%rdi)
je 0x12104
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x120dd
jmp 0x12104
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: rayOfDoom
static void rayOfDoom(struct Vertex* v, struct EvaluationPlan p) {

	/* mark vertex as visited */
	v->visited = -1;
	p.reversePoset->vertices[v->number]->visited = -1;


	/*recursive call for all neighbors that are not visited so far */
	for (struct VertexList* index = v->neighborhood; index; index = index->next) {
		if (index->endPoint->visited != -1) {
			rayOfDoom(index->endPoint, p);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
orl $-0x1, 0x1c(%rdi)
leaq 0x50(%rsp), %r14
movq 0x8(%r14), %rax
movq 0x10(%rax), %rax
movslq 0x18(%rdi), %rcx
movq (%rax,%rcx,8), %rax
orl $-0x1, 0x1c(%rax)
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1219f
movq 0x18(%rbx), %rdi
cmpl $-0x1, 0x1c(%rdi)
je 0x12169
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x12142
jmp 0x12169
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: getPositiveBorderSize
int getPositiveBorderSize(struct EvaluationPlan p) {
	int borderSize = 0;
	for (int v=0; v<p.poset->n; ++v) {
		int inBorder = 1;
		for (struct VertexList* e=p.poset->vertices[v]->neighborhood; e!=NULL; e=e->next) {
			inBorder &= getMatch(e->endPoint);
		}
		borderSize += inBorder;
	}
	return borderSize;
}

// Assembly:
movq 0x8(%rsp), %rcx
movl (%rcx), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
pushq $0x1
popq %rdi
xorl %r8d, %r8d
xorl %eax, %eax
cmpq %rdx, %r8
je 0x121ed
movq 0x10(%rcx), %r9
movq (%r9,%r8,8), %r10
movl %edi, %r9d
movq 0x8(%r10), %r10
testq %r10, %r10
je 0x121e5
movq 0x18(%r10), %r11
cmpl $0x1, 0x1c(%r11)
cmovnel %esi, %r9d
jmp 0x121cd
addl %r9d, %eax
incq %r8
jmp 0x121bd
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: patternPosetInfoToFeatureSet
struct IntSet* patternPosetInfoToFeatureSet(struct EvaluationPlan p) {
	struct IntSet* features = getIntSet();
	for (int i=1; i<p.poset->n; ++i) {
		if (p.poset->vertices[i]->visited == 1) {
			addIntSortedNoDuplicates(features, i - 1);
		}
	}
	return features;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
callq 0x75db
movq %rax, %rbx
pushq $0x1
popq %r14
movq 0x20(%rsp), %r15
movslq (%r15), %rax
cmpq %rax, %r14
jge 0x1222d
movq 0x10(%r15), %rax
movq (%rax,%r14,8), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x12228
leal -0x1(%r14), %esi
movq %rbx, %rdi
callq 0x77ee
incq %r14
jmp 0x12206
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForTrees
struct IntSet* bfsEmbeddingForTrees(struct Graph* g, struct EvaluationPlan p, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	// add minimal elements to border
	struct ShallowGraph* border = getShallowGraph(sgp);
	for (struct VertexList* e=p.poset->vertices[0]->neighborhood; e!=NULL; e=e->next) {
		addToVertexQueue(e->endPoint, border, sgp);
		e->endPoint->d = 1;
	}

	for (struct Vertex* v=popFromVertexQueue(border, sgp); v!=NULL; v=popFromVertexQueue(border, sgp)) {
		v->d = 0;

		char match = 0;
		if (!embeddingValueKnown(v)) {
			struct Graph* pattern = (struct Graph*)(v->label);
			match = isSubtree(g, pattern, gp);
			++nEvaluations;
			updateEvaluationPlan(p, v->number, match);
		} else {
			match = getMatch(v);
		}

		// add extensions of pattern to border
		if (match) {
			for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
				if (e->endPoint->d == 0) {
					addToVertexQueue(e->endPoint, border, sgp);
					e->endPoint->d = 1;
				}
			}
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0x80(%rsp), %r15
movq (%r15), %r14
movq 0x8(%r15), %rax
movl (%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x126ef
movq 0x10(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
movq 0x10(%rax), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
incq %rdx
jmp 0x126cd
movq %rbx, %rdi
callq 0x117e9
movq %rax, %r12
movq 0x10(%r14), %rax
movq (%rax), %r14
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x12726
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
jmp 0x12701
xorl %ebp, %ebp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba99
testq %rax, %rax
je 0x127c8
movq %rax, %r13
andl $0x0, 0x28(%rax)
movl 0x1c(%rax), %eax
testl %eax, %eax
je 0x12753
cmpl $0x1, %eax
sete %r14b
jmp 0x12793
movq (%r13), %rsi
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
callq 0x86b2
movl %eax, %r14d
incl %ebp
movl 0x18(%r13), %edi
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movsbl %al, %esi
callq 0x120b2
testb %r14b, %r14b
jne 0x127ba
jmp 0x12728
movq 0x18(%r13), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x127ba
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r13), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x1279a
jmp 0x12728
movq 0x17829(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0xa85d(%rip), %rsi      # 0x1d036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x121ee
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForAbsImportantTrees
struct IntSet* bfsEmbeddingForAbsImportantTrees(struct Graph* g, struct EvaluationPlan p, size_t importance, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	// add minimal elements to border
	struct ShallowGraph* border = getShallowGraph(sgp);
	for (struct VertexList* e=p.poset->vertices[0]->neighborhood; e!=NULL; e=e->next) {
		addToVertexQueue(e->endPoint, border, sgp);
		e->endPoint->d = 1;
	}

	for (struct Vertex* v=popFromVertexQueue(border, sgp); v!=NULL; v=popFromVertexQueue(border, sgp)) {
		v->d = 0;

		char match = 0;
		if (!embeddingValueKnown(v)) {
			struct Graph* pattern = (struct Graph*)(v->label);
			match = isImportantSubtreeAbsolute(g, pattern, importance, gp);
			++nEvaluations;
			updateEvaluationPlan(p, v->number, match);
		} else {
			match = getMatch(v);
		}

		// add extensions of pattern to border
		if (match) {
			for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
				if (e->endPoint->d == 0) {
					addToVertexQueue(e->endPoint, border, sgp);
					e->endPoint->d = 1;
				}
			}
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0x80(%rsp), %r12
movq (%r12), %r14
movq 0x8(%r12), %rax
movl (%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x12a76
movq 0x10(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
movq 0x10(%rax), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
incq %rdx
jmp 0x12a54
movq %rbx, %rdi
callq 0x117e9
movq %rax, %r13
movq 0x10(%r14), %rax
movq (%rax), %r14
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x12aad
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
jmp 0x12a88
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1ba99
movq %rax, %r14
xorl %ebp, %ebp
testq %r14, %r14
je 0x12b66
andl $0x0, 0x28(%r14)
movl 0x1c(%r14), %eax
testl %eax, %eax
je 0x12adc
cmpl $0x1, %eax
sete %r15b
jmp 0x12b23
movq (%r14), %rsi
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x74f2
movl %eax, %r15d
incl %ebp
movl 0x18(%r14), %edi
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movsbl %al, %esi
callq 0x120b2
testb %r15b, %r15b
jne 0x12b4a
jmp 0x12b53
movq 0x18(%r14), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x12b4a
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x12b2a
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1ba99
movq %rax, %r14
jmp 0x12abd
movq 0x1748b(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0xa4bf(%rip), %rsi      # 0x1d036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x121ee
// File: /workspace/github_c_makefile_star2_O2/pwelke[P]GraphMiningTools/minhashing.c
// Function: bfsEmbeddingForRelImportantTrees
struct IntSet* bfsEmbeddingForRelImportantTrees(struct Graph* g, struct EvaluationPlan p, double importance, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	// add minimal elements to border
	struct ShallowGraph* border = getShallowGraph(sgp);
	for (struct VertexList* e=p.poset->vertices[0]->neighborhood; e!=NULL; e=e->next) {
		addToVertexQueue(e->endPoint, border, sgp);
		e->endPoint->d = 1;
	}

	for (struct Vertex* v=popFromVertexQueue(border, sgp); v!=NULL; v=popFromVertexQueue(border, sgp)) {
		v->d = 0;

		char match = 0;
		if (!embeddingValueKnown(v)) {
			struct Graph* pattern = (struct Graph*)(v->label);
			match = isImportantSubtreeRelative(g, pattern, importance, gp);
			++nEvaluations;
			updateEvaluationPlan(p, v->number, match);
		} else {
			match = getMatch(v);
		}

		// add extensions of pattern to border
		if (match) {
			for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
				if (e->endPoint->d == 0) {
					addToVertexQueue(e->endPoint, border, sgp);
					e->endPoint->d = 1;
				}
			}
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, 0x40(%rsp)
movsd %xmm0, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0x80(%rsp), %r15
movq (%r15), %r14
movq 0x8(%r15), %rax
movl (%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x12bef
movq 0x10(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
movq 0x10(%rax), %rsi
movq (%rsi,%rdx,8), %rsi
andl $0x0, 0x1c(%rsi)
incq %rdx
jmp 0x12bcd
movq %rbx, %rdi
callq 0x117e9
movq %rax, %r12
movq 0x10(%r14), %rax
movq (%rax), %r14
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x12c26
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r14), %rax
movl $0x1, 0x28(%rax)
jmp 0x12c01
xorl %ebp, %ebp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ba99
testq %rax, %rax
je 0x12cce
movq %rax, %r13
andl $0x0, 0x28(%rax)
movl 0x1c(%rax), %eax
testl %eax, %eax
je 0x12c53
cmpl $0x1, %eax
sete %r14b
jmp 0x12c99
movq (%r13), %rsi
movq 0x30(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movq 0x40(%rsp), %rdx
callq 0x7504
movl %eax, %r14d
incl %ebp
movl 0x18(%r13), %edi
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movsbl %al, %esi
callq 0x120b2
testb %r14b, %r14b
jne 0x12cc0
jmp 0x12c28
movq 0x18(%r13), %rdi
cmpl $0x0, 0x28(%rdi)
jne 0x12cc0
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1ba70
movq 0x18(%r13), %rax
movl $0x1, 0x28(%rax)
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x12ca0
jmp 0x12c28
movq 0x17323(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0xa357(%rip), %rsi      # 0x1d036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x121ee