// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a99f(%rip), %rcx     # 0x7eef4
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %r13
movq 0x48(%r13), %rax
cmpq $0x0, 0x100(%rax)
je 0x445b0
pushq $0x2
popq %rsi
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x187c0
movq %rax, %r12
cmpl $0x0, (%r15)
je 0x445fb
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x445d6
pushq $0x2
popq %rsi
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x187c0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x44636
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x446ce
leaq 0x18(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x18720
movq %rax, %r15
cmpl $0x0, (%rbp)
je 0x44681
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
jmp 0x446c6
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 0x446e1
movl %eax, %r14d
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x446c1
movq 0x48(%r13), %rax
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x100(%rax)
testl %eax, %eax
je 0x446f0
movl %eax, %ebp
pushq $0x1
popq %r14
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x19150
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
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
jmp 0x4470b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x180c0
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x19150
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x19150
jmp 0x446d0