// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movl $0xf, %edi
movl $0xc, %esi
callq 0x6f90
shll %eax
addl $0x16, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl -0x20(%rbp), %edx
movl %edx, -0x20(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
cvtsi2ssl -0x20(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x4(%rbp), %xmm1
cvtsi2ssl -0x20(%rbp), %xmm0
movss 0x84fbc(%rip), %xmm2    # 0x8c008
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x706b
cvtsi2ssl -0x20(%rbp), %xmm0
movss 0x84fa6(%rip), %xmm1    # 0x8c008
mulss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0xc(%rbp), %xmm0
cvtsi2ssl -0x20(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x84f81(%rip), %xmm1    # 0x8c00c
addss %xmm1, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x4(%rbp), %xmm0
cvtsi2ssl -0x20(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
movl $0xf, %edi
movl $0xc, %esi
movl %esi, -0x68(%rbp)
callq 0x6f90
movss -0x6c(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss 0x84f25(%rip), %xmm1    # 0x8c010
addss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x2c(%rbp), %xmm0
cvtsi2ssl -0x20(%rbp), %xmm1
movss 0x84f0e(%rip), %xmm2    # 0x8c014
mulss %xmm2, %xmm1
addss %xmm1, %xmm0
movss 0x84f02(%rip), %xmm1    # 0x8c018
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movl $0x41900000, -0x48(%rbp) # imm = 0x41900000
movl $0x41900000, -0x44(%rbp) # imm = 0x41900000
movq -0x18(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x71e0
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x7330
movl -0x68(%rbp), %esi
movl $0x2, %edi
movl %edi, -0x64(%rbp)
callq 0x6f90
movl -0x64(%rbp), %edi
movl %eax, -0x54(%rbp)
movl $0xe, %esi
movl %esi, -0x60(%rbp)
callq 0x6f90
movl -0x68(%rbp), %esi
movl -0x64(%rbp), %edi
movl %eax, -0x58(%rbp)
movl $0x1, %edx
movl %edx, -0x5c(%rbp)
callq 0x6ee0
movl -0x64(%rbp), %edi
movl -0x60(%rbp), %esi
movl -0x5c(%rbp), %edx
callq 0x6ee0
movsd -0x50(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
leaq 0x8fbc8(%rip), %rdi     # 0x96d6f
callq 0x73e0
andb $0x1, %al
movb %al, -0x19(%rbp)
movl -0x54(%rbp), %edx
movl $0x2, %edi
movl $0xc, %esi
callq 0x6ee0
movl -0x58(%rbp), %edx
movl $0x2, %edi
movl $0xe, %esi
callq 0x6ee0
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq