// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/listCycles.c
// Function: _findPathIntern
char __findPathIntern(struct Vertex* v, struct Vertex* parent, struct Vertex* target, int allowance, struct ShallowGraph* path, struct ShallowGraphPool* sgp) {
	struct VertexList *idx;
	char found = 0;


	/* this is an exception for the case where the target is the neighbor of parent
	 * and __backtrack calls findPath(target, parent, target, ...) */
	if (v == target) {
		return 1;
	}

	if (v->visited == 0) {

		v->lowPoint = 1;

		for (idx=v->neighborhood; idx; idx=idx->next) {

			if (idx->endPoint != parent) {
				/* this "removes" vertices that are too small from adjacency lists */
				if  (idx->endPoint->number >= allowance) {

					/* breaking condition: s is reached second argument avoids "cycles" of lenght 4
					 * of the type target-parent-v-parent-target */
					if (idx->endPoint == target){

						pushEdge(path, shallowCopyEdge(idx, sgp->listPool));
						return 1;

					} else {
						/* otherwise check if the endpoint was already visited. if not try recursively */
						if ((idx->endPoint->lowPoint == 0) && (idx->endPoint->visited == 0)) {

							found = __findPathIntern(idx->endPoint, v, target, allowance, path, sgp);

							/* if we have found a path, return this path via path */
							if (found) {
								pushEdge(path, shallowCopyEdge(idx, sgp->listPool));
								break;
							} /* fi found */
						} /* fi not visited */
					} /* esle endPoint = s */
				} /* fi >= allowance */
			} /* fi not parent */
		} /* rof */
	} /* fi */
	return found;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movb $0x0, 0x17(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x11a6c
movb $0x1, 0x57(%rsp)
jmp 0x11baf
movq 0x48(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x11ba7
movq 0x48(%rsp), %rax
movl $0x1, 0x20(%rax)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x11ba5
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x40(%rsp), %rax
je 0x11b90
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %eax
cmpl 0x34(%rsp), %eax
jl 0x11b8e
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x38(%rsp), %rax
jne 0x11b0f
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa310
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xb610
movb $0x1, 0x57(%rsp)
jmp 0x11baf
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x11b8a
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x11b8a
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl 0x34(%rsp), %ecx
movq 0x28(%rsp), %r8
movq 0x20(%rsp), %r9
callq 0x11a30
movb %al, 0x17(%rsp)
cmpb $0x0, 0x17(%rsp)
je 0x11b88
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xa310
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xb610
jmp 0x11ba5
jmp 0x11b8a
jmp 0x11b8c
jmp 0x11b8e
jmp 0x11b90
jmp 0x11b92
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x11a95
jmp 0x11ba7
movb 0x17(%rsp), %al
movb %al, 0x57(%rsp)
movb 0x57(%rsp), %al
addq $0x58, %rsp
retq
nopl (%rax,%rax)