// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/flags.c
// Function: checkwidgetalign
static nk_flags checkwidgetalign(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_WIDGET_ALIGN_LEFT, "align left");
    CASE(NK_WIDGET_ALIGN_CENTERED, "align centered");
    CASE(NK_WIDGET_ALIGN_RIGHT, "align right");
    CASE(NK_WIDGET_ALIGN_TOP, "align top");
    CASE(NK_WIDGET_ALIGN_MIDDLE, "align middle");
    CASE(NK_WIDGET_ALIGN_BOTTOM, "align bottom");
    // flags combinations (nk_widget_alignment):
    CASE(NK_WIDGET_LEFT, "left");
    CASE(NK_WIDGET_CENTERED, "centered");
    CASE(NK_WIDGET_RIGHT, "right");
#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 0x25f9b
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 0x87090(%rip), %rsi     # 0xace88
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25e14
jmp 0x25e04
movl 0x14(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x87073(%rip), %rsi     # 0xace93
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25e3c
jmp 0x25e2c
movl 0x14(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x8705a(%rip), %rsi     # 0xacea2
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25e64
jmp 0x25e54
movl 0x14(%rsp), %eax
orl $0x4, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x8703e(%rip), %rsi     # 0xaceae
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25e8c
jmp 0x25e7c
movl 0x14(%rsp), %eax
orl $0x8, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x87020(%rip), %rsi     # 0xaceb8
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25eb4
jmp 0x25ea4
movl 0x14(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x87005(%rip), %rsi     # 0xacec5
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25edc
jmp 0x25ecc
movl 0x14(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x817a8(%rip), %rsi     # 0xa7690
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25f04
jmp 0x25ef4
movl 0x14(%rsp), %eax
orl $0x11, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x86f89(%rip), %rsi     # 0xace99
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25f29
jmp 0x25f1c
movl 0x14(%rsp), %eax
orl $0x12, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
movq 0x18(%rsp), %rdi
leaq 0x8177d(%rip), %rsi     # 0xa76b2
callq 0x13fc0
cmpl $0x0, %eax
jne 0x25f4e
jmp 0x25f41
movl 0x14(%rsp), %eax
orl $0x14, %eax
movl %eax, 0x14(%rsp)
jmp 0x25f96
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 0x81519(%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 0x25fa3
jmp 0x25db5
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)