// File: /workspace/github_c_makefile_star2_O3/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
movb $0x1, %al
cmpb $0x0, 0x9ca6c(%rip)     # 0xa4255
movaps %xmm0, 0x10(%rsp)
jne 0x7808
movaps %xmm1, (%rsp)
callq 0x6a3c
movaps (%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
movb 0x9ca4d(%rip), %al      # 0xa4255
movl 0x9d052(%rip), %ecx     # 0xa4860
leal 0x16(,%rcx,2), %edx
cvtsi2ss %edx, %xmm3
movaps %xmm1, %xmm4
shufps $0x55, %xmm1, %xmm4     # xmm4 = xmm4[1,1],xmm1[1,1]
movaps %xmm3, %xmm2
addss %xmm3, %xmm2
ucomiss %xmm4, %xmm2
ja 0x7831
movaps %xmm1, %xmm2
jmp 0x7838
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[2,3]
movaps %xmm3, %xmm5
movlhps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm5     # xmm5 = xmm5[2,0],xmm1[2,3]
movaps %xmm0, %xmm6
shufps $0x55, %xmm0, %xmm6     # xmm6 = xmm6[1,1],xmm0[1,1]
movaps %xmm6, %xmm4
addss %xmm3, %xmm4
addss 0x5d7b0(%rip), %xmm4    # 0x65008
movlhps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm4     # xmm4 = xmm4[2,0],xmm0[2,3]
movaps %xmm4, 0x60(%rsp)
movaps %xmm2, %xmm4
shufps $0x55, %xmm2, %xmm4     # xmm4 = xmm4[1,1],xmm2[1,1]
subss %xmm3, %xmm4
movlhps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm4     # xmm4 = xmm4[2,0],xmm2[2,3]
movaps %xmm4, 0x50(%rsp)
movaps %xmm0, %xmm4
addss %xmm1, %xmm4
testb $0x1, %al
jne 0x78bc
movaps %xmm4, (%rsp)
movaps %xmm3, 0x40(%rsp)
movaps %xmm5, 0x30(%rsp)
movaps %xmm6, 0x20(%rsp)
callq 0x6a3c
movaps 0x20(%rsp), %xmm6
movaps 0x30(%rsp), %xmm5
movaps 0x40(%rsp), %xmm3
movaps 0x10(%rsp), %xmm0
movaps (%rsp), %xmm4
movl 0x9cfa4(%rip), %ecx     # 0xa4860
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
subss %xmm2, %xmm4
mulss 0x5d73d(%rip), %xmm3    # 0x6500c
addss %xmm6, %xmm3
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
addps 0x5d843(%rip), %xmm4    # 0x65120
movaps %xmm4, (%rsp)
movaps %xmm5, %xmm1
movq %rbx, %rdi
callq 0x79cb
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
callq 0x7b3f
cmpb $0x1, 0x9c953(%rip)     # 0xa4255
jne 0x790c
movl 0x9ca76(%rip), %ebp     # 0xa4380
jmp 0x7920
callq 0x6a3c
movl 0x9ca69(%rip), %ebp     # 0xa4380
cmpb $0x1, 0x9c937(%rip)     # 0xa4255
jne 0x7990
movl 0x9ca61(%rip), %r14d    # 0xa4388
movl $0x1, 0x9ca4f(%rip)     # 0xa4380
movl $0x1, 0x9ca4d(%rip)     # 0xa4388
movaps 0x5d7ee(%rip), %xmm1    # 0x65130
leaq 0x696ce(%rip), %rdi     # 0x71017
movaps (%rsp), %xmm0
callq 0x7be9
movl %eax, %ebx
cmpb $0x1, 0x9c8fa(%rip)     # 0xa4255
jne 0x7965
movl %ebp, 0x9ca1d(%rip)     # 0xa4380
jmp 0x797e
callq 0x6a3c
movl %ebp, 0x9ca10(%rip)     # 0xa4380
cmpb $0x0, 0x9c8de(%rip)     # 0xa4255
jne 0x797e
callq 0x6a3c
movl %r14d, 0x9ca03(%rip)    # 0xa4388
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x6a3c
movl 0x9c9ec(%rip), %r14d    # 0xa4388
cmpb $0x1, 0x9c8b2(%rip)     # 0xa4255
je 0x7927
callq 0x6a3c
movl $0x1, 0x9c9cc(%rip)     # 0xa4380
cmpb $0x0, 0x9c89a(%rip)     # 0xa4255
jne 0x7931
callq 0x6a3c
jmp 0x7931