// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: ShowExampleAppSimpleOverlay(bool*)
static void ShowExampleAppSimpleOverlay(bool* p_open)
{
    const float DISTANCE = 10.0f;
    static int corner = 0;
    ImGuiIO& io = ImGui::GetIO();
    ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav;
    if (corner != -1)
    {
        window_flags |= ImGuiWindowFlags_NoMove;
        ImVec2 window_pos = ImVec2((corner & 1) ? io.DisplaySize.x - DISTANCE : DISTANCE, (corner & 2) ? io.DisplaySize.y - DISTANCE : DISTANCE);
        ImVec2 window_pos_pivot = ImVec2((corner & 1) ? 1.0f : 0.0f, (corner & 2) ? 1.0f : 0.0f);
        ImGui::SetNextWindowPos(window_pos, ImGuiCond_Always, window_pos_pivot);
    }
    ImGui::SetNextWindowBgAlpha(0.35f); // Transparent background
    if (ImGui::Begin("Example: Simple overlay", p_open, window_flags))
    {
        ImGui::Text("Simple overlay\n" "in the corner of the screen.\n" "(right-click to change position)");
        ImGui::Separator();
        if (ImGui::IsMousePosValid())
            ImGui::Text("Mouse Position: (%.1f,%.1f)", io.MousePos.x, io.MousePos.y);
        else
            ImGui::Text("Mouse Position: <invalid>");
        if (ImGui::BeginPopupContextWindow())
        {
            if (ImGui::MenuItem("Custom",       NULL, corner == -1)) corner = -1;
            if (ImGui::MenuItem("Top-left",     NULL, corner == 0)) corner = 0;
            if (ImGui::MenuItem("Top-right",    NULL, corner == 1)) corner = 1;
            if (ImGui::MenuItem("Bottom-left",  NULL, corner == 2)) corner = 2;
            if (ImGui::MenuItem("Bottom-right", NULL, corner == 3)) corner = 3;
            if (p_open && ImGui::MenuItem("Close")) *p_open = false;
            ImGui::EndPopup();
        }
    }
    ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movss 0x7fe48(%rip), %xmm0    # 0x171fdc
movss %xmm0, -0xc(%rbp)
callq 0xcb1a0
movq %rax, -0x18(%rbp)
movl $0xc116b, -0x1c(%rbp)   # imm = 0xC116B
cmpl $-0x1, 0x12229c(%rip)   # 0x21444c
je 0xf22d7
movl -0x1c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x1c(%rbp)
movl 0x122287(%rip), %eax    # 0x21444c
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf21e9
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss 0x7fdfe(%rip), %xmm1    # 0x171fdc
subss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0xf21f8
movss 0x7fdeb(%rip), %xmm0    # 0x171fdc
movss %xmm0, -0x30(%rbp)
jmp 0xf21f8
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movl 0x122244(%rip), %eax    # 0x21444c
andl $0x2, %eax
cmpl $0x0, %eax
je 0xf222c
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm0
movss 0x7fdbb(%rip), %xmm1    # 0x171fdc
subss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
jmp 0xf223b
movss 0x7fda8(%rip), %xmm0    # 0x171fdc
movss %xmm0, -0x38(%rbp)
jmp 0xf223b
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
leaq -0x24(%rbp), %rdi
callq 0xbf4c0
movl 0x1221f8(%rip), %eax    # 0x21444c
andl $0x1, %eax
movss 0x7e9dd(%rip), %xmm0    # 0x170c3c
xorps %xmm1, %xmm1
movss %xmm1, -0x40(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0x3c(%rbp)
jne 0xf227b
movss -0x40(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movl 0x1221c1(%rip), %eax    # 0x21444c
andl $0x2, %eax
movss 0x7e9a6(%rip), %xmm0    # 0x170c3c
xorps %xmm1, %xmm1
movss %xmm1, -0x48(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0x44(%rbp)
jne 0xf22b2
movss -0x48(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x4c(%rbp), %xmm0
movss -0x44(%rbp), %xmm1
leaq -0x2c(%rbp), %rdi
callq 0xbf4c0
leaq -0x24(%rbp), %rdi
movl $0x1, %esi
leaq -0x2c(%rbp), %rdx
callq 0xdab40
movss 0x862ad(%rip), %xmm0    # 0x17858c
callq 0xdae00
movq -0x8(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq 0x90fdf(%rip), %rdi     # 0x1832d1
callq 0xd0170
testb $0x1, %al
jne 0xf2300
jmp 0xf24bc
leaq 0x90fe2(%rip), %rdi     # 0x1832e9
movb $0x0, %al
callq 0x139160
callq 0x13dec0
xorl %eax, %eax
movl %eax, %edi
callq 0xcb710
testb $0x1, %al
jne 0xf2322
jmp 0xf2352
movq -0x18(%rbp), %rax
movss 0x120(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss 0x124(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x90fed(%rip), %rdi     # 0x183336
movb $0x2, %al
callq 0x139160
jmp 0xf2360
leaq 0x90ff9(%rip), %rdi     # 0x183352
movb $0x0, %al
callq 0x139160
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0xde980
testb $0x1, %al
jne 0xf2377
jmp 0xf24ba
cmpl $-0x1, 0x1220ce(%rip)   # 0x21444c
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq 0x90fdc(%rip), %rdi     # 0x18336c
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf23a4
jmp 0xf23ae
movl $0xffffffff, 0x12209e(%rip) # imm = 0xFFFFFFFF
cmpl $0x0, 0x122097(%rip)    # 0x21444c
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq 0x90fac(%rip), %rdi     # 0x183373
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf23db
jmp 0xf23e5
movl $0x0, 0x122067(%rip)    # 0x21444c
cmpl $0x1, 0x122060(%rip)    # 0x21444c
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq 0x90f7e(%rip), %rdi     # 0x18337c
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf2412
jmp 0xf241c
movl $0x1, 0x122030(%rip)    # 0x21444c
cmpl $0x2, 0x122029(%rip)    # 0x21444c
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq 0x90f51(%rip), %rdi     # 0x183386
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf2449
jmp 0xf2453
movl $0x2, 0x121ff9(%rip)    # 0x21444c
cmpl $0x3, 0x121ff2(%rip)    # 0x21444c
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq 0x90f26(%rip), %rdi     # 0x183392
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf2480
jmp 0xf248a
movl $0x3, 0x121fc2(%rip)    # 0x21444c
cmpq $0x0, -0x8(%rbp)
je 0xf24b5
leaq 0x8b4c5(%rip), %rdi     # 0x17d95d
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf24ae
jmp 0xf24b5
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
callq 0xde4e0
jmp 0xf24bc
callq 0xd3b60
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)