// File: /workspace/github_c_makefile_star2_O2/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, 0x1c(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, %rbx
movq %rdi, %r13
movq 0xe8(%rsp), %r14
movaps %xmm0, %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movups %xmm2, 0x78(%rsp)
testq %r14, %r14
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, (%rsp)
jne 0x3b513
movq 0x49b0d(%rip), %rbp     # 0x84ff0
movq (%rbp), %rdi
leaq 0x2e81e(%rip), %rsi     # 0x69d0c
leaq 0x2e835(%rip), %rdx     # 0x69d2a
movl $0x5f50, %ecx           # imm = 0x5F50
xorl %eax, %eax
callq 0x12ea0
movq (%rbp), %rdi
callq 0x13960
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq 0xf0(%rsp), %rax
testq %r13, %r13
jne 0x3b55f
movq 0x49ac9(%rip), %rbp     # 0x84ff0
movq (%rbp), %rdi
leaq 0x2e7da(%rip), %rsi     # 0x69d0c
leaq 0x2e7f1(%rip), %rdx     # 0x69d2a
movl $0x5f51, %ecx           # imm = 0x5F51
xorl %eax, %eax
callq 0x12ea0
movq (%rbp), %rdi
callq 0x13960
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq 0xf0(%rsp), %rax
testq %rax, %rax
jne 0x3b5a3
movq 0x49a85(%rip), %rbp     # 0x84ff0
movq (%rbp), %rdi
leaq 0x2e796(%rip), %rsi     # 0x69d0c
leaq 0x2e7ad(%rip), %rdx     # 0x69d2a
movl $0x5f52, %ecx           # imm = 0x5F52
xorl %eax, %eax
callq 0x12ea0
movq (%rbp), %rdi
callq 0x13960
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq 0xf0(%rsp), %rax
testq %rbx, %rbx
jne 0x3b5e7
movq 0x49a41(%rip), %rbp     # 0x84ff0
movq (%rbp), %rdi
leaq 0x2e752(%rip), %rsi     # 0x69d0c
leaq 0x2e769(%rip), %rdx     # 0x69d2a
movl $0x5f53, %ecx           # imm = 0x5F53
xorl %eax, %eax
callq 0x12ea0
movq (%rbp), %rdi
callq 0x13960
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq 0xf0(%rsp), %rax
xorl %ebp, %ebp
testq %r14, %r14
je 0x3b7c1
testq %rbx, %rbx
je 0x3b7c1
cmpq $0x0, 0x38(%rsp)
je 0x3b7c1
testq %rax, %rax
je 0x3b7c1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movaps %xmm2, 0x60(%rsp)
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
movaps %xmm2, 0x40(%rsp)
movq 0xf8(%rsp), %rcx
leaq 0x50(%rsp), %r9
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r15d, %r8d
callq 0x43006
movaps 0x60(%rsp), %xmm3
movaps 0x40(%rsp), %xmm1
movl %eax, %ebp
movss 0xa4(%r14), %xmm0
addss %xmm0, %xmm3
addss %xmm0, %xmm0
subss %xmm0, %xmm1
testb $0x1, %r12b
jne 0x3b681
movss 0xa0(%r14), %xmm2
addss %xmm2, %xmm2
addss (%rsp), %xmm2
jmp 0x3b6a7
movaps 0x20(%rsp), %xmm4
addss (%rsp), %xmm4
movss 0xa0(%r14), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
subss %xmm0, %xmm4
xorps %xmm2, %xmm2
maxss %xmm4, %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
leaq 0xd0(%rsp), %r15
movsd 0xa8(%r14), %xmm0
addps %xmm0, %xmm2
movaps %xmm2, (%rsp)
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
addps %xmm0, %xmm0
subps %xmm0, %xmm1
movaps %xmm1, 0x40(%rsp)
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0x3b6e9
movq 0xc0(%r14), %rsi
movq %rbx, %rdi
callq *%rax
movl (%r13), %r13d
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
movl %r13d, %edx
movq %r14, %rcx
callq 0x43162
leaq 0x8(%rax), %rcx
cmpl $0x0, (%rax)
leaq 0x80(%r14), %rax
cmoveq %rcx, %rax
movl (%rax), %eax
leaq 0x88(%rsp), %r12
movl %eax, 0x8(%r12)
movl %r13d, %eax
andl $0x20, %eax
shrl $0x2, %eax
orq $0x84, %rax
testb $0x10, %r13b
movl $0x88, %ecx
cmoveq %rax, %rcx
movl (%r14,%rcx), %edi
movss 0x94(%r14), %xmm0
callq 0x140a0
movl %eax, 0xc(%r12)
andq $0x0, (%r12)
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
pushq $0x12
popq %r8
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq %r12, %rcx
movq 0xf0(%rsp), %r9
callq 0x41852
movss 0x7c(%r14), %xmm0
pushq $-0x1
popq %rdi
callq 0x140a0
movq %rbx, %rdi
movaps (%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movq %r15, %rsi
movl %eax, %edx
callq 0x13660
movq 0xd0(%r14), %rax
testq %rax, %rax
je 0x3b7c1
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