LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_init
NK_API void
nk_buffer_init(struct nk_buffer *b, const struct nk_allocator *a,
    nk_size initial_size)
{
    NK_ASSERT(b);
    NK_ASSERT(a);
    NK_ASSERT(initial_size);
    if (!b || !a || !initial_size) return;

    nk_zero(b, sizeof(*b));
    b->type = NK_BUFFER_DYNAMIC;
    b->memory.ptr = a->alloc(a->userdata,0, initial_size);
    b->memory.size = initial_size;
    b->size = initial_size;
    b->grow_factor = 2.0f;
    b->pool = *a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x252ea
movq 0x61d2d(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4bace(%rip), %rsi     # 0x70d9c
leaq 0x4bae5(%rip), %rdx     # 0x70dba
movl $0x2035, %ecx           # imm = 0x2035
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %r14, %r14
jne 0x2531d
movq 0x61cfa(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4ba9b(%rip), %rsi     # 0x70d9c
leaq 0x4bab2(%rip), %rdx     # 0x70dba
movl $0x2036, %ecx           # imm = 0x2036
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %r15, %r15
je 0x25393
testq %r14, %r14
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x25424
movq %rbx, %r12
andq $0x3, %r12
je 0x253c8
movl $0x4, %r13d
subq %r12, %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x12b50
xorps %xmm0, %xmm0
leaq (%rbx,%r13), %rdi
addq $0x74, %rdi
movups %xmm0, -0x74(%rdi)
movups %xmm0, -0x64(%rdi)
movups %xmm0, -0x54(%rdi)
movups %xmm0, -0x44(%rdi)
movups %xmm0, -0x34(%rdi)
movups %xmm0, -0x24(%rdi)
movups %xmm0, -0x14(%rdi)
movl $0x0, -0x4(%rdi)
xorl %esi, %esi
movq %r12, %rdx
callq 0x12b50
jmp 0x253ee
movq 0x61c56(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b9f8(%rip), %rsi     # 0x70d9c
leaq 0x4ba0f(%rip), %rdx     # 0x70dba
movl $0x2037, %ecx           # imm = 0x2037
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13780
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x70(%rbx)
movl $0x1, 0x38(%rbx)
movq (%r14), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq *0x8(%r14)
movq %rax, 0x40(%rbx)
movq %r15, 0x48(%rbx)
movq %r15, 0x70(%rbx)
movl $0x40000000, 0x50(%rbx) # imm = 0x40000000
movups (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_init_fixed
NK_API void
nk_buffer_init_fixed(struct nk_buffer *b, void *m, nk_size size)
{
    NK_ASSERT(b);
    NK_ASSERT(m);
    NK_ASSERT(size);
    if (!b || !m || !size) return;

    nk_zero(b, sizeof(*b));
    b->type = NK_BUFFER_FIXED;
    b->memory.ptr = m;
    b->memory.size = size;
    b->size = size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x25561
movq 0x61ab6(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4b857(%rip), %rsi     # 0x70d9c
leaq 0x4b86e(%rip), %rdx     # 0x70dba
movl $0x2045, %ecx           # imm = 0x2045
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %r15, %r15
jne 0x25594
movq 0x61a83(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4b824(%rip), %rsi     # 0x70d9c
leaq 0x4b83b(%rip), %rdx     # 0x70dba
movl $0x2046, %ecx           # imm = 0x2046
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %rbx, %rbx
je 0x2560a
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x25678
movq %r14, %r12
andq $0x3, %r12
je 0x2563f
movl $0x4, %r13d
subq %r12, %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x12b50
xorps %xmm0, %xmm0
leaq (%r14,%r13), %rdi
addq $0x74, %rdi
movups %xmm0, -0x74(%rdi)
movups %xmm0, -0x64(%rdi)
movups %xmm0, -0x54(%rdi)
movups %xmm0, -0x44(%rdi)
movups %xmm0, -0x34(%rdi)
movups %xmm0, -0x24(%rdi)
movups %xmm0, -0x14(%rdi)
movl $0x0, -0x4(%rdi)
xorl %esi, %esi
movq %r12, %rdx
callq 0x12b50
jmp 0x25664
movq 0x619df(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b781(%rip), %rsi     # 0x70d9c
leaq 0x4b798(%rip), %rdx     # 0x70dba
movl $0x2047, %ecx           # imm = 0x2047
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13780
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movl $0x0, 0x38(%r14)
movq %r15, 0x40(%r14)
movq %rbx, 0x48(%r14)
movq %rbx, 0x70(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_mark
NK_API void
nk_buffer_mark(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)
{
    NK_ASSERT(buffer);
    if (!buffer) return;
    buffer->marker[type].active = nk_true;
    if (type == NK_BUFFER_BACK)
        buffer->marker[type].offset = buffer->size;
    else buffer->marker[type].offset = buffer->allocated;
}

// Assembly:
testq %rdi, %rdi
je 0x25bc0
movl %esi, %ecx
shlq $0x4, %rcx
leaq (%rdi,%rcx), %rax
movl $0x1, (%rdi,%rcx)
cmpl $0x1, %esi
jne 0x25bee
movq 0x70(%rdi), %rcx
jmp 0x25bf2
pushq %rbx
movq 0x61428(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b1ca(%rip), %rsi     # 0x70d9c
leaq 0x4b1e1(%rip), %rdx     # 0x70dba
movl $0x20d3, %ecx           # imm = 0x20D3
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
jmp 0x13780
movq 0x58(%rdi), %rcx
movq %rcx, 0x8(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_reset
NK_API void
nk_buffer_reset(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)
{
    NK_ASSERT(buffer);
    if (!buffer) return;
    if (type == NK_BUFFER_BACK) {
        /* reset back buffer either back to marker or empty */
        buffer->needed -= (buffer->memory.size - buffer->marker[type].offset);
        if (buffer->marker[type].active)
            buffer->size = buffer->marker[type].offset;
        else buffer->size = buffer->memory.size;
        buffer->marker[type].active = nk_false;
    } else {
        /* reset front buffer either back to back marker or empty */
        buffer->needed -= (buffer->allocated - buffer->marker[type].offset);
        if (buffer->marker[type].active)
            buffer->allocated = buffer->marker[type].offset;
        else buffer->allocated = 0;
        buffer->marker[type].active = nk_false;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x25c27
cmpl $0x1, %esi
jne 0x25c55
movq 0x18(%rdi), %rax
movq 0x48(%rdi), %rcx
movq %rax, %rdx
subq %rcx, %rdx
addq %rdx, 0x60(%rdi)
cmpl $0x0, 0x10(%rdi)
cmoveq %rcx, %rax
movq %rax, 0x70(%rdi)
movl $0x0, 0x10(%rdi)
retq
pushq %rbx
movq 0x613c1(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b163(%rip), %rsi     # 0x70d9c
leaq 0x4b17a(%rip), %rdx     # 0x70dba
movl $0x20dd, %ecx           # imm = 0x20DD
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
jmp 0x13780
movl %esi, %eax
shlq $0x4, %rax
movq 0x8(%rdi,%rax), %rcx
movq %rcx, %rdx
subq 0x58(%rdi), %rdx
addq %rdx, 0x60(%rdi)
xorl %edx, %edx
cmpl $0x0, (%rdi,%rax)
cmovneq %rcx, %rdx
movq %rdx, 0x58(%rdi)
movl $0x0, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_clear
NK_API void
nk_buffer_clear(struct nk_buffer *b)
{
    NK_ASSERT(b);
    if (!b) return;
    b->allocated = 0;
    b->size = b->memory.size;
    b->calls = 0;
    b->needed = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x25c9e
movq $0x0, 0x58(%rdi)
movq 0x48(%rdi), %rax
movq %rax, 0x70(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
retq
pushq %rbx
movq 0x6134a(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b0ec(%rip), %rsi     # 0x70d9c
leaq 0x4b103(%rip), %rdx     # 0x70dba
movl $0x20f2, %ecx           # imm = 0x20F2
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_free
NK_API void
nk_buffer_free(struct nk_buffer *b)
{
    NK_ASSERT(b);
    if (!b || !b->memory.ptr) return;
    if (b->type == NK_BUFFER_FIXED) return;
    if (!b->pool.free) return;
    NK_ASSERT(b->pool.free);
    b->pool.free(b->pool.userdata, b->memory.ptr);
}

// Assembly:
testq %rdi, %rdi
je 0x25cf0
movq 0x40(%rdi), %rsi
testq %rsi, %rsi
je 0x25cef
cmpl $0x0, 0x38(%rdi)
je 0x25cef
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x25cef
movq 0x20(%rdi), %rdi
jmpq *%rax
retq
pushq %rbx
movq 0x612f8(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b09a(%rip), %rsi     # 0x70d9c
leaq 0x4b0b1(%rip), %rdx     # 0x70dba
movl $0x20fc, %ecx           # imm = 0x20FC
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_buffer_info
NK_API void
nk_buffer_info(struct nk_memory_status *s, struct nk_buffer *b)
{
    NK_ASSERT(b);
    NK_ASSERT(s);
    if (!s || !b) return;
    s->allocated = b->allocated;
    s->size =  b->memory.size;
    s->needed = b->needed;
    s->memory = b->memory.ptr;
    s->calls = b->calls;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x25d50
testq %rbx, %rbx
je 0x25d89
movq 0x48(%rsi), %rax
movq %rax, 0x10(%rbx)
movups 0x58(%rsi), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x40(%rsi), %rax
movq %rax, (%rbx)
movq 0x68(%rsi), %rax
movq %rax, 0x28(%rbx)
jmp 0x25d81
movq 0x61299(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4b03b(%rip), %rsi     # 0x70d9c
leaq 0x4b052(%rip), %rdx     # 0x70dba
movl $0x2106, %ecx           # imm = 0x2106
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %rbx, %rbx
je 0x25d89
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x61260(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4b002(%rip), %rsi     # 0x70d9c
leaq 0x4b019(%rip), %rdx     # 0x70dba
movl $0x2107, %ecx           # imm = 0x2107
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_init_default
NK_API void
nk_str_init_default(struct nk_str *str)
{
    struct nk_allocator alloc;
    alloc.userdata.ptr = 0;
    alloc.alloc = nk_malloc;
    alloc.free = nk_mfree;
    nk_buffer_init(&str->buffer, &alloc, 32);
    str->len = 0;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
leaq -0xc1a(%rip), %rax      # 0x25295
movq %rax, 0x8(%rsi)
leaq -0xc1d(%rip), %rax      # 0x2529d
movq %rax, 0x10(%rsi)
movl $0x20, %edx
callq 0x12d60
movl $0x0, 0x78(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_append_text_char
NK_API int
nk_str_append_text_char(struct nk_str *s, const char *str, int len)
{
    char *mem;
    NK_ASSERT(s);
    NK_ASSERT(str);
    if (!s || !str || !len) return 0;
    mem = (char*)nk_buffer_alloc(&s->buffer, NK_BUFFER_FRONT, (nk_size)len * sizeof(char), 0);
    if (!mem) return 0;
    NK_MEMCPY(mem, str, (nk_size)len * sizeof(char));
    s->len += nk_utf_len(str, len);
    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x25f3d
movq 0x610da(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4ae7b(%rip), %rsi     # 0x70d9c
leaq 0x4ae92(%rip), %rdx     # 0x70dba
movl $0x214b, %ecx           # imm = 0x214B
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %r15, %r15
je 0x25f8f
testq %r14, %r14
sete %al
testl %ebx, %ebx
sete %cl
xorl %r12d, %r12d
orb %al, %cl
jne 0x25fbe
movslq %ebx, %r13
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x256b9
testq %rax, %rax
je 0x25fbe
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x25a38
movq %r15, %rdi
movl %ebx, %esi
callq 0x12730
addl %eax, 0x78(%r14)
movl %ebx, %r12d
jmp 0x25fbe
movq 0x6105a(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4adfc(%rip), %rsi     # 0x70d9c
leaq 0x4ae13(%rip), %rdx     # 0x70dba
xorl %r12d, %r12d
movl $0x214c, %ecx           # imm = 0x214C
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl %r12d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_append_text_utf8
NK_API int
nk_str_append_text_utf8(struct nk_str *str, const char *text, int len)
{
    int i = 0;
    int byte_len = 0;
    nk_rune unicode;
    if (!str || !text || !len) return 0;
    for (i = 0; i < len; ++i)
        byte_len += nk_utf_decode(text+byte_len, &unicode, 4);
    nk_str_append_text_char(str, text, byte_len);
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %edx, %edx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x26056
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
jle 0x26046
leaq 0x4(%rsp), %r13
movl %ebx, %ebp
movslq %r12d, %r12
leaq (%r14,%r12), %rdi
movq %r13, %rsi
movl $0x4, %edx
callq 0x12ef0
addl %eax, %r12d
decl %ebp
jne 0x2602b
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x13640
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_append_str_utf8
NK_API int
nk_str_append_str_utf8(struct nk_str *str, const char *text)
{
    int byte_len = 0;
    int num_runes = 0;
    int glyph_len = 0;
    nk_rune unicode;
    if (!str || !text) return 0;

    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
    while (unicode != '\0' && glyph_len) {
        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
        byte_len += glyph_len;
        num_runes++;
    }
    nk_str_append_text_char(str, text, byte_len);
    return num_runes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x260f1
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x12ef0
movl %eax, %r15d
cmpl $0x0, (%r12)
setne %al
testl %r15d, %r15d
setne %cl
andb %al, %cl
xorl %ebp, %ebp
cmpb $0x1, %cl
jne 0x260e3
xorl %ebp, %ebp
leaq 0xc(%rsp), %r12
movslq %r15d, %r15
leaq (%rbx,%r15), %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x12ef0
addl %eax, %r15d
incl %ebp
cmpl $0x0, 0xc(%rsp)
je 0x260e3
testl %eax, %eax
jne 0x260bf
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x13640
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_append_text_runes
NK_API int
nk_str_append_text_runes(struct nk_str *str, const nk_rune *text, int len)
{
    int i = 0;
    int byte_len = 0;
    nk_glyph glyph;

    NK_ASSERT(str);
    if (!str || !text || !len) return 0;
    for (i = 0; i < len; ++i) {
        byte_len = nk_utf_encode(text[i], glyph, NK_UTF_SIZE);
        if (!byte_len) break;
        nk_str_append_text_char(str, glyph, byte_len);
    }
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x26165
movl %edx, %ebx
movq %rsi, %r14
testq %rsi, %rsi
sete %al
testl %edx, %edx
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x26193
testl %ebx, %ebx
jle 0x26161
movq %rdi, %r15
movl %ebx, %r13d
xorl %ebp, %ebp
leaq 0x4(%rsp), %r12
movl (%r14,%rbp,4), %edi
movq %r12, %rsi
movl $0x4, %edx
callq 0x12e50
testl %eax, %eax
je 0x26161
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x13640
incq %rbp
cmpq %rbp, %r13
jne 0x26137
movl %ebx, %ebp
jmp 0x26193
movq 0x60e84(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4ac26(%rip), %rsi     # 0x70d9c
leaq 0x4ac3d(%rip), %rdx     # 0x70dba
xorl %ebp, %ebp
movl $0x217e, %ecx           # imm = 0x217E
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_append_str_runes
NK_API int
nk_str_append_str_runes(struct nk_str *str, const nk_rune *runes)
{
    int i = 0;
    nk_glyph glyph;
    int byte_len;
    NK_ASSERT(str);
    if (!str || !runes) return 0;
    while (runes[i] != '\0') {
        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
        nk_str_append_text_char(str, glyph, byte_len);
        i++;
    }
    return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x261f4
movq %rsi, %r14
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x26222
movq %rdi, %r15
movl (%r14), %edi
testl %edi, %edi
je 0x26222
xorl %ebx, %ebx
leaq 0x4(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x12e50
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x13640
movl 0x4(%r14,%rbx,4), %edi
incq %rbx
testl %edi, %edi
jne 0x261cc
jmp 0x26222
movq 0x60df5(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4ab97(%rip), %rsi     # 0x70d9c
leaq 0x4abae(%rip), %rdx     # 0x70dba
xorl %ebx, %ebx
movl $0x218d, %ecx           # imm = 0x218D
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_insert_at_rune
NK_API int
nk_str_insert_at_rune(struct nk_str *str, int pos, const char *cstr, int len)
{
    int glyph_len;
    nk_rune unicode;
    const char *begin;
    const char *buffer;

    NK_ASSERT(str);
    NK_ASSERT(cstr);
    NK_ASSERT(len);
    if (!str || !cstr || !len) return 0;
    begin = nk_str_at_rune(str, pos, &unicode, &glyph_len);
    if (!str->len)
        return nk_str_append_text_char(str, cstr, len);
    buffer = nk_str_get_const(str);
    if (!begin) return 0;
    return nk_str_insert_at_char(str, (int)(begin - buffer), cstr, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
testq %rdi, %rdi
jne 0x26492
movq 0x60b85(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4a926(%rip), %rsi     # 0x70d9c
leaq 0x4a93d(%rip), %rdx     # 0x70dba
movl $0x21c1, %ecx           # imm = 0x21C1
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testq %r14, %r14
jne 0x264c5
movq 0x60b52(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4a8f3(%rip), %rsi     # 0x70d9c
leaq 0x4a90a(%rip), %rdx     # 0x70dba
movl $0x21c2, %ecx           # imm = 0x21C2
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
testl %ebx, %ebx
je 0x2650b
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
xorl %r12d, %r12d
orb %al, %cl
jne 0x26566
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %r15, %rdi
movl %ebp, %esi
callq 0x123e0
cmpl $0x0, 0x78(%r15)
je 0x2653c
xorl %r12d, %r12d
cmpq $0x0, 0x58(%r15)
je 0x2654b
movq 0x40(%r15), %rcx
jmp 0x2654d
movq 0x60ade(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a880(%rip), %rsi     # 0x70d9c
leaq 0x4a897(%rip), %rdx     # 0x70dba
xorl %r12d, %r12d
movl $0x21c3, %ecx           # imm = 0x21C3
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
jmp 0x26566
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x13640
jmp 0x26563
xorl %ecx, %ecx
testq %rax, %rax
je 0x26566
subl %ecx, %eax
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x120c0
movl %eax, %r12d
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_at_rune
NK_API char*
nk_str_at_rune(struct nk_str *str, int pos, nk_rune *unicode, int *len)
{
    int i = 0;
    int src_len = 0;
    int glyph_len = 0;
    char *text;
    int text_len;

    NK_ASSERT(str);
    NK_ASSERT(unicode);
    NK_ASSERT(len);

    if (!str || !unicode || !len) return 0;
    if (pos < 0) {
        *unicode = 0;
        *len = 0;
        return 0;
    }

    text = (char*)str->buffer.memory.ptr;
    text_len = (int)str->buffer.allocated;
    glyph_len = nk_utf_decode(text, unicode, text_len);
    while (glyph_len) {
        if (i == pos) {
            *len = glyph_len;
            break;
        }

        i++;
        src_len = src_len + glyph_len;
        glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);
    }
    if (i != pos) return 0;
    return text + src_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r13
testq %rdi, %rdi
jne 0x265bd
movq 0x60a58(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a7fa(%rip), %rsi     # 0x70d9c
leaq 0x4a811(%rip), %rdx     # 0x70dba
movl $0x226e, %ecx           # imm = 0x226E
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %r15, %r15
jne 0x265ee
movq 0x60a27(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a7c9(%rip), %rsi     # 0x70d9c
leaq 0x4a7e0(%rip), %rdx     # 0x70dba
movl $0x226f, %ecx           # imm = 0x226F
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testq %rbp, %rbp
je 0x26652
testq %r15, %r15
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0x2669a
testl %ebx, %ebx
js 0x26683
movq %rbp, (%rsp)
movq 0x40(%r13), %r12
movl 0x58(%r13), %ebp
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x12ef0
testl %eax, %eax
je 0x2668f
xorl %r14d, %r14d
xorl %r13d, %r13d
cmpl %r14d, %ebx
je 0x2669f
incl %r14d
addl %eax, %r13d
movslq %r13d, %rax
leaq (%r12,%rax), %rdi
movl %ebp, %edx
subl %eax, %edx
movq %r15, %rsi
callq 0x12ef0
testl %eax, %eax
jne 0x2662e
jmp 0x26695
movq 0x60997(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a739(%rip), %rsi     # 0x70d9c
leaq 0x4a750(%rip), %rdx     # 0x70dba
xorl %r12d, %r12d
movl $0x2270, %ecx           # imm = 0x2270
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
jmp 0x266ab
xorl %r12d, %r12d
movl %r12d, (%r15)
movl %r12d, (%rbp)
jmp 0x266ab
xorl %r13d, %r13d
xorl %r14d, %r14d
cmpl %ebx, %r14d
je 0x266a5
xorl %r12d, %r12d
jmp 0x266ab
movq (%rsp), %rcx
movl %eax, (%rcx)
movslq %r13d, %rax
addq %rax, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_insert_text_utf8
NK_API int
nk_str_insert_text_utf8(struct nk_str *str, int pos, const char *text, int len)
{
    int i = 0;
    int byte_len = 0;
    nk_rune unicode;

    NK_ASSERT(str);
    NK_ASSERT(text);
    if (!str || !text || !len) return 0;
    for (i = 0; i < len; ++i)
        byte_len += nk_utf_decode(text+byte_len, &unicode, 4);
    nk_str_insert_at_rune(str, pos, text, byte_len);
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r13d
movq %rdi, %r15
testq %rdi, %rdi
jne 0x26762
movq 0x608b3(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a655(%rip), %rsi     # 0x70d9c
leaq 0x4a66c(%rip), %rdx     # 0x70dba
movl $0x21dd, %ecx           # imm = 0x21DD
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testq %r14, %r14
je 0x267bc
testq %r15, %r15
sete %al
testl %ebp, %ebp
sete %cl
xorl %r12d, %r12d
orb %al, %cl
jne 0x267eb
movl %r13d, (%rsp)
xorl %r12d, %r12d
testl %ebp, %ebp
jle 0x267a6
leaq 0x4(%rsp), %r13
movl %ebp, %ebx
movslq %r12d, %r12
leaq (%r14,%r12), %rdi
movq %r13, %rsi
movl $0x4, %edx
callq 0x12ef0
addl %eax, %r12d
decl %ebx
jne 0x2678b
movq %r15, %rdi
movl (%rsp), %esi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x12600
movl %ebp, %r12d
jmp 0x267eb
movq 0x6082d(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a5cf(%rip), %rsi     # 0x70d9c
leaq 0x4a5e6(%rip), %rdx     # 0x70dba
xorl %r12d, %r12d
movl $0x21de, %ecx           # imm = 0x21DE
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_insert_str_utf8
NK_API int
nk_str_insert_str_utf8(struct nk_str *str, int pos, const char *text)
{
    int byte_len = 0;
    int num_runes = 0;
    int glyph_len = 0;
    nk_rune unicode;
    if (!str || !text) return 0;

    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);
    while (unicode != '\0' && glyph_len) {
        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);
        byte_len += glyph_len;
        num_runes++;
    }
    nk_str_insert_at_rune(str, pos, text, byte_len);
    return num_runes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x268b6
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x4(%rsp), %r15
movq %rdx, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x12ef0
movl %eax, %r12d
cmpl $0x0, (%r15)
setne %al
testl %r12d, %r12d
setne %cl
andb %al, %cl
xorl %r15d, %r15d
cmpb $0x1, %cl
jne 0x268a6
xorl %r15d, %r15d
leaq 0x4(%rsp), %r13
movslq %r12d, %r12
leaq (%rbx,%r12), %rdi
movq %r13, %rsi
movl $0x4, %edx
callq 0x12ef0
addl %eax, %r12d
incl %r15d
cmpl $0x0, 0x4(%rsp)
je 0x268a6
testl %eax, %eax
jne 0x26881
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x12600
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_insert_text_runes
NK_API int
nk_str_insert_text_runes(struct nk_str *str, int pos, const nk_rune *runes, int len)
{
    int i = 0;
    int byte_len = 0;
    nk_glyph glyph;

    NK_ASSERT(str);
    if (!str || !runes || !len) return 0;
    for (i = 0; i < len; ++i) {
        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
        if (!byte_len) break;
        nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
    }
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x26930
movq %rdx, %r14
testq %rdx, %rdx
sete %al
testl %ecx, %ecx
sete %dl
xorl %ebx, %ebx
orb %al, %dl
jne 0x2695e
movl %ecx, %ebx
testl %ecx, %ecx
jle 0x2695e
movq %rdi, %r15
movl %esi, %r13d
xorl %ebp, %ebp
leaq 0x4(%rsp), %r12
movl (%r14,%rbp,4), %edi
movq %r12, %rsi
movl $0x4, %edx
callq 0x12e50
testl %eax, %eax
je 0x2695e
leal (%r13,%rbp), %esi
movq %r15, %rdi
movq %r12, %rdx
movl %eax, %ecx
callq 0x12600
incq %rbp
cmpq %rbp, %rbx
jne 0x268ff
jmp 0x2695e
movq 0x606b9(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a45b(%rip), %rsi     # 0x70d9c
leaq 0x4a472(%rip), %rdx     # 0x70dba
xorl %ebx, %ebx
movl $0x21fe, %ecx           # imm = 0x21FE
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_insert_str_runes
NK_API int
nk_str_insert_str_runes(struct nk_str *str, int pos, const nk_rune *runes)
{
    int i = 0;
    nk_glyph glyph;
    int byte_len;
    NK_ASSERT(str);
    if (!str || !runes) return 0;
    while (runes[i] != '\0') {
        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);
        nk_str_insert_at_rune(str, pos+i, glyph, byte_len);
        i++;
    }
    return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x269cb
movq %rdx, %r14
xorl %ebx, %ebx
testq %rdx, %rdx
je 0x269f9
movq %rdi, %r15
movl (%r14), %edi
testl %edi, %edi
je 0x269f9
movl %esi, %r13d
xorl %ebx, %ebx
leaq 0xc(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x12e50
leal (%rbx,%r13), %esi
movq %r15, %rdi
movq %r12, %rdx
movl %eax, %ecx
callq 0x12600
movl 0x4(%r14,%rbx,4), %edi
incq %rbx
testl %edi, %edi
jne 0x2699f
jmp 0x269f9
movq 0x6061e(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a3c0(%rip), %rsi     # 0x70d9c
leaq 0x4a3d7(%rip), %rdx     # 0x70dba
xorl %ebx, %ebx
movl $0x220d, %ecx           # imm = 0x220D
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_remove_chars
NK_API void
nk_str_remove_chars(struct nk_str *s, int len)
{
    NK_ASSERT(s);
    NK_ASSERT(len >= 0);
    if (!s || len < 0 || (nk_size)len > s->buffer.allocated) return;
    NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);
    s->buffer.allocated -= (nk_size)len;
    s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
testq %rdi, %rdi
je 0x26a77
testl %ebp, %ebp
js 0x26ab2
movq %rdi, %rbx
movl %ebp, %r14d
movq 0x58(%rdi), %rsi
cmpq %r14, %rsi
jb 0x26aa7
cmpl %ebp, %esi
jge 0x26a62
movq 0x605b7(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x4a359(%rip), %rsi     # 0x70d9c
leaq 0x4a370(%rip), %rdx     # 0x70dba
movl $0x221c, %ecx           # imm = 0x221C
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq 0x58(%rbx), %rsi
subq %r14, %rsi
movq %rsi, 0x58(%rbx)
movq 0x40(%rbx), %rdi
callq 0x12730
movl %eax, 0x78(%rbx)
jmp 0x26aa7
movq 0x60572(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a314(%rip), %rsi     # 0x70d9c
leaq 0x4a32b(%rip), %rdx     # 0x70dba
movl $0x2219, %ecx           # imm = 0x2219
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
callq 0x13780
testl %ebp, %ebp
js 0x26ab2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x60537(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a2d9(%rip), %rsi     # 0x70d9c
leaq 0x4a2f0(%rip), %rdx     # 0x70dba
movl $0x221a, %ecx           # imm = 0x221A
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_remove_runes
NK_API void
nk_str_remove_runes(struct nk_str *str, int len)
{
    int index;
    const char *begin;
    const char *end;
    nk_rune unicode;

    NK_ASSERT(str);
    NK_ASSERT(len >= 0);
    if (!str || len < 0) return;
    if (len >= str->len) {
        str->len = 0;
        return;
    }

    index = str->len - len;
    begin = nk_str_at_rune(str, index, &unicode, &len);
    end = (const char*)str->buffer.memory.ptr + str->buffer.allocated;
    nk_str_remove_chars(str, (int)(end-begin)+1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
testq %rdi, %rdi
jne 0x26b2a
movq 0x604eb(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a28d(%rip), %rsi     # 0x70d9c
leaq 0x4a2a4(%rip), %rdx     # 0x70dba
movl $0x2228, %ecx           # imm = 0x2228
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
testl %ebp, %ebp
js 0x26b60
testq %rbx, %rbx
je 0x26b9b
movl 0x78(%rbx), %esi
subl %ebp, %esi
jle 0x26b94
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq 0x123e0
movl 0x40(%rbx), %esi
addl 0x58(%rbx), %esi
subl %eax, %esi
incl %esi
movq %rbx, %rdi
callq 0x13cb0
jmp 0x26b9b
movq 0x60489(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a22b(%rip), %rsi     # 0x70d9c
leaq 0x4a242(%rip), %rdx     # 0x70dba
movl $0x2229, %ecx           # imm = 0x2229
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x13780
movl $0x0, 0x78(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_delete_chars
NK_API void
nk_str_delete_chars(struct nk_str *s, int pos, int len)
{
    NK_ASSERT(s);
    if (!s || !len || (nk_size)pos > s->buffer.allocated ||
        (nk_size)(pos + len) > s->buffer.allocated) return;

    if ((nk_size)(pos + len) < s->buffer.allocated) {
        /* memmove */
        char *dst = nk_ptr_add(char, s->buffer.memory.ptr, pos);
        char *src = nk_ptr_add(char, s->buffer.memory.ptr, pos + len);
        NK_MEMCPY(dst, src, s->buffer.allocated - (nk_size)(pos + len));
        NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);
        s->buffer.allocated -= (nk_size)len;
    } else nk_str_remove_chars(s, len);
    s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x26c35
movl %edx, %ebp
testl %edx, %edx
je 0x26c7f
movq %rdi, %rbx
movslq %esi, %rdi
movq 0x58(%rbx), %rdx
cmpq %rdi, %rdx
jb 0x26c7f
addl %ebp, %esi
movslq %esi, %rsi
subq %rsi, %rdx
jb 0x26c7f
jbe 0x26c65
movq 0x40(%rbx), %rax
addq %rax, %rdi
addq %rax, %rsi
callq 0x25a38
movq 0x58(%rbx), %rsi
cmpl %ebp, %esi
jge 0x26c29
movq 0x603f0(%rip), %r14     # 0x86ff0
movq (%r14), %rdi
leaq 0x4a192(%rip), %rsi     # 0x70d9c
leaq 0x4a1a9(%rip), %rdx     # 0x70dba
movl $0x2241, %ecx           # imm = 0x2241
xorl %eax, %eax
callq 0x12d80
movq (%r14), %rdi
callq 0x13780
movq 0x58(%rbx), %rsi
movslq %ebp, %rax
subq %rax, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x26c73
movq 0x603b4(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x4a156(%rip), %rsi     # 0x70d9c
leaq 0x4a16d(%rip), %rdx     # 0x70dba
movl $0x2238, %ecx           # imm = 0x2238
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x13780
movq %rbx, %rdi
movl %ebp, %esi
callq 0x13cb0
movq 0x58(%rbx), %rsi
movq 0x40(%rbx), %rdi
callq 0x12730
movl %eax, 0x78(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_str_delete_runes
NK_API void
nk_str_delete_runes(struct nk_str *s, int pos, int len)
{
    char *temp;
    nk_rune unicode;
    char *begin;
    char *end;
    int unused;

    NK_ASSERT(s);
    NK_ASSERT(s->len >= pos + len);
    if (s->len < pos + len)
        len = NK_CLAMP(0, (s->len - pos), s->len);
    if (!len) return;

    temp = (char *)s->buffer.memory.ptr;
    begin = nk_str_at_rune(s, pos, &unicode, &unused);
    if (!begin) return;
    s->buffer.memory.ptr = begin;
    end = nk_str_at_rune(s, len, &unicode, &unused);
    s->buffer.memory.ptr = temp;
    if (!end) return;
    nk_str_delete_chars(s, (int)(begin - temp), (int)(end - begin));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x26ccc
movq 0x6034b(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4a0ec(%rip), %rsi     # 0x70d9c
leaq 0x4a103(%rip), %rdx     # 0x70dba
movl $0x224f, %ecx           # imm = 0x224F
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movl 0x78(%rbx), %eax
leal (%r14,%r15), %ebp
cmpl %ebp, %eax
jge 0x26d08
movq 0x60312(%rip), %r12     # 0x86ff0
movq (%r12), %rdi
leaq 0x4a0b3(%rip), %rsi     # 0x70d9c
leaq 0x4a0ca(%rip), %rdx     # 0x70dba
movl $0x2250, %ecx           # imm = 0x2250
xorl %eax, %eax
callq 0x12d80
movq (%r12), %rdi
callq 0x13780
movl 0x78(%rbx), %eax
cmpl %ebp, %eax
jge 0x26d1c
xorl %ecx, %ecx
testl %r15d, %r15d
cmovgl %r15d, %ecx
subl %ecx, %eax
movl %eax, %r14d
js 0x26d77
testl %r14d, %r14d
je 0x26d77
movq 0x40(%rbx), %r12
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x123e0
testq %rax, %rax
je 0x26d77
movq %rax, %r15
movq %rax, 0x40(%rbx)
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x123e0
movq %r12, 0x40(%rbx)
testq %rax, %rax
je 0x26d77
subl %r15d, %eax
subl %r12d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0x12900
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_push_scissor
NK_API void
nk_push_scissor(struct nk_command_buffer *b, struct nk_rect r)
{
    struct nk_command_scissor *cmd;
    NK_ASSERT(b);
    if (!b) return;

    b->clip.x = r.x;
    b->clip.y = r.y;
    b->clip.w = r.w;
    b->clip.h = r.h;
    cmd = (struct nk_command_scissor*)
        nk_command_buffer_push(b, NK_COMMAND_SCISSOR, sizeof(*cmd));

    if (!cmd) return;
    cmd->x = (short)r.x;
    cmd->y = (short)r.y;
    cmd->w = (unsigned short)NK_MAX(0, r.w);
    cmd->h = (unsigned short)NK_MAX(0, r.h);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x2721f
movdqa %xmm0, (%rsp)
movdqa %xmm1, 0x10(%rsp)
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqu %xmm0, 0x8(%rdi)
movl $0x18, %edx
movl $0x1, %esi
callq 0x27250
testq %rax, %rax
je 0x27219
cvttps2dq (%rsp), %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x10(%rax)
pxor %xmm0, %xmm0
movaps 0x10(%rsp), %xmm1
maxps %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x14(%rax)
addq $0x20, %rsp
popq %rbx
retq
movq 0x5fdca(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x49b6c(%rip), %rsi     # 0x70d9c
leaq 0x49b83(%rip), %rdx     # 0x70dba
movl $0x232f, %ecx           # imm = 0x232F
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x20, %rsp
popq %rbx
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_command_buffer_push
NK_LIB void*
nk_command_buffer_push(struct nk_command_buffer* b,
    enum nk_command_type t, nk_size size)
{
    NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_command);
    struct nk_command *cmd;
    nk_size alignment;
    void *unaligned;
    void *memory;

    NK_ASSERT(b);
    NK_ASSERT(b->base);
    if (!b) return 0;
    cmd = (struct nk_command*)nk_buffer_alloc(b->base,NK_BUFFER_FRONT,size,align);
    if (!cmd) return 0;

    /* make sure the offset to the next command is aligned */
    b->last = (nk_size)((nk_byte*)cmd - (nk_byte*)b->base->memory.ptr);
    unaligned = (nk_byte*)cmd + size;
    memory = NK_ALIGN_PTR(unaligned, align);
    alignment = (nk_size)((nk_byte*)memory - (nk_byte*)unaligned);
#ifdef NK_ZERO_COMMAND_MEMORY
    NK_MEMSET(cmd, 0, size + alignment);
#endif

    cmd->type = t;
    cmd->next = b->base->allocated + alignment;
#ifdef NK_INCLUDE_COMMAND_USERDATA
    cmd->userdata = b->userdata;
#endif
    b->end = cmd->next;
    return cmd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x27296
movq 0x5fd82(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x49b24(%rip), %rsi     # 0x70d9c
leaq 0x49b3b(%rip), %rdx     # 0x70dba
movl $0x2315, %ecx           # imm = 0x2315
xorl %eax, %eax
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movq (%rbx), %rdi
movl $0x8, %ecx
xorl %esi, %esi
movq %r14, %rdx
callq 0x256b9
testq %rax, %rax
je 0x272d9
movq (%rbx), %rcx
movq %rax, %rdx
subq 0x40(%rcx), %rdx
movq %rdx, 0x38(%rbx)
leaq (%rax,%r14), %rdx
leaq (%rax,%r14), %rsi
addq $0x7, %rsi
andq $-0x8, %rsi
subq %rdx, %rsi
movl %ebp, (%rax)
addq 0x58(%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rsi, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_stroke_line
NK_API void
nk_stroke_line(struct nk_command_buffer *b, float x0, float y0,
    float x1, float y1, float line_thickness, struct nk_color c)
{
    struct nk_command_line *cmd;
    NK_ASSERT(b);
    if (!b || line_thickness <= 0) return;
    cmd = (struct nk_command_line*)
        nk_command_buffer_push(b, NK_COMMAND_LINE, sizeof(*cmd));
    if (!cmd) return;
    cmd->line_thickness = (unsigned short)line_thickness;
    cmd->begin.x = (short)x0;
    cmd->begin.y = (short)y0;
    cmd->end.x = (short)x1;
    cmd->end.y = (short)y1;
    cmd->color = c;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
testq %rdi, %rdi
je 0x27387
xorps %xmm5, %xmm5
ucomiss %xmm4, %xmm5
jae 0x27381
movl %esi, %ebx
movl $0x20, %edx
movl $0x2, %esi
movss %xmm3, 0xc(%rsp)
movaps %xmm4, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm2, 0x10(%rsp)
callq 0x27250
movaps 0x10(%rsp), %xmm4
movaps 0x20(%rsp), %xmm2
movaps 0x30(%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
movss 0xc(%rsp), %xmm3
testq %rax, %rax
je 0x27381
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
cvttps2dq %xmm0, %xmm0
movdqa 0x46243(%rip), %xmm1    # 0x6d5a0
movdqa %xmm1, %xmm2
pandn %xmm0, %xmm2
packssdw %xmm0, %xmm0
pand %xmm1, %xmm0
por %xmm2, %xmm0
movq %xmm0, 0x10(%rax)
cvttss2si %xmm3, %ecx
movw %cx, 0x18(%rax)
movl %ebx, 0x1a(%rax)
addq $0x50, %rsp
popq %rbx
retq
movq 0x5fc62(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x49a04(%rip), %rsi     # 0x70d9c
leaq 0x49a1b(%rip), %rdx     # 0x70dba
movl $0x2344, %ecx           # imm = 0x2344
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x50, %rsp
popq %rbx
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_stroke_curve
NK_API void
nk_stroke_curve(struct nk_command_buffer *b, float ax, float ay,
    float ctrl0x, float ctrl0y, float ctrl1x, float ctrl1y,
    float bx, float by, float line_thickness, struct nk_color col)
{
    struct nk_command_curve *cmd;
    NK_ASSERT(b);
    if (!b || col.a == 0 || line_thickness <= 0) return;

    cmd = (struct nk_command_curve*)
        nk_command_buffer_push(b, NK_COMMAND_CURVE, sizeof(*cmd));
    if (!cmd) return;
    cmd->line_thickness = (unsigned short)line_thickness;
    cmd->begin.x = (short)ax;
    cmd->begin.y = (short)ay;
    cmd->ctrl[0].x = (short)ctrl0x;
    cmd->ctrl[0].y = (short)ctrl0y;
    cmd->ctrl[1].x = (short)ctrl1x;
    cmd->ctrl[1].y = (short)ctrl1y;
    cmd->end.x = (short)bx;
    cmd->end.y = (short)by;
    cmd->color = col;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
testq %rdi, %rdi
je 0x274cf
movl %esi, %ebx
movss 0xa0(%rsp), %xmm8
cmpl $0x1000000, %esi        # imm = 0x1000000
setb %al
xorps %xmm9, %xmm9
ucomiss %xmm8, %xmm9
setae %cl
orb %al, %cl
jne 0x274c6
movl $0x28, %edx
movl $0x3, %esi
movss %xmm5, 0xc(%rsp)
movaps %xmm7, 0x80(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm4, 0x50(%rsp)
movaps %xmm6, 0x40(%rsp)
movaps %xmm8, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x27250
movaps 0x10(%rsp), %xmm8
movaps 0x20(%rsp), %xmm7
movaps 0x30(%rsp), %xmm6
movaps 0x40(%rsp), %xmm5
movdqa 0x50(%rsp), %xmm4
movdqa 0x60(%rsp), %xmm2
movdqa 0x70(%rsp), %xmm1
movdqa 0x80(%rsp), %xmm0
movss 0xc(%rsp), %xmm3
testq %rax, %rax
je 0x274c6
movl %ebx, %ecx
shrl $0x18, %ecx
unpcklps %xmm5, %xmm7            # xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
unpcklps %xmm8, %xmm6            # xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1]
movlhps %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0]
punpckldq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
cvttps2dq %xmm0, %xmm0
cvttps2dq %xmm6, %xmm1
movdqa %xmm1, %xmm2
packssdw %xmm0, %xmm2
movdqa 0x46100(%rip), %xmm0    # 0x6d5a0
pand %xmm0, %xmm2
pandn %xmm1, %xmm0
por %xmm2, %xmm0
cvttss2si %xmm3, %edx
movw %dx, 0x20(%rax)
movdqu %xmm0, 0x10(%rax)
movw %bx, 0x22(%rax)
shrl $0x10, %ebx
movb %bl, 0x24(%rax)
movb %cl, 0x25(%rax)
addq $0x90, %rsp
popq %rbx
retq
movq 0x5fb1a(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x498bc(%rip), %rsi     # 0x70d9c
leaq 0x498d3(%rip), %rdx     # 0x70dba
movl $0x2356, %ecx           # imm = 0x2356
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x90, %rsp
popq %rbx
jmp 0x13780
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_fill_rect
NK_API void
nk_fill_rect(struct nk_command_buffer *b, struct nk_rect rect,
    float rounding, struct nk_color c)
{
    struct nk_command_rect_filled *cmd;
    NK_ASSERT(b);
    if (!b || c.a == 0 || rect.w == 0 || rect.h == 0) return;
    if (b->use_clipping) {
        const struct nk_rect *clip = &b->clip;
        if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,
            clip->x, clip->y, clip->w, clip->h)) return;
    }

    cmd = (struct nk_command_rect_filled*)
        nk_command_buffer_push(b, NK_COMMAND_RECT_FILLED, sizeof(*cmd));
    if (!cmd) return;
    cmd->rounding = (unsigned short)rounding;
    cmd->x = (short)rect.x;
    cmd->y = (short)rect.y;
    cmd->w = (unsigned short)NK_MAX(0, rect.w);
    cmd->h = (unsigned short)NK_MAX(0, rect.h);
    cmd->color = c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movss %xmm2, 0xc(%rsp)
movq %rdi, %r14
testq %rdi, %rdi
jne 0x276e6
movq 0x5f943(%rip), %r15     # 0x86ff0
movq (%r15), %rdi
leaq 0x496e5(%rip), %rsi     # 0x70d9c
leaq 0x496fc(%rip), %rdx     # 0x70dba
movl $0x2383, %ecx           # imm = 0x2383
xorl %eax, %eax
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x12d80
movq (%r15), %rdi
callq 0x13780
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
testq %r14, %r14
je 0x277d2
cmpl $0x1000000, %ebx        # imm = 0x1000000
jb 0x277d2
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x27709
jnp 0x277d2
movaps %xmm1, %xmm4
shufps $0x55, %xmm1, %xmm4     # xmm4 = xmm4[1,1],xmm1[1,1]
ucomiss %xmm2, %xmm4
jne 0x2771b
jnp 0x277d2
cmpl $0x0, 0x18(%r14)
je 0x27768
movss 0x8(%r14), %xmm3
movaps %xmm0, %xmm2
addss %xmm1, %xmm2
ucomiss %xmm3, %xmm2
jbe 0x277d2
addss 0x10(%r14), %xmm3
ucomiss %xmm0, %xmm3
jbe 0x277d2
movss 0xc(%r14), %xmm3
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
addss %xmm2, %xmm4
ucomiss %xmm3, %xmm4
jbe 0x277d2
addss 0x14(%r14), %xmm3
ucomiss %xmm2, %xmm3
jbe 0x277d2
movl $0x20, %edx
movq %r14, %rdi
movl $0x5, %esi
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x27250
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
testq %rax, %rax
je 0x277d2
movl %ebx, %ecx
shrl $0x18, %ecx
cvttss2si 0xc(%rsp), %edx
movw %dx, 0x10(%rax)
cvttps2dq %xmm0, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x12(%rax)
pxor %xmm0, %xmm0
maxps %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x16(%rax)
movw %bx, 0x1a(%rax)
shrl $0x10, %ebx
movb %bl, 0x1c(%rax)
movb %cl, 0x1d(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq