// File: /workspace/github_cpp_makefile_star2_O3/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 0x7b75f
movq %rsi, %r14
cmpq $0x0, (%rsi)
je 0x7b740
cmpl $0x0, 0x8(%r14)
jle 0x7b740
movss 0x14(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x7b77e
movq %rdi, %rbx
cmpb $0x0, 0x48(%r14)
je 0x7b54a
cmpl $0x0, 0x40(%rbx)
jne 0x7b606
leaq 0x52095(%rip), %rdi     # 0xcd5c7
leaq 0x51c6d(%rip), %rsi     # 0xcd1a6
leaq 0x51ffd(%rip), %rcx     # 0xcd53d
movl $0x772, %edx            # imm = 0x772
callq 0xc140
movl $0x70, %edi
callq 0x41c63
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), %eax
cmpl 0x44(%rbx), %eax
jne 0x7b5af
leal 0x1(%rax), %r13d
testl %eax, %eax
je 0x7b5b5
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x7b5ba
movq 0x48(%rbx), %r12
jmp 0x7b5fd
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r12
movq 0x48(%rbx), %rsi
testq %rsi, %rsi
je 0x7b5f2
movslq 0x40(%rbx), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x48(%rbx), %rdi
callq 0x41d3c
movq %r12, 0x48(%rbx)
movl %r13d, 0x44(%rbx)
movl 0x40(%rbx), %eax
cltq
movq %r15, (%r12,%rax,8)
incl 0x40(%rbx)
movl 0x60(%rbx), %eax
cmpl 0x64(%rbx), %eax
jne 0x7b623
leal 0x1(%rax), %r12d
testl %eax, %eax
je 0x7b629
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x7b62e
movq 0x68(%rbx), %r15
jmp 0x7b67f
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdi
callq 0x41c63
movq %rax, %r15
movq 0x68(%rbx), %rsi
testq %rsi, %rsi
je 0x7b674
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 0x41d3c
movq %r15, 0x68(%rbx)
movl %r12d, 0x64(%rbx)
movl 0x60(%rbx), %eax
cltq
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdi
addq %r15, %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 0x7b79d
movq 0x68(%rbx), %rcx
movl %eax, %eax
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
leaq (%rcx,%rax), %r15
movq -0x8(%rcx,%rax), %rax
testq %rax, %rax
jne 0x7b6e6
movslq 0x40(%rbx), %rax
testq %rax, %rax
jle 0x7b7b4
movq 0x48(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rax
movq %rax, -0x8(%r15)
cmpb $0x0, -0x7c(%r15)
jne 0x7b715
movslq -0x80(%r15), %rdi
callq 0x41c63
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 0x7b725
movzwl 0x54(%r14), %ecx
movw %cx, 0x54(%rax)
movq %rbx, %rdi
callq 0x7b13a
movq -0x8(%r15), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x51e29(%rip), %rdi     # 0xcd570
leaq 0x51a58(%rip), %rsi     # 0xcd1a6
leaq 0x51de8(%rip), %rcx     # 0xcd53d
movl $0x76b, %edx            # imm = 0x76B
callq 0xc140
leaq 0x51cfe(%rip), %rdi     # 0xcd464
leaq 0x51a39(%rip), %rsi     # 0xcd1a6
leaq 0x51dc9(%rip), %rcx     # 0xcd53d
movl $0x76a, %edx            # imm = 0x76A
callq 0xc140
leaq 0x51e26(%rip), %rdi     # 0xcd5ab
leaq 0x51a1a(%rip), %rsi     # 0xcd1a6
leaq 0x51daa(%rip), %rcx     # 0xcd53d
movl $0x76c, %edx            # imm = 0x76C
callq 0xc140
leaq 0x52206(%rip), %rdi     # 0xcd9aa
leaq 0x3dee0(%rip), %rsi     # 0xb968b
leaq 0x53459(%rip), %rcx     # 0xcec0b
jmp 0x7b7c9
leaq 0x521ef(%rip), %rdi     # 0xcd9aa
leaq 0x3dec9(%rip), %rsi     # 0xb968b
leaq 0x53477(%rip), %rcx     # 0xcec40
movl $0x666, %edx            # imm = 0x666
callq 0xc140
nop