LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x27fe2
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 0x27ff6
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 0x280cf
cmpw %bp, %ax
jbe 0x28037
movl $0x1, (%rbx)
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
jmp 0x27fe7
leal 0x4(%r12), %eax
movzwl %ax, %eax
movq %r15, %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jb 0x27fe2
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 0x27fe2
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 0x27fe2
jmp 0x27fe7
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movzwl 0x60(%rdi), %eax
testw %ax, %ax
je 0x28122
rolw $0x8, %ax
movq 0x50(%r14), %rbx
cmpw $0x2, %ax
movl $0x1, %ecx
cmovael %eax, %ecx
movzwl %cx, %ebp
movw $0xc, %ax
movzwl %ax, %edi
cmpq %rdi, %rbx
jbe 0x2812a
movq %r14, %rsi
callq 0x102a0
movzwl %ax, %ecx
movq %rbx, %rdx
subq %rcx, %rdx
cmpq $0x4, %rdx
jb 0x28133
addl $0x4, %eax
decl %ebp
jne 0x280fa
jmp 0x2812a
movq 0x50(%r14), %rbx
movw $0xc, %ax
movzwl %ax, %eax
cmpq %rax, %rbx
cmoval %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x281b6
retq
movq $-0x40, %rcx
leaq 0x1e5bc(%rip), %r8      # 0x46780
cmpl %esi, 0x40(%rcx,%r8)
jne 0x281d3
cmpq $0x0, 0x58(%rcx,%r8)
jne 0x281e6
addq $0x40, %rcx
cmpq $0x300, %rcx            # imm = 0x300
jb 0x281c4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movq %rdx, %rsi
xorl %eax, %eax
jmpq *0x68(%rcx,%r8)
// File: /workspace/github_c_makefile_star2_O3/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 0x28202
retq
movq %rsi, %rdx
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x28215
movq %rcx, %rsi
jmp 0x109e0
movzwl 0x4(%rdi), %eax
movzwl 0x4(%rdx), %ecx
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x28243
movq %rdx, %r15
callq *0x20095(%rip)          # 0x482d0
movl %eax, 0x40(%r15)
testl %eax, %eax
je 0x28235
movl (%r14), %ecx
subl (%rbx), %ecx
jne 0x282d8
movzwl 0x4(%r14), %ecx
movl %ecx, %edx
shrl $0x8, %edx
movl $0x4, %edi
leaq 0x103ac(%rip), %rsi     # 0x38610
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 0x28267
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 0x282a0
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_O3/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 0x28303
movl $0x1, %r14d
cmpw %bp, 0x22(%rbx)
ja 0x283a2
cmpw %bp, 0x24(%rbx)
ja 0x28319
movl $0x2, %r14d
cmpw %bp, 0x26(%rbx)
ja 0x283a2
cmpw %bp, 0x28(%rbx)
ja 0x2832b
movl $0x4, %r14d
cmpw %bp, 0x2a(%rbx)
ja 0x283a2
cmpw %bp, 0x2c(%rbx)
ja 0x2833d
movl $0x8, %r14d
cmpw %bp, 0x2e(%rbx)
ja 0x283a2
xorl %r15d, %r15d
cmpw $0xd, %bp
jb 0x28369
movq 0x50(%rbx), %r14
xorl %r15d, %r15d
movw $0xc, %ax
movzwl %ax, %edi
cmpq %rdi, %r14
jbe 0x28369
movq %rbx, %rsi
callq 0xf2e0
incl %r15d
cmpw %bp, %ax
jb 0x28351
movzwl 0x60(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %ebp
movl $0x1, %r14d
cmpl %ebp, %r15d
jb 0x283a2
movl %r14d, %r12d
leal (%r12,%r12), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10790
cmpl $0x4, %r12d
ja 0x2839e
addl %eax, %ebp
cmpl %ebp, %r15d
jae 0x2837f
andl $0xe, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq (%rsi,%rdx), %r12
movq %rsi, %r14
cmpl $0x1, %edi
jne 0x28756
movq %rdx, %r15
cmpq $0x2, %rdx
movl $0x2, %r14d
cmovbq %rdx, %r14
leaq 0xfec4(%rip), %rsi      # 0x38600
movq %rbx, %rdi
movq %r14, %rdx
callq 0xfa60
addq %rbx, %r14
movq %r14, %rsi
testq %r15, %r15
jne 0x28805
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 0x28769
movq %r12, %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 %r12, %rsi
setb %r11b
movq %rcx, %rax
mulq %rdi
andb %r10b, %r11b
shrq $0x3, %rdx
cmpb $0x1, %r11b
jne 0x287d1
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 0x28798
cmpq %rsi, %r14
jae 0x28805
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 0x287e8
cmpq %r12, %rsi
jb 0x28818
cmpq %rbx, %rsi
jbe 0x2881d
cmpb $0x0, -0x1(%rsi)
je 0x28824
decq %rsi
movb $0x0, (%rsi)
jmp 0x28824
leaq 0x107e7(%rip), %rbx     # 0x3900b
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rsi, %rbx
movl %edi, %ebp
leaq (%rsi,%rdx), %r13
movl $0x8, %eax
leaq 0x1df2d(%rip), %rcx     # 0x46780
cmpl %ebp, -0x8(%rax,%rcx)
je 0x2886a
addq $0x40, %rax
cmpq $0x348, %rax            # imm = 0x348
jne 0x28853
movq %rbx, %rdi
jmp 0x2889e
movq (%rax,%rcx), %r15
movq %r15, %rdi
callq 0xf560
movq %rax, %r12
cmpq %rax, %r14
cmovbq %r14, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xfa60
leaq (%rbx,%r12), %rdi
movq %rdi, %r8
testq %r12, %r12
jne 0x28940
movzwl %bp, %ecx
xorl %r8d, %r8d
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rsi
incq %r8
movq %rsi, %rax
mulq %r9
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x288b1
movq %r13, %rax
subq %rdi, %rax
xorl %r10d, %r10d
subq %rax, %r8
cmovaeq %r8, %r10
movl $0x1, %r11d
movq %rdi, %r8
movq %rcx, %rsi
movq %rcx, %rax
mulq %r9
movq %rdx, %rcx
shrq $0x3, %rcx
cmpq %r11, %r10
jae 0x28911
cmpq %r13, %r8
jae 0x28911
leaq (%rcx,%rcx), %rax
leaq (%rax,%rax,4), %rax
movq %rsi, %rdx
subq %rax, %rdx
orb $0x30, %dl
movb %dl, (%r8)
incq %r8
incq %r11
cmpq $0x9, %rsi
ja 0x288e0
cmpq %r8, %rdi
jae 0x28940
incq %rdi
movq %r8, %rax
movb -0x1(%rax), %cl
movb -0x1(%rdi), %dl
movb %dl, -0x1(%rax)
decq %rax
movb %cl, -0x1(%rdi)
leaq 0x1(%rdi), %rcx
cmpq %rax, %rdi
movq %rcx, %rdi
jb 0x28925
cmpq %r13, %r8
jb 0x28954
cmpq %rbx, %r8
jbe 0x2895a
cmpb $0x0, -0x1(%r8)
je 0x28961
decq %r8
movb $0x0, (%r8)
jmp 0x28961
leaq 0x106aa(%rip), %rbx     # 0x3900b
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_O3/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
movq $-0x40, %r9
leaq 0x1ddf2(%rip), %r11     # 0x46780
cmpl %ecx, 0x40(%r9,%r11)
jne 0x2899d
cmpq $0x0, 0x58(%r9,%r11)
jne 0x289be
addq $0x40, %r9
cmpq $0x300, %r9             # imm = 0x300
jb 0x2898e
movq 0x8(%r8), %rax
testq %rsi, %rsi
jle 0x289d2
leaq 0x1(%rdi), %r11
movb $0x22, (%rdi)
xorl %ecx, %ecx
jmp 0x289da
movq %r8, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x70(%r9,%r11)
movl $0x1, %ecx
movq %rdi, %r11
addq %rdi, %rsi
testq %rax, %rax
jle 0x28b22
leaq (%r8,%rax), %rbx
addq $0x10, %rbx
addq $0x10, %r8
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
movl $0x3, %r15d
cmpq %rsi, %r11
jae 0x28a10
movb $0x5c, (%r11)
incq %r11
jmp 0x28a13
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 0x28a28
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 0x28a92
cmpq $0x3, %rbp
cmovaeq %r15, %rbp
addq $-0x3, %rbp
movq %r11, %r10
cmpq %rsi, %r10
jae 0x28a88
movb $0x30, (%r10)
incq %r10
jmp 0x28a8b
incq %rcx
incq %rbp
jne 0x28a7a
jmp 0x28a95
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 0x28ada
cmpq %rsi, %r11
jae 0x28ad7
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 0x28ada
incq %rcx
movq %r9, %rax
mulq %r14
shrq $0x3, %rdx
incq %r13
cmpq $0x9, %r9
movq %rdx, %r9
ja 0x28aae
cmpq %r11, %r10
jae 0x28b19
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 0x28afb
cmpq %rbx, %r8
jb 0x28a02
cmpq %rsi, %r11
jae 0x28b30
movb $0x22, (%r11)
incq %r11
jmp 0x28b33
incq %rcx
cmpq %rsi, %r11
jae 0x28b44
movb $0x0, (%r11)
subq %rdi, %r11
movq %r11, %rax
jmp 0x28b61
cmpq %rdi, %r11
jbe 0x28b5f
leaq -0x1(%r11), %rax
cmpb $0x0, -0x1(%r11)
je 0x28b5a
incq %rcx
movb $0x0, (%rax)
subq %rdi, %rax
jmp 0x28b61
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_O3/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 0x28c44
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 0x28ca0
cmpq %r14, %rsi
jae 0x28c9d
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 0x28ca0
incq %rdi
movq %rcx, %rax
mulq %r10
shrq $0x3, %rdx
incq %r12
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x28c76
cmpq %rsi, %r15
jae 0x28cde
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 0x28cc1
cmpq %r14, %rsi
jae 0x28ceb
movb $0x2e, (%rsi)
incq %rsi
jmp 0x28cee
incq %rdi
movq %rsi, %r15
shrq $0x8, %r8
incl %r9d
cmpl $0x4, %r9d
jne 0x28c3a
movq %r14, %rax
subq %r15, %rax
movq %rdi, %r12
subq %rax, %r12
addq $0xd, %r12
cmpq $0xd, %rax
movl $0xd, %r13d
cmovbq %rax, %r13
cmovaeq %rdi, %r12
leaq 0x101d2(%rip), %rsi     # 0x38efd
movq %r15, %rdi
movq %r13, %rdx
callq 0xfa60
addq %r15, %r13
cmpq %r14, %r13
jae 0x28d4b
movb $0x0, (%r13)
subq %rbx, %r13
movq %r13, %rax
jmp 0x28d68
cmpq %rbx, %r13
jbe 0x28d66
leaq -0x1(%r13), %rax
cmpb $0x0, -0x1(%r13)
je 0x28d61
incq %r12
movb $0x0, (%rax)
subq %rbx, %rax
jmp 0x28d68
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_O3/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 0x28e27
movzwl 0x14(%rsi), %eax
movups 0x5c(%rdx,%rax), %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_aaaa_cmp
int dns_aaaa_cmp(const struct dns_aaaa *a, const struct dns_aaaa *b) {
	unsigned i;
	int cmp;

	for (i = 0; i < lengthof(a->addr.s6_addr); i++) {
		if ((cmp = (a->addr.s6_addr[i] - b->addr.s6_addr[i])))
			return cmp;
	}

	return 0;
}

// Assembly:
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %eax
movzbl (%rsi,%rcx), %edx
cmpb %dl, %al
jne 0x28e8b
leaq 0x1(%rcx), %r8
cmpq $0xf, %rcx
movq %r8, %rcx
jne 0x28e72
subl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_aaaa_arpa
size_t dns_aaaa_arpa(void *_dst, size_t lim, const struct dns_aaaa *aaaa) {
	static const unsigned char hex[16] = "0123456789abcdef";
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	unsigned nyble;
	int i, j;

	for (i = sizeof aaaa->addr.s6_addr - 1; i >= 0; i--) {
		nyble = aaaa->addr.s6_addr[i];

		for (j = 0; j < 2; j++) {
			dns_b_putc(&dst, hex[0x0f & nyble]);
			dns_b_putc(&dst, '.');
			nyble >>= 4;
		}
	}

	dns_b_puts(&dst, "ip6.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 $0xf, %ecx
xorl %eax, %eax
leaq 0xfda2(%rip), %rsi      # 0x38c50
movq %rdi, %r15
movzbl (%rdx,%rcx), %edi
movb $0x1, %r8b
cmpq %r14, %r15
jae 0x28ed0
movl %edi, %r9d
andl $0xf, %r9d
movb (%r9,%rsi), %r9b
movb %r9b, (%r15)
incq %r15
jmp 0x28ed3
incq %rax
cmpq %r14, %r15
jae 0x28ee1
movb $0x2e, (%r15)
incq %r15
jmp 0x28ee4
incq %rax
shrl $0x4, %edi
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x28eb8
subq $0x1, %rcx
jae 0x28eb1
movq %r14, %rcx
subq %r15, %rcx
movq %rax, %r12
subq %rcx, %r12
addq $0x9, %r12
cmpq $0x9, %rcx
movl $0x9, %r13d
cmovbq %rcx, %r13
cmovaeq %rax, %r12
leaq 0xffe9(%rip), %rsi      # 0x38f0b
movq %r15, %rdi
movq %r13, %rdx
callq 0xfa60
addq %r15, %r13
cmpq %r14, %r13
jae 0x28f42
movb $0x0, (%r13)
subq %rbx, %r13
movq %r13, %rax
jmp 0x28f5f
cmpq %rbx, %r13
jbe 0x28f5d
leaq -0x1(%r13), %rax
cmpb $0x0, -0x1(%r13)
je 0x28f58
incq %r12
movb $0x0, (%rax)
subq %rbx, %rax
jmp 0x28f5f
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_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_mx_parse
int dns_mx_parse(struct dns_mx *mx, struct dns_rr *rr, struct dns_packet *P) {
	size_t len;
	int error;

	if (rr->rd.len < 3)
		return DNS_EILLEGAL;

	mx->preference	= (0xff00 & (P->data[rr->rd.p + 0] << 8))
			| (0x00ff & (P->data[rr->rd.p + 1] << 0));

	if (!(len = dns_d_expand(mx->host, sizeof mx->host, rr->rd.p + 2, P, &error)))
		return error;
	else if (len >= sizeof mx->host)
		return DNS_EILLEGAL;

	return 0;
}

// Assembly:
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpw $0x3, 0x16(%rsi)
jb 0x29049
pushq %rax
movq %rdx, %rcx
movzwl 0x14(%rsi), %eax
movzwl 0x5c(%rdx,%rax), %edx
rolw $0x8, %dx
movw %dx, (%rdi)
addq $0x2, %rdi
addl $0x2, %eax
movzwl %ax, %edx
leaq 0x4(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
callq 0xfec0
testq %rax, %rax
je 0x29041
xorl %ecx, %ecx
cmpq $0x100, %rax            # imm = 0x100
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmovbl %ecx, %eax
jmp 0x29045
movl 0x4(%rsp), %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_mx_push
int dns_mx_push(struct dns_packet *P, struct dns_mx *mx) {
	size_t end, len;
	int error;

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

	end	= P->end;
	P->end	+= 2;

	P->data[P->end++]	= 0xff & (mx->preference >> 8);
	P->data[P->end++]	= 0xff & (mx->preference >> 0);

	if ((error = dns_d_push(P, mx->host, strlen(mx->host))))
		goto error;

	len	= P->end - end - 2;

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

	return 0;
error:
	P->end	= end;

	return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x48(%rdi), %rcx
movq 0x50(%rdi), %r15
subq %r15, %rcx
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq $0x5, %rcx
jb 0x290c6
movq %rsi, %r14
movq %rdi, %rbx
movb 0x1(%rsi), %al
leaq 0x3(%r15), %rcx
movq %rcx, 0x50(%rdi)
movb %al, 0x5e(%r15,%rdi)
movb (%rsi), %al
movq 0x50(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rdi)
movb %al, 0x5c(%rdi,%rcx)
addq $0x2, %r14
movq %r14, %rdi
callq 0xf560
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf390
testl %eax, %eax
je 0x290b1
movq %r15, 0x50(%rbx)
jmp 0x290c6
movl 0x50(%rbx), %eax
subl %r15d, %eax
addl $-0x2, %eax
rolw $0x8, %ax
movw %ax, 0x5c(%rbx,%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_mx_print
size_t dns_mx_print(void *_dst, size_t lim, struct dns_mx *mx) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);

	dns_b_fmtju(&dst, mx->preference, 0);
	dns_b_putc(&dst, ' ');
	dns_b_puts(&dst, mx->host);

	return dns_b_strllen(&dst);
}

// Assembly:
movq %rdx, %r11
movzwl (%rdx), %ecx
xorl %r8d, %r8d
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %r10
incq %r8
movq %r10, %rax
mulq %r9
shrq $0x3, %rdx
cmpq $0x9, %r10
movq %rdx, %r10
ja 0x290fa
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq (%rdi,%rsi), %r14
xorl %ebx, %ebx
subq %rsi, %r8
cmovbq %rbx, %r8
movl $0x1, %esi
movq %rdi, %r15
cmpq %rsi, %r8
jae 0x2915e
cmpq %r14, %r15
jae 0x2915b
movq %rcx, %rax
mulq %r9
shrl $0x2, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %eax
movl %ecx, %edx
subl %eax, %edx
orb $0x30, %dl
movb %dl, (%r15)
incq %r15
jmp 0x2915e
incq %rbx
movq %rcx, %rax
mulq %r9
shrq $0x3, %rdx
incq %rsi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x29133
cmpq %rdi, %r15
jbe 0x2919d
leaq 0x1(%rdi), %rax
movq %r15, %rcx
movb -0x1(%rcx), %dl
movb -0x1(%rax), %sil
movb %sil, -0x1(%rcx)
decq %rcx
movb %dl, -0x1(%rax)
leaq 0x1(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x29180
cmpq %r14, %r15
movq %rdi, 0x8(%rsp)
jae 0x291b0
movb $0x20, (%r15)
incq %r15
jmp 0x291b3
incq %rbx
addq $0x2, %r11
movq %r11, 0x10(%rsp)
movq %r11, %rdi
callq 0xf560
movq %rax, %r13
movq %r14, %rbp
subq %r15, %rbp
cmpq %rax, %rbp
movq %rax, %r12
cmovbq %rbp, %r12
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0xfa60
addq %r15, %r12
xorl %eax, %eax
subq %rbp, %r13
cmovaeq %r13, %rax
addq %rbx, %rax
cmpq %r14, %r12
jae 0x2920a
movb $0x0, (%r12)
subq 0x8(%rsp), %r12
movq %r12, %rcx
jmp 0x2922e
movq 0x8(%rsp), %rdx
cmpq %rdx, %r12
jbe 0x2922c
leaq -0x1(%r12), %rcx
cmpb $0x0, -0x1(%r12)
je 0x29227
incq %rax
movb $0x0, (%rcx)
subq %rdx, %rcx
jmp 0x2922e
xorl %ecx, %ecx
addq %rcx, %rax
addq $0x18, %rsp
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_ns_push
int dns_ns_push(struct dns_packet *P, struct dns_ns *ns) {
	size_t end, len;
	int error;

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

	end	= P->end;
	P->end	+= 2;

	if ((error = dns_d_push(P, ns->host, strlen(ns->host))))
		goto error;

	len	= P->end - end - 2;

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

	return 0;
error:
	P->end	= end;

	return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x48(%rdi), %rcx
movq 0x50(%rdi), %r15
subq %r15, %rcx
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq $0x3, %rcx
jb 0x29317
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2(%r15), %rax
movq %rax, 0x50(%rdi)
movq %rsi, %rdi
callq 0xf560
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf390
testl %eax, %eax
je 0x29302
movq %r15, 0x50(%rbx)
jmp 0x29317
movl 0x50(%rbx), %eax
subl %r15d, %eax
addl $-0x2, %eax
rolw $0x8, %ax
movw %ax, 0x5c(%rbx,%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_soa_parse
int dns_soa_parse(struct dns_soa *soa, struct dns_rr *rr, struct dns_packet *P) {
	struct { void *dst; size_t lim; } dn[] =
		{ { soa->mname, sizeof soa->mname },
		  { soa->rname, sizeof soa->rname } };
	unsigned *ts[] =
		{ &soa->serial, &soa->refresh, &soa->retry, &soa->expire, &soa->minimum };
	unsigned short rp;
	unsigned i, j, n;
	int error;

	/* MNAME / RNAME */
	if ((rp = rr->rd.p) >= P->end)
		return DNS_EILLEGAL;

	for (i = 0; i < lengthof(dn); i++) {
		if (!(n = dns_d_expand(dn[i].dst, dn[i].lim, rp, P, &error)))
			return error;
		else if (n >= dn[i].lim)
			return DNS_EILLEGAL;

		if ((rp = dns_d_skip(rp, P)) >= P->end)
			return DNS_EILLEGAL;
	}

	/* SERIAL / REFRESH / RETRY / EXPIRE / MINIMUM */
	for (i = 0; i < lengthof(ts); i++) {
		for (j = 0; j < 4; j++, rp++) {
			if (rp >= P->end)
				return DNS_EILLEGAL;

			*ts[i]	<<= 8;
			*ts[i]	|= (0xff & P->data[rp]);
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x18(%rsp)
leaq (%rdi,%rax), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0x204(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x208(%rdi), %rax
movq %rax, 0x40(%rsp)
leaq 0x20c(%rdi), %rax
movq %rax, 0x48(%rsp)
addq $0x210, %rdi            # imm = 0x210
movq %rdi, 0x50(%rsp)
movzwl 0x14(%rsi), %eax
cmpq %rax, 0x50(%rdx)
jbe 0x29548
movq %rdx, %rbx
leaq 0x10(%rsp), %rcx
movb $0x1, %r13b
leaq 0xc(%rsp), %r14
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq (%rcx), %rdi
movq 0x8(%rcx), %r15
movzwl %ax, %ebp
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0xfec0
andq %r12, %rax
je 0x2955e
cmpq %r15, %rax
jae 0x29548
movl %ebp, %edi
movq %rbx, %rsi
callq 0x102a0
movzwl %ax, %ecx
movq 0x50(%rbx), %rdx
cmpq %rcx, %rdx
jbe 0x29548
leaq 0x20(%rsp), %rcx
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x294b7
xorl %esi, %esi
movzwl %ax, %eax
xorl %ecx, %ecx
leal (%rax,%rcx), %edi
movzwl %di, %edi
cmpq %rdi, %rdx
jbe 0x29548
movq 0x30(%rsp,%rsi,8), %r8
movl (%r8), %r9d
shll $0x8, %r9d
movl %r9d, (%r8)
movzbl 0x5c(%rbx,%rdi), %edi
orl %r9d, %edi
movl %edi, (%r8)
incl %ecx
cmpl $0x4, %ecx
jne 0x2950d
incq %rsi
addl %ecx, %eax
xorl %ecx, %ecx
cmpq $0x5, %rsi
jne 0x29508
jmp 0x2954d
movl $0x9b918cc1, %ecx       # imm = 0x9B918CC1
movl %ecx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rsp), %ecx
jmp 0x2954d
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_soa_push
int dns_soa_push(struct dns_packet *P, struct dns_soa *soa) {
	void *dn[]	= { soa->mname, soa->rname };
	unsigned ts[]	= { (0xffffffff & soa->serial),
			    (0x7fffffff & soa->refresh),
			    (0x7fffffff & soa->retry),
			    (0x7fffffff & soa->expire),
			    (0xffffffff & soa->minimum) };
	unsigned i, j;
	size_t end, len;
	int error;

	end	= P->end;

	if ((P->end += 2) >= P->size)
		goto toolong;

	/* MNAME / RNAME */
	for (i = 0; i < lengthof(dn); i++) {
		if ((error = dns_d_push(P, dn[i], strlen(dn[i]))))
			goto error;
	}

	/* SERIAL / REFRESH / RETRY / EXPIRE / MINIMUM */
	for (i = 0; i < lengthof(ts); i++) {
		if ((P->end += 4) >= P->size)
			goto toolong;

		for (j = 1; j <= 4; j++) {
			P->data[P->end - j]	= (0xff & ts[i]);
			ts[i]			>>= 8;
		}
	}

	len			= P->end - end - 2;
	P->data[end + 0]	= (0xff & (len >> 8));
	P->data[end + 1]	= (0xff & (len >> 0));

	return 0;
toolong:
	error	= DNS_ENOBUFS;

	/* FALL THROUGH */
error:
	P->end	= end;

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x200(%rsi), %eax
movl %eax, (%rsp)
movabsq $0x7fffffff7fffffff, %rax # imm = 0x7FFFFFFF7FFFFFFF
andq 0x204(%rsi), %rax
movq %rax, 0x4(%rsp)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl 0x20c(%rsi), %eax
movl %eax, 0xc(%rsp)
movl 0x210(%rsi), %eax
movl %eax, 0x10(%rsp)
movq 0x50(%rdi), %r15
leaq 0x2(%r15), %rax
movq %rax, 0x50(%rdi)
movl $0x9b918cc0, %ebp       # imm = 0x9B918CC0
cmpq 0x48(%rdi), %rax
jae 0x29656
movq %rsi, %r14
leaq 0x100(%rsi), %r12
movb $0x1, %r13b
movq %r14, %rdi
callq 0xf560
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf390
testl %eax, %eax
jne 0x29654
movq %r12, %r14
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x295d5
leaq 0x5b(%rbx), %rax
xorl %ecx, %ecx
movq 0x50(%rbx), %rdx
addq $0x4, %rdx
movq %rdx, 0x50(%rbx)
cmpq 0x48(%rbx), %rdx
jae 0x29656
movl (%rsp,%rcx,4), %edx
xorl %esi, %esi
movq 0x50(%rbx), %rdi
addq %rax, %rdi
movb %dl, (%rsi,%rdi)
shrl $0x8, %edx
decq %rsi
cmpq $-0x4, %rsi
jne 0x2961b
movl %edx, (%rsp,%rcx,4)
incq %rcx
cmpq $0x5, %rcx
jne 0x29604
movl 0x50(%rbx), %eax
subl %r15d, %eax
addl $-0x2, %eax
rolw $0x8, %ax
movw %ax, 0x5c(%rbx,%r15)
xorl %ebp, %ebp
jmp 0x2965a
movl %eax, %ebp
movq %r15, 0x50(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
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_soa_cmp
int dns_soa_cmp(const struct dns_soa *a, const struct dns_soa *b) {
	int cmp;

	if ((cmp = strcasecmp(a->mname, b->mname)))
		return cmp;

	if ((cmp = strcasecmp(a->rname, b->rname)))
		return cmp;

	if (a->serial > b->serial)
		return -1;
	else if (a->serial < b->serial)
		return 1;

	if (a->refresh > b->refresh)
		return -1;
	else if (a->refresh < b->refresh)
		return 1;

	if (a->retry > b->retry)
		return -1;
	else if (a->retry < b->retry)
		return 1;

	if (a->expire > b->expire)
		return -1;
	else if (a->expire < b->expire)
		return 1;

	if (a->minimum > b->minimum)
		return -1;
	else if (a->minimum < b->minimum)
		return 1;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xfe40
testl %eax, %eax
jne 0x296b0
movl $0x100, %esi            # imm = 0x100
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0xfe40
testl %eax, %eax
jne 0x296b0
movl 0x200(%r14), %eax
cmpl %eax, 0x200(%rbx)
jbe 0x296a9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x296b0
movl $0x1, %eax
jae 0x296b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x204(%r14), %ecx
cmpl %ecx, 0x204(%rbx)
ja 0x296a2
jb 0x296b0
movl 0x208(%r14), %ecx
cmpl %ecx, 0x208(%rbx)
ja 0x296a2
jb 0x296b0
movl 0x20c(%r14), %ecx
cmpl %ecx, 0x20c(%rbx)
ja 0x296a2
jb 0x296b0
movl 0x210(%r14), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0x210(%rbx)
ja 0x296b0
setb %al
movzbl %al, %eax
jmp 0x296b0
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_srv_parse
int dns_srv_parse(struct dns_srv *srv, struct dns_rr *rr, struct dns_packet *P) {
	unsigned short rp;
	unsigned i;
	size_t n;
	int error;

	memset(srv, '\0', sizeof *srv);

	rp	= rr->rd.p;

	if (rr->rd.len < 7)
		return DNS_EILLEGAL;

	for (i = 0; i < 2; i++, rp++) {
		srv->priority	<<= 8;
		srv->priority	|= (0xff & P->data[rp]);
	}

	for (i = 0; i < 2; i++, rp++) {
		srv->weight	<<= 8;
		srv->weight	|= (0xff & P->data[rp]);
	}

	for (i = 0; i < 2; i++, rp++) {
		srv->port	<<= 8;
		srv->port	|= (0xff & P->data[rp]);
	}

	if (!(n = dns_d_expand(srv->target, sizeof srv->target, rp, P, &error)))
		return error;
	else if (n >= sizeof srv->target)
		return DNS_EILLEGAL;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x106, %edx            # imm = 0x106
xorl %esi, %esi
callq 0xf750
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpw $0x7, 0x16(%r15)
jb 0x29c83
movzwl 0x14(%r15), %eax
movb $0x1, %cl
xorl %edx, %edx
shll $0x8, %edx
movw %dx, (%r14)
movzwl %ax, %esi
movzbl 0x5c(%rbx,%rsi), %esi
orl %edx, %esi
movw %si, (%r14)
incl %eax
movl %esi, %edx
testb $0x1, %cl
movl $0x0, %ecx
jne 0x29bd7
movb $0x1, %cl
xorl %edx, %edx
shll $0x8, %edx
movw %dx, 0x2(%r14)
movzwl %ax, %esi
movzbl 0x5c(%rbx,%rsi), %esi
orl %edx, %esi
movw %si, 0x2(%r14)
incl %eax
movl %esi, %edx
testb $0x1, %cl
movl $0x0, %ecx
jne 0x29bfe
movb $0x1, %cl
xorl %edx, %edx
shll $0x8, %edx
movw %dx, 0x4(%r14)
movzwl %ax, %esi
movzbl 0x5c(%rbx,%rsi), %esi
orl %edx, %esi
movw %si, 0x4(%r14)
incl %eax
movl %esi, %edx
testb $0x1, %cl
movl $0x0, %ecx
jne 0x29c27
addq $0x6, %r14
movzwl %ax, %edx
leaq 0xc(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rcx
callq 0xfec0
testq %rax, %rax
je 0x29c7f
xorl %ecx, %ecx
cmpq $0x100, %rax            # imm = 0x100
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmovbl %ecx, %eax
jmp 0x29c83
movl 0xc(%rsp), %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_srv_push
int dns_srv_push(struct dns_packet *P, struct dns_srv *srv) {
	size_t end, len;
	int error;

	end	= P->end;

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

	P->end	+= 2;

	if (P->size - P->end < 6)
		goto toolong;

	P->data[P->end++]	= 0xff & (srv->priority >> 8);
	P->data[P->end++]	= 0xff & (srv->priority >> 0);

	P->data[P->end++]	= 0xff & (srv->weight >> 8);
	P->data[P->end++]	= 0xff & (srv->weight >> 0);

	P->data[P->end++]	= 0xff & (srv->port >> 8);
	P->data[P->end++]	= 0xff & (srv->port >> 0);

	if (0 == (len = dns_d_comp(&P->data[P->end], P->size - P->end, srv->target, strlen(srv->target), P, &error)))
		goto error;
	else if (P->size - P->end < len)
		goto toolong;

	P->end	+= len;

	if (P->end > 65535)
		goto toolong;

	len	= P->end - end - 2;

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

	return 0;
toolong:
	error	= DNS_ENOBUFS;

	/* FALL THROUGH */
error:
	P->end	= end;

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %r13
subq %r13, %rax
movl $0x9b918cc0, %ebp       # imm = 0x9B918CC0
cmpq $0x2, %rax
jb 0x29dac
addq $-0x2, %rax
cmpq $0x6, %rax
jb 0x29dac
movq %rsi, %r14
movb 0x1(%rsi), %al
leaq 0x3(%r13), %rcx
movq %rcx, 0x50(%rbx)
movb %al, 0x5e(%rbx,%r13)
movb (%rsi), %al
movq 0x50(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbx)
movb %al, 0x5c(%rbx,%rcx)
movb 0x3(%rsi), %al
movq 0x50(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbx)
movb %al, 0x5c(%rbx,%rcx)
movb 0x2(%rsi), %al
movq 0x50(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbx)
movb %al, 0x5c(%rbx,%rcx)
movb 0x5(%rsi), %al
movq 0x50(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbx)
movb %al, 0x5c(%rbx,%rcx)
movb 0x4(%rsi), %al
movq 0x50(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rbx)
movb %al, 0x5c(%rbx,%rcx)
movq 0x48(%rbx), %r15
movq 0x50(%rbx), %rax
leaq (%rbx,%rax), %r12
addq $0x5c, %r12
subq %rax, %r15
addq $0x6, %r14
movq %r14, %rdi
callq 0xf560
leaq 0x4(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0xfe00
testq %rax, %rax
je 0x29da8
movq 0x48(%rbx), %rdx
movq 0x50(%rbx), %rcx
subq %rcx, %rdx
cmpq %rax, %rdx
jb 0x29dac
addq %rax, %rcx
movq %rcx, 0x50(%rbx)
cmpq $0xffff, %rcx           # imm = 0xFFFF
ja 0x29dac
addq $0x5c, %rbx
subl %r13d, %ecx
addl $-0x2, %ecx
rolw $0x8, %cx
movw %cx, (%rbx,%r13)
xorl %ebp, %ebp
jmp 0x29db0
movl 0x4(%rsp), %ebp
movq %r13, 0x50(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
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_opt_init
struct dns_opt *dns_opt_init(struct dns_opt *opt, size_t size) {
	assert(size >= offsetof(struct dns_opt, data));

	opt->size = size - offsetof(struct dns_opt, data);
	opt->len  = 0;

	opt->rcode   = 0;
	opt->version = 0;
	opt->maxudp  = 0;

	return opt;
}

// Assembly:
cmpq $0x1f, %rsi
jbe 0x2a130
addq $-0x20, %rsi
movq %rsi, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movl $0x0, (%rdi)
movb $0x0, 0x4(%rdi)
movw $0x0, 0x8(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0xeddd(%rip), %rdi      # 0x38f15
leaq 0xed3e(%rip), %rsi      # 0x38e7d
leaq 0xedf6(%rip), %rcx      # 0x38f3c
movl $0xe06, %edx            # imm = 0xE06
callq 0xf890
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_opt_parse
int dns_opt_parse(struct dns_opt *opt, struct dns_rr *rr, struct dns_packet *P) {
	const struct dns_buf src = DNS_B_FROM(&P->data[rr->rd.p], rr->rd.len);
	struct dns_buf dst = DNS_B_INTO(opt->data, opt->size);
	int error;

	opt->rcode = 0xfff & ((rr->ttl >> 20) | dns_header(P)->rcode);
	opt->version = 0xff & (rr->ttl >> 16);
	opt->flags = 0xffff & rr->ttl;
	opt->maxudp = 0xffff & rr->class;

	while (src.p < src.pe) {
		int code, len;

		if (-1 == (code = dns_b_get16(&src, -1)))
			return src.error;
		if (-1 == (len = dns_b_get16(&src, -1)))
			return src.error;

		switch (code) {
		default:
			dns_b_put16(&dst, code);
			dns_b_put16(&dst, len);
			if ((error = dns_b_move(&dst, &src, len)))
				return error;
			break;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movzwl 0x14(%rsi), %eax
leaq (%rdx,%rax), %rcx
leaq 0x5c(%rdx,%rax), %rbx
movzwl 0x16(%rsi), %eax
leaq (%rax,%rcx), %r8
addq $0x5c, %r8
leaq 0x20(%rdi), %r14
movq 0x10(%rdi), %rax
addq %r14, %rax
movq %rax, 0x18(%rsp)
movl 0x10(%rsi), %eax
movl %eax, %ecx
shrl $0x14, %ecx
movzbl 0x5f(%rdx), %edx
andl $0xf, %edx
orl %ecx, %edx
movl %edx, (%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x4(%rdi)
movw %ax, 0x6(%rdi)
movzwl 0xc(%rsi), %eax
movw %ax, 0x8(%rdi)
movq %r8, 0x10(%rsp)
cmpq %r8, %rbx
jae 0x2a2b8
leaq 0x1(%rbx), %rcx
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpq %r8, %rcx
jae 0x2a2ba
leaq 0x2(%rbx), %rcx
cmpq %r8, %rcx
jae 0x2a2ba
leaq 0x3(%rbx), %rcx
cmpq %r8, %rcx
jae 0x2a2ba
movb 0x1(%rbx), %cl
movzbl 0x2(%rbx), %r13d
movzbl 0x3(%rbx), %eax
movq 0x18(%rsp), %rbp
cmpq %rbp, %r14
jae 0x2a20a
movb (%rbx), %dl
movb %dl, (%r14)
incq %r14
xorl %edx, %edx
jmp 0x2a20f
movl $0x9b918cc0, %edx       # imm = 0x9B918CC0
cmpq %rbp, %r14
jae 0x2a21c
movb %cl, (%r14)
incq %r14
jmp 0x2a221
movl $0x9b918cc0, %edx       # imm = 0x9B918CC0
cmpq %rbp, %r14
jae 0x2a22e
movb %r13b, (%r14)
incq %r14
jmp 0x2a233
movl $0x9b918cc0, %edx       # imm = 0x9B918CC0
cmpq %rbp, %r14
jae 0x2a244
movl %edx, 0xc(%rsp)
movb %al, (%r14)
incq %r14
jmp 0x2a24c
movl $0x9b918cc0, 0xc(%rsp)  # imm = 0x9B918CC0
shll $0x8, %r13d
addq $0x4, %rbx
orq %rax, %r13
movq 0x10(%rsp), %r12
subq %rbx, %r12
cmpq %r13, %r12
movq %r13, 0x20(%rsp)
cmovbq %r12, %r13
subq %r14, %rbp
cmpq %r13, %rbp
movq %r13, %r15
cmovbq %rbp, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xfa60
cmpq 0x20(%rsp), %r12
movq 0x10(%rsp), %r8
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
jb 0x2a2ba
addq %r13, %rbx
cmpq %r13, %rbp
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
movl 0xc(%rsp), %ecx
cmovbl %eax, %ecx
addq %r15, %r14
movl %ecx, %eax
testl %ecx, %ecx
je 0x2a1b3
jmp 0x2a2ba
xorl %eax, %eax
addq $0x28, %rsp
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_opt_push
int dns_opt_push(struct dns_packet *P, struct dns_opt *opt) {
	const struct dns_buf src = DNS_B_FROM(opt->data, opt->len);
	struct dns_buf dst = DNS_B_INTO(&P->data[P->end], (P->size - P->end));
	int error;

	/* rdata length (see below) */
	if ((error = dns_b_put16(&dst, 0)))
		goto error;

	/* ... push known options here */

	/* push opaque option data */
	if ((error = dns_b_move(&dst, &src, (size_t)(src.pe - src.p))))
		goto error;

	/* rdata length */
	if ((error = dns_b_pput16(&dst, dns_b_tell(&dst) - 2, 0)))
		goto error;

#if !DNS_DEBUG_OPT_FORMERR
	P->end += dns_b_tell(&dst);
#endif

	return 0;
error:
	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rsi), %r15
movq 0x48(%rdi), %r12
movq 0x50(%rdi), %rbp
leaq 0x5c(%rdi,%rbp), %rcx
leaq 0x5c(%rdi,%r12), %r13
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
movl $0x9b918cc0, %edi       # imm = 0x9B918CC0
movq %rcx, %r14
cmpq %rbp, %r12
jle 0x2a30b
leaq 0x1(%rcx), %r14
movb $0x0, (%rcx)
xorl %edi, %edi
cmpq %r13, %r14
jae 0x2a37c
movq %rcx, 0x10(%rsp)
addq $0x20, %rsi
movb $0x0, (%r14)
incq %r14
subq %r14, %r13
cmpq %r15, %r13
movq %r15, 0x8(%rsp)
cmovbq %r13, %r15
cmovbl %eax, %edi
movl %edi, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rdx
callq 0xfa60
subq %rbp, %r12
jle 0x2a378
movl 0x4(%rsp), %eax
cmpq 0x8(%rsp), %r13
movq 0x10(%rsp), %rdx
jb 0x2a37c
addq %r15, %r14
subq %rdx, %r14
leal -0x2(%r14), %ecx
movb %ch, (%rdx)
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpq $0x2, %r12
jb 0x2a37c
movb %cl, 0x1(%rdx)
addq %r14, 0x50(%rbx)
xorl %eax, %eax
jmp 0x2a37c
movl 0x4(%rsp), %eax
addq $0x18, %rsp
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_opt_print
size_t dns_opt_print(void *_dst, size_t lim, struct dns_opt *opt) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	size_t p;

	dns_b_putc(&dst, '"');

	for (p = 0; p < opt->len; p++) {
		dns_b_putc(&dst, '\\');
		dns_b_fmtju(&dst, opt->data[p], 3);
	}

	dns_b_putc(&dst, '"');

	return dns_b_strllen(&dst);
}

// Assembly:
movq %rdx, %r8
testq %rsi, %rsi
jle 0x2a3a4
leaq 0x1(%rdi), %r11
movb $0x22, (%rdi)
xorl %ecx, %ecx
jmp 0x2a3ac
movl $0x1, %ecx
movq %rdi, %r11
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
addq %rdi, %rsi
cmpq $0x0, 0x18(%r8)
je 0x2a4f9
xorl %ebx, %ebx
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
movl $0x3, %r15d
cmpq %rsi, %r11
jae 0x2a3e4
movb $0x5c, (%r11)
incq %r11
jmp 0x2a3e7
incq %rcx
movzbl 0x20(%r8,%rbx), %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 0x2a3fe
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 0x2a468
cmpq $0x3, %rbp
cmovaeq %r15, %rbp
addq $-0x3, %rbp
movq %r11, %r10
cmpq %rsi, %r10
jae 0x2a45e
movb $0x30, (%r10)
incq %r10
jmp 0x2a461
incq %rcx
incq %rbp
jne 0x2a450
jmp 0x2a46b
movq %r11, %r10
addq %rax, %r12
negq %r12
addq %r13, %r12
addq $0x3, %r12
movl $0x1, %r13d
movq %r10, %r11
cmpq %r13, %r12
jae 0x2a4ad
cmpq %rsi, %r11
jae 0x2a4aa
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 0x2a4ad
incq %rcx
movq %r9, %rax
mulq %r14
shrq $0x3, %rdx
incq %r13
cmpq $0x9, %r9
movq %rdx, %r9
ja 0x2a481
cmpq %r11, %r10
jae 0x2a4ec
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 0x2a4ce
incq %rbx
cmpq 0x18(%r8), %rbx
jb 0x2a3d6
cmpq %rsi, %r11
jae 0x2a507
movb $0x22, (%r11)
incq %r11
jmp 0x2a50a
incq %rcx
cmpq %rsi, %r11
jae 0x2a51b
movb $0x0, (%r11)
subq %rdi, %r11
movq %r11, %rax
jmp 0x2a538
cmpq %rdi, %r11
jbe 0x2a536
leaq -0x1(%r11), %rax
cmpb $0x0, -0x1(%r11)
je 0x2a531
incq %rcx
movb $0x0, (%rax)
subq %rdi, %rax
jmp 0x2a538
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_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_ptr_qname
size_t dns_ptr_qname(void *dst, size_t lim, int af, void *addr) {
	switch (af) {
	case AF_INET6:
		return dns_aaaa_arpa(dst, lim, addr);
	case AF_INET:
		return dns_a_arpa(dst, lim, addr);
	default: {
		struct dns_a a;
		a.addr.s_addr = INADDR_NONE;
		return dns_a_arpa(dst, lim, &a);
	}
	}
}

// Assembly:
cmpl $0x2, %edx
je 0x2a595
cmpl $0xa, %edx
jne 0x2a59d
movq %rcx, %rdx
jmp 0x10610
movq %rcx, %rdx
jmp 0xff40
pushq %rax
leaq 0x4(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
callq 0xff40
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_sshfp_parse
int dns_sshfp_parse(struct dns_sshfp *fp, struct dns_rr *rr, struct dns_packet *P) {
	unsigned p = rr->rd.p, pe = rr->rd.p + rr->rd.len;

	if (pe - p < 2)
		return DNS_EILLEGAL;

	fp->algo = P->data[p++];
	fp->type = P->data[p++];

	switch (fp->type) {
	case DNS_SSHFP_SHA1:
		if (pe - p < sizeof fp->digest.sha1)
			return DNS_EILLEGAL;

		memcpy(fp->digest.sha1, &P->data[p], sizeof fp->digest.sha1);

		break;
	default:
		break;
	} /* switch() */

	return 0;
}

// Assembly:
movzwl 0x16(%rsi), %r8d
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpl $0x2, %r8d
jb 0x2a680
movzwl 0x14(%rsi), %ecx
movzbl 0x5c(%rdx,%rcx), %esi
movl %esi, (%rdi)
movzbl 0x5d(%rdx,%rcx), %esi
movl %esi, 0x4(%rdi)
cmpl $0x1, %esi
jne 0x2a67e
addl $-0x2, %r8d
cmpl $0x14, %r8d
jb 0x2a680
addq $0x5c, %rdx
addq $0x2, %rcx
movl 0x10(%rdx,%rcx), %eax
movl %eax, 0x18(%rdi)
movups (%rdx,%rcx), %xmm0
movups %xmm0, 0x8(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_sshfp_push
int dns_sshfp_push(struct dns_packet *P, struct dns_sshfp *fp) {
	unsigned p = P->end, pe = P->size, n;

	if (pe - p < 4)
		return DNS_ENOBUFS;

	p += 2;
	P->data[p++] = 0xff & fp->algo;
	P->data[p++] = 0xff & fp->type;

	switch (fp->type) {
	case DNS_SSHFP_SHA1:
		if (pe - p < sizeof fp->digest.sha1)
			return DNS_ENOBUFS;

		memcpy(&P->data[p], fp->digest.sha1, sizeof fp->digest.sha1);
		p += sizeof fp->digest.sha1;

		break;
	default:
		return DNS_EILLEGAL;
	} /* switch() */

	n = p - P->end - 2;
	P->data[P->end++] = 0xff & (n >> 8);
	P->data[P->end++] = 0xff & (n >> 0);
	P->end = p;

	return 0;
}

// Assembly:
movq 0x50(%rdi), %rcx
movl 0x48(%rdi), %edx
movl %edx, %r8d
subl %ecx, %r8d
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpl $0x4, %r8d
jb 0x2a703
leal 0x2(%rcx), %eax
movb (%rsi), %r8b
leal 0x3(%rcx), %r9d
movb %r8b, 0x5c(%rdi,%rax)
movb 0x4(%rsi), %al
movb %al, 0x5c(%rdi,%r9)
movl $0x9b918cc1, %eax       # imm = 0x9B918CC1
cmpl $0x1, 0x4(%rsi)
jne 0x2a703
leal 0x4(%rcx), %r8d
subl %r8d, %edx
movl $0x9b918cc0, %eax       # imm = 0x9B918CC0
cmpl $0x14, %edx
jb 0x2a703
leaq 0x5c(%rdi), %rax
movl %r8d, %edx
movl 0x18(%rsi), %r8d
movl %r8d, 0x10(%rax,%rdx)
movups 0x8(%rsi), %xmm0
movups %xmm0, (%rax,%rdx)
leal 0x18(%rcx), %eax
leaq 0x1(%rcx), %rdx
movq %rdx, 0x50(%rdi)
movb $0x0, 0x5c(%rdi,%rcx)
movq 0x50(%rdi), %rcx
movb $0x16, 0x5c(%rdi,%rcx)
movq %rax, 0x50(%rdi)
xorl %eax, %eax
retq