// File: /workspace/github_c_makefile_star2_O2/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 $0x78, %rsp
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbp
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, 0x20(%rsp)
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x68(%rsp)
testq %rdi, %rdi
jne 0x45511
movq 0x3fb06(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x24817(%rip), %rsi     # 0x69d0c
leaq 0x2482e(%rip), %rdx     # 0x69d2a
movl $0x62ac, %ecx           # imm = 0x62AC
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
testq %r14, %r14
jne 0x45544
movq 0x3fad3(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x247e4(%rip), %rsi     # 0x69d0c
leaq 0x247fb(%rip), %rdx     # 0x69d2a
movl $0x62ad, %ecx           # imm = 0x62AD
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
testq %r12, %r12
jne 0x45577
movq 0x3faa0(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x247b1(%rip), %rsi     # 0x69d0c
leaq 0x247c8(%rip), %rdx     # 0x69d2a
movl $0x62ae, %ecx           # imm = 0x62AE
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
cmpl $0x0, (%rsp)
jne 0x455ab
movq 0x3fa6c(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x2477d(%rip), %rsi     # 0x69d0c
leaq 0x24794(%rip), %rdx     # 0x69d2a
movl $0x62af, %ecx           # imm = 0x62AF
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
callq 0x13960
movq 0xb8(%rsp), %r13
testq %rbx, %rbx
jne 0x455ee
movq 0x3fa31(%rip), %r13     # 0x84ff0
movq (%r13), %rdi
leaq 0x24742(%rip), %rsi     # 0x69d0c
leaq 0x24759(%rip), %rdx     # 0x69d2a
movl $0x62b0, %ecx           # imm = 0x62B0
xorl %eax, %eax
callq 0x12ea0
movq (%r13), %rdi
movq 0xb8(%rsp), %r13
callq 0x13960
movq 0xc8(%rsp), %r15
testq %r13, %r13
jne 0x45637
movq %r12, %r15
movq 0x3f9eb(%rip), %r12     # 0x84ff0
movq (%r12), %rdi
leaq 0x246fc(%rip), %rsi     # 0x69d0c
leaq 0x24713(%rip), %rdx     # 0x69d2a
movl $0x62b1, %ecx           # imm = 0x62B1
xorl %eax, %eax
callq 0x12ea0
movq (%r12), %rdi
movq %r15, %r12
callq 0x13960
movq 0xc8(%rsp), %r15
testq %r15, %r15
jne 0x4566f
movq 0x3f9ad(%rip), %rcx     # 0x84ff0
movq (%rcx), %rdi
leaq 0x246bf(%rip), %rsi     # 0x69d0c
leaq 0x246d6(%rip), %rdx     # 0x69d2a
movl $0x62b2, %ecx           # imm = 0x62B2
xorl %eax, %eax
callq 0x12ea0
movq 0x3f989(%rip), %rax     # 0x84ff0
movq (%rax), %rdi
callq 0x13960
testq %r15, %r15
sete %al
testq %r13, %r13
sete %cl
testq %rbx, %rbx
sete %dl
cmpl $0x0, (%rsp)
sete %sil
testq %r12, %r12
sete %dil
testq %r14, %r14
sete %r8b
testq %rbp, %rbp
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 0x45810
movaps 0x10(%rsp), %xmm0
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm1, 0x30(%rsp)
movaps 0x20(%rsp), %xmm2
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
movaps %xmm1, 0x40(%rsp)
movq 0xc0(%rsp), %rsi
movl (%rbx), %r15d
movsd 0x11c(%r13), %xmm1
subps %xmm1, %xmm0
addps %xmm1, %xmm1
addps %xmm2, %xmm1
movq %rbp, %rdi
xorl %edx, %edx
callq 0x4c99d
testl %eax, %eax
je 0x45713
xorl %eax, %eax
cmpl $0x0, (%rbx)
sete %al
movl %eax, (%rbx)
movss 0x118(%r13), %xmm0
movaps 0x30(%rsp), %xmm3
addss %xmm0, %xmm3
addss %xmm0, %xmm0
movaps 0x40(%rsp), %xmm2
subss %xmm0, %xmm2
testb $0x1, 0x8(%rsp)
jne 0x4574e
movss 0x114(%r13), %xmm0
addss %xmm0, %xmm0
addss 0x10(%rsp), %xmm0
jmp 0x45775
movaps 0x10(%rsp), %xmm1
addss 0x20(%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 0xb0(%rsp), %r10
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, 0x58(%rsp)
movq 0x140(%r13), %rax
testq %rax, %rax
je 0x457bd
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
movq 0xb0(%rsp), %r10
movl (%rbp), %esi
movl (%rbx), %ecx
leaq 0x68(%rsp), %r8
leaq 0x58(%rsp), %r9
movq %r14, %rdi
movq %r13, %rdx
pushq 0xc8(%rsp)
pushq 0x10(%rsp)
pushq 0x10(%rsp)
pushq %r12
pushq $0x0
pushq %r10
callq 0x529d2
addq $0x30, %rsp
movq 0x148(%r13), %rax
testq %rax, %rax
je 0x45808
movq 0x138(%r13), %rsi
movq %r14, %rdi
callq *%rax
xorl %eax, %eax
cmpl (%rbx), %r15d
setne %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq