// File: /workspace/github_c_makefile_star2_O3/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 $0x88, %rsp
movl %r9d, %r15d
movl %r8d, 0x10(%rsp)
movl %ecx, 0x14(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, %rbp
movq 0xd8(%rsp), %r14
movaps %xmm0, %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movups %xmm2, 0x68(%rsp)
testq %r14, %r14
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, (%rsp)
jne 0x3eb65
movq 0x484bb(%rip), %r13     # 0x86ff0
movq (%r13), %rdi
leaq 0x3225c(%rip), %rsi     # 0x70d9c
leaq 0x32273(%rip), %rdx     # 0x70dba
movl $0x5f50, %ecx           # imm = 0x5F50
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq 0xe0(%rsp), %r12
testq %rbp, %rbp
jne 0x3eba9
movq 0x48477(%rip), %r13     # 0x86ff0
movq (%r13), %rdi
leaq 0x32218(%rip), %rsi     # 0x70d9c
leaq 0x3222f(%rip), %rdx     # 0x70dba
movl $0x5f51, %ecx           # imm = 0x5F51
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
testq %r12, %r12
jne 0x3ebe5
movq 0x4843b(%rip), %r13     # 0x86ff0
movq (%r13), %rdi
leaq 0x321dc(%rip), %rsi     # 0x70d9c
leaq 0x321f3(%rip), %rdx     # 0x70dba
movl $0x5f52, %ecx           # imm = 0x5F52
xorl %eax, %eax
callq 0x12d80
movq (%r13), %rdi
callq 0x13780
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
testq %rbx, %rbx
je 0x3ec82
xorl %r13d, %r13d
testq %r14, %r14
je 0x3ee1b
cmpq $0x0, 0x18(%rsp)
je 0x3ee1b
testq %r12, %r12
je 0x3ee1b
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
movaps %xmm2, 0x30(%rsp)
movq 0xe8(%rsp), %rcx
leaq 0x40(%rsp), %r9
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r15d, %r8d
callq 0x46a33
movaps 0x50(%rsp), %xmm3
movaps 0x30(%rsp), %xmm1
movl %eax, %r13d
movss 0xa4(%r14), %xmm0
addss %xmm0, %xmm3
addss %xmm0, %xmm0
subss %xmm0, %xmm1
testb $0x1, 0x10(%rsp)
jne 0x3ecb6
movss 0xa0(%r14), %xmm2
addss %xmm2, %xmm2
addss (%rsp), %xmm2
jmp 0x3ecdc
movq 0x48367(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x32109(%rip), %rsi     # 0x70d9c
leaq 0x32120(%rip), %rdx     # 0x70dba
xorl %r13d, %r13d
movl $0x5f53, %ecx           # imm = 0x5F53
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
jmp 0x3ee1b
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 0xc0(%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, 0x30(%rsp)
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0x3ed1e
movq 0xc0(%r14), %rsi
movq %rbx, %rdi
callq *%rax
movl (%rbp), %ebp
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movq %r14, %rcx
callq 0x46b8f
leaq 0x8(%rax), %rcx
cmpl $0x0, (%rax)
leaq 0x80(%r14), %rax
cmoveq %rcx, %rax
movl (%rax), %eax
leaq 0x78(%rsp), %r12
movl %eax, 0x8(%r12)
movl %ebp, %eax
andl $0x20, %eax
shrl $0x2, %eax
orq $0x84, %rax
testb $0x10, %bpl
movl $0x88, %ecx
cmoveq %rax, %rcx
movl (%r14,%rcx), %edi
movss 0x94(%r14), %xmm0
callq 0x13e60
movl %eax, 0xc(%r12)
movq $0x0, (%r12)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq %r12, %rcx
movl $0x12, %r8d
movq 0xe0(%rsp), %r9
callq 0x451c6
movss 0x7c(%r14), %xmm0
movss 0x2eae1(%rip), %xmm1    # 0x6d8a8
mulss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movzbl %al, %eax
imull $0x10101, %eax, %eax    # imm = 0x10101
orl $0xff000000, %eax       # imm = 0xFF000000
ucomiss 0x2eac0(%rip), %xmm0    # 0x6d8a4
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmovnel %eax, %edx
cmovpl %eax, %edx
movq %rbx, %rdi
movaps (%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movq %r15, %rsi
callq 0x134d0
movq 0xd0(%r14), %rax
testq %rax, %rax
je 0x3ee1b
movq 0xc0(%r14), %rsi
movq %rbx, %rdi
callq *%rax
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq