// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFont(ImFontConfig const*)
ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
{
    IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
    IM_ASSERT(font_cfg->SizePixels > 0.0f);

    // Create new font
    if (!font_cfg->MergeMode)
    {
        ImFont* font = (ImFont*)ImGui::MemAlloc(sizeof(ImFont));
        new (font) ImFont();
        Fonts.push_back(font);
    }

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

    // Invalidate texture
    ClearTexData();
    return Fonts.back();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, (%rsi)
je 0x33e86
movq %rsi, %r14
cmpl $0x0, 0x8(%rsi)
jle 0x33e86
movss 0x14(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x33ebc
movq %rdi, %rbx
cmpb $0x0, 0x38(%r14)
jne 0x33d89
movl $0x78, %edi
callq 0x8589
movq %rax, %r15
movq %rax, %rdi
callq 0x3516c
movl 0x30(%rbx), %eax
cmpl 0x34(%rbx), %eax
jne 0x33d32
leal 0x1(%rax), %ecx
testl %eax, %eax
je 0x33d38
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %eax, %edx
jmp 0x33d3d
movq 0x38(%rbx), %r12
jmp 0x33d7d
movl $0x8, %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movslq %ecx, %r13
leaq (,%r13,8), %rdi
callq 0x8589
movq %rax, %r12
movq 0x38(%rbx), %rsi
movslq 0x30(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x38(%rbx), %rdi
callq 0x9019
movq %r12, 0x38(%rbx)
movl %r13d, 0x34(%rbx)
movl 0x30(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x30(%rbx)
cltq
movq %r15, (%r12,%rax,8)
movl 0x40(%rbx), %eax
cmpl 0x44(%rbx), %eax
jne 0x33da5
leal 0x1(%rax), %ecx
testl %eax, %eax
je 0x33dab
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %eax, %edx
jmp 0x33db0
movq 0x48(%rbx), %r15
jmp 0x33dec
movl $0x8, %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movslq %ecx, %r12
imulq $0x68, %r12, %rdi
callq 0x8589
movq %rax, %r15
movq 0x48(%rbx), %rsi
movslq 0x40(%rbx), %rax
imulq $0x68, %rax, %rdx
movq %r15, %rdi
callq 0x7080
movq 0x48(%rbx), %rdi
callq 0x9019
movq %r15, 0x48(%rbx)
movl %r12d, 0x44(%rbx)
movl 0x40(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x40(%rbx)
cltq
imulq $0x68, %rax, %rdi
addq %r15, %rdi
movl $0xd, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movslq 0x40(%rbx), %rax
testq %rax, %rax
jle 0x33edb
movslq 0x30(%rbx), %rcx
testq %rcx, %rcx
jle 0x33ea5
imulq $0x68, %rax, %r15
addq 0x48(%rbx), %r15
movq 0x38(%rbx), %rax
movq -0x8(%rax,%rcx,8), %rax
movq %rax, -0x8(%r15)
cmpb $0x0, -0x5c(%r15)
jne 0x33e5d
movslq -0x60(%r15), %rdi
callq 0x8589
movq %rax, -0x68(%r15)
movb $0x1, -0x5c(%r15)
movq (%r14), %rsi
movslq -0x60(%r15), %rdx
movq %rax, %rdi
callq 0x7080
movq %rbx, %rdi
callq 0x30e20
movslq 0x30(%rbx), %rax
testq %rax, %rax
jle 0x33ea5
movq 0x38(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12aaf(%rip), %rdi     # 0x4693c
leaq 0x12902(%rip), %rsi     # 0x46796
leaq 0x12adc(%rip), %rcx     # 0x46977
movl $0x41b, %edx            # imm = 0x41B
callq 0x7140
leaq 0x12c89(%rip), %rdi     # 0x46b35
leaq 0xac10(%rip), %rsi      # 0x3eac3
leaq 0x13526(%rip), %rcx     # 0x473e0
jmp 0x33ef0
leaq 0x12ae7(%rip), %rdi     # 0x469aa
leaq 0x128cc(%rip), %rsi     # 0x46796
leaq 0x12aa6(%rip), %rcx     # 0x46977
movl $0x41c, %edx            # imm = 0x41C
callq 0x7140
leaq 0x12c53(%rip), %rdi     # 0x46b35
leaq 0xabda(%rip), %rsi      # 0x3eac3
leaq 0x134b2(%rip), %rcx     # 0x473a2
movl $0x326, %edx            # imm = 0x326
callq 0x7140