LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xlua.h
// Function: xlua_checkudata
static inline void*
xlua_checkudata(lua_State *L,
              int narg,
              const luaL_Reg *regs,
              const char *typeName)
{
   // if REGISTRY[getmetatable(udata)] == regs then
   //    return touserdata(udata)
   // else
   //    error(...)
   // end

   void *me = lua_touserdata(L, narg);

   if (me != NULL && lua_getmetatable(L, narg)) {
      lua_rawget(L, LUA_REGISTRYINDEX);
      void *tptr = lua_touserdata(L, -1);
      lua_pop(L, 1);
      if ((const void *)tptr == (const void*) regs) {
         return me;
      }
   }

   const char *msg = lua_pushfstring(L, "%s object expected, got %s",
                                     typeName, luaL_typename(L, narg));
   (void) luaL_argerror(L, narg, msg);
   return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
callq 0x625b
testq %rax, %rax
je 0x483e
movq %rax, %r12
movq %r14, %rdi
movl %ebx, %esi
callq 0x67cb
testl %eax, %eax
je 0x483e
movq %r14, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x66c5
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x625b
movq %rax, %rbp
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5c43
cmpq %r13, %rbp
je 0x4879
movq %r14, %rdi
movl %ebx, %esi
callq 0x5e35
movq %r14, %rdi
movl %eax, %esi
callq 0x5e56
leaq 0x1296b(%rip), %rsi     # 0x171c4
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x645c
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x74ea
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpqueue_enqueue
static int xpqueue_enqueue(lua_State *L, int ndxTask, int ndxKey, int mode)
{
   ndxTask = lua_absindex(L, ndxTask);
   ndxKey = lua_absindex(L, ndxKey);

   // assert(not task._dequeue)
   lua_getfield(L, ndxTask, "_dequeue");
   if (!lua_isnil(L, -1)) {
      luaL_error(L, "xpio: task scheduled twice");
   }

   // readers/writers/childWaiters[key] = task

   xpqueue_tableFromTask(L, ndxTask, mode);
   lua_pushvalue(L, ndxKey);   // key
   lua_pushvalue(L, ndxTask);  // value
   lua_rawset(L, -3);

   // task.dequeue = xpqueue_dequeue[R/W/C]

   lua_pushcfunction(L, (mode == XPQUEUE_READ ? xpqueue_dequeueR :
                         mode == XPQUEUE_WRITE ? xpqueue_dequeueW :
                         xpqueue_dequeueC));
   lua_setfield(L, ndxTask, "_dequeue");

   // task._dequeuedata = key

   lua_pushvalue(L, ndxKey);
   lua_setfield(L, ndxTask, "_dequeuedata");

   // leave 4 items on the stack
   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movl $0x2, %esi
callq 0x5c0e
movl %eax, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5c0e
movl %eax, %r14d
leaq 0x12949(%rip), %rdx     # 0x17205
movq %rbx, %rdi
movl %ebp, %esi
callq 0x666b
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5e35
testl %eax, %eax
je 0x48e8
leaq 0x12930(%rip), %rsi     # 0x1720e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x75d0
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x497d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5e15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5e15
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x6951
cmpl $0x2, %r15d
leaq 0xbd(%rip), %rax        # 0x49df
leaq 0xc5(%rip), %rcx        # 0x49ee
cmoveq %rax, %rcx
cmpl $0x1, %r15d
leaq 0x98(%rip), %rsi        # 0x49d0
cmovneq %rcx, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6509
leaq 0x128b8(%rip), %rdx     # 0x17205
movq %rbx, %rdi
movl %ebp, %esi
callq 0x68eb
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5e15
leaq 0x128c0(%rip), %rdx     # 0x17229
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x68eb
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpqueue_tableFromTask
static void xpqueue_tableFromTask(lua_State *L, int ndxTask, int mode)
{
   lua_getfield(L, ndxTask, "_queue");  // task.tqueue
   (void) XLUA_CAST(L, -1, XPQueue);    // validate queue
   lua_getuservalue(L, -1);
   lua_rawgeti(L, -1, mode);            // readers/writers
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
leaq 0x128a9(%rip), %rdx     # 0x17236
callq 0x666b
leaq 0x1af77(%rip), %rdx     # 0x1f910
leaq 0x12691(%rip), %rcx     # 0x17031
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x47de
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6822
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x66f1
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpqueue_dequeue
static int xpqueue_dequeue(lua_State *L, int mode)
{
   xpqueue_tableFromTask(L, 1, mode);
   lua_getfield(L, 1, "_dequeuedata");  // key = fd
   lua_pushnil(L);                      // value = nil
   lua_rawset(L, -3);                   // readers/writers[fd] = nil

   lua_pushnil(L);
   lua_setfield(L, 1, "_dequeue");      // task.dequeue = nil
   return 0;
}

// Assembly:
pushq %rbx
movl %esi, %edx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x497d
leaq 0x12815(%rip), %rdx     # 0x17229
movq %rbx, %rdi
movl $0x1, %esi
callq 0x666b
movq %rbx, %rdi
callq 0x630a
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x6951
movq %rbx, %rdi
callq 0x630a
leaq 0x127c0(%rip), %rdx     # 0x17205
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x68eb
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpqueue_dtor
static int xpqueue_dtor(lua_State *L)
{
   XPQueue *me = XLUA_CAST(L, 1, XPQueue);
   if (me->pfds) {
      free(me->pfds);
      me->pfds = NULL;
      me->nfds = 0;
   }
   return 0;
}

// Assembly:
pushq %rbx
leaq 0x1aeb5(%rip), %rdx     # 0x1f910
leaq 0x125cf(%rip), %rcx     # 0x17031
movl $0x1, %esi
callq 0x47de
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4a8a
movq %rax, %rbx
callq 0x3040
movq $0x0, (%rbx)
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpqueue_isEmpty
static int xpqueue_isEmpty(lua_State *L)
{
   int mode;
   int isEmpty = 1;

   lua_getuservalue(L, 1);

   for (mode = 1; mode <= 3; ++mode) {
      lua_rawgeti(L, -1, mode);
      lua_pushnil(L);
      if (lua_next(L, -2) != 0) {
         isEmpty = 0;
         break;
      }
      lua_pop(L, 1);
   }

   lua_pushboolean(L, isEmpty);
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
movl $0x1, %esi
callq 0x6822
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %ebp, %edx
callq 0x66f1
movq %rbx, %rdi
callq 0x630a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6f12
testl %eax, %eax
jne 0x4fc2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5c43
incl %ebp
cmpl $0x4, %ebp
jne 0x4f7f
movl $0x1, %esi
jmp 0x4fc4
xorl %esi, %esi
movq %rbx, %rdi
callq 0x658d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_dtor
static int xpsocket_dtor(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);

   if (me->s) {
      close(me->s);
      me->s = -1;
   }
   return 0;
}

// Assembly:
pushq %rbx
leaq 0x1a743(%rip), %rdx     # 0x1f950
leaq 0x11e31(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movl (%rax), %edi
testl %edi, %edi
je 0x5232
movq %rax, %rbx
callq 0x31c0
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_try_connect
static int xpsocket_try_connect(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *addr = luaL_checkstring(L, 2);
   struct sockaddr_in sin;
   int e;

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

   // POSIX fail: Asynchronous connect oddness.  Instead of EAGAIN or
   // EWOULDBLOCK, we may get either EINPROGRESS or EALREADY to indicate
   // "try again later". Finally, success is indicated by another error code
   // EISCONN. Spec is unclear on whether an actual success result (return
   // value of 0) is possible, and on what the state of the sockaddr must be
   // on calls other than the first.

   if (e && errno != EISCONN) {
      return pushError(L, (isRetry(errno) ? "retry" : NULL));
   }

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x1a707(%rip), %rdx     # 0x1f950
leaq 0x11df5(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movq %rax, %r15
movl $0x2, %ebx
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3d0e
testl %eax, %eax
je 0x529b
leaq 0x12071(%rip), %rsi     # 0x172f8
movq %r14, %rdi
callq 0x434a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl (%r15), %edi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x33d0
testl %eax, %eax
je 0x52ea
callq 0x3060
movl (%rax), %eax
leaq 0x11f36(%rip), %rsi     # 0x171f3
cmpl $0x69, %eax
jg 0x52ce
cmpl $0x4, %eax
je 0x5287
cmpl $0xb, %eax
je 0x5287
jmp 0x52d8
cmpl $0x6a, %eax
je 0x52ea
cmpl $0x73, %eax
je 0x5287
xorl %esi, %esi
cmpl $0x72, %eax
leaq 0x11f0f(%rip), %rax     # 0x171f3
cmoveq %rax, %rsi
jmp 0x5287
movl $0x1, %ebx
movq %r14, %rdi
movl $0x1, %esi
callq 0x658d
jmp 0x528f
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_try_read
static int xpsocket_try_read(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   size_t size = checkUInt(L, 2);
   luaL_Buffer b;
   int n;

   if (size == 0) {
      // POSIX fail: reading zero bytes may or may not test for error
      //   conditions on the socket (depending on implementation).  Here we
      //   avoid potential portability issues.
      lua_pushinteger(L, 0);
      return 1;
   }

   char *pbuf = luaL_buffinitsize(L, &b, size);

   n = read(me->s, pbuf, size);
   if (n >= (size ? 1 : 0)) {
      // success
      luaL_pushresultsize(&b, n);
      return 1;
   } else if (n == 0) {
      // end of stream
      lua_pushnil(L);
      return 1;
   } if (isRetry(errno)) {
      // wait for more
      return pushError(L, "retry");
   } else {
      // actual error
      return pushError(L, NULL);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rdi, %rbx
leaq 0x1a63b(%rip), %rdx     # 0x1f950
leaq 0x11d29(%rip), %rcx     # 0x17045
movl $0x1, %ebp
movl $0x1, %esi
callq 0x47de
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x44f1
testl %eax, %eax
je 0x537d
movl %eax, %r15d
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7f63
movl (%r14), %edi
movq %rax, %rsi
movq %r15, %rdx
callq 0x31e0
testl %eax, %eax
jle 0x5389
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x7ebb
movl $0x1, %ebp
jmp 0x53b8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6333
jmp 0x53b8
je 0x53c8
callq 0x3060
movl (%rax), %eax
leal -0x72(%rax), %ecx
cmpl $0x2, %ecx
jb 0x53a4
cmpl $0x4, %eax
je 0x53a4
cmpl $0xb, %eax
jne 0x53d2
leaq 0x11e48(%rip), %rsi     # 0x171f3
movq %rbx, %rdi
callq 0x434a
movl $0x2, %ebp
movl %ebp, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x630a
jmp 0x5376
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x53ae
// File: /workspace/github_c_makefile_star2_O1/bhk[P]tooltree/monoglot/./xpio_c.c
// Function: xpsocket_try_write
static int xpsocket_try_write(lua_State *L)
{
   XPSocket *me = XLUA_CAST(L, 1, XPSocket);
   const char *data = luaL_checkstring(L, 2);
   int n;

   n = write(me->s, data, lua_rawlen(L, 2));
   if (n < 0) {
      return pushError(L, isRetry(errno) ? "retry" : NULL);
   }

   lua_pushinteger(L, n);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a566(%rip), %rdx     # 0x1f950
leaq 0x11c54(%rip), %rcx     # 0x17045
movl $0x1, %ebp
movl $0x1, %esi
callq 0x47de
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
movq %rax, %r15
movl (%r14), %r14d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x61fb
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x30f0
testl %eax, %eax
js 0x5449
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6333
jmp 0x5483
callq 0x3060
movl (%rax), %eax
leaq 0x11d9c(%rip), %rsi     # 0x171f3
cmpl $0x4, %eax
je 0x5476
cmpl $0xb, %eax
je 0x5476
cmpl $0x73, %eax
je 0x5476
xorl %esi, %esi
cmpl $0x72, %eax
leaq 0x11d81(%rip), %rax     # 0x171f3
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x434a
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x1a433(%rip), %rdx     # 0x1f950
leaq 0x11b21(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movq %rax, %r15
movl $0x2, %ebx
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3d0e
testl %eax, %eax
je 0x5560
leaq 0x11db6(%rip), %rsi     # 0x17311
movq %r14, %rdi
jmp 0x5579
movl (%r15), %edi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x3350
testl %eax, %eax
je 0x558a
movq %r14, %rdi
xorl %esi, %esi
callq 0x434a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %ebx
movq %r14, %rdi
movl $0x1, %esi
callq 0x658d
jmp 0x557e
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1a3a4(%rip), %rdx     # 0x1f950
leaq 0x11a92(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movq %rax, %r14
movq %rbx, %rdi
callq 0x5c2f
movl $0xa, %esi
cmpl $0x2, %eax
jl 0x55e1
movq %rbx, %rdi
movl $0x2, %esi
callq 0x44f1
movl %eax, %esi
movl (%r14), %edi
callq 0x32e0
testl %eax, %eax
je 0x55fe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x434a
movl $0x2, %ebp
jmp 0x5610
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x658d
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1a32a(%rip), %rdx     # 0x1f950
leaq 0x11a18(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
movl (%rax), %edi
leaq 0x10(%rsp), %rsi
callq 0x3390
testl %eax, %eax
je 0x5663
movq %rbx, %rdi
xorl %esi, %esi
callq 0x434a
movl $0x2, %eax
jmp 0x5670
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5a9a
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1a2cb(%rip), %rdx     # 0x1f950
leaq 0x119b9(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
movl (%rax), %edi
leaq 0x10(%rsp), %rsi
callq 0x3110
testl %eax, %eax
je 0x56c2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x434a
movl $0x2, %eax
jmp 0x56cf
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5a9a
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1a265(%rip), %rdx     # 0x1f950
leaq 0x11953(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
movq %rax, %r15
movl $0x4, 0xc(%rsp)
leaq 0x1a340(%rip), %r12     # 0x1fa60
leaq 0x11c72(%rip), %rsi     # 0x17399
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
je 0x5744
movq 0x18(%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0x5727
xorl %r12d, %r12d
testq %r12, %r12
je 0x5776
movl 0xc(%r12), %eax
cmpl $0x2, %eax
je 0x578f
cmpl $0x1, %eax
jne 0x57c6
movl (%r14), %edi
movl 0x10(%r12), %esi
movl 0x14(%r12), %edx
leaq 0x8(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x31f0
jmp 0x57bb
movq %rbx, %rdi
callq 0x630a
leaq 0x11bdd(%rip), %rsi     # 0x17362
movq %rbx, %rdi
callq 0x63c2
jmp 0x57d5
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 0x57e9
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x57d0
leaq 0x11bb1(%rip), %rsi     # 0x1737e
movq %rbx, %rdi
callq 0x434a
movl $0x2, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r12), %eax
movl $0x1, %ebp
cmpl $0x2, %eax
je 0x580b
cmpl $0x1, %eax
jne 0x57da
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x658d
jmp 0x57da
cvtsi2sdl 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x631e
jmp 0x57da
// File: /workspace/github_c_makefile_star2_O1/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 0x1a11f(%rip), %rdx     # 0x1f950
leaq 0x1180d(%rip), %rcx     # 0x17045
movl $0x1, %esi
callq 0x47de
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
movq %rax, %r15
leaq 0x1a202(%rip), %r12     # 0x1fa60
leaq 0x11b34(%rip), %rsi     # 0x17399
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
je 0x5882
movq 0x18(%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0x5865
xorl %r12d, %r12d
testq %r12, %r12
je 0x58a5
movl 0x8(%r12), %eax
cmpl $0x2, %eax
je 0x58be
cmpl $0x1, %eax
jne 0x58cf
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6162
jmp 0x58cb
movq %rbx, %rdi
callq 0x630a
leaq 0x11aae(%rip), %rsi     # 0x17362
movq %rbx, %rdi
callq 0x63c2
jmp 0x5923
movq %rbx, %rdi
movl $0x3, %esi
callq 0x44f1
movl %eax, 0xc(%rsp)
movl 0xc(%r12), %eax
cmpl $0x2, %eax
je 0x58fd
cmpl $0x1, %eax
jne 0x5914
movl (%r14), %edi
movl 0x10(%r12), %esi
movl 0x14(%r12), %edx
leaq 0xc(%rsp), %rcx
movl $0x4, %r8d
callq 0x30c0
jmp 0x5909
movl (%r14), %edi
movl 0xc(%rsp), %esi
callq 0x4389
testl %eax, %eax
je 0x5937
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x591e
leaq 0x11ac3(%rip), %rsi     # 0x173de
movq %rbx, %rdi
callq 0x434a
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 0x658d
jmp 0x5928
// File: /workspace/github_c_makefile_star2_O1/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 0x19ff0(%rip), %rdx     # 0x1f950
leaq 0x116de(%rip), %rcx     # 0x17045
movl $0x1, %ebx
movl $0x1, %esi
callq 0x47de
movq %rax, %r15
movl $0x2, %ebp
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7b05
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 0x59e8
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 0x59e8
movq %r14, %rdi
xorl %esi, %esi
callq 0x434a
movl $0x2, %ebx
jmp 0x59f5
movq %r14, %rdi
movl $0x1, %esi
callq 0x658d
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_O1/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 0x19f3b(%rip), %rdx     # 0x1f950
leaq 0x11629(%rip), %rcx     # 0x17045
movl $0x1, %ebx
movl $0x1, %esi
callq 0x47de
movl (%rax), %edi
cmpl $-0x1, %edi
je 0x5a50
movq %rax, %r15
callq 0x31c0
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0x1, %esi
callq 0x658d
jmp 0x5a64
leaq 0x119a2(%rip), %rsi     # 0x173f9
movq %r14, %rdi
callq 0x434a
movl $0x2, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5ae5
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 0x1187f(%rip), %rsi     # 0x17353
movq %rbx, %rdi
xorl %eax, %eax
callq 0x645c
movl $0x1, %eax
jmp 0x5b06
movq %rbx, %rdi
callq 0x630a
leaq 0x1183f(%rip), %rsi     # 0x17333
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x645c
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x12a0
movq %rsi, %rbx
movl %edi, %r14d
addq $0x8, %rbx
decl %r14d
cmpl $0x1, %r14d
jne 0x11bf
movq (%rbx), %rdi
cmpb $0x0, (%rdi)
je 0x12b0
movl $0x20, %esi
callq 0x22c0
movq %rax, %rbx
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
leaq 0x1(%r14), %r14
jne 0x11b1
decl %r14d
testl %r14d, %r14d
jle 0x1242
movl %r14d, %r15d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rax
cmpb $0x2d, (%rax)
jne 0x11e6
movl $0x1, %r13d
cmpb $0x0, 0x1(%rax)
jne 0x11e9
callq 0x16c0
jmp 0x11e9
xorl %r13d, %r13d
movq (%rbx,%r12,8), %rdi
movb (%rdi,%r13), %al
testb %al, %al
je 0x1218
incq %r13
movsbl %al, %edi
callq 0x22ac
testl %eax, %eax
jne 0x1209
callq 0x16c0
movq (%rbx,%r12,8), %rdi
movb (%rdi,%r13), %al
incq %r13
testb %al, %al
jne 0x11f8
callq 0x21f8
ucomisd 0x1de3(%rip), %xmm0     # 0x3008
ja 0x1235
movsd 0x1de1(%rip), %xmm1     # 0x3010
ucomisd %xmm0, %xmm1
jbe 0x123a
callq 0x16c0
incq %r12
cmpq %r15, %r12
jne 0x11ca
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 0x178c
movq %r12, %rdi
movq %r13, %rsi
callq 0x14c3
movq %r15, %rdi
callq 0x1ad4
movq 0x10(%r12), %rdi
leaq 0x13a4(%rip), %rsi      # 0x2634
callq 0x24cc
movq %r12, %rdi
movq %r13, %rsi
callq 0x16dc
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_O1/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 0x131b
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x131b
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq 0x8(%rcx), %rsi
testq %rsi, %rsi
je 0x12e6
movq %rax, 0x10(%rsi)
movq %rax, 0x8(%rcx)
movq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
cmpb $0x61, %dl
leaq 0x1d19(%rip), %rax      # 0x3018
leaq 0x1d16(%rip), %rdi      # 0x301c
cmoveq %rax, %rdi
callq 0x2430
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2460
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1358
pushq %rbx
movq %rdx, %rbx
movq (%rsi), %rdx
leaq 0x8(%rax), %r8
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x1342
movq %r9, (%rdi)
movq (%r8), %rdi
addq $0x10, %rdi
movq $0x0, (%rdi)
testq %rdx, %rdx
je 0x1359
movq %rax, 0x10(%rdx)
movq %rdx, 0x8(%rax)
jmp 0x1360
retq
xorps %xmm0, %xmm0
movups %xmm0, (%r8)
movq %rax, (%rsi)
cmpb $0x61, %cl
leaq 0x1cb3(%rip), %rax      # 0x3020
leaq 0x1cb0(%rip), %rdi      # 0x3024
cmoveq %rax, %rdi
callq 0x2430
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2460
// File: /workspace/github_c_makefile_star2_O1/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 0x13ee
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x13ee
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 0x13ac
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rax)
movq $0x0, 0x8(%rax)
cmpb $0x61, %dl
leaq 0x1c57(%rip), %rax      # 0x3029
leaq 0x1c55(%rip), %rdi      # 0x302e
cmoveq %rax, %rdi
callq 0x2430
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2460
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1449
pushq %rbx
movq %rsi, %rbx
movq %rax, %rsi
movq %rsi, %rcx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x13fe
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 0x1bfb(%rip), %rax      # 0x3028
leaq 0x1bf9(%rip), %rdi      # 0x302d
cmoveq %rax, %rdi
callq 0x2430
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x2460
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x1bd4(%rip), %rdi      # 0x3032
callq 0x2664
leaq 0x120e(%rip), %r15      # 0x2678
movq %r14, %rdi
movq %r15, %rsi
callq 0x25a8
leaq 0x1bbe(%rip), %rdi      # 0x303a
callq 0x2664
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x25a8
// File: /workspace/github_c_makefile_star2_O1/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 0x14ec
movq %rdi, %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x14ec
movl (%rax), %edx
movq %rcx, %rax
cmpl (%rcx), %edx
jle 0x14d8
jmp 0x1501
movl 0x8(%rbx), %eax
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
decl %eax
testq %rcx, %rcx
jne 0x14f2
testl %eax, %eax
je 0x153d
callq 0x2528
cmpl $0x5, %eax
jg 0x1522
movq (%r14), %rdi
callq 0x2528
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1d7c
jmp 0x14cd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x192e
movl 0x1c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a6c
jmp 0x14cd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, 0x4(%rax)
jne 0x15b1
leaq 0x10(%r14), %rsi
movq %r14, %rdi
movl $0x61, %edx
callq 0x1389
movq (%r14), %rcx
movl 0x4(%rcx), %eax
leal 0x1(%rax), %edx
movq 0x8(%rcx), %rsi
cmpl 0x4(%rsi), %edx
jne 0x1600
leaq 0x10(%r14), %r15
movq %rcx, %rsi
movq %rsi, %rdx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x15ca
leal -0x1(%rax), %esi
cmpl 0x4(%rdx), %esi
jne 0x1600
movq %r14, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1389
movq (%r14), %rcx
movl 0x4(%rcx), %eax
leal 0x1(%rax), %edx
movq 0x8(%rcx), %rsi
cmpl 0x4(%rsi), %edx
je 0x15c7
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1600
decl %eax
cmpl 0x4(%rdx), %eax
jne 0x1624
leaq 0x10(%r14), %rsi
movq %r14, %rdi
movl $0x61, %edx
callq 0x1389
movq (%r14), %rax
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x1627
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_O1/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 0x16b2
movslq %esi, %rax
movl (%r14,%rax,4), %edx
movq %rax, %rdi
movl %esi, %ecx
movl 0x4(%r14,%rdi,4), %r8d
cmpl %edx, %r8d
jge 0x1682
movslq %ecx, %r9
incl %ecx
movl 0x4(%r14,%r9,4), %r10d
movl %r10d, 0x4(%r14,%rdi,4)
movl %r8d, 0x4(%r14,%r9,4)
incq %rdi
cmpq %rdi, %r15
jne 0x1664
movl (%r14,%rax,4), %edx
movslq %ecx, %r12
movl (%r14,%r12,4), %ecx
movl %ecx, (%r14,%rax,4)
movl %edx, (%r14,%r12,4)
leal -0x1(%r12), %edx
movq %r14, %rdi
callq 0x1644
incl %r12d
movl %r12d, %esi
jmp 0x1654
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x2578
leaq 0x8(%r14), %rdi
callq 0x2578
addq $0x10, %r14
movq 0x38d1(%rip), %rsi      # 0x4fd0
movq %r14, %rdi
callq 0x2490
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1070
nop
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %edx, %edx
callq 0x174d
movl %eax, %ebp
movq %r14, %rdi
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x172a
movl %ebx, %esi
xorl %edx, %edx
callq 0x176c
xorl %ecx, %ecx
cmpl %ebp, %eax
setl %cl
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/choose_rotation.c
// Function: calculate_rotation_steps
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:
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
testq %rdi, %rdi
je 0x176b
cmpl %esi, 0x4(%rdi)
je 0x1769
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x176b
incl %edx
jmp 0x1752
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/choose_rotation.c
// Function: calculate_rr_steps
static int	calculate_rr_steps(t_dlist *stack,
		int target_number, int steps)
{
	if (!stack)
		return (INT_MAX);
	if (stack->index == target_number)
		return (steps);
	if (!stack->previous)
		return (INT_MAX);
	stack = stack->previous;
	return (calculate_rr_steps(stack, target_number, (steps + 1)));
}

// Assembly:
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
testq %rdi, %rdi
je 0x178a
cmpl %esi, 0x4(%rdi)
je 0x1788
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x178a
incl %edx
jmp 0x1771
movl %edx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/init.c
// Function: fill_stack_indexes
static void	fill_stack_indexes(t_stack *stack, t_aux *aux)
{
	if (stack->a->next == NULL)
	{
		stack->a->index = find_index(stack, aux, 0);
		rewind(&stack->a);
		return ;
	}
	stack->a->index = find_index(stack, aux, 0);
	stack->a = stack->a->next;
	fill_stack_indexes(stack, aux);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rbx), %r12
movq 0x8(%r12), %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1873
movl %eax, 0x4(%r12)
testq %r15, %r15
je 0x1860
movq %r15, (%rbx)
jmp 0x183c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1556
// File: /workspace/github_c_makefile_star2_O1/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 0x21f8
cvttsd2si %xmm0, %edi
callq 0x24f4
movq %rax, (%rbx)
cmpl $0x2, %r15d
jl 0x18fc
decl %r15d
xorl %r12d, %r12d
movq 0x8(%r14,%r12,8), %rdi
callq 0x21f8
cvttsd2si %xmm0, %edi
movq (%rbx), %rax
testq %rax, %rax
je 0x18dd
cmpl %edi, (%rax)
je 0x18ef
movq 0x8(%rax), %rax
jmp 0x18ce
callq 0x24f4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2544
jmp 0x18f4
callq 0x16c0
incq %r12
cmpq %r15, %r12
jne 0x18bd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1927
movl 0xc(%rsi), %ecx
movl 0x4(%rdi), %edx
cmpl %ecx, %edx
jg 0x191e
cmpl 0x14(%rsi), %edx
jge 0x1928
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x1912
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2528
movl %eax, %ebp
movabsq $0x7fffffff80000000, %rax # imm = 0x7FFFFFFF80000000
movq %rax, 0x1c(%r14)
movl 0x10(%r14), %edi
movl 0x14(%r14), %esi
callq 0x1548
movl %eax, 0xc(%r14)
movl 0x10(%r14), %eax
subl 0x14(%r14), %eax
cmpl $0x9, %eax
jle 0x19e4
testl %ebp, %ebp
jle 0x19ef
leaq 0x10(%rbx), %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%rbx), %rax
testq %rax, %rax
je 0x19f2
movl 0xc(%r14), %ecx
movq %rax, %rdx
movl 0x4(%rdx), %esi
cmpl %ecx, %esi
jg 0x199f
cmpl 0x14(%r14), %esi
jge 0x19aa
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
jne 0x1992
jmp 0x19f2
cmpl %ecx, 0x4(%rax)
jle 0x19c4
movq %rbx, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1389
incl %r12d
jmp 0x19cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a2f
incl %r13d
cmpl %ebp, %r13d
jne 0x1983
jmp 0x19f2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a2f
movq (%rbx), %rax
cmpl $0x0, 0x4(%rax)
jg 0x19d9
jmp 0x1a20
xorl %r12d, %r12d
cmpl $0x0, 0x14(%r14)
setne %al
testl %r12d, %r12d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1a20
leaq 0x10(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x61, %edx
callq 0x13ef
decl %r12d
jne 0x1a0b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x131c
movq 0x8(%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x1c(%rbx), %eax
jle 0x1a5a
movl %eax, 0x1c(%rbx)
cmpl 0x20(%rbx), %eax
jge 0x1a62
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
movq 0x8(%r14), %rdi
callq 0x2528
cmpl $0x31, %eax
jle 0x1ac1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2147
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl %ebp, %eax
jg 0x1a84
cmpl 0x14(%rbx), %eax
jl 0x1a84
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x62, %ecx
callq 0x131c
jmp 0x1a9d
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1fd8
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq (%r14), %rdi
callq 0x1491
testl %eax, %eax
je 0x1db5
movq (%r14), %rdi
movl %ebx, %esi
callq 0x14b0
testl %eax, %eax
jne 0x1ef0
movq (%r14), %rdi
callq 0x2528
cmpl $0x2, %eax
je 0x1ed1
movq (%r14), %rdi
callq 0x2528
cmpl $0x3, %eax
jne 0x1ec1
movq (%r14), %rdi
movl (%rdi), %ebp
movq 0x8(%rdi), %rax
movl (%rax), %r13d
movq %rdi, %rcx
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1de6
movl (%rax), %r15d
callq 0x1491
testl %eax, %eax
jne 0x1eb4
cmpl %r13d, %ebp
jle 0x1e27
cmpl %r13d, %r15d
setg %al
cmpl %r15d, %ebp
setl %cl
testb %cl, %al
jne 0x1e3c
cmpl %r13d, %r15d
setl %al
cmpl %r15d, %ebp
setg %cl
testb %cl, %al
jne 0x1e3c
cmpl %r13d, %ebp
jge 0x1e4d
cmpl %r13d, %r15d
setge %al
cmpl %r15d, %ebp
setge %cl
orb %al, %cl
jne 0x1e4d
movq %r14, %rdi
movq (%rsp), %rsi
movl $0x61, %edx
callq 0x12b8
movq (%r14), %rax
movl (%rax), %ebp
movq 0x8(%rax), %rcx
movl (%rcx), %r15d
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x1e59
movl (%rcx), %r13d
cmpl %r15d, %ebp
jle 0x1e8e
cmpl %r15d, %r13d
setle %al
cmpl %r13d, %ebp
setle %cl
orb %al, %cl
jne 0x1e8e
movq %r14, %rdi
movq (%rsp), %rsi
movl $0x61, %edx
callq 0x1389
cmpl %r15d, %ebp
jge 0x1eb4
cmpl %r15d, %r13d
setge %al
cmpl %r13d, %ebp
setle %cl
orb %al, %cl
jne 0x1eb4
movq %r14, %rdi
movq (%rsp), %rsi
movl $0x61, %edx
callq 0x13ef
movq %r14, %rdi
callq 0x1eff
jmp 0x1d97
movq %r14, %rdi
movq %r12, %rsi
callq 0x1f73
jmp 0x1d97
movq %r14, %rdi
movq (%rsp), %rsi
movl $0x61, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/small_sort.c
// Function: return_to_a
static void	return_to_a(t_stack *stack)
{
	if (!stack->b)
		return ;
	if (stack->b->next)
		if (stack->b->index < stack->b->next->index)
			swap(&stack->b, &stack->instr, 'b');
	push(&stack->b, &stack->a, &stack->instr, 'a');
	if (stack->a->index > stack->a->next->index)
		swap(&stack->a, &stack->instr, 'a');
	return_to_a(stack);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x10(%rdi), %r15
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1f6d
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x1f39
movl 0x4(%rax), %eax
cmpl 0x4(%rcx), %eax
jge 0x1f39
movq %r14, %rdi
movq %r15, %rsi
movl $0x62, %edx
callq 0x12b8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x61, %ecx
callq 0x131c
movq (%rbx), %rax
movl 0x4(%rax), %ecx
movq 0x8(%rax), %rax
cmpl 0x4(%rax), %ecx
jle 0x1f0f
movq %rbx, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x12b8
jmp 0x1f0f
popq %rbx
popq %r14
popq %r15
retq