// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::OpenPopup(char const*)
void ImGui::OpenPopup(const char* str_id)
{
    ImGuiState& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    ImGuiID id = window->GetID(str_id);
    int current_stack_size = g.CurrentPopupStack.Size;
    ImGuiPopupRef popup_ref = ImGuiPopupRef(id, window, window->GetID("##menus"), g.IO.MousePos); // Tagged as new ref because constructor sets Window to NULL (we are passing the ParentWindow info here)
    if (g.OpenedPopupStack.Size < current_stack_size + 1)
        g.OpenedPopupStack.push_back(popup_ref);
    else if (g.OpenedPopupStack[current_stack_size].PopupID != id)
    {
        g.OpenedPopupStack.resize(current_stack_size+1);
        g.OpenedPopupStack[current_stack_size] = popup_ref;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rsi
movq 0x42ed1(%rip), %r13     # 0x55480
movq 0x1758(%r13), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa766
movl %eax, %r15d
movslq 0x1808(%r13), %r14
leaq 0x2b6a9(%rip), %rsi     # 0x3dc7a
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa766
movss 0xf0(%r13), %xmm0
movss 0xf4(%r13), %xmm1
movl 0x17f8(%r13), %edx
cmpl %r14d, %edx
jle 0x12650
movq 0x1800(%r13), %r12
leaq (%r14,%r14,4), %rdx
cmpl %r15d, (%r12,%rdx,8)
je 0x127ea
leal 0x1(%r14), %esi
movl 0x17fc(%r13), %ecx
cmpl %r14d, %ecx
jg 0x127c3
testl %ecx, %ecx
movl %eax, -0x34(%rbp)
movss %xmm0, -0x30(%rbp)
movss %xmm1, -0x2c(%rbp)
movq %rdx, -0x40(%rbp)
je 0x12733
movl %ecx, %r14d
shrl $0x1f, %r14d
addl %ecx, %r14d
sarl %r14d
addl %ecx, %r14d
jmp 0x12739
movl %r15d, %r14d
cmpl 0x17fc(%r13), %edx
jne 0x1267e
leal 0x1(%rdx), %r15d
testl %edx, %edx
movl %eax, -0x34(%rbp)
movss %xmm0, -0x30(%rbp)
movss %xmm1, -0x2c(%rbp)
je 0x1268a
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
addl %edx, %ecx
jmp 0x1268f
movq 0x1800(%r13), %r12
jmp 0x12716
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
movslq %r15d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
movq 0x42dd8(%rip), %rax     # 0x55480
incl 0x334(%rax)
callq *0xd0(%rax)
movq %rax, %r12
movq 0x1800(%r13), %rsi
movslq 0x17f8(%r13), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
movq %r12, %rdi
callq 0x7080
movq 0x1800(%r13), %rdi
movq 0x42d9d(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0x126ee
decl 0x334(%rax)
callq *0xd8(%rax)
movq %r12, 0x1800(%r13)
movl %r15d, 0x17fc(%r13)
movl 0x17f8(%r13), %edx
movl -0x34(%rbp), %eax
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
leal 0x1(%rdx), %ecx
movl %ecx, 0x17f8(%r13)
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%r12,%rcx,8), %rcx
movl %r14d, %r15d
jmp 0x127ce
movl $0x8, %r14d
cmpl %esi, %r14d
movl %esi, -0x38(%rbp)
cmovlel %esi, %r14d
movslq %r14d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
movq 0x42d2b(%rip), %rax     # 0x55480
incl 0x334(%rax)
callq *0xd0(%rax)
movq %rax, %r12
movq 0x1800(%r13), %rsi
movslq 0x17f8(%r13), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
movq %r12, %rdi
callq 0x7080
movq 0x1800(%r13), %rdi
movq 0x42cf0(%rip), %rax     # 0x55480
testq %rdi, %rdi
je 0x1279b
decl 0x334(%rax)
callq *0xd8(%rax)
movq %r12, 0x1800(%r13)
movl %r14d, 0x17fc(%r13)
movl -0x34(%rbp), %eax
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
movq -0x40(%rbp), %rdx
movl -0x38(%rbp), %esi
movl %esi, 0x17f8(%r13)
leaq (%r12,%rdx,8), %rcx
movl %r15d, (%rcx)
movq $0x0, 0x8(%rcx)
movq %rbx, 0x10(%rcx)
movl %eax, 0x18(%rcx)
movss %xmm0, 0x1c(%rcx)
movss %xmm1, 0x20(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq