// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
cmpb $0x0, 0xa03f5(%rip)     # 0xa7255
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, (%rsp)
jne 0x6e79
callq 0x6a18
movaps (%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
movl 0xa09e1(%rip), %eax     # 0xa7860
leal 0x16(,%rax,2), %eax
cvtsi2ss %eax, %xmm2
movaps %xmm1, %xmm4
shufps $0x55, %xmm1, %xmm4     # xmm4 = xmm4[1,1],xmm1[1,1]
movaps %xmm2, %xmm3
addss %xmm2, %xmm3
ucomiss %xmm4, %xmm3
ja 0x6ea2
movaps %xmm1, %xmm3
jmp 0x6ea9
movlhps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm3     # xmm3 = xmm3[2,0],xmm1[2,3]
movaps %xmm2, %xmm5
movlhps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm5     # xmm5 = xmm5[2,0],xmm1[2,3]
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, 0x10(%rsp)
addss %xmm2, %xmm4
addss 0x6113d(%rip), %xmm4    # 0x68008
movlhps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm4     # xmm4 = xmm4[2,0],xmm0[2,3]
movaps %xmm4, 0x60(%rsp)
movaps %xmm3, %xmm4
shufps $0x55, %xmm3, %xmm4     # xmm4 = xmm4[1,1],xmm3[1,1]
subss %xmm2, %xmm4
movlhps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm4     # xmm4 = xmm4[2,0],xmm3[2,3]
movaps %xmm4, 0x50(%rsp)
cmpb $0x0, 0xa0360(%rip)     # 0xa7255
jne 0x6f19
movaps %xmm2, 0x30(%rsp)
movaps %xmm5, 0x20(%rsp)
callq 0x6a18
movaps 0x20(%rsp), %xmm5
movaps (%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
movaps 0x30(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtsi2ssl 0xa093c(%rip), %xmm3 # 0xa7860
movss %xmm3, 0x20(%rsp)
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movaps %xmm3, (%rsp)
mulss 0x610d3(%rip), %xmm2    # 0x68010
movaps %xmm2, 0x30(%rsp)
movaps %xmm5, %xmm1
movq %rbx, %rdi
callq 0x7052
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
callq 0x71a0
cmpb $0x0, 0xa02f2(%rip)     # 0xa7255
jne 0x6f6a
callq 0x6a18
movaps (%rsp), %xmm0
subss 0x20(%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
addss 0x30(%rsp), %xmm1
movl 0xa03fb(%rip), %ebp     # 0xa7380
cmpb $0x0, 0xa02c9(%rip)     # 0xa7255
jne 0x6fa5
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
callq 0x6a18
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
addss 0x6105f(%rip), %xmm0    # 0x6800c
addss 0x6105f(%rip), %xmm1    # 0x68014
movl 0xa03cc(%rip), %r14d    # 0xa7388
cmpb $0x0, 0xa0292(%rip)     # 0xa7255
jne 0x6fdc
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
callq 0x6a18
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movl $0x1, 0xa0397(%rip)     # 0xa7380
cmpb $0x0, 0xa0265(%rip)     # 0xa7255
jne 0x6fff
movaps %xmm0, (%rsp)
callq 0x6a18
movaps (%rsp), %xmm0
movl $0x1, 0xa037f(%rip)     # 0xa7388
movaps 0x610d0(%rip), %xmm1    # 0x680e0
leaq 0x6cbe4(%rip), %rdi     # 0x73bfb
callq 0x724a
movl %eax, %ebx
cmpb $0x0, 0xa0230(%rip)     # 0xa7255
jne 0x702c
callq 0x6a18
movl %ebp, 0xa034e(%rip)     # 0xa7380
cmpb $0x0, 0xa021c(%rip)     # 0xa7255
jne 0x7040
callq 0x6a18
movl %r14d, 0xa0341(%rip)    # 0xa7388
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq