// File: /workspace/github_cpp_makefile_star2_O1/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 0x34727
movq %rsi, %r14
cmpl $0x0, 0x8(%rsi)
jle 0x34727
movss 0x14(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3475d
movq %rdi, %rbx
cmpb $0x0, 0x38(%r14)
jne 0x34625
movl $0x78, %edi
callq 0x85d9
movq %rax, %r15
movq %rax, %rdi
callq 0x35a38
movl 0x30(%rbx), %r13d
movl 0x34(%rbx), %eax
cmpl %eax, %r13d
jne 0x34613
incl %r13d
testl %eax, %eax
je 0x345ce
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x345d3
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x34613
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x85d9
movq %rax, %r12
movq 0x38(%rbx), %rsi
movslq 0x30(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x38(%rbx), %rdi
callq 0x9065
movq %r12, 0x38(%rbx)
movl %r13d, 0x34(%rbx)
movq 0x38(%rbx), %rax
movslq 0x30(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x30(%rbx)
movq %r15, (%rax,%rcx,8)
movl 0x40(%rbx), %r12d
movl 0x44(%rbx), %eax
cmpl %eax, %r12d
jne 0x3468a
incl %r12d
testl %eax, %eax
je 0x34645
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x3464a
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0x3468a
movslq %r12d, %rax
imulq $0x68, %rax, %rdi
callq 0x85d9
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 0x9065
movq %r15, 0x48(%rbx)
movl %r12d, 0x44(%rbx)
movslq 0x40(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x40(%rbx)
imulq $0x68, %rax, %rdi
addq 0x48(%rbx), %rdi
movl $0xd, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movslq 0x40(%rbx), %rax
testq %rax, %rax
jle 0x3477c
movslq 0x30(%rbx), %rcx
testq %rcx, %rcx
jle 0x34746
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 0x346fe
movslq -0x60(%r15), %rdi
callq 0x85d9
movq %rax, -0x68(%r15)
movb $0x1, -0x5c(%r15)
movq (%r14), %rsi
movslq -0x60(%r15), %rdx
movq %rax, %rdi
callq 0x7080
movq %rbx, %rdi
callq 0x316dc
movslq 0x30(%rbx), %rax
testq %rax, %rax
jle 0x34746
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 0x1228e(%rip), %rdi     # 0x469bc
leaq 0x120e1(%rip), %rsi     # 0x46816
leaq 0x122bb(%rip), %rcx     # 0x469f7
movl $0x41b, %edx            # imm = 0x41B
callq 0x7140
leaq 0x12468(%rip), %rdi     # 0x46bb5
leaq 0xa33f(%rip), %rsi      # 0x3ea93
leaq 0xadc6(%rip), %rcx      # 0x3f521
jmp 0x34791
leaq 0x122c6(%rip), %rdi     # 0x46a2a
leaq 0x120ab(%rip), %rsi     # 0x46816
leaq 0x12285(%rip), %rcx     # 0x469f7
movl $0x41c, %edx            # imm = 0x41C
callq 0x7140
leaq 0x12432(%rip), %rdi     # 0x46bb5
leaq 0xa309(%rip), %rsi      # 0x3ea93
leaq 0x12c91(%rip), %rcx     # 0x47422
movl $0x326, %edx            # imm = 0x326
callq 0x7140
nop