// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x4788(%rdi), %rbx
testq %rbx, %rbx
je 0x57752
movq 0x1f8(%rbx), %rax
movq %rax, 0x4788(%r14)
movq %rbx, %r14
andq $0x3, %r14
je 0x577f7
movl $0x4, %r15d
subq %r14, %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x12b50
orq $0x204, %r14            # imm = 0x204
addq %rbx, %r15
jmp 0x57800
cmpl $0x0, 0x471c(%r14)
je 0x57843
movq 0x4740(%r14), %rax
testq %rax, %rax
je 0x57777
movl (%rax), %ecx
cmpl 0x4750(%r14), %ecx
jb 0x577d1
movl 0x4738(%r14), %ebx
testl %ebx, %ebx
je 0x57891
movl 0x4750(%r14), %eax
decl %eax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,8), %rdx
addq $0x218, %rdx            # imm = 0x218
movq 0x4720(%r14), %rdi
xorl %esi, %esi
callq *0x4728(%r14)
movq 0x4740(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x4740(%r14)
movl $0x0, (%rax)
testl %ebx, %ebx
je 0x57912
movq 0x4740(%r14), %rax
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
movq %rcx, %rdx
shlq $0x9, %rdx
leaq (%rdx,%rcx,8), %rcx
leaq (%rax,%rcx), %rbx
addq $0x10, %rbx
jmp 0x57914
movl $0x208, %r14d           # imm = 0x208
movq %rbx, %r15
movl %r14d, %r12d
andl $-0x4, %r12d
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x12b50
andq $0x3, %r14
je 0x5782a
addq %r12, %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x12b50
xorps %xmm0, %xmm0
movups %xmm0, 0x1f8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x2508, %r14           # imm = 0x2508
movl $0x208, %edx            # imm = 0x208
movl $0x8, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x25548
movq %rax, %rbx
testq %rax, %rax
jne 0x57720
movq 0x3077c(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x1a50e(%rip), %rsi     # 0x71d8c
leaq 0x1a525(%rip), %rdx     # 0x71daa
xorl %ebx, %ebx
movl $0x4c0b, %ecx           # imm = 0x4C0B
jmp 0x5793c
testq %rax, %rax
jne 0x578c2
movq 0x30753(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x1a4e5(%rip), %rsi     # 0x71d8c
leaq 0x1a4fc(%rip), %rdx     # 0x71daa
movl $0x4be1, %ecx           # imm = 0x4BE1
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0x4740(%r14), %rax
testq %rax, %rax
je 0x577c9
movl (%rax), %eax
cmpl 0x4750(%r14), %eax
jb 0x577c9
movq 0x30708(%rip), %r15     # 0x87ff0
movq (%r15), %rdi
leaq 0x1a49a(%rip), %rsi     # 0x71d8c
leaq 0x1a4b1(%rip), %rdx     # 0x71daa
movl $0x4be3, %ecx           # imm = 0x4BE3
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
jmp 0x577c9
xorl %ebx, %ebx
testq %rbx, %rbx
jne 0x57720
movq 0x306cc(%rip), %r14     # 0x87ff0
movq (%r14), %rdi
leaq 0x1a45e(%rip), %rsi     # 0x71d8c
leaq 0x1a475(%rip), %rdx     # 0x71daa
xorl %ebx, %ebx
movl $0x4c04, %ecx           # imm = 0x4C04
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
jmp 0x57834