// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_edit_string
NK_API nk_flags
nk_edit_string(struct nk_context *ctx, nk_flags flags,
    char *memory, int *len, int max, nk_plugin_filter filter)
{
    nk_hash hash;
    nk_flags state;
    struct nk_text_edit *edit;
    struct nk_window *win;

    NK_ASSERT(ctx);
    NK_ASSERT(memory);
    NK_ASSERT(len);
    if (!ctx || !memory || !len)
        return 0;

    filter = (!filter) ? nk_filter_default: filter;
    win = ctx->current;
    hash = win->edit.seq;
    edit = &ctx->text_edit;
    nk_textedit_clear_state(&ctx->text_edit, (flags & NK_EDIT_MULTILINE)?
        NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE, filter);

    if (win->edit.active && hash == win->edit.name) {
        if (flags & NK_EDIT_NO_CURSOR)
            edit->cursor = nk_utf_len(memory, *len);
        else edit->cursor = win->edit.cursor;
        if (!(flags & NK_EDIT_SELECTABLE)) {
            edit->select_start = win->edit.cursor;
            edit->select_end = win->edit.cursor;
        } else {
            edit->select_start = win->edit.sel_start;
            edit->select_end = win->edit.sel_end;
        }
        edit->mode = win->edit.mode;
        edit->scrollbar.x = (float)win->edit.scrollbar.x;
        edit->scrollbar.y = (float)win->edit.scrollbar.y;
        edit->active = nk_true;
    } else edit->active = nk_false;

    max = NK_MAX(1, max);
    *len = NK_MIN(*len, max-1);
    nk_str_init_fixed(&edit->string, memory, (nk_size)max);
    edit->string.buffer.allocated = (nk_size)*len;
    edit->string.len = nk_utf_len(memory, *len);
    state = nk_edit_buffer(ctx, flags, edit, filter);
    *len = (int)edit->string.buffer.allocated;

    if (edit->active) {
        win->edit.cursor = edit->cursor;
        win->edit.sel_start = edit->select_start;
        win->edit.sel_end = edit->select_end;
        win->edit.mode = edit->mode;
        win->edit.scrollbar.x = (nk_uint)edit->scrollbar.x;
        win->edit.scrollbar.y = (nk_uint)edit->scrollbar.y;
    } return state;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movl %r8d, 0x3c(%rsp)
movq %r9, 0x30(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x70b9c
movq 0x54480(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x40826(%rip), %rsi     # 0xb13a0
leaq 0x4083d(%rip), %rdx     # 0xb13be
movl $0x6d31, %ecx           # imm = 0x6D31
movb $0x0, %al
callq 0x13ec0
movq 0x5445c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x70b9e
jmp 0x70ba0
cmpq $0x0, 0x48(%rsp)
jne 0x70bdb
movq 0x54441(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x407e7(%rip), %rsi     # 0xb13a0
leaq 0x407fe(%rip), %rdx     # 0xb13be
movl $0x6d32, %ecx           # imm = 0x6D32
movb $0x0, %al
callq 0x13ec0
movq 0x5441d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x70bdd
jmp 0x70bdf
cmpq $0x0, 0x40(%rsp)
jne 0x70c1a
movq 0x54402(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x407a8(%rip), %rsi     # 0xb13a0
leaq 0x407bf(%rip), %rdx     # 0xb13be
movl $0x6d33, %ecx           # imm = 0x6D33
movb $0x0, %al
callq 0x13ec0
movq 0x543de(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x70c1c
cmpq $0x0, 0x58(%rsp)
je 0x70c34
cmpq $0x0, 0x48(%rsp)
je 0x70c34
cmpq $0x0, 0x40(%rsp)
jne 0x70c41
movl $0x0, 0x64(%rsp)
jmp 0x70f7b
cmpq $0x0, 0x30(%rsp)
jne 0x70c57
movq 0x54370(%rip), %rax     # 0xc4fc0
movq %rax, 0x10(%rsp)
jmp 0x70c61
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rax
movq 0x4780(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x184(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rax
addq $0x31d0, %rax           # imm = 0x31D0
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
addq $0x31d0, %rdi           # imm = 0x31D0
movl 0x54(%rsp), %ecx
andl $0x400, %ecx            # imm = 0x400
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
movq 0x30(%rsp), %rdx
callq 0x704a0
movq 0x18(%rsp), %rax
cmpl $0x0, 0x18c(%rax)
je 0x70df5
movl 0x2c(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x180(%rcx), %eax
jne 0x70df5
movl 0x54(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x70d1b
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movl (%rax), %esi
callq 0x137e0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xa8(%rax)
jmp 0x70d31
movq 0x18(%rsp), %rax
movl 0x194(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xa8(%rax)
movl 0x54(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x70d6b
movq 0x18(%rsp), %rax
movl 0x194(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xac(%rax)
movq 0x18(%rsp), %rax
movl 0x194(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xb0(%rax)
jmp 0x70d97
movq 0x18(%rsp), %rax
movl 0x198(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xac(%rax)
movq 0x18(%rsp), %rax
movl 0x19c(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xb0(%rax)
movq 0x18(%rsp), %rax
movb 0x1a8(%rax), %cl
movq 0x20(%rsp), %rax
movb %cl, 0xb4(%rax)
movq 0x18(%rsp), %rax
movl 0x1a0(%rax), %eax
cvtsi2ss %rax, %xmm0
movq 0x20(%rsp), %rax
movss %xmm0, 0xa0(%rax)
movq 0x18(%rsp), %rax
movl 0x1a4(%rax), %eax
cvtsi2ss %rax, %xmm0
movq 0x20(%rsp), %rax
movss %xmm0, 0xa4(%rax)
movq 0x20(%rsp), %rax
movb $0x1, 0xb9(%rax)
jmp 0x70e01
movq 0x20(%rsp), %rax
movb $0x0, 0xb9(%rax)
movl $0x1, %eax
cmpl 0x3c(%rsp), %eax
jge 0x70e16
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x70e21
movl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x70e21
movl 0xc(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl 0x3c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x70e48
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x70e53
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
movq 0x40(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movq 0x48(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x15290
movq 0x40(%rsp), %rax
movslq (%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rax
movl (%rax), %esi
callq 0x137e0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x90(%rax)
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
movq 0x20(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x13200
movl %eax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq 0x70(%rax), %rax
movl %eax, %ecx
movq 0x40(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
cmpb $0x0, 0xb9(%rax)
je 0x70f73
movq 0x20(%rsp), %rax
movl 0xa8(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x194(%rax)
movq 0x20(%rsp), %rax
movl 0xac(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x198(%rax)
movq 0x20(%rsp), %rax
movl 0xb0(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x19c(%rax)
movq 0x20(%rsp), %rax
movb 0xb4(%rax), %cl
movq 0x18(%rsp), %rax
movb %cl, 0x1a8(%rax)
movq 0x20(%rsp), %rax
cvttss2si 0xa0(%rax), %rax
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0x20(%rsp), %rax
cvttss2si 0xa4(%rax), %rax
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x1a4(%rax)
movl 0x28(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)