LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: pkt_new
static int pkt_new(lua_State *L) {
	struct dns_packet *P;
	const char *data = NULL;
	size_t prepbufsiz, datasiz, size;

	if (lua_isnoneornil(L, 1) || lua_isnumber(L, 1)) {
		prepbufsiz = luaL_optunsigned(L, 1, DNS_P_QBUFSIZ);
	} else {
		data = luaL_checklstring(L, 1, &datasiz);
		prepbufsiz = luaL_optunsigned(L, 2, datasiz);
	}

	size = dns_p_calcsize(prepbufsiz);
	P = memset(lua_newuserdata(L, size), '\0', size);
	luaL_setmetatable(L, PACKET_CLASS);

	dns_p_init(P, size);

	if (data)
		pkt_reload(P, data, datasiz);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0xf260
testl %eax, %eax
jle 0x2082f
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfb80
testl %eax, %eax
je 0x20846
movl $0x160, %edx            # imm = 0x160
movq %rbx, %rdi
movl $0x1, %esi
callq 0xf400
xorl %r14d, %r14d
jmp 0x2086c
movq %rsp, %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xf620
movq %rax, %r14
movq (%r15), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0xf400
cmpq $0xd, %rax
movl $0xc, %r12d
cmovaeq %rax, %r12
addq $0x5c, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfb00
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xf750
leaq 0x1590f(%rip), %rsi     # 0x361af
movq %rbx, %rdi
callq 0x101f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x10a30
testq %r14, %r14
je 0x208c7
movq (%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2068a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: pkt_type
static int pkt_type(lua_State *L) {
	if (luaL_testudata(L, 1, PACKET_CLASS)) {
		lua_pushstring(L, "dns packet");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x158cc(%rip), %rdx     # 0x361af
movl $0x1, %esi
callq 0x10720
testq %rax, %rax
je 0x20903
leaq 0x15b45(%rip), %rsi     # 0x3643e
movq %rbx, %rdi
callq 0xfbd0
jmp 0x2090b
movq %rbx, %rdi
callq 0xf980
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_getns
static int resconf_getns(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	lua_newtable(L);

	for (unsigned i = 0; i < countof(resconf->nameserver); i++) {
		union { struct sockaddr_storage *other; struct sockaddr_in *in; struct sockaddr_in6 *in6; } any;
		char ns[INET6_ADDRSTRLEN + 1] = "";
		int port;

		any.other = &resconf->nameserver[i];

		switch (any.other->ss_family) {
		case AF_INET:
			inet_ntop(AF_INET, &any.in->sin_addr, ns, sizeof ns);
			port = ntohs(any.in->sin_port);
			break;
		case AF_INET6:
			inet_ntop(AF_INET6, &any.in6->sin6_addr, ns, sizeof ns);
			port = ntohs(any.in6->sin6_port);
			break;
		default:
			continue;
		}

		if (port && port != 53)
			lua_pushfstring(L, "[%s]:%d", ns, port);
		else
			lua_pushstring(L, ns);

		lua_rawseti(L, -2, i + 1);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x15827(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r13
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x101e0
movq %rsp, %r14
leaq 0x15ae6(%rip), %r15     # 0x364b1
xorl %r12d, %r12d
xorps %xmm0, %xmm0
movups %xmm0, 0x1f(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %r12, %rbp
shlq $0x7, %rbp
movzwl (%r13,%rbp), %edi
cmpl $0x2, %edi
je 0x20a02
cmpl $0xa, %edi
jne 0x20a3c
movl $0xa, %edi
movl $0x8, %esi
jmp 0x20a07
movl $0x4, %esi
addq %r13, %rbp
addq %rbp, %rsi
movq %r14, %rdx
movl $0x2f, %ecx
callq 0xfda0
movzwl 0x2(%rbp), %eax
rolw $0x8, %ax
testw %ax, %ax
je 0x20a2f
movzwl %ax, %ecx
cmpl $0x35, %ecx
jne 0x20a41
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfbd0
jmp 0x20a51
incq %r12
jmp 0x20a64
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xfff0
incq %r12
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0xfb20
cmpq $0x3, %r12
jne 0x209ce
movl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_setns
static int resconf_setns(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	luaL_checktype(L, 2, LUA_TTABLE);

	for (unsigned i = 0; i < countof(resconf->nameserver); i++) {
		const char *ns;
		int error;

		lua_rawgeti(L, 2, i + 1);

		if ((ns = luaL_optstring(L, -1, 0))) {
			if ((error = dns_resconf_pton(&resconf->nameserver[i], ns)))
				return luaL_error(L, "%s: %s", ns, cqs_strerror(error));
		} else {
			memset(&resconf->nameserver[i], 0, sizeof resconf->nameserver[i]);
			resconf->nameserver[i].ss_family = AF_UNSPEC;
		}

		lua_pop(L, 1);
	}

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x15734(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0xf6c0
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0xf450
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf8b0
testq %rax, %rax
je 0x20afa
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x10950
testl %eax, %eax
je 0x20b24
jmp 0x20b52
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10640
subq $-0x80, %r14
incq %r15
cmpq $0x4, %r15
jne 0x20ac0
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
jmp 0x20b9c
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x80, %edx
movl %eax, %edi
callq 0xf250
leaq 0x147a9(%rip), %rsi     # 0x35333
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xfd60
movl %eax, %ebp
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_getsearch
static int resconf_getsearch(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	lua_newtable(L);

	for (unsigned i = 0; i < countof(resconf->search) && *resconf->search[i]; i++) {
		lua_pushstring(L, resconf->search[i]);
		lua_rawseti(L, -2, i + 1);
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x15612(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movl $0x180, %r14d           # imm = 0x180
addq (%rax), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x101e0
movl $0x1, %r15d
cmpb $0x0, (%r14)
je 0x20c13
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfbd0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0xfb20
addq $0x100, %r14            # imm = 0x100
incq %r15
cmpq $0x5, %r15
jne 0x20be2
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_setsearch
static int resconf_setsearch(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	luaL_checktype(L, 2, LUA_TTABLE);

	for (unsigned i = 0; i < countof(resconf->search); i++) {
		const char *dn;

		lua_rawgeti(L, 2, i + 1);

		if ((dn = luaL_optstring(L, -1, 0))) {
			dns_strlcpy(resconf->search[i], dn, sizeof resconf->search[i]);
		} else {
			memset(resconf->search[i], 0, sizeof resconf->search[i]);
		}

		lua_pop(L, 1);
	}

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x155a2(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movl $0x180, %r14d           # imm = 0x180
addq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0xf6c0
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0xf450
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf8b0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
testq %rax, %rax
je 0x20c90
movq %rax, %rsi
callq 0xf4d0
jmp 0x20c97
xorl %esi, %esi
callq 0xf750
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10640
addq $0x100, %r14            # imm = 0x100
incq %r15
cmpq $0x5, %r15
jne 0x20c58
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_getlookup
static int resconf_getlookup(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	lua_newtable(L);

	for (unsigned i = 0; i < countof(resconf->lookup) && resconf->lookup[i]; i++) {
		switch (resconf->lookup[i]) {
		case 'f': case 'F':
			lua_pushliteral(L, "file");
			break;
		case 'b': case 'B':
			lua_pushliteral(L, "bind");
			break;
		case 'c': case 'C':
			lua_pushliteral(L, "cache");
			break;
		default:
			continue;
		}

		lua_rawseti(L, -2, i + 1);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x154ee(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x101e0
movabsq $0x100000001, %r13      # imm = 0x100000001
movabsq $0x200000002, %rbp      # imm = 0x200000002
movabsq $0x1000000010, %r12     # imm = 0x1000000010
movzbl 0x580(%r15,%r14), %eax
leal -0x42(%rax), %ecx
cmpl $0x24, %ecx
ja 0x20d45
btq %rcx, %r13
jb 0x20d4e
btq %rcx, %rbp
jb 0x20d57
btq %rcx, %r12
leaq 0x1830f(%rip), %rsi     # 0x39052
jb 0x20d5e
testl %eax, %eax
je 0x20d7f
incq %r14
jmp 0x20d79
leaq 0x182f7(%rip), %rsi     # 0x3904c
jmp 0x20d5e
leaq 0x182fa(%rip), %rsi     # 0x39058
movq %rbx, %rdi
callq 0xfbd0
incq %r14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0xfb20
cmpq $0x24, %r14
jne 0x20d1b
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_setlookup
static int resconf_setlookup(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	luaL_checktype(L, 2, LUA_TTABLE);

	memset(resconf->lookup, 0, sizeof resconf->lookup);

	for (unsigned i = 0; i < countof(resconf->lookup); i++) {
		const char *lu;

		lua_rawgeti(L, 2, i + 1);

		if ((lu = luaL_optstring(L, -1, 0))) {
			switch (*lu) {
			case 'f': case 'F':
				resconf->lookup[i] = 'f';
				break;
			case 'b': case 'B':
				resconf->lookup[i] = 'b';
				break;
			case 'c': case 'C':
				resconf->lookup[i] = 'c';
				break;
			}
		}

		lua_pop(L, 1);
	}

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x15427(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0xf6c0
leaq 0x580(%r14), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x590(%r14)
movups %xmm0, 0x580(%r14)
movl $0x0, 0x5a0(%r14)
xorl %r14d, %r14d
movabsq $0x100000001, %r12      # imm = 0x100000001
movabsq $0x200000002, %r13      # imm = 0x200000002
movq %r14, %rbp
incq %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0xf450
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf8b0
testq %rax, %rax
je 0x20e64
movzbl (%rax), %eax
addl $-0x42, %eax
cmpl $0x24, %eax
ja 0x20e64
btq %rax, %r12
jb 0x20e5e
btq %rax, %r13
jb 0x20e5a
movb $0x66, %cl
movabsq $0x1000000010, %rdx     # imm = 0x1000000010
btq %rax, %rdx
jb 0x20e60
jmp 0x20e64
movb $0x63, %cl
jmp 0x20e60
movb $0x62, %cl
movb %cl, (%r15,%rbp)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10640
cmpq $0x24, %r14
jne 0x20e03
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_getopts
static int resconf_getopts(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	lua_newtable(L);

	lua_pushboolean(L, resconf->options.edns0);
	lua_setfield(L, -2, "edns0");

	lua_pushinteger(L, resconf->options.ndots);
	lua_setfield(L, -2, "ndots");

	lua_pushinteger(L, resconf->options.timeout);
	lua_setfield(L, -2, "timeout");

	lua_pushinteger(L, resconf->options.attempts);
	lua_setfield(L, -2, "attempts");

	lua_pushboolean(L, resconf->options.rotate);
	lua_setfield(L, -2, "rotate");

	lua_pushboolean(L, resconf->options.recurse);
	lua_setfield(L, -2, "recurse");

	lua_pushboolean(L, resconf->options.smart);
	lua_setfield(L, -2, "smart");

	lua_pushinteger(L, resconf->options.tcp);
	lua_setfield(L, -2, "tcp");

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x15329(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x101e0
movzbl 0x5b0(%r14), %esi
movq %rbx, %rdi
callq 0x10800
leaq 0x181b1(%rip), %rdx     # 0x39087
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movl 0x5b4(%r14), %esi
movq %rbx, %rdi
callq 0xf910
leaq 0x155c0(%rip), %rdx     # 0x364b9
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movl 0x5b8(%r14), %esi
movq %rbx, %rdi
callq 0xf910
leaq 0x146f0(%rip), %rdx     # 0x3560c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movl 0x5bc(%r14), %esi
movq %rbx, %rdi
callq 0xf910
leaq 0x15580(%rip), %rdx     # 0x364bf
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movzbl 0x5c0(%r14), %esi
movq %rbx, %rdi
callq 0x10800
leaq 0x1812b(%rip), %rdx     # 0x3908e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movzbl 0x5c1(%r14), %esi
movq %rbx, %rdi
callq 0x10800
leaq 0x1810f(%rip), %rdx     # 0x39096
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movzbl 0x5c2(%r14), %esi
movq %rbx, %rdi
callq 0x10800
leaq 0x180f4(%rip), %rdx     # 0x3909f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movl 0x5c4(%r14), %esi
movq %rbx, %rdi
callq 0xf910
leaq 0x180d8(%rip), %rdx     # 0x390a6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf530
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_setopts
static int resconf_setopts(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);

	luaL_checktype(L, 2, LUA_TTABLE);

	resconf->options.edns0 = optfbool(L, 2, "edns0", resconf->options.edns0);
	resconf->options.ndots = optfint(L, 2, "ndots", resconf->options.ndots);
	resconf->options.timeout = optfint(L, 2, "timeout", resconf->options.timeout);
	resconf->options.attempts = optfint(L, 2, "attempts", resconf->options.attempts);
	resconf->options.rotate = optfbool(L, 2, "rotate", resconf->options.rotate);
	resconf->options.recurse = optfbool(L, 2, "recurse", resconf->options.recurse);
	resconf->options.smart = optfbool(L, 2, "smart", resconf->options.smart);
	resconf->options.tcp = optfint(L, 2, "tcp", resconf->options.tcp);

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x151d9(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0xf6c0
movzbl 0x5b0(%r14), %edx
leaq 0x18063(%rip), %rsi     # 0x39087
movq %rbx, %rdi
callq 0x2140c
movb %al, 0x5b0(%r14)
movl 0x5b4(%r14), %edx
leaq 0x15478(%rip), %rsi     # 0x364b9
movq %rbx, %rdi
callq 0x20442
movl %eax, 0x5b4(%r14)
movl 0x5b8(%r14), %edx
leaq 0x145ae(%rip), %rsi     # 0x3560c
movq %rbx, %rdi
callq 0x20442
movl %eax, 0x5b8(%r14)
movl 0x5bc(%r14), %edx
leaq 0x15444(%rip), %rsi     # 0x364bf
movq %rbx, %rdi
callq 0x20442
movl %eax, 0x5bc(%r14)
movzbl 0x5c0(%r14), %edx
leaq 0x17ff5(%rip), %rsi     # 0x3908e
movq %rbx, %rdi
callq 0x2140c
movb %al, 0x5c0(%r14)
movzbl 0x5c1(%r14), %edx
leaq 0x17fdf(%rip), %rsi     # 0x39096
movq %rbx, %rdi
callq 0x2140c
movb %al, 0x5c1(%r14)
movzbl 0x5c2(%r14), %edx
leaq 0x17fca(%rip), %rsi     # 0x3909f
movq %rbx, %rdi
callq 0x2140c
movb %al, 0x5c2(%r14)
movl 0x5c4(%r14), %edx
leaq 0x17fb4(%rip), %rsi     # 0x390a6
movq %rbx, %rdi
callq 0x20442
movl %eax, 0x5c4(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_getiface
static int resconf_getiface(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);
	union { struct sockaddr_storage *other; struct sockaddr_in *in; struct sockaddr_in6 *in6; } any;
	char ipbuf[INET6_ADDRSTRLEN + 1];
	const char *ip = 0;
	int port = 0;

	any.other = &resconf->iface;

	switch (any.other->ss_family) {
	case AF_INET:
		ip = inet_ntop(AF_INET, &any.in->sin_addr, ipbuf, sizeof ipbuf);
		port = ntohs(any.in->sin_port);
		break;
	case AF_INET6:
		ip = inet_ntop(AF_INET6, &any.in6->sin6_addr, ipbuf, sizeof ipbuf);
		port = ntohs(any.in6->sin6_port);
		break;
	}

	if (!ip)
		return 0;

	if (port && port != 53)
		lua_pushfstring(L, "[%s]:%d", ip, port);
	else
		lua_pushstring(L, ip);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x150a2(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movzwl 0x5c8(%r14), %edi
xorl %ebp, %ebp
cmpl $0x2, %edi
je 0x2115a
cmpl $0xa, %edi
jne 0x211b2
movl $0xa, %edi
movl $0x5d0, %esi            # imm = 0x5D0
jmp 0x2115f
movl $0x5cc, %esi            # imm = 0x5CC
addq %r14, %rsi
movq %rsp, %rdx
movl $0x2f, %ecx
callq 0xfda0
testq %rax, %rax
je 0x211b2
movzwl 0x5ca(%r14), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
testl %ecx, %ecx
je 0x2118c
cmpl $0x35, %ecx
jne 0x21199
movq %rbx, %rdi
movq %rax, %rsi
callq 0xfbd0
jmp 0x211ad
leaq 0x15311(%rip), %rsi     # 0x364b1
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfff0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_setiface
static int resconf_setiface(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);
	const char *ip = luaL_checkstring(L, 2);
	int error;

	if ((error = dns_resconf_pton(&resconf->iface, ip)))
		return luaL_error(L, "%s: %s", ip, cqs_strerror(error));

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x14ffb(%rip), %rdx     # 0x361cf
movl $0x1, %ebp
movl $0x1, %esi
callq 0xfcf0
movl $0x5c8, %r15d           # imm = 0x5C8
addq (%rax), %r15
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xf620
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x10950
testl %eax, %eax
je 0x21259
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x80, %edx
movl %eax, %edi
callq 0xf250
leaq 0x140ee(%rip), %rsi     # 0x35333
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xfd60
movl %eax, %ebp
jmp 0x21266
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_loadfile
static int resconf_loadfile(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);
	luaL_Stream *file = luaL_checkudata(L, 2, LUA_FILEHANDLE);
	int syntax = luaL_optint(L, 3, RESCONF_RESOLV_CONF);
	int error;

	switch (syntax) {
	case RESCONF_NSSWITCH_CONF:
		error = dns_nssconf_loadfile(resconf, file->f);
		break;
	default:
		error = dns_resconf_loadfile(resconf, file->f);
		break;
	}

	if (error)
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x14f48(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
leaq 0x14509(%rip), %rdx     # 0x357a4
movq %rbx, %rdi
movl $0x2, %esi
callq 0xfcf0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0xf400
movq (%r15), %rsi
movq %r14, %rdi
cmpl $0x1, %eax
jne 0x212cc
callq 0xf7d0
jmp 0x212d1
callq 0x10a00
movl %eax, %ebp
testl %eax, %eax
je 0x212f3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %ebp
jmp 0x21305
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_loadpath
static int resconf_loadpath(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);
	const char *path = luaL_checkstring(L, 2);
	int syntax = luaL_optint(L, 3, RESCONF_RESOLV_CONF);
	int error;

	switch (syntax) {
	case RESCONF_NSSWITCH_CONF:
		error = dns_nssconf_loadpath(resconf, path);
		break;
	default:
		error = dns_resconf_loadpath(resconf, path);
		break;
	}

	if (error)
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x14eac(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xf620
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0xf400
movq %r14, %rdi
movq %r15, %rsi
cmpl $0x1, %eax
jne 0x21363
callq 0xfc90
jmp 0x21368
callq 0xfac0
movl %eax, %ebp
testl %eax, %eax
je 0x2138a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %ebp
jmp 0x2139c
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_search
static int resconf_search(lua_State *L) {
	dns_resconf_i_t *i;

	resconf_check(L, 1);

	lua_settop(L, 2);
	luaL_checktype(L, 2, LUA_TSTRING);

	i = lua_newuserdata(L, sizeof *i);
	*i = 0;

	lua_pushcclosure(L, &resconf__next, 3);

	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x14e1b(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10640
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %edx
callq 0xf6c0
movl $0x8, %esi
movq %rbx, %rdi
callq 0xfb00
movq $0x0, (%rax)
leaq 0x65(%rip), %rsi        # 0x2145d
movq %rbx, %rdi
movl $0x3, %edx
callq 0x109f0
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf__next
static int resconf__next(lua_State *L) {
	struct dns_resolv_conf *resconf = *(struct dns_resolv_conf **)lua_touserdata(L, lua_upvalueindex(1));
	size_t len;
	const char *qn = lua_tolstring(L, lua_upvalueindex(2), &len);
	dns_resconf_i_t *i = lua_touserdata(L, lua_upvalueindex(3));
	char dn[DNS_D_MAXNAME + 1];

	if (!(len = dns_resconf_search(dn, sizeof dn, qn, len, resconf, i)))
		return 0;

	lua_pushlstring(L, dn, len);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x10350
movq (%rax), %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movl $0xfff0b9d6, %esi       # imm = 0xFFF0B9D6
movq %r15, %rdx
callq 0xf110
movq %rax, %r12
movq %rbx, %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x10350
movq (%r15), %rcx
leaq 0x10(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdx
movq %r14, %r8
movq %rax, %r9
callq 0x108a0
movq %rax, (%r15)
testq %rax, %rax
je 0x214da
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xf4c0
movl $0x1, %eax
jmp 0x214dc
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf__tostring
static int resconf__tostring(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_check(L, 1);
	char line[1024];
	luaL_Buffer B;
	FILE *fp;

	if (!(fp = tmpfile()))
		return luaL_error(L, "tmpfile: %s", cqs_strerror(errno));

	dns_resconf_dump(resconf, fp);

	luaL_buffinit(L, &B);

	rewind(fp);

	while (fgets(line, sizeof line, fp))
		luaL_addstring(&B, line);

	fclose(fp);

	luaL_pushresult(&B);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x24a0, %rsp           # imm = 0x24A0
movq %rdi, %rbx
leaq 0x14cce(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
callq 0x10200
testq %rax, %rax
je 0x215a8
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0xfe50
leaq 0x480(%rsp), %rsi
movq %rbx, %rdi
callq 0x10630
movq %r14, %rdi
callq 0xf150
leaq 0x80(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
je 0x2158c
leaq 0x480(%rsp), %rbx
leaq 0x80(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf850
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
jne 0x2156c
movq %r14, %rdi
callq 0xfce0
leaq 0x480(%rsp), %rdi
callq 0x10710
movl $0x1, %eax
jmp 0x215f2
callq 0xf0a0
movl (%rax), %edi
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movl $0x80, %edx
callq 0xf250
leaq 0x14e4d(%rip), %rsi     # 0x36432
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfd60
addq $0x24a0, %rsp           # imm = 0x24A0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf__gc
static int resconf__gc(lua_State *L) {
	struct dns_resolv_conf **resconf = luaL_checkudata(L, 1, RESCONF_CLASS);

	dns_resconf_close(*resconf);
	*resconf = 0;

	return 0;
}

// Assembly:
pushq %rbx
leaq 0x14bc8(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0xfcf0
movq %rax, %rbx
movq (%rax), %rdi
callq 0xfee0
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_new
static int resconf_new(lua_State *L) {
	struct dns_resolv_conf **resconf = lua_newuserdata(L, sizeof *resconf);
	int error;

	*resconf = 0;

	if (!(*resconf = dns_resconf_open(&error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, RESCONF_CLASS);

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0xfb00
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x4(%rsp), %rdi
callq 0xf740
movq %rax, (%r14)
testq %rax, %rax
je 0x2166a
leaq 0x14b74(%rip), %rsi     # 0x361cf
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x21686
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_stub
static int resconf_stub(lua_State *L) {
	struct dns_resolv_conf **resconf = lua_newuserdata(L, sizeof *resconf);
	int error;

	*resconf = 0;

	if (!(*resconf = dns_resconf_local(&error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, RESCONF_CLASS);

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0xfb00
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x4(%rsp), %rdi
callq 0xf2d0
movq %rax, (%r14)
testq %rax, %rax
je 0x216d1
leaq 0x14b0d(%rip), %rsi     # 0x361cf
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x216ed
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_root
static int resconf_root(lua_State *L) {
	struct dns_resolv_conf **resconf = lua_newuserdata(L, sizeof *resconf);
	int error;

	*resconf = 0;

	if (!(*resconf = dns_resconf_root(&error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, RESCONF_CLASS);

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0xfb00
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x4(%rsp), %rdi
callq 0xf5e0
movq %rax, (%r14)
testq %rax, %rax
je 0x21738
leaq 0x14aa6(%rip), %rsi     # 0x361cf
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x21754
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: resconf_type
static int resconf_type(lua_State *L) {
	if (resconf_test(L, 1)) {
		lua_pushstring(L, "dns config");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x149ea(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0x10720
testq %rax, %rax
je 0x2180b
cmpq $0x0, (%rax)
je 0x2180b
leaq 0x14cd1(%rip), %rsi     # 0x364d2
movq %rbx, %rdi
callq 0xfbd0
jmp 0x21813
movq %rbx, %rdi
callq 0xf980
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts_loadfile
static int hosts_loadfile(lua_State *L) {
	struct dns_hosts *hosts = hosts_check(L, 1);
	luaL_Stream *file = luaL_checkudata(L, 2, LUA_FILEHANDLE);
	int error;

	if ((error = dns_hosts_loadfile(hosts, file->f)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x149ec(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
leaq 0x13f68(%rip), %rdx     # 0x357a4
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0xfcf0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x10390
testl %eax, %eax
je 0x21877
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf910
jmp 0x21889
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts_loadpath
static int hosts_loadpath(lua_State *L) {
	struct dns_hosts *hosts = hosts_check(L, 1);
	const char *path = luaL_checkstring(L, 2);
	int error;

	if ((error = dns_hosts_loadpath(hosts, path)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x14976(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r14
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xf620
movq %r14, %rdi
movq %rax, %rsi
callq 0x10520
testl %eax, %eax
je 0x218e8
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0xf910
jmp 0x218fa
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts_insert
static int hosts_insert(lua_State *L) {
	struct dns_hosts *hosts = hosts_check(L, 1);
	const char *ip = luaL_checkstring(L, 2);
	const char *dn = luaL_checkstring(L, 3);
	_Bool alias = (!lua_isnoneornil(L, 4))? lua_toboolean(L, 4) : 0;
	union { struct sockaddr_storage other; struct sockaddr_in in; struct sockaddr_in6 in6; } any;
	int error;

	if ((error = dns_resconf_pton(&any.other, ip)))
		goto error;

	switch (any.other.ss_family) {
	case AF_INET:
		if ((error = dns_hosts_insert(hosts, AF_INET, &any.in.sin_addr, dn, alias)))
			goto error;
		break;
	case AF_INET6:
		if ((error = dns_hosts_insert(hosts, AF_INET6, &any.in6.sin6_addr, dn, alias)))
			goto error;
		break;
	default:
		break;
	}

	return lua_pushboolean(L, 1), 1;
error:
	return luaL_error(L, "%s: %s", ip, cqs_strerror(error));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq 0x148f8(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xf620
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0xf620
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0xf260
testl %eax, %eax
jle 0x21974
movq %rbx, %rdi
movl $0x4, %esi
callq 0xf540
testl %eax, %eax
setne %r13b
movq %rsp, %rdi
movq %r14, %rsi
callq 0x10950
testl %eax, %eax
je 0x219d4
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x80, %edx
movl %eax, %edi
callq 0xf250
leaq 0x13973(%rip), %rsi     # 0x35333
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xfd60
movl %eax, %ebp
jmp 0x21a28
movzwl (%rsp), %eax
cmpl $0xa, %eax
je 0x219f5
cmpl $0x2, %eax
jne 0x21a16
leaq 0x4(%rsp), %rdx
movzbl %r13b, %r8d
movq %r15, %rdi
movl $0x2, %esi
jmp 0x21a06
leaq 0x8(%rsp), %rdx
movzbl %r13b, %r8d
movq %r15, %rdi
movl $0xa, %esi
movq %r12, %rcx
callq 0xf720
testl %eax, %eax
jne 0x21983
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts__tostring
static int hosts__tostring(lua_State *L) {
	struct dns_hosts *hosts = hosts_check(L, 1);
	char line[1024];
	luaL_Buffer B;
	FILE *fp;

	if (!(fp = tmpfile()))
		return luaL_error(L, "tmpfile: %s", cqs_strerror(errno));

	dns_hosts_dump(hosts, fp);

	luaL_buffinit(L, &B);

	rewind(fp);

	while (fgets(line, sizeof line, fp))
		luaL_addstring(&B, line);

	fclose(fp);

	luaL_pushresult(&B);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x24a0, %rsp           # imm = 0x24A0
movq %rdi, %rbx
leaq 0x147c2(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
callq 0x10200
testq %rax, %rax
je 0x21af9
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x10300
leaq 0x480(%rsp), %rsi
movq %rbx, %rdi
callq 0x10630
movq %r14, %rdi
callq 0xf150
leaq 0x80(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
je 0x21add
leaq 0x480(%rsp), %rbx
leaq 0x80(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf850
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
jne 0x21abd
movq %r14, %rdi
callq 0xfce0
leaq 0x480(%rsp), %rdi
callq 0x10710
movl $0x1, %eax
jmp 0x21b43
callq 0xf0a0
movl (%rax), %edi
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movl $0x80, %edx
callq 0xf250
leaq 0x148fc(%rip), %rsi     # 0x36432
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfd60
addq $0x24a0, %rsp           # imm = 0x24A0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts__gc
static int hosts__gc(lua_State *L) {
	struct dns_hosts **hosts = luaL_checkudata(L, 1, HOSTS_CLASS);

	dns_hosts_close(*hosts);
	*hosts = 0;

	return 0;
}

// Assembly:
pushq %rbx
leaq 0x146bc(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0xfcf0
movq %rax, %rbx
movq (%rax), %rdi
callq 0x10730
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts_new
static int hosts_new(lua_State *L) {
	struct dns_hosts **hosts = lua_newuserdata(L, sizeof *hosts);
	int error;

	*hosts = 0;

	if (!(*hosts = dns_hosts_open(&error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, HOSTS_CLASS);

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0xfb00
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x4(%rsp), %rdi
callq 0xf790
movq %rax, (%r14)
testq %rax, %rax
je 0x21bbb
leaq 0x14668(%rip), %rsi     # 0x36214
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x21bd7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hosts_type
static int hosts_type(lua_State *L) {
	if (hosts_test(L, 1)) {
		lua_pushstring(L, "dns hosts");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x145ac(%rip), %rdx     # 0x36214
movl $0x1, %esi
callq 0x10720
testq %rax, %rax
je 0x21c8e
cmpq $0x0, (%rax)
je 0x21c8e
leaq 0x14860(%rip), %rsi     # 0x364e4
movq %rbx, %rdi
callq 0xfbd0
jmp 0x21c96
movq %rbx, %rdi
callq 0xf980
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints_insert
static int hints_insert(lua_State *L) {
	struct dns_hints *hints = hints_check(L, 1);
	const char *zone = luaL_checkstring(L, 2), *ns;
	int priority = luaL_optint(L, 4, 0);
	int error = 0;

	if (!lua_isnone(L, 3) && lua_isuserdata(L, 3)) {
		dns_hints_insert_resconf(hints, zone, resconf_check(L, 3), &error);
	} else {
		ns = luaL_checkstring(L, 3);
		struct sockaddr_storage any;

		if (!(error = dns_resconf_pton(&any, ns)))
			error = dns_hints_insert(hints, zone, (struct sockaddr *)&any, priority);
	}

	if (error)
		return luaL_error(L, "%s: %s", zone, cqs_strerror(error));

	return lua_pushboolean(L, 1), 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
leaq 0x14568(%rip), %rdx     # 0x3621e
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xf620
movq %rax, %r14
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0xf400
movq %rax, %r12
movl $0x0, 0xc(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0xf260
cmpl $-0x1, %eax
je 0x21d42
movq %rbx, %rdi
movl $0x3, %esi
callq 0x10690
testl %eax, %eax
je 0x21d42
leaq 0x144b6(%rip), %rdx     # 0x361cf
movq %rbx, %rdi
movl $0x3, %esi
callq 0xfcf0
movq (%rax), %rdx
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0xf870
movl (%r12), %eax
jmp 0x21d7d
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0xf620
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x10950
movl %eax, 0xc(%rsp)
testl %eax, %eax
jne 0x21d7d
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %ecx
callq 0xf930
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x21dd2
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x80, %edx
movl %eax, %edi
callq 0xf250
leaq 0x13575(%rip), %rsi     # 0x35333
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xfd60
movl %eax, %ebp
jmp 0x21de4
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x10800
movl %ebp, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints_grep
static int hints_grep(lua_State *L) {
	struct dns_hints_i *i;

	hints_check(L, 1);

	lua_settop(L, 2);
	i = memset(lua_newuserdata(L, sizeof *i), 0, sizeof *i);
	i->zone = luaL_optstring(L, 2, ".");

	lua_pushcclosure(L, &hints_next, 3);

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1441a(%rip), %rdx     # 0x3621e
movl $0x1, %esi
callq 0xfcf0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10640
movl $0x10, %esi
movq %rbx, %rdi
callq 0xfb00
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x170db(%rip), %rdx     # 0x38f13
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0xf8b0
movq %rax, (%r14)
leaq 0x1a(%rip), %rsi        # 0x21e6b
movq %rbx, %rdi
movl $0x3, %edx
callq 0x109f0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints_next
static int hints_next(lua_State *L) {
	struct dns_hints *hints = hints_check(L, lua_upvalueindex(1));
	struct dns_hints_i *i = lua_touserdata(L, lua_upvalueindex(3));
	union { struct sockaddr *sa; struct sockaddr_in *in; struct sockaddr_in6 *in6; } any;
	socklen_t salen;
	char ip[INET6_ADDRSTRLEN + 1] = "";
	int port;

	while (dns_hints_grep(&any.sa, &salen, 1, i, hints)) {
		switch (any.sa->sa_family) {
		case AF_INET:
			inet_ntop(AF_INET, &any.in->sin_addr, ip, sizeof ip);
			port = ntohs(any.in->sin_port);
			break;
		case AF_INET6:
			inet_ntop(AF_INET6, &any.in6->sin6_addr, ip, sizeof ip);
			port = ntohs(any.in6->sin6_port);
			break;
		default:
			continue;
		}

		if (port && port != 53)
			lua_pushfstring(L, "[%s]:%d", ip, port);
		else
			lua_pushstring(L, ip);

		return 1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x1439c(%rip), %rdx     # 0x3621e
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0xfcf0
movq (%rax), %r14
movq %rbx, %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x10350
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x2f(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rsp, %r12
leaq 0xc(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %edx
movq %r15, %rcx
movq %r14, %r8
callq 0x102c0
testl %eax, %eax
je 0x21ef0
movq (%rsp), %rsi
movzwl (%rsi), %eax
cmpl $0xa, %eax
je 0x21ef4
cmpl $0x2, %eax
jne 0x21eb9
movl $0x2, %edi
movl $0x4, %eax
jmp 0x21efe
xorl %eax, %eax
jmp 0x21f53
movl $0xa, %edi
movl $0x8, %eax
addq %rax, %rsi
leaq 0x10(%rsp), %rdx
movl $0x2f, %ecx
callq 0xfda0
movq (%rsp), %rax
movzwl 0x2(%rax), %eax
rolw $0x8, %ax
testw %ax, %ax
je 0x21f29
movzwl %ax, %ecx
cmpl $0x35, %ecx
jne 0x21f38
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xfbd0
jmp 0x21f4e
leaq 0x14572(%rip), %rsi     # 0x364b1
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfff0
movl $0x1, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints__tostring
static int hints__tostring(lua_State *L) {
	struct dns_hints *hints = hints_check(L, 1);
	char line[1024];
	luaL_Buffer B;
	FILE *fp;

	if (!(fp = tmpfile()))
		return luaL_error(L, "tmpfile: %s", cqs_strerror(errno));

	dns_hints_dump(hints, fp);

	luaL_buffinit(L, &B);

	rewind(fp);

	while (fgets(line, sizeof line, fp))
		luaL_addstring(&B, line);

	fclose(fp);

	luaL_pushresult(&B);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x24a0, %rsp           # imm = 0x24A0
movq %rdi, %rbx
leaq 0x142a7(%rip), %rdx     # 0x3621e
movl $0x1, %esi
callq 0xfcf0
movq (%rax), %r15
callq 0x10200
testq %rax, %rax
je 0x2201e
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x10840
leaq 0x480(%rsp), %rsi
movq %rbx, %rdi
callq 0x10630
movq %r14, %rdi
callq 0xf150
leaq 0x80(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
je 0x22002
leaq 0x480(%rsp), %rbx
leaq 0x80(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf850
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10550
testq %rax, %rax
jne 0x21fe2
movq %r14, %rdi
callq 0xfce0
leaq 0x480(%rsp), %rdi
callq 0x10710
movl $0x1, %eax
jmp 0x22068
callq 0xf0a0
movl (%rax), %edi
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movl $0x80, %edx
callq 0xf250
leaq 0x143d7(%rip), %rsi     # 0x36432
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfd60
addq $0x24a0, %rsp           # imm = 0x24A0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints__gc
static int hints__gc(lua_State *L) {
	struct dns_hints **hints = luaL_checkudata(L, 1, HINTS_CLASS);

	dns_hints_close(*hints);
	*hints = 0;

	return 0;
}

// Assembly:
pushq %rbx
leaq 0x141a1(%rip), %rdx     # 0x3621e
movl $0x1, %esi
callq 0xfcf0
movq %rax, %rbx
movq (%rax), %rdi
callq 0xfba0
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints_new
static int hints_new(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_test(L, 1);
	struct dns_hints **hints;
	int error;

	hints = lua_newuserdata(L, sizeof *hints);
	*hints = 0;

	if (!(*hints = dns_hints_open(resconf, &error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, HINTS_CLASS);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1411f(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0x10720
testq %rax, %rax
je 0x220c4
movq (%rax), %r14
jmp 0x220c7
xorl %r14d, %r14d
movl $0x8, %esi
movq %rbx, %rdi
callq 0xfb00
movq %rax, %r15
movq $0x0, (%rax)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0xf030
movq %rax, (%r15)
testq %rax, %rax
je 0x22109
leaq 0x14124(%rip), %rsi     # 0x3621e
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x22125
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/wahern[P]cqueues/src/dns.c
// Function: hints_root
static int hints_root(lua_State *L) {
	struct dns_resolv_conf *resconf = resconf_test(L, 1);
	struct dns_hints **hints;
	int error;

	hints = lua_newuserdata(L, sizeof *hints);
	*hints = 0;

	if (!(*hints = dns_hints_root(resconf, &error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, HINTS_CLASS);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1408d(%rip), %rdx     # 0x361cf
movl $0x1, %esi
callq 0x10720
testq %rax, %rax
je 0x22156
movq (%rax), %r14
jmp 0x22159
xorl %r14d, %r14d
movl $0x8, %esi
movq %rbx, %rdi
callq 0xfb00
movq %rax, %r15
movq $0x0, (%rax)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0xf220
movq %rax, (%r15)
testq %rax, %rax
je 0x2219b
leaq 0x14092(%rip), %rsi     # 0x3621e
movq %rbx, %rdi
callq 0x101f0
movl $0x1, %eax
jmp 0x221b7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10800
movslq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0xf910
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq