// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::AddText(ImFont const*, float, ImVec2 const&, unsigned int, char const*, char const*, float, ImVec4 const*)
void ImDrawList::AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end, float wrap_width, const ImVec4* cpu_fine_clip_rect)
{
    if ((col & IM_COL32_A_MASK) == 0)
        return;

    if (text_end == NULL)
        text_end = text_begin + strlen(text_begin);
    if (text_begin == text_end)
        return;

    // Pull default font/size from the shared ImDrawListSharedData instance
    if (font == NULL)
        font = _Data->Font;
    if (font_size == 0.0f)
        font_size = _Data->FontSize;

    IM_ASSERT(font->ContainerAtlas->TexID == _CmdHeader.TextureId);  // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font.

    ImVec4 clip_rect = _CmdHeader.ClipRect;
    if (cpu_fine_clip_rect)
    {
        clip_rect.x = ImMax(clip_rect.x, cpu_fine_clip_rect->x);
        clip_rect.y = ImMax(clip_rect.y, cpu_fine_clip_rect->y);
        clip_rect.z = ImMin(clip_rect.z, cpu_fine_clip_rect->z);
        clip_rect.w = ImMin(clip_rect.w, cpu_fine_clip_rect->w);
    }
    font->RenderText(this, font_size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip_rect != NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x1000000, %ecx        # imm = 0x1000000
jb 0x64862
movaps %xmm1, %xmm4
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
testq %r9, %r9
jne 0x64788
movq %rbx, %rdi
movss %xmm4, -0x48(%rbp)
movss %xmm0, -0x44(%rbp)
callq 0xc380
movss -0x44(%rbp), %xmm0
movss -0x48(%rbp), %xmm4
movq %rax, %r9
addq %rbx, %r9
cmpq %rbx, %r9
je 0x64862
testq %r12, %r12
jne 0x6479e
movq 0x38(%r15), %rax
movq 0x8(%rax), %r12
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x647b1
jp 0x647b1
movq 0x38(%r15), %rax
movss 0x10(%rax), %xmm0
movq 0x40(%r12), %rax
movq 0x8(%rax), %rax
cmpq 0x98(%r15), %rax
jne 0x64871
movq 0x10(%rbp), %rax
movups 0x88(%r15), %xmm1
movaps %xmm1, -0x40(%rbp)
testq %rax, %rax
je 0x64839
movss (%rax), %xmm5
movss -0x40(%rbp), %xmm1
movss -0x3c(%rbp), %xmm2
movaps %xmm5, %xmm3
cmpless %xmm1, %xmm3
andps %xmm3, %xmm1
andnps %xmm5, %xmm3
orps %xmm1, %xmm3
movss %xmm3, -0x40(%rbp)
movss 0x4(%rax), %xmm3
movaps %xmm3, %xmm1
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movss %xmm1, -0x3c(%rbp)
movss -0x38(%rbp), %xmm1
minss 0x8(%rax), %xmm1
movss %xmm1, -0x38(%rbp)
movss -0x34(%rbp), %xmm1
minss 0xc(%rax), %xmm1
movss %xmm1, -0x34(%rbp)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movsd (%r13), %xmm1
movl %ecx, (%rsp)
leaq -0x40(%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %rbx, %r8
movaps %xmm4, %xmm2
callq 0x64890
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4fd63(%rip), %rdi     # 0xb45db
leaq 0x4fc57(%rip), %rsi     # 0xb44d6
leaq 0x4fd89(%rip), %rcx     # 0xb460f
movl $0x572, %edx            # imm = 0x572
callq 0xc140