// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_parse_string_rapid
static int _json_parse_string_rapid(json_parse_t *parse_ptr, char end_ch UNUSED_END_CH, json_string_t *jstr, json_mem_mgr_t *mgr)
{
    char *str = NULL, *bak = NULL, *ptr= NULL;
    char c = '\0';
    int len = 0, total = 0;
    int escaped = 0;

    memset(jstr, 0, sizeof(json_string_t));
    str = parse_ptr->str + parse_ptr->offset;
    bak = str;

    while (1) {
        switch ((c = *str++)) {
        case '\"':
#if JSON_PARSE_SPECIAL_QUOTES
        case '\'':
        case ':':
            if (c == end_ch)
#endif
            {
                goto next;
            }
#if JSON_PARSE_SPECIAL_QUOTES
            if (c == '\"' && !escaped)
                escaped = -1;
            break;
#endif

        case '\0':
            goto err;
        case '\\':
            ++str;
            escaped = 1;
            break;
#if !JSON_PARSE_SPECIAL_CHAR
        case '\b': case '\f': case '\n': case '\r': case '\t': case '\v':
            JsonErr("tab and linebreak can't be existed in string in standard json!\n");
            goto err;
#endif
        default:
            break;
        }
    }

next:
    total = (int)(str - bak - 1);
    len = total;
    if (unlikely((ptr = (char *)_parse_alloc(parse_ptr, len + 1, mgr)) == NULL)) {
        JsonErr("malloc failed!\n");
        goto err;
    }

    if (likely(escaped != 1)) {
        memcpy(ptr, bak, len);
        ptr[len] = '\0';
    } else {
        if (unlikely((len = _parse_strcpy(ptr, bak, len)) < 0)) {
            JsonErr("_parse_strcpy failed!\n");
            if (parse_ptr->mem == &s_invalid_json_mem)
                json_free(ptr);
            goto err;
        }
    }
    _UPDATE_PARSE_OFFSET(total);

    jstr->escaped = escaped != 0;
    jstr->len = len;
    jstr->str = ptr;
    return len;
err:
    JsonPareseErr("parse string failed!");
    return -1;
}

// Assembly:
subq $0x88, %rsp
movb %sil, %al
movq %rdi, 0x78(%rsp)
movb %al, 0x77(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x47(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl $0x0, 0x38(%rsp)
movq 0x68(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x78(%rsp), %rcx
addq 0x10(%rcx), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x58(%rsp)
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
movb %al, %cl
movb %cl, 0x47(%rsp)
testl %eax, %eax
je 0x7a32
jmp 0x7a1a
movl 0xc(%rsp), %eax
subl $0x22, %eax
je 0x7a30
jmp 0x7a25
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0x7a37
jmp 0x7a4f
jmp 0x7a53
jmp 0x7bf9
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
movl $0x1, 0x38(%rsp)
jmp 0x7a51
jmp 0x7a51
jmp 0x79f7
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0x78(%rsp), %rdi
movl 0x40(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x60(%rsp), %rdx
callq 0xb270
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7ad5
jmp 0x7aa8
leaq 0x8f45(%rip), %rdi      # 0x109f4
leaq 0x9447(%rip), %rsi      # 0x10efd
movl $0xca6, %edx            # imm = 0xCA6
movb $0x0, %al
callq 0x10c0
leaq 0x8f3d(%rip), %rdi      # 0x10a06
movb $0x0, %al
callq 0x10c0
jmp 0x7bf9
cmpl $0x1, 0x38(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7b12
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movslq 0x40(%rsp), %rdx
callq 0x1150
movq 0x48(%rsp), %rax
movslq 0x40(%rsp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x7b8a
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x40(%rsp), %edx
callq 0xb2d0
movl %eax, 0x40(%rsp)
cmpl $0x0, %eax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7b88
jmp 0x7b42
leaq 0x8eab(%rip), %rdi      # 0x109f4
leaq 0x93ad(%rip), %rsi      # 0x10efd
movl $0xcaf, %edx            # imm = 0xCAF
movb $0x0, %al
callq 0x10c0
leaq 0x91f5(%rip), %rdi      # 0x10d58
movb $0x0, %al
callq 0x10c0
movq 0x78(%rsp), %rax
leaq 0xe762(%rip), %rcx      # 0x162d8
cmpq %rcx, 0x38(%rax)
jne 0x7b86
movq 0x48(%rsp), %rdi
callq 0x1030
jmp 0x7bf9
jmp 0x7b8a
movslq 0x3c(%rsp), %rcx
movq 0x78(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
cmpl $0x0, 0x38(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x68(%rsp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movl 0x40(%rsp), %edx
movq 0x68(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x40(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x7caf
jmp 0x7bfb
movq 0x78(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x7c6f
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0x10(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x78(%rsp), %rax
addq 0x10(%rax), %rsi
movl $0x1f, %edx
callq 0x1050
leaq 0x8db4(%rip), %rdi      # 0x109f4
leaq 0x92b6(%rip), %rsi      # 0x10efd
movl $0xcbc, %edx            # imm = 0xCBC
movb $0x0, %al
callq 0x10c0
leaq 0x10(%rsp), %rdx
leaq 0x9110(%rip), %rdi      # 0x10d6f
leaq 0x9118(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x7ca2
jmp 0x7c71
leaq 0x8d7c(%rip), %rdi      # 0x109f4
leaq 0x927e(%rip), %rsi      # 0x10efd
movl $0xcbc, %edx            # imm = 0xCBC
movb $0x0, %al
callq 0x10c0
leaq 0x8fd6(%rip), %rdi      # 0x10c68
leaq 0x90e5(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x7ca2
jmp 0x7ca4
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nop