// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_font_atlas_clear
NK_API void
nk_font_atlas_clear(struct nk_font_atlas *atlas)
{
    NK_ASSERT(atlas);
    NK_ASSERT(atlas->temporary.alloc);
    NK_ASSERT(atlas->temporary.free);
    NK_ASSERT(atlas->permanent.alloc);
    NK_ASSERT(atlas->permanent.free);
    if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free) return;

    if (atlas->config) {
        struct nk_font_config *iter, *next;
        for (iter = atlas->config; iter; iter = next) {
            struct nk_font_config *i, *n;
            for (i = iter->n; i != iter; i = n) {
                n = i->n;
                if (i->ttf_blob)
                    atlas->permanent.free(atlas->permanent.userdata, i->ttf_blob);
                atlas->permanent.free(atlas->permanent.userdata, i);
            }
            next = iter->next;
            if (i->ttf_blob)
                atlas->permanent.free(atlas->permanent.userdata, iter->ttf_blob);
            atlas->permanent.free(atlas->permanent.userdata, iter);
        }
        atlas->config = 0;
    }
    if (atlas->fonts) {
        struct nk_font *iter, *next;
        for (iter = atlas->fonts; iter; iter = next) {
            next = iter->next;
            atlas->permanent.free(atlas->permanent.userdata, iter);
        }
        atlas->fonts = 0;
    }
    if (atlas->glyphs)
        atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);
    nk_zero_struct(*atlas);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x36998
movq 0x5167d(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x3b40f(%rip), %rsi     # 0x71d8c
leaq 0x3b426(%rip), %rdx     # 0x71daa
movl $0x45cf, %ecx           # imm = 0x45CF
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x30(%rbx)
jne 0x369cb
movq 0x5164a(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x3b3dc(%rip), %rsi     # 0x71d8c
leaq 0x3b3f3(%rip), %rdx     # 0x71daa
movl $0x45d0, %ecx           # imm = 0x45D0
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x38(%rbx)
jne 0x369fe
movq 0x51617(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x3b3a9(%rip), %rsi     # 0x71d8c
leaq 0x3b3c0(%rip), %rdx     # 0x71daa
movl $0x45d1, %ecx           # imm = 0x45D1
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x18(%rbx)
jne 0x36a31
movq 0x515e4(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x3b376(%rip), %rsi     # 0x71d8c
leaq 0x3b38d(%rip), %rdx     # 0x71daa
movl $0x45d2, %ecx           # imm = 0x45D2
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
cmpq $0x0, 0x20(%rbx)
jne 0x36a64
movq 0x515b1(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x3b343(%rip), %rsi     # 0x71d8c
leaq 0x3b35a(%rip), %rdx     # 0x71daa
movl $0x45d3, %ecx           # imm = 0x45D3
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %rbx, %rbx
je 0x36b98
cmpq $0x0, 0x18(%rbx)
je 0x36b98
cmpq $0x0, 0x20(%rbx)
je 0x36b98
movq 0x180(%rbx), %r14
testq %r14, %r14
je 0x36af6
movq 0x48(%r14), %r15
cmpq %r14, %r15
je 0x36ac0
movq 0x8(%r15), %rsi
movq 0x48(%r15), %r12
testq %rsi, %rsi
je 0x36aac
movq 0x10(%rbx), %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq *0x20(%rbx)
movq %r12, %r15
cmpq %r14, %r12
jne 0x36a98
jmp 0x36ac3
movq %r15, %r12
movq (%r14), %r15
cmpq $0x0, 0x8(%r12)
je 0x36ad9
movq 0x8(%r14), %rsi
movq 0x10(%rbx), %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq *0x20(%rbx)
movq %r15, %r14
testq %r15, %r15
jne 0x36a8f
movq $0x0, 0x180(%rbx)
movq 0x178(%rbx), %rsi
testq %rsi, %rsi
je 0x36b1f
movq (%rsi), %r14
movq 0x10(%rbx), %rdi
callq *0x20(%rbx)
movq %r14, %rsi
testq %r14, %r14
jne 0x36b02
movq $0x0, 0x178(%rbx)
movq 0x168(%rbx), %rsi
testq %rsi, %rsi
je 0x36b32
movq 0x10(%rbx), %rdi
callq *0x20(%rbx)
movq %rbx, %r14
andq $0x3, %r14
je 0x36b5d
movl $0x4, %r15d
subq %r14, %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x12b50
orq $0x18c, %r14            # imm = 0x18C
addq %r15, %rbx
jmp 0x36b63
movl $0x190, %r14d           # imm = 0x190
movl %r14d, %r15d
andl $-0x4, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x12b50
andq $0x3, %r14
je 0x36b98
addq %r15, %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x12b50
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq