// File: /workspace/github_cpp_makefile_star2_O3/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 0x665e8(%rip), %rcx     # 0x8e64e
leaq 0x30(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a4e0
movq %rax, %r13
movq (%r14), %r15
movq 0x48(%r15), %rax
cmpq $0x0, 0x1b0(%rax)
movq %r13, 0x28(%rsp)
je 0x28135
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 0x19810
movq %rax, %r14
cmpl $0x0, (%r12)
je 0x280e8
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x197d0
movq %rbx, %rdi
callq 0x199a0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x48(%r15), %rax
leaq 0x4(%rsp), %rdx
movq %rbp, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq *0x1b0(%rax)
testl %eax, %eax
je 0x2820a
movl %eax, %ebp
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x197d0
jmp 0x281e3
cmpq $0x0, 0xb0(%rax)
je 0x28318
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 0x19810
movq %rax, %r12
cmpl $0x0, (%r14)
je 0x28198
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
callq 0x199a0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x48(%r15), %rax
leaq 0x4(%rsp), %rdx
movq %rbp, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
callq *0xb0(%rax)
testl %eax, %eax
je 0x2832e
movl %eax, %ebp
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
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
movq %rbp, 0x18(%rsp)
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x282f3
leaq 0x6669c(%rip), %rbp     # 0x8e8be
movl $0x0, 0xc(%rsp)
movq %r14, 0x10(%rsp)
movl %eax, %ecx
subl $0x20, %ecx
movl $0x20, %edx
cmovael %edx, %eax
movl $0x0, %edx
cmovbl %edx, %ecx
movl %eax, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movq 0x48(%r15), %rax
movq 0x18(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq *0x1b0(%rax)
testl %eax, %eax
je 0x28276
movl %eax, %r12d
cmpl $0x5, %eax
jne 0x2843d
cmpl $0x0, 0x8(%rsp)
je 0x282e7
movq %r14, %r12
movl 0xc(%rsp), %r14d
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18ad0
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x287ad
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbp, %rdx
callq 0x18af0
leal (%r14,%r13), %edx
incl %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x19130
incq %r13
movl 0x8(%rsp), %eax
addq $0x28, %r12
cmpq %rax, %r13
jb 0x28288
addl %r13d, 0xc(%rsp)
movq 0x28(%rsp), %r13
movq 0x10(%rsp), %r14
movl 0x4(%rsp), %eax
testl %eax, %eax
jne 0x2822f
movl $0x1, %ebp
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x197d0
jmp 0x281f9
leaq 0x66662(%rip), %rsi     # 0x8e981
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
jmp 0x281f7
movq %rbp, 0x18(%rsp)
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x28415
leaq 0x66578(%rip), %rbp     # 0x8e8be
movl $0x0, 0xc(%rsp)
movq %r12, 0x10(%rsp)
movl %eax, %ecx
subl $0x20, %ecx
movl $0x20, %edx
cmovael %edx, %eax
movl $0x0, %edx
cmovbl %edx, %ecx
movl %eax, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movq 0x48(%r15), %rax
movq 0x18(%rsp), %rdi
movq %r13, %rsi
leaq 0x8(%rsp), %rdx
movq %r12, %rcx
callq *0xb0(%rax)
testl %eax, %eax
je 0x2839a
movl %eax, %r14d
cmpl $0x5, %eax
jne 0x28465
cmpl $0x0, 0x8(%rsp)
je 0x28409
movq %r12, %r14
movl 0xc(%rsp), %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19020
movq (%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x287ad
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rbp, %rdx
callq 0x18af0
leal (%r12,%r13), %edx
incl %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x19130
incq %r13
movl 0x8(%rsp), %eax
addq $0x18, %r14
cmpq %rax, %r13
jb 0x283ac
addl %r13d, 0xc(%rsp)
movq 0x28(%rsp), %r13
movq 0x10(%rsp), %r12
movl 0x4(%rsp), %eax
testl %eax, %eax
jne 0x28353
movl $0x1, %ebp
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
jmp 0x281f9
movl $0x28, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
callq 0x197d0
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
jmp 0x281ea
movl $0x18, %edx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x20, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x281ea