LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1ca30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
callq 0x1ca30
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0x1c6f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdx
callq 0x1c6f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movl $0x2, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movsd 0x140(%rax), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $-0x10000000000000, %rcx # imm = 0xFFF0000000000000
addq %rcx, %rax
shrq $0x35, %rax
subl $0x3ff, %eax            # imm = 0x3FF
setb %al
testb $0x1, %al
jne 0x1cb65
movq -0x10(%rbp), %rax
movsd 0x140(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1cb7c
jp 0x1cb7c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0x140(%rax), %xmm0
callq 0xf300
jmp 0x1cb85
movq -0x8(%rbp), %rdi
callq 0xfa10
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd 0x2b474(%rip), %xmm0    # 0x48008
callq 0xf800
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $-0x10000000000000, %rcx # imm = 0xFFF0000000000000
addq %rcx, %rax
shrq $0x35, %rax
subl $0x3ff, %eax            # imm = 0x3FF
setb %al
testb $0x1, %al
jne 0x1cbe2
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1cbee
jp 0x1cbee
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x1cbfd
movsd 0x2b412(%rip), %xmm0    # 0x48008
movsd %xmm0, -0x28(%rbp)
jmp 0x1cbfd
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x140(%rax)
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1cd32
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x72, %eax
je 0x1cc66
jmp 0x1cc5c
movl -0x2c(%rbp), %eax
subl $0x77, %eax
je 0x1cca5
jmp 0x1cce4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x94(%rax), %esi
callq 0x1cd50
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movl %eax, 0x94(%rcx)
cmpl $0x0, %eax
jne 0x1cca3
movq -0x18(%rbp), %rax
movq $0x0, 0x98(%rax)
jmp 0x1cd1f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x108(%rax), %esi
callq 0x1cd50
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movl %eax, 0x108(%rcx)
cmpl $0x0, %eax
jne 0x1cce2
movq -0x18(%rbp), %rax
movq $0x0, 0x110(%rax)
jmp 0x1cd1f
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
leaq 0x2bbbe(%rip), %rsi     # 0x488c0
movb $0x0, %al
callq 0x10130
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0xf440
movl %eax, -0x4(%rbp)
jmp 0x1cd38
jmp 0x1cd21
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1cc3e
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_pusherror
static void lso_pusherror(struct lua_State *L, int error) {
	if (error)
		lua_pushinteger(L, error);
	else
		lua_pushnil(L);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1cd74
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xf9a0
jmp 0x1cd7d
movq -0x8(%rbp), %rdi
callq 0xfa10
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq 0x2bb37(%rip), %rax     # 0x488e1
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xf280
cmpl $0x4, %eax
jne 0x1cde3
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1cde5
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1cee6
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x30(%rbp)
subl $0x72, %eax
je 0x1ce10
jmp 0x1ce03
movl -0x30(%rbp), %eax
subl $0x77, %eax
je 0x1ce54
jmp 0x1ce98
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rsi
callq 0xf9a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rdx
callq 0xf450
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x1ced3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x118(%rax), %rsi
callq 0xf9a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rax
movq 0x118(%rax), %rdx
callq 0xf450
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x118(%rax)
jmp 0x1ced3
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
leaq 0x2ba0a(%rip), %rsi     # 0x488c0
movb $0x0, %al
callq 0x10130
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movl $0x1, %esi
callq 0xf440
movl %eax, -0x4(%rbp)
jmp 0x1ceec
jmp 0x1ced5
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1cde5
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x130(%rax), %esi
callq 0x18fb0
movq -0x8(%rbp), %rdi
callq 0xf9b0
cmpl -0x14(%rbp), %eax
jle 0x1cf76
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xf280
cmpl $0x0, %eax
je 0x1cf56
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x6, %edx
callq 0xf740
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xfa50
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x130, %rsi            # imm = 0x130
callq 0x18ff0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1dd00
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x1cfbd
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d034
movq -0x18(%rbp), %rdi
callq 0x1bd70
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x1cfd6
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d034
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0xf8d0
movq -0x18(%rbp), %rax
movl 0xa8(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1d02d
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x1bf30
movl %eax, -0x1c(%rbp)
movl %eax, %ecx
movl %ecx, -0x20(%rbp)
subl $0xb, %eax
je 0x1d01f
jmp 0x1d015
movl -0x20(%rbp), %eax
subl $0x20, %eax
je 0x1d021
jmp 0x1d023
jmp 0x1d02b
jmp 0x1d02b
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d034
jmp 0x1d02d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_fill
static lso_error_t lso_fill(struct luasocket *S, size_t limit) {
	struct iovec iov;
	size_t prepbuf, count;
	int error;

	if (S->ibuf.eom && fifo_rlen(&S->ibuf.fifo) > 0)
		return 0;

	prepbuf = (S->type == SOCK_DGRAM)? (SO_MIN(limit, 65536)) : 1;

	while (fifo_rlen(&S->ibuf.fifo) < limit) {
		if ((error = fifo_wbuf(&S->ibuf.fifo, &iov, prepbuf)))
			return error;

		if ((count = so_read(S->socket, iov.iov_base, iov.iov_len, &error))) {
			fifo_update(&S->ibuf.fifo, count);

			if (S->type == SOCK_DGRAM || S->type == SOCK_SEQPACKET) {
				S->ibuf.eom = 1;

				return 0;
			}
		} else {
			if (error == EPIPE)
				S->ibuf.eof = 1;

			return error;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x91(%rax)
je 0x1d2c0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
callq 0x1c210
cmpq $0x0, %rax
jbe 0x1d2c0
movl $0x0, -0x4(%rbp)
jmp 0x1d3e0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x120(%rax)
jne 0x1d2f6
cmpq $0x10000, -0x18(%rbp)   # imm = 0x10000
jae 0x1d2e1
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1d2ec
movl $0x10000, %eax          # imm = 0x10000
movq %rax, -0x48(%rbp)
jmp 0x1d2ec
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1d301
movl $0x1, %eax
movq %rax, -0x50(%rbp)
jmp 0x1d301
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
callq 0x1c210
cmpq -0x18(%rbp), %rax
jae 0x1d3d9
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rdx
leaq -0x28(%rbp), %rsi
callq 0x1ddd0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x1d350
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d3e0
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
callq 0xf400
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1d3bb
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x38(%rbp), %rsi
callq 0x1de40
movq -0x10(%rbp), %rax
cmpl $0x2, 0x120(%rax)
je 0x1d3a5
movq -0x10(%rbp), %rax
cmpl $0x5, 0x120(%rax)
jne 0x1d3b9
movq -0x10(%rbp), %rax
movb $0x1, 0x91(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1d3e0
jmp 0x1d3d4
cmpl $0x20, -0x3c(%rbp)
jne 0x1d3cc
movq -0x10(%rbp), %rax
movb $0x1, 0x90(%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d3e0
jmp 0x1d309
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: iov_trimcr
static size_t iov_trimcr(struct iovec *iov, _Bool chomp) {
	char *p, *pe;

	p = iov->iov_base;
	pe = p + iov->iov_len;

	if (chomp) {
		if (pe - p >= 2 && pe[-1] == '\n' && pe[-2] == '\r')
			*(--pe - 1) = '\n';
	} else {
		while (p < pe && (p = memchr(p, '\r', pe - p))) {
			if (++p >= pe) {
				break;
			} else if (*p == '\n') {
				memmove(p - 1, p, pe - p);
				--pe;
			}
		}
	}

	return iov->iov_len = pe - (char *)iov->iov_base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
testb $0x1, -0x9(%rbp)
je 0x1d468
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0x1d463
movq -0x20(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x1d463
movq -0x20(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0xd, %eax
jne 0x1d463
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0xa, -0x2(%rax)
jmp 0x1d4fa
jmp 0x1d46a
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0x1d4a0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0xd, %esi
callq 0xffa0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1d4a9
jmp 0x1d4f8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
cmpq -0x20(%rbp), %rax
jb 0x1d4bd
jmp 0x1d4f8
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x1d4f1
movq -0x18(%rbp), %rdi
addq $-0x1, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x107a0
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1d4f3
jmp 0x1d46a
jmp 0x1d4fa
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq -0x8(%rbp), %rcx
movq %rax, 0x8(%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_getline
static lso_error_t lso_getline(struct luasocket *S, struct iovec *iov) {
	int error;

	while (!fifo_lvec(&S->ibuf.fifo, iov)) {
		error = lso_fill(S, S->ibuf.maxline);

		if (fifo_lvec(&S->ibuf.fifo, iov))
			break;

		if (fifo_rlen(&S->ibuf.fifo) > 0 && lso_nomore(S, S->ibuf.maxline)) {
			fifo_slice(&S->ibuf.fifo, iov, 0, S->ibuf.maxline);

			break;
		}

		return lso_asserterror(error);
	}

	iov->iov_len = MIN(iov->iov_len, S->ibuf.maxline);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x1e030
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1d557
jmp 0x1d5e6
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1d280
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x1e030
cmpq $0x0, %rax
je 0x1d588
jmp 0x1d5e6
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
callq 0x1c210
cmpq $0x0, %rax
jbe 0x1d5d9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1e060
testb $0x1, %al
jne 0x1d5b6
jmp 0x1d5d9
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1c230
jmp 0x1d5e6
movl -0x1c(%rbp), %edi
callq 0x1dcd0
movl %eax, -0x4(%rbp)
jmp 0x1d625
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x1d606
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x1d612
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_getheader
static lso_error_t lso_getheader(struct luasocket *S, struct iovec *iov) {
	size_t eoh;
	int error;

	fifo_slice(&S->ibuf.fifo, iov, 0, S->ibuf.maxline);

	if ((size_t)-1 == (eoh = iov_eoh(iov, lso_nomore(S, S->ibuf.maxline), 0, &error)))
		goto error;

	if (!eoh || eoh > iov->iov_len) {
		error = lso_fill(S, S->ibuf.maxline);

		fifo_slice(&S->ibuf.fifo, iov, 0, S->ibuf.maxline);

		if ((size_t)-1 == (eoh = iov_eoh(iov, lso_nomore(S, S->ibuf.maxline), 0, &error)))
			goto error;
		else if (!eoh)
			goto nomore;
		else if (eoh > iov->iov_len)
			goto error; /* lso_fill should have returned error */
	}

	iov->iov_len = eoh;

	return 0;
nomore:
	iov->iov_len = 0;

	return 0;
error:
	return lso_asserterror(error);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1c230
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1e060
movq -0x30(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
xorl %edx, %edx
leaq -0x24(%rbp), %rcx
callq 0x1e250
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
movq $-0x1, %rax
cmpq %rcx, %rax
jne 0x1d6f7
jmp 0x1d7d1
cmpq $0x0, -0x20(%rbp)
je 0x1d710
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1d7a7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1d280
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1c230
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1e060
movq -0x38(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
xorl %edx, %edx
leaq -0x24(%rbp), %rcx
callq 0x1e250
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
movq $-0x1, %rax
cmpq %rcx, %rax
jne 0x1d788
jmp 0x1d7d1
cmpq $0x0, -0x20(%rbp)
jne 0x1d791
jmp 0x1d7bc
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1d7a1
jmp 0x1d7d1
jmp 0x1d7a3
jmp 0x1d7a5
jmp 0x1d7a7
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1d7dc
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1d7dc
movl -0x24(%rbp), %edi
callq 0x1dcd0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: iov_trimcrlf
static size_t iov_trimcrlf(struct iovec *iov, _Bool chomp) {
	char *sp, *p, *pe;

	sp = iov->iov_base;
	p = iov->iov_base;
	pe = p + iov->iov_len;

	if (chomp) {
		if (p < pe && pe[-1] == '\n') {
			--pe;

			if (p < pe && pe[-1] == '\r')
				--pe;
		}
	} else {
		while (p < pe && (p = memchr(p, '\n', pe - p))) {
			if (p > sp && p[-1] == '\r') {
				++p;
				memmove(p - 2, p, pe - p);
				pe -= 2;
			} else {
				memmove(p, p + 1, pe - p - 1);
				--pe;
			}
		}
	}

	return iov->iov_len = pe - (char *)iov->iov_base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x28(%rbp)
testb $0x1, -0x9(%rbp)
je 0x1d87d
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1d878
movq -0x28(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x1d878
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1d876
movq -0x28(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x1d876
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1d878
jmp 0x1d93e
jmp 0x1d87f
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x29(%rbp)
jae 0x1d8b5
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0xffa0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x1d8be
jmp 0x1d93c
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x1d90b
movq -0x20(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x1d90b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $-0x2, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x107a0
movq -0x28(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x1d937
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x107a0
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1d87f
jmp 0x1d93e
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq -0x8(%rbp), %rcx
movq %rax, 0x8(%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_getblock
static lso_error_t lso_getblock(struct luasocket *S, struct iovec *iov, size_t minbuf, size_t maxbuf, int mode) {
	int error;

	if (mode & LSO_TEXT) {
		size_t fillsz = maxbuf, n;

		do {
			error = lso_fill(S, fillsz);

			fifo_slice(&S->ibuf.fifo, iov, 0, -1);

			if ((size_t)-1 == (n = iov_eot(iov, minbuf, maxbuf, (S->ibuf.eof || S->ibuf.eom), &error))) {
				goto error;
			} else if (n > iov->iov_len) {
				if (fillsz < n)
					error = 0;

				fillsz = n;
			} else {
				iov->iov_len = n;

				return 0;
			}
		} while (!error);
	} else {
		error = lso_fill(S, maxbuf);

		if (fifo_slice(&S->ibuf.fifo, iov, 0, maxbuf) >= minbuf)
			return 0;

		if ((S->ibuf.eof || S->ibuf.eom) && iov->iov_len > 0)
			return 0;
	}

error:
	return lso_asserterror(error);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1dc48
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1d280
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movq $-0x1, %rcx
callq 0x1c230
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x90(%rcx)
movb %al, -0x41(%rbp)
jne 0x1dbba
movq -0x10(%rbp), %rax
movb 0x91(%rax), %al
movb %al, -0x41(%rbp)
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdi
movb -0x41(%rbp), %al
movzbl %al, %ecx
andl $0x1, %ecx
leaq -0x30(%rbp), %r8
callq 0x1e680
movq %rax, %rcx
movq %rcx, -0x40(%rbp)
movq $-0x1, %rax
cmpq %rcx, %rax
jne 0x1dbf0
jmp 0x1dcb6
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1dc19
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1dc0f
movl $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1dc31
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1dcc1
jmp 0x1dc33
jmp 0x1dc35
cmpl $0x0, -0x30(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1db53
jmp 0x1dcb4
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1d280
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1c230
cmpq -0x20(%rbp), %rax
jb 0x1dc84
movl $0x0, -0x4(%rbp)
jmp 0x1dcc1
movq -0x10(%rbp), %rax
testb $0x1, 0x90(%rax)
jne 0x1dc9e
movq -0x10(%rbp), %rax
testb $0x1, 0x91(%rax)
je 0x1dcb2
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x1dcb2
movl $0x0, -0x4(%rbp)
jmp 0x1dcc1
jmp 0x1dcb4
jmp 0x1dcb6
movl -0x30(%rbp), %edi
callq 0x1dcd0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_wbuf
static int fifo_wbuf(struct fifo *fifo, struct iovec *iov, size_t size) {
	int error;

	if ((error = fifo_grow(fifo, size)))
		return error;

	/* try to avoid realigning buffer */
	if (fifo_wvec(fifo, iov, 0) < size)
		fifo_wvec(fifo, iov, 1);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1deb0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x1de01
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1de2f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x1df20
cmpq -0x20(%rbp), %rax
jae 0x1de28
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x1df20
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_grow
static inline int fifo_grow(struct fifo *fifo, size_t size) {
	if (fifo->size - fifo->count >= size)
		return 0;

	if (~fifo->count < size)
		return EOVERFLOW;

	return fifo_realloc(fifo, fifo->count + size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x28(%rcx), %rax
cmpq -0x18(%rbp), %rax
jb 0x1dedf
movl $0x0, -0x4(%rbp)
jmp 0x1df12
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
xorq $-0x1, %rax
cmpq -0x18(%rbp), %rax
jae 0x1defa
movl $0x4b, -0x4(%rbp)
jmp 0x1df12
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
addq -0x18(%rbp), %rsi
callq 0x191f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_wvec
static size_t fifo_wvec(struct fifo *fifo, struct iovec *iov, _Bool realign) {
	size_t tail, count;

	if (fifo->head + fifo->count < fifo->size && realign)
		fifo_realign(fifo);

	tail  = (fifo->size)? ((fifo->head + fifo->count) % fifo->size) : 0;
	count = fifo_wlen(fifo);

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

	return iov->iov_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x28(%rcx), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x1df60
testb $0x1, -0x11(%rbp)
je 0x1df60
movq -0x8(%rbp), %rdi
callq 0x192d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1df8b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x28(%rcx), %rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq %rdx, -0x30(%rbp)
jmp 0x1df93
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x1df93
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1e010
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
subq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1dfdf
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1dfe7
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_tvec
static size_t fifo_tvec(struct fifo *fifo, struct iovec *iov, int ch) {
	unsigned char *p;

	if (fifo_rvec(fifo, iov)) {
		if ((p = memchr(iov->iov_base, ch, iov->iov_len)))
			return iov->iov_len = (p - (unsigned char *)iov->iov_base) + 1;

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

			if ((p = memchr(iov->iov_base, ch, iov->iov_len))) {
				iov->iov_len = (p - fifo->base) + (fifo->size - fifo->head) + 1;
				iov->iov_base = fifo->base;
				fifo_realign(fifo);

				return iov->iov_len;
			}
		}

		iov->iov_len = 0;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x1c110
cmpq $0x0, %rax
je 0x1e1f0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xffa0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1e130
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
movq %rax, -0x8(%rbp)
jmp 0x1e1f8
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1e1e4
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xffa0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1e1e2
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdx
subq 0x20(%rdx), %rax
addq %rax, %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x192d0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1e1f8
jmp 0x1e1e4
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: iov_addzu
static int iov_addzu(size_t *r, size_t a, size_t b) {
	int error;

	if ((error = cqs_addzu(r, a, b)))
		return error;

	return (*r == (size_t)-1)? EOVERFLOW : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1e4f0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x1e4c5
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1e4dd
movq -0x10(%rbp), %rax
movq (%rax), %rdx
xorl %eax, %eax
movl $0x4b, %ecx
cmpq $-0x1, %rdx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_addzu
static inline cqs_error_t cqs_addzu(size_t *r, size_t a, size_t b) {
	if (~a < b)
		return EOVERFLOW;

	*r = a + b;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
xorq $-0x1, %rax
cmpq -0x20(%rbp), %rax
jae 0x1e517
movl $0x4b, -0x4(%rbp)
jmp 0x1e52d
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: iov_eob
static size_t iov_eob(const struct iovec *iov, const char *eob, size_t eoblen) {
	const char *p;

	if (iov->iov_len < eoblen)
		return 0;

	if ((p = memmem(iov->iov_base, iov->iov_len, eob, eoblen)))
		return (p + eoblen) - (char *)iov->iov_base;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x1e56c
movq $0x0, -0x8(%rbp)
jmp 0x1e5b2
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10830
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1e5aa
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1e5b2
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: iov_eol
static size_t iov_eol(const struct iovec *iov) {
	const char *p, *pe;
	size_t eol = 0;

	p = iov->iov_base;
	pe = p + iov->iov_len;

	while (p < pe && (p = memchr(p, '\n', pe - p))) {
		eol = ++p - (char *)iov->iov_base;
	}

	return (eol)? eol : iov->iov_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0x1e625
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
movl $0xa, %esi
callq 0xffa0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1e62e
jmp 0x1e64a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x1e5ef
cmpq $0x0, -0x20(%rbp)
je 0x1e65b
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1e667
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_rewind
static inline size_t fifo_rewind(struct fifo *fifo, size_t count) {
	count       = FIFO_MIN(count, fifo->size - fifo->count);
	fifo->head  = (fifo->head + (fifo->size - count)) % fifo->size;
	fifo->count += count;
	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x8(%rbp), %rdx
subq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x1e86f
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x1e883
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x28(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq -0x10(%rbp), %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq -0x8(%rbp), %rax
movq %rdx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_prepsnd
static lso_error_t lso_prepsnd(lua_State *L, struct luasocket *S) {
	int error;

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

	return lso_checktodo(S);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1eb90
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x1e8fd
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1e909
movq -0x18(%rbp), %rdi
callq 0x1bd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_checksize
static size_t lso_checksize(struct lua_State *L, int index) {
	lua_Number size = luaL_checknumber(L, index);

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

	return (size_t)size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10b20
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x20(%rbp), %xmm0
ja 0x1e993
movsd -0x20(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps 0x296f7(%rip), %xmm2    # 0x48050
pand %xmm2, %xmm0
movq %xmm1, %rdx
movl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %eax, %ecx
movsd 0x2969d(%rip), %xmm1    # 0x48018
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x1e99d
movq $-0x1, -0x8(%rbp)
jmp 0x1e9cc
movsd -0x20(%rbp), %xmm0
movsd 0x29696(%rip), %xmm2    # 0x48040
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_write
FIFO_NOTUSED static int fifo_write(struct fifo *fifo, const void *src, size_t len) {
	const unsigned char *p = src, *pe = p + len;
	struct iovec iov;
	size_t n;
	int error = 0;

	do {
		while (fifo_wvec(fifo, &iov) && p < pe) {
			n = FIFO_MIN(iov.iov_len, (size_t)(pe - p));
			memcpy(iov.iov_base, p, n);
			p += n;
			fifo_update(fifo, n);
		}
	} while (p < pe && !(error = fifo_grow(fifo, pe - p)));

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
jmp 0x1ea11
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x1df20
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x45(%rbp)
je 0x1ea3c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
setb %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x1ea45
jmp 0x1eaa9
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x1ea63
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1ea72
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xfb40
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1de40
jmp 0x1ea11
jmp 0x1eaab
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0x1eadc
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
callq 0x1deb0
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x1ea0f
movl -0x44(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_putc
static int fifo_putc(struct fifo *fifo, int c) {
	int error;

	if (fifo->count >= fifo->size && (error = fifo_grow(fifo, 1)))
		return error;

	fifo->base[(fifo->head + fifo->count) % fifo->size] = (0xff & c);
	fifo_update(fifo, 1);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x1eb2f
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x1deb0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0x1eb2f
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1eb7b
movl -0x14(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdx
addq 0x28(%rdx), %rax
movq -0x10(%rbp), %rsi
xorl %edx, %edx
divq 0x18(%rsi)
movq -0x20(%rbp), %rax
movb %cl, (%rax,%rdx)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x1de40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/socket.c
// Function: lso_tofileno
static int lso_tofileno(lua_State *L, int index) {
	struct luasocket *so;
	luaL_Stream *fh;

	if (lua_isnumber(L, index)) {
		return lua_tointeger(L, index);
	} else if ((so = luaL_testudata(L, index, LSO_CLASS))) {
		return so_peerfd(so->socket);
	} else if ((fh = luaL_testudata(L, index, LUA_FILEHANDLE))) {
		return (fh->f)? fileno(fh->f) : -1;
	} else {
		return -1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xfc70
cmpl $0x0, %eax
je 0x1ec98
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xfe30
movl %eax, -0x4(%rbp)
jmp 0x1ed1b
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq 0x2946d(%rip), %rdx     # 0x48113
callq 0x108e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1ecca
movq -0x20(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0x10c20
movl %eax, -0x4(%rbp)
jmp 0x1ed1b
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq 0x29ca0(%rip), %rdx     # 0x48978
callq 0x108e0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1ed14
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1ed02
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0xfee0
movl %eax, -0x2c(%rbp)
jmp 0x1ed0c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x1ed0c
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ed1b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/socket.h
// Function: so_fdmsg_
static inline struct msghdr *so_fdmsg_(struct msghdr *msg, const void *p, size_t n, int fd) {
	msg->msg_iov->iov_base = (void *)p;
	msg->msg_iov->iov_len = n;
	msg->msg_controllen = SO_MIN(msg->msg_controllen, CMSG_SPACE(sizeof (int)));
	struct cmsghdr *cmsg;
	cmsg = CMSG_FIRSTHDR(msg);
	cmsg->cmsg_level = SOL_SOCKET;
	cmsg->cmsg_type = SCM_RIGHTS;
	cmsg->cmsg_len = CMSG_LEN(sizeof (int));
	memcpy(CMSG_DATA(cmsg), &fd, sizeof fd);
	return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x18, 0x28(%rax)
jae 0x1ed7b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x1ed86
movl $0x18, %eax
movq %rax, -0x30(%rbp)
jmp 0x1ed86
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
cmpq $0x10, 0x28(%rax)
jb 0x1edab
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x1edb3
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x1edb3
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x28(%rbp), %rax
movq $0x14, (%rax)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/fifo.h
// Function: fifo_pack
FIFO_NOTUSED static int fifo_pack(struct fifo *fifo, unsigned long long bits, unsigned count) {
	unsigned mask, nbits;
	int error;

	if (fifo_wbits(fifo) < count && (error = fifo_grow(fifo, 8)))
		return error;

	while (count) {
		nbits = FIFO_MIN(count, 8U - fifo->wbits.count);
		mask  = (1U << nbits) - 1;

		fifo->wbits.byte  <<= nbits;
		fifo->wbits.byte  |= mask & (bits >> (count - nbits));
		fifo->wbits.count += nbits;

		count -= nbits;

		if (fifo->wbits.count >= 8) {
			fifo_putc(fifo, fifo->wbits.byte);

			fifo->wbits.byte  = 0;
			fifo->wbits.count = 0;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1ef20
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1ee35
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x1deb0
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0x1ee35
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ef13
jmp 0x1ee37
cmpl $0x0, -0x1c(%rbp)
je 0x1ef0c
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x33(%rcx), %edx
movl $0x8, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jae 0x1ee5f
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x1ee71
movq -0x10(%rbp), %rax
movzbl 0x33(%rax), %ecx
movl $0x8, %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movzbl 0x32(%rax), %edx
shll %cl, %edx
movl %edx, %ecx
movb %cl, 0x32(%rax)
movl -0x20(%rbp), %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl -0x24(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq %rax, %rdx
movq -0x10(%rbp), %rax
movzbl 0x32(%rax), %ecx
orq %rdx, %rcx
movb %cl, 0x32(%rax)
movl -0x24(%rbp), %edx
movq -0x10(%rbp), %rax
movzbl 0x33(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x33(%rax)
movl -0x24(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x33(%rax), %eax
cmpl $0x8, %eax
jl 0x1ef07
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x32(%rax), %esi
callq 0x1eaf0
movq -0x10(%rbp), %rax
movb $0x0, 0x32(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33(%rax)
jmp 0x1ee37
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)