// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::RenderTextClipped(ImVec2 const&, ImVec2 const&, char const*, char const*, ImVec2 const*, int, ImVec2 const*, ImVec2 const*)
void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, ImGuiAlign align, const ImVec2* clip_min, const ImVec2* clip_max)
{
    // Hide anything after a '##' string
    const char* text_display_end = FindTextDisplayEnd(text, text_end);
    const int text_len = (int)(text_display_end - text);
    if (text_len == 0)
        return;

    ImGuiState& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();

    // Perform CPU side clipping for single clipped element to avoid using scissor state
    ImVec2 pos = pos_min;
    const ImVec2 text_size = text_size_if_known ? *text_size_if_known : ImGui::CalcTextSize(text, text_display_end, false, 0.0f);

    if (!clip_max) clip_max = &pos_max;
    bool need_clipping = (pos.x + text_size.x >= clip_max->x) || (pos.y + text_size.y >= clip_max->y);
    if (!clip_min) clip_min = &pos_min; else need_clipping |= (pos.x < clip_min->x) || (pos.y < clip_min->y);

    // Align
    if (align & ImGuiAlign_Center) pos.x = ImMax(pos.x, (pos.x + pos_max.x - text_size.x) * 0.5f);
    else if (align & ImGuiAlign_Right) pos.x = ImMax(pos.x, pos_max.x - text_size.x);
    if (align & ImGuiAlign_VCenter) pos.y = ImMax(pos.y, (pos.y + pos_max.y - text_size.y) * 0.5f);

    // Render
    if (need_clipping)
    {
        ImVec4 fine_clip_rect(clip_min->x, clip_min->y, clip_max->x, clip_max->y);
        window->DrawList->AddText(g.Font, g.FontSize, pos, window->Color(ImGuiCol_Text), text, text_display_end, 0.0f, &fine_clip_rect);
    }
    else
    {
        window->DrawList->AddText(g.Font, g.FontSize, pos, window->Color(ImGuiCol_Text), text, text_display_end, 0.0f, NULL);
    }
    if (g.LogEnabled)
        LogRenderedText(pos, text, text_display_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xe1e7
cmpl %ebx, %eax
je 0xe711
movq %rax, -0x40(%rbp)
movq 0x18(%rbp), %r15
movq 0x46fe7(%rip), %rsi     # 0x55490
movq 0x1758(%rsi), %r9
movb $0x1, 0x72(%r9)
movq (%r13), %rax
movq %rax, -0x38(%rbp)
testq %r14, %r14
je 0xe4c9
movsd (%r14), %xmm0
jmp 0xe52f
movq 0x1710(%rsi), %rdi
movss 0x1718(%rsi), %xmm0
movss 0x2eee0(%rip), %xmm1    # 0x3d3c0
xorps %xmm2, %xmm2
movq %r12, -0x58(%rbp)
movq %r9, %r12
movq %rdi, -0x50(%rbp)
movss %xmm0, -0x44(%rbp)
movq %rsi, %r14
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
callq 0x35d02
movq %r12, %r9
movq -0x58(%rbp), %r12
movq %r14, %rsi
ucomiss 0x2ee8b(%rip), %xmm0    # 0x3d3a0
jbe 0xe52f
movss -0x44(%rbp), %xmm2
movq -0x50(%rbp), %rax
divss (%rax), %xmm2
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movq 0x10(%rbp), %rax
testq %r15, %r15
cmoveq %r12, %r15
movss -0x38(%rbp), %xmm3
movaps %xmm3, %xmm2
addss %xmm0, %xmm2
movss (%r15), %xmm1
movb $0x1, %cl
ucomiss %xmm1, %xmm2
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movl -0x2c(%rbp), %r8d
jae 0xe56e
movss -0x34(%rbp), %xmm4
addss %xmm2, %xmm4
ucomiss 0x4(%r15), %xmm4
setae %cl
testq %rax, %rax
je 0xe58e
movss (%rax), %xmm4
movb $0x1, %dl
ucomiss %xmm3, %xmm4
ja 0xe58a
movss 0x4(%rax), %xmm4
ucomiss -0x34(%rbp), %xmm4
seta %dl
orb %dl, %cl
jmp 0xe591
movq %r13, %rax
testb $0x2, %r8b
jne 0xe5a9
testb $0x4, %r8b
je 0xe5d8
movss (%r12), %xmm4
subss %xmm0, %xmm4
jmp 0xe5bf
movss (%r12), %xmm4
addss %xmm3, %xmm4
subss %xmm0, %xmm4
mulss 0x2edfd(%rip), %xmm4    # 0x3d3bc
movaps %xmm4, %xmm0
cmpless %xmm3, %xmm0
movaps %xmm0, %xmm5
andnps %xmm4, %xmm5
andps %xmm3, %xmm0
orps %xmm5, %xmm0
movss %xmm0, -0x38(%rbp)
testb $0x10, %r8b
je 0xe613
movss -0x34(%rbp), %xmm0
movss 0x4(%r12), %xmm3
addss %xmm0, %xmm3
subss %xmm2, %xmm3
mulss 0x2edc2(%rip), %xmm3    # 0x3d3bc
movaps %xmm3, %xmm2
cmpless %xmm0, %xmm2
movaps %xmm2, %xmm4
andnps %xmm3, %xmm4
andps %xmm0, %xmm2
orps %xmm4, %xmm2
movss %xmm2, -0x34(%rbp)
testb %cl, %cl
je 0xe683
movq (%rax), %rax
movss 0x4(%r15), %xmm0
leaq -0x80(%rbp), %r15
movq %rax, (%r15)
movss %xmm1, 0x8(%r15)
movss %xmm0, 0xc(%r15)
movq 0x270(%r9), %r14
movq 0x1710(%rsi), %r12
movss 0x1718(%rsi), %xmm0
movss %xmm0, -0x2c(%rbp)
movq 0x46e3b(%rip), %rax     # 0x55490
movups 0x1460(%rax), %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movq %rsi, %r13
callq 0x8cce
movq %r15, (%rsp)
jmp 0xe6d5
movq 0x270(%r9), %r14
movq 0x1710(%rsi), %r12
movss 0x1718(%rsi), %xmm0
movss %xmm0, -0x2c(%rbp)
movq 0x46deb(%rip), %rax     # 0x55490
movups 0x1460(%rax), %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movq %rsi, %r13
callq 0x8cce
movq $0x0, (%rsp)
leaq -0x38(%rbp), %rdx
xorps %xmm1, %xmm1
movq %r14, %rdi
movq %r12, %rsi
movss -0x2c(%rbp), %xmm0
movl %eax, %ecx
movq %rbx, %r8
movq -0x40(%rbp), %r14
movq %r14, %r9
callq 0x3081e
cmpb $0x1, 0x2be8(%r13)
jne 0xe711
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe244
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq