LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetDepthBoundsTestEnable
static int CmdSetDepthBoundsTestEnable(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkBool32 depthBoundsTestEnable = checkboolean(L, 2);
    CheckDevicePfn(L, ud, CmdSetDepthBoundsTestEnableEXT);
    ud->ddt->CmdSetDepthBoundsTestEnableEXT(cb, depthBoundsTestEnable);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cf0a(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18790
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x7d8(%rcx), %rcx
testq %rcx, %rcx
je 0x1fa3f
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fa50
leaq 0x6d5cc(%rip), %rsi     # 0x8d012
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetStencilTestEnable
static int CmdSetStencilTestEnable(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkBool32 stencilTestEnable = checkboolean(L, 2);
    CheckDevicePfn(L, ud, CmdSetStencilTestEnableEXT);
    ud->ddt->CmdSetStencilTestEnableEXT(cb, stencilTestEnable);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6ce9c(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18790
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x7e0(%rcx), %rcx
testq %rcx, %rcx
je 0x1faad
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fabe
leaq 0x6d592(%rip), %rsi     # 0x8d046
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetStencilOp
static int CmdSetStencilOp(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkStencilFaceFlags faceMask = checkflags(L, 2);
    VkStencilOp failOp = checkstencilop(L, 3);
    VkStencilOp passOp = checkstencilop(L, 4);
    VkStencilOp depthFailOp = checkstencilop(L, 5);
    VkCompareOp compareOp = checkcompareop(L, 6);
    CheckDevicePfn(L, ud, CmdSetStencilOpEXT);
    ud->ddt->CmdSetStencilOpEXT(cb, faceMask, failOp, passOp, depthFailOp, compareOp);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x6ce29(%rip), %rcx     # 0x8c909
leaq 0x10(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdx
callq 0x1a4e0
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18f60
movq %rax, %r15
movq %rbx, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x19be0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x12, %esi
movl $0x4, %edx
callq 0x19be0
movl %eax, %r13d
movq %rbx, %rdi
movl $0x12, %esi
movl $0x5, %edx
callq 0x19be0
movl %eax, %r14d
movq %rbx, %rdi
movl $0x11, %esi
movl $0x6, %edx
callq 0x19be0
movq (%r12), %rcx
movq 0x50(%rcx), %rcx
movq 0x7e8(%rcx), %r10
testq %r10, %r10
je 0x1fb85
movq 0x8(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r13d, %ecx
movl %r14d, %r8d
movl %eax, %r9d
callq *%r10
xorl %eax, %eax
jmp 0x1fb96
leaq 0x6d4ea(%rip), %rsi     # 0x8d076
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetPatchControlPoints
static int CmdSetPatchControlPoints(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    uint32_t patchControlPoints = luaL_checkinteger(L, 2);
    CheckDevicePfn(L, ud, CmdSetPatchControlPointsEXT);
    ud->ddt->CmdSetPatchControlPointsEXT(cb, patchControlPoints);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cd51(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190e0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x818(%rcx), %rcx
testq %rcx, %rcx
je 0x1fbf8
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fc09
leaq 0x6d49f(%rip), %rsi     # 0x8d09e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetRasterizerDiscardEnable
static int CmdSetRasterizerDiscardEnable(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkBool32 rasterizerDiscardEnable = checkboolean(L, 2);
    CheckDevicePfn(L, ud, CmdSetRasterizerDiscardEnableEXT);
    ud->ddt->CmdSetRasterizerDiscardEnableEXT(cb, rasterizerDiscardEnable);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cce3(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18790
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x820(%rcx), %rcx
testq %rcx, %rcx
je 0x1fc66
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fc77
leaq 0x6d462(%rip), %rsi     # 0x8d0cf
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetDepthBiasEnable
static int CmdSetDepthBiasEnable(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkBool32 depthBiasEnable = checkboolean(L, 2);
    CheckDevicePfn(L, ud, CmdSetDepthBiasEnableEXT);
    ud->ddt->CmdSetDepthBiasEnableEXT(cb, depthBiasEnable);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cc75(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18790
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x828(%rcx), %rcx
testq %rcx, %rcx
je 0x1fcd4
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fce5
leaq 0x6d42a(%rip), %rsi     # 0x8d105
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetLogicOp
static int CmdSetLogicOp(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkLogicOp logicOp = checklogicop(L, 2);
    CheckDevicePfn(L, ud, CmdSetLogicOpEXT);
    ud->ddt->CmdSetLogicOpEXT(cb, logicOp);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cc07(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x13, %esi
movl $0x2, %edx
callq 0x19be0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x830(%rcx), %rcx
testq %rcx, %rcx
je 0x1fd47
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fd58
leaq 0x6d3e5(%rip), %rsi     # 0x8d133
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetPrimitiveRestartEnable
static int CmdSetPrimitiveRestartEnable(lua_State *L)
    {
    ud_t *ud;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    VkBool32 primitiveRestartEnable = checkboolean(L, 2);
    CheckDevicePfn(L, ud, CmdSetPrimitiveRestartEnableEXT);
    ud->ddt->CmdSetPrimitiveRestartEnableEXT(cb, primitiveRestartEnable);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6cb94(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18790
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq 0x838(%rcx), %rcx
testq %rcx, %rcx
je 0x1fdb5
movq %r14, %rdi
movl %eax, %esi
callq *%rcx
xorl %eax, %eax
jmp 0x1fdc6
leaq 0x6d39d(%rip), %rsi     # 0x8d159
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c961(%rip), %rcx     # 0x8c909
leaq 0x18(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190e0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190e0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190e0
movq %rax, %rbp
movq (%r15), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x848(%rax)
je 0x20075
movq %r14, 0x10(%rsp)
leaq 0xc(%rsp), %rdx
leaq 0x24(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
callq 0x18eb0
movq %rax, %r15
movl (%r14), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x2008b
testq %r15, %r15
je 0x20054
movl 0xc(%rsp), %ecx
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x20086
leaq 0x6d13c(%rip), %rsi     # 0x8d1b8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
movl %eax, %r14d
jmp 0x200d9
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
movq %r15, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movl %ebp, %r9d
callq *0x848(%rax)
testq %r15, %r15
je 0x200d6
movl 0xc(%rsp), %ecx
xorl %r14d, %r14d
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
jmp 0x200d9
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_O3/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 0x6c806(%rip), %rcx     # 0x8c909
leaq 0x18(%rsp), %rdx
movl $0x1, %esi
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190e0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190e0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190e0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x1a0f0
testl %eax, %eax
jle 0x2016d
movq %rbx, %rdi
movl $0x6, %esi
callq 0x190e0
leaq 0x30(%rsp), %r15
movl %eax, (%r15)
jmp 0x20170
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x850(%rax)
je 0x20209
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 0x199f0
movq %rax, %rbp
movl (%r14), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x2021f
testq %rbp, %rbp
je 0x201e8
movl 0x14(%rsp), %ecx
movl $0xc, %edx
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x2021a
leaq 0x6cfcd(%rip), %rsi     # 0x8d1dd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
movl %eax, %r14d
jmp 0x20273
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 0x20270
movl 0x14(%rsp), %ecx
xorl %r14d, %r14d
movl $0xc, %edx
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
jmp 0x20273
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_O3/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 0x6c66f(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq (%r15), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x620(%rax)
je 0x20346
movq %rbx, %rdi
movl $0x41, %esi
movl $0x3, %edx
callq 0x19be0
movl %eax, (%rsp)
movq %rbx, %rdi
movl $0x41, %esi
movl $0x4, %edx
callq 0x19be0
movl %eax, 0x4(%rsp)
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18ac0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20369
testq %r15, %r15
je 0x20325
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19610
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x20357
leaq 0x6cebc(%rip), %rsi     # 0x8d209
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
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 0x2035a
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19610
jmp 0x2035a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c556(%rip), %rcx     # 0x8c909
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a4e0
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x858(%rax)
je 0x2042c
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x19fe0
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x2044e
testq %r14, %r14
je 0x2040b
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x2043d
leaq 0x6ce08(%rip), %rsi     # 0x8d23b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
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 0x2043f
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19160
jmp 0x2043f
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c480(%rip), %rcx     # 0x8c909
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a4e0
movq (%r14), %rcx
movq 0x50(%rcx), %rcx
movq 0x860(%rcx), %rcx
testq %rcx, %rcx
je 0x204b5
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
jmp 0x204c6
leaq 0x6cda9(%rip), %rsi     # 0x8d265
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x18d50
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a0f0
testl %eax, %eax
jle 0x20567
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a0f0
cmpl $0x5, %eax
jne 0x20575
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0x18970
movq %rbx, %rdi
cmpl $0x3, %eax
jne 0x20589
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18ed0
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 0x20520
jmp 0x2056f
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
popq %rbx
popq %r14
popq %r15
retq
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
callq 0x19930
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x205a5
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
callq 0x19930
movq %rbx, %rdi
movl $0x3, %esi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x18410
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6bf71(%rip), %r8      # 0x8c909
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %r15
movl $0x1, %esi
movq %r15, %rcx
callq 0x199b0
movl (%r15), %edi
testl %edi, %edi
je 0x209d0
callq 0x19930
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x20a9c
movq %rax, %r14
movq (%rax), %rdi
callq 0x19e90
movq %rax, %r12
movl 0x4(%rsp), %eax
cmpl $0x2, %eax
jb 0x20a13
movl $0x1, %r15d
movq (%r14,%r15,8), %rdi
callq 0x19e90
movq 0x10(%r12), %rcx
cmpq %rcx, 0x10(%rax)
jne 0x20aab
incq %r15
movl 0x4(%rsp), %eax
cmpq %rax, %r15
jb 0x209ed
jmp 0x20a18
movq 0x10(%r12), %rcx
movq (%rcx), %rcx
movq %rcx, 0x8(%rsp)
movq 0x20(%r12), %r12
testl %eax, %eax
je 0x20a6e
movq 0x9f598(%rip), %rbp     # 0xbffc8
leaq 0x6c907(%rip), %r13     # 0x8d33e
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x19e90
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18d20
cmpl $0x0, (%rbp)
je 0x20a62
movq (%r14,%r15,8), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x18960
incq %r15
movl 0x4(%rsp), %eax
cmpq %rax, %r15
jb 0x20a3a
movq %r12, %rdi
callq 0x19e90
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 0x182d0
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 0x182d0
movl $0xfffffff8, %edi       # imm = 0xFFFFFFF8
jmp 0x209b6
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6be33(%rip), %rcx     # 0x8c909
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x1a4e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1a0f0
leaq 0x4(%rsp), %r12
cmpl $0x5, %eax
jne 0x20b4d
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x18760
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20b91
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x20bd4
movl $0x20, %edx
movq %rbx, %rdi
movl $0x2a, %esi
movq %r12, %rcx
callq 0x19da0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x20b7e
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
jmp 0x20bc8
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192a0
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 0x19160
testl %ebp, %ebp
je 0x20bd2
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
jmp 0x20bd4
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/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 0x6bcc4(%rip), %rcx     # 0x8c909
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192a0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r12, %rdi
movl %eax, %esi
callq *0x2c8(%rcx)
testl %eax, %eax
je 0x20c97
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x20d0a
movq 0x9f2f6(%rip), %rax     # 0xbffc8
cmpl $0x0, (%rax)
je 0x20ce8
leaq 0x6c660(%rip), %rdi     # 0x8d33e
movq %r15, %rsi
xorl %eax, %eax
callq 0x18960
movq %r14, %rdi
callq 0x19e90
movq 0x50(%rax), %rax
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq *0x240(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c26b(%rip), %rcx     # 0x8d2f8
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r12
movq (%r15), %rax
movq 0x20(%rax), %r13
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192a0
movq (%r15), %rcx
movq 0x50(%rcx), %rcx
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq *0x230(%rcx)
testl %eax, %eax
je 0x210eb
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
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_O3/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 0x6c1e5(%rip), %rcx     # 0x8d2f8
leaq 0x8(%rsp), %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1a4e0
movq %rax, %r15
movq (%r13), %rax
movq 0x20(%rax), %r12
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x192a0
movq (%r13), %rcx
movq 0x50(%rcx), %rcx
movq 0x280(%rcx), %rcx
testq %rcx, %rcx
je 0x21162
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
callq *%rcx
jmp 0x21176
leaq 0x6c27f(%rip), %rsi     # 0x8d3e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
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_O3/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 0x6b761(%rip), %rsi     # 0x8c909
movq %r12, %rdx
callq 0x18ef0
movq %r13, %rdi
movq %r12, %rsi
callq 0x18d20
testl %eax, %eax
je 0x211f7
movq 0x9ee02(%rip), %rax     # 0xbffc8
cmpl $0x0, (%rax)
je 0x211dc
leaq 0x6c1f8(%rip), %rdi     # 0x8d3ca
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19e90
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x228(%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x21ee1
movl %eax, %ebp
movq %rbx, %rdi
callq 0x180a0
movl %eax, %r14d
leaq 0x6c35c(%rip), %rdx     # 0x8d597
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19410
testl %ebp, %ebp
jle 0x21273
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x18970
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x21255
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/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 0x6b896(%rip), %rcx     # 0x8d63e
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a4e0
movq %rsp, %r14
movq %rax, (%r14)
leaq 0x6b890(%rip), %rcx     # 0x8d651
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x1a4e0
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movl $0xa, %esi
movl $0x3, %edx
callq 0x19be0
movl %eax, 0x10(%r14)
movl $0x18, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19760
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6a1e8(%rip), %rcx     # 0x8c000
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a4e0
movq %rsp, %r14
movq %rax, (%r14)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190e0
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a610
movq %rax, 0x10(%r14)
movl $0x18, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19760
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6a1e9(%rip), %rcx     # 0x8c065
movl $0x1, %esi
xorl %edx, %edx
callq 0x1a4e0
movq %rsp, %r14
movq %rax, (%r14)
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18d50
movq %rax, %r15
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19760
testq %r15, %r15
je 0x21ed2
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18e90
movq %rbx, %rdi
movl $0x2, %esi
callq 0x19f30
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a0f0
cmpl $0x5, %eax
je 0x21f4f
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq %r14, %rdi
callq 0x180a0
movl %eax, %r15d
cmpl %ebx, %ebp
jl 0x21f4c
notl %ebp
addl %ebx, %ebp
leal (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x18e90
incl %r13d
movslq %r13d, %r12
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x19130
addl %ebp, %r12d
jne 0x21f27
movl %r15d, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
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 0x21f7c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a0f0
cmpl $0x5, %eax
jne 0x22098
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19330
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18630
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0x22086
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 0x1a390
movq %rbx, %rdi
callq 0x180a0
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x1a0f0
cmpl $0x5, %eax
jne 0x22054
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x21f7c
movl %eax, %r13d
addl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19700
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
jmp 0x22071
movl %r14d, %eax
incl %eax
movl %eax, %r14d
movslq %eax, %rdx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x19130
movl $0x1, %r13d
addl %r13d, %r12d
incq %r15
cmpq %r15, 0x8(%rsp)
movl 0x14(%rsp), %ebp
jne 0x21ff9
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6b521(%rip), %rsi     # 0x8d5c0
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19ba0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6b2d9(%rip), %rcx     # 0x8d711
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x1a4e0
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18f60
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x24, %esi
movl $0x3, %edx
callq 0x19be0
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190e0
movq %rax, %r12
movq %rbx, %rdi
movl $0x6, %esi
callq 0x190e0
movq %rax, %r15
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x18d50
movq %rax, %rbp
movq %rbx, %rdi
movl $0x8, %esi
xorl %edx, %edx
callq 0x18d50
leaq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rcx
movq 0xe0(%rcx), %r10
testq %r10, %r10
je 0x22502
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 0x22516
leaq 0x6b2b4(%rip), %rsi     # 0x8d7bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
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_O3/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 0x69b00(%rip), %rcx     # 0x8c03b
movq %rsp, %rdx
movl $0x1, %esi
callq 0x1a4e0
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 0x19be0
movl %eax, -0x18(%r15)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190e0
movq %rax, -0x10(%r15)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190e0
movq %rax, -0x8(%r15)
movq %rbx, %rdi
movl $0x5, %esi
movq %r15, %rdx
callq 0x18d50
movq %rax, 0x8(%r15)
cmpq $0x0, (%r15)
je 0x225ea
movq (%rsp), %rax
movq 0x50(%rax), %rax
movq 0x288(%rax), %rax
testq %rax, %rax
je 0x22606
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x22619
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
jmp 0x2261b
movl $0xfffffff9, %edi       # imm = 0xFFFFFFF9
callq 0x19930
movq %rbx, %rdi
movl $0x5, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x2261b
leaq 0x6b1db(%rip), %rsi     # 0x8d7e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
jmp 0x2261b
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x69a01(%rip), %rcx     # 0x8c03b
leaq 0x30(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdx
callq 0x1a4e0
movq %rax, %r14
movl $0x3b9b1ff0, 0x8(%rsp)  # imm = 0x3B9B1FF0
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x24, %esi
movl $0x2, %edx
callq 0x19be0
movl %eax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190e0
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x18d50
movq %rax, 0x28(%rsp)
movq (%r12), %rax
movq 0x50(%rax), %rax
movq 0x290(%rax), %rax
testq %rax, %rax
je 0x226d7
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *%rax
testl %eax, %eax
je 0x226eb
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
jmp 0x226e8
leaq 0x6b13a(%rip), %rsi     # 0x8d818
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
movl %eax, %r15d
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9d89e(%rip), %r14     # 0xbffd0
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 0x227ee
movq (%r15), %rax
movq 0x18(%rax), %rsi
callq 0x191c0
movq (%r14), %rdi
movl %ebp, %esi
callq 0x19440
movq (%r14), %rdi
movl $0x24, %esi
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 0x227b7
movq (%r14), %rdi
callq 0x1a2c0
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x227c9
movq (%r14), %rdi
callq 0x1a2c0
movq (%r14), %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a4a0
movq (%r14), %rdi
testl %eax, %eax
je 0x22816
callq 0x199a0
jmp 0x2281e
leaq 0x6adda(%rip), %rsi     # 0x8d5cf
leaq 0x6af82(%rip), %rdx     # 0x8d77e
movl $0x36, %ecx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19ba0
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_O3/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 0x22880
movq 0x9d779(%rip), %rax     # 0xbffc8
cmpl $0x0, (%rax)
je 0x22865
leaq 0x6af3b(%rip), %rdi     # 0x8d796
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19e90
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