// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/outerplanar.c
// Function: createFancyBlockAndBridgeTree
struct BBTree* createFancyBlockAndBridgeTree(struct ShallowGraph* list, struct Graph *original, int** originalIDs, struct GraphPool* gp, struct ShallowGraphPool *sgp) {
	struct ShallowGraph* idx;
	struct ShallowGraph* tmp;
	struct Graph* bbTree = getGraph(gp);
	struct Graph* blocks = getGraph(gp);
	int blockNo = 0;
	int i;

	/* copy V(original) */
	setVertexNumber(bbTree, original->n);
	for (i=0; i<original->n; ++i) {
		bbTree->vertices[i] = shallowCopyVertex(original->vertices[i], gp->vertexPool);
	}

	/* copy all bridges to the new graph and delete them from list;
	 * count the number of blocks */
	for (idx=list; idx; idx=tmp) {

		tmp = idx->next;
		if (idx->m == 1) {
			struct VertexList* e = getVertexList(gp->listPool);

			/* add the edge to the bbTree */
			e->startPoint = bbTree->vertices[idx->edges->startPoint->number];
			e->endPoint = bbTree->vertices[idx->edges->endPoint->number];
			e->label = idx->edges->label;

			addEdge(bbTree->vertices[idx->edges->startPoint->number], e);
			addEdge(bbTree->vertices[idx->edges->endPoint->number], inverseEdge(e, gp->listPool));

			++bbTree->m;

			/* cut idx out of list */
			if (idx->prev) {
				idx->prev->next = tmp;
				if (tmp) {
					tmp->prev = idx->prev;
				}
			} else {
				list = tmp;
				if (tmp) {
					tmp->prev = NULL;
				}
			}

			/* dump idx */
			idx->next = NULL;
			dumpShallowGraph(sgp, idx);
		} else {
			/* we have found a block */
			++blockNo;
		}
	}

	/* add blocks */
	setVertexNumber(blocks, blockNo);
	for (i=0; i<blockNo; ++i) {
		blocks->vertices[i] = getVertex(gp->vertexPool);
		blocks->vertices[i]->number = - (i + 1);
	}

	for (i=0; i<bbTree->n; ++i) {
		if (bbTree->vertices[i]->neighborhood) {
			bbTree->vertices[i]->visited = -1;
		}
	}

	/* mark vertices that are in the block and bridge tree */
	i = 1; // component marker
	for (struct ShallowGraph* comp=list; comp!=NULL; comp=comp->next) {
		for (struct VertexList* e=comp->edges; e!=NULL; e=e->next) {
			struct Vertex* v = bbTree->vertices[e->startPoint->number];
			if (v->visited == 0) {
				v->visited = i;
			} else if (v->visited != i) {
				v->visited = -1;
			}
			v = bbTree->vertices[e->endPoint->number];
			if (v->visited == 0) {
				v->visited = i;
			} else if (v->visited != i) {
				v->visited = -1;
			}
		}
		++i;
	}

	/* add edges from block vertices to articulation vertices */
	i = 1; // component marker
	for (struct ShallowGraph* comp=list; comp!=NULL; comp=comp->next) {
		for (struct VertexList* e=comp->edges; e!=NULL; e=e->next) {
			struct Vertex* v = bbTree->vertices[e->startPoint->number];
			if ((v->visited == -1) && (v->lowPoint != i)) {
				v->lowPoint = i;
				struct Vertex* w = blocks->vertices[i-1];
				struct VertexList* f = getVertexList(gp->listPool);
				f->startPoint = v;
				f->endPoint = w;
				addEdge(v, f);
				f = getVertexList(gp->listPool);
				f->endPoint = v;
				f->startPoint = w;
				addEdge(w, f);
				++blocks->m;
			}
			v = bbTree->vertices[e->endPoint->number];
			if ((v->visited == -1) && (v->lowPoint != i)) {
				v->lowPoint = i;
				struct Vertex* w = blocks->vertices[i-1];
				struct VertexList* f = getVertexList(gp->listPool);
				f->startPoint = v;
				f->endPoint = w;
				addEdge(v, f);
				f = getVertexList(gp->listPool);
				f->endPoint = v;
				f->startPoint = w;
				addEdge(w, f);
				++blocks->m;
			}
		}
		++i;
	}

	/* remove vertices that do not belong to more than one biconnected component
	 * runtime O(n+m) */
	for (i=0; i<bbTree->n; ++i) {

		if (bbTree->vertices[i]->visited != -1) {
			/* check if to remove the vertex. if so, dump vertex and all edges dangling at it.
			* The corresponding entry in bbTree->vertices will be NULL */
			dumpVertexListRecursively(gp->listPool, bbTree->vertices[i]->neighborhood);
			dumpVertex(gp->vertexPool, bbTree->vertices[i]);
			bbTree->vertices[i] = NULL;
		}
	}

	return compressedBBTree(bbTree, blocks, list, originalIDs, gp);
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1fa40
movq %rax, 0x78(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1fa40
movq %rax, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %rax
movl (%rax), %esi
callq 0xaa00
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x25aef
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa3f0
movq %rax, %rdx
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x25a97
movq 0xb0(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x25cf4
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x25cd2
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq 0x60(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x60(%rsp), %rsi
callq 0xa660
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x88(%rsp), %rcx
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xa370
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xa660
movq 0x78(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq 0x88(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x25c7e
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x80(%rsp)
je 0x25c7c
movq 0x88(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x25cab
movq 0x80(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x25ca9
movq 0x80(%rsp), %rax
movq $0x0, 0x20(%rax)
jmp 0x25cab
movq 0x88(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x1ff70
jmp 0x25cdd
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x25cdf
movq 0x80(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x25aff
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0xaa00
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0x25d67
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1f6a0
movq %rax, %rdx
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x68(%rsp), %eax
addl $0x1, %eax
xorl %ecx, %ecx
subl %eax, %ecx
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x18(%rax)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x25d0a
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
movq 0x78(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x25dbd
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x25dae
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
jmp 0x25db0
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x25d6f
movl $0x1, 0x68(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x25ed2
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x25eb4
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x25e2f
movl 0x68(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x25e4b
movq 0x48(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl 0x68(%rsp), %eax
je 0x25e49
movq 0x48(%rsp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
jmp 0x25e4b
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x25e83
movl 0x68(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x25e9f
movq 0x48(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl 0x68(%rsp), %eax
je 0x25e9d
movq 0x48(%rsp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
jmp 0x25e9f
jmp 0x25ea1
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x25deb
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x25dd2
movl $0x1, 0x68(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x2612f
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x26111
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpl $-0x1, 0x1c(%rax)
jne 0x26004
movq 0x30(%rsp), %rax
movl 0x20(%rax), %eax
cmpl 0x68(%rsp), %eax
je 0x26004
movl 0x68(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xa660
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xa660
movq 0x70(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq 0x18(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpl $-0x1, 0x1c(%rax)
jne 0x260fc
movq 0x30(%rsp), %rax
movl 0x20(%rax), %eax
cmpl 0x68(%rsp), %eax
je 0x260fc
movl 0x68(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xa660
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1f310
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xa660
movq 0x70(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x260fe
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x25f00
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x25ee7
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
movq 0x78(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x261d2
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $-0x1, 0x1c(%rax)
je 0x261c0
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rsi
callq 0x1f460
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1f810
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x68(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x261c2
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x26137
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %r8
callq 0x25960
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)