// File: /workspace/github_cpp_makefile_star2_O1/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 $0xb8, %rsp
movq 0x47b3b(%rip), %r15     # 0x55490
movq 0x1758(%r15), %r12
movb $0x1, 0x72(%r12)
cmpb $0x0, 0x74(%r12)
jne 0xde0c
movq %rdi, %r14
testq %rdi, %rdi
je 0xde1e
movq %rsi, %rbx
testq %rsi, %rsi
jne 0xd990
movq %r14, %rdi
callq 0x72f0
movq %rax, %rbx
addq %r14, %rbx
movss 0x120(%r12), %xmm0
movq %rbx, %rax
subq %r14, %rax
cmpq $0x7d1, %rax            # imm = 0x7D1
jl 0xda9d
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jae 0xda9d
movss 0xa8(%r12), %xmm0
addss %xmm1, %xmm0
xorps %xmm3, %xmm3
movss 0xcc(%r12), %xmm1
addss 0xac(%r12), %xmm1
movaps %xmm0, -0xe0(%rbp)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0x90(%rbp)
movss 0x1ec(%r12), %xmm0
ucomiss %xmm1, %xmm0
movaps %xmm1, %xmm0
xorps %xmm2, %xmm2
jb 0xddb1
movaps %xmm0, -0x80(%rbp)
movss 0x1718(%r15), %xmm1
cmpb $0x0, 0x2be8(%r15)
movss %xmm1, -0x2c(%rbp)
jne 0xdb94
movss 0x1e4(%r12), %xmm0
subss -0x80(%rbp), %xmm0
divss %xmm1, %xmm0
cvttss2si %xmm0, %r15d
testl %r15d, %r15d
jle 0xdb94
cmpq %r14, %rbx
jbe 0xda7d
xorl %r13d, %r13d
movq %r14, %rdi
movl $0xa, %esi
callq 0x7400
movq %rax, %r14
incq %r14
incl %r13d
cmpq %rbx, %r14
jae 0xda70
cmpl %r15d, %r13d
jl 0xda50
xorps %xmm2, %xmm2
cvtsi2ss %r13d, %xmm2
movss -0x2c(%rbp), %xmm1
mulss %xmm1, %xmm2
addss -0x80(%rbp), %xmm2
movaps -0x90(%rbp), %xmm0
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm2     # xmm2 = xmm2[2,0],xmm0[2,3]
movaps %xmm2, -0x60(%rbp)
jmp 0xdb9f
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
xorps %xmm2, %xmm2
jb 0xdab8
leaq 0xa8(%r12), %rdi
callq 0xb131
movaps %xmm0, %xmm2
movq 0x479d1(%rip), %rax     # 0x55490
movq 0x1710(%rax), %r15
movss 0x1718(%rax), %xmm0
movss 0x2f8ea(%rip), %xmm1    # 0x3d3c0
movq %r15, %rdi
movss %xmm0, -0x50(%rbp)
movss %xmm2, -0x70(%rbp)
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x35d02
ucomiss 0x2f8a9(%rip), %xmm0    # 0x3d3a0
jbe 0xdb0e
movss -0x50(%rbp), %xmm2
divss (%r15), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
leaq -0xb8(%rbp), %rdi
movlps %xmm0, (%rdi)
movl 0xa8(%r12), %eax
movss 0xac(%r12), %xmm0
movd %eax, %xmm1
addss 0xcc(%r12), %xmm0
addss (%rdi), %xmm1
movss 0x4(%rdi), %xmm2
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xc8(%rbp), %r15
movl %eax, (%r15)
movss %xmm0, 0x4(%r15)
movlps %xmm1, 0x8(%r15)
xorps %xmm0, %xmm0
callq 0xaab7
movq %r15, %rdi
xorl %esi, %esi
callq 0xac09
testb %al, %al
je 0xde0c
movsd -0xc8(%rbp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
movss -0x70(%rbp), %xmm1
callq 0xe37f
jmp 0xde0c
movaps -0x90(%rbp), %xmm0
movaps %xmm0, -0x60(%rbp)
cmpq %rbx, %r14
jae 0xdd88
movss 0x20(%r12), %xmm2
movaps -0x60(%rbp), %xmm0
addss %xmm0, %xmm2
movss %xmm2, -0x30(%rbp)
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movaps %xmm2, -0xb0(%rbp)
addss %xmm1, %xmm2
movaps %xmm2, -0x70(%rbp)
movaps %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
cmpq %rbx, %r14
jae 0xdd2e
movq %r14, %rdi
movl $0xa, %esi
callq 0x7400
movq %rax, %r15
movq 0x47890(%rip), %rax     # 0x55490
movq 0x1758(%rax), %rcx
movaps -0x70(%rbp), %xmm0
ucomiss 0x1e4(%rcx), %xmm0
jbe 0xdc41
movss 0x1ec(%rcx), %xmm0
ucomiss -0xb0(%rbp), %xmm0
jbe 0xdc41
movss -0x30(%rbp), %xmm0
ucomiss 0x1e0(%rcx), %xmm0
jbe 0xdc41
movss 0x1e8(%rcx), %xmm0
ucomiss -0x60(%rbp), %xmm0
ja 0xdc4e
cmpb $0x1, 0x2be8(%rax)
jne 0xdd1f
movq 0x1710(%rax), %r12
movss 0x1718(%rax), %xmm0
movq %r12, %rdi
movss %xmm0, -0x34(%rbp)
movss 0x2f753(%rip), %xmm1    # 0x3d3c0
movss 0x2f717(%rip), %xmm2    # 0x3d38c
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x35d02
ucomiss 0x2f717(%rip), %xmm0    # 0x3d3a0
jbe 0xdca1
movss -0x34(%rbp), %xmm2
divss (%r12), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, %xmm1
movaps -0xa0(%rbp), %xmm2
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm0, %xmm1
orps %xmm1, %xmm2
movaps %xmm2, -0xa0(%rbp)
movaps -0x50(%rbp), %xmm0
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe0f3
movaps -0x50(%rbp), %xmm3
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0     # xmm0 = xmm0[1,1],xmm3[1,1]
testq %r15, %r15
cmoveq %rbx, %r15
incq %r15
movss -0x2c(%rbp), %xmm1
movaps -0xb0(%rbp), %xmm2
addss %xmm1, %xmm2
movaps %xmm2, -0xb0(%rbp)
movaps -0x70(%rbp), %xmm2
addss %xmm1, %xmm2
movaps %xmm2, -0x70(%rbp)
addss %xmm1, %xmm0
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
movb $0x1, %al
movaps %xmm0, -0x50(%rbp)
movq %r15, %r14
jmp 0xdd26
xorl %eax, %eax
movss -0x2c(%rbp), %xmm1
testb %al, %al
jne 0xdbe0
xorps %xmm2, %xmm2
cmpq %rbx, %r14
jae 0xdd68
xorl %r15d, %r15d
movq %r14, %rdi
movl $0xa, %esi
callq 0x7400
movq %rax, %r14
testq %rax, %rax
cmoveq %rbx, %r14
incq %r14
incl %r15d
cmpq %rbx, %r14
jb 0xdd39
xorps %xmm2, %xmm2
cvtsi2ss %r15d, %xmm2
movss -0x2c(%rbp), %xmm1
movaps -0x50(%rbp), %xmm3
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0     # xmm0 = xmm0[1,1],xmm3[1,1]
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
movlhps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm2     # xmm2 = xmm2[2,0],xmm3[2,3]
movaps -0x80(%rbp), %xmm0
jmp 0xdd9a
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps -0x80(%rbp), %xmm0
movaps -0x60(%rbp), %xmm2
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
subss %xmm0, %xmm2
addss 0x2f5f6(%rip), %xmm2    # 0x3d3a0
movaps -0xa0(%rbp), %xmm3
movaps %xmm0, %xmm1
movaps -0xe0(%rbp), %xmm0
addss %xmm3, %xmm0
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0x90(%rbp), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
leaq -0xc8(%rbp), %rbx
movups %xmm1, (%rbx)
movss 0x8(%rbx), %xmm0
movss 0xc(%rbx), %xmm1
subss (%rbx), %xmm0
subss 0x4(%rbx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0xb8(%rbp), %rdi
movlps %xmm0, (%rdi)
xorps %xmm0, %xmm0
callq 0xaab7
movq %rbx, %rdi
xorl %esi, %esi
callq 0xac09
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30320(%rip), %rdi     # 0x3e145
leaq 0x2f859(%rip), %rsi     # 0x3d685
leaq 0x30321(%rip), %rcx     # 0x3e154
movl $0x133d, %edx           # imm = 0x133D
callq 0x7140