// File: /workspace/github_cpp_makefile_star2_O1/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 0x49a4f(%rip), %rcx     # 0x90ef4
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rbp
movq 0x48(%rbp), %rax
cmpq $0x0, 0x100(%rax)
je 0x47500
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x187d0
movq %rax, %r12
cmpl $0x0, (%r15)
je 0x47553
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x47525
leaq 0x14(%rsp), %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x187d0
movq %rax, %r15
cmpl $0x0, (%r12)
je 0x4758f
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18690
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x47610
leaq 0x18(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18730
movq %rax, %r15
cmpl $0x0, (%r13)
je 0x475c3
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x47608
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 0x47623
movl %eax, %ebp
jmp 0x475ec
movq 0x48(%rbp), %rax
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x100(%rax)
testl %eax, %eax
je 0x47637
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
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 0x18a50
movl $0x1, %ebp
jmp 0x47657
movq %rbx, %rdi
movq %r15, %rsi
callq 0x180c0
movl $0x1, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x19170
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x19170
jmp 0x47612