// File: /workspace/github_c_makefile_star2_O0/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_path_parse_name
static const mm_json_char*
mm_json_path_parse_name(struct mm_json_token *tok, const mm_json_char *path,
    mm_json_char delimiter)
{
    const mm_json_char *del;
    const mm_json_char *begin, *end;
    if (!path || *path == '\0')
        return NULL;

    tok->str = path;
    del = mm_json_strchr(tok->str, delimiter, -1);
    begin = mm_json_strchr(tok->str, '[', -1);
    end = mm_json_strchr(tok->str, ']', -1);

    /* array part left */
    if (begin && end && begin == tok->str) {
        tok->len = (mm_json_size)((end - begin) + 1);
        if (*(end + 1) == '\0')
            return NULL;
        if (*(end + 1) == '.')
            return(end + 2);
        else return(end + 1);
    }

    /* only array after name */
    if (begin < del) {
        tok->len = (mm_json_size)(begin - tok->str);
        return begin;
    }

    if (!del) return NULL;
    if (*del == '\0') {
        tok->len = (mm_json_size)(del - tok->str);
        return NULL;
    }
    tok->len = (mm_json_size)(del - tok->str);
    return del+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6b08
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6b15
movq $0x0, -0x8(%rbp)
jmp 0x6c71
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movsbl -0x19(%rbp), %esi
callq 0x7fe0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x5b, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7fe0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x5d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7fe0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6be8
cmpq $0x0, -0x38(%rbp)
je 0x6be8
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x6be8
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x6bb9
movq $0x0, -0x8(%rbp)
jmp 0x6c71
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0x6bd7
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x6c71
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x6c71
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6c12
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6c71
cmpq $0x0, -0x28(%rbp)
jne 0x6c23
movq $0x0, -0x8(%rbp)
jmp 0x6c71
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6c4f
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x6c71
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)