LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: stetre[P]moonvulkan/src/queue.c
// Function: QueueBindSparse
static int QueueBindSparse(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkBindSparseInfo* binds;
    VkQueue queue = checkqueue(L, 1, &ud);
    VkFence fence = testfence(L, 3, NULL);
#define CLEANUP zfreearrayVkBindSparseInfo(L, binds, count, 1)
    binds = zcheckarrayVkBindSparseInfo(L, 2, &count, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->QueueBindSparse(queue, count, binds, fence);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
leaq 0x6fe61(%rip), %rcx     # 0xd09a0
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x70405(%rip), %rcx     # 0xd0f63
callq 0x1a5f0
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x30(%rsp), %rdx
leaq 0x34(%rsp), %rcx
callq 0x18700
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x60bde
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x30(%rsp), %ecx
movl $0x60, %edx
movl $0x1, %r8d
callq 0x198d0
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x60c56
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x88(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0x30(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq *%rax
movl %eax, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x30(%rsp), %ecx
movl $0x60, %edx
movl $0x1, %r8d
callq 0x198d0
cmpl $0x0, 0x2c(%rsp)
je 0x60c4c
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x60c56
jmp 0x60c4e
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/render_pass.c
// Function: GetRenderAreaGranularity
static int GetRenderAreaGranularity(lua_State *L)
    {
    ud_t *ud;
    VkRenderPass render_pass = checkrender_pass(L, 1, &ud);
    VkDevice device = ud->device;
    VkExtent2D granularity;
    ud->ddt->GetRenderAreaGranularity(device, render_pass, &granularity);
    zpushVkExtent2D(L, &granularity);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6fe0e(%rip), %rcx     # 0xd0fbd
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x218(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsp, %rdx
callq *%rax
movq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x1a1f0
movl $0x1, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/render_pass.c
// Function: freerender_pass
static int freerender_pass(lua_State *L, ud_t *ud)
    {
    VkRenderPass render_pass = (VkRenderPass)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(render_pass, "render_pass");
    UD(device)->ddt->DestroyRenderPass(device, render_pass, allocator);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x61255
movl $0x0, 0x34(%rsp)
jmp 0x612a6
jmp 0x61257
movq 0x9bd3a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x61276
movq 0x18(%rsp), %rsi
leaq 0x81d08(%rip), %rdi     # 0xe2f77
movb $0x0, %al
callq 0x189d0
jmp 0x61278
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x210(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/sampler.c
// Function: Create
static int Create(lua_State *L)
    {
    int err;
    ud_t *ud, *device_ud;
    VkResult ec;
    VkSampler sampler;
    VkSamplerCreateInfo* info;
    VkDevice device = checkdevice(L, 1, &device_ud);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
#define CLEANUP zfreeVkSamplerCreateInfo(L, info, 1)
    info = zcheckVkSamplerCreateInfo(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = device_ud->ddt->CreateSampler(device, info, allocator, &sampler);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    TRACE_CREATE(sampler, "sampler");
    ud = newuserdata_nondispatchable(L, sampler, SAMPLER_MT);
    ud->parent_ud = device_ud;
    ud->device = device;
    ud->instance = device_ud->instance;
    ud->allocator = allocator;
    ud->destructor = freesampler;
    ud->ddt = device_ud->ddt;
    return 1;
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x30(%rsp), %rdx
leaq 0x6db3c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
movl $0x3, %esi
callq 0x19260
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x44(%rsp), %rdx
callq 0x18eb0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x61587
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x54(%rsp)
jmp 0x61697
movq 0x30(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x1a8(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq *%rax
movl %eax, 0x2c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x2c(%rsp)
je 0x615ef
movq 0x48(%rsp), %rdi
movl 0x2c(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x48(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x54(%rsp)
jmp 0x61697
jmp 0x615f1
jmp 0x615f3
movq 0x9b99e(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x61612
movq 0x20(%rsp), %rsi
leaq 0x819a8(%rip), %rdi     # 0xe2fb3
movb $0x0, %al
callq 0x189d0
jmp 0x61614
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x6efd1(%rip), %rdx     # 0xd05f6
xorl %ecx, %ecx
callq 0x18350
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x38(%rsp), %rax
leaq 0x67(%rip), %rcx        # 0x616e0
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rax
movq 0x50(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x50(%rax)
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
// File: stetre[P]moonvulkan/src/sampler.c
// Function: freesampler
static int freesampler(lua_State *L, ud_t *ud)
    {
    VkSampler sampler = (VkSampler)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(sampler, "sampler");
    UD(device)->ddt->DestroySampler(device, sampler, allocator);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x61735
movl $0x0, 0x34(%rsp)
jmp 0x61786
jmp 0x61737
movq 0x9b85a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x61756
movq 0x18(%rsp), %rsi
leaq 0x8187d(%rip), %rdi     # 0xe2fcc
movb $0x0, %al
callq 0x189d0
jmp 0x61758
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x1b0(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/sampler_ycbcr_conversion.c
// Function: freesampler_ycbcr_conversion
static int freesampler_ycbcr_conversion(lua_State *L, ud_t *ud)
    {
    VkSamplerYcbcrConversion sampler_ycbcr_conversion = (VkSamplerYcbcrConversion)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(sampler_ycbcr_conversion, "sampler_ycbcr_conversion");
    UD(device)->ddt->DestroySamplerYcbcrConversion(device, sampler_ycbcr_conversion, allocator);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x61c55
movl $0x0, 0x34(%rsp)
jmp 0x61ca6
jmp 0x61c57
movq 0x9b33a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x61c76
movq 0x18(%rsp), %rsi
leaq 0x81413(%rip), %rdi     # 0xe3082
movb $0x0, %al
callq 0x189d0
jmp 0x61c78
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x510(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: ImportSemaphoreFd
static int ImportSemaphoreFd(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkImportSemaphoreFdInfoKHR* info;
    VkSemaphore semaphore = checksemaphore(L, 1, &ud);
    CheckDevicePfn(L, ud, ImportSemaphoreFdKHR);
#define CLEANUP zfreeVkImportSemaphoreFdInfoKHR(L, info, 1)
    info = zcheckVkImportSemaphoreFdInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    info->semaphore = semaphore;
    ec = ud->ddt->ImportSemaphoreFdKHR(ud->device, info);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6edbf(%rip), %rcx     # 0xd0f4e
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x488(%rax)
jne 0x621c8
movq 0x28(%rsp), %rdi
leaq 0x80faf(%rip), %rsi     # 0xe3167
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x622a8
jmp 0x621ca
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
callq 0x19c40
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x62231
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x34(%rsp)
jmp 0x622a8
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x488(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rdi
movq 0x10(%rsp), %rsi
callq *%rax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x20(%rsp)
je 0x6229e
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x622a8
jmp 0x622a0
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: GetSemaphoreFd
static int GetSemaphoreFd(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    int fd;
    VkSemaphoreGetFdInfoKHR* info;
    VkSemaphore semaphore = checksemaphore(L, 1, &ud);
    CheckDevicePfn(L, ud, GetSemaphoreFdKHR);
#define CLEANUP zfreeVkSemaphoreGetFdInfoKHR(L, info, 1)
    info = zcheckVkSemaphoreGetFdInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    info->semaphore = semaphore;
    ec = ud->ddt->GetSemaphoreFdKHR(ud->device, info, &fd);
    CLEANUP;
#undef CLEANUP
    CheckError(L, ec);
    lua_pushinteger(L, fd);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0x6ec6f(%rip), %rcx     # 0xd0f4e
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x490(%rax)
jne 0x62318
movq 0x38(%rsp), %rdi
leaq 0x80e89(%rip), %rsi     # 0xe3191
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x62411
jmp 0x6231a
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x19df0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x62386
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x62411
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x490(%rax), %rax
movq 0x28(%rsp), %rcx
movq 0x20(%rcx), %rdi
movq 0x18(%rsp), %rsi
leaq 0x24(%rsp), %rdx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x30(%rsp)
je 0x623f8
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x62411
jmp 0x623fa
movq 0x38(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x18be0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: GetSemaphoreCounterValue
static int GetSemaphoreCounterValue(lua_State *L)
    {
    VkResult ec;
    uint64_t value;
    ud_t *ud;
    VkSemaphore semaphore = checksemaphore(L, 1, &ud);
    CheckDevicePfn(L, ud, GetSemaphoreCounterValue);
    ec = ud->ddt->GetSemaphoreCounterValue(ud->device, semaphore, &value);
    CheckError(L, ec);
    lua_pushinteger(L, value);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0x6eb0f(%rip), %rcx     # 0xd0f4e
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x5d8(%rax)
jne 0x62475
movq 0x28(%rsp), %rdi
leaq 0x80d50(%rip), %rsi     # 0xe31b8
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x624e0
jmp 0x62477
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x5d8(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x624c7
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x624e0
jmp 0x624c9
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18be0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: WaitSemaphores
static int WaitSemaphores(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkSemaphoreWaitInfo* info;
    VkDevice device = checkdevice(L, 1, &ud);
    uint64_t timeout = luaL_checkinteger(L, 3);
    CheckDevicePfn(L, ud, WaitSemaphores);
#define CLEANUP zfreeVkSemaphoreWaitInfo(L, info, 1)
    info = zcheckVkSemaphoreWaitInfo(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->WaitSemaphores(device, info, timeout);
    CLEANUP;
#undef CLEANUP
    CheckError(L, ec);
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0x6cb2c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19190
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x5e0(%rax)
jne 0x6255c
movq 0x38(%rsp), %rdi
leaq 0x80c9a(%rip), %rsi     # 0xe31e6
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x62631
jmp 0x6255e
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x199a0
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x625c7
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x62631
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x5e0(%rax), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x30(%rsp)
je 0x62627
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x62631
jmp 0x62629
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: SignalSemaphore
static int SignalSemaphore(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkSemaphoreSignalInfo* info;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, SignalSemaphore);
#define CLEANUP zfreeVkSemaphoreSignalInfo(L, info, 1)
    info = zcheckVkSemaphoreSignalInfo(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->SignalSemaphore(device, info);
    CLEANUP;
#undef CLEANUP
    CheckError(L, ec);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6c9dc(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x5e8(%rax)
jne 0x62698
movq 0x28(%rsp), %rdi
leaq 0x80b82(%rip), %rsi     # 0xe320a
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x62766
jmp 0x6269a
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
callq 0x1a710
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x62701
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x34(%rsp)
jmp 0x62766
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x5e8(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq *%rax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x20(%rsp)
je 0x6275c
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x62766
jmp 0x6275e
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/semaphore.c
// Function: freesemaphore
static int freesemaphore(lua_State *L, ud_t *ud)
    {
    VkSemaphore semaphore = (VkSemaphore)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;

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

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x627c5
movl $0x0, 0x34(%rsp)
jmp 0x62816
jmp 0x627c7
movq 0x9a7ca(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x627e6
movq 0x18(%rsp), %rsi
leaq 0x8096d(%rip), %rdi     # 0xe314c
movb $0x0, %al
callq 0x189d0
jmp 0x627e8
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0xc0(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/shader_module.c
// Function: freeshader_module
static int freeshader_module(lua_State *L, ud_t *ud)
    {
    VkShaderModule shader_module = (VkShaderModule)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(shader_module, "shader_module");
    UD(device)->ddt->DestroyShaderModule(device, shader_module, allocator);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x62dd5
movl $0x0, 0x34(%rsp)
jmp 0x62e26
jmp 0x62dd7
movq 0x9a1ba(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x62df6
movq 0x18(%rsp), %rsi
leaq 0x8049e(%rip), %rdi     # 0xe328d
movb $0x0, %al
callq 0x189d0
jmp 0x62df8
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x158(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/surface.c
// Function: GetPhysicalDeviceSurfaceSupport
static int GetPhysicalDeviceSurfaceSupport(lua_State *L)
    {
    VkResult ec;
    VkBool32 supported;
    ud_t *ud;
    VkPhysicalDevice physdev = checkphysical_device(L, 1, &ud);
    uint32_t qfamily = luaL_checkinteger(L, 2);
    VkSurfaceKHR surface = checksurface(L, 3, NULL);
    CheckInstancePfn(L, ud, GetPhysicalDeviceSurfaceSupportKHR);
    ec = ud->idt->GetPhysicalDeviceSurfaceSupportKHR(physdev, qfamily, surface, &supported);
    CheckError(L, ec);
    lua_pushboolean(L, supported);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6de2d(%rip), %rcx     # 0xd0eac
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x19190
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x7f3ef(%rip), %rcx     # 0xe24a0
callq 0x1a640
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x68(%rax)
jne 0x630e3
movq 0x28(%rsp), %rdi
leaq 0x8045f(%rip), %rsi     # 0xe3535
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x63149
jmp 0x630e5
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x68(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movq (%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x63131
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x63149
jmp 0x63133
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x19480
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: GetPhysicalDeviceSurfaceCapabilities
static int GetPhysicalDeviceSurfaceCapabilities(lua_State *L)
    {
    int err;
    VkResult ec;
    VkSurfaceKHR surface;
    VkSurfaceCapabilitiesKHR* capabilities;
    ud_t *ud;
    VkPhysicalDevice physdev = checkphysical_device(L, 1, &ud);

    if(ud->idt->GetPhysicalDeviceSurfaceCapabilities2KHR)
        return GetPhysicalDeviceSurfaceCapabilities2(L, physdev, ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceSurfaceCapabilitiesKHR);

    surface = checksurface(L, 2, NULL);
#define CLEANUP zfreeVkSurfaceCapabilitiesKHR(L, capabilities, 1);
    capabilities = znewVkSurfaceCapabilitiesKHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ec = ud->idt->GetPhysicalDeviceSurfaceCapabilitiesKHR(physdev, surface, capabilities);
    CheckError(L, ec);
    zpushVkSurfaceCapabilitiesKHR(L, capabilities);
    PushSupportedSurfaceCounters(L, physdev, ud, surface);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x8(%rsp), %rdx
leaq 0x6dd2d(%rip), %rcx     # 0xd0eac
callq 0x1a640
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x631b4
movq 0x28(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x64140
movl %eax, 0x34(%rsp)
jmp 0x632e4
jmp 0x631b6
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x70(%rax)
jne 0x631e2
movq 0x28(%rsp), %rdi
leaq 0x8039b(%rip), %rsi     # 0xe356d
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x632e4
jmp 0x631e4
movq 0x28(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x7f2a7(%rip), %rcx     # 0xe24a0
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x34, %edx
leaq 0x24(%rsp), %rcx
callq 0x19ee0
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x63253
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x19710
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x632e4
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x70(%rax), %rax
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x6329b
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x632e4
jmp 0x6329d
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x19670
movq 0x28(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x64340
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x19710
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: CreateHeadlessSurface
static int CreateHeadlessSurface(lua_State *L)
    {
    int err;
    VkResult ec;
    VkSurfaceKHR surface;
    ud_t *ud;
    VkHeadlessSurfaceCreateInfoEXT* info;
    VkInstance instance = checkinstance(L, 1, &ud);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
    CheckInstancePfn(L, ud, CreateHeadlessSurfaceEXT);
#define CLEANUP zfreeVkHeadlessSurfaceCreateInfoEXT(L, info, 1)
    info = zcheckVkHeadlessSurfaceCreateInfoEXT(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->idt->CreateHeadlessSurfaceEXT(instance, info, allocator, &surface);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return newsurface(L, instance, surface, allocator);
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
leaq 0x6cd9a(%rip), %rcx     # 0xd06c9
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19260
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x208(%rax)
jne 0x6397c
movq 0x38(%rsp), %rdi
leaq 0x7fcce(%rip), %rsi     # 0xe363a
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x63a6c
jmp 0x6397e
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x190c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x639e8
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x63a6c
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x208(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x30(%rsp)
je 0x63a4d
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x63a6c
jmp 0x63a4f
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x64760
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: CreateDisplayPlaneSurface
static int CreateDisplayPlaneSurface(lua_State *L)
    {
    int err;
    VkResult ec;
    VkSurfaceKHR surface;
    ud_t *ud;
    VkDisplaySurfaceCreateInfoKHR* info;
    VkDisplayModeKHR display_mode = checkdisplay_mode(L, 1, &ud);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
    CheckInstancePfn(L, ud, CreateDisplayPlaneSurfaceKHR);
#define CLEANUP zfreeVkDisplaySurfaceCreateInfoKHR(L, info, 1)
    info = zcheckVkDisplaySurfaceCreateInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    info->displayMode = display_mode;
    ec = ud->idt->CreateDisplayPlaneSurfaceKHR(ud->instance, info, allocator, &surface);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return newsurface(L, ud->instance, surface, allocator);
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
leaq 0x6dcab(%rip), %rcx     # 0xd174a
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19260
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x63aec
movq 0x38(%rsp), %rdi
leaq 0x7fbbe(%rip), %rsi     # 0xe369a
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x63bf2
jmp 0x63aee
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x18210
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x63b58
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq (%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x63bf2
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq 0xc8(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x30(%rsp)
je 0x63bcf
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x63bf2
jmp 0x63bd1
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x64760
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: CreatedSurface
static int CreatedSurface(lua_State *L) /* NONVK */
    {
    VkInstance instance = checkinstance(L, 1, NULL);
    VkSurfaceKHR surface = (VkSurfaceKHR)checkhandle(L, 2);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
    return newsurface(L, instance, surface, allocator);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x6caab(%rip), %rcx     # 0xd06c9
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x18cc0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x19260
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x64760
addq $0x28, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/surface.c
// Function: GetDeviceGroupSurfacePresentModes
static int GetDeviceGroupSurfacePresentModes(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkDeviceGroupPresentModeFlagsKHR modes;
    VkDevice device = checkdevice(L, 1, &ud);
    VkSurfaceKHR surface = checksurface(L, 2, NULL);
    CheckDevicePfn(L, ud, GetDeviceGroupSurfacePresentModesKHR);
    ec = ud->ddt->GetDeviceGroupSurfacePresentModesKHR(device, surface, &modes);
    CheckError(L, ec);
    pushflags(L, modes);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6b36c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x7e7b2(%rip), %rcx     # 0xe24a0
callq 0x1a640
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x550(%rax)
jne 0x63d23
movq 0x28(%rsp), %rdi
leaq 0x7f9b6(%rip), %rsi     # 0xe36cc
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x63d8a
jmp 0x63d25
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x550(%rax), %rax
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x63d70
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x63d8a
jmp 0x63d72
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, %esi
callq 0x19520
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: GetDeviceGroupPresentCapabilities
static int GetDeviceGroupPresentCapabilities(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkDeviceGroupPresentCapabilitiesKHR* capabilities;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, GetDeviceGroupPresentCapabilitiesKHR);
#define CLEANUP zfreeVkDeviceGroupPresentCapabilitiesKHR(L, capabilities, 1)
    capabilities = znewchainVkDeviceGroupPresentCapabilitiesKHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ec = ud->ddt->GetDeviceGroupPresentCapabilitiesKHR(device, capabilities);
    if(ec) { CLEANUP; CheckError(L, ec); return 0; }
    zpushVkDeviceGroupPresentCapabilitiesKHR(L, capabilities);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6b01c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x548(%rax)
jne 0x64058
movq 0x28(%rsp), %rdi
leaq 0x7f6f9(%rip), %rsi     # 0xe3741
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x64135
jmp 0x6405a
movq 0x28(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x183c0
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x6409c
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x64135
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x548(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq *%rax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x6410a
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x20(%rsp)
je 0x640fe
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x64135
jmp 0x64100
movl $0x0, 0x34(%rsp)
jmp 0x64135
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1a0d0
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/surface.c
// Function: GetPhysicalDeviceSurfaceCapabilities2
static int GetPhysicalDeviceSurfaceCapabilities2(lua_State *L, VkPhysicalDevice physdev, ud_t *ud)
    {
    int err;
    VkResult ec;
    VkPhysicalDeviceSurfaceInfo2KHR* info=NULL;
    VkSurfaceCapabilities2KHR* capabilities=NULL;
    VkSurfaceKHR surface = checksurface(L, 2, NULL);

#define CLEANUP do {                                    \
    zfreeVkSurfaceCapabilities2KHR(L, capabilities, 1); \
    zfreeVkPhysicalDeviceSurfaceInfo2KHR(L, info, 1);   \
} while(0)
    capabilities = znewchainVkSurfaceCapabilities2KHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    info = znewVkPhysicalDeviceSurfaceInfo2KHR(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    info->surface = surface;

    ec = ud->idt->GetPhysicalDeviceSurfaceCapabilities2KHR(physdev, info, capabilities);
    if(ec) { CLEANUP; CheckError(L, ec); }
    zpushVkSurfaceCapabilities2KHR(L, capabilities);
    PushSupportedSurfaceCounters(L, physdev, ud, info->surface);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x7e326(%rip), %rcx     # 0xe24a0
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x18040
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x641dc
jmp 0x641a1
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x64328
movq 0x38(%rsp), %rdi
movl $0x3b9c9ad8, %esi       # imm = 0x3B9C9AD8
movl $0x18, %edx
leaq 0x24(%rsp), %rcx
callq 0x19ee0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x6423e
jmp 0x64203
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x64328
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x78(%rax), %rax
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x642cc
jmp 0x64277
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
jmp 0x642a1
cmpl $0x0, 0x20(%rsp)
je 0x642c8
movq 0x38(%rsp), %rdi
movl 0x20(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x64328
jmp 0x642ca
jmp 0x642cc
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1a610
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
callq 0x64340
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: PushSupportedSurfaceCounters
static int PushSupportedSurfaceCounters(lua_State *L, VkPhysicalDevice physdev, ud_t *ud, VkSurfaceKHR surface)
/* Calls GetPhysicalDeviceSurfaceCapabilities2EXT() to retrieve the supportedSurfaceCounters
 * field, and sets the field in the table on the top of the stack.
 * (Note that all other capabilities retrieved by this function are the same as in
 * GetPhysicalDeviceSurfaceCapabilitiesKHR(), so we don't bother about them).
 */
    {
    VkResult ec;
    VkSurfaceCapabilities2EXT caps;
    if(!ud->idt->GetPhysicalDeviceSurfaceCapabilities2EXT) return 0;
    memset(&caps, 0, sizeof(caps));
    caps.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT;
    ec = ud->idt->GetPhysicalDeviceSurfaceCapabilities2EXT(physdev, surface, &caps);
    if(ec) return 0;
    pushflags(L, caps.supportedSurfaceCounters);
    lua_setfield(L, -2, "supported_surface_counters");
    return 0;
    }

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x140(%rax)
jne 0x64375
movl $0x0, 0x74(%rsp)
jmp 0x643ed
movq %rsp, %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x18bd0
movl $0x3b9c2990, (%rsp)     # imm = 0x3B9C2990
movq 0x58(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x140(%rax), %rax
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rsp, %rdx
callq *%rax
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
je 0x643bf
movl $0x0, 0x74(%rsp)
jmp 0x643ed
movq 0x68(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0x19520
movq 0x68(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x7f1ca(%rip), %rdx     # 0xe35aa
callq 0x18b80
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: newsurface
static int newsurface(lua_State *L, VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *allocator)
    {
    ud_t *ud;
    TRACE_CREATE(surface, "surface");
    ud = newuserdata_nondispatchable(L, surface, SURFACE_MT);
    ud->parent_ud = UD(instance);
    ud->instance = instance;
    ud->destructor = freesurface;
    ud->allocator = allocator;
    ud->idt = UD(instance)->idt;
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x98819(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x64797
movq 0x10(%rsp), %rsi
leaq 0x7eed8(%rip), %rdi     # 0xe3668
movb $0x0, %al
callq 0x189d0
jmp 0x64799
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x7dcf6(%rip), %rdx     # 0xe24a0
xorl %ecx, %ecx
callq 0x18350
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x19fd0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq (%rsp), %rax
leaq 0x3e(%rip), %rcx        # 0x64820
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rdi
callq 0x19fd0
movq 0x48(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x48(%rax)
movl $0x1, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/surface.c
// Function: freesurface
static int freesurface(lua_State *L, ud_t *ud)
    {
    VkSurfaceKHR surface = (VkSurfaceKHR)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkInstance instance = ud->instance;

    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(surface, "surface");
    UD(instance)->idt->DestroySurfaceKHR(instance, surface, allocator);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x64875
movl $0x0, 0x34(%rsp)
jmp 0x648c3
jmp 0x64877
movq 0x9871a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x64896
movq 0x18(%rsp), %rsi
leaq 0x7edf2(%rip), %rdi     # 0xe3681
movb $0x0, %al
callq 0x189d0
jmp 0x64898
movq 0x8(%rsp), %rdi
callq 0x19fd0
movq 0x48(%rax), %rax
movq 0x60(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/swapchain.c
// Function: CreateSwapchain
static int CreateSwapchain(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkResult ec;
    VkSwapchainKHR swapchain;
    VkSwapchainCreateInfoKHR *info;
    VkDevice device = checkdevice(L, 1, &ud);
    const VkAllocationCallbacks *allocator = optallocator(L, 3);
#define CLEANUP zfreeVkSwapchainCreateInfoKHR(L, info, 1)
    info = zcheckVkSwapchainCreateInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    CheckDevicePfn(L, ud, CreateSwapchainKHR);
    ec = ud->ddt->CreateSwapchainKHR(device, info, allocator, &swapchain);
    CLEANUP;
#undef CLEANUP
    CheckError(L, ec);
    return newswapchain(L, swapchain, device, allocator);
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x38(%rsp), %rdx
leaq 0x6a51c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movl $0x3, %esi
callq 0x19260
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
leaq 0x44(%rsp), %rdx
callq 0x19f30
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x64ba9
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x186d0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x18460
movl %eax, 0x54(%rsp)
jmp 0x64c60
jmp 0x64bab
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x248(%rax)
jne 0x64bda
movq 0x48(%rsp), %rdi
leaq 0x7ec70(%rip), %rsi     # 0xe383a
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x54(%rsp)
jmp 0x64c60
jmp 0x64bdc
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x248(%rax), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq *%rax
movl %eax, 0x34(%rsp)
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x34(%rsp)
je 0x64c41
movq 0x48(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x48(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x54(%rsp)
jmp 0x64c60
jmp 0x64c43
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0x656c0
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/swapchain.c
// Function: GetSwapchainImages
static int GetSwapchainImages(lua_State *L)
    {
    VkResult ec; 
    uint32_t count, i;
    VkImage *images;
    ud_t *ud; 
    VkSwapchainKHR swapchain = checkswapchain(L, 1, &ud);
    VkDevice device = ud->device;
    CheckDevicePfn(L, ud, GetSwapchainImagesKHR);
    ec = ud->ddt->GetSwapchainImagesKHR(device, swapchain, &count, NULL);
    CheckError(L, ec);
    
    lua_newtable(L);
    if(count == 0) return 1;
    
    images = (VkImage*)Malloc(L, sizeof(VkImage)*count);
    ec = ud->ddt->GetSwapchainImagesKHR(device, swapchain, &count, images);
    if(ec) { Free(L, images); CheckError(L, ec); }

    for(i = 0; i < count; i++)
        {
        pushimage_swapchain(L, images[i], ud); 
        lua_rawseti(L, -2, i+1);
        }
    
    Free(L, images);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x18(%rsp), %rdx
leaq 0x6c040(%rip), %rcx     # 0xd0f1f
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x258(%rax)
jne 0x64f26
movq 0x38(%rsp), %rdi
leaq 0x7e9b1(%rip), %rsi     # 0xe38c7
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x6508d
jmp 0x64f28
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x258(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x64f79
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x6508d
jmp 0x64f7b
movq 0x38(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
cmpl $0x0, 0x30(%rsp)
jne 0x64f9d
movl $0x1, 0x44(%rsp)
jmp 0x6508d
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x192c0
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x258(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0x30(%rsp), %rdx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x65021
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18300
cmpl $0x0, 0x34(%rsp)
je 0x6501d
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x6508d
jmp 0x6501f
jmp 0x65021
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x30(%rsp), %eax
jae 0x65076
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rax
movl 0x2c(%rsp), %ecx
movq (%rax,%rcx,8), %rsi
movq 0x18(%rsp), %rdx
callq 0x18280
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x191e0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x65029
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18300
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)