// File: /workspace/github_c_makefile_star2_O2/lengjingzju[P]json/json.c
// Function: json_parse_single_value
static int _json_parse_single_value(json_parse_t *parse_ptr, char *str, json_string_t *jkey, json_value_t *value)
{
    char end_ch = '\"';
    char *bak = NULL;

    switch (*str) {
    case '\"':
#if JSON_PARSE_SPECIAL_QUOTES
    case '\'':
#endif
        jkey->type = JSON_STRING;
        if (unlikely(str[1] == str[0])) {
            memset(&value->vstr, 0, sizeof(json_string_t));
            _UPDATE_PARSE_OFFSET(2);
        } else {
            end_ch = *str;
            _UPDATE_PARSE_OFFSET(1);
            if (unlikely(parse_ptr->parse_string(parse_ptr, end_ch, &value->vstr, &parse_ptr->mem->str_mgr) < 0)) {
                goto err;
            }
            _UPDATE_PARSE_OFFSET(1);
        }
        break;

#if JSON_PARSE_SPECIAL_NUM
    case '+':
#endif
    case '-':
#if JSON_PARSE_SPECIAL_DOUBLE
        if (strncmp("inf", str + 1, 3) == 0) {
            jkey->type = JSON_DOUBLE;
            value->vnum.vlhex = (*str == '-' ? 0xFFF0000000000000 : 0x7FF0000000000000);
            _UPDATE_PARSE_OFFSET(9);
            break;
        }
        FALLTHROUGH_ATTR;
#endif
#if JSON_PARSE_SPECIAL_NUM
    case '.':
#endif
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
        bak = str;
        if (unlikely((jkey->type = _json_parse_number((const char **)&str, &value->vnum)) == JSON_NULL)) {
            JsonPareseErr("Not number!");
            goto err;
        }
        _UPDATE_PARSE_OFFSET(str - bak);
        break;

    case 'f':
        if (likely(parse_ptr->size - parse_ptr->offset >= 5 && memcmp("false", str, 5) == 0)) {
            jkey->type = JSON_BOOL;
            value->vnum.vbool = false;
            _UPDATE_PARSE_OFFSET(5);
        } else {
            JsonPareseErr("invalid next ptr!");
            goto err;
        }
        break;
    case 't':
        if (likely(parse_ptr->size - parse_ptr->offset >= 4 && memcmp("true", str, 4) == 0)) {
            jkey->type = JSON_BOOL;
            value->vnum.vbool = true;
            _UPDATE_PARSE_OFFSET(4);
        } else {
            JsonPareseErr("invalid next ptr!");
            goto err;
        }
        break;

    case 'n':
        if (likely(parse_ptr->size - parse_ptr->offset >= 4 && memcmp("null", str, 4) == 0)) {
            jkey->type = JSON_NULL;
            _UPDATE_PARSE_OFFSET(4);
            break;
        }
#if JSON_PARSE_SPECIAL_DOUBLE
        if (likely(parse_ptr->size - parse_ptr->offset >= 3 && memcmp("nan", str, 3) == 0)) {
            jkey->type = JSON_DOUBLE;
            value->vnum.vlhex = 0x7FF0000000000001;
            _UPDATE_PARSE_OFFSET(3);
            break;
        }
#endif
        JsonPareseErr("invalid next ptr!");
        goto err;

#if JSON_PARSE_SPECIAL_DOUBLE
    case 'i':
        if (likely(parse_ptr->size - parse_ptr->offset >= 3 && memcmp("inf", str, 3) == 0)) {
            jkey->type = JSON_DOUBLE;
            value->vnum.vlhex = 0x7FF0000000000000;
            _UPDATE_PARSE_OFFSET(8);
        } else {
            JsonPareseErr("invalid next ptr!");
            goto err;
        }
        break;
#endif
    default:
        JsonPareseErr("invalid next ptr!");
        goto err;
    }

    return 0;
err:
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movzbl (%rsi), %eax
cmpq $0x39, %rax
ja 0x660e
movabsq $0x3ff400000000000, %rcx # imm = 0x3FF400000000000
btq %rax, %rcx
jae 0x655a
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x69ed
movl (%r15), %ecx
andl $0xf, %eax
andl $-0x10, %ecx
orl %eax, %ecx
movl %ecx, (%r15)
testl %eax, %eax
je 0x67b4
movq 0x8(%rsp), %rax
subq %r12, %rax
addq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $0x280000000000, %rcx   # imm = 0x280000000000
btq %rax, %rcx
jae 0x65c4
movzbl 0x1(%r12), %eax
subl $0x69, %eax
jne 0x658d
movzbl 0x2(%r12), %eax
subl $0x6e, %eax
jne 0x658d
movzbl 0x3(%r12), %ecx
pushq $0x66
popq %rax
subl %ecx, %eax
jmp 0x658f
negl %eax
testl %eax, %eax
jne 0x651b
movl (%r15), %eax
andl $-0x10, %eax
orl $0x6, %eax
movl %eax, (%r15)
xorl %eax, %eax
cmpb $0x2d, (%r12)
setne %al
shlq $0x3f, %rax
movabsq $-0x10000000000000, %rcx # imm = 0xFFF0000000000000
addq %rax, %rcx
movq %rcx, (%r14)
addq $0x9, 0x10(%rbx)
jmp 0x654a
cmpq $0x22, %rax
jne 0x660e
movl (%r15), %eax
andl $-0x10, %eax
orl $0x7, %eax
movl %eax, (%r15)
movb (%r12), %al
cmpb %al, 0x1(%r12)
je 0x6941
incq 0x10(%rbx)
movq 0x38(%rbx), %rcx
addq $0x48, %rcx
movsbl %al, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq *0x48(%rbx)
testl %eax, %eax
js 0x67ac
incq 0x10(%rbx)
jmp 0x654a
cmpl $0x66, %eax
je 0x6662
cmpl $0x69, %eax
je 0x66db
cmpl $0x6e, %eax
je 0x66aa
cmpl $0x74, %eax
jne 0x672d
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
subq %rax, %rcx
cmpq $0x4, %rcx
jb 0x68a4
cmpl $0x65757274, (%r12)     # imm = 0x65757274
jne 0x68a4
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x1, (%r14)
jmp 0x66d1
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x5, %rax
jb 0x682c
leaq 0x1f29(%rip), %rdi      # 0x85a7
pushq $0x5
popq %rdx
movq %r12, %rsi
callq 0x1160
testl %eax, %eax
jne 0x682c
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x0, (%r14)
addq $0x5, 0x10(%rbx)
jmp 0x654a
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x4, %rax
jb 0x68fb
cmpl $0x6c6c756e, (%r12)     # imm = 0x6C6C756E
jne 0x6905
andb $-0x10, (%r15)
addq $0x4, 0x10(%rbx)
jmp 0x654a
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x3, %rax
jb 0x6868
leaq 0x20e7(%rip), %rdi      # 0x87de
pushq $0x3
popq %rdx
movq %r12, %rsi
callq 0x1160
testl %eax, %eax
jne 0x6868
movl (%r15), %eax
andl $-0x10, %eax
orl $0x6, %eax
movl %eax, (%r15)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, (%r14)
addq $0x8, 0x10(%rbx)
jmp 0x654a
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x6786
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x1d03(%rip), %rdi      # 0x845c
leaq 0x2082(%rip), %rsi      # 0x87e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10c0
leaq 0x1f69(%rip), %rdi      # 0x86dc
leaq 0x208d(%rip), %rsi      # 0x8807
movq %r14, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x67ac
leaq 0x1ccf(%rip), %rdi      # 0x845c
leaq 0x204e(%rip), %rsi      # 0x87e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10c0
leaq 0x2060(%rip), %rdi      # 0x8807
callq 0x1060
pushq $-0x1
popq %rax
jmp 0x654c
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x6806
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x1c7c(%rip), %rdi      # 0x845c
leaq 0x1ffb(%rip), %rsi      # 0x87e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10c0
leaq 0x1ee2(%rip), %rdi      # 0x86dc
leaq 0x1ffa(%rip), %rsi      # 0x87fb
jmp 0x677a
leaq 0x1c4f(%rip), %rdi      # 0x845c
leaq 0x1fce(%rip), %rsi      # 0x87e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10c0
leaq 0x1fd4(%rip), %rdi      # 0x87fb
jmp 0x67a7
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x6952
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x1c02(%rip), %rdi      # 0x845c
leaq 0x1f81(%rip), %rsi      # 0x87e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x68de
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x696a
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x1bc6(%rip), %rdi      # 0x845c
leaq 0x1f45(%rip), %rsi      # 0x87e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x68de
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x6982
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq %rax, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x1b8a(%rip), %rdi      # 0x845c
leaq 0x1f09(%rip), %rsi      # 0x87e2
movl $0xab5, %edx            # imm = 0xAB5
xorl %eax, %eax
callq 0x10c0
leaq 0x1df0(%rip), %rdi      # 0x86dc
leaq 0x1f14(%rip), %rsi      # 0x8807
movq %rbx, %rdx
jmp 0x677d
cmpq $0x3, %rax
jne 0x699a
leaq 0x1f0d(%rip), %rdi      # 0x8819
pushq $0x3
popq %rdx
movq %r12, %rsi
callq 0x1160
testl %eax, %eax
jne 0x699a
movl (%r15), %eax
andl $-0x10, %eax
orl $0x6, %eax
movl %eax, (%r15)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
incq %rax
movq %rax, (%r14)
addq $0x3, 0x10(%rbx)
jmp 0x654a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x2, 0x10(%rbx)
jmp 0x654a
leaq 0x1b03(%rip), %rdi      # 0x845c
leaq 0x1e82(%rip), %rsi      # 0x87e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x6799
leaq 0x1aeb(%rip), %rdi      # 0x845c
leaq 0x1e6a(%rip), %rsi      # 0x87e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x6799
leaq 0x1ad3(%rip), %rdi      # 0x845c
leaq 0x1e52(%rip), %rsi      # 0x87e2
movl $0xab5, %edx            # imm = 0xAB5
jmp 0x6799
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x69d5
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x1a98(%rip), %rdi      # 0x845c
leaq 0x1e17(%rip), %rsi      # 0x87e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x68de
leaq 0x1a80(%rip), %rdi      # 0x845c
leaq 0x1dff(%rip), %rsi      # 0x87e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x6799