// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::EndColumns()
void ImGui::EndColumns()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();
    ImGuiOldColumns* columns = window->DC.CurrentColumns;
    IM_ASSERT(columns != NULL);

    PopItemWidth();
    if (columns->Count > 1)
    {
        PopClipRect();
        columns->Splitter.Merge(window->DrawList);
    }

    const ImGuiOldColumnFlags flags = columns->Flags;
    columns->LineMaxY = ImMax(columns->LineMaxY, window->DC.CursorPos.y);
    window->DC.CursorPos.y = columns->LineMaxY;
    if (!(flags & ImGuiOldColumnFlags_GrowParentContentsSize))
        window->DC.CursorMaxPos.x = columns->HostCursorMaxPosX;  // Restore cursor max pos, as columns don't grow parent

    // Draw columns borders and handle resize
    // The IsBeingResized flag ensure we preserve pre-resize columns width so back-and-forth are not lossy
    bool is_being_resized = false;
    if (!(flags & ImGuiOldColumnFlags_NoBorder) && !window->SkipItems)
    {
        // We clip Y boundaries CPU side because very long triangles are mishandled by some GPU drivers.
        const float y1 = ImMax(columns->HostCursorPosY, window->ClipRect.Min.y);
        const float y2 = ImMin(window->DC.CursorPos.y, window->ClipRect.Max.y);
        int dragging_column = -1;
        for (int n = 1; n < columns->Count; n++)
        {
            ImGuiOldColumnData* column = &columns->Columns[n];
            float x = window->Pos.x + GetColumnOffset(n);
            const ImGuiID column_id = columns->ID + ImGuiID(n);
            const float column_hit_hw = COLUMNS_HIT_RECT_HALF_WIDTH;
            const ImRect column_hit_rect(ImVec2(x - column_hit_hw, y1), ImVec2(x + column_hit_hw, y2));
            KeepAliveID(column_id);
            if (IsClippedEx(column_hit_rect, column_id, false))
                continue;

            bool hovered = false, held = false;
            if (!(flags & ImGuiOldColumnFlags_NoResize))
            {
                ButtonBehavior(column_hit_rect, column_id, &hovered, &held);
                if (hovered || held)
                    g.MouseCursor = ImGuiMouseCursor_ResizeEW;
                if (held && !(column->Flags & ImGuiOldColumnFlags_NoResize))
                    dragging_column = n;
            }

            // Draw column
            const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
            const float xi = IM_FLOOR(x);
            window->DrawList->AddLine(ImVec2(xi, y1 + 1.0f), ImVec2(xi, y2), col);
        }

        // Apply dragging after drawing the column lines, so our rendered lines are in sync with how items were displayed during the frame.
        if (dragging_column != -1)
        {
            if (!columns->IsBeingResized)
                for (int n = 0; n < columns->Count + 1; n++)
                    columns->Columns[n].OffsetNormBeforeResize = columns->Columns[n].OffsetNorm;
            columns->IsBeingResized = is_being_resized = true;
            float x = GetDraggedColumnOffset(columns, dragging_column);
            SetColumnOffset(dragging_column, x);
        }
    }
    columns->IsBeingResized = is_being_resized;

    window->WorkRect = window->ParentWorkRect;
    window->ParentWorkRect = columns->HostBackupParentWorkRect;
    window->DC.CurrentColumns = NULL;
    window->DC.ColumnsOffset.x = 0.0f;
    window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq 0x6c8c1(%rip), %rax     # 0xfbcd0
movq (%rax), %rbx
movq 0x1ae0(%rbx), %r12
movb $0x1, 0x90(%r12)
movq 0x1b0(%r12), %r13
testq %r13, %r13
je 0x8f843
callq 0x560da
cmpl $0x2, 0x10(%r13)
jl 0x8f455
callq 0x4ff37
leaq 0x70(%r13), %rdi
movq 0x2b8(%r12), %rsi
callq 0x7a55a
movl 0x4(%r13), %eax
movss 0x20(%r13), %xmm0
movss 0xdc(%r12), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
orps %xmm0, %xmm2
movss %xmm2, 0x20(%r13)
movaps %xmm2, -0x90(%rbp)
movss %xmm2, 0xdc(%r12)
movl %eax, -0x30(%rbp)
testb $0x10, %al
jne 0x8f4a8
movss 0x28(%r13), %xmm0
movss %xmm0, 0xf0(%r12)
testb $0x1, -0x30(%rbp)
jne 0x8f7ab
cmpb $0x0, 0x93(%r12)
jne 0x8f7ab
cmpl $0x2, 0x10(%r13)
jl 0x8f7ab
movq %rbx, -0x58(%rbp)
movss 0x24(%r13), %xmm0
movss 0x25c(%r12), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
movaps -0x90(%rbp), %xmm1
minss 0x264(%r12), %xmm1
movaps %xmm1, -0x90(%rbp)
orps %xmm0, %xmm2
movaps %xmm2, -0xb0(%rbp)
addss 0x25acc(%rip), %xmm2    # 0xb4fe4
movss %xmm2, -0x4c(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x48(%rbp)
movl $0x1, %r14d
movl $0x24, %r15d
movslq 0x60(%r13), %rax
cmpq %rax, %r14
jge 0x8f824
movq 0x68(%r13), %rax
movq %rax, -0x98(%rbp)
movss 0x10(%r12), %xmm0
movss %xmm0, -0x40(%rbp)
movl %r14d, %edi
callq 0x8e54a
movaps %xmm0, %xmm1
addss -0x40(%rbp), %xmm1
movl (%r13), %ebx
addq %r14, %rbx
movaps %xmm1, %xmm0
addss 0x262e8(%rip), %xmm0    # 0xb5860
movaps %xmm1, -0x40(%rbp)
addss 0x262e0(%rip), %xmm1    # 0xb5864
movss %xmm0, -0x78(%rbp)
movaps -0xb0(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movss %xmm1, -0x70(%rbp)
movaps -0x90(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movl %ebx, %edi
callq 0x459e2
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x46579
testb %al, %al
jne 0x8f699
xorl %eax, %eax
movb %al, -0x2a(%rbp)
movb %al, -0x29(%rbp)
testb $0x2, -0x30(%rbp)
jne 0x8f605
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
xorl %r8d, %r8d
callq 0x90b6f
movb -0x2a(%rbp), %al
movb -0x29(%rbp), %cl
testb %al, %al
je 0x8f609
movq -0x58(%rbp), %rdx
movl $0x4, 0x2000(%rdx)
testb $0x1, %cl
jne 0x8f61c
jmp 0x8f634
xorl %ecx, %ecx
jmp 0x8f634
testb $0x1, %cl
je 0x8f634
movq -0x58(%rbp), %rdx
movl $0x4, 0x2000(%rdx)
movq -0x98(%rbp), %rdx
testb $0x2, (%rdx,%r15)
movq -0x48(%rbp), %rdx
cmovel %r14d, %edx
movq %rdx, -0x48(%rbp)
movzbl %al, %edi
addl $0x1b, %edi
testb $0x1, %cl
movl $0x1d, %eax
cmovnel %eax, %edi
movss 0x25997(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
cvttps2dq -0x40(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movq 0x2b8(%r12), %rdi
movss %xmm0, -0x68(%rbp)
movss -0x4c(%rbp), %xmm1
movss %xmm1, -0x64(%rbp)
movss %xmm0, -0x60(%rbp)
movaps -0x90(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
leaq -0x68(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl %eax, %ecx
movss 0x25950(%rip), %xmm0    # 0xb4fe4
callq 0x78368
incq %r14
movslq 0x10(%r13), %rax
addq $0x1c, %r15
cmpq %rax, %r14
jl 0x8f532
movq -0x48(%rbp), %r14
cmpl $-0x1, %r14d
je 0x8f7ab
movl %eax, %eax
testl %eax, %eax
leaq 0x6c60a(%rip), %rdi     # 0xfbcd0
js 0x8f701
cmpb $0x0, 0x9(%r13)
jne 0x8f701
incq %rax
movl $0x4, %ecx
xorl %edx, %edx
movslq 0x60(%r13), %rsi
cmpq %rsi, %rdx
jge 0x8f824
movq 0x68(%r13), %rsi
movss -0x4(%rsi,%rcx), %xmm0
movss %xmm0, (%rsi,%rcx)
incq %rdx
addq $0x1c, %rcx
cmpq %rdx, %rax
jne 0x8f6d9
movb $0x1, 0x9(%r13)
testl %r14d, %r14d
jle 0x8f862
movq (%rdi), %rbx
movl (%r13), %eax
addl %r14d, %eax
cmpl %eax, 0x1b30(%rbx)
jne 0x8f881
movss 0x128(%rbx), %xmm0
subss 0x1b58(%rbx), %xmm0
addss 0x26127(%rip), %xmm0    # 0xb5864
movq 0x1ae0(%rbx), %rax
subss 0x10(%rax), %xmm0
movaps %xmm0, -0x40(%rbp)
leal -0x1(%r14), %edi
callq 0x8e54a
addss 0x15cc(%rbx), %xmm0
movaps %xmm0, %xmm1
movaps -0x40(%rbp), %xmm2
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm0, %xmm1
orps %xmm2, %xmm1
testb $0x4, 0x4(%r13)
je 0x8f797
leal 0x1(%r14), %edi
movaps %xmm1, -0x40(%rbp)
callq 0x8e54a
movaps -0x40(%rbp), %xmm1
subss 0x15cc(%rbx), %xmm0
minss %xmm0, %xmm1
cmpl $-0x1, %r14d
setne %bl
movl %r14d, %edi
movaps %xmm1, %xmm0
callq 0x8e67f
jmp 0x8f7ad
xorl %ebx, %ebx
movb %bl, 0x9(%r13)
movups 0x248(%r12), %xmm0
movups %xmm0, 0x238(%r12)
movups 0x4c(%r13), %xmm0
movups %xmm0, 0x248(%r12)
movq $0x0, 0x1b0(%r12)
movl $0x0, 0x11c(%r12)
movss 0x10(%r12), %xmm0
addss 0x118(%r12), %xmm0
xorps %xmm1, %xmm1
addss %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0xd8(%r12)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29e4d(%rip), %rdi     # 0xb9678
leaq 0x29e59(%rip), %rsi     # 0xb968b
leaq 0x414ab(%rip), %rcx     # 0xd0ce4
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x40d5a(%rip), %rdi     # 0xd05a4
leaq 0x3f639(%rip), %rsi     # 0xcee8a
leaq 0x40e66(%rip), %rcx     # 0xd06be
movl $0xef8, %edx            # imm = 0xEF8
callq 0xc140
leaq 0x410e6(%rip), %rdi     # 0xd094f
leaq 0x3f61a(%rip), %rsi     # 0xcee8a
leaq 0x410e9(%rip), %rcx     # 0xd0960
movl $0xdda, %edx            # imm = 0xDDA
callq 0xc140
leaq 0x4110d(%rip), %rdi     # 0xd0995
leaq 0x3f5fb(%rip), %rsi     # 0xcee8a
leaq 0x410ca(%rip), %rcx     # 0xd0960
movl $0xddb, %edx            # imm = 0xDDB
callq 0xc140