LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_peek
size_t so_peek(struct socket *so, void *dst, size_t lim, int flags, int *_error) {
	int rstlowat = so->todo & SO_S_RSTLOWAT;
	long count;
	int lowat, error;

	so->todo &= ~SO_S_RSTLOWAT;

	error = so_exec(so);

	so->todo |= rstlowat;

	if (error)
		goto error;

	if (flags & SO_F_PEEKALL)
		so->events &= ~POLLIN;
retry:
	count = recv(so->fd, dst, lim, MSG_PEEK);

	if (count == -1)
		goto soerr;

	if ((size_t)count == lim || !(flags & SO_F_PEEKALL))
		return count;
pollin:
	if (!(so->todo & SO_S_RSTLOWAT)) {
		if (0 != getsockopt(so->fd, SOL_SOCKET, SO_RCVLOWAT, &so->olowat, &(socklen_t){ sizeof so->olowat }))
			goto soerr;

		if (lim > INT_MAX) {
			error = EOVERFLOW;

			goto error;
		}

		lowat = (int)lim;

		if (0 != setsockopt(so->fd, SOL_SOCKET, SO_RCVLOWAT, &lowat, sizeof lowat))
			goto soerr;

		so->todo |= SO_S_RSTLOWAT;
	}

	so->events |= POLLIN;

	*_error = SO_EAGAIN;

	return 0;
soerr:
	error = so_soerr();

	switch (error) {
	case SO_EINTR:
		goto retry;
#if SO_EWOULDBLOCK != SO_EAGAIN
	case SO_EWOULDBLOCK:
		/* FALL THROUGH */
#endif
	case SO_EAGAIN:
		if (flags & SO_F_PEEKALL)
			goto pollin;

		break;
	} /* switch() */
error:
	*_error = error;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl 0xb8(%rdi), %eax
movl %eax, %ebx
andl $0x200, %ebx            # imm = 0x200
andl $0xfffffdff, %eax       # imm = 0xFFFFFDFF
movl %eax, 0xb8(%rdi)
callq 0x23ff4
orl %ebx, 0xb8(%r14)
testl %eax, %eax
jne 0x2579b
testb $0x1, %bpl
je 0x256d6
andb $-0x2, 0xb0(%r14)
leaq 0xc0(%r14), %r13
leaq 0x8(%rsp), %rbx
movl 0x58(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
movl $0x2, %ecx
callq 0xf440
cmpq $-0x1, %rax
je 0x25710
testb $0x1, %bpl
je 0x257a4
cmpq %r15, %rax
jne 0x25727
jmp 0x257a4
callq 0xf0a0
movl (%rax), %eax
cmpl $0x4, %eax
je 0x256e2
cmpl $0xb, %eax
jne 0x2579b
testb $0x1, %bpl
je 0x25796
testb $0x2, 0xb9(%r14)
jne 0x2578e
movl 0x58(%r14), %edi
movl $0x4, 0x8(%rsp)
movl $0x1, %esi
movl $0x12, %edx
movq %r13, %rcx
movq %rbx, %r8
callq 0xf9a0
testl %eax, %eax
jne 0x25710
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
ja 0x257b3
movl %r15d, 0xc(%rsp)
movl 0x58(%r14), %edi
movl $0x1, %esi
movl $0x12, %edx
leaq 0xc(%rsp), %rcx
movl $0x4, %r8d
callq 0x10820
testl %eax, %eax
jne 0x25710
orb $0x2, 0xb9(%r14)
orb $0x1, 0xb0(%r14)
movl $0xb, %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4b, %eax
jmp 0x2579b
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_sendmsg
int so_sendmsg(struct socket *so, const struct msghdr *msg, int flags) {
	ssize_t count;
	int error;

	so_pipeign(so, 0);

	so->todo |= SO_S_SETWRITE;

	if ((error = so_exec(so)))
		goto error;

	so->events &= ~POLLOUT;

#if defined MSG_NOSIGNAL
	if (so->opts.fd_nosigpipe)
		flags |= MSG_NOSIGNAL;
#endif

retry:
	if (-1 == (count = sendmsg(so->fd, msg, flags)))
		goto syerr;

	st_update(&so->st.sent, count, &so->opts);

	so_pipeok(so, 0);

	return 0;
syerr:
	error = errno;
error:
	switch (error) {
	case SO_EINTR:
		goto retry;
#if SO_EWOULDBLOCK != SO_EAGAIN
	case SO_EWOULDBLOCK:
		/* FALL THROUGH */
#endif
	case SO_EAGAIN:
		so->events |= POLLOUT;

		break;
	} /* switch() */

	so_pipeok(so, 0);

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0x24e27
orb $0x1, 0xb9(%rbx)
movq %rbx, %rdi
callq 0x23ff4
testl %eax, %eax
je 0x257e8
movl %eax, %r15d
jmp 0x25818
andb $-0x5, 0xb0(%rbx)
movl %ebp, %eax
orl $0x4000, %eax           # imm = 0x4000
cmpb $0x0, 0x1e(%rbx)
cmovnel %eax, %ebp
movl 0x58(%rbx), %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0xfa40
cmpq $-0x1, %rax
jne 0x2582d
callq 0xf0a0
movl (%rax), %r15d
cmpl $0x4, %r15d
je 0x257fd
cmpl $0xb, %r15d
jne 0x25856
orb $0x4, 0xb0(%rbx)
jmp 0x25856
addq 0x70(%rbx), %rax
movq $-0x1, %rcx
cmovaeq %rax, %rcx
movb 0x48(%rbx), %al
movq %rcx, 0x70(%rbx)
xorl %r15d, %r15d
cmpb $0x1, %al
jne 0x25856
leaq 0x80(%rbx), %rdi
callq 0xfc20
movq %rbx, %rdi
xorl %esi, %esi
callq 0x252cb
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_recvmsg
int so_recvmsg(struct socket *so, struct msghdr *msg, int flags) {
	ssize_t count;
	int error;

	so_pipeign(so, 1);

	so->todo |= SO_S_SETREAD;

	if ((error = so_exec(so)))
		goto error;

	so->events &= ~POLLIN;
retry:
	if (-1 == (count = recvmsg(so->fd, msg, flags))) {
		goto syerr;
	} else if (!count) {
		so->st.rcvd.eof = 1;
		error = EPIPE;
		goto error;
	}

	st_update(&so->st.rcvd, count, &so->opts);

	/* RE .msg_iovlen type
	 *
	 * 	- Linux    : size_t
	 * 	- OS X     : int
	 * 	- OpenBSD  : unsigned int
	 * 	- Solaris  : int
	 * 	- FreeBSD  : int
	 * 	- NetBSD   : int
	 * 	- RFC 2292 : size_t
	 */
	for (size_t i = 0; i < (size_t)msg->msg_iovlen; i++) {
		if ((size_t)count < msg->msg_iov[i].iov_len) {
			msg->msg_iov[i].iov_len = count;

			break;
		} else {
			count -= (ssize_t)msg->msg_iov[i].iov_len;
		}
	}

	so_pipeok(so, 1);

	return 0;
syerr:
	error = errno;
error:
	switch (error) {
	case SO_EINTR:
		goto retry;
#if SO_EWOULDBLOCK != SO_EAGAIN
	case SO_EWOULDBLOCK:
		/* FALL THROUGH */
#endif
	case SO_EAGAIN:
		so->events |= POLLIN;

		break;
	} /* switch() */

	so_pipeok(so, 1);

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
callq 0x24e27
orb $-0x80, 0xb8(%rbx)
movq %rbx, %rdi
callq 0x23ff4
movl %eax, %ebp
testl %eax, %eax
jne 0x258c0
andb $-0x2, 0xb0(%rbx)
movl 0x58(%rbx), %edi
movq %r14, %rsi
movl %r12d, %edx
callq 0xf380
cmpq $-0x1, %rax
jne 0x258d8
callq 0xf0a0
movl (%rax), %ebp
cmpl $0x4, %ebp
je 0x258a5
cmpl $0xb, %ebp
jne 0x25949
orb $0x1, 0xb0(%rbx)
movl $0xb, %ebp
jmp 0x25949
movq %rax, %r15
testq %rax, %rax
jne 0x258ee
movb $0x1, 0x90(%rbx)
movl $0x20, %ebp
jmp 0x25949
movb 0x48(%rbx), %al
movq 0x88(%rbx), %rcx
addq %r15, %rcx
movq $-0x1, %rdx
cmovaeq %rcx, %rdx
movq %rdx, 0x88(%rbx)
cmpb $0x1, %al
jne 0x2591d
leaq 0x98(%rbx), %rdi
callq 0xfc20
movq 0x18(%r14), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x25949
movq 0x10(%r14), %rcx
addq $0x8, %rcx
movq %r15, %rdx
subq (%rcx), %rdx
jb 0x25946
addq $0x10, %rcx
movq %rdx, %r15
decq %rax
jne 0x25933
jmp 0x25949
movq %r15, (%rcx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x252cb
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_pollfd
int so_pollfd(struct socket *so) {
	switch (so_state(so)) {
	case SO_S_GETADDR:
		return dns_ai_pollfd(so->res);
	default:
		return so->fd;
	} /* switch() */
}

// Assembly:
movl 0xb4(%rdi), %eax
notl %eax
andl 0xb8(%rdi), %eax
je 0x259cc
movl $0x1, %ecx
testl %eax, %ecx
jne 0x259be
addl %ecx, %ecx
cmpl $0x801, %ecx            # imm = 0x801
jl 0x259ae
jmp 0x259cc
cmpl $0x2, %ecx
jne 0x259cc
movq 0x50(%rdi), %rdi
jmp 0xf130
movl 0x58(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_peereid
int so_peereid(struct socket *so, uid_t *uid, gid_t *gid) {
	int error;

	if ((error = so_loadcred(so)))
		return error;

	if (so->cred.uid == (uid_t)-1)
		return EOPNOTSUPP;

	if (uid)
		*uid = so->cred.uid;
	if (gid)
		*gid = so->cred.gid;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x25a95
testl %eax, %eax
je 0x25a68
popq %rbx
popq %r14
popq %r15
retq
movl 0x214(%r14), %eax
cmpl $-0x1, %eax
je 0x25a8e
testq %r15, %r15
je 0x25a7c
movl %eax, (%r15)
xorl %eax, %eax
testq %rbx, %rbx
je 0x25a62
movl 0x218(%r14), %ecx
movl %ecx, (%rbx)
jmp 0x25a62
movl $0x5f, %eax
jmp 0x25a62
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_peerpid
int so_peerpid(struct socket *so, pid_t *pid) {
	int error;

	if ((error = so_loadcred(so)))
		return error;

	if (so->cred.pid == (pid_t)-1)
		return EOPNOTSUPP;

	if (pid)
		*pid = so->cred.pid;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x25a95
testl %eax, %eax
je 0x25b0f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x210(%r14), %ecx
cmpl $-0x1, %ecx
je 0x25b26
xorl %eax, %eax
testq %rbx, %rbx
je 0x25b07
movl %ecx, (%rbx)
jmp 0x25b07
movl $0x5f, %eax
jmp 0x25b07
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: bio_methods_init
static void bio_methods_init(void) {
	int type = BIO_get_new_index();
	if (type == -1)
		return;

	bio_methods = BIO_meth_new(type|BIO_TYPE_SOURCE_SINK, "struct socket*");
	if (bio_methods == NULL)
		return;

	BIO_meth_set_write(bio_methods, bio_write);
	BIO_meth_set_read(bio_methods, bio_read);
	BIO_meth_set_puts(bio_methods, bio_puts);
	BIO_meth_set_ctrl(bio_methods, bio_ctrl);
	BIO_meth_set_create(bio_methods, bio_create);
	BIO_meth_set_destroy(bio_methods, bio_destroy);
}

// Assembly:
pushq %rax
callq 0x10140
cmpl $-0x1, %eax
je 0x25c4b
orl $0x400, %eax            # imm = 0x400
leaq 0x10d91(%rip), %rsi     # 0x3695a
movl %eax, %edi
callq 0xf8d0
movq %rax, 0x22a69(%rip)     # 0x48640
testq %rax, %rax
je 0x25c4b
leaq 0x6a(%rip), %rsi        # 0x25c4d
movq %rax, %rdi
callq 0x107c0
movq 0x22a4e(%rip), %rdi     # 0x48640
leaq 0x13b(%rip), %rsi       # 0x25d34
callq 0xfe60
movq 0x22a3b(%rip), %rdi     # 0x48640
leaq 0x25f(%rip), %rsi       # 0x25e6b
callq 0xffb0
movq 0x22a28(%rip), %rdi     # 0x48640
leaq 0x27c(%rip), %rsi       # 0x25e9b
callq 0x10a50
movq 0x22a15(%rip), %rdi     # 0x48640
leaq 0x2a2(%rip), %rsi       # 0x25ed4
callq 0xf490
movq 0x22a02(%rip), %rdi     # 0x48640
leaq 0x2b5(%rip), %rsi       # 0x25efa
popq %rax
jmp 0xfed0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: bio_write
static int bio_write(BIO *bio, const char *src, int len) {
	struct socket *so = BIO_get_data(bio);
	size_t count;

	assert(so);
	assert(len >= 0);

	BIO_clear_retry_flags(bio);
	so->bio.error = 0;

	if ((count = so_syswrite(so, src, len, &so->bio.error)))
		return (int)count;

	if (bio_nonfatal(so->bio.error))
		BIO_set_retry_write(bio);

	/*
	 * SSL_get_error will return SSL_ERROR_SYSCALL, expecting errno to
	 * be set.
	 */
	errno = so->bio.error;

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x108f0
testq %rax, %rax
je 0x25cf6
testl %ebp, %ebp
js 0x25d15
movq %rax, %r14
movq %rax, %r12
movq %rbx, %rdi
movl $0xf, %esi
callq 0x104d0
addq $0xe8, %r14
movl $0x0, 0xe8(%r12)
movl %ebp, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x255b5
testq %rax, %rax
jne 0x25ced
movl (%r14), %r15d
leal -0x6b(%r15), %eax
cmpl $0x8, %eax
ja 0x25cc4
movl $0x181, %ecx            # imm = 0x181
btl %eax, %ecx
jb 0x25cd0
cmpl $0xb, %r15d
je 0x25cd0
cmpl $0x4, %r15d
jne 0x25ce0
movq %rbx, %rdi
movl $0xa, %esi
callq 0xf170
movl (%r14), %r15d
callq 0xf0a0
movl %r15d, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10c6c(%rip), %rdi     # 0x36969
leaq 0x10bea(%rip), %rsi     # 0x368ee
leaq 0x10c61(%rip), %rcx     # 0x3696c
movl $0x9a2, %edx            # imm = 0x9A2
callq 0xf890
leaq 0x10c78(%rip), %rdi     # 0x36994
leaq 0x10bcb(%rip), %rsi     # 0x368ee
leaq 0x10c42(%rip), %rcx     # 0x3696c
movl $0x9a3, %edx            # imm = 0x9A3
callq 0xf890
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: bio_read
static int bio_read(BIO *bio, char *dst, int lim) {
	struct socket *so = BIO_get_data(bio);
	size_t count;

	assert(so);
	assert(lim >= 0);

	BIO_clear_retry_flags(bio);
	so->bio.error = 0;

	if (so->bio.ahead.p < so->bio.ahead.pe) {
		count = SO_MIN(so->bio.ahead.pe - so->bio.ahead.p, lim);
		memcpy(dst, so->bio.ahead.p, count);
		so->bio.ahead.p += count;

		return count;
	}

	if ((count = so_sysread(so, dst, lim, &so->bio.error)))
		return (int)count;

	if (bio_nonfatal(so->bio.error))
		BIO_set_retry_read(bio);

	/* see note about SSL_ERROR_SYSCALL at bio_write */
	errno = so->bio.error;

	return (so->bio.error == EPIPE)? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x108f0
testq %rax, %rax
je 0x25e2d
testl %ebp, %ebp
js 0x25e4c
movq %rax, %r12
movq %rbx, %rdi
movl $0xf, %esi
callq 0x104d0
movl $0x0, 0xe8(%r12)
movq 0xf8(%r12), %rsi
movq 0x100(%r12), %r13
cmpq %r13, %rsi
jae 0x25daf
subq %rsi, %r13
movl %ebp, %eax
cmpq %rax, %r13
cmovgeq %rax, %r13
movq %r15, %rdi
movq %r13, %rdx
callq 0xfa60
addq %r13, 0xf8(%r12)
jmp 0x25e1b
movq %r12, %r14
addq $0xe8, %r14
movl %ebp, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x24f87
testq %rax, %rax
je 0x25dd3
movq %rax, %r13
jmp 0x25e1b
movl (%r14), %r15d
leal -0x6b(%r15), %eax
cmpl $0x8, %eax
ja 0x25de9
movl $0x181, %ecx            # imm = 0x181
btl %eax, %ecx
jb 0x25df5
cmpl $0xb, %r15d
je 0x25df5
cmpl $0x4, %r15d
jne 0x25e05
movq %rbx, %rdi
movl $0x9, %esi
callq 0xf170
movl (%r14), %r15d
callq 0xf0a0
movl %r15d, (%rax)
xorl %r13d, %r13d
cmpl $0x20, (%r14)
setne %r13b
negl %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10b35(%rip), %rdi     # 0x36969
leaq 0x10ab3(%rip), %rsi     # 0x368ee
leaq 0x10b5b(%rip), %rcx     # 0x3699d
movl $0x984, %edx            # imm = 0x984
callq 0xf890
leaq 0x10b6b(%rip), %rdi     # 0x369be
leaq 0x10a94(%rip), %rsi     # 0x368ee
leaq 0x10b3c(%rip), %rcx     # 0x3699d
movl $0x985, %edx            # imm = 0x985
callq 0xf890
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/socket.c
// Function: so_dump
static void so_dump(const unsigned char *src, size_t len, FILE *fp) {
	static const unsigned char hex[] = "0123456789abcdef";
	static const unsigned char tmp[] = "                                                            |                |\n";
	unsigned char ln[sizeof tmp];
	const unsigned char *p, *pe;
	unsigned char *h, *g;
	unsigned i, n;

	p  = src;
	pe = p + len;

	while (p < pe) {
		memcpy(ln, tmp, sizeof ln);

		h = &ln[2];
		g = &ln[61];

		n = p - src;
		h[0] = hex[0x0f & (n >> 20)];
		h[1] = hex[0x0f & (n >> 16)];
		h[2] = hex[0x0f & (n >> 12)];
		h[3] = hex[0x0f & (n >> 8)];
		h[4] = hex[0x0f & (n >> 4)];
		h[5] = hex[0x0f & (n >> 0)];
		h += 8;

		for (n = 0; n < 2; n++) {
			for (i = 0; i < 8 && pe - p > 0; i++, p++) {
				h[0] = hex[0x0f & (*p >> 4)];
				h[1] = hex[0x0f & (*p >> 0)];
				h += 3;

				*g++ = (isgraph(*p))? *p : '.';
			}

			h++;
		}

		fputs((char *)ln, fp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, (%rsp)
testq %rsi, %rsi
jle 0x26088
movq (%rsp), %r14
leaq (%r14,%rsi), %rax
movq %rax, 0x8(%rsp)
leaq (%rsi,%r14), %rax
decq %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %r12
leaq 0x10b0b(%rip), %r15     # 0x36a70
movl $0x2e, %ebx
movl $0xa, %ecx
movq %r12, %rdi
leaq 0x10b17(%rip), %rsi     # 0x36a90
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rax
subq (%rsp), %rax
movl %eax, %ecx
shrl $0x14, %ecx
andl $0xf, %ecx
movb (%rcx,%r15), %cl
movb %cl, 0x22(%rsp)
movl %eax, %ecx
shrl $0x10, %ecx
andl $0xf, %ecx
movb (%rcx,%r15), %cl
movb %cl, 0x23(%rsp)
movl %eax, %ecx
shrl $0xc, %ecx
andl $0xf, %ecx
movb (%rcx,%r15), %cl
movb %cl, 0x24(%rsp)
movl %eax, %ecx
shrl $0x8, %ecx
andl $0xf, %ecx
movb (%rcx,%r15), %cl
movb %cl, 0x25(%rsp)
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movb (%rcx,%r15), %cl
movb %cl, 0x26(%rsp)
andl $0xf, %eax
movb (%rax,%r15), %al
movb %al, 0x27(%rsp)
movb $0x1, %r12b
leaq 0x5d(%rsp), %rbp
leaq 0x2a(%rsp), %r13
movq 0x8(%rsp), %rax
subq %r14, %rax
testq %rax, %rax
jle 0x2605c
callq 0xfe30
movq 0x18(%rsp), %rdx
subq %r14, %rdx
xorl %ecx, %ecx
movzbl (%r14,%rcx), %esi
shrl $0x4, %esi
movb (%rsi,%r15), %sil
movb %sil, (%r13)
movzbl (%r14,%rcx), %esi
andl $0xf, %esi
movb (%rsi,%r15), %sil
movb %sil, 0x1(%r13)
addq $0x3, %r13
movq (%rax), %rsi
movzbl (%r14,%rcx), %edi
cmpw $0x0, (%rsi,%rdi,2)
cmovnsl %ebx, %edi
movb %dil, (%rbp,%rcx)
movl %ecx, %esi
incq %rcx
cmpl $0x6, %esi
ja 0x26056
leaq -0x1(%rdx), %rsi
testq %rdx, %rdx
movq %rsi, %rdx
jg 0x26007
addq %rcx, %rbp
addq %rcx, %r14
incq %r13
testb $0x1, %r12b
movl $0x0, %r12d
jne 0x25feb
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0xfea0
cmpq 0x8(%rsp), %r14
jb 0x25f6a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_random_
static unsigned dns_random_(void) {
#if DNS_RANDOM_OPENSSL
	unsigned r;
	_Bool ok;

	ok = (1 == RAND_bytes((unsigned char *)&r, sizeof r));
	assert(ok && "1 == RAND_bytes()");

	return r;
#else
	return DNS_RANDOM();
#endif
}

// Assembly:
pushq %rax
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
callq 0x103c0
cmpl $0x1, %eax
jne 0x260fe
movl 0x4(%rsp), %eax
popq %rcx
retq
leaq 0x13093(%rip), %rdi     # 0x39198
leaq 0x12d71(%rip), %rsi     # 0x38e7d
leaq 0x1309f(%rip), %rcx     # 0x391b2
movl $0x1ca, %edx            # imm = 0x1CA
callq 0xf890
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strlcpy
size_t dns_strlcpy(char *dst, const char *src, size_t lim) {
	char *d		= dst;
	char *e		= &dst[lim];
	const char *s	= src;

	if (d < e) {
		do {
			if ('\0' == (*d++ = *s++))
				return s - src - 1;
		} while (d < e);

		d[-1]	= '\0';
	}

	while (*s++ != '\0')
		;;

	return s - src - 1;
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
testq %rdx, %rdx
jle 0x26148
addq %rdi, %rdx
movq %rax, %rcx
movb (%rcx), %sil
movb %sil, (%rdi)
incq %rcx
testb %sil, %sil
je 0x26156
incq %rdi
cmpq %rdx, %rdi
jb 0x2612e
movb $0x0, -0x1(%rdi)
leaq 0x1(%rcx), %rdx
cmpb $0x0, (%rcx)
movq %rdx, %rcx
jne 0x26148
jmp 0x26159
movq %rcx, %rdx
notq %rax
addq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strlcat
size_t dns_strlcat(char *dst, const char *src, size_t lim) {
	char *d = memchr(dst, '\0', lim);
	char *e = &dst[lim];
	const char *s = src;
	const char *p;

	if (d && d < e) {
		do {
			if ('\0' == (*d++ = *s++))
				return d - dst - 1;
		} while (d < e);

		d[-1] = '\0';
	}

	p = s;

	while (*s++ != '\0')
		;;

	return lim + (s - p - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %esi, %esi
callq 0xfe90
movq %rax, %rcx
leaq (%r15,%r14), %rdx
testq %rax, %rax
setne %al
cmpq %rdx, %rcx
setb %sil
andb %al, %sil
cmpb $0x1, %sil
jne 0x261b5
movq %rcx, %rax
subq %r15, %rax
movb (%rbx), %sil
movb %sil, (%rcx)
testb %sil, %sil
je 0x261c7
incq %rcx
incq %rbx
incq %rax
cmpq %rdx, %rcx
jb 0x26198
movb $0x0, -0x1(%rcx)
decq %r14
movq %r14, %rax
incq %rax
cmpb $0x0, (%rbx)
leaq 0x1(%rbx), %rbx
jne 0x261bb
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_count
unsigned dns_p_count(struct dns_packet *P, enum dns_section section) {
	unsigned count;

	switch (section) {
	case DNS_S_QD:
		return ntohs(dns_header(P)->qdcount);
	case DNS_S_AN:
		return ntohs(dns_header(P)->ancount);
	case DNS_S_NS:
		return ntohs(dns_header(P)->nscount);
	case DNS_S_AR:
		return ntohs(dns_header(P)->arcount);
	default:
		count = 0;

		if (section & DNS_S_QD)
			count += ntohs(dns_header(P)->qdcount);
		if (section & DNS_S_AN)
			count += ntohs(dns_header(P)->ancount);
		if (section & DNS_S_NS)
			count += ntohs(dns_header(P)->nscount);
		if (section & DNS_S_AR)
			count += ntohs(dns_header(P)->arcount);

		return count;
	}
}

// Assembly:
leal -0x1(%rsi), %eax
cmpl $0x7, %eax
ja 0x26203
leaq 0x10904(%rip), %rcx     # 0x36ae0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl 0x60(%rdi), %eax
jmp 0x261fb
movzwl 0x64(%rdi), %eax
jmp 0x261fb
movzwl 0x62(%rdi), %eax
jmp 0x261fb
movzwl 0x66(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
retq
xorl %eax, %eax
testb $0x1, %sil
je 0x26216
movzwl 0x60(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
testb $0x2, %sil
je 0x26229
movzwl 0x62(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
testb $0x4, %sil
je 0x2623c
movzwl 0x64(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
testb $0x8, %sil
je 0x2624f
movzwl 0x66(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_init
struct dns_packet *dns_p_init(struct dns_packet *P, size_t size) {
	if (!P)
		return 0;

	assert(size >= offsetof(struct dns_packet, data) + 12);

	memset(P, 0, sizeof *P);
	P->size = size - offsetof(struct dns_packet, data);
	P->end  = 12;

	memset(P->data, '\0', 12);

	return P;
}

// Assembly:
testq %rdi, %rdi
je 0x26294
cmpq $0x67, %rsi
jbe 0x26298
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
addq $-0x5c, %rsi
movq %rsi, 0x48(%rdi)
movq $0xc, 0x50(%rdi)
movl $0x0, 0x64(%rdi)
movq $0x0, 0x5c(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x12bae(%rip), %rdi     # 0x38e4e
leaq 0x12bd6(%rip), %rsi     # 0x38e7d
leaq 0x12c14(%rip), %rcx     # 0x38ec2
movl $0x60d, %edx            # imm = 0x60D
callq 0xf890
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_make
struct dns_packet *dns_p_make(size_t len, int *error) {
	struct dns_packet *P;
	size_t size = dns_p_calcsize(len);

	if (!(P = dns_p_init(malloc(size), size)))
		*error = dns_syerr();

	return P;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0xd, %rdi
movl $0xc, %r15d
cmovaeq %rdi, %r15
addq $0x5c, %r15
movq %r15, %rdi
callq 0x10110
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x10a30
testq %r14, %r14
jne 0x262f6
callq 0xf0a0
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_grow
int dns_p_grow(struct dns_packet **P) {
	struct dns_packet *tmp;
	size_t size;
	int error;

	if (!*P) {
		if (!(*P = dns_p_make(DNS_P_QBUFSIZ, &error)))
			return error;

		return 0;
	}

	size = dns_p_sizeof(*P);
	size |= size >> 1;
	size |= size >> 2;
	size |= size >> 4;
	size |= size >> 8;
	size++;

	if (size > 65536)
		return DNS_ENOBUFS;

	if (!(tmp = realloc(*P, dns_p_calcsize(size))))
		return dns_syerr();

	tmp->size = size;
	*P = tmp;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x26381
movq 0x50(%rdi), %rax
leaq 0x5c(%rax), %rcx
cmpq $0xc, %rax
movl $0x68, %eax
cmovaeq %rcx, %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %r14
shrq $0x8, %r14
orq %rcx, %r14
incq %r14
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq $0x10000, %r14          # imm = 0x10000
ja 0x263aa
cmpq $0xd, %r14
movl $0xc, %esi
cmovaeq %r14, %rsi
addq $0x5c, %rsi
callq 0x10620
testq %rax, %rax
je 0x263a3
movq %r14, 0x48(%rax)
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x263aa
leaq 0x4(%rsp), %rsi
movl $0x160, %edi            # imm = 0x160
callq 0xfa30
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x263aa
movl 0x4(%rsp), %eax
jmp 0x263aa
callq 0xf0a0
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_copy
struct dns_packet *dns_p_copy(struct dns_packet *P, const struct dns_packet *P0) {
	if (!P)
		return 0;

	P->end	= DNS_PP_MIN(P->size, P0->end);

	memcpy(P->data, P0->data, P->end);

	return P;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x263db
movq 0x48(%rbx), %rax
movq 0x50(%rsi), %rdx
cmpq %rdx, %rax
cmovbq %rax, %rdx
movq %rdx, 0x50(%rbx)
leaq 0x5c(%rbx), %rdi
addq $0x5c, %rsi
callq 0xfa60
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_copy
int dns_rr_copy(struct dns_packet *P, struct dns_rr *rr, struct dns_packet *Q) {
	unsigned char dn[DNS_D_MAXNAME + 1];
	union dns_any any;
	size_t len;
	int error;

	if (!(len = dns_d_expand(dn, sizeof dn, rr->dn.p, Q, &error)))
		return error;
	else if (len >= sizeof dn)
		return DNS_EILLEGAL;

	if (rr->section != DNS_S_QD && (error = dns_any_parse(dns_any_init(&any, sizeof any), rr, Q)))
		return error;

	return dns_p_push(P, rr->section, dn, len, rr->type, rr->class, rr->ttl, &any);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x4(%rsi), %edx
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %r12, %rcx
callq 0xfec0
testq %rax, %rax
je 0x26ba4
movq %rax, %r15
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpq $0xff, %r15
ja 0x26ba8
movl $0x1, %esi
cmpl $0x1, (%r14)
je 0x26b77
leaq 0x118(%rsp), %rdi
movq $0x400, (%rdi)          # imm = 0x400
movq $0x0, 0x8(%rdi)
movq %r14, %rsi
movq %r12, %rdx
callq 0xfe70
testl %eax, %eax
jne 0x26ba8
movl (%r14), %esi
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
movl 0x10(%r14), %eax
leaq 0x118(%rsp), %r10
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rcx
pushq %r10
pushq %rax
callq 0x106d0
addq $0x10, %rsp
jmp 0x26ba8
movl 0xc(%rsp), %eax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_cmp
int dns_rr_cmp(struct dns_rr *r0, struct dns_packet *P0, struct dns_rr *r1, struct dns_packet *P1) {
	char host0[DNS_D_MAXNAME + 1], host1[DNS_D_MAXNAME + 1];
	union dns_any any0, any1;
	int cmp, error;
	size_t len;

	if ((cmp = r0->type - r1->type))
		return cmp;

	if ((cmp = r0->class - r1->class))
		return cmp;

	/*
	 * FIXME: Do label-by-label comparison to handle illegally long names?
	 */

	if (!(len = dns_d_expand(host0, sizeof host0, r0->dn.p, P0, &error))
	||  len >= sizeof host0)
		return -1;

	if (!(len = dns_d_expand(host1, sizeof host1, r1->dn.p, P1, &error))
	||  len >= sizeof host1)
		return 1;

	if ((cmp = strcasecmp(host0, host1)))
		return cmp;

	if (DNS_S_QD & (r0->section | r1->section)) {
		if (r0->section == r1->section)
			return 0;

		return (r0->section == DNS_S_QD)? -1 : 1;
	}

	if ((error = dns_any_parse(&any0, r0, P0)))
		return -1;

	if ((error = dns_any_parse(&any1, r1, P1)))
		return 1;

	return dns_any_cmp(&any0, r0->type, &any1, r1->type);
}

// Assembly:
movl 0x8(%rdi), %eax
subl 0x8(%rdx), %eax
je 0x26bc0
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa38, %rsp            # imm = 0xA38
movq %rdx, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %eax
subl 0xc(%rdx), %eax
jne 0x26c63
movq %rcx, %r15
movq %rsi, %r12
movzwl 0x4(%r14), %edx
leaq 0x110(%rsp), %rdi
leaq 0xc(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %r12, %rcx
callq 0xfec0
addq $-0x100, %rax
cmpq $-0xff, %rax
jae 0x26c1a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x26c63
movzwl 0x4(%rbx), %edx
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %r15, %rcx
callq 0xfec0
movq %rax, %rcx
addq $-0x100, %rcx
movl $0x1, %eax
cmpq $-0xff, %rcx
jb 0x26c63
leaq 0x110(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xfe40
testl %eax, %eax
je 0x26c72
addq $0xa38, %rsp            # imm = 0xA38
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl (%r14), %ecx
movl (%rbx), %edx
movl %edx, %eax
orl %ecx, %eax
testb $0x1, %al
jne 0x26cf1
leaq 0x628(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xfe70
testl %eax, %eax
jne 0x26c13
leaq 0x218(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xfe70
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x26c63
movl 0x8(%r14), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
jne 0x26c63
movq $-0x40, %rcx
leaq 0x1faaf(%rip), %rdx     # 0x46780
cmpl %esi, 0x40(%rcx,%rdx)
jne 0x26cdf
cmpq $0x0, 0x58(%rcx,%rdx)
jne 0x26d0f
addq $0x40, %rcx
cmpq $0x300, %rcx            # imm = 0x300
jb 0x26cd1
jmp 0x26c13
xorl %eax, %eax
cmpl %edx, %ecx
je 0x26c63
xorl %eax, %eax
cmpl $0x1, %ecx
setne %al
leal -0x1(,%rax,2), %eax
jmp 0x26c63
leaq 0x628(%rsp), %rdi
leaq 0x218(%rsp), %rsi
xorl %eax, %eax
callq *0x68(%rcx,%rdx)
jmp 0x26c63
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_dictadd
void dns_p_dictadd(struct dns_packet *P, unsigned short dn) {
	unsigned short lp, lptr, i;

	lp	= dn;

	while (lp < P->end) {
		if (0xc0 == (0xc0 & P->data[lp]) && P->end - lp >= 2 && lp != dn) {
			lptr	= ((0x3f & P->data[lp + 0]) << 8)
				| ((0xff & P->data[lp + 1]) << 0);

			for (i = 0; i < lengthof(P->dict) && P->dict[i]; i++) {
				if (P->dict[i] == lptr) {
					P->dict[i]	= dn;

					return;
				}
			}
		}

		lp	= dns_l_skip(lp, P->data, P->end);
	}

	for (i = 0; i < lengthof(P->dict); i++) {
		if (!P->dict[i]) {
			P->dict[i]	= dn;

			break;
		}
	}
}

// Assembly:
movq 0x50(%rdi), %rax
movl %esi, %r9d
cmpq %r9, %rax
jbe 0x26dc4
movl %esi, %edx
movb 0x5c(%rdi,%r9), %r8b
movzbl %r8b, %ecx
cmpw %si, %dx
je 0x26d8b
movq %rax, %r10
subq %r9, %r10
cmpq $0x2, %r10
jb 0x26d8b
cmpb $-0x40, %r8b
jb 0x26d8b
movl %ecx, %r11d
andl $0x3f, %r11d
shll $0x8, %r11d
movzbl 0x5d(%rdi,%r9), %r10d
orl %r11d, %r10d
xorl %r9d, %r9d
movzwl (%rdi,%r9,2), %r11d
testl %r11d, %r11d
je 0x26d8b
cmpl %r11d, %r10d
je 0x26dd9
incq %r9
cmpq $0x10, %r9
jne 0x26d73
movq %rax, %r10
cmpb $0x3f, %r8b
ja 0x26db4
incl %edx
movzwl %dx, %edx
movq %rax, %r8
subq %rdx, %r8
movq %rax, %r10
cmpq %rcx, %r8
jb 0x26db4
addq %rcx, %rdx
testq %rcx, %rcx
cmoveq %rax, %rdx
movq %rdx, %r10
movzwl %r10w, %r9d
movl %r10d, %edx
cmpq %r9, %rax
ja 0x26d3c
xorl %r9d, %r9d
cmpw $0x0, (%rdi,%r9,2)
je 0x26dd9
incq %r9
cmpq $0x10, %r9
jne 0x26dc7
retq
movw %si, (%rdi,%r9,2)
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_push
int dns_d_push(struct dns_packet *P, const void *dn, size_t len) {
	size_t lim	= P->size - P->end;
	unsigned dp	= P->end;
	int error	= DNS_EILLEGAL; /* silence compiler */

	len	= dns_d_comp(&P->data[dp], lim, dn, len, P, &error);

	if (len == 0)
		return error;
	if (len > lim)
		return DNS_ENOBUFS;

	P->end	+= len;

	dns_p_dictadd(P, dp);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x48(%rdi), %r14
movq 0x50(%rdi), %r15
subq %r15, %r14
leaq 0xc(%rsp), %r9
movl $0x9b918cc1, (%r9)      # imm = 0x9B918CC1
movl %r15d, %eax
addq %rax, %rdi
addq $0x5c, %rdi
movq %r14, %rsi
movq %rbx, %r8
callq 0xfe00
testq %rax, %rax
je 0x27119
movl $0x9b918cc0, %ecx       # imm = 0x9B918CC0
cmpq %r14, %rax
ja 0x2711d
addq %rax, 0x50(%rbx)
movzwl %r15w, %esi
movq %rbx, %rdi
callq 0xf3c0
xorl %ecx, %ecx
jmp 0x2711d
movl 0xc(%rsp), %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_any_push
int dns_any_push(struct dns_packet *P, union dns_any *any, enum dns_type type) {
	const struct dns_rrtype *t;

	if ((t = dns_rrtype(type)))
		return t->push(P, any);

	if (P->size - P->end < any->rdata.len + 2)
		return DNS_ENOBUFS;

	P->data[P->end++]	= 0xff & (any->rdata.len >> 8);
	P->data[P->end++]	= 0xff & (any->rdata.len >> 0);

	memcpy(&P->data[P->end], any->rdata.data, any->rdata.len);
	P->end	+= any->rdata.len;

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rbp
movq $-0x40, %rcx
leaq 0x1f640(%rip), %r8      # 0x46780
cmpl %edx, 0x40(%rcx,%r8)
jne 0x2714f
cmpq $0x0, 0x58(%rcx,%r8)
jne 0x271be
addq $0x40, %rcx
cmpq $0x300, %rcx            # imm = 0x300
jb 0x27140
movq 0x48(%rbp), %rsi
movq 0x50(%rbp), %rcx
subq %rcx, %rsi
movq 0x8(%rbx), %rdx
leaq 0x2(%rdx), %rdi
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq %rdi, %rsi
jb 0x271b7
leaq 0x5c(%rbp), %rdi
leaq 0x1(%rcx), %rax
movq %rax, 0x50(%rbp)
movb %dh, 0x5c(%rbp,%rcx)
movb 0x8(%rbx), %al
movq 0x50(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbp)
movb %al, 0x5c(%rbp,%rcx)
addq 0x50(%rbp), %rdi
leaq 0x10(%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0xfa60
movq 0x8(%rbx), %rax
addq %rax, 0x50(%rbp)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbp, %rdi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x60(%rcx,%r8)
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_init
char *dns_d_init(void *dst, size_t lim, const void *src, size_t len, int flags) {
	if (flags & DNS_D_TRIM) {
		dns_d_trim(dst, lim, src, len, flags);
	} if (flags & DNS_D_ANCHOR) {
		dns_d_anchor(dst, lim, src, len);
	} else {
		memmove(dst, src, DNS_PP_MIN(lim, len));

		if (lim > 0)
			((char *)dst)[DNS_PP_MIN(len, lim - 1)]	= '\0';
	}

	return dst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
testb $0x4, %r8b
jne 0x275ea
andl $0x1, %r8d
jmp 0x2769e
testq %r15, %r15
je 0x27606
xorl %eax, %eax
xorl %ecx, %ecx
cmpb $0x2e, (%r12,%rcx)
jne 0x27608
incq %rcx
cmpq %rcx, %r15
jne 0x275f3
movb $0x1, %cl
jmp 0x2764f
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %r15, %rcx
jae 0x2764b
xorl %eax, %eax
movb (%r12,%rcx), %sil
cmpb $0x2e, %sil
jne 0x27627
cmpl $0x2e, %edx
jne 0x27627
movl $0x2e, %edx
jmp 0x2763b
cmpq %r14, %rax
jae 0x27634
movb %sil, (%rbx,%rax)
movb (%r12,%rcx), %sil
incq %rax
movzbl %sil, %edx
incq %rcx
cmpq %rcx, %r15
jne 0x27611
cmpl $0x2e, %edx
setne %cl
jmp 0x2764f
movb $0x1, %cl
xorl %eax, %eax
andl $0x1, %r8d
je 0x27664
testb %cl, %cl
je 0x27664
cmpq %r14, %rax
jae 0x27687
movb $0x2e, (%rbx,%rax)
jmp 0x2768c
testq %r14, %r14
jne 0x2768f
testl %r8d, %r8d
jne 0x276a3
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x105f0
testq %r14, %r14
je 0x276a3
incq %rax
leaq -0x1(%r14), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movb $0x0, (%rbx,%rcx)
testl %r8d, %r8d
je 0x276d4
testq %r15, %r15
je 0x276fd
cmpq %r15, %r14
movq %r15, %rdx
cmovbq %r14, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x105f0
cmpb $0x2e, -0x1(%r12,%r15)
je 0x276e9
cmpq %r14, %r15
jae 0x276cf
movb $0x2e, (%rbx,%r15)
incq %r15
jmp 0x276e9
cmpq %r15, %r14
movq %r15, %rdx
cmovbq %r14, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x105f0
testq %r14, %r14
je 0x276fd
decq %r14
cmpq %r15, %r14
cmovaeq %r15, %r14
movb $0x0, (%rbx,%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_anchor
size_t dns_d_anchor(void *dst, size_t lim, const void *src, size_t len) {
	if (len == 0)
		return 0;

	memmove(dst, src, DNS_PP_MIN(lim, len));

	if (((const char *)src)[len - 1] != '.') {
		if (len < lim)
			((char *)dst)[len]	= '.';
		len++;
	}

	if (lim > 0)
		((char *)dst)[DNS_PP_MIN(lim - 1, len)]	= '\0';

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x27762
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq %rcx, %rsi
movq %rcx, %rdx
cmovbq %rsi, %rdx
movq %r12, %rsi
callq 0x105f0
cmpb $0x2e, -0x1(%r12,%rbx)
je 0x2774c
cmpq %r14, %rbx
jae 0x27749
movb $0x2e, (%r15,%rbx)
incq %rbx
testq %r14, %r14
je 0x27764
decq %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
movb $0x0, (%r15,%r14)
jmp 0x27764
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_cleave
size_t dns_d_cleave(void *dst, size_t lim, const void *src, size_t len) {
	const char *dot;

	/* XXX: Skip any leading dot. Handles cleaving root ".". */
	if (len == 0 || !(dot = memchr((const char *)src + 1, '.', len - 1)))
		return 0;

	len	-= dot - (const char *)src;

	/* XXX: Unless root, skip the label's trailing dot. */
	if (len > 1) {
		src	= ++dot;
		len--;
	} else
		src	= dot;

	memmove(dst, src, DNS_PP_MIN(lim, len));

	if (lim > 0)
		((char *)dst)[DNS_PP_MIN(lim - 1, len)]	= '\0';

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x277e3
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1(%rdx), %rdi
leaq -0x1(%rcx), %rdx
movl $0x2e, %esi
callq 0xfe90
testq %rax, %rax
je 0x277e3
subq %rax, %rbx
addq %r12, %rbx
xorl %ecx, %ecx
cmpq $0x2, %rbx
setae %cl
addq %rcx, %rax
subq %rcx, %rbx
cmpq %r14, %rbx
movq %r14, %rdx
cmovbq %rbx, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x105f0
testq %r14, %r14
je 0x277e5
decq %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
movb $0x0, (%r15,%r14)
jmp 0x277e5
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_l_expand
static size_t dns_l_expand(unsigned char *dst, size_t lim, unsigned short src, unsigned short *nxt, const unsigned char *data, size_t end) {
	unsigned short len;
	unsigned nptrs	= 0;

retry:
	if (src >= end)
		goto invalid;

	switch (0x03 & (data[src] >> 6)) {
	case 0x00:
		len	= (0x3f & (data[src++]));

		if (end - src < len)
			goto invalid;

		if (lim > 0) {
			memcpy(dst, &data[src], DNS_PP_MIN(lim, len));

			dst[DNS_PP_MIN(lim - 1, len)]	= '\0';
		}

		*nxt	= src + len;

		return len;
	case 0x01:
		goto invalid;
	case 0x02:
		goto invalid;
	case 0x03:
		if (++nptrs > DNS_D_MAXPTRS)
			goto invalid;

		if (end - src < 2)
			goto invalid;

		src	= ((0x3f & data[src + 0]) << 8)
			| ((0xff & data[src + 1]) << 0);

		goto retry;
	} /* switch() */

	/* NOT REACHED */
invalid:
	*nxt	= end;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %eax
cmpq %r8, %rax
jae 0x27afc
movq %rdi, %r14
xorl %edx, %edx
movzbl (%rcx,%rax), %r15d
movl %r15d, %edi
shrl $0x6, %edi
cmpl $0x3, %edi
jne 0x27af5
cmpl $0x7e, %edx
ja 0x27afc
movq %r8, %rsi
subq %rax, %rsi
cmpq $0x2, %rsi
jb 0x27afc
incl %edx
andl $0x3f, %r15d
shll $0x8, %r15d
movzbl 0x1(%rcx,%rax), %eax
orq %r15, %rax
movl %eax, %esi
cmpq %r8, %rax
jb 0x27ab9
jmp 0x27afc
decl %edi
cmpl $0x2, %edi
jae 0x27b12
xorl %r15d, %r15d
movw %r8w, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
incl %esi
andl $0x3f, %r15d
movzwl %si, %r12d
movq %r8, %rax
subq %r12, %rax
cmpq %r15, %rax
jb 0x27afc
addq %r12, %rcx
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0xfa60
movb $0x0, (%r14,%r15)
movzbl %r15b, %r8d
addl %r12d, %r8d
jmp 0x27aff
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_expand
size_t dns_d_expand(void *dst, size_t lim, unsigned short src, struct dns_packet *P, int *error) {
	size_t dstp	= 0;
	unsigned nptrs	= 0;
	unsigned char len;

	while (src < P->end) {
		switch ((0x03 & (P->data[src] >> 6))) {
		case 0x00:	/* FOLLOWS */
			len	= (0x3f & P->data[src]);

			if (0 == len) {
				if (dstp == 0) {
					if (dstp < lim)
						((unsigned char *)dst)[dstp]	= '.';

					dstp++;
				}

				/* NUL terminate */
				if (lim > 0)
					((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';

/* success ==> */		return dstp;
			}

			src++;

			if (P->end - src < len)
				goto toolong;

			if (dstp < lim)
				memcpy(&((unsigned char *)dst)[dstp], &P->data[src], DNS_PP_MIN(len, lim - dstp));

			src	+= len;
			dstp	+= len;

			if (dstp < lim)
				((unsigned char *)dst)[dstp]	= '.';

			dstp++;

			nptrs	= 0;

			continue;
		case 0x01:	/* RESERVED */
			goto reserved;
		case 0x02:	/* RESERVED */
			goto reserved;
		case 0x03:	/* POINTER */
			if (++nptrs > DNS_D_MAXPTRS)
				goto toolong;

			if (P->end - src < 2)
				goto toolong;

			src	= ((0x3f & P->data[src + 0]) << 8)
				| ((0xff & P->data[src + 1]) << 0);

			continue;
		} /* switch() */
	} /* while() */

toolong:
	*error	= DNS_EILLEGAL;

	if (lim > 0)
		((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';

	return 0;
reserved:
	*error	= DNS_EILLEGAL;

	if (lim > 0)
		((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %rbx
movq %rdi, %r9
movq 0x50(%rcx), %rax
movl %edx, %ecx
cmpq %rcx, %rax
jbe 0x27c92
leaq 0x5c(%r12), %rbp
xorl %r13d, %r13d
xorl %esi, %esi
movzbl (%rbp,%rcx), %edi
movzwl %di, %r14d
movl %r14d, %r8d
shrl $0x6, %r8d
cmpl $0x3, %r8d
jne 0x27c19
cmpl $0x7e, %esi
ja 0x27c95
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x2, %rdx
jb 0x27c95
incl %esi
andl $0x3f, %edi
shll $0x8, %edi
movzbl 0x1(%rcx,%rbp), %ecx
orq %rdi, %rcx
movl %ecx, %edx
cmpq %rcx, %rax
ja 0x27bd1
jmp 0x27c95
decl %r8d
cmpl $0x2, %r8d
jb 0x27c95
andl $0x3f, %r14d
je 0x27cc1
incl %edx
movzwl %dx, %ecx
subq %rcx, %rax
cmpq %r14, %rax
jb 0x27c95
movq %rbx, %rdx
subq %r13, %rdx
jbe 0x27c69
leaq (%r9,%r13), %rdi
leaq (%rcx,%rbp), %rsi
cmpq %r14, %rdx
cmovaeq %r14, %rdx
movq %r9, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
callq 0xfa60
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r9
addq %r14, %r13
cmpq %rbx, %r13
jae 0x27c76
movb $0x2e, (%r9,%r13)
movzwl %r14w, %edx
addl %ecx, %edx
incq %r13
movq 0x50(%r12), %rax
movzwl %dx, %ecx
cmpq %rcx, %rax
ja 0x27bcf
jmp 0x27c95
xorl %r13d, %r13d
movl $0x9b918cc1, (%r15)     # imm = 0x9B918CC1
xorl %eax, %eax
testq %rbx, %rbx
je 0x27cb2
decq %rbx
cmpq %rbx, %r13
cmovbq %r13, %rbx
movb $0x0, (%r9,%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r13, %r13
je 0x27ccb
movq %r13, %rax
jmp 0x27c9e
testq %rbx, %rbx
je 0x27ce1
movb $0x2e, (%r9)
movl $0x1, %r13d
movl $0x1, %eax
jmp 0x27ca3
movl $0x1, %eax
jmp 0x27cb2
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_cname
size_t dns_d_cname(void *dst, size_t lim, const void *dn, size_t len, struct dns_packet *P, int *error_) {
	char host[DNS_D_MAXNAME + 1];
	struct dns_rr_i i;
	struct dns_rr rr;
	unsigned depth;
	int error;

	if (sizeof host <= dns_d_anchor(host, sizeof host, dn, len))
		{ error = ENAMETOOLONG; goto error; }

	for (depth = 0; depth < 7; depth++) {
		dns_rr_i_init(memset(&i, 0, sizeof i), P);

		i.section	= DNS_S_ALL & ~DNS_S_QD;
		i.name		= host;
		i.type		= DNS_T_CNAME;

		if (!dns_rr_grep(&rr, 1, &i, P, &error))
			break;

		if ((error = dns_cname_parse((struct dns_cname *)host, &rr, P)))
			goto error;
	}

	return dns_strlcpy(dst, host, lim);
error:
	*error_	= error;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %r9, 0x18(%rsp)
movq %r8, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
testq %rcx, %rcx
je 0x27d76
movq %rcx, %r14
movq %rdx, %r15
movl $0x100, %edx            # imm = 0x100
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0xfa60
cmpb $0x2e, -0x1(%r15,%r14)
je 0x27d4d
cmpq $0xff, %r14
ja 0x27d4a
movb $0x2e, 0x90(%rsp,%r14)
incq %r14
movl $0xff, %eax
movl $0x24, %ecx
cmpq %rax, %r14
cmovbq %r14, %rax
movb $0x0, 0x90(%rsp,%rax)
jbe 0x27d76
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
jmp 0x27e7f
leaq 0x58(%rsp), %r15
movl $0x7, %ebp
leaq 0x90(%rsp), %r13
movl $0x9b918cc1, %r14d      # imm = 0x9B918CC1
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x50(%rsp)
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movl $0xe, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movl $0x5, 0x30(%rsp)
leaq 0x78(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
movq %r12, %rcx
leaq 0x8(%rsp), %r8
callq 0xfd70
testl %eax, %eax
je 0x27e30
movzwl 0x8c(%rsp), %edx
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
movq %r12, %rcx
leaq 0xc(%rsp), %r8
callq 0xfec0
cmpq $0x100, %rax            # imm = 0x100
movl $0x0, %ecx
cmovael %r14d, %ecx
testq %rax, %rax
jne 0x27e1c
movl 0xc(%rsp), %ecx
movl %ecx, 0x8(%rsp)
testl %ecx, %ecx
jne 0x27d68
decl %ebp
jne 0x27d8e
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
jle 0x27e5e
addq %rbx, %rcx
leaq 0x90(%rsp), %r13
movb (%r13), %al
movb %al, (%rbx)
incq %r13
testb %al, %al
je 0x27e6e
incq %rbx
cmpq %rcx, %rbx
jb 0x27e45
movb $0x0, -0x1(%rbx)
leaq 0x1(%r13), %rcx
cmpb $0x0, (%r13)
movq %rcx, %r13
jne 0x27e5e
jmp 0x27e71
movq %r13, %rcx
leaq 0x90(%rsp), %rax
notq %rax
addq %rcx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_any_parse
int dns_any_parse(union dns_any *any, struct dns_rr *rr, struct dns_packet *P) {
	const struct dns_rrtype *t;

	if ((t = dns_rrtype(rr->type)))
		return t->parse(dns_any_reinit(any, t), rr, P);

	if (rr->rd.len > any->rdata.size)
		return DNS_EILLEGAL;

	memcpy(any->rdata.data, &P->data[rr->rd.p], rr->rd.len);
	any->rdata.len	= rr->rd.len;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %ecx
movq $-0x40, %rax
leaq 0x1e89b(%rip), %rdx     # 0x46780
cmpl %ecx, 0x40(%rax,%rdx)
jne 0x27ef5
movq 0x58(%rax,%rdx), %r8
testq %r8, %r8
jne 0x27f34
addq $0x40, %rax
cmpq $0x300, %rax            # imm = 0x300
jb 0x27ee5
movzwl 0x16(%rbx), %edx
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpq %rdx, (%r14)
jb 0x27f2e
leaq 0x10(%r14), %rdi
movzwl 0x14(%rbx), %eax
leaq (%r15,%rax), %rsi
addq $0x5c, %rsi
callq 0xfa60
movzwl 0x16(%rbx), %eax
movq %rax, 0x8(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x50(%rax,%rdx), %rax
testq %rax, %rax
je 0x27f53
movq (%r14), %rsi
addq $0x10, %rsi
movq %r14, %rdi
movq %r8, %r14
callq *%rax
movq %r14, %r8
movq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmpq *%r8
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_txt_init
struct dns_txt *dns_txt_init(struct dns_txt *txt, size_t size) {
	assert(size > offsetof(struct dns_txt, data));

	txt->size	= size - offsetof(struct dns_txt, data);
	txt->len	= 0;

	return txt;
}

// Assembly:
cmpq $0x10, %rsi
jbe 0x2a95d
addq $-0x10, %rsi
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0xe60e(%rip), %rdi      # 0x38f73
leaq 0xe511(%rip), %rsi      # 0x38e7d
leaq 0xe626(%rip), %rcx      # 0x38f99
movl $0xefd, %edx            # imm = 0xEFD
callq 0xf890