// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/flags.c
// Function: checkeditflags
static nk_flags checkeditflags(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_EDIT_DEFAULT, "default");
    CASE(NK_EDIT_READ_ONLY, "read only");
    CASE(NK_EDIT_AUTO_SELECT, "auto select");
    CASE(NK_EDIT_SIG_ENTER, "sig enter");
    CASE(NK_EDIT_ALLOW_TAB, "allow tab");
    CASE(NK_EDIT_NO_CURSOR, "no cursor");
    CASE(NK_EDIT_SELECTABLE, "selectable");
    CASE(NK_EDIT_CLIPBOARD, "clipboard");
    CASE(NK_EDIT_CTRL_ENTER_NEWLINE, "ctrl enter newline");
    CASE(NK_EDIT_NO_HORIZONTAL_SCROLL, "no horizontal scroll");
    CASE(NK_EDIT_ALWAYS_INSERT_MODE, "always insert mode");
    CASE(NK_EDIT_MULTILINE, "multiline");
    CASE(NK_EDIT_GOTO_END_ON_ACTIVATE, "goto end on activate");
    // flags combinations (nk_edit_types):
    CASE(NK_EDIT_SIMPLE, "simple");
    CASE(NK_EDIT_FIELD, "field");
    CASE(NK_EDIT_BOX, "box");
    CASE(NK_EDIT_EDITOR, "editor");
#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 0x268ad
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 0x8ea0e(%rip), %rsi     # 0xb4fc6
callq 0x13fc0
cmpl $0x0, %eax
jne 0x265d4
jmp 0x265c4
movl 0x14(%rsp), %eax
orl $0x0, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x868f2(%rip), %rsi     # 0xaced2
callq 0x13fc0
cmpl $0x0, %eax
jne 0x265fc
jmp 0x265ec
movl 0x14(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x868d4(%rip), %rsi     # 0xacedc
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26624
jmp 0x26614
movl 0x14(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x868b8(%rip), %rsi     # 0xacee8
callq 0x13fc0
cmpl $0x0, %eax
jne 0x2664c
jmp 0x2663c
movl 0x14(%rsp), %eax
orl $0x4, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x8689a(%rip), %rsi     # 0xacef2
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26674
jmp 0x26664
movl 0x14(%rsp), %eax
orl $0x8, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x8687c(%rip), %rsi     # 0xacefc
callq 0x13fc0
cmpl $0x0, %eax
jne 0x2669c
jmp 0x2668c
movl 0x14(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x8685e(%rip), %rsi     # 0xacf06
callq 0x13fc0
cmpl $0x0, %eax
jne 0x266c4
jmp 0x266b4
movl 0x14(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x86841(%rip), %rsi     # 0xacf11
callq 0x13fc0
cmpl $0x0, %eax
jne 0x266ec
jmp 0x266dc
movl 0x14(%rsp), %eax
orl $0x40, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x86823(%rip), %rsi     # 0xacf1b
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26716
jmp 0x26704
movl 0x14(%rsp), %eax
orl $0x80, %eax
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x8680c(%rip), %rsi     # 0xacf2e
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26740
jmp 0x2672e
movl 0x14(%rsp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x867f7(%rip), %rsi     # 0xacf43
callq 0x13fc0
cmpl $0x0, %eax
jne 0x2676a
jmp 0x26758
movl 0x14(%rsp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x867e0(%rip), %rsi     # 0xacf56
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26794
jmp 0x26782
movl 0x14(%rsp), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x867c0(%rip), %rsi     # 0xacf60
callq 0x13fc0
cmpl $0x0, %eax
jne 0x267be
jmp 0x267ac
movl 0x14(%rsp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x867ab(%rip), %rsi     # 0xacf75
callq 0x13fc0
cmpl $0x0, %eax
jne 0x267e8
jmp 0x267d6
movl 0x14(%rsp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x85f26(%rip), %rsi     # 0xac71a
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26812
jmp 0x26800
movl 0x14(%rsp), %eax
orl $0x260, %eax            # imm = 0x260
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x8ee1c(%rip), %rsi     # 0xb563a
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26839
jmp 0x2682a
movl 0x14(%rsp), %eax
orl $0x668, %eax            # imm = 0x668
movl %eax, 0x14(%rsp)
jmp 0x268a8
movq 0x18(%rsp), %rdi
leaq 0x86737(%rip), %rsi     # 0xacf7c
callq 0x13fc0
cmpl $0x0, %eax
jne 0x26860
jmp 0x26851
movl 0x14(%rsp), %eax
orl $0x468, %eax            # imm = 0x468
movl %eax, 0x14(%rsp)
jmp 0x268a8
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 0x80c07(%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 0x268b5
jmp 0x26575
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop