// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
movq %rdi, %rbx
leaq 0x58130(%rip), %rcx     # 0x7f64e
pushq $0x1
popq %rsi
leaq 0x40(%rsp), %r14
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %r12
movq 0x48(%r12), %rax
cmpq $0x0, 0x1b0(%rax)
movq %r15, 0x38(%rsp)
movq %r12, 0x20(%rsp)
je 0x275f0
movq 0x10(%r12), %rax
movq (%rax), %rbp
pushq $0x28
popq %rdx
pushq $0x20
popq %rcx
leaq 0x34(%rsp), %r14
movq %rbx, %rdi
movl $0x3b9ca2aa, %esi       # imm = 0x3B9CA2AA
movq %r14, %r8
callq 0x19820
movq %rax, %r13
cmpl $0x0, (%r14)
je 0x2759a
pushq $0x28
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x197e0
movq %rbx, %rdi
callq 0x199c0
movq %r13, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x48(%r12), %rax
leaq 0x8(%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq *0x1b0(%rax)
testl %eax, %eax
je 0x276a3
movl %eax, %ebp
pushq $0x28
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x197e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x2790b
cmpq $0x0, 0xb0(%rax)
je 0x277a7
movq 0x10(%r12), %rax
movq (%rax), %rbp
pushq $-0x1
popq %rsi
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
leaq 0x34(%rsp), %r14
movq %rbx, %rdi
movq %r14, %r8
callq 0x19820
movq %rax, %r13
cmpl $0x0, (%r14)
je 0x27648
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r13, %rsi
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
callq 0x199c0
movq %r13, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movq 0x48(%r12), %rax
leaq 0x8(%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq *0xb0(%rax)
testl %eax, %eax
je 0x277bd
movl %eax, %r14d
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x2790b
movq %rbp, 0x28(%rsp)
movl 0x8(%rsp), %eax
testl %eax, %eax
je 0x27789
leaq 0x58203(%rip), %rbp     # 0x7f8be
pushq $-0x2
popq %r14
xorl %r13d, %r13d
movl %eax, %ecx
subl $0x20, %ecx
pushq $0x20
popq %rdx
cmovael %edx, %eax
movl $0x0, %edx
cmovbl %edx, %ecx
movl %eax, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movq 0x48(%r12), %rax
movq 0x28(%rsp), %rdi
movq %r15, %rsi
leaq 0xc(%rsp), %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq *0x1b0(%rax)
cmpl $0x5, %eax
je 0x2770d
movl %eax, %r12d
testl %eax, %eax
jne 0x278b6
movl %r13d, 0x1c(%rsp)
movl %r13d, %r13d
movq %r15, %r12
xorl %r15d, %r15d
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jae 0x2776b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18ad0
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
callq 0x27c20
movq %rbx, %rdi
movl %r14d, %esi
movq %rbp, %rdx
callq 0x18af0
leal (%r15,%r13), %edx
incl %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x19120
incq %r15
addq $0x28, %r12
jmp 0x2771b
movl 0x8(%rsp), %eax
movl 0x1c(%rsp), %r13d
addl %r15d, %r13d
testl %eax, %eax
movq 0x38(%rsp), %r15
movq 0x20(%rsp), %r12
jne 0x276c2
pushq $0x28
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %r8d
callq 0x197e0
jmp 0x2791a
leaq 0x581d3(%rip), %rsi     # 0x7f981
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x27918
movl 0x8(%rsp), %eax
testl %eax, %eax
je 0x278cd
leaq 0x580ee(%rip), %r13     # 0x7f8be
pushq $-0x2
popq %r14
movl $0x0, 0x1c(%rsp)
movq %rbp, 0x28(%rsp)
movl %eax, %ecx
subl $0x20, %ecx
pushq $0x20
popq %rdx
cmovael %edx, %eax
movl $0x0, %edx
cmovbl %edx, %ecx
movl %eax, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movq 0x48(%r12), %rax
movq %rbp, %rdi
movq %r15, %rsi
leaq 0xc(%rsp), %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq *0xb0(%rax)
cmpl $0x5, %eax
je 0x2782a
movl %eax, %r12d
testl %eax, %eax
jne 0x278eb
movl 0x1c(%rsp), %ebp
movq %r15, %r12
xorl %r15d, %r15d
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jae 0x27883
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19010
movq (%r12), %rsi
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
callq 0x27c20
movq %rbx, %rdi
movl %r14d, %esi
movq %r13, %rdx
callq 0x18af0
leal (%r15,%rbp), %edx
incl %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x19120
incq %r15
addq $0x18, %r12
jmp 0x27834
movl 0x8(%rsp), %eax
addl %r15d, 0x1c(%rsp)
testl %eax, %eax
movq 0x38(%rsp), %r15
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %rbp
jne 0x277e1
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
pushq $0x1
popq %rbp
jmp 0x278de
pushq $0x28
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197e0
jmp 0x27903
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x18d30
jmp 0x2791a
pushq $0x18
popq %rdx
pushq $0x20
popq %rcx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
xorl %r9d, %r9d
callq 0x18d30
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq