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

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

        // Check toggle button state
        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
            else if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON))
            {
                state = GUI_STATE_NORMAL;
                active = !active;
            }
            else state = GUI_STATE_FOCUSED;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    if (state == GUI_STATE_NORMAL)
    {
        GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TOGGLE, (active? BORDER_COLOR_PRESSED : (BORDER + state*3)))), guiAlpha), Fade(GetColor(GuiGetStyle(TOGGLE, (active? BASE_COLOR_PRESSED : (BASE + state*3)))), guiAlpha));
        GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(TOGGLE, (active? TEXT_COLOR_PRESSED : (TEXT + state*3)))), guiAlpha));
    }
    else
    {
        GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), guiAlpha), Fade(GetColor(GuiGetStyle(TOGGLE, BASE + state*3)), guiAlpha));
        GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(TOGGLE, TEXT + state*3)), guiAlpha));
    }
    //--------------------------------------------------------------------

    return active;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl 0x91f03(%rip), %r13d    # 0x9b280
cmpl $0x3, %r13d
jne 0x9389
pushq $0x3
popq %r13
jmp 0x93c5
cmpb $0x0, 0x91ef4(%rip)     # 0x9b284
jne 0x93bc
callq 0x1fd8b
movaps (%rsp), %xmm1
movaps 0x10(%rsp), %xmm2
callq 0x2a643
testb %al, %al
je 0x93bc
xorl %edi, %edi
callq 0x1fdb3
testb %al, %al
je 0x94a1
pushq $0x2
jmp 0x9385
testl %r13d, %r13d
je 0x94b3
pushq $0x3
popq %rbp
pushq $0xc
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %r15d
leal (%r13,%r13,2), %esi
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x91050(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r12d
leal 0x1(%r13,%r13,2), %esi
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x9102b(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movl %r15d, %edi
movl %r12d, %esi
movl %eax, %edx
callq 0x7476
movl %ebp, %edi
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x8f04
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, (%rsp)
pushq $0xe
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %r15d
leal 0x2(%r13,%r13,2), %esi
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90fcd(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r14, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
movl %r15d, %esi
movl %eax, %edx
callq 0x8d31
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x245dd
testb %al, %al
je 0x9595
xorb $0x1, %bl
pushq $0x3
popq %rbp
pushq $0xc
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, 0x24(%rsp)
xorl %eax, %eax
testb %bl, %bl
pushq $0x6
popq %rsi
cmovel %eax, %esi
pushq $0x7
popq %rax
pushq $0x1
popq %r13
cmovnel %eax, %r13d
pushq $0x8
popq %rax
pushq $0x2
popq %r15
cmovnel %eax, %r15d
movl %ebp, %edi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90f46(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movl %eax, %r12d
movl %ebp, %edi
movl %r13d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90f23(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movl 0x24(%rsp), %edi
movl %r12d, %esi
movl %eax, %edx
callq 0x7476
movl %ebp, %edi
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x8f04
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, (%rsp)
pushq $0xe
popq %rsi
movl %ebp, %edi
callq 0x6e93
movl %eax, %r12d
movl %ebp, %edi
movl %r15d, %esi
callq 0x6e93
movl %eax, %edi
callq 0x38400
movss 0x90ec6(%rip), %xmm0    # 0x9a440
movl %eax, %edi
callq 0x380d5
movq %r14, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
movl %r12d, %esi
jmp 0x9489
pushq $0x1
jmp 0x9385