// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/hint.c
// Function: GetWindowAttrib
static int GetWindowAttrib(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int attrib = checktarget(L, 2);
    
    switch(attrib)
        {
        case GLFW_FOCUSED:
        case GLFW_ICONIFIED:
        case GLFW_VISIBLE:
        case GLFW_RESIZABLE:
        case GLFW_DECORATED:
        case GLFW_FLOATING:
        case GLFW_MAXIMIZED:
        case GLFW_CENTER_CURSOR:
        case GLFW_TRANSPARENT_FRAMEBUFFER:
        case GLFW_HOVERED:
        case GLFW_FOCUS_ON_SHOW:
        case GLFW_SCALE_TO_MONITOR:
        case GLFW_MOUSE_PASSTHROUGH:
        case GLFW_SCALE_FRAMEBUFFER:
        case GLFW_WIN32_KEYBOARD_MENU:
        case GLFW_WIN32_SHOWDEFAULT:
        case GLFW_COCOA_GRAPHICS_SWITCHING:
            return GetBoolean(L, win->window, attrib);
        case GLFW_CLIENT_API: GET_ENUM(L, win->window, attrib, pushapi);
        case GLFW_CONTEXT_CREATION_API: GET_ENUM(L, win->window, attrib, pushcontextcreationapi);
        case GLFW_CONTEXT_VERSION_MAJOR:
        case GLFW_CONTEXT_VERSION_MINOR:
        case GLFW_CONTEXT_REVISION:
            return GetInteger(L, win->window, attrib);
        case GLFW_OPENGL_FORWARD_COMPAT:
        case GLFW_OPENGL_DEBUG_CONTEXT:
            return GetBoolean(L, win->window, attrib);
        case GLFW_OPENGL_PROFILE: GET_ENUM(L, win->window, attrib, pushprofile);
        case GLFW_CONTEXT_ROBUSTNESS: GET_ENUM(L, win->window, attrib, pushrobustness);
        case GLFW_CONTEXT_RELEASE_BEHAVIOR: GET_ENUM(L, win->window, attrib, pushreleasebehavior);
        default:
            return luaL_error(L, "invalid attribute '%s'", lua_tostring(L, 2));
        }
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r14
pushq $0x3
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x5450
leal -0x20001(%rax), %ecx
cmpl $0xc, %ecx
jbe 0xbdaa
leal -0x22001(%rax), %ecx
cmpl $0xc, %ecx
ja 0xbdcb
leaq 0x7d88(%rip), %rdx      # 0x13b1c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x28(%r14), %rsi
movq %rbx, %rdi
movl %eax, %edx
xorl %ecx, %ecx
jmp 0xbdbb
cmpl $0x5, %ecx
je 0xbd82
movq 0x28(%r14), %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %eax, %edx
callq 0xc012
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leal -0x25001(%rax), %ecx
cmpl $0x2, %ecx
jb 0xbdaf
cmpl $0x23003, %eax          # imm = 0x23003
je 0xbdaf
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x51e0
leaq 0x7e69(%rip), %rsi      # 0x13c5a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
movq 0x101dc(%rip), %rax     # 0x1bfe8
movq 0x28(%r14), %rdi
movl $0x22008, %esi          # imm = 0x22008
callq *0x140(%rax)
pushq $0x7
jmp 0xbe85
movq 0x101c2(%rip), %rax     # 0x1bfe8
movq 0x28(%r14), %rdi
movl $0x22001, %esi          # imm = 0x22001
callq *0x140(%rax)
pushq $0x4
jmp 0xbe85
movq 0x101a8(%rip), %rax     # 0x1bfe8
movq 0x28(%r14), %rdi
movl $0x2200b, %esi          # imm = 0x2200B
callq *0x140(%rax)
pushq $0xb
jmp 0xbe85
movq 0x1018e(%rip), %rax     # 0x1bfe8
movq 0x28(%r14), %rdi
movl $0x22009, %esi          # imm = 0x22009
callq *0x140(%rax)
pushq $0x6
jmp 0xbe85
movq 0x10174(%rip), %rax     # 0x1bfe8
movq 0x28(%r14), %rdi
movl $0x22005, %esi          # imm = 0x22005
callq *0x140(%rax)
pushq $0x5
popq %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x55e0
jmp 0xbdc0