// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4788(%rdi), %r14
testq %r14, %r14
je 0x5180a
movq 0x1f8(%r14), %rax
movq %rax, 0x4788(%rbx)
jmp 0x518e8
cmpl $0x0, 0x471c(%rbx)
je 0x5183f
movq 0x4740(%rbx), %rax
testq %rax, %rax
je 0x5188a
movl (%rax), %r14d
movl 0x4750(%rbx), %ecx
cmpl %ecx, %r14d
jb 0x518d0
cmpl $0x0, 0x4738(%rbx)
jne 0x51899
jmp 0x5194c
addq $0x2508, %rbx           # imm = 0x2508
pushq $0x1
popq %rsi
pushq $0x8
popq %rcx
movl $0x208, %edx            # imm = 0x208
movq %rbx, %rdi
callq 0x2403e
movq %rax, %r14
testq %rax, %rax
jne 0x518e8
movq 0x33784(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x18496(%rip), %rsi     # 0x69d0c
leaq 0x184ad(%rip), %rdx     # 0x69d2a
xorl %r14d, %r14d
movl $0x4c0b, %ecx           # imm = 0x4C0B
jmp 0x5199d
cmpl $0x0, 0x4738(%rbx)
je 0x5190b
movl 0x4750(%rbx), %ecx
decl %ecx
imulq $0x208, %rcx, %rdx      # imm = 0x208
addq $0x218, %rdx            # imm = 0x218
movq 0x4720(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq *0x4728(%rbx)
movq 0x4740(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x4740(%rbx)
andl $0x0, (%rax)
leal 0x1(%r14), %ecx
movl %ecx, (%rax)
movl %r14d, %ecx
imulq $0x208, %rcx, %rcx      # imm = 0x208
leaq (%rax,%rcx), %r14
addq $0x10, %r14
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x23ed0
xorps %xmm0, %xmm0
movups %xmm0, 0x1f8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x336de(%rip), %r14     # 0x84ff0
movq (%r14), %rdi
leaq 0x183f0(%rip), %rsi     # 0x69d0c
leaq 0x18407(%rip), %rdx     # 0x69d2a
movl $0x4be1, %ecx           # imm = 0x4BE1
xorl %eax, %eax
callq 0x12ea0
movq (%r14), %rdi
callq 0x13960
movq 0x4740(%rbx), %rax
testq %rax, %rax
je 0x5197d
movl (%rax), %r14d
movl 0x4750(%rbx), %ecx
cmpl %ecx, %r14d
jb 0x5197d
movq 0x33698(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x183aa(%rip), %rsi     # 0x69d0c
leaq 0x183c1(%rip), %rdx     # 0x69d2a
movl $0x4be3, %ecx           # imm = 0x4BE3
xorl %eax, %eax
callq 0x12ea0
movq (%rbx), %rdi
callq 0x13960
movq 0x3366c(%rip), %rbx     # 0x84ff0
movq (%rbx), %rdi
leaq 0x1837e(%rip), %rsi     # 0x69d0c
leaq 0x18395(%rip), %rdx     # 0x69d2a
xorl %r14d, %r14d
movl $0x4c04, %ecx           # imm = 0x4C04
xorl %eax, %eax
callq 0x12ea0
movq (%rbx), %rdi
callq 0x13960
jmp 0x51900