LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetImageSparseMemoryRequirements
static int GetImageSparseMemoryRequirements(lua_State *L)
    {
    uint32_t count, i;
    VkSparseImageMemoryRequirements *req;
    ud_t *ud;
    VkImage image = checkimage(L, 1, &ud);
    VkDevice device = ud->device;
    if(ud->ddt->GetImageSparseMemoryRequirements2)
        return GetImageSparseMemoryRequirements2(L, image, ud);
    lua_newtable(L);
    ud->ddt->GetImageSparseMemoryRequirements(device, image, &count, NULL);
    if(count == 0)
        return 1;
    req = (VkSparseImageMemoryRequirements*)Malloc(L, sizeof(VkSparseImageMemoryRequirements)*count);
    ud->ddt->GetImageSparseMemoryRequirements(device, image, &count, req);
    for(i = 0; i <count; i++)
        {
        zpushVkSparseImageMemoryRequirements(L, &req[i]);
        lua_rawseti(L, -2, i+1);
        }
    Free(L, req);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa4b3b(%rip), %rcx     # 0xcf99a
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x4b8(%rax)
je 0x2aea6
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2c1c0
movl %eax, 0x34(%rsp)
jmp 0x2af90
movq 0x28(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x18830
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x80(%rax), %rax
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x24(%rsp), %rdx
xorl %ecx, %ecx
callq *%rax
cmpl $0x0, 0x24(%rsp)
jne 0x2aeea
movl $0x1, 0x34(%rsp)
jmp 0x2af90
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %eax
imulq $0x30, %rax, %rsi
callq 0x192c0
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x80(%rax), %rax
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rcx
leaq 0x24(%rsp), %rdx
callq *%rax
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x2af79
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x20(%rsp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rsi
callq 0x18160
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x191e0
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x2af2e
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18300
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetDeviceBufferMemoryRequirements
static int GetDeviceBufferMemoryRequirements(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkDeviceBufferMemoryRequirementsKHR *info = NULL;
    VkMemoryRequirements2 *req = NULL;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, GetDeviceBufferMemoryRequirementsKHR);
#define CLEANUP do {                                            \
    zfreeVkDeviceBufferMemoryRequirementsKHR(L, info, 1);       \
    zfreeVkMemoryRequirements2(L, req, 1);                      \
} while(0)
    info = zcheckVkDeviceBufferMemoryRequirementsKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    req = znewchainVkMemoryRequirements2(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->ddt->GetDeviceBufferMemoryRequirementsKHR(device, info, req);
    zpushVkMemoryRequirements2(L, req);
#undef CLEANUP
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa406a(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x868(%rax)
jne 0x2b00a
movq 0x38(%rsp), %rdi
leaq 0xa6386(%rip), %rsi     # 0xd1380
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2b11b
jmp 0x2b00c
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x190b0
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b08e
jmp 0x2b02e
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
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 0x2b11b
movq 0x38(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x195c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b0e3
jmp 0x2b0ab
movq 0x38(%rsp), %rdi
movq 0x20(%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 0x2b11b
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x868(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *%rax
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18190
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetDeviceImageMemoryRequirements
static int GetDeviceImageMemoryRequirements(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkDeviceImageMemoryRequirementsKHR *info = NULL;
    VkMemoryRequirements2 *req = NULL;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, GetDeviceImageMemoryRequirementsKHR);
#define CLEANUP do {                                            \
    zfreeVkDeviceImageMemoryRequirementsKHR(L, info, 1);        \
    zfreeVkMemoryRequirements2(L, req, 1);                      \
} while(0)
    info = zcheckVkDeviceImageMemoryRequirementsKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    req = znewchainVkMemoryRequirements2(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->ddt->GetDeviceImageMemoryRequirementsKHR(device, info, req);
    zpushVkMemoryRequirements2(L, req);
#undef CLEANUP
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa3eda(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x870(%rax)
jne 0x2b19a
movq 0x38(%rsp), %rdi
leaq 0xa6230(%rip), %rsi     # 0xd13ba
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2b2ab
jmp 0x2b19c
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x18620
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b21e
jmp 0x2b1be
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
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 0x2b2ab
movq 0x38(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0x195c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b273
jmp 0x2b23b
movq 0x38(%rsp), %rdi
movq 0x20(%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 0x2b2ab
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x870(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *%rax
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18190
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetMemoryFd
static int GetMemoryFd(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    int fd;
    VkMemoryGetFdInfoKHR* info;
    VkDeviceMemory memory = checkdevice_memory(L, 1, &ud);
    CheckDevicePfn(L, ud, GetMemoryFdKHR);
#define CLEANUP zfreeVkMemoryGetFdInfoKHR(L, info, 1)
    info = zcheckVkMemoryGetFdInfoKHR(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    info->memory = memory;
    ec = ud->ddt->GetMemoryFdKHR(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 0xa5955(%rip), %rcx     # 0xd0f74
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x478(%rax)
jne 0x2b658
movq 0x38(%rsp), %rdi
leaq 0xa5e37(%rip), %rsi     # 0xd147f
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2b751
jmp 0x2b65a
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x34(%rsp), %rdx
callq 0x18e80
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b6c6
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 0x2b751
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x478(%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 0x2b738
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2b751
jmp 0x2b73a
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/device_memory.c
// Function: GetMemoryFdProperties
static int GetMemoryFdProperties(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkMemoryFdPropertiesKHR properties;
    VkDevice device = checkdevice(L, 1, &ud);
    VkExternalMemoryHandleTypeFlagBits handleType = checkflags(L, 2);
    int fd = luaL_checkinteger(L, 3);

    CheckDevicePfn(L, ud, GetMemoryFdPropertiesKHR);
    ec = ud->ddt->GetMemoryFdPropertiesKHR(device, handleType, fd, &properties);
    CheckError(L, ec);
    zpushVkMemoryFdPropertiesKHR(L, &properties);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa38bc(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x19010
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19190
movl %eax, (%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x480(%rax)
jne 0x2b7da
movq 0x38(%rsp), %rdi
leaq 0xa5cd6(%rip), %rsi     # 0xd14a3
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2b843
jmp 0x2b7dc
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x480(%rax), %rax
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
movl (%rsp), %edx
leaq 0x10(%rsp), %rcx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2b82a
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2b843
jmp 0x2b82c
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x18ec0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetMemoryHostPointerProperties
static int GetMemoryHostPointerProperties(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkMemoryHostPointerPropertiesEXT properties;
    VkDevice device = checkdevice(L, 1, &ud);
    VkExternalMemoryHandleTypeFlagBits handleType = checkflags(L, 2);
    void* ptr = checklightuserdata(L, 3);
    CheckDevicePfn(L, ud, GetMemoryHostPointerPropertiesEXT);
    ec = ud->ddt->GetMemoryHostPointerPropertiesEXT(device, handleType, ptr, &properties);
    CheckError(L, ec);
    zpushVkMemoryHostPointerPropertiesEXT(L, &properties);
    return 1;
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x38(%rsp), %rdx
leaq 0xa37cc(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
callq 0x19010
movl %eax, 0x14(%rsp)
movq 0x48(%rsp), %rdi
movl $0x3, %esi
callq 0x182f0
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x568(%rax)
jne 0x2b8cc
movq 0x48(%rsp), %rdi
leaq 0xa5c12(%rip), %rsi     # 0xd14d1
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x54(%rsp)
jmp 0x2b937
jmp 0x2b8ce
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x568(%rax), %rax
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq *%rax
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x2b91e
movq 0x48(%rsp), %rdi
movl 0x44(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x48(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x54(%rsp)
jmp 0x2b937
jmp 0x2b920
movq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1a680
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetDeviceGroupPeerMemoryFeatures
static int GetDeviceGroupPeerMemoryFeatures(lua_State *L)
    {
    ud_t *ud;
    VkPeerMemoryFeatureFlags flags;
    VkDevice device = checkdevice(L, 1, &ud);
    uint32_t heapIndex = luaL_checkinteger(L, 2);
    uint32_t localDeviceIndex = luaL_checkinteger(L, 3);
    uint32_t remoteDeviceIndex = luaL_checkinteger(L, 4);
    CheckDevicePfn(L, ud, GetDeviceGroupPeerMemoryFeatures);
    ud->ddt->GetDeviceGroupPeerMemoryFeatures(device,
            heapIndex, localDeviceIndex, remoteDeviceIndex, &flags);
    pushflags(L, flags);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x20(%rsp), %rdx
leaq 0xa36dc(%rip), %rcx     # 0xcf03b
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
callq 0x19190
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x19190
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x530(%rax)
jne 0x2b9ce
movq 0x28(%rsp), %rdi
leaq 0xa5b47(%rip), %rsi     # 0xd1508
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x2ba10
jmp 0x2b9d0
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x530(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movl 0x4(%rsp), %ecx
leaq 0x1c(%rsp), %r8
callq *%rax
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x19520
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetBufferDeviceAddress
static int GetBufferDeviceAddress(lua_State *L)
    {
    VkBufferDeviceAddressInfo info;
    VkDeviceAddress address;
    ud_t *ud;
    VkBuffer buffer = checkbuffer(L, 1, &ud);
    CheckDevicePfn(L, ud, GetBufferDeviceAddress);
    info.sType = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO;
    info.pNext = NULL;
    info.buffer = buffer;
    address = ud->ddt->GetBufferDeviceAddress(ud->device, &info);
    lua_pushinteger(L, address);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa35c1(%rip), %rcx     # 0xcf000
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x5f0(%rax)
jne 0x2ba75
movq 0x38(%rsp), %rdi
leaq 0xa5ad6(%rip), %rsi     # 0xd153e
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2bace
jmp 0x2ba77
movl $0x3b9e8321, 0x20(%rsp) # imm = 0x3B9E8321
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x5f0(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
leaq 0x20(%rsp), %rsi
callq *%rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18be0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetBufferOpaqueCaptureAddress
static int GetBufferOpaqueCaptureAddress(lua_State *L)
    {
    VkBufferDeviceAddressInfo info;
    uint64_t address;
    ud_t *ud;
    VkBuffer buffer = checkbuffer(L, 1, &ud);
    CheckDevicePfn(L, ud, GetBufferOpaqueCaptureAddress);
    info.sType = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO;
    info.pNext = NULL;
    info.buffer = buffer;
    address = ud->ddt->GetBufferOpaqueCaptureAddress(ud->device, &info);
    lua_pushinteger(L, address);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa3501(%rip), %rcx     # 0xcf000
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x5f8(%rax)
jne 0x2bb35
movq 0x38(%rsp), %rdi
leaq 0xa5a42(%rip), %rsi     # 0xd156a
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2bb8e
jmp 0x2bb37
movl $0x3b9e8321, 0x20(%rsp) # imm = 0x3B9E8321
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x5f8(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
leaq 0x20(%rsp), %rsi
callq *%rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18be0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetDeviceMemoryOpaqueCaptureAddress
static int GetDeviceMemoryOpaqueCaptureAddress(lua_State *L)
    {
    VkDeviceMemoryOpaqueCaptureAddressInfo info;
    uint64_t address;
    ud_t *ud;
    VkDeviceMemory device_memory = checkdevice_memory(L, 1, &ud);
    CheckDevicePfn(L, ud, GetDeviceMemoryOpaqueCaptureAddress);
    info.sType = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO;
    info.pNext = NULL;
    info.memory = device_memory;
    address = ud->ddt->GetDeviceMemoryOpaqueCaptureAddress(ud->device, &info);
    lua_pushinteger(L, address);
    return 1;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa53b5(%rip), %rcx     # 0xd0f74
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x600(%rax)
jne 0x2bbf5
movq 0x38(%rsp), %rdi
leaq 0xa59b5(%rip), %rsi     # 0xd159d
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2bc4e
jmp 0x2bbf7
movl $0x3b9eb5ec, 0x20(%rsp) # imm = 0x3B9EB5EC
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x600(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
leaq 0x20(%rsp), %rsi
callq *%rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18be0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: SetDeviceMemoryPriority
static int SetDeviceMemoryPriority(lua_State *L)
    {
    ud_t *ud;
    VkDeviceMemory device_memory = checkdevice_memory(L, 1, &ud);
    float priority = luaL_checknumber(L, 2);
    CheckDevicePfn(L, ud, SetDeviceMemoryPriorityEXT);
    ud->ddt->SetDeviceMemoryPriorityEXT(ud->device, device_memory, priority);
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa52f5(%rip), %rcx     # 0xd0f74
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x188a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x880(%rax)
jne 0x2bcce
movq 0x18(%rsp), %rdi
leaq 0xa5915(%rip), %rsi     # 0xd15d6
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x24(%rsp)
jmp 0x2bcfe
jmp 0x2bcd0
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x880(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movq 0x8(%rsp), %rsi
movss 0x4(%rsp), %xmm0
callq *%rax
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: freedevice_memory
static int freedevice_memory(lua_State *L, ud_t *ud)
    {
    VkDeviceMemory device_memory = (VkDeviceMemory)ud->handle;
    VkDevice device = ud->device;
    const VkAllocationCallbacks *allocator = ud->allocator;

    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(device_memory, "device_memory");
    UD(device)->ddt->FreeMemory(device, device_memory, 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 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x2bd65
movl $0x0, 0x34(%rsp)
jmp 0x2bdb3
jmp 0x2bd67
movq 0xd122a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x2bd86
movq 0x18(%rsp), %rsi
leaq 0xa55b4(%rip), %rdi     # 0xd1333
movb $0x0, %al
callq 0x189d0
jmp 0x2bd88
movq 0x10(%rsp), %rdi
callq 0x19fd0
movq 0x50(%rax), %rax
movq 0x30(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetBufferMemoryRequirements2
static int GetBufferMemoryRequirements2(lua_State *L, VkBuffer buffer, ud_t *ud)
    {
    int err;
    VkMemoryRequirements2* req=NULL;
    VkBufferMemoryRequirementsInfo2KHR* info=NULL;
    VkDevice device = ud->device;
#define CLEANUP do {                                        \
    zfreeVkBufferMemoryRequirementsInfo2KHR(L, info, 1);    \
    zfreeVkMemoryRequirements2(L, req, 1);                  \
} while(0)
    if(lua_istable(L, 2))
        {
        info = zcheckVkBufferMemoryRequirementsInfo2KHR(L, 2, &err);
        if(err) { CLEANUP; return argerror(L, 2); }
        }
    else
        {
        info = znewVkBufferMemoryRequirementsInfo2KHR(L, &err);
        if(err) { CLEANUP; return lua_error(L); }
        }
    info->buffer = buffer;

    req = znewchainVkMemoryRequirements2(L, &err);
    if(err) { CLEANUP; return lua_error(L); }

    ud->ddt->GetBufferMemoryRequirements2(device, info, req);
    zpushVkMemoryRequirements2(L, req);
    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 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x1a240
cmpl $0x5, %eax
jne 0x2be8d
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
callq 0x1a100
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2be8b
jmp 0x2be2d
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), %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 0x2bfb4
jmp 0x2bef1
movq 0x38(%rsp), %rdi
movl $0x3b9d0450, %esi       # imm = 0x3B9D0450
movl $0x18, %edx
leaq 0x24(%rsp), %rcx
callq 0x19ee0
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2beef
jmp 0x2beb4
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 0x2bfb4
jmp 0x2bef1
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x38(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x195c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2bf54
jmp 0x2bf1c
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 0x2bfb4
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x4b0(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *%rax
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18190
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
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: GetImageMemoryRequirements2
static int GetImageMemoryRequirements2(lua_State *L, VkImage image, ud_t *ud)
    {
    int err;
    VkMemoryRequirements2* req = NULL;
    VkImageMemoryRequirementsInfo2* info = NULL;
    VkDevice device = ud->device;
#define CLEANUP do {                                        \
    zfreeVkImageMemoryRequirementsInfo2KHR(L, info, 1);     \
    zfreeVkMemoryRequirements2(L, req, 1);                  \
} while(0)
    if(lua_istable(L, 2))
        {
        info = zcheckVkImageMemoryRequirementsInfo2KHR(L, 2, &err);
        if(err) { CLEANUP; return argerror(L, 2); }
        }
    else
        {
        info = znewVkImageMemoryRequirementsInfo2KHR(L, &err);
        if(err) { CLEANUP; return lua_error(L); }
        }
    info->image = image;
    req = znewchainVkMemoryRequirements2(L, &err);
    if(err) { CLEANUP; return lua_error(L); }
    ud->ddt->GetImageMemoryRequirements2(device, info, req);
    zpushVkMemoryRequirements2(L, req);
    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 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x1a240
cmpl $0x5, %eax
jne 0x2c08d
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
callq 0x19a00
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2c08b
jmp 0x2c02d
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), %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 0x2c1b4
jmp 0x2c0f1
movq 0x38(%rsp), %rdi
movl $0x3b9d0451, %esi       # imm = 0x3B9D0451
movl $0x18, %edx
leaq 0x24(%rsp), %rcx
callq 0x19ee0
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2c0ef
jmp 0x2c0b4
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 0x2c1b4
jmp 0x2c0f1
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x38(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x195c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2c154
jmp 0x2c11c
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 0x2c1b4
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x4a8(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *%rax
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18190
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
nopl (%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: BindImageMemory1
static int BindImageMemory1(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkImage image = checkimage(L, 1, &ud);
    VkDevice device = ud->device;
    VkDeviceMemory memory = checkdevice_memory(L, 2, NULL);
    VkDeviceSize offset = luaL_checkinteger(L, 3);
    ec = ud->ddt->BindImageMemory(device, image, memory, offset);
    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 0xa34bb(%rip), %rcx     # 0xcf99a
callq 0x1a640
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xa4a68(%rip), %rcx     # 0xd0f74
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19190
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x68(%rax), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2c578
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2c582
jmp 0x2c57a
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: BindImageMemory2
static int BindImageMemory2(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    uint32_t count;
    VkBindImageMemoryInfo* bind_infos;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, BindImageMemory2);
#define CLEANUP zfreearrayVkBindImageMemoryInfo(L, bind_infos, count, 1)
    bind_infos = zcheckarrayVkBindImageMemoryInfo(L, 2, &count, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->BindImageMemory2(device, count, bind_infos);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa2a8c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x4d8(%rax)
jne 0x2c5e8
movq 0x38(%rsp), %rdi
leaq 0xa4e5a(%rip), %rsi     # 0xd1432
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2c6d5
jmp 0x2c5ea
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
leaq 0x34(%rsp), %rcx
callq 0x182c0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2c662
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl $0x28, %edx
movl $0x1, %r8d
callq 0x198d0
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 0x2c6d5
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x4d8(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movq 0x18(%rsp), %rdx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl $0x28, %edx
movl $0x1, %r8d
callq 0x198d0
cmpl $0x0, 0x30(%rsp)
je 0x2c6cb
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2c6d5
jmp 0x2c6cd
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: BindBufferMemory1
static int BindBufferMemory1(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkBuffer buffer = checkbuffer(L, 1, &ud);
    VkDevice device = ud->device;
    VkDeviceMemory memory = checkdevice_memory(L, 2, NULL);
    VkDeviceSize offset = luaL_checkinteger(L, 3);
    ec = ud->ddt->BindBufferMemory(device, buffer, memory, offset);
    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 0xa2901(%rip), %rcx     # 0xcf000
callq 0x1a640
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xa4848(%rip), %rcx     # 0xd0f74
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x19190
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x60(%rax), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq *%rax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2c798
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2c7a2
jmp 0x2c79a
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: stetre[P]moonvulkan/src/device_memory.c
// Function: BindBufferMemory2
static int BindBufferMemory2(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    uint32_t count;
    VkBindBufferMemoryInfo* bind_infos;
    VkDevice device = checkdevice(L, 1, &ud);
    CheckDevicePfn(L, ud, BindBufferMemory2);
#define CLEANUP zfreearrayVkBindBufferMemoryInfo(L, bind_infos, count, 1)
    bind_infos = zcheckarrayVkBindBufferMemoryInfo(L, 2, &count, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->ddt->BindBufferMemory2(device, count, bind_infos);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa286c(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x4d0(%rax)
jne 0x2c808
movq 0x38(%rsp), %rdi
leaq 0xa4c60(%rip), %rsi     # 0xd1458
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2c8f5
jmp 0x2c80a
movq 0x38(%rsp), %rdi
movl $0x2, %esi
leaq 0x24(%rsp), %rdx
leaq 0x34(%rsp), %rcx
callq 0x18ca0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2c882
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl $0x28, %edx
movl $0x1, %r8d
callq 0x198d0
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 0x2c8f5
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movq 0x18(%rsp), %rdx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %ecx
movl $0x28, %edx
movl $0x1, %r8d
callq 0x198d0
cmpl $0x0, 0x30(%rsp)
je 0x2c8eb
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2c8f5
jmp 0x2c8ed
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/display.c
// Function: GetPhysicalDeviceDisplayProperties
static int GetPhysicalDeviceDisplayProperties(lua_State *L)
    {
    ud_t *ud;
    VkPhysicalDevice physdev = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceDisplayProperties2KHR)
        return GetPhysicalDeviceDisplayProperties2(L, physdev, ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceDisplayPropertiesKHR);
    return GetPhysicalDeviceDisplayProperties1(L, physdev, ud);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa435d(%rip), %rcx     # 0xd0eac
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1a0(%rax)
je 0x2cb86
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2d1c0
movl %eax, 0x24(%rsp)
jmp 0x2cbce
jmp 0x2cb88
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x98(%rax)
jne 0x2cbb4
movq 0x18(%rsp), %rdi
leaq 0xa4b4f(%rip), %rsi     # 0xd16f6
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x24(%rsp)
jmp 0x2cbce
jmp 0x2cbb6
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2d460
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/display.c
// Function: GetPhysicalDeviceDisplayPlaneProperties
static int GetPhysicalDeviceDisplayPlaneProperties(lua_State *L)
    {
    ud_t *ud;
    VkPhysicalDevice physdev = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceDisplayPlaneProperties2KHR)
        return GetPhysicalDeviceDisplayPlaneProperties2(L, physdev, ud);
    CheckInstancePfn(L, ud, GetPhysicalDeviceDisplayPlanePropertiesKHR);
    return GetPhysicalDeviceDisplayPlaneProperties1(L, physdev, ud);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa42ad(%rip), %rcx     # 0xd0eac
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1a8(%rax)
je 0x2cc36
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2d880
movl %eax, 0x24(%rsp)
jmp 0x2cc7e
jmp 0x2cc38
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0xa0(%rax)
jne 0x2cc64
movq 0x18(%rsp), %rdi
leaq 0xa4b24(%rip), %rsi     # 0xd177b
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x24(%rsp)
jmp 0x2cc7e
jmp 0x2cc66
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2db40
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/display.c
// Function: ReleaseDisplay
static int ReleaseDisplay(lua_State *L)
    {
    VkResult ec;
    ud_t *ud;
    VkDisplayKHR display = checkdisplay(L, 1, &ud);
    VkPhysicalDevice physdev = PHYSDEV(ud);
    CheckInstancePfn(L, ud, ReleaseDisplayEXT);
    ec = ud->idt->ReleaseDisplayEXT(physdev, display);
    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 0xa4697(%rip), %rcx     # 0xd1606
callq 0x1a640
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x138(%rax)
jne 0x2cfb6
movq 0x28(%rsp), %rdi
leaq 0xa485b(%rip), %rsi     # 0xd1804
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x34(%rsp)
jmp 0x2d009
jmp 0x2cfb8
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x138(%rax), %rax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x2cfff
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x28(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x34(%rsp)
jmp 0x2d009
jmp 0x2d001
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/display.c
// Function: DisplayPowerControl
static int DisplayPowerControl(lua_State *L)
    {
    int err;
    VkResult ec;
    ud_t *ud;
    VkDevice device = checkdevice(L, 1, &ud);
    VkDisplayKHR display = checkdisplay(L, 2, NULL);
    VkDisplayPowerInfoEXT* info;
    CheckDevicePfn(L, ud, DisplayPowerControlEXT);
#define CLEANUP zfreeVkDisplayPowerInfoEXT(L, info, 1)
    info = zcheckVkDisplayPowerInfoEXT(L, 3, &err);
    if(err) { CLEANUP; return argerror(L, 3); }
    ec = ud->ddt->DisplayPowerControlEXT(device, display, info);
    CLEANUP;
    CheckError(L, ec);
#undef CLEANUP
    return 0;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x28(%rsp), %rdx
leaq 0xa1ffc(%rip), %rcx     # 0xcf03b
callq 0x1a640
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xa45a8(%rip), %rcx     # 0xd1606
callq 0x1a640
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x298(%rax)
jne 0x2d097
movq 0x38(%rsp), %rdi
leaq 0xa47a4(%rip), %rsi     # 0xd182b
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x44(%rsp)
jmp 0x2d16c
jmp 0x2d099
movq 0x38(%rsp), %rdi
movl $0x3, %esi
leaq 0x34(%rsp), %rdx
callq 0x199f0
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x2d102
movq 0x38(%rsp), %rdi
movq 0x10(%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 $0x3, %esi
callq 0x18460
movl %eax, 0x44(%rsp)
jmp 0x2d16c
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x298(%rax), %rax
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x19210
cmpl $0x0, 0x30(%rsp)
je 0x2d162
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x18a00
movq 0x38(%rsp), %rdi
callq 0x19ad0
movl %eax, 0x44(%rsp)
jmp 0x2d16c
jmp 0x2d164
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/display.c
// Function: pushdisplay
static int pushdisplay(lua_State *L, VkDisplayKHR display, ud_t *parent_ud)
    {
    ud_t *ud;
    if(pushnondispatchable(L, (uint64_t)display, parent_ud, DISPLAY_MT)) return 1;
    TRACE_CREATE(display, "display");
    ud = newuserdata_nondispatchable(L, display, DISPLAY_MT);
    ud->parent_ud = parent_ud;
    ud->instance = parent_ud->instance;
    ud->destructor = freedisplay;
    ud->idt = parent_ud->idt;
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xa3ebd(%rip), %rcx     # 0xd1606
callq 0x19850
cmpl $0x0, %eax
je 0x2d760
movl $0x1, 0x24(%rsp)
jmp 0x2d7e5
jmp 0x2d762
movq 0xcf82f(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x2d781
movq 0x10(%rsp), %rsi
leaq 0xa3fb7(%rip), %rdi     # 0xd1731
movb $0x0, %al
callq 0x189d0
jmp 0x2d783
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0xa3e72(%rip), %rdx     # 0xd1606
xorl %ecx, %ecx
callq 0x18350
movq %rax, (%rsp)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq (%rsp), %rax
leaq 0x28(%rip), %rcx        # 0x2d7f0
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x48(%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: stetre[P]moonvulkan/src/display.c
// Function: freedisplay
static int freedisplay(lua_State *L, ud_t *ud)
    {
    VkDisplayKHR display = (VkDisplayKHR)ud->handle;
    freechildren(L, DISPLAY_MODE_MT, ud);
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(display, "display");
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0xa3f2e(%rip), %rsi     # 0xd174a
callq 0x18fa0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x2d83f
movl $0x0, 0x24(%rsp)
jmp 0x2d86a
jmp 0x2d841
movq 0xcf750(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x2d860
movq 0x8(%rsp), %rsi
leaq 0xa3f09(%rip), %rdi     # 0xd1762
movb $0x0, %al
callq 0x189d0
jmp 0x2d862
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/display_mode.c
// Function: GetDisplayModeProperties
static int GetDisplayModeProperties(lua_State *L)
    {
    ud_t *ud;
    VkDisplayKHR display = checkdisplay(L, 1, &ud);
    if(ud->idt->GetDisplayModeProperties2KHR)
        return GetDisplayModeProperties2(L, display, ud);
    CheckInstancePfn(L, ud, GetDisplayModePropertiesKHR);
    return GetDisplayModeProperties1(L, display, ud);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa32b7(%rip), %rcx     # 0xd1606
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x1b0(%rax)
je 0x2e386
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2e640
movl %eax, 0x24(%rsp)
jmp 0x2e3ce
jmp 0x2e388
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x2e3b4
movq 0x18(%rsp), %rdi
leaq 0xa3592(%rip), %rsi     # 0xd1939
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x24(%rsp)
jmp 0x2e3ce
jmp 0x2e3b6
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2e940
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: stetre[P]moonvulkan/src/display_mode.c
// Function: GetDisplayPlaneCapabilities
static int GetDisplayPlaneCapabilities(lua_State *L)
    {
    ud_t *ud;
    VkDisplayModeKHR display_mode = checkdisplay_mode(L, 1, &ud);
    if(ud->idt->GetDisplayPlaneCapabilitiesKHR && lua_type(L, 2) == LUA_TTABLE)
        return GetDisplayPlaneCapabilities2(L, display_mode, ud);
    CheckInstancePfn(L, ud, GetDisplayPlaneCapabilitiesKHR);
    return GetDisplayPlaneCapabilities1(L, display_mode, ud);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x10(%rsp), %rdx
leaq 0xa334b(%rip), %rcx     # 0xd174a
callq 0x1a640
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0xc0(%rax)
je 0x2e44a
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x1a240
cmpl $0x5, %eax
jne 0x2e44a
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2ec50
movl %eax, 0x24(%rsp)
jmp 0x2e492
jmp 0x2e44c
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0xc0(%rax)
jne 0x2e478
movq 0x18(%rsp), %rdi
leaq 0xa3531(%rip), %rsi     # 0xd199c
movb $0x0, %al
callq 0x19ce0
movl %eax, 0x24(%rsp)
jmp 0x2e492
jmp 0x2e47a
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2eee0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: stetre[P]moonvulkan/src/display_mode.c
// Function: pushdisplaymode
static int pushdisplaymode(lua_State *L, VkDisplayModeKHR display_mode, ud_t *parent_ud, const VkAllocationCallbacks *allocator)
    {
    ud_t *ud;
    if(pushnondispatchable(L, (uint64_t)display_mode, parent_ud, DISPLAY_MODE_MT)) return 1;
    TRACE_CREATE(display_mode, "display_mode");
    ud = newuserdata_nondispatchable(L, display_mode, DISPLAY_MODE_MT);
    ud->parent_ud = parent_ud;
    ud->instance = parent_ud->instance;
    ud->allocator = allocator;
    ud->destructor = freedisplay_mode;
    ud->idt = parent_ud->idt;
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xa323c(%rip), %rcx     # 0xd174a
callq 0x19850
cmpl $0x0, %eax
je 0x2e525
movl $0x1, 0x34(%rsp)
jmp 0x2e5bd
jmp 0x2e527
movq 0xcea6a(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x2e546
movq 0x20(%rsp), %rsi
leaq 0xa33be(%rip), %rdi     # 0xd18fd
movb $0x0, %al
callq 0x189d0
jmp 0x2e548
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0xa31f1(%rip), %rdx     # 0xd174a
xorl %ecx, %ecx
callq 0x18350
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x8(%rsp), %rax
leaq 0x31(%rip), %rcx        # 0x2e5d0
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x48(%rax)
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: stetre[P]moonvulkan/src/display_mode.c
// Function: freedisplay_mode
static int freedisplay_mode(lua_State *L, ud_t *ud)
    {
    VkDisplayModeKHR display_mode = (VkDisplayModeKHR)ud->handle;
    //const VkAllocationCallbacks *allocator = ud->allocator;
    //VkPhysicalDevice physical_device = (VkPhysicalDevice)ud->parent_ud->parent_ud->handle;

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

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x18dc0
cmpl $0x0, %eax
jne 0x2e609
movl $0x0, 0x24(%rsp)
jmp 0x2e634
jmp 0x2e60b
movq 0xce986(%rip), %rax     # 0xfcf98
cmpl $0x0, (%rax)
je 0x2e62a
movq 0x8(%rsp), %rsi
leaq 0xa32f8(%rip), %rdi     # 0xd191b
movb $0x0, %al
callq 0x189d0
jmp 0x2e62c
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)