LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x20, %edi
callq 0x1190
testq %rax, %rax
je 0x14165
movq %rax, %rbx
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1190
movq %rax, (%rbx)
testq %rax, %rax
je 0x14165
movl %ebp, %ecx
decl %ecx
je 0x14175
movl %ecx, %ecx
leaq 0x1(%rcx), %rdx
andq $-0x2, %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x38(%rax), %rsi
movdqa 0xc74c(%rip), %xmm1     # 0x20810
movdqa 0xc754(%rip), %xmm2     # 0x20820
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xc754(%rip), %xmm4     # 0x20830
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x1412a
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, -0x30(%rsi)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x14151
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, (%rsi)
paddq %xmm4, %xmm1
addq $0x60, %rsi
addq $-0x2, %rdx
jne 0x140dc
jmp 0x14177
leaq 0xc984(%rip), %rdi      # 0x20af0
callq 0x1070
xorl %ebx, %ebx
jmp 0x1418f
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq $0x0, 0x8(%rax,%rcx)
movq %rax, 0x18(%rbx)
movl %ebp, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x141df
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x141cb
movl 0x10(%rbx), %edx
decl %edx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x141d4
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
testq %rax, %rax
jne 0x141a5
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 0x1420a
movq %rax, 0x8(%rbx)
movq 0x8(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x1421d
movl $0x30, %edi
callq 0x1190
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x14231
xorps %xmm0, %xmm0
movups %xmm0, 0x1c(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc8ef(%rip), %rdi      # 0x20b27
callq 0x1070
xorl %eax, %eax
jmp 0x1422f
// File: /workspace/github_c_makefile_star2_O3/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 0x14268
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_O3/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:
testq %rsi, %rsi
je 0x142ec
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%r14), %r15
cmpl $0x0, 0x28(%r14)
je 0x142d5
movq (%r14), %rdi
callq 0x1030
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rbx)
movq %r15, %r14
testq %r15, %r15
jne 0x142c2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x20, %edi
callq 0x1190
testq %rax, %rax
je 0x143f2
movq %rax, %rbx
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1190
movq %rax, (%rbx)
testq %rax, %rax
je 0x143f2
movl %ebp, %ecx
decl %ecx
je 0x14402
movl %ecx, %ecx
leaq 0x1(%rcx), %rdx
andq $-0x2, %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x40(%rax), %rsi
movdqa 0xc4bf(%rip), %xmm1     # 0x20810
movdqa 0xc4c7(%rip), %xmm2     # 0x20820
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xc4c7(%rip), %xmm4     # 0x20830
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x143b7
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, -0x30(%rsi)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x143de
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, (%rsi)
paddq %xmm4, %xmm1
addq $0x60, %rsi
addq $-0x2, %rdx
jne 0x14369
jmp 0x14404
leaq 0xc6f7(%rip), %rdi      # 0x20af0
callq 0x1070
xorl %ebx, %ebx
jmp 0x1441c
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq $0x0, 0x10(%rax,%rcx)
movq %rax, 0x18(%rbx)
movl %ebp, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1446c
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x14458
movl 0x10(%rbx), %edx
decl %edx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x14461
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
testq %rax, %rax
jne 0x14432
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 0x14497
movq %rax, 0x8(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x144aa
movl $0x30, %edi
callq 0x1190
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x144be
xorps %xmm0, %xmm0
movups %xmm0, 0x1c(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc662(%rip), %rdi      # 0x20b27
callq 0x1070
xorl %eax, %eax
jmp 0x144bc
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x30, %edi
callq 0x1190
testq %rax, %rax
je 0x14621
movq %rax, %rbx
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movl %ebp, %edi
shlq $0x5, %rdi
callq 0x1190
movq %rax, (%rbx)
testq %rax, %rax
je 0x14621
movl %ebp, %ecx
decl %ecx
je 0x14631
movl %ecx, %ecx
leaq 0x1(%rcx), %rdx
andq $-0x2, %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x38(%rax), %rsi
movdqa 0xc284(%rip), %xmm1     # 0x20810
movdqa 0xc28c(%rip), %xmm2     # 0x20820
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xc28c(%rip), %xmm4     # 0x20830
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x145ee
movq %xmm5, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movq %rdi, -0x20(%rsi)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x14611
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movq %xmm5, %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movq %rdi, (%rsi)
paddq %xmm4, %xmm1
addq $0x40, %rsi
addq $-0x2, %rdx
jne 0x145a4
jmp 0x14633
leaq 0xc4c8(%rip), %rdi      # 0x20af0
callq 0x1070
xorl %ebx, %ebx
jmp 0x14647
xorl %ecx, %ecx
shlq $0x5, %rcx
movq $0x0, 0x18(%rax,%rcx)
movq %rax, 0x28(%rbx)
movl %ebp, 0x20(%rbx)
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/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 0x14697
movq 0x18(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x28(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x14683
movl 0x20(%rbx), %edx
decl %edx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x1468c
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
testq %rax, %rax
jne 0x14661
movq 0x28(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 0x146c2
movq %rax, 0x8(%rbx)
movq 0x18(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x146d5
movl $0x20, %edi
callq 0x1190
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x146e5
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc43b(%rip), %rdi      # 0x20b27
callq 0x1070
xorl %eax, %eax
jmp 0x146e3
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
je 0x147b0
movl (%rbx), %ecx
testl %ecx, %ecx
jle 0x147ab
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %r13
testq %r13, %r13
jne 0x14771
jmp 0x1479c
movq 0x8(%r12), %r13
movq 0x18(%r14), %rbp
cmpl $0x0, 0x28(%r12)
je 0x14758
movq (%r12), %rdi
callq 0x1030
movq 0x10(%rbx), %rax
movq (%rbp), %rcx
movq %rcx, 0x8(%r12)
movq %r12, (%rbp)
movq (%rax,%r15,8), %rcx
movq %r13, 0x8(%rcx)
movq (%rax,%r15,8), %r13
movq 0x8(%r13), %r12
testq %r12, %r12
jne 0x1473a
movq 0x10(%r14), %r12
cmpl $0x0, 0x24(%r13)
je 0x1478e
movq (%r13), %rdi
callq 0x1030
movq (%r12), %rax
movq %rax, 0x10(%r13)
movq %r13, (%r12)
movl (%rbx), %ecx
incq %r15
movslq %ecx, %rax
cmpq %rax, %r15
jl 0x1472b
movq 0x10(%rbx), %rdi
callq 0x1030
movq (%r14), %rax
movq %rax, 0x18(%rbx)
movq %rbx, (%r14)
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/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 %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x28, %edi
callq 0x1190
testq %rax, %rax
je 0x14903
movq %rax, %rbx
movq %r14, 0x10(%rax)
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1190
movq %rax, (%rbx)
testq %rax, %rax
je 0x14903
movl %ebp, %ecx
decl %ecx
je 0x14913
movl %ecx, %ecx
leaq 0x1(%rcx), %rdx
andq $-0x2, %rdx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x48(%rax), %rsi
movdqa 0xbfae(%rip), %xmm1     # 0x20810
movdqa 0xbfb6(%rip), %xmm2     # 0x20820
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xbfb6(%rip), %xmm4     # 0x20830
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x148c8
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, -0x30(%rsi)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x148ef
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movq %xmm5, %rdi
leaq (%rdi,%rdi,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movq %rdi, (%rsi)
paddq %xmm4, %xmm1
addq $0x60, %rsi
addq $-0x2, %rdx
jne 0x1487a
jmp 0x14915
leaq 0xc1e6(%rip), %rdi      # 0x20af0
callq 0x1070
xorl %ebx, %ebx
jmp 0x1492d
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq $0x0, 0x18(%rax,%rcx)
movq %rax, 0x20(%rbx)
movl %ebp, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1497b
movq 0x18(%rdi), %rax
movq %rax, 0x8(%rbx)
movq 0x20(%rbx), %rcx
cmpq %rcx, %rdi
jb 0x14967
movl 0x18(%rbx), %edx
decl %edx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rdi
jbe 0x14970
callq 0x1030
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
movq %rax, %rdi
testq %rax, %rax
jne 0x14941
movq 0x20(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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 0x149a6
movq %rax, 0x8(%rbx)
movq 0x18(%rax), %rcx
movq %rcx, (%rbx)
jmp 0x149b9
movl $0x30, %edi
callq 0x1190
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x149d1
xorl %ecx, %ecx
movl %ecx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x18(%rax)
movl %ecx, 0x28(%rax)
movq 0x8(%rbx), %rax
popq %rbx
retq
leaq 0xc14f(%rip), %rdi      # 0x20b27
callq 0x1070
xorl %eax, %eax
jmp 0x149cf
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
testq %r15, %r15
je 0x14a40
movq 0x10(%r14), %r12
movq %r15, 0x8(%r12)
movq 0x8(%r15), %rax
movq %rax, (%rbx)
cmpl $0x0, 0x28(%r15)
je 0x14a2c
movq (%r15), %rdi
callq 0x1030
movq (%rbx), %rax
movq (%r12), %rcx
movq %rcx, 0x8(%r15)
movq %r15, (%r12)
movq %rax, %r15
testq %rax, %rax
jne 0x14a0a
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_O3/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 0x14a8e
movl %eax, %edi
callq 0x1190
movb (%rbx), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x14ab3
movb %dl, (%rax,%rcx)
movb 0x1(%rbx,%rcx), %dl
incq %rcx
jmp 0x14aa3
movb $0x0, (%rax,%rcx)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movl %edi, %r14d
movslq %edi, %rdi
shlq $0x2, %rdi
callq 0x1190
movq %rax, %rbx
testq %rax, %rax
je 0x14bbe
testl %r14d, %r14d
jle 0x14bb5
movl %r14d, %r15d
leal 0x1(%r14), %eax
leaq -0x1(%r15), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl %eax
shlq $0x3, %rax
movdqa 0xbd08(%rip), %xmm1     # 0x20810
xorl %ecx, %ecx
movdqa 0xbd0e(%rip), %xmm2     # 0x20820
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xbd0e(%rip), %xmm4     # 0x20830
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x14b60
movd %xmm5, (%rbx,%rcx)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x14b79
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movd %xmm5, 0x4(%rbx,%rcx)
paddq %xmm4, %xmm1
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x14b22
cmpl $0x1, %r14d
je 0x14bb5
leaq -0x1(%r15), %r14
callq 0x1250
cltd
idivl %r15d
movslq %edx, %rax
movl (%rbx,%rax,4), %ecx
movl -0x4(%rbx,%r15,4), %edx
movl %edx, (%rbx,%rax,4)
movl %ecx, -0x4(%rbx,%r15,4)
cmpq $0x2, %r15
movq %r14, %r15
ja 0x14b8c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x1d22
jmp 0x14bb5
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq (%rdx), %rax
testq %rax, %rax
jle 0x14bf7
movq 0x10(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl $0x0, 0x1c(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x14be4
testq %r14, %r14
je 0x14c33
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x10(%rbx), %rax
movslq (%r15,%r12,4), %rcx
movq (%rax,%rcx,8), %rdi
cmpl $0x0, 0x1c(%rdi)
je 0x14c1d
movl $0xffffffff, (%r15,%r12,4) # imm = 0xFFFFFFFF
jmp 0x14c29
movl $0x1, %esi
callq 0xb883
incl %ebp
incq %r12
cmpq %r12, %r14
jne 0x14c01
jmp 0x14c35
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1190
movq %rax, %r15
testq %r14, %r14
je 0x14c7b
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rbx,%rax,4), %edx
cmpl $-0x1, %edx
je 0x14c73
movl %edx, (%r15,%rcx,4)
incq %rcx
incq %rax
cmpq %rax, %r14
jne 0x14c64
movq %rbx, %rdi
callq 0x1030
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8576
movq %rax, %r15
movl (%rbx), %eax
testl %eax, %eax
jle 0x14d2f
xorl %r13d, %r13d
movq 0x10(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x8(%rcx), %r12
testq %r12, %r12
je 0x14d24
movq 0x18(%r14), %rsi
movq %r12, %rdi
callq 0x7bec
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 0x7cfe
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x14cde
movl (%rbx), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x14ccd
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_O3/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 $0x0, 0x20(%rdi)
movq %r8, (%rdi)
movq %r8, %rdi
movq %r9, %rsi
callq 0x14cad
movq %rax, 0x8(%rbx)
movq %r15, 0x28(%rbx)
movq %r12, 0x18(%rbx)
xorl %edi, %edi
xorl %ebp, %ebp
testq %r15, %r15
je 0x14da5
xorl %eax, %eax
movq (%r14,%rax,8), %rcx
addq %rcx, %rdi
cmpq %rbp, %rcx
cmovaq %rcx, %rbp
incq %rax
cmpq %rax, %r15
jne 0x14d87
movq %rdi, 0x20(%rbx)
shlq $0x4, %rdi
callq 0x1190
leaq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x14e47
movq %rbx, %r12
testq %rbp, %rbp
je 0x14e2d
xorl %r13d, %r13d
xorl %eax, %eax
movq %rax, %rbx
movq (%rsp), %rcx
movq (%rcx), %rdi
testq %r15, %r15
je 0x14e01
xorl %ecx, %ecx
movq %rax, %rbx
cmpq (%r14,%rcx,8), %r13
jae 0x14df9
movq %rbx, %rdx
shlq $0x4, %rdx
movq %r13, (%rdi,%rdx)
movq %rcx, 0x8(%rdi,%rdx)
incq %rbx
incq %rcx
cmpq %rcx, %r15
jne 0x14de0
movq %rbx, %rsi
subq %rax, %rsi
shlq $0x4, %rax
addq %rax, %rdi
movl $0x10, %edx
leaq -0x18e(%rip), %rcx      # 0x14c8c
movq %r12, %r8
callq 0x1180
incq %r13
movq %rbx, %rax
cmpq %rbp, %r13
jne 0x14dcf
movq %r14, %rdi
callq 0x1030
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %r12
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x1d3e
jmp 0x14e2d
// File: /workspace/github_c_makefile_star2_O3/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
testq %r13, %r13
je 0x14e9a
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
callq 0x1030
incq %rbp
cmpq %rbp, %r13
jne 0x14e89
movq %r15, %rdi
callq 0x1030
movq (%r12), %r15
cmpl $0x2, (%r15)
jl 0x14edf
movq 0x10(%r15), %rax
movl $0x1, %r13d
movq (%rax,%r13,8), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x14700
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rcx
movq $0x0, (%rcx)
incq %r13
movslq (%r15), %rcx
cmpq %rcx, %r13
jl 0x14eb6
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x14700
movq %r14, %rdi
movq %r15, %rsi
callq 0x14700
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_O3/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 0x15302
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movslq %edi, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x15312
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq %edi, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x1537f
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %eax
movl %eax, 0x1c(%rdi)
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rdi), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, 0x1c(%rcx)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x15377
leaq 0x50(%rsp), %r14
movq 0x18(%rbx), %rdi
cmpl $0x1, 0x1c(%rdi)
je 0x1536e
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15312
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x15343
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x1c(%rdi)
movq 0x58(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rdi), %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, 0x1c(%rcx)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x153e4
leaq 0x50(%rsp), %r14
movq 0x18(%rbx), %rdi
cmpl $-0x1, 0x1c(%rdi)
je 0x153db
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1537f
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x153b0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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), %rax
movslq (%rax), %rcx
testq %rcx, %rcx
jle 0x1543b
movq 0x10(%rax), %rdx
xorl %esi, %esi
xorl %edi, %edi
xorl %eax, %eax
movq (%rdx,%rdi,8), %r8
movq 0x8(%r8), %r9
movl $0x1, %r8d
testq %r9, %r9
je 0x1542f
movq 0x18(%r9), %r10
movq 0x8(%r9), %r11
cmpl $0x1, 0x1c(%r10)
cmovnel %esi, %r8d
movq %r11, %r9
testq %r11, %r11
jne 0x15416
addl %r8d, %eax
incq %rdi
cmpq %rcx, %rdi
jne 0x15403
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x99c3
movq %rax, %rbx
movq 0x20(%rsp), %r14
movl (%r14), %eax
cmpl $0x2, %eax
jl 0x15488
movl $0x1, %r15d
movq 0x10(%r14), %rcx
movq (%rcx,%r15,8), %rcx
cmpl $0x1, 0x1c(%rcx)
jne 0x1547d
leal -0x1(%r15), %esi
movq %rbx, %rdi
callq 0x9c0c
movl (%r14), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x15460
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/minhashing.c
// Function: fullEmbeddingProjectionApproximationForTrees
int* fullEmbeddingProjectionApproximationForTrees(struct Graph* g, struct EvaluationPlan p, int* projection, int projectionSize, struct GraphPool* gp) {

	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	for (int i=0; i<projectionSize; ++i) {
		// if we don't know the value we need to compute it.
		int currentGraphNumber = projection[i];
		if (!embeddingValueKnown(p.poset->vertices[currentGraphNumber])) {
			// evaluate the embedding operator
			struct Graph* currentGraph = (struct Graph*)(p.poset->vertices[currentGraphNumber]->label);
			char match = isSubtree(g, currentGraph, gp);
			++nEvaluations;
			updateEvaluationPlan(p, currentGraphNumber, match);
		}
	}

	int* approximateEmbedding = malloc((p.poset->n - 1) * sizeof(int));
	if (!approximateEmbedding) {
		fprintf(stderr, "Could not allocate memory for sketch. This is a bad thing.\n");
		return NULL;
	}

	for (int i=1; i<p.poset->n; ++i) {
		approximateEmbedding[i-1] = p.poset->vertices[i]->visited; // init sketch values to 'infty'
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return approximateEmbedding;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x50(%rsp)
movq %rsi, %r15
movq %rdi, 0x48(%rsp)
leaq 0x90(%rsp), %rax
movq (%rax), %rbx
movslq (%rbx), %r13
testq %r13, %r13
jle 0x15a5f
movq 0x8(%rax), %rcx
movq 0x10(%rbx), %rax
movq 0x10(%rcx), %rcx
xorl %esi, %esi
xorl %edi, %edi
movq (%rax,%rdi,8), %r8
movl %esi, 0x1c(%r8)
movq (%rcx,%rdi,8), %r8
movl %esi, 0x1c(%r8)
incq %rdi
cmpq %rdi, %r13
jne 0x15a47
testl %edx, %edx
jle 0x15b2f
movl %edx, %r13d
leaq 0x90(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq (%r15,%r12,4), %r14
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x15b1e
movq (%rax), %rsi
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rdx
callq 0xabef
incl %ebp
testb %al, %al
je 0x15aeb
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rdi
leaq 0x90(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15312
jmp 0x15b1e
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rdi
leaq 0x90(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1537f
incq %r12
cmpq %r12, %r13
jne 0x15a88
movl (%rbx), %r13d
jmp 0x15b31
xorl %ebp, %ebp
movslq %r13d, %rax
leaq -0x4(,%rax,4), %rdi
callq 0x1190
movq %rax, %r14
testq %rax, %rax
jne 0x15b50
callq 0x1ec3
jmp 0x15b60
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x1e84
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/minhashing.c
// Function: randomProjectionEmbeddingForTrees
int* randomProjectionEmbeddingForTrees(struct Graph* g, struct EvaluationPlan p, int* projection, int projectionSize, struct GraphPool* gp) {

	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	// alloc output array
	int* approximateEmbedding = malloc(projectionSize * sizeof(int));
	if (!approximateEmbedding) {
		fprintf(stderr, "Could not allocate memory for sketch. This is a bad thing.\n");
		return NULL;
	}

	for (int i=0; i<projectionSize; ++i) {

		// if we don't know the value we need to compute it.
		int currentGraphNumber = projection[i];
		if (!embeddingValueKnown(p.poset->vertices[currentGraphNumber])) {

			// evaluate the embedding operator
			struct Graph* currentGraph = (struct Graph*)(p.poset->vertices[currentGraphNumber]->label);
			char match = isSubtree(g, currentGraph, gp);

			// update output
			approximateEmbedding[i] = match;

			// update evaluation Plan
			++nEvaluations;
			updateEvaluationPlan(p, currentGraphNumber, match);
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return approximateEmbedding;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x50(%rsp)
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, 0x48(%rsp)
leaq 0x90(%rsp), %rax
movq (%rax), %rbx
movslq (%rbx), %rax
testq %rax, %rax
jle 0x15e0f
leaq 0x90(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x10(%rbx), %rcx
movq 0x10(%rdx), %rdx
xorl %esi, %esi
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
movl %esi, 0x1c(%r8)
movq (%rdx,%rdi,8), %r8
movl %esi, 0x1c(%r8)
incq %rdi
cmpq %rdi, %rax
jne 0x15df7
movslq %r15d, %rdi
shlq $0x2, %rdi
callq 0x1190
movq %rax, 0x30(%rsp)
testq %rax, %rax
jne 0x15e2f
callq 0x1f43
jmp 0x15f23
xorl %ebp, %ebp
testl %r15d, %r15d
jle 0x15f09
movl %r15d, %r15d
leaq 0x90(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq (%r14,%r12,4), %r13
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x15efd
movq (%rax), %rsi
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rdx
callq 0xabef
movsbl %al, %eax
movq 0x30(%rsp), %rcx
movl %eax, (%rcx,%r12,4)
incl %ebp
testb %al, %al
je 0x15eca
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r13,8), %rdi
leaq 0x90(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x15312
jmp 0x15efd
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r13,8), %rdi
leaq 0x90(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1537f
incq %r12
cmpq %r12, %r15
jne 0x15e5b
movq 0x170e8(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0xa11c(%rip), %rsi      # 0x20036
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
movq 0x30(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/newCube.c
// Function: printNewCubeCondensed
void printNewCubeCondensed(uint8_t* S, int gn, int hn, FILE* out) {
	if (S == NULL) {
		fprintf(out, "(NULL)\n");
		return;
	}
	for (int v=0; v<gn; ++v) {
		for (int u=0; u<hn; ++u) {
			fprintf(out, "(%i, %i): ", v, u);
			for (int y=0; y<hn; ++y) {
				if (getBit(S, getCharacteristicPosition(y, u, v, hn))) {
					fprintf(out, " %i", y);
				}
			}
			if (getBit(S, getCharacteristicPosition(u,u,v,hn))) {
				fprintf(out, " <- !");
			}
			fprintf(out, "\n");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movl %edx, 0xc(%rsp)
testq %rdi, %rdi
je 0x163e1
testl %esi, %esi
jle 0x163d2
movq %rdi, %r14
movslq 0xc(%rsp), %rbp
movl %esi, %eax
movq %rax, 0x30(%rsp)
movl %ebp, %r13d
movq %rbp, %rax
imulq %rbp, %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %rbp, 0x38(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x163ab
movq 0x10(%rsp), %rax
imulq %rbp, %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %r12
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0xa99e(%rip), %rsi      # 0x20ca9
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1160
movq 0x40(%rsp), %rax
movq %r15, 0x20(%rsp)
addq %rax, %r15
imulq %rbp, %r15
xorl %ebp, %ebp
leaq (%r12,%rbp), %rsi
movq %r14, %rdi
callq 0x3a1c
testb %al, %al
je 0x16350
movq %rbx, %rdi
leaq 0xb262(%rip), %rsi      # 0x215a9
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
incq %rbp
cmpq %rbp, %r13
jne 0x1632d
addq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a1c
testb %al, %al
je 0x16385
movl $0x5, %esi
movl $0x1, %edx
leaq 0xa937(%rip), %rdi      # 0x20cb4
movq %rbx, %rcx
callq 0x1220
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1110
movq 0x20(%rsp), %r15
incq %r15
movq 0x38(%rsp), %rbp
addq %rbp, %r12
cmpq %r13, %r15
jne 0x16301
movq 0x10(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
cmpq 0x30(%rsp), %rcx
jne 0x162e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa8b9(%rip), %rdi      # 0x20ca1
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1220
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/newCube.c
// Function: printNewCube
void printNewCube(uint8_t* S, int gn, int hn, FILE* out) {
	for (int v=0; v<gn; ++v) {
		for (int u=0; u<hn; ++u) {
			fprintf(out, "(%i, %i): ", v, u);
			for (int y=0; y<hn; ++y) {
				fprintf(out, "%i", getBit(S, getCharacteristicPosition(y, u, v, hn)));
			}
			fprintf(out, "\n");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, 0xc(%rsp)
testl %esi, %esi
jle 0x164fc
movq %rcx, %rbx
movq %rdi, %r14
movslq 0xc(%rsp), %rax
movl %esi, %ecx
movq %rcx, 0x28(%rsp)
movl %eax, %r13d
movq %rax, 0x38(%rsp)
imulq %rax, %rax
movq %rax, 0x20(%rsp)
leaq 0xb15e(%rip), %r12      # 0x215aa
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %r13, 0x30(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x164d5
movq 0x10(%rsp), %r15
xorl %ebp, %ebp
movq %rbx, %rdi
leaq 0xa82e(%rip), %rsi      # 0x20ca9
movq 0x18(%rsp), %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1160
movq %r15, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a1c
movzbl %al, %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1160
incq %r15
decq %r13
jne 0x1648e
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1110
incq %rbp
movq 0x40(%rsp), %r15
addq 0x38(%rsp), %r15
movq 0x30(%rsp), %r13
cmpq %r13, %rbp
jne 0x16471
movq 0x18(%rsp), %rcx
incq %rcx
movq 0x10(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x16463
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/outerplanar.c
// Function: isPath
char isPath(struct 	Graph* tree) {
	if (tree->m != tree->n - 1) { return 0; }
	for (int v=0; v<tree->n; ++v) {
		if (degree(tree->vertices[v]) > 2) {
			return 0;
		}
	}
	return 1;
}

// Assembly:
movl (%rdi), %eax
leal -0x1(%rax), %ecx
cmpl %ecx, 0x4(%rdi)
jne 0x16c8b
testl %eax, %eax
jle 0x16c8e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x7c4e
cmpl $0x3, %eax
jge 0x16c7d
incq %r14
movslq (%rbx), %rcx
cmpq %rcx, %r14
jl 0x16c60
cmpl $0x3, %eax
setl %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq