LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f760(%rip), %rcx     # 0x8f909
leaq 0x18(%rsp), %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190f0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190f0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x1a130
testl %eax, %eax
jle 0x20213
movq %rbx, %rdi
movl $0x6, %esi
callq 0x190f0
leaq 0x30(%rsp), %r15
movl %eax, (%r15)
jmp 0x20216
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x850(%rax)
je 0x202af
movq %rbp, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r12, %r13
movq %r14, %r12
leaq 0x14(%rsp), %rdx
leaq 0x34(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
callq 0x19a30
movq %rax, %rbp
movl (%r14), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x202c5
testq %rbp, %rbp
je 0x2028e
movl 0x14(%rsp), %ecx
movl $0xc, %edx
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x202c0
leaq 0x6ff27(%rip), %rsi     # 0x901dd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %r14d
jmp 0x20319
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 0x20316
movl 0x14(%rsp), %ecx
xorl %r14d, %r14d
movl $0xc, %edx
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
jmp 0x20319
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_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x6f5c9(%rip), %rcx     # 0x8f909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x620(%rax)
je 0x203ec
movq %rbx, %rdi
movl $0x41, %esi
movl $0x3, %edx
callq 0x19c20
movl %eax, (%rsp)
movq %rbx, %rdi
movl $0x41, %esi
movl $0x4, %edx
callq 0x19c20
movl %eax, 0x4(%rsp)
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18ad0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x2040f
testq %r15, %r15
je 0x203cb
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19640
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x203fd
leaq 0x6fe16(%rip), %rsi     # 0x90209
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rsp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq *0x620(%rax)
xorl %r14d, %r14d
testq %r15, %r15
je 0x20400
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19640
jmp 0x20400
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f4b0(%rip), %rcx     # 0x8f909
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x858(%rax)
je 0x204d2
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x1a020
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x204f4
testq %r14, %r14
je 0x204b1
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x204e3
leaq 0x6fd62(%rip), %rsi     # 0x9023b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
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 0x204e5
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x204e5
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f3da(%rip), %rcx     # 0x8f909
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq (%r14), %rcx
movq 0x50(%rcx), %rcx
movq 0x860(%rcx), %rcx
testq %rcx, %rcx
je 0x2055b
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
jmp 0x2056c
leaq 0x6fd03(%rip), %rsi     # 0x90265
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3b9b1ff2, (%rsi)     # imm = 0x3B9B1FF2
movq $0x0, 0x8(%rsi)
movl $0x2, %esi
xorl %edx, %edx
callq 0x18d60
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a130
testl %eax, %eax
jle 0x2060d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a130
cmpl $0x5, %eax
jne 0x2061b
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0x18980
movq %rbx, %rdi
cmpl $0x3, %eax
jne 0x2062f
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18ee0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%r14,%r15,4)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
incq %r15
cmpq $0x5, %r15
jne 0x205c6
jmp 0x20615
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
popq %rbx
popq %r14
popq %r15
retq
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
callq 0x19970
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x2064b
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
callq 0x19970
movq %rbx, %rdi
movl $0x3, %esi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x18420
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6eebd(%rip), %r8      # 0x8f909
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %r15
movl $0x1, %esi
movq %r15, %rcx
callq 0x199f0
movl (%r15), %edi
testl %edi, %edi
je 0x20a84
callq 0x19970
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x20b4c
movq %rax, %r14
movq (%rax), %rdi
callq 0x19ed0
movq %rax, %r15
cmpl $0x2, 0x4(%rsp)
jb 0x20ac2
movl $0x1, %r12d
movq (%r14,%r12,8), %rdi
callq 0x19ed0
movq 0x10(%rax), %rax
cmpq 0x10(%r15), %rax
jne 0x20b5b
incq %r12
movl 0x4(%rsp), %eax
cmpq %rax, %r12
jb 0x20a9f
movq 0x10(%r15), %rax
movq 0x20(%r15), %r12
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x20b1e
movq 0xa24e8(%rip), %rbp     # 0xc2fc8
leaq 0x6f857(%rip), %r13     # 0x9033e
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x19ed0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18d30
cmpl $0x0, (%rbp)
je 0x20b12
movq (%r14,%r15,8), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x18970
incq %r15
movl 0x4(%rsp), %eax
cmpq %rax, %r15
jb 0x20aea
movq %r12, %rdi
callq 0x19ed0
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
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
movl $0xfffffff8, %edi       # imm = 0xFFFFFFF8
jmp 0x20a6a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6ed83(%rip), %rcx     # 0x8f909
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1a130
leaq 0x4(%rsp), %r12
cmpl $0x5, %eax
jne 0x20bfd
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18770
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20c41
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x20c84
movl $0x20, %edx
movq %rbx, %rdi
movl $0x2a, %esi
movq %r12, %rcx
callq 0x19de0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20c2e
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x20c78
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192b0
movl %eax, 0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x2b8(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
testl %ebp, %ebp
je 0x20c82
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x20c84
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6ec14(%rip), %rcx     # 0x8f909
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192b0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r12, %rdi
movl %eax, %esi
callq *0x2c8(%rcx)
testl %eax, %eax
je 0x20d47
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq %rax, (%rsp)
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %r14
movq (%rax), %rbx
callq 0x18d30
testl %eax, %eax
je 0x20db3
movq 0xa224c(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x20d93
movq (%rsp), %rsi
leaq 0x6f5b2(%rip), %rdi     # 0x9033e
xorl %eax, %eax
callq 0x18970
movq %r14, %rdi
callq 0x19ed0
movq 0x50(%rax), %rax
movq %rsp, %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq *0x240(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6f1b2(%rip), %rcx     # 0x902f8
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r12
movq (%r15), %rax
movq 0x20(%rax), %r13
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192b0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq *0x230(%rcx)
testl %eax, %eax
je 0x211a4
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
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_O1/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 0x6f12c(%rip), %rcx     # 0x902f8
leaq 0x8(%rsp), %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r13), %rax
movq 0x20(%rax), %r12
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192b0
movq (%r13), %rcx
movq 0x50(%rcx), %rcx
movq 0x280(%rcx), %rcx
testq %rcx, %rcx
je 0x2121b
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
callq *%rcx
jmp 0x2122f
leaq 0x6f1c6(%rip), %rsi     # 0x903e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
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_O1/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 0x6e6a8(%rip), %rsi     # 0x8f909
movq %r12, %rdx
callq 0x18f00
movq %r13, %rdi
movq %r12, %rsi
callq 0x18d30
testl %eax, %eax
je 0x212b0
movq 0xa1d49(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x21295
leaq 0x6f13f(%rip), %rdi     # 0x903ca
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
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
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x1, %esi
callq 0x21f99
movl %eax, %ebp
movq %rbx, %rdi
callq 0x180a0
movl %eax, %r14d
leaq 0x6f2a4(%rip), %rdx     # 0x90597
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19430
testl %ebp, %ebp
jle 0x2132b
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x18980
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x2130d
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x6e7de(%rip), %rcx     # 0x9063e
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a520
movq %rsp, %r14
movq %rax, (%r14)
leaq 0x6e7d8(%rip), %rcx     # 0x90651
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x1a520
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movl $0xa, %esi
movl $0x3, %edx
callq 0x19c20
movl %eax, 0x10(%r14)
movl $0x18, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19790
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x6d130(%rip), %rcx     # 0x8f000
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a520
movq %rsp, %r14
movq %rax, (%r14)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190f0
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a650
movq %rax, 0x10(%r14)
movl $0x18, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19790
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6d131(%rip), %rcx     # 0x8f065
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a520
movq %rsp, %r14
movq %rax, (%r14)
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18d60
movq %rax, %r15
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19790
testq %r15, %r15
je 0x21f8a
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18ea0
movq %rbx, %rdi
movl $0x2, %esi
callq 0x19f70
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %ebx
movq %rdi, %r14
callq 0x1a130
cmpl $0x5, %eax
je 0x22007
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187e0
movq %r14, %rdi
callq 0x180a0
movl %eax, %r15d
cmpl %ebx, %ebp
jl 0x22004
notl %ebp
addl %ebx, %ebp
leal (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x18ea0
incl %r13d
movslq %r13d, %r12
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x19140
addl %ebp, %r12d
jne 0x21fdf
movl %r15d, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187e0
movq %r14, %rdi
callq 0x180a0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22034
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14d
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
movl %ecx, %esi
callq 0x1a130
cmpl $0x5, %eax
jne 0x22150
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19350
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18640
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0x2213e
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
movl $0x1, %r15d
movl %ebp, 0x14(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a3d0
movq %rbx, %rdi
callq 0x180a0
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x1a130
cmpl $0x5, %eax
jne 0x2210c
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x22034
movl %eax, %r13d
addl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
jmp 0x22129
movl %r14d, %eax
incl %eax
movl %eax, %r14d
movslq %eax, %rdx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x19140
movl $0x1, %r13d
addl %r13d, %r12d
incq %r15
cmpq %r15, 0x8(%rsp)
movl 0x14(%rsp), %ebp
jne 0x220b1
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e469(%rip), %rsi     # 0x905c0
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19be0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6e21e(%rip), %rcx     # 0x90711
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18f70
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x24, %esi
movl $0x3, %edx
callq 0x19c20
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190f0
movq %rax, %r12
movq %rbx, %rdi
movl $0x6, %esi
callq 0x190f0
movq %rax, %r15
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x18d60
movq %rax, %rbp
movq %rbx, %rdi
movl $0x8, %esi
xorl %edx, %edx
callq 0x18d60
leaq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rcx
movq 0xe0(%rcx), %r10
testq %r10, %r10
je 0x225bd
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
movq %r14, %rcx
movq %r12, %r8
movl %r15d, %r9d
pushq %rax
pushq %rbp
callq *%r10
addq $0x10, %rsp
jmp 0x225d1
leaq 0x6e1f9(%rip), %rsi     # 0x907bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %r13d
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6ca45(%rip), %rcx     # 0x8f03b
movq %rsp, %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, %r14
leaq 0x30(%rsp), %r15
movl $0x3b9b1ff1, -0x28(%r15) # imm = 0x3B9B1FF1
movq $0x0, -0x20(%r15)
movq %rbx, %rdi
movl $0x24, %esi
movl $0x2, %edx
callq 0x19c20
movl %eax, -0x18(%r15)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq %rax, -0x10(%r15)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190f0
movq %rax, -0x8(%r15)
movq %rbx, %rdi
movl $0x5, %esi
movq %r15, %rdx
callq 0x18d60
movq %rax, 0x8(%r15)
cmpq $0x0, (%r15)
je 0x226a5
movq (%rsp), %rax
movq 0x50(%rax), %rax
movq 0x288(%rax), %rax
testq %rax, %rax
je 0x226c1
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x226d4
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x226d6
movl $0xfffffff9, %edi       # imm = 0xFFFFFFF9
callq 0x19970
movq %rbx, %rdi
movl $0x5, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x226d6
leaq 0x6e120(%rip), %rsi     # 0x907e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x226d6
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c946(%rip), %rcx     # 0x8f03b
leaq 0x30(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdx
callq 0x1a520
movq %rax, %r14
movl $0x3b9b1ff0, 0x8(%rsp)  # imm = 0x3B9B1FF0
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x24, %esi
movl $0x2, %edx
callq 0x19c20
movl %eax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x18d60
movq %rax, 0x28(%rsp)
movq (%r12), %rax
movq 0x50(%rax), %rax
movq 0x290(%rax), %rax
testq %rax, %rax
je 0x22792
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x227a6
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x227a3
leaq 0x6e07f(%rip), %rsi     # 0x90818
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %r15d
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa07e3(%rip), %r14     # 0xc2fd0
movq (%r14), %rdi
callq 0x180a0
movl %eax, (%rsp)
movq (%r14), %rdi
movq (%r15), %rax
movslq 0x2c(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x18980
movq (%r14), %rdi
cmpl $0x6, %eax
jne 0x228a9
movq (%r15), %rax
movq 0x18(%rax), %rsi
callq 0x191d0
movq (%r14), %rdi
movl %ebp, %esi
callq 0x19460
movq (%r14), %rdi
movl $0x24, %esi
movl %ebx, %edx
callq 0x18990
movq (%r14), %rdi
movq %r13, %rsi
callq 0x18b60
movq (%r14), %rdi
movq %r12, %rsi
callq 0x18b60
movq (%r14), %rdi
movslq 0x4(%rsp), %rsi
callq 0x18b60
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x22872
movq (%r14), %rdi
callq 0x1a300
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x22884
movq (%r14), %rdi
callq 0x1a300
movq (%r14), %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a4e0
movq (%r14), %rdi
testl %eax, %eax
je 0x228d1
callq 0x199e0
jmp 0x228d9
leaq 0x6dd1f(%rip), %rsi     # 0x905cf
leaq 0x6dec7(%rip), %rdx     # 0x9077e
movl $0x36, %ecx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19be0
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_O1/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 0x18d30
testl %eax, %eax
je 0x2293b
movq 0xa06be(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x22920
leaq 0x6de80(%rip), %rdi     # 0x90796
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
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_O1/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 0x6dce9(%rip), %rcx     # 0x909e8
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x158(%rax)
je 0x22d75
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18360
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22d88
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x22daf
leaq 0x6dc7d(%rip), %rsi     # 0x909f9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x22daf
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x158(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6dc1f(%rip), %rcx     # 0x909e8
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq (%r14), %rcx
movq 0x48(%rcx), %rcx
movq 0x160(%rcx), %rcx
testq %rcx, %rcx
je 0x22df5
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
jmp 0x22e06
leaq 0x6dc2f(%rip), %rsi     # 0x90a2b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6dbc5(%rip), %rcx     # 0x909e8
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x168(%rax)
je 0x22e99
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18360
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22eac
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x22ed3
leaq 0x6dbbb(%rip), %rsi     # 0x90a5b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x22ed3
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x168(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c146(%rip), %rcx     # 0x8f03b
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x148(%rax)
je 0x22f69
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18210
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x22f7c
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x22fbe
leaq 0x6db1e(%rip), %rsi     # 0x90a8e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x22fbe
movq (%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x148(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
testl %ebp, %ebp
je 0x22fbc
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x22fbe
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c05a(%rip), %rcx     # 0x8f03b
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x150(%rax)
je 0x23055
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x19220
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x23068
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x230aa
leaq 0x6da62(%rip), %rsi     # 0x90abe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x230aa
movq (%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x150(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
testl %ebp, %ebp
je 0x230a8
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x230aa
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/debug_utils_messenger.c
// Function: SubmitDebugUtilsMessage
static int SubmitDebugUtilsMessage(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkDebugUtilsMessageSeverityFlagBitsEXT severity;
    VkDebugUtilsMessageTypeFlagsEXT types;
    VkDebugUtilsMessengerCallbackDataEXT* cbdata;
    VkInstance instance = checkinstance(L, 1, &ud);
    CheckInstancePfn(L, ud, SubmitDebugUtilsMessageEXT);
    severity = checkflags(L, 2);
    types = checkflags(L, 3);
#define CLEANUP zfreeVkDebugUtilsMessengerCallbackDataEXT(L, cbdata, 1)
    cbdata = zcheckVkDebugUtilsMessengerCallbackDataEXT(L, 4, &err);
    if(err) { CLEANUP; return argerror(L, 4); }
    ud->idt->SubmitDebugUtilsMessageEXT(instance, severity, types, cbdata);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x6d642(%rip), %rcx     # 0x90711
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x198(%rax)
je 0x23164
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18f70
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x18f70
movq %rax, %r13
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movl $0x4, %esi
movq %rbp, %rdx
callq 0x18f60
movq %rax, %r12
cmpl $0x0, (%rbp)
je 0x23177
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x4, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x231a4
leaq 0x6d982(%rip), %rsi     # 0x90aed
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x231a4
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movl %r15d, %esi
movl %r13d, %edx
movq %r12, %rcx
callq *0x198(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq