LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdDrawMulti
static int CmdDrawMulti(lua_State *L)
    {
    int err;
    uint32_t count;
    ud_t *ud;
    VkMultiDrawInfoEXT *info = NULL;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    uint32_t instanceCount = luaL_checkinteger(L, 3);
    uint32_t firstInstance = luaL_checkinteger(L, 4);
    uint32_t stride = luaL_checkinteger(L, 5);
    CheckDevicePfn(L, ud, CmdDrawMultiEXT);
#define CLEANUP do {                                            \
    if(info) zfreearrayVkMultiDrawInfoEXT(L, info, count, 1);   \
} while(0)
    info = zcheckarrayVkMultiDrawInfoEXT(L, 2, &count, &err);
    if(err < 0 && err != ERR_EMPTY) { CLEANUP; return argerror(L, 2); }
    ud->ddt->CmdDrawMultiEXT(cb, count, info, instanceCount, firstInstance, stride);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x5dee9(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
leaq 0x18(%rsp), %r12
movq %r12, %rdx
callq 0x1a500
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r14
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %rbp
movq (%r12), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x848(%rax)
je 0x1fadc
movq %r14, 0x10(%rsp)
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %rdx
leaq 0x24(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x18ea0
movq %rax, %r12
movl (%r14), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x1faf2
testq %r12, %r12
je 0x1fabf
movl 0xc(%rsp), %ecx
pushq $0x8
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r12, %rsi
xorl %r9d, %r9d
callq 0x18d30
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x1faed
leaq 0x5e6d5(%rip), %rsi     # 0x7e1b8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r14d
jmp 0x1fb3c
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movl 0xc(%rsp), %esi
movq %r15, %rdi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
movl %r13d, %r8d
movl %ebp, %r9d
callq *0x848(%rax)
testq %r12, %r12
je 0x1fb39
movl 0xc(%rsp), %ecx
xorl %r14d, %r14d
pushq $0x8
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r12, %rsi
xorl %r9d, %r9d
callq 0x18d30
jmp 0x1fb3c
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdDrawMultiIndexed
static int CmdDrawMultiIndexed(lua_State *L)
    {
    int err;
    uint32_t count;
    ud_t *ud;
    int32_t *pVertexOffset = NULL;
    int32_t vertex_offset;
    VkMultiDrawIndexedInfoEXT *info = NULL;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    uint32_t instanceCount = luaL_checkinteger(L, 3);
    uint32_t firstInstance = luaL_checkinteger(L, 4);
    uint32_t stride = luaL_checkinteger(L, 5);
    if(!lua_isnoneornil(L, 6))
        {
        vertex_offset = luaL_checkinteger(L, 6);
        pVertexOffset = &vertex_offset;
        }
    CheckDevicePfn(L, ud, CmdDrawMultiIndexedEXT);
#define CLEANUP do {                                                    \
    if(info) zfreearrayVkMultiDrawIndexedInfoEXT(L, info, count, 1);    \
} while(0)
    info = zcheckarrayVkMultiDrawIndexedInfoEXT(L, 2, &count, &err);
    if(err < 0 && err != ERR_EMPTY) { CLEANUP; return argerror(L, 2); }
    ud->ddt->CmdDrawMultiIndexedEXT(cb, count, info, instanceCount, firstInstance, stride, pVertexOffset);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x5dda3(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
leaq 0x18(%rsp), %rdx
callq 0x1a500
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %rbp
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x1a110
testl %eax, %eax
jle 0x1fbc4
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x190d0
leaq 0x30(%rsp), %r15
movl %eax, (%r15)
jmp 0x1fbc7
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x850(%rax)
je 0x1fc52
movq %rbp, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r12, %r13
movq %r14, %r12
pushq $0x2
popq %rsi
leaq 0x14(%rsp), %rdx
leaq 0x34(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x19a10
movq %rax, %rbp
movl (%r14), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x1fc68
testq %rbp, %rbp
je 0x1fc35
movl 0x14(%rsp), %ecx
pushq $0xc
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %rbp, %rsi
xorl %r9d, %r9d
callq 0x18d30
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x1fc63
leaq 0x5e584(%rip), %rsi     # 0x7e1dd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r14d
jmp 0x1fcb8
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x14(%rsp), %esi
movq %r15, (%rsp)
movq %r12, %rdi
movq %rbp, %rdx
movl %r13d, %ecx
movq 0x28(%rsp), %r8
movq 0x20(%rsp), %r9
callq *0x850(%rax)
testq %rbp, %rbp
je 0x1fcb5
movl 0x14(%rsp), %ecx
xorl %r14d, %r14d
pushq $0xc
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %rbp, %rsi
xorl %r9d, %r9d
callq 0x18d30
jmp 0x1fcb8
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetFragmentShadingRate
static int CmdSetFragmentShadingRate(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkExtent2D* size = NULL;
    VkFragmentShadingRateCombinerOpKHR ops[2];
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    CheckDevicePfn(L, ud, CmdSetFragmentShadingRateKHR);
    ops[0] = checkfragmentshadingratecombinerop(L, 3);
    ops[1] = checkfragmentshadingratecombinerop(L, 4);
#define CLEANUP do { if(size) zfreeVkExtent2D(L, size, 1); } while(0)
    size = zcheckVkExtent2D(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ud->ddt->CmdSetFragmentShadingRateKHR(cb, size, ops);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x5dc29(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x620(%rax)
je 0x1fd78
pushq $0x41
popq %rbp
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19c00
movl %eax, 0x8(%rsp)
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19c00
movl %eax, 0xc(%rsp)
pushq $0x2
popq %rsi
leaq 0x1c(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18ac0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x1fd9c
testq %r15, %r15
je 0x1fd5b
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x19620
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x1fd89
leaq 0x5e48a(%rip), %rsi     # 0x7e209
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq *0x620(%rax)
xorl %r14d, %r14d
testq %r15, %r15
je 0x1fd8c
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x19620
jmp 0x1fd8c
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdBeginRendering
static int CmdBeginRendering(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkRenderingInfoKHR *info;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    CheckDevicePfn(L, ud, CmdBeginRenderingKHR);
#define CLEANUP do { if(info) zfreeVkRenderingInfoKHR(L, info, 1); } while(0)
    info = zcheckVkRenderingInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ud->ddt->CmdBeginRenderingKHR(cb, info);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5db23(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x858(%rax)
je 0x1fe55
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1a000
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x1fe77
testq %r14, %r14
je 0x1fe38
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x1fe66
leaq 0x5e3df(%rip), %rsi     # 0x7e23b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rax
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x858(%rax)
xorl %ebp, %ebp
testq %r14, %r14
je 0x1fe68
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19150
jmp 0x1fe68
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdEndRendering
static int CmdEndRendering(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    CheckDevicePfn(L, ud, CmdEndRenderingKHR);
    ud->ddt->CmdEndRenderingKHR(cb);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5da59(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x1a500
movq (%r14), %rcx
movq 0x50(%rcx), %rcx
movq 0x860(%rcx), %rcx
testq %rcx, %rcx
je 0x1feda
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
jmp 0x1feeb
leaq 0x5e384(%rip), %rsi     # 0x7e265
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: checkdebugmarkermarkerinfo
static int checkdebugmarkermarkerinfo(lua_State *L, int arg, VkDebugMarkerMarkerInfoEXT *info)
    {
    int i, argcolor = arg+1;
    info->sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT;
    info->pNext = NULL;
    info->pMarkerName = luaL_checkstring(L, arg);
    if(lua_isnoneornil(L, argcolor))
        {
        memset(info->color, 0, 4*sizeof(float));
        return 0;
        }
    if(!lua_istable(L, argcolor))
        return argerrorc(L, arg, ERR_TABLE);
    for(i = 0; i < 4; i++)
        {
        if(lua_rawgeti(L, argcolor, i+1) != LUA_TNUMBER)
            {
            lua_pop(L, 1);
            return argerrorc(L, argcolor, ERR_TYPE);
            }
        info->color[i] = lua_tonumber(L, -1);
        lua_pop(L, 1);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3b9b1ff2, (%rsi)     # imm = 0x3B9B1FF2
andq $0x0, 0x8(%rsi)
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x18d50
movq %rax, 0x10(%r14)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x1a110
testl %eax, %eax
jle 0x1ff8b
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x1a110
cmpl $0x5, %eax
jne 0x1ffa2
pushq $0x1
popq %r15
pushq $0x3
popq %rbp
pushq $-0x1
popq %r12
pushq $-0x2
popq %r13
cmpq $0x5, %r15
je 0x1ff93
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x18970
cmpl $0x3, %eax
jne 0x1ffae
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x18ec0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%r14,%r15,4)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x18150
incq %r15
jmp 0x1ff4b
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x4
popq %rdi
callq 0x19950
pushq $0x2
jmp 0x1ffc4
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18150
movl %ebp, %edi
callq 0x19950
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18420
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_buffer.c
// Function: FreeCmdBuffers
static int FreeCmdBuffers(lua_State *L)
    {
    int err;
    uint32_t count, i;
    ud_t *ud;
    VkDevice device;
    VkCommandPool command_pool;
    VkCommandBuffer *command_buffer = checkcommand_bufferlist(L, 1, &count, &err, NULL);
    if(err) return argerrorc(L, 1, err);
    
    ud = UD(command_buffer[0]);
    /* check that they all are from the same pool */
    for(i = 1; i < count; i++)
        {
        if(UD(command_buffer[i])->parent_ud != ud->parent_ud)
            {
            Free(L, command_buffer);
            return argerrorc(L, 1, ERR_POOL);
            }
        }
    command_pool = (VkCommandPool)ud->parent_ud->handle;
    device = ud->device;
    for(i = 0; i < count; i++)
        {
        freeuserdata(L, UD(command_buffer[i]));
        TRACE_DELETE(command_buffer[i], "command_buffer");
        }
    
    UD(device)->ddt->FreeCommandBuffers(device, command_pool, count, command_buffer);
    Free(L, command_buffer);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x5d572(%rip), %r8      # 0x7d909
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %r15
movq %r15, %rcx
callq 0x199d0
movl (%r15), %edi
testl %edi, %edi
jne 0x203f2
movq %rax, %r14
movq (%rax), %rdi
callq 0x19eb0
movq %rax, %r15
pushq $0x1
popq %r12
movl 0x4(%rsp), %eax
cmpq %rax, %r12
jae 0x20414
movq (%r14,%r12,8), %rdi
callq 0x19eb0
movq 0x10(%rax), %rax
incq %r12
cmpq 0x10(%r15), %rax
je 0x203c5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
pushq $-0x8
popq %rdi
callq 0x19950
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rcx
movq 0x20(%r15), %r12
movq (%rcx), %rcx
movq %rcx, 0x8(%rsp)
movq 0x9ab6d(%rip), %rbp     # 0xbaf98
leaq 0x5df0c(%rip), %r13     # 0x7e33e
xorl %r15d, %r15d
movl %eax, %eax
cmpq %rax, %r15
jae 0x2046d
movq (%r14,%r15,8), %rdi
callq 0x19eb0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18d20
cmpl $0x0, (%rbp)
je 0x20464
movq (%r14,%r15,8), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x18960
incq %r15
movl 0x4(%rsp), %eax
jmp 0x20435
movq %r12, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movl 0x4(%rsp), %edx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rcx
callq *0x240(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
xorl %eax, %eax
jmp 0x20405
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_buffer.c
// Function: BeginCommandBuffer
static int BeginCommandBuffer(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkCommandBufferBeginInfo* info;
    VkCommandBuffer command_buffer = checkcommand_buffer(L, 1, &ud);

#define CLEANUP zfreeVkCommandBufferBeginInfo(L, info, 1)
    if(lua_istable(L, 2))
        {
        info = zcheckVkCommandBufferBeginInfo(L, 2, &err);
        if(err) { CLEANUP; return argerror(L, 2); }
        }
    else
        {
        info = znewVkCommandBufferBeginInfo(L, &err);
        if(err) { CLEANUP; return lua_error(L); }
        info->flags = optflags(L, 2, 0);
        }

    ec = ud->ddt->BeginCommandBuffer(command_buffer, info);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5d453(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
callq 0x1a500
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1a110
cmpl $0x5, %eax
jne 0x20521
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18760
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20562
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x205a3
pushq $0x2a
popq %rsi
pushq $0x20
popq %rdx
leaq 0x4(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rcx
callq 0x19dc0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20551
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
jmp 0x20597
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19290
movl %eax, 0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x2b8(%rax)
movl %eax, %ebp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
testl %ebp, %ebp
je 0x205a1
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x205a3
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_buffer.c
// Function: ResetCommandBuffer
static int ResetCommandBuffer(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer command_buffer = checkcommand_buffer(L, 1, &ud);
    VkCommandBufferResetFlags flags = optflags(L, 2, 0);
    VkResult ec = ud->ddt->ResetCommandBuffer(command_buffer, flags);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5d2f7(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
movq %rsp, %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r12
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19290
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r12, %rdi
movl %eax, %esi
callq *0x2c8(%rcx)
testl %eax, %eax
je 0x20660
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_buffer.c
// Function: freecommand_buffer
static int freecommand_buffer(lua_State *L, ud_t *ud)
    {
    VkCommandBuffer command_buffer = (VkCommandBuffer)(uintptr_t)ud->handle;
    VkCommandPool command_pool = (VkCommandPool)ud->parent_ud->handle;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(command_buffer, "command_buffer");
    UD(device)->ddt->FreeCommandBuffers(device, command_pool, 1, &command_buffer);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq (%rsi), %r15
movq %r15, 0x8(%rsp)
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %r14
movq (%rax), %rbx
callq 0x18d20
testl %eax, %eax
je 0x206d1
movq 0x9a8fd(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x206b1
leaq 0x5dc97(%rip), %rdi     # 0x7e33e
movq %r15, %rsi
xorl %eax, %eax
callq 0x18960
movq %r14, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
pushq $0x1
popq %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x240(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_pool.c
// Function: ResetCommandPool
static int ResetCommandPool(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkCommandPool command_pool = checkcommand_pool(L, 1, &ud);
    VkDevice device = ud->device;
    VkCommandPoolResetFlags flags = optflags(L, 2, 0);
    ec = ud->ddt->ResetCommandPool(device, command_pool, flags);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5d8b8(%rip), %rcx     # 0x7e2f8
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r12
movq (%r15), %rax
movq 0x20(%rax), %r13
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19290
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq *0x230(%rcx)
testl %eax, %eax
je 0x20a9a
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_pool.c
// Function: TrimCommandPool
static int TrimCommandPool(lua_State *L)
    {
    ud_t *ud;
    VkCommandPool command_pool = checkcommand_pool(L, 1, &ud);
    VkDevice device = ud->device;
    VkCommandPoolTrimFlags flags = optflags(L, 2, 0);
    CheckDevicePfn(L, ud, TrimCommandPool);
    ud->ddt->TrimCommandPool(device, command_pool, flags);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5d836(%rip), %rcx     # 0x7e2f8
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r13
movq %r13, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r13), %rax
movq 0x20(%rax), %r12
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19290
movq (%r13), %rcx
movq 0x50(%rcx), %rcx
movq 0x280(%rcx), %rcx
testq %rcx, %rcx
je 0x20b0d
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
callq *%rcx
jmp 0x20b21
leaq 0x5d8d4(%rip), %rsi     # 0x7e3e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/command_pool.c
// Function: freecommand_pool
static int freecommand_pool(lua_State *L, ud_t *ud)
    {
    VkCommandPool command_pool = (VkCommandPool)ud->handle;
    VkDevice device = ud->device;
    const VkAllocationCallbacks *allocator = ud->allocator;
    freechildren(L, COMMAND_BUFFER_MT, ud);
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(command_pool, "command_pool");
    UD(device)->ddt->DestroyCommandPool(device, command_pool, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r13
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
leaq 0x5cdb6(%rip), %rsi     # 0x7d909
movq %r12, %rdx
callq 0x18ee0
movq %r13, %rdi
movq %r12, %rsi
callq 0x18d20
testl %eax, %eax
je 0x20ba2
movq 0x9a427(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x20b87
leaq 0x5d84d(%rip), %rdi     # 0x7e3ca
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x228(%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: Flatten
static int Flatten(lua_State *L)
    {
    int n, i, table_index;
    n = Flatten_(L, 1);
    table_index = lua_gettop(L);
    luaL_checkstack(L, n, "too many elements, cannot grow Lua stack");
    for(i = 0; i < n; i++)
        lua_rawgeti(L, table_index, i+1);
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x217b1
movl %eax, %ebp
movq %rbx, %rdi
callq 0x180a0
movl %eax, %r14d
leaq 0x5d9b2(%rip), %rdx     # 0x7e597
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19410
xorl %r12d, %r12d
testl %ebp, %ebp
cmovgl %ebp, %r12d
negq %r12
pushq $0x1
popq %r15
leaq (%r12,%r15), %rax
cmpq $0x1, %rax
je 0x20c1c
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x18970
incq %r15
jmp 0x20bff
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: PackDescriptorImageInfo
static int PackDescriptorImageInfo(lua_State *L)
    {
    VkDescriptorImageInfo info;
    info.sampler = checksampler(L, 1, NULL);
    info.imageView = checkimage_view(L, 2, NULL);
    info.imageLayout = checkimagelayout(L, 3);
    lua_pushlstring(L, (char*)&info, sizeof(info));
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x5cfb2(%rip), %rcx     # 0x7e63e
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1a500
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
leaq 0x5cfaa(%rip), %rcx     # 0x7e651
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1a500
movq %rax, 0x8(%r14)
pushq $0xa
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movl %eax, 0x10(%r14)
pushq $0x18
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19770
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: PackDescriptorBufferInfo
static int PackDescriptorBufferInfo(lua_State *L)
    {
    VkDescriptorBufferInfo info;
    info.buffer = checkbuffer(L, 1, NULL);
    info.offset = luaL_checkinteger(L, 2);
    info.range = checksizeorwholesize(L, 3);
    lua_pushlstring(L, (char*)&info, sizeof(info));
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x5b90b(%rip), %rcx     # 0x7d000
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1a500
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, 0x8(%r14)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x1a630
movq %rax, 0x10(%r14)
pushq $0x18
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19770
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: PackBufferView
static int PackBufferView(lua_State *L)
    {
    size_t len;
    VkBufferView buffer_view = checkbuffer_view(L, 1, NULL);
    const char* data = luaL_checklstring(L, 2, &len);
    lua_pushlstring(L, (char*)&buffer_view, sizeof(buffer_view));
    if(data)
        {
        lua_pushvalue(L, 2);
        lua_concat(L, 2);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x5b911(%rip), %rcx     # 0x7d065
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x1a500
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x18d50
movq %rax, %r15
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19770
testq %r15, %r15
je 0x217a3
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18e80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19f50
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: Flatten_
static int Flatten_(lua_State *L, int arg)
    {
    int table_index, last_arg, i, n;
    //DBG("top = %d\n", lua_gettop(L));
    if(lua_type(L, arg) == LUA_TTABLE)
        {
        lua_newtable(L);
        n = Flatten1_(L, lua_gettop(L), 0, arg);
        }
    else
        {
        /* create a table with all the arguments, and flatten it */
        last_arg = lua_gettop(L);
        lua_newtable(L);
        table_index = lua_gettop(L);
        for(i=arg; i <= last_arg; i++)
            {
            lua_pushvalue(L, i);
            lua_rawseti(L, table_index, i-arg+1);
            }
        lua_newtable(L);
        n = Flatten1_(L, lua_gettop(L), 0, table_index);
        }
    //DBG("top = %d n = %d\n", lua_gettop(L), n);
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1a110
cmpl $0x5, %eax
je 0x21823
movq %rbx, %rdi
callq 0x180a0
movl %eax, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq %rbx, %rdi
callq 0x180a0
movl %eax, %r14d
movslq %ebp, %r13
movslq %r15d, %r15
movl %ebp, %ebp
leaq (%r12,%r13), %rax
cmpq %r15, %rax
jg 0x21820
leal (%r12,%rbp), %esi
movq %rbx, %rdi
callq 0x18e80
incq %r12
movslq %r12d, %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x19120
jmp 0x217f8
movl %r14d, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq %rbx, %rdi
callq 0x180a0
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21850
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/datahandling.c
// Function: Flatten1_
static int Flatten1_(lua_State *L, int table_index, int cur_index, int arg)
    {
    int len, i, top, m, n=0;

    if(lua_type(L, arg) != LUA_TTABLE)
        return luaL_error(L, "table expected");

    lua_len(L, arg);
    len = lua_tointeger(L, -1);
    lua_pop(L, 1);

    if(len==0) return n;

    for(i=1; i<=len; i++)
        {
        lua_geti(L, arg, i);
        top = lua_gettop(L);
        if(lua_type(L, top) == LUA_TTABLE)
            {
            m = Flatten1_(L, table_index, cur_index, top);
            n += m;
            cur_index += m;
            lua_remove(L, top);
            }
        else
            {
            n++;
            cur_index++;
#if 0 /* no, we'll check this later */
            if(!lua_isnumber(L, lua_gettop(L)))
                return luaL_argerror(L, cur_index, "number expected");
#endif
            lua_rawseti(L, table_index, cur_index);
            }
        }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, 0x8(%rsp)
movq %rdi, %rbx
movl %ecx, %esi
callq 0x1a110
cmpl $0x5, %eax
jne 0x21960
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19330
xorl %r13d, %r13d
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18640
movq %rax, %r15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x18150
movq %r15, %rcx
testl %ecx, %ecx
je 0x2197f
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ecx
negq %rcx
pushq $0x1
popq %r15
movl %ebp, 0xc(%rsp)
movq %rcx, 0x10(%rsp)
leaq (%rcx,%r15), %rax
cmpq $0x1, %rax
je 0x2197f
movq %r13, %r14
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a3b0
movq %rbx, %rdi
callq 0x180a0
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x1a110
cmpl $0x5, %eax
jne 0x2192e
movq %rbx, %rdi
movl 0x8(%rsp), %esi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x21850
movl %eax, %r13d
addl %eax, %r12d
movq %rbx, %rdi
movl %ebp, %esi
pushq $-0x1
popq %rdx
callq 0x19710
movq %rbx, %rdi
pushq $-0x2
popq %rsi
callq 0x18150
jmp 0x21949
movl %r12d, %eax
incl %eax
movl %eax, %r12d
movslq %eax, %rdx
movq %rbx, %rdi
movl 0x8(%rsp), %esi
callq 0x19120
pushq $0x1
popq %r13
addl %r13d, %r14d
movq %r14, %r13
incq %r15
movl 0xc(%rsp), %ebp
movq 0x10(%rsp), %rcx
jmp 0x218c6
leaq 0x5cc59(%rip), %rsi     # 0x7e5c0
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19bc0
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_report_callback.c
// Function: DebugReportMessage
static int DebugReportMessage(lua_State *L)
    {
    ud_t *ud;
    VkInstance instance = checkinstance(L, 1, &ud);
    VkDebugReportFlagsEXT flags = checkflags(L, 2);
    VkDebugReportObjectTypeEXT objectType = checkdebugreportobjecttype(L, 3);
    uint64_t object = luaL_checkinteger(L, 4);
    size_t location = luaL_checkinteger(L, 5);
    int32_t messageCode = luaL_checkinteger(L, 6);
    const char* pLayerPrefix = luaL_checkstring(L, 7);
    const char* pMessage = luaL_checkstring(L, 8);
    CheckInstancePfn(L, ud, DebugReportMessageEXT);
    ud->idt->DebugReportMessageEXT(instance, flags, 
        objectType, object, location, messageCode, pLayerPrefix, pMessage);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x5ca0f(%rip), %rcx     # 0x7e711
pushq $0x1
popq %rsi
leaq 0x20(%rsp), %rdx
callq 0x1a500
movq %rax, 0x18(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x18f50
movq %rax, 0x10(%rsp)
pushq $0x24
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movl %eax, 0xc(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r12
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r15
xorl %r14d, %r14d
pushq $0x7
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18d50
movq %rax, %rbp
pushq $0x8
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18d50
leaq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rcx
movq 0xe0(%rcx), %r10
testq %r10, %r10
je 0x21db8
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
movq %r13, %rcx
movq %r12, %r8
movl %r15d, %r9d
pushq %rax
pushq %rbp
callq *%r10
popq %rax
popq %rcx
jmp 0x21dcc
leaq 0x5c9fe(%rip), %rsi     # 0x7e7bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_report_callback.c
// Function: DebugMarkerSetObjectTag
static int DebugMarkerSetObjectTag(lua_State *L)
    {
    ud_t *ud;
    VkResult ec;
    VkDebugMarkerObjectTagInfoEXT info;
    VkDevice device = checkdevice(L, 1, &ud);
    info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT;
    info.pNext = NULL;
    info.objectType = checkdebugreportobjecttype(L, 2);
    info.object = luaL_checkinteger(L, 3);
    info.tagName = luaL_checkinteger(L, 4);
    info.pTag = luaL_checklstring(L, 5, &info.tagSize);
    if(info.tagSize == 0)
        return argerrorc(L, 5, ERR_LENGTH);
    CheckDevicePfn(L, ud, DebugMarkerSetObjectTagEXT);
    ec = ud->ddt->DebugMarkerSetObjectTagEXT(device, &info);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x5b24a(%rip), %rcx     # 0x7d03b
pushq $0x1
popq %rsi
movq %rsp, %rdx
callq 0x1a500
movq %rax, %r14
leaq 0x30(%rsp), %r15
movl $0x3b9b1ff1, -0x28(%r15) # imm = 0x3B9B1FF1
andq $0x0, -0x20(%r15)
pushq $0x24
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movl %eax, -0x18(%r15)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, -0x10(%r15)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, -0x8(%r15)
pushq $0x5
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x18d50
movq %rax, 0x8(%r15)
cmpq $0x0, (%r15)
je 0x21e91
movq (%rsp), %rax
movq 0x50(%rax), %rax
movq 0x288(%rax), %rax
testq %rax, %rax
je 0x21ea9
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x21ebc
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x21ebe
pushq $-0x7
popq %rdi
callq 0x19950
pushq $0x5
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x21ebe
leaq 0x5c938(%rip), %rsi     # 0x7e7e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x21ebe
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_report_callback.c
// Function: DebugMarkerSetObjectName
static int DebugMarkerSetObjectName(lua_State *L)
    {
    ud_t *ud;
    VkResult ec;
    VkDebugMarkerObjectNameInfoEXT info;
    VkDevice device = checkdevice(L, 1, &ud);
    info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT;
    info.pNext = NULL;
    info.objectType = checkdebugreportobjecttype(L, 2);
    info.object = luaL_checkinteger(L, 3);
    info.pObjectName = luaL_checkstring(L, 4);
    CheckDevicePfn(L, ud, DebugMarkerSetObjectNameEXT);
    ec = ud->ddt->DebugMarkerSetObjectNameEXT(device, &info);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x5b15e(%rip), %rcx     # 0x7d03b
pushq $0x1
popq %rsi
leaq 0x30(%rsp), %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movl $0x3b9b1ff0, 0x8(%rsp)  # imm = 0x3B9B1FF0
andq $0x0, 0x10(%rsp)
pushq $0x24
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movl %eax, 0x18(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
pushq $0x4
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18d50
movq %rax, 0x28(%rsp)
movq (%r15), %rax
movq 0x50(%rax), %rax
movq 0x290(%rax), %rax
testq %rax, %rax
je 0x21f6c
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x21f80
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x21f7d
leaq 0x5c8a5(%rip), %rsi     # 0x7e818
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %r12d
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_report_callback.c
// Function: Callback
static VkBool32 Callback(VkDebugReportFlagsEXT flags,
    VkDebugReportObjectTypeEXT objectType, uint64_t object,
    size_t location,
    int32_t messageCode,
    const char* pLayerPrefix,
    const char* pMessage,
    void* pUserData)
    {
#define ud ((ud_info_t*)pUserData)->ud
#define L moonvulkan_L
    int top = lua_gettop(L);
    /* retrieve and push the callback */
    if(lua_rawgeti(L, LUA_REGISTRYINDEX, ud->ref1) != LUA_TFUNCTION)
        return unexpected(L);
    /* push args */
    pushinstance(L, ud->instance);
    pushflags(L, flags);
    pushdebugreportobjecttype(L, objectType);
    lua_pushinteger(L, object);
    lua_pushinteger(L, location);
    lua_pushinteger(L, messageCode);
    if(pLayerPrefix) lua_pushstring(L, pLayerPrefix);
    if(pMessage) lua_pushstring(L, pMessage);
    /* execute the callback */
    if(lua_pcall(L, 8, 0, 0) != LUA_OK)
        { lua_error(L); return 0; }
    lua_settop(L, top);
    return 0;
#undef L
#undef ud
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %ebx
movl %edi, %ebp
movq 0x58(%rsp), %r15
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98fd9(%rip), %r14     # 0xbafa0
movq (%r14), %rdi
callq 0x180a0
movl %eax, (%rsp)
movq (%r14), %rdi
movq (%r15), %rax
movslq 0x2c(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x18970
movq (%r14), %rdi
cmpl $0x6, %eax
jne 0x2207f
movq (%r15), %rax
movq 0x18(%rax), %rsi
callq 0x191b0
movq (%r14), %rdi
movl %ebp, %esi
callq 0x19440
movq (%r14), %rdi
pushq $0x24
popq %rsi
movl %ebx, %edx
callq 0x18980
movq (%r14), %rdi
movq %r13, %rsi
callq 0x18b50
movq (%r14), %rdi
movq %r12, %rsi
callq 0x18b50
movq (%r14), %rdi
movslq 0x4(%rsp), %rsi
callq 0x18b50
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2204a
movq (%r14), %rdi
callq 0x1a2e0
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x2205c
movq (%r14), %rdi
callq 0x1a2e0
movq (%r14), %rdi
pushq $0x8
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a4c0
movq (%r14), %rdi
testl %eax, %eax
je 0x220a5
callq 0x199c0
jmp 0x220ad
leaq 0x5c549(%rip), %rsi     # 0x7e5cf
leaq 0x5c6f1(%rip), %rdx     # 0x7e77e
pushq $0x36
popq %rcx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19bc0
movl (%rsp), %esi
callq 0x18150
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_report_callback.c
// Function: freedebug_report_callback
static int freedebug_report_callback(lua_State *L, ud_t *ud)
    {
    VkDebugReportCallbackEXT debug_report_callback = (VkDebugReportCallbackEXT)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkInstance instance = ud->instance;
    if(!freeuserdata(L, ud)) return 0; /* double call */
    TRACE_DELETE(debug_report_callback, "debug_report_callback");
    UD(instance)->idt->DestroyDebugReportCallbackEXT(instance, debug_report_callback, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x18(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x2210f
movq 0x98eba(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x220f4
leaq 0x5c6ac(%rip), %rdi     # 0x7e796
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x48(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0xd8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: QueueBeginDebugUtilsLabel
static int QueueBeginDebugUtilsLabel(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkDebugUtilsLabelEXT* label;
    VkQueue queue = checkqueue(L, 1, &ud);
    CheckInstancePfn(L, ud, QueueBeginDebugUtilsLabelEXT);
#define CLEANUP zfreeVkDebugUtilsLabelEXT(L, label, 1)
    label = zcheckVkDebugUtilsLabelEXT(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ud->idt->QueueBeginDebugUtilsLabelEXT(queue, label);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x5c521(%rip), %rcx     # 0x7e9e8
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x158(%rax)
je 0x22533
pushq $0x2
popq %rsi
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18360
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22546
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x2256b
leaq 0x5c4bf(%rip), %rsi     # 0x7e9f9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x2256b
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x158(%rax)
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: QueueEndDebugUtilsLabel
static int QueueEndDebugUtilsLabel(lua_State *L)
    {
    ud_t *ud;
    VkQueue queue = checkqueue(L, 1, &ud);
    CheckInstancePfn(L, ud, QueueEndDebugUtilsLabelEXT);
    ud->idt->QueueEndDebugUtilsLabelEXT(queue);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5c463(%rip), %rcx     # 0x7e9e8
pushq $0x1
popq %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x1a500
movq (%r14), %rcx
movq 0x48(%rcx), %rcx
movq 0x160(%rcx), %rcx
testq %rcx, %rcx
je 0x225af
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
jmp 0x225c0
leaq 0x5c475(%rip), %rsi     # 0x7ea2b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: QueueInsertDebugUtilsLabel
static int QueueInsertDebugUtilsLabel(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkDebugUtilsLabelEXT* label;
    VkQueue queue = checkqueue(L, 1, &ud);
    CheckInstancePfn(L, ud, QueueInsertDebugUtilsLabelEXT);
#define CLEANUP zfreeVkDebugUtilsLabelEXT(L, label, 1)
    label = zcheckVkDebugUtilsLabelEXT(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ud->idt->QueueInsertDebugUtilsLabelEXT(queue, label);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x5c40b(%rip), %rcx     # 0x7e9e8
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x168(%rax)
je 0x22649
pushq $0x2
popq %rsi
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18360
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x2265c
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x22681
leaq 0x5c40b(%rip), %rsi     # 0x7ea5b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x22681
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x168(%rax)
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: SetDebugUtilsObjectName
static int SetDebugUtilsObjectName(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkResult ec;
    VkDebugUtilsObjectNameInfoEXT* info;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckInstancePfn(L, ud, SetDebugUtilsObjectNameEXT);
#define CLEANUP zfreeVkDebugUtilsObjectNameInfoEXT(L, info, 1)
    info = zcheckVkDebugUtilsObjectNameInfoEXT(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->idt->SetDebugUtilsObjectNameEXT(device, info);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5a998(%rip), %rcx     # 0x7d03b
pushq $0x1
popq %rsi
movq %rsp, %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x148(%rax)
je 0x2270d
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x18210
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22720
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x22760
leaq 0x5c37a(%rip), %rsi     # 0x7ea8e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x22760
movq (%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x148(%rax)
movl %eax, %ebp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
testl %ebp, %ebp
je 0x2275e
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x22760
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: SetDebugUtilsObjectTag
static int SetDebugUtilsObjectTag(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkResult ec;
    VkDebugUtilsObjectTagInfoEXT* info;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckInstancePfn(L, ud, SetDebugUtilsObjectTagEXT);
#define CLEANUP zfreeVkDebugUtilsObjectTagInfoEXT(L, info, 1)
    info = zcheckVkDebugUtilsObjectTagInfoEXT(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->idt->SetDebugUtilsObjectTagEXT(device, info);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x5a8b8(%rip), %rcx     # 0x7d03b
pushq $0x1
popq %rsi
movq %rsp, %r15
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x150(%rax)
je 0x227ed
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x19200
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22800
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x22840
leaq 0x5c2ca(%rip), %rsi     # 0x7eabe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x22840
movq (%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x150(%rax)
movl %eax, %ebp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
testl %ebp, %ebp
je 0x2283e
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x22840
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq