// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_do_button_text_image
NK_LIB nk_bool
nk_do_button_text_image(nk_flags *state,
    struct nk_command_buffer *out, struct nk_rect bounds,
    struct nk_image img, const char* str, int len, nk_flags align,
    enum nk_button_behavior behavior, const struct nk_style_button *style,
    const struct nk_user_font *font, const struct nk_input *in)
{
    int ret;
    struct nk_rect icon;
    struct nk_rect content;

    NK_ASSERT(style);
    NK_ASSERT(state);
    NK_ASSERT(font);
    NK_ASSERT(out);
    if (!out || !font || !style || !str)
        return nk_false;

    ret = nk_do_button(state, out, bounds, style, in, behavior, &content);
    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;

    if (style->draw_begin) style->draw_begin(out, style->userdata);
    nk_draw_button_text_image(out, &bounds, &content, &icon, *state, style, str, len, font, &img);
    if (style->draw_end) style->draw_end(out, style->userdata);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, 0xc(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, %rbx
movq %rdi, %r13
movq 0xe8(%rsp), %r14
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, 0x20(%rsp)
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x40(%rsp)
testq %r14, %r14
jne 0x3f3a4
movq 0x48c73(%rip), %rbp     # 0x87ff0
movq (%rbp), %rdi
leaq 0x32a04(%rip), %rsi     # 0x71d8c
leaq 0x32a1b(%rip), %rdx     # 0x71daa
movl $0x5f50, %ecx           # imm = 0x5F50
xorl %eax, %eax
callq 0x12d80
movq (%rbp), %rdi
callq 0x13780
movq 0xf0(%rsp), %rax
testq %r13, %r13
jne 0x3f3e7
movq 0x48c38(%rip), %rbp     # 0x87ff0
movq (%rbp), %rdi
leaq 0x329c9(%rip), %rsi     # 0x71d8c
leaq 0x329e0(%rip), %rdx     # 0x71daa
movl $0x5f51, %ecx           # imm = 0x5F51
xorl %eax, %eax
callq 0x12d80
movq (%rbp), %rdi
callq 0x13780
movq 0xf0(%rsp), %rax
testq %rax, %rax
jne 0x3f422
movq 0x48bfd(%rip), %rbp     # 0x87ff0
movq (%rbp), %rdi
leaq 0x3298e(%rip), %rsi     # 0x71d8c
leaq 0x329a5(%rip), %rdx     # 0x71daa
movl $0x5f52, %ecx           # imm = 0x5F52
xorl %eax, %eax
callq 0x12d80
movq (%rbp), %rdi
callq 0x13780
movq 0xf0(%rsp), %rax
testq %rbx, %rbx
jne 0x3f45d
movq 0x48bc2(%rip), %rbp     # 0x87ff0
movq (%rbp), %rdi
leaq 0x32953(%rip), %rsi     # 0x71d8c
leaq 0x3296a(%rip), %rdx     # 0x71daa
movl $0x5f53, %ecx           # imm = 0x5F53
xorl %eax, %eax
callq 0x12d80
movq (%rbp), %rdi
callq 0x13780
movq 0xf0(%rsp), %rax
xorl %ebp, %ebp
testq %r14, %r14
je 0x3f6a1
testq %rbx, %rbx
je 0x3f6a1
cmpq $0x0, 0x38(%rsp)
je 0x3f6a1
testq %rax, %rax
je 0x3f6a1
movq 0xf8(%rsp), %rcx
leaq 0x60(%rsp), %r9
movq %r13, %rdi
movq %rbx, %rsi
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq %r14, %rdx
movl %r15d, %r8d
callq 0x4761a
movl %eax, %ebp
movss 0xa4(%r14), %xmm2
movss 0x44(%rsp), %xmm0
addss %xmm2, %xmm0
movss 0x40(%rsp), %xmm1
movss 0x4c(%rsp), %xmm3
addss %xmm2, %xmm2
subss %xmm2, %xmm3
testb $0x1, %r12b
jne 0x3f4f0
movss 0xa0(%r14), %xmm2
addss %xmm2, %xmm2
addss %xmm1, %xmm2
jmp 0x3f512
addss 0x48(%rsp), %xmm1
movss 0xa0(%r14), %xmm2
addss %xmm2, %xmm2
addss %xmm3, %xmm2
subss %xmm2, %xmm1
xorps %xmm2, %xmm2
maxss %xmm1, %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movsd 0xa8(%r14), %xmm0
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
movaps %xmm0, %xmm1
addps %xmm0, %xmm1
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0x3f56e
movq 0xc0(%r14), %rsi
movq %rbx, %rdi
movaps %xmm3, 0x20(%rsp)
movaps %xmm2, 0x10(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm1, 0x70(%rsp)
callq *%rax
movaps 0x70(%rsp), %xmm1
movaps 0x80(%rsp), %xmm0
movaps 0x10(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
leaq 0xd0(%rsp), %r15
addps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
subps %xmm1, %xmm3
movaps %xmm3, 0x20(%rsp)
movl (%r13), %r12d
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movl %r12d, %edx
movq %r14, %rcx
callq 0x47779
leaq 0x80(%r14), %rcx
leaq 0x8(%rax), %rdx
cmpl $0x0, (%rax)
cmoveq %rdx, %rcx
movl (%rcx), %eax
movl %eax, 0x58(%rsp)
testb $0x10, %r12b
jne 0x3f5cf
testb $0x20, %r12b
movl 0xc(%rsp), %r13d
jne 0x3f5e1
movl 0x84(%r14), %eax
jmp 0x3f5e8
movl 0x88(%r14), %eax
movl %eax, 0x5c(%rsp)
movl 0xc(%rsp), %r13d
jmp 0x3f5ec
movl 0x8c(%r14), %eax
movl %eax, 0x5c(%rsp)
movss 0x94(%r14), %xmm0
leaq 0x50(%rsp), %r12
movl 0xc(%r12), %edi
callq 0x13e60
movl %eax, 0xc(%r12)
movq $0x0, (%r12)
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movl %r13d, %edx
movq %r12, %rcx
movl $0x12, %r8d
movq 0xf0(%rsp), %r9
callq 0x45d79
movss 0x7c(%r14), %xmm0
movss 0x2f26c(%rip), %xmm1    # 0x6e8b8
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movzbl %al, %eax
imull $0x10101, %eax, %eax    # imm = 0x10101
orl $0xff000000, %eax       # imm = 0xFF000000
ucomiss 0x2f24b(%rip), %xmm0    # 0x6e8b4
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmovnel %eax, %edx
cmovpl %eax, %edx
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq %r15, %rsi
callq 0x134d0
movq 0xd0(%r14), %rax
testq %rax, %rax
je 0x3f6a1
movq 0xc0(%r14), %rsi
movq %rbx, %rdi
callq *%rax
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq