LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_finish_buffer
NK_LIB void
nk_finish_buffer(struct nk_context *ctx, struct nk_command_buffer *buffer)
{
    NK_ASSERT(ctx);
    NK_ASSERT(buffer);
    if (!ctx || !buffer) return;
    buffer->end = ctx->memory.allocated;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x856f9
movq 0x3f923(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2bcc9(%rip), %rsi     # 0xb13a0
leaq 0x2bce0(%rip), %rdx     # 0xb13be
movl $0x4b34, %ecx           # imm = 0x4B34
movb $0x0, %al
callq 0x13ec0
movq 0x3f8ff(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x856fb
jmp 0x856fd
cmpq $0x0, 0x8(%rsp)
jne 0x85738
movq 0x3f8e4(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2bc8a(%rip), %rsi     # 0xb13a0
leaq 0x2bca1(%rip), %rdx     # 0xb13be
movl $0x4b35, %ecx           # imm = 0x4B35
movb $0x0, %al
callq 0x13ec0
movq 0x3f8c0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8573a
cmpq $0x0, 0x10(%rsp)
je 0x8574a
cmpq $0x0, 0x8(%rsp)
jne 0x8574c
jmp 0x85761
movq 0x10(%rsp), %rax
movq 0x2560(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_free_page_element
NK_LIB void
nk_free_page_element(struct nk_context *ctx, struct nk_page_element *elem)
{
    /* we have a pool so just add to free list */
    if (ctx->use_pool) {
        nk_link_page_element_into_freelist(ctx, elem);
        return;
    }
    /* if possible remove last element from back of fixed memory buffer */
    {void *elem_end = (void*)(elem + 1);
    void *buffer_end = (nk_byte*)ctx->memory.memory.ptr + ctx->memory.size;
    if (elem_end == buffer_end)
        ctx->memory.size -= sizeof(struct nk_page_element);
    else nk_link_page_element_into_freelist(ctx, elem);}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x0, 0x471c(%rax)
je 0x8579d
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x85810
jmp 0x85801
movq 0x18(%rsp), %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x2548(%rax), %rax
movq 0x20(%rsp), %rcx
addq 0x2578(%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x857f2
movq 0x20(%rsp), %rax
movq 0x2578(%rax), %rcx
subq $0x208, %rcx            # imm = 0x208
movq %rcx, 0x2578(%rax)
jmp 0x85801
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x85810
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_link_page_element_into_freelist
NK_LIB void
nk_link_page_element_into_freelist(struct nk_context *ctx,
    struct nk_page_element *elem)
{
    /* link table into freelist */
    if (!ctx->freelist) {
        ctx->freelist = elem;
    } else {
        elem->next = ctx->freelist;
        ctx->freelist = elem;
    }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
cmpq $0x0, 0x4788(%rax)
jne 0x8583c
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x4788(%rax)
jmp 0x85865
movq -0x8(%rsp), %rax
movq 0x4788(%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x1f8(%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x4788(%rax)
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x4788(%rax)
je 0x858b4
movq 0x8(%rsp), %rax
movq 0x4788(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x1f8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x4788(%rax)
jmp 0x859a0
movq 0x8(%rsp), %rax
cmpl $0x0, 0x471c(%rax)
je 0x8592a
movq 0x8(%rsp), %rdi
addq $0x4720, %rdi           # imm = 0x4720
callq 0x859e0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x85911
movq 0x3f70b(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2bab1(%rip), %rsi     # 0xb13a0
leaq 0x2bac8(%rip), %rdx     # 0xb13be
movl $0x4c04, %ecx           # imm = 0x4C04
movb $0x0, %al
callq 0x13ec0
movq 0x3f6e7(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x85913
cmpq $0x0, (%rsp)
jne 0x85928
movq $0x0, 0x10(%rsp)
jmp 0x859d5
jmp 0x8599e
movq 0x8(%rsp), %rdi
addq $0x2508, %rdi           # imm = 0x2508
movl $0x1, %esi
movl $0x208, %edx            # imm = 0x208
movl $0x8, %ecx
callq 0x2f2e0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x85988
movq 0x3f694(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2ba3a(%rip), %rsi     # 0xb13a0
leaq 0x2ba51(%rip), %rdx     # 0xb13be
movl $0x4c0b, %ecx           # imm = 0x4C0B
movb $0x0, %al
callq 0x13ec0
movq 0x3f670(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x8598a
cmpq $0x0, (%rsp)
jne 0x8599c
movq $0x0, 0x10(%rsp)
jmp 0x859d5
jmp 0x8599e
jmp 0x859a0
movq (%rsp), %rdi
movl $0x208, %esi            # imm = 0x208
callq 0x2f0e0
movq (%rsp), %rax
movq $0x0, 0x1f8(%rax)
movq (%rsp), %rax
movq $0x0, 0x200(%rax)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_pool_alloc
NK_LIB struct nk_page_element*
nk_pool_alloc(struct nk_pool *pool)
{
    if (!pool->pages || pool->pages->size >= pool->capacity) {
        /* allocate new page */
        struct nk_page *page;
        if (pool->type == NK_BUFFER_FIXED) {
            NK_ASSERT(pool->pages);
            if (!pool->pages) return 0;
            NK_ASSERT(pool->pages->size < pool->capacity);
            return 0;
        } else {
            nk_size size = sizeof(struct nk_page);
            size += (pool->capacity - 1) * sizeof(struct nk_page_element);
            page = (struct nk_page*)pool->alloc.alloc(pool->alloc.userdata,0, size);
            page->next = pool->pages;
            pool->pages = page;
            page->size = 0;
        }
    } return &pool->pages->win[pool->pages->size++];
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x85a0e
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movl (%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jb 0x85b49
movq 0x18(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x85ad4
jmp 0x85a1f
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x85a5e
movq 0x3f5be(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2b964(%rip), %rsi     # 0xb13a0
leaq 0x2b97b(%rip), %rdx     # 0xb13be
movl $0x4be1, %ecx           # imm = 0x4BE1
movb $0x0, %al
callq 0x13ec0
movq 0x3f59a(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x85a60
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x85a7a
movq $0x0, 0x20(%rsp)
jmp 0x85b79
jmp 0x85a7c
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movl (%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jb 0x85ac4
movq 0x3f558(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2b8fe(%rip), %rsi     # 0xb13a0
leaq 0x2b915(%rip), %rdx     # 0xb13be
movl $0x4be3, %ecx           # imm = 0x4BE3
movb $0x0, %al
callq 0x13ec0
movq 0x3f534(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x85ac6
movq $0x0, 0x20(%rsp)
jmp 0x85b79
movq $0x218, 0x8(%rsp)       # imm = 0x218
movq 0x18(%rsp), %rax
movl 0x30(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
imulq $0x208, %rax, %rax      # imm = 0x208
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rdx
movq (%rcx), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
jmp 0x85b49
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
addq $0x10, %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rdx
movl (%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, (%rdx)
movl %ecx, %ecx
imulq $0x208, %rcx, %rcx      # imm = 0x208
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_panel_has_header
NK_LIB nk_bool
nk_panel_has_header(nk_flags flags, const char *title)
{
    nk_bool active = 0;
    active = (flags & (NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE));
    active = active || (flags & NK_WINDOW_TITLE);
    active = active && !(flags & NK_WINDOW_HIDDEN) && title;
    return active;
}

// Assembly:
movl %edi, -0x4(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movl -0x4(%rsp), %eax
andl $0x18, %eax
movl %eax, -0x14(%rsp)
movb $0x1, %al
cmpl $0x0, -0x14(%rsp)
movb %al, -0x15(%rsp)
jne 0x85bca
movl -0x4(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x15(%rsp)
movb -0x15(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rsp)
xorl %eax, %eax
cmpl $0x0, -0x14(%rsp)
movb %al, -0x16(%rsp)
je 0x85c06
movl -0x4(%rsp), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x16(%rsp)
jne 0x85c06
cmpq $0x0, -0x10(%rsp)
setne %al
movb %al, -0x16(%rsp)
movb -0x16(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rsp)
movl -0x14(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_panel_get_border
NK_LIB float
nk_panel_get_border(const struct nk_style *style, nk_flags flags,
    enum nk_panel_type type)
{
    if (flags & NK_WINDOW_BORDER) {
        switch (type) {
        default:
        case NK_PANEL_WINDOW: return style->window.border;
        case NK_PANEL_GROUP: return style->window.group_border;
        case NK_PANEL_POPUP: return style->window.popup_border;
        case NK_PANEL_CONTEXTUAL: return style->window.contextual_border;
        case NK_PANEL_COMBO: return style->window.combo_border;
        case NK_PANEL_MENU: return style->window.menu_border;
        case NK_PANEL_TOOLTIP: return style->window.menu_border;
    }} else return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
movl -0x14(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x85d30
movl -0x18(%rsp), %eax
movl %eax, -0x1c(%rsp)
subl $0x1, %eax
je 0x85c9a
jmp 0x85c4c
movl -0x1c(%rsp), %eax
subl $0x2, %eax
je 0x85cb2
jmp 0x85c57
movl -0x1c(%rsp), %eax
subl $0x4, %eax
je 0x85cc7
jmp 0x85c62
movl -0x1c(%rsp), %eax
subl $0x10, %eax
je 0x85cdc
jmp 0x85c6d
movl -0x1c(%rsp), %eax
subl $0x20, %eax
je 0x85cf1
jmp 0x85c78
movl -0x1c(%rsp), %eax
subl $0x40, %eax
je 0x85d06
jmp 0x85c87
movl -0x1c(%rsp), %eax
subl $0x80, %eax
je 0x85d1b
jmp 0x85c98
jmp 0x85c9a
movq -0x10(%rsp), %rax
movss 0x2328(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x2338(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x2340(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x2330(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x232c(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x2334(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
movq -0x10(%rsp), %rax
movss 0x2334(%rax), %xmm0
movss %xmm0, -0x4(%rsp)
jmp 0x85d39
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rsp)
movss -0x4(%rsp), %xmm0
retq
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_panel_get_border_color
NK_LIB struct nk_color
nk_panel_get_border_color(const struct nk_style *style, enum nk_panel_type type)
{
    switch (type) {
    default:
    case NK_PANEL_WINDOW: return style->window.border_color;
    case NK_PANEL_GROUP: return style->window.group_border_color;
    case NK_PANEL_POPUP: return style->window.popup_border_color;
    case NK_PANEL_CONTEXTUAL: return style->window.contextual_border_color;
    case NK_PANEL_COMBO: return style->window.combo_border_color;
    case NK_PANEL_MENU: return style->window.menu_border_color;
    case NK_PANEL_TOOLTIP: return style->window.menu_border_color;}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl -0x14(%rsp), %eax
movl %eax, -0x18(%rsp)
subl $0x1, %eax
je 0x86f4e
jmp 0x86f08
movl -0x18(%rsp), %eax
subl $0x2, %eax
je 0x86f5f
jmp 0x86f13
movl -0x18(%rsp), %eax
subl $0x4, %eax
je 0x86f70
jmp 0x86f1e
movl -0x18(%rsp), %eax
subl $0x10, %eax
je 0x86f81
jmp 0x86f29
movl -0x18(%rsp), %eax
subl $0x20, %eax
je 0x86f92
jmp 0x86f34
movl -0x18(%rsp), %eax
subl $0x40, %eax
je 0x86fa3
jmp 0x86f3f
movl -0x18(%rsp), %eax
subl $0x80, %eax
je 0x86fb4
jmp 0x86f4c
jmp 0x86f4e
movq -0x10(%rsp), %rax
movl 0x22e4(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22f8(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22e8(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22f0(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22ec(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22f4(%rax), %eax
movl %eax, -0x4(%rsp)
jmp 0x86fc3
movq -0x10(%rsp), %rax
movl 0x22f4(%rax), %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_command_buffer_reset
NK_LIB void
nk_command_buffer_reset(struct nk_command_buffer *b)
{
    NK_ASSERT(b);
    if (!b) return;
    b->begin = 0;
    b->end = 0;
    b->last = 0;
    b->clip = nk_null_rect;
#ifdef NK_INCLUDE_COMMAND_USERDATA
    b->userdata.ptr = 0;
#endif
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
jne 0x8700f
movq 0x3e00d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2a3b3(%rip), %rsi     # 0xb13a0
leaq 0x2a3ca(%rip), %rdx     # 0xb13be
movl $0x2300, %ecx           # imm = 0x2300
movb $0x0, %al
callq 0x13ec0
movq 0x3dfe9(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x87011
cmpq $0x0, (%rsp)
jne 0x8701a
jmp 0x87058
movq (%rsp), %rax
movq $0x0, 0x28(%rax)
movq (%rsp), %rax
movq $0x0, 0x30(%rax)
movq (%rsp), %rax
movq $0x0, 0x38(%rax)
movq (%rsp), %rax
movq 0x2681b(%rip), %rcx     # 0xad864
movq %rcx, 0x8(%rax)
movq 0x26818(%rip), %rcx     # 0xad86c
movq %rcx, 0x10(%rax)
popq %rax
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_finish
NK_LIB void
nk_finish(struct nk_context *ctx, struct nk_window *win)
{
    struct nk_popup_buffer *buf;
    struct nk_command *parent_last;
    void *memory;

    NK_ASSERT(ctx);
    NK_ASSERT(win);
    if (!ctx || !win) return;
    nk_finish_buffer(ctx, &win->buffer);
    if (!win->popup.buf.active) return;

    buf = &win->popup.buf;
    memory = ctx->memory.memory.ptr;
    parent_last = nk_ptr_add(struct nk_command, memory, buf->parent);
    parent_last->next = buf->end;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x870a9
movq 0x3df73(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2a319(%rip), %rsi     # 0xb13a0
leaq 0x2a330(%rip), %rdx     # 0xb13be
movl $0x4b40, %ecx           # imm = 0x4B40
movb $0x0, %al
callq 0x13ec0
movq 0x3df4f(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x870ab
jmp 0x870ad
cmpq $0x0, 0x18(%rsp)
jne 0x870e8
movq 0x3df34(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x2a2da(%rip), %rsi     # 0xb13a0
leaq 0x2a2f1(%rip), %rdx     # 0xb13be
movl $0x4b41, %ecx           # imm = 0x4B41
movb $0x0, %al
callq 0x13ec0
movq 0x3df10(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x870ea
cmpq $0x0, 0x20(%rsp)
je 0x870fa
cmpq $0x0, 0x18(%rsp)
jne 0x870fc
jmp 0x87167
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x68, %rsi
callq 0x856b0
movq 0x18(%rsp), %rax
cmpl $0x0, 0x150(%rax)
jne 0x8711f
jmp 0x87167
movq 0x18(%rsp), %rax
addq $0x120, %rax            # imm = 0x120
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x2548(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_create_table
NK_LIB struct nk_table*
nk_create_table(struct nk_context *ctx)
{
    struct nk_page_element *elem;
    elem = nk_create_page_element(ctx);
    if (!elem) return 0;
    nk_zero_struct(*elem);
    return &elem->data.tbl;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x85870
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x89299
movq $0x0, 0x10(%rsp)
jmp 0x892b0
movq (%rsp), %rdi
movl $0x208, %esi            # imm = 0x208
callq 0x2f0e0
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_push_table
NK_LIB void
nk_push_table(struct nk_window *win, struct nk_table *tbl)
{
    if (!win->tables) {
        win->tables = tbl;
        tbl->next = 0;
        tbl->prev = 0;
        tbl->size = 0;
        win->table_count = 1;
        return;
    }
    win->tables->prev = tbl;
    tbl->next = win->tables;
    tbl->prev = 0;
    tbl->size = 0;
    win->tables = tbl;
    win->table_count++;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
cmpq $0x0, 0x1b8(%rax)
jne 0x89327
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x1e8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x1f0(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rsp), %rax
movl $0x1, 0x1c0(%rax)
jmp 0x89398
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq 0x1b8(%rax), %rax
movq %rcx, 0x1f0(%rax)
movq -0x8(%rsp), %rax
movq 0x1b8(%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x1e8(%rax)
movq -0x10(%rsp), %rax
movq $0x0, 0x1f0(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x8(%rsp), %rax
movl 0x1c0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c0(%rax)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_button_text
NK_LIB void
nk_draw_button_text(struct nk_command_buffer *out,
    const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state,
    const struct nk_style_button *style, const char *txt, int len,
    nk_flags text_alignment, const struct nk_user_font *font)
{
    struct nk_text text;
    const struct nk_style_item *background;
    background = nk_draw_button(out, bounds, state, style);

    /* select correct colors/images */
    if (background->type == NK_STYLE_ITEM_COLOR)
        text.background = background->data.color;
    else text.background = style->text_background;
    if (state & NK_WIDGET_STATE_HOVER)
        text.text = style->text_hover;
    else if (state & NK_WIDGET_STATE_ACTIVED)
        text.text = style->text_active;
    else text.text = style->text_normal;

    text.text = nk_rgb_factor(text.text, style->color_factor_text);

    text.padding = nk_vec2(0,0);
    nk_widget_text(out, *content, txt, len, &text, text_alignment, font);
}

// Assembly:
subq $0x58, %rsp
movq 0x70(%rsp), %rax
movl 0x68(%rsp), %eax
movl 0x60(%rsp), %eax
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x3c(%rsp), %edx
movq 0x30(%rsp), %rcx
callq 0x69a10
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x89403
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x20(%rsp)
jmp 0x89412
movq 0x30(%rsp), %rax
movl 0x80(%rax), %eax
movl %eax, 0x20(%rsp)
movl 0x3c(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x8942f
movq 0x30(%rsp), %rax
movl 0x88(%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x8945d
movl 0x3c(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x8944c
movq 0x30(%rsp), %rax
movl 0x8c(%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x8945b
movq 0x30(%rsp), %rax
movl 0x84(%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x8945d
movq 0x30(%rsp), %rax
movss 0x94(%rax), %xmm0
movl 0x24(%rsp), %edi
callq 0x15100
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x13460
movlpd %xmm0, 0x4(%rsp)
movq 0x4(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rsi
movl 0x60(%rsp), %edx
movl 0x68(%rsp), %r8d
movq 0x70(%rsp), %r9
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
leaq 0x18(%rsp), %rcx
callq 0x66ac0
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_button_text_image
NK_LIB void
nk_draw_button_text_image(struct nk_command_buffer *out,
    const struct nk_rect *bounds, const struct nk_rect *label,
    const struct nk_rect *image, nk_flags state, const struct nk_style_button *style,
    const char *str, int len, const struct nk_user_font *font,
    const struct nk_image *img)
{
    struct nk_text text;
    const struct nk_style_item *background;
    background = nk_draw_button(out, bounds, state, style);

    /* select correct colors */
    if (background->type == NK_STYLE_ITEM_COLOR)
        text.background = background->data.color;
    else text.background = style->text_background;
    if (state & NK_WIDGET_STATE_HOVER)
        text.text = style->text_hover;
    else if (state & NK_WIDGET_STATE_ACTIVED)
        text.text = style->text_active;
    else text.text = style->text_normal;

    text.text = nk_rgb_factor(text.text, style->color_factor_text);
    text.padding = nk_vec2(0, 0);
    nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);
    nk_draw_image(out, *image, img, nk_rgb_factor(nk_white, style->color_factor_background));
}

// Assembly:
subq $0x78, %rsp
movq 0x98(%rsp), %rax
movq 0x90(%rsp), %rax
movl 0x88(%rsp), %eax
movq 0x80(%rsp), %rax
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movl %r8d, 0x54(%rsp)
movq %r9, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x54(%rsp), %edx
movq 0x48(%rsp), %rcx
callq 0x69a10
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x897b6
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x40(%rsp)
jmp 0x897c5
movq 0x48(%rsp), %rax
movl 0x80(%rax), %eax
movl %eax, 0x40(%rsp)
movl 0x54(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x897e2
movq 0x48(%rsp), %rax
movl 0x88(%rax), %eax
movl %eax, 0x44(%rsp)
jmp 0x89810
movl 0x54(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x897ff
movq 0x48(%rsp), %rax
movl 0x8c(%rax), %eax
movl %eax, 0x44(%rsp)
jmp 0x8980e
movq 0x48(%rsp), %rax
movl 0x84(%rax), %eax
movl %eax, 0x44(%rsp)
jmp 0x89810
movq 0x48(%rsp), %rax
movss 0x94(%rax), %xmm0
movl 0x44(%rsp), %edi
callq 0x15100
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x44(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x13460
movlpd %xmm0, 0x24(%rsp)
movq 0x24(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movq 0x80(%rsp), %rsi
movl 0x88(%rsp), %edx
movq 0x90(%rsp), %r9
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
leaq 0x38(%rsp), %rcx
movl $0x12, %r8d
callq 0x66ac0
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movss 0x7c(%rax), %xmm0
movl 0x279f8(%rip), %edi     # 0xb12b0
callq 0x15100
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x20(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movl 0x20(%rsp), %edx
callq 0x14690
addq $0x78, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_toggle_behavior
NK_LIB nk_bool
nk_toggle_behavior(const struct nk_input *in, struct nk_rect select,
    nk_flags *state, nk_bool active)
{
    nk_widget_state_reset(state);
    if (nk_button_behavior(state, select, in, NK_BUTTON_DEFAULT)) {
        *state = NK_WIDGET_STATE_ACTIVE;
        active = !active;
    }
    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, select))
        *state |= NK_WIDGET_STATE_ENTERED;
    else if (nk_input_is_mouse_prev_hovering_rect(in, select))
        *state |= NK_WIDGET_STATE_LEFT;
    return active;
}

// Assembly:
subq $0x28, %rsp
movlpd %xmm0, 0x18(%rsp)
movlpd %xmm1, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x8992a
movq 0x8(%rsp), %rax
movl $0x6, (%rax)
jmp 0x89935
movq 0x8(%rsp), %rax
movl $0x4, (%rax)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
xorl %edx, %edx
callq 0x78060
cmpl $0x0, %eax
je 0x89975
movq 0x8(%rsp), %rax
movl $0x22, (%rax)
cmpl $0x0, 0x4(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x899ad
movq 0x10(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x14d70
cmpl $0x0, %eax
jne 0x899ad
movq 0x8(%rsp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
jmp 0x899d6
movq 0x10(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x14d70
cmpl $0x0, %eax
je 0x899d4
movq 0x8(%rsp), %rax
movl (%rax), %ecx
orl $0x40, %ecx
movl %ecx, (%rax)
jmp 0x899d6
movl 0x4(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_pad_rect
NK_LIB struct nk_rect
nk_pad_rect(struct nk_rect r, struct nk_vec2 pad)
{
    r.w = NK_MAX(r.w, 2 * pad.x);
    r.h = NK_MAX(r.h, 2 * pad.y);
    r.x += pad.x; r.y += pad.y;
    r.w -= 2 * pad.x;
    r.h -= 2 * pad.y;
    return r;
}

// Assembly:
movlpd %xmm0, -0x28(%rsp)
movlpd %xmm1, -0x20(%rsp)
movlpd %xmm2, -0x30(%rsp)
movss -0x20(%rsp), %xmm1
movss 0x224b4(%rip), %xmm0    # 0xad4e4
mulss -0x30(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x8b051
movss 0x224a1(%rip), %xmm0    # 0xad4e4
mulss -0x30(%rsp), %xmm0
movss %xmm0, -0x34(%rsp)
jmp 0x8b05d
movss -0x20(%rsp), %xmm0
movss %xmm0, -0x34(%rsp)
movss -0x34(%rsp), %xmm0
movss %xmm0, -0x20(%rsp)
movss -0x1c(%rsp), %xmm1
movss 0x2246d(%rip), %xmm0    # 0xad4e4
mulss -0x2c(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x8b098
movss 0x2245a(%rip), %xmm0    # 0xad4e4
mulss -0x2c(%rsp), %xmm0
movss %xmm0, -0x38(%rsp)
jmp 0x8b0a4
movss -0x1c(%rsp), %xmm0
movss %xmm0, -0x38(%rsp)
movss -0x38(%rsp), %xmm0
movss %xmm0, -0x1c(%rsp)
movss -0x30(%rsp), %xmm1
movss -0x28(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x28(%rsp)
movss -0x2c(%rsp), %xmm1
movss -0x24(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x24(%rsp)
movss -0x30(%rsp), %xmm1
movss -0x20(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x20(%rsp)
movss -0x2c(%rsp), %xmm1
movss -0x1c(%rsp), %xmm0
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x1c(%rsp)
movups -0x28(%rsp), %xmm0
movaps %xmm0, -0x18(%rsp)
movsd -0x18(%rsp), %xmm0
movsd -0x10(%rsp), %xmm1
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_createundo
NK_INTERN nk_rune*
nk_textedit_createundo(struct nk_text_undo_state *state, int pos,
    int insert_len, int delete_len)
{
    struct nk_text_undo_record *r = nk_textedit_create_undo_record(state, insert_len);
    if (r == 0)
        return 0;

    r->where = pos;
    r->insert_length = (short) insert_len;
    r->delete_length = (short) delete_len;

    if (insert_len == 0) {
        r->char_storage = -1;
        return 0;
    } else {
        r->char_storage = state->undo_char_point;
        state->undo_char_point = (short)(state->undo_char_point +  insert_len);
        return &state->undo_char[r->char_storage];
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x8bc60
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x8bbbc
movq $0x0, 0x20(%rsp)
jmp 0x8bc53
movl 0x14(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %eax
movw %ax, %cx
movq (%rsp), %rax
movw %cx, 0x4(%rax)
movl 0xc(%rsp), %eax
movw %ax, %cx
movq (%rsp), %rax
movw %cx, 0x6(%rax)
cmpl $0x0, 0x10(%rsp)
jne 0x8bc00
movq (%rsp), %rax
movw $0xffff, 0x8(%rax)      # imm = 0xFFFF
movq $0x0, 0x20(%rsp)
jmp 0x8bc53
movq 0x18(%rsp), %rax
movw 0x1444(%rax), %cx
movq (%rsp), %rax
movw %cx, 0x8(%rax)
movq 0x18(%rsp), %rax
movswl 0x1444(%rax), %eax
addl 0x10(%rsp), %eax
movw %ax, %cx
movq 0x18(%rsp), %rax
movw %cx, 0x1444(%rax)
movq 0x18(%rsp), %rax
addq $0x4a4, %rax            # imm = 0x4A4
movq (%rsp), %rcx
movswq 0x8(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_create_undo_record
NK_INTERN struct nk_text_undo_record*
nk_textedit_create_undo_record(struct nk_text_undo_state *state, int numchars)
{
    /* any time we create a new undo record, we discard redo*/
    nk_textedit_flush_redo(state);

    /* if we have no free records, we have to make room,
     * by sliding the existing records down */
    if (state->undo_point == NK_TEXTEDIT_UNDOSTATECOUNT)
        nk_textedit_discard_undo(state);

    /* if the characters to store won't possibly fit in the buffer,
     * we can't undo */
    if (numchars > NK_TEXTEDIT_UNDOCHARCOUNT) {
        state->undo_point = 0;
        state->undo_char_point = 0;
        return 0;
    }

    /* if we don't have enough free characters in the buffer,
     * we have to make room */
    while (state->undo_char_point + numchars > NK_TEXTEDIT_UNDOCHARCOUNT)
        nk_textedit_discard_undo(state);
    return &state->undo_rec[state->undo_point++];
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x8bd30
movq 0x8(%rsp), %rax
movswl 0x1440(%rax), %eax
cmpl $0x63, %eax
jne 0x8bc92
movq 0x8(%rsp), %rdi
callq 0x8bd60
cmpl $0x3e7, 0x4(%rsp)       # imm = 0x3E7
jle 0x8bcc3
movq 0x8(%rsp), %rax
movw $0x0, 0x1440(%rax)
movq 0x8(%rsp), %rax
movw $0x0, 0x1444(%rax)
movq $0x0, 0x10(%rsp)
jmp 0x8bd17
jmp 0x8bcc5
movq 0x8(%rsp), %rax
movswl 0x1444(%rax), %eax
addl 0x4(%rsp), %eax
cmpl $0x3e7, %eax            # imm = 0x3E7
jle 0x8bce8
movq 0x8(%rsp), %rdi
callq 0x8bd60
jmp 0x8bcc5
movq 0x8(%rsp), %rax
movq 0x8(%rsp), %rdx
movw 0x1440(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x1440(%rdx)
movswq %cx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_discard_undo
NK_INTERN void
nk_textedit_discard_undo(struct nk_text_undo_state *state)
{
    /* discard the oldest entry in the undo list */
    if (state->undo_point > 0) {
        /* if the 0th undo state has characters, clean those up */
        if (state->undo_rec[0].char_storage >= 0) {
            int n = state->undo_rec[0].insert_length, i;
            /* delete n characters from all other records */
            state->undo_char_point = (short)(state->undo_char_point - n);
            NK_MEMCPY(state->undo_char, state->undo_char + n,
                (nk_size)state->undo_char_point*sizeof(nk_rune));
            for (i=0; i < state->undo_point; ++i) {
                if (state->undo_rec[i].char_storage >= 0)
                state->undo_rec[i].char_storage = (short)
                    (state->undo_rec[i].char_storage - n);
            }
        }
        --state->undo_point;
        NK_MEMCPY(state->undo_rec, state->undo_rec+1,
            (nk_size)((nk_size)state->undo_point * sizeof(state->undo_rec[0])));
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movswl 0x1440(%rax), %eax
cmpl $0x0, %eax
jle 0x8bea9
movq 0x10(%rsp), %rax
movswl 0x8(%rax), %eax
cmpl $0x0, %eax
jl 0x8be6e
movq 0x10(%rsp), %rax
movswl 0x4(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movswl 0x1444(%rax), %eax
subl 0xc(%rsp), %eax
movw %ax, %cx
movq 0x10(%rsp), %rax
movw %cx, 0x1444(%rax)
movq 0x10(%rsp), %rdi
addq $0x4a4, %rdi            # imm = 0x4A4
movq 0x10(%rsp), %rsi
addq $0x4a4, %rsi            # imm = 0x4A4
movslq 0xc(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq 0x10(%rsp), %rax
movswq 0x1444(%rax), %rdx
shlq $0x2, %rdx
callq 0x2f750
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
movswl 0x1440(%rcx), %ecx
cmpl %ecx, %eax
jge 0x8be6c
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
cmpl $0x0, %eax
jl 0x8be5d
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
subl 0xc(%rsp), %eax
movw %ax, %cx
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
jmp 0x8be5f
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x8bdfe
jmp 0x8be6e
movq 0x10(%rsp), %rax
movw 0x1440(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x1440(%rax)
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xc, %rsi
movq 0x10(%rsp), %rax
movswq 0x1440(%rax), %rax
imulq $0xc, %rax, %rdx
callq 0x2f750
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_click
NK_LIB void
nk_textedit_click(struct nk_text_edit *state, float x, float y,
    const struct nk_user_font *font, float row_height)
{
    /* API click: on mouse down, move the cursor to the clicked location,
     * and reset the selection */
    state->cursor = nk_textedit_locate_coord(state, x, y, font, row_height);
    state->select_start = state->cursor;
    state->select_end = state->cursor;
    state->has_preferred_x = 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movss %xmm0, 0x1c(%rsp)
movss %xmm1, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movss %xmm2, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm2
callq 0x8d8f0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xa8(%rax)
movq 0x20(%rsp), %rax
movl 0xa8(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xac(%rax)
movq 0x20(%rsp), %rax
movl 0xa8(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xb0(%rax)
movq 0x20(%rsp), %rax
movb $0x0, 0xb7(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_drag
NK_LIB void
nk_textedit_drag(struct nk_text_edit *state, float x, float y,
    const struct nk_user_font *font, float row_height)
{
    /* API drag: on mouse drag, move the cursor and selection endpoint
     * to the clicked location */
    int p = nk_textedit_locate_coord(state, x, y, font, row_height);
    if (state->select_start == state->select_end)
        state->select_start = state->cursor;
    state->cursor = state->select_end = p;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movss %xmm0, 0x1c(%rsp)
movss %xmm1, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movss %xmm2, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movq 0x10(%rsp), %rsi
movss 0xc(%rsp), %xmm2
callq 0x8d8f0
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movl 0xac(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl 0xb0(%rcx), %eax
jne 0x8bfb3
movq 0x20(%rsp), %rax
movl 0xa8(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xac(%rax)
movl 0x8(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xb0(%rax)
movq 0x20(%rsp), %rax
movl %ecx, 0xa8(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_layout_row
NK_INTERN void
nk_textedit_layout_row(struct nk_text_edit_row *r, struct nk_text_edit *edit,
    int line_start_id, float row_height, const struct nk_user_font *font)
{
    int l;
    int glyphs = 0;
    nk_rune unicode;
    const char *remaining;
    int len = nk_str_len_char(&edit->string);
    const char *end = nk_str_get_const(&edit->string) + len;
    const char *text = nk_str_at_const(&edit->string, line_start_id, &unicode, &l);
    const struct nk_vec2 size = nk_text_calculate_text_bounds(font,
        text, (int)(end - text), row_height, &remaining, 0, &glyphs, NK_STOP_ON_NEW_LINE);

    r->x0 = 0.0f;
    r->x1 = size.x;
    r->baseline_y_delta = size.y;
    r->ymin = 0.0f;
    r->ymax = size.y;
    r->num_chars = glyphs;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movss %xmm0, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x58(%rsp), %rdi
addq $0x18, %rdi
callq 0x14cc0
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rdi
addq $0x18, %rdi
callq 0x130a0
movslq 0x2c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
addq $0x18, %rdi
movl 0x54(%rsp), %esi
leaq 0x3c(%rsp), %rdx
leaq 0x44(%rsp), %rcx
callq 0x15210
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x20(%rsp), %edx
movl %esi, %eax
subl %eax, %edx
movss 0x50(%rsp), %xmm0
movq %rsp, %rax
movl $0x1, (%rax)
xorl %eax, %eax
movl %eax, %r8d
leaq 0x30(%rsp), %rcx
leaq 0x40(%rsp), %r9
callq 0x8d010
movlpd %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movss 0x10(%rsp), %xmm0
movq 0x60(%rsp), %rax
movss %xmm0, 0x4(%rax)
movss 0x14(%rsp), %xmm0
movq 0x60(%rsp), %rax
movss %xmm0, 0x8(%rax)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movss 0x14(%rsp), %xmm0
movq 0x60(%rsp), %rax
movss %xmm0, 0x10(%rax)
movl 0x40(%rsp), %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x14(%rax)
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_get_width
NK_INTERN float
nk_textedit_get_width(const struct nk_text_edit *edit, int line_start, int char_id,
    const struct nk_user_font *font)
{
    int len = 0;
    nk_rune unicode = 0;
    const char *str = nk_str_at_const(&edit->string, line_start + char_id, &unicode, &len);
    return font->width(font->userdata, font->height, str, len);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movl 0x1c(%rsp), %esi
addl 0x18(%rsp), %esi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x15210
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rdx
movss 0x8(%rdx), %xmm0
movq (%rsp), %rsi
movl 0xc(%rsp), %edx
movq (%rcx), %rdi
callq *%rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_move_to_first
NK_INTERN void
nk_textedit_move_to_first(struct nk_text_edit *state)
{
    /* move cursor to first character of selection */
    if (NK_TEXT_HAS_SELECTION(state)) {
        nk_textedit_sortselection(state);
        state->cursor = state->select_start;
        state->select_end = state->select_start;
        state->has_preferred_x = 0;
    }
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movl 0xac(%rax), %eax
movq (%rsp), %rcx
cmpl 0xb0(%rcx), %eax
je 0x8dda7
movq (%rsp), %rdi
callq 0x8e170
movq (%rsp), %rax
movl 0xac(%rax), %ecx
movq (%rsp), %rax
movl %ecx, 0xa8(%rax)
movq (%rsp), %rax
movl 0xac(%rax), %ecx
movq (%rsp), %rax
movl %ecx, 0xb0(%rax)
movq (%rsp), %rax
movb $0x0, 0xb7(%rax)
popq %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_move_to_last
NK_INTERN void
nk_textedit_move_to_last(struct nk_text_edit *state)
{
    /* move cursor to last character of selection */
    if (NK_TEXT_HAS_SELECTION(state)) {
        nk_textedit_sortselection(state);
        nk_textedit_clamp(state);
        state->cursor = state->select_end;
        state->select_start = state->select_end;
        state->has_preferred_x = 0;
    }
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movl 0xac(%rax), %eax
movq (%rsp), %rcx
cmpl 0xb0(%rcx), %eax
je 0x8de10
movq (%rsp), %rdi
callq 0x8e170
movq (%rsp), %rdi
callq 0x6f6b0
movq (%rsp), %rax
movl 0xb0(%rax), %ecx
movq (%rsp), %rax
movl %ecx, 0xa8(%rax)
movq (%rsp), %rax
movl 0xb0(%rax), %ecx
movq (%rsp), %rax
movl %ecx, 0xac(%rax)
movq (%rsp), %rax
movb $0x0, 0xb7(%rax)
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_move_to_word_previous
NK_INTERN int
nk_textedit_move_to_word_previous(struct nk_text_edit *state)
{
   int c = state->cursor - 1;
   while( c >= 0 && !nk_is_word_boundary(state, c))
      --c;

   if( c < 0 )
      c = 0;

   return c;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0xa8(%rax), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
movb %al, 0xb(%rsp)
jl 0x8de62
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x8e1d0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x8de6c
jmp 0x8de79
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x8de3b
cmpl $0x0, 0xc(%rsp)
jge 0x8de88
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_move_to_word_next
NK_INTERN int
nk_textedit_move_to_word_next(struct nk_text_edit *state)
{
   const int len = state->string.len;
   int c = state->cursor+1;
   while( c < len && !nk_is_word_boundary(state, c))
      ++c;

   if( c > len )
      c = len;

   return c;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0x90(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0xa8(%rax), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
xorl %eax, %eax
cmpl 0xc(%rsp), %ecx
movb %al, 0x7(%rsp)
jge 0x8def4
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x8e1d0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x8defe
jmp 0x8df0b
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x8deca
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jle 0x8df1d
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_textedit_sortselection
NK_INTERN void
nk_textedit_sortselection(struct nk_text_edit *state)
{
    /* canonicalize the selection so start <= end */
    if (state->select_end < state->select_start) {
        int temp = state->select_end;
        state->select_end = state->select_start;
        state->select_start = temp;
    }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl 0xb0(%rax), %eax
movq -0x8(%rsp), %rcx
cmpl 0xac(%rcx), %eax
jge 0x8e1c1
movq -0x8(%rsp), %rax
movl 0xb0(%rax), %eax
movl %eax, -0xc(%rsp)
movq -0x8(%rsp), %rax
movl 0xac(%rax), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xb0(%rax)
movl -0xc(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xac(%rax)
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_is_word_boundary
NK_INTERN int
nk_is_word_boundary( struct nk_text_edit *state, int idx)
{
    int len;
    nk_rune c;
    if (idx <= 0) return 1;
    if (!nk_str_at_rune(&state->string, idx, &c, &len)) return 1;
    return (c == ' ' || c == '\t' ||c == 0x3000 || c == ',' || c == ';' ||
            c == '(' || c == ')' || c == '{' || c == '}' || c == '[' || c == ']' ||
            c == '|');
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jg 0x8e1f1
movl $0x1, 0x24(%rsp)
jmp 0x8e2d3
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
movl 0x14(%rsp), %esi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x13430
cmpq $0x0, %rax
jne 0x8e220
movl $0x1, 0x24(%rsp)
jmp 0x8e2d3
movb $0x1, %al
cmpl $0x20, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x9, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x3000, 0xc(%rsp)      # imm = 0x3000
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x2c, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x3b, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x28, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x29, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x7b, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x7d, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x5b, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
movb $0x1, %al
cmpl $0x5d, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x8e2c6
cmpl $0x7c, 0xc(%rsp)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_itoa
NK_LIB char*
nk_itoa(char *s, long n)
{
    long i = 0;
    if (n == 0) {
        s[i++] = '0';
        s[i] = 0;
        return s;
    }
    if (n < 0) {
        s[i++] = '-';
        n = -n;
    }
    while (n > 0) {
        s[i++] = (char)('0' + (n % 10));
        n /= 10;
    }
    s[i] = 0;
    if (s[0] == '-')
        ++s;

    nk_strrev_ascii(s);
    return s;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x8fb36
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rsp)
movb $0x30, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x8fbed
cmpq $0x0, 0x10(%rsp)
jge 0x8fb64
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rsp)
movb $0x2d, (%rax,%rcx)
xorl %eax, %eax
subq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x8fb66
cmpq $0x0, 0x10(%rsp)
jle 0x8fbb0
movq 0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
addq $0x30, %rdx
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, 0x10(%rsp)
jmp 0x8fb66
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x8fbd9
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x90690
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)