// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
leaq 0x6cb70(%rip), %r14     # 0xfdcd0
movq (%r14), %r15
movq 0x1ae0(%r15), %r13
movb $0x1, 0x90(%r13)
movq 0x1b0(%r13), %rbx
testq %rbx, %rbx
je 0x9155d
callq 0x571b8
cmpl $0x2, 0x10(%rbx)
jl 0x911a2
callq 0x50f2c
leaq 0x70(%rbx), %rdi
movq 0x2b8(%r13), %rsi
callq 0x7be68
movl 0x4(%rbx), %eax
movss 0x20(%rbx), %xmm0
movss 0xdc(%r13), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
orps %xmm0, %xmm2
movss %xmm2, 0x20(%rbx)
movaps %xmm2, -0x80(%rbp)
movss %xmm2, 0xdc(%r13)
movl %eax, -0x30(%rbp)
testb $0x10, %al
jne 0x911eb
movss 0x28(%rbx), %xmm0
movss %xmm0, 0xf0(%r13)
testb $0x1, -0x30(%rbp)
jne 0x911fb
cmpb $0x0, 0x93(%r13)
je 0x91202
xorl %eax, %eax
jmp 0x914d4
movq %r15, -0x88(%rbp)
movl 0x10(%rbx), %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jl 0x913e6
movss 0x24(%rbx), %xmm0
movss 0x25c(%r13), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
orps %xmm0, %xmm2
movaps -0x80(%rbp), %xmm0
minss 0x264(%r13), %xmm0
movaps %xmm0, -0x80(%rbp)
movaps %xmm2, -0xa0(%rbp)
addss 0x25d8a(%rip), %xmm2    # 0xb6fe4
movss %xmm2, -0x4c(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x48(%rbp)
movl $0x1, %r14d
movl $0x24, %r15d
movslq 0x60(%rbx), %rax
cmpq %rax, %r14
jge 0x9153e
movq 0x68(%rbx), %rax
movq %rax, -0x90(%rbp)
movss 0x10(%r13), %xmm0
movss %xmm0, -0x40(%rbp)
movl %r14d, %edi
callq 0x90238
movaps %xmm0, %xmm1
addss -0x40(%rbp), %xmm1
movl (%rbx), %r12d
addq %r14, %r12
movaps %xmm1, %xmm0
addss 0x265a8(%rip), %xmm0    # 0xb7860
movaps %xmm1, -0x40(%rbp)
addss 0x265a0(%rip), %xmm1    # 0xb7864
movss %xmm0, -0x6c(%rbp)
movaps -0xa0(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movss %xmm1, -0x64(%rbp)
movaps -0x80(%rbp), %xmm0
movss %xmm0, -0x60(%rbp)
movl %r12d, %edi
callq 0x46530
leaq -0x6c(%rbp), %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x4709d
testb %al, %al
jne 0x913c7
xorl %eax, %eax
movb %al, -0x2a(%rbp)
movb %al, -0x29(%rbp)
testb $0x2, -0x30(%rbp)
jne 0x91361
leaq -0x6c(%rbp), %rdi
movl %r12d, %esi
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
xorl %r8d, %r8d
callq 0x92870
cmpb $0x0, -0x2a(%rbp)
jne 0x91332
cmpb $0x1, -0x29(%rbp)
jne 0x91343
movq -0x88(%rbp), %rax
movl $0x4, 0x2000(%rax)
cmpb $0x1, -0x29(%rbp)
jne 0x91361
movq -0x90(%rbp), %rax
testb $0x2, (%rax,%r15)
movq -0x48(%rbp), %rax
cmovel %r14d, %eax
movq %rax, -0x48(%rbp)
movzbl -0x2a(%rbp), %edi
andl $0x1, %edi
addl $0x1b, %edi
cmpb $0x0, -0x29(%rbp)
movl $0x1d, %eax
cmovnel %eax, %edi
movss 0x25c65(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
cvttps2dq -0x40(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movq 0x2b8(%r13), %rdi
movss %xmm0, -0x5c(%rbp)
movss -0x4c(%rbp), %xmm1
movss %xmm1, -0x58(%rbp)
movss %xmm0, -0x54(%rbp)
movaps -0x80(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
leaq -0x5c(%rbp), %rsi
leaq -0x54(%rbp), %rdx
movl %eax, %ecx
movss 0x25c22(%rip), %xmm0    # 0xb6fe4
callq 0x79abc
incq %r14
movslq 0x10(%rbx), %rax
addq $0x1c, %r15
cmpq %rax, %r14
jl 0x91274
leaq 0x6c8ee(%rip), %r14     # 0xfdcd0
movq -0x48(%rbp), %r15
cmpl $-0x1, %r15d
je 0x914cd
testl %eax, %eax
js 0x9142b
cmpb $0x0, 0x9(%rbx)
jne 0x9142b
incl %eax
movl $0x4, %ecx
xorl %edx, %edx
movslq 0x60(%rbx), %rsi
cmpq %rsi, %rdx
jge 0x9153e
movq 0x68(%rbx), %rsi
movss -0x4(%rsi,%rcx), %xmm0
movss %xmm0, (%rsi,%rcx)
incq %rdx
addq $0x1c, %rcx
cmpq %rdx, %rax
jne 0x91403
movb $0x1, 0x9(%rbx)
testl %r15d, %r15d
jle 0x9157c
movq (%r14), %r14
movl (%rbx), %eax
addl %r15d, %eax
cmpl %eax, 0x1b30(%r14)
jne 0x9159b
movss 0x128(%r14), %xmm0
subss 0x1b58(%r14), %xmm0
addss 0x263fd(%rip), %xmm0    # 0xb7864
movq 0x1ae0(%r14), %rax
subss 0x10(%rax), %xmm0
movaps %xmm0, -0x40(%rbp)
leal -0x1(%r15), %edi
callq 0x90238
addss 0x15cc(%r14), %xmm0
movaps %xmm0, %xmm1
movaps -0x40(%rbp), %xmm2
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm0, %xmm1
orps %xmm2, %xmm1
testb $0x4, 0x4(%rbx)
je 0x914c2
leal 0x1(%r15), %edi
movaps %xmm1, -0x40(%rbp)
callq 0x90238
movaps -0x40(%rbp), %xmm1
subss 0x15cc(%r14), %xmm0
minss %xmm0, %xmm1
movl %r15d, %edi
movaps %xmm1, %xmm0
callq 0x9036d
cmpl $-0x1, %r15d
setne %al
movb %al, 0x9(%rbx)
movups 0x248(%r13), %xmm0
movups %xmm0, 0x238(%r13)
movups 0x4c(%rbx), %xmm0
movups %xmm0, 0x248(%r13)
movq $0x0, 0x1b0(%r13)
movl $0x0, 0x11c(%r13)
movss 0x10(%r13), %xmm0
addss 0x118(%r13), %xmm0
xorps %xmm1, %xmm1
addss %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0xd8(%r13)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a133(%rip), %rdi     # 0xbb678
leaq 0x2a13f(%rip), %rsi     # 0xbb68b
leaq 0x418bf(%rip), %rcx     # 0xd2e12
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x41070(%rip), %rdi     # 0xd25d4
leaq 0x3f94f(%rip), %rsi     # 0xd0eba
leaq 0x4117c(%rip), %rcx     # 0xd26ee
movl $0xef8, %edx            # imm = 0xEF8
callq 0xc140
leaq 0x413fc(%rip), %rdi     # 0xd297f
leaq 0x3f930(%rip), %rsi     # 0xd0eba
leaq 0x413ff(%rip), %rcx     # 0xd2990
movl $0xdda, %edx            # imm = 0xDDA
callq 0xc140
leaq 0x41423(%rip), %rdi     # 0xd29c5
leaq 0x3f911(%rip), %rsi     # 0xd0eba
leaq 0x413e0(%rip), %rcx     # 0xd2990
movl $0xddb, %edx            # imm = 0xDDB
callq 0xc140