// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/source/ant_flow.c
// Function: ant_flow
void			ant_flow(t_info *info)
{
	int		i;
	int		y;

	i = -1;
	y = -1;
	while (info->valid_indexes[++y][0] != EMPTY)
	{
		while (info->valid_indexes[y][++i] != EMPTY)
			info->rooms[info->valid_indexes[y][i]]->visited = 0;
		i = -1;
	}
	info->ants_at_start = info->ants;
	divide_to_paths(info, 0, 0, 0);
	info->ants_at_start = info->ants;
	print_turns(info);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1898(%rdi), %rax
movq (%rax), %rcx
cmpl $-0x1, (%rcx)
je 0x11f6
xorl %edx, %edx
movl (%rcx), %esi
cmpl $-0x1, %esi
je 0x11e9
movq 0x18a8(%rbx), %rdi
addq $0x4, %rcx
movslq %esi, %rsi
movq (%rdi,%rsi,8), %rsi
movl $0x0, 0x5c(%rsi)
movl (%rcx), %esi
addq $0x4, %rcx
cmpl $-0x1, %esi
jne 0x11d0
movq 0x8(%rax,%rdx,8), %rcx
incq %rdx
cmpl $-0x1, (%rcx)
jne 0x11be
movl 0x28(%rbx), %eax
movl %eax, 0x30(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x263c
movl 0x28(%rbx), %eax
movl 0x2c(%rbx), %ecx
movl %eax, 0x30(%rbx)
cmpl %eax, %ecx
jge 0x144d
xorl %r13d, %r13d
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movslq %r13d, %r14
movq (%rax,%r14,8), %rax
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movslq 0x44(%rax), %r12
testq %r12, %r12
jle 0x1337
incq %r12
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movq (%rax,%r14,8), %rdx
movslq -0x8(%rdx,%r12,4), %rax
movq (%rcx,%rax,8), %rax
cmpl $0x1, 0x5c(%rax)
jne 0x132a
movslq -0x4(%rdx,%r12,4), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl $0x0, 0x5c(%rcx)
jne 0x132a
movl 0x18(%rax), %edi
callq 0x458c
movq %rax, %r15
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq -0x4(%rax,%r12,4), %rax
movq (%rcx,%rax,8), %rax
movq 0x10(%rax), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3db2
movq %r15, %rdi
callq 0x1030
movq 0x1898(%rbx), %rcx
movq 0x18a8(%rbx), %rax
movq (%rcx,%r14,8), %rcx
movslq -0x8(%rcx,%r12,4), %rdx
movq (%rax,%rdx,8), %rdx
movl 0x18(%rdx), %edx
movslq -0x4(%rcx,%r12,4), %rsi
movq (%rax,%rsi,8), %rsi
movl %edx, 0x18(%rsi)
movslq -0x4(%rcx,%r12,4), %rdx
movl 0x103c(%rbx), %esi
xorl %edi, %edi
cmpl %esi, %edx
setne %dil
movq (%rax,%rdx,8), %rdx
movl %edi, 0x5c(%rdx)
cmpl %esi, -0x4(%rcx,%r12,4)
jne 0x1310
incl 0x2c(%rbx)
movslq -0x8(%rcx,%r12,4), %rdx
movq (%rax,%rdx,8), %rdx
xorl %esi, %esi
movl %esi, 0x5c(%rdx)
movslq -0x8(%rcx,%r12,4), %rcx
movq (%rax,%rcx,8), %rax
movl %esi, 0x18(%rax)
decq %r12
cmpq $0x1, %r12
jg 0x124a
cmpl $0x0, 0x30(%rbx)
jle 0x13fb
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movq 0x20(%rax), %rax
xorl %r12d, %r12d
movl (%rax,%r12), %edi
addq $0x4, %r12
cmpl $-0x1, %edi
je 0x1361
testl %edi, %edi
jle 0x13fb
callq 0x458c
movq %rax, %r15
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movq 0x10(%rax), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3db2
movq %r15, %rdi
callq 0x1030
movq 0x1898(%rbx), %rax
movq 0x18a8(%rbx), %rcx
movq (%rax,%r14,8), %rax
movslq (%rax), %rdx
movq (%rcx,%rdx,8), %rdx
movl $0x1, 0x5c(%rdx)
movslq (%rax), %rdx
movq (%rcx,%rdx,8), %rdx
movq 0x20(%rdx), %rsi
movl -0x4(%rsi,%r12), %esi
movl %esi, 0x18(%rdx)
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movq 0x20(%rax), %rax
movl $0xffffffff, -0x4(%rax,%r12) # imm = 0xFFFFFFFF
decl 0x30(%rbx)
incl %r13d
movl 0x2c(%rbx), %eax
cmpl 0x28(%rbx), %eax
je 0x1430
cmpl 0x1060(%rbx), %r13d
jne 0x1422
incl 0x1054(%rbx)
movl $0xa, %edi
callq 0x4624
xorl %r13d, %r13d
movl 0x2c(%rbx), %eax
cmpl 0x28(%rbx), %eax
jl 0x121e
jmp 0x144d
testl %r13d, %r13d
je 0x144d
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4624
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq