LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x80(%rdi), %rcx
cmpb $0x1, 0x91(%rdi)
jne 0x17b41
xorl %eax, %eax
testq %rcx, %rcx
jne 0x17c1c
xorl %ecx, %ecx
movl $0x10000, %eax          # imm = 0x10000
cmpq %rax, %r14
cmovbq %r14, %rax
cmpl $0x2, 0x120(%rbx)
pushq $0x1
popq %r12
cmoveq %rax, %r12
leaq 0x58(%rbx), %r13
leaq 0x8(%rsp), %rbp
leaq 0x4(%rsp), %r15
cmpq %r14, %rcx
jae 0x17c03
movq %r13, %rdi
movq %r12, %rsi
callq 0x18027
testl %eax, %eax
jne 0x17c07
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x18049
cmpq %r12, %rax
jae 0x17ba6
movq %r13, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rdx
callq 0x18049
andl $0x0, 0x4(%rsp)
movq 0x128(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
callq 0xf3d0
testq %rax, %rax
je 0x17c09
movq 0x70(%rbx), %rcx
movq 0x80(%rbx), %rdx
subq %rdx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x80(%rbx)
movl 0x120(%rbx), %eax
cmpl $0x5, %eax
je 0x17bfc
cmpl $0x2, %eax
jne 0x17b6a
movb $0x1, 0x91(%rbx)
xorl %eax, %eax
jmp 0x17c1c
jmp 0x17c1c
movl 0x4(%rsp), %eax
cmpl $0x20, %eax
jne 0x17c1c
movb $0x1, 0x90(%rbx)
pushq $0x20
popq %rax
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/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %rax
leaq (%r14,%rax), %r15
testl %esi, %esi
je 0x17c72
cmpq $0x2, %rax
jl 0x17c60
cmpb $0xa, -0x1(%r15)
jne 0x17c60
cmpb $0xd, -0x2(%r15)
jne 0x17c60
movb $0xa, -0x2(%r15)
decq %r15
subq (%rbx), %r15
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0xd
popq %rbp
cmpq %r15, %r14
jae 0x17c60
movq %r15, %rdx
subq %r14, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0xff20
testq %rax, %rax
je 0x17c60
leaq 0x1(%rax), %r14
cmpq %r15, %r14
jae 0x17c60
cmpb $0xa, (%r14)
jne 0x17c75
movq %r15, %rdx
subq %r14, %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x106a0
decq %r15
jmp 0x17c75
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x58(%rdi), %r15
movq %r15, %rdi
callq 0x180ba
testq %rax, %rax
jne 0x17d26
movq 0x48(%r14), %rsi
movq %r14, %rdi
callq 0x17b10
movl %eax, %ebp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x180ba
testq %rax, %rax
jne 0x17d26
movq 0x80(%r14), %rax
testq %rax, %rax
je 0x17d46
movq 0x48(%r14), %rdx
cmpb $0x0, 0x90(%r14)
jne 0x17d1b
cmpq %rdx, %rax
setae %al
orb 0x91(%r14), %al
cmpb $0x1, %al
jne 0x17d46
movq %r15, %rdi
movq %rbx, %rsi
callq 0x172bc
movq 0x8(%rbx), %rax
movq 0x48(%r14), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movq %rcx, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
pushq $0xe
popq %rax
cmovnel %ebp, %eax
jmp 0x17d3b
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x58(%rdi), %r15
movq 0x48(%rdi), %rdx
movq %r15, %rdi
callq 0x172bc
movq 0x48(%r14), %r12
movb $0x1, %al
cmpb $0x0, 0x90(%r14)
jne 0x17d92
cmpb $0x0, 0x91(%r14)
jne 0x17d92
cmpq %r12, 0x80(%r14)
setae %al
movzbl %al, %esi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x1815d
cmpq $-0x1, %rax
je 0x17e1d
testq %rax, %rax
je 0x17db3
cmpq 0x8(%rbx), %rax
jbe 0x17e2b
movq %r14, %rdi
movq %r12, %rsi
callq 0x17b10
movl %eax, 0x4(%rsp)
movq 0x48(%r14), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x172bc
movb $0x1, %al
cmpb $0x0, 0x90(%r14)
jne 0x17df5
cmpb $0x0, 0x91(%r14)
jne 0x17df5
movq 0x48(%r14), %rax
cmpq %rax, 0x80(%r14)
setae %al
movzbl %al, %esi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x1815d
cmpq $-0x1, %rax
je 0x17e1d
testq %rax, %rax
jne 0x17e17
andq $0x0, 0x8(%rbx)
jmp 0x17e2f
cmpq 0x8(%rbx), %rax
jbe 0x17e2b
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
pushq $0xe
popq %rax
cmovnel %ecx, %eax
jmp 0x17e31
movq %rax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %rax
leaq (%r15,%rax), %r12
testl %esi, %esi
je 0x17e8d
testq %rax, %rax
jle 0x17efa
cmpb $0xa, -0x1(%r12)
jne 0x17efa
leaq -0x1(%r12), %rax
cmpq %rax, %r15
jae 0x17e88
cmpb $0xd, -0x2(%r12)
leaq -0x2(%r12), %rcx
cmoveq %rcx, %rax
movq %rax, %r12
jmp 0x17efa
pushq $0xa
popq %rbp
pushq $-0x1
popq %r13
movq %r15, %r14
cmpq %r12, %r14
jae 0x17ef7
movq %r12, %rdx
subq %r14, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0xff20
testq %rax, %rax
je 0x17ef7
movq %rax, %r14
cmpq %r15, %rax
jbe 0x17eda
cmpb $0xd, -0x1(%r14)
jne 0x17eda
leaq -0x1(%r14), %rdi
incq %r14
movq %r12, %rdx
subq %r14, %rdx
movq %r14, %rsi
callq 0x106a0
pushq $-0x2
popq %rax
jmp 0x17ef2
leaq 0x1(%r14), %rsi
movq %r14, %rdx
notq %rdx
addq %r12, %rdx
movq %r14, %rdi
callq 0x106a0
movq %r13, %rax
addq %rax, %r12
jmp 0x17e97
movq (%rbx), %r15
subq %r15, %r12
movq %r12, 0x8(%rbx)
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_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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
testb $0x8, %r8b
jne 0x17f83
movq %r14, %rdi
movq %rbp, %rsi
callq 0x17b10
movl %eax, %r15d
leaq 0x58(%r14), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x172bc
movq %rax, %rcx
xorl %eax, %eax
cmpq %r12, %rcx
jae 0x18018
cmpb $0x0, 0x90(%r14)
jne 0x17f73
cmpb $0x1, 0x91(%r14)
jne 0x18006
cmpq $0x0, 0x8(%rbx)
jne 0x18018
jmp 0x18006
movq %r12, 0x10(%rsp)
leaq 0x58(%r14), %r13
movq %rbp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x17b10
movl %eax, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
pushq $-0x1
popq %rdx
callq 0x172bc
movb $0x1, %al
cmpb $0x0, 0x90(%r14)
jne 0x17fbf
movb 0x91(%r14), %al
movzbl %al, %ecx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
leaq 0xc(%rsp), %r8
callq 0x18265
cmpq $-0x1, %rax
je 0x18001
cmpq 0x8(%rbx), %rax
jbe 0x18012
cmpq %rax, %r12
jae 0x17ff2
andl $0x0, 0xc(%rsp)
movq %rax, %r12
jmp 0x17f8f
movl 0xc(%rsp), %r15d
movq %rax, %r12
testl %r15d, %r15d
je 0x17f8f
jmp 0x18006
movl 0xc(%rsp), %r15d
testl %r15d, %r15d
pushq $0xe
popq %rax
cmovnel %r15d, %eax
jmp 0x18018
movq %rax, 0x8(%rbx)
xorl %eax, %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_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:
movq %rsi, %rcx
movq 0x18(%rdi), %rdx
movq 0x28(%rdi), %rsi
subq %rsi, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
jae 0x18048
addq %rcx, %rsi
jae 0x151c2
pushq $0x4b
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorb $0x1, %dl
movq 0x18(%rdi), %rcx
movq 0x28(%rdi), %rsi
movq 0x20(%rdi), %rax
addq %rsi, %rax
cmpq %rcx, %rax
setae %al
orb %dl, %al
jne 0x1807f
movq %r14, %rdi
callq 0x1526f
movq 0x18(%r14), %rcx
movq 0x28(%r14), %rsi
testq %rcx, %rcx
je 0x18092
movq 0x20(%r14), %rax
addq %rsi, %rax
xorl %edx, %edx
divq %rcx
jmp 0x18094
xorl %edx, %edx
movq %rcx, %rax
subq %rsi, %rax
subq %rdx, %rcx
addq 0x10(%r14), %rdx
movq %rdx, (%rbx)
cmpq %rax, %rcx
cmovaeq %rax, %rcx
movq %rcx, 0x8(%rbx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: iov_eoh
static size_t iov_eoh(const struct iovec *iov, _Bool eof, int flags, int *_error) {
	const char *tp, *p, *pe;
	size_t n;
	int error;

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

	while (p < pe && mime_isfname(*p))
		p++;

	if (p == tp && p < pe && !(flags & IOV_F_EMPTYFNAME))
		return 0; /* not allowing empty field names */

	while (p < pe && mime_isblank(*p))
		p++;

	if (p < pe && *p != ':')
		return 0; /* not a valid field name */

	while (p < pe && (p = memchr(p, '\n', pe - p))) {
		if (++p < pe && !mime_isblank(*p))
			return p - tp; /* found */
	}

	if (eof)
		return 0; /* do not allow truncated headers */

	if ((error = iov_addzu(&n, iov->iov_len, 1)))
		goto error;

	return n; /* need more */
error:
	*_error = error;

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq (%rdi), %r12
movq 0x8(%rdi), %r15
leaq (%r12,%r15), %r13
xorl %ecx, %ecx
leaq (%r12,%rcx), %rax
cmpq %r13, %rax
jae 0x181b9
movb (%rax), %dl
cmpb $0x3a, %dl
je 0x18197
addb $-0x21, %dl
cmpb $0x5d, %dl
ja 0x18197
incq %rcx
jmp 0x1817a
cmpq %r13, %rax
setb %dl
testq %rcx, %rcx
sete %cl
testb %dl, %cl
je 0x181b9
jmp 0x18203
movzbl (%rax), %ecx
cmpl $0x9, %ecx
je 0x181b6
cmpl $0x20, %ecx
jne 0x181c0
incq %rax
cmpq %r13, %rax
jb 0x181a9
jmp 0x181c5
cmpl $0x3a, %ecx
jne 0x18203
pushq $0xa
popq %r14
cmpq %r13, %rax
jae 0x181fe
movq %r13, %rdx
subq %rax, %rdx
movq %rax, %rdi
movl %r14d, %esi
callq 0xff20
testq %rax, %rax
je 0x181fe
incq %rax
cmpq %r13, %rax
jae 0x181c9
movzbl (%rax), %ecx
cmpl $0x9, %ecx
je 0x181c9
cmpl $0x20, %ecx
je 0x181c9
subq %r12, %rax
jmp 0x18205
testb %bpl, %bpl
je 0x18214
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $-0x2, %r15
jb 0x18225
movl $0x4b, (%rbx)
pushq $-0x1
popq %rax
jmp 0x18205
incq %r15
movq %r15, %rax
jmp 0x18205
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq 0x8(%rdi), %rsi
cmpq %rbx, %rsi
jb 0x1825b
movq (%rdi), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x10730
testq %rax, %rax
je 0x1825b
addq %rbx, %rax
subq %r14, %rax
jmp 0x1825d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: iov_eot
static size_t iov_eot(const struct iovec *iov, size_t minbuf, size_t maxbuf, _Bool eof, int *_error) {
	const char *p, *pe;
	size_t n = 0, eot;
	int lc = -1, error;

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

	for (; p < pe && n < maxbuf; ++n) {
		lc = *p++;

		if (lc == '\r' && p < pe && *p == '\n') {
			lc = *p++; /* skip \n so we don't ++n */
		}
	}

	if ((size_t)-1 == (eot = p - (char *)iov->iov_base)) {
		error = EOVERFLOW;
		goto error;
	}

	if (n < maxbuf) {
		if (!eof) {
			if (n >= minbuf && lc != '\r') {
				/*
				 * just continue as we're not splitting a
				 * \r\n pair
				 */
				(void)0;
			} else if (n > minbuf && lc == '\r') {
				/*
				 * just exclude it. we might end up
				 * returning a trailing \r, but we know for
				 * a fact it's not part of a \r\n pair.
				 */
				--eot;
			} else if ((error = iov_addzu(&eot, eot, maxbuf - n))) {
				goto error;
			}
		}
	} else if (lc == '\r') {
		if (n > minbuf) {
			--eot; /* see comment ~10 lines above */
		} else if ((error = iov_addzu(&eot, eot, 1))) {
			goto error;
		}
	}

	return eot;
error:
	*_error = error;

	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r9
movq 0x8(%rdi), %rax
addq %r9, %rax
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %edi, %edi
movl $0xd, %ebx
movq %r9, %r10
cmpq %rax, %r10
jae 0x182cd
cmpq %rdi, %rdx
jbe 0x182cd
leaq 0x1(%r10), %r14
movsbl (%r10), %r11d
cmpl $0xd, %r11d
jne 0x182c5
cmpq %rax, %r14
jae 0x182c2
xorl %r11d, %r11d
cmpb $0xa, 0x1(%r10)
setne %bpl
jne 0x182b5
addq $0x2, %r10
movq %r10, %r14
movb %bpl, %r11b
leal (%r11,%r11,2), %r11d
addl $0xa, %r11d
jmp 0x182c5
movl %ebx, %r11d
incq %rdi
movq %r14, %r10
jmp 0x18283
movq %r10, %rax
subq %r9, %rax
cmpq $-0x1, %rax
je 0x18339
movq %rdx, %rbx
subq %rdi, %rbx
jbe 0x18320
testb %cl, %cl
jne 0x1834a
cmpq %rsi, %rdi
jb 0x182f0
cmpl $0xd, %r11d
jne 0x1834a
cmpq %rsi, %rdi
jbe 0x182fb
cmpl $0xd, %r11d
je 0x1832b
addq %rbx, %rax
setb %al
subq %r9, %rdx
leaq (%r10,%rdx), %rcx
incq %rcx
cmpq %rdi, %rcx
sete %cl
orb %al, %cl
jne 0x18339
addq %rdx, %r10
subq %rdi, %r10
movq %r10, %rax
jmp 0x1834a
cmpl $0xd, %r11d
jne 0x1834a
cmpq %rsi, %rdi
jbe 0x18330
decq %rax
jmp 0x1834a
incq %rax
cmpq $-0x1, %rax
jne 0x1834a
movl $0x4b, (%r8)
movabsq $-0x1, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl 0x108(%rsi), %eax
testl %eax, %eax
je 0x183d2
movq 0x110(%rbx), %rcx
incq %rcx
movq %rcx, 0x110(%rbx)
cmpq 0x118(%rbx), %rcx
jbe 0x183da
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 0x1836c(%rip), %rsi     # 0x30727
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfdf0
movl 0x108(%rbx), %eax
testl %eax, %eax
jne 0x183da
movq %rbx, %rdi
callq 0x17059
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rax
callq 0x10a00
movq %xmm0, %rdx
movq %rdx, %rcx
btrq $0x3f, %rcx
movabsq $-0x10000000000000, %rsi # imm = 0xFFF0000000000000
addq %rcx, %rsi
shrq $0x35, %rsi
cvttsd2si %xmm0, %rax
movq %rax, %rdi
subsd 0x17c17(%rip), %xmm0    # 0x30030
cvttsd2si %xmm0, %r8
sarq $0x3f, %rdi
andq %rdi, %r8
orq %rax, %r8
testq %rdx, %rdx
pushq $-0x1
popq %rax
movq %r8, %rdi
cmovsq %rax, %rdi
cmpl $0x3ff, %esi            # imm = 0x3FF
cmovaeq %r8, %rdi
movabsq $0x7ff0000000000000, %rsi # imm = 0x7FF0000000000000
cmpq %rsi, %rcx
cmoveq %rax, %rdi
testq %rdx, %rdx
cmovnsq %rdi, %rax
decq %rcx
movabsq $0xfffffffffffff, %rdx  # imm = 0xFFFFFFFFFFFFF
cmpq %rdx, %rcx
cmovaeq %rdi, %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq %rsi, %rbx
movq %rsp, %r12
movq %rbx, %r13
subq %r14, %r13
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x18049
testq %rax, %rax
je 0x184a6
cmpq %rbx, %r14
jb 0x184bc
cmpq %rbx, %r14
jae 0x184f5
movq %r15, %rdi
movq %r13, %rsi
callq 0x18027
testl %eax, %eax
je 0x1848f
jmp 0x184f7
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
cmpq %r13, %rax
cmovbq %rax, %r13
movq %r14, %rsi
movq %r13, %rdx
callq 0xfad0
addq %r13, %r14
movq 0x18(%r15), %rax
movq 0x28(%r15), %rcx
subq %rcx, %rax
cmpq %r13, %rax
cmovaeq %r13, %rax
addq %rcx, %rax
movq %rax, 0x28(%r15)
jmp 0x18489
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rsi
movq 0x28(%rdi), %rax
cmpq %rsi, %rax
jb 0x18533
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x18027
movl %eax, %ecx
testl %eax, %eax
jne 0x1855a
movq 0x18(%rbx), %rsi
movq 0x28(%rbx), %rax
movq 0x10(%rbx), %rdi
addq 0x20(%rbx), %rax
xorl %ecx, %ecx
xorl %edx, %edx
divq %rsi
movb %bpl, (%rdi,%rdx)
movq 0x28(%rbx), %rax
xorl %edx, %edx
cmpq %rax, 0x18(%rbx)
setne %dl
addq %rax, %rdx
movq %rdx, 0x28(%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0xfc00
testl %eax, %eax
je 0x18589
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0xfdb0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x17b0f(%rip), %rdx     # 0x3009f
movq %r14, %rdi
movl %ebx, %esi
callq 0x107e0
testq %rax, %rax
je 0x185b2
movq 0x128(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b00
leaq 0x181eb(%rip), %rdx     # 0x307a4
movq %r14, %rdi
movl %ebx, %esi
callq 0x107e0
movq %rax, %rcx
pushq $-0x1
popq %rax
testq %rcx, %rcx
je 0x18581
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x18581
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfe60
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_altfield
static _Bool lso_altfield(lua_State *L, int index, ...) {
	const char *k;
	va_list ap;

	va_start(ap, index);

	while ((k = va_arg(ap, const char *))) {
		if (lso_getfield(L, index, k))
			break;
	}

	va_end(ap);

	return !!k;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x18c44
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x18c7d
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x18c8b
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %r15
testq %r15, %r15
je 0x18ca4
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x18db8
testb %al, %al
je 0x18c64
testq %r15, %r15
setne %al
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_rawgeti
static _Bool lso_rawgeti(lua_State *L, int index, int k) {
	lua_rawgeti(L, index, k);

	if (lua_isnil(L, -1)) {
		lua_pop(L, 1);

		return 0;
	} else {
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %edx
pushq $-0x1
popq %rbp
movl %ebp, %esi
callq 0xf470
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf270
movl %eax, %ebp
testl %eax, %eax
jne 0x18ce4
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x106f0
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_checkperm
static mode_t lso_checkperm(lua_State *L, int index) {
	const char *mode = luaL_checkstring(L, index);
	mode_t perm = 0;

	if (*mode >= '0' && *mode <= '9') {
		perm = strtol(mode, NULL, 0);
	} else {
		int i = 9, flag, ch;

		while ((ch = *mode++) && i > 0) {
			if (ch == 'r' || ch == 'R')
				flag = 04;
			else if (ch == 'w' || ch == 'W')
				flag = 02;
			else if (ch == 'x' || ch == 'X')
				flag = 01;
			else if (ch == '-')
				flag = 00;
			else
				continue;

			perm |= (flag << (3 * (--i / 3)));
		}
	}

	return perm;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0xf660
movq %rax, %rdi
movb (%rax), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jae 0x18d21
xorl %esi, %esi
xorl %edx, %edx
callq 0x10300
movq %rax, %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
incq %rdi
pushq $0x9
popq %rsi
pushq $0x4
popq %r8
pushq $0x3
popq %r9
pushq $0x2
popq %r10
pushq $0x1
popq %r11
testb %al, %al
je 0x18d18
testl %esi, %esi
jle 0x18d18
movl %eax, %ecx
andb $-0x21, %cl
movl %r8d, %ebp
cmpb $0x52, %cl
je 0x18d69
movzbl %cl, %ecx
cmpl $0x57, %ecx
je 0x18d5e
cmpl $0x58, %ecx
jne 0x18d63
movl %r11d, %ebp
jmp 0x18d69
movl %r10d, %ebp
jmp 0x18d69
xorl %ebp, %ebp
cmpb $0x2d, %al
jne 0x18d7a
decl %esi
movl %esi, %eax
xorl %edx, %edx
divl %r9d
movl %esi, %ecx
subl %edx, %ecx
shll %cl, %ebp
orl %ebp, %ebx
movb (%rdi), %al
incq %rdi
jmp 0x18d37
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_popbool
static _Bool lso_popbool(lua_State *L) {
	_Bool val;
	luaL_checktype(L, -1, LUA_TBOOLEAN);
	val = lua_toboolean(L, -1);
	lua_pop(L, 1);
	return val;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x1
popq %rbp
pushq $0x1
popq %rdx
movl %ebp, %esi
callq 0xf700
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf560
testl %eax, %eax
setne %bpl
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x106f0
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_getfield
static _Bool lso_getfield(lua_State *L, int index, const char *k) {
	lua_getfield(L, index, k);

	if (lua_isnil(L, -1)) {
		lua_pop(L, 1);

		return 0;
	} else {
		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xf1f0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xf270
movl %eax, %ebp
testl %eax, %eax
jne 0x18ddf
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x106f0
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_pushname
static lso_nargs_t lso_pushname(lua_State *L, struct sockaddr_storage *ss, socklen_t salen) {
	switch (ss->ss_family) {
	case AF_INET:
		/* FALL THROUGH */
	case AF_INET6:
		lua_pushinteger(L, ss->ss_family);
		lua_pushstring(L, sa_ntoa(ss));
		lua_pushinteger(L, ntohs(*sa_port(ss, SA_PORT_NONE, NULL)));

		return 3;
	case AF_UNIX:
		lua_pushinteger(L, ss->ss_family);

		/* support nameless sockets and Linux's abstract namespace */
		if (salen > offsetof(struct sockaddr_un, sun_path)) {
			struct sockaddr_un *sun = (struct sockaddr_un *)ss;
			char *pe = (char *)sun + SO_MIN(sizeof *sun, salen);
			size_t plen;

			while (pe > sun->sun_path && pe[-1] == '\0')
				--pe;

			if ((plen = (pe - sun->sun_path)) > 0) {
				lua_pushlstring(L, sun->sun_path, plen);
			} else {
				lua_pushnil(L);
			}
		} else {
			lua_pushnil(L);
		}

		return 2;
	default:
		lua_pushinteger(L, ss->ss_family);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rsi), %esi
cmpl $0x1, %esi
je 0x18e99
cmpl $0xa, %esi
je 0x18e1a
cmpl $0x2, %esi
jne 0x18ee0
movq %rbx, %rdi
callq 0xf960
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movups %xmm0, 0x5d(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0xc(%rsp), %r8
andl $0x0, (%r8)
xorl %r12d, %r12d
pushq $0x6d
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xf210
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfc50
movzwl (%r14), %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x18e84
movzwl 0x2(%r14), %r12d
rolw $0x8, %r12w
movzwl %r12w, %esi
movq %rbx, %rdi
callq 0xf960
pushq $0x3
jmp 0x18ef6
movl %edx, %ebp
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf960
cmpl $0x3, %ebp
jb 0x18eec
cmpl $0x6e, %ebp
pushq $0x6e
popq %rax
cmovbl %ebp, %eax
decq %rax
leaq 0x1(%rax), %rcx
cmpq $0x3, %rcx
jl 0x18eec
leaq -0x1(%rax), %rdx
cmpb $0x0, (%r14,%rax)
movq %rdx, %rax
je 0x18eb7
addq $0x2, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf4e0
jmp 0x18ef4
movq %rbx, %rdi
callq 0xf960
pushq $0x1
jmp 0x18ef6
movq %rbx, %rdi
callq 0xf9d0
pushq $0x2
popq %rax
addq $0x80, %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_destroy
static void lso_destroy(lua_State *L, struct luasocket *S) {
	cqs_unref(L, &S->onerror);

	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;
	}

	fifo_reset(&S->ibuf.fifo);
	fifo_reset(&S->obuf.fifo);

	/* Hack for Lua 5.1 and LuaJIT */
	if (!S->mainthread) {
		S->mainthread = L;
		so_close(S->socket);
		S->mainthread = 0;
	} else {
		so_close(S->socket);
	}

	S->socket = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x130, %rsi            # imm = 0x130
callq 0x15171
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x18f30
callq 0xf7b0
andq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x18f43
callq 0xf0f0
andq $0x0, 0x18(%rbx)
leaq 0x58(%rbx), %rdi
callq 0x18f9b
leaq 0xc0(%rbx), %rdi
callq 0x18f9b
cmpq $0x0, 0x138(%rbx)
je 0x18f70
movq 0x128(%rbx), %rdi
callq 0xf440
jmp 0x18f8b
movq %r14, 0x138(%rbx)
movq 0x128(%rbx), %rdi
callq 0xf440
andq $0x0, 0x138(%rbx)
andq $0x0, 0x128(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso__gc
static lso_nargs_t lso__gc(lua_State *L) {
	struct luasocket *S = luaL_checkudata(L, 1, LSO_CLASS);

	S->mainthread = NULL; // disable poll cancellation
	lso_destroy(L, S);

	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x170c5(%rip), %rdx     # 0x3009f
pushq $0x1
popq %rsi
callq 0xfd80
andq $0x0, 0x138(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18f07
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_dup
static lso_nargs_t lso_dup(lua_State *L) {
	struct so_options opts;
	int ofd, fd = -1, error;

	if (lua_istable(L, 1)) {
		opts = lso_checkopts(L, 1);

		if (!lso_altfield(L, 1, "fd", "file", "socket"))
			lua_rawgeti(L, 1, 1);

		ofd = lso_tofileno(L, -1);

		lua_pop(L, 1);
	} else {
		opts = *so_opts();
		ofd = lso_tofileno(L, 1);
	}

	if (ofd < 0)
		goto badfd;

#if defined F_DUPFD_CLOEXEC
	if (-1 == (fd = fcntl(ofd, F_DUPFD_CLOEXEC, 0)))
		goto syerr;
#else
	if (-1 == (fd = dup(ofd)))
		goto syerr;
#endif

	if ((error = cqs_socket_fdopen(L, fd, &opts)))
		goto error;

	return 1;
badfd:
	error = EBADF;
	goto error;
syerr:
	error = errno;
error:
	cqs_closefd(&fd);

	lua_pushnil(L);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
orl $-0x1, 0xc(%rsp)
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0xf270
cmpl $0x5, %eax
jne 0x195e8
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %r14
movq %rbx, %rsi
movl %r14d, %edx
callq 0x185e2
leaq 0x170c5(%rip), %rdx     # 0x30662
leaq 0x1aa9e(%rip), %rcx     # 0x34042
leaq 0x17369(%rip), %r8      # 0x30914
movq %rbx, %rdi
movl %r14d, %esi
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x18be3
testb %al, %al
jne 0x195cd
pushq $0x1
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xf470
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x18563
movl %eax, %r14d
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x106f0
jmp 0x19648
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)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x18563
movl %eax, %r14d
testl %r14d, %r14d
js 0x1967f
movl %r14d, %edi
movl $0x406, %esi            # imm = 0x406
xorl %edx, %edx
xorl %eax, %eax
callq 0xf7f0
movl %eax, 0xc(%rsp)
cmpl $-0x1, %eax
je 0x19685
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x10200
movl %eax, %r14d
testl %eax, %eax
jne 0x1968d
jmp 0x196ad
pushq $0x9
popq %r14
jmp 0x1968d
callq 0xf0a0
movl (%rax), %r14d
leaq 0xc(%rsp), %rdi
callq 0x1531b
movq %rbx, %rdi
callq 0xf9d0
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_fdopen
static lso_nargs_t lso_fdopen(lua_State *L) {
	struct so_options opts;
	int fd, error;

	if (lua_istable(L, 1)) {
		opts = lso_checkopts(L, 1);

		if (lso_altfield(L, 1, "fd")) {
			fd = luaL_checkint(L, -1);
		} else {
			lua_rawgeti(L, 1, 1);
			fd = luaL_checkint(L, -1);
		}

		lua_pop(L, 1);
	} else {
		opts = *so_opts();
		fd = luaL_checkint(L, 1);
	}

	if (fd < 0)
		goto badfd;

	if ((error = cqs_socket_fdopen(L, fd, &opts)))
		goto error;

	return 1;
badfd:
	error = EBADF;
	goto error;
error:
	lua_pushnil(L);
	lua_pushinteger(L, error);

	return 2;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0xf270
cmpl $0x5, %eax
jne 0x19727
movq %rsp, %rdi
pushq $0x1
popq %r14
movq %rbx, %rsi
movl %r14d, %edx
callq 0x185e2
leaq 0x16f77(%rip), %rdx     # 0x30662
movq %rbx, %rdi
movl %r14d, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x18be3
testb %al, %al
jne 0x1970c
pushq $0x1
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xf470
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x10b40
movq %rax, %r14
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x106f0
jmp 0x19786
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movw $0x100, 0x10(%rsp)      # imm = 0x100
andl $0x0, 0x12(%rsp)
andw $0x0, 0x16(%rsp)
movups %xmm0, 0x1f(%rsp)
movups %xmm0, 0x2f(%rsp)
movb $0x0, 0x3f(%rsp)
andl $0x0, 0x49(%rsp)
andl $0x0, 0x4c(%rsp)
andl $0x0, 0x18(%rsp)
movw $0x101, 0x1c(%rsp)      # imm = 0x101
movb $0x1, %al
movb %al, 0x1e(%rsp)
movq $0x1, 0x40(%rsp)
movb %al, 0x48(%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x10b40
movq %rax, %r14
testl %r14d, %r14d
js 0x197a2
movq %rsp, %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10200
movl %eax, %r14d
testl %eax, %eax
jne 0x197a6
jmp 0x197bc
pushq $0x9
popq %r14
movq %rbx, %rdi
callq 0xf9d0
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: lso_type
static int lso_type(lua_State *L) {
	struct luasocket *S;

	if ((S = lso_testself(L, 1))) {
		lua_pushstring(L, (S->socket)? "socket" : "closed socket");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x17002
testq %rax, %rax
je 0x199d6
cmpq $0x0, 0x128(%rax)
leaq 0x16f4c(%rip), %rax     # 0x3090d
leaq 0x16f4c(%rip), %rsi     # 0x30914
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0xfc50
jmp 0x199de
movq %rbx, %rdi
callq 0xf9d0
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: dbg_iov_eoh
static int dbg_iov_eoh(lua_State *L) {
	struct iovec iov = dbg_checkstring(L, 1);
	_Bool eof = dbg_checkbool(L, 2);
	size_t eoh;
	int error;

	if ((size_t)-1 == (eoh = iov_eoh(&iov, eof, 0, &error))) {
		lua_pushnil(L);
		lua_pushstring(L, cqs_strerror(error));
		lua_pushinteger(L, error);

		return 3;
	} else {
		lua_pushinteger(L, eoh);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x19e92
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x19ead
xorl %esi, %esi
testq %rax, %rax
setne %sil
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x1815d
cmpq $-0x1, %rax
je 0x19be2
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf960
jmp 0x19c3a
movq %rbx, %rdi
callq 0xf9d0
movl 0xc(%rsp), %ebp
xorps %xmm0, %xmm0
leaq 0x20(%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)
movl $0x80, %edx
movl %ebp, %edi
callq 0xf260
movq %rbx, %rdi
movq %rax, %rsi
callq 0xfc50
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf960
pushq $0x3
popq %rbp
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/socket.c
// Function: dbg_iov_eob
static int dbg_iov_eob(lua_State *L) {
	struct iovec haystack = dbg_checkstring(L, 1);
	struct iovec needle = dbg_checkstring(L, 2);

	lua_pushinteger(L, iov_eob(&haystack, needle.iov_base, needle.iov_len));

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x19e92
movq %rsp, %r14
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x19e92
movq %r14, %rdi
movq %rax, %rsi
callq 0x1822d
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf960
movl %ebp, %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: dbg_iov_eot
static int dbg_iov_eot(lua_State *L) {
	struct iovec iov = dbg_checkstring(L, 1);
	size_t minbuf = dbg_checksize(L, 2);
	size_t maxbuf = dbg_checksize(L, 3);
	_Bool eof = dbg_checkbool(L, 4);
	size_t n;
	int error;

	if ((size_t)-1 == (n = iov_eot(&iov, minbuf, maxbuf, eof, &error))) {
		lua_pushnil(L);
		lua_pushstring(L, cqs_strerror(error));
		lua_pushinteger(L, error);

		return 3;
	} else {
		lua_pushinteger(L, n);

		return 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x19e92
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x19ed2
movq %rax, %r12
pushq $0x3
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19ed2
movq %rax, %r13
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x19ead
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leaq 0xc(%rsp), %r8
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x18265
cmpq $-0x1, %rax
je 0x19d19
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf960
movl %r14d, %ebp
jmp 0x19d70
movq %rbx, %rdi
callq 0xf9d0
movl 0xc(%rsp), %r14d
xorps %xmm0, %xmm0
leaq 0x20(%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)
movl $0x80, %edx
movl %r14d, %edi
callq 0xf260
movq %rbx, %rdi
movq %rax, %rsi
callq 0xfc50
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf960
movl %ebp, %eax
addq $0xa8, %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: dbg_iov_trimcr
static int dbg_iov_trimcr(lua_State *L) {
	struct iovec src = dbg_checkstring(L, 1);
	_Bool chomp = dbg_checkbool(L, 2);
	struct iovec dst = { memcpy(lua_newuserdata(L, src.iov_len), src.iov_base, src.iov_len), src.iov_len };

	iov_trimcr(&dst, chomp);

	lua_pushlstring(L, dst.iov_base, dst.iov_len);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x19e92
movq %rax, %r15
movq %rdx, %r12
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x19ead
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
movq %r14, %rdi
movq %r12, %rsi
callq 0xfb70
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xfad0
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
movq %r12, 0x8(%r15)
movq %r15, %rdi
movl %ebp, %esi
callq 0x17c2b
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0xf4e0
movl %ebx, %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/errno.c
// Function: cqs_strerror_r
cqs_error_t cqs_strerror_r(cqs_error_t error, char *dst, size_t lim) {
	const char *src;

	if (error >= DNS_EBASE && error < DNS_ELAST) {
		src = dns_strerror(error);
	} else if (error >= SO_EBASE && error < SO_ELAST) {
		src = so_strerror(error);
	} else {
#if STRERROR_R_CHAR_P
		if (!(src = strerror_r(error, dst, lim)))
			return EINVAL;
#else
		/* glibc between 2.3.4 and 2.13 returns -1 on error */
		if (-1 == (error = strerror_r(error, dst, lim)))
			return errno;

		return error;
#endif
	}

	if (src != dst && lim > 0) {
		size_t n = strnlen(src, lim - 1);
		memcpy(dst, src, n);
		dst[n] = '\0';
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
leal 0x646e7340(%rdi), %eax
cmpl $0xb, %eax
ja 0x19f57
callq 0xf930
jmp 0x19f67
leal 0x73636b39(%rdi), %eax
cmpl $0x4, %eax
ja 0x19fad
callq 0xfc60
movq %rax, %r15
cmpq %rbx, %r15
sete %al
testq %r14, %r14
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x19fa0
decq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x105b0
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xfad0
movb $0x0, (%rbx,%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
movq %r14, %rdx
callq 0xf330
movq %rax, %r15
testq %rax, %rax
jne 0x19f6a
pushq $0x16
popq %rbp
jmp 0x19fa0
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/errno.c
// Function: cqs_strerror
const char *(cqs_strerror)(int error, void *dst, size_t lim) {
	char *p, *pe, *unknown;
	char e10[((sizeof error * CHAR_BIT) / 3) + 1], *ep;
	int n;

	if (!lim)
		return dst;

	if (0 == cqs_strerror_r(error, dst, lim) && *(char *)dst)
		return dst;

	p = dst;
	pe = p + lim;

	unknown = "Unknown error: ";
	while (*unknown && p < pe)
		*p++ = *unknown++;

	if (error < 0 && p < pe)
		*p++ = '-';

	/* translate integer to string in LSB order */
	for (ep = e10, n = error; n; ep++, n /= 10)
		*ep = "0123456789"[abs(n % 10)];
	if (ep == e10)
		*ep++ = '0';

	/* copy string, flipping from LSB to MSB */
	while (ep > e10 && p < pe)
		*p++ = *--ep;

	p[-1] = '\0';

	return dst;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
testq %rdx, %rdx
je 0x1a093
movq %rdx, %r14
movl %edi, %ebp
movq %rbx, %rsi
callq 0xfa60
testl %eax, %eax
je 0x1a061
addq %rbx, %r14
leaq 0x16957(%rip), %rax     # 0x3094b
movq %rbx, %rcx
movb (%rax), %dl
testb %dl, %dl
je 0x1a00c
cmpq %r14, %rcx
jae 0x1a00c
incq %rax
movb %dl, (%rcx)
incq %rcx
jmp 0x19ff7
cmpq %r14, %rcx
setb %al
testl %ebp, %ebp
sets %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x1a024
movb $0x2d, (%rcx)
incq %rcx
xorl %esi, %esi
pushq $0xa
popq %rdi
leaq 0x1692b(%rip), %r8      # 0x3095b
testl %ebp, %ebp
je 0x1a052
movl %ebp, %eax
cltd
idivl %edi
movl %edx, %r9d
negl %r9d
cmovsl %edx, %r9d
movb (%r9,%r8), %dl
movb %dl, 0x5(%rsp,%rsi)
incq %rsi
movl %eax, %ebp
jmp 0x1a030
testq %rsi, %rsi
je 0x1a068
leaq (%rsp,%rsi), %rax
addq $0x5, %rax
jmp 0x1a071
cmpb $0x0, (%rbx)
jne 0x1a093
jmp 0x19fea
leaq 0x6(%rsp), %rax
movb $0x30, -0x1(%rax)
leaq 0x5(%rsp), %rdx
cmpq %rdx, %rax
jbe 0x1a08f
cmpq %r14, %rcx
jae 0x1a08f
movb -0x1(%rax), %sil
decq %rax
movb %sil, (%rcx)
incq %rcx
jmp 0x1a076
movb $0x0, -0x1(%rcx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/errno.c
// Function: luaopen__cqueues_errno
int luaopen__cqueues_errno(lua_State *L) {
	unsigned i;

	luaL_newlib(L, le_globals);

	for (i = 0; i < sizeof errlist / sizeof *errlist; i++) {
		lua_pushstring(L, errlist[i].name);
		lua_pushinteger(L, errlist[i].value);
		lua_settable(L, -3);

#if EAGAIN == EWOULDBLOCK
		if (!strcmp(errlist[i].name, "EWOULDBLOCK"))
			continue;
#endif

		lua_pushinteger(L, errlist[i].value);
		lua_pushstring(L, errlist[i].name);
		lua_settable(L, -3);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x15f4b(%rip), %xmm0    # 0x30000
movl $0x88, %esi
callq 0x105e0
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10270
leaq 0x281bd(%rip), %rsi     # 0x42290
movq %rbx, %rdi
xorl %edx, %edx
callq 0x102d0
pushq $0x8
popq %r13
leaq 0x281c8(%rip), %r14     # 0x422b0
pushq $-0x3
popq %rbp
cmpq $0x868, %r13            # imm = 0x868
je 0x1a157
movq -0x8(%r13,%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfc50
movslq (%r13,%r14), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf960
movq %rbx, %rdi
movl %ebp, %esi
callq 0x102f0
movq %r15, %rdi
leaq 0x1683e(%rip), %rsi     # 0x30966
callq 0x102e0
testl %eax, %eax
je 0x1a151
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf960
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfc50
movq %rbx, %rdi
movl %ebp, %esi
callq 0x102f0
addq $0x10, %r13
jmp 0x1a0eb
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/signal.c
// Function: sfd_preinit
static void sfd_preinit(struct signalfd *S) {
	S->features = 0;
	S->fd = -1;

	sigemptyset(&S->desired);
	sigemptyset(&S->polling);
	sigemptyset(&S->pending);

#if ENABLE_SIGNALFD || ENABLE_EVFILT_SIGNAL
	S->timeout = NAN;
#else
	S->timeout = 1.1;
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x100a0
leaq 0x88(%rbx), %rdi
callq 0x100a0
leaq 0x108(%rbx), %rdi
callq 0x100a0
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x188(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/signal.c
// Function: lsl_wait
static int lsl_wait(lua_State *L) {
	struct signalfd *S = luaL_checkudata(L, 1, LSL_CLASS);
	sigset_t none;
	int error, signo;

	if ((error = sfd_query(S)))
		return luaL_error(L, "signal:get: %s", cqs_strerror(error));

	sigemptyset(&none);

	if ((signo = sfd_diff(&S->pending, &none))) {
		lua_pushinteger(L, signo);
		sigdelset(&S->pending, signo);

		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq 0x16a4f(%rip), %rdx     # 0x30e5d
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0xfd80
movq %rax, %r14
movq %rsp, %r15
movl 0x4(%r14), %edi
movl $0x80, %edx
movq %r15, %rsi
callq 0x103b0
testq %rax, %rax
jg 0x1a49b
cmpq $-0x1, %rax
jne 0x1a4aa
callq 0xf0a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1a41e
cmpl $0xb, %edi
je 0x1a4aa
testl %edi, %edi
je 0x1a4aa
xorps %xmm0, %xmm0
leaq 0x80(%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
callq 0xf260
leaq 0x169f0(%rip), %rsi     # 0x30e7a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfdf0
movl %eax, %ebp
jmp 0x1a4e8
leaq 0x108(%r14), %rdi
movl (%rsp), %esi
callq 0x10570
movq %rsp, %r15
movq %r15, %rdi
callq 0x100a0
addq $0x108, %r14            # imm = 0x108
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a65b
testl %eax, %eax
je 0x1a4e6
movl %eax, %r15d
movslq %eax, %rsi
movq %rbx, %rdi
callq 0xf960
movq %r14, %rdi
movl %r15d, %esi
callq 0x100f0
jmp 0x1a4e8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq