// File: /workspace/github_c_makefile_star2_O3/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 0x9977d(%rip), %ebx     # 0xa4250
cmpl $0x3, %ebx
jne 0xaadf
movl $0x3, %ebx
jmp 0xab18
cmpb $0x0, 0x9976e(%rip)     # 0xa4254
jne 0xab18
callq 0x26136
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
callq 0x320c1
testb %al, %al
je 0xab18
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x2615e
testb %al, %al
je 0xacd7
movl $0x2, %ebx
jmp 0xab1a
xorl %ebp, %ebp
movl %ebp, 0x1c(%rsp)
cmpb $0x1, 0x99730(%rip)     # 0xa4255
jne 0xab2f
movl 0x99853(%rip), %ebp     # 0xa4380
jmp 0xab48
callq 0x6a3c
movl 0x99846(%rip), %ebp     # 0xa4380
cmpb $0x0, 0x99714(%rip)     # 0xa4255
jne 0xab48
callq 0x6a3c
leal (%rbx,%rbx,2), %r12d
movslq %r12d, %rax
leaq 0x9973a(%rip), %r13     # 0xa4290
movl 0xc0(%r13,%rax,4), %edi
callq 0x4144d
movss 0x988c5(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movl %eax, %r15d
cmpb $0x0, 0x996d9(%rip)     # 0xa4255
jne 0xab83
callq 0x6a3c
leaq 0xc0(%rsp), %rbx
leal 0x31(%r12), %eax
cltq
movl (%r13,%rax,4), %edi
callq 0x4144d
movss 0x9888c(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7ee9
testq %r14, %r14
je 0xac44
movl $0x2, %edi
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0xa726
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x50(%rsp)
cmpb $0x1, 0x9966a(%rip)     # 0xa4255
jne 0xabf5
movl 0x99795(%rip), %ebp     # 0xa4388
jmp 0xac0e
callq 0x6a3c
movl 0x99788(%rip), %ebp     # 0xa4388
cmpb $0x0, 0x9964e(%rip)     # 0xa4255
jne 0xac0e
callq 0x6a3c
leal 0x32(%r12), %eax
cltq
movl (%r13,%rax,4), %edi
callq 0x4144d
movss 0x98809(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movq %r14, %rdi
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0xa506
cmpl $0x0, (%rbx)
movl 0x1c(%rsp), %ebp
je 0xacc3
movaps 0x5a4fc(%rip), %xmm0    # 0x65150
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)
cmpb $0x0, 0x995dd(%rip)     # 0xa4255
jne 0xac7f
callq 0x6a3c
addl $0x32, %r12d
movslq %r12d, %rax
movl (%r13,%rax,4), %edi
callq 0x4144d
movss 0x98798(%rip), %xmm0    # 0xa3430
movl %eax, %edi
callq 0x41122
movl 0x10(%rbx), %ecx
movl %ecx, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movaps 0x70(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movl %eax, %edi
callq 0x3fead
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x2bd0b
movl %eax, %ebp
testb %al, %al
movl $0x1, %eax
cmovnel %ebx, %eax
movl %eax, %ebx
jmp 0xab1a