// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movl $0x2, %eax
cmpq %rax, %rsi
movl $0x2, %r15d
cmovbq %rsi, %r15
movq %rdi, %r13
movl $0x2, %ebp
subq %r15, %rbp
xorl %ecx, %ecx
cmpq %rax, %rsi
leaq 0x68fa(%rip), %rsi      # 0x39177
cmovaeq %rcx, %rbp
movq %r15, %rdx
callq 0xfa60
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0xf560
leaq (%r12,%r13), %r8
subq %r15, %r12
cmpq %rax, %r12
movq %rax, %rdx
cmovbq %r12, %rdx
movq %rax, %rcx
subq %rdx, %rcx
cmpq %rax, %r12
movl $0x0, %eax
cmovaeq %rax, %rcx
movq %r13, 0x18(%rsp)
addq %r13, %r15
leaq (%r15,%rdx), %r13
addq %rbp, %rcx
movq %r8, %rax
subq %r13, %rax
cmpq $0x4, %rax
movl $0x4, %r12d
cmovbq %rax, %r12
movq %rcx, %rbp
subq %r12, %rbp
addq $0x4, %rbp
cmpq $0x4, %rax
cmovaeq %rcx, %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %r8, %r14
callq 0xfa60
movq %r13, %rdi
leaq 0x6875(%rip), %rsi      # 0x3917a
movq %r12, %rdx
callq 0xfa60
addq %r13, %r12
movl 0x138(%rbx), %edi
testl %edi, %edi
movq %r14, (%rsp)
je 0x3294b
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, %rbx
movq %rax, %rdi
callq 0xf560
jmp 0x329b4
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
cmpl $0xa, %eax
je 0x32983
cmpl $0x2, %eax
jne 0x33039
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 0x329a0
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, %rbx
movq %rax, %rdi
callq 0xf560
movq (%rsp), %r14
movq %r14, %rcx
subq %r12, %rcx
cmpq %rax, %rcx
movq %rax, %r15
cmovbq %rcx, %r15
movq %rax, %rdx
subq %r15, %rdx
xorl %r13d, %r13d
cmpq %rax, %rcx
cmovbq %rdx, %r13
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xfa60
addq %r12, %r15
movq %r14, %rax
subq %r15, %rax
cmpq $0x3, %rax
movl $0x3, %edx
cmovbq %rax, %rdx
movq %rdx, %rcx
xorq $0x3, %rcx
xorl %esi, %esi
cmpq $0x3, %rax
cmovbq %rcx, %rsi
addq %rbp, %r13
addq %rsi, %r13
movq %r14, %rax
leaq (%r15,%rdx), %r14
subq %r14, %rax
cmpq $0x10, %rax
movl $0x10, %ebx
cmovbq %rax, %rbx
movq %r13, %rbp
subq %rbx, %rbp
addq $0x10, %rbp
cmpq $0x10, %rax
leaq 0x6744(%rip), %rsi      # 0x3917f
leaq 0x6741(%rip), %r12      # 0x39183
cmovaeq %r13, %rbp
movq %r15, %rdi
movq %rdx, 0x10(%rsp)
callq 0xfa60
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xfa60
addq %rbx, %r14
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rcx
movabsq $-0x3333333333333333, %r13 # imm = 0xCCCCCCCCCCCCCCCD
cmpq $0xa, %rcx
je 0x32acf
cmpl $0x2, %ecx
jne 0x32b16
movq (%rsp), %r15
movq %r15, %rax
subq %r14, %rax
cmpq $0x7, %rax
movl $0x7, %r12d
cmovbq %rax, %r12
movq %r12, %rcx
xorq $0x7, %rcx
xorl %ebx, %ebx
cmpq $0x7, %rax
leaq 0x2aec(%rip), %rsi      # 0x3559e
cmovbq %rcx, %rbx
movq %r14, %rdi
movq %r12, %rdx
callq 0xfa60
movq %r15, %r8
addq %r14, %r12
addq %rbx, %rbp
jmp 0x32bbf
movq (%rsp), %rbx
movq %rbx, %rax
subq %r14, %rax
cmpq $0x8, %rax
movl $0x8, %r12d
cmovbq %rax, %r12
movq %rbp, %rcx
subq %r12, %rcx
addq $0x8, %rcx
cmpq $0x8, %rax
leaq 0x2aaa(%rip), %rsi      # 0x355a6
cmovbq %rcx, %rbp
movq %r14, %rdi
movq %r12, %rdx
callq 0xfa60
movq %rbx, %r8
addq %r14, %r12
jmp 0x32bbf
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 0x32b1f
movq %r8, %rax
subq %r14, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %r14, %r12
cmpq %rdi, %rsi
jae 0x32b78
cmpq %r8, %r12
jae 0x32b75
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 0x32b78
incq %rbp
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x32b4c
cmpq %r12, %r14
jae 0x32bbf
addq 0x10(%rsp), %rbx
leaq (%r15,%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 0x32ba2
cmpq %r8, %r12
jae 0x32bce
movb $0xa, (%r12)
incq %r12
jmp 0x32bd1
incq %rbp
movq %r8, %rax
subq %r12, %rax
cmpq $0x10, %rax
movl $0x10, %ebx
cmovbq %rax, %rbx
movq %rbp, %r14
subq %rbx, %r14
addq $0x10, %r14
cmpq $0x10, %rax
leaq 0x659b(%rip), %rsi      # 0x39194
cmovaeq %rbp, %r14
movq %r12, %rdi
movq %rbx, %rdx
callq 0xfa60
leaq (%r12,%rbx), %rbp
movq 0x8(%rsp), %rax
movslq 0x8(%rax), %rcx
cmpq $0x2, %rcx
je 0x32c53
cmpl $0x1, %ecx
jne 0x32cd2
movq (%rsp), %rbx
movq %rbx, %rax
subq %rbp, %rax
cmpq $0xb, %rax
movl $0xb, %r15d
cmovbq %rax, %r15
movq %r14, %rcx
subq %r15, %rcx
addq $0xb, %rcx
cmpq $0xb, %rax
leaq 0x2966(%rip), %rsi      # 0x355b7
jmp 0x32c80
movq (%rsp), %rbx
movq %rbx, %rax
subq %rbp, %rax
cmpq $0xa, %rax
movl $0xa, %r15d
cmovbq %rax, %r15
movq %r14, %rcx
subq %r15, %rcx
addq $0xa, %rcx
cmpq $0xa, %rax
leaq 0x2952(%rip), %rsi      # 0x355d2
cmovbq %rcx, %r14
movq %rbp, %rdi
movq %r15, %rdx
callq 0xfa60
movq %rbx, %r8
addq %rbp, %r15
cmpq %r8, %r15
jae 0x32ca3
movb $0xa, (%r15)
incq %r15
jmp 0x32ca6
incq %r14
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movzwl (%rsi), %edi
cmpl $0x2, %edi
je 0x32cc9
cmpl $0xa, %edi
jne 0x32d7e
addq $0x8, %rsi
jmp 0x32d80
addq $0x4, %rsi
jmp 0x32d80
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 0x32cdb
movq %r8, %rax
subq %rbp, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %rbp, %r15
cmpq %rdi, %rsi
jae 0x32d33
cmpq %r8, %r15
jae 0x32d30
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 0x32d33
incq %r14
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x32d08
cmpq %r15, %rbp
jae 0x32c95
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 0x32d5c
jmp 0x32c95
xorl %esi, %esi
movq %r8, %rax
subq %r15, %rax
cmpq $0x11, %rax
movl $0x11, %ebp
cmovbq %rax, %rbp
movq %r14, %r12
subq %rbp, %r12
addq $0x11, %r12
cmpq $0x11, %rax
cmovaeq %r14, %r12
leaq 0x30(%rsp), %rdx
movl $0x2f, %ecx
movq %r8, %rbx
callq 0xfda0
movq %r15, %rdi
leaq 0x63e4(%rip), %rsi      # 0x391a5
movq %rbp, %rdx
callq 0xfa60
movq %rbp, 0x10(%rsp)
leaq (%r15,%rbp), %r14
leaq 0x30(%rsp), %rdi
callq 0xf560
movq %rbx, %rcx
subq %r14, %rcx
cmpq %rax, %rcx
movq %rax, %rdx
cmovbq %rcx, %rdx
movq %rax, %rdi
subq %rdx, %rdi
xorl %esi, %esi
cmpq %rax, %rcx
cmovbq %rdi, %rsi
leaq (%r14,%rdx), %rbp
addq %r12, %rsi
movq %rbx, %rax
subq %rbp, %rax
cmpq $0x2, %rax
movl $0x2, %ebx
cmovbq %rax, %rbx
movq %rsi, %r12
subq %rbx, %r12
addq $0x2, %r12
movq %rax, 0x20(%rsp)
cmpq $0x2, %rax
cmovaeq %rsi, %r12
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %rdx, 0x28(%rsp)
callq 0xfa60
movq %rbp, %rdi
leaq 0x636f(%rip), %rsi      # 0x391b7
movq %rbx, %rdx
callq 0xfa60
movq 0x8(%rsp), %r14
movq 0x18(%r14), %rax
movzwl (%rax), %ecx
cmpl $0x2, %ecx
je 0x32e66
cmpl $0xa, %ecx
jne 0x32e6c
addq $0x2, %rax
jmp 0x32e73
leaq 0x157dd(%rip), %rax     # 0x48650
movq (%rsp), %r8
movzwl (%rax), %eax
rolw $0x8, %ax
addq %rbx, %rbp
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 0x32e89
movq %r8, %rax
subq %rbp, %rax
xorl %esi, %esi
subq %rax, %rdi
cmovaeq %rdi, %rsi
movl $0x1, %edi
movq %rbp, %rbx
cmpq %rdi, %rsi
jae 0x32ee0
cmpq %r8, %rbx
jae 0x32edd
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, (%rbx)
incq %rbx
jmp 0x32ee0
incq %r12
movq %rcx, %rax
mulq %r13
shrq $0x3, %rdx
incq %rdi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x32eb6
cmpq %rbx, %rbp
jae 0x32f40
movq 0x28(%rsp), %rcx
addq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rdx
cmpq $0x2, %rdx
movl $0x2, %eax
cmovbq %rdx, %rax
addq %rcx, %rax
addq %r15, %rax
incq %rax
movq %rbx, %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 0x32f23
cmpq %r8, %rbx
jae 0x32f4d
movb $0xa, (%rbx)
incq %rbx
jmp 0x32f50
incq %r12
movq %r8, %rax
subq %rbx, %rax
cmpq $0x10, %rax
movl $0x10, %r15d
cmovbq %rax, %r15
movq %r12, %r13
subq %r15, %r13
addq $0x10, %r13
cmpq $0x10, %rax
leaq 0x6241(%rip), %rsi      # 0x391ba
cmovaeq %r12, %r13
movq %rbx, %rdi
movq %r15, %rdx
callq 0xfa60
addq %rbx, %r15
movq 0x20(%r14), %rax
testq %rax, %rax
leaq 0x6232(%rip), %r12      # 0x391cb
cmovneq %rax, %r12
movq %r12, %rdi
callq 0xf560
movq (%rsp), %rcx
subq %r15, %rcx
cmpq %rax, %rcx
movq %rax, %r14
cmovbq %rcx, %r14
movq %rax, %rdx
subq %r14, %rdx
xorl %ebx, %ebx
cmpq %rax, %rcx
cmovbq %rdx, %rbx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xfa60
movq (%rsp), %rax
addq %r15, %r14
addq %r13, %rbx
cmpq %rax, %r14
jae 0x32feb
movb $0xa, (%r14)
incq %r14
jmp 0x32fee
incq %rbx
movq 0x18(%rsp), %rcx
cmpq %rax, %r14
jae 0x33004
movb $0x0, (%r14)
subq %rcx, %r14
movq %r14, %rax
jmp 0x33021
cmpq %rcx, %r14
jbe 0x3301f
leaq -0x1(%r14), %rax
cmpb $0x0, -0x1(%r14)
je 0x3301a
incq %rbx
movb $0x0, (%rax)
subq %rcx, %rax
jmp 0x33021
xorl %eax, %eax
addq %rax, %rbx
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
xorl %ebx, %ebx
movq (%rsp), %r14
cmpq %r12, %r14
sete %r13b
setne %bl
leaq 0x39a2(%rip), %rsi      # 0x369f5
movq %r12, %rdi
movq %rbx, %rdx
callq 0xfa60
addq %rbx, %r12
movq %r12, %r15
jmp 0x329e5