// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SeparatorEx(int)
void ImGui::SeparatorEx(ImGuiSeparatorFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return;

    ImGuiContext& g = *GImGui;
    IM_ASSERT(ImIsPowerOfTwo(flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)));   // Check that only 1 option is selected

    float thickness_draw = 1.0f;
    float thickness_layout = 0.0f;
    if (flags & ImGuiSeparatorFlags_Vertical)
    {
        // Vertical separator, for menu bars (use current line height). Not exposed because it is misleading and it doesn't have an effect on regular layout.
        float y1 = window->DC.CursorPos.y;
        float y2 = window->DC.CursorPos.y + window->DC.CurrLineSize.y;
        const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + thickness_draw, y2));
        ItemSize(ImVec2(thickness_layout, 0.0f));
        if (!ItemAdd(bb, 0))
            return;

        // Draw
        window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y), ImVec2(bb.Min.x, bb.Max.y), GetColorU32(ImGuiCol_Separator));
        if (g.LogEnabled)
            LogText(" |");
    }
    else if (flags & ImGuiSeparatorFlags_Horizontal)
    {
        // Horizontal Separator
        float x1 = window->Pos.x;
        float x2 = window->Pos.x + window->Size.x;

        // FIXME-WORKRECT: old hack (#205) until we decide of consistent behavior with WorkRect/Indent and Separator
        if (g.GroupStack.Size > 0 && g.GroupStack.back().WindowID == window->ID)
            x1 += window->DC.Indent.x;

        ImGuiOldColumns* columns = (flags & ImGuiSeparatorFlags_SpanAllColumns) ? window->DC.CurrentColumns : NULL;
        if (columns)
            PushColumnsBackground();

        // We don't provide our width to the layout so that it doesn't get feed back into AutoFit
        const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y + thickness_draw));
        ItemSize(ImVec2(0.0f, thickness_layout));
        const bool item_visible = ItemAdd(bb, 0);
        if (item_visible)
        {
            // Draw
            window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x, bb.Min.y), GetColorU32(ImGuiCol_Separator));
            if (g.LogEnabled)
                LogRenderedText(&bb.Min, "--------------------------------");
        }
        if (columns)
        {
            PopColumnsBackground();
            columns->LineMinY = window->DC.CursorPos.y;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x4(%rbp)
callq 0xeb270
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x93(%rax)
je 0x13dad9
jmp 0x13de7d
leaq 0xd5460(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edi
andl $0x3, %edi
callq 0x13de90
testb $0x1, %al
jne 0x13daf8
jmp 0x13dafa
jmp 0x13db19
leaq 0x50b5f(%rip), %rdi     # 0x18e660
leaq 0x508d8(%rip), %rsi     # 0x18e3e0
movl $0x542, %edx            # imm = 0x542
leaq 0x50ba4(%rip), %rcx     # 0x18e6b8
callq 0xd180
movss 0x3311b(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x1c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x13dc77
movq -0x10(%rbp), %rax
movss 0xdc(%rax), %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movss 0xdc(%rax), %xmm0
movq -0x10(%rbp), %rax
addss 0x104(%rax), %xmm0
movss %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movss 0xd8(%rax), %xmm0
movss -0x24(%rbp), %xmm1
leaq -0x40(%rbp), %rdi
callq 0xbf4c0
movq -0x10(%rbp), %rax
movss 0xd8(%rax), %xmm0
addss -0x1c(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
leaq -0x48(%rbp), %rdi
callq 0xbf4c0
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0xe8660
movss -0x20(%rbp), %xmm0
leaq -0x50(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0xbf4c0
leaq -0x50(%rbp), %rdi
movss 0x343ae(%rip), %xmm0    # 0x171f80
callq 0xd6030
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xd6250
testb $0x1, %al
jne 0x13dbef
jmp 0x13de7d
movq -0x10(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xb0(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
leaq -0x58(%rbp), %rdi
callq 0xbf4c0
movss -0x38(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
leaq -0x60(%rbp), %rdi
callq 0xbf4c0
movl $0x1b, %edi
movss 0x33008(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xb0(%rbp), %rdi
movl %eax, %ecx
leaq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movss 0x32fea(%rip), %xmm0    # 0x170c3c
callq 0x112e20
movq -0x18(%rbp), %rax
testb $0x1, 0x3138(%rax)
je 0x13dc72
leaq 0x50a7a(%rip), %rdi     # 0x18e6e5
movb $0x0, %al
callq 0xe0a30
jmp 0x13de7d
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13de7b
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, -0x64(%rbp)
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
addss 0x18(%rax), %xmm0
movss %xmm0, -0x68(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x1c60(%rax)
jle 0x13dce9
movq -0x18(%rbp), %rdi
addq $0x1c60, %rdi           # imm = 0x1C60
callq 0xebf90
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x13dce9
movq -0x10(%rbp), %rax
movss 0x118(%rax), %xmm0
addss -0x64(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x13dd08
movq -0x10(%rbp), %rax
movq 0x1b0(%rax), %rax
movq %rax, -0xb8(%rbp)
jmp 0x13dd13
xorl %eax, %eax
movq %rax, -0xb8(%rbp)
jmp 0x13dd13
movq -0xb8(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x13dd2a
callq 0x1358e0
movss -0x64(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xdc(%rax), %xmm1
leaq -0x88(%rbp), %rdi
callq 0xbf4c0
movss -0x68(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xdc(%rax), %xmm1
addss -0x1c(%rbp), %xmm1
leaq -0x90(%rbp), %rdi
callq 0xbf4c0
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0xe8660
movss -0x20(%rbp), %xmm1
leaq -0x98(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0xbf4c0
leaq -0x98(%rbp), %rdi
movss 0x341dd(%rip), %xmm0    # 0x171f80
callq 0xd6030
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xd6250
andb $0x1, %al
movb %al, -0x99(%rbp)
testb $0x1, -0x99(%rbp)
je 0x13de58
movq -0x10(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0xc0(%rbp)
movss -0x78(%rbp), %xmm0
movss -0x7c(%rbp), %xmm1
leaq -0xa4(%rbp), %rdi
callq 0xbf4c0
movl $0x1b, %edi
movss 0x32e30(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movl %eax, %ecx
leaq -0xa4(%rbp), %rdx
movss 0x32e0c(%rip), %xmm0    # 0x170c3c
callq 0x112e20
movq -0x18(%rbp), %rax
testb $0x1, 0x3138(%rax)
je 0x13de56
leaq -0x80(%rbp), %rdi
leaq 0x5089b(%rip), %rsi     # 0x18e6e8
xorl %eax, %eax
movl %eax, %edx
callq 0xc8240
jmp 0x13de58
cmpq $0x0, -0x70(%rbp)
je 0x13de79
callq 0x135960
movq -0x10(%rbp), %rax
movss 0xdc(%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x1c(%rax)
jmp 0x13de7b
jmp 0x13de7d
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)