LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_freestringlist
void freestringlist(lua_State *L, char** list, uint32_t count)
    {
    uint32_t i;
    if(!list)
        return;
    for(i=0; i<count; i++)
        Free(L, list[i]);
    Free(L, list);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x4f3b6
movq %rsi, %rbx
testl %edx, %edx
je 0x4f395
movl %edx, %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rsi
testq %rsi, %rsi
je 0x4f38d
movq 0x72025(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4f38d
movq 0x72021(%rip), %rdi     # 0xc13a8
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
incq %r15
cmpq %r15, %r14
jne 0x4f36b
movq 0x72004(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4f3b6
movq 0x72000(%rip), %rdi     # 0xc13a8
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushstringlist
void pushstringlist(lua_State *L, char** list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushstring(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4f412
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq -0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x1a2c0
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4f3e5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkuint32list
uint32_t* checkuint32list(lua_State *L, int arg, uint32_t *count, int *err)
    {
    uint32_t* list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }

    list = (uint32_t*)MallocNoErr(L, sizeof(uint32_t) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(!lua_isinteger(L, -1))
            { lua_pop(L, 1); Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        list[i] = lua_tointeger(L, -1);
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a0f0
testl %eax, %eax
jle 0x4f519
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a0f0
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x4f563
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a120
movl %eax, (%r14)
testl %eax, %eax
je 0x4f521
movq 0x71f27(%rip), %r8      # 0xc13a0
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
testq %r8, %r8
je 0x4f55c
movl %eax, %ecx
shlq $0x2, %rcx
movq 0x71f13(%rip), %rdi     # 0xc13a8
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, (%rsp)
callq *%r8
testq %rax, %rax
je 0x4f55c
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0x18b40
cmpl $0x0, (%r14)
je 0x4f569
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18970
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a5c0
testl %eax, %eax
je 0x4f529
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18630
movl %eax, (%r12,%rbx,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x4f4ca
jmp 0x4f569
movl $0x1, %r13d
jmp 0x4f563
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x4f563
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x71e5d(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4f558
movq 0x71e59(%rip), %rdi     # 0xc13a8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushuint32list
void pushuint32list(lua_State *L, uint32_t *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushinteger(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4f5d1
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movl -0x4(%rbx,%r15,4), %esi
movq %r14, %rdi
callq 0x18b50
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4f5a4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkbooleanlist
VkBool32* checkbooleanlist(lua_State *L, int arg, uint32_t *count, int *err)
    {
    VkBool32* list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }

    list = (VkBool32*)MallocNoErr(L, sizeof(VkBool32) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(!lua_isboolean(L, -1))
            { lua_pop(L, 1); Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        list[i] = lua_toboolean(L, -1);
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a0f0
testl %eax, %eax
jle 0x4f6d7
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a0f0
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x4f721
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a120
movl %eax, (%r14)
testl %eax, %eax
je 0x4f6df
movq 0x71d68(%rip), %r8      # 0xc13a0
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
testq %r8, %r8
je 0x4f71a
movl %eax, %ecx
shlq $0x2, %rcx
movq 0x71d54(%rip), %rdi     # 0xc13a8
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, (%rsp)
callq *%r8
testq %rax, %rax
je 0x4f71a
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0x18b40
cmpl $0x0, (%r14)
je 0x4f727
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18970
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a0f0
cmpl $0x1, %eax
jne 0x4f6e7
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18310
movl %eax, (%r12,%rbx,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x4f689
jmp 0x4f727
movl $0x1, %r13d
jmp 0x4f721
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x4f721
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x71c9f(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4f716
movq 0x71c9b(%rip), %rdi     # 0xc13a8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushbooleanlist
void pushbooleanlist(lua_State *L, VkBool32 *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushboolean(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4f78f
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movl -0x4(%rbx,%r15,4), %esi
movq %r14, %rdi
callq 0x193a0
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4f762
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkint32list
int32_t* checkint32list(lua_State *L, int arg, uint32_t *count, int *err)
    {
    int32_t* list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }

    list = (int32_t*)MallocNoErr(L, sizeof(int32_t) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(!lua_isinteger(L, -1))
            { lua_pop(L, 1); Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        list[i] = lua_tointeger(L, -1);
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a0f0
testl %eax, %eax
jle 0x4f896
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a0f0
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x4f8e0
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a120
movl %eax, (%r14)
testl %eax, %eax
je 0x4f89e
movq 0x71baa(%rip), %r8      # 0xc13a0
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
testq %r8, %r8
je 0x4f8d9
movl %eax, %ecx
shlq $0x2, %rcx
movq 0x71b96(%rip), %rdi     # 0xc13a8
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, (%rsp)
callq *%r8
testq %rax, %rax
je 0x4f8d9
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0x18b40
cmpl $0x0, (%r14)
je 0x4f8e6
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18970
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a5c0
testl %eax, %eax
je 0x4f8a6
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18630
movl %eax, (%r12,%rbx,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x4f847
jmp 0x4f8e6
movl $0x1, %r13d
jmp 0x4f8e0
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x4f8e0
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x71ae0(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4f8d5
movq 0x71adc(%rip), %rdi     # 0xc13a8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushint32list
void pushint32list(lua_State *L, int32_t *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushinteger(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4f94e
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movslq -0x4(%rbx,%r15,4), %rsi
movq %r14, %rdi
callq 0x18b50
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4f921
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkuint64list
uint64_t* checkuint64list(lua_State *L, int arg, uint32_t *count, int *err)
    {
    uint64_t* list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }

    list = (uint64_t*)MallocNoErr(L, sizeof(uint64_t) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(!lua_isinteger(L, -1))
            { lua_pop(L, 1); Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        list[i] = lua_tointeger(L, -1);
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a0f0
testl %eax, %eax
jle 0x4fa55
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a0f0
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x4fa9f
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a120
movl %eax, (%r14)
testl %eax, %eax
je 0x4fa5d
movq 0x719eb(%rip), %r8      # 0xc13a0
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
testq %r8, %r8
je 0x4fa98
movl %eax, %ecx
shlq $0x3, %rcx
movq 0x719d7(%rip), %rdi     # 0xc13a8
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, (%rsp)
callq *%r8
testq %rax, %rax
je 0x4fa98
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0x18b40
cmpl $0x0, (%r14)
je 0x4faa5
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18970
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a5c0
testl %eax, %eax
je 0x4fa65
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18630
movq %rax, (%r12,%rbx,8)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x4fa06
jmp 0x4faa5
movl $0x1, %r13d
jmp 0x4fa9f
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x4fa9f
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x71921(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4fa94
movq 0x7191d(%rip), %rdi     # 0xc13a8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushuint64list
void pushuint64list(lua_State *L, uint64_t *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushinteger(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4fb0d
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq -0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x18b50
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4fae0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkdevicesize
VkDeviceSize checkdevicesize(lua_State *L, int arg)
    {
    const char *s;
    if(lua_type(L, arg) == LUA_TSTRING)
        {
        s = lua_tostring(L, arg);
        if(strcmp(s, "whole size") == 0)
            return VK_WHOLE_SIZE;
        else
            return argerrorc(L, arg, ERR_VALUE);
        }
    return (VkDeviceSize)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a0f0
cmpl $0x4, %eax
jne 0x4fb5d
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18680
leaq 0x51029(%rip), %rsi     # 0xa0b65
movq %rax, %rdi
callq 0x18ff0
testl %eax, %eax
je 0x4fb6e
leaq 0x5106d(%rip), %rdx     # 0xa0bbc
movq %r14, %rdi
movl %ebx, %esi
callq 0x18410
cltq
jmp 0x4fb75
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x190e0
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushdevicesizelist
void pushdevicesizelist(lua_State *L, VkDeviceSize *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushinteger(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4fd75
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq -0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x18b50
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4fd48
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkfloatlist
float* checkfloatlist(lua_State *L, int arg, uint32_t *count, int *err)
    {
    float* list;
    uint32_t i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_EMPTY; return NULL; }

    list = (float*)MallocNoErr(L, sizeof(float) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(!lua_isnumber(L, -1))
            { lua_pop(L, 1); Free(L, list); *count = 0; *err = ERR_TYPE; return NULL; }
        list[i] = lua_tonumber(L, -1);
        lua_pop(L, 1);
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a0f0
testl %eax, %eax
jle 0x4fe82
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a0f0
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x4fecc
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a120
movl %eax, (%r14)
testl %eax, %eax
je 0x4fe8a
movq 0x715c4(%rip), %r8      # 0xc13a0
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
testq %r8, %r8
je 0x4fec5
movl %eax, %ecx
shlq $0x2, %rcx
movq 0x715b0(%rip), %rdi     # 0xc13a8
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, (%rsp)
callq *%r8
testq %rax, %rax
je 0x4fec5
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq (%rsp), %rdx
callq 0x18b40
cmpl $0x0, (%r14)
je 0x4fed2
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18970
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18c00
testl %eax, %eax
je 0x4fe92
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18ed0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%rbx,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x4fe2d
jmp 0x4fed2
movl $0x1, %r13d
jmp 0x4fecc
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x4fecc
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x714f4(%rip), %rax     # 0xc13a0
testq %rax, %rax
je 0x4fec1
movq 0x714f0(%rip), %rdi     # 0xc13a8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushfloatlist
void pushfloatlist(lua_State *L, float *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushnumber(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
testl %ebp, %ebp
je 0x4ff3f
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
xorps %xmm0, %xmm0
cvtss2sd -0x4(%rbx,%r15,4), %xmm0
movq %r14, %rdi
callq 0x19310
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19130
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x4ff0d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_testboolean
int testboolean(lua_State *L, int arg, int *err)
    {
    if(!lua_isboolean(L, arg))
        { *err = ERR_TYPE; return 0; }
    *err = 0;
    return lua_toboolean(L, arg); // ? VK_TRUE : VK_FALSE;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x1a0f0
cmpl $0x1, %eax
jne 0x5001a
movl $0x0, (%rbx)
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x18310
movl $0xfffffffe, (%rbx)     # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checksizeorwholesize
VkDeviceSize checksizeorwholesize(lua_State *L, int arg)
    {
    const char* s;
    if(lua_type(L, arg) == LUA_TSTRING)
        {
        s = lua_tostring(L, arg);
        if(strcmp(s, "whole size") != 0)
            return luaL_argerror(L, arg, badvalue(L, s));
        return VK_WHOLE_SIZE;
        }
    return (VkDeviceSize)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a0f0
cmpl $0x4, %eax
jne 0x500ac
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18680
movq %rax, %r15
leaq 0x50aea(%rip), %rsi     # 0xa0b65
movq %rax, %rdi
callq 0x18ff0
testl %eax, %eax
je 0x500bb
leaq 0x3e958(%rip), %rsi     # 0x8e9e6
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x18ea0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x18410
cltq
jmp 0x500c2
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x190e0
movq $-0x1, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_testtimeout
uint64_t testtimeout(lua_State *L, int arg, int *err)
    {
    const char* s;
    uint64_t val;
    int isnum;
    int t = lua_type(L, arg);
    *err = 0;
    switch(t)
        {
        case LUA_TNONE:
        case LUA_TNIL:
                return UINT64_MAX;
        case LUA_TSTRING:   
                s = lua_tostring(L, arg);
                if(strcmp(s, "blocking") == 0) return UINT64_MAX;
                break;
        case LUA_TNUMBER:
                val = lua_tointegerx(L, arg, &isnum);
                if(isnum) return val;
        default:
            break;
        }
    *err = ERR_VALUE;
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x1a0f0
movl $0x0, (%rbx)
movq $-0x1, %r14
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x50148
cmpl $0x3, %eax
je 0x50121
cmpl $0x4, %eax
jne 0x5013f
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x18680
leaq 0x50a6e(%rip), %rsi     # 0xa0b81
movq %rax, %rdi
callq 0x18ff0
testl %eax, %eax
jne 0x5013f
jmp 0x50148
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x18630
cmpl $0x0, (%r12)
je 0x5013f
movq %rax, %r14
jmp 0x50148
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checktimeout
uint64_t checktimeout(lua_State *L, int arg)
    {
    const char* s;
    int t = lua_type(L, arg);
    switch(t)
        {
        case LUA_TNONE:
        case LUA_TNIL:
                return UINT64_MAX;
        case LUA_TSTRING:   
                s = lua_tostring(L, arg);
                if(strcmp(s, "blocking") == 0) return UINT64_MAX;
                return luaL_argerror(L, arg, badvalue(L, s));
        default:
            break;
        }
    return (uint64_t)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a0f0
movq $-0x1, %r15
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x501c4
cmpl $0x4, %eax
jne 0x501d3
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18680
movq %rax, %r12
leaq 0x509ed(%rip), %rsi     # 0xa0b81
movq %rax, %rdi
callq 0x18ff0
testl %eax, %eax
je 0x501c4
leaq 0x3e83f(%rip), %rsi     # 0x8e9e6
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x18ea0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x18410
movslq %eax, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x190e0
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/validation_cache.c
// Function: MergeValidationCaches
static int MergeValidationCaches(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkValidationCacheEXT *source;
    VkValidationCacheEXT destination = checkvalidation_cache(L, 1, &ud);
    VkDevice device = ud->device;

    CheckDevicePfn(L, ud, MergeValidationCachesEXT);

    source = checkvalidation_cachelist(L, 2, &count, &err, NULL);
    if(err) return argerrorc(L, 2, err);

    ec = ud->ddt->MergeValidationCachesEXT(device, destination, count, source);
    Free(L, source);
    CheckError(L, ec);
    return 0;
# undef first
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3d9c8(%rip), %rcx     # 0x8df4b
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a4e0
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rcx
cmpq $0x0, 0x4f8(%rcx)
je 0x505f2
movq 0x20(%rax), %r12
leaq 0x3d997(%rip), %r9      # 0x8df4b
xorl %r14d, %r14d
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movl $0x2, %esi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x19140
movl (%rbp), %edi
testl %edi, %edi
je 0x50605
callq 0x19930
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x50649
leaq 0x50740(%rip), %rsi     # 0xa0d39
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
jmp 0x50649
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq *0x4f8(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182d0
testl %ebp, %ebp
je 0x5064c
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
movl %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/validation_cache.c
// Function: GetValidationCacheData
static int GetValidationCacheData(lua_State *L)
    {
    VkResult ec;
    size_t size;
    char *data;
    ud_t *ud;
    VkValidationCacheEXT validation_cache = checkvalidation_cache(L, 1, &ud);
    VkDevice device = ud->device;
    
    CheckDevicePfn(L, ud, GetValidationCacheDataEXT);

    /* first, get the size */
    ec = ud->ddt->GetValidationCacheDataEXT(device, validation_cache, &size, NULL);
    CheckError(L, ec);

    if(size == 0)
        {
        lua_pushstring(L, "");
        return 1;
        }
    
    data = (char*)Malloc(L, size);
    ec = ud->ddt->GetValidationCacheDataEXT(device, validation_cache, &size, data);
    if(ec)
        {
        Free(L, data);
        CheckError(L, ec); /* raises an error */
        return 0;
        }

    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x3d8d7(%rip), %rcx     # 0x8df4b
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq (%r15), %rcx
movq 0x50(%rcx), %rax
movq 0x500(%rax), %rax
testq %rax, %rax
je 0x506ca
movq 0x20(%rcx), %r15
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *%rax
testl %eax, %eax
je 0x506dd
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
jmp 0x50756
leaq 0x50696(%rip), %rsi     # 0xa0d67
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
jmp 0x50756
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x50726
movq %rbx, %rdi
callq 0x19200
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x500(%rax)
testl %eax, %eax
je 0x50737
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182d0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x506b8
leaq 0x463aa(%rip), %rsi     # 0x96ad7
movq %rbx, %rdi
callq 0x1a2c0
jmp 0x50751
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19760
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182d0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/validation_cache.c
// Function: freevalidation_cache
static int freevalidation_cache(lua_State *L, ud_t *ud)
    {
    VkValidationCacheEXT validation_cache = (VkValidationCacheEXT)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(validation_cache, "validation_cache");
    UD(device)->ddt->DestroyValidationCacheEXT(device, validation_cache, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x507b4
movq 0x6f845(%rip), %rax     # 0xbffc8
cmpl $0x0, (%rax)
je 0x50799
leaq 0x50588(%rip), %rdi     # 0xa0d17
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19e90
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x4f0(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/versions.c
// Function: VersionNumbers
static int VersionNumbers(lua_State *L)
/* major, minor, patch = version_numbers(ver) */
    {
    uint32_t ver = luaL_checkinteger(L, 1);
    lua_pushinteger(L, VK_API_VERSION_MAJOR(ver));
    lua_pushinteger(L, VK_API_VERSION_MINOR(ver));
    lua_pushinteger(L, VK_API_VERSION_PATCH(ver));
    lua_pushinteger(L, VK_API_VERSION_VARIANT(ver));
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x190e0
movq %rax, %r14
movl %r14d, %esi
shrl $0x16, %esi
andl $0x7f, %esi
movq %rbx, %rdi
callq 0x18b50
movl %r14d, %esi
shrl $0xc, %esi
andl $0x3ff, %esi            # imm = 0x3FF
movq %rbx, %rdi
callq 0x18b50
movl %r14d, %esi
andl $0xfff, %esi            # imm = 0xFFF
movq %rbx, %rdi
callq 0x18b50
shrl $0x1d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18b50
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/versions.c
// Function: VersionString
static int VersionString(lua_State *L)
/* "major.minor.patch" = version_string(ver) */
    {
    uint32_t ver = luaL_checkinteger(L, 1);
    lua_pushfstring(L, "%d.%d.%d", 
        VK_VERSION_MAJOR(ver), VK_VERSION_MINOR(ver), VK_VERSION_PATCH(ver));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x190e0
movl %eax, %edx
shrl $0x16, %edx
movl %eax, %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
andl $0xfff, %eax            # imm = 0xFFF
leaq 0x504b5(%rip), %rsi     # 0xa0e88
movq %rbx, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x18ea0
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/versions.c
// Function: MakeVersion
static int MakeVersion(lua_State *L)
/* ver = make_version(major, minor, patch, [variant=0]) */
    {
    uint32_t major = luaL_checkinteger(L, 1);
    uint32_t minor = luaL_checkinteger(L, 2);
    uint32_t patch = luaL_checkinteger(L, 3);
    uint32_t variant = luaL_optinteger(L, 4, 0);
    uint32_t version = VK_MAKE_API_VERSION(variant, major, minor, patch);
    lua_pushinteger(L, version);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x190e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190e0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190e0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x19400
shll $0x1d, %eax
shll $0x16, %r14d
shll $0xc, %r15d
orl %r14d, %r15d
orl %eax, %r12d
orl %r15d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b50
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/versions.c
// Function: EnumerateInstanceVersion
static int EnumerateInstanceVersion(lua_State *L)
    {
    VkResult ec;
    uint32_t version = VK_API_VERSION_1_0;
    if(vk.EnumerateInstanceVersion)
        {
        ec = vk.EnumerateInstanceVersion(&version);
        CheckError(L, ec);
        }
    lua_pushinteger(L, version);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x400000, 0xc(%rsp)    # imm = 0x400000
movq 0x6f54b(%rip), %rax     # 0xbffe0
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x50abf
leaq 0xc(%rsp), %rdi
callq *%rax
testl %eax, %eax
je 0x50ac6
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
jmp 0x50ad7
movl $0x400000, %esi         # imm = 0x400000
jmp 0x50aca
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x18b50
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: GetNumberDef_
static lua_Number GetNumberDef_(lua_State *L, int arg, const char *sname, lua_Number defval, int *err)
    {
    lua_Number val = defval;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(lua_isnumber(L, arg_)) val = lua_tonumber(L, arg_);
    else if(!lua_isnoneornil(L, arg_)) *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err) pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movsd %xmm0, (%rsp)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a2c0
movq %r14, %rdi
movl %ebp, %esi
callq 0x19670
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
movl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x18c00
movq %r14, %rdi
movl %ebp, %esi
testl %eax, %eax
je 0x50cf9
xorl %edx, %edx
callq 0x18ed0
movsd %xmm0, (%rsp)
jmp 0x50d09
callq 0x1a0f0
testl %eax, %eax
jle 0x50d09
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
movq %r14, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19700
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x50d48
callq 0x19930
leaq 0x502da(%rip), %rsi     # 0xa1012
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18ea0
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_znewarray
void* znewarray(lua_State *L, VkStructureType sType, size_t sz, uint32_t count, int *err)
/* Same as znew(), but for an array of contiguous structures. */
    {
    void *p = MallocNoErr(L, sz*count);
    if(p==NULL) { *err = ERR_MEMORY; return NULL; }
    if(sType != (VkStructureType)-1)
        {
        uint32_t i;
        uintptr_t pp = (uintptr_t)p;
        for(i=0; i < count; i++)
            {
            ((VkBaseOutStructure*)pp)->sType = sType;
            pp = pp + sz;
            }
        }
    *err = 0;
    return p;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %ebp
movl %ecx, %r12d
movq %r12, %rsi
imulq %rdx, %rsi
callq 0x18050
testq %rax, %rax
je 0x51176
cmpl $-0x1, %ebp
sete %cl
testl %r15d, %r15d
sete %dl
orb %cl, %dl
jne 0x51172
leaq 0x3(%r12), %rcx
andq $-0x4, %rcx
decq %r12
movq %r12, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%r14,%r14,2), %rdx
leaq (,%r14,4), %rsi
xorl %edi, %edi
movdqa 0x4fdff(%rip), %xmm1    # 0xa0ea0
movdqa 0x4fe07(%rip), %xmm2    # 0xa0eb0
movdqa 0x4fe0f(%rip), %xmm3    # 0xa0ec0
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rax, %r8
movq %rdi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r9d
notl %r9d
testb $0x1, %r9b
je 0x51104
movl %ebp, (%r8)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r9d
testb $0x1, %r9b
je 0x51118
movl %ebp, (%r14,%r8)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r9d
testb $0x1, %r9b
je 0x51152
movl %ebp, (%r8,%r14,2)
pextrw $0x4, %xmm5, %r9d
testb $0x1, %r9b
je 0x51162
movl %ebp, (%rdx,%r8)
addq $0x4, %rdi
addq %rsi, %r8
cmpq %rdi, %rcx
jne 0x510bc
xorl %ecx, %ecx
jmp 0x5117b
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
movl %ecx, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_zfreearray_untyped
void zfreearray_untyped(lua_State *L, const void *p, size_t sz, uint32_t count, int base, void (*clearfunc)(lua_State *L, const void *p))
    {
    size_t i;
    uintptr_t pp = (uintptr_t)p;
    if(!p) return;
    if(clearfunc)
        {
        for(i=0; i<count; i++)
            {
            clearfunc(L, (void*)pp);
            pp = pp + sz;
            }
        }
    if(base) Free(L, (void*)p);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x511e6
movq %r9, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
testq %r9, %r9
je 0x511c6
testl %ecx, %ecx
je 0x511c6
movq %rdx, %r12
movl %ecx, %ebp
movq %rbx, %r13
movq %r14, %rdi
movq %r13, %rsi
callq *%r15
addq %r12, %r13
decq %rbp
jne 0x511b5
cmpl $0x0, 0x4(%rsp)
je 0x511e6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x182d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: GetInteger_
static lua_Integer GetInteger_(lua_State *L, int arg, const char *sname, lua_Integer defval, int *err)
    {
    int isnum;
    lua_Integer val = defval;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(!lua_isnoneornil(L, arg_))
        {
        val = lua_tointegerx(L, arg_, &isnum);
        if(!isnum) *err = ERR_TYPE;
        }
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq %rdx, %rsi
callq 0x1a2c0
movq %r15, %rdi
movl %ebp, %esi
callq 0x19670
movq %r15, %rdi
callq 0x180a0
movl %eax, %ebp
movl $0x0, (%r12)
movq %r15, %rdi
movl %eax, %esi
callq 0x1a0f0
testl %eax, %eax
jle 0x512ec
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18630
movq %rax, %r14
cmpl $0x0, (%r13)
jne 0x512ec
movl $0xfffffffe, (%r12)     # imm = 0xFFFFFFFE
movq %r15, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19700
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x5132c
callq 0x19930
leaq 0x4fcf6(%rip), %rsi     # 0xa1012
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18ea0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: GetFlags_
static VkFlags64 GetFlags_(lua_State *L, int arg, const char *sname, int *err)
/* always opt., defaults to 0 */
    {
    int arg_ = pushfield(L, arg, sname);
    VkFlags64 flags = testflags(L, arg_, err);
    popfield(L, arg_);
    if(*err == ERR_NOTPRESENT) { *err=0; return 0; }
    if(*err) pushfielderror(sname);
    return flags;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a2c0
movq %r14, %rdi
movl %ebp, %esi
callq 0x19670
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a620
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19700
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x524e9
cmpl $0x1, %edi
jne 0x524cd
movl $0x0, (%r12)
xorl %r15d, %r15d
jmp 0x524e9
callq 0x19930
leaq 0x4eb39(%rip), %rsi     # 0xa1012
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18ea0
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_zfreearray
void zfreearray(lua_State *L, const void *p, size_t sz, uint32_t count, int base)
/* Same as zfree(), but for an array of contiguous structures. */
    {
    size_t i;
    uintptr_t pp = (uintptr_t)p;
    if(!p) return;
    for(i=0; i<count; i++)
        {
        zfreeaux(L, (void*)pp);
        pp = pp + sz;
        }
    if(base) Free(L, (void*)p);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x573c6
movl %r8d, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testl %ecx, %ecx
je 0x573a9
movq %rdx, %r15
movl %ecx, %r13d
movq %rbx, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x89f2f
addq %r15, %r12
decq %r13
jne 0x57396
testl %ebp, %ebp
je 0x573c6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x182d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: GetBoolean_
static int GetBoolean_(lua_State *L, int arg, const char *sname, int *err)
/* always opt., defaults to 0 (false) */
    {
    int val = 0;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(lua_isboolean(L, arg_))
        val = lua_toboolean(L, arg_);
    else if(!lua_isnoneornil(L, arg_))
        *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a2c0
movq %r14, %rdi
movl %ebp, %esi
callq 0x19670
movq %r14, %rdi
callq 0x180a0
movl %eax, %r12d
movl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x1a0f0
movq %r14, %rdi
movl %r12d, %esi
cmpl $0x1, %eax
jne 0x5823d
callq 0x18310
movl %eax, %ebp
jmp 0x5824f
callq 0x1a0f0
xorl %ebp, %ebp
testl %eax, %eax
jle 0x5824f
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
movq %r14, %rdi
movl %r12d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19700
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x5828f
callq 0x19930
leaq 0x48d93(%rip), %rsi     # 0xa1012
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18ea0
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/zcheck.c
// Function: ispresent_
static int ispresent_(lua_State *L, int arg, const char *sname)
#define ispresent(sname_) ispresent_(L, arg, (sname_))
/* Checks if field 'sname' is present in the table at arg */
    {
    int rc;
    lua_pushstring(L, sname);
    lua_rawget(L, arg);
    rc = lua_isnoneornil(L, -1) ? 0 : 1;
    lua_pop(L, 1);
    return rc;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a2c0
movq %r14, %rdi
movl %ebx, %esi
callq 0x19670
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a0f0
xorl %ebx, %ebx
testl %eax, %eax
setg %bl
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq