LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0xf740
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x5b0(%rax), %al
movl $0x2, %esi
leaq 0x23fbc(%rip), %rdx     # 0x4d5e7
andb $0x1, %al
movzbl %al, %ecx
callq 0x29c00
cmpl $0x0, %eax
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5b0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x5b4(%rax), %ecx
movl $0x2, %esi
leaq 0x2003f(%rip), %rdx     # 0x496a1
callq 0x284d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5b4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x5b8(%rax), %ecx
movl $0x2, %esi
leaq 0x1f153(%rip), %rdx     # 0x487e0
callq 0x284d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5b8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x5bc(%rax), %ecx
movl $0x2, %esi
leaq 0x1ffef(%rip), %rdx     # 0x496a7
callq 0x284d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5bc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x5c0(%rax), %al
movl $0x2, %esi
leaq 0x23f0b(%rip), %rdx     # 0x4d5ee
andb $0x1, %al
movzbl %al, %ecx
callq 0x29c00
cmpl $0x0, %eax
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5c0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x5c1(%rax), %al
movl $0x2, %esi
leaq 0x23edc(%rip), %rdx     # 0x4d5f6
andb $0x1, %al
movzbl %al, %ecx
callq 0x29c00
cmpl $0x0, %eax
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5c1(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x5c2(%rax), %al
movl $0x2, %esi
leaq 0x23eae(%rip), %rdx     # 0x4d5ff
andb $0x1, %al
movzbl %al, %ecx
callq 0x29c00
cmpl $0x0, %eax
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5c2(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x5c4(%rax), %ecx
movl $0x2, %esi
leaq 0x23e7e(%rip), %rdx     # 0x4d606
callq 0x284d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5c4(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x18(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movq -0x18(%rbp), %rax
addq $0x5c8, %rax            # imm = 0x5C8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x60(%rbp)
subl $0x2, %eax
je 0x29816
jmp 0x2980c
movl -0x60(%rbp), %eax
subl $0xa, %eax
je 0x2984a
jmp 0x2987c
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
leaq -0x50(%rbp), %rdx
movl $0x2, %edi
movl $0x2f, %ecx
callq 0xfeb0
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x10a80
movzwl %ax, %eax
movl %eax, -0x5c(%rbp)
jmp 0x2987c
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
leaq -0x50(%rbp), %rdx
movl $0xa, %edi
movl $0x2f, %ecx
callq 0xfeb0
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x10a80
movzwl %ax, %eax
movl %eax, -0x5c(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x2988c
movl $0x0, -0x4(%rbp)
jmp 0x298c7
cmpl $0x0, -0x5c(%rbp)
je 0x298b3
cmpl $0x35, -0x5c(%rbp)
je 0x298b3
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rdx
movl -0x5c(%rbp), %ecx
leaq 0x1fdef(%rip), %rsi     # 0x49699
movb $0x0, %al
callq 0x10130
jmp 0x298c0
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xfcc0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movq -0x20(%rbp), %rsi
callq 0x10b50
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x29990
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xbc(%rbp)
leaq -0xa4(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0xbc(%rbp), %edi
leaq -0xa4(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rdx
movq %rax, %rcx
leaq 0x1ea23(%rip), %rsi     # 0x483a7
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
jmp 0x299a5
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1ef8f(%rip), %rdx     # 0x48978
movl $0x2, %esi
callq 0xfe00
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %esi
callq 0xf450
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
subl $0x1, %eax
jne 0x29a2b
jmp 0x29a16
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0xf850
movl %eax, -0x28(%rbp)
jmp 0x29a3e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x10c00
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x29a65
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x29a7a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x30(%rbp)
movl $0x2, %esi
callq 0xf6a0
movq -0x30(%rbp), %rdx
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0xf450
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
subl $0x1, %eax
jne 0x29af9
jmp 0x29ae7
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xfd90
movl %eax, -0x28(%rbp)
jmp 0x29b09
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xfba0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x29b30
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x29b45
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x107f0
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movl $0x4, %edx
callq 0xf740
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rdi
leaq 0xdd(%rip), %rsi        # 0x29c90
movl $0x3, %edx
callq 0x10bf0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: optfbool
static int optfbool(lua_State *L, int t, const char *k, _Bool def) {
	_Bool b;

	lua_getfield(L, t, k);
	b = (lua_isnil(L, -1))? def : lua_toboolean(L, -1);
	lua_pop(L, 1);

	return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0xf200
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf280
cmpl $0x0, %eax
jne 0x29c4a
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x29c5b
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf590
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1a(%rbp)
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
movb -0x1a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x104b0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d6, %esi       # imm = 0xFFF0B9D6
leaq -0x20(%rbp), %rdx
callq 0xf130
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x104b0
movq %rax, -0x30(%rbp)
leaq -0x130(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x30(%rbp), %r9
movl $0x100, %esi            # imm = 0x100
callq 0x10aa0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x29d10
movl $0x0, -0x4(%rbp)
jmp 0x29d2b
movq -0x10(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xf510
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x24e0, %rsp           # imm = 0x24E0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29bd0
movq %rax, -0x18(%rbp)
callq 0x10350
movq %rax, -0x2448(%rbp)
cmpq $0x0, %rax
jne 0x29dd2
movq -0x10(%rbp), %rax
movq %rax, -0x24d0(%rbp)
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x24d4(%rbp)
leaq -0x24c8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x24d4(%rbp), %edi
leaq -0x24c8(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x24d0(%rbp), %rdi
movq %rax, %rdx
leaq 0x1f854(%rip), %rsi     # 0x4961a
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
jmp 0x29e50
movq -0x18(%rbp), %rdi
movq -0x2448(%rbp), %rsi
callq 0xff60
movq -0x10(%rbp), %rdi
leaq -0x2440(%rbp), %rsi
callq 0x107e0
movq -0x2448(%rbp), %rdi
callq 0xf170
leaq -0x420(%rbp), %rdi
movq -0x2448(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x106f0
cmpq $0x0, %rax
je 0x29e31
leaq -0x420(%rbp), %rsi
leaq -0x2440(%rbp), %rdi
callq 0xf8e0
jmp 0x29dfe
movq -0x2448(%rbp), %rdi
callq 0xfdf0
leaq -0x2440(%rbp), %rdi
callq 0x108d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x24e0, %rsp           # imm = 0x24E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1f53b(%rip), %rdx     # 0x493b7
callq 0xfe00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfff0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
leaq -0x1c(%rbp), %rdi
callq 0xf7c0
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x29f10
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x29f27
movq -0x10(%rbp), %rdi
leaq 0x1f49c(%rip), %rsi     # 0x493b7
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
leaq -0x1c(%rbp), %rdi
callq 0xf310
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x29f90
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x29fa7
movq -0x10(%rbp), %rdi
leaq 0x1f41c(%rip), %rsi     # 0x493b7
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
leaq -0x1c(%rbp), %rdi
callq 0xf660
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2a010
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2a027
movq -0x10(%rbp), %rdi
leaq 0x1f39c(%rip), %rsi     # 0x493b7
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2a0b0
cmpq $0x0, %rax
je 0x2a092
movq -0x8(%rbp), %rdi
leaq 0x1f62f(%rip), %rsi     # 0x496ba
callq 0xfcc0
jmp 0x2a09b
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a3f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
leaq 0x1e84a(%rip), %rdx     # 0x48978
callq 0xfe00
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x104f0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x2a170
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2a185
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a3f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x106c0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x2a1fa
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2a20f
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a3f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xf280
cmpl $0x0, %eax
jle 0x2a296
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xf590
movl %eax, -0x138(%rbp)
jmp 0x2a2a0
xorl %eax, %eax
movl %eax, -0x138(%rbp)
jmp 0x2a2a0
movl -0x138(%rbp), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x20(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x10b50
movl %eax, -0xb4(%rbp)
cmpl $0x0, %eax
je 0x2a2d1
jmp 0x2a375
movzwl -0xb0(%rbp), %eax
movl %eax, -0x13c(%rbp)
subl $0x2, %eax
je 0x2a2f2
jmp 0x2a2e5
movl -0x13c(%rbp), %eax
subl $0xa, %eax
je 0x2a327
jmp 0x2a35c
movq -0x18(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
addq $0x4, %rdx
movq -0x28(%rbp), %rcx
movb -0x29(%rbp), %al
movl $0x2, %esi
andb $0x1, %al
movzbl %al, %r8d
callq 0xf7a0
movl %eax, -0xb4(%rbp)
cmpl $0x0, %eax
je 0x2a325
jmp 0x2a375
jmp 0x2a35e
movq -0x18(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
addq $0x8, %rdx
movq -0x28(%rbp), %rcx
movb -0x29(%rbp), %al
movl $0xa, %esi
andb $0x1, %al
movzbl %al, %r8d
callq 0xf7a0
movl %eax, -0xb4(%rbp)
cmpl $0x0, %eax
je 0x2a35a
jmp 0x2a375
jmp 0x2a35e
jmp 0x2a35e
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
jmp 0x2a3e3
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x154(%rbp)
leaq -0x134(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x154(%rbp), %edi
leaq -0x134(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rdx
movq %rax, %rcx
leaq 0x1dfce(%rip), %rsi     # 0x483a7
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x24e0, %rsp           # imm = 0x24E0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a3f0
movq %rax, -0x18(%rbp)
callq 0x10350
movq %rax, -0x2448(%rbp)
cmpq $0x0, %rax
jne 0x2a4b2
movq -0x10(%rbp), %rax
movq %rax, -0x24d0(%rbp)
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x24d4(%rbp)
leaq -0x24c8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x24d4(%rbp), %edi
leaq -0x24c8(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x24d0(%rbp), %rdi
movq %rax, %rdx
leaq 0x1f174(%rip), %rsi     # 0x4961a
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
jmp 0x2a530
movq -0x18(%rbp), %rdi
movq -0x2448(%rbp), %rsi
callq 0x10460
movq -0x10(%rbp), %rdi
leaq -0x2440(%rbp), %rsi
callq 0x107e0
movq -0x2448(%rbp), %rdi
callq 0xf170
leaq -0x420(%rbp), %rdi
movq -0x2448(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x106f0
cmpq $0x0, %rax
je 0x2a511
leaq -0x420(%rbp), %rsi
leaq -0x2440(%rbp), %rdi
callq 0xf8e0
jmp 0x2a4de
movq -0x2448(%rbp), %rdi
callq 0xfdf0
leaq -0x2440(%rbp), %rdi
callq 0x108d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x24e0, %rsp           # imm = 0x24E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1eea0(%rip), %rdx     # 0x493fc
callq 0xfe00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x108f0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
leaq -0x1c(%rbp), %rdi
callq 0xf810
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2a5f0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2a607
movq -0x10(%rbp), %rdi
leaq 0x1ee01(%rip), %rsi     # 0x493fc
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2a690
cmpq $0x0, %rax
je 0x2a672
movq -0x8(%rbp), %rdi
leaq 0x1f061(%rip), %rsi     # 0x496cc
callq 0xfcc0
jmp 0x2a67b
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a920
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf450
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0xf280
cmpl $-0x1, %eax
je 0x2a799
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x10840
cmpl $0x0, %eax
je 0x2a799
movq -0x18(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x29bd0
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
movq %rax, %rdx
leaq -0x30(%rbp), %rcx
callq 0xf900
jmp 0x2a7e3
movq -0x10(%rbp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x10b50
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jne 0x2a7e1
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %ecx
leaq -0xb0(%rbp), %rdx
callq 0xf9c0
movl %eax, -0x30(%rbp)
jmp 0x2a7e3
cmpl $0x0, -0x30(%rbp)
je 0x2a856
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x154(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x154(%rbp), %edi
leaq -0x130(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rdx
movq %rax, %rcx
leaq 0x1db5d(%rip), %rsi     # 0x483a7
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
jmp 0x2a86b
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2a920
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x107f0
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0xfbe0
movq %rax, %rdi
movq %rdi, -0x18(%rbp)
xorl %esi, %esi
movl $0x10, %edx
callq 0xf7d0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x22b92(%rip), %rdx     # 0x4d473
xorl %eax, %eax
movl %eax, %ecx
callq 0xf940
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x51(%rip), %rsi        # 0x2a950
movl $0x3, %edx
callq 0x10bf0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d7, %esi       # imm = 0xFFF0B9D7
callq 0x2a920
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d5, %esi       # imm = 0xFFF0B9D5
callq 0x104b0
movq %rax, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x2f, %edx
callq 0xf7d0
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movl $0x1, %edx
callq 0x10420
cmpl $0x0, %eax
je 0x2aa70
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x68(%rbp)
subl $0x2, %eax
je 0x2a9ce
jmp 0x2a9c4
movl -0x68(%rbp), %eax
subl $0xa, %eax
je 0x2a9fe
jmp 0x2aa2e
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
leaq -0x60(%rbp), %rdx
movl $0x2, %edi
movl $0x2f, %ecx
callq 0xfeb0
movq -0x28(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x10a80
movzwl %ax, %eax
movl %eax, -0x64(%rbp)
jmp 0x2aa33
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
leaq -0x60(%rbp), %rdx
movl $0xa, %edi
movl $0x2f, %ecx
callq 0xfeb0
movq -0x28(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x10a80
movzwl %ax, %eax
movl %eax, -0x64(%rbp)
jmp 0x2aa33
jmp 0x2a990
cmpl $0x0, -0x64(%rbp)
je 0x2aa5a
cmpl $0x35, -0x64(%rbp)
je 0x2aa5a
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movl -0x64(%rbp), %ecx
leaq 0x1ec48(%rip), %rsi     # 0x49699
movb $0x0, %al
callq 0x10130
jmp 0x2aa67
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xfcc0
movl $0x1, -0x4(%rbp)
jmp 0x2aa77
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x24e0, %rsp           # imm = 0x24E0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a920
movq %rax, -0x18(%rbp)
callq 0x10350
movq %rax, -0x2448(%rbp)
cmpq $0x0, %rax
jne 0x2ab12
movq -0x10(%rbp), %rax
movq %rax, -0x24d0(%rbp)
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x24d4(%rbp)
leaq -0x24c8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x24d4(%rbp), %edi
leaq -0x24c8(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x24d0(%rbp), %rdi
movq %rax, %rdx
leaq 0x1eb14(%rip), %rsi     # 0x4961a
movb $0x0, %al
callq 0xfe70
movl %eax, -0x4(%rbp)
jmp 0x2ab90
movq -0x18(%rbp), %rdi
movq -0x2448(%rbp), %rsi
callq 0x10a20
movq -0x10(%rbp), %rdi
leaq -0x2440(%rbp), %rsi
callq 0x107e0
movq -0x2448(%rbp), %rdi
callq 0xf170
leaq -0x420(%rbp), %rdi
movq -0x2448(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x106f0
cmpq $0x0, %rax
je 0x2ab71
leaq -0x420(%rbp), %rsi
leaq -0x2440(%rbp), %rdi
callq 0xf8e0
jmp 0x2ab3e
movq -0x2448(%rbp), %rdi
callq 0xfdf0
leaq -0x2440(%rbp), %rdi
callq 0x108d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x24e0, %rsp           # imm = 0x24E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1e84a(%rip), %rdx     # 0x49406
callq 0xfe00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfc90
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a0b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0xf030
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2ac66
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2ac7d
movq -0x10(%rbp), %rdi
leaq 0x1e795(%rip), %rsi     # 0x49406
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a0b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0xf240
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2ad06
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2ad1d
movq -0x10(%rbp), %rdi
leaq 0x1e6f5(%rip), %rsi     # 0x49406
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: hints_stub
static int hints_stub(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_local(resconf, &error)))
		return lua_pushboolean(L, 0), lua_pushinteger(L, error), 2;

	luaL_setmetatable(L, HINTS_CLASS);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2a0b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0xfbe0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0xf260
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x2ada6
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2adbd
movq -0x10(%rbp), %rdi
leaq 0x1e655(%rip), %rsi     # 0x49406
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: hints_type
static int hints_type(lua_State *L) {
	if (hints_test(L, 1)) {
		lua_pushstring(L, "dns hints");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ae50
cmpq $0x0, %rax
je 0x2ae32
movq -0x8(%rbp), %rdi
leaq 0x1e8ab(%rip), %rsi     # 0x496d6
callq 0xfcc0
jmp 0x2ae3b
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_submit
static int res_submit(lua_State *L) {
	struct dns_resolver *R = res_check(L, 1);
	const char *name = luaL_checkstring(L, 2);
	int type = luaL_optint(L, 3, DNS_T_A);
	int class = luaL_optint(L, 4, DNS_C_IN);
	int error;

	if (!(error = dns_res_submit(R, name, type, class))) {
		lua_pushboolean(L, 1);

		return 1;
	} else {
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2b4a0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0xf450
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf450
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
callq 0xf380
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x2af32
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
jmp 0x2af51
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_fetch
static int res_fetch(lua_State *L) {
	struct dns_resolver *R = res_check(L, 1);
	struct dns_packet *pkt;
	size_t size;
	int error;

	if ((error = dns_res_check(R)) || !(pkt = dns_res_fetch(R, &error))) {
error:
		lua_pushboolean(L, 0);
		lua_pushinteger(L, error);

		return 2;
	}

	/* FIXME: Leaks packet if lua_newuserdata throws */
	size = dns_p_sizeof(pkt);
	error = dns_p_study(dns_p_copy(dns_p_init(lua_newuserdata(L, size), size), pkt));
	free(pkt);

	if (error)
		goto error;

	luaL_setmetatable(L, PACKET_CLASS);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2b4a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf560
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x2afa6
movq -0x18(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x101b0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x2afcc
jmp 0x2afa8
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0xf9a0
movl $0x2, -0x4(%rbp)
jmp 0x2b059
movq -0x20(%rbp), %rcx
movl $0xc, %eax
cmpq 0x50(%rcx), %rax
jbe 0x2afe6
movl $0xc, %eax
movq %rax, -0x38(%rbp)
jmp 0x2aff2
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x5c, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xfbe0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x10c30
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x10300
movq %rax, %rdi
callq 0xf820
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10060
cmpl $0x0, -0x2c(%rbp)
je 0x2b042
jmp 0x2afa8
movq -0x10(%rbp), %rdi
leaq 0x1e34a(%rip), %rsi     # 0x49397
callq 0x10340
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_events
static int res_events(lua_State *L) {
	struct dns_resolver *R = res_check(L, 1);

	switch (dns_res_events(R)) {
	case POLLIN|POLLOUT:
		lua_pushliteral(L, "rw");
		break;
	case POLLIN:
		lua_pushliteral(L, "r");
		break;
	case POLLOUT:
		lua_pushliteral(L, "w");
		break;
	default:
		lua_pushnil(L);
		break;
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2b4a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf880
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
subl $0x1, %eax
je 0x2b119
jmp 0x2b0f3
movl -0x14(%rbp), %eax
subl $0x4, %eax
je 0x2b12b
jmp 0x2b0fd
movl -0x14(%rbp), %eax
subl $0x5, %eax
jne 0x2b13d
jmp 0x2b107
movq -0x8(%rbp), %rdi
leaq 0x1d7cf(%rip), %rsi     # 0x488e1
callq 0xfcc0
jmp 0x2b146
movq -0x8(%rbp), %rdi
leaq 0x1d72c(%rip), %rsi     # 0x48850
callq 0xfcc0
jmp 0x2b146
movq -0x8(%rbp), %rdi
leaq 0x1d089(%rip), %rsi     # 0x481bf
callq 0xfcc0
jmp 0x2b146
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_close
static int res_close(lua_State *L) {
	struct resolver *R = luaL_checkudata(L, 1, RESOLVER_CLASS);

	if (!R->mainthread) {
		R->mainthread = L;
		dns_res_close(R->res);
		R->res = 0;
		R->mainthread = 0;
	} else {
		dns_res_close(R->res);
		R->res = 0;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1dfe8(%rip), %rdx     # 0x49424
callq 0xfe00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2b481
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfef0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
jmp 0x2b498
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfef0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_check
static inline struct dns_resolver *res_check(lua_State *L, int index) {
	struct resolver *R = luaL_checkudata(L, index, RESOLVER_CLASS);

	if (!R->res)
		luaL_argerror(L, index, "resolver defunct");

	return R->res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x1df67(%rip), %rdx     # 0x49424
callq 0xfe00
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2b4e3
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x1e20f(%rip), %rdx     # 0x496ed
callq 0xf440
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res__gc
static int res__gc(lua_State *L) {
	struct resolver *R = luaL_checkudata(L, 1, RESOLVER_CLASS);

	R->mainthread = 0;

	dns_res_close(R->res);
	R->res = 0;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1df18(%rip), %rdx     # 0x49424
callq 0xfe00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfef0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: res_type
static int res_type(lua_State *L) {
	struct resolver *R;

	if ((R = luaL_testudata(L, 1, RESOLVER_CLASS))) {
		lua_pushstring(L, (R->res)? "dns resolver" : "closed dns resolver");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x1dcc8(%rip), %rdx     # 0x49424
callq 0x108e0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x2b793
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x1df8d(%rip), %rsi     # 0x4970a
leaq 0x1df8d(%rip), %rax     # 0x49711
cmpq $0x0, %rcx
cmovneq %rax, %rsi
callq 0xfcc0
jmp 0x2b79c
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)