// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_create_page_element
NK_LIB struct nk_page_element*
nk_create_page_element(struct nk_context *ctx)
{
    struct nk_page_element *elem;
    if (ctx->freelist) {
        /* unlink page element from free list */
        elem = ctx->freelist;
        ctx->freelist = elem->next;
    } else if (ctx->use_pool) {
        /* allocate page element from memory pool */
        elem = nk_pool_alloc(&ctx->pool);
        NK_ASSERT(elem);
        if (!elem) return 0;
    } else {
        /* allocate new page element from back of fixed size memory buffer */
        NK_STORAGE const nk_size size = sizeof(struct nk_page_element);
        NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_page_element);
        elem = (struct nk_page_element*)nk_buffer_alloc(&ctx->memory, NK_BUFFER_BACK, size, align);
        NK_ASSERT(elem);
        if (!elem) return 0;
    }
    nk_zero_struct(*elem);
    elem->next = 0;
    elem->prev = 0;
    return elem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x4788(%rdi), %rbx
testq %rbx, %rbx
je 0x56b2e
movq 0x1f8(%rbx), %rax
movq %rax, 0x4788(%r14)
jmp 0x56c1f
cmpl $0x0, 0x471c(%r14)
je 0x56b64
movq 0x4740(%r14), %rax
testq %rax, %rax
je 0x56bb2
movl (%rax), %ebx
movl 0x4750(%r14), %ecx
cmpl %ecx, %ebx
jb 0x56c05
cmpl $0x0, 0x4738(%r14)
jne 0x56bc7
jmp 0x56cc3
addq $0x2508, %r14           # imm = 0x2508
movl $0x208, %edx            # imm = 0x208
movl $0x8, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x256b9
movq %rax, %rbx
testq %rax, %rax
jne 0x56c1f
movq 0x3045b(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1a1fd(%rip), %rsi     # 0x70d9c
leaq 0x1a214(%rip), %rdx     # 0x70dba
xorl %ebx, %ebx
movl $0x4c0b, %ecx           # imm = 0x4C0B
jmp 0x56d12
cmpl $0x0, 0x4738(%r14)
je 0x56c82
movl 0x4750(%r14), %ecx
decl %ecx
movq %rcx, %rax
shlq $0x9, %rax
leaq (%rax,%rcx,8), %rdx
addq $0x218, %rdx            # imm = 0x218
movq 0x4720(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq *0x4728(%r14)
movq 0x4740(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x4740(%r14)
movl $0x0, (%rax)
leal 0x1(%rbx), %ecx
movl %ecx, (%rax)
movl %ebx, %ecx
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,8), %rcx
leaq (%rax,%rcx), %rbx
addq $0x10, %rbx
movq %rbx, %r14
andq $0x3, %r14
je 0x56c60
movl $0x4, %r15d
subq %r14, %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x12b50
leaq (%rbx,%r15), %rdi
movl $0x204, %edx            # imm = 0x204
xorl %esi, %esi
callq 0x12b50
leaq (%rbx,%r15), %rdi
addq $0x204, %rdi            # imm = 0x204
xorl %esi, %esi
movq %r14, %rdx
jmp 0x56c6a
movl $0x1f8, %edx            # imm = 0x1F8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12b50
xorps %xmm0, %xmm0
movups %xmm0, 0x1f8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x30367(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x1a109(%rip), %rsi     # 0x70d9c
leaq 0x1a120(%rip), %rdx     # 0x70dba
movl $0x4be1, %ecx           # imm = 0x4BE1
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movq 0x4740(%r14), %rax
testq %rax, %rax
je 0x56cf3
movl (%rax), %ebx
movl 0x4750(%r14), %ecx
cmpl %ecx, %ebx
jb 0x56cf3
movq 0x30322(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x1a0c4(%rip), %rsi     # 0x70d9c
leaq 0x1a0db(%rip), %rdx     # 0x70dba
movl $0x4be3, %ecx           # imm = 0x4BE3
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movq 0x302f6(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x1a098(%rip), %rsi     # 0x70d9c
leaq 0x1a0af(%rip), %rdx     # 0x70dba
xorl %ebx, %ebx
movl $0x4c04, %ecx           # imm = 0x4C04
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
jmp 0x56c79