// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/graph.c
// Function: cloneInducedGraph
struct Graph* cloneInducedGraph(struct Graph* g, struct GraphPool* gp) {
	struct Graph* copy = getGraph(gp);
	struct Vertex** tmp;
	int i, j;
	int actualVertices = 0;

	copy->activity = g->activity;
	copy->m = g->m;
	copy->number = g->number;

	setVertexNumber(copy, g->n);

	/* copy vertices */
	for (i=0; i<g->n; ++i) {
		if (g->vertices[i]) {
			copy->vertices[i] = shallowCopyVertex(g->vertices[i], gp->vertexPool);
			++actualVertices;
		}
	}

	/* copy edges */
	for (i=0; i<g->n; ++i) {
		if (g->vertices[i]) {
			for (struct VertexList* e=g->vertices[i]->neighborhood; e; e=e->next) {
				struct VertexList* f = getVertexList(gp->listPool);
				f->endPoint = copy->vertices[e->endPoint->number];
				f->startPoint = copy->vertices[e->startPoint->number];
				f->label = e->label;

				/* add the shallow copy to the new graph */
				f->next = copy->vertices[e->startPoint->number]->neighborhood;
				copy->vertices[e->startPoint->number]->neighborhood = f;
			}
		}
	}

	/* up to this point, there may be elements of copy->vertices, that are NULL */
	tmp = copy->vertices;

	/* set the number of vertices correctly */
	setVertexNumber(copy, actualVertices);

	/* shift the vertices that are there into the new array and
	 * assign new numbers */
	j = 0;
	for (i=0; i<g->n; ++i) {
		if (tmp[i]) {
			copy->vertices[j] = tmp[i];
			copy->vertices[j]->lowPoint = copy->vertices[j]->number;
			copy->vertices[j]->number = j;
			++j;
		}
	}

	free(tmp);

	return copy;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x1fa40
movq %rax, 0x30(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x40(%rsp), %rax
movl 0xc(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x40(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rax
movl (%rax), %esi
callq 0xaa00
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xafbf
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xafb0
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa3f0
movq %rax, %rdx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xafb2
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xaf4e
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xb0f2
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xb0e0
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0xb0de
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rdx
movq 0x10(%rdx), %rdx
movslq 0x18(%rdx), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0xb00c
jmp 0xb0e0
jmp 0xb0e2
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xafc7
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0xaa00
movl $0x0, 0x20(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xb1c0
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xb1ae
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x20(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x18(%rax), %ecx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x20(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x20(%rax)
movl 0x20(%rsp), %ecx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x20(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x18(%rax)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xb1b0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xb11e
movq 0x28(%rsp), %rdi
callq 0x1030
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)