// File: /workspace/github_c_makefile_star2_O1/arkanis[P]process-map/./deps/raygui.h
// Function: GuiMessageBox
int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons)
{
    #define MESSAGEBOX_BUTTON_HEIGHT    24
    #define MESSAGEBOX_BUTTON_PADDING   10

    int clicked = -1;    // Returns clicked button from buttons list, 0 refers to closed window button

    int buttonsCount = 0;
    const char **buttonsText = GuiTextSplit(buttons, &buttonsCount, NULL);
    Rectangle buttonBounds = { 0 };
    buttonBounds.x = bounds.x + MESSAGEBOX_BUTTON_PADDING;
    buttonBounds.y = bounds.y + bounds.height - MESSAGEBOX_BUTTON_HEIGHT - MESSAGEBOX_BUTTON_PADDING;
    buttonBounds.width = (bounds.width - MESSAGEBOX_BUTTON_PADDING*(buttonsCount + 1))/buttonsCount;
    buttonBounds.height = MESSAGEBOX_BUTTON_HEIGHT;

    Vector2 textSize = MeasureTextEx(guiFont, message, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), 1);

    Rectangle textBounds = { 0 };
    textBounds.x = bounds.x + bounds.width/2 - textSize.x/2;
    textBounds.y = bounds.y + WINDOW_STATUSBAR_HEIGHT + (bounds.height - WINDOW_STATUSBAR_HEIGHT - MESSAGEBOX_BUTTON_HEIGHT - MESSAGEBOX_BUTTON_PADDING)/2 - textSize.y/2;
    textBounds.width = textSize.x;
    textBounds.height = textSize.y;

    // Draw control
    //--------------------------------------------------------------------
    if (GuiWindowBox(bounds, title)) clicked = 0;

    int prevTextAlignment = GuiGetStyle(LABEL, TEXT_ALIGNMENT);
    GuiSetStyle(LABEL, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
    GuiLabel(textBounds, message);
    GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);

    prevTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);

    for (int i = 0; i < buttonsCount; i++)
    {
        if (GuiButton(buttonBounds, buttonsText[i])) clicked = i + 1;
        buttonBounds.x += (buttonBounds.width + MESSAGEBOX_BUTTON_PADDING);
    }

    GuiSetStyle(BUTTON, TEXT_ALIGNMENT, prevTextAlignment);
    //--------------------------------------------------------------------

    return clicked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movaps %xmm0, 0x50(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x80(%rsp)
movaps %xmm1, 0x40(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x70(%rsp)
leaq 0x6c(%rsp), %r15
movl $0x0, (%r15)
movq %rdx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xa184
movl (%r15), %r15d
cmpb $0x0, 0x976c9(%rip)     # 0xa7255
jne 0xfb93
callq 0x6a18
xorps %xmm0, %xmm0
cvtsi2ssl 0x97732(%rip), %xmm0 # 0xa72d0
movups 0x976d3(%rip), %xmm1    # 0xa7278
movups %xmm1, 0x20(%rsp)
movups 0x976b7(%rip), %xmm1    # 0xa7268
movups %xmm1, 0x10(%rsp)
movups 0x9769b(%rip), %xmm1    # 0xa7258
movups %xmm1, (%rsp)
movss 0x5843b(%rip), %xmm1    # 0x68004
movq %rbx, %rdi
callq 0x51b09
movaps %xmm0, %xmm2
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x5842d(%rip), %xmm3    # 0x68010
movaps 0x40(%rsp), %xmm1
movaps %xmm1, %xmm5
mulss %xmm3, %xmm5
movaps 0x50(%rsp), %xmm0
addss %xmm0, %xmm5
movaps %xmm2, 0xa0(%rsp)
mulss %xmm3, %xmm2
subss %xmm2, %xmm5
movaps %xmm5, 0x30(%rsp)
movss 0x5844b(%rip), %xmm2    # 0x68060
addss 0x80(%rsp), %xmm2
movss 0x5843e(%rip), %xmm5    # 0x68064
addss 0x70(%rsp), %xmm5
addss 0x58428(%rip), %xmm5    # 0x6805c
addss 0x583e4(%rip), %xmm5    # 0x68020
mulss %xmm3, %xmm5
addss %xmm2, %xmm5
mulss %xmm3, %xmm4
subss %xmm4, %xmm5
movaps %xmm5, 0x90(%rsp)
movq %r14, %rdi
callq 0x6e4e
movl %eax, %ebp
cmpb $0x0, 0x975f0(%rip)     # 0xa7255
jne 0xfc6c
callq 0x6a18
movaps 0x30(%rsp), %xmm0
unpcklps 0x90(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movl 0x976a8(%rip), %r14d    # 0xa7328
cmpb $0x0, 0x975ce(%rip)     # 0xa7255
jne 0xfc98
movaps %xmm0, 0x30(%rsp)
callq 0x6a18
movaps 0x30(%rsp), %xmm0
movl $0x1, 0x97686(%rip)     # 0xa7328
movaps 0xa0(%rsp), %xmm1
movq %rbx, %rdi
callq 0x78a6
cmpb $0x0, 0x9759c(%rip)     # 0xa7255
jne 0xfcc0
callq 0x6a18
movl %r14d, 0x97661(%rip)    # 0xa7328
cmpb $0x0, 0x97587(%rip)     # 0xa7255
jne 0xfcd5
callq 0x6a18
movzbl %bpl, %ebx
movl 0x976a9(%rip), %ebp     # 0xa7388
cmpb $0x0, 0x9756f(%rip)     # 0xa7255
jne 0xfced
callq 0x6a18
decl %ebx
movl $0x1, 0x9768f(%rip)     # 0xa7388
testl %r15d, %r15d
jle 0xfdbb
leal (%r15,%r15,4), %eax
leal 0xa(,%rax,2), %eax
movaps 0x80(%rsp), %xmm3
addss 0x70(%rsp), %xmm3
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movaps 0x40(%rsp), %xmm1
subss %xmm0, %xmm1
xorps %xmm2, %xmm2
cvtsi2ss %r15d, %xmm2
addss 0x58321(%rip), %xmm3    # 0x6805c
movaps 0x50(%rsp), %xmm0
addss 0x582d0(%rip), %xmm0    # 0x68018
addss 0x582d0(%rip), %xmm3    # 0x68020
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
divss %xmm2, %xmm1
movaps 0x583b2(%rip), %xmm2    # 0x68110
movss %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1,2,3]
movaps %xmm2, 0x30(%rsp)
addss 0x582a9(%rip), %xmm1    # 0x68018
shlq $0x3, %r15
movl $0x1, %r14d
xorl %r12d, %r12d
leaq 0x97b1d(%rip), %r13     # 0xa78a0
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq (%r12,%r13), %rdi
movaps 0x30(%rsp), %xmm1
callq 0x724a
movaps 0x50(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
testb %al, %al
cmovnel %r14d, %ebx
addss %xmm1, %xmm0
addq $0x8, %r12
incl %r14d
cmpq %r12, %r15
jne 0xfd88
cmpb $0x0, 0x97493(%rip)     # 0xa7255
jne 0xfdc9
callq 0x6a18
movl %ebp, 0x975b9(%rip)     # 0xa7388
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq