// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/listComponents.c
// Function: _tarjanFBC
struct ShallowGraph* __tarjanFBC(struct Vertex *v, struct Vertex* w, int i, struct VertexList* stack, struct ListPool* lp, struct ShallowGraphPool* gp) {
	struct VertexList *index, *stackEdge;

	struct ShallowGraph* graphList = NULL;
	struct ShallowGraph* tmp;

	/* set the lowest occurrence of a vertex in the current cycle to the current vertex */
	v->lowPoint = i + 1;
	/* assign dfs-numbers */
	v->visited = i + 1;

	for (index = v->neighborhood; index; index = index->next) {
		if (!(index->endPoint->visited)) {
			/* add copy of the current edge to stack of edges, head of the stack remains the head! */
			stack->next = push(stack->next, shallowCopyEdge(index, lp));

			/* recursive call */
			tmp = __tarjanFBC(index->endPoint, v, i + 1, stack, lp, gp);

			/* add output to component list */
			graphList = addComponent(graphList, tmp);

			/* TODO comment */
			v->lowPoint = min(v->lowPoint, index->endPoint->lowPoint);

			if (index->endPoint->lowPoint >= v->visited) {

				/* start new biconnected component */
				struct ShallowGraph* newBiconnectedComponent = getShallowGraph(gp);
				for (stackEdge = stack->next; stackEdge->startPoint->visited >= index->endPoint->visited; stackEdge = stack->next) {
					/* pop stackEdge and add it to the newBiconnectedComponent */
					stack->next = stackEdge->next;
					pushEdge(newBiconnectedComponent, stackEdge);
//					newBiconnectedComponent->edges = push(newBiconnectedComponent->edges, stackEdge);
//					++(newBiconnectedComponent->m);
				}

				/* pop index edge */
				stack->next = stackEdge->next;
				pushEdge(newBiconnectedComponent, stackEdge);
//				newBiconnectedComponent->edges = push(newBiconnectedComponent->edges, stackEdge);
//				++(newBiconnectedComponent->m);

				/* set the prev and next pointers s.t. newBiconnectedComponent is "a cycle of length 1" */
				newBiconnectedComponent->next = newBiconnectedComponent;
				newBiconnectedComponent->prev = newBiconnectedComponent;

				/* add new biconnected component to the list of components */
				graphList = addComponent(graphList, newBiconnectedComponent);
			}
		} else {
			/* if the edge leads to a vertex that was already visited and is not the edge on which we 
			entered the vertex, we have found a cycle and add the edge to the stack. */
			if ((index->endPoint->visited < v->visited) && (index->endPoint->number != w->number)) {
				/* add index to the edge stack */
				stack->next = push(stack->next, shallowCopyEdge(index, lp));
				v->lowPoint = min(v->lowPoint, index->endPoint->visited);
			} 
		}
	}
	return graphList;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movq $0x0, 0x20(%rsp)
movl 0x54(%rsp), %ecx
addl $0x1, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x54(%rsp), %ecx
addl $0x1, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x1c(%rax)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x115c2
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x11528
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xa310
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xa3d0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x60(%rsp), %rsi
movl 0x54(%rsp), %edx
addl $0x1, %edx
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r8
movq 0x38(%rsp), %r9
callq 0x11340
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xbd60
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
movl 0x20(%rax), %edi
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x20(%rax), %esi
callq 0xda10
movl %eax, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x20(%rax), %eax
movq 0x60(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jl 0x11523
movq 0x38(%rsp), %rdi
callq 0x1fe70
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rax), %eax
movq 0x30(%rsp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x1c(%rcx), %eax
jl 0x114d2
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb610
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x11487
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb610
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xbd60
movq %rax, 0x20(%rsp)
jmp 0x115ad
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %eax
movq 0x60(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x115ab
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %eax
movq 0x58(%rsp), %rcx
cmpl 0x18(%rcx), %eax
je 0x115ab
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xa310
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xa3d0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x60(%rsp), %rax
movl 0x20(%rax), %edi
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %esi
callq 0xda10
movl %eax, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x20(%rax)
jmp 0x115ad
jmp 0x115af
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x11396
movq 0x20(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax)