// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_print
size_t dns_rr_print(void *_dst, size_t lim, struct dns_rr *rr, struct dns_packet *P, int *_error) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	union dns_any any;
	size_t n;
	int error;

	if (rr->section == DNS_S_QD)
		dns_b_putc(&dst, ';');

	if (!(n = dns_d_expand(any.ns.host, sizeof any.ns.host, rr->dn.p, P, &error)))
		goto error;
	dns_b_put(&dst, any.ns.host, DNS_PP_MIN(n, sizeof any.ns.host - 1));

	if (rr->section != DNS_S_QD) {
		dns_b_putc(&dst, ' ');
		dns_b_fmtju(&dst, rr->ttl, 0);
	}

	dns_b_putc(&dst, ' ');
	dns_b_puts(&dst, dns_strclass(rr->class));
	dns_b_putc(&dst, ' ');
	dns_b_puts(&dst, dns_strtype(rr->type));

	if (rr->section == DNS_S_QD)
		goto epilog;

	dns_b_putc(&dst, ' ');

	if ((error = dns_any_parse(dns_any_init(&any, sizeof any), rr, P)))
		goto error;

	n = dns_any_print(dst.p, dst.pe - dst.p, &any, rr->type);
	dst.p += DNS_PP_MIN(n, (size_t)(dst.pe - dst.p));
epilog:
	return dns_b_strllen(&dst);
error:
	*_error = error;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %r8, %rbp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
cmpl $0x1, (%rdx)
jne 0x283e1
testq %r12, %r12
jle 0x283e5
leaq 0x1(%r14), %r15
movb $0x3b, (%r14)
xorl %ebx, %ebx
jmp 0x283ed
xorl %ebx, %ebx
jmp 0x283ea
movl $0x1, %ebx
movq %r14, %r15
movzwl 0x4(%r13), %edx
leaq 0xa8(%rsp), %rdi
leaq 0x14(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %rcx, 0x38(%rsp)
callq 0xfec0
testq %rax, %rax
je 0x28482
movq %rbp, 0x20(%rsp)
movq %r14, 0x30(%rsp)
addq %r14, %r12
movl $0xff, %r14d
cmpq %r14, %rax
cmovbq %rax, %r14
movq %r13, 0x18(%rsp)
movq %r12, %r13
subq %r15, %r13
cmpq %r14, %r13
movq %r14, %rbp
cmovbq %r13, %rbp
leaq 0xa8(%rsp), %rsi
movq %r15, %rdi
movq %rbp, %rdx
callq 0xfa60
addq %r15, %rbp
xorl %r11d, %r11d
subq %r13, %r14
movq 0x18(%rsp), %r10
cmovaeq %r14, %r11
addq %rbx, %r11
cmpl $0x1, (%r10)
je 0x2853a
cmpq %r12, %rbp
jae 0x2848b
movb $0x20, (%rbp)
incq %rbp
jmp 0x2848e
movl 0x14(%rsp), %eax
jmp 0x2868f
incq %r11
movl 0x10(%r10), %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 0x284a2
movq %r12, %rax
subq %rbp, %rax
xorl %r8d, %r8d
subq %rax, %r9
cmovaeq %r9, %r8
movl $0x1, %r9d
movq %rbp, %rsi
cmpq %r9, %r8
jae 0x284fb
cmpq %r12, %rsi
jae 0x284f8
movq %rcx, %rax
mulq %rdi
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 0x284fb
incq %r11
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
incq %r9
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x284d1
cmpq %rsi, %rbp
jae 0x28537
incq %rbp
movq %rsi, %rax
movb -0x1(%rax), %cl
movb -0x1(%rbp), %dl
movb %dl, -0x1(%rax)
decq %rax
movb %cl, -0x1(%rbp)
leaq 0x1(%rbp), %rcx
cmpq %rax, %rbp
movq %rcx, %rbp
jb 0x2851c
movq %rsi, %rbp
cmpq %r12, %rbp
jae 0x28548
movb $0x20, (%rbp)
incq %rbp
jmp 0x2854b
incq %r11
movq %r11, 0x28(%rsp)
movl 0xc(%r10), %edi
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x30, %edx
callq 0x10100
movq %rax, %r15
movq %rax, %rdi
callq 0xf560
movq %rax, %r13
movq %r12, 0x8(%rsp)
movq 0x8(%rsp), %r12
subq %rbp, %r12
cmpq %rax, %r12
movq %rax, %rbx
cmovbq %r12, %rbx
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xfa60
addq %rbp, %rbx
xorl %r14d, %r14d
subq %r12, %r13
movq 0x8(%rsp), %r12
cmovaeq %r13, %r14
addq 0x28(%rsp), %r14
cmpq %r12, %rbx
jae 0x285c8
movb $0x20, (%rbx)
incq %rbx
jmp 0x285cb
incq %r14
movq 0x18(%rsp), %rax
movl 0x8(%rax), %edi
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x30, %edx
callq 0xf590
movq %rax, %r13
movq %rax, %rdi
callq 0xf560
movq %rax, %r15
movq %r12, %rbp
subq %rbx, %rbp
cmpq %rax, %rbp
movq %rax, %r12
cmovbq %rbp, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xfa60
addq %rbx, %r12
xorl %r13d, %r13d
subq %rbp, %r15
cmovaeq %r15, %r13
addq %r14, %r13
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x28640
movq 0x30(%rsp), %r14
jmp 0x286c0
cmpq 0x8(%rsp), %r12
movq 0x30(%rsp), %r14
jae 0x28656
movb $0x20, (%r12)
incq %r12
jmp 0x28659
incq %r13
movq 0x20(%rsp), %rbp
movq 0x38(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
movq $0x400, (%rdi)          # imm = 0x400
movq $0x0, 0x8(%rdi)
movq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xfe70
movl %eax, 0x14(%rsp)
testl %eax, %eax
je 0x28697
movl %eax, (%rbp)
xorl %r13d, %r13d
jmp 0x286f6
movq 0x8(%rsp), %rbx
subq %r12, %rbx
movl 0x8(%r15), %ecx
leaq 0xa8(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf860
cmpq %rbx, %rax
cmovbq %rax, %rbx
addq %rbx, %r12
cmpq 0x8(%rsp), %r12
jae 0x286d4
movb $0x0, (%r12)
subq %r14, %r12
movq %r12, %rax
jmp 0x286f3
cmpq %r14, %r12
jbe 0x286f1
leaq -0x1(%r12), %rax
cmpb $0x0, -0x1(%r12)
je 0x286ec
incq %r13
movb $0x0, (%rax)
subq %r14, %rax
jmp 0x286f3
xorl %eax, %eax
addq %rax, %r13
movq %r13, %rax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq