LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_close
void dns_res_close(struct dns_resolver *R) {
	if (!R || 1 < dns_res_release(R))
		return;

	dns_res_reset(R);

	dns_so_destroy(&R->so);

	dns_hints_close(R->hints);
	dns_hosts_close(R->hosts);
	dns_resconf_close(R->resconf);
	dns_cache_close(R->cache);

	free(R);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2a6a3
movq %rdi, %rbx
pushq $-0x1
popq %rax
lock
xaddq %rax, 0x320(%rdi)
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0x2a6a5
popq %rbx
retq
movq %rbx, %rdi
callq 0xfb80
movq %rbx, %rdi
callq 0x297a0
movq 0x310(%rbx), %rdi
callq 0xfc20
movq 0x308(%rbx), %rdi
callq 0x107f0
movq 0x300(%rbx), %rdi
callq 0xff70
movq 0x318(%rbx), %rdi
testq %rdi, %rdi
je 0x2a6e8
callq *0x10(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0xffc0
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_stub
struct dns_resolver *dns_res_stub(const struct dns_options *opts, int *error) {
	struct dns_resolv_conf *resconf	= 0;
	struct dns_hosts *hosts		= 0;
	struct dns_hints *hints		= 0;
	struct dns_resolver *res	= 0;

	if (!(resconf = dns_resconf_local(error)))
		goto epilog;

	if (!(hosts = dns_hosts_local(error)))
		goto epilog;

	if (!(hints = dns_hints_local(resconf, error)))
		goto epilog;

	if (!(res = dns_res_open(resconf, hosts, hints, NULL, opts, error)))
		goto epilog;

epilog:
	dns_resconf_close(resconf);
	dns_hosts_close(hosts);
	dns_hints_close(hints);

	return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r13
movq %rsi, %rdi
callq 0xf2e0
movq %rax, %rbx
testq %rax, %rax
je 0x2a74e
movq %r12, %rdi
callq 0x102a0
testq %rax, %rax
je 0x2a74e
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf250
testq %rax, %rax
je 0x2a751
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %r12, %r9
callq 0xf9b0
movq %rax, %r12
jmp 0x2a757
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0xff70
movq %r14, %rdi
callq 0x107f0
movq %r15, %rdi
callq 0xfc20
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_reset
void dns_res_reset(struct dns_resolver *R) {
	unsigned i;

	dns_so_reset(&R->so);
	dns_p_setptr(&R->nodata, NULL);

	for (i = 0; i < lengthof(R->stack); i++)
		dns_res_frame_destroy(R, &R->stack[i]);

	memset(&R->qname, '\0', sizeof *R - offsetof(struct dns_resolver, qname));

	for (i = 0; i < lengthof(R->stack); i++)
		dns_res_frame_init(R, &R->stack[i]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xf100
leaq 0x4a8(%rbx), %rdi
xorl %esi, %esi
callq 0x23f0a
movl $0x4b8, %r14d           # imm = 0x4B8
cmpq $0xd38, %r14            # imm = 0xD38
je 0x2a7b7
leaq (%rbx,%r14), %rdi
callq 0x2a7f6
addq $0x110, %r14            # imm = 0x110
jmp 0x2a79c
leaq 0x328(%rbx), %rdi
movl $0xa10, %edx            # imm = 0xA10
xorl %esi, %esi
callq 0xf790
movl $0x4b8, %r14d           # imm = 0x4B8
cmpq $0xd38, %r14            # imm = 0xD38
je 0x2a7ee
leaq (%rbx,%r14), %rsi
movq %rbx, %rdi
callq 0x2a81f
addq $0x110, %r14            # imm = 0x110
jmp 0x2a7d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_frame_destroy
static void dns_res_frame_destroy(struct dns_resolver *R, struct dns_res_frame *frame) {
	(void)R;

	dns_p_setptr(&frame->query, NULL);
	dns_p_setptr(&frame->answer, NULL);
	dns_p_setptr(&frame->hints, NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
xorl %esi, %esi
callq 0x23f0a
leaq 0x20(%rbx), %rdi
xorl %esi, %esi
callq 0x23f0a
addq $0x28, %rbx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x23f0a
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_frame_init
static void dns_res_frame_init(struct dns_resolver *R, struct dns_res_frame *frame) {
	memset(frame, '\0', sizeof *frame);

	/*
	 * NB: Can be invoked from dns_res_open, before R->resconf has been
	 * initialized.
	 */
	if (R->resconf) {
		if (!R->resconf->options.recurse)
			frame->qflags |= DNS_Q_RD;
		if (R->resconf->options.edns0)
			frame->qflags |= DNS_Q_EDNS0;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x110, %edx            # imm = 0x110
movq %rsi, %rdi
xorl %esi, %esi
callq 0xf790
movq 0x300(%r14), %rax
testq %rax, %rax
je 0x2a867
cmpb $0x0, 0x5c1(%rax)
je 0x2a851
pushq $0x2
jmp 0x2a85a
movl $0x1, 0xc(%rbx)
pushq $0x3
popq %rcx
cmpb $0x1, 0x5b0(%rax)
jne 0x2a867
movl %ecx, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_events2
static int dns_res_events2(struct dns_resolver *R, enum dns_events type) {
	int events;

	switch (R->stack[R->sp].state) {
	case DNS_R_CHECK:
		events = R->cache->events(R->cache);

		return (type == DNS_LIBEVENT)? DNS_POLL2EV(events) : events;
	default:
		return dns_so_events2(&R->so, type);
	}
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl 0x4b0(%rdi), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
cmpl $0x6, 0x4b8(%rdi,%rax)
jne 0x2a904
movq 0x318(%rdi), %rdi
callq *0x40(%rdi)
movswl %ax, %ecx
movl %ecx, %eax
andl $0x1, %eax
movl %ecx, %edx
andl $0x4, %edx
cmpl $0x1, %ebx
leal (%rdx,%rax,2), %eax
cmovnel %ecx, %eax
popq %rbx
retq
movl %ebx, %esi
popq %rbx
jmp 0x2a3cd
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_pollfd
int dns_res_pollfd(struct dns_resolver *R) {
	switch (R->stack[R->sp].state) {
	case DNS_R_CHECK:
		return R->cache->pollfd(R->cache);
	default:
		return dns_so_pollfd(&R->so);
	}
}

// Assembly:
movl 0x4b0(%rdi), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
cmpl $0x6, 0x4b8(%rdi,%rax)
jne 0x2a92d
movq 0x318(%rdi), %rdi
jmpq *0x38(%rdi)
movl 0x1b0(%rdi), %eax
leal -0x7(%rax), %ecx
cmpl $0x3, %ecx
jb 0x2a947
addl $-0x2, %eax
cmpl $0x2, %eax
ja 0x2a94b
movl 0x18(%rdi), %eax
retq
movl 0x1c(%rdi), %eax
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_timeout
time_t dns_res_timeout(struct dns_resolver *R) {
	time_t elapsed;

	switch (R->stack[R->sp].state) {
#if 0
	case DNS_R_QUERY_AAAA:
#endif
	case DNS_R_QUERY_A:
		elapsed = dns_so_elapsed(&R->so);

		if (elapsed <= dns_resconf_timeout(R->resconf))
			return R->resconf->options.timeout - elapsed;

		break;
	default:
		break;
	} /* switch() */

	/*
	 * NOTE: We're not in a pollable state, or the user code hasn't
	 * called dns_res_check properly. The calling code is probably
	 * broken. Put them into a slow-burn pattern.
	 */
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x4b0(%rdi), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
pushq $0x1
popq %rbx
cmpl $0x10, 0x4b8(%rdi,%rax)
jne 0x2a99e
movq %rdi, %r14
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0x2a303
movq 0x300(%r14), %rcx
movl 0x5b8(%rcx), %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpl %edx, %ecx
cmovbl %ecx, %edx
cmpq %rdx, %rax
jg 0x2a99e
subq %rax, %rcx
movq %rcx, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_submit2
int dns_res_submit2(struct dns_resolver *R, const char *qname, size_t qlen, enum dns_type qtype, enum dns_class qclass) {
	dns_res_reset(R);

	/* Don't anchor; that can conflict with searchlist generation. */
	dns_d_init(R->qname, sizeof R->qname, qname, (R->qlen = qlen), 0);

	R->qtype	= qtype;
	R->qclass	= qclass;

	dns_begin(&R->elapsed);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xfb80
leaq 0x328(%r12), %rdi
movq %r14, 0x428(%r12)
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xf3b0
movl %ebp, 0x430(%r12)
movl %ebx, 0x434(%r12)
addq $0x438, %r12            # imm = 0x438
movq %r12, %rdi
callq 0x29aad
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_fetch
struct dns_packet *dns_res_fetch(struct dns_resolver *R, int *error) {
	struct dns_packet *P = NULL;

	if (R->stack[0].state != DNS_R_DONE)
		return *error = DNS_EUNKNOWN, (void *)0;

	if (!dns_p_movptr(&P, &R->stack[0].answer))
		return *error = DNS_EFETCHED, (void *)0;

	return P;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
andq $0x0, 0x8(%rsp)
movq %rsi, %rbx
cmpl $0x16, 0x4b8(%rdi)
jne 0x2ca9c
movq %rdi, %rsi
addq $0x4d8, %rsi            # imm = 0x4D8
leaq 0x8(%rsp), %rdi
callq 0x2cab2
testq %rax, %rax
je 0x2caa4
movq 0x8(%rsp), %rax
jmp 0x2caac
movl $0x9b918cc4, (%rbx)     # imm = 0x9B918CC4
jmp 0x2caaa
movl $0x9b918cc8, (%rbx)     # imm = 0x9B918CC8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_query
struct dns_packet *dns_res_query(struct dns_resolver *res, const char *qname, enum dns_type qtype, enum dns_class qclass, int timeout, int *error_) {
	int error;

	if ((error = dns_res_submit(res, qname, qtype, qclass)))
		goto error;

	while ((error = dns_res_check(res))) {
		if (dns_res_elapsed(res) > timeout)
			error = DNS_ETIMEDOUT;

		if (error != DNS_EAGAIN)
			goto error;

		if ((error = dns_res_poll(res, 1)))
			goto error;
	}

	return dns_res_fetch(res, error_);
error:
	*error_ = error;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movq %rdi, %r14
callq 0xf350
leaq 0x438(%r14), %r15
movslq %ebp, %r13
pushq $0x6e
popq %rbx
pushq $0x1
popq %rbp
movq %r14, %rdi
callq 0xf530
testl %eax, %eax
je 0x2cb2d
movl %eax, %r12d
movq %r15, %rdi
callq 0x2a303
cmpq %r13, %rax
cmovgl %ebx, %r12d
cmpl $0xb, %r12d
jne 0x2cb47
movq %r14, %rdi
movl %ebp, %esi
callq 0xfe80
jmp 0x2cafd
movq %r14, %rdi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10100
movq (%rsp), %rax
movl %r12d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_ai_close
void dns_ai_close(struct dns_addrinfo *ai) {
	if (!ai)
		return;

	dns_res_close(ai->res);

	if (ai->answer != ai->glue)
		dns_p_free(ai->glue);

	dns_p_free(ai->answer);
	free(ai);
}

// Assembly:
testq %rdi, %rdi
je 0x2cd95
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xfe70
movq 0x158(%rbx), %rdi
movq 0x160(%rbx), %rax
cmpq %rax, %rdi
je 0x2cd87
movq %rax, %rdi
callq 0xffc0
movq 0x158(%rbx), %rdi
callq 0xffc0
movq %rbx, %rdi
popq %rbx
jmp 0xffc0
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_fetch_and_study
static struct dns_packet *dns_res_fetch_and_study(struct dns_resolver *R, int *_error) {
	struct dns_packet *P = NULL;
	int error;

	if (!(P = dns_res_fetch(R, &error)))
		goto error;
	if ((error = dns_p_study(P)))
		goto error;

	return P;
error:
	*_error = error;

	dns_p_free(P);

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0x4(%rsp), %rsi
callq 0x10100
movq %rax, %rbx
testq %rax, %rax
je 0x2d766
movq %rbx, %rdi
callq 0xf7e0
jmp 0x2d76d
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strsection
const char *(dns_strsection)(enum dns_section section, void *_dst, size_t lim) {
	struct dns_buf dst = DNS_B_INTO(_dst, lim);
	unsigned i;

	for (i = 0; i < lengthof(dns_sections); i++) {
		if (dns_sections[i].type & section) {
			dns_b_puts(&dst, dns_sections[i].name);
			section &= ~dns_sections[i].type;
			if (section)
				dns_b_putc(&dst, '|');
		}
	}

	if (section || dst.p == dst.base)
		dns_b_fmtju(&dst, (0xffff & section), 0);

	return dns_b_tostring(&dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movq %rsi, 0x8(%r14)
addq %rsi, %rdx
movq %rdx, 0x10(%r14)
andl $0x0, 0x18(%r14)
andq $0x0, 0x20(%r14)
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0x5a36(%rip), %r12      # 0x33560
cmpq $0xa0, %r15
je 0x2db7f
movl 0x10(%r15,%r12), %ebp
testl %ebx, %ebp
je 0x2db79
leaq (%r12,%r15), %rsi
movq %r14, %rdi
callq 0x25689
notl %ebp
andl %ebp, %ebx
je 0x2db68
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x2db6c
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsp)
movb $0x7c, (%rax)
jmp 0x2db79
xorl %ebx, %ebx
jmp 0x2db79
incq 0x28(%rsp)
movl $0x9b918cc0, 0x20(%rsp) # imm = 0x9B918CC0
addq $0x14, %r15
jmp 0x2db2a
testl %ebx, %ebx
je 0x2db94
movzwl %bx, %esi
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x25591
jmp 0x2dba0
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x2db83
leaq 0x8(%rsp), %rdi
callq 0x2dbb7
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_isection
enum dns_section dns_isection(const char *src) {
	enum dns_section section = 0;
	char sbuf[128];
	char *name, *next;
	unsigned i;

	dns_strlcpy(sbuf, src, sizeof sbuf);
	next = sbuf;

	while ((name = dns_strsep(&next, "|+, \t"))) {
		for (i = 0; i < lengthof(dns_sections); i++) {
			if (!strcasecmp(dns_sections[i].name, name)) {
				section |= dns_sections[i].type;
				break;
			}
		}
	}

	return section;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %r14
movl $0x80, %edx
movq %r14, %rdi
callq 0xf4f0
leaq 0x8(%rsp), %rbx
movq %r14, (%rbx)
xorl %r14d, %r14d
leaq 0x6588(%rip), %r15      # 0x34182
leaq 0x595f(%rip), %r13      # 0x33560
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf850
testq %rax, %rax
je 0x2dc3c
movq %rax, %r12
xorl %edi, %edi
leaq 0x14(%rdi), %rbp
cmpq $0xb4, %rbp
je 0x2dc01
addq %r13, %rdi
movq %r12, %rsi
callq 0xfed0
movq %rbp, %rdi
testl %eax, %eax
jne 0x2dc16
orl -0x4(%rbp,%r13), %r14d
jmp 0x2dc01
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_iclass
enum dns_class dns_iclass(const char *name) {
	unsigned i, class;

	for (i = 0; i < lengthof(dns_classes); i++) {
		if (!strcasecmp(dns_classes[i].name, name))
			return dns_classes[i].type;
	}

	class = 0;
	while (dns_isdigit(*name)) {
		class *= 10;
		class += *name++ - '0';
	}

	return DNS_PP_MIN(class, 0xffff);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x59a1(%rip), %rdi      # 0x33600
movq %rbx, %rsi
callq 0xfed0
testl %eax, %eax
je 0x2dc9f
xorl %r14d, %r14d
movzbl (%rbx), %ebp
movl %ebp, %edi
callq 0x27abb
testb %al, %al
je 0x2dc91
movsbl %bpl, %eax
imull $0xa, %r14d, %ecx
incq %rbx
leal (%rcx,%rax), %r14d
addl $-0x30, %r14d
jmp 0x2dc6e
movl $0xffff, %eax           # imm = 0xFFFF
cmpl %eax, %r14d
cmovbl %r14d, %eax
jmp 0x2dca2
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_itype
enum dns_type dns_itype(const char *name) {
	unsigned i, type;

	for (i = 0; i < lengthof(dns_rrtypes); i++) {
		if (!strcasecmp(dns_rrtypes[i].name, name))
			return dns_rrtypes[i].type;
	}

	type = 0;
	while (dns_isdigit(*name)) {
		type *= 10;
		type += *name++ - '0';
	}

	return DNS_PP_MIN(type, 0xffff);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x40
popq %rcx
leaq 0x16ac5(%rip), %r14     # 0x44780
leaq 0x40(%rcx), %r15
cmpq $0x340, %r15            # imm = 0x340
je 0x2dce2
movq 0x48(%rcx,%r14), %rdi
movq %rbx, %rsi
callq 0xfed0
movq %r15, %rcx
testl %eax, %eax
jne 0x2dcbb
movl (%r15,%r14), %eax
jmp 0x2dd14
xorl %r14d, %r14d
movzbl (%rbx), %ebp
movl %ebp, %edi
callq 0x27abb
testb %al, %al
je 0x2dd08
movsbl %bpl, %eax
imull $0xa, %r14d, %ecx
incq %rbx
leal (%rcx,%rax), %r14d
addl $-0x30, %r14d
jmp 0x2dce5
movl $0xffff, %eax           # imm = 0xFFFF
cmpl %eax, %r14d
cmovbl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_stropcode
const char *dns_stropcode(enum dns_opcode opcode) {
	opcode = (unsigned)opcode % lengthof(dns_opcodes);

	if ('\0' == dns_opcodes[opcode][0])
		return dns__strcode(opcode, dns_opcodes[opcode], sizeof dns_opcodes[opcode]);

	return dns_opcodes[opcode];
}

// Assembly:
pushq %rbx
andl $0xf, %edi
movl %edi, %eax
shll $0x4, %eax
leaq 0x18621(%rip), %rcx     # 0x46350
leaq (%rcx,%rax), %rbx
cmpb $0x0, (%rax,%rcx)
jne 0x2dd41
movq %rbx, %rsi
callq 0x2dd46
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns__strcode
static const char *dns__strcode(int code, volatile char *dst, size_t lim) {
	char _tmp[48] = "";
	struct dns_buf tmp;
	size_t p;

	assert(lim > 0);
	dns_b_fmtju(dns_b_into(&tmp, _tmp, DNS_PP_MIN(sizeof _tmp, lim - 1)), code, 0);

	/* copy downwards so first byte is copied last (see below) */
	p = (size_t)(tmp.p - tmp.base);
	dst[p] = '\0';
	while (p--)
		dst[p] = _tmp[p];

	return (const char *)dst;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0xf(%rsp), %rax
movaps %xmm0, 0x11(%rax)
movaps %xmm0, 0x1(%rax)
movaps %xmm0, -0xf(%rax)
movq %rsp, %rcx
leaq 0x38(%rsp), %r14
movq %rcx, (%r14)
movq %rcx, 0x8(%r14)
movq %rax, 0x10(%r14)
andl $0x0, 0x18(%r14)
andq $0x0, 0x20(%r14)
movl %edi, %esi
xorl %ebp, %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x25591
movq 0x8(%r14), %rax
subq (%r14), %rax
movq %rax, %rcx
movb %bpl, (%rbx,%rax)
subq $0x1, %rcx
jb 0x2ddae
movb -0x1(%rsp,%rax), %bpl
movq %rcx, %rax
jmp 0x2dd9a
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_iopcode
enum dns_opcode dns_iopcode(const char *name) {
	unsigned opcode;

	for (opcode = 0; opcode < lengthof(dns_opcodes); opcode++) {
		if (!strcasecmp(name, dns_opcodes[opcode]))
			return opcode;
	}

	opcode = 0;
	while (dns_isdigit(*name)) {
		opcode *= 10;
		opcode += *name++ - '0';
	}

	return DNS_PP_MIN(opcode, 0x0f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18585(%rip), %r15     # 0x46350
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x2ddec
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfed0
testl %eax, %eax
je 0x2de1f
incq %r14
addq $0x10, %r15
jmp 0x2ddce
xorl %r14d, %r14d
movzbl (%rbx), %ebp
movl %ebp, %edi
callq 0x27abb
testb %al, %al
je 0x2de12
movsbl %bpl, %eax
imull $0xa, %r14d, %ecx
incq %rbx
leal (%rcx,%rax), %r14d
addl $-0x30, %r14d
jmp 0x2ddef
cmpl $0xf, %r14d
pushq $0xf
popq %rax
cmovbl %r14d, %eax
jmp 0x2de22
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strrcode
const char *dns_strrcode(enum dns_rcode rcode) {
	rcode = (unsigned)rcode % lengthof(dns_rcodes);

	if ('\0' == dns_rcodes[rcode][0])
		return dns__strcode(rcode, dns_rcodes[rcode], sizeof dns_rcodes[rcode]);

	return dns_rcodes[rcode];
}

// Assembly:
pushq %rbx
andl $0x1f, %edi
movl %edi, %eax
shll $0x4, %eax
leaq 0x18613(%rip), %rcx     # 0x46450
leaq (%rcx,%rax), %rbx
cmpb $0x0, (%rax,%rcx)
jne 0x2de4f
movq %rbx, %rsi
callq 0x2dd46
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_ircode
enum dns_rcode dns_ircode(const char *name) {
	unsigned rcode;

	for (rcode = 0; rcode < lengthof(dns_rcodes); rcode++) {
		if (!strcasecmp(name, dns_rcodes[rcode]))
			return rcode;
	}

	rcode = 0;
	while (dns_isdigit(*name)) {
		rcode *= 10;
		rcode += *name++ - '0';
	}

	return DNS_PP_MIN(rcode, 0xfff);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x185eb(%rip), %r15     # 0x46450
xorl %r14d, %r14d
cmpq $0x20, %r14
je 0x2de86
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfed0
testl %eax, %eax
je 0x2deba
incq %r14
addq $0x10, %r15
jmp 0x2de68
xorl %r14d, %r14d
movzbl (%rbx), %ebp
movl %ebp, %edi
callq 0x27abb
testb %al, %al
je 0x2deac
movsbl %bpl, %eax
imull $0xa, %r14d, %ecx
incq %rbx
leal (%rcx,%rax), %r14d
addl $-0x30, %r14d
jmp 0x2de89
movl $0xfff, %eax            # imm = 0xFFF
cmpl %eax, %r14d
cmovbl %r14d, %eax
jmp 0x2debd
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_s_study
static int dns_s_study(struct dns_s_memo *m, enum dns_section section, unsigned short base, struct dns_packet *P) {
	unsigned short count, rp;

	count = dns_p_count(P, section);

	for (rp = base; count && rp < P->end; count--)
		rp = dns_rr_skip(rp, P);

	m->base = base;
	m->end  = rp;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebx
movq %rdi, %r15
movq %rcx, %rdi
callq 0x10850
movl %eax, %ebp
movl %ebx, %eax
subw $0x1, %bp
jb 0x2defc
movzwl %ax, %edi
cmpq %rdi, 0x50(%r14)
jbe 0x2defc
movq %r14, %rsi
callq 0xf2f0
jmp 0x2dee3
movw %bx, (%r15)
movw %ax, 0x2(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_i_match
static _Bool dns_rr_i_match(struct dns_rr *rr, struct dns_rr_i *i, struct dns_packet *P) {
	if (i->section && !(rr->section & i->section))
		return 0;

	if (i->type && rr->type != i->type && i->type != DNS_T_ALL)
		return 0;

	if (i->class && rr->class != i->class && i->class != DNS_C_ANY)
		return 0;

	if (i->name) {
		char dn[DNS_D_MAXNAME + 1];
		size_t len;
		int error;

		if (!(len = dns_d_expand(dn, sizeof dn, rr->dn.p, P, &error))
		||  len >= sizeof dn)
			return 0;

		if (0 != strcasecmp(dn, i->name))
			return 0;
	}

	if (i->data && i->type && rr->section > DNS_S_QD) {
		union dns_any rd;
		int error;

		if ((error = dns_any_parse(&rd, rr, P)))
			return 0;

		if (0 != dns_any_cmp(&rd, rr->type, i->data, i->type))
			return 0;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %eax
testl %eax, %eax
je 0x2df39
testl %eax, (%r14)
je 0x2dff3
movl 0x10(%rbx), %r13d
testl %r13d, %r13d
je 0x2df55
cmpl $0xff, %r13d
je 0x2df55
cmpl %r13d, 0x8(%r14)
jne 0x2dff3
movl 0x14(%rbx), %eax
testl %eax, %eax
je 0x2df6d
cmpl $0xff, %eax
je 0x2df6d
cmpl %eax, 0xc(%r14)
jne 0x2dff3
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x2dfb1
movzwl 0x4(%r14), %edx
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %r8
movl $0x100, %esi            # imm = 0x100
movq %r15, %rcx
callq 0xff50
addq $-0x100, %rax
cmpq $-0xff, %rax
jb 0x2dff3
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xfed0
testl %eax, %eax
jne 0x2dff3
movb $0x1, %bpl
testl %r13d, %r13d
je 0x2dff5
cmpq $0x0, 0x18(%rbx)
je 0x2dff5
cmpl $0x2, (%r14)
jb 0x2dff5
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xff00
testl %eax, %eax
jne 0x2dff3
movl 0x8(%r14), %esi
movq 0x18(%rbx), %rdx
movl 0x10(%rbx), %ecx
leaq 0x10(%rsp), %rdi
callq 0xfd20
testl %eax, %eax
je 0x2dff5
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_b_tolstring
static inline const char *
dns_b_tolstring(struct dns_buf *b, size_t *n)
{
	if (b->p < b->pe) {
		*b->p = '\0';
		*n = b->p - b->base;

		return (const char *)b->base;
	} else if (b->p > b->base) {
		if (b->p[-1] != '\0') {
			dns_b_setoverflow(b, 1, DNS_ENOBUFS);
			b->p[-1] = '\0';
		}
		*n = &b->p[-1] - b->base;

		return (const char *)b->base;
	} else {
		*n = 0;

		return "";
	}
}

// Assembly:
movq 0x8(%rdi), %rcx
cmpq 0x10(%rdi), %rcx
jae 0x2e022
movb $0x0, (%rcx)
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
jmp 0x2e05a
movq (%rdi), %rax
cmpq %rax, %rcx
jbe 0x2e051
cmpb $0x0, -0x1(%rcx)
je 0x2e046
incq 0x20(%rdi)
movl $0x9b918cc0, 0x18(%rdi) # imm = 0x9B918CC0
movb $0x0, -0x1(%rcx)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, %rdx
notq %rdx
addq %rcx, %rdx
jmp 0x2e05a
leaq 0x5fa3(%rip), %rax      # 0x33ffb
xorl %edx, %edx
movq %rdx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_b_getc
static inline int
dns_b_getc(const struct dns_buf *_b, const int eof)
{
	struct dns_buf *b = (struct dns_buf *)_b;

	if (!(b->p < b->pe))
		return dns_b_setoverflow(b, 1, DNS_EILLEGAL), eof;

	return *b->p++;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
jae 0x2e074
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
retq
incq 0x20(%rdi)
movl $0x9b918cc1, 0x18(%rdi) # imm = 0x9B918CC1
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_anyconf_match
static _Bool dns_anyconf_match(const char *pat, int mc) {
	_Bool match;
	int pc;

	if (*pat == '^') {
		match = 0;
		++pat;
	} else {
		match = 1;
	}

	while ((pc = *(const unsigned char *)pat++)) {
		switch (pc) {
		case '%':
			if (!(pc = *(const unsigned char *)pat++))
				return !match;

			switch (pc) {
			case 'a':
				if (dns_isalpha(mc))
					return match;
				break;
			case 'd':
				if (dns_isdigit(mc))
					return match;
				break;
			case 'w':
				if (dns_isalnum(mc))
					return match;
				break;
			case 's':
				if (dns_isspace(mc))
					return match;
				break;
			default:
				if (mc == pc)
					return match;
				break;
			} /* switch() */

			break;
		default:
			if (mc == pc)
				return match;
			break;
		} /* switch() */
	} /* while() */

	return !match;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
xorl %ebx, %ebx
cmpb $0x5e, (%rdi)
setne %r15b
sete %bl
movq %rbx, %r12
addq %rdi, %r12
movzbl %bpl, %r14d
movzbl (%r12), %eax
cmpl $0x25, %eax
je 0x2e0b9
testl %eax, %eax
je 0x2e119
incq %r12
cmpl %ebp, %eax
jne 0x2e0a2
jmp 0x2e116
movzbl 0x1(%r12), %eax
addq $0x2, %r12
cmpl $0x61, %eax
je 0x2e106
cmpl $0x64, %eax
je 0x2e0dd
cmpl $0x73, %eax
je 0x2e0f8
cmpl $0x77, %eax
je 0x2e0e7
testl %eax, %eax
jne 0x2e0b3
jmp 0x2e119
movl %r14d, %edi
callq 0x27abb
jmp 0x2e100
callq 0xfec0
movq (%rax), %rax
testb $0x8, (%rax,%r14,2)
je 0x2e0a2
jmp 0x2e116
movl %r14d, %edi
callq 0x272bc
testb %al, %al
je 0x2e0a2
jmp 0x2e116
callq 0xfec0
movq (%rax), %rax
testb $0x4, 0x1(%rax,%r14,2)
je 0x2e0a2
movl %r15d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_hints_i_cmp
static int dns_hints_i_cmp(unsigned a, unsigned b, struct dns_hints_i *i, struct dns_hints_soa *soa) {
	int cmp;

	if ((cmp = soa->addrs[a].priority - soa->addrs[b].priority))
		return cmp;

	return dns_k_shuffle16(a, i->state.seed) - dns_k_shuffle16(b, i->state.seed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
imulq $0x88, %rax, %rax
movl 0x180(%rcx,%rax), %ebp
movl %esi, %eax
imulq $0x88, %rax, %rax
subl 0x180(%rcx,%rax), %ebp
jne 0x2e179
movl %esi, %ebx
movl 0xc(%rdx), %r14d
movl $0xffff, %r15d          # imm = 0xFFFF
andl %r15d, %edi
movl %r14d, %esi
callq 0x251ae
movzwl %ax, %ebp
andl %r15d, %ebx
movl %ebx, %edi
movl %r14d, %esi
callq 0x251ae
movzwl %ax, %eax
subl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_strnlcpy
DNS_NOTUSED static size_t dns_strnlcpy(char *dst, size_t lim, const char *src, size_t max) {
	size_t len = dns_strnlen(src, max), n;

	if (lim > 0) {
		n = DNS_PP_MIN(lim - 1, len);
		memcpy(dst, src, n);
		dst[n] = '\0';
	}

	return len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpb $0x0, (%rsi,%r14)
je 0x2e1a2
cmpq $0x6b, %r14
ja 0x2e1a2
incq %r14
jmp 0x2e190
movq %rbx, %rdi
movq %r14, %rdx
callq 0xfad0
movb $0x0, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_socketclose
static void dns_socketclose(int *fd, const struct dns_options *opts) {
	if (opts && opts->closefd.cb)
		opts->closefd.cb(fd, opts->closefd.arg);

	if (*fd != -1) {
#if _WIN32
		closesocket(*fd);
#else
		close(*fd);
#endif
		*fd	= -1;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2e1d4
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2e1d4
movq (%rsi), %rsi
movq %rbx, %rdi
callq *%rax
movl (%rbx), %edi
cmpl $-0x1, %edi
je 0x2e1e3
callq 0x10af0
orl $-0x1, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_rr_type
static enum dns_type dns_rr_type(unsigned short src, struct dns_packet *P) {
	struct dns_rr rr;
	int error;

	if ((error = dns_rr_parse(&rr, src, P)))
		return 0;

	return rr.type;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, %rdx
movq %rsp, %rdi
pushq $0xc
popq %rsi
callq 0xf750
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x2e203
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_q_make2
static dns_error_t
dns_q_make2(struct dns_packet **_Q, const char *qname, size_t qlen, enum dns_type qtype, enum dns_class qclass, int qflags)
{
	struct dns_packet *Q = NULL;
	int error;

	if (dns_p_movptr(&Q, _Q)) {
		dns_p_reset(Q);
	} else if (!(Q = dns_p_make(DNS_P_QBUFSIZ, &error))) {
		goto error;
	}

	if ((error = dns_p_push(Q, DNS_S_QD, qname, qlen, qtype, qclass, 0, 0)))
		goto error;

	dns_header(Q)->rd = !!(qflags & DNS_Q_RD);

	if (qflags & DNS_Q_EDNS0) {
		struct dns_opt opt = DNS_OPT_INIT(&opt);

		opt.version = 0; /* RFC 6891 version */
		opt.maxudp = 4096;

		if ((error = dns_p_push(Q, DNS_S_AR, ".", 1, DNS_T_OPT, dns_opt_class(&opt), dns_opt_ttl(&opt), &opt)))
			goto error;
	}

	*_Q = Q;

	return 0;
error:
	dns_p_free(Q);

	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %r9d, 0xc(%rsp)
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
andq $0x0, (%rdi)
movq %rbx, %rsi
callq 0x2cab2
testq %rax, %rax
je 0x2e25a
movq 0x10(%rsp), %r14
movq 0x48(%r14), %rsi
addq $0x5c, %rsi
movq %r14, %rdi
callq 0x10b10
jmp 0x2e27a
leaq 0x8(%rsp), %rsi
movl $0x160, %edi            # imm = 0x160
callq 0xfaa0
movq %rax, %r14
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x2e319
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbp, %rdx
movq %r13, %rcx
movl %r12d, %r8d
movl %r15d, %r9d
pushq $0x0
pushq $0x0
callq 0x10780
popq %rcx
popq %rdx
movl %eax, 0x8(%rsp)
testl %eax, %eax
jne 0x2e31c
movl 0xc(%rsp), %edx
movl %edx, %eax
andl $0x1, %eax
movq $-0x10001, %rcx         # imm = 0xFFFEFFFF
andq 0x5c(%r14), %rcx
shll $0x10, %eax
orq %rax, %rcx
movq %rcx, 0x5c(%r14)
testb $0x2, %dl
je 0x2e312
leaq 0x18(%rsp), %r15
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
xorl %esi, %esi
callq 0xf790
movq $0x100, 0x10(%r15)      # imm = 0x100
movw $0x1000, 0x8(%r15)      # imm = 0x1000
leaq 0x5c17(%rip), %rdx      # 0x33f03
pushq $0x8
popq %rsi
pushq $0x1
popq %rcx
pushq $0x29
popq %r8
movq %r14, %rdi
movl $0x1000, %r9d           # imm = 0x1000
pushq %r15
pushq $0x0
callq 0x10780
popq %rcx
popq %rdx
movl %eax, 0x8(%rsp)
testl %eax, %eax
jne 0x2e31c
movq %r14, (%rbx)
xorl %eax, %eax
jmp 0x2e328
xorl %r14d, %r14d
movq %r14, %rdi
callq 0xffc0
movl 0x8(%rsp), %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_nameserv_cmp
static int dns_res_nameserv_cmp(struct dns_rr *a, struct dns_rr *b, struct dns_rr_i *i, struct dns_packet *P) {
	_Bool glued[2] = { 0 };
	struct dns_rr x = { 0 }, y = { 0 };
	struct dns_ns ns;
	int cmp, error;

	if (!(error = dns_ns_parse(&ns, a, P)))
		glued[0] = !!dns_rr_grep(&x, 1, dns_rr_i_new(P, .section = (DNS_S_ALL & ~DNS_S_QD), .name = ns.host, .type = DNS_T_A), P, &error);

	if (!(error = dns_ns_parse(&ns, b, P)))
		glued[1] = !!dns_rr_grep(&y, 1, dns_rr_i_new(P, .section = (DNS_S_ALL & ~DNS_S_QD), .name = ns.host, .type = DNS_T_A), P, &error);

	if ((cmp = glued[1] - glued[0])) {
		return cmp;
	} else if ((cmp = (dns_rr_offset(&y) < i->args[0]) - (dns_rr_offset(&x) < i->args[0]))) {
		return cmp;
	} else {
		return dns_rr_i_shuffle(a, b, i, P);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rcx, %r12
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x108(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rcx, %rdx
callq 0x107a0
xorl %ebp, %ebp
movl $0x0, %ebx
testl %eax, %eax
jne 0x2e41f
leaq 0xb0(%rsp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
andq $0x0, 0x30(%rdx)
movl $0xe, (%rdx)
movq %r13, 0x8(%rdx)
movl $0x1, 0x10(%rdx)
movups %xmm0, 0x38(%rdx)
movups %xmm0, 0x48(%rdx)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r8
movq %r12, %rcx
callq 0xfe00
xorl %ebx, %ebx
negl %eax
sbbl %ebx, %ebx
leaq 0x108(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x107a0
testl %eax, %eax
jne 0x2e487
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
andq $0x0, 0x30(%rdx)
movl $0xe, (%rdx)
movq %r13, 0x8(%rdx)
movl $0x1, 0x10(%rdx)
movups %xmm0, 0x38(%rdx)
movups %xmm0, 0x48(%rdx)
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r8
movq %r12, %rcx
callq 0xfe00
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
addl %ebx, %ebp
jne 0x2e4c2
movzwl 0x14(%rsp), %eax
movq 0x8(%rsp), %rcx
movl 0x30(%rcx), %ecx
xorl %ebp, %ebp
cmpl %eax, %ecx
seta %bpl
movzwl 0x34(%rsp), %eax
xorl %edx, %edx
cmpl %eax, %ecx
seta %dl
subl %edx, %ebp
jne 0x2e4c2
movq %r15, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
callq 0x108a0
movl %eax, %ebp
movl %ebp, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/dns.c
// Function: dns_res_frame_prepare
static dns_error_t dns_res_frame_prepare(struct dns_resolver *R, struct dns_res_frame *F, const char *qname, enum dns_type qtype, enum dns_class qclass) {
	struct dns_packet *P = NULL;

	if (!(F < endof(R->stack)))
		return DNS_EUNKNOWN;

	dns_p_movptr(&P, &F->query);
	dns_res_frame_reset(R, F);
	dns_p_movptr(&F->query, &P);

	return dns_q_make(&F->query, qname, qtype, qclass, F->qflags);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andq $0x0, (%rsp)
leaq 0xd38(%rdi), %rax
cmpq %rsi, %rax
jbe 0x2e54f
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x18(%rsi), %r13
movq %rsp, %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2cab2
movq %r15, %rdi
callq 0x2a7f6
movq %r12, %rdi
movq %r15, %rsi
callq 0x2a81f
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2cab2
movl 0xc(%r15), %r8d
pushq $0x1
popq %rcx
movq %r13, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e33a
movl $0x9b918cc4, %eax       # imm = 0x9B918CC4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: closefd
static int closefd(int *fd) {
	while (*fd >= 0 && 0 != close(*fd)) {
		if (errno != EINTR)
			return errno;
	}

	*fd = -1;

	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rbx), %edi
testl %edi, %edi
js 0x2e9dd
callq 0x10af0
testl %eax, %eax
je 0x2e9dd
callq 0xf0a0
cmpl $0x4, (%rax)
je 0x2e9c2
jmp 0x2e9e0
orl $-0x1, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: notify_timeout
int notify_timeout(struct notify *nfy) {
	if (nfy->dirty || !LIST_EMPTY(&nfy->pending) || !LIST_EMPTY(&nfy->changed))
		return 0;
	else
		return -1;
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, 0x50(%rdi)
jne 0x2e9f4
cmpq $0x0, 0x18(%rdi)
je 0x2e9f5
retq
xorl %eax, %eax
cmpq $0x1, 0x20(%rdi)
sbbl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: notify_step
int notify_step(struct notify *nfy, int timeout) {
	int error;

	if (nfy->dirty || !LIST_EMPTY(&nfy->pending))
		goto post;

	if (nfy->changes || !LIST_EMPTY(&nfy->changed))
		return 0;

	if ((error = NFY_STEP(nfy, timeout)))
		return error;

post:
	if ((error = NFY_POST(nfy)))
		return error;

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x50(%rdi)
jne 0x2ea12
cmpq $0x0, 0x18(%rbx)
je 0x2ea8d
movq 0x18(%rbx), %rcx
leaq 0x20(%rbx), %rax
leaq 0x10(%rbx), %rdx
testq %rcx, %rcx
je 0x2ea7a
leaq 0x18(%rcx), %rdi
movq 0x18(%rcx), %rsi
movl 0x4(%rcx), %r8d
andl %r8d, 0x8(%rcx)
movq 0x20(%rcx), %r8
je 0x2ea50
testq %rsi, %rsi
je 0x2ea42
movq %r8, 0x20(%rsi)
movq %rsi, (%r8)
movq (%rax), %r8
movq %r8, (%rdi)
movq %rax, %r9
jmp 0x2ea65
testq %rsi, %rsi
je 0x2ea59
movq %r8, 0x20(%rsi)
movq %rsi, (%r8)
movq (%rdx), %r8
movq %r8, (%rdi)
movq %rdx, %r9
testq %r8, %r8
je 0x2ea6e
movq %rdi, 0x20(%r8)
movq %rcx, (%r9)
movq %r9, 0x20(%rcx)
movq %rsi, %rcx
jmp 0x2ea1e
movb $0x0, 0x50(%rbx)
movl 0x48(%rbx), %eax
andl %eax, 0x4c(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
cmpl $0x0, 0x4c(%rbx)
jne 0x2ea86
cmpq $0x0, 0x20(%rbx)
jne 0x2ea86
movl %esi, %ebp
movq %rbx, %rdi
callq 0x2eee2
testl %eax, %eax
je 0x2ea12
cmpl $0xb, %eax
jne 0x2eaf0
testl %ebp, %ebp
je 0x2ea12
movl (%rbx), %eax
movq %rsp, %rdi
movl %eax, (%rdi)
movl $0x1, 0x4(%rdi)
pushq $0x1
popq %rsi
movl %ebp, %edx
callq 0x104f0
cmpl $-0x1, %eax
je 0x2eae9
movq %rbx, %rdi
callq 0x2eee2
testl %eax, %eax
jne 0x2eaf0
jmp 0x2ea12
callq 0xf0a0
movl (%rax), %eax
cmpl $0xb, %eax
je 0x2ea12
cmpl $0x4, %eax
je 0x2ea12
testl %eax, %eax
jne 0x2ea86
jmp 0x2ea12
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: lookup
static struct file *lookup(struct notify *nfy, const char *name, size_t namelen) {
#if ENABLE_FEN
	struct file key = { .name = (char *)name, .namelen = namelen };

	return LLRB_FIND(files, &nfy->files, &key);
#else
	struct file *key = &((union { char pad[offsetof(struct file, name) + NAME_MAX + 1]; struct file file; }){ { 0 } }).file;

	if (namelen > NAME_MAX)
		return NULL;

	memcpy(key->name, name, namelen);
	key->namelen = namelen;

	return LLRB_FIND(files, &nfy->files, key);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq %rsp, %rdi
xorl %ebx, %ebx
movl $0x160, %edx            # imm = 0x160
xorl %esi, %esi
callq 0xf790
cmpq $0xff, %r12
ja 0x2ed1d
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xfad0
movq %r12, -0x8(%r14)
addq $0x8, %r15
pushq $0x38
popq %r12
pushq $0x40
popq %r13
movq %r15, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2ed1b
leaq 0x60(%rbx), %rsi
movq %r14, %rdi
callq 0x102e0
movq %r12, %rcx
testl %eax, %eax
js 0x2ed16
movq %r13, %rcx
je 0x2ed1d
addq %rcx, %rbx
jmp 0x2ecf6
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: notify_get
int notify_get(struct notify *nfy, const char **name) {
	struct file *file;
	int changes;

	if ((file = LIST_FIRST(&nfy->changed))) {
		NFY_LIST_MOVE(&nfy->dormant, file, le);

		if (name)
			*name = file->name;

		changes = file->changes;
		file->changes = 0;

		return changes;
	}

	if (!nfy->dirty && nfy->changes) {
		if (name)
			*name = ".";

		changes = nfy->changes;
		nfy->changes = 0;

		return changes;
	}

	return 0;
}

// Assembly:
movq 0x20(%rdi), %rcx
testq %rcx, %rcx
je 0x2ed82
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rdx
testq %rax, %rax
je 0x2ed4b
movq %rdx, 0x20(%rax)
movq %rax, (%rdx)
movq 0x10(%rdi), %rax
addq $0x10, %rdi
movq %rax, 0x18(%rcx)
testq %rax, %rax
je 0x2ed67
leaq 0x18(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq %rcx, (%rdi)
movq %rdi, 0x20(%rcx)
testq %rsi, %rsi
je 0x2ed7a
leaq 0x60(%rcx), %rax
movq %rax, (%rsi)
movl 0x8(%rcx), %eax
andl $0x0, 0x8(%rcx)
retq
xorl %eax, %eax
cmpb $0x0, 0x50(%rdi)
jne 0x2eda6
movl 0x4c(%rdi), %ecx
testl %ecx, %ecx
je 0x2eda6
testq %rsi, %rsi
je 0x2eda0
leaq 0x5166(%rip), %rax      # 0x33f03
movq %rax, (%rsi)
andl $0x0, 0x4c(%rdi)
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: in_step1
static int in_step1(struct notify *nfy) {
	struct inotify_event *buf, *msg, *end;
	ssize_t len;
	int count = 0;

	buf = in_msgbuf(IN_BUFSIZ);

	while ((len = read(nfy->fd, buf, IN_BUFSIZ)) > 0) {
		for (msg = buf, end = in_msgend(buf, len); msg < end; msg = in_msgnxt(msg)) {
			size_t namelen = strlen(msg->name);

			if (namelen) {
				struct file *file;

				if ((file = lookup(nfy, msg->name, namelen))) {
					file->changes |= decode(msg->mask);
					NFY_LIST_MOVE(&nfy->pending, file, le);
				}
			} else {
				nfy->changes |= decode(msg->mask);
				nfy->dirty = 1;

				if (msg->mask & (IN_Q_OVERFLOW|IN_IGNORED|IN_UNMOUNT))
					nfy->critical = 1;
			}

			if (msg->mask & (IN_CREATE|IN_DELETE|IN_MOVE)) {
				nfy->changes |= decode(msg->mask & (IN_CREATE|IN_DELETE|IN_MOVE));
				nfy->dirty = 1;
			}

			++count;
		}

		if (count >= NOTIFY_MAXSTEP)
			return 0;
	}

	if (count > 0)
		return 0;
	else if (len == 0)
		return EPIPE;
	else
		return errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
xorl %r13d, %r13d
movl $0x800, %edx            # imm = 0x800
movq %r14, %rdi
xorl %esi, %esi
callq 0xf790
leaq 0x18(%rbx), %rbp
movl (%rbx), %edi
movl $0x800, %edx            # imm = 0x800
movq %r14, %rsi
callq 0x103b0
testq %rax, %rax
jle 0x2f00c
addq %rsp, %rax
addq $0x8, %rax
movq %rax, (%rsp)
cmpq (%rsp), %r14
jae 0x2effb
leaq 0x10(%r14), %r15
movq %r15, %rdi
callq 0xf580
testq %rax, %rax
je 0x2efad
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2ec9d
testq %rax, %rax
je 0x2efd0
movq %rax, %r12
movl 0x4(%r14), %edi
callq 0x2f038
orl %eax, 0x8(%r12)
movq 0x18(%r12), %rax
movq 0x20(%r12), %rcx
testq %rax, %rax
je 0x2ef86
movq %rcx, 0x20(%rax)
movq %rax, (%rcx)
movq (%rbp), %rax
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x2efa2
movq %r12, %rcx
addq $0x18, %rcx
movq %rcx, 0x20(%rax)
movq %r12, (%rbp)
movq %rbp, 0x20(%r12)
jmp 0x2efd0
movq %rbp, %r12
movl 0x4(%r14), %ebp
movl %ebp, %edi
callq 0x2f038
orl %eax, 0x4c(%rbx)
movb $0x1, 0x50(%rbx)
testw $0xe000, %bp            # imm = 0xE000
movq %r12, %rbp
je 0x2efd0
movb $0x1, 0x51(%rbx)
movl 0x4(%r14), %edi
movl $0x3c0, %eax            # imm = 0x3C0
andl %eax, %edi
je 0x2efe9
callq 0x2f038
orl %eax, 0x4c(%rbx)
movb $0x1, 0x50(%rbx)
incl %r13d
movl 0xc(%r14), %eax
addq %rax, %r15
movq %r15, %r14
jmp 0x2ef34
cmpl $0x1f, %r13d
leaq 0x8(%rsp), %r14
jle 0x2ef11
jmp 0x2f011
testl %r13d, %r13d
jle 0x2f025
xorl %eax, %eax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rax, %rax
je 0x2f033
callq 0xf0a0
movl (%rax), %eax
jmp 0x2f013
pushq $0x20
popq %rax
jmp 0x2f013
// File: /workspace/github_c_makefile_star2_O2/ryo[P]shmqueue/shmserver.c
// Function: reap_items
int
reap_items()
{
	int i, nexpire;
	struct keyvalue kv;

	shmqueue_dump(shmqueue);

	nexpire = 0;
	for (i = 0; i < 5000; i++) {
#if 1
		if (!shmqueue_watermark(shmqueue))
			break;
#else
		if (shmqueue_inuse(shmqueue) < 5000)
			break;
#endif

		/* XXX: TODO */

		/* fetch from expire queue, and store to db */
		if (shmqueue_getoldest(shmqueue, &kv) != 0)
			break;

		if ((i & 0xff) == 0) {
			fprintf(stderr, "EXPIRE: key=<%s>, storage_size=%u, storage=<%s>\n",
			    KEYVALUE_KEY(&kv),
			    kv.kv_storagesize,
			    KEYVALUE_STORAGE(&kv));
			fflush(stdout);
		}

		nexpire++;
	}

	fflush(stdout);

	return nexpire;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7d8, %rsp            # imm = 0x7D8
movq 0x3e68(%rip), %rdi      # 0x50a8
callq 0x13fd
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq 0x3da4(%rip), %r13      # 0x4ff8
leaq 0x1da9(%rip), %r12      # 0x3004
movq 0x3d76(%rip), %rbp      # 0x4fd8
xorl %ebx, %ebx
cmpl $0x1388, %ebx           # imm = 0x1388
je 0x12be
movq 0x3e35(%rip), %rdi      # 0x50a8
callq 0x24e5
testl %eax, %eax
je 0x12be
movq 0x3e25(%rip), %rdi      # 0x50a8
movq %r15, %rsi
callq 0x2517
testl %eax, %eax
jne 0x12be
testb %bl, %bl
je 0x1297
incl %ebx
jmp 0x1264
movq (%r13), %rdi
movl (%rsp), %r8d
movl 0x4(%rsp), %ecx
addq %r14, %r8
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1090
movq (%rbp), %rdi
callq 0x10d0
jmp 0x1293
movq (%rbp), %rdi
callq 0x10d0
movl %ebx, %eax
addq $0x7d8, %rsp            # imm = 0x7D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ryo[P]shmqueue/shmserver.c
// Function: main
int
main(int argc, char *argv[])
{
	int ch;
	int opt_a = 0, opt_f = 0, opt_i = 0;

	while ((ch = getopt(argc, argv, "afi")) != -1) {
		switch (ch) {
		case 'a':
			opt_a = 1;
			break;
		case 'f':
			opt_f = 1;
			break;
		case 'i':
			opt_i = 1;
			break;
		default:
			usage();
			return 1;
		}
	}
	argc -= optind;
	argv += optind;

	shmqueue = shmqueue_new(MEMID, MEMSIZE, !opt_i, 1);
	if (shmqueue == NULL) {
		shmqueue = shmqueue_new(MEMID, 0, !opt_i, 1);
		if (shmqueue == NULL)
			err(1, "shmqueue_new");
	}

	while (1) {
		if (reap_items() == 0) {
//			sleep(1);
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
pushq $0x1
popq %rbx
leaq 0x1d44(%rip), %r15      # 0x3035
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10f0
cmpl $0x61, %eax
je 0x12f1
cmpl $0x66, %eax
je 0x12f1
cmpl $-0x1, %eax
je 0x1316
cmpl $0x69, %eax
jne 0x135a
xorl %ebx, %ebx
jmp 0x12f1
pushq $0x1
popq %rcx
movl $0x10000000, %esi       # imm = 0x10000000
movl $0x186a0, %edi          # imm = 0x186A0
movl %ebx, %edx
callq 0x185c
movq %rax, 0x3d77(%rip)      # 0x50a8
testq %rax, %rax
jne 0x1353
pushq $0x1
popq %rcx
movl $0x186a0, %edi          # imm = 0x186A0
xorl %esi, %esi
movl %ebx, %edx
callq 0x185c
movq %rax, 0x3d5a(%rip)      # 0x50a8
testq %rax, %rax
je 0x136d
callq 0x1228
jmp 0x1353
callq 0x121c
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1cc5(%rip), %rsi      # 0x3039
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x10b0
nop
// File: /workspace/github_c_makefile_star2_O2/kasymovga[P]devilwm/ewmh.c
// Function: ewmh_set_net_client_list
void ewmh_set_net_client_list(ScreenInfo *s) {
	struct list *iter;
	for (iter = clients_mapping_order; iter; iter = iter->next) {
		Client *c = iter->data;
		XChangeProperty(dpy, s->root, xa_net_client_list,
				XA_WINDOW, 32, PropModeReplace,
				(unsigned char *)&c->window, 1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x7d06(%rip), %r15      # 0xd7e8
leaq 0x7d3f(%rip), %r12      # 0xd828
pushq $0x21
popq %r14
pushq $0x20
popq %rbp
movq (%r15), %r15
testq %r15, %r15
je 0x5b21
movq (%r12), %rdi
movq 0x8(%rbx), %rsi
movq 0x7bb1(%rip), %rdx      # 0xd6b8
movq %r14, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq $0x1
pushq 0x8(%r15)
callq 0x3660
addq $0x10, %rsp
jmp 0x5af0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq