// File: /workspace/github_c_makefile_star2_O2/arkanis[P]process-map/./deps/raygui.h
// Function: GuiWindowBox
bool GuiWindowBox(Rectangle bounds, const char *title)
{
    // NOTE: This define is also used by GuiMessageBox() and GuiTextInputBox()
    #define WINDOW_STATUSBAR_HEIGHT        22

    //GuiControlState state = guiState;
    bool clicked = false;

    int statusBarHeight = WINDOW_STATUSBAR_HEIGHT + 2*GuiGetStyle(STATUSBAR, BORDER_WIDTH);
    statusBarHeight += (statusBarHeight%2);

    Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight };
    if (bounds.height < statusBarHeight*2.0f) bounds.height = statusBarHeight*2.0f;

    Rectangle windowPanel = { bounds.x, bounds.y + (float)statusBarHeight - 1, bounds.width, bounds.height - (float)statusBarHeight };
    Rectangle closeButtonRec = { statusBar.x + statusBar.width - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - 20,
                                 statusBar.y + statusBarHeight/2.0f - 18.0f/2.0f, 18, 18 };

    // Update control
    //--------------------------------------------------------------------
    // NOTE: Logic is directly managed by button
    //--------------------------------------------------------------------

    // Draw control
    //--------------------------------------------------------------------
    GuiStatusBar(statusBar, title); // Draw window header as status bar
    GuiPanel(windowPanel);          // Draw window base

    // Draw window close button
    int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
    int tempTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
    GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
#if defined(RAYGUI_SUPPORT_ICONS)
    clicked = GuiButton(closeButtonRec, GuiIconText(RICON_CROSS_SMALL, NULL));
#else
    clicked = GuiButton(closeButtonRec, "x");
#endif
    GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlignment);
    //--------------------------------------------------------------------

    return clicked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
pushq $0xf
popq %rbp
pushq $0xc
popq %rbx
movl %ebp, %edi
movl %ebx, %esi
callq 0x6e93
movaps 0x20(%rsp), %xmm1
leal 0x16(,%rax,2), %eax
cvtsi2ss %eax, %xmm3
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
movaps %xmm3, %xmm2
addss %xmm3, %xmm2
ucomiss %xmm0, %xmm2
ja 0x6f15
movaps %xmm1, %xmm2
jmp 0x6f1c
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[2,3]
movaps %xmm2, 0x50(%rsp)
movaps 0x10(%rsp), %xmm0
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, 0x40(%rsp)
addss %xmm3, %xmm4
addss 0x520ca(%rip), %xmm4    # 0x59008
movaps %xmm4, 0x70(%rsp)
movaps %xmm2, %xmm4
shufps $0x55, %xmm2, %xmm4     # xmm4 = xmm4[1,1],xmm2[1,1]
subss %xmm3, %xmm4
movaps %xmm4, 0x60(%rsp)
addss %xmm1, %xmm0
movaps %xmm0, (%rsp)
movl %ebp, %edi
movl %ebx, %esi
movaps %xmm3, 0x30(%rsp)
callq 0x6e93
cvtsi2ss %eax, %xmm0
movaps (%rsp), %xmm1
subss %xmm0, %xmm1
movss 0x5208f(%rip), %xmm0    # 0x5900c
movaps 0x30(%rsp), %xmm2
mulss %xmm2, %xmm0
addss 0x40(%rsp), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
addps 0x520fa(%rip), %xmm1    # 0x59090
movaps %xmm1, (%rsp)
movaps %xmm2, %xmm1
movaps 0x20(%rsp), %xmm0
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
movaps 0x10(%rsp), %xmm0
movq %r14, %rdi
callq 0x7062
movaps 0x60(%rsp), %xmm1
movaps 0x50(%rsp), %xmm0
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
movaps 0x70(%rsp), %xmm0
movaps 0x10(%rsp), %xmm2
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
callq 0x7165
pushq $0x2
popq %rbp
movl %ebp, %edi
movl %ebx, %esi
callq 0x6e93
movl %eax, %r15d
pushq $0xe
popq %r14
movl %ebp, %edi
movl %r14d, %esi
callq 0x6e93
movl %eax, %r12d
pushq $0x1
popq %r13
movl %ebp, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0x6e0e
movl %ebp, %edi
movl %r14d, %esi
movl %r13d, %edx
callq 0x6e0e
movaps 0x5207f(%rip), %xmm1    # 0x590a0
leaq 0x5ddcf(%rip), %rdi     # 0x64df7
movaps (%rsp), %xmm0
callq 0x71e9
movl %eax, %r13d
movl %ebp, %edi
movl %ebx, %esi
movl %r15d, %edx
callq 0x6e0e
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %edx
callq 0x6e0e
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq