// File: /workspace/github_c_makefile_star2_O1/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_root
struct dns_hints *dns_hints_root(struct dns_resolv_conf *resconf, int *error_) {
	static const struct {
		int af;
		char addr[INET6_ADDRSTRLEN];
	} root_hints[] = {
		{ AF_INET,	"198.41.0.4"		},	/* A.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:503:ba3e::2:30"	},	/* A.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.228.79.201"	},	/* B.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:84::b"	},	/* B.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.33.4.12"		},	/* C.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:2::c"		},	/* C.ROOT-SERVERS.NET. */
		{ AF_INET,	"199.7.91.13"		},	/* D.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:2d::d"	},	/* D.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.203.230.10"	},	/* E.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.5.5.241"		},	/* F.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:2f::f"	},	/* F.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.112.36.4"		},	/* G.ROOT-SERVERS.NET. */
		{ AF_INET,	"128.63.2.53"		},	/* H.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:1::803f:235"	},	/* H.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.36.148.17"		},	/* I.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:7FE::53"		},	/* I.ROOT-SERVERS.NET. */
		{ AF_INET,	"192.58.128.30"		},	/* J.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:503:c27::2:30"	},	/* J.ROOT-SERVERS.NET. */
		{ AF_INET,	"193.0.14.129"		},	/* K.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:7FD::1"		},	/* K.ROOT-SERVERS.NET. */
		{ AF_INET,	"199.7.83.42"		},	/* L.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:500:3::42"	},	/* L.ROOT-SERVERS.NET. */
		{ AF_INET,	"202.12.27.33"		},	/* M.ROOT-SERVERS.NET. */
		{ AF_INET6,	"2001:DC3::35"		},	/* M.ROOT-SERVERS.NET. */
	};
	struct dns_hints *hints		= 0;
	struct sockaddr_storage ss;
	unsigned i;
	int error, af;

	if (!(hints = dns_hints_open(resconf, &error)))
		goto error;

	for (i = 0; i < lengthof(root_hints); i++) {
		af	= root_hints[i].af;

		if ((error = dns_pton(af, root_hints[i].addr, dns_sa_addr(af, &ss, NULL))))
			goto error;

		*dns_sa_port(af, &ss)	= htons(53);
		ss.ss_family		= af;

		if ((error = dns_hints_insert(hints, ".", (struct sockaddr *)&ss, 1)))
			goto error;
	}

	return hints;
error:
	*error_	= error;

	dns_hints_close(hints);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
leaq 0xc(%rsp), %rsi
callq 0xf030
movq %rax, %rbx
testq %rax, %rax
je 0x2d6aa
movq %r14, 0x10(%rsp)
xorl %r14d, %r14d
leaq 0x9d76(%rip), %r13      # 0x37390
leaq 0xb932(%rip), %r15      # 0x38f53
leaq 0x18(%rsp), %r12
movl (%r14,%r13), %ebp
cmpl $0x2, %ebp
je 0x2d63b
cmpl $0xa, %ebp
jne 0x2d642
leaq 0x20(%rsp), %rdx
jmp 0x2d644
leaq 0x1c(%rsp), %rdx
jmp 0x2d644
xorl %edx, %edx
leaq (%r14,%r13), %rsi
addq $0x4, %rsi
movl %ebp, %edi
callq 0x2bd82
testl %eax, %eax
jne 0x2d6a1
cmpl $0x2, %ebp
je 0x2d668
leaq 0x1afed(%rip), %rax     # 0x48650
cmpl $0xa, %ebp
jne 0x2d66d
leaq 0x1a(%rsp), %rax
movw $0x3500, (%rax)         # imm = 0x3500
movw %bp, 0x18(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0xf930
testl %eax, %eax
jne 0x2d6a1
addq $0x34, %r14
cmpq $0x4e0, %r14            # imm = 0x4E0
jne 0x2d626
movl %eax, 0xc(%rsp)
jmp 0x2d6bb
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %r14
movl 0xc(%rsp), %eax
movl %eax, (%r14)
movq %rbx, %rdi
callq 0xfba0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq