LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_getsockopt
static int xpsocket_getsockopt(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *psz = luaL_checkstring(L, 2);
   int nOpt;
   void *opt = (void*)&nOpt;
   socklen_t size = sizeof nOpt;
   int err;

   const SockOpt *po = findSockOpt(psz);
   if (!po) {
      lua_pushnil(L);
      lua_pushstring(L, "xpio: unknown socket option");
      return 2;
   }

   if (po->category == SOCKOPT_SO) {
      err = getsockopt(me->s, po->level, po->name, opt, &size);
   } else if (po->category == SOCKOPT_NB) {
      err = getNonBlocking(me->s, &nOpt);
   } else {
      return pushError(L, "getsockopt: internal error");
   }
   if (err) {
      return pushError(L, NULL);
   }

   if (po->type == SOCKOPT_BOOL) {
      lua_pushboolean(L, nOpt);
   } else if (po->type == SOCKOPT_SIZE) {
      lua_pushnumber(L, (lua_Number) nOpt);
   }
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1a207(%rip), %rdx     # 0x1f950
leaq 0x118f5(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x4834
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7c9c
movq %rax, %r15
movl $0x4, 0xc(%rsp)
leaq 0x11c1b(%rip), %rsi     # 0x17399
leaq 0x1a2f3(%rip), %r12     # 0x1fa78
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
je 0x57b7
movq (%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0x5785
movq %rbx, %rdi
callq 0x6478
leaq 0x11bb5(%rip), %rsi     # 0x17362
movq %rbx, %rdi
callq 0x6526
jmp 0x582a
movl -0xc(%r12), %eax
cmpl $0x2, %eax
je 0x57e4
cmpl $0x1, %eax
jne 0x581b
movl (%r14), %edi
movl -0x8(%r12), %esi
movl -0x4(%r12), %edx
leaq 0x8(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x31f0
jmp 0x5810
movl (%r14), %edi
xorl %ebp, %ebp
movl $0x3, %esi
xorl %eax, %eax
callq 0x30e0
movl %eax, %ecx
movl %eax, %edx
shrl $0xb, %edx
andl $0x1, %edx
xorl %eax, %eax
cmpl $-0x1, %ecx
sete %al
cmovel %ebp, %edx
negl %eax
movl %edx, 0x8(%rsp)
testl %eax, %eax
je 0x583e
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x5825
leaq 0x11b5c(%rip), %rsi     # 0x1737e
movq %rbx, %rdi
callq 0x437c
movl $0x2, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl -0x10(%r12), %eax
movl $0x1, %ebp
cmpl $0x2, %eax
je 0x5860
cmpl $0x1, %eax
jne 0x582f
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x66f1
jmp 0x582f
cvtsi2sdl 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x648c
jmp 0x582f
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_setsockopt
static int xpsocket_setsockopt(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *optName = luaL_checkstring(L, 2);
   int nOpt;
   void *opt = (void*)&nOpt;
   int size = sizeof nOpt;
   int err;

   const SockOpt *po = findSockOpt(optName);
   if (!po) {
      lua_pushnil(L);
      lua_pushstring(L, "xpio: unknown socket option");
      return 2;
   }

   if (po->type == SOCKOPT_BOOL) {
      nOpt = lua_toboolean(L, 3);
   } else if (po->type == SOCKOPT_SIZE) {
      nOpt = checkUInt(L, 3);
   }

   if (po->category == SOCKOPT_SO) {
      err = setsockopt(me->s, po->level, po->name, opt, size);
   } else if (po->category == SOCKOPT_NB) {
      err = setNonBlocking(me->s, nOpt);
   } else {
      return pushError(L, "setsockopt: internal error");
   }
   if (err) {
      return pushError(L, NULL);
   }

   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1a0ca(%rip), %rdx     # 0x1f950
leaq 0x117b8(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x4834
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7c9c
movq %rax, %r15
leaq 0x11ae6(%rip), %rsi     # 0x17399
leaq 0x1a1be(%rip), %r12     # 0x1fa78
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
je 0x58ef
movq (%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0x58ba
movq %rbx, %rdi
callq 0x6478
leaq 0x11a80(%rip), %rsi     # 0x17362
movq %rbx, %rdi
callq 0x6526
jmp 0x5970
movl -0x10(%r12), %ecx
cmpl $0x2, %ecx
je 0x590d
cmpl $0x1, %ecx
jne 0x591e
movq %rbx, %rdi
movl $0x3, %esi
callq 0x62d0
jmp 0x591a
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4538
movl %eax, 0xc(%rsp)
movl -0xc(%r12), %ecx
cmpl $0x2, %ecx
je 0x594c
cmpl $0x1, %ecx
jne 0x5961
movl (%r14), %edi
movl -0x8(%r12), %esi
movl -0x4(%r12), %edx
leaq 0xc(%rsp), %rcx
movl $0x4, %r8d
callq 0x30c0
jmp 0x5956
movl (%r14), %edi
movl %eax, %esi
callq 0x43bb
testl %eax, %eax
je 0x5984
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x596b
leaq 0x11a76(%rip), %rsi     # 0x173de
movq %rbx, %rdi
callq 0x437c
movl $0x2, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x66f1
jmp 0x5975
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_shutdown
static int xpsocket_shutdown(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *flags = luaL_checkstring(L, 2);

   // POSIX fail: You might think that SHUT_RDWR == SHUT_RD|SHUT_WR, but you
   // would be wrong.

   int shutr = strchr(flags, 'r') != NULL;
   int shutw = strchr(flags, 'w') != NULL;
   if (shutr || shutw) {
      int shut = (shutr && shutw ? SHUT_RDWR :
                  shutr ? SHUT_RD :
                  SHUT_WR);
      if (shutdown(me->s, shut)) {
         return pushError(L, NULL);
      }
   }
   lua_pushboolean(L, 1);   // success
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x19fa3(%rip), %rdx     # 0x1f950
leaq 0x11691(%rip), %rcx     # 0x17045
movl $0x1, %ebx
movl $0x1, %esi
callq 0x4834
movq %rax, %r15
movl $0x2, %ebp
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7c9c
movq %rax, %r13
movq %rax, %rdi
movl $0x72, %esi
callq 0x3160
movq %rax, %r12
movq %r13, %rdi
movl $0x77, %esi
callq 0x3160
movq %r12, %rcx
orq %rax, %rcx
je 0x5a35
xorl %ecx, %ecx
testq %r12, %r12
sete %cl
testq %rax, %rax
cmovel %ecx, %ebp
testq %r12, %r12
cmovel %ecx, %ebp
movl (%r15), %edi
movl %ebp, %esi
callq 0x3130
testl %eax, %eax
je 0x5a35
movq %r14, %rdi
xorl %esi, %esi
callq 0x437c
movl $0x2, %ebx
jmp 0x5a42
movq %r14, %rdi
movl $0x1, %esi
callq 0x66f1
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_close
static int xpsocket_close(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   if (me->s != -1) {
      close(me->s);
      me->s = -1;
      lua_pushboolean(L, 1);
      return 1;
   } else {
      return pushError(L, "already closed");
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x19eee(%rip), %rdx     # 0x1f950
leaq 0x115dc(%rip), %rcx     # 0x17045
movl $0x1, %ebx
movl $0x1, %esi
callq 0x4834
movl (%rax), %edi
cmpl $-0x1, %edi
je 0x5a9d
movq %rax, %r15
callq 0x31c0
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0x1, %esi
callq 0x66f1
jmp 0x5ab1
leaq 0x11955(%rip), %rsi     # 0x173f9
movq %r14, %rdi
callq 0x437c
movl $0x2, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_getXname
static int xpsocket_getXname(lua_State *L, struct sockaddr_in* psin)
{
   unsigned char *pby = (unsigned char *) &psin->sin_addr;

   if (psin->sin_family != AF_INET) {
      lua_pushnil(L);
      lua_pushfstring(L, "xpio: unknown address family %d", &psin->sin_family);
      return 2;
   }

   lua_pushfstring(L, "%d.%d.%d.%d:%d",
                   (int) pby[0],
                   (int) pby[1],
                   (int) pby[2],
                   (int) pby[3],
                   (int) (unsigned short) htons(psin->sin_port));
   return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpw $0x2, (%rsi)
jne 0x5b32
movzbl 0x4(%r14), %edx
movzbl 0x5(%r14), %ecx
movzbl 0x6(%r14), %r8d
movzbl 0x7(%r14), %r9d
movzwl 0x2(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rsp)
leaq 0x11832(%rip), %rsi     # 0x17353
movq %rbx, %rdi
xorl %eax, %eax
callq 0x65c0
movl $0x1, %eax
jmp 0x5b53
movq %rbx, %rdi
callq 0x6478
leaq 0x117f2(%rip), %rsi     # 0x17333
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x65c0
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/push_swap.c
// Function: main
int	main (int argc, char **argv)
{
	t_stack	stack;
	t_aux	aux;

	if (argc == 1)
		return (0);
	argv = &argv[1];
	argc--;
	if (argc == 1)
		argv = check_string(&argc, argv);
	check_args(argc, argv);
	init_stacks(&stack);
	init(&stack, &aux, argc, argv);
	lets_sort(&stack, &aux);
	reduce_instructions(&stack.instr);
	ft_lstiter(stack.instr, &ft_putstr);
	clear(&stack, &aux);
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
cmpl $0x1, %edi
je 0x12ab
movq %rsi, %rbx
movl %edi, %r14d
addq $0x8, %rbx
decl %r14d
cmpl $0x1, %r14d
jne 0x11bf
movq (%rbx), %rdi
cmpb $0x0, (%rdi)
je 0x12bb
movl $0x20, %esi
callq 0x229c
movq %rax, %rbx
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
leaq 0x1(%r14), %r14
jne 0x11b1
decl %r14d
testl %r14d, %r14d
jle 0x124d
movl %r14d, %r15d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
movb (%rdi), %al
cmpb $0x2d, %al
jne 0x11f9
movb 0x1(%rdi), %al
movl $0x1, %r13d
testb %al, %al
jne 0x1200
callq 0x16cc
movq (%rbx,%r12,8), %rdi
movb 0x1(%rdi), %al
movl $0x1, %r13d
jmp 0x11fc
xorl %r13d, %r13d
testb %al, %al
je 0x1223
incq %r13
movsbl %al, %edi
callq 0x2288
testl %eax, %eax
jne 0x1214
callq 0x16cc
movq (%rbx,%r12,8), %rdi
movb (%rdi,%r13), %al
incq %r13
testb %al, %al
jne 0x1203
callq 0x21d4
ucomisd 0x1dd8(%rip), %xmm0     # 0x3008
ja 0x1240
movsd 0x1dd6(%rip), %xmm1     # 0x3010
ucomisd %xmm0, %xmm1
jbe 0x1245
callq 0x16cc
incq %r12
cmpq %r15, %r12
jne 0x11ce
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movapd %xmm0, -0x10(%r15)
movq $0x0, (%r15)
movq %rsp, %r12
leaq 0x18(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x1780
movq %r12, %rdi
movq %r13, %rsi
callq 0x14cb
movq %r15, %rdi
callq 0x1ad8
movq 0x10(%r12), %rdi
leaq 0x1369(%rip), %rsi      # 0x2604
callq 0x249c
movq %r12, %rdi
movq %r13, %rsi
callq 0x16e8
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %edi, %edi
callq 0x1060
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/operations.c
// Function: swap
void	swap(t_dlist **stack, t_list **instr, char id)
{
	t_dlist	*first;
	t_dlist	*second;

	if (*stack == NULL)
		return ;
	first = *stack;
	second = first->next;
	if (second == NULL)
		return ;
	first->next = second->next;
	first->previous = second;
	if (second->next)
		second->next->previous = first;
	second->next = first;
	second->previous = NULL;
	*stack = second;
	if (id == 'a')
		ft_lstadd_back(instr, ft_lstnew("sa\n"));
	else
		ft_lstadd_back(instr, ft_lstnew("sb\n"));
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1323
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x1323
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rcx, 0x10(%rax)
testq %rsi, %rsi
je 0x12ee
movq %rax, 0x10(%rsi)
movq %rax, 0x8(%rcx)
movq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
cmpb $0x61, %dl
leaq 0x1d11(%rip), %rax      # 0x3018
leaq 0x1d0e(%rip), %rdi      # 0x301c
cmoveq %rax, %rdi
callq 0x2404
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2430
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/operations.c
// Function: push
void	push(t_dlist **origin_stack, t_dlist **dest_stack,
		t_list **instr, char id)
{
	t_dlist	*origin;
	t_dlist	*dest;

	if (*origin_stack == NULL)
		return ;
	origin = *origin_stack;
	dest = *dest_stack;
	if (origin->next == NULL)
		*origin_stack = NULL;
	else
	{
		*origin_stack = origin->next;
		origin->next->previous = NULL;
	}
	if (dest == NULL)
		return (init_empty_stack(origin, instr, dest_stack, id));
	dest->previous = origin;
	origin->next = dest;
	*dest_stack = dest->previous;
	if (id == 'a')
		ft_lstadd_back(instr, ft_lstnew("pa\n"));
	else
		ft_lstadd_back(instr, ft_lstnew("pb\n"));
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1360
pushq %rbx
movq %rdx, %rbx
movq (%rsi), %rdx
leaq 0x8(%rax), %r8
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x134a
movq %r9, (%rdi)
movq (%r8), %rdi
addq $0x10, %rdi
movq $0x0, (%rdi)
testq %rdx, %rdx
je 0x1361
movq %rax, 0x10(%rdx)
movq %rdx, 0x8(%rax)
jmp 0x1368
retq
xorps %xmm0, %xmm0
movups %xmm0, (%r8)
movq %rax, (%rsi)
cmpb $0x61, %cl
leaq 0x1cab(%rip), %rax      # 0x3020
leaq 0x1ca8(%rip), %rdi      # 0x3024
cmoveq %rax, %rdi
callq 0x2404
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2430
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/operations.c
// Function: rotate
void	rotate(t_dlist **stack, t_list **instr, char id)
{
	t_dlist	*first;
	t_dlist	*last;

	if (*stack == NULL)
		return ;
	first = *stack;
	last = *stack;
	if (last->next == NULL)
		return ;
	first->next->previous = NULL;
	*stack = first->next;
	while (last->next != NULL)
		last = last->next;
	last->next = first;
	first->previous = last;
	first->next = NULL;
	if (id == 'a')
		ft_lstadd_back(instr, ft_lstnew("ra\n"));
	else
		ft_lstadd_back(instr, ft_lstnew("rb\n"));
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x13f6
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x13f6
pushq %rbx
movq %rsi, %rbx
movq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
movq %rax, %rsi
movq %rsi, %rcx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x13b4
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rax)
movq $0x0, 0x8(%rax)
cmpb $0x61, %dl
leaq 0x1c4f(%rip), %rax      # 0x3029
leaq 0x1c4d(%rip), %rdi      # 0x302e
cmoveq %rax, %rdi
callq 0x2404
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2430
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/operations.c
// Function: reverse_rotate
void	reverse_rotate(t_dlist **stack, t_list **instr, char id)
{
	t_dlist	*first;
	t_dlist	*last;

	if (*stack == NULL)
		return ;
	first = *stack;
	last = *stack;
	while (last->next != NULL)
		last = last->next;
	first->previous = last;
	last->next = first;
	last->previous->next = NULL;
	last->previous = NULL;
	*stack = last;
	if (id == 'a')
		ft_lstadd_back(instr, ft_lstnew("rra\n"));
	else
		ft_lstadd_back(instr, ft_lstnew("rrb\n"));
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1451
pushq %rbx
movq %rsi, %rbx
movq %rax, %rsi
movq %rsi, %rcx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x1406
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
xorl %esi, %esi
movq %rsi, 0x8(%rax)
movq %rsi, 0x10(%rcx)
movq %rcx, (%rdi)
cmpb $0x61, %dl
leaq 0x1bf3(%rip), %rax      # 0x3028
leaq 0x1bf1(%rip), %rdi      # 0x302d
cmoveq %rax, %rdi
callq 0x2404
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2430
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/sort.c
// Function: debug
void	debug(t_dlist *stack_a, t_dlist *stack_b)
{
	ft_putendl("stack_a");
	ft_dlstiter(stack_a, &ft_putnbr);
	ft_putendl("stack_b");
	ft_dlstiter(stack_b, &ft_putnbr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1bcc(%rip), %rdi      # 0x3032
callq 0x2634
leaq 0x11d6(%rip), %r15      # 0x2648
movq %r14, %rdi
movq %r15, %rsi
callq 0x2578
leaq 0x1bb6(%rip), %rdi      # 0x303a
callq 0x2634
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2578
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/sort.c
// Function: lets_sort
void	lets_sort(t_stack *stack, t_aux *aux)
{
	if (is_sorted(stack->a) && is_full(stack->a, aux->total_num))
		return ;
	if (ft_dlstsize(stack->a) <= 5)
		small_sort(stack, aux, ft_dlstsize(stack->a));
	else
	{
		send_half_to_b(stack, aux);
		return_half_to_a(stack, aux, aux->b.higher_index);
	}
	lets_sort(stack, aux);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0x14f4
movq %rdi, %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x14f4
movl (%rax), %edx
movq %rcx, %rax
cmpl (%rcx), %edx
jle 0x14e0
jmp 0x1509
movl 0x8(%rbx), %eax
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
decl %eax
testq %rcx, %rcx
jne 0x14fa
testl %eax, %eax
je 0x1545
callq 0x24f8
cmpl $0x5, %eax
jg 0x152a
movq (%r14), %rdi
callq 0x24f8
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1d80
jmp 0x14d5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1922
movl 0x1c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a60
jmp 0x14d5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/sort_aux.c
// Function: order_a
void	order_a(t_stack *stack, t_aux *aux)
{
	if (stack->a->index == 0)
		rotate(&stack->a, &stack->instr, 'a');
	while (((stack->a->index + 1) == (stack->a->next->index))
		&& ((stack->a->index - 1) == last_num_index(stack->a)))
		rotate(&stack->a, &stack->instr, 'a');
	if (((stack->a->index - 1) == last_num_index(stack->a)))
		rotate(&stack->a, &stack->instr, 'a');
	aux->a.next_index_to_sort = last_num_index(stack->a) + 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x4(%rax), %ecx
testl %ecx, %ecx
jne 0x15c0
leaq 0x10(%r14), %rsi
movq %r14, %rdi
movl $0x61, %edx
callq 0x1391
movq (%r14), %rax
movl 0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movq 0x8(%rax), %rsi
cmpl 0x4(%rsi), %edx
jne 0x1609
leaq 0x10(%r14), %r15
movq %rax, %rsi
movq %rsi, %rdx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x15d3
leal -0x1(%rcx), %esi
cmpl 0x4(%rdx), %esi
jne 0x1609
movq %r14, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1391
movq (%r14), %rax
movl 0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movq 0x8(%rax), %rsi
cmpl 0x4(%rsi), %edx
je 0x15d0
movq %rax, %rsi
movq %rsi, %rdx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x160c
decl %ecx
cmpl 0x4(%rdx), %ecx
jne 0x1633
leaq 0x10(%r14), %rsi
movq %r14, %rdi
movl $0x61, %edx
callq 0x1391
movq (%r14), %rax
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x1633
movl 0x4(%rcx), %eax
incl %eax
movl %eax, 0x14(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/quick_sort.c
// Function: quick_sort
void	quick_sort(int *array, int left, int right)
{
	int	index_pivot;

	if (left < right)
	{
		index_pivot = partition(array, left, right);
		quick_sort(array, left, index_pivot - 1);
		quick_sort(array, index_pivot + 1, right);
	}
}

// Assembly:
cmpl %edx, %esi
jge 0x16c9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movslq %edx, %r12
movslq %r14d, %rsi
movl (%r15,%rsi,4), %eax
movq %rsi, %rcx
movl 0x4(%r15,%rcx,4), %edx
cmpl %eax, %edx
jge 0x168f
movslq %r14d, %rdi
incl %r14d
movl 0x4(%r15,%rdi,4), %r8d
movl %r8d, 0x4(%r15,%rcx,4)
movl %edx, 0x4(%r15,%rdi,4)
incq %rcx
cmpq %rcx, %r12
jne 0x1671
movl (%r15,%rsi,4), %eax
movslq %r14d, %r14
movl (%r15,%r14,4), %ecx
movl %ecx, (%r15,%rsi,4)
movl %eax, (%r15,%r14,4)
leal -0x1(%r14), %edx
movq %r15, %rdi
callq 0x1650
incl %r14d
cmpl %ebx, %r14d
jl 0x1667
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/system.c
// Function: clear
void	clear(t_stack *stack, t_aux *aux)
{
	ft_dlstclear(&stack->a);
	ft_dlstclear(&stack->b);
	ft_lstclear(&stack->instr, &free);
	free(aux->ordered_array);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2548
leaq 0x8(%r14), %rdi
callq 0x2548
addq $0x10, %r14
movq 0x38c5(%rip), %rsi      # 0x4fd0
movq %r14, %rdi
callq 0x2460
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1070
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/choose_rotation.c
// Function: reverse_rotation_is_quicker
static int	calculate_rotation_steps(t_dlist *stack,
		int target_number, int steps)
{
	if (!stack)
		return (INT_MAX);
	if (stack->index == target_number)
		return (steps);
	if (!stack->next)
		return (INT_MAX);
	stack = stack->next;
	return (calculate_rotation_steps(stack, target_number, (steps + 1)));
}

// Assembly:
testq %rdi, %rdi
je 0x1747
xorl %ecx, %ecx
cmpl %esi, 0x4(%rdi)
je 0x174c
xorl %ecx, %ecx
movq %rdi, %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x1747
incl %ecx
cmpl %esi, 0x4(%rax)
jne 0x1735
jmp 0x174c
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x174c
xorl %edx, %edx
cmpl %esi, 0x4(%rax)
je 0x1778
xorl %edx, %edx
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x1773
incl %edx
cmpl %esi, 0x4(%rax)
jne 0x1761
jmp 0x1778
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %eax, %eax
cmpl %ecx, %edx
setb %al
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/init_stack_a.c
// Function: init_stack_a
void	init_stack_a(int argc, char **argv, t_dlist	**stack_a)
{
	int	number;
	int	i;

	i = 0;
	number = (int)ft_atoi(argv[i]);
	*stack_a = ft_dlstnew(number);
	while (i < (argc - 1))
	{
		i++;
		number = (int)ft_atoi(argv[i]);
		if (is_repeated(*stack_a, number))
			return_error();
		else
			ft_dlstadd_back(stack_a, ft_dlstnew(number));
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movq (%rsi), %rdi
callq 0x21d4
cvttsd2si %xmm0, %edi
callq 0x24c4
movq %rax, (%rbx)
cmpl $0x2, %r15d
jl 0x18f0
decl %r15d
xorl %r12d, %r12d
movq 0x8(%r14,%r12,8), %rdi
callq 0x21d4
cvttsd2si %xmm0, %edi
movq (%rbx), %rax
testq %rax, %rax
je 0x18d1
cmpl %edi, (%rax)
je 0x18e3
movq 0x8(%rax), %rax
jmp 0x18c2
callq 0x24c4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2514
jmp 0x18e8
callq 0x16cc
incq %r12
cmpq %r15, %r12
jne 0x18b1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/send_to_b.c
// Function: any_small_in_stack_a
int	any_small_in_stack_a(t_dlist *stack_a, t_aux *aux)
{
	while (stack_a != NULL)
	{
		if (stack_a->index <= aux->a.mid_index)
			if (stack_a->index >= aux->a.next_index_to_sort)
				return (1);
		stack_a = stack_a->next;
	}
	return (0);
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x191b
movl 0xc(%rsi), %ecx
movl 0x4(%rdi), %edx
cmpl %ecx, %edx
jg 0x1912
cmpl 0x14(%rsi), %edx
jge 0x191c
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x1906
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/send_to_b.c
// Function: send_half_to_b
void	send_half_to_b(t_stack *stack, t_aux *aux)
{
	int		size_a;

	init_values(stack, aux, &size_a);
	if ((aux->a.higher_index - aux->a.next_index_to_sort) < LAST_CHUNCK)
		while (stack->a->index > 0)
			send_to_b(stack, aux);
	else
		send_smallers_to_b(stack, aux, size_a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x24f8
movl %eax, %ebp
movabsq $0x7fffffff80000000, %rax # imm = 0x7FFFFFFF80000000
movq %rax, 0x1c(%r14)
movl 0x10(%r14), %edi
movl 0x14(%r14), %esi
callq 0x1550
movl %eax, 0xc(%r14)
movl 0x10(%r14), %eax
subl 0x14(%r14), %eax
cmpl $0x9, %eax
jle 0x1a0a
testl %ebp, %ebp
jle 0x1a13
leaq 0x10(%rbx), %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%rbx), %rax
testq %rax, %rax
je 0x19d3
movl 0xc(%r14), %ecx
movq %rax, %rdx
movl 0x4(%rdx), %esi
cmpl %ecx, %esi
jg 0x199b
cmpl 0x14(%r14), %esi
jge 0x19a6
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
jne 0x198e
jmp 0x19d3
cmpl %ecx, 0x4(%rax)
jle 0x19c0
movq %rbx, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1391
incl %r12d
jmp 0x19cb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a22
incl %r13d
cmpl %ebp, %r13d
jne 0x197f
cmpl $0x0, 0x14(%r14)
setne %al
testl %r12d, %r12d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1a13
movq %rbx, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x13f7
decl %r12d
jne 0x19e8
jmp 0x1a13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a22
movq (%rbx), %rax
cmpl $0x0, 0x4(%rax)
jg 0x19ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/send_to_b.c
// Function: send_to_b
static void	send_to_b(t_stack *stack, t_aux *aux)
{
	push(&stack->a, &stack->b, &stack->instr, 'b');
	if (stack->b->index > aux->b.higher_index)
		aux->b.higher_index = stack->b->index;
	if (stack->b->index < aux->b.lower_index)
		aux->b.lower_index = stack->b->index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
leaq 0x10(%rdi), %rdx
movl $0x62, %ecx
callq 0x1324
movq 0x8(%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x1c(%rbx), %eax
jle 0x1a4d
movl %eax, 0x1c(%rbx)
cmpl 0x20(%rbx), %eax
jge 0x1a55
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/return_to_a.c
// Function: return_half_to_a
void	return_half_to_a(t_stack *stack, t_aux *aux, int limit)
{
	int	size_b;

	size_b = ft_dlstsize(stack->b);
	if (size_b < 50)
	{
		finish_sorting(stack, aux);
		return ;
	}
	start_sorting(stack, aux);
	resend_to_b(stack, aux, limit);
	return_half_to_a(stack, aux, limit);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x24f8
cmpl $0x32, %eax
jl 0x1ac2
leaq 0x8(%r14), %r15
leaq 0x10(%r14), %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2107
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl %ebp, %eax
jg 0x1ab5
cmpl 0x14(%rbx), %eax
jl 0x1ab5
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x62, %ecx
callq 0x1324
jmp 0x1a91
movq (%r15), %rdi
callq 0x24f8
cmpl $0x32, %eax
jge 0x1a86
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1f90
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/small_sort.c
// Function: small_sort
void	small_sort(t_stack *stack, t_aux *aux, int total_numbers)
{
	int	first;
	int	second;
	int	last;

	(void)aux;
	if (is_sorted(stack->a) && is_full(stack->a, total_numbers))
		return ;
	if (ft_dlstsize(stack->a) == 2)
	{
		swap(&stack->a, &stack->instr, 'a');
		return ;
	}
	if (ft_dlstsize(stack->a) == 3)
	{
		define_numbers(&first, &second, &last, stack->a);
		sort_three(stack, &first, &second, &last);
		return_to_a(stack);
	}
	else
		send_to_b(stack, aux, total_numbers);
	small_sort(stack, aux, total_numbers);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x10(%rdi), %r14
leaq 0x8(%rdi), %r13
movq %rsi, 0x10(%rsp)
movq (%r15), %rdi
callq 0x1499
testl %eax, %eax
je 0x1dc5
movq (%r15), %rdi
movl 0xc(%rsp), %esi
callq 0x14b8
testl %eax, %eax
jne 0x1f7e
movq (%r15), %rdi
callq 0x24f8
cmpl $0x2, %eax
je 0x1f60
movq (%r15), %rdi
callq 0x24f8
movq (%r15), %rdi
cmpl $0x3, %eax
jne 0x1f1c
movl (%rdi), %ebp
movq 0x8(%rdi), %rax
movl (%rax), %ebx
movq %rdi, %rcx
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1df5
movl (%rax), %r12d
callq 0x1499
testl %eax, %eax
jne 0x1ea9
cmpl %ebx, %ebp
jle 0x1e25
cmpl %r12d, %ebp
setl %al
cmpl %ebx, %r12d
setl %cl
orb %al, %cl
jne 0x1e39
cmpl %ebx, %ebp
jge 0x1e49
cmpl %ebx, %r12d
setge %al
cmpl %r12d, %ebp
setge %cl
orb %al, %cl
jne 0x1e49
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x12c4
movq (%r15), %rax
movl (%rax), %ebx
movq 0x8(%rax), %rcx
movl (%rcx), %ebp
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x1e54
movl (%rcx), %r12d
cmpl %ebp, %ebx
jle 0x1e87
cmpl %ebp, %r12d
setle %al
cmpl %r12d, %ebx
setle %cl
orb %al, %cl
jne 0x1e87
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x1391
cmpl %ebp, %ebx
setl %al
cmpl %r12d, %ebx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1ea9
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x13f7
movq (%r13), %rax
testq %rax, %rax
movq 0x10(%rsp), %rbx
je 0x1da5
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x1edc
movl 0x4(%rax), %eax
cmpl 0x4(%rcx), %eax
jge 0x1edc
movq %r13, %rdi
movq %r14, %rsi
movl $0x62, %edx
callq 0x12c4
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x61, %ecx
callq 0x1324
movq (%r15), %rax
movl 0x4(%rax), %ecx
movq 0x8(%rax), %rax
cmpl 0x4(%rax), %ecx
jle 0x1f0e
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x12c4
movq (%r13), %rax
testq %rax, %rax
jne 0x1ebb
jmp 0x1da5
callq 0x24f8
cmpl $0x3, %eax
je 0x1da5
movq (%r15), %rax
cmpl $0x1, 0x4(%rax)
ja 0x1f4b
decl 0x10(%rbx)
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x62, %ecx
callq 0x1324
jmp 0x1f5b
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x1391
movq (%r15), %rdi
jmp 0x1f1c
movq %r15, %rdi
movq %r14, %rsi
movl $0x61, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12c4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: finish_sorting
void	finish_sorting(t_stack *stack, t_aux *aux)
{
	int	size_b;

	size_b = ft_dlstsize(stack->b);
	define_b_values(stack, aux);
	if (size_b == 0)
	{
		order_a(stack, aux);
		return ;
	}
	else if (size_b == 1)
		push(&stack->b, &stack->a, &stack->instr, 'a');
	else if (stack->b->index == aux->a.next_index_to_sort)
		send_next_smaller_to_a(stack, aux);
	else if (stack->b->index == aux->b.higher_index)
		send_next_bigger_to_a(stack, aux);
	else if (reverse_rotation_is_quicker(stack->b, aux->a.next_index_to_sort))
		reverse_rotate(&stack->b, &stack->instr, 'b');
	else
		rotate(&stack->b, &stack->instr, 'b');
	finish_sorting(stack, aux);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
movq (%r15), %rdi
callq 0x24f8
movl %eax, %ebp
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2070
cmpl $0x1, %ebp
je 0x1fe2
testl %ebp, %ebp
je 0x205d
movq (%r15), %rdi
movl 0x4(%rdi), %eax
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x1ff7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c8
jmp 0x1fa6
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x1324
jmp 0x1fa6
cmpl 0x1c(%rbx), %eax
jne 0x2035
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x1324
decl 0x1c(%rbx)
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x14(%rbx), %eax
jne 0x1fa6
movq %r14, %rdi
movq %r12, %rsi
movl $0x61, %edx
callq 0x1391
incl 0x14(%rbx)
jmp 0x1fa6
callq 0x1724
movq %r15, %rdi
movq %r12, %rsi
movl $0x62, %edx
testl %eax, %eax
je 0x2053
callq 0x13f7
jmp 0x1fa6
callq 0x1391
jmp 0x1fa6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1594
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: define_b_values
static void	define_b_values(t_stack *stack, t_aux *aux)
{
	t_dlist	*stack_b;

	stack_b = stack->b;
	aux->b.higher_index = INT_MIN;
	aux->b.lower_index = INT_MAX;
	while (stack_b)
	{
		if (stack_b->index > aux->b.higher_index)
			aux->b.higher_index = stack_b->index;
		if (stack_b->index < aux->b.lower_index)
			aux->b.lower_index = stack_b->index;
		stack_b = stack_b->next;
	}
	aux->b.mid_index = find_mid_index(aux->b.higher_index, aux->b.lower_index);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movabsq $0x7fffffff80000000, %rcx # imm = 0x7FFFFFFF80000000
movq %rcx, 0x1c(%rsi)
testq %rdi, %rdi
je 0x20b4
movq %rdi, %rax
movl $0x80000000, %edi       # imm = 0x80000000
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl 0x4(%rax), %ecx
cmpl %edi, %ecx
jle 0x20a0
movl %ecx, 0x1c(%rbx)
movl %ecx, %edi
cmpl %esi, %ecx
jge 0x20a9
movl %ecx, 0x20(%rbx)
movl %ecx, %esi
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x2094
jmp 0x20be
movl $0x80000000, %edi       # imm = 0x80000000
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x1550
movl %eax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: send_next_smaller_to_a
static void	send_next_smaller_to_a(t_stack *stack, t_aux *aux)
{
	push(&stack->b, &stack->a, &stack->instr, 'a');
	rotate(&stack->a, &stack->instr, 'a');
	aux->a.next_index_to_sort++;
	aux->b.lower_index++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
leaq 0x10(%r14), %r15
movq %r14, %rsi
movq %r15, %rdx
movl $0x61, %ecx
callq 0x1324
movq %r14, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1391
incl 0x14(%rbx)
incl 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: start_sorting
void	start_sorting(t_stack *stack, t_aux *aux)
{
	int	size_b;

	size_b = ft_dlstsize(stack->b);
	define_b_values(stack, aux);
	if (size_b == 0)
		return ;
	if ((stack->b->index > aux->b.mid_index) || (size_b == 1))
		push(&stack->b, &stack->a, &stack->instr, 'a');
	else if (stack->b->index == aux->a.next_index_to_sort)
		send_next_smaller_to_a(stack, aux);
	else if (reverse_rotation_is_quicker(stack->b, aux->a.next_index_to_sort))
		reverse_rotate(&stack->b, &stack->instr, 'b');
	else
		rotate(&stack->b, &stack->instr, 'b');
	start_sorting(stack, aux);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x24f8
movl %eax, %ebp
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x2070
testl %ebp, %ebp
je 0x21b7
leaq 0x8(%r14), %r15
leaq 0x10(%r14), %r12
movq (%r15), %rdi
movl 0x4(%rdi), %eax
cmpl 0x18(%rbx), %eax
setg %cl
cmpl $0x1, %ebp
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x216a
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x1324
jmp 0x219e
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x217e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c8
jmp 0x219e
callq 0x1724
movq %r15, %rdi
movq %r12, %rsi
movl $0x62, %edx
testl %eax, %eax
je 0x2199
callq 0x13f7
jmp 0x219e
callq 0x1391
movq (%r15), %rdi
callq 0x24f8
movl %eax, %ebp
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2070
testl %ebp, %ebp
jne 0x213c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_atoi.c
// Function: ft_atoi
double	ft_atoi(const char *nptr)
{
	double	number;
	int		sign;

	number = 0;
	sign = 1;
	while (atoi_isspace(*nptr))
		nptr++;
	if (*nptr == '-' || *nptr == '+')
	{
		if (*nptr == '-')
			sign *= -1;
		nptr++;
	}
	while (ft_isdigit(*nptr))
	{
		number *= 10;
		number += (*nptr - '0');
		nptr++;
	}
	number *= sign;
	return (number);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
incq %rbx
movb -0x1(%rbx), %al
movzbl %al, %ecx
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jb 0x21e0
cmpl $0x20, %ecx
je 0x21e0
cmpl $0x2b, %ecx
je 0x2200
cmpl $0x2d, %ecx
jne 0x221c
xorl %ecx, %ecx
cmpb $0x2d, %al
sete %cl
leaq 0xe5a(%rip), %rax       # 0x3068
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x10(%rbp)
movb (%rbx), %al
jmp 0x222c
decq %rbx
movsd 0xe51(%rip), %xmm0      # 0x3078
movsd %xmm0, -0x10(%rbp)
movsbl %al, %edi
callq 0x2288
testl %eax, %eax
je 0x2274
incq %rbx
xorpd %xmm1, %xmm1
mulsd 0xe39(%rip), %xmm1      # 0x3080
movsbl -0x1(%rbx), %eax
addl $-0x30, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsbl (%rbx), %edi
callq 0x2288
movsd -0x18(%rbp), %xmm1
incq %rbx
testl %eax, %eax
jne 0x223f
jmp 0x2278
xorpd %xmm1, %xmm1
movsd -0x10(%rbp), %xmm0
mulsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_split.c
// Function: ft_split
char	**ft_split(char const *s, char c)
{
	char		**str_array;
	t_split		split;

	split.words = word_count(s, c);
	str_array = (char **)malloc((split.words + 1) * sizeof(char *));
	if (!(str_array) || (!s))
		return (NULL);
	split.i = 0;
	split.i_array = 0;
	while (s[split.i] != '\0')
	{
		if (s[split.i] != c)
		{
			split.sub_length = sub_len(&s[split.i], c);
			str_array[split.i_array] = ft_substr(s, split.i, split.sub_length);
			if (!(str_array[split.i_array]))
				return (free_str_array(str_array));
			split.i_array++;
			split.i += split.sub_length - 1;
		}
		split.i++;
	}
	str_array[split.i_array] = NULL;
	return (str_array);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x8, %edi
testq %r14, %r14
je 0x2311
cmpb $0x0, (%r14)
je 0x2311
xorl %ecx, %ecx
xorl %eax, %eax
decq %rcx
movq %rcx, %rsi
movq %rsi, %rcx
movb 0x1(%r14,%rsi), %dl
incq %rsi
cmpb %bl, %dl
jne 0x22dc
testb %dl, %dl
jne 0x22c9
testb %dl, %dl
sete %dil
cmpb %bl, %dl
sete %r8b
orb %dil, %r8b
je 0x22f2
movq %rsi, %rcx
jmp 0x2305
movb 0x1(%r14,%rcx), %dl
incq %rcx
cmpb %bl, %dl
je 0x2302
testb %dl, %dl
jne 0x22f2
incq %rax
testb %dl, %dl
jne 0x22c3
leaq 0x8(,%rax,8), %rdi
callq 0x1050
movq %rax, %r15
xorl %eax, %eax
testq %r14, %r14
je 0x23c0
testq %r15, %r15
je 0x23c0
movb (%r14), %cl
xorl %r12d, %r12d
testb %cl, %cl
je 0x2389
movq %r14, %rax
xorl %esi, %esi
cmpb %bl, %cl
jne 0x2345
movq %rsi, %r13
jmp 0x2376
leaq -0x2(%rsi), %r13
movq $-0x1, %rdx
movb 0x1(%rax,%rdx), %cl
incq %r13
incq %rdx
testb %cl, %cl
je 0x2362
cmpb %bl, %cl
jne 0x2350
movq %r14, %rdi
callq 0x26f4
movq %rax, (%r15,%r12,8)
testq %rax, %rax
je 0x2396
incq %r12
leaq (%r14,%r13), %rax
incq %rax
incq %r13
movb (%rax), %cl
movq %r13, %rsi
testb %cl, %cl
jne 0x233c
movq $0x0, (%r15,%r12,8)
movq %r15, %rax
jmp 0x23c0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x23b6
movq %r15, %rbx
addq $0x8, %rbx
callq 0x1070
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x23a5
movq %r15, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_putstr_fd.c
// Function: ft_putstr_fd
void	ft_putstr_fd(char *s, int fd)
{
	if (!s)
		return ;
	while (*s != '\0')
	{
		ft_putchar_fd(*s, fd);
		s++;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2402
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
je 0x23fe
movl %esi, %ebx
incq %r14
movsbl %al, %edi
movl %ebx, %esi
callq 0x278c
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x23ea
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_lstnew.c
// Function: ft_lstnew
t_list	*ft_lstnew(void *content)
{
	t_list	*pointer;

	pointer = (t_list *)malloc(sizeof(t_list));
	if (!pointer)
		return (NULL);
	pointer->content = content;
	pointer->next = NULL;
	return (pointer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
callq 0x1050
testq %rax, %rax
je 0x2427
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_lstadd_back.c
// Function: ft_lstadd_back
void	ft_lstadd_back(t_list **lst, t_list *new)
{
	t_list	*aux;

	if (new == NULL)
		return ;
	if (*lst == NULL)
	{
		*lst = new;
		return ;
	}
	aux = ft_lstlast(*lst);
	aux->next = new;
}

// Assembly:
testq %rsi, %rsi
je 0x245e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x2455
movq %rax, %rdi
callq 0x27b0
movq %rax, %rdi
addq $0x8, %rdi
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_lstclear.c
// Function: ft_lstclear
void	ft_lstclear(t_list **lst, void (*del)(void *))
{
	t_list	*aux;
	t_list	*temp;

	aux = *lst;
	if (aux == NULL)
		return ;
	while (aux != NULL)
	{
		temp = aux->next;
		del(aux);
		aux = temp;
	}
	*lst = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x248e
movq %rsi, %r14
movq 0x8(%rdi), %r15
callq *%r14
movq %r15, %rdi
testq %r15, %r15
jne 0x2478
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_lstiter.c
// Function: ft_lstiter
void	ft_lstiter(t_list *lst, void (*f)(const char *))
{
	t_list	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux != NULL)
	{
		f(aux->content);
		aux = aux->next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x24c0
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
callq *%rbx
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x24ae
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstnew.c
// Function: ft_dlstnew
t_dlist	*ft_dlstnew(int content)
{
	t_dlist	*pointer;

	pointer = (t_dlist *)malloc(sizeof(t_dlist));
	if (!(pointer))
		return_error();
	pointer->content = content;
	pointer->next = NULL;
	pointer->previous = NULL;
	return (pointer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movl $0x18, %edi
callq 0x1050
movq %rax, %r14
testq %rax, %rax
jne 0x24e4
callq 0x16cc
movl %ebx, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstsize.c
// Function: ft_dlstsize
int	ft_dlstsize(t_dlist *lst)
{
	t_dlist	*aux;
	int		size;

	aux = lst;
	size = 0;
	while (aux != NULL)
	{
		size++;
		aux = aux->next;
	}
	return (size);
}

// Assembly:
testq %rdi, %rdi
je 0x2510
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
incl %eax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x2503
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstadd_back.c
// Function: ft_dlstadd_back
void	ft_dlstadd_back(t_dlist **lst, t_dlist *new)
{
	t_dlist	*aux;

	if (new == NULL)
		return ;
	if (*lst == NULL)
	{
		*lst = new;
		return ;
	}
	aux = ft_dlstlast(*lst);
	aux->next = new;
	new->previous = aux;
}

// Assembly:
testq %rsi, %rsi
je 0x2545
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x253c
movq %rax, %rdi
callq 0x27cc
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rbx)
jmp 0x253f
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstclear.c
// Function: ft_dlstclear
void	ft_dlstclear(t_dlist **lst)
{
	t_dlist	*aux;
	t_dlist	*temp;

	aux = *lst;
	if (aux == NULL)
		return ;
	while (aux != NULL)
	{
		temp = aux->next;
		free(aux);
		aux = temp;
	}
	*lst = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2572
movq 0x8(%rdi), %r14
callq 0x1070
movq %r14, %rdi
testq %r14, %r14
jne 0x255a
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstiter.c
// Function: ft_dlstiter
void	ft_dlstiter(t_dlist *lst, void (*f)(int))
{
	t_dlist	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux != NULL)
	{
		f(aux->content);
		ft_putchar('\n');
		aux = aux->next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x25a6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%r14), %edi
callq *%rbx
movl $0xa, %edi
callq 0x25e0
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x258a
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_dlstiter.c
// Function: ft_dlstiter_reverse
void	ft_dlstiter_reverse(t_dlist *lst, void (*f)(int))
{
	t_dlist	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux->next != NULL)
		aux = aux->next;
	while (aux != NULL)
	{
		f(aux->content);
		ft_putchar('\n');
		aux = aux->previous;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x25de
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x25b6
movl (%r14), %edi
callq *%rbx
movl $0xa, %edi
callq 0x25e0
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x25c2
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_putstr.c
// Function: ft_putstr
void	ft_putstr(char const *s)
{
	if (!s)
		return ;
	while (*s != '\0')
	{
		ft_putchar(*s);
		s++;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2632
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
je 0x262c
incq %rbx
movsbl %al, %edi
callq 0x25e0
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x261b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_putnbr.c
// Function: ft_putnbr
void	ft_putnbr(int nb)
{
	unsigned int	number;

	if (nb < 0)
	{
		number = nb * -1;
		ft_putchar('-');
	}
	else
	{
		number = nb;
	}
	if (number / 10 < 1)
	{
		ft_putchar(number + '0');
	}
	else
	{
		ft_putnbr(number / 10);
		ft_putnbr(number % 10);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xcccccccd, %r15d      # imm = 0xCCCCCCCD
testl %ebx, %ebx
jns 0x266a
negl %ebx
movl $0x2d, %edi
callq 0x25e0
cmpl $0x9, %ebx
jbe 0x268d
movl %ebx, %r14d
imulq %r15, %r14
shrq $0x23, %r14
movl %r14d, %edi
callq 0x2648
addl %r14d, %r14d
leal (%r14,%r14,4), %eax
subl %eax, %ebx
jmp 0x265a
orb $0x30, %bl
movsbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x25e0
nop
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_strnequ.c
// Function: ft_strnequ
int	ft_strnequ(char const *s1, char const *s2, size_t n)
{
	size_t	i;

	if (!s1 || !s2)
		return (0);
	i = 0;
	while ((s1[i] != '\0' || s2[i] != '\0') && i < n)
	{
		if (s1[i] != s2[i])
		{
			return (0);
		}
		i++;
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x26e9
xorl %ecx, %ecx
movl $0x1, %eax
movb (%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x26d3
cmpq %rdx, %rcx
jae 0x26ed
movb (%rsi,%rcx), %r9b
jmp 0x26e1
cmpq %rdx, %rcx
jae 0x26eb
movb (%rsi,%rcx), %r9b
testb %r9b, %r9b
je 0x26eb
incq %rcx
cmpb %r9b, %r8b
je 0x26bf
xorl %eax, %eax
popq %rbp
retq
movl $0x1, %eax
jmp 0x26eb
// File: /workspace/github_c_makefile_star2_O3/paulahemsi[P]push_swap/libraries/libft/ft_substr.c
// Function: ft_substr
char	*ft_substr(char const *s, unsigned int start, size_t len)
{
	size_t	i;
	char	*new_string;

	if (!s)
		return (NULL);
	new_string = (char *)malloc((len + 1) * sizeof(char));
	if (new_string == NULL)
		return (NULL);
	i = 0;
	while ((i < len) && ((start + i) < ft_strlen(s)) && (s[start + i] != '\0'))
	{
		new_string[i] = s[start + i];
		i++;
	}
	new_string[i] = '\0';
	return (new_string);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x276c
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq 0x1(%rdx), %rdi
callq 0x1050
testq %rax, %rax
je 0x276c
movq %rax, %rbx
testq %r14, %r14
je 0x2770
movl %r12d, %eax
movq %rax, -0x38(%rbp)
addq %r15, %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq -0x38(%rbp), %rax
leaq (%rax,%r12), %r13
movq %r15, %rdi
callq 0x27e8
cmpq %rax, %r13
jae 0x2773
movq -0x30(%rbp), %rax
movb (%rax,%r12), %al
testb %al, %al
je 0x2773
movb %al, (%rbx,%r12)
incq %r12
cmpq %r12, %r14
jne 0x273a
movq %r14, %r12
jmp 0x2773
xorl %ebx, %ebx
jmp 0x2778
xorl %r12d, %r12d
movb $0x0, (%rbx,%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop