// File: /workspace/github_c_makefile_star2_O3/ffoissey[P]push_swap_42/srcs_push_swap/ft_algo500.c
// Function: ft_process_sort500
int			ft_process_sort500(t_stack *s)
{
	int		ret_a;
	int		ret_b;

	if (s->size_a < 4)
		ft_three_a(s);
	while (!ft_reposition(s, &ret_a, &ret_b, 1))
	{
		ft_divide_b_stack500(s, &ret_a, &ret_b);
		ft_reposition(s, &ret_a, &ret_b, 0);
		ft_divide_a_stack500(s, &ret_a, &ret_b);
		ft_process_sort500(s);
	}
	while (s->size_b)
		ft_cmd(ft_exec_push, s, "pa");
	ft_reposition(s, &ret_a, &ret_b, 1);
	return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x3, 0x20(%rdi)
ja 0x1b51
movq %rbx, %rdi
callq 0x26ac
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x209d
testl %eax, %eax
jne 0x1e83
leaq 0x4(%rsp), %r14
movq %rsp, %r15
leaq 0xf33(%rip), %r12       # 0x2ab0
leaq 0x2486(%rip), %r13      # 0x400a
cmpq $0x3, 0x28(%rbx)
ja 0x1b93
movq %rbx, %rdi
callq 0x27f0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x209d
movq 0x28(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1cf4
cmpl $0x0, (%rsp)
jne 0x1cf4
movq 0x8(%rbx), %rax
movq -0x10(%rax,%rsi,8), %rcx
movq -0x8(%rax,%rsi,8), %rbp
cmpq %rcx, %rbp
jge 0x1bf3
cmpq $0x2, %rsi
jne 0x1bd9
movq %rcx, %rbp
jmp 0x1bf3
leaq -0x2(%rsi), %rdx
movq %rcx, %rbp
movq -0x8(%rax,%rdx,8), %rcx
cmpq %rcx, (%rax,%rdx,8)
jge 0x1bf3
movq %rcx, %rbp
decq %rdx
jne 0x1bdd
movq 0x8(%rbx), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x2680
testl %eax, %eax
je 0x1cf4
movq 0x8(%rbx), %rdi
movq 0x28(%rbx), %rsi
movl $0x1, %edx
callq 0x1ed8
testl %eax, %eax
jne 0x1cf4
movq 0x20(%rbx), %rax
cmpq $0x2, %rax
jb 0x1c4d
movq (%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdx
cmpq -0x10(%rcx,%rax,8), %rdx
jle 0x1c4d
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
jmp 0x1cce
movq 0x8(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rax
cmpq %rbp, %rax
jl 0x1c75
cmpq -0x10(%rcx,%rdx,8), %rax
jge 0x1c75
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x239a(%rip), %rdx      # 0x400d
jmp 0x1cce
cmpq %rbp, %rax
jge 0x1cbd
leaq 0xf71(%rip), %rdi       # 0x2bf2
movq %rbx, %rsi
leaq 0x238e(%rip), %rdx      # 0x4019
callq 0x2343
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x1cd3
movq (%rbx), %rdi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21dc
testl %eax, %eax
je 0x1cd3
leaq 0xf41(%rip), %rdi       # 0x2bf2
movq %rbx, %rsi
leaq 0x235a(%rip), %rdx      # 0x4015
jmp 0x1cce
leaq 0xe98(%rip), %rdi       # 0x2b5c
movq %rbx, %rsi
leaq 0x235a(%rip), %rdx      # 0x4028
callq 0x2343
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
movq 0x28(%rbx), %rsi
cmpq $0x3, %rsi
ja 0x1bf3
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x209d
cmpq $0x3, 0x20(%rbx)
ja 0x1d13
movq %rbx, %rdi
callq 0x26ac
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x209d
movq 0x20(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1e60
cmpl $0x0, 0x4(%rsp)
jne 0x1e60
movq (%rbx), %rdi
callq 0x227f
movslq %eax, %rbp
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
movq %rbp, %rdx
callq 0x21fb
testl %eax, %eax
jne 0x1e60
movq 0x20(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1d04
movq (%rbx), %rdi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x2680
testl %eax, %eax
je 0x1d04
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
xorl %edx, %edx
callq 0x1ed8
testl %eax, %eax
jne 0x1d04
movq 0x28(%rbx), %rax
cmpq $0x2, %rax
jb 0x1db8
movq 0x8(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdx
cmpq -0x10(%rcx,%rax,8), %rdx
jge 0x1db8
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x2257(%rip), %rdx      # 0x400d
jmp 0x1e35
movq (%rbx), %rcx
movq 0x20(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rax
cmpq %rbp, %rax
jge 0x1ddb
cmpq -0x10(%rcx,%rdx,8), %rax
jle 0x1ddb
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
jmp 0x1e35
cmpq %rbp, %rax
jge 0x1df3
leaq 0xd75(%rip), %rdi       # 0x2b5c
movq %rbx, %rsi
leaq 0x223a(%rip), %rdx      # 0x402b
jmp 0x1e35
leaq 0xdf8(%rip), %rdi       # 0x2bf2
movq %rbx, %rsi
leaq 0x2211(%rip), %rdx      # 0x4015
callq 0x2343
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x1e3a
movq 0x8(%rbx), %rdi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21fb
testl %eax, %eax
je 0x1e3a
leaq 0xdc7(%rip), %rdi       # 0x2bf2
movq %rbx, %rsi
leaq 0x21e4(%rip), %rdx      # 0x4019
callq 0x2343
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
movq 0x20(%rbx), %rsi
cmpq $0x3, %rsi
ja 0x1d68
jmp 0x1d04
movq %rbx, %rdi
callq 0x1b34
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
testl %eax, %eax
je 0x1b84
cmpq $0x0, 0x28(%rbx)
je 0x1ead
leaq 0xccb(%rip), %r14       # 0x2b5c
leaq 0x2190(%rip), %r15      # 0x4028
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2343
cmpq $0x0, 0x28(%rbx)
jne 0x1e98
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x209d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop