// File: /workspace/github_c_makefile_star2_O3/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 $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x30(%rsp)
leaq 0x74(%rsp), %r15
movl $0x0, (%r15)
movq %rdx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xb11b
movl (%r15), %r15d
cmpb $0x0, 0x92a8a(%rip)     # 0xa4255
jne 0x117d2
callq 0x6a3c
xorps %xmm0, %xmm0
cvtsi2ssl 0x92af3(%rip), %xmm0 # 0xa42d0
movaps 0x92a9c(%rip), %xmm1    # 0xa4280
movups %xmm1, 0x20(%rsp)
movaps 0x92a80(%rip), %xmm1    # 0xa4270
movups %xmm1, 0x10(%rsp)
movaps 0x92a64(%rip), %xmm1    # 0xa4260
movups %xmm1, (%rsp)
movss 0x537fc(%rip), %xmm1    # 0x65004
movq %r14, %rdi
callq 0x4eae9
movaps %xmm0, %xmm5
movss 0x537f1(%rip), %xmm4    # 0x6500c
movaps 0x40(%rsp), %xmm1
movaps %xmm1, %xmm3
mulps %xmm4, %xmm3
movaps 0x53983(%rip), %xmm2    # 0x651b0
movaps 0x50(%rsp), %xmm0
addps %xmm0, %xmm2
shufps $0x1, %xmm3, %xmm2      # xmm2 = xmm2[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm2     # xmm2 = xmm2[2,0],xmm3[2,3]
movaps 0x30(%rsp), %xmm3
addss 0x5380a(%rip), %xmm3    # 0x65054
addss 0x537fe(%rip), %xmm3    # 0x65050
addss 0x537be(%rip), %xmm3    # 0x65018
mulss %xmm4, %xmm3
movlhps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm3     # xmm3 = xmm3[2,0],xmm0[2,3]
addps %xmm2, %xmm3
movaps %xmm5, 0x30(%rsp)
mulps 0x5394c(%rip), %xmm5    # 0x651c0
addps %xmm3, %xmm5
movaps %xmm5, 0x60(%rsp)
movq %rbx, %rdi
callq 0x77d5
movl %eax, %ebx
cmpb $0x1, 0x929c8(%rip)     # 0xa4255
jne 0x11897
movl 0x92a93(%rip), %ebp     # 0xa4328
jmp 0x118b0
callq 0x6a3c
movl 0x92a86(%rip), %ebp     # 0xa4328
cmpb $0x0, 0x929ac(%rip)     # 0xa4255
jne 0x118b0
callq 0x6a3c
movaps 0x30(%rsp), %xmm1
movaps 0x60(%rsp), %xmm0
movzbl %bl, %ebx
movl $0x1, 0x92a61(%rip)     # 0xa4328
movq %r14, %rdi
callq 0x8278
cmpb $0x1, 0x9297f(%rip)     # 0xa4255
jne 0x118e0
movl %ebp, 0x92a4a(%rip)     # 0xa4328
jmp 0x118f9
callq 0x6a3c
movb 0x9296a(%rip), %al      # 0xa4255
movl %ebp, 0x92a37(%rip)     # 0xa4328
cmpb $0x1, %al
jne 0x119e6
movl 0x92a89(%rip), %ebp     # 0xa4388
movaps 0x40(%rsp), %xmm1
decl %ebx
movl $0x1, 0x92a78(%rip)     # 0xa4388
testl %r15d, %r15d
jle 0x119c1
leal (%r15,%r15,4), %eax
movaps 0x50(%rsp), %xmm2
movaps %xmm2, %xmm0
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
leal 0xa(%rax,%rax), %eax
addss 0x53718(%rip), %xmm0    # 0x65050
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
subss %xmm3, %xmm1
xorps %xmm3, %xmm3
cvtsi2ss %r15d, %xmm3
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
divss %xmm3, %xmm1
addps 0x53833(%rip), %xmm0    # 0x65190
movaps 0x5383c(%rip), %xmm2    # 0x651a0
movss %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1,2,3]
movaps %xmm2, 0x30(%rsp)
addss 0x5369b(%rip), %xmm1    # 0x65010
shlq $0x3, %r15
movl $0x1, %r14d
xorl %r12d, %r12d
leaq 0x92f17(%rip), %r13     # 0xa48a0
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq (%r12,%r13), %rdi
movaps 0x30(%rsp), %xmm1
callq 0x7be9
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 0x1198e
cmpb $0x0, 0x9288d(%rip)     # 0xa4255
jne 0x119cf
callq 0x6a3c
movl %ebp, 0x929b3(%rip)     # 0xa4388
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6a3c
movl 0x92997(%rip), %ebp     # 0xa4388
cmpb $0x0, 0x9285d(%rip)     # 0xa4255
jne 0x118ff
callq 0x6a3c
jmp 0x118ff