// File: /workspace/github_c_makefile_star2_O0/jalalium[P]graph_algorithms_task/src_path/main_paths.c
// Function: find_all_paths
void	find_all_paths(t_graph *g)
{
	t_vect *spur = (t_vect*)malloc(sizeof(t_vect));
	t_queue *bfs = init_queue(); 
	init_vector(spur);
	push_back(spur, g->start);
	init_paths(g);
	push_q(bfs, create_state(g->start, spur));
	while (bfs->size > 0)
	{
		t_qlayer *front = bfs->head;
		for (int i = 0; i < g->adj[front->node].used; i++)
		{
			for (int j = 0; j < front->prefix->used; j++)
				if (front->prefix->tab[j] == g->adj[front->node].tab[i])
					goto st;
			add_path(g, append(front->prefix, g->adj[front->node].tab[i]));
			push_q(bfs, create_state(g->adj[front->node].tab[i], append(front->prefix, g->adj[front->node].tab[i])));
			st:;
		}	
		pop_q(bfs);
	}
	free(spur->tab);
	free(spur);
	free(bfs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x18, %edi
callq 0x1070
movq %rax, -0x10(%rbp)
movb $0x0, %al
callq 0x1f10
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2240
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0x2370
movq -0x8(%rbp), %rdi
callq 0x1a60
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movq -0x10(%rbp), %rsi
callq 0x11d0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x1f40
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x19f9
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movslq 0x18(%rdx), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jae 0x19eb
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x192d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x20(%rbp), %rdx
movslq 0x18(%rdx), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x1920
jmp 0x19db
jmp 0x1922
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x18d7
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1260
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x1c40
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1260
movl -0x3c(%rbp), %edi
movq %rax, %rsi
callq 0x11d0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x1f40
jmp 0x19dd
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x18ac
movq -0x18(%rbp), %rdi
callq 0x1fe0
jmp 0x188b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x1030
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)