// File: /workspace/github_c_makefile_star2_O1/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 0x9d475(%rip), %r15d    # 0xa7250
cmpl $0x3, %r15d
jne 0x9de9
movl $0x3, %r15d
jmp 0x9e29
cmpb $0x0, 0x9d464(%rip)     # 0xa7254
jne 0x9e29
callq 0x2867d
movaps (%rsp), %xmm1
movaps 0x10(%rsp), %xmm2
callq 0x34d6b
testb %al, %al
je 0x9e29
xorl %edi, %edi
callq 0x286ba
movl $0x2, %r15d
testb %al, %al
jne 0x9e29
xorl %edi, %edi
callq 0x2e875
xorb %al, %bl
xorb $0x1, %al
movzbl %al, %r15d
movb 0x9d426(%rip), %al      # 0xa7255
testl %r15d, %r15d
je 0x9f14
testb $0x1, %al
jne 0x9e41
callq 0x6a18
movl 0x9d599(%rip), %ebp     # 0xa73e0
leal (%r15,%r15,2), %r12d
cmpb $0x0, 0x9d403(%rip)     # 0xa7255
jne 0x9e59
callq 0x6a18
movslq %r12d, %rax
leaq 0x9d42d(%rip), %r13     # 0xa7290
movl 0x120(%r13,%rax,4), %edi
callq 0x44152
movss 0x9c5b8(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r15d
cmpb $0x0, 0x9d3cc(%rip)     # 0xa7255
jne 0x9e90
callq 0x6a18
leal 0x49(%r12), %eax
cltq
movl (%r13,%rax,4), %edi
callq 0x44152
movss 0x9c587(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7546
movl $0x3, %edi
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, (%rsp)
cmpb $0x0, 0x9d36d(%rip)     # 0xa7255
jne 0x9eef
callq 0x6a18
movl 0x9d4f3(%rip), %ebp     # 0xa73e8
cmpb $0x0, 0x9d359(%rip)     # 0xa7255
jne 0x9f03
callq 0x6a18
addl $0x4a, %r12d
movslq %r12d, %rax
movl (%r13,%rax,4), %edi
jmp 0x9ffd
testb $0x1, %al
jne 0x9f1d
callq 0x6a18
movl 0x9d4bd(%rip), %ebp     # 0xa73e0
cmpb $0x0, 0x9d32b(%rip)     # 0xa7255
jne 0x9f31
callq 0x6a18
testb %bl, %bl
movl $0x138, %eax            # imm = 0x138
movl $0x120, %ecx            # imm = 0x120
cmovnel %eax, %ecx
leaq 0x9d349(%rip), %r12     # 0xa7290
movl (%rcx,%r12), %edi
callq 0x44152
movss 0x9c4d8(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movl %eax, %r15d
cmpb $0x0, 0x9d2ec(%rip)     # 0xa7255
jne 0x9f70
callq 0x6a18
testb %bl, %bl
movl $0x13c, %eax            # imm = 0x13C
movl $0x124, %ecx            # imm = 0x124
cmovnel %eax, %ecx
movl (%rcx,%r12), %edi
callq 0x44152
movss 0x9c4a0(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
callq 0x7546
movl $0x3, %edi
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x982d
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, (%rsp)
cmpb $0x0, 0x9d286(%rip)     # 0xa7255
jne 0x9fd6
callq 0x6a18
movl 0x9d40c(%rip), %ebp     # 0xa73e8
cmpb $0x0, 0x9d272(%rip)     # 0xa7255
jne 0x9fea
callq 0x6a18
testb %bl, %bl
movl $0x140, %eax            # imm = 0x140
movl $0x128, %ecx            # imm = 0x128
cmovnel %eax, %ecx
movl (%rcx,%r12), %edi
callq 0x44152
movss 0x9c426(%rip), %xmm0    # 0xa6430
movl %eax, %edi
callq 0x43e1c
movq %r14, %rdi
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm1
movl %ebp, %esi
movl %eax, %edx
callq 0x95ee
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq