// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFont(ImFontConfig const*)
ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
{
    IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
    IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
    IM_ASSERT(font_cfg->SizePixels > 0.0f);

    // Create new font
    if (!font_cfg->MergeMode)
        Fonts.push_back(IM_NEW(ImFont));
    else
        IM_ASSERT(!Fonts.empty() && "Cannot use MergeMode for the first font"); // When using MergeMode make sure that a font has already been added before. You can use ImGui::GetIO().Fonts->AddFontDefault() to add the default imgui font.

    ConfigData.push_back(*font_cfg);
    ImFontConfig& new_font_cfg = ConfigData.back();
    if (new_font_cfg.DstFont == NULL)
        new_font_cfg.DstFont = Fonts.back();
    if (!new_font_cfg.FontDataOwnedByAtlas)
    {
        new_font_cfg.FontData = IM_ALLOC(new_font_cfg.FontDataSize);
        new_font_cfg.FontDataOwnedByAtlas = true;
        memcpy(new_font_cfg.FontData, font_cfg->FontData, (size_t)new_font_cfg.FontDataSize);
    }

    if (new_font_cfg.DstFont->EllipsisChar == (ImWchar)-1)
        new_font_cfg.DstFont->EllipsisChar = font_cfg->EllipsisChar;

    // Invalidate texture
    ClearTexData();
    return new_font_cfg.DstFont;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, (%rdi)
je 0x7d072
movq %rsi, %r14
cmpq $0x0, (%rsi)
je 0x7d053
cmpl $0x0, 0x8(%r14)
jle 0x7d053
movss 0x14(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7d091
movq %rdi, %rbx
cmpb $0x0, 0x48(%r14)
je 0x7ce58
cmpl $0x0, 0x40(%rbx)
jne 0x7cf19
leaq 0x527b7(%rip), %rdi     # 0xcf5f7
leaq 0x5238f(%rip), %rsi     # 0xcf1d6
leaq 0x5271f(%rip), %rcx     # 0xcf56d
movl $0x772, %edx            # imm = 0x772
callq 0xc140
movl $0x70, %edi
callq 0x424fb
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
xorl %eax, %eax
movq %rax, 0x30(%r15)
movl $0xffff003f, 0x52(%r15) # imm = 0xFFFF003F
movb $0x0, 0x56(%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x42(%r15)
movl $0x3f800000, 0x58(%r15) # imm = 0x3F800000
movq %rax, 0x5c(%r15)
movq %rax, 0x62(%r15)
movl 0x40(%rbx), %r13d
movl 0x44(%rbx), %eax
cmpl %eax, %r13d
jne 0x7cf0a
incl %r13d
testl %eax, %eax
je 0x7cec0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x7cec5
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x7cf0a
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x48(%rbx), %rsi
testq %rsi, %rsi
je 0x7cf02
movslq 0x40(%rbx), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x48(%rbx), %rdi
callq 0x425d4
movq %r12, 0x48(%rbx)
movl %r13d, 0x44(%rbx)
movq 0x48(%rbx), %rax
movslq 0x40(%rbx), %rcx
movq %r15, (%rax,%rcx,8)
incl 0x40(%rbx)
movl 0x60(%rbx), %r12d
movl 0x64(%rbx), %eax
cmpl %eax, %r12d
jne 0x7cf91
incl %r12d
testl %eax, %eax
je 0x7cf39
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x7cf3e
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0x7cf91
movslq %r12d, %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdi
callq 0x424fb
movq %rax, %r15
movq 0x68(%rbx), %rsi
testq %rsi, %rsi
je 0x7cf89
movslq 0x60(%rbx), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x68(%rbx), %rdi
callq 0x425d4
movq %r15, 0x68(%rbx)
movl %r12d, 0x64(%rbx)
movslq 0x60(%rbx), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdi
addq 0x68(%rbx), %rdi
movl $0x88, %edx
movq %r14, %rsi
callq 0xc080
movl 0x60(%rbx), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x60(%rbx)
testl %ecx, %ecx
js 0x7d0b0
movq 0x68(%rbx), %rcx
movl %eax, %eax
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
leaq (%rcx,%rax), %r15
cmpq $0x0, -0x8(%rcx,%rax)
jne 0x7cff9
movslq 0x40(%rbx), %rax
testq %rax, %rax
jle 0x7d0c7
movq 0x48(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rax
movq %rax, -0x8(%r15)
cmpb $0x0, -0x7c(%r15)
jne 0x7d024
movslq -0x80(%r15), %rdi
callq 0x424fb
movq %rax, -0x88(%r15)
movb $0x1, -0x7c(%r15)
movq (%r14), %rsi
movslq -0x80(%r15), %rdx
movq %rax, %rdi
callq 0xc080
movq -0x8(%r15), %rax
cmpw $-0x1, 0x54(%rax)
jne 0x7d038
movzwl 0x54(%r14), %ecx
movw %cx, 0x54(%rax)
movq %rbx, %rdi
callq 0x7ca4a
movq -0x8(%r15), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x52546(%rip), %rdi     # 0xcf5a0
leaq 0x52175(%rip), %rsi     # 0xcf1d6
leaq 0x52505(%rip), %rcx     # 0xcf56d
movl $0x76b, %edx            # imm = 0x76B
callq 0xc140
leaq 0x5241b(%rip), %rdi     # 0xcf494
leaq 0x52156(%rip), %rsi     # 0xcf1d6
leaq 0x524e6(%rip), %rcx     # 0xcf56d
movl $0x76a, %edx            # imm = 0x76A
callq 0xc140
leaq 0x52543(%rip), %rdi     # 0xcf5db
leaq 0x52137(%rip), %rsi     # 0xcf1d6
leaq 0x524c7(%rip), %rcx     # 0xcf56d
movl $0x76c, %edx            # imm = 0x76C
callq 0xc140
leaq 0x52923(%rip), %rdi     # 0xcf9da
leaq 0x3e5cd(%rip), %rsi     # 0xbb68b
leaq 0x53baa(%rip), %rcx     # 0xd0c6f
jmp 0x7d0dc
leaq 0x5290c(%rip), %rdi     # 0xcf9da
leaq 0x3e5b6(%rip), %rsi     # 0xbb68b
leaq 0x3fc21(%rip), %rcx     # 0xbccfd
movl $0x666, %edx            # imm = 0x666
callq 0xc140