LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x263cb
leaq 0x1076c(%rip), %rcx     # 0x36b10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl 0x60(%rdi), %eax
jmp 0x263c3
movzwl 0x64(%rdi), %eax
jmp 0x263c3
movzwl 0x62(%rdi), %eax
jmp 0x263c3
movzwl 0x66(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
retq
xorl %eax, %eax
testb $0x1, %sil
je 0x263de
movzwl 0x60(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
testb $0x2, %sil
je 0x263f1
movzwl 0x62(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
testb $0x4, %sil
je 0x26404
movzwl 0x64(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
testb $0x8, %sil
je 0x26417
movzwl 0x66(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26460
cmpq $0x67, %rsi
jbe 0x26466
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
xorl %eax, %eax
movq %rax, 0x60(%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)
movq %rax, 0x5c(%rdi)
movl $0x0, 0x64(%rdi)
jmp 0x26462
xorl %edi, %edi
movq %rdi, %rax
retq
pushq %rax
leaq 0x12a20(%rip), %rdi     # 0x38e8e
leaq 0x12a48(%rip), %rsi     # 0x38ebd
leaq 0x12a86(%rip), %rcx     # 0x38f02
movl $0x60d, %edx            # imm = 0x60D
callq 0xf890
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0xd, %rdi
movl $0xc, %r14d
cmovaeq %rdi, %r14
addq $0x5c, %r14
movq %r14, %rdi
callq 0x10110
movq %rax, %rdi
movq %r14, %rsi
callq 0x10a30
movq %rax, %r14
testq %rax, %rax
jne 0x264c3
callq 0xf0a0
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26550
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 0x26579
cmpq $0xd, %r14
movl $0xc, %esi
cmovaeq %r14, %rsi
addq $0x5c, %rsi
callq 0x10620
testq %rax, %rax
je 0x26572
movq %r14, 0x48(%rax)
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x26579
leaq 0x4(%rsp), %rsi
movl $0x160, %edi            # imm = 0x160
callq 0xfa30
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x26579
movl 0x4(%rsp), %eax
jmp 0x26579
callq 0xf0a0
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
testq %rdi, %rdi
je 0x265ac
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rsi), %rdx
cmpq %rdx, %rax
cmovbq %rax, %rdx
movq %rdx, 0x50(%rdi)
addq $0x5c, %rdi
addq $0x5c, %rsi
callq 0xfa60
jmp 0x265ae
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26e17
movq %rax, %r15
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpq $0xff, %r15
ja 0x26e1b
cmpl $0x1, (%r14)
je 0x26de7
leaq 0x118(%rsp), %rdi
movq $0x400, (%rdi)          # imm = 0x400
movq $0x0, 0x8(%rdi)
movq %r14, %rsi
movq %r12, %rdx
callq 0xfe70
movl %eax, 0xc(%rsp)
testl %eax, %eax
jne 0x26e1b
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 0x26e1b
movl 0xc(%rsp), %eax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26e33
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 0x26ed6
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 0x26e8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x26ed6
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 0x26ed6
leaq 0x110(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xfe40
testl %eax, %eax
je 0x26ee5
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 0x26f68
leaq 0x628(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xfe70
movl %eax, 0xc(%rsp)
testl %eax, %eax
jne 0x26e86
leaq 0x218(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xfe70
movl %eax, %ecx
movl %eax, 0xc(%rsp)
movl $0x1, %eax
testl %ecx, %ecx
jne 0x26ed6
movl 0x8(%r14), %edx
movl %edx, %eax
subl 0x8(%rbx), %eax
jne 0x26ed6
xorl %ecx, %ecx
leaq 0x1f839(%rip), %rax     # 0x46780
xorl %esi, %esi
cmpl %edx, (%rsi,%rax)
jne 0x26f56
cmpq $0x0, 0x18(%rsi,%rax)
jne 0x26f86
leaq 0x40(%rsi), %rdi
cmpq $0x300, %rsi            # imm = 0x300
movq %rdi, %rsi
jb 0x26f49
jmp 0x26f8c
xorl %eax, %eax
cmpl %edx, %ecx
je 0x26ed6
xorl %eax, %eax
cmpl $0x1, %ecx
setne %al
leal -0x1(,%rax,2), %eax
jmp 0x26ed6
addq %rsi, %rax
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x26ed6
leaq 0x628(%rsp), %rdi
leaq 0x218(%rsp), %rsi
xorl %eax, %eax
callq *0x28(%rcx)
jmp 0x26ed6
// File: /workspace/github_c_makefile_star2_O1/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, %edx
cmpq %rdx, %rax
jbe 0x2704f
movl %esi, %ecx
cmpw %si, %cx
je 0x27011
movq %rax, %r8
subq %rdx, %r8
cmpq $0x2, %r8
jb 0x27011
movb 0x5c(%rdi,%rdx), %r8b
cmpb $-0x40, %r8b
jb 0x27011
movzbl %r8b, %r8d
andl $0x3f, %r8d
shll $0x8, %r8d
movzbl 0x5d(%rdi,%rdx), %r9d
orl %r8d, %r9d
xorl %r8d, %r8d
movzwl (%rdi,%r8,2), %r10d
testl %r10d, %r10d
je 0x27011
cmpl %r10d, %r9d
je 0x27064
incq %r8
cmpq $0x10, %r8
jne 0x26ff9
movzbl 0x5c(%rdi,%rdx), %edx
movq %rax, %r8
cmpq $0x3f, %rdx
ja 0x2703f
incl %ecx
movzwl %cx, %ecx
movq %rax, %r9
subq %rcx, %r9
movq %rax, %r8
cmpq %rdx, %r9
jb 0x2703f
addq %rdx, %rcx
testq %rdx, %rdx
cmoveq %rax, %rcx
movq %rcx, %r8
movzwl %r8w, %edx
movl %r8d, %ecx
cmpq %rdx, %rax
ja 0x26fc5
xorl %r8d, %r8d
cmpw $0x0, (%rdi,%r8,2)
je 0x27064
incq %r8
cmpq $0x10, %r8
jne 0x27052
retq
movw %si, (%rdi,%r8,2)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x27383
movl $0x9b918cc0, %ecx       # imm = 0x9B918CC0
cmpq %r14, %rax
ja 0x27387
addq %rax, 0x50(%rbx)
movzwl %r15w, %esi
movq %rbx, %rdi
callq 0xf3c0
xorl %ecx, %ecx
jmp 0x27387
movl 0xc(%rsp), %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorl %eax, %eax
leaq 0x1f3db(%rip), %rcx     # 0x46780
xorl %esi, %esi
cmpl %edx, (%rsi,%rcx)
jne 0x273b4
cmpq $0x0, 0x18(%rsi,%rcx)
jne 0x273c6
leaq 0x40(%rsi), %rdi
cmpq $0x300, %rsi            # imm = 0x300
movq %rdi, %rsi
jb 0x273a7
jmp 0x273cc
addq %rsi, %rcx
movq %rcx, %rax
testq %rax, %rax
je 0x273e5
movq 0x20(%rax), %rcx
movq %rbp, %rdi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rcx
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 0x27440
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
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
testb $0x4, %r8b
je 0x278dc
xorl %ecx, %ecx
testq %r14, %r14
je 0x2786d
cmpb $0x2e, (%r12,%rcx)
jne 0x2786d
incq %rcx
cmpq %rcx, %r14
jne 0x2785b
movq %r14, %rcx
xorl %edx, %edx
cmpq %r14, %rcx
jae 0x278ae
xorl %eax, %eax
movb (%r12,%rcx), %sil
cmpb $0x2e, %sil
sete %dil
cmpl $0x2e, %edx
sete %dl
testb %dl, %dil
jne 0x27899
cmpq %r15, %rax
jae 0x27896
movb %sil, (%rbx,%rax)
incq %rax
movzbl (%r12,%rcx), %edx
incq %rcx
cmpq %rcx, %r14
jne 0x27876
cmpl $0x2e, %edx
setne %cl
jmp 0x278b2
movb $0x1, %cl
xorl %eax, %eax
testb $0x1, %r8b
je 0x278c8
testb %cl, %cl
je 0x278c8
cmpq %r15, %rax
jae 0x278c5
movb $0x2e, (%rbx,%rax)
incq %rax
testq %r15, %r15
je 0x278dc
leaq -0x1(%r15), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movb $0x0, (%rbx,%rcx)
testb $0x1, %r8b
jne 0x278f9
cmpq %r14, %r15
movq %r14, %rdx
cmovbq %r15, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x105f0
jmp 0x27928
testq %r14, %r14
je 0x2793c
cmpq %r14, %r15
movq %r14, %rdx
cmovbq %r15, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x105f0
cmpb $0x2e, -0x1(%r12,%r14)
je 0x27928
cmpq %r15, %r14
jae 0x27925
movb $0x2e, (%rbx,%r14)
incq %r14
testq %r15, %r15
je 0x2793c
decq %r15
cmpq %r14, %r15
cmovaeq %r14, %r15
movb $0x0, (%rbx,%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x279a1
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 0x2798b
cmpq %r14, %rbx
jae 0x27988
movb $0x2e, (%r15,%rbx)
incq %rbx
testq %r14, %r14
je 0x279a3
decq %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
movb $0x0, (%r15,%r14)
jmp 0x279a3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x27a22
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 0x27a22
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 0x27a24
decq %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
movb $0x0, (%r15,%r14)
jmp 0x27a24
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x27d9d
movq %rdi, %r14
xorl %edx, %edx
movzbl (%rcx,%rax), %r15d
movl %r15d, %edi
shrl $0x6, %edi
cmpl $0x3, %edi
jne 0x27d96
cmpl $0x7e, %edx
ja 0x27d9d
movq %r8, %rsi
subq %rax, %rsi
cmpq $0x2, %rsi
jb 0x27d9d
incl %edx
andl $0x3f, %r15d
shll $0x8, %r15d
movzbl 0x1(%rcx,%rax), %eax
orq %r15, %rax
movl %eax, %esi
cmpq %r8, %rax
jb 0x27d5a
jmp 0x27d9d
decl %edi
cmpl $0x2, %edi
jae 0x27db3
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 0x27d9d
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 0x27da0
// File: /workspace/github_c_makefile_star2_O1/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 0x27f33
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 0x27eba
cmpl $0x7e, %esi
ja 0x27f36
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x2, %rdx
jb 0x27f36
incl %esi
andl $0x3f, %edi
shll $0x8, %edi
movzbl 0x1(%rcx,%rbp), %ecx
orq %rdi, %rcx
movl %ecx, %edx
cmpq %rcx, %rax
ja 0x27e72
jmp 0x27f36
decl %r8d
cmpl $0x2, %r8d
jb 0x27f36
andl $0x3f, %r14d
je 0x27f62
incl %edx
movzwl %dx, %ecx
subq %rcx, %rax
cmpq %r14, %rax
jb 0x27f36
movq %rbx, %rdx
subq %r13, %rdx
jbe 0x27f0a
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 0x27f17
movb $0x2e, (%r9,%r13)
movzwl %r14w, %edx
addl %ecx, %edx
incq %r13
movq 0x50(%r12), %rax
movzwl %dx, %ecx
cmpq %rcx, %rax
ja 0x27e70
jmp 0x27f36
xorl %r13d, %r13d
movl $0x9b918cc1, (%r15)     # imm = 0x9B918CC1
xorl %eax, %eax
testq %rbx, %rbx
je 0x27f53
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
jne 0x27f76
movl $0x1, %r13d
testq %rbx, %rbx
je 0x27f76
movb $0x2e, (%r9)
movq %r13, %rax
jmp 0x27f3f
// File: /workspace/github_c_makefile_star2_O1/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, %r13
movq %rdi, %rbx
testq %rcx, %rcx
je 0x28015
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 0x27fde
cmpq $0xff, %r14
ja 0x27fdb
movb $0x2e, 0x90(%rsp,%r14)
incq %r14
movl $0xff, %eax
cmpq %rax, %r14
cmovbq %r14, %rax
movb $0x0, 0x90(%rsp,%rax)
cmpq $0x100, %r14            # imm = 0x100
jb 0x28015
movl $0x24, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
xorl %eax, %eax
jmp 0x28132
movq %r13, 0x10(%rsp)
leaq 0x58(%rsp), %r15
movl $0x7, %ebp
leaq 0x90(%rsp), %r13
movl $0x9b918cc1, %r14d      # imm = 0x9B918CC1
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x70(%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 0x280de
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 0x280ca
movl 0xc(%rsp), %ecx
movl %ecx, 0x8(%rsp)
testl %ecx, %ecx
jne 0x28003
decl %ebp
jne 0x28032
movq %r13, %rcx
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
jle 0x2811d
addq %rbx, %rdx
xorl %eax, %eax
movb 0x90(%rsp,%rax), %cl
movb %cl, (%rbx,%rax)
testb %cl, %cl
je 0x28132
leaq (%rbx,%rax), %rcx
incq %rcx
incq %rax
cmpq %rdx, %rcx
jb 0x280f0
movb $0x0, -0x1(%rbx,%rax)
leaq (%rsp,%rax), %rcx
addq $0x90, %rcx
notq %r13
addq %rcx, %r13
movq %r13, %rax
incq %rax
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x28126
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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), %edx
xorl %eax, %eax
leaq 0x1e5ed(%rip), %rcx     # 0x46780
xorl %esi, %esi
cmpl %edx, (%rsi,%rcx)
jne 0x281a2
cmpq $0x0, 0x18(%rsi,%rcx)
jne 0x281b4
leaq 0x40(%rsi), %rdi
cmpq $0x300, %rsi            # imm = 0x300
movq %rdi, %rsi
jb 0x28195
jmp 0x281ba
addq %rsi, %rcx
movq %rcx, %rax
testq %rax, %rax
je 0x281f4
movq 0x10(%rax), %rcx
movq 0x18(%rax), %r8
testq %rcx, %rcx
je 0x281e1
movq (%r14), %rsi
addq $0x10, %rsi
movq %r14, %rdi
movq %r8, %r14
callq *%rcx
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
movzwl 0x16(%rbx), %edx
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpq %rdx, (%r14)
jb 0x28221
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
// File: /workspace/github_c_makefile_star2_O1/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 0x2ad2a
addq $-0x10, %rsi
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0xe281(%rip), %rdi      # 0x38fb3
leaq 0xe184(%rip), %rsi      # 0x38ebd
leaq 0xe299(%rip), %rcx      # 0x38fd9
movl $0xefd, %edx            # imm = 0xEFD
callq 0xf890
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_parse
int dns_rr_parse(struct dns_rr *rr, unsigned short src, struct dns_packet *P) {
	unsigned short p	= src;

	if (src >= P->end)
		goto invalid;

	rr->dn.p   = p;
	rr->dn.len = (p = dns_d_skip(p, P)) - rr->dn.p;

	if (P->end - p < 4)
		goto invalid;

	rr->type = ((0xff & P->data[p + 0]) << 8)
	         | ((0xff & P->data[p + 1]) << 0);

	rr->class = ((0xff & P->data[p + 2]) << 8)
	          | ((0xff & P->data[p + 3]) << 0);

	p += 4;

	if (src < dns_p_qend(P)) {
		rr->section = DNS_S_QUESTION;

		rr->ttl    = 0;
		rr->rd.p   = 0;
		rr->rd.len = 0;

		return 0;
	}

	if (P->end - p < 4)
		goto invalid;

	rr->ttl = ((0xff & P->data[p + 0]) << 24)
	        | ((0xff & P->data[p + 1]) << 16)
	        | ((0xff & P->data[p + 2]) << 8)
	        | ((0xff & P->data[p + 3]) << 0);
	if (rr->type != DNS_T_OPT)
		rr->ttl = DNS_PP_MIN(rr->ttl, 0x7fffffffU);

	p += 4;

	if (P->end - p < 2)
		goto invalid;

	rr->rd.len = ((0xff & P->data[p + 0]) << 8)
	           | ((0xff & P->data[p + 1]) << 0);
	rr->rd.p = p + 2;

	p += 2;

	if (P->end - p < rr->rd.len)
		goto invalid;

	return 0;
invalid:
	return DNS_EILLEGAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %eax
movq 0x50(%rdx), %r15
cmpq %rax, %r15
jbe 0x282a3
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movw %bp, 0x4(%rdi)
movzwl %bp, %edi
movq %rdx, %rsi
callq 0x102a0
movzwl %ax, %r12d
subl %ebp, %eax
movw %ax, 0x6(%rbx)
movq %r15, %rax
subq %r12, %rax
cmpq $0x4, %rax
jae 0x282b7
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x5c(%r14,%r12), %eax
rolw $0x8, %ax
movzwl %ax, %r13d
movl %r13d, 0x8(%rbx)
movzwl 0x5e(%r14,%r12), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0xc(%rbx)
movq %r14, %rdi
callq 0x28390
cmpw %bp, %ax
jbe 0x282f8
movl $0x1, (%rbx)
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
jmp 0x282a8
leal 0x4(%r12), %eax
movzwl %ax, %eax
movq %r15, %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jb 0x282a3
movzbl 0x5c(%r14,%rax), %ecx
shll $0x18, %ecx
movzbl 0x5d(%r14,%rax), %edx
shll $0x10, %edx
orl %ecx, %edx
movzbl 0x5e(%r14,%rax), %ecx
shll $0x8, %ecx
orl %edx, %ecx
movzbl 0x5f(%r14,%rax), %eax
orl %ecx, %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
cmovbl %eax, %ecx
cmpl $0x29, %r13d
cmovel %eax, %ecx
movl %ecx, 0x10(%rbx)
leal 0x8(%r12), %eax
movzwl %ax, %eax
movq %r15, %rcx
subq %rax, %rcx
cmpq $0x2, %rcx
jb 0x282a3
movzwl 0x5c(%r14,%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movw %cx, 0x16(%rbx)
addl $0xa, %r12d
movw %r12w, 0x14(%rbx)
movzwl %r12w, %eax
subq %rax, %r15
xorl %eax, %eax
cmpq %rcx, %r15
jb 0x282a3
jmp 0x282a8
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_p_qend
static unsigned short dns_p_qend(struct dns_packet *P) {
	unsigned short qend	= 12;
	unsigned i, count	= dns_p_count(P, DNS_S_QD);

	for (i = 0; i < count && qend < P->end; i++) {
		if (P->end == (qend = dns_d_skip(qend, P)))
			goto invalid;

		if (P->end - qend < 4)
			goto invalid;

		qend	+= 4;
	}

	return DNS_PP_MIN(qend, P->end);
invalid:
	return P->end;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl 0x60(%rdi), %eax
testw %ax, %ax
je 0x283e3
rolw $0x8, %ax
movq 0x50(%rbx), %r14
cmpw $0x2, %ax
movl $0x1, %ecx
cmovael %eax, %ecx
movzwl %cx, %ebp
movw $0xc, %ax
movzwl %ax, %edi
cmpq %rdi, %r14
jbe 0x283e7
movq %rbx, %rsi
callq 0x102a0
movzwl %ax, %ecx
movq %r14, %rdx
subq %rcx, %rdx
cmpq $0x4, %rdx
jb 0x283f5
addl $0x4, %eax
decl %ebp
jne 0x283bb
jmp 0x283e7
movw $0xc, %ax
movzwl %ax, %eax
movq 0x50(%rbx), %r14
cmpq %rax, %r14
cmoval %eax, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_any_cmp
int dns_any_cmp(const union dns_any *a, enum dns_type x, const union dns_any *b, enum dns_type y) {
	const struct dns_rrtype *t;
	int cmp;

	if ((cmp = x - y))
		return cmp;

	if ((t = dns_rrtype(x)))
		return t->cmp(a, b);

	return -1;
}

// Assembly:
movl %esi, %eax
subl %ecx, %eax
je 0x28479
retq
xorl %eax, %eax
leaq 0x1e2fe(%rip), %rcx     # 0x46780
xorl %r8d, %r8d
cmpl %esi, (%r8,%rcx)
jne 0x28493
cmpq $0x0, 0x18(%r8,%rcx)
jne 0x284a5
leaq 0x40(%r8), %r9
cmpq $0x300, %r8             # imm = 0x300
movq %r9, %r8
jb 0x28485
jmp 0x284ab
addq %r8, %rcx
movq %rcx, %rax
testq %rax, %rax
je 0x284bb
movq 0x28(%rax), %rcx
movq %rdx, %rsi
xorl %eax, %eax
jmpq *%rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_i_order
int dns_rr_i_order(struct dns_rr *a, struct dns_rr *b, struct dns_rr_i *i, struct dns_packet *P) {
	int cmp;

	(void)i;

	if ((cmp = a->section - b->section))
		return cmp;

	if (a->type != b->type)
		return (int)a->dn.p - (int)b->dn.p;

	return dns_rr_cmp(a, P, b, P);
}

// Assembly:
movl (%rdi), %eax
subl (%rsi), %eax
je 0x284d3
retq
movq %rsi, %rdx
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x284e6
movq %rcx, %rsi
jmp 0x109e0
movzwl 0x4(%rdi), %eax
movzwl 0x4(%rdx), %ecx
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_i_shuffle
int dns_rr_i_shuffle(struct dns_rr *a, struct dns_rr *b, struct dns_rr_i *i, struct dns_packet *P) {
	int cmp;

	(void)i;
	(void)P;

	while (!i->state.regs[0])
		i->state.regs[0]	= dns_random();

	if ((cmp = a->section - b->section))
		return cmp;

	return dns_k_shuffle16(a->dn.p, i->state.regs[0]) - dns_k_shuffle16(b->dn.p, i->state.regs[0]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x40(%rdx), %eax
testl %eax, %eax
jne 0x28514
movq %rdx, %r15
callq *0x1fdc4(%rip)          # 0x482d0
movl %eax, 0x40(%r15)
testl %eax, %eax
je 0x28506
movl (%r14), %ecx
subl (%rbx), %ecx
jne 0x285a9
movzwl 0x4(%r14), %ecx
movl %ecx, %edx
shrl $0x8, %edx
movl $0x4, %edi
leaq 0x1012b(%rip), %rsi     # 0x38660
movl %eax, %r8d
movl %r8d, %r9d
xorb %cl, %r9b
movzbl %r9b, %r9d
movzbl %dl, %r10d
movl %edx, %ecx
xorb (%r9,%rsi), %cl
movb (%r10,%rsi), %dl
xorb %cl, %dl
shrl $0x8, %r8d
decl %edi
jne 0x28538
movzbl %cl, %ecx
shll $0x8, %ecx
movzwl 0x4(%rbx), %edi
movl %edi, %r8d
shrl $0x8, %r8d
movl $0x4, %r9d
movl %eax, %r10d
xorb %dil, %r10b
movzbl %r10b, %r10d
movzbl %r8b, %r11d
movl %r8d, %edi
xorb (%r10,%rsi), %dil
movb (%r11,%rsi), %r8b
xorb %dil, %r8b
shrl $0x8, %eax
decl %r9d
jne 0x28571
movzbl %dl, %eax
orl %eax, %ecx
movzbl %dil, %eax
movzbl %r8b, %edx
shll $0x8, %eax
orl %edx, %eax
subl %eax, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_section
static enum dns_section dns_rr_section(unsigned short src, struct dns_packet *P) {
	enum dns_section section;
	unsigned count, index;
	unsigned short rp;

	if (src >= P->memo.qd.base && src < P->memo.qd.end)
		return DNS_S_QD;
	if (src >= P->memo.an.base && src < P->memo.an.end)
		return DNS_S_AN;
	if (src >= P->memo.ns.base && src < P->memo.ns.end)
		return DNS_S_NS;
	if (src >= P->memo.ar.base && src < P->memo.ar.end)
		return DNS_S_AR;

	/* NOTE: Possibly bad memoization. Try it the hard-way. */

	for (rp = 12, index = 0; rp < src && rp < P->end; index++)
		rp = dns_rr_skip(rp, P);

	section = DNS_S_QD;
	count   = dns_p_count(P, section);

	while (index >= count && section <= DNS_S_AR) {
		section <<= 1;
		count += dns_p_count(P, section);
	}

	return DNS_S_ALL & section;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
cmpw %bp, 0x20(%rsi)
ja 0x285d4
movl $0x1, %r14d
cmpw %bp, 0x22(%rbx)
ja 0x28673
cmpw %bp, 0x24(%rbx)
ja 0x285ea
movl $0x2, %r14d
cmpw %bp, 0x26(%rbx)
ja 0x28673
cmpw %bp, 0x28(%rbx)
ja 0x285fc
movl $0x4, %r14d
cmpw %bp, 0x2a(%rbx)
ja 0x28673
cmpw %bp, 0x2c(%rbx)
ja 0x2860e
movl $0x8, %r14d
cmpw %bp, 0x2e(%rbx)
ja 0x28673
xorl %r15d, %r15d
cmpw $0xd, %bp
jb 0x2863a
movq 0x50(%rbx), %r14
xorl %r15d, %r15d
movw $0xc, %ax
movzwl %ax, %edi
cmpq %rdi, %r14
jbe 0x2863a
movq %rbx, %rsi
callq 0xf2e0
incl %r15d
cmpw %bp, %ax
jb 0x28622
movzwl 0x60(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %ebp
movl $0x1, %r14d
cmpl %ebp, %r15d
jb 0x28673
movl %r14d, %r12d
leal (%r12,%r12), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10790
cmpl $0x4, %r12d
ja 0x2866f
addl %eax, %ebp
cmpl %ebp, %r15d
jae 0x28650
andl $0xe, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strclass
const char *(dns_strclass)(enum dns_class type, void *_dst, size_t lim) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	unsigned i;

	for (i = 0; i < lengthof(dns_classes); i++) {
		if (dns_classes[i].type == type) {
			dns_b_puts(&dst, dns_classes[i].name);
			break;
		}
	}

	if (dst.p == dst.base)
		dns_b_fmtju(&dst, (0xffff & type), 0);

	return dns_b_tostring(&dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %r14
cmpl $0x1, %edi
jne 0x28a0d
cmpq $0x2, %r15
movl $0x2, %r14d
cmovbq %r15, %r14
leaq 0xfc51(%rip), %rsi      # 0x38650
movq %rbx, %rdi
movq %r14, %rdx
callq 0xfa60
addq %rbx, %r14
addq %rbx, %r15
cmpq %rbx, %r14
jne 0x28acb
movzwl %bp, %ecx
xorl %r9d, %r9d
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rsi
incq %r9
movq %rsi, %rax
mulq %rdi
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x28a2c
movq %r15, %rax
subq %r14, %rax
xorl %r8d, %r8d
subq %rax, %r9
cmovaeq %r9, %r8
movl $0x1, %r9d
movq %r14, %rsi
cmpq %r9, %r8
setb %r10b
cmpq %r15, %rsi
setb %r11b
movq %rcx, %rax
mulq %rdi
andb %r10b, %r11b
shrq $0x3, %rdx
cmpb $0x1, %r11b
jne 0x28a94
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
movq %rcx, %r10
subq %rax, %r10
orb $0x30, %r10b
movb %r10b, (%rsi)
incq %rsi
incq %r9
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x28a5b
cmpq %rsi, %r14
jae 0x28ac8
incq %r14
movq %rsi, %rax
movb -0x1(%rax), %cl
movb -0x1(%r14), %dl
movb %dl, -0x1(%rax)
decq %rax
movb %cl, -0x1(%r14)
leaq 0x1(%r14), %rcx
cmpq %rax, %r14
movq %rcx, %r14
jb 0x28aab
movq %rsi, %r14
cmpq %r15, %r14
jb 0x28adf
cmpq %rbx, %r14
jbe 0x28ae5
cmpb $0x0, -0x1(%r14)
je 0x28aec
decq %r14
movb $0x0, (%r14)
jmp 0x28aec
leaq 0x1055f(%rip), %rbx     # 0x3904b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strtype
const char *(dns_strtype)(enum dns_type type, void *_dst, size_t lim) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	unsigned i;

	for (i = 0; i < lengthof(dns_rrtypes); i++) {
		if (dns_rrtypes[i].type == type) {
			dns_b_puts(&dst, dns_rrtypes[i].name);
			break;
		}
	}

	if (dst.p == dst.base)
		dns_b_fmtju(&dst, (0xffff & type), 0);

	return dns_b_tostring(&dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %ebp
leaq (%rsi,%rdx), %r13
movl $0x8, %eax
leaq 0x1dc63(%rip), %rcx     # 0x46780
cmpl %ebp, -0x8(%rax,%rcx)
je 0x28b34
addq $0x40, %rax
cmpq $0x348, %rax            # imm = 0x348
jne 0x28b1d
movq %rbx, %r14
jmp 0x28b5b
movq (%rax,%rcx), %r12
movq %r12, %rdi
callq 0xf560
movq %rax, %r14
cmpq %rax, %r15
cmovbq %r15, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xfa60
addq %rbx, %r14
cmpq %rbx, %r14
jne 0x28c0b
movzwl %bp, %ecx
xorl %r8d, %r8d
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rsi
incq %r8
movq %rsi, %rax
mulq %rdi
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x28b77
movq %r13, %rax
subq %r14, %rax
xorl %r9d, %r9d
subq %rax, %r8
cmovaeq %r8, %r9
movl $0x1, %r10d
movq %r14, %r8
movq %rcx, %rsi
movq %rcx, %rax
mulq %rdi
movq %rdx, %rcx
shrq $0x3, %rcx
cmpq %r10, %r9
jae 0x28bd7
cmpq %r13, %r8
jae 0x28bd7
leaq (%rcx,%rcx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %rdx
subq %rax, %rdx
orb $0x30, %dl
movb %dl, (%r8)
incq %r8
incq %r10
cmpq $0x9, %rsi
ja 0x28ba6
cmpq %r8, %r14
jae 0x28c08
incq %r14
movq %r8, %rax
movb -0x1(%rax), %cl
movb -0x1(%r14), %dl
movb %dl, -0x1(%rax)
decq %rax
movb %cl, -0x1(%r14)
leaq 0x1(%r14), %rcx
cmpq %rax, %r14
movq %rcx, %r14
jb 0x28beb
movq %r8, %r14
cmpq %r13, %r14
jb 0x28c1f
cmpq %rbx, %r14
jbe 0x28c25
cmpb $0x0, -0x1(%r14)
je 0x28c2c
decq %r14
movb $0x0, (%r14)
jmp 0x28c2c
leaq 0x1041f(%rip), %rbx     # 0x3904b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_any_print
size_t dns_any_print(void *_dst, size_t lim, union dns_any *any, enum dns_type type) {
	const struct dns_rrtype *t;
	struct dns_buf src, dst;

	if ((t = dns_rrtype(type)))
		return t->print(_dst, lim, any);

	dns_b_from(&src, any->rdata.data, any->rdata.len);
	dns_b_into(&dst, _dst, lim);

	dns_b_putc(&dst, '"');

	while (src.p < src.pe) {
		dns_b_putc(&dst, '\\');
		dns_b_fmtju(&dst, *src.p++, 3);
	}

	dns_b_putc(&dst, '"');

	return dns_b_strllen(&dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
xorl %eax, %eax
leaq 0x1db2c(%rip), %rdx     # 0x46780
xorl %r9d, %r9d
cmpl %ecx, (%r9,%rdx)
jne 0x28c65
cmpq $0x0, 0x18(%r9,%rdx)
jne 0x28c77
leaq 0x40(%r9), %r10
cmpq $0x300, %r9             # imm = 0x300
movq %r10, %r9
jb 0x28c57
jmp 0x28c7d
addq %r9, %rdx
movq %rdx, %rax
testq %rax, %rax
je 0x28c97
movq 0x30(%rax), %rcx
movq %r8, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
movq 0x8(%r8), %rax
testq %rsi, %rsi
jle 0x28cab
leaq 0x1(%rdi), %r11
movb $0x22, (%rdi)
xorl %ecx, %ecx
jmp 0x28cb3
movl $0x1, %ecx
movq %rdi, %r11
addq %rdi, %rsi
testq %rax, %rax
jle 0x28dfb
leaq (%r8,%rax), %rbx
addq $0x10, %rbx
addq $0x10, %r8
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
movl $0x3, %r15d
cmpq %rsi, %r11
jae 0x28ce9
movb $0x5c, (%r11)
incq %r11
jmp 0x28cec
incq %rcx
movzbl (%r8), %r9d
movl $0x3, %r12d
movl $0x1, %eax
movq %r9, %r10
xorl %r13d, %r13d
movq %rax, %rbp
incq %r13
movq %r10, %rax
mulq %r14
shrq $0x3, %rdx
incq %r12
leaq 0x1(%rbp), %rax
cmpq $0x9, %r10
movq %rdx, %r10
ja 0x28d01
movq %rsi, %rdx
subq %r11, %rdx
cmpq $0x3, %r13
movl $0x3, %eax
cmovbq %r13, %rax
subq %rax, %r12
cmpq %r12, %rdx
cmovbq %rdx, %r12
cmpq $0x2, %r13
ja 0x28d6b
cmpq $0x3, %rbp
cmovaeq %r15, %rbp
addq $-0x3, %rbp
movq %r11, %r10
cmpq %rsi, %r10
jae 0x28d61
movb $0x30, (%r10)
incq %r10
jmp 0x28d64
incq %rcx
incq %rbp
jne 0x28d53
jmp 0x28d6e
movq %r11, %r10
incq %r8
addq %rax, %r12
negq %r12
addq %r13, %r12
addq $0x3, %r12
movl $0x1, %r13d
movq %r10, %r11
cmpq %r13, %r12
jae 0x28db3
cmpq %rsi, %r11
jae 0x28db0
movq %r9, %rax
mulq %r14
shrl $0x2, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %eax
movl %r9d, %edx
subl %eax, %edx
orb $0x30, %dl
movb %dl, (%r11)
incq %r11
jmp 0x28db3
incq %rcx
movq %r9, %rax
mulq %r14
shrq $0x3, %rdx
incq %r13
cmpq $0x9, %r9
movq %rdx, %r9
ja 0x28d87
cmpq %r11, %r10
jae 0x28df2
incq %r10
movq %r11, %rax
movb -0x1(%rax), %dl
movb -0x1(%r10), %r9b
movb %r9b, -0x1(%rax)
decq %rax
movb %dl, -0x1(%r10)
leaq 0x1(%r10), %rdx
cmpq %rax, %r10
movq %rdx, %r10
jb 0x28dd4
cmpq %rbx, %r8
jb 0x28cdb
cmpq %rsi, %r11
jae 0x28e09
movb $0x22, (%r11)
incq %r11
jmp 0x28e0c
incq %rcx
cmpq %rsi, %r11
jae 0x28e1d
movb $0x0, (%r11)
subq %rdi, %r11
movq %r11, %rax
jmp 0x28e3a
cmpq %rdi, %r11
jbe 0x28e38
leaq -0x1(%r11), %rax
cmpb $0x0, -0x1(%r11)
je 0x28e33
incq %rcx
movb $0x0, (%rax)
subq %rdi, %rax
jmp 0x28e3a
xorl %eax, %eax
addq %rax, %rcx
movq %rcx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_a_push
int dns_a_push(struct dns_packet *P, struct dns_a *a) {
	unsigned long addr;

	if (P->size - P->end < 6)
		return DNS_ENOBUFS;

	P->data[P->end++]	= 0x00;
	P->data[P->end++]	= 0x04;

	addr	= ntohl(a->addr.s_addr);

	P->data[P->end++]	= 0xffU & (addr >> 24);
	P->data[P->end++]	= 0xffU & (addr >> 16);
	P->data[P->end++]	= 0xffU & (addr >> 8);
	P->data[P->end++]	= 0xffU & (addr >> 0);

	return 0;
}

// Assembly:
movq 0x48(%rdi), %rdx
movq 0x50(%rdi), %rcx
subq %rcx, %rdx
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq $0x6, %rdx
jb 0x28ee8
leaq 0x1(%rcx), %rax
movq %rax, 0x50(%rdi)
movb $0x0, 0x5c(%rdi,%rcx)
movq 0x50(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x50(%rdi)
movb $0x4, 0x5c(%rdi,%rax)
movl (%rsi), %eax
bswapl %eax
movl %eax, %ecx
shrl $0x18, %ecx
movq 0x50(%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x50(%rdi)
movb %cl, 0x5c(%rdi,%rdx)
movl %eax, %ecx
shrl $0x10, %ecx
movq 0x50(%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x50(%rdi)
movb %cl, 0x5c(%rdi,%rdx)
movq 0x50(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rdi)
movb %ah, 0x5c(%rdi,%rcx)
movq 0x50(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rdi)
movb %al, 0x5c(%rdi,%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_a_arpa
size_t dns_a_arpa(void *_dst, size_t lim, const struct dns_a *a) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	unsigned long octets = ntohl(a->addr.s_addr);
	unsigned i;

	for (i = 0; i < 4; i++) {
		dns_b_fmtju(&dst, 0xff & octets, 0);
		dns_b_putc(&dst, '.');
		octets >>= 8;
	}

	dns_b_puts(&dst, "in-addr.arpa.");

	return dns_b_strllen(&dst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq %rdi, %r14
movl (%rdx), %r8d
bswapl %r8d
xorl %r9d, %r9d
movabsq $-0x3333333333333333, %r10 # imm = 0xCCCCCCCCCCCCCCCD
xorl %edi, %edi
movq %rbx, %r15
movzbl %r8b, %ecx
movq %rcx, %rsi
xorl %r12d, %r12d
incq %r12
movq %rsi, %rax
mulq %r10
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x28f1d
movq %r14, %rax
subq %r15, %rax
subq %rax, %r12
movl $0x0, %r11d
cmovaeq %r12, %r11
movl $0x1, %r12d
movq %r15, %rsi
cmpq %r12, %r11
jae 0x28f79
cmpq %r14, %rsi
jae 0x28f76
movq %rcx, %rax
mulq %r10
shrl $0x2, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %eax
movl %ecx, %edx
subl %eax, %edx
orb $0x30, %dl
movb %dl, (%rsi)
incq %rsi
jmp 0x28f79
incq %rdi
movq %rcx, %rax
mulq %r10
shrq $0x3, %rdx
incq %r12
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x28f4f
cmpq %rsi, %r15
jae 0x28fb7
incq %r15
movq %rsi, %rax
movb -0x1(%rax), %cl
movb -0x1(%r15), %dl
movb %dl, -0x1(%rax)
decq %rax
movb %cl, -0x1(%r15)
leaq 0x1(%r15), %rcx
cmpq %rax, %r15
movq %rcx, %r15
jb 0x28f9a
cmpq %r14, %rsi
jae 0x28fc4
movb $0x2e, (%rsi)
incq %rsi
jmp 0x28fc7
incq %rdi
movq %rsi, %r15
shrq $0x8, %r8
incl %r9d
cmpl $0x4, %r9d
jne 0x28f13
movq %r14, %rax
subq %r15, %rax
cmpq $0xd, %rax
movl $0xd, %r13d
cmovbq %rax, %r13
movq %rdi, %r12
subq %r13, %r12
addq $0xd, %r12
cmpq $0xd, %rax
leaq 0xff39(%rip), %rsi      # 0x38f3d
cmovaeq %rdi, %r12
movq %r15, %rdi
movq %r13, %rdx
callq 0xfa60
addq %r15, %r13
cmpq %r14, %r13
jae 0x29028
movb $0x0, (%r13)
subq %rbx, %r13
movq %r13, %rax
jmp 0x29045
cmpq %rbx, %r13
jbe 0x29043
leaq -0x1(%r13), %rax
cmpb $0x0, -0x1(%r13)
je 0x2903e
incq %r12
movb $0x0, (%rax)
subq %rbx, %rax
jmp 0x29045
xorl %eax, %eax
addq %rax, %r12
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_a_cmp
int dns_a_cmp(const struct dns_a *a, const struct dns_a *b) {
	if (ntohl(a->addr.s_addr) < ntohl(b->addr.s_addr))
		return -1;
	if (ntohl(a->addr.s_addr) > ntohl(b->addr.s_addr))
		return 1;

	return 0;
}

// Assembly:
movl (%rdi), %eax
bswapl %eax
movl (%rsi), %ecx
bswapl %ecx
xorl %edx, %edx
cmpl %ecx, %eax
seta %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovael %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_aaaa_parse
int dns_aaaa_parse(struct dns_aaaa *aaaa, struct dns_rr *rr, struct dns_packet *P) {
	if (rr->rd.len != sizeof aaaa->addr.s6_addr)
		return DNS_EILLEGAL;

	memcpy(aaaa->addr.s6_addr, &P->data[rr->rd.p], sizeof aaaa->addr.s6_addr);

	return 0;
}

// Assembly:
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpw $0x10, 0x16(%rsi)
jne 0x29104
movzwl 0x14(%rsi), %eax
movups 0x5c(%rdx,%rax), %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
retq