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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x18, %edi
callq 0x1060
movq %rax, -0x18(%rbp)
movb $0x0, %al
callq 0x2300
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x25c0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x26f0
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x11c0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x21b0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x19c0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x28(%rbp), %rdx
movslq 0x18(%rdx), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
cmpl %ecx, %eax
jge 0x19b2
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
cmpl %ecx, %eax
jge 0x18f1
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x28(%rbp), %rdx
movslq 0x18(%rdx), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x18e4
jmp 0x19a2
jmp 0x18e6
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x189a
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1250
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %edx
callq 0x20e0
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1250
movl -0x44(%rbp), %edi
movq %rax, %rsi
callq 0x11c0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x21b0
jmp 0x19a4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x186e
movq -0x20(%rbp), %rdi
callq 0x2250
jmp 0x184d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)