// File: 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
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movss %xmm1, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x24(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x0, %eax
jne 0x1139e7
jmp 0x113b59
cmpq $0x0, -0x38(%rbp)
jne 0x113a0d
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0xd410
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x113a1c
jmp 0x113b59
cmpq $0x0, -0x10(%rbp)
jne 0x113a33
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x113a54
jp 0x113a54
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
cmpq 0x98(%rcx), %rax
jne 0x113a6f
jmp 0x113a8e
leaq 0x76805(%rip), %rdi     # 0x18a27b
leaq 0x766f9(%rip), %rsi     # 0x18a176
movl $0x572, %edx            # imm = 0x572
leaq 0x76826(%rip), %rcx     # 0x18a2af
callq 0xd180
movq -0x60(%rbp), %rax
movq 0x88(%rax), %rcx
movq %rcx, -0x4c(%rbp)
movq 0x90(%rax), %rax
movq %rax, -0x44(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x113b0e
movss -0x4c(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss (%rax), %xmm1
callq 0x10f610
movss %xmm0, -0x4c(%rbp)
movss -0x48(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss 0x4(%rax), %xmm1
callq 0x10f610
movss %xmm0, -0x48(%rbp)
movss -0x44(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss 0x8(%rax), %xmm1
callq 0x112de0
movss %xmm0, -0x44(%rbp)
movss -0x40(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss 0xc(%rax), %xmm1
callq 0x112de0
movss %xmm0, -0x40(%rbp)
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rdi
movss -0x14(%rbp), %xmm0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movss -0x3c(%rbp), %xmm2
movq 0x10(%rbp), %rax
testq %rax, %rax
setne %al
movsd -0x58(%rbp), %xmm1
movzbl %al, %ecx
andl $0x1, %ecx
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x4c(%rbp), %rcx
callq 0x113b60
addq $0x70, %rsp
popq %rbp
retq
nop