LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceProperties
static int GetPhysicalDeviceProperties(lua_State *L)
    {
    ud_t *ud;
    VkPhysicalDeviceProperties props;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceProperties2)
        return GetPhysicalDeviceProperties2(L, physical_device, ud);
    ud->idt->GetPhysicalDeviceProperties(physical_device, &props);
    zpushVkPhysicalDeviceProperties(L, &props);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rdi, %rbx
leaq 0x49d05(%rip), %rcx     # 0x90ef4
movl $0x1, %ebp
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0xf0(%rax)
je 0x47250
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19ac0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4726b
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
movl %eax, %ebp
jmp 0x4729b
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x38(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19370
jmp 0x4729b
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xf0(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x189a0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movl %ebp, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x49c2a(%rip), %rcx     # 0x90ef4
movl $0x1, %ebp
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0xe8(%rax)
je 0x47329
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19750
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x47344
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
movl %eax, %ebp
jmp 0x47374
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x20(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18370
jmp 0x47374
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xe8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x196b0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
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_O1/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 0x49b54(%rip), %rcx     # 0x90ef4
movl $0x1, %ebp
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0xf8(%rax)
je 0x47413
movq %rbx, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x19c20
movl %eax, %ebp
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18830
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4744a
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
movl %eax, %ebp
jmp 0x4747c
movq %rbx, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x19c20
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 0x18d20
jmp 0x4747c
movq 0x48(%r13), %rax
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq *0xf8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197c0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
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_O1/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 0x49684(%rip), %rcx     # 0x90ef4
movl $0x1, %ebp
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0x110(%rax)
je 0x478d1
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a3a0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x478ec
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
movl %eax, %ebp
jmp 0x4791c
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x48(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x194c0
jmp 0x4791c
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x110(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x188e0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
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_O1/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 0x4927a(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x120(%rax)
je 0x47cfe
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x19550
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x47d11
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x47d53
leaq 0x5ac07(%rip), %rsi     # 0xa290c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x47d53
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a5d0
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x47d66
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
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 0x19450
movl $0x1, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x47d55
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4912c(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x130(%rax)
je 0x47e4c
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x1a1a0
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x47e5f
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x47ea1
leaq 0x5aaf8(%rip), %rsi     # 0xa294b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x47ea1
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18d80
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x47eb4
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
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
movl $0x1, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x47ea3
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48fde(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r12
movq (%r14), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x128(%rax)
je 0x47f9a
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x18a00
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x47fad
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x47fef
leaq 0x5a9e8(%rip), %rsi     # 0xa2989
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x47fef
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a630
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x48002
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
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 0x19c60
movl $0x1, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x47ff1
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48e90(%rip), %rcx     # 0x90ef4
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18f70
movq %rax, %r12
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1d0(%rax)
je 0x480ce
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1a340
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x480e3
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
jmp 0x480df
leaq 0x5a8f6(%rip), %rsi     # 0xa29cb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %ebp
jmp 0x4811b
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 0x19130
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
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_O1/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 %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
leaq 0x48dac(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1c8(%rax), %rax
testq %rax, %rax
je 0x48196
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x481b6
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x481a7
leaq 0x5a86d(%rip), %rsi     # 0xa2a0a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187e0
movl 0xc(%rsp), %esi
movl $0x1, %ebp
testq %rsi, %rsi
je 0x481a9
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x19210
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 0x48213
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %r15d, %edx
jmp 0x48187
cmpl $0x0, 0xc(%rsp)
je 0x4824a
xorl %r15d, %r15d
movl (%r14,%r15,4), %edx
movq %rbx, %rdi
movl $0x38, %esi
callq 0x18990
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19140
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jb 0x4821d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
jmp 0x481a9
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x0, 0xc(%rsp)
leaq 0x48c7c(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1e8(%rax), %rax
testq %rax, %rax
je 0x482c6
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x482e8
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x482d7
leaq 0x5a77f(%rip), %rsi     # 0xa2a4c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187e0
movl 0xc(%rsp), %esi
testl %esi, %esi
je 0x4832d
leaq 0x1c(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x183f0
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x48334
movl 0xc(%rsp), %ecx
movl $0x20, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
jmp 0x482bc
movl $0x1, %ebp
jmp 0x482d9
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x1e8(%rax)
movl (%r12), %ecx
testl %eax, %eax
je 0x4837d
movl %eax, %ebp
movl $0x20, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x482b7
testl %ecx, %ecx
je 0x483b2
xorl %r15d, %r15d
movq %r14, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x194f0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19140
movl 0xc(%rsp), %ecx
addq $0x20, %r12
cmpq %rcx, %r15
jb 0x48387
movl $0x1, %ebp
movl $0x20, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
jmp 0x482d9
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x0, 0xc(%rsp)
leaq 0x48b04(%rip), %rcx     # 0x90ef4
leaq 0x10(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x48(%rax), %rax
movq 0x1f0(%rax), %rax
testq %rax, %rax
je 0x4843e
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq *%rax
movq %rbx, %rdi
xorl %esi, %esi
testl %eax, %eax
je 0x48460
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x4844f
leaq 0x5a645(%rip), %rsi     # 0xa2a8a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
callq 0x187e0
movl 0xc(%rsp), %esi
testl %esi, %esi
je 0x484a5
leaq 0x1c(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x184a0
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x484ac
movl 0xc(%rsp), %ecx
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
jmp 0x48434
movl $0x1, %ebp
jmp 0x48451
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x1f0(%rax)
movl (%r12), %ecx
testl %eax, %eax
je 0x484f5
movl %eax, %ebp
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x4842f
testl %ecx, %ecx
je 0x4852d
xorl %r15d, %r15d
movq %r14, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19700
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19140
movl 0xc(%rsp), %ecx
addq $0x418, %r12            # imm = 0x418
cmpq %rcx, %r15
jb 0x484ff
movl $0x1, %ebp
movl $0x418, %edx            # imm = 0x418
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %r8d
callq 0x19800
jmp 0x48451
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48649(%rip), %rcx     # 0x90ef4
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1e0(%rax)
je 0x48908
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x19a00
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4891d
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
callq 0x199e0
jmp 0x48919
leaq 0x5a206(%rip), %rsi     # 0xa2b15
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
movl %eax, %ebp
jmp 0x4895a
movq (%rsp), %rax
movq 0x48(%rax), %rax
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x1e0(%rax)
movl $0x1, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movl (%r12), %esi
movq %rbx, %rdi
callq 0x18b60
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x79980(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4965e
leaq 0x595c7(%rip), %rdi     # 0xa2c1b
movq %r15, %rsi
xorl %eax, %eax
callq 0x18970
leaq 0x462be(%rip), %rdx     # 0x8f923
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x18330
movq %rax, %r15
movq %rbx, %rdi
callq 0x19ed0
movq %rax, 0x10(%r15)
movq %rbx, 0x20(%r15)
movq %rbx, %rdi
callq 0x19ed0
movq 0x18(%rax), %rax
movq %rax, 0x18(%r15)
movq %r14, 0x40(%r15)
leaq 0x20(%rip), %rax        # 0x496c0
movq %rax, 0x8(%r15)
movq %rbx, %rdi
callq 0x19ed0
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_O1/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 0x18d30
testl %eax, %eax
je 0x49710
movq 0x798da(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x49704
leaq 0x5953b(%rip), %rdi     # 0xa2c35
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
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_O1/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 0x474c8(%rip), %rcx     # 0x90f7c
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
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 0x49aff
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x49b78
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x49b48
movq %rbx, %rdi
callq 0x19210
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 0x49b59
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x49af0
leaq 0x4ff88(%rip), %rsi     # 0x99ad7
movq %rbx, %rdi
callq 0x1a300
jmp 0x49b73
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19790
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/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 0x473df(%rip), %r13     # 0x90f7c
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
movq %r13, %rcx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x20(%rax), %r12
xorl %r14d, %r14d
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movl $0x2, %esi
movq %rbp, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x19150
movl (%rbp), %edi
testl %edi, %edi
je 0x49bfd
callq 0x19970
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x49c41
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 0x49c44
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
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_O1/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 0x18d30
testl %eax, %eax
je 0x49ca7
movq 0x79352(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x49c8c
leaq 0x5910a(%rip), %rdi     # 0xa2d8c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x168(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18d30
testl %eax, %eax
je 0x4a100
movq 0x78ef9(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4a0e5
leaq 0x58d21(%rip), %rdi     # 0xa2dfc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x1a0(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x44dac(%rip), %rcx     # 0x8f03b
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x191c0
movq %rax, %r15
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movl $0x2, %esi
movq %r13, %rdx
callq 0x1a120
movq %rax, %r12
cmpl $0x0, (%r13)
je 0x4a304
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x4a3af
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, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
testl %ebp, %ebp
je 0x4a34b
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x4a3af
movq 0x78c76(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4a369
movq (%rsp), %rsi
leaq 0x58af7(%rip), %rdi     # 0xa2e59
xorl %eax, %eax
callq 0x18970
movq (%rsp), %rsi
leaq 0x4569b(%rip), %rdx     # 0x8fa0f
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 0x205(%rip), %rdx       # 0x4a5a3
movq %rdx, 0x8(%rax)
movq 0x50(%rcx), %rcx
movq %rcx, 0x50(%rax)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/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 0x4560a(%rip), %rcx     # 0x8fa0f
leaq 0x20(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, 0x18(%rsp)
movq (%r14), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190f0
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x190f0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x190f0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x18f70
movq %rax, %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19210
movq %rax, %r14
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 %r12, %r8
movq %r14, %r9
pushq %rbp
pushq %r13
callq *0x100(%rax)
addq $0x10, %rsp
testl %eax, %eax
je 0x4a4e0
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x4a4fe
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x19790
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/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 0x454eb(%rip), %rcx     # 0x8fa0f
leaq 0x8(%rsp), %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r13), %rax
movq 0x20(%rax), %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190f0
movq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq (%r13), %rcx
movq 0x50(%rcx), %rcx
movq 0x608(%rcx), %r8
testq %r8, %r8
je 0x4a584
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %eax, %ecx
callq *%r8
xorl %eax, %eax
jmp 0x4a595
leaq 0x58906(%rip), %rsi     # 0xa2e91
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/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 0x18d30
testl %eax, %eax
je 0x4a5f4
movq 0x78a05(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4a5d9
leaq 0x588a6(%rip), %rdi     # 0xa2e75
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0xf8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x19ed0
testq %rax, %rax
je 0x4a627
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x195e0
leaq 0x463ba(%rip), %rdx     # 0x909e8
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x18330
movq %rax, %r15
movq %r14, %rdi
callq 0x19ed0
movq %rax, 0x10(%r15)
movq %r14, %rdi
callq 0x19ed0
movq 0x18(%rax), %rax
movq %rax, 0x18(%r15)
movq %r14, 0x20(%r15)
leaq 0x3c(%rip), %rax        # 0x4a6a4
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x19ed0
movq 0x50(%rax), %rax
movq %rax, 0x50(%r15)
movq 0x78945(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4a699
leaq 0x58826(%rip), %rdi     # 0xa2eb5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18d30
testl %eax, %eax
je 0x4a6ce
movq 0x78910(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x4a6ce
leaq 0x58808(%rip), %rdi     # 0xa2ecc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x46140(%rip), %rcx     # 0x909e8
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x1a520
movq %rax, %r15
leaq 0x466ea(%rip), %rcx     # 0x90fab
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x1a4d0
movq %rax, %r13
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movl $0x2, %esi
movq %rbp, %rcx
callq 0x1a2f0
movq %rax, %r12
cmpl $0x0, (%rbp)
je 0x4a934
movl 0x4(%rsp), %ecx
movl $0x48, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x4a981
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
movl $0x48, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %r8d
callq 0x19800
testl %ebp, %ebp
je 0x4a984
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
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_O1/stetre[P]moonvulkan/src/queue.c
// Function: QueueSubmit2
static int QueueSubmit2(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkSubmitInfo2KHR* submits;
    VkQueue queue = checkqueue(L, 1, &ud);
    VkFence fence = testfence(L, 3, NULL);
    CheckDevicePfn(L, ud, QueueSubmit2KHR);
#define CLEANUP zfreearrayVkSubmitInfo2KHR(L, submits, count, 1)
    submits = zcheckarrayVkSubmitInfo2KHR(L, 2, &count, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->QueueSubmit2KHR(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 0x4603a(%rip), %rcx     # 0x909e8
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
leaq 0x465e1(%rip), %rcx     # 0x90fab
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x1a4d0
movq %rax, %r12
movq (%r15), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x698(%rax)
je 0x4aa4c
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %r13
movq %rbx, %rdi
movl $0x2, %esi
movq %r13, %rcx
callq 0x186d0
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x4aa5f
movl 0x4(%rsp), %ecx
movl $0x40, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x4aab3
leaq 0x584cd(%rip), %rsi     # 0xa2f20
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x4aab3
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %esi
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq *0x698(%rax)
movl %eax, %ebp
movl 0x4(%rsp), %ecx
movl $0x40, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r8d
callq 0x19800
testl %ebp, %ebp
je 0x4aab1
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x4aab3
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq