// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/flags.c
// Function: checkpaneltype
static nk_flags checkpaneltype(lua_State *L, int arg) 
    {
    const char *s;
    nk_flags flags = 0;
    
    while(lua_isstring(L, arg))
        {
        s = lua_tostring(L, arg++);
#define CASE(CODE,str) if((strcmp(s, str)==0)) do { flags |= CODE; goto done; } while(0)
    CASE(NK_PANEL_WINDOW, "window");
    CASE(NK_PANEL_GROUP, "group");
    CASE(NK_PANEL_POPUP, "popup");
    CASE(NK_PANEL_CONTEXTUAL, "contextual");
    CASE(NK_PANEL_COMBO, "combo");
    CASE(NK_PANEL_MENU, "menu");
    CASE(NK_PANEL_TOOLTIP, "tooltip");
    // flags combinations (nk_panel_set):
    CASE(NK_PANEL_SET_NONBLOCK, "set nonblock");
    CASE(NK_PANEL_SET_POPUP, "set popup");
    CASE(NK_PANEL_SET_SUB, "set sub");
#undef CASE
        return (nk_flags)luaL_argerror(L, --arg, badvalue(L,s));
        done: ;
        }

    return flags;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x154b0
cmpl $0x0, %eax
je 0x26ebb
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x136c0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8a960(%rip), %rsi     # 0xb1648
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26d04
jmp 0x26cf4
movl 0x14(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x86288(%rip), %rsi     # 0xacf98
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26d2c
jmp 0x26d1c
movl 0x14(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x86295(%rip), %rsi     # 0xacfcd
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26d54
jmp 0x26d44
movl 0x14(%rsp), %eax
orl $0x4, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x8623e(%rip), %rsi     # 0xacf9e
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26d7c
jmp 0x26d6c
movl 0x14(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x86221(%rip), %rsi     # 0xacfa9
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26da4
jmp 0x26d94
movl 0x14(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x861ff(%rip), %rsi     # 0xacfaf
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26dcc
jmp 0x26dbc
movl 0x14(%rsp), %eax
orl $0x40, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x861dc(%rip), %rsi     # 0xacfb4
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26df6
jmp 0x26de4
movl 0x14(%rsp), %eax
orl $0x80, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x861ba(%rip), %rsi     # 0xacfbc
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26e20
jmp 0x26e0e
movl 0x14(%rsp), %eax
orl $0xf0, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x8619d(%rip), %rsi     # 0xacfc9
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26e47
jmp 0x26e38
movl 0x14(%rsp), %eax
orl $0xf4, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x18(%rsp), %rdi
leaq 0x86180(%rip), %rsi     # 0xacfd3
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26e6e
jmp 0x26e5f
movl 0x14(%rsp), %eax
orl $0xf6, %eax
movl %eax, 0x14(%rsp)
jmp 0x26eb6
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x805f9(%rip), %rsi     # 0xa7491
movb $0x0, %al
callq 0x13ec0
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movq %rax, %rdx
callq 0x134c0
movl %eax, 0x34(%rsp)
jmp 0x26ec3
jmp 0x26ca5
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)