// File: /workspace/github_c_makefile_star2_O1/pwelke[P]GraphMiningTools/localEasySubtreeIsomorphism.c
// Function: blockConverter
struct Graph* blockConverter(struct ShallowGraph* edgeList, struct GraphPool* gp) {

	int n = 0;

	/* clear all ->lowPoint s */
	for (struct VertexList* e=edgeList->edges; e; e=e->next) {
		e->startPoint->lowPoint = 0;
		e->endPoint->lowPoint = 0;
	}

	/* count number of distinct vertices and number vertices accordingly. */
	for (struct VertexList* e=edgeList->edges; e; e=e->next) {
		if (e->startPoint->lowPoint == 0) {
			++n;
			e->startPoint->lowPoint = n;
		}
		if (e->endPoint->lowPoint == 0) {
			++n;
			e->endPoint->lowPoint = n;
		}
	}

	/* set vertex number of new Graph to n, initialize stuff*/
	struct Graph* g = createGraph(n, gp);
	g->m = edgeList->m;


	for (struct VertexList* e=edgeList->edges; e; e=e->next) {
		/* add copies of edges and labels of vertices */
		struct VertexList* f = getVertexList(gp->listPool);
		f->startPoint = g->vertices[e->startPoint->lowPoint - 1];
		f->endPoint = g->vertices[e->endPoint->lowPoint - 1];
		f->label = e->label;
		f->startPoint->label = e->startPoint->label;
		f->endPoint->label = e->endPoint->label;

		addEdge(g->vertices[e->startPoint->lowPoint - 1], f);
		addEdge(g->vertices[e->endPoint->lowPoint - 1], inverseEdge(f, gp->listPool));

		/* the vertices in the original graph (on which edgeList is based upon) have their ->visited values
		 * set to -1 if they are not roots and to the index of the root in sptTree->root, if they are a root.
		 * Transfer this information to the resulting graph. */
		f->startPoint->d = e->startPoint->visited;
		f->endPoint->d = e->endPoint->visited;
	}

	return g;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0xeab7
xorl %ecx, %ecx
movq 0x10(%rax), %rdx
movl %ecx, 0x20(%rdx)
movq 0x18(%rax), %rdx
movl %ecx, 0x20(%rdx)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xeaa0
movq (%r14), %rax
xorl %edi, %edi
testq %rax, %rax
je 0xeae5
movq 0x10(%rax), %rcx
cmpl $0x0, 0x20(%rcx)
jne 0xead0
incl %edi
movl %edi, 0x20(%rcx)
movq 0x18(%rax), %rcx
cmpl $0x0, 0x20(%rcx)
jne 0xeadf
incl %edi
movl %edi, 0x20(%rcx)
movq 0x8(%rax), %rax
jmp 0xeabc
movq %rbx, %rsi
callq 0x8565
movq %rax, %r15
movl 0x10(%r14), %eax
movl %eax, 0x4(%r15)
movq (%r14), %r13
testq %r13, %r13
je 0xebaf
movq 0x18(%rbx), %rdi
callq 0x1432b
movq %rax, %r14
movq 0x10(%r15), %rax
movq 0x10(%r13), %rcx
movslq 0x20(%rcx), %rcx
movq -0x8(%rax,%rcx,8), %rcx
movq %rcx, 0x10(%r14)
movq 0x18(%r13), %rdx
movslq 0x20(%rdx), %rdx
movq -0x8(%rax,%rdx,8), %rdx
movq %rdx, 0x18(%r14)
movq (%r13), %rsi
movq %rsi, (%r14)
movq 0x10(%r13), %rsi
movq (%rsi), %rdi
movq %rdi, (%rcx)
movq 0x18(%r13), %rcx
movq (%rcx), %rcx
movq %rcx, (%rdx)
movslq 0x20(%rsi), %rcx
movq -0x8(%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x7cd0
movq 0x10(%r15), %rax
movq 0x18(%r13), %rcx
movslq 0x20(%rcx), %rcx
movq -0x8(%rax,%rcx,8), %r12
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x7bdc
movq %r12, %rdi
movq %rax, %rsi
callq 0x7cd0
movq 0x10(%r13), %rax
movl 0x1c(%rax), %eax
movq 0x10(%r14), %rcx
movl %eax, 0x28(%rcx)
movq 0x18(%r13), %rax
movl 0x1c(%rax), %eax
movq 0x18(%r14), %rcx
movl %eax, 0x28(%rcx)
movq 0x8(%r13), %r13
jmp 0xeafb
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq