// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonnuklear/src/widgets.c
// Function: Combo_begin
static int Combo_begin(lua_State *L)
    {
    int rc, arg_type;
    size_t len;
    const char *s;
    nk_vec2_t size;
    nk_color_t color;
    enum nk_symbol_type symbol;
    nk_image_t *image;
    nk_context_t *context = checkcontext(L, 1, NULL);
    if(echeckvec2(L, 4, &size)) return argerror(L, 4);
    arg_type = lua_type(L, 2);
    if(arg_type == LUA_TNIL)
        {
        s = luaL_checklstring(L, 3, &len);
        rc = nk_combo_begin_text(context, s, (int)len, size);
        }
    else if(arg_type == LUA_TTABLE)
        {
        if(echeckcolor(L, 2, &color)) return argerror(L, 2);
        rc = nk_combo_begin_color(context, color, size);
        }
    else 
        {
        s = luaL_optlstring(L, 3, NULL, &len);
        if((image = testimage(L, 2, NULL)) != NULL)
            {
            rc = s ? nk_combo_begin_image_text(context, s, len, *image, size)
                   : nk_combo_begin_image(context, *image,  size);
            }
        else
            {
            symbol = checksymboltype(L, 2);
            rc = s ? nk_combo_begin_symbol_text(context, s, len, symbol, size)
                   : nk_combo_begin_symbol(context,  symbol,  size);
            }
        }
    lua_pushboolean(L, rc);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x2555(%rip), %rcx      # 0x60280
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x120e0
movq %rax, %r14
pushq $0x4
popq %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x143f0
testl %eax, %eax
je 0x5dd70
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x12690
pushq $0x4
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x124a0
movl %eax, %ebp
jmp 0x5dea6
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x14030
cmpl $0x5, %eax
je 0x5ddb0
pushq $0x3
popq %rsi
testl %eax, %eax
jne 0x5ddd5
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x12dd0
movl (%r15), %edx
movsd 0x18(%rsp), %xmm0
movq %r14, %rdi
movq %rax, %rsi
callq 0x12fa0
jmp 0x5de9c
pushq $0x2
popq %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x12110
testl %eax, %eax
je 0x5de2c
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x12690
pushq $0x2
jmp 0x5dd5d
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x12970
movq %rax, %r15
leaq 0x2456(%rip), %rcx      # 0x60244
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x143e0
testq %rax, %rax
je 0x5de40
testq %r15, %r15
je 0x5de6c
movl 0x20(%rsp), %edx
movsd 0x18(%rsp), %xmm0
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm1
movups %xmm1, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x14100
jmp 0x5de9c
movl 0x20(%rsp), %esi
movsd 0x18(%rsp), %xmm0
movq %r14, %rdi
callq 0x12f10
jmp 0x5de9c
pushq $0xe
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x13450
testq %r15, %r15
je 0x5de8c
movl 0x20(%rsp), %edx
movsd 0x18(%rsp), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %ecx
callq 0x12d20
jmp 0x5de9c
movsd 0x18(%rsp), %xmm0
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm1
movups %xmm1, (%rsp)
movq %r14, %rdi
callq 0x137b0
jmp 0x5de9c
movsd 0x18(%rsp), %xmm0
movq %r14, %rdi
movl %eax, %esi
callq 0x13280
movq %rbx, %rdi
movl %eax, %esi
callq 0x133d0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq