// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x3b92(%rip), %rcx      # 0xa7280
callq 0x130f0
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rdi
movl $0x4, %esi
leaq 0x48(%rsp), %rdx
callq 0x15460
cmpl $0x0, %eax
je 0xa3749
movq 0x68(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x136c0
movq 0x28(%rsp), %rdi
movq %rax, %rdx
movl $0x4, %esi
callq 0x134c0
movl %eax, 0x74(%rsp)
jmp 0xa3943
movq 0x68(%rsp), %rdi
movl $0x2, %esi
callq 0x15090
movl %eax, 0x60(%rsp)
cmpl $0x0, 0x60(%rsp)
jne 0xa379e
movq 0x68(%rsp), %rdi
movl $0x3, %esi
leaq 0x58(%rsp), %rdx
callq 0x13df0
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x58(%rsp), %edx
movsd 0x48(%rsp), %xmm0
callq 0x13fb0
movl %eax, 0x64(%rsp)
jmp 0xa392d
cmpl $0x5, 0x60(%rsp)
jne 0xa3813
movq 0x68(%rsp), %rdi
movl $0x2, %esi
leaq 0x44(%rsp), %rdx
callq 0x13120
cmpl $0x0, %eax
je 0xa37f6
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x136c0
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x134c0
movl %eax, 0x74(%rsp)
jmp 0xa3943
movq 0x30(%rsp), %rdi
movl 0x44(%rsp), %esi
movsd 0x48(%rsp), %xmm0
callq 0x13f20
movl %eax, 0x64(%rsp)
jmp 0xa392b
movq 0x68(%rsp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x58(%rsp), %rcx
callq 0x139a0
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0x39ff(%rip), %rcx      # 0xa7244
callq 0x15450
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0xa38c6
cmpq $0x0, 0x50(%rsp)
je 0xa3892
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x58(%rsp), %edx
movq 0x38(%rsp), %rcx
movsd 0x48(%rsp), %xmm0
movq 0x10(%rcx), %r8
movq %rsp, %rax
movq %r8, 0x10(%rax)
movups (%rcx), %xmm1
movups %xmm1, (%rax)
callq 0x15160
movl %eax, 0x1c(%rsp)
jmp 0xa38bc
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rcx
movsd 0x48(%rsp), %xmm0
movq 0x10(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm1
movups %xmm1, (%rax)
callq 0x147c0
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0xa3929
movq 0x68(%rsp), %rdi
movl $0xe, %esi
movl $0x2, %edx
callq 0x14470
movl %eax, 0x40(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0xa3909
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x58(%rsp), %edx
movl 0x40(%rsp), %ecx
movsd 0x48(%rsp), %xmm0
callq 0x13d50
movl %eax, 0x18(%rsp)
jmp 0xa3921
movq 0x30(%rsp), %rdi
movl 0x40(%rsp), %esi
movsd 0x48(%rsp), %xmm0
callq 0x14290
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0xa392b
jmp 0xa392d
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x143e0
movl $0x1, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopl (%rax)