// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x32b3(%rip), %rcx      # 0x68280
movl $0x1, %esi
xorl %edx, %edx
callq 0x120d0
movq %rax, %r14
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x14160
movq %rbx, %rdi
testl %eax, %eax
je 0x65016
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x12630
movq %rbx, %rdi
movl $0x4, %esi
movq %rax, %rdx
callq 0x12460
jmp 0x65167
movl $0x2, %esi
callq 0x13df0
cmpl $0x5, %eax
je 0x65057
testl %eax, %eax
jne 0x65086
leaq 0x28(%rsp), %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0x12cd0
movl (%r15), %edx
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
movq %rax, %rsi
callq 0x12e80
jmp 0x65158
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x12100
testl %eax, %eax
je 0x650e4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x12630
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x65009
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x128c0
movq %rax, %r15
leaq 0x31a0(%rip), %rcx      # 0x68244
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x14150
testq %rax, %rax
je 0x650f8
testq %r15, %r15
je 0x65128
movl 0x28(%rsp), %edx
movsd 0x20(%rsp), %xmm0
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm1
movups %xmm1, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x13ec0
jmp 0x65158
movl 0x28(%rsp), %esi
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
callq 0x12df0
jmp 0x65158
movq %rbx, %rdi
movl $0xe, %esi
movl $0x2, %edx
callq 0x132f0
testq %r15, %r15
je 0x65148
movl 0x28(%rsp), %edx
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %ecx
callq 0x12c40
jmp 0x65158
movsd 0x20(%rsp), %xmm0
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm1
movups %xmm1, (%rsp)
movq %r14, %rdi
callq 0x135f0
jmp 0x65158
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
movl %eax, %esi
callq 0x13130
movq %rbx, %rdi
movl %eax, %esi
callq 0x13270
movl $0x1, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq