// File: /workspace/github_c_makefile_star2_O3/ffoissey[P]push_swap_42/srcs_push_swap/ft_algo.c
// Function: ft_process_sort
int			ft_process_sort(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_stack(s, &ret_a, &ret_b);
		ft_reposition(s, &ret_a, &ret_b, 0);
		ft_divide_a_stack(s, &ret_a, &ret_b);
		ft_process_sort(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 0x17f9
movq %rbx, %rdi
callq 0x26ac
movq %rsp, %rsi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x209d
testl %eax, %eax
jne 0x1ae1
leaq 0x4(%rsp), %r15
leaq 0x13d0(%rip), %r12      # 0x2bf2
leaq 0x27f0(%rip), %r13      # 0x4019
cmpq $0x3, 0x28(%rbx)
ja 0x1838
movq %rbx, %rdi
callq 0x27f0
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x209d
movq 0x28(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1951
cmpl $0x0, 0x4(%rsp)
jne 0x1951
movq 0x8(%rbx), %rdi
callq 0x221a
movq 0x28(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1927
movslq %eax, %rbp
movq 0x8(%rbx), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x2680
movq 0x28(%rbx), %rsi
testl %eax, %eax
je 0x1927
movq 0x8(%rbx), %rdi
movl $0x1, %edx
callq 0x1ed8
movq 0x28(%rbx), %rsi
testl %eax, %eax
jne 0x1927
movq 0x8(%rbx), %rax
cmpq %rbp, -0x8(%rax,%rsi,8)
jge 0x18f0
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2343
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x1906
movq (%rbx), %rdi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21dc
testl %eax, %eax
je 0x1906
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x2727(%rip), %rdx      # 0x4015
jmp 0x1901
leaq 0x1265(%rip), %rdi      # 0x2b5c
movq %rbx, %rsi
leaq 0x2727(%rip), %rdx      # 0x4028
callq 0x2343
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
movq 0x28(%rbx), %rsi
cmpq $0x3, %rsi
ja 0x187b
movq 0x8(%rbx), %rdi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21dc
testl %eax, %eax
jne 0x1951
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2343
movq 0x8(%rbx), %rdi
movq 0x28(%rbx), %rsi
jmp 0x192b
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x209d
cmpq $0x3, 0x20(%rbx)
ja 0x1974
movq %rbx, %rdi
callq 0x26ac
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x209d
movq 0x20(%rbx), %rsi
cmpq $0x4, %rsi
jb 0x1abe
cmpl $0x0, (%rsp)
jne 0x1abe
movq (%rbx), %rdi
callq 0x227f
movq 0x20(%rbx), %rsi
movl $0x1, %r14d
cmpq $0x4, %rsi
jb 0x1954
movslq %eax, %rbp
movq (%rbx), %rdi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x2680
testl %eax, %eax
je 0x1ab3
movq (%rbx), %rdi
movq 0x20(%rbx), %rsi
xorl %edx, %edx
callq 0x1ed8
testl %eax, %eax
jne 0x1ab3
movq (%rbx), %rcx
movq 0x20(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rax
cmpq %rbp, %rax
jge 0x1a38
cmpq -0x10(%rcx,%rdx,8), %rax
jle 0x1a38
leaq 0x10af(%rip), %rdi      # 0x2ab0
movq %rbx, %rsi
leaq 0x25ff(%rip), %rdx      # 0x400a
callq 0x2343
movl $0x1, %r14d
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
movq 0x20(%rbx), %rsi
cmpq $0x3, %rsi
ja 0x19b7
jmp 0x1954
cmpq %rbp, %rax
jge 0x1a74
leaq 0x1118(%rip), %rdi      # 0x2b5c
movq %rbx, %rsi
leaq 0x25dd(%rip), %rdx      # 0x402b
callq 0x2343
movq 0x8(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21dc
testl %eax, %eax
jne 0x1a10
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
jmp 0x1a4e
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x2594(%rip), %rdx      # 0x4015
callq 0x2343
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x1a10
movq 0x8(%rbx), %rdi
movq -0x8(%rdi,%rsi,8), %rdx
callq 0x21fb
testl %eax, %eax
je 0x1a10
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
jmp 0x1a0b
movl $0x1, %r14d
jmp 0x1954
movq %rbx, %rdi
callq 0x17dc
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x209d
testl %eax, %eax
je 0x1829
cmpq $0x0, 0x28(%rbx)
je 0x1b0b
leaq 0x106d(%rip), %r14      # 0x2b5c
leaq 0x2532(%rip), %r15      # 0x4028
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2343
cmpq $0x0, 0x28(%rbx)
jne 0x1af6
movq %rsp, %rsi
leaq 0x4(%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