// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_do_selectable_image
NK_LIB nk_bool
nk_do_selectable_image(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_image *img, const struct nk_style_selectable *style,
    const struct nk_input *in, const struct nk_user_font *font)
{
    nk_bool old_value;
    struct nk_rect touch;
    struct nk_rect icon;

    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;

    /* toggle behavior */
    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;
    if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))
        *value = !(*value);

    icon.y = bounds.y + style->padding.y;
    icon.w = icon.h = bounds.h - 2 * style->padding.y;
    if (align & NK_TEXT_ALIGN_LEFT) {
        icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);
        icon.x = NK_MAX(icon.x, 0);
    } else icon.x = bounds.x + 2 * style->padding.x;

    icon.x += style->image_padding.x;
    icon.y += style->image_padding.y;
    icon.w -= 2 * style->image_padding.x;
    icon.h -= 2 * style->image_padding.y;

    /* draw selectable */
    if (style->draw_begin) style->draw_begin(out, style->userdata);
    nk_draw_selectable(out, *state, style, *value, &bounds, &icon, img, 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 $0x88, %rsp
movq %r9, %rbx
movq %r8, 0x10(%rsp)
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, 0x30(%rsp)
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x78(%rsp)
testq %rdi, %rdi
jne 0x490c5
movq 0x3df50(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27cf2(%rip), %rsi     # 0x70d9c
leaq 0x27d09(%rip), %rdx     # 0x70dba
movl $0x62ac, %ecx           # imm = 0x62AC
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r14, %r14
jne 0x490f6
movq 0x3df1f(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27cc1(%rip), %rsi     # 0x70d9c
leaq 0x27cd8(%rip), %rdx     # 0x70dba
movl $0x62ad, %ecx           # imm = 0x62AD
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
testq %r13, %r13
jne 0x49127
movq 0x3deee(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27c90(%rip), %rsi     # 0x70d9c
leaq 0x27ca7(%rip), %rdx     # 0x70dba
movl $0x62ae, %ecx           # imm = 0x62AE
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq %r13, 0x18(%rsp)
testl %r12d, %r12d
jne 0x4915d
movq 0x3deb8(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27c5a(%rip), %rsi     # 0x70d9c
leaq 0x27c71(%rip), %rdx     # 0x70dba
movl $0x62af, %ecx           # imm = 0x62AF
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0xc8(%rsp), %r13
testq %rbx, %rbx
jne 0x49196
movq 0x3de7f(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27c21(%rip), %rsi     # 0x70d9c
leaq 0x27c38(%rip), %rdx     # 0x70dba
movl $0x62b0, %ecx           # imm = 0x62B0
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0xd8(%rsp), %rax
testq %r13, %r13
jne 0x491d7
movq 0x3de46(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x27be8(%rip), %rsi     # 0x70d9c
leaq 0x27bff(%rip), %rdx     # 0x70dba
movl $0x62b1, %ecx           # imm = 0x62B1
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0xd8(%rsp), %rax
testq %rax, %rax
je 0x492b7
testq %r13, %r13
sete %al
testq %rbx, %rbx
sete %cl
testl %r12d, %r12d
sete %dl
cmpq $0x0, 0x18(%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 0x493aa
movaps 0x20(%rsp), %xmm0
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm1, 0x40(%rsp)
movaps 0x30(%rsp), %xmm2
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
movaps %xmm1, 0x50(%rsp)
movq 0xd0(%rsp), %rsi
movl (%rbx), %eax
movl %eax, 0xc(%rsp)
movsd 0x11c(%r13), %xmm1
subps %xmm1, %xmm0
addps %xmm1, %xmm1
addps %xmm2, %xmm1
movq %rbp, %rdi
xorl %edx, %edx
callq 0x5160c
testl %eax, %eax
je 0x4927c
xorl %eax, %eax
cmpl $0x0, (%rbx)
sete %al
movl %eax, (%rbx)
movss 0x118(%r13), %xmm0
movaps 0x40(%rsp), %xmm3
addss %xmm0, %xmm3
addss %xmm0, %xmm0
movaps 0x50(%rsp), %xmm2
subss %xmm0, %xmm2
testb $0x1, 0x10(%rsp)
jne 0x492eb
movss 0x114(%r13), %xmm0
addss %xmm0, %xmm0
addss 0x20(%rsp), %xmm0
jmp 0x49312
movq 0x3dd32(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x27ad4(%rip), %rsi     # 0x70d9c
leaq 0x27aeb(%rip), %rdx     # 0x70dba
xorl %r15d, %r15d
movl $0x62b2, %ecx           # imm = 0x62B2
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
jmp 0x493aa
movaps 0x20(%rsp), %xmm1
addss 0x30(%rsp), %xmm1
movss 0x114(%r13), %xmm0
addss %xmm0, %xmm0
addss %xmm2, %xmm0
subss %xmm0, %xmm1
xorps %xmm0, %xmm0
maxss %xmm1, %xmm0
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movq 0xc0(%rsp), %r15
movsd 0x124(%r13), %xmm1
addps %xmm1, %xmm0
unpcklps %xmm2, %xmm2            # xmm2 = xmm2[0,0,1,1]
addps %xmm1, %xmm1
subps %xmm1, %xmm2
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movups %xmm0, 0x68(%rsp)
movq 0x140(%r13), %rax
testq %rax, %rax
je 0x49352
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
movl (%rbp), %esi
movl (%rbx), %ecx
leaq 0x78(%rsp), %r8
leaq 0x68(%rsp), %r9
movq %r14, %rdi
movq %r13, %rdx
pushq 0xd8(%rsp)
pushq 0x18(%rsp)
pushq %r12
pushq 0x30(%rsp)
pushq $0x0
pushq %r15
callq 0x57d77
addq $0x30, %rsp
movq 0x148(%r13), %rax
testq %rax, %rax
je 0x4939d
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
xorl %r15d, %r15d
movl 0xc(%rsp), %eax
cmpl (%rbx), %eax
setne %r15b
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq