// File: /workspace/github_cpp_makefile_star2_O3/stetre[P]moonvulkan/src/physical_device.c
// Function: GetPhysicalDeviceImageFormatProperties
static int GetPhysicalDeviceImageFormatProperties(lua_State *L)
    {
    int err;
    ud_t *ud;
    VkResult ec;
    VkPhysicalDeviceImageFormatInfo2* info;
    VkImageFormatProperties props;
    VkPhysicalDevice physical_device = checkphysical_device(L, 1, &ud);
    if(ud->idt->GetPhysicalDeviceImageFormatProperties2)
        return GetPhysicalDeviceImageFormatProperties2(L, physical_device, ud);
#define CLEANUP zfreeVkPhysicalDeviceImageFormatInfo2(L, info, 1)
    info = zcheckVkPhysicalDeviceImageFormatInfo2(L, 2, &err);
    if(err) { CLEANUP; return argerror(L, 2); }
    ec = ud->idt->GetPhysicalDeviceImageFormatProperties(physical_device, 
            info->format, info->type, info->tiling, info->usage, info->flags, &props);
    if(ec) { CLEANUP; CheckError(L, ec); return 0; }
    zpushVkImageFormatProperties(L, &props);
    CLEANUP;
#undef CLEANUP
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x46cf7(%rip), %rcx     # 0x8def4
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a4e0
movq %rax, %r14
movq (%r15), %rbp
movq 0x48(%rbp), %rax
cmpq $0x0, 0x100(%rax)
je 0x47258
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x187c0
movq %rax, %r12
cmpl $0x0, (%r15)
je 0x472ab
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x4727d
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x187c0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x472e7
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18680
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x47368
leaq 0x18(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18720
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x4731b
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
jmp 0x47360
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movl 0x10(%r15), %esi
movl 0x14(%r15), %edx
movl 0x18(%r15), %ecx
movl 0x1c(%r15), %r8d
movl 0x20(%r15), %r9d
leaq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movq %r14, %rdi
callq *0x30(%rax)
testl %eax, %eax
je 0x4737b
movl %eax, %ebp
jmp 0x47344
movq 0x48(%rbp), %rax
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x100(%rax)
testl %eax, %eax
je 0x4738f
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199a0
movl %eax, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a40
movl $0x1, %ebp
jmp 0x473af
movq %rbx, %rdi
movq %r15, %rsi
callq 0x180c0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19160
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19160
jmp 0x4736a