// File: /workspace/github_cpp_makefile_star2_O3/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 0x6d074(%rip), %rax     # 0xfbcd0
movq (%rax), %rbx
movq 0x1ae0(%rbx), %r15
movb $0x1, 0x90(%r15)
testl %esi, %esi
jle 0x8f14b
movl %edx, -0x40(%rbp)
cmpq $0x0, 0x1b0(%r15)
jne 0x8f16a
movl %esi, %r12d
callq 0x8ebea
movl %eax, %r13d
movq %r15, %rdi
movl %eax, %esi
callq 0x8ea36
cmpl %r13d, (%rax)
jne 0x8f189
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 0x262d8(%rip), %xmm0    # 0xb5004
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 0x2624f(%rip), %xmm0    # 0xb4fe4
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), %r13d
cmpl %r13d, %eax
sete %dl
orb %cl, %dl
movq %r15, -0x48(%rbp)
movq %r12, -0x30(%rbp)
je 0x8edf8
testl %eax, %eax
sete 0x8(%r14)
jne 0x8ef7f
movl 0x64(%r14), %ebx
movq -0x30(%rbp), %r15
jmp 0x8ee51
movq %r12, %r15
movl 0x64(%r14), %ebx
testl %ebx, %ebx
jns 0x8ee44
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x41c63
movq %rax, %r12
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x8ee38
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 0x41d3c
movq %r12, 0x68(%r14)
movl $0x0, 0x64(%r14)
movl $0x0, 0x60(%r14)
movb $0x1, 0x8(%r14)
cmpl %r15d, %ebx
movl %r13d, %ebx
jg 0x8ee9f
movl %ebx, %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdi
addq %rax, %rdi
callq 0x41c63
movq %rax, %r12
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x8ee97
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 0x41d3c
movq %r12, 0x68(%r14)
movl %ebx, 0x64(%r14)
xorps %xmm1, %xmm1
cvtsi2ss %r15d, %xmm1
movl 0x60(%r14), %r13d
xorl %r15d, %r15d
xorps %xmm2, %xmm2
movss %xmm1, -0x40(%rbp)
cmpl 0x64(%r14), %r13d
jne 0x8eed1
testl %r13d, %r13d
je 0x8eed7
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
sarl %eax
addl %r13d, %eax
jmp 0x8eedc
movq 0x68(%r14), %r12
jmp 0x8ef39
movl $0x8, %eax
incl %r13d
cmpl %r13d, %eax
cmovgl %eax, %r13d
movslq %r13d, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdi
addq %rax, %rdi
callq 0x41c63
movq %rax, %r12
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x8ef25
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 0x41d3c
movq %r12, 0x68(%r14)
movl %r13d, 0x64(%r14)
movl 0x60(%r14), %r13d
movss -0x40(%rbp), %xmm1
xorps %xmm2, %xmm2
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
divss %xmm1, %xmm0
movslq %r13d, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movss %xmm0, (%r12,%rcx)
movups %xmm2, 0x4(%r12,%rcx)
movq $0x0, 0x14(%r12,%rcx)
movl 0x60(%r14), %r13d
incl %r13d
movl %r13d, 0x60(%r14)
incl %r15d
cmpl %r15d, %ebx
jne 0x8eeb6
movq -0x48(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0x60(%rbp)
movl -0x30(%rbp), %eax
movq %rax, -0x58(%rbp)
movl $0xc, %ebx
xorl %r15d, %r15d
movq -0x48(%rbp), %r13
movslq 0x60(%r14), %rax
cmpq %rax, %r15
jge 0x8f12c
movq 0x68(%r14), %r12
movss 0x10(%r13), %xmm0
movss %xmm0, -0x40(%rbp)
movl %r15d, %edi
callq 0x8e54a
addss -0x40(%rbp), %xmm0
movss 0x26033(%rip), %xmm1    # 0xb5004
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 0x8e54a
addss -0x30(%rbp), %xmm0
addss 0x25fcd(%rip), %xmm0    # 0xb4fd0
addss 0x25ff9(%rip), %xmm0    # 0xb5004
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 0x5e30c
addq $0x1c, %rbx
cmpq %r15, -0x58(%rbp)
jne 0x8efa0
movl 0x10(%r14), %edx
cmpl $0x1, %edx
jle 0x8f090
movq %r14, %r15
addq $0x70, %r15
movq -0x48(%rbp), %rbx
movq 0x2b8(%rbx), %rsi
incl %edx
movq %r15, %rdi
callq 0x7a356
movq 0x2b8(%rbx), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x7a998
xorl %edi, %edi
callq 0x8e8dd
movl 0xc(%r14), %edi
callq 0x8e54a
movss %xmm0, -0x30(%rbp)
movl 0xc(%r14), %edi
incl %edi
callq 0x8e54a
movss %xmm0, -0x40(%rbp)
subss -0x30(%rbp), %xmm0
mulss 0x267f9(%rip), %xmm0    # 0xb58b4
callq 0x55d0a
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 0x2a545(%rip), %rdi     # 0xb9678
leaq 0x2a551(%rip), %rsi     # 0xb968b
leaq 0x41ba3(%rip), %rcx     # 0xd0ce4
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x414b3(%rip), %rdi     # 0xd0605
leaq 0x3fd31(%rip), %rsi     # 0xcee8a
leaq 0x414b8(%rip), %rcx     # 0xd0618
movl $0xe74, %edx            # imm = 0xE74
callq 0xc140
leaq 0x414e8(%rip), %rdi     # 0xd0659
leaq 0x3fd12(%rip), %rsi     # 0xcee8a
leaq 0x41499(%rip), %rcx     # 0xd0618
movl $0xe75, %edx            # imm = 0xE75
callq 0xc140
leaq 0x414ed(%rip), %rdi     # 0xd067d
leaq 0x3fcf3(%rip), %rsi     # 0xcee8a
leaq 0x4147a(%rip), %rcx     # 0xd0618
movl $0xe7a, %edx            # imm = 0xE7A
callq 0xc140