// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::TextUnformatted(char const*, char const*)
void ImGui::TextUnformatted(const char* text, const char* text_end)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return;

    ImGuiState& g = *GImGui;
    IM_ASSERT(text != NULL);
    const char* text_begin = text;
    if (text_end == NULL)
        text_end = text + strlen(text); // FIXME-OPT

    const float wrap_pos_x = window->DC.TextWrapPos;
    const bool wrap_enabled = wrap_pos_x >= 0.0f;
    if (text_end - text > 2000 && !wrap_enabled)
    {
        // Long text!
        // Perform manual coarse clipping to optimize for long multi-line text
        // From this point we will only compute the width of lines that are visible. Optimization only available when word-wrapping is disabled.
        // We also don't vertically center the text within the line full height, which is unlikely to matter because we are likely the biggest and only item on the line.
        const char* line = text;
        const float line_height = ImGui::GetTextLineHeight();
        const ImVec2 text_pos = window->DC.CursorPos + ImVec2(0.0f, window->DC.CurrentLineTextBaseOffset);
        const ImRect clip_rect = window->ClipRect;
        ImVec2 text_size(0,0);

        if (text_pos.y <= clip_rect.Max.y)
        {
            ImVec2 pos = text_pos;

            // Lines to skip (can't skip when logging text)
            if (!g.LogEnabled)
            {
                int lines_skippable = (int)((clip_rect.Min.y - text_pos.y) / line_height);
                if (lines_skippable > 0)
                {
                    int lines_skipped = 0;
                    while (line < text_end && lines_skipped < lines_skippable)
                    {
                        const char* line_end = strchr(line, '\n');
                        line = line_end + 1;
                        lines_skipped++;
                    }
                    pos.y += lines_skipped * line_height;
                }
            }

            // Lines to render
            if (line < text_end)
            {
                ImRect line_rect(pos, pos + ImVec2(ImGui::GetWindowWidth(), line_height));
                while (line < text_end)
                {
                    const char* line_end = strchr(line, '\n');
                    if (IsClippedEx(line_rect, NULL, false))
                        break;

                    const ImVec2 line_size = CalcTextSize(line, line_end, false);
                    text_size.x = ImMax(text_size.x, line_size.x);
                    RenderText(pos, line, line_end, false);
                    if (!line_end)
                        line_end = text_end;
                    line = line_end + 1;
                    line_rect.Min.y += line_height;
                    line_rect.Max.y += line_height;
                    pos.y += line_height;
                }

                // Count remaining lines
                int lines_skipped = 0;
                while (line < text_end)
                {
                    const char* line_end = strchr(line, '\n');
                    if (!line_end)
                        line_end = text_end;
                    line = line_end + 1;
                    lines_skipped++;
                }
                pos.y += lines_skipped * line_height;
            }

            text_size.y += (pos - text_pos).y;
        }

        ImRect bb(text_pos, text_pos + text_size);
        ItemSize(bb);
        ItemAdd(bb, NULL);
    }
    else
    {
        const float wrap_width = wrap_enabled ? CalcWrapWidthForPos(window->DC.CursorPos, wrap_pos_x) : 0.0f;
        const ImVec2 text_size = CalcTextSize(text_begin, text_end, false, wrap_width);

        // Account of baseline offset
        ImVec2 text_pos = window->DC.CursorPos;
        text_pos.y += window->DC.CurrentLineTextBaseOffset;

        ImRect bb(text_pos, text_pos + text_size);
        ItemSize(text_size);
        if (!ItemAdd(bb, NULL))
            return;

        // Render (we don't hide text after ## in this end-user function)
        RenderTextWrapped(bb.Min, text_begin, text_end, wrap_width);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x47d24(%rip), %r13     # 0x55480
movq 0x1758(%r13), %r12
movb $0x1, 0x72(%r12)
cmpb $0x0, 0x74(%r12)
jne 0xdbf3
movq %rdi, %r14
testq %rdi, %rdi
je 0xdc05
movq %rsi, %rbx
testq %rsi, %rsi
jne 0xd797
movq %r14, %rdi
callq 0x72e0
movq %rax, %rbx
addq %r14, %rbx
movss 0x120(%r12), %xmm0
movq %rbx, %rax
subq %r14, %rax
cmpq $0x7d1, %rax            # imm = 0x7D1
jl 0xd8a0
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm0
jae 0xd8a0
movss 0xa8(%r12), %xmm1
addss %xmm4, %xmm1
movss 0xcc(%r12), %xmm2
addss 0xac(%r12), %xmm2
movaps %xmm1, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movss 0x1ec(%r12), %xmm0
ucomiss %xmm2, %xmm0
xorps %xmm5, %xmm5
jb 0xdbb1
movss 0x1718(%r13), %xmm4
cmpb $0x0, 0x2be8(%r13)
jne 0xd99a
movss 0x1e4(%r12), %xmm0
subss %xmm2, %xmm0
divss %xmm4, %xmm0
cvttss2si %xmm0, %r15d
testl %r15d, %r15d
jle 0xd99a
cmpq %r14, %rbx
jbe 0xd88c
movss %xmm4, -0x2c(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm1, -0x90(%rbp)
xorl %r13d, %r13d
movq %r14, %rdi
movl $0xa, %esi
callq 0x73f0
movq %rax, %r14
incq %r14
incl %r13d
cmpq %rbx, %r14
jae 0xd870
cmpl %r15d, %r13d
jl 0xd850
xorps %xmm5, %xmm5
cvtsi2ss %r13d, %xmm5
movaps -0x90(%rbp), %xmm1
movaps -0x80(%rbp), %xmm2
movaps -0x70(%rbp), %xmm3
movss -0x2c(%rbp), %xmm4
mulss %xmm4, %xmm5
addss %xmm2, %xmm5
movlhps %xmm3, %xmm5            # xmm5 = xmm5[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm5     # xmm5 = xmm5[2,0],xmm3[2,3]
jmp 0xd99d
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
xorps %xmm2, %xmm2
jb 0xd8c2
leaq 0xa8(%r12), %rdi
callq 0xb01a
movaps %xmm0, %xmm2
movq 0x47bbe(%rip), %r13     # 0x55480
movq 0x1710(%r13), %r15
movss 0x1718(%r13), %xmm0
movss 0x2faf6(%rip), %xmm1    # 0x3d3d0
movq %r15, %rdi
movss %xmm0, -0x60(%rbp)
movss %xmm2, -0x40(%rbp)
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x35430
ucomiss 0x2fadd(%rip), %xmm0    # 0x3d3d8
jbe 0xd912
movss -0x60(%rbp), %xmm2
divss (%r15), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
leaq -0xa8(%rbp), %rdi
movlps %xmm0, (%rdi)
movl 0xa8(%r12), %eax
movss 0xac(%r12), %xmm1
movd %eax, %xmm2
addss 0xcc(%r12), %xmm1
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
addss %xmm0, %xmm2
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
leaq -0xb8(%rbp), %r15
movl %eax, (%r15)
movss %xmm1, 0x4(%r15)
movlps %xmm2, 0x8(%r15)
xorps %xmm0, %xmm0
callq 0xa99d
movq %r15, %rdi
xorl %esi, %esi
callq 0xaaef
testb %al, %al
je 0xdbf3
movsd -0xb8(%rbp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
movss -0x40(%rbp), %xmm1
callq 0xe152
jmp 0xdbf3
movaps %xmm3, %xmm5
xorps %xmm0, %xmm0
cmpq %rbx, %r14
jae 0xdb23
movaps %xmm3, -0x70(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm5, %xmm1
shufps $0x55, %xmm5, %xmm1     # xmm1 = xmm1[1,1],xmm5[1,1]
movss 0x20(%r12), %xmm0
addss %xmm5, %xmm0
movss %xmm0, -0x44(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm5, -0xd0(%rbp)
movaps %xmm1, -0x40(%rbp)
movss %xmm1, -0x30(%rbp)
movss %xmm4, -0x2c(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps -0x40(%rbp), %xmm0
addss %xmm4, %xmm0
movaps %xmm0, -0x40(%rbp)
movq %r14, %rdi
movl $0xa, %esi
callq 0x73f0
movq %rax, %r15
movq 0x47a6b(%rip), %rax     # 0x55480
movq 0x1758(%rax), %rcx
movaps -0x40(%rbp), %xmm0
ucomiss 0x1e4(%rcx), %xmm0
jbe 0xda56
movss 0x1ec(%rcx), %xmm0
ucomiss -0x30(%rbp), %xmm0
jbe 0xda56
movss -0x44(%rbp), %xmm0
ucomiss 0x1e0(%rcx), %xmm0
jbe 0xda56
movss 0x1e8(%rcx), %xmm0
ucomiss -0xd0(%rbp), %xmm0
ja 0xda63
cmpb $0x1, 0x2be8(%rax)
jne 0xdb28
movq 0x1710(%rax), %r12
movss 0x1718(%rax), %xmm0
movq %r12, %rdi
movss %xmm0, -0x48(%rbp)
movss 0x2f94e(%rip), %xmm1    # 0x3d3d0
movss 0x2f912(%rip), %xmm2    # 0x3d39c
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x35430
ucomiss 0x2f93a(%rip), %xmm0    # 0x3d3d8
jbe 0xdaaf
movss -0x48(%rbp), %xmm1
divss (%r12), %xmm1
subss %xmm1, %xmm0
movaps %xmm0, %xmm1
movaps -0xa0(%rbp), %xmm2
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm0, %xmm1
orps %xmm1, %xmm2
movaps %xmm2, -0xa0(%rbp)
movaps -0x60(%rbp), %xmm0
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xdecf
movaps -0x60(%rbp), %xmm2
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
testq %r15, %r15
cmoveq %rbx, %r15
incq %r15
movss -0x2c(%rbp), %xmm4
movss -0x30(%rbp), %xmm0
addss %xmm4, %xmm0
movss %xmm0, -0x30(%rbp)
addss %xmm4, %xmm1
movlhps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
movq %r15, %r14
movaps %xmm1, %xmm5
cmpq %rbx, %r15
jb 0xd9ee
jmp 0xdb34
xorps %xmm4, %xmm4
jmp 0xdba5
movaps -0x60(%rbp), %xmm1
movq %r14, %r15
movss -0x2c(%rbp), %xmm4
xorps %xmm5, %xmm5
cmpq %rbx, %r15
jae 0xdb76
movaps %xmm1, -0x40(%rbp)
xorl %r14d, %r14d
movq %r15, %rdi
movl $0xa, %esi
callq 0x73f0
movq %rax, %r15
testq %rax, %rax
cmoveq %rbx, %r15
incq %r15
incl %r14d
cmpq %rbx, %r15
jb 0xdb43
xorps %xmm5, %xmm5
cvtsi2ss %r14d, %xmm5
movss -0x2c(%rbp), %xmm4
movaps -0x40(%rbp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
mulss %xmm4, %xmm5
addss %xmm0, %xmm5
movlhps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm5     # xmm5 = xmm5[2,0],xmm1[2,3]
movaps -0x90(%rbp), %xmm1
movaps -0x80(%rbp), %xmm2
movaps -0x70(%rbp), %xmm3
movaps -0xa0(%rbp), %xmm4
xorps %xmm0, %xmm0
shufps $0x55, %xmm5, %xmm5     # xmm5 = xmm5[1,1,1,1]
subss %xmm2, %xmm5
addss %xmm0, %xmm5
addss %xmm1, %xmm4
addss %xmm2, %xmm5
movaps %xmm4, %xmm0
unpcklps %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
movlhps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
leaq -0xb8(%rbp), %rbx
movups %xmm3, (%rbx)
subss %xmm1, %xmm4
subss %xmm2, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
leaq -0xa8(%rbp), %rdi
movlps %xmm4, (%rdi)
xorps %xmm0, %xmm0
callq 0xa99d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xaaef
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30569(%rip), %rdi     # 0x3e175
leaq 0x2faa2(%rip), %rsi     # 0x3d6b5
leaq 0x3056a(%rip), %rcx     # 0x3e184
movl $0x133d, %edx           # imm = 0x133D
callq 0x7140