// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_do_selectable
NK_LIB nk_bool
nk_do_selectable(nk_flags *state, struct nk_command_buffer *out,
    struct nk_rect bounds, const char *str, int len, nk_flags align, nk_bool *value,
    const struct nk_style_selectable *style, const struct nk_input *in,
    const struct nk_user_font *font)
{
    int old_value;
    struct nk_rect touch;

    NK_ASSERT(state);
    NK_ASSERT(out);
    NK_ASSERT(str);
    NK_ASSERT(len);
    NK_ASSERT(value);
    NK_ASSERT(style);
    NK_ASSERT(font);

    if (!state || !out || !str || !len || !value || !style || !font) return 0;
    old_value = *value;

    /* remove padding */
    touch.x = bounds.x - style->touch_padding.x;
    touch.y = bounds.y - style->touch_padding.y;
    touch.w = bounds.w + style->touch_padding.x * 2;
    touch.h = bounds.h + style->touch_padding.y * 2;

    /* update button */
    if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))
        *value = !(*value);

    /* draw selectable */
    if (style->draw_begin) style->draw_begin(out, style->userdata);
    nk_draw_selectable(out, *state, style, *value, &bounds, 0,0,NK_SYMBOL_NONE, str, len, align, font);
    if (style->draw_end) style->draw_end(out, style->userdata);
    return old_value != *value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, 0x18(%rsp)
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x48(%rsp)
testq %rdi, %rdi
jne 0x48c78
movq 0x3e39d(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x2813f(%rip), %rsi     # 0x70d9c
leaq 0x28156(%rip), %rdx     # 0x70dba
movl $0x6287, %ecx           # imm = 0x6287
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r14, %r14
jne 0x48ca9
movq 0x3e36c(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x2810e(%rip), %rsi     # 0x70d9c
leaq 0x28125(%rip), %rdx     # 0x70dba
movl $0x6288, %ecx           # imm = 0x6288
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r13, %r13
jne 0x48cda
movq 0x3e33b(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x280dd(%rip), %rsi     # 0x70d9c
leaq 0x280f4(%rip), %rdx     # 0x70dba
movl $0x6289, %ecx           # imm = 0x6289
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq %r13, 0x10(%rsp)
testl %r12d, %r12d
jne 0x48d10
movq 0x3e305(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x280a7(%rip), %rsi     # 0x70d9c
leaq 0x280be(%rip), %rdx     # 0x70dba
movl $0x628a, %ecx           # imm = 0x628A
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0x90(%rsp), %r13
testq %rbx, %rbx
jne 0x48d49
movq 0x3e2cc(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x2806e(%rip), %rsi     # 0x70d9c
leaq 0x28085(%rip), %rdx     # 0x70dba
movl $0x628b, %ecx           # imm = 0x628B
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0xa0(%rsp), %r9
testq %r13, %r13
jne 0x48d8a
movq 0x3e293(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x28035(%rip), %rsi     # 0x70d9c
leaq 0x2804c(%rip), %rdx     # 0x70dba
movl $0x628c, %ecx           # imm = 0x628C
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0xa0(%rsp), %r9
testq %r9, %r9
je 0x48e82
testq %r13, %r13
sete %al
testq %rbx, %rbx
sete %cl
testl %r12d, %r12d
sete %dl
cmpq $0x0, 0x10(%rsp)
sete %sil
testq %r14, %r14
sete %dil
testq %rbp, %rbp
sete %r8b
orb %dil, %r8b
orb %dl, %sil
orb %r8b, %sil
orb %cl, %sil
xorl %r15d, %r15d
orb %al, %sil
jne 0x48eb1
movq %r9, %r15
movq 0x98(%rsp), %rsi
movl (%rbx), %eax
movl %eax, 0xc(%rsp)
movsd 0x11c(%r13), %xmm1
movaps 0x30(%rsp), %xmm0
subps %xmm1, %xmm0
addps %xmm1, %xmm1
addps 0x20(%rsp), %xmm1
movq %rbp, %rdi
xorl %edx, %edx
callq 0x5160c
testl %eax, %eax
je 0x48e17
xorl %eax, %eax
cmpl $0x0, (%rbx)
sete %al
movl %eax, (%rbx)
movq 0x140(%r13), %rax
testq %rax, %rax
je 0x48e2f
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
movl (%rbp), %esi
movl (%rbx), %ecx
leaq 0x48(%rsp), %r8
movq %r14, %rdi
movq %r13, %rdx
xorl %r9d, %r9d
pushq %r15
pushq 0x20(%rsp)
pushq %r12
pushq 0x28(%rsp)
pushq $0x0
pushq $0x0
callq 0x57d77
addq $0x30, %rsp
movq 0x148(%r13), %rax
testq %rax, %rax
je 0x48e73
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
xorl %r15d, %r15d
movl 0xc(%rsp), %eax
cmpl (%rbx), %eax
setne %r15b
jmp 0x48eb1
movq 0x3e167(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x27f09(%rip), %rsi     # 0x70d9c
leaq 0x27f20(%rip), %rdx     # 0x70dba
xorl %r15d, %r15d
movl $0x628d, %ecx           # imm = 0x628D
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq