// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x164cb
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movl $0x0, 0x20(%rax)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x20(%rax)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x16493
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x16546
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x1650a
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %ecx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movl %ecx, 0x20(%rax)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x16534
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %ecx
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x20(%rax)
jmp 0x16536
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x164d8
movl 0x34(%rsp), %edi
movq 0x38(%rsp), %rsi
callq 0xb850
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x166d3
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0xa660
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xa370
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xa660
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rax), %ecx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movl %ecx, 0x28(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %ecx
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x28(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x16576
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)