// File: /workspace/github_c_makefile_star2_O0/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 %r14
pushq %rbx
subq $0xa0, %rsp
movq 0xd8(%rsp), %rax
movq 0xd0(%rsp), %rax
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movlpd %xmm0, 0x8c(%rsp)
movlpd %xmm1, 0x94(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movl %r8d, 0x68(%rsp)
movq %r9, 0x60(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x6d07b
movq 0x57fa1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x44347(%rip), %rsi     # 0xb13a0
leaq 0x4435e(%rip), %rdx     # 0xb13be
movl $0x62ac, %ecx           # imm = 0x62AC
movb $0x0, %al
callq 0x13ec0
movq 0x57f7d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d07d
jmp 0x6d07f
cmpq $0x0, 0x78(%rsp)
jne 0x6d0ba
movq 0x57f62(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x44308(%rip), %rsi     # 0xb13a0
leaq 0x4431f(%rip), %rdx     # 0xb13be
movl $0x62ad, %ecx           # imm = 0x62AD
movb $0x0, %al
callq 0x13ec0
movq 0x57f3e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d0bc
jmp 0x6d0be
cmpq $0x0, 0x70(%rsp)
jne 0x6d0f9
movq 0x57f23(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x442c9(%rip), %rsi     # 0xb13a0
leaq 0x442e0(%rip), %rdx     # 0xb13be
movl $0x62ae, %ecx           # imm = 0x62AE
movb $0x0, %al
callq 0x13ec0
movq 0x57eff(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d0fb
jmp 0x6d0fd
cmpl $0x0, 0x6c(%rsp)
jne 0x6d137
movq 0x57ee5(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4428b(%rip), %rsi     # 0xb13a0
leaq 0x442a2(%rip), %rdx     # 0xb13be
movl $0x62af, %ecx           # imm = 0x62AF
movb $0x0, %al
callq 0x13ec0
movq 0x57ec1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d139
jmp 0x6d13b
cmpq $0x0, 0x60(%rsp)
jne 0x6d176
movq 0x57ea6(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4424c(%rip), %rsi     # 0xb13a0
leaq 0x44263(%rip), %rdx     # 0xb13be
movl $0x62b0, %ecx           # imm = 0x62B0
movb $0x0, %al
callq 0x13ec0
movq 0x57e82(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d178
jmp 0x6d17a
cmpq $0x0, 0xc8(%rsp)
jne 0x6d1b8
movq 0x57e64(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x4420a(%rip), %rsi     # 0xb13a0
leaq 0x44221(%rip), %rdx     # 0xb13be
movl $0x62b1, %ecx           # imm = 0x62B1
movb $0x0, %al
callq 0x13ec0
movq 0x57e40(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d1ba
jmp 0x6d1bc
cmpq $0x0, 0xd8(%rsp)
jne 0x6d1fa
movq 0x57e22(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x441c8(%rip), %rsi     # 0xb13a0
leaq 0x441df(%rip), %rdx     # 0xb13be
movl $0x62b2, %ecx           # imm = 0x62B2
movb $0x0, %al
callq 0x13ec0
movq 0x57dfe(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x6d1fc
cmpq $0x0, 0x80(%rsp)
je 0x6d23c
cmpq $0x0, 0x78(%rsp)
je 0x6d23c
cmpq $0x0, 0x70(%rsp)
je 0x6d23c
cmpl $0x0, 0x6c(%rsp)
je 0x6d23c
cmpq $0x0, 0x60(%rsp)
je 0x6d23c
cmpq $0x0, 0xc8(%rsp)
je 0x6d23c
cmpq $0x0, 0xd8(%rsp)
jne 0x6d24c
movl $0x0, 0x9c(%rsp)
jmp 0x6d58d
movq 0x60(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x5c(%rsp)
movss 0x8c(%rsp), %xmm0
movq 0xc8(%rsp), %rax
movss 0x11c(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x90(%rsp), %xmm0
movq 0xc8(%rsp), %rax
movss 0x120(%rax), %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x50(%rsp)
movss 0x94(%rsp), %xmm1
movq 0xc8(%rsp), %rax
movss 0x11c(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movss 0x98(%rsp), %xmm1
movq 0xc8(%rsp), %rax
movss 0x120(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x58(%rsp)
movq 0x80(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movsd 0x4c(%rsp), %xmm0
movsd 0x54(%rsp), %xmm1
xorl %edx, %edx
callq 0x78060
cmpl $0x0, %eax
je 0x6d32c
movq 0x60(%rsp), %rax
cmpl $0x0, (%rax)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax)
movss 0x90(%rsp), %xmm0
movq 0xc8(%rsp), %rax
addss 0x118(%rax), %xmm0
movss %xmm0, 0x40(%rsp)
movss 0x98(%rsp), %xmm0
movq 0xc8(%rsp), %rax
movss 0x118(%rax), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x48(%rsp)
movss %xmm0, 0x44(%rsp)
movl 0x68(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6d3ed
movss 0x8c(%rsp), %xmm0
addss 0x94(%rsp), %xmm0
movq 0xc8(%rsp), %rax
movss 0x114(%rax), %xmm1
movss 0x44(%rsp), %xmm2
addss %xmm1, %xmm1
addss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
xorps %xmm0, %xmm0
ucomiss 0x3c(%rsp), %xmm0
jbe 0x6d3d3
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rsp)
jmp 0x6d3df
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0x38(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
jmp 0x6d414
movss 0x8c(%rsp), %xmm1
movq 0xc8(%rsp), %rax
movss 0x114(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0xc8(%rsp), %rax
movss 0x124(%rax), %xmm0
addss 0x3c(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movq 0xc8(%rsp), %rax
movss 0x128(%rax), %xmm0
addss 0x40(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
movq 0xc8(%rsp), %rax
movss 0x124(%rax), %xmm1
movss 0x44(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
movq 0xc8(%rsp), %rax
movss 0x128(%rax), %xmm1
movss 0x48(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, 0x48(%rsp)
movq 0xc8(%rsp), %rax
cmpq $0x0, 0x140(%rax)
je 0x6d4cb
movq 0xc8(%rsp), %rax
movq 0x140(%rax), %rax
movq 0x78(%rsp), %rdi
movq 0xc8(%rsp), %rcx
movq 0x138(%rcx), %rsi
callq *%rax
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rax
movl (%rax), %esi
movq 0xc8(%rsp), %rdx
movq 0x60(%rsp), %rax
movl (%rax), %ecx
movq 0xc0(%rsp), %r14
movq 0x70(%rsp), %rbx
movl 0x6c(%rsp), %r11d
movl 0x68(%rsp), %r10d
movq 0xd8(%rsp), %rax
leaq 0x8c(%rsp), %r8
leaq 0x3c(%rsp), %r9
xorl %ebp, %ebp
movq %r14, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x8a1b0
movq 0xc8(%rsp), %rax
cmpq $0x0, 0x148(%rax)
je 0x6d573
movq 0xc8(%rsp), %rax
movq 0x148(%rax), %rax
movq 0x78(%rsp), %rdi
movq 0xc8(%rsp), %rcx
movq 0x138(%rcx), %rsi
callq *%rax
movl 0x5c(%rsp), %eax
movq 0x60(%rsp), %rcx
cmpl (%rcx), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq