// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpq $0x39, %rax
ja 0x21ab
movabsq $0x3ff400000000000, %rcx # imm = 0x3FF400000000000
btq %rax, %rcx
jae 0x2103
movq %rsp, %r12
movq %rsi, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x8ecc
movl (%r12), %ecx
movl (%r15), %edx
andl $0xf, %ecx
andl $-0x10, %edx
orl %ecx, %edx
movl %edx, (%r15)
testl %ecx, %ecx
je 0x2345
cltq
addq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movabsq $0x280000000000, %rcx   # imm = 0x280000000000
btq %rax, %rcx
jae 0x2165
movzbl 0x1(%rsi), %eax
subl $0x69, %eax
jne 0x2130
movzbl 0x2(%rsi), %eax
subl $0x6e, %eax
jne 0x2130
movzbl 0x3(%rsi), %ecx
pushq $0x66
popq %rax
subl %ecx, %eax
jmp 0x2132
negl %eax
testl %eax, %eax
jne 0x20c4
movl (%r15), %eax
andl $-0x10, %eax
orl $0x6, %eax
movl %eax, (%r15)
xorl %eax, %eax
cmpb $0x2d, (%rsi)
setne %al
shlq $0x3f, %rax
movabsq $-0x10000000000000, %rcx # imm = 0xFFF0000000000000
addq %rax, %rcx
movq %rcx, (%r14)
addq $0x9, 0x10(%rbx)
jmp 0x20f5
cmpq $0x22, %rax
jne 0x21ab
movl (%r15), %eax
andl $-0x10, %eax
orl $0x7, %eax
movl %eax, (%r15)
movb (%rsi), %al
cmpb %al, 0x1(%rsi)
je 0x24c4
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 0x233d
incq 0x10(%rbx)
jmp 0x20f5
cmpl $0x66, %eax
je 0x21fd
cmpl $0x69, %eax
je 0x2271
cmpl $0x6e, %eax
je 0x2242
cmpl $0x74, %eax
jne 0x22c0
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
subq %rax, %rcx
cmpq $0x4, %rcx
jb 0x242c
cmpl $0x65757274, (%rsi)     # imm = 0x65757274
jne 0x242c
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x1, (%r14)
jmp 0x2267
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r12
subq %r12, %rax
cmpq $0x5, %rax
jb 0x23b8
leaq 0x838e(%rip), %rdi      # 0xa5a7
pushq $0x5
popq %rdx
callq 0x1160
testl %eax, %eax
jne 0x23b8
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x0, (%r14)
addq $0x5, 0x10(%rbx)
jmp 0x20f5
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r12
subq %r12, %rax
cmpq $0x4, %rax
jb 0x2481
cmpl $0x6c6c756e, (%rsi)     # imm = 0x6C6C756E
jne 0x248b
andb $-0x10, (%r15)
addq $0x4, 0x10(%rbx)
jmp 0x20f5
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r12
subq %r12, %rax
cmpq $0x3, %rax
jb 0x23f2
leaq 0x8551(%rip), %rdi      # 0xa7de
pushq $0x3
popq %rdx
callq 0x1160
testl %eax, %eax
jne 0x23f2
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 0x20f5
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2317
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x8172(%rip), %rdi      # 0xa45c
leaq 0x84f1(%rip), %rsi      # 0xa7e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10c0
leaq 0x83d8(%rip), %rdi      # 0xa6dc
leaq 0x84fc(%rip), %rsi      # 0xa807
movq %r14, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x233d
leaq 0x813e(%rip), %rdi      # 0xa45c
leaq 0x84bd(%rip), %rsi      # 0xa7e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10c0
leaq 0x84cf(%rip), %rdi      # 0xa807
callq 0x1060
pushq $-0x1
popq %rax
jmp 0x20f7
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2395
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x80ed(%rip), %rdi      # 0xa45c
leaq 0x846c(%rip), %rsi      # 0xa7e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10c0
leaq 0x8353(%rip), %rdi      # 0xa6dc
leaq 0x846b(%rip), %rsi      # 0xa7fb
jmp 0x230b
leaq 0x80c0(%rip), %rdi      # 0xa45c
leaq 0x843f(%rip), %rsi      # 0xa7e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10c0
leaq 0x8445(%rip), %rdi      # 0xa7fb
jmp 0x2338
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x24d5
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
addq %r12, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x8078(%rip), %rdi      # 0xa45c
leaq 0x83f7(%rip), %rsi      # 0xa7e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x2464
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x24ed
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
addq %r12, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x803e(%rip), %rdi      # 0xa45c
leaq 0x83bd(%rip), %rsi      # 0xa7e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x2464
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2505
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
addq %rax, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x8004(%rip), %rdi      # 0xa45c
leaq 0x8383(%rip), %rsi      # 0xa7e2
movl $0xab5, %edx            # imm = 0xAB5
xorl %eax, %eax
callq 0x10c0
leaq 0x826a(%rip), %rdi      # 0xa6dc
leaq 0x838e(%rip), %rsi      # 0xa807
movq %rbx, %rdx
jmp 0x230e
cmpq $0x3, %rax
jne 0x251d
leaq 0x8387(%rip), %rdi      # 0xa819
pushq $0x3
popq %rdx
callq 0x1160
testl %eax, %eax
jne 0x251d
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 0x20f5
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x2, 0x10(%rbx)
jmp 0x20f5
leaq 0x7f80(%rip), %rdi      # 0xa45c
leaq 0x82ff(%rip), %rsi      # 0xa7e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x232a
leaq 0x7f68(%rip), %rdi      # 0xa45c
leaq 0x82e7(%rip), %rsi      # 0xa7e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x232a
leaq 0x7f50(%rip), %rdi      # 0xa45c
leaq 0x82cf(%rip), %rsi      # 0xa7e2
movl $0xab5, %edx            # imm = 0xAB5
jmp 0x232a
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2556
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
addq %r12, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x7f17(%rip), %rdi      # 0xa45c
leaq 0x8296(%rip), %rsi      # 0xa7e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x2464
leaq 0x7eff(%rip), %rdi      # 0xa45c
leaq 0x827e(%rip), %rsi      # 0xa7e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x232a