// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/dns.c
// Function: luaopen__cqueues_dns_packet
int luaopen__cqueues_dns_packet(lua_State *L) {
	static const struct cqs_macro section[] = {
		{ "QUESTION", DNS_S_QD }, { "ANSWER", DNS_S_AN },
		{ "AUTHORITY", DNS_S_NS }, { "ADDITIONAL", DNS_S_AR },
	};
	static const struct cqs_macro shortsec[] = {
		{ "QD", DNS_S_QD }, { "AN", DNS_S_AN },
		{ "NS", DNS_S_NS }, { "AR", DNS_S_AR },
	};
	static const struct cqs_macro opcode[] = {
		{ "QUERY", DNS_OP_QUERY }, { "IQUERY", DNS_OP_IQUERY },
		{ "STATUS", DNS_OP_STATUS }, { "NOTIFY", DNS_OP_NOTIFY },
		{ "UPDATE", DNS_OP_UPDATE },
	};
	static const struct cqs_macro rcode[] = {
		{ "NOERROR", DNS_RC_NOERROR }, { "FORMERR", DNS_RC_FORMERR },
		{ "SERVFAIL", DNS_RC_SERVFAIL }, { "NXDOMAIN", DNS_RC_NXDOMAIN },
		{ "NOTIMP", DNS_RC_NOTIMP }, { "REFUSED", DNS_RC_REFUSED },
		{ "YXDOMAIN", DNS_RC_YXDOMAIN }, { "YXRRSET", DNS_RC_YXRRSET },
		{ "NXRRSET", DNS_RC_NXRRSET }, { "NOTAUTH", DNS_RC_NOTAUTH },
		{ "NOTZONE", DNS_RC_NOTZONE },
	};
	static const struct cqs_macro other[] = {
		{ "QBUFSIZ", DNS_P_QBUFSIZ },
	};

	cqs_newmetatable(L, PACKET_CLASS, pkt_methods, pkt_metatable, 0);

	luaL_newlib(L, pkt_globals);

	lua_newtable(L);
	cqs_setmacros(L, -1, section, countof(section), 1);
	cqs_setmacros(L, -1, shortsec, countof(shortsec), 0);
	lua_setfield(L, -2, "section");

	lua_newtable(L);
	cqs_setmacros(L, -1, opcode, countof(opcode), 1);
	lua_setfield(L, -2, "opcode");

	lua_newtable(L);
	cqs_setmacros(L, -1, rcode, countof(rcode), 1);
	lua_setfield(L, -2, "rcode");

	cqs_setmacros(L, -1, other, countof(other), 0);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x22d10(%rip), %rsi     # 0x49397
leaq 0x33f62(%rip), %rdx     # 0x5a5f0
leaq 0x33ffb(%rip), %rcx     # 0x5a690
xorl %r8d, %r8d
callq 0x267e0
movq -0x8(%rbp), %rdi
movsd 0x21957(%rip), %xmm0    # 0x48000
movl $0x88, %esi
callq 0x106d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x10330
movq -0x8(%rbp), %rdi
leaq 0x33fe2(%rip), %rsi     # 0x5a6b0
xorl %edx, %edx
callq 0x10390
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x10330
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x33d6e(%rip), %rdx     # 0x5a460
movl $0x4, %ecx
movl $0x1, %r8d
callq 0x26490
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x33d8e(%rip), %rdx     # 0x5a4a0
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x26490
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x22c73(%rip), %rdx     # 0x493a2
callq 0xf580
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x10330
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x33d8f(%rip), %rdx     # 0x5a4e0
movl $0x5, %ecx
movl $0x1, %r8d
callq 0x26490
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x22c39(%rip), %rdx     # 0x493aa
callq 0xf580
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x10330
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x33d9d(%rip), %rdx     # 0x5a530
movl $0xb, %ecx
movl $0x1, %r8d
callq 0x26490
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x22bfe(%rip), %rdx     # 0x493b1
callq 0xf580
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x33e18(%rip), %rdx     # 0x5a5e0
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x26490
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq