// File: stetre[P]moonvulkan/src/main.c
// Function: luaopen_moonvulkan
int luaopen_moonvulkan(lua_State *L)
/* Lua calls this function to load the module */
    {
    moonvulkan_L = L;

    moonvulkan_utils_init(L);
    atexit(AtExit);

    lua_newtable(L); /* the vk table */

    /* add vk functions: */
    moonvulkan_open_getproc(L);
    moonvulkan_open_versions(L);
    moonvulkan_open_tracing(L);
    moonvulkan_open_datahandling(L);
    moonvulkan_open_enums(L);
    moonvulkan_open_flags(L);
    moonvulkan_open_instance(L);
    moonvulkan_open_physical_device(L);
    moonvulkan_open_layers(L);
    moonvulkan_open_device(L);
    moonvulkan_open_queue(L);
    moonvulkan_open_command_pool(L);
    moonvulkan_open_command_buffer(L);
    moonvulkan_open_semaphore(L);
    moonvulkan_open_fence(L);
    moonvulkan_open_buffer(L);
    moonvulkan_open_device_memory(L);
    moonvulkan_open_image(L);
    moonvulkan_open_event(L);
    moonvulkan_open_buffer_view(L);
    moonvulkan_open_image_view(L);
    moonvulkan_open_shader_module(L);
    moonvulkan_open_sampler(L);
    moonvulkan_open_render_pass(L);
    moonvulkan_open_framebuffer(L);
    moonvulkan_open_descriptor_set_layout(L);
    moonvulkan_open_descriptor_pool(L);
    moonvulkan_open_pipeline_layout(L);
    moonvulkan_open_pipeline_cache(L);
    moonvulkan_open_query_pool(L);
    moonvulkan_open_descriptor_set(L);
    moonvulkan_open_pipeline(L);
    moonvulkan_open_cmd(L);
    moonvulkan_open_surface(L);
    moonvulkan_open_swapchain(L);
    moonvulkan_open_debug_report_callback(L);
    moonvulkan_open_display(L);
    moonvulkan_open_display_mode(L);
    moonvulkan_open_descriptor_update_template(L);
    moonvulkan_open_validation_cache(L);
    moonvulkan_open_sampler_ycbcr_conversion(L);
    moonvulkan_open_debug_utils_messenger(L);

    /* Add functions implemented in Lua */
    lua_pushvalue(L, -1); lua_setglobal(L, "moonvulkan");
    if(luaL_dostring(L, "require('moonvulkan.constructors')") != 0) lua_error(L);
    lua_pushnil(L);  lua_setglobal(L, "moonvulkan");

    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0xa2a0b(%rip), %rax     # 0xfcfa0
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
callq 0x18e20
leaq 0x257(%rip), %rdi       # 0x5a800
callq 0xce900
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movq 0x10(%rsp), %rdi
callq 0x19360
movq 0x10(%rsp), %rdi
callq 0x19d00
movq 0x10(%rsp), %rdi
callq 0x19ab0
movq 0x10(%rsp), %rdi
callq 0x18060
movq 0x10(%rsp), %rdi
callq 0x1a090
movq 0x10(%rsp), %rdi
callq 0x18090
movq 0x10(%rsp), %rdi
callq 0x189b0
movq 0x10(%rsp), %rdi
callq 0x19a70
movq 0x10(%rsp), %rdi
callq 0x18870
movq 0x10(%rsp), %rdi
callq 0x19450
movq 0x10(%rsp), %rdi
callq 0x1a360
movq 0x10(%rsp), %rdi
callq 0x1a570
movq 0x10(%rsp), %rdi
callq 0x1a5d0
movq 0x10(%rsp), %rdi
callq 0x189c0
movq 0x10(%rsp), %rdi
callq 0x1a3f0
movq 0x10(%rsp), %rdi
callq 0x18fc0
movq 0x10(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
callq 0x18a20
movq 0x10(%rsp), %rdi
callq 0x182e0
movq 0x10(%rsp), %rdi
callq 0x18b00
movq 0x10(%rsp), %rdi
callq 0x194c0
movq 0x10(%rsp), %rdi
callq 0x18320
movq 0x10(%rsp), %rdi
callq 0x1a6a0
movq 0x10(%rsp), %rdi
callq 0x18d90
movq 0x10(%rsp), %rdi
callq 0x19680
movq 0x10(%rsp), %rdi
callq 0x19a20
movq 0x10(%rsp), %rdi
callq 0x18450
movq 0x10(%rsp), %rdi
callq 0x19e10
movq 0x10(%rsp), %rdi
callq 0x199c0
movq 0x10(%rsp), %rdi
callq 0x19640
movq 0x10(%rsp), %rdi
callq 0x1a660
movq 0x10(%rsp), %rdi
callq 0x18c70
movq 0x10(%rsp), %rdi
callq 0x187e0
movq 0x10(%rsp), %rdi
callq 0x19720
movq 0x10(%rsp), %rdi
callq 0x184a0
movq 0x10(%rsp), %rdi
callq 0x199d0
movq 0x10(%rsp), %rdi
callq 0x19020
movq 0x10(%rsp), %rdi
callq 0x18890
movq 0x10(%rsp), %rdi
callq 0x18a70
movq 0x10(%rsp), %rdi
callq 0x19da0
movq 0x10(%rsp), %rdi
callq 0x19350
movq 0x10(%rsp), %rdi
callq 0x19f80
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18f40
movq 0x10(%rsp), %rdi
leaq 0x87e19(%rip), %rsi     # 0xe2594
callq 0x19030
movq 0x10(%rsp), %rdi
leaq 0x87e13(%rip), %rsi     # 0xe259f
callq 0x19e90
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, 0xf(%rsp)
jne 0x5a7c3
movq 0x10(%rsp), %rdi
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %r9d
movl %ecx, %esi
movq %r9, %r8
callq 0x1a600
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5a7db
movq 0x10(%rsp), %rdi
callq 0x19ad0
movq 0x10(%rsp), %rdi
callq 0x19e20
movq 0x10(%rsp), %rdi
leaq 0x87da3(%rip), %rsi     # 0xe2594
callq 0x19030
movl $0x1, %eax
addq $0x18, %rsp
retq