// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: moonglfw_open_native
void moonglfw_open_native(lua_State *L)
    {
    luaL_setfuncs(L, Functions, 0);
    SetNative(WIN32, glfw.GetWin32Adapter && glfw.GetWin32Monitor && glfw.GetWin32Window);
    SetNative(WGL, glfw.GetWGLContext != NULL);
    SetNative(COCOA, 0); //glfw.GetCocoaMonitor && glfw.GetCocoaWindow);
    SetNative(NSGL, 0); //glfw.GetNSGLContext != NULL);
    SetNative(X11, glfw.GetX11Display && glfw.GetX11Adapter && glfw.GetX11Monitor && glfw.GetX11Window);
    SetNative(GLX, glfw.GetGLXContext && glfw.GetGLXWindow);
    SetNative(WAYLAND, glfw.GetWaylandDisplay && glfw.GetWaylandMonitor && glfw.GetWaylandWindow);
    SetNative(MIR, glfw.GetMirDisplay && glfw.GetMirMonitor && glfw.GetMirWindow); // DEPRECATED
    SetNative(EGL, glfw.GetEGLDisplay && glfw.GetEGLContext && glfw.GetEGLSurface);
    SetNative(OSMESA, glfw.GetOSMesaColorBuffer && glfw.GetOSMesaDepthBuffer && glfw.GetOSMesaContext);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xcb52(%rip), %rsi      # 0x1ba00
xorl %edx, %edx
callq 0x5130
movq 0xd12c(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0x3d0(%r14)
setne %al
cmpq $0x0, 0x3d8(%r14)
setne %cl
andb %al, %cl
cmpq $0x0, 0x3e0(%r14)
setne %al
andb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x684b(%rip), %rdx      # 0x1573e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
xorl %esi, %esi
cmpq $0x0, 0x3e8(%r14)
setne %sil
movq %rbx, %rdi
callq 0x5480
leaq 0x682e(%rip), %rdx      # 0x1574b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5480
leaq 0x681b(%rip), %rdx      # 0x15756
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5480
leaq 0x680a(%rip), %rdx      # 0x15763
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
movdqu 0x3f0(%r14), %xmm0
movdqu 0x400(%r14), %xmm1
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm1
pcmpeqd %xmm2, %xmm0
movdqa %xmm0, %xmm2
shufps $0xdd, %xmm1, %xmm2     # xmm2 = xmm2[1,3],xmm1[1,3]
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
andps %xmm2, %xmm0
movmskps %xmm0, %eax
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq %rbx, %rdi
callq 0x5480
leaq 0x67c2(%rip), %rdx      # 0x1576f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpq $0x0, 0x410(%r14)
setne %al
cmpq $0x0, 0x418(%r14)
setne %cl
andb %al, %cl
movzbl %cl, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x6796(%rip), %rdx      # 0x1577a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpq $0x0, 0x420(%r14)
setne %al
cmpq $0x0, 0x428(%r14)
setne %cl
andb %al, %cl
cmpq $0x0, 0x430(%r14)
setne %al
andb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x675d(%rip), %rdx      # 0x15785
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpq $0x0, 0x438(%r14)
setne %al
cmpq $0x0, 0x440(%r14)
setne %cl
andb %al, %cl
cmpq $0x0, 0x448(%r14)
setne %al
andb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x6728(%rip), %rdx      # 0x15794
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpq $0x0, 0x450(%r14)
setne %al
cmpq $0x0, 0x458(%r14)
setne %cl
andb %al, %cl
cmpq $0x0, 0x460(%r14)
setne %al
andb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x66ef(%rip), %rdx      # 0x1579f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpq $0x0, 0x478(%r14)
setne %al
cmpq $0x0, 0x480(%r14)
setne %cl
andb %al, %cl
cmpq $0x0, 0x488(%r14)
setne %al
andb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5480
leaq 0x66b6(%rip), %rdx      # 0x157aa
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x52d0