// File: /workspace/github_c_makefile_star2_O0/MikeyLHolm[P]Hive-lem-in/source/sort_paths.c
// Function: swap_paths
void	swap_paths(t_info *info, int top, int stack)
{
	int		i;
	int		swap[513];

	i = -1;
	while (++i < 513)
		swap[i] = EMPTY;
	i = -1;
	while (stack == 1 && ++i < 513)
		swap[i] = info->valid_indexes[top][i];
	i = -1;
	while (stack == 1 && ++i < 513)
		info->valid_indexes[top][i] = info->valid_indexes[top + 1][i];
	i = -1;
	while (stack == 1 && ++i < 513)
		info->valid_indexes[top + 1][i] = swap[i];
	i = -1;
	while (stack == 2 && ++i < 513)
		swap[i] = info->valid_indexes_2[top][i];
	i = -1;
	while (stack == 2 && ++i < 513)
		info->valid_indexes_2[top][i] = info->valid_indexes_2[top + 1][i];
	i = -1;
	while (stack == 2 && ++i < 513)
		info->valid_indexes_2[top + 1][i] = swap[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7b0, %rsp            # imm = 0x7B0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
jge 0x660d
movslq -0x14(%rbp), %rax
movl $0xffffffff, -0x820(%rbp,%rax,4) # imm = 0xFFFFFFFF
jmp 0x65ec
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x1, -0x10(%rbp)
movb %al, -0x821(%rbp)
jne 0x6639
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x821(%rbp)
movb -0x821(%rbp), %al
testb $0x1, %al
jne 0x6645
jmp 0x666c
movq -0x8(%rbp), %rax
movq 0x1898(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x14(%rbp), %rax
movl %ecx, -0x820(%rbp,%rax,4)
jmp 0x6614
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x1, -0x10(%rbp)
movb %al, -0x822(%rbp)
jne 0x6698
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x822(%rbp)
movb -0x822(%rbp), %al
testb $0x1, %al
jne 0x66a4
jmp 0x66df
movq -0x8(%rbp), %rax
movq 0x1898(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x1898(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x6673
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x1, -0x10(%rbp)
movb %al, -0x823(%rbp)
jne 0x670b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x823(%rbp)
movb -0x823(%rbp), %al
testb $0x1, %al
jne 0x6717
jmp 0x6743
movslq -0x14(%rbp), %rax
movl -0x820(%rbp,%rax,4), %edx
movq -0x8(%rbp), %rax
movq 0x1898(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x66e6
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x2, -0x10(%rbp)
movb %al, -0x824(%rbp)
jne 0x676f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x824(%rbp)
movb -0x824(%rbp), %al
testb $0x1, %al
jne 0x677b
jmp 0x67a2
movq -0x8(%rbp), %rax
movq 0x18a0(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x14(%rbp), %rax
movl %ecx, -0x820(%rbp,%rax,4)
jmp 0x674a
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x2, -0x10(%rbp)
movb %al, -0x825(%rbp)
jne 0x67ce
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x825(%rbp)
movb -0x825(%rbp), %al
testb $0x1, %al
jne 0x67da
jmp 0x6815
movq -0x8(%rbp), %rax
movq 0x18a0(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x18a0(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x67a9
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x2, -0x10(%rbp)
movb %al, -0x826(%rbp)
jne 0x6841
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x201, %eax            # imm = 0x201
setl %al
movb %al, -0x826(%rbp)
movb -0x826(%rbp), %al
testb $0x1, %al
jne 0x684d
jmp 0x6879
movslq -0x14(%rbp), %rax
movl -0x820(%rbp,%rax,4), %edx
movq -0x8(%rbp), %rax
movq 0x18a0(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x681c
addq $0x7b0, %rsp            # imm = 0x7B0
popq %rbp
retq
nopw %cs:(%rax,%rax)