// File: /workspace/github_cpp_makefile_star2_O2/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 0x6bbe0(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq 0x1ae0(%rax), %r12
movb $0x1, 0x90(%r12)
movq 0x1b0(%r12), %r14
testq %r14, %r14
je 0x784fb
callq 0x43cbe
cmpl $0x2, 0x10(%r14)
jl 0x7814a
callq 0x3f128
leaq 0x70(%r14), %rdi
movq 0x2b8(%r12), %rsi
callq 0x65408
movl 0x4(%r14), %eax
movss 0x20(%r14), %xmm0
movss 0xdc(%r12), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
orps %xmm0, %xmm2
movss %xmm2, 0x20(%r14)
movaps %xmm2, -0x90(%rbp)
movss %xmm2, 0xdc(%r12)
movl %eax, -0x30(%rbp)
testb $0x10, %al
jne 0x7819d
movss 0x28(%r14), %xmm0
movss %xmm0, 0xf0(%r12)
testb $0x1, -0x30(%rbp)
jne 0x781ae
cmpb $0x0, 0x93(%r12)
je 0x781b5
xorl %eax, %eax
jmp 0x7844d
movss 0x24(%r14), %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 0x23dfb(%rip), %xmm2    # 0x9bff8
movaps %xmm2, -0xa0(%rbp)
leaq 0x60(%r14), %rax
movq %rax, -0x58(%rbp)
pushq $-0x1
popq %rax
movq %rax, -0x48(%rbp)
pushq $0x1
popq %r15
movl 0x10(%r14), %eax
cmpl %eax, %r15d
jge 0x78382
movq -0x58(%rbp), %rdi
movl %r15d, %esi
callq 0x4bb92
movq %rax, %r13
movss 0x10(%r12), %xmm0
movss %xmm0, -0x40(%rbp)
movl %r15d, %edi
callq 0x775d3
movaps %xmm0, %xmm1
addss -0x40(%rbp), %xmm1
movl (%r14), %ebx
addl %r15d, %ebx
movaps %xmm1, %xmm0
addss 0x2462c(%rip), %xmm0    # 0x9c88c
movaps %xmm1, -0x40(%rbp)
addss 0x24624(%rip), %xmm1    # 0x9c890
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 0x370fd
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x37840
testb %al, %al
jne 0x7837a
xorl %eax, %eax
movb %al, -0x2a(%rbp)
movb %al, -0x29(%rbp)
testb $0x2, -0x30(%rbp)
jne 0x782ed
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
xorl %r8d, %r8d
callq 0x79dde
movb -0x2a(%rbp), %al
movb -0x29(%rbp), %cl
testb %al, %al
je 0x782f1
movq -0x50(%rbp), %rdx
movl $0x4, 0x2000(%rdx)
testb $0x1, %cl
jne 0x78304
jmp 0x78315
xorl %ecx, %ecx
jmp 0x78315
testb $0x1, %cl
je 0x78315
movq -0x50(%rbp), %rdx
movl $0x4, 0x2000(%rdx)
testb $0x2, 0x8(%r13)
movq -0x48(%rbp), %rdx
cmovel %r15d, %edx
movq %rdx, -0x48(%rbp)
movzbl %al, %edi
addl $0x1b, %edi
testb $0x1, %cl
pushq $0x1d
popq %rax
cmovnel %eax, %edi
movss 0x23ccc(%rip), %xmm0    # 0x9bff8
callq 0x35d33
cvttps2dq -0x40(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movq 0x2b8(%r12), %rdi
movss %xmm0, -0x68(%rbp)
movaps -0xa0(%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 0x23c83(%rip), %xmm0    # 0x9bff8
callq 0x63ec2
incl %r15d
jmp 0x78217
movq -0x48(%rbp), %r15
cmpl $-0x1, %r15d
je 0x78446
cmpb $0x0, 0x9(%r14)
leaq 0x6b944(%rip), %r15     # 0xe3ce0
je 0x784be
movb $0x1, 0x9(%r14)
movq -0x48(%rbp), %rcx
testl %ecx, %ecx
jle 0x7851a
movq (%r15), %rbx
movl (%r14), %eax
addl %ecx, %eax
cmpl %eax, 0x1b30(%rbx)
jne 0x78539
movq %rcx, %r15
movss 0x128(%rbx), %xmm0
subss 0x1b58(%rbx), %xmm0
addss 0x244ae(%rip), %xmm0    # 0x9c890
movq 0x1ae0(%rbx), %rax
subss 0x10(%rax), %xmm0
movaps %xmm0, -0x40(%rbp)
leal -0x1(%rcx), %edi
callq 0x775d3
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(%r14)
je 0x7843b
leal 0x1(%r15), %edi
movaps %xmm1, -0x40(%rbp)
callq 0x775d3
movaps -0x40(%rbp), %xmm1
subss 0x15cc(%rbx), %xmm0
minss %xmm0, %xmm1
movl %r15d, %edi
movaps %xmm1, %xmm0
callq 0x776cc
cmpl $-0x1, %r15d
setne %al
movb %al, 0x9(%r14)
movups 0x248(%r12), %xmm0
movups %xmm0, 0x238(%r12)
movups 0x4c(%r14), %xmm0
movups %xmm0, 0x248(%r12)
andq $0x0, 0x1b0(%r12)
andl $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
xorl %ebx, %ebx
movq -0x58(%rbp), %r13
cmpl %eax, %ebx
jg 0x783a2
movq %r13, %rdi
movl %ebx, %esi
callq 0x4bb92
movss (%rax), %xmm0
movss %xmm0, -0x40(%rbp)
movq %r13, %rdi
movl %ebx, %esi
callq 0x4bb92
movss -0x40(%rbp), %xmm0
movss %xmm0, 0x4(%rax)
incl %ebx
movl 0x10(%r14), %eax
jmp 0x784c4
leaq 0x3f31e(%rip), %rdi     # 0xb7820
leaq 0x3dbfd(%rip), %rsi     # 0xb6106
leaq 0x3f42a(%rip), %rcx     # 0xb793a
movl $0xef8, %edx            # imm = 0xEF8
callq 0xc140
leaq 0x3f6aa(%rip), %rdi     # 0xb7bcb
leaq 0x3dbde(%rip), %rsi     # 0xb6106
leaq 0x3f6ad(%rip), %rcx     # 0xb7bdc
movl $0xdda, %edx            # imm = 0xDDA
callq 0xc140
leaq 0x3f6d1(%rip), %rdi     # 0xb7c11
leaq 0x3dbbf(%rip), %rsi     # 0xb6106
leaq 0x3f68e(%rip), %rcx     # 0xb7bdc
movl $0xddb, %edx            # imm = 0xDDB
callq 0xc140