// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/lib/dns.c
// Function: dns_ai_print
size_t dns_ai_print(void *_dst, size_t lim, struct addrinfo *ent, struct dns_addrinfo *ai) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	char addr[DNS_PP_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];

	dns_b_puts(&dst, "[ ");
	dns_b_puts(&dst, ai->qname);
	dns_b_puts(&dst, " IN ");
	if (ai->qtype) {
		dns_b_puts(&dst, dns_strtype(ai->qtype));
	} else if (ent->ai_family == AF_INET) {
		dns_b_puts(&dst, dns_strtype(DNS_T_A));
	} else if (ent->ai_family == AF_INET6) {
		dns_b_puts(&dst, dns_strtype(DNS_T_AAAA));
	} else {
		dns_b_puts(&dst, "0");
	}
	dns_b_puts(&dst, " ]\n");

	dns_b_puts(&dst, ".ai_family    = ");
	switch (ent->ai_family) {
	case AF_INET:
		dns_b_puts(&dst, "AF_INET");
		break;
	case AF_INET6:
		dns_b_puts(&dst, "AF_INET6");
		break;
	default:
		dns_b_fmtju(&dst, ent->ai_family, 0);
		break;
	}
	dns_b_putc(&dst, '\n');

	dns_b_puts(&dst, ".ai_socktype  = ");
	switch (ent->ai_socktype) {
	case SOCK_STREAM:
		dns_b_puts(&dst, "SOCK_STREAM");
		break;
	case SOCK_DGRAM:
		dns_b_puts(&dst, "SOCK_DGRAM");
		break;
	default:
		dns_b_fmtju(&dst, ent->ai_socktype, 0);
		break;
	}
	dns_b_putc(&dst, '\n');

	dns_inet_ntop(dns_sa_family(ent->ai_addr), dns_sa_addr(dns_sa_family(ent->ai_addr), ent->ai_addr, NULL), addr, sizeof addr);
	dns_b_puts(&dst, ".ai_addr      = [");
	dns_b_puts(&dst, addr);
	dns_b_puts(&dst, "]:");
	dns_b_fmtju(&dst, ntohs(*dns_sa_port(dns_sa_family(ent->ai_addr), ent->ai_addr)), 0);
	dns_b_putc(&dst, '\n');

	dns_b_puts(&dst, ".ai_canonname = ");
	dns_b_puts(&dst, (ent->ai_canonname)? ent->ai_canonname : "[NULL]");
	dns_b_putc(&dst, '\n');

	return dns_b_strllen(&dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r13
movq %rcx, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
leaq (%rdi,%rsi), %rax
movq %rax, (%rsp)
movl $0x2, %r14d
cmpq %r14, %rsi
movl $0x2, %r12d
cmovbq %rsi, %r12
leaq 0x6ec4(%rip), %rsi      # 0x39137
movq %r12, %rdx
callq 0xfa60
movq %rbx, 0x20(%rsp)
leaq (%rbx,%r12), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
subq %r15, %r14
cmovbq %rax, %r14
leaq 0x38(%r13), %rbx
movq %rbx, %rdi
callq 0xf560
movq %rax, %rbp
subq %r12, %r15
cmpq %rax, %r15
movq %rax, %r13
cmovbq %r15, %r13
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xfa60
addq %r12, %r13
subq %r15, %rbp
movl $0x0, %eax
cmovbq %rax, %rbp
addq %r14, %rbp
movq (%rsp), %rbx
movq %rbx, %rax
subq %r13, %rax
movq %rbp, %r15
subq %rax, %r15
addq $0x4, %r15
cmpq $0x4, %rax
movl $0x4, %r12d
cmovbq %rax, %r12
cmovaeq %rbp, %r15
leaq 0x6e3a(%rip), %rsi      # 0x3913a
movq %r13, %rdi
movq %r12, %rdx
callq 0xfa60
movq 0x18(%rsp), %rax
addq %r13, %r12
movq 0x8(%rsp), %rcx
movl 0x138(%rcx), %edi
testl %edi, %edi
je 0x32355
movq %rbx, %r13
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x30, %edx
callq 0xf590
movq %rax, %r14
movq %rax, %rdi
callq 0xf560
movq %rax, %rbx
jmp 0x323bc
movl 0x4(%rax), %eax
cmpl $0xa, %eax
je 0x32388
cmpl $0x2, %eax
jne 0x323e7
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x30, %edx
movl $0x1, %edi
jmp 0x323a5
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x30, %edx
movl $0x1c, %edi
callq 0xf590
movq %rax, %r14
movq %rax, %rdi
callq 0xf560
movq %rax, %rbx
movq (%rsp), %r13
subq %r12, %r13
cmpq %rax, %r13
movq %rax, %rbp
cmovbq %r13, %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0xfa60
addq %r12, %rbp
cmpq %rbx, %r13
jae 0x32412
subq %r13, %r15
addq %rbx, %r15
jmp 0x32412
xorl %r14d, %r14d
xorl %ebx, %ebx
cmpq %r12, (%rsp)
sete %r14b
setne %bl
leaq 0x45c7(%rip), %rsi      # 0x369c5
movq %r12, %rdi
movq %rbx, %rdx
callq 0xfa60
addq %rbx, %r12
addq %r14, %r15
movq %r12, %rbp
movq (%rsp), %rbx
movq %rbx, %rax
subq %rbp, %rax
movq %r15, %r12
subq %rax, %r12
addq $0x3, %r12
cmpq $0x3, %rax
movl $0x3, %r14d
cmovbq %rax, %r14
cmovaeq %r15, %r12
leaq 0x6d00(%rip), %rsi      # 0x3913f
movq %rbp, %rdi
movq %r14, %rdx
callq 0xfa60
movq %rbp, 0x8(%rsp)
movq %r14, 0x10(%rsp)
addq %r14, %rbp
movq %rbx, %rax
subq %rbp, %rax
movq %r12, %r14
subq %rax, %r14
addq $0x10, %r14
cmpq $0x10, %rax
movl $0x10, %ebx
cmovbq %rax, %rbx
cmovaeq %r12, %r14
leaq 0x6cc4(%rip), %rsi      # 0x39143
movq %rbp, %rdi
movq %rbx, %rdx
callq 0xfa60
addq %rbx, %rbp
movq 0x18(%rsp), %r15
movslq 0x4(%r15), %rcx
movabsq $-0x3333333333333333, %r13 # imm = 0xCCCCCCCCCCCCCCCD
cmpq $0xa, %rcx
je 0x324e8
cmpl $0x2, %ecx
jne 0x32630
movq (%rsp), %rbx
subq %rbp, %rbx
cmpq $0x7, %rbx
movl $0x7, %r12d
cmovbq %rbx, %r12
leaq 0x30ab(%rip), %rsi      # 0x35576
movq %rbp, %rdi
movq %r12, %rdx
callq 0xfa60
addq %rbp, %r12
cmpq $0x6, %rbx
ja 0x3251f
subq %rbx, %r14
addq $0x7, %r14
jmp 0x3251f
movq (%rsp), %rbx
subq %rbp, %rbx
cmpq $0x8, %rbx
movl $0x8, %r12d
cmovbq %rbx, %r12
leaq 0x307a(%rip), %rsi      # 0x3557e
movq %rbp, %rdi
movq %r12, %rdx
callq 0xfa60
addq %rbp, %r12
cmpq $0x7, %rbx
ja 0x3251f
subq %rbx, %r14
addq $0x8, %r14
movq (%rsp), %r8
cmpq %r8, %r12
jae 0x32532
movb $0xa, (%r12)
incq %r12
jmp 0x32535
incq %r14
movq %r8, %rax
subq %r12, %rax
movq %r14, %rbp
subq %rax, %rbp
addq $0x10, %rbp
cmpq $0x10, %rax
movl $0x10, %ebx
cmovbq %rax, %rbx
cmovaeq %r14, %rbp
leaq 0x6bf7(%rip), %rsi      # 0x39154
movq %r12, %rdi
movq %rbx, %rdx
callq 0xfa60
leaq (%r12,%rbx), %r14
movslq 0x8(%r15), %rcx
cmpq $0x2, %rcx
je 0x325b8
cmpl $0x1, %ecx
jne 0x326e6
movq (%rsp), %rbx
subq %r14, %rbx
cmpq $0xb, %rbx
movl $0xb, %r15d
cmovbq %rbx, %r15
leaq 0x2ff4(%rip), %rsi      # 0x3558f
movq %r14, %rdi
movq %r15, %rdx
callq 0xfa60
addq %r14, %r15
cmpq $0xa, %rbx
ja 0x325ef
subq %rbx, %rbp
addq $0xb, %rbp
jmp 0x325ef
movq (%rsp), %rbx
subq %r14, %rbx
cmpq $0xa, %rbx
movl $0xa, %r15d
cmovbq %rbx, %r15
leaq 0x2fd6(%rip), %rsi      # 0x355aa
movq %r14, %rdi
movq %r15, %rdx
callq 0xfa60
addq %r14, %r15
cmpq $0x9, %rbx
ja 0x325ef
subq %rbx, %rbp
addq $0xa, %rbp
movq (%rsp), %r8
cmpq %r8, %r15
jae 0x32601
movb $0xa, (%r15)
incq %r15
jmp 0x32604
incq %rbp
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rsi
movzwl (%rsi), %edi
cmpl $0x2, %edi
je 0x32627
cmpl $0xa, %edi
jne 0x32792
addq $0x8, %rsi
jmp 0x32794
addq $0x4, %rsi
jmp 0x32794
xorl %edi, %edi
movq %rcx, %rsi
movq (%rsp), %r8
incq %rdi
movq %rsi, %rax
mulq %r13
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x32639
movq %r8, %rax
subq %rbp, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %rbp, %r12
cmpq %rdi, %rsi
jae 0x32692
cmpq %r8, %r12
jae 0x3268f
movq %rcx, %rax
mulq %r13
shrl $0x2, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %eax
movl %ecx, %edx
subl %eax, %edx
orb $0x30, %dl
movb %dl, (%r12)
incq %r12
jmp 0x32692
incq %r14
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x32666
cmpq %r12, %rbp
jae 0x32523
addq 0x10(%rsp), %rbx
movq 0x8(%rsp), %rax
addq %rbx, %rax
incq %rax
movq %r12, %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 0x326c4
jmp 0x32523
xorl %edi, %edi
movq %rcx, %rsi
movq (%rsp), %r8
incq %rdi
movq %rsi, %rax
mulq %r13
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x326ef
movq %r8, %rax
subq %r14, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %r14, %r15
cmpq %rdi, %rsi
jae 0x32747
cmpq %r8, %r15
jae 0x32744
movq %rcx, %rax
mulq %r13
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 0x32747
incq %rbp
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x3271c
cmpq %r15, %r14
jae 0x325f3
leaq (%rbx,%r12), %rax
incq %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 0x32770
jmp 0x325f3
xorl %esi, %esi
leaq 0x30(%rsp), %rdx
movl $0x2f, %ecx
callq 0xfda0
movq (%rsp), %rcx
movq %rcx, %rax
movq %rcx, %r14
subq %r15, %rax
movq %rbp, %r12
subq %rax, %r12
addq $0x11, %r12
cmpq $0x11, %rax
movl $0x11, %ebx
cmovbq %rax, %rbx
cmovaeq %rbp, %r12
leaq 0x6993(%rip), %rsi      # 0x39165
movq %r15, %rdi
movq %rbx, %rdx
callq 0xfa60
movq %rbx, 0x10(%rsp)
movq %r15, 0x8(%rsp)
addq %r15, %rbx
leaq 0x30(%rsp), %rdi
callq 0xf560
movq %rax, %r15
movq %r14, %rbp
subq %rbx, %rbp
cmpq %rax, %rbp
movq %rax, %r14
cmovbq %rbp, %r14
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0xfa60
movq %r14, 0x28(%rsp)
addq %r14, %rbx
xorl %eax, %eax
subq %rbp, %r15
cmovaeq %r15, %rax
addq %r12, %rax
movq (%rsp), %r12
subq %rbx, %r12
movq %rax, %r14
subq %r12, %r14
addq $0x2, %r14
cmpq $0x2, %r12
movl $0x2, %ebp
cmovbq %r12, %rbp
cmovaeq %rax, %r14
leaq 0x6923(%rip), %rsi      # 0x39177
movq %rbx, %rdi
movq %rbp, %rdx
callq 0xfa60
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movzwl (%rax), %ecx
cmpl $0x2, %ecx
je 0x32875
cmpl $0xa, %ecx
jne 0x3287b
addq $0x2, %rax
jmp 0x32882
leaq 0x15dce(%rip), %rax     # 0x48650
movq (%rsp), %r8
movq 0x8(%rsp), %r9
movzwl (%rax), %eax
rolw $0x8, %ax
addq %rbp, %rbx
movzwl %ax, %ecx
xorl %edi, %edi
movq %rcx, %rsi
incq %rdi
movq %rsi, %rax
mulq %r13
shrq $0x3, %rdx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x3289d
movq %r8, %rax
subq %rbx, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %rbx, %rbp
cmpq %rdi, %rsi
jae 0x328f5
cmpq %r8, %rbp
jae 0x328f2
movq %rcx, %rax
mulq %r13
shrl $0x2, %edx
andl $-0x2, %edx
leal (%rdx,%rdx,4), %eax
movl %ecx, %edx
subl %eax, %edx
orb $0x30, %dl
movb %dl, (%rbp)
incq %rbp
jmp 0x328f5
incq %r14
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x328ca
cmpq %rbp, %rbx
jae 0x32950
movq 0x28(%rsp), %rcx
addq 0x10(%rsp), %rcx
cmpq $0x2, %r12
movl $0x2, %eax
cmovbq %r12, %rax
addq %rcx, %rax
addq %r9, %rax
incq %rax
movq %rbp, %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 0x32933
cmpq %r8, %rbp
jae 0x3295e
movb $0xa, (%rbp)
incq %rbp
jmp 0x32961
incq %r14
movq %r8, %rax
subq %rbp, %rax
movq %r14, %r13
subq %rax, %r13
addq $0x10, %r13
cmpq $0x10, %rax
movl $0x10, %r15d
cmovbq %rax, %r15
cmovaeq %r14, %r13
leaq 0x67f0(%rip), %rsi      # 0x3917a
movq %rbp, %rdi
movq %r15, %rdx
callq 0xfa60
addq %rbp, %r15
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
leaq 0x67e0(%rip), %r14      # 0x3918b
cmovneq %rax, %r14
movq %r14, %rdi
callq 0xf560
movq %rax, %r12
movq (%rsp), %rbp
subq %r15, %rbp
cmpq %rax, %rbp
movq %rax, %rbx
cmovbq %rbp, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xfa60
movq (%rsp), %rcx
addq %r15, %rbx
xorl %eax, %eax
subq %rbp, %r12
cmovaeq %r12, %rax
addq %r13, %rax
cmpq %rcx, %rbx
jae 0x329f9
movb $0xa, (%rbx)
incq %rbx
jmp 0x329fc
incq %rax
movq 0x20(%rsp), %rdx
cmpq %rcx, %rbx
jae 0x32a11
movb $0x0, (%rbx)
subq %rdx, %rbx
movq %rbx, %rcx
jmp 0x32a2d
cmpq %rdx, %rbx
jbe 0x32a2b
leaq -0x1(%rbx), %rcx
cmpb $0x0, -0x1(%rbx)
je 0x32a26
incq %rax
movb $0x0, (%rcx)
subq %rdx, %rcx
jmp 0x32a2d
xorl %ecx, %ecx
addq %rcx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq