// File: /workspace/github_c_makefile_star2_O0/jalalium[P]graph_algorithms_task/src_scc/components.c
// Function: fill_component
void	fill_component(int x, t_graph *g, t_component *new, int cycl)
{
	t_stack	*stk = (t_stack*)malloc(sizeof(t_stack));
	t_vect	*edgs = (t_vect*)malloc(sizeof(t_vect));
	init_vector(edgs);
	stk->size = 0;
	int tag;
	int top;
	int cnt = 0;

	push(stk,x);
	g->visited[x] = cycl;
	while (stk->size > 0)
	{
		tag = 0;
		top = stk->top->val;
		for (int i = 0; i < g->rev_adj[top].used; i++)
		{
			if (g->visited[g->rev_adj[top].tab[i]] == 0)
			{
				g->visited[g->rev_adj[top].tab[i]] = cycl;
				push(stk, g->rev_adj[top].tab[i]);
				tag = 1;
			}
			else if (g->visited[g->rev_adj[top].tab[i]] == cycl)
				push_back(edgs, g->vertx * top + g->rev_adj[top].tab[i]);
		}
		if (!tag)
		{
			new->vrx_nb++;
			push_back(new->list,top);
			pop(stk);
		}
	}
	new->edg_nb = process_traversed(edgs);
	free(stk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x10, %edi
callq 0x1080
movq %rax, -0x28(%rbp)
movl $0x18, %edi
callq 0x1080
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2200
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x2080
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x149f
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movslq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x10(%rcx), %rax
jae 0x146f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x40(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x13fe
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x38(%rbp), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rcx
movq (%rcx), %rcx
movslq -0x40(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x2080
movl $0x1, -0x34(%rbp)
jmp 0x145f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x40(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jne 0x145d
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %esi
imull -0x38(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x38(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x40(%rbp), %rcx
addl (%rax,%rcx,4), %esi
callq 0x2330
jmp 0x145f
jmp 0x1461
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1356
cmpl $0x0, -0x34(%rbp)
jne 0x149a
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x38(%rbp), %esi
callq 0x2330
movq -0x28(%rbp), %rdi
callq 0x1ff0
jmp 0x132c
movq -0x30(%rbp), %rdi
callq 0x11b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq