LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_flush
static lso_nargs_t lso_flush(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	int mode = lso_imode(luaL_optstring(L, 2, "n"), S->obuf.mode);
	int error;

	if ((error = lso_prepsnd(L, S)) || (error = lso_doflush(S, mode))) {
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	} else {
		lua_pushboolean(L, 1);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x16f98
movq %rax, %r15
leaq 0x1a762(%rip), %rdx     # 0x308fa
pushq $0x2
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
callq 0xf900
movl 0xa8(%r15), %esi
movq %rax, %rdi
callq 0x17631
movl %eax, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1834f
testl %eax, %eax
jne 0x161d7
movq %r15, %rdi
movl %r12d, %esi
callq 0x17161
testl %eax, %eax
je 0x161f9
movl %eax, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %ebp, %rsi
movq %r14, %rdi
callq 0xf960
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x108d0
jmp 0x161ee
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_uncork
static lso_nargs_t lso_uncork(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	int error;

	if ((error = so_uncork(S->socket))) {
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	} else {
		lua_pushboolean(L, 1);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
callq 0x101f0
testl %eax, %eax
je 0x1623f
movl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rbp
jmp 0x1624c
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x108d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_pending
static lso_nargs_t lso_pending(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);

	lua_pushunsigned(L, fifo_rlen(&S->ibuf.fifo));
	lua_pushunsigned(L, fifo_rlen(&S->obuf.fifo));

	return 2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
movq 0x80(%rax), %rsi
movq %rbx, %rdi
callq 0xf960
movq 0xe8(%r14), %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_sendfd3
static lso_nargs_t lso_sendfd3(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	const void *src;
	size_t len;
	int fd, error;

	if ((error = lso_prepsnd(L, S)))
		goto error;

	lua_settop(L, 3);

	src = luaL_checklstring(L, 2, &len);

	if ((fd = lso_tofileno(L, 3)) < 0)
		goto badfd;

	so_clear(S->socket);

	if ((error = so_sendmsg(S->socket, so_fdmsg(src, len, fd), 0)))
		goto error;

	lua_pushboolean(L, 1);

	return 1;
badfd:
	error = EBADF;
error:
	lua_pushboolean(L, 0);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1834f
testl %eax, %eax
je 0x162de
movl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x3
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x106f0
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xf660
movq %rax, %r15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18563
testl %eax, %eax
js 0x163ac
movl %eax, %ebp
movq 0x128(%r14), %rdi
callq 0xf890
movq 0x128(%r14), %rdi
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
andl $0x0, 0x8(%rsi)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movq $0x1, 0x18(%rsi)
xorps %xmm0, %xmm0
leaq 0x58(%rsp), %rcx
movups %xmm0, 0x10(%rcx)
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x30(%rcx)
movq %rcx, 0x20(%rsi)
andl $0x0, 0x30(%rsi)
movq 0x8(%rsp), %rdx
movq %r15, (%rax)
movq %rdx, 0x8(%rax)
movq $0x18, 0x28(%rsi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%rcx)
movq $0x14, (%rcx)
movl %ebp, 0x10(%rcx)
xorl %edx, %edx
callq 0xf540
testl %eax, %eax
jne 0x162b4
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x108d0
jmp 0x162ce
pushq $0x9
popq %rbp
jmp 0x162b6
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_pack4
static lso_nargs_t lso_pack4(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	lua_Number value;
	unsigned count;
	int mode, error;

	if ((error = lso_prepsnd(L, S)))
		goto error;

	lua_settop(L, 4);

	value = luaL_checknumber(L, 2);
	count = luaL_optunsigned(L, 3, 32);
	mode = lso_imode(luaL_optstring(L, 4, ""), S->obuf.mode);

	if ((error = fifo_pack(&S->obuf.fifo, (unsigned long long)(long long)value, count)))
		goto error;

	so_clear(S->socket);

	if ((error = lso_doflush(S, mode)))
		goto error;

	lua_pushboolean(L, 1);

	return 1;
error:
	lua_pushboolean(L, 0);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1834f
testl %eax, %eax
je 0x16628
movl %eax, %r13d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %r13d, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x106f0
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x10a00
movsd %xmm0, 0x10(%rsp)
pushq $0x3
popq %rsi
pushq $0x20
popq %rdx
movq %rbx, %rdi
callq 0xf420
movq %rax, %r15
leaq 0x1d99d(%rip), %rdx     # 0x33ffb
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0xf900
movl 0xa8(%r14), %esi
movq %rax, %rdi
callq 0x17631
movl %eax, %ebp
movq %r14, %r12
addq $0xc0, %r12
movzbl 0xf3(%r14), %eax
movq 0xd8(%r14), %rcx
subq 0xe8(%r14), %rcx
shlq $0x3, %rcx
subq %rax, %rcx
addq $0x8, %rcx
movl %r15d, %eax
cmpq %rax, %rcx
jae 0x166c1
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x18027
testl %eax, %eax
jne 0x165fc
movl %ebp, 0x4(%rsp)
movq %rbx, 0x8(%rsp)
cvttsd2si 0x10(%rsp), %r13
pushq $0x8
popq %rbp
pushq $-0x1
popq %rbx
testl %r15d, %r15d
je 0x1673e
movzbl 0xf3(%r14), %edx
movl %ebp, %eax
subl %edx, %eax
cmpl %eax, %r15d
cmovbl %r15d, %eax
movl %ebx, %edi
movl %eax, %ecx
shll %cl, %edi
movzbl 0xf2(%r14), %r8d
shll %cl, %r8d
subl %eax, %r15d
movq %r13, %rsi
movl %r15d, %ecx
shrq %cl, %rsi
notl %edi
andl %edi, %esi
orl %r8d, %esi
movb %sil, 0xf2(%r14)
addl %edx, %eax
movb %al, 0xf3(%r14)
cmpb $0x8, %al
jb 0x166d7
movzbl %sil, %esi
movq %r12, %rdi
callq 0x18505
andw $0x0, 0xf2(%r14)
jmp 0x166d7
movq 0x128(%r14), %rdi
callq 0xf890
movq %r14, %rdi
movl 0x4(%rsp), %esi
callq 0x17161
testl %eax, %eax
je 0x16767
movl %eax, %r13d
movq 0x8(%rsp), %rbx
jmp 0x165ff
pushq $0x1
popq %rbp
movq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x108d0
jmp 0x16617
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_unpack2
static lso_nargs_t lso_unpack2(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	unsigned long long value;
	unsigned count;
	int error;

	if ((error = lso_preprcv(L, S)))
		goto error;

	lua_settop(L, 2);

	count = luaL_optunsigned(L, 2, 32);

	if (fifo_rbits(&S->ibuf.fifo) < count) {
		size_t rem = ((count - fifo_rbits(&S->ibuf.fifo)) + 7U) / 8U;

		if ((error = lso_fill(S, rem))) {
			if (fifo_rbits(&S->ibuf.fifo) < count)
				goto error;
		}
	}

	value = fifo_unpack(&S->ibuf.fifo, count);

	if (value == (unsigned long long)(lua_Integer)value)
		lua_pushinteger(L, (lua_Integer)value);
	else if (value == (unsigned long long)(lua_Number)value)
		lua_pushnumber(L, (lua_Number)value);
	else
		goto range;

	return 1;
range:
	error = ERANGE;
error:
	lua_pushnil(L);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17a46
testl %eax, %eax
je 0x167cc
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf9d0
movslq %ebp, %r12
pushq $0x2
popq %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf960
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x106f0
pushq $0x20
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf420
movq %rax, %r15
movzbl 0x89(%r14), %eax
movq 0x80(%r14), %rcx
leaq (%rax,%rcx,8), %rcx
movl %r15d, %r12d
cmpq %r12, %rcx
jae 0x16844
movq %r12, %rsi
subq %rcx, %rsi
addq $0x7, %rsi
shrq $0x3, %rsi
movq %r14, %rdi
callq 0x17b10
movl %eax, %ebp
testl %eax, %eax
setne %dl
movzbl 0x89(%r14), %eax
movq 0x80(%r14), %rcx
leaq (%rax,%rcx,8), %rcx
cmpq %r12, %rcx
setb %sil
testb %sil, %dl
jne 0x167a2
pushq $0x1
popq %rbp
cmpq %r12, %rcx
jae 0x16854
xorl %r12d, %r12d
jmp 0x167b0
movq %r14, %rcx
addq $0x58, %rcx
movq %rcx, (%rsp)
xorl %r12d, %r12d
pushq $-0x1
popq %r13
testl %r15d, %r15d
je 0x168dc
testb %al, %al
je 0x1687b
movb 0x88(%r14), %bpl
movzbl %al, %eax
jmp 0x168ac
cmpq $0x0, 0x80(%r14)
je 0x1689f
movq 0x68(%r14), %rax
movq 0x78(%r14), %rcx
movb (%rax,%rcx), %bpl
movq (%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x17320
jmp 0x168a2
movb $-0x1, %bpl
movb %bpl, 0x88(%r14)
pushq $0x8
popq %rax
cmpl %eax, %r15d
movl %eax, %edx
cmovbl %r15d, %edx
movl %r13d, %esi
movl %edx, %ecx
shll %cl, %esi
shlq %cl, %r12
notl %esi
movzbl %bpl, %edi
subl %edx, %eax
movl %eax, %ecx
shrl %cl, %edi
andl %esi, %edi
orq %rdi, %r12
movb %al, 0x89(%r14)
subl %edx, %r15d
jmp 0x16866
pushq $0x1
jmp 0x167af
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_fill2
static lso_nargs_t lso_fill2(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	size_t size = lso_checksize(L, 2);
	int error;

	if ((error = lso_preprcv(L, S)) || (error = lso_fill(S, size))) {
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	}

	lua_pushboolean(L, 1);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x16f98
movq %rax, %r15
pushq $0x2
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x183e5
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a46
testl %eax, %eax
jne 0x16924
movq %r15, %rdi
movq %r12, %rsi
callq 0x17b10
testl %eax, %eax
je 0x16946
movl %eax, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %ebp, %rsi
movq %r14, %rdi
callq 0xf960
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x108d0
jmp 0x1693b
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_clear
static lso_nargs_t lso_clear(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);

	so_clear(S->socket);

	lua_pushboolean(L, 1);

	return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
callq 0xf890
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x108d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_events
static lso_nargs_t lso_events(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	short events = so_events(S->socket);
	char mode[3], *p = mode;

	if ((events & POLLIN))
		*p++ = 'r';

	if ((events & POLLOUT))
		*p++ = 'w';

	lua_pushlstring(L, mode, p - mode);

	return 1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
callq 0x10260
testb $0x1, %al
jne 0x169cb
leaq 0xd(%rsp), %rdx
jmp 0x169d4
leaq 0xe(%rsp), %rdx
movb $0x72, -0x1(%rdx)
testb $0x4, %al
je 0x169de
movb $0x77, (%rdx)
incq %rdx
leaq 0xd(%rsp), %rsi
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xf4e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_timeout
static lso_nargs_t lso_timeout(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);

	if (isnormal(S->timeout) || S->timeout == 0) {
		lua_pushnumber(L, S->timeout);

		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x16f98
movq 0x140(%rax), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $-0x10000000000000, %rcx # imm = 0xFFF0000000000000
addq %rax, %rcx
shrq $0x35, %rcx
cmpl $0x3ff, %ecx            # imm = 0x3FF
jb 0x16a39
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x16a44
jp 0x16a44
movq %rbx, %rdi
callq 0xf2d0
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_shutdown
static lso_nargs_t lso_shutdown(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	int how, error;

	switch (luaL_checkoption(L, 2, "rw", (const char *[]){ "r", "w", "rw", "wr", 0 })) {
	case 0:
		how = SHUT_RD;

		break;
	case 1:
		how = SHUT_WR;

		break;
	default:
		how = SHUT_RDWR;

		break;
	} /* switch() */

	if ((error = so_shutdown(S->socket, how))) {
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	} else {
		lua_pushboolean(L, 1);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
movups 0x2b808(%rip), %xmm0    # 0x42268
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movups 0x2b80b(%rip), %xmm0    # 0x42278
movaps %xmm0, 0x10(%rcx)
movq 0x2b810(%rip), %rax     # 0x42288
movq %rax, 0x20(%rcx)
leaq 0x19c8a(%rip), %rdx     # 0x3070d
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xfc40
xorl %esi, %esi
cmpl $0x1, %eax
setne %sil
incl %esi
testl %eax, %eax
cmovel %eax, %esi
movq 0x128(%r14), %rdi
callq 0x10560
testl %eax, %eax
je 0x16aca
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x108d0
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf960
jmp 0x16ad7
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x108d0
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_eof
static lso_nargs_t lso_eof(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	const char *which = luaL_optstring(L, 2, "rw");
	int nret = 0;

	for (; *which; which++) {
		switch (*which) {
		case 'r':
			lua_pushboolean(L, S->ibuf.eof);
			nret++;

			break;
		case 'w':
			lua_pushboolean(L, S->obuf.eof);
			nret++;

			break;
		}
	} /* for() */

	return nret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x16f98
movq %rax, %r14
leaq 0x19c10(%rip), %rdx     # 0x3070d
xorl %r15d, %r15d
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xf900
movq %rax, %r12
leaq 0xf8(%r14), %r13
addq $0x90, %r14
movzbl (%r12), %eax
movq %r14, %rcx
cmpl $0x72, %eax
je 0x16b39
cmpl $0x77, %eax
je 0x16b36
testl %eax, %eax
jne 0x16b47
jmp 0x16b4c
movq %r13, %rcx
movzbl (%rcx), %esi
movq %rbx, %rdi
callq 0x108d0
incl %r15d
incq %r12
jmp 0x16b1e
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_accept
static lso_nargs_t lso_accept(lua_State *L) {
	struct luasocket *A = lso_checkself(L, 1), *S;
	struct so_options opts;
	int fd = -1, error;

	if (lua_istable(L, 2)) {
		opts = lso_checkopts(L, 2);
	} else {
		opts = *so_opts();
	}

	S = lso_newsocket(L, A->type);

	opts.fd_close.arg = S;
	opts.fd_close.cb = &lso_closefd;

	so_clear(A->socket);

	if (-1 == (fd = so_accept(A->socket, 0, 0, &error)))
		goto error;

	if ((error = lso_prepsocket(S)))
		goto error;

	if (!(S->socket = so_fdopen(fd, &opts, &error)))
		goto error;

	return 1;
error:
	cqs_closefd(&fd);
	lua_pushnil(L);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
callq 0x16f98
movq %rax, %r15
pushq $0x2
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0xf270
cmpl $0x5, %eax
jne 0x16b94
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
movq %r14, %rsi
callq 0x185e2
jmp 0x16be6
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movw $0x100, 0x20(%rsp)      # imm = 0x100
andl $0x0, 0x22(%rsp)
andw $0x0, 0x26(%rsp)
movups %xmm0, 0x2f(%rsp)
movups %xmm0, 0x3f(%rsp)
movb $0x0, 0x4f(%rsp)
andl $0x0, 0x59(%rsp)
andl $0x0, 0x5c(%rsp)
andl $0x0, 0x28(%rsp)
movw $0x101, 0x2c(%rsp)      # imm = 0x101
movb $0x1, %al
movb %al, 0x2e(%rsp)
movq $0x1, 0x50(%rsp)
movb %al, 0x58(%rsp)
movl 0x120(%r15), %esi
movq %r14, %rdi
callq 0x14c41
movq %rax, %r12
movq %rax, 0x38(%rsp)
leaq -0x1ec6(%rip), %rax     # 0x14d3e
movq %rax, 0x40(%rsp)
movq 0x128(%r15), %rdi
callq 0xf890
movq 0x128(%r15), %rdi
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x10060
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0x16c45
movl %eax, %ebp
movq %r12, %rdi
callq 0x1518e
movl %eax, 0x8(%rsp)
testl %eax, %eax
je 0x16c73
leaq 0xc(%rsp), %rdi
callq 0x1531b
movq %r14, %rdi
callq 0xf9d0
movslq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xf960
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movl %ebp, %edi
callq 0xf300
movq %rax, 0x128(%r12)
testq %rax, %rax
je 0x16c45
pushq $0x1
popq %rbx
jmp 0x16c64
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_peername
static lso_nargs_t lso_peername(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	struct sockaddr_storage ss;
	socklen_t salen = sizeof ss;
	int error;

	memset(&ss, 0, sizeof ss);

	if ((error = so_remoteaddr(S->socket, &ss, &salen))) {
		lua_pushnil(L);
		lua_pushinteger(L, error);

		return 2;
	}

	return lso_pushname(L, &ss, salen);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x16f98
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movq 0x128(%rax), %rdi
callq 0xf9a0
testl %eax, %eax
je 0x16d03
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf9d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rax
jmp 0x16d14
movl 0xc(%rsp), %edx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x18deb
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_peereid
static lso_nargs_t lso_peereid(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	uid_t uid;
	gid_t gid;
	int error;

	if ((error = so_peereid(S->socket, &uid, &gid))) {
		lua_pushnil(L);
		lua_pushinteger(L, error);

		return 2;
	}

	lua_pushinteger(L, uid);
	lua_pushinteger(L, gid);

	return 2;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x10990
testl %eax, %eax
je 0x16d50
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf9d0
movslq %ebp, %rsi
jmp 0x16d5f
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xf960
movl (%rsp), %esi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_peerpid
static lso_nargs_t lso_peerpid(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	pid_t pid;
	int error;

	if ((error = so_peerpid(S->socket, &pid))) {
		lua_pushnil(L);
		lua_pushinteger(L, error);

		return 2;
	}

	lua_pushinteger(L, pid);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
leaq 0xc(%rsp), %rsi
callq 0x10a20
testl %eax, %eax
je 0x16da6
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf9d0
pushq $0x2
popq %r14
jmp 0x16dae
pushq $0x1
popq %r14
movl 0xc(%rsp), %ebp
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_localname
static lso_nargs_t lso_localname(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	struct sockaddr_storage ss;
	socklen_t salen = sizeof ss;
	int error;

	memset(&ss, 0, sizeof ss);

	if ((error = so_localaddr(S->socket, &ss, &salen))) {
		lua_pushnil(L);
		lua_pushinteger(L, error);

		return 2;
	}

	return lso_pushname(L, &ss, salen);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
callq 0x16f98
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movq 0x128(%rax), %rdi
callq 0x10140
testl %eax, %eax
je 0x16e32
movl %eax, %ebp
movq %rbx, %rdi
callq 0xf9d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rax
jmp 0x16e43
movl 0xc(%rsp), %edx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x18deb
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_stat
static lso_nargs_t lso_stat(lua_State *L) {
	struct luasocket *S = lso_checkself(L, 1);
	const struct so_stat *st = so_stat(S->socket);

	lua_newtable(L);

	lua_newtable(L);
	lua_pushinteger(L, st->sent.count);
	lua_setfield(L, -2, "count");
	lua_pushboolean(L, st->sent.eof);
	lua_setfield(L, -2, "eof");
	lua_pushinteger(L, st->sent.time);
	lua_setfield(L, -2, "time");
	lua_setfield(L, -2, "sent");

	lua_newtable(L);
	lua_pushinteger(L, st->rcvd.count);
	lua_setfield(L, -2, "count");
	lua_pushboolean(L, st->rcvd.eof);
	lua_setfield(L, -2, "eof");
	lua_pushinteger(L, st->rcvd.time);
	lua_setfield(L, -2, "time");
	lua_setfield(L, -2, "rcvd");

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x16f98
movq 0x128(%rax), %rdi
callq 0xff90
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10270
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10270
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xf960
leaq 0x192f0(%rip), %r15     # 0x30189
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xf550
movzbl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x108d0
leaq 0x197ca(%rip), %r12     # 0x30687
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xf550
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0xf960
leaq 0x19a05(%rip), %r13     # 0x308e2
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0xf550
leaq 0x199f6(%rip), %rdx     # 0x308e7
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf550
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10270
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf960
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xf550
movzbl 0x20(%r14), %esi
movq %rbx, %rdi
callq 0x108d0
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xf550
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0xf960
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0xf550
leaq 0x19992(%rip), %rdx     # 0x308ec
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf550
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_checktodo
static lso_error_t lso_checktodo(struct luasocket *S) {
	int todo, error;

	while ((todo = (S->todo & ~S->done))) {
		if (todo & LSO_DO_FLUSH) {
			so_clear(S->socket);

			if ((error = lso_doflush(S, LSO_NOBUF)))
				return error;

			S->done |= LSO_DO_FLUSH;
		} else if (todo & LSO_DO_STARTTLS) {
			so_clear(S->socket);

			if (!S->tls.once) {
				S->tls.once = 1;

				if (S->ibuf.mode & LSO_PUSHBACK)
					fifo_rvec(&S->ibuf.fifo, &S->tls.config.pushback, 1);

				error = so_starttls(S->socket, &S->tls.config);

				if (S->ibuf.mode & LSO_PUSHBACK) {
					fifo_purge(&S->ibuf.fifo);
					S->ibuf.eom = 0;
				}
			} else {
				error = so_starttls(S->socket, NULL);
			}

			if (S->tls.config.instance) {
				SSL_free(S->tls.config.instance);
				S->tls.config.instance = NULL;
			}

			if (S->tls.config.context) {
				SSL_CTX_free(S->tls.config.context);
				S->tls.config.context = NULL;
			}

			if (error)
				return error;

			S->done |= LSO_DO_STARTTLS;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
leaq 0x28(%rdi), %r15
leaq 0x10(%rdi), %r12
leaq 0x78(%rdi), %rbp
movl 0x4(%rdi), %eax
notl %eax
andl (%rbx), %eax
testl %eax, %eax
je 0x1714c
testb $0x1, %al
jne 0x170b3
testb $0x2, %al
je 0x1707e
movq 0x128(%rbx), %rdi
callq 0xf890
cmpb $0x0, 0x8(%rbx)
je 0x170d1
movq 0x128(%rbx), %rdi
xorl %esi, %esi
callq 0x10530
movl %eax, %r13d
jmp 0x17113
movq 0x128(%rbx), %rdi
callq 0xf890
movq %rbx, %rdi
pushq $0x4
popq %rsi
callq 0x17161
movl %eax, %r13d
pushq $0x1
jmp 0x1713b
movb $0x1, 0x8(%rbx)
testb $0x40, 0x40(%rbx)
je 0x170e9
movq %r14, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0x17262
movq 0x128(%rbx), %rdi
movq %r12, %rsi
callq 0x10530
movl %eax, %r13d
testb $0x40, 0x40(%rbx)
je 0x17113
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
andl $0x0, 0x10(%rbp)
movb $0x0, 0x91(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x17126
callq 0xf7b0
andq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17139
callq 0xf0f0
andq $0x0, 0x18(%rbx)
pushq $0x2
popq %rax
testl %r13d, %r13d
jne 0x1714f
orl 0x4(%rbx), %eax
movl %eax, 0x4(%rbx)
jmp 0x1707a
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_doflush
static lso_error_t lso_doflush(struct luasocket *S, int mode) {
	size_t amount = 0, n;
	struct iovec iov;
	int error;

	if (mode & LSO_LINEBUF) {
		if (S->obuf.eol > 0) {
			amount = S->obuf.eol;
		} else if (fifo_rlen(&S->obuf.fifo) >= S->obuf.maxline) {
			amount = S->obuf.maxline;
		}
	} else if (mode & LSO_FULLBUF) {
		amount = fifo_rlen(&S->obuf.fifo);
		amount -= amount % S->obuf.bufsiz;
	} else if (mode & LSO_NOBUF) {
		amount = fifo_rlen(&S->obuf.fifo);
	}

	while (amount) {
		if (!fifo_slice(&S->obuf.fifo, &iov, 0, amount))
			break; /* should never happen */

		if (!(n = so_write(S->socket, iov.iov_base, iov.iov_len, &error)))
			goto error;

		fifo_discard(&S->obuf.fifo, n);
		amount -= n;
		S->obuf.eol -= MIN(S->obuf.eol, n);
	}

	return 0;
error:
	switch (error) {
	case EPIPE:
		S->obuf.eof = 1;

		break;
	} /* switch() */

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testb $0x1, %sil
jne 0x17189
testb $0x2, %sil
jne 0x171ac
testb $0x4, %sil
jne 0x171c4
xorl %r14d, %r14d
jmp 0x171cb
movq 0x100(%rbx), %r14
testq %r14, %r14
jne 0x171cb
movq 0xb0(%rbx), %rax
xorl %r14d, %r14d
cmpq %rax, 0xe8(%rbx)
cmovaeq %rax, %r14
jmp 0x171cb
movq 0xe8(%rbx), %r14
movq %r14, %rax
xorl %edx, %edx
divq 0xb8(%rbx)
subq %rdx, %r14
jmp 0x171cb
movq 0xe8(%rbx), %r14
leaq 0xc0(%rbx), %r12
leaq 0x8(%rsp), %r13
xorl %r15d, %r15d
testq %r14, %r14
je 0x17250
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x172bc
testq %rax, %rax
je 0x17250
movq 0x128(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x4(%rsp), %rcx
callq 0xf400
testq %rax, %rax
je 0x1723a
movq %rax, %rbp
movq %r12, %rdi
movq %rax, %rsi
callq 0x17320
subq %rbp, %r14
movq 0x100(%rbx), %rax
subq %rbp, %rax
cmovbq %r15, %rax
movq %rax, 0x100(%rbx)
jmp 0x171da
movl 0x4(%rsp), %r15d
cmpl $0x20, %r15d
jne 0x17250
movb $0x1, 0xf8(%rbx)
pushq $0x20
popq %r15
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_rvec
static size_t fifo_rvec(struct fifo *fifo, struct iovec *iov, _Bool realign) {
	if (fifo->head + fifo->count > fifo->size && realign)
		fifo_realign(fifo);

	iov->iov_base = &fifo->base[fifo->head];
	iov->iov_len  = FIFO_MIN(fifo->size - fifo->head, fifo->count);

	return iov->iov_len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorb $0x1, %dl
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %rcx
leaq (%rcx,%rsi), %rdi
cmpq %rax, %rdi
setbe %dil
orb %dl, %dil
jne 0x1729f
movq %r14, %rdi
callq 0x1526f
movq 0x18(%r14), %rax
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rcx
subq %rsi, %rax
addq 0x10(%r14), %rsi
movq %rsi, (%rbx)
cmpq %rcx, %rax
cmovaeq %rcx, %rax
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_slice
FIFO_NOTUSED static size_t fifo_slice(struct fifo *fifo, struct iovec *iov, size_t p, size_t count) {
	size_t pe;

	if (p > fifo->count) {
		iov->iov_base = 0;
		iov->iov_len  = 0;

		return 0;
	}

	count = FIFO_MIN(count, fifo->count - p);
	pe    = p + count;

	if (fifo->head + p < fifo->size && fifo->head + pe > fifo->size)
		fifo_realign(fifo);

	iov->iov_base = &fifo->base[((fifo->head + p) % fifo->size)];
	iov->iov_len  = count;

	return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %rax
cmpq %rdx, %rax
cmovbq %rax, %rbx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %rax
cmpq %rcx, %rax
setb %dl
leaq (%rax,%rbx), %rsi
cmpq %rcx, %rsi
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x17307
movq %r15, %rdi
callq 0x1526f
movq 0x18(%r15), %rcx
movq 0x20(%r15), %rax
xorl %edx, %edx
divq %rcx
addq 0x10(%r15), %rdx
movq %rdx, (%r14)
movq %rbx, 0x8(%r14)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_discard
static inline size_t fifo_discard(struct fifo *fifo, size_t count) {
	count       = FIFO_MIN(count, fifo->count);
	fifo->head  = (fifo->head + count) % fifo->size;
	fifo->count -= count;
#if FIFO_AUTOALIGN
	if (!fifo->count)
		fifo->head = 0;
#endif
	return count;
}

// Assembly:
movq 0x28(%rdi), %rcx
cmpq %rsi, %rcx
movq %rsi, %r8
cmovbq %rcx, %r8
movq 0x20(%rdi), %rax
addq %r8, %rax
xorl %edx, %edx
divq 0x18(%rdi)
movq %rcx, %rax
subq %r8, %rax
movq %rdx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
cmpq %rsi, %rcx
ja 0x17353
andq $0x0, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_setvbuf_
static lso_nargs_t lso_setvbuf_(struct lua_State *L, struct luasocket *S, int modeidx, int bufidx) {
	lso_pushmode(L, S->obuf.mode, LSO_WRMASK, 1);
	lua_pushinteger(L, S->obuf.bufsiz);

	S->obuf.mode = lso_checkvbuf(L, modeidx) | (S->obuf.mode & ~LSO_ALLBUF);

	if (S->obuf.mode & (LSO_LINEBUF|LSO_FULLBUF))
		S->obuf.bufsiz = lso_optsize(L, bufidx, LSO_BUFSIZ);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movl 0xa8(%rsi), %esi
pushq $-0x41
popq %rdx
pushq $0x1
popq %r15
movl %r15d, %ecx
callq 0x17412
movq 0xb8(%rbx), %rsi
movq %r14, %rdi
callq 0xf960
movq 0x2aeca(%rip), %rax     # 0x42260
movq %rsp, %rcx
movq %rax, 0x20(%rcx)
movups 0x2aeac(%rip), %xmm0    # 0x42250
movaps %xmm0, 0x10(%rcx)
movups 0x2ae91(%rip), %xmm0    # 0x42240
movaps %xmm0, (%rcx)
leaq 0x194e5(%rip), %rdx     # 0x3089e
movq %r14, %rdi
movl %r12d, %esi
callq 0xfc40
xorl %ecx, %ecx
cmpl $0x1, %eax
setne %cl
leal 0x2(,%rcx,2), %ecx
testl %eax, %eax
cmovel %r15d, %ecx
movl 0xa8(%rbx), %eax
andl $-0x8, %eax
orl %ecx, %eax
movl %eax, 0xa8(%rbx)
testb $0x3, %cl
je 0x17405
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
movl %ebp, %esi
callq 0x174df
movq %rax, 0xb8(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_pushmode
static void lso_pushmode(lua_State *L, int mode, int mask, _Bool libc) {
	if (libc) {
		if (mode & LSO_NOBUF)
			lua_pushstring(L, "no");
		else if (mode & LSO_LINEBUF)
			lua_pushstring(L, "line");
		else if (mode & LSO_FULLBUF)
			lua_pushstring(L, "full");
		else
			lua_pushnil(L); /* XXX: shouldn't happen */
	} else {
		char flag[8], *p = flag;

		if (mode & LSO_TEXT)
			*p++ = 't';
		else if (mode & LSO_BINARY)
			*p++ = 'b';
		else
			*p++ = '-';

		if (mode & LSO_NOBUF)
			*p++ = 'n';
		else if (mode & LSO_LINEBUF)
			*p++ = 'l';
		else if (mode & LSO_FULLBUF)
			*p++ = 'f';
		else
			*p++ = '-';

		if (mask & LSO_AUTOFLUSH)
			*p++ = (mode & LSO_AUTOFLUSH)? 'a' : 'A';

		if (mask & LSO_PUSHBACK)
			*p++ = (mode & LSO_PUSHBACK)? 'p' : 'P';

		lua_pushlstring(L, flag, p - flag);
	}
}

// Assembly:
testl %ecx, %ecx
je 0x17431
testb $0x4, %sil
jne 0x17444
testb $0x1, %sil
jne 0x17456
testb $0x2, %sil
jne 0x174d3
jmp 0xf9d0
pushq %rax
testb $0x8, %sil
jne 0x17450
testb $0x10, %sil
jne 0x17462
movb $0x2d, (%rsp)
jmp 0x17466
leaq 0x19bf5(%rip), %rsi     # 0x31040
jmp 0xfc50
movb $0x74, (%rsp)
jmp 0x17466
leaq 0x19441(%rip), %rsi     # 0x3089e
jmp 0xfc50
movb $0x62, (%rsp)
testb $0x4, %sil
jne 0x17488
testb $0x1, %sil
jne 0x1748c
testb $0x2, %sil
leaq 0x2(%rsp), %rax
pushq $0x2d
popq %r8
pushq $0x66
popq %rcx
cmovel %r8d, %ecx
jmp 0x17493
movb $0x6e, %cl
jmp 0x1748e
movb $0x6c, %cl
leaq 0x2(%rsp), %rax
movb %cl, 0x1(%rsp)
testb $0x20, %dl
je 0x174ac
movl %esi, %ecx
andb $0x20, %cl
orb $0x41, %cl
leaq 0x3(%rsp), %rax
movb %cl, -0x1(%rax)
testb $0x40, %dl
je 0x174c3
movzbl %sil, %ecx
shrl $0x6, %ecx
shlb $0x5, %cl
orb $0x50, %cl
movb %cl, (%rax)
incq %rax
movq %rsp, %rsi
subq %rsi, %rax
movq %rax, %rdx
callq 0xf4e0
popq %rax
retq
leaq 0x19207(%rip), %rsi     # 0x306e1
jmp 0xfc50
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_optsize
static size_t lso_optsize(struct lua_State *L, int index, size_t def) {
	lua_Number size;

	if (lua_isnoneornil(L, index))
		return def;

	size = luaL_checknumber(L, index);

	if (size < 0 || isinf(size))
		return LSO_INFSIZ;

	return (size > 0)? (size_t)size : def;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0xf270
testl %eax, %eax
jle 0x17591
movq %r14, %rdi
movl %ebp, %esi
callq 0x10a00
movq %xmm0, %rax
testq %rax, %rax
sets %cl
btrq $0x3f, %rax
leaq -0x1(%rax), %rdx
movabsq $0xfffffffffffff, %rsi  # imm = 0xFFFFFFFFFFFFF
cmpq %rsi, %rdx
setb %dl
andb %cl, %dl
movabsq $0x7ff0000000000000, %rsi # imm = 0x7FF0000000000000
cmpq %rsi, %rax
sete %sil
orb %dl, %sil
movabsq $-0x10000000000000, %rdx # imm = 0xFFF0000000000000
addq %rax, %rdx
shrq $0x35, %rdx
cmpl $0x3ff, %edx            # imm = 0x3FF
setb %al
andb %cl, %al
orb %sil, %al
je 0x17562
pushq $-0x1
popq %rbx
jmp 0x17591
cvttsd2si %xmm0, %rax
movq %rax, %rcx
movapd %xmm0, %xmm1
subsd 0x18aba(%rip), %xmm1    # 0x30030
sarq $0x3f, %rcx
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
cmovaq %rdx, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_setmode_
static lso_nargs_t lso_setmode_(struct lua_State *L, struct luasocket *S, int ridx, int widx) {
	lso_pushmode(L, S->ibuf.mode, LSO_RDMASK, 0);
	lso_pushmode(L, S->obuf.mode, LSO_WRMASK, 0);

	if (!lua_isnil(L, ridx))
		S->ibuf.mode = LSO_RDMASK & lso_imode(luaL_checkstring(L, ridx), LSO_INITMODE);

	if (!lua_isnil(L, widx))
		S->obuf.mode = LSO_WRMASK & lso_imode(luaL_checkstring(L, widx), LSO_INITMODE);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl 0x40(%rsi), %esi
pushq $-0x28
popq %rdx
xorl %ecx, %ecx
callq 0x17412
movl 0xa8(%rbx), %esi
pushq $-0x41
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x17412
movq %r14, %rdi
movl %r15d, %esi
callq 0xf270
testl %eax, %eax
je 0x175f8
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0xf660
pushq $0x69
popq %rsi
movq %rax, %rdi
callq 0x17631
andl $-0x28, %eax
movl %eax, 0x40(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0xf270
testl %eax, %eax
je 0x17626
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xf660
pushq $0x69
popq %rsi
movq %rax, %rdi
callq 0x17631
andl $-0x41, %eax
movl %eax, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_imode
static int lso_imode(const char *str, int init) {
	int mode = init, ch;

	while ((ch = *str++)) {
		switch (ch) {
		case 'n':
			mode = LSO_NOBUF | (mode & ~LSO_ALLBUF);
			break;
		case 'l':
			mode = LSO_LINEBUF | (mode & ~LSO_ALLBUF);
			break;
		case 'f':
			mode = LSO_FULLBUF | (mode & ~LSO_ALLBUF);
			break;
		case 't':
			mode = LSO_TEXT | (mode & ~LSO_BINARY);
			break;
		case 'b':
			mode = LSO_BINARY | (mode & ~LSO_TEXT);
			break;
		case 'a':
			mode |= LSO_AUTOFLUSH;
			break;
		case 'A':
			mode &= ~LSO_AUTOFLUSH;
			break;
		case 'p':
			mode |= LSO_PUSHBACK;
			break;
		case 'P':
			mode &= ~LSO_PUSHBACK;
			break;
		} /* switch() */
	} /* while() */

	return mode;
}

// Assembly:
movl %esi, %eax
leaq 0x18f06(%rip), %rcx     # 0x30540
movzbl (%rdi), %edx
incq %rdi
leal -0x6c(%rdx), %esi
cmpl $0x8, %esi
jbe 0x17667
cmpl $0x41, %edx
je 0x176a6
cmpl $0x50, %edx
je 0x1769c
cmpl $0x61, %edx
je 0x176a1
cmpl $0x62, %edx
je 0x1768c
cmpl $0x66, %edx
je 0x17694
testl %edx, %edx
jne 0x1763a
jmp 0x176ab
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
andl $-0x8, %eax
incl %eax
jmp 0x1763a
orl $0x40, %eax
jmp 0x1763a
andl $-0x19, %eax
orl $0x8, %eax
jmp 0x1763a
andl $-0x8, %eax
orl $0x4, %eax
jmp 0x1763a
andl $-0x19, %eax
orl $0x10, %eax
jmp 0x1763a
andl $-0x8, %eax
orl $0x2, %eax
jmp 0x1763a
andl $-0x41, %eax
jmp 0x1763a
orl $0x20, %eax
jmp 0x1763a
andl $-0x21, %eax
jmp 0x1763a
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_setbufsiz_
static lso_nargs_t lso_setbufsiz_(struct lua_State *L, struct luasocket *S, int ridx, int widx) {
	lso_pushsize(L, S->ibuf.bufsiz);
	lso_pushsize(L, S->obuf.bufsiz);

	S->ibuf.bufsiz = lso_optsize(L, ridx, S->ibuf.bufsiz);
	S->obuf.bufsiz = lso_optsize(L, widx, S->obuf.bufsiz);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq 0x50(%rsi), %rsi
callq 0x1770c
movq 0xb8(%rbx), %rsi
movq %r15, %rdi
callq 0x1770c
movq 0x50(%rbx), %rdx
movq %r15, %rdi
movl %r14d, %esi
callq 0x174df
movq %rax, 0x50(%rbx)
movq 0xb8(%rbx), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x174df
movq %rax, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_setmaxline_
static lso_nargs_t lso_setmaxline_(struct lua_State *L, struct luasocket *S, int ridx, int widx) {
	lso_pushsize(L, S->ibuf.maxline);
	lso_pushsize(L, S->obuf.maxline);

	S->ibuf.maxline = lso_optsize(L, ridx, S->ibuf.maxline);
	S->obuf.maxline = lso_optsize(L, widx, S->obuf.maxline);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq 0x48(%rsi), %rsi
callq 0x1770c
movq 0xb0(%rbx), %rsi
movq %r15, %rdi
callq 0x1770c
movq 0x48(%rbx), %rdx
movq %r15, %rdi
movl %r14d, %esi
callq 0x174df
movq %rax, 0x48(%rbx)
movq 0xb0(%rbx), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x174df
movq %rax, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_settimeout_
static lso_nargs_t lso_settimeout_(struct lua_State *L, struct luasocket *S, int index) {
	double timeout;

	if (isnormal(S->timeout) || S->timeout == 0) {
		lua_pushnumber(L, S->timeout);
	} else {
		lua_pushnil(L);
	}

	timeout = luaL_optnumber(L, index, NAN);

	S->timeout = (isnormal(timeout) || timeout == 0)? timeout : NAN;

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x140(%rsi), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $-0x10000000000000, %r15 # imm = 0xFFF0000000000000
addq %r15, %rax
shrq $0x35, %rax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x177d2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x177c8
jnp 0x177d2
movq %r14, %rdi
callq 0xf9d0
jmp 0x177da
movq %r14, %rdi
callq 0xf2d0
movq 0x18826(%rip), %xmm0    # 0x30008
movq %r14, %rdi
movl %ebp, %esi
callq 0xf7c0
movq %xmm0, %rax
btrq $0x3f, %rax
addq %r15, %rax
shrq $0x35, %rax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x17821
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
andpd %xmm1, %xmm0
movsd 0x187ef(%rip), %xmm2    # 0x30008
andnpd %xmm2, %xmm1
orpd %xmm1, %xmm0
movsd %xmm0, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_seterror_
static lso_nargs_t lso_seterror_(struct lua_State *L, struct luasocket *S, const char *what, int error) {
	int nret = 0;

	for (; *what; what++) {
		switch (*what) {
		case 'r':
			lso_pusherror(L, S->ibuf.error);
			nret++;

			if (!(S->ibuf.error = error))
				S->ibuf.numerrs = 0;

			break;
		case 'w':
			lso_pusherror(L, S->obuf.error);
			nret++;

			if (!(S->obuf.error = error))
				S->obuf.numerrs = 0;

			break;
		default:
			return luaL_argerror(L, 2, lua_pushfstring(L, "%s: %c: only `r' or `w' accepted", what, *what));
		} /* switch() */
	} /* for() */

	return nret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x110(%rsi), %rax
movq %rax, (%rsp)
leaq 0x98(%rsi), %r13
xorl %r15d, %r15d
movzbl (%r14,%r15), %eax
cmpl $0x72, %eax
je 0x1788c
cmpl $0x77, %eax
jne 0x178b4
movl 0x108(%r12), %esi
movq %rbx, %rdi
callq 0x17900
movl %ebp, 0x108(%r12)
movq (%rsp), %rax
jmp 0x178a7
movl 0x94(%r12), %esi
movq %rbx, %rdi
callq 0x17900
movl %ebp, 0x94(%r12)
movq %r13, %rax
testl %ebp, %ebp
jne 0x178af
andq $0x0, (%rax)
incq %r15
jmp 0x1785f
testl %eax, %eax
jne 0x178ca
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %ecx
addq %r15, %r14
leaq 0x18e15(%rip), %rsi     # 0x306ec
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10080
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf410
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_setmaxerrs_
static lso_nargs_t lso_setmaxerrs_(struct lua_State *L, struct luasocket *S, int index) {
	const char *what = "rw";
	int nret = 0;

	if (lua_type(L, index) == LUA_TSTRING) {
		what = luaL_checkstring(L, index);
		index++;
	}

	for (; *what; what++) {
		switch (*what) {
		case 'r':
			lua_pushinteger(L, S->ibuf.maxerrs);
			nret++;

			S->ibuf.maxerrs = luaL_optunsigned(L, index, S->ibuf.maxerrs);

			break;
		case 'w':
			lua_pushinteger(L, S->obuf.maxerrs);
			nret++;

			S->obuf.maxerrs = luaL_optunsigned(L, index, S->obuf.maxerrs);

			break;
		default:
			return luaL_argerror(L, 1, lua_pushfstring(L, "%s: %c: only `r' or `w' accepted", what, *what));
		}
	}

	return nret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
callq 0xf270
cmpl $0x4, %eax
jne 0x17942
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xf660
movq %rax, %r15
incl %ebp
jmp 0x17949
leaq 0x18dc4(%rip), %r15     # 0x3070d
leaq 0x118(%r14), %rax
movq %rax, (%rsp)
addq $0xa0, %r14
xorl %r12d, %r12d
movzbl (%r15,%r12), %eax
movq %r14, %r13
cmpl $0x72, %eax
je 0x17974
movq (%rsp), %r13
cmpl $0x77, %eax
jne 0x17997
movq (%r13), %rsi
movq %rbx, %rdi
callq 0xf960
movq (%r13), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf420
movq %rax, (%r13)
incq %r12
jmp 0x1795e
testl %eax, %eax
jne 0x179ad
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %ecx
addq %r12, %r15
leaq 0x18d32(%rip), %rsi     # 0x306ec
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10080
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf410
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_onerror_
static lso_nargs_t lso_onerror_(struct lua_State *L, struct luasocket *S, int fidx) {
	cqs_getref(L, S->onerror);

	if (lua_gettop(L) > fidx) {
		if (!lua_isnil(L, fidx))
			luaL_checktype(L, fidx, LUA_TFUNCTION);
		lua_pushvalue(L, fidx);
		cqs_ref(L, &S->onerror);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x130(%rsi), %esi
callq 0x150ab
movq %r14, %rdi
callq 0xf970
cmpl %ebp, %eax
jle 0x17a41
addq $0x130, %rbx            # imm = 0x130
movq %r14, %rdi
movl %ebp, %esi
callq 0xf270
testl %eax, %eax
je 0x17a28
pushq $0x6
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0xf700
movq %r14, %rdi
movl %ebp, %esi
callq 0xfa10
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x150c1
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_preprcv
static lso_error_t lso_preprcv(lua_State *L, struct luasocket *S) {
	int error;

	if ((error = lso_checkrcverrs(L, S)))
		return error;

	if ((error = lso_checktodo(S)))
		return error;

	so_clear(S->socket);

	if (S->obuf.mode & LSO_AUTOFLUSH) {
		switch ((error = lso_doflush(S, LSO_NOBUF))) {
		case EAGAIN:
			break;
		case EPIPE:
			break;
		default:
			return error;
		}
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl 0x94(%rsi), %eax
testl %eax, %eax
je 0x17acd
movq 0x98(%rbx), %rcx
incq %rcx
movq %rcx, 0x98(%rbx)
cmpq 0xa0(%rbx), %rcx
jbe 0x17b05
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x80, %edx
movl %eax, %edi
callq 0xf260
leaq 0x18c71(%rip), %rsi     # 0x30727
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfdf0
movl 0x94(%rbx), %eax
testl %eax, %eax
jne 0x17b05
movq %rbx, %rdi
callq 0x17059
testl %eax, %eax
jne 0x17b05
movq 0x128(%rbx), %rdi
callq 0xf890
testb $0x20, 0xa8(%rbx)
je 0x17b03
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x17161
cmpl $0x20, %eax
je 0x17b03
cmpl $0xb, %eax
jne 0x17b05
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq