LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_nssconf_keyword
static enum dns_nssconf_keyword dns_nssconf_keyword(const char *word) {
	static const char *list[] = {
		[DNS_NSSCONF_HOSTS]    = "hosts",
		[DNS_NSSCONF_SUCCESS]  = "success",
		[DNS_NSSCONF_NOTFOUND] = "notfound",
		[DNS_NSSCONF_UNAVAIL]  = "unavail",
		[DNS_NSSCONF_TRYAGAIN] = "tryagain",
		[DNS_NSSCONF_CONTINUE] = "continue",
		[DNS_NSSCONF_RETURN]   = "return",
		[DNS_NSSCONF_FILES]    = "files",
		[DNS_NSSCONF_DNS]      = "dns",
		[DNS_NSSCONF_MDNS]     = "mdns",
	};
	unsigned i;

	for (i = 1; i < lengthof(list); i++) {
		if (list[i] && 0 == strcasecmp(list[i], word))
			return i;
	}

	return DNS_NSSCONF_INVALID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0xb, %rax
jae 0x3b255
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x222d8(%rip), %rax     # 0x5d4f0
cmpq $0x0, (%rax,%rcx,8)
je 0x3b248
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x222c5(%rip), %rax     # 0x5d4f0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
callq 0xff50
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3b248
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b25c
jmp 0x3b24a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3b203
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_anyconf_pop
static void dns_anyconf_pop(struct dns_anyconf *cf) {
	if (cf->count > 0) {
		--cf->count;
		cf->tp = cf->cp = cf->token[cf->count];
		cf->token[cf->count] = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jbe 0x3b2d6
movq -0x8(%rbp), %rax
movl 0x80(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x80(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x80(%rcx), %ecx
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x490(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x488(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x80(%rcx), %ecx
movq $0x0, (%rax,%rcx,8)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_anyconf_peek
static int dns_anyconf_peek(FILE *fp) {
	int ch;
	ch = getc(fp);
	ungetc(ch, fp);
	return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf3a0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0xf1c0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_nssconf_k2c
static int dns_nssconf_k2c(int k) {
	static const char map[DNS_NSSCONF_LAST] = {
		[DNS_NSSCONF_SUCCESS]  = 'S',
		[DNS_NSSCONF_NOTFOUND] = 'N',
		[DNS_NSSCONF_UNAVAIL]  = 'U',
		[DNS_NSSCONF_TRYAGAIN] = 'T',
		[DNS_NSSCONF_CONTINUE] = 'C',
		[DNS_NSSCONF_RETURN]   = 'R',
		[DNS_NSSCONF_FILES]    = 'f',
		[DNS_NSSCONF_DNS]      = 'b',
		[DNS_NSSCONF_MDNS]     = 'm',
	};

	return (k >= 0 && k < (int)lengthof(map))? (map[k]? map[k] : '?') : '?';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3b35d
cmpl $0xb, -0x4(%rbp)
jge 0x3b35d
movslq -0x4(%rbp), %rcx
leaq 0x11982(%rip), %rax     # 0x4ccb0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x3b34b
movslq -0x4(%rbp), %rcx
leaq 0x1196e(%rip), %rax     # 0x4ccb0
movsbl (%rax,%rcx), %eax
movl %eax, -0x8(%rbp)
jmp 0x3b355
movl $0x3f, %eax
movl %eax, -0x8(%rbp)
jmp 0x3b355
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3b367
movl $0x3f, %eax
movl %eax, -0xc(%rbp)
jmp 0x3b367
movl -0xc(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_nssconf_dump
int dns_nssconf_dump(struct dns_resolv_conf *resconf, FILE *fp) {
	struct dns_nssconf_source src;
	dns_nssconf_i i = 0;

	fputs("hosts:", fp);

	while (dns_nssconf_next(&src, resconf, &i)) {
		unsigned n = 0;

		fprintf(fp, " %s", dns_nssconf_k2s(src.source));

		dns_nssconf_dump_status(DNS_NSSCONF_SUCCESS, src.success, &n, fp);
		dns_nssconf_dump_status(DNS_NSSCONF_NOTFOUND, src.notfound, &n, fp);
		dns_nssconf_dump_status(DNS_NSSCONF_UNAVAIL, src.unavail, &n, fp);
		dns_nssconf_dump_status(DNS_NSSCONF_TRYAGAIN, src.tryagain, &n, fp);

		if (n)
			fputc(']', fp);
	}

	fputc('\n', fp);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x121eb(%rip), %rdi     # 0x4d57d
callq 0xffb0
movq -0x8(%rbp), %rsi
leaq -0x24(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x3b460
testb $0x1, %al
jne 0x3b3b1
jmp 0x3b44a
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %edi
callq 0x3b5f0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0xdd4a(%rip), %rsi      # 0x49120
movb $0x0, %al
callq 0x10440
movl -0x20(%rbp), %esi
movq -0x10(%rbp), %rcx
movl $0x2, %edi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rcx
movl $0x3, %edi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rcx
movl $0x4, %edi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rcx
movl $0x5, %edi
leaq -0x2c(%rbp), %rdx
callq 0x3b660
cmpl $0x0, -0x2c(%rbp)
je 0x3b445
movq -0x10(%rbp), %rsi
movl $0x5d, %edi
callq 0x10140
jmp 0x3b397
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x10140
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_nssconf_k2s
static const char *dns_nssconf_k2s(int k) {
	static const char *const map[DNS_NSSCONF_LAST] = {
		[DNS_NSSCONF_SUCCESS]  = "SUCCESS",
		[DNS_NSSCONF_NOTFOUND] = "NOTFOUND",
		[DNS_NSSCONF_UNAVAIL]  = "UNAVAIL",
		[DNS_NSSCONF_TRYAGAIN] = "TRYAGAIN",
		[DNS_NSSCONF_CONTINUE] = "continue",
		[DNS_NSSCONF_RETURN]   = "return",
		[DNS_NSSCONF_FILES]    = "files",
		[DNS_NSSCONF_DNS]      = "dns",
		[DNS_NSSCONF_MDNS]     = "mdns",
	};

	return (k >= 0 && k < (int)lengthof(map))? (map[k]? map[k] : "") : "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3b641
cmpl $0xb, -0x4(%rbp)
jge 0x3b641
movslq -0x4(%rbp), %rcx
leaq 0x206e2(%rip), %rax     # 0x5bcf0
cmpq $0x0, (%rax,%rcx,8)
je 0x3b62a
movslq -0x4(%rbp), %rcx
leaq 0x206d0(%rip), %rax     # 0x5bcf0
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0x3b637
leaq 0x11f3a(%rip), %rax     # 0x4d56b
movq %rax, -0x10(%rbp)
jmp 0x3b637
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x3b64e
leaq 0x11f23(%rip), %rax     # 0x4d56b
movq %rax, -0x18(%rbp)
jmp 0x3b64e
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_nssconf_dump_status
static int dns_nssconf_dump_status(int status, int action, unsigned *count, FILE *fp) {
	switch (status) {
	case DNS_NSSCONF_SUCCESS:
		if (action == DNS_NSSCONF_RETURN)
			return 0;
		break;
	default:
		if (action == DNS_NSSCONF_CONTINUE)
			return 0;
		break;
	}

	fputc(' ', fp);

	if (!*count)
		fputc('[', fp);

	fprintf(fp, "%s=%s", dns_nssconf_k2s(status), dns_nssconf_k2s(action));

	++*count;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x8(%rbp), %eax
subl $0x2, %eax
jne 0x3b691
jmp 0x3b680
cmpl $0x7, -0xc(%rbp)
jne 0x3b68f
movl $0x0, -0x4(%rbp)
jmp 0x3b70e
jmp 0x3b6a2
cmpl $0x6, -0xc(%rbp)
jne 0x3b6a0
movl $0x0, -0x4(%rbp)
jmp 0x3b70e
jmp 0x3b6a2
movq -0x20(%rbp), %rsi
movl $0x20, %edi
callq 0x10140
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3b6c7
movq -0x20(%rbp), %rsi
movl $0x5b, %edi
callq 0x10140
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x8(%rbp), %edi
callq 0x3b5f0
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %edi
callq 0x3b5f0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
leaq 0x12282(%rip), %rsi     # 0x4d977
movb $0x0, %al
callq 0x10440
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_d_ndots
static size_t dns_d_ndots(const void *_src, size_t len) {
	const unsigned char *p = _src, *pe = p + len;
	size_t ndots = 0;

	while ((p = memchr(p, '.', pe - p))) {
		ndots++;
		p++;
	}

	return ndots;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x2e, %esi
callq 0xffa0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3bb79
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3bb3c
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_open
struct dns_hints *dns_hints_open(struct dns_resolv_conf *resconf, int *error) {
	static const struct dns_hints H_initializer;
	struct dns_hints *H;

	(void)resconf;

	if (!(H = malloc(sizeof *H)))
		goto syerr;

	*H	= H_initializer;

	dns_hints_acquire(H);

	return H;
syerr:
	*error	= dns_syerr();

	free(H);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x10, %edi
callq 0x10260
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3c046
jmp 0x3c072
movq -0x20(%rbp), %rax
movq 0xe96f(%rip), %rcx      # 0x4a9c0
movq %rcx, (%rax)
movq 0xe96d(%rip), %rcx      # 0x4a9c8
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0xf7b0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3c090
callq 0xf0a0
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x10060
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_close
void dns_hints_close(struct dns_hints *H) {
	struct dns_hints_soa *soa, *nxt;

	if (!H || 1 != dns_hints_release(H))
		return /* void */;

	for (soa = H->head; soa; soa = nxt) {
		nxt	= soa->next;

		free(soa);
	}

	free(H);

	return /* void */;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3c0e9
movq -0x8(%rbp), %rdi
callq 0xf2b0
movq %rax, %rcx
movl $0x1, %eax
cmpq %rcx, %rax
je 0x3c0eb
jmp 0x3c129
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3c120
movq -0x10(%rbp), %rax
movq 0x988(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10060
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x3c0f7
movq -0x8(%rbp), %rdi
callq 0x10060
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_local
struct dns_hints *dns_hints_local(struct dns_resolv_conf *resconf, int *error_) {
	struct dns_hints *hints		= 0;
	int error;

	if (resconf)
		dns_resconf_acquire(resconf);
	else if (!(resconf = dns_resconf_local(&error)))
		goto error;

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

	error	= 0;

	if (0 == dns_hints_insert_resconf(hints, ".", resconf, &error) && error)
		goto error;

	dns_resconf_close(resconf);

	return hints;
error:
	*error_	= error;

	dns_resconf_close(resconf);
	dns_hints_close(hints);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3c1aa
movq -0x10(%rbp), %rdi
callq 0xfb90
jmp 0x3c1c1
leaq -0x24(%rbp), %rdi
callq 0xf310
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x3c1bf
jmp 0x3c21c
jmp 0x3c1c1
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0xf030
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3c1da
jmp 0x3c21c
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x11283(%rip), %rsi     # 0x4d473
leaq -0x24(%rbp), %rcx
callq 0xf900
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c209
cmpl $0x0, -0x24(%rbp)
je 0x3c209
jmp 0x3c21c
movq -0x10(%rbp), %rdi
callq 0xfff0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3c23f
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0xfff0
movq -0x20(%rbp), %rdi
callq 0xfc90
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_insert
int dns_hints_insert(struct dns_hints *H, const char *zone, const struct sockaddr *sa, unsigned priority) {
	static const struct dns_hints_soa soa_initializer;
	struct dns_hints_soa *soa;
	unsigned i;

	if (!(soa = dns_hints_fetch(H, zone))) {
		if (!(soa = malloc(sizeof *soa)))
			return dns_syerr();
		*soa = soa_initializer;
		dns_strlcpy((char *)soa->zone, zone, sizeof soa->zone);

		soa->next = H->head;
		H->head = soa;
	}

	i = soa->count % lengthof(soa->addrs);

	memcpy(&soa->addrs[i].ss, sa, dns_sa_len(sa));

	soa->addrs[i].priority = DNS_PP_MAX(1, priority);

	if (soa->count < lengthof(soa->addrs))
		soa->count++;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3c670
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x3c5a7
movl $0x990, %edi            # imm = 0x990
callq 0x10260
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x3c561
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3c65b
movq -0x30(%rbp), %rdi
leaq 0xe944(%rip), %rsi      # 0x4aeb0
movl $0x990, %edx            # imm = 0x990
callq 0xfb40
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0xf520
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x988(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movl 0x980(%rax), %eax
andq $0xf, %rax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movl -0x34(%rbp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movzwl (%rax), %edi
callq 0x3c6e0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0xfb40
movl $0x1, %eax
cmpl -0x24(%rbp), %eax
jbe 0x3c60b
movl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3c611
movl -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x30(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movl -0x34(%rbp), %edx
imulq $0x88, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movq -0x30(%rbp), %rax
movl 0x980(%rax), %eax
cmpq $0x10, %rax
jae 0x3c654
movq -0x30(%rbp), %rax
movl 0x980(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x980(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_fetch
static struct dns_hints_soa *dns_hints_fetch(struct dns_hints *H, const char *zone) {
	struct dns_hints_soa *soa;

	for (soa = H->head; soa; soa = soa->next) {
		if (0 == strcasecmp(zone, (char *)soa->zone))
			return soa;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3c6c5
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xff50
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c6b2
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3c6cd
jmp 0x3c6b4
movq -0x20(%rbp), %rax
movq 0x988(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3c68c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_isinaddr_any
static _Bool dns_hints_isinaddr_any(const void *sa) {
	struct in_addr *addr;

	if (dns_sa_family(sa) != AF_INET)
		return 0;

	addr = dns_sa_addr(AF_INET, sa, NULL);
	return addr->s_addr == htonl(INADDR_ANY);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
je 0x3c71e
movb $0x0, -0x1(%rbp)
jmp 0x3c753
movq -0x10(%rbp), %rsi
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x3a110
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
xorl %edi, %edi
callq 0xfa60
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_grep
unsigned dns_hints_grep(struct sockaddr **sa, socklen_t *sa_len, unsigned lim, struct dns_hints_i *i, struct dns_hints *H) {
	struct dns_hints_soa *soa;
	unsigned n;

	if (!(soa = dns_hints_fetch(H, i->zone)))
		return 0;

	n	= 0;

	while (i->state.next < soa->count && n < lim) {
		*sa	= (struct sockaddr *)&soa->addrs[i->state.next].ss;
		*sa_len	= dns_sa_len(*sa);

		sa++;
		sa_len++;
		n++;

		i->state.next	= dns_hints_i_skip(i->state.next, i, soa);
	}

	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x3c670
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x3c7a1
movl $0x0, -0x4(%rbp)
jmp 0x3c858
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x38(%rbp), %rdx
xorl %eax, %eax
cmpl 0x980(%rdx), %ecx
movb %al, -0x3d(%rbp)
jae 0x3c7cc
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setb %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x3c7d5
jmp 0x3c852
movq -0x38(%rbp), %rcx
addq $0x100, %rcx            # imm = 0x100
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
imulq $0x88, %rax, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzwl (%rax), %edi
callq 0x3c6e0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x3c870
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x3c7a8
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_i_skip
static unsigned dns_hints_i_skip(unsigned p0, struct dns_hints_i *i, struct dns_hints_soa *soa) {
	unsigned pZ, p;

	for (pZ = 0; pZ < soa->count; pZ++) {
		if (dns_hints_i_cmp(pZ, p0, i, soa) > 0)
			goto cont;
	}

	return soa->count;
cont:
	for (p = pZ + 1; p < soa->count; p++) {
		if (dns_hints_i_cmp(p, p0, i, soa) <= 0)
			continue;

		if (dns_hints_i_cmp(p, pZ, i, soa) >= 0)
			continue;

		pZ	= p;
	}


	return pZ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x980(%rcx), %eax
jae 0x3c8c0
movl -0x1c(%rbp), %edi
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x43bb0
cmpl $0x0, %eax
jle 0x3c8b3
jmp 0x3c8cf
jmp 0x3c8b5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3c88a
movq -0x18(%rbp), %rax
movl 0x980(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3c932
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x980(%rcx), %eax
jae 0x3c92c
movl -0x20(%rbp), %edi
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x43bb0
cmpl $0x0, %eax
jg 0x3c901
jmp 0x3c921
movl -0x20(%rbp), %edi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x43bb0
cmpl $0x0, %eax
jl 0x3c91b
jmp 0x3c921
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c8d8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_i_init
static struct dns_hints_i *dns_hints_i_init(struct dns_hints_i *i, struct dns_hints *hints) {
	static const struct dns_hints_i i_initializer;
	struct dns_hints_soa *soa;

	i->state	= i_initializer.state;

	do {
		i->state.seed	= dns_random();
	} while (0 == i->state.seed);

	if ((soa = dns_hints_fetch(hints, i->zone))) {
		i->state.next	= dns_hints_i_start(i, soa);
	}

	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x1025d(%rip), %rcx     # 0x4cea8
movq %rcx, 0x8(%rax)
callq 0x10700
callq *(%rax)
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl 0xc(%rcx), %eax
je 0x3cc4f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x3c670
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3cc9a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43c60
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_dump
int dns_hints_dump(struct dns_hints *hints, FILE *fp) {
	struct dns_hints_soa *soa;
	char addr[INET6_ADDRSTRLEN];
	unsigned i;
	int af, error;

	for (soa = hints->head; soa; soa = soa->next) {
		fprintf(fp, "ZONE \"%s\"\n", soa->zone);

		for (i = 0; i < soa->count; i++) {
			af = soa->addrs[i].ss.ss_family;

			if ((error = dns_ntop(af, dns_sa_addr(af, &soa->addrs[i].ss, NULL), addr, sizeof addr)))
				return error;

			fprintf(fp, "\t(%d) [%s]:%hu\n", (int)soa->addrs[i].priority, addr, ntohs(*dns_sa_port(af, &soa->addrs[i].ss)));
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3ce11
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x1094d(%rip), %rsi     # 0x4d636
movb $0x0, %al
callq 0x10440
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x980(%rcx), %eax
jae 0x3cdfb
movq -0x20(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movl -0x54(%rbp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x58(%rbp), %edi
movq -0x20(%rbp), %rsi
addq $0x100, %rsi            # imm = 0x100
movl -0x54(%rbp), %eax
imulq $0x88, %rax, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3a110
movl -0x60(%rbp), %edi
movq %rax, %rsi
leaq -0x50(%rbp), %rdx
movl $0x2e, %ecx
callq 0x3ce30
movl %eax, -0x5c(%rbp)
cmpl $0x0, %eax
je 0x3cd78
movl -0x5c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3ce18
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movl -0x54(%rbp), %ecx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl 0x80(%rax), %eax
movl %eax, -0x6c(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x58(%rbp), %edi
movq -0x20(%rbp), %rsi
addq $0x100, %rsi            # imm = 0x100
movl -0x54(%rbp), %eax
imulq $0x88, %rax, %rax
addq %rax, %rsi
callq 0x3a1b0
movzwl (%rax), %edi
callq 0x10a80
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %edx
movq -0x68(%rbp), %rcx
movzwl %ax, %r8d
leaq 0x1085b(%rip), %rsi     # 0x4d641
movb $0x0, %al
callq 0x10440
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3ccf7
jmp 0x3cdfd
movq -0x20(%rbp), %rax
movq 0x988(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3cccf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_open
struct dns_socket *dns_so_open(const struct sockaddr *local, int type, const struct dns_options *opts, int *error) {
	struct dns_socket *so;

	if (!(so = malloc(sizeof *so)))
		goto syerr;

	if (!dns_so_init(so, local, type, opts, error))
		goto error;

	return so;
syerr:
	*error	= dns_syerr();
error:
	dns_so_close(so);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x300, %edi            # imm = 0x300
callq 0x10260
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x3cfed
jmp 0x3d017
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x3d040
cmpq $0x0, %rax
jne 0x3d00d
jmp 0x3d024
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d035
callq 0xf0a0
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
callq 0xf720
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_init
static struct dns_socket *dns_so_init(struct dns_socket *so, const struct sockaddr *local, int type, const struct dns_options *opts, int *error) {
	static const struct dns_socket so_initializer = { .opts = DNS_OPTS_INITIALIZER, .udp = -1, .tcp = -1, };

	*so		= so_initializer;
	so->type	= type;

	if (opts)
		so->opts = *opts;

	if (local)
		memcpy(&so->local, local, dns_sa_len(local));

	if (-1 == (so->udp = dns_socket((struct sockaddr *)&so->local, SOCK_DGRAM, error)))
		goto error;

	dns_k_permutor_init(&so->qids, 1, 65535);

	return so;
error:
	dns_so_destroy(so);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xfe4a(%rip), %rsi      # 0x4ceb0
movl $0x300, %edx            # imm = 0x300
callq 0xfb40
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3d09f
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3d0d6
movq -0x10(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %edi
callq 0x3c6e0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0xfb40
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movq -0x30(%rbp), %rdx
movl $0x2, %esi
callq 0x3dc90
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3d100
jmp 0x3d124
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movl $0x1, %esi
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x43cd0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d135
movq -0x10(%rbp), %rdi
callq 0x3d170
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_close
void dns_so_close(struct dns_socket *so) {
	if (!so)
		return;

	dns_so_destroy(so);

	free(so);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3d155
jmp 0x3d167
movq -0x8(%rbp), %rdi
callq 0x3d170
movq -0x8(%rbp), %rdi
callq 0x10060
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_k_permutor_step
static unsigned dns_k_permutor_step(struct dns_k_permutor *p) {
	unsigned n;

	do {
		n	= dns_k_permutor_E(p, p->stepi++);
	} while (n >= p->length);

	return n + (p->limit + 1 - p->length);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
movl %esi, %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
callq 0x43e30
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x3d21c
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
subl 0x4(%rdx), %ecx
addl %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_newanswer
static int dns_so_newanswer(struct dns_socket *so, size_t len) {
	size_t size	= offsetof(struct dns_packet, data) + DNS_PP_MAX(len, DNS_SO_MINBUF);
	void *p;

	if (!(p = realloc(so->answer, size)))
		return dns_syerr();

	so->answer	= dns_p_init(p, size);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x300, -0x18(%rbp)     # imm = 0x300
jbe 0x3d4a4
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x3d4af
movl $0x300, %eax            # imm = 0x300
movq %rax, -0x30(%rbp)
jmp 0x3d4af
movq -0x30(%rbp), %rax
addq $0x5c, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x107d0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x3d4e5
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d507
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10c30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2e8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_verify
static int dns_so_verify(struct dns_socket *so, struct dns_packet *P) {
	char qname[DNS_D_MAXNAME + 1];
	size_t qlen;
	struct dns_rr rr;
	int error = -1;

	if (so->qid != dns_header(so->answer)->qid)
		goto reject;

	if (!dns_p_count(so->answer, DNS_S_QD))
		goto reject;

	if (0 != dns_rr_parse(&rr, 12, so->answer))
		goto reject;

	if (rr.type != so->qtype || rr.class != so->qclass)
		goto reject;

	if (!(qlen = dns_d_expand(qname, sizeof qname, rr.dn.p, P, &error)))
		goto error;
	else if (qlen >= sizeof qname || qlen != so->qlen)
		goto reject;

	if (0 != strcasecmp(so->qname, qname))
		goto reject;

	return 0;
reject:
	error = DNS_EUNKNOWN;
error:
	DNS_SHOW(P, "rejecting packet (%s)", dns_strerror(error));

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xffffffff, -0x144(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movzwl 0x1b4(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x2e8(%rcx), %rcx
movq 0x5c(%rcx), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
je 0x3d9a7
jmp 0x3da9c
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rdi
movl $0x1, %esi
callq 0x10950
cmpl $0x0, %eax
jne 0x3d9c6
jmp 0x3da9c
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rdx
leaq -0x140(%rbp), %rdi
movl $0xc, %esi
callq 0xf790
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3d9ef
jmp 0x3da9c
movl -0x138(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c0(%rcx), %eax
jne 0x3da13
movl -0x134(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c4(%rcx), %eax
je 0x3da18
jmp 0x3da9c
leaq -0x120(%rbp), %rdi
movw -0x13c(%rbp), %ax
movq -0x18(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
leaq -0x144(%rbp), %r8
movzwl %ax, %edx
callq 0xffd0
movq %rax, -0x128(%rbp)
cmpq $0x0, %rax
jne 0x3da4d
jmp 0x3daa6
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jae 0x3da6e
movq -0x128(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x2b8(%rcx), %rax
je 0x3da70
jmp 0x3da9c
jmp 0x3da72
movq -0x10(%rbp), %rdi
addq $0x1b6, %rdi            # imm = 0x1B6
leaq -0x120(%rbp), %rsi
callq 0xff50
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3da93
jmp 0x3da9c
movl $0x0, -0x4(%rbp)
jmp 0x3daaf
movl $0x9b918cc4, -0x144(%rbp) # imm = 0x9B918CC4
movl -0x144(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_tcp_keep
static _Bool dns_so_tcp_keep(struct dns_socket *so) {
	struct sockaddr_storage remote;

	if (so->tcp == -1)
		return 0;

	if (0 != getpeername(so->tcp, (struct sockaddr *)&remote, &(socklen_t){ sizeof remote }))
		return 0;

	return 0 == dns_sa_cmp(&remote, &so->remote);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x1c(%rax)
jne 0x3dadf
movb $0x0, -0x1(%rbp)
jmp 0x3db44
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
leaq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x80, -0x9c(%rbp)
movq -0x98(%rbp), %rsi
leaq -0x9c(%rbp), %rdx
callq 0xfa00
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3db1f
movb $0x0, -0x1(%rbp)
jmp 0x3db44
movq -0x10(%rbp), %rsi
addq $0xb8, %rsi
leaq -0x90(%rbp), %rdi
callq 0x44050
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_closefd
static int dns_so_closefd(struct dns_socket *so, int *fd) {
	int error;

	if (*fd == -1)
		return 0;

	if (so->opts.closefd.cb) {
		if ((error = so->opts.closefd.cb(fd, so->opts.closefd.arg))) {
			return error;
		} else if (*fd == -1)
			return 0;
	}

	if (!(so->onum < so->olim)) {
		unsigned olim = DNS_PP_MAX(4, so->olim * 2);
		void *old;

		if (!(old = realloc(so->old, sizeof so->old[0] * olim)))
			return dns_syerr();

		so->old  = old;
		so->olim = olim;
	}

	so->old[so->onum++] = *fd;
	*fd = -1;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x3db85
movl $0x0, -0x4(%rbp)
jmp 0x3dc84
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3dbd1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x3dbb8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dc84
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x3dbcd
movl $0x0, -0x4(%rbp)
jmp 0x3dc84
jmp 0x3dbcf
jmp 0x3dbd1
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jb 0x3dc51
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
shll %ecx
movl $0x4, %eax
cmpl %ecx, %eax
jbe 0x3dbfd
movl $0x4, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3dc09
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
shll %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
shlq $0x2, %rsi
callq 0x107d0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x3dc3b
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dc84
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_tcp_send
static int dns_so_tcp_send(struct dns_socket *so) {
	unsigned char *qsrc;
	size_t qend;
	long n;

	so->query->data[-2] = 0xff & (so->query->end >> 8);
	so->query->data[-1] = 0xff & (so->query->end >> 0);

	qsrc = &so->query->data[-2] + so->qout;
	qend = so->query->end + 2;

	while (so->qout < qend) {
		if (0 > (n = dns_send(so->tcp, (void *)&qsrc[so->qout], qend - so->qout, 0)))
			return dns_soerr();

		so->qout += n;
		so->stat.tcp.sent.bytes += n;
	}

	so->stat.tcp.sent.count++;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movb %cl, 0x5a(%rax)
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movq 0x50(%rax), %rax
shrq $0x0, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movb %cl, 0x5b(%rax)
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
addq $0x5c, %rax
addq $-0x2, %rax
movq -0x10(%rbp), %rcx
addq 0x2d0(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x2c8(%rax), %rax
movq 0x50(%rax), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2d0(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x3dfcf
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x2d0(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
subq 0x2d0(%rax), %rdx
xorl %ecx, %ecx
callq 0x444f0
movq %rax, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jle 0x3df9e
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3dfec
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x2d0(%rax), %rcx
movq %rcx, 0x2d0(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x198(%rax), %rcx
movq %rcx, 0x198(%rax)
jmp 0x3df47
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x190(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_tcp_recv
static int dns_so_tcp_recv(struct dns_socket *so) {
	unsigned char *asrc;
	size_t aend, alen;
	int error;
	long n;

	aend = so->alen + 2;

	while (so->apos < aend) {
		asrc = &so->answer->data[-2];

		if (0 > (n = recv(so->tcp, (void *)&asrc[so->apos], aend - so->apos, 0)))
			return dns_soerr();
		else if (n == 0)
			return DNS_EUNKNOWN;	/* FIXME */

		so->apos += n;
		so->stat.tcp.rcvd.bytes += n;

		if (so->alen == 0 && so->apos >= 2) {
			alen = ((0xff & so->answer->data[-2]) << 8)
			     | ((0xff & so->answer->data[-1]) << 0);

			if ((error = dns_so_newanswer(so, alen)))
				return error;

			so->alen = alen;
			aend = alen + 2;
		}
	}

	so->answer->end	= so->alen;
	so->stat.tcp.rcvd.count++;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2f0(%rax), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2f8(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x3e165
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rax
addq $0x5c, %rax
addq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x2f8(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
subq 0x2f8(%rax), %rdx
xorl %ecx, %ecx
callq 0xf490
movq %rax, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jle 0x3e094
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e19c
cmpq $0x0, -0x38(%rbp)
jne 0x3e0a7
movl $0x9b918cc4, -0x4(%rbp) # imm = 0x9B918CC4
jmp 0x3e19c
jmp 0x3e0a9
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x2f8(%rax), %rcx
movq %rcx, 0x2f8(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x1a8(%rax), %rcx
movq %rcx, 0x1a8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x2f0(%rax)
jne 0x3e160
movq -0x10(%rbp), %rax
cmpq $0x2, 0x2f8(%rax)
jb 0x3e160
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rax
movzbl 0x5a(%rax), %eax
andl $0xff, %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movq 0x2e8(%rcx), %rcx
movzbl 0x5b(%rcx), %ecx
andl $0xff, %ecx
shll $0x0, %ecx
orl %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3d480
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x3e145
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e19c
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2f0(%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x3e01f
movq -0x10(%rbp), %rax
movq 0x2f0(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x1a0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x1a0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_fetch
struct dns_packet *dns_so_fetch(struct dns_socket *so, int *error) {
	struct dns_packet *answer;

	switch (so->state) {
	case DNS_SO_UDP_DONE:
	case DNS_SO_TCP_DONE:
		answer		= so->answer;
		so->answer	= 0;

		return answer;
	default:
		*error	= DNS_EUNKNOWN;

		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1b0(%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x5, %eax
je 0x3e1da
jmp 0x3e1d0
movl -0x24(%rbp), %eax
subl $0xa, %eax
jne 0x3e202
jmp 0x3e1da
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x2e8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e214
movq -0x18(%rbp), %rax
movl $0x9b918cc4, (%rax)     # imm = 0x9B918CC4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_query
struct dns_packet *dns_so_query(struct dns_socket *so, struct dns_packet *Q, struct sockaddr *host, int *error_) {
	struct dns_packet *A;
	int error;

	if (!so->state) {
		if ((error = dns_so_submit(so, Q, host)))
			goto error;
	}

	if ((error = dns_so_check(so)))
		goto error;

	if (!(A = dns_so_fetch(so, &error)))
		goto error;

	dns_so_reset(so);

	return A;
error:
	*error_	= error;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1b0(%rax)
jne 0x3e262
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x10540
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x3e260
jmp 0x3e2a1
jmp 0x3e262
movq -0x10(%rbp), %rdi
callq 0xf420
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x3e275
jmp 0x3e2a1
movq -0x10(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xf090
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x3e28e
jmp 0x3e2a1
movq -0x10(%rbp), %rdi
callq 0xf110
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e2b2
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_elapsed
static time_t dns_elapsed(struct dns_clock *clk) {
	time_t curtime;

	if ((time_t)-1 == time(&curtime))
		return clk->elapsed;

	if (curtime > clk->sample)
		clk->elapsed += (time_t)DNS_PP_MIN(difftime(curtime, clk->sample), DNS_MAXINTERVAL);

	clk->sample = curtime;

	return clk->elapsed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xfd20
movq %rax, %rcx
movq $-0x1, %rax
cmpq %rcx, %rax
jne 0x3e325
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e3a6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x3e38f
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0xf6c0
movaps %xmm0, %xmm1
movsd 0xee83(%rip), %xmm0     # 0x4d1d0
ucomisd %xmm1, %xmm0
jbe 0x3e36a
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0xf6c0
movsd %xmm0, -0x20(%rbp)
jmp 0x3e379
movsd 0xee5e(%rip), %xmm0     # 0x4d1d0
movsd %xmm0, -0x20(%rbp)
jmp 0x3e379
movsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_closefds
static void dns_so_closefds(struct dns_socket *so, int which) {
	if (DNS_SO_CLOSE_UDP & which)
		dns_socketclose(&so->udp, &so->opts);
	if (DNS_SO_CLOSE_TCP & which)
		dns_socketclose(&so->tcp, &so->opts);
	if (DNS_SO_CLOSE_OLD & which) {
		unsigned i;
		for (i = 0; i < so->onum; i++)
			dns_socketclose(&so->old[i], &so->opts);
		so->onum = 0;
		free(so->old);
		so->old  = 0;
		so->olim = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3e3fb
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x8(%rbp), %rsi
callq 0x44490
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3e417
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
movq -0x8(%rbp), %rsi
callq 0x44490
movl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3e48a
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x3e45b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x10(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x44490
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3e429
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x10060
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_events2
static int dns_so_events2(struct dns_socket *so, enum dns_events type) {
	int events = 0;

	switch (so->state) {
	case DNS_SO_UDP_CONN:
	case DNS_SO_UDP_SEND:
		events |= DNS_POLLOUT;

		break;
	case DNS_SO_UDP_RECV:
		events |= DNS_POLLIN;

		break;
	case DNS_SO_TCP_CONN:
	case DNS_SO_TCP_SEND:
		events |= DNS_POLLOUT;

		break;
	case DNS_SO_TCP_RECV:
		events |= DNS_POLLIN;

		break;
	} /* switch() */

	switch (type) {
	case DNS_LIBEVENT:
		return DNS_POLL2EV(events);
	default:
		return events;
	} /* switch() */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1b0(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x7, %eax
ja 0x3e528
movq -0x20(%rbp), %rax
leaq 0xbb2b(%rip), %rcx      # 0x4a020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x18(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x18(%rbp)
jmp 0x3e528
movl -0x18(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3e528
movl -0x18(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x18(%rbp)
jmp 0x3e528
movl -0x18(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
jne 0x3e55f
jmp 0x3e532
movl -0x18(%rbp), %edx
andl $0x1, %edx
xorl %eax, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl -0x18(%rbp), %esi
andl $0x4, %esi
xorl %ecx, %ecx
movl $0x4, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3e565
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/dns.c
// Function: dns_so_pollfd
int dns_so_pollfd(struct dns_socket *so) {
	switch (so->state) {
	case DNS_SO_UDP_CONN:
	case DNS_SO_UDP_SEND:
	case DNS_SO_UDP_RECV:
		return so->udp;
	case DNS_SO_TCP_CONN:
	case DNS_SO_TCP_SEND:
	case DNS_SO_TCP_RECV:
		return so->tcp;
	} /* switch() */

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x1b0(%rax), %eax
movl %eax, -0x14(%rbp)
addl $-0x2, %eax
subl $0x3, %eax
jb 0x3e59c
jmp 0x3e58f
movl -0x14(%rbp), %eax
addl $-0x7, %eax
subl $0x3, %eax
jb 0x3e5a8
jmp 0x3e5b4
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e5bb
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e5bb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq