LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_bind
static int xpsocket_bind(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *addr = luaL_checkstring(L, 2);
   struct sockaddr_in sin;

   if (addrFromString(&sin, addr)) {
      return pushError(L, "xpio: mal-formed address argument");
   }
   if (bind(me->s, (struct sockaddr *) &sin, sizeof(sin))) {
      return pushError(L, NULL);
   }

   lua_pushboolean(L, 1);   // success
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x1a66f(%rip), %rdx     # 0x1f950
leaq 0xfd5d(%rip), %rcx      # 0x15045
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x465c
movq %rax, %r15
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x77e4
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x3c1b
testl %eax, %eax
je 0x5323
leaq 0x10008(%rip), %rsi     # 0x15326
movq %rbx, %rdi
jmp 0x533c
movl (%r15), %edi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x3350
movq %rbx, %rdi
testl %eax, %eax
je 0x534e
xorl %esi, %esi
callq 0x4204
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %esi
callq 0x62bd
movl %r14d, %ebp
jmp 0x5341
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_listen
static int xpsocket_listen(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);

   int nargs = lua_gettop(L);
   int backlog = 10;

   if (nargs > 1) {
      backlog = checkUInt(L, 2);
   }

   if (listen(me->s, backlog)) {
      return pushError(L, NULL);
   }

   lua_pushboolean(L, 1);   // success
   return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1a5e6(%rip), %rdx     # 0x1f950
leaq 0xfcd4(%rip), %rcx      # 0x15045
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x465c
movq %rax, %r15
movq %r14, %rdi
callq 0x59a3
cmpl $0x2, %eax
jl 0x539a
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x4369
movl %eax, %esi
jmp 0x539d
pushq $0xa
popq %rsi
movl (%r15), %edi
callq 0x32e0
movq %r14, %rdi
testl %eax, %eax
je 0x53b8
xorl %esi, %esi
callq 0x4204
pushq $0x2
popq %rbx
jmp 0x53bf
movl %ebx, %esi
callq 0x62bd
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_getsockname
static int xpsocket_getsockname(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   struct sockaddr_in sin;
   socklen_t len = sizeof(sin);
   if (getsockname(me->s, (struct sockaddr*) &sin, &len))
      return pushError(L, NULL);
   return xpsocket_getXname(L, &sin);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x1a57a(%rip), %rdx     # 0x1f950
leaq 0xfc68(%rip), %rcx      # 0x15045
pushq $0x1
popq %rsi
callq 0x465c
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
movl (%rax), %edi
leaq 0x10(%rsp), %rsi
callq 0x3390
testl %eax, %eax
je 0x540f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4204
pushq $0x2
popq %rax
jmp 0x541c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x57da
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_getpeername
static int xpsocket_getpeername(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   struct sockaddr_in sin;
   socklen_t len = sizeof(sin);
   if (getpeername(me->s, (struct sockaddr *) &sin, &len))
      return pushError(L, NULL);
   return xpsocket_getXname(L, &sin);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x1a51f(%rip), %rdx     # 0x1f950
leaq 0xfc0d(%rip), %rcx      # 0x15045
pushq $0x1
popq %rsi
callq 0x465c
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
movl (%rax), %edi
leaq 0x10(%rsp), %rsi
callq 0x3110
testl %eax, %eax
je 0x546a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4204
pushq $0x2
popq %rax
jmp 0x5477
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x57da
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1a4bd(%rip), %rdx     # 0x1f950
leaq 0xfbab(%rip), %rcx      # 0x15045
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x465c
movq %rax, %r12
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x77e4
movl $0x4, 0xc(%rsp)
movq %rax, %rdi
callq 0x5849
testq %rax, %rax
je 0x54fa
movq %rax, %r15
movl 0xc(%rax), %eax
cmpl $0x2, %eax
je 0x5513
cmpl $0x1, %eax
jne 0x554b
movl (%r12), %edi
movl 0x10(%r15), %esi
movl 0x14(%r15), %edx
leaq 0x8(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x31f0
jmp 0x5540
movq %rbx, %rdi
callq 0x604b
leaq 0xfe6e(%rip), %rsi      # 0x15377
movq %rbx, %rdi
callq 0x60f6
jmp 0x5589
movl (%r12), %edi
xorl %r12d, %r12d
pushq $0x3
popq %rsi
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 %r12d, %edx
negl %eax
movl %edx, 0x8(%rsp)
testl %eax, %eax
je 0x555c
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x5555
leaq 0xfe41(%rip), %rsi      # 0x15393
movq %rbx, %rdi
callq 0x4204
jmp 0x5589
movl 0x8(%r15), %eax
cmpl $0x2, %eax
je 0x5578
cmpl $0x1, %eax
jne 0x5586
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x62bd
jmp 0x5586
cvtsi2sdl 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x605c
movl %r14d, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
leaq 0x1a3a2(%rip), %rdx     # 0x1f950
leaq 0xfa90(%rip), %rcx      # 0x15045
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x465c
movq %rax, %r15
pushq $0x2
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x77e4
movq %rax, %rdi
callq 0x5849
testq %rax, %rax
je 0x55fb
movq %rax, %r12
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0x5614
cmpl $0x1, %ecx
jne 0x5623
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x5ec3
jmp 0x561f
movq %r14, %rdi
callq 0x604b
leaq 0xfd6d(%rip), %rsi      # 0x15377
movq %r14, %rdi
callq 0x60f6
jmp 0x567e
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x4369
movl %eax, 0xc(%rsp)
movl 0xc(%r12), %ecx
cmpl $0x2, %ecx
je 0x564f
cmpl $0x1, %ecx
jne 0x5664
movl (%r15), %edi
movl 0x10(%r12), %esi
movl 0x14(%r12), %edx
leaq 0xc(%rsp), %rcx
pushq $0x4
popq %r8
callq 0x30c0
jmp 0x5659
movl (%r15), %edi
movl %eax, %esi
callq 0x4243
movq %r14, %rdi
testl %eax, %eax
je 0x5675
xorl %esi, %esi
jmp 0x566e
leaq 0xfd88(%rip), %rsi      # 0x153f3
movq %r14, %rdi
callq 0x4204
jmp 0x567e
movl %ebp, %esi
callq 0x62bd
movl %ebp, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1a2ae(%rip), %rdx     # 0x1f950
leaq 0xf99c(%rip), %rcx      # 0x15045
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x465c
movq %rax, %r15
pushq $0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x77e4
movq %rax, %r13
pushq $0x72
popq %rsi
movq %rax, %rdi
callq 0x3160
movq %rax, %r12
pushq $0x77
popq %rsi
movq %r13, %rdi
callq 0x3160
movq %r12, %rcx
orq %rax, %rcx
je 0x5719
xorl %ecx, %ecx
testq %r12, %r12
sete %cl
testq %rax, %rax
movl %ecx, %esi
cmovnel %ebp, %esi
testq %r12, %r12
cmovel %ecx, %esi
movl (%r15), %edi
callq 0x3130
testl %eax, %eax
je 0x5719
movq %r14, %rdi
xorl %esi, %esi
callq 0x4204
movl %ebp, %ebx
jmp 0x5723
movq %r14, %rdi
movl %ebx, %esi
callq 0x62bd
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_O2/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 0x1a20d(%rip), %rdx     # 0x1f950
leaq 0xf8fb(%rip), %rcx      # 0x15045
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x465c
movl (%rax), %edi
cmpl $-0x1, %edi
je 0x5773
movq %rax, %r15
callq 0x31c0
orl $-0x1, (%r15)
movq %r14, %rdi
movl %ebx, %esi
callq 0x62bd
jmp 0x5785
leaq 0xfc94(%rip), %rsi      # 0x1540e
movq %r14, %rdi
callq 0x4204
pushq $0x2
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5822
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 0xfb54(%rip), %rsi      # 0x15368
movq %rbx, %rdi
xorl %eax, %eax
callq 0x618d
pushq $0x1
jmp 0x5840
movq %rbx, %rdi
callq 0x604b
leaq 0xfb17(%rip), %rsi      # 0x15348
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x618d
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpl $0x1, %edi
je 0x1288
movq %rsi, %rbx
movl %edi, %r14d
addq $0x8, %rbx
decl %r14d
cmpl $0x1, %r14d
jne 0x11ae
movq (%rbx), %rdi
cmpb $0x0, (%rdi)
je 0x1299
pushq $0x20
popq %rsi
callq 0x2204
movq %rax, %rbx
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
leaq 0x1(%r14), %r14
jne 0x11a0
decl %r14d
xorl %r15d, %r15d
testl %r14d, %r14d
movl $0x0, %r12d
cmovgl %r14d, %r12d
pushq $0x1
popq %r13
cmpq %r12, %r15
je 0x122d
movq (%rbx,%r15,8), %rax
cmpb $0x2d, (%rax)
jne 0x11e3
cmpb $0x0, 0x1(%rax)
movq %r13, %rbp
jne 0x11fa
callq 0x1668
movq %r13, %rbp
jmp 0x11fa
xorl %ebp, %ebp
jmp 0x11fa
movl %eax, %edi
callq 0x21f0
testl %eax, %eax
jne 0x11f7
callq 0x1668
incq %rbp
movq (%rbx,%r15,8), %rdi
movsbl (%rdi,%rbp), %eax
testl %eax, %eax
jne 0x11e7
callq 0x2140
ucomisd 0x1df5(%rip), %xmm0     # 0x3008
ja 0x1223
movsd 0x1df3(%rip), %xmm1     # 0x3010
ucomisd %xmm0, %xmm1
jbe 0x1228
callq 0x1668
incq %r15
jmp 0x11c2
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movapd %xmm0, -0x10(%r15)
andq $0x0, (%r15)
movq %rsp, %r12
leaq 0x20(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x170c
movq %r12, %rdi
movq %r13, %rsi
callq 0x1499
movq %r15, %rdi
callq 0x1a38
movq 0x10(%r12), %rdi
leaq 0x12d4(%rip), %rsi      # 0x254c
callq 0x23d0
movq %r12, %rdi
movq %r13, %rsi
callq 0x1680
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O2/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 0x12fc
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x12fc
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rcx, 0x10(%rax)
testq %rsi, %rsi
je 0x12ca
movq %rax, 0x10(%rsi)
movq %rax, 0x8(%rcx)
andq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
cmpb $0x61, %dl
leaq 0x1d38(%rip), %rax      # 0x3018
leaq 0x1d35(%rip), %rdi      # 0x301c
cmoveq %rax, %rdi
callq 0x2340
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2368
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1336
pushq %rbx
movq %rdx, %rbx
movq (%rsi), %rdx
leaq 0x8(%rax), %r8
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x1323
movq %r9, (%rdi)
movq (%r8), %rdi
addq $0x10, %rdi
andq $0x0, (%rdi)
testq %rdx, %rdx
je 0x1337
movq %rax, 0x10(%rdx)
movq %rdx, 0x8(%rax)
jmp 0x133e
retq
xorps %xmm0, %xmm0
movups %xmm0, (%r8)
movq %rax, (%rsi)
cmpb $0x61, %cl
leaq 0x1cd5(%rip), %rax      # 0x3020
leaq 0x1cd2(%rip), %rdi      # 0x3024
cmoveq %rax, %rdi
callq 0x2340
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2368
// File: /workspace/github_c_makefile_star2_O2/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 0x13c6
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x13c6
pushq %rbx
movq %rsi, %rbx
andq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
movq %rax, %rsi
movq %rsi, %rcx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x1387
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rax)
andq $0x0, 0x8(%rax)
cmpb $0x61, %dl
leaq 0x1c7f(%rip), %rax      # 0x3029
leaq 0x1c7d(%rip), %rdi      # 0x302e
cmoveq %rax, %rdi
callq 0x2340
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2368
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1421
pushq %rbx
movq %rsi, %rbx
movq %rax, %rsi
movq %rsi, %rcx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x13d6
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
andq $0x0, 0x8(%rax)
andq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
cmpb $0x61, %dl
leaq 0x1c23(%rip), %rax      # 0x3028
leaq 0x1c21(%rip), %rdi      # 0x302d
cmoveq %rax, %rdi
callq 0x2340
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2368
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x1bfc(%rip), %rdi      # 0x3032
callq 0x2574
leaq 0x1146(%rip), %r15      # 0x2588
movq %r14, %rdi
movq %r15, %rsi
callq 0x24a8
leaq 0x1be6(%rip), %rdi      # 0x303a
callq 0x2574
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x24a8
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %r15
movq %r15, %rdi
callq 0x1469
testl %eax, %eax
je 0x14c2
movl 0x8(%rbx), %esi
movq %r15, %rdi
callq 0x1486
testl %eax, %eax
jne 0x1501
movq %r15, %rdi
callq 0x242c
cmpl $0x5, %eax
jg 0x14e6
movq (%r14), %rdi
callq 0x242c
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1cc0
jmp 0x14a4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18a6
movl 0x1c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19c4
jmp 0x14a4
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpl $0x0, 0x4(%rax)
jne 0x1574
leaq 0x10(%r14), %rsi
pushq $0x61
popq %rdx
movq %r14, %rdi
callq 0x1367
leaq 0x10(%r14), %r15
pushq $0x61
popq %rbp
movq (%r14), %r12
movl 0x4(%r12), %r13d
leal 0x1(%r13), %eax
movq 0x8(%r12), %rcx
decl %r13d
cmpl 0x4(%rcx), %eax
jne 0x15b0
movq %r12, %rdi
callq 0x153b
cmpl %eax, %r13d
jne 0x15b0
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x1367
jmp 0x157b
movq %r12, %rdi
callq 0x153b
cmpl %eax, %r13d
jne 0x15ce
pushq $0x61
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1367
movq (%r14), %r12
movq %r12, %rdi
callq 0x153b
incl %eax
movl %eax, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movslq %edx, %r15
cmpl %ebx, %esi
jge 0x165b
movslq %esi, %rax
movl (%r14,%rax,4), %ecx
movq %rax, %rdx
movl %esi, %edi
movslq %edi, %r12
cmpq %rdx, %r15
je 0x1636
movl 0x4(%r14,%rdx,4), %r8d
incq %rdx
cmpl %ecx, %r8d
jge 0x160c
leal 0x1(%r12), %edi
movl 0x4(%r14,%r12,4), %r9d
movl %r9d, (%r14,%rdx,4)
movl %r8d, 0x4(%r14,%r12,4)
jmp 0x160c
movl (%r14,%rax,4), %ecx
movl (%r14,%r12,4), %edx
movl %edx, (%r14,%rax,4)
movl %ecx, (%r14,%r12,4)
leal -0x1(%r12), %edx
movq %r14, %rdi
callq 0x15ec
incl %r12d
movl %r12d, %esi
jmp 0x15fc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x2478
leaq 0x8(%r14), %rdi
callq 0x2478
addq $0x10, %r14
movq 0x392d(%rip), %rsi      # 0x4fd0
movq %r14, %rdi
callq 0x2398
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1060
nop
// File: /workspace/github_c_makefile_star2_O2/paulahemsi[P]push_swap/./source/choose_rotation.c
// Function: reverse_rotation_is_quicker
int	reverse_rotation_is_quicker(t_dlist *stack, int target_number)
{
	int	rotation_steps;
	int	reverse_rotation_steps;

	rotation_steps = calculate_rotation_steps(stack, target_number, 0);
	while (stack->next != NULL)
		stack = stack->next;
	reverse_rotation_steps = calculate_rr_steps(stack, target_number, 0);
	if (reverse_rotation_steps < rotation_steps)
		return (1);
	return (0);
}

// Assembly:
xorl %eax, %eax
movq %rdi, %rdx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
testq %rdx, %rdx
je 0x16df
cmpl %esi, 0x4(%rdx)
je 0x16dd
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
je 0x16df
incl %eax
jmp 0x16c6
movl %eax, %ecx
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x16df
xorl %edx, %edx
cmpl %esi, 0x4(%rax)
je 0x1704
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x16ff
incl %edx
jmp 0x16ed
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %eax, %eax
cmpl %ecx, %edx
setb %al
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq (%rsi), %rdi
callq 0x2140
cvttsd2si %xmm0, %edi
callq 0x23f8
movq %rax, (%rbx)
cmpl $0x2, %ebp
pushq $0x1
popq %r15
cmovgel %ebp, %r15d
decl %r15d
xorl %r12d, %r12d
cmpq %r15, %r12
je 0x187f
movq 0x8(%r14,%r12,8), %rdi
incq %r12
callq 0x2140
cvttsd2si %xmm0, %edi
movq (%rbx), %rax
testq %rax, %rax
je 0x1866
testq %rax, %rax
je 0x1866
cmpl %edi, (%rax)
je 0x1878
movq 0x8(%rax), %rax
jmp 0x1857
callq 0x23f8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2444
jmp 0x1839
callq 0x1668
jmp 0x1839
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $0x1
popq %rax
testq %rdi, %rdi
je 0x18a3
movl 0x4(%rdi), %ecx
cmpl 0xc(%rsi), %ecx
jg 0x189d
cmpl 0x14(%rsi), %ecx
jge 0x18a5
movq 0x8(%rdi), %rdi
jmp 0x188b
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x242c
movl %eax, %ebp
movabsq $0x7fffffff80000000, %rax # imm = 0x7FFFFFFF80000000
movq %rax, 0x1c(%r14)
movl 0x10(%r14), %edi
movl 0x14(%r14), %esi
callq 0x1508
movl %eax, 0xc(%r14)
movl 0x10(%r14), %eax
subl 0x14(%r14), %eax
cmpl $0x9, %eax
jle 0x1946
leaq 0x10(%rbx), %r15
xorl %r12d, %r12d
testl %ebp, %ebp
cmovlel %r12d, %ebp
subl $0x1, %ebp
jb 0x1951
movq (%rbx), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1888
testl %eax, %eax
je 0x1951
movl 0x4(%r13), %eax
cmpl 0xc(%r14), %eax
jle 0x192e
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x61
popq %rdx
callq 0x1367
incl %r12d
jmp 0x18fa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1989
jmp 0x18fa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1989
movq (%rbx), %rax
cmpl $0x0, 0x4(%rax)
jg 0x193b
jmp 0x197a
cmpl $0x0, 0x14(%r14)
je 0x197a
xorl %r14d, %r14d
testl %r12d, %r12d
cmovgl %r12d, %r14d
pushq $0x61
popq %rbp
subl $0x1, %r14d
jb 0x197a
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x13c7
jmp 0x1965
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x62
popq %rcx
callq 0x12fd
movq 0x8(%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x1c(%rbx), %eax
jle 0x19b2
movl %eax, 0x1c(%rbx)
cmpl 0x20(%rbx), %eax
jge 0x19ba
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
pushq $0x62
popq %r13
movq (%r15), %rdi
callq 0x242c
cmpl $0x31, %eax
jle 0x1a1d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x207a
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl %ebp, %eax
jg 0x19e3
cmpl 0x14(%rbx), %eax
jl 0x19e3
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %r13d, %ecx
callq 0x12fd
jmp 0x19fb
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f08
nop
// File: /workspace/github_c_makefile_star2_O2/paulahemsi[P]push_swap/./source/reduce_instructions.c
// Function: replace
static void	replace(t_list **instr, char *content)
{
	t_list	*new_node;
	t_list	*orphan_node;

	new_node = *instr;
	new_node->content = content;
	orphan_node = new_node->next;
	new_node->next = new_node->next->next;
	free(orphan_node);
	*instr = new_node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %rsi, (%r14)
movq 0x8(%r14), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%r14)
callq 0x1060
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/paulahemsi[P]push_swap/./source/small_sort.c
// Function: define_numbers
static void	define_numbers(int *first, int *second, int *last, t_dlist *stack)
{
	*first = stack->content;
	*second = stack->next->content;
	while (stack->next != NULL)
		stack = stack->next;
	*last = stack->content;
}

// Assembly:
movl (%rcx), %eax
movl %eax, (%rdi)
movq 0x8(%rcx), %rax
movl (%rax), %eax
movl %eax, (%rsi)
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1ef6
movl (%rax), %eax
movl %eax, (%rdx)
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
pushq $0x61
popq %rbp
movq 0x8(%r14), %rdi
callq 0x242c
movl %eax, %r13d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fed
cmpl $0x1, %r13d
je 0x1f64
testl %r13d, %r13d
je 0x1fd4
movq (%r15), %rdi
movl 0x4(%rdi), %eax
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x1f76
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2037
jmp 0x1f24
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x12fd
jmp 0x1f24
cmpl 0x1c(%rbx), %eax
jne 0x1fae
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x12fd
decl 0x1c(%rbx)
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x14(%rbx), %eax
jne 0x1f24
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x1367
incl 0x14(%rbx)
jmp 0x1f24
callq 0x16bc
movq %r15, %rdi
movq %r12, %rsi
pushq $0x62
popq %rdx
testl %eax, %eax
je 0x1fca
callq 0x13c7
jmp 0x1f24
callq 0x1367
jmp 0x1f24
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x154b
// File: /workspace/github_c_makefile_star2_O2/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
movq 0x8(%rdi), %rax
movabsq $0x7fffffff80000000, %rcx # imm = 0x7FFFFFFF80000000
movq %rcx, 0x1c(%rsi)
movl $0x80000000, %edi       # imm = 0x80000000
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
testq %rax, %rax
je 0x202d
movl 0x4(%rax), %ecx
cmpl %edi, %ecx
jle 0x201e
movl %ecx, 0x1c(%rbx)
movl %ecx, %edi
cmpl %esi, %ecx
jge 0x2027
movl %ecx, 0x20(%rbx)
movl %ecx, %esi
movq 0x8(%rax), %rax
jmp 0x200d
callq 0x1508
movl %eax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
leaq 0x10(%r14), %r15
pushq $0x61
popq %rbp
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x12fd
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x1367
incl 0x14(%rbx)
incl 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
pushq $0x61
popq %rbp
movq 0x8(%r14), %rdi
callq 0x242c
movl %eax, %r13d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fed
testl %r13d, %r13d
je 0x2112
movq (%r15), %rdi
movl 0x4(%rdi), %eax
cmpl 0x18(%rbx), %eax
setg %cl
cmpl $0x1, %r13d
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x20de
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x12fd
jmp 0x2096
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x20f2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2037
jmp 0x2096
callq 0x16bc
movq %r15, %rdi
movq %r12, %rsi
pushq $0x62
popq %rdx
testl %eax, %eax
je 0x210b
callq 0x13c7
jmp 0x2096
callq 0x1367
jmp 0x2096
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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
movabsq $0x100003e00, %rax      # imm = 0x100003E00
movzbl (%rbx), %ecx
cmpq $0x2d, %rcx
ja 0x2198
btq %rcx, %rax
jae 0x216a
incq %rbx
jmp 0x2156
movabsq $0x280000000000, %rax   # imm = 0x280000000000
btq %rcx, %rax
jae 0x2198
xorl %eax, %eax
cmpb $0x2d, %cl
sete %al
leaq 0xedf(%rip), %rcx       # 0x3068
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x18(%rbp)
incq %rbx
jmp 0x21a5
movsd 0xed8(%rip), %xmm0      # 0x3078
movsd %xmm0, -0x18(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movsbl (%rbx), %edi
callq 0x21f0
testl %eax, %eax
je 0x21df
movsd -0x10(%rbp), %xmm1
mulsd 0xeb9(%rip), %xmm1      # 0x3080
movsbl (%rbx), %eax
addl $-0x30, %eax
cvtsi2sd %eax, %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, -0x10(%rbp)
incq %rbx
jmp 0x21ae
movsd -0x18(%rbp), %xmm0
mulsd -0x10(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
testq %rdi, %rdi
je 0x2274
xorl %eax, %eax
xorl %ecx, %ecx
movq %rcx, %rdx
cmpb $0x0, (%r14,%rdx)
je 0x226a
decq %rdx
movq %rdx, %rcx
movb 0x1(%r14,%rdx), %sil
incq %rdx
cmpb %bl, %sil
jne 0x2242
testb %sil, %sil
jne 0x222d
testb %sil, %sil
sete %dil
cmpb %bl, %sil
sete %sil
orb %dil, %sil
jne 0x2223
movb 0x1(%r14,%rcx), %dl
incq %rcx
cmpb %bl, %dl
je 0x2265
testb %dl, %dl
jne 0x2255
incq %rax
jmp 0x2220
leaq 0x8(,%rax,8), %rdi
jmp 0x2277
pushq $0x8
popq %rdi
callq 0x1040
movq %rax, %r15
xorl %eax, %eax
testq %r14, %r14
je 0x2304
testq %r15, %r15
je 0x2304
xorl %esi, %esi
xorl %r13d, %r13d
movb (%r14,%rsi), %al
testb %al, %al
je 0x22da
cmpb %bl, %al
jne 0x22a1
movq %rsi, %r12
jmp 0x22d2
leaq -0x2(%rsi), %r12
pushq $-0x2
popq %rdx
movb 0x2(%r14,%r12), %al
incq %r12
incq %rdx
testb %al, %al
je 0x22bb
cmpb %bl, %al
jne 0x22a8
incq %rdx
movq %r14, %rdi
callq 0x2624
movq %rax, (%r15,%r13,8)
testq %rax, %rax
je 0x22e4
incq %r13
incq %r12
movq %r12, %rsi
jmp 0x2290
andq $0x0, (%r15,%r13,8)
movq %r15, %rax
jmp 0x2304
movq %r15, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x22fa
callq 0x1060
addq $0x8, %rbx
jmp 0x22e7
movq %r15, %rdi
callq 0x1060
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_O2/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 0x233f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movb (%r14), %al
testb %al, %al
je 0x233b
movsbl %al, %edi
movl %ebx, %esi
callq 0x26b8
incq %r14
jmp 0x2325
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdi
callq 0x1040
testq %rax, %rax
je 0x235e
movq %rbx, (%rax)
andq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x2396
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x238d
movq %rax, %rdi
callq 0x26dc
movq %rax, %rdi
addq $0x8, %rdi
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x23c5
movq %rsi, %r14
testq %rdi, %rdi
je 0x23c1
movq 0x8(%rdi), %r15
callq *%r14
movq %r15, %rdi
jmp 0x23b0
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x23f6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x23f2
movq (%r14), %rdi
callq *%rbx
movq 0x8(%r14), %r14
jmp 0x23e2
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x18
popq %rdi
callq 0x1040
movq %rax, %r14
testq %rax, %rax
jne 0x2416
callq 0x1668
movl %ebx, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x2475
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x246c
movq %rax, %rdi
callq 0x26f8
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rbx)
jmp 0x246f
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x24a1
testq %rdi, %rdi
je 0x249d
movq 0x8(%rdi), %r14
callq 0x1060
movq %r14, %rdi
jmp 0x248a
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x24e3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0xa
popq %r15
testq %r14, %r14
je 0x24d9
movl (%r14), %edi
callq *%rbx
movl %r15d, %edi
callq 0x252c
movq 0x8(%r14), %r14
jmp 0x24c1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2528
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x24f6
pushq $0xa
popq %r14
testq %r15, %r15
je 0x251e
movl (%r15), %edi
callq *%rbx
movl %r14d, %edi
callq 0x252c
movq 0x10(%r15), %r15
jmp 0x2506
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x2573
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rbx), %al
testb %al, %al
je 0x256d
movsbl %al, %edi
callq 0x252c
incq %rbx
jmp 0x255a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2d
popq %r14
pushq $0xa
popq %r15
testl %ebx, %ebx
jns 0x25aa
negl %ebx
movl %r14d, %edi
callq 0x252c
cmpl $0x9, %ebx
jbe 0x25c1
movl %ebx, %eax
xorl %edx, %edx
divl %r15d
movl %edx, %ebx
movl %eax, %edi
callq 0x2588
jmp 0x259c
orb $0x30, %bl
movsbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x252c
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x261d
xorl %ecx, %ecx
movl $0x1, %eax
movb (%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x2607
cmpq %rdx, %rcx
jae 0x261f
movb (%rsi,%rcx), %r9b
jmp 0x2615
cmpq %rdx, %rcx
jae 0x261f
movb (%rsi,%rcx), %r9b
testb %r9b, %r9b
je 0x261f
incq %rcx
cmpb %r9b, %r8b
je 0x25f3
xorl %eax, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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:
testq %rdi, %rdi
je 0x2697
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq 0x1(%rdx), %rdi
callq 0x1040
testq %rax, %rax
je 0x26a7
movl %r12d, %ecx
movq %rcx, -0x38(%rbp)
addq %r15, %rcx
movq %rcx, -0x30(%rbp)
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x26a0
movq %rax, %r12
movq -0x38(%rbp), %rax
leaq (%rax,%r13), %rbx
movq %r15, %rdi
callq 0x2714
cmpq %rax, %rbx
jae 0x269a
movq -0x30(%rbp), %rax
movb (%rax,%r13), %al
testb %al, %al
je 0x269a
movb %al, (%r12,%r13)
movq %r12, %rax
incq %r13
jmp 0x2662
xorl %eax, %eax
retq
movq %r13, %r14
movq %r12, %rax
movb $0x0, (%rax,%r14)
jmp 0x26a9
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq