// File: /workspace/github_cpp_makefile_star2_O3/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 $0x78, %rsp
movl %r9d, %r12d
movq %r8, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xdfc4
cmpl %ebx, %eax
je 0xe4f6
movl %r12d, -0x48(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq 0x18(%rbp), %r15
movq 0x471fc(%rip), %rsi     # 0x55480
movq 0x1758(%rsi), %r10
movb $0x1, 0x72(%r10)
movq (%r13), %r12
movq %r12, -0x30(%rbp)
movd %r12d, %xmm6
shrq $0x20, %r12
testq %r14, %r14
je 0xe2ad
movsd (%r14), %xmm0
jmp 0xe317
movq 0x1710(%rsi), %rdi
movss 0x1718(%rsi), %xmm0
movss 0x2f10c(%rip), %xmm1    # 0x3d3d0
xorps %xmm2, %xmm2
movq %r10, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
movss %xmm0, -0x44(%rbp)
movq %rsi, %r14
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movdqa %xmm6, -0x70(%rbp)
callq 0x35430
movdqa -0x70(%rbp), %xmm6
movq -0x58(%rbp), %r10
movq %r14, %rsi
ucomiss 0x2f0db(%rip), %xmm0    # 0x3d3d8
jbe 0xe317
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
movd %r12d, %xmm2
testq %r15, %r15
movq -0x38(%rbp), %r8
cmoveq %r8, %r15
movaps %xmm0, %xmm3
addss %xmm6, %xmm3
movss (%r15), %xmm1
movb $0x1, %cl
ucomiss %xmm1, %xmm3
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
jae 0xe354
movaps %xmm3, %xmm4
addss %xmm2, %xmm4
ucomiss 0x4(%r15), %xmm4
setae %cl
testq %rax, %rax
movl -0x48(%rbp), %r9d
je 0xe377
movss (%rax), %xmm4
movb $0x1, %dl
ucomiss %xmm6, %xmm4
ja 0xe373
movss 0x4(%rax), %xmm4
ucomiss %xmm2, %xmm4
seta %dl
orb %dl, %cl
jmp 0xe37a
movq %r13, %rax
testb $0x2, %r9b
jne 0xe391
testb $0x4, %r9b
je 0xe3bf
movss (%r8), %xmm4
subss %xmm0, %xmm4
jmp 0xe3a6
movss (%r8), %xmm4
addss %xmm6, %xmm4
subss %xmm0, %xmm4
mulss 0x2f026(%rip), %xmm4    # 0x3d3cc
movaps %xmm4, %xmm0
cmpless %xmm6, %xmm0
movaps %xmm0, %xmm5
andnps %xmm4, %xmm5
andps %xmm6, %xmm0
orps %xmm5, %xmm0
movss %xmm0, -0x30(%rbp)
testb $0x10, %r9b
je 0xe3f4
movss 0x4(%r8), %xmm0
addss %xmm2, %xmm0
subss %xmm3, %xmm0
mulss 0x2eff1(%rip), %xmm0    # 0x3d3cc
movaps %xmm0, %xmm3
cmpless %xmm2, %xmm3
movaps %xmm3, %xmm4
andnps %xmm0, %xmm4
andps %xmm2, %xmm3
orps %xmm4, %xmm3
movss %xmm3, -0x2c(%rbp)
testb %cl, %cl
je 0xe467
movq (%rax), %rax
movss 0x4(%r15), %xmm0
leaq -0x90(%rbp), %r15
movq %rax, (%r15)
movss %xmm1, 0x8(%r15)
movss %xmm0, 0xc(%r15)
movq 0x270(%r10), %r14
movq 0x1710(%rsi), %r12
movss 0x1718(%rsi), %xmm0
movss %xmm0, -0x38(%rbp)
movq 0x47047(%rip), %rax     # 0x55480
movups 0x1460(%rax), %xmm0
leaq -0x80(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movq %rsi, %r13
callq 0x8c82
movq %r15, (%rsp)
jmp 0xe4b9
movq 0x270(%r10), %r14
movq 0x1710(%rsi), %r12
movss 0x1718(%rsi), %xmm0
movss %xmm0, -0x38(%rbp)
movq 0x46ff7(%rip), %rax     # 0x55480
movups 0x1460(%rax), %xmm0
leaq -0x80(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movq %rsi, %r13
callq 0x8c82
movq $0x0, (%rsp)
leaq -0x30(%rbp), %rdx
xorps %xmm1, %xmm1
movq %r14, %rdi
movq %r12, %rsi
movss -0x38(%rbp), %xmm0
movl %eax, %ecx
movq %rbx, %r8
movq -0x40(%rbp), %r14
movq %r14, %r9
callq 0x30008
cmpb $0x1, 0x2be8(%r13)
jne 0xe4f6
movss -0x2c(%rbp), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe021
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq