// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::BeginColumns(char const*, int, int)
void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();

    IM_ASSERT(columns_count >= 1);
    IM_ASSERT(window->DC.CurrentColumns == NULL);   // Nested columns are currently not supported

    // Acquire storage for the columns set
    ImGuiID id = GetColumnsID(str_id, columns_count);
    ImGuiOldColumns* columns = FindOrCreateColumns(window, id);
    IM_ASSERT(columns->ID == id);
    columns->Current = 0;
    columns->Count = columns_count;
    columns->Flags = flags;
    window->DC.CurrentColumns = columns;

    columns->HostCursorPosY = window->DC.CursorPos.y;
    columns->HostCursorMaxPosX = window->DC.CursorMaxPos.x;
    columns->HostInitialClipRect = window->ClipRect;
    columns->HostBackupParentWorkRect = window->ParentWorkRect;
    window->ParentWorkRect = window->WorkRect;

    // Set state for first column
    // We aim so that the right-most column will have the same clipping width as other after being clipped by parent ClipRect
    const float column_padding = g.Style.ItemSpacing.x;
    const float half_clip_extend_x = ImFloor(ImMax(window->WindowPadding.x * 0.5f, window->WindowBorderSize));
    const float max_1 = window->WorkRect.Max.x + column_padding - ImMax(column_padding - window->WindowPadding.x, 0.0f);
    const float max_2 = window->WorkRect.Max.x + half_clip_extend_x;
    columns->OffMinX = window->DC.Indent.x - column_padding + ImMax(column_padding - window->WindowPadding.x, 0.0f);
    columns->OffMaxX = ImMax(ImMin(max_1, max_2) - window->Pos.x, columns->OffMinX + 1.0f);
    columns->LineMinY = columns->LineMaxY = window->DC.CursorPos.y;

    // Clear data if columns count changed
    if (columns->Columns.Size != 0 && columns->Columns.Size != columns_count + 1)
        columns->Columns.resize(0);

    // Initialize default widths
    columns->IsFirstFrame = (columns->Columns.Size == 0);
    if (columns->Columns.Size == 0)
    {
        columns->Columns.reserve(columns_count + 1);
        for (int n = 0; n < columns_count + 1; n++)
        {
            ImGuiOldColumnData column;
            column.OffsetNorm = n / (float)columns_count;
            columns->Columns.push_back(column);
        }
    }

    for (int n = 0; n < columns_count; n++)
    {
        // Compute clipping rectangle
        ImGuiOldColumnData* column = &columns->Columns[n];
        float clip_x1 = IM_ROUND(window->Pos.x + GetColumnOffset(n));
        float clip_x2 = IM_ROUND(window->Pos.x + GetColumnOffset(n + 1) - 1.0f);
        column->ClipRect = ImRect(clip_x1, -FLT_MAX, clip_x2, +FLT_MAX);
        column->ClipRect.ClipWithFull(window->ClipRect);
    }

    if (columns->Count > 1)
    {
        columns->Splitter.Split(window->DrawList, 1 + columns->Count);
        columns->Splitter.SetCurrentChannel(window->DrawList, 1);
        PushColumnClipRect(0);
    }

    // We don't generally store Indent.x inside ColumnsOffset because it may be manipulated by the user.
    float offset_0 = GetColumnOffset(columns->Current);
    float offset_1 = GetColumnOffset(columns->Current + 1);
    float width = offset_1 - offset_0;
    PushItemWidth(width * 0.65f);
    window->DC.ColumnsOffset.x = ImMax(column_padding - window->WindowPadding.x, 0.0f);
    window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x);
    window->WorkRect.Max.x = window->Pos.x + offset_1 - column_padding;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x6d34a(%rip), %rax     # 0xfdcd0
movq (%rax), %rbx
movq 0x1ae0(%rbx), %r15
movb $0x1, 0x90(%r15)
testl %esi, %esi
jle 0x90e91
movl %edx, -0x40(%rbp)
cmpq $0x0, 0x1b0(%r15)
jne 0x90eb0
movl %esi, %r12d
callq 0x90914
movl %eax, %r13d
movq %r15, %rdi
movl %eax, %esi
callq 0x9073e
cmpl %r13d, (%rax)
jne 0x90ecf
movq %rax, %r14
movl $0x0, 0xc(%rax)
movl %r12d, 0x10(%rax)
movl -0x40(%rbp), %eax
movl %eax, 0x4(%r14)
movq %r14, 0x1b0(%r15)
movss 0xdc(%r15), %xmm0
movss %xmm0, 0x24(%r14)
movss 0xf0(%r15), %xmm0
movss %xmm0, 0x28(%r14)
movups 0x258(%r15), %xmm0
movups %xmm0, 0x2c(%r14)
movups 0x248(%r15), %xmm0
movups %xmm0, 0x4c(%r14)
movups 0x238(%r15), %xmm0
movups %xmm0, 0x248(%r15)
movss 0x15a8(%rbx), %xmm5
movss 0x40(%r15), %xmm0
movss 0x4c(%r15), %xmm1
movaps %xmm5, %xmm2
subss %xmm0, %xmm2
mulss 0x265ae(%rip), %xmm0    # 0xb7004
movaps %xmm1, %xmm3
cmpless %xmm0, %xmm3
andps %xmm3, %xmm0
andnps %xmm1, %xmm3
orps %xmm0, %xmm3
cvttps2dq %xmm3, %xmm0
cvtdq2ps %xmm0, %xmm0
movss 0x240(%r15), %xmm1
movaps %xmm5, %xmm3
addss %xmm1, %xmm3
xorps %xmm4, %xmm4
cmpless %xmm2, %xmm4
andps %xmm2, %xmm4
subss %xmm4, %xmm3
addss %xmm1, %xmm0
minss %xmm0, %xmm3
movss 0x118(%r15), %xmm0
movss %xmm5, -0x4c(%rbp)
subss %xmm5, %xmm0
addss %xmm4, %xmm0
movss %xmm0, 0x14(%r14)
subss 0x10(%r15), %xmm3
addss 0x26525(%rip), %xmm0    # 0xb6fe4
movaps %xmm0, %xmm1
cmpless %xmm3, %xmm1
andps %xmm1, %xmm3
andnps %xmm0, %xmm1
orps %xmm3, %xmm1
movss %xmm1, 0x18(%r14)
movss 0xdc(%r15), %xmm0
movss %xmm0, 0x20(%r14)
movss %xmm0, 0x1c(%r14)
movl 0x60(%r14), %eax
testl %eax, %eax
sete %cl
leal 0x1(%r12), %esi
cmpl %esi, %eax
sete %al
orb %cl, %al
movq %r12, %r13
movl %esi, %ebx
jne 0x90b77
movl 0x64(%r14), %eax
testl %eax, %eax
jns 0x90b6f
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r12d, %r12d
testl %ecx, %ecx
cmovgl %ecx, %r12d
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rdi
addq %r12, %rdi
callq 0x424fb
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x90b65
movslq 0x60(%r14), %rdi
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rdi, %rdx
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xc080
movq 0x68(%r14), %rdi
callq 0x425d4
movq -0x40(%rbp), %rax
movq %rax, 0x68(%r14)
movl %r12d, 0x64(%r14)
movl %ebx, %esi
movl $0x0, 0x60(%r14)
movq %r13, -0x30(%rbp)
movq %r15, -0x48(%rbp)
cmpl $0x0, 0x60(%r14)
sete 0x8(%r14)
jne 0x90cb9
movq -0x30(%rbp), %r15
cmpl %r15d, 0x64(%r14)
jg 0x90be1
movl %esi, %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdi
addq %rax, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x90bd7
movslq 0x60(%r14), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x68(%r14), %rdi
callq 0x425d4
movq %r12, 0x68(%r14)
movl %ebx, %esi
movl %ebx, 0x64(%r14)
xorps %xmm1, %xmm1
cvtsi2ss %r15d, %xmm1
xorl %r15d, %r15d
xorps %xmm2, %xmm2
movss %xmm1, -0x40(%rbp)
movl 0x60(%r14), %r13d
movl 0x64(%r14), %eax
cmpl %eax, %r13d
jne 0x90c77
testl %eax, %eax
je 0x90c12
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x90c17
movl $0x8, %ecx
incl %r13d
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x90c77
movslq %r13d, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdi
addq %rax, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x90c65
movslq 0x60(%r14), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rax, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x68(%r14), %rdi
callq 0x425d4
movq %r12, 0x68(%r14)
movl %r13d, 0x64(%r14)
movl %ebx, %esi
movss -0x40(%rbp), %xmm1
xorps %xmm2, %xmm2
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
divss %xmm1, %xmm0
movq 0x68(%r14), %rax
movslq 0x60(%r14), %rcx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movss %xmm0, (%rax,%rdx)
movups %xmm2, 0x4(%rax,%rdx)
movq $0x0, 0x14(%rax,%rdx)
incl 0x60(%r14)
incl %r15d
cmpl %r15d, %esi
jne 0x90bf4
movq -0x48(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rbx
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, -0x58(%rbp)
movl $0xc, %ebx
xorl %r15d, %r15d
movq -0x48(%rbp), %r13
movslq 0x60(%r14), %rax
cmpq %rax, %r15
jge 0x90e72
movq 0x68(%r14), %r12
movss 0x10(%r13), %xmm0
movss %xmm0, -0x40(%rbp)
movl %r15d, %edi
callq 0x90238
addss -0x40(%rbp), %xmm0
movss 0x262ed(%rip), %xmm1    # 0xb7004
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movss 0x10(%r13), %xmm0
movss %xmm0, -0x30(%rbp)
incq %r15
movl %r15d, %edi
callq 0x90238
addss -0x30(%rbp), %xmm0
addss 0x26287(%rip), %xmm0    # 0xb6fd0
addss 0x262b3(%rip), %xmm0    # 0xb7004
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
leaq (%r12,%rbx), %rdi
movaps -0x40(%rbp), %xmm1
movss %xmm1, (%r12,%rbx)
movl $0xff7fffff, 0x4(%r12,%rbx) # imm = 0xFF7FFFFF
movss %xmm0, 0x8(%r12,%rbx)
movl $0x7f7fffff, 0xc(%r12,%rbx) # imm = 0x7F7FFFFF
movq -0x60(%rbp), %rsi
callq 0x5f4e6
addq $0x1c, %rbx
cmpq %r15, -0x58(%rbp)
jne 0x90ce6
movl 0x10(%r14), %edx
cmpl $0x1, %edx
jle 0x90dd6
movq %r14, %r15
addq $0x70, %r15
movq -0x48(%rbp), %rbx
movq 0x2b8(%rbx), %rsi
incl %edx
movq %r15, %rdi
callq 0x7bbb6
movq 0x2b8(%rbx), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x7c2ae
xorl %edi, %edi
callq 0x905db
movl 0xc(%r14), %edi
callq 0x90238
movss %xmm0, -0x30(%rbp)
movl 0xc(%r14), %edi
incl %edi
callq 0x90238
movss %xmm0, -0x40(%rbp)
subss -0x30(%rbp), %xmm0
mulss 0x26ab3(%rip), %xmm0    # 0xb78b4
callq 0x56dd7
movss -0x4c(%rbp), %xmm3
movaps %xmm3, %xmm0
movq -0x48(%rbp), %rax
subss 0x40(%rax), %xmm0
xorps %xmm1, %xmm1
cmpless %xmm0, %xmm1
andps %xmm0, %xmm1
movss %xmm1, 0x11c(%rax)
movss 0x10(%rax), %xmm0
movss 0x118(%rax), %xmm2
addss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttps2dq %xmm2, %xmm1
cvtdq2ps %xmm1, %xmm1
movss %xmm1, 0xd8(%rax)
movss -0x40(%rbp), %xmm1
addss %xmm0, %xmm1
subss %xmm3, %xmm1
movss %xmm1, 0x240(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a7ff(%rip), %rdi     # 0xbb678
leaq 0x2a80b(%rip), %rsi     # 0xbb68b
leaq 0x41f8b(%rip), %rcx     # 0xd2e12
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x4179d(%rip), %rdi     # 0xd2635
leaq 0x4001b(%rip), %rsi     # 0xd0eba
leaq 0x417a2(%rip), %rcx     # 0xd2648
movl $0xe74, %edx            # imm = 0xE74
callq 0xc140
leaq 0x417d2(%rip), %rdi     # 0xd2689
leaq 0x3fffc(%rip), %rsi     # 0xd0eba
leaq 0x41783(%rip), %rcx     # 0xd2648
movl $0xe75, %edx            # imm = 0xE75
callq 0xc140
leaq 0x417d7(%rip), %rdi     # 0xd26ad
leaq 0x3ffdd(%rip), %rsi     # 0xd0eba
leaq 0x41764(%rip), %rcx     # 0xd2648
movl $0xe7a, %edx            # imm = 0xE7A
callq 0xc140