// File: /workspace/github_cpp_makefile_star2_O1/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 0x42b81(%rip), %r13     # 0x55490
movq 0x1758(%r13), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa872
movl %eax, %r14d
movslq 0x1808(%r13), %r15
leaq 0x2b319(%rip), %rsi     # 0x3dc4a
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa872
movss 0xf0(%r13), %xmm0
movss 0xf4(%r13), %xmm1
movl 0x17f8(%r13), %r12d
cmpl %r15d, %r12d
jle 0x1299f
movq 0x1800(%r13), %rcx
leaq (%r15,%r15,4), %r12
cmpl %r14d, (%rcx,%r12,8)
je 0x12b64
leal 0x1(%r15), %edx
movl 0x17fc(%r13), %ecx
cmpl %r15d, %ecx
jg 0x12b2d
testl %ecx, %ecx
je 0x12a7f
movl %ecx, %r15d
shrl $0x1f, %r15d
addl %ecx, %r15d
sarl %r15d
addl %ecx, %r15d
jmp 0x12a85
movl 0x17fc(%r13), %edx
cmpl %edx, %r12d
jne 0x12a65
incl %r12d
testl %edx, %edx
je 0x129c3
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
addl %edx, %ecx
jmp 0x129c8
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %edx
jge 0x12a65
movss %xmm1, -0x2c(%rbp)
movss %xmm0, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movslq %r12d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
movq 0x42a99(%rip), %rax     # 0x55490
incl 0x334(%rax)
callq *0xd0(%rax)
movq %rax, %rdi
movq 0x1800(%r13), %rsi
movslq 0x17f8(%r13), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
movq %rdi, %r15
callq 0x7080
movq 0x1800(%r13), %rdi
testq %rdi, %rdi
je 0x12a3d
movq 0x42a59(%rip), %rax     # 0x55490
decl 0x334(%rax)
movq 0x42a4c(%rip), %rax     # 0x55490
callq *0xd8(%rax)
movq %r15, 0x1800(%r13)
movl %r12d, 0x17fc(%r13)
movl -0x34(%rbp), %eax
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
movslq 0x17f8(%r13), %rdx
leal 0x1(%rdx), %ecx
movl %ecx, 0x17f8(%r13)
leaq (%rdx,%rdx,4), %r12
jmp 0x12b34
movl $0x8, %r15d
cmpl %edx, %r15d
cmovlel %edx, %r15d
cmpl %r15d, %ecx
jge 0x12b2d
movl %edx, -0x38(%rbp)
movss %xmm1, -0x2c(%rbp)
movss %xmm0, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movslq %r15d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
movq 0x429d9(%rip), %rax     # 0x55490
incl 0x334(%rax)
callq *0xd0(%rax)
movq %rax, %rdi
movq 0x1800(%r13), %rsi
movslq 0x17f8(%r13), %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
movq %rdi, -0x40(%rbp)
callq 0x7080
movq 0x1800(%r13), %rdi
testq %rdi, %rdi
je 0x12afe
movq 0x42998(%rip), %rax     # 0x55490
decl 0x334(%rax)
movq 0x4298b(%rip), %rax     # 0x55490
callq *0xd8(%rax)
movq -0x40(%rbp), %rax
movq %rax, 0x1800(%r13)
movl %r15d, 0x17fc(%r13)
movl -0x34(%rbp), %eax
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
movl -0x38(%rbp), %edx
movl %edx, 0x17f8(%r13)
shlq $0x3, %r12
addq 0x1800(%r13), %r12
movl %r14d, (%r12)
movq $0x0, 0x8(%r12)
movq %rbx, 0x10(%r12)
movl %eax, 0x18(%r12)
movss %xmm0, 0x1c(%r12)
movss %xmm1, 0x20(%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq