// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiImageButtonEx
bool GuiImageButtonEx(Rectangle bounds, const char *text, Texture2D texture, Rectangle texSource)
{
    GuiControlState state = guiState;
    bool clicked = false;

    // Update control
    //--------------------------------------------------------------------
    if ((state != GUI_STATE_DISABLED) && !guiLocked)
    {
        Vector2 mousePoint = GetMousePosition();

        // Check button state
        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) clicked = true;
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    GuiDrawRectangle(bounds, GuiGetStyle(BUTTON, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(BUTTON, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(BUTTON, BASE + (state*3))), guiAlpha));

    if (text != NULL) GuiDrawText(text, GetTextBounds(BUTTON, bounds), GuiGetStyle(BUTTON, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(BUTTON, TEXT + (state*3))), guiAlpha));
    if (texture.id > 0) DrawTextureRec(texture, texSource, RAYGUI_CLITERAL(Vector2){ bounds.x + bounds.width/2 - texSource.width/2, bounds.y + bounds.height/2 - texSource.height/2 }, Fade(GetColor(GuiGetStyle(BUTTON, TEXT + (state*3))), guiAlpha));
    //------------------------------------------------------------------

    return clicked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movaps %xmm3, 0x40(%rsp)
movaps %xmm2, 0x70(%rsp)
movq %rdi, %r14
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movl 0x920fe(%rip), %ebx     # 0x9b280
cmpl $0x3, %ebx
jne 0x918c
pushq $0x3
popq %rbx
jmp 0x91c9
cmpb $0x0, 0x920f1(%rip)     # 0x9b284
jne 0x91c9
callq 0x1fd8b
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x2a643
testb %al, %al
je 0x91c9
xorl %edi, %edi
callq 0x1fdb3
testb %al, %al
je 0x9340
movl $0x0, 0x1c(%rsp)
pushq $0x2
popq %rbx
jmp 0x91d1
movl $0x0, 0x1c(%rsp)
pushq $0x2
popq %r12
pushq $0xc
popq %rsi
movl %r12d, %edi
callq 0x6e93
movl %eax, %ebp
leal (%rbx,%rbx,2), %r15d
movl %r12d, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x91240(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r13d
leal (%rbx,%rbx,2), %esi
incl %esi
movl %r12d, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x9121a(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r13d, %esi
movl %eax, %edx
callq 0x7476
testq %r14, %r14
je 0x92ab
pushq $0x2
popq %rbp
movl %ebp, %edi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x8f04
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x50(%rsp)
pushq $0xe
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %r12d
leal 0x2(%r15), %esi
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x911b3(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r14, %rdi
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movl %r12d, %esi
movl %eax, %edx
callq 0x8d31
leaq 0xc0(%rsp), %r14
cmpl $0x0, (%r14)
movl 0x1c(%rsp), %ebx
je 0x932c
movaps 0x4fe4c(%rip), %xmm0    # 0x59110
movaps 0x20(%rsp), %xmm2
mulps %xmm0, %xmm2
addps 0x30(%rsp), %xmm2
movaps 0x40(%rsp), %xmm1
mulps %xmm0, %xmm1
subps %xmm1, %xmm2
movaps %xmm2, 0x20(%rsp)
addl $0x2, %r15d
pushq $0x2
popq %rdi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x91141(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl 0x10(%r14), %ecx
movl %ecx, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movaps 0x70(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movl %eax, %edi
callq 0x36fa0
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x245dd
movl %eax, 0x1c(%rsp)
testb %al, %al
pushq $0x1
popq %rax
cmovnel %ebx, %eax
movl %eax, %ebx
jmp 0x91d1