LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x0, %eax
jg 0x68f89
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
movq $0x0, 0x30(%rsp)
jmp 0x69108
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x5, %eax
je 0x68fb5
movq 0x10(%rsp), %rax
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movq $0x0, 0x30(%rsp)
jmp 0x69108
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a270
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x68fef
movq 0x10(%rsp), %rax
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
movq $0x0, 0x30(%rsp)
jmp 0x69108
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x18050
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x69037
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0xfffffffa, (%rax)     # imm = 0xFFFFFFFA
movq $0x0, 0x30(%rsp)
jmp 0x69108
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl (%rcx), %eax
jae 0x690fe
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x189e0
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a720
cmpl $0x0, %eax
jne 0x690bc
movq 0x28(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x18300
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq $0x0, 0x30(%rsp)
jmp 0x69108
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x18690
movq %rax, %rdx
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x28(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x6903f
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jae 0x6918a
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x191e0
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x69147
addq $0x18, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x4, %eax
jne 0x6921e
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x7a983(%rip), %rsi     # 0xe3b56
callq 0x190a0
cmpl $0x0, %eax
jne 0x691e8
movq $-0x1, 0x30(%rsp)
jmp 0x69231
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movl $0xfffffffd, %edi       # imm = 0xFFFFFFFD
callq 0x19a60
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq %rax, %rdx
callq 0x18460
cltq
movq %rax, 0x30(%rsp)
jmp 0x69231
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x19190
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jae 0x694fa
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x191e0
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x694b7
addq $0x18, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x0, %eax
jg 0x69559
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
movq $0x0, 0x30(%rsp)
jmp 0x696da
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x5, %eax
je 0x69585
movq 0x10(%rsp), %rax
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movq $0x0, 0x30(%rsp)
jmp 0x696da
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a270
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x695bf
movq 0x10(%rsp), %rax
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
movq $0x0, 0x30(%rsp)
jmp 0x696da
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
shlq $0x2, %rsi
callq 0x18050
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x69607
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0xfffffffa, (%rax)     # imm = 0xFFFFFFFA
movq $0x0, 0x30(%rsp)
jmp 0x696da
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl (%rcx), %eax
jae 0x696d0
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x189e0
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18c90
cmpl $0x0, %eax
jne 0x6968c
movq 0x28(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x18300
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq $0x0, 0x30(%rsp)
jmp 0x696da
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x18f80
cvtsd2ss %xmm0, %xmm0
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movss %xmm0, (%rax,%rcx,4)
movq 0x28(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x6960f
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jae 0x6975f
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x193f0
movq 0x10(%rsp), %rdi
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x191e0
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x69717
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_testflags
VkFlags64 testflags(lua_State *L, int arg, int *err)
    {
    if(lua_isinteger(L, arg))
        { *err = 0; return (VkFlags64)lua_tointeger(L, arg); }
    *err = lua_isnoneornil(L, arg) ? ERR_NOTPRESENT : ERR_TYPE;
    return (VkFlags64)0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1a720
cmpl $0x0, %eax
je 0x697b9
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x18690
movq %rax, 0x20(%rsp)
jmp 0x697e9
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1a240
movl %eax, %edx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movl $0x1, %eax
cmpl $0x0, %edx
cmovlel %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1a240
cmpl $0x1, %eax
je 0x6998a
movq 0x8(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movl $0x0, 0x24(%rsp)
jmp 0x699a7
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x18340
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
cmpl $0x4, %eax
jne 0x69a9c
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x7a113(%rip), %rsi     # 0xe3b56
callq 0x190a0
cmpl $0x0, %eax
je 0x69a91
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x67f60(%rip), %rsi     # 0xd19d0
movb $0x0, %al
callq 0x18f50
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq %rax, %rdx
callq 0x18460
cltq
movq %rax, 0x30(%rsp)
jmp 0x69aaf
movq $-0x1, 0x30(%rsp)
jmp 0x69aaf
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x19190
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x1a240
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movl $0x0, (%rax)
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
incl %eax
subl $0x2, %eax
jb 0x69b16
jmp 0x69b00
movl 0xc(%rsp), %eax
subl $0x3, %eax
je 0x69b5b
jmp 0x69b0b
movl 0xc(%rsp), %eax
subl $0x4, %eax
je 0x69b21
jmp 0x69b88
movq $-0x1, 0x40(%rsp)
jmp 0x69b9e
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x7a02e(%rip), %rsi     # 0xe3b72
callq 0x190a0
cmpl $0x0, %eax
jne 0x69b59
movq $-0x1, 0x40(%rsp)
jmp 0x69b9e
jmp 0x69b8a
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0x14(%rsp), %rdx
callq 0x18690
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0x69b86
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x69b9e
jmp 0x69b88
jmp 0x69b8a
movq 0x28(%rsp), %rax
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1a240
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
incl %eax
subl $0x2, %eax
jb 0x69bee
jmp 0x69be0
movl 0x10(%rsp), %eax
subl $0x4, %eax
je 0x69bfc
jmp 0x69c76
movq $-0x1, 0x30(%rsp)
jmp 0x69c8b
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x79f53(%rip), %rsi     # 0xe3b72
callq 0x190a0
cmpl $0x0, %eax
jne 0x69c34
movq $-0x1, 0x30(%rsp)
jmp 0x69c8b
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x67d7a(%rip), %rsi     # 0xd19d0
movb $0x0, %al
callq 0x18f50
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movq %rax, %rdx
callq 0x18460
cltq
movq %rax, 0x30(%rsp)
jmp 0x69c8b
jmp 0x69c78
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x19190
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
leaq 0x66d34(%rip), %rcx     # 0xd0f03
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x4f8(%rax)
jne 0x6a216
movq 0x38(%rsp), %rdi
leaq 0x79ae3(%rip), %rsi     # 0xe3ce9
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x6a2db
jmp 0x6a218
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x30(%rsp), %rdx
leaq 0x34(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq 0x66ccb(%rip), %r9      # 0xd0f03
callq 0x191f0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x6a272
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movl 0x34(%rsp), %edi
callq 0x19a60
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x6a2db
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x4f8(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x30(%rsp), %edx
movq 0x18(%rsp), %rcx
callq *%rax
movl %eax, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18300
cmpl $0x0, 0x2c(%rsp)
je 0x6a2d1
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x6a2db
jmp 0x6a2d3
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x66bf4(%rip), %rcx     # 0xd0f03
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x500(%rax)
jne 0x6a356
movq 0x38(%rsp), %rdi
leaq 0x799d1(%rip), %rsi     # 0xe3d17
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x6a483
jmp 0x6a358
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x500(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
xorl %ecx, %ecx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x6a3a9
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x6a483
jmp 0x6a3ab
cmpq $0x0, 0x28(%rsp)
jne 0x6a3d1
movq 0x38(%rsp), %rdi
leaq 0x6f702(%rip), %rsi     # 0xd9ac1
callq 0x1a420
movl $0x1, 0x44(%rsp)
jmp 0x6a483
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x192c0
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x500(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0x28(%rsp), %rdx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x6a458
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18300
cmpl $0x0, 0x34(%rsp)
je 0x6a44c
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x6a483
jmp 0x6a44e
movl $0x0, 0x44(%rsp)
jmp 0x6a483
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x19860
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18300
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x6a4e5
movl $0x0, 0x34(%rsp)
jmp 0x6a536
jmp 0x6a4e7
movq 0x92aaa(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x6a506
movq 0x18(%rsp), %rsi
leaq 0x797c8(%rip), %rdi     # 0xe3cc7
movb $0x0, %al
callq 0x189d0
jmp 0x6a508
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x4f0(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x19190
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
shrl $0x16, %eax
andl $0x7f, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
shrl $0xc, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, %eax
movl %eax, %esi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, %eax
movl %eax, %esi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
shrl $0x1d, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x18be0
movl $0x4, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x19190
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
shrl $0x16, %edx
movl 0xc(%rsp), %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movl 0xc(%rsp), %r8d
andl $0xfff, %r8d            # imm = 0xFFF
leaq 0x79600(%rip), %rsi     # 0xe3e38
movb $0x0, %al
callq 0x18f50
movl $0x1, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x19190
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x19190
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x19190
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movl $0x4, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x194e0
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
shll $0x1d, %eax
movl 0x1c(%rsp), %ecx
shll $0x16, %ecx
orl %ecx, %eax
movl 0x18(%rsp), %ecx
shll $0xc, %ecx
orl %ecx, %eax
orl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %eax
movl %eax, %esi
callq 0x18be0
movl $0x1, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x400000, (%rsp)       # imm = 0x400000
movq 0x92679(%rip), %rax     # 0xfcfc0
cmpq $0x0, 0x18(%rax)
je 0x6a98a
movq %rsp, %rdi
movq 0x92668(%rip), %rax     # 0xfcfc0
callq *0x18(%rax)
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x6a986
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x8(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x14(%rsp)
jmp 0x6a9a1
jmp 0x6a988
jmp 0x6a98a
movq 0x8(%rsp), %rdi
movl (%rsp), %eax
movl %eax, %esi
callq 0x18be0
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
movq 0x30(%rsp), %rdx
callq 0x6bfb0
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x18c90
cmpl $0x0, %eax
je 0x6ad88
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x18f80
movsd %xmm0, 0x18(%rsp)
jmp 0x6ada8
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1a240
cmpl $0x0, %eax
jle 0x6ada6
movq 0x20(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
jmp 0x6ada8
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19800
movq 0x40(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
je 0x6ae0d
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %edi
callq 0x19a60
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x79094(%rip), %rsi     # 0xe3e9a
movb $0x0, %al
callq 0x18f50
movsd 0x18(%rsp), %xmm0
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq %r8, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %eax
imulq %rax, %rsi
callq 0x18050
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x6b315
movq 0x18(%rsp), %rax
movl $0xfffffffa, (%rax)     # imm = 0xFFFFFFFA
movq $0x0, 0x40(%rsp)
jmp 0x6b372
cmpl $-0x1, 0x34(%rsp)
je 0x6b35d
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x6b35b
movl 0x34(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
movq (%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6b32d
jmp 0x6b35d
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x6b3b4
jmp 0x6b418
cmpq $0x0, 0x10(%rsp)
je 0x6b402
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq %rcx, %rax
jae 0x6b400
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rdi
movq (%rsp), %rsi
callq *%rax
movq (%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x6b3c5
jmp 0x6b402
cmpl $0x0, 0x18(%rsp)
je 0x6b418
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x18300
addq $0x38, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
movq 0x40(%rsp), %rdx
callq 0x6bfb0
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rax
movl $0x0, (%rax)
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1a240
cmpl $0x0, %eax
jle 0x6b5b7
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
leaq 0x2c(%rsp), %rdx
callq 0x18690
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x6b5b5
movq 0x30(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
jmp 0x6b5b7
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19800
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
je 0x6b61e
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %edi
callq 0x19a60
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x78883(%rip), %rsi     # 0xe3e9a
movb $0x0, %al
callq 0x18f50
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
movq 0x28(%rsp), %rdx
callq 0x6bfb0
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq 0x20(%rsp), %rdx
callq 0x1a780
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19800
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x20(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x6d338
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq $0x0, 0x40(%rsp)
jmp 0x6d385
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
je 0x6d37b
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %edi
callq 0x19a60
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x76b26(%rip), %rsi     # 0xe3e9a
movb $0x0, %al
callq 0x18f50
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x760b0
jmp 0x7610b
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq %rcx, %rax
jae 0x760f5
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xcbac0
movq 0x8(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x760b9
cmpl $0x0, 0x18(%rsp)
je 0x7610b
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x18300
addq $0x38, %rsp
retq
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
movq 0x20(%rsp), %rdx
callq 0x6bfb0
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x30(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x1a240
cmpl $0x1, %eax
jne 0x77798
movq 0x30(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x18340
movl %eax, 0x14(%rsp)
jmp 0x777b8
movq 0x30(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x1a240
cmpl $0x0, %eax
jle 0x777b6
movq 0x18(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
jmp 0x777b8
movq 0x30(%rsp), %rdi
movl 0x10(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19800
movq 0x30(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
je 0x7781d
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %edi
callq 0x19a60
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x6c684(%rip), %rsi     # 0xe3e9a
movb $0x0, %al
callq 0x18f50
movl 0x14(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1a420
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x19770
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a240
movl %eax, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovlel %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/zcheck.c
// Function: GetString_
static const char *GetString_(lua_State *L, int arg, const char *sname, const char *defval, int *err, size_t *len)
/* The caller must Free() the returned string (if not NULL).
 * If len!=NULL, sets len with the string length or with 0 if defval is used. */
    {
    const char *val = NULL;
    int arg_ = pushfield(L, arg, sname);
    int t_ = lua_type(L, arg_);
    *err = 0;
    if(len) *len = 0;
    if(t_ == LUA_TSTRING)
        val = Strdup(L, lua_tolstring(L, arg_, len));
    else if((t_ == LUA_TNONE)||(t_ == LUA_TNIL))
        {
        if(defval)
            val = Strdup(L, defval);
        else
            *err = ERR_NOTPRESENT;
        }
    else
        *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
movq 0x40(%rsp), %rdx
callq 0x6bfb0
movl %eax, 0x1c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1a240
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movl $0x0, (%rax)
cmpq $0x0, 0x28(%rsp)
je 0x9c962
movq 0x28(%rsp), %rax
movq $0x0, (%rax)
cmpl $0x4, 0x18(%rsp)
jne 0x9c99a
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq 0x28(%rsp), %rdx
callq 0x186d0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x19120
movq %rax, 0x20(%rsp)
jmp 0x9c9e0
cmpl $-0x1, 0x18(%rsp)
je 0x9c9a8
cmpl $0x0, 0x18(%rsp)
jne 0x9c9d3
cmpq $0x0, 0x38(%rsp)
je 0x9c9c6
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x19120
movq %rax, 0x20(%rsp)
jmp 0x9c9d1
movq 0x30(%rsp), %rax
movl $0x1, (%rax)
jmp 0x9c9de
movq 0x30(%rsp), %rax
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
jmp 0x9c9e0
movq 0x50(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19800
movq 0x50(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18170
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
je 0x9ca45
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %edi
callq 0x19a60
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x4745c(%rip), %rsi     # 0xe3e9a
movb $0x0, %al
callq 0x18f50
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/zcheck.c
// Function: localpushVkMemoryHeap
static int localpushVkMemoryHeap(lua_State *L, const VkMemoryHeap *p, uint32_t index)
    {
    lua_newtable(L);
    lua_pushinteger(L, index); lua_setfield(L, -2, "memory_heap_index");
    SetInteger(size, "size");
    SetFlags(flags, "flags");
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %eax
movl %eax, %esi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x1d189(%rip), %rdx     # 0xe998a
callq 0x18b80
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
callq 0x18be0
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x8658(%rip), %rdx      # 0xd4e81
callq 0x18b80
jmp 0xcc830
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x19520
movq 0x10(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x1d26f(%rip), %rdx     # 0xe9ac4
callq 0x18b80
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-internal.h
// Function: testing::internal::SuiteApiResolver<testing::Test>::GetSetUpCaseOrSuite(char const*, int)
static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename,
                                                        int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both SetUpTestSuite and SetUpTestCase, please "
           "make sure there is only one present at "
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
    (void)(filename);
    (void)(line_num);
    return &T::SetUpTestSuite;
#endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x20ea(%rip), %rsi      # 0x1f260
movq %rsi, %rdi
callq 0x1f230
movq %rax, -0x18(%rbp)
leaq 0x20e7(%rip), %rsi      # 0x1f270
movq %rsi, %rdi
callq 0x1f230
movq %rax, -0x20(%rbp)
movb $0x1, %al
cmpq $0x0, -0x18(%rbp)
movb %al, -0x35(%rbp)
je 0x1d1ae
cmpq $0x0, -0x20(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x78790
testb $0x1, %al
jne 0x1d1c2
jmp 0x1d1c7
jmp 0x1d279
leaq 0xab47f(%rip), %rdx     # 0xc864d
leaq -0x24(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movl $0x3, %esi
movl $0x201, %ecx            # imm = 0x201
callq 0x7d880
movq -0x48(%rbp), %rdi
callq 0x1f280
movq %rax, -0x40(%rbp)
jmp 0x1d1f4
movq -0x40(%rbp), %rdi
leaq 0xab4cc(%rip), %rsi     # 0xc86cb
callq 0x10720
movq %rax, -0x50(%rbp)
jmp 0x1d20a
movq -0x50(%rbp), %rdi
leaq 0xab4e9(%rip), %rsi     # 0xc86fe
callq 0x10720
movq %rax, -0x58(%rbp)
jmp 0x1d220
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x10720
movq %rax, -0x60(%rbp)
jmp 0x1d233
movq -0x60(%rbp), %rdi
leaq 0xacd49(%rip), %rsi     # 0xc9f87
callq 0x10720
movq %rax, -0x68(%rbp)
jmp 0x1d249
movq -0x68(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10de0
jmp 0x1d257
leaq -0x24(%rbp), %rdi
callq 0x7d9c0
jmp 0x1d279
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x7d9c0
jmp 0x1d29c
cmpq $0x0, -0x18(%rbp)
je 0x1d28a
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x1d292
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)
nop
// File: halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-internal.h
// Function: testing::internal::SuiteApiResolver<testing::Test>::GetTearDownCaseOrSuite(char const*, int)
static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename,
                                                           int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both TearDownTestSuite and TearDownTestCase,"
           " please make sure there is only one present at"
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
    (void)(filename);
    (void)(line_num);
    return &T::TearDownTestSuite;
#endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1fda(%rip), %rsi      # 0x1f2a0
movq %rsi, %rdi
callq 0x1f230
movq %rax, -0x18(%rbp)
leaq 0x1fd7(%rip), %rsi      # 0x1f2b0
movq %rsi, %rdi
callq 0x1f230
movq %rax, -0x20(%rbp)
movb $0x1, %al
cmpq $0x0, -0x18(%rbp)
movb %al, -0x35(%rbp)
je 0x1d2fe
cmpq $0x0, -0x20(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x78790
testb $0x1, %al
jne 0x1d312
jmp 0x1d317
jmp 0x1d3c2
leaq 0xab32f(%rip), %rdx     # 0xc864d
leaq -0x24(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movl $0x3, %esi
movl $0x216, %ecx            # imm = 0x216
callq 0x7d880
movq -0x48(%rbp), %rdi
callq 0x1f280
movq %rax, %rdi
leaq 0xab383(%rip), %rsi     # 0xc86cb
callq 0x10720
movq %rax, -0x40(%rbp)
jmp 0x1d353
movq -0x40(%rbp), %rdi
leaq 0xab40b(%rip), %rsi     # 0xc8769
callq 0x10720
movq %rax, -0x50(%rbp)
jmp 0x1d369
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x10720
movq %rax, -0x58(%rbp)
jmp 0x1d37c
movq -0x58(%rbp), %rdi
leaq 0xacc00(%rip), %rsi     # 0xc9f87
callq 0x10720
movq %rax, -0x60(%rbp)
jmp 0x1d392
movq -0x60(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10de0
jmp 0x1d3a0
leaq -0x24(%rbp), %rdi
callq 0x7d9c0
jmp 0x1d3c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x7d9c0
jmp 0x1d3e5
cmpq $0x0, -0x18(%rbp)
je 0x1d3d3
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x1d3db
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x10e00
nop