// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/lwmr_initAndCollect.c
// Function: directedEdgeSearchTree2ShallowGraph
static struct ShallowGraph* directedEdgeSearchTree2ShallowGraph(struct Vertex* frequentEdges, struct Graph** newVertices, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct ShallowGraph* result = getShallowGraph(sgp);
	struct VertexList* e;
	struct Vertex* createdVertices = NULL;
	int nVertices = 0;
	int i;
	struct Vertex* tmp;

	for (e=frequentEdges->neighborhood; e!=NULL; e=e->next) {
		struct Vertex* v = getVertex(gp->vertexPool);
		struct VertexList* f;
		v->label = e->label;
		/* store newly created vertex in a list */
		v->next = createdVertices;
		createdVertices = v;
		++nVertices;

		for (f=e->endPoint->neighborhood->endPoint->neighborhood; f!=NULL; f=f->next) {
			struct VertexList* g;
			for (g=f->endPoint->neighborhood; g!=NULL; g=g->next) {
				struct VertexList* new = getVertexList(sgp->listPool);
				new->startPoint = v;
				new->label = f->label;
				new->endPoint = getVertex(gp->vertexPool);
				new->endPoint->label = g->label;
				pushEdge(result, new);

				/* store newly created vertex in a list */
				new->endPoint->next = createdVertices;
				createdVertices = new->endPoint;
				++nVertices;
			}
		}
	}

	/* to avoid memory leaks, make hardcopies of the labels */
	for (e=result->edges; e!=NULL; e=e->next) {
		if (!e->isStringMaster) {
			e->isStringMaster = 1;
			e->label = copyString(e->label);
		}
		if (!e->startPoint->isStringMaster) {
			e->startPoint->isStringMaster = 1;
			e->startPoint->label = copyString(e->startPoint->label);
		}
		if (!e->endPoint->isStringMaster) {
			e->endPoint->isStringMaster = 1;
			e->endPoint->label = copyString(e->endPoint->label);
		}
	}

	/* to avoid memory leaks, make a graph containing all newly created vertices and return it*/
	*newVertices = getGraph(gp);
	setVertexNumber(*newVertices, nVertices);
	for (i=0, tmp=createdVertices; i<nVertices; ++i, tmp=tmp->next) {
		(*newVertices)->vertices[i] = tmp;
	}

	return result;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x1fe70
movq %rax, 0x40(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1dd3a
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1f6a0
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1dd25
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1dd10
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1f310
movq %rax, (%rsp)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1f6a0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movq 0x40(%rsp), %rdi
movq (%rsp), %rsi
callq 0xb610
movq 0x30(%rsp), %rcx
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1dc60
jmp 0x1dd12
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1dc42
jmp 0x1dd27
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x1dbd6
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1de15
movq 0x38(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x1dd82
movq 0x38(%rsp), %rax
movl $0x1, 0x28(%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x20090
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x24(%rax)
jne 0x1ddc1
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x24(%rax)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x20090
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x24(%rax)
jne 0x1de00
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x24(%rax)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
callq 0x20090
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
jmp 0x1de02
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x1dd47
movq 0x50(%rsp), %rdi
callq 0x1fa40
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0xaa00
movl $0x0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x1de8c
movq 0x20(%rsp), %rdx
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq 0x28(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x1de4d
movq 0x40(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)