// File: /workspace/github_c_makefile_star2_O2/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 $0x78, %rsp
movq %r9, %rbx
movl %r8d, 0x3c(%rsp)
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x68(%rsp)
testq %rdi, %rdi
jne 0x45084
movq 0x3ff93(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x24ca4(%rip), %rsi     # 0x69d0c
leaq 0x24cbb(%rip), %rdx     # 0x69d2a
movl $0x6287, %ecx           # imm = 0x6287
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
testq %r14, %r14
jne 0x450b7
movq 0x3ff60(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x24c71(%rip), %rsi     # 0x69d0c
leaq 0x24c88(%rip), %rdx     # 0x69d2a
movl $0x6288, %ecx           # imm = 0x6288
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
testq %r15, %r15
jne 0x450ea
movq 0x3ff2d(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x24c3e(%rip), %rsi     # 0x69d0c
leaq 0x24c55(%rip), %rdx     # 0x69d2a
movl $0x6289, %ecx           # imm = 0x6289
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
testl %ebp, %ebp
jne 0x4511c
movq 0x3fefb(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x24c0c(%rip), %rsi     # 0x69d0c
leaq 0x24c23(%rip), %rdx     # 0x69d2a
movl $0x628a, %ecx           # imm = 0x628A
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
callq 0x13960
movq 0xb0(%rsp), %r12
testq %rbx, %rbx
jne 0x4515f
movq 0x3fec0(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x24bd1(%rip), %rsi     # 0x69d0c
leaq 0x24be8(%rip), %rdx     # 0x69d2a
movl $0x628b, %ecx           # imm = 0x628B
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
movq 0xb0(%rsp), %r12
callq 0x13960
movq 0xc0(%rsp), %r8
testq %r12, %r12
jne 0x451a7
movq 0x3fe7d(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
leaq 0x24b8f(%rip), %rsi     # 0x69d0c
leaq 0x24ba6(%rip), %rdx     # 0x69d2a
movl $0x628c, %ecx           # imm = 0x628C
xorl %eax, %eax
callq 0x12ea0
movq 0x3fe59(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
callq 0x13960
movq 0xc0(%rsp), %r8
testq %r8, %r8
jne 0x451f5
movq 0x3fe3d(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
leaq 0x24b4f(%rip), %rsi     # 0x69d0c
leaq 0x24b66(%rip), %rdx     # 0x69d2a
movl $0x628d, %ecx           # imm = 0x628D
xorl %eax, %eax
movq %rbx, 0x30(%rsp)
movq %r13, %rbx
movq %r8, %r13
callq 0x12ea0
movq 0x3fe0e(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
callq 0x13960
movq %r13, %r8
movq %rbx, %r13
movq 0x30(%rsp), %rbx
testq %r8, %r8
sete %al
testq %r12, %r12
sete %cl
testq %rbx, %rbx
sete %dl
testl %ebp, %ebp
sete %sil
testq %r15, %r15
sete %dil
testq %r14, %r14
sete %r8b
testq %r13, %r13
sete %r9b
orb %r8b, %r9b
orb %sil, %dil
orb %r9b, %dil
orb %dl, %dil
orb %cl, %dil
orb %al, %dil
xorl %eax, %eax
testb $0x1, %dil
jne 0x45300
movq 0xb8(%rsp), %rsi
movl (%rbx), %eax
movl %eax, 0x30(%rsp)
movsd 0x11c(%r12), %xmm1
movaps 0x50(%rsp), %xmm0
subps %xmm1, %xmm0
addps %xmm1, %xmm1
addps 0x40(%rsp), %xmm1
movq %r13, %rdi
xorl %edx, %edx
callq 0x4c99d
testl %eax, %eax
je 0x45280
xorl %eax, %eax
cmpl $0x0, (%rbx)
sete %al
movl %eax, (%rbx)
movq 0x140(%r12), %rax
testq %rax, %rax
je 0x4529a
movq 0x138(%r12), %rsi
movq %r14, %rdi
callq *%rax
movl (%r13), %esi
movl (%rbx), %ecx
movq 0xc0(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x20(%rsp)
andl $0x0, 0x8(%rsp)
movl %ebp, 0x18(%rsp)
andq $0x0, (%rsp)
movq %r15, 0x10(%rsp)
leaq 0x68(%rsp), %r8
movq %r14, %rdi
movq %r12, %rdx
xorl %r9d, %r9d
callq 0x529d2
movq 0x148(%r12), %rax
testq %rax, %rax
je 0x452f5
movq 0x138(%r12), %rsi
movq %r14, %rdi
callq *%rax
xorl %eax, %eax
movl 0x30(%rsp), %ecx
cmpl (%rbx), %ecx
setne %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq