// File: /workspace/github_c_makefile_star2_O0/arkanis[P]process-map/./deps/raygui.h
// Function: GuiGrid
Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
{
    #if !defined(GRID_COLOR_ALPHA)
        #define GRID_COLOR_ALPHA    0.15f           // Grid lines alpha amount
    #endif

    GuiControlState state = guiState;
    Vector2 mousePoint = GetMousePosition();
    Vector2 currentCell = { -1, -1 };

    int linesV = ((int)(bounds.width/spacing))*subdivs + 1;
    int linesH = ((int)(bounds.height/spacing))*subdivs + 1;

    // Update control
    //--------------------------------------------------------------------
    if ((state != GUI_STATE_DISABLED) && !guiLocked)
    {
        if (CheckCollisionPointRec(mousePoint, bounds))
        {
            currentCell.x = (mousePoint.x - bounds.x) / spacing;
            currentCell.y = (mousePoint.y - bounds.y) / spacing;
        }
    }
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    switch (state)
    {
        case GUI_STATE_NORMAL:
        {
            if (subdivs > 0)
            {
                // Draw vertical grid lines
                for (int i = 0; i < linesV; i++)
                {
                    Rectangle lineV = { bounds.x + spacing * i / subdivs, bounds.y, 1, bounds.height };
                    GuiDrawRectangle(lineV, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA * 4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA));
                }

                // Draw horizontal grid lines
                for (int i = 0; i < linesH; i++)
                {
                    Rectangle lineH = { bounds.x, bounds.y + spacing * i / subdivs, bounds.width, 1 };
                    GuiDrawRectangle(lineH, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA * 4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA));
                }
            }
        } break;
        default: break;
    }

    return currentCell;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movlpd %xmm0, -0x18(%rbp)
movlpd %xmm1, -0x10(%rbp)
movss %xmm2, -0x1c(%rbp)
movl %edi, -0x20(%rbp)
movl 0xb82dd(%rip), %eax     # 0xca0e0
movl %eax, -0x24(%rbp)
callq 0x2dd60
movlpd %xmm0, -0x2c(%rbp)
movq 0x7a321(%rip), %rax     # 0x8c138
movq %rax, -0x8(%rbp)
movss -0x10(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
cvttss2si %xmm0, %eax
imull -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movss -0xc(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
cvttss2si %xmm0, %eax
imull -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x3, -0x24(%rbp)
je 0x11e9e
testb $0x1, 0xb828c(%rip)     # 0xca0e4
jne 0x11e9e
movsd -0x2c(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0x11e74
jmp 0x11e9c
movss -0x2c(%rbp), %xmm0
subss -0x18(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x28(%rbp), %xmm0
subss -0x14(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x11e9e
movl -0x24(%rbp), %eax
testl %eax, %eax
jne 0x12095
jmp 0x11eab
cmpl $0x0, -0x20(%rbp)
jle 0x12093
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x11fa3
movss -0x18(%rbp), %xmm0
movss -0x1c(%rbp), %xmm1
cvtsi2ssl -0x38(%rbp), %xmm2
mulss %xmm2, %xmm1
cvtsi2ssl -0x20(%rbp), %xmm2
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss 0x7a105(%rip), %xmm0    # 0x8c004
movss %xmm0, -0x40(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movb $0x0, -0x4c(%rbp)
movb $0x0, -0x4b(%rbp)
movb $0x0, -0x4a(%rbp)
movb $0x0, -0x49(%rbp)
movl -0x38(%rbp), %eax
cltd
idivl -0x20(%rbp)
cmpl $0x0, %edx
jne 0x11f55
xorl %edi, %edi
movl $0x12, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
movss 0x7a0ed(%rip), %xmm0    # 0x8c038
callq 0x51fa0
movl %eax, -0x50(%rbp)
jmp 0x11f7e
xorl %edi, %edi
movl $0x12, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %edi
movss 0x7a0e6(%rip), %xmm0    # 0x8c05c
callq 0x51fa0
movl %eax, -0x50(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movl -0x4c(%rbp), %esi
movl -0x50(%rbp), %edx
xorl %edi, %edi
callq 0x77c0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11ebc
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x12091
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x14(%rbp), %xmm0
movss -0x1c(%rbp), %xmm1
cvtsi2ssl -0x5c(%rbp), %xmm2
mulss %xmm2, %xmm1
cvtsi2ssl -0x20(%rbp), %xmm2
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movss 0x7a00d(%rip), %xmm0    # 0x8c004
movss %xmm0, -0x60(%rbp)
movb $0x0, -0x70(%rbp)
movb $0x0, -0x6f(%rbp)
movb $0x0, -0x6e(%rbp)
movb $0x0, -0x6d(%rbp)
movl -0x5c(%rbp), %eax
cltd
idivl -0x20(%rbp)
cmpl $0x0, %edx
jne 0x12043
xorl %edi, %edi
movl $0x12, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %edi
movss 0x79fff(%rip), %xmm0    # 0x8c038
callq 0x51fa0
movl %eax, -0x74(%rbp)
jmp 0x1206c
xorl %edi, %edi
movl $0x12, %esi
callq 0x6f90
movl %eax, %edi
callq 0x526e0
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %edi
movss 0x79ff8(%rip), %xmm0    # 0x8c05c
callq 0x51fa0
movl %eax, -0x74(%rbp)
movsd -0x6c(%rbp), %xmm0
movsd -0x64(%rbp), %xmm1
movl -0x70(%rbp), %esi
movl -0x74(%rbp), %edx
xorl %edi, %edi
callq 0x77c0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x11faa
jmp 0x12093
jmp 0x12097
jmp 0x12097
movsd -0x8(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)