// File: /workspace/github_c_makefile_star2_O1/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 $0xa8, %rsp
movl %esi, %ebx
movq %rdi, %r14
movaps %xmm0, 0x60(%rsp)
movl 0x9cff3(%rip), %r15d    # 0xa7250
movaps %xmm0, 0x50(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0x70(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x80(%rsp)
testq %rdi, %rdi
je 0xa3db
movq %r14, %rdi
callq 0x7821
movl %eax, %ebp
cmpb $0x0, 0x9cfbc(%rip)     # 0xa7255
jne 0xa2a0
callq 0x6a18
cvtsi2ss %ebp, %xmm3
xorps %xmm1, %xmm1
cvtsi2ssl 0x9d021(%rip), %xmm1 # 0xa72d0
movaps 0x60(%rsp), %xmm4
addss 0x70(%rsp), %xmm4
cmpb $0x0, 0x9cf94(%rip)     # 0xa7255
movaps %xmm3, 0x30(%rsp)
movaps %xmm1, 0x10(%rsp)
jne 0xa2e4
movaps %xmm4, (%rsp)
callq 0x6a18
movaps (%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ssl 0x9d215(%rip), %xmm0 # 0xa7504
addss %xmm0, %xmm4
movss 0x5dd15(%rip), %xmm2    # 0x68010
mulss 0x80(%rsp), %xmm2
addss 0x90(%rsp), %xmm2
cmpb $0x0, 0x9cf41(%rip)     # 0xa7255
movaps %xmm4, (%rsp)
jne 0xa337
movaps %xmm2, 0x20(%rsp)
callq 0x6a18
movaps (%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x20(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
movlhps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
movl 0x9cf90(%rip), %eax     # 0xa72d0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
subss %xmm0, %xmm2
movlhps %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
cmpb $0x0, 0x9cef7(%rip)     # 0xa7255
jne 0xa382
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, 0x20(%rsp)
callq 0x6a18
movaps (%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x20(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
shufps $0xe2, %xmm3, %xmm1     # xmm1 = xmm1[2,0],xmm3[2,3]
shufps $0xe2, %xmm4, %xmm2     # xmm2 = xmm2[2,0],xmm4[2,3]
cmpl $0x0, 0x9d177(%rip)     # 0xa7508
jne 0xa3e1
movaps 0x60(%rsp), %xmm4
subss %xmm3, %xmm4
cmpb $0x0, 0x9ceb2(%rip)     # 0xa7255
jne 0xa3c6
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, 0x20(%rsp)
movaps %xmm4, (%rsp)
callq 0x6a18
movaps (%rsp), %xmm4
movaps 0x20(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ssl 0x9d133(%rip), %xmm0 # 0xa7504
subss %xmm0, %xmm4
movss %xmm4, %xmm2            # xmm2 = xmm4[0],xmm2[1,2,3]
jmp 0xa3e1
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
cmpl $0x3, %r15d
movaps %xmm1, 0x10(%rsp)
movaps %xmm2, 0x20(%rsp)
jne 0xa3fc
movl $0x3, %r15d
jmp 0xa4a7
cmpb $0x0, 0x9ce51(%rip)     # 0xa7254
jne 0xa4a7
callq 0x2867d
movaps %xmm0, (%rsp)
cmpb $0x0, 0x9ce3c(%rip)     # 0xa7255
jne 0xa420
callq 0x6a18
cmpl $0x0, 0x9d0e1(%rip)     # 0xa7508
movaps 0x20(%rsp), %xmm0
je 0xa433
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
movaps 0x10(%rsp), %xmm3
addss 0x70(%rsp), %xmm3
cmpb $0x0, 0x9ce07(%rip)     # 0xa7255
jne 0xa469
movaps %xmm1, 0x50(%rsp)
movaps %xmm3, 0x30(%rsp)
callq 0x6a18
movaps 0x30(%rsp), %xmm3
movaps 0x50(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ssl 0x9d090(%rip), %xmm0 # 0xa7504
addss %xmm0, %xmm3
movaps 0x70(%rsp), %xmm2
movss %xmm3, %xmm2            # xmm2 = xmm3[0],xmm2[1,2,3]
movaps (%rsp), %xmm0
callq 0x34d6b
testb %al, %al
je 0xa4a7
xorl %edi, %edi
callq 0x286ba
movzbl %al, %r15d
incl %r15d
xorl %edi, %edi
callq 0x2e875
xorb %bl, %al
movl %eax, %ebx
cmpb $0x0, 0x9cda7(%rip)     # 0xa7255
jne 0xa4b5
callq 0x6a18
movl 0x9d045(%rip), %ebp     # 0xa7500
leal (%r15,%r15,2), %r15d
cmpb $0x0, 0x9cd8f(%rip)     # 0xa7255
jne 0xa4cd
callq 0x6a18
movslq %r15d, %rax
leaq 0x9cdb9(%rip), %r12     # 0xa7290
movl 0x240(%r12,%rax,4), %edi
callq 0x44152
movss 0x9bf44(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps 0x60(%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
movl %ebp, %edi
movl %eax, %esi
xorl %edx, %edx
callq 0x7546
testb %bl, %bl
je 0xa679
cmpb $0x0, 0x9cd3e(%rip)     # 0xa7255
jne 0xa51e
callq 0x6a18
xorps %xmm0, %xmm0
cvtsi2ssl 0x9cfd7(%rip), %xmm0 # 0xa7500
movss %xmm0, (%rsp)
cmpb $0x0, 0x9cd20(%rip)     # 0xa7255
jne 0xa53c
callq 0x6a18
xorps %xmm0, %xmm0
cvtsi2ssl 0x9cfc9(%rip), %xmm0 # 0xa7510
movss %xmm0, 0x30(%rsp)
cmpb $0x0, 0x9cd01(%rip)     # 0xa7255
jne 0xa55b
callq 0x6a18
xorps %xmm0, %xmm0
cvtsi2ssl 0x9cf9a(%rip), %xmm0 # 0xa7500
movss %xmm0, 0x50(%rsp)
cmpb $0x0, 0x9cce2(%rip)     # 0xa7255
jne 0xa57a
callq 0x6a18
xorps %xmm0, %xmm0
cvtsi2ssl 0x9cf8b(%rip), %xmm0 # 0xa7510
movss %xmm0, 0x4c(%rsp)
cmpb $0x0, 0x9ccc3(%rip)     # 0xa7255
jne 0xa599
callq 0x6a18
movl 0x9cf61(%rip), %ebp     # 0xa7500
cmpb $0x0, 0x9ccaf(%rip)     # 0xa7255
jne 0xa5ad
callq 0x6a18
addl 0x9cf5d(%rip), %ebp     # 0xa7510
cmpb $0x0, 0x9cc9b(%rip)     # 0xa7255
jne 0xa5c1
callq 0x6a18
movl 0x9cf38(%rip), %r13d    # 0xa7500
cmpb $0x0, 0x9cc86(%rip)     # 0xa7255
jne 0xa5d6
callq 0x6a18
addl 0x9cf33(%rip), %r13d    # 0xa7510
cmpb $0x0, 0x9cc71(%rip)     # 0xa7255
jne 0xa5eb
callq 0x6a18
leal 0x92(%r15), %eax
cltq
movl (%r12,%rax,4), %edi
callq 0x44152
movss 0x9be2b(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
cmpl $0x1000000, %eax        # imm = 0x1000000
jb 0xa679
addl %ebp, %ebp
addl %r13d, %r13d
movss (%rsp), %xmm4
addss 0x60(%rsp), %xmm4
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
addss 0x30(%rsp), %xmm4
xorps %xmm1, %xmm1
cvtsi2ss %r13d, %xmm1
movaps 0x90(%rsp), %xmm3
addss 0x50(%rsp), %xmm3
addss 0x4c(%rsp), %xmm3
movaps 0x70(%rsp), %xmm2
subss %xmm0, %xmm2
movaps 0x80(%rsp), %xmm0
subss %xmm1, %xmm0
cvttss2si %xmm4, %edi
cvttss2si %xmm3, %esi
cvttss2si %xmm2, %edx
cvttss2si %xmm0, %ecx
movl %eax, %r8d
callq 0x31115
testq %r14, %r14
je 0xa6de
cmpb $0x0, 0x9cbd0(%rip)     # 0xa7255
jne 0xa68c
callq 0x6a18
xorl %ebp, %ebp
cmpl $0x2, 0x9ce73(%rip)     # 0xa7508
setne %bpl
addl %ebp, %ebp
cmpb $0x0, 0x9cbb3(%rip)     # 0xa7255
jne 0xa6a9
callq 0x6a18
addl $0x1a, %r15d
movslq %r15d, %rax
movl (%r12,%rax,4), %edi
callq 0x44152
movss 0x9bd6f(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %r14, %rdi
movaps 0x20(%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0x95ee
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq