// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x69488(%rip), %rcx     # 0x9164e
leaq 0x30(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r13
movq (%r14), %r15
movq 0x48(%r15), %rax
cmpq $0x0, 0x1b0(%rax)
movq %r13, 0x28(%rsp)
je 0x28293
movq 0x10(%r15), %rax
movq (%rax), %rbp
leaq 0x24(%rsp), %r12
movl $0x28, %edx
movq %rbx, %rdi
movl $0x3b9ca2aa, %esi       # imm = 0x3B9CA2AA
movl $0x20, %ecx
movq %r12, %r8
callq 0x19840
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x28248
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
callq 0x199e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187e0
movq 0x48(%r15), %rax
movq %rsp, %rdx
movq %rbp, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq *0x1b0(%rax)
testl %eax, %eax
je 0x28366
movl %eax, %ebp
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x19800
jmp 0x2833f
cmpq $0x0, 0xb0(%rax)
je 0x2847a
movq 0x10(%r15), %rax
movq (%rax), %rbp
leaq 0x24(%rsp), %r14
movl $0x18, %edx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x20, %ecx
movq %r14, %r8
callq 0x19840
movq %rax, %r12
cmpl $0x0, (%r14)
je 0x282f6
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
movq %rbx, %rdi
callq 0x199e0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187e0
movq 0x48(%r15), %rax
movq %rsp, %rdx
movq %rbp, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq *0xb0(%rax)
testl %eax, %eax
je 0x28490
movl %eax, %ebp
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
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
movq %rbp, 0x18(%rsp)
cmpl $0x0, (%rsp)
je 0x28455
movq $0x0, 0x8(%rsp)
leaq 0x69539(%rip), %rbp     # 0x918be
movq %r14, 0x10(%rsp)
movl (%rsp), %eax
cmpl $0x21, %eax
jb 0x2839f
movl $0x20, 0x4(%rsp)
addl $-0x20, %eax
jmp 0x283a5
movl %eax, 0x4(%rsp)
xorl %eax, %eax
movl %eax, (%rsp)
movq 0x48(%r15), %rax
movq 0x18(%rsp), %rdi
movq %r13, %rsi
leaq 0x4(%rsp), %rdx
movq %r14, %rcx
callq *0x1b0(%rax)
testl %eax, %eax
je 0x283d2
movl %eax, %r12d
cmpl $0x5, %eax
jne 0x285a5
cmpl $0x0, 0x4(%rsp)
je 0x2844b
movq %r14, %r12
movl 0x8(%rsp), %r14d
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18ae0
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x28948
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbp, %rdx
callq 0x18b00
leal (%r14,%r13), %edx
incl %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x19140
incq %r13
movl 0x4(%rsp), %eax
addq $0x28, %r12
cmpq %rax, %r13
jb 0x283e4
movq 0x8(%rsp), %rax
addl %r13d, %eax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %r13
movq 0x10(%rsp), %r14
cmpl $0x0, (%rsp)
jne 0x2838a
movl $0x1, %ebp
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x19800
jmp 0x28355
leaq 0x69500(%rip), %rsi     # 0x91981
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x28353
movq %rbp, 0x18(%rsp)
cmpl $0x0, (%rsp)
je 0x2857d
movq $0x0, 0x8(%rsp)
leaq 0x6940f(%rip), %rbp     # 0x918be
movq %r12, 0x10(%rsp)
movl (%rsp), %eax
cmpl $0x21, %eax
jb 0x284c9
movl $0x20, 0x4(%rsp)
addl $-0x20, %eax
jmp 0x284cf
movl %eax, 0x4(%rsp)
xorl %eax, %eax
movl %eax, (%rsp)
movq 0x48(%r15), %rax
movq 0x18(%rsp), %rdi
movq %r13, %rsi
leaq 0x4(%rsp), %rdx
movq %r12, %rcx
callq *0xb0(%rax)
testl %eax, %eax
je 0x284fc
movl %eax, %r14d
cmpl $0x5, %eax
jne 0x285cd
cmpl $0x0, 0x4(%rsp)
je 0x28573
movq %r12, %r14
movl 0x8(%rsp), %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19030
movq (%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x28948
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbp, %rdx
callq 0x18b00
leal (%r12,%r13), %edx
incl %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x19140
incq %r13
movl 0x4(%rsp), %eax
addq $0x18, %r14
cmpq %rax, %r13
jb 0x2850e
movq 0x8(%rsp), %rax
addl %r13d, %eax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %r13
movq 0x10(%rsp), %r12
cmpl $0x0, (%rsp)
jne 0x284b4
movl $0x1, %ebp
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
jmp 0x28355
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x19800
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
jmp 0x28346
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d40
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x28346