// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
movl %eax, %edx
leaq -0x30(%rbp), %rsi
callq 0xaac0
movl -0xa4(%rbp), %edi
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x50(%rbp)
movss -0x10(%rbp), %xmm0
movss 0x7a8d1(%rip), %xmm1    # 0x8c01c
movss %xmm1, -0x94(%rbp)
addss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x4(%rbp), %xmm2
addss %xmm2, %xmm0
movss 0x7a8de(%rip), %xmm2    # 0x8c050
movss %xmm2, -0x98(%rbp)
subss %xmm2, %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x8(%rbp), %xmm0
movl -0x30(%rbp), %eax
movl %eax, %ecx
leal (%rcx,%rcx,4), %edx
movl %edx, %ecx
leal 0xa(%rcx,%rcx), %ecx
cvtsi2ss %ecx, %xmm1
subss %xmm1, %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movl $0x41c00000, -0x44(%rbp) # imm = 0x41C00000
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x10, %esi
callq 0x6f90
movq -0xa0(%rbp), %rdi
cvtsi2ss %eax, %xmm0
movups 0xb892b(%rip), %xmm1    # 0xca108
movq %rsp, %rax
movups %xmm1, 0x20(%rax)
movups 0xb890d(%rip), %xmm1    # 0xca0f8
movups %xmm1, 0x10(%rax)
movups 0xb88f2(%rip), %xmm1    # 0xca0e8
movups %xmm1, (%rax)
movss 0x7a803(%rip), %xmm1    # 0x8c004
callq 0x66400
movss -0x98(%rbp), %xmm5
movss -0x94(%rbp), %xmm4
movaps %xmm0, %xmm1
movaps -0x90(%rbp), %xmm0
movlpd %xmm1, -0x58(%rbp)
movaps %xmm0, -0x70(%rbp)
movss -0x10(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
movss 0x7a7d9(%rip), %xmm3    # 0x8c014
mulss %xmm3, %xmm1
addss %xmm1, %xmm0
movss -0x58(%rbp), %xmm1
movss 0x7a7d0(%rip), %xmm2    # 0x8c020
mulss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x4(%rbp), %xmm1
movss 0x7a7e5(%rip), %xmm6    # 0x8c054
addss %xmm6, %xmm0
subss %xmm6, %xmm1
subss %xmm5, %xmm1
subss %xmm4, %xmm1
mulss %xmm3, %xmm1
addss %xmm1, %xmm0
movss -0x54(%rbp), %xmm1
mulss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x58(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x54(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movq -0x18(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
callq 0x6fd0
testb $0x1, %al
jne 0x118c6
jmp 0x118cd
movl $0x0, -0x2c(%rbp)
movl $0x1, %edi
movl %edi, -0xa8(%rbp)
movl $0xe, %esi
movl %esi, -0xac(%rbp)
callq 0x6f90
movl -0xac(%rbp), %esi
movl -0xa8(%rbp), %edx
movl %eax, -0x74(%rbp)
movl %edx, %edi
callq 0x6ee0
movq -0x20(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
callq 0x7ba0
movl -0x74(%rbp), %edx
movl $0x1, %edi
movl $0xe, %esi
callq 0x6ee0
movl $0x2, %edi
movl $0xe, %esi
callq 0x6f90
movl %eax, -0x74(%rbp)
movl $0x2, %edi
movl $0xe, %esi
movl $0x1, %edx
callq 0x6ee0
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x119a4
movq -0x38(%rbp), %rax
movslq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsd -0x50(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
callq 0x73e0
testb $0x1, %al
jne 0x11979
jmp 0x11982
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movss 0x7a692(%rip), %xmm0    # 0x8c01c
addss -0x48(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x11950
movl -0x74(%rbp), %edx
movl $0x2, %edi
movl $0xe, %esi
callq 0x6ee0
movl -0x2c(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)