LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceFeatures
static int GetPhysicalDeviceFeatures(lua_State *L)
    {
    ud_t *ud;
    VkPhysicalDeviceFeatures features;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceFeatures2)
        return GetPhysicalDeviceFeatures2(L, physical_device, ud);
    ud->idt->GetPhysicalDeviceFeatures(physical_device, &features);
    zpushVkPhysicalDeviceFeatures(L, &features);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
leaq 0x3ab5a(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
movq %rsp, %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0xe8(%rax)
je 0x443f2
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19730
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4440d
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
jmp 0x44438
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x20(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18370
jmp 0x44438
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xe8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19690
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceFormatProperties
static int GetPhysicalDeviceFormatProperties(lua_State *L)
    {
    VkFormatProperties props;
    VkFormat format;
    ud_t *ud;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceFormatProperties2)
        return GetPhysicalDeviceFormatProperties2(L, physical_device, ud);
    format = checkformat(L, 2);
    ud->idt->GetPhysicalDeviceFormatProperties(physical_device, format, &props);
    zpushVkFormatProperties(L, &props);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3aa90(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
movq %rsp, %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0xf8(%rax)
je 0x444cc
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movl %eax, %ebp
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18820
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x444ff
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
jmp 0x4452c
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x19c00
movq (%rsp), %rcx
movq 0x48(%rcx), %rcx
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
callq *0x28(%rcx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18d10
jmp 0x4452c
movq 0x48(%r13), %rax
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq *0xf8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197a0
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceQueueFamilyProperties
static int GetPhysicalDeviceQueueFamilyProperties(lua_State *L)
    {
    uint32_t i, count = 0;
    VkQueueFamilyProperties *props;
    ud_t *ud;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    
    if(ud->idt->GetPhysicalDeviceQueueFamilyProperties2)
        return GetPhysicalDeviceQueueFamilyProperties2(L, physical_device, ud);

    lua_newtable(L);
    ud->idt->GetPhysicalDeviceQueueFamilyProperties(physical_device, &count, NULL);
    if(count == 0) return 1;
    props = (VkQueueFamilyProperties*)Malloc(L, sizeof(VkQueueFamilyProperties)*count);
    ud->idt->GetPhysicalDeviceQueueFamilyProperties(physical_device, &count, props);
    for(i=0; i<count; i++)
        {
        zpushVkQueueFamilyProperties(L, &(props[i]), i);
        lua_rawseti(L, -2, i+1);
        }
    Free(L, props);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
andl $0x0, (%rsp)
leaq 0x3a7be(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0x108(%rax)
je 0x447d1
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x108(%rax)
movl (%r15), %esi
testl %esi, %esi
je 0x448ca
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1a220
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4486b
movl 0x4(%rsp), %ecx
pushq $0x28
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197e0
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
jmp 0x448ca
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x40(%rax)
movl (%r15), %eax
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x448ca
imulq $0x18, %rax, %rsi
movq %rbx, %rdi
callq 0x191f0
movq %rax, %r15
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %rsp, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq *0x40(%rax)
xorl %r14d, %r14d
pushq $-0x2
popq %r12
movq %r15, %r13
movl (%rsp), %eax
cmpq %rax, %r14
jae 0x4485e
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0x18b90
incq %r14
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x19120
addq $0x18, %r13
jmp 0x44831
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182e0
jmp 0x448ca
movq 0x48(%r13), %rax
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq *0x108(%rax)
xorl %r14d, %r14d
pushq $-0x2
popq %rbp
movq %r15, %r12
movl 0x4(%rsp), %ecx
cmpq %rcx, %r14
jae 0x448b6
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x19d20
incq %r14
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x19120
addq $0x28, %r12
jmp 0x44889
pushq $0x28
popq %rdx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %r8d
callq 0x197e0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceMemoryProperties
static int GetPhysicalDeviceMemoryProperties(lua_State *L)
    {
    VkPhysicalDeviceMemoryProperties props;
    ud_t *ud;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceMemoryProperties2)
        return GetPhysicalDeviceMemoryProperties2(L, physical_device, ud);
    ud->idt->GetPhysicalDeviceMemoryProperties(physical_device, &props);
    zpushVkPhysicalDeviceMemoryProperties(L, &props);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
leaq 0x3a5fe(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0x110(%rax)
je 0x44950
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a380
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4496b
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
jmp 0x44996
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x48(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x194a0
jmp 0x44996
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x110(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x188d0
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movl %ebp, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceExternalBufferProperties
static int GetPhysicalDeviceExternalBufferProperties(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkPhysicalDeviceExternalBufferInfoKHR* info = NULL;
    VkExternalBufferPropertiesKHR* props = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceExternalBufferProperties);
#define CLEANUP do {                                        \
    zfreeVkPhysicalDeviceExternalBufferInfoKHR(L, info, 1); \
    zfreeVkExternalBufferPropertiesKHR(L, props, 1);        \
} while(0)
    info = zcheckVkPhysicalDeviceExternalBufferInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    props = znewchainVkExternalBufferPropertiesKHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->idt->GetPhysicalDeviceExternalBufferProperties(physical_device, info, props);
    zpushVkExternalBufferPropertiesKHR(L, props);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3a241(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x120(%rax)
je 0x44d2e
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x19530
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x44d41
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x44d80
leaq 0x4bbf7(%rip), %rsi     # 0x9092c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x44d80
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a5b0
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x44d93
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x120(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19430
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
jmp 0x44d82
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceExternalFenceProperties
static int GetPhysicalDeviceExternalFenceProperties(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkPhysicalDeviceExternalFenceInfoKHR* info = NULL;
    VkExternalFencePropertiesKHR* props = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceExternalFenceProperties);
#define CLEANUP do {                                        \
    zfreeVkPhysicalDeviceExternalFenceInfoKHR(L, info, 1);  \
    zfreeVkExternalFencePropertiesKHR(L, props, 1);     \
} while(0)
    info = zcheckVkPhysicalDeviceExternalFenceInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    props = znewchainVkExternalFencePropertiesKHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->idt->GetPhysicalDeviceExternalFenceProperties(physical_device, info, props);
    zpushVkExternalFencePropertiesKHR(L, props);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3a10a(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x130(%rax)
je 0x44e65
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1a180
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x44e78
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x44eb7
leaq 0x4baff(%rip), %rsi     # 0x9096b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x44eb7
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18d70
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x44eca
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x130(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18190
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
jmp 0x44eb9
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceExternalSemaphoreProperties
static int GetPhysicalDeviceExternalSemaphoreProperties(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkPhysicalDeviceExternalSemaphoreInfo* info = NULL;
    VkExternalSemaphorePropertiesKHR* props = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceExternalSemaphoreProperties);
#define CLEANUP do {                                        \
    zfreeVkPhysicalDeviceExternalSemaphoreInfo(L, info, 1);  \
    zfreeVkExternalSemaphorePropertiesKHR(L, props, 1);     \
} while(0)
    info = zcheckVkPhysicalDeviceExternalSemaphoreInfo(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    props = znewchainVkExternalSemaphorePropertiesKHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->idt->GetPhysicalDeviceExternalSemaphoreProperties(physical_device, info, props);
    zpushVkExternalSemaphorePropertiesKHR(L, props);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x39fd3(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x128(%rax)
je 0x44f9c
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x189f0
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x44faf
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x44fee
leaq 0x4ba06(%rip), %rsi     # 0x909a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x44fee
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a610
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x45001
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x128(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19c40
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
jmp 0x44ff0
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceMultisampleProperties
static int GetPhysicalDeviceMultisampleProperties(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkMultisamplePropertiesEXT* props;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    VkSampleCountFlagBits samples = checkflags(L, 2);
    CheckInstancePfn(L, ud, GetPhysicalDeviceMultisamplePropertiesEXT);
#define CLEANUP zfreeVkMultisamplePropertiesEXT(L, props, 1)
    props = znewchainVkMultisamplePropertiesEXT(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->idt->GetPhysicalDeviceMultisamplePropertiesEXT(physical_device, samples, props);
    zpushVkMultisamplePropertiesEXT(L, props);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x39e9c(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x18f50
movq %rax, %r12
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1d0(%rax)
je 0x450be
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a320
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x450d3
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
jmp 0x450cf
leaq 0x4b926(%rip), %rsi     # 0x909eb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
jmp 0x45103
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq %r14, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq *0x1d0(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19110
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceCalibrateableTimeDomains
static int GetPhysicalDeviceCalibrateableTimeDomains(lua_State *L)
    {
    ud_t *ud;
    VkResult ec;
    uint32_t i, count = 0;
    VkTimeDomainEXT* domains;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceCalibrateableTimeDomainsEXT);

    ec = ud->idt->GetPhysicalDeviceCalibrateableTimeDomainsEXT(physical_device, &count, NULL);
    CheckError(L, ec);

    lua_newtable(L);
    if(count==0) return 1;

    domains = (VkTimeDomainEXT*)Malloc(L, sizeof(VkTimeDomainEXT)*count);
    ec = ud->idt->GetPhysicalDeviceCalibrateableTimeDomainsEXT(physical_device, &count, domains);
    if(ec)
        { Free(L, domains); CheckError(L, ec); }
    for(i=0; i<count; i++)
        {
        pushtimedomain(L, domains[i]);
        lua_rawseti(L, -2, i+1);
        }
    Free(L, domains);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
andl $0x0, 0xc(%rsp)
leaq 0x39dc3(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1c8(%rax), %rax
testq %rax, %rax
je 0x4517f
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x451a3
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x45190
leaq 0x4b8a4(%rip), %rsi     # 0x90a2a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187d0
movl 0xc(%rsp), %esi
testq %rsi, %rsi
je 0x45192
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x191f0
movq %rax, %r14
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq *0x1c8(%rax)
testl %eax, %eax
je 0x451fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
jmp 0x45170
xorl %r15d, %r15d
pushq $0x38
popq %r12
pushq $-0x2
popq %r13
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jae 0x45231
movl (%r14,%r15,4), %edx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x18980
incq %r15
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x19120
jmp 0x45206
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
jmp 0x45192
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceFragmentShadingRates
static int GetPhysicalDeviceFragmentShadingRates(lua_State *L)
    {
    int err;
    VkResult ec;
    uint32_t i, count = 0;
    ud_t *ud;
    VkPhysicalDeviceFragmentShadingRateKHR *rates = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceFragmentShadingRatesKHR);
    ec = ud->idt->GetPhysicalDeviceFragmentShadingRatesKHR(physical_device, &count, NULL);
    if(ec) { CheckError(L, ec); return 0; }
    lua_newtable(L);
    if(count == 0) return 1;
#define CLEANUP zfreearrayVkPhysicalDeviceFragmentShadingRateKHR(L, rates, count, 1)
    rates = znewchainarrayVkPhysicalDeviceFragmentShadingRateKHR(L, count, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ec = ud->idt->GetPhysicalDeviceFragmentShadingRatesKHR(physical_device, &count, rates);
    if(ec) { CLEANUP; CheckError(L, ec); return 0; }
    for(i=0; i<count; i++)
        {
        zpushVkPhysicalDeviceFragmentShadingRateKHR(L, &rates[i]);
        lua_rawseti(L, -2, i+1);
        }
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
andl $0x0, 0xc(%rsp)
leaq 0x39c98(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1e8(%rax), %rax
testq %rax, %rax
je 0x452aa
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x452cc
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x452bb
leaq 0x4b7bb(%rip), %rsi     # 0x90a6c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187d0
movl 0xc(%rsp), %esi
testl %esi, %esi
je 0x452bd
leaq 0x1c(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x183f0
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x4530d
movl 0xc(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
jmp 0x452a0
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq *0x1e8(%rax)
testl %eax, %eax
je 0x4534f
movl %eax, %ebp
movl 0xc(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x4529b
xorl %r15d, %r15d
pushq $-0x2
popq %rbp
movq %r14, %r12
movl 0xc(%rsp), %ecx
cmpq %rcx, %r15
jae 0x45382
movq %rbx, %rdi
movq %r12, %rsi
callq 0x194d0
incq %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x19120
addq $0x20, %r12
jmp 0x45358
pushq $0x20
popq %rdx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0x197e0
jmp 0x452bd
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceToolProperties
static int GetPhysicalDeviceToolProperties(lua_State *L)
    {
    int err;
    VkResult ec;
    uint32_t i, count = 0;
    ud_t *ud;
    VkPhysicalDeviceToolPropertiesEXT *props = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceToolPropertiesEXT);
    ec = ud->idt->GetPhysicalDeviceToolPropertiesEXT(physical_device, &count, NULL);
    if(ec) { CheckError(L, ec); return 0; }
    lua_newtable(L);
    if(count == 0) return 1;
#define CLEANUP zfreearrayVkPhysicalDeviceToolPropertiesEXT(L, props, count, 1)
    props = znewchainarrayVkPhysicalDeviceToolPropertiesEXT(L, count, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ec = ud->idt->GetPhysicalDeviceToolPropertiesEXT(physical_device, &count, props);
    if(ec) { CLEANUP; CheckError(L, ec); return 0; }
    for(i=0; i<count; i++)
        {
        zpushVkPhysicalDeviceToolPropertiesEXT(L, &props[i]);
        lua_rawseti(L, -2, i+1);
        }
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
andl $0x0, 0xc(%rsp)
leaq 0x39b3e(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1f0(%rax), %rax
testq %rax, %rax
je 0x45404
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x45426
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x45415
leaq 0x4b69f(%rip), %rsi     # 0x90aaa
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187d0
movl 0xc(%rsp), %esi
testl %esi, %esi
je 0x45417
leaq 0x1c(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x184a0
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x45469
movl 0xc(%rsp), %ecx
pushq $0x1
popq %r8
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
jmp 0x453fa
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq *0x1f0(%rax)
testl %eax, %eax
je 0x454ad
movl %eax, %ebp
movl 0xc(%rsp), %ecx
pushq $0x1
popq %r8
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x453f5
xorl %r15d, %r15d
pushq $-0x2
popq %rbp
movq %r14, %r12
movl 0xc(%rsp), %ecx
cmpq %rcx, %r15
jae 0x454e3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x196e0
incq %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x19120
addq $0x418, %r12            # imm = 0x418
jmp 0x454b6
pushq $0x1
popq %rbp
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0x197e0
jmp 0x45417
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceQueueFamilyPerformanceQueryPasses
static int GetPhysicalDeviceQueueFamilyPerformanceQueryPasses(lua_State *L)
    {
    int err;
    uint32_t num_passes;
    ud_t *ud;
    VkQueryPoolPerformanceCreateInfoKHR *info = NULL;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR);
#define CLEANUP zfreeVkQueryPoolPerformanceCreateInfoKHR (L, info, 1)
    info = zcheckVkQueryPoolPerformanceCreateInfoKHR (L, 2, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->idt->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physical_device, info, &num_passes);
    CLEANUP;
#undef CLEANUP
    lua_pushinteger(L, num_passes);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x3971b(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
movq %rsp, %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1e0(%rax)
je 0x45832
pushq $0x2
popq %rsi
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x199e0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x45847
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
callq 0x199c0
jmp 0x45843
leaq 0x4b2fc(%rip), %rsi     # 0x90b35
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
jmp 0x4587c
movq (%rsp), %rax
movq 0x48(%rax), %rax
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x1e0(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
movl (%r12), %esi
movq %rbx, %rdi
callq 0x18b50
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline.c
// Function: newpipeline
static int newpipeline(lua_State *L, VkPipeline  pipeline, VkDevice device, const VkAllocationCallbacks *allocator)
    {
    ud_t *ud;
    TRACE_CREATE(pipeline, "pipeline");
    ud = newuserdata_nondispatchable(L, pipeline, PIPELINE_MT);
    ud->parent_ud = UD(device);
    ud->device = device;
    ud->instance = UD(device)->instance;
    ud->allocator = allocator;
    ud->destructor = freepipeline;
    ud->ddt = UD(device)->ddt;
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x74aeb(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x464c3
leaq 0x4a782(%rip), %rdi     # 0x90c3b
movq %r15, %rsi
xorl %eax, %eax
callq 0x18960
leaq 0x37459(%rip), %rdx     # 0x7d923
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x18330
movq %rax, %r15
movq %rbx, %rdi
callq 0x19eb0
movq %rax, 0x10(%r15)
movq %rbx, 0x20(%r15)
movq %rbx, %rdi
callq 0x19eb0
movq 0x18(%rax), %rax
movq %rax, 0x18(%r15)
movq %r14, 0x40(%r15)
leaq 0x20(%rip), %rax        # 0x46525
movq %rax, 0x8(%r15)
movq %rbx, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %rax, 0x50(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline.c
// Function: freepipeline
static int freepipeline(lua_State *L, ud_t *ud)
    {
    VkPipeline pipeline = (VkPipeline)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    PFN_vkDestroyPipeline DestroyPipeline = ud->ddt->DestroyPipeline;
    VkDevice device = ud->device;

    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(pipeline, "pipeline");
    DestroyPipeline(device, pipeline, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
movq 0x50(%rsi), %rax
movq 0x190(%rax), %r12
callq 0x18d20
testl %eax, %eax
je 0x46575
movq 0x74a45(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x46569
leaq 0x4a6f6(%rip), %rdi     # 0x90c55
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *%r12
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline_cache.c
// Function: GetPipelineCacheData
static int GetPipelineCacheData(lua_State *L)
    {
    VkResult ec;
    size_t size;
    char *data;
    ud_t *ud;
    VkPipelineCache pipeline_cache = checkpipeline_cache(L, 1, &ud);
    VkDevice device = ud->device;
    /* first, get the size */
    ec = ud->ddt->GetPipelineCacheData(device, pipeline_cache, &size, NULL);
    CheckError(L, ec);
    if(size == 0)
        { lua_pushstring(L, ""); return 1; }
    data = (char*)Malloc(L, size);
    ec = ud->ddt->GetPipelineCacheData(device, pipeline_cache, &size, data);
    if(ec) { Free(L, data); CheckError(L, ec); return 0; }
    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x38681(%rip), %rcx     # 0x7ef7c
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rax
movq 0x20(%rax), %r15
movq 0x50(%rax), %rax
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *0x170(%rax)
testl %eax, %eax
je 0x46955
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x469a0
movq %rbx, %rdi
callq 0x191f0
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x170(%rax)
testl %eax, %eax
je 0x469b1
movl %eax, %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x46937
leaq 0x41130(%rip), %rsi     # 0x87ad7
movq %rbx, %rdi
callq 0x1a2e0
jmp 0x46946
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19770
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
jmp 0x46946
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline_cache.c
// Function: MergePipelineCaches
static int MergePipelineCaches(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkPipelineCache destination = checkpipeline_cache(L, 1, &ud);
    VkDevice device = ud->device;
    VkPipelineCache *source = checkpipeline_cachelist(L, 2, &count, &err, NULL);
    if(err) return argerrorc(L, 2, err);
    ec = ud->ddt->MergePipelineCaches(device, destination, count, source);
    Free(L, source);
    CheckError(L, ec);
    return 0;
# undef first
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x38594(%rip), %r13     # 0x7ef7c
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
movq %r13, %rcx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x20(%rax), %r12
xorl %r14d, %r14d
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x19130
movl (%rbp), %edi
testl %edi, %edi
je 0x46a42
callq 0x19950
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x46a86
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq *0x178(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182e0
testl %ebp, %ebp
je 0x46a89
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline_cache.c
// Function: freepipeline_cache
static int freepipeline_cache(lua_State *L, ud_t *ud)
    {
    VkPipelineCache pipeline_cache = (VkPipelineCache)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(pipeline_cache, "pipeline_cache");
    UD(device)->ddt->DestroyPipelineCache(device, pipeline_cache, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x46aec
movq 0x744dd(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x46ad1
leaq 0x4a2e5(%rip), %rdi     # 0x90dac
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x168(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/pipeline_layout.c
// Function: freepipeline_layout
static int freepipeline_layout(lua_State *L, ud_t *ud)
    {
    VkPipelineLayout pipeline_layout = (VkPipelineLayout)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;

    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(pipeline_layout, "pipeline_layout");
    UD(device)->ddt->DestroyPipelineLayout(device, pipeline_layout, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x46f03
movq 0x740c6(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x46ee8
leaq 0x49f3e(%rip), %rdi     # 0x90e1c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x1a0(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/query_pool.c
// Function: Create
static int Create(lua_State *L)
    {
    int err;
    ud_t *ud, *device_ud;
    VkResult ec;
    VkQueryPool query_pool;
    VkQueryPoolCreateInfo* info;
    VkDevice device = checkdevice(L, 1, &device_ud);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
#define CLEANUP zfreeVkQueryPoolCreateInfo(L, info, 1)
    info = zcheckVkQueryPoolCreateInfo(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = device_ud->ddt->CreateQueryPool(device, info, allocator, &query_pool);
    CLEANUP;
#undef CLEANUP
    CheckError(L, ec);
    TRACE_CREATE(query_pool, "query_pool");
    ud = newuserdata_nondispatchable(L, query_pool, QUERY_POOL_MT);
    ud->parent_ud = device_ud;
    ud->device = device;
    ud->instance = device_ud->instance;
    ud->allocator = allocator;
    ud->destructor = freequery_pool;
    ud->ddt = device_ud->ddt;
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x35fa8(%rip), %rcx     # 0x7d03b
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
callq 0x1a500
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x191a0
movq %rax, %r15
pushq $0x2
popq %rsi
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rdx
callq 0x1a100
movq %rax, %r12
cmpl $0x0, (%r13)
je 0x470f9
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x47141
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rsp, %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xf0(%rax)
movl %eax, %r13d
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x19150
testl %r13d, %r13d
je 0x47154
movq %rbx, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x73e3d(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x47172
movq (%rsp), %rsi
leaq 0x49d0e(%rip), %rdi     # 0x90e79
xorl %eax, %eax
callq 0x18960
movq (%rsp), %rsi
leaq 0x36892(%rip), %rdx     # 0x7da0f
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x18330
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %r14, 0x20(%rax)
movq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %r15, 0x40(%rax)
leaq 0x1df(%rip), %rdx       # 0x47386
movq %rdx, 0x8(%rax)
movq 0x50(%rcx), %rcx
movq %rcx, 0x50(%rax)
jmp 0x47143
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/query_pool.c
// Function: GetQueryPoolResults
static int GetQueryPoolResults(lua_State *L)
    {
// @@ TODO: specialization for performance counters results (see VK_KHR_performance_query).
    VkResult ec;
    ud_t * ud;
    VkQueryPool query_pool  = checkquery_pool(L, 1, &ud);
    VkDevice device = ud->device;
    uint32_t first = luaL_checkinteger(L, 2);
    uint32_t count = luaL_checkinteger(L, 3);
    size_t size = luaL_checkinteger(L, 4);
    VkDeviceSize stride = luaL_checkinteger(L, 5);
    VkQueryResultFlags flags = checkflags(L, 6);

    char* data = (char*)Malloc(L, size);

    ec = ud->ddt->GetQueryPoolResults(device, query_pool, first, count, size, data, stride, flags);
    if(ec)
        {
        Free(L, data);
        CheckError(L, ec);
        return 0;
        }
    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x36815(%rip), %rcx     # 0x7da0f
pushq $0x1
popq %rsi
leaq 0x20(%rsp), %r14
movq %r14, %rdx
callq 0x1a500
movq %rax, 0x18(%rsp)
movq (%r14), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, 0x8(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r14
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x18f50
movq %rax, %rbp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x191f0
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %r15d, %ecx
movq %r13, %r8
movq %r12, %r9
pushq %rbp
pushq %r14
callq *0x100(%rax)
addq $0x10, %rsp
testl %eax, %eax
je 0x472cb
movl %eax, %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x472e7
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x19770
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/query_pool.c
// Function: ResetQueryPool
static int ResetQueryPool(lua_State *L)
    {
    ud_t *ud;
    VkQueryPool query_pool  = checkquery_pool(L, 1, &ud);
    VkDevice device = ud->device;
    uint32_t first = luaL_checkinteger(L, 2);
    uint32_t count = luaL_checkinteger(L, 3);
    CheckDevicePfn(L, ud, ResetQueryPool);
    ud->ddt->ResetQueryPool(device, query_pool, first, count);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x36702(%rip), %rcx     # 0x7da0f
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r13
movq %r13, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r13), %rax
movq 0x20(%rax), %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r12
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq (%r13), %rcx
movq 0x50(%rcx), %rcx
movq 0x608(%rcx), %r8
testq %r8, %r8
je 0x47367
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %eax, %ecx
callq *%r8
xorl %eax, %eax
jmp 0x47378
leaq 0x49b43(%rip), %rsi     # 0x90eb1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/query_pool.c
// Function: freequery_pool
static int freequery_pool(lua_State *L, ud_t *ud)
    {
    VkQueryPool query_pool = (VkQueryPool)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;

    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(query_pool, "query_pool");
    UD(device)->ddt->DestroyQueryPool(device, query_pool, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x473d7
movq 0x73bf2(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x473bc
leaq 0x49ae3(%rip), %rdi     # 0x90e95
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0xf8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/queue.c
// Function: moonvulkan_pushqueue
int pushqueue(lua_State *L, VkQueue queue, VkDevice device)
    { 
    ud_t *ud = UD(queue);
    if(!ud)
        {
        /* create the userdata associated with this object */
        ud = newuserdata_dispatchable(L, queue, QUEUE_MT);
        ud->parent_ud = UD(device);
        ud->instance = UD(device)->instance;
        ud->device = device;
        ud->destructor = freequeue;
        ud->ddt = UD(device)->ddt;
        TRACE_CREATE(queue, "queue");
        return 1;
        }
    return pushuserdata(L, ud);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x19eb0
testq %rax, %rax
je 0x4740b
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x195c0
leaq 0x375d6(%rip), %rdx     # 0x7e9e8
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x18330
movq %rax, %r15
movq %r14, %rdi
callq 0x19eb0
movq %rax, 0x10(%r15)
movq %r14, %rdi
callq 0x19eb0
movq 0x18(%rax), %rax
movq %rax, 0x18(%r15)
movq %r14, 0x20(%r15)
leaq 0x3a(%rip), %rax        # 0x47484
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %rax, 0x50(%r15)
movq 0x73b33(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x4747b
leaq 0x49a64(%rip), %rdi     # 0x90ed5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/queue.c
// Function: freequeue
static int freequeue(lua_State *L, ud_t *ud)
    {
    VkQueue queue = (VkQueue)(uintptr_t)ud->handle;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(queue, "queue");
    return 0;
    }

// Assembly:
pushq %rbx
movq (%rsi), %rbx
callq 0x18d20
testl %eax, %eax
je 0x474ae
movq 0x73b00(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x474ae
leaq 0x49a48(%rip), %rdi     # 0x90eec
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/queue.c
// Function: QueueSubmit
static int QueueSubmit(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkSubmitInfo* submits;
    VkQueue queue = checkqueue(L, 1, &ud);
    VkFence fence = testfence(L, 3, NULL);
#define CLEANUP zfreearrayVkSubmitInfo(L, submits, count, 1)
    submits = zcheckarrayVkSubmitInfo(L, 2, &count, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->QueueSubmit(queue, count, submits, fence);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x37362(%rip), %rcx     # 0x7e9e8
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
callq 0x1a500
movq %rax, %r15
leaq 0x3790e(%rip), %rcx     # 0x7efab
xorl %r14d, %r14d
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1a4b0
movq %rax, %r13
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rcx
callq 0x1a2d0
movq %rax, %r12
cmpl $0x0, (%rbp)
je 0x47704
movl 0x4(%rsp), %ecx
pushq $0x48
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x197e0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x4774d
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %esi
movq %r15, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq *0x10(%rax)
movl %eax, %ebp
movl 0x4(%rsp), %ecx
pushq $0x48
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x197e0
testl %ebp, %ebp
je 0x47750
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq