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

    Rectangle textBounds = { 0 };

    if (text != NULL)
    {
        textBounds.width = (float)GetTextWidth(text);
        textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
        textBounds.x = bounds.x + bounds.width + GuiGetStyle(CHECKBOX, TEXT_PADDING);
        textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
        if (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(CHECKBOX, TEXT_PADDING);
    }

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

        Rectangle totalBounds = {
            (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT)? textBounds.x : bounds.x,
            bounds.y,
            bounds.width + textBounds.width + GuiGetStyle(CHECKBOX, TEXT_PADDING),
            bounds.height,
        };

        // Check checkbox state
        if (CheckCollisionPointRec(mousePoint, totalBounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else state = GUI_STATE_FOCUSED;

            if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) checked = !checked;
        }
    }
    //--------------------------------------------------------------------

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

    if (checked)
    {
        Rectangle check = { bounds.x + GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING),
                            bounds.y + GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING),
                            bounds.width - 2*(GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING)),
                            bounds.height - 2*(GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING)) };
        GuiDrawRectangle(check, 0, BLANK, Fade(GetColor(GuiGetStyle(CHECKBOX, TEXT + state*3)), guiAlpha));
    }

    if (text != NULL) GuiDrawText(text, textBounds, (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT)? GUI_TEXT_ALIGN_LEFT : GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
    //--------------------------------------------------------------------

    return checked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %r14d
movq %rdi, %r13
movl 0x91ad3(%rip), %ebx     # 0x9b280
testq %rdi, %rdi
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, (%rsp)
je 0x987c
movq %r13, %rdi
callq 0x76f6
movl %eax, %ebp
pushq $0x10
popq %r15
xorl %edi, %edi
movl %r15d, %esi
callq 0x6e93
movd %eax, %xmm0
movd %ebp, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
addss 0x20(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
pushq $0x6
popq %rbp
pushq $0xd
popq %rsi
movl %ebp, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
addss 0x10(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movaps (%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps 0x20(%rsp), %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss 0x4f7dd(%rip), %xmm1    # 0x5900c
addss %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
xorl %edi, %edi
movl %r15d, %esi
callq 0x6e93
pushq $0x2
popq %rcx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movaps 0x30(%rsp), %xmm1
subss %xmm0, %xmm1
movaps 0x10(%rsp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, 0x10(%rsp)
pushq $0xe
popq %rsi
movl %ebp, %edi
callq 0x6e93
testl %eax, %eax
je 0x9884
movaps 0x40(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
jmp 0x98b9
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
jmp 0x98b9
movaps (%rsp), %xmm0
subss 0x40(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
pushq $0x6
popq %rdi
pushq $0xd
popq %rsi
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps 0x30(%rsp), %xmm2
subss %xmm0, %xmm2
movaps 0x10(%rsp), %xmm1
movss %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1,2,3]
movaps 0x40(%rsp), %xmm2
cmpl $0x3, %ebx
movaps %xmm2, 0x40(%rsp)
movaps %xmm1, 0x10(%rsp)
jne 0x98d0
pushq $0x3
popq %rbx
jmp 0x9967
cmpb $0x0, 0x919ad(%rip)     # 0x9b284
jne 0x9967
callq 0x1fd8b
movaps %xmm0, 0x30(%rsp)
pushq $0x6
popq %rbp
pushq $0xe
popq %rsi
movl %ebp, %edi
callq 0x6e93
movaps 0x10(%rsp), %xmm0
testl %eax, %eax
je 0x9901
movaps (%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movaps 0x40(%rsp), %xmm1
addss 0x20(%rsp), %xmm1
movaps %xmm1, 0x50(%rsp)
pushq $0xd
popq %rsi
movl %ebp, %edi
callq 0x6e93
cvtsi2ss %eax, %xmm0
addss 0x50(%rsp), %xmm0
movaps 0x20(%rsp), %xmm2
movss %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1,2,3]
movaps (%rsp), %xmm1
movaps 0x60(%rsp), %xmm0
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
movaps 0x30(%rsp), %xmm0
callq 0x2a643
testb %al, %al
je 0x9967
xorl %edi, %edi
callq 0x1fdb3
movzbl %al, %ebx
incl %ebx
xorl %edi, %edi
callq 0x245dd
xorb %r14b, %al
movl %eax, %r14d
pushq $0x6
popq %rbp
pushq $0xc
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %r12d
leal (%rbx,%rbx,2), %r15d
movl %ebp, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90aac(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movl %r12d, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x7476
testb %r14b, %r14b
je 0x9ace
pushq $0x6
popq %rbp
pushq $0xc
popq %r12
movl %ebp, %edi
movl %r12d, %esi
callq 0x6e93
movl %eax, %ebx
movq %r13, 0x50(%rsp)
pushq $0x10
popq %r13
movl %ebp, %edi
movl %r13d, %esi
callq 0x6e93
movl %r14d, 0x30(%rsp)
movl %eax, %r14d
movl %ebp, %edi
movl %r12d, %esi
callq 0x6e93
movl %eax, %r12d
movl %ebp, %edi
movl %r13d, %esi
callq 0x6e93
movd %ebx, %xmm0
movd %r12d, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
cvtdq2ps %xmm0, %xmm0
addps (%rsp), %xmm0
movd %r14d, %xmm1
movd %eax, %xmm2
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
cvtdq2ps %xmm1, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, (%rsp)
movl %ebp, %edi
pushq $0xc
popq %r12
movl %r12d, %esi
callq 0x6e93
movl %eax, %ebx
movl %ebp, %edi
movl %r13d, %esi
callq 0x6e93
movl %eax, %r14d
movl %ebp, %edi
movl %r12d, %esi
callq 0x6e93
movl %eax, %r12d
movl %ebp, %edi
movl %r13d, %esi
movq 0x50(%rsp), %r13
callq 0x6e93
movd %r14d, %xmm0
movl 0x30(%rsp), %r14d
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movd %ebx, %xmm1
movd %r12d, %xmm2
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
paddd %xmm0, %xmm1
paddd %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm0
movaps 0x20(%rsp), %xmm1
subps %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
leal 0x2(%r15), %esi
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x9098d(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0x7476
testq %r13, %r13
je 0x9b24
pushq $0x6
popq %rdi
pushq $0xe
popq %rsi
callq 0x6e93
xorl %ebp, %ebp
cmpl $0x2, %eax
setne %bpl
addl %ebp, %ebp
addl $0x2, %r15d
pushq $0x1
popq %rdi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90939(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r13, %rdi
movaps 0x10(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0x8d31
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq