// File: /workspace/github_c_makefile_star2_O1/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 $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpq $0x39, %rax
ja 0x2137
movabsq $0x3ff400000000000, %rcx # imm = 0x3FF400000000000
btq %rax, %rcx
jae 0x2094
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x8fd5
movl (%r13), %ecx
movl (%r15), %edx
andl $0xf, %ecx
andl $-0x10, %edx
orl %ecx, %edx
movl %edx, (%r15)
testl %ecx, %ecx
je 0x22df
cltq
addq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $0x280000000000, %rcx   # imm = 0x280000000000
btq %rax, %rcx
jae 0x20ed
leaq 0x1(%r12), %rsi
leaq 0x872e(%rip), %rdi      # 0xa7de
pushq $0x3
popq %rdx
callq 0x1060
testl %eax, %eax
jne 0x2053
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 0x2084
cmpq $0x22, %rax
jne 0x2137
movl (%r15), %eax
andl $-0x10, %eax
orl $0x7, %eax
movl %eax, (%r15)
movb (%r12), %al
cmpb %al, 0x1(%r12)
je 0x2478
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 0x22d7
incq 0x10(%rbx)
jmp 0x2084
cmpl $0x66, %eax
je 0x218b
cmpl $0x69, %eax
je 0x2204
cmpl $0x6e, %eax
je 0x21d3
cmpl $0x74, %eax
jne 0x2256
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
subq %rax, %rcx
cmpq $0x4, %rcx
jb 0x2420
cmpl $0x65757274, (%r12)     # imm = 0x65757274
jne 0x2420
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x1, (%r14)
jmp 0x21fa
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x5, %rax
jb 0x2359
leaq 0x8400(%rip), %rdi      # 0xa5a7
pushq $0x5
popq %rdx
movq %r12, %rsi
callq 0x1170
testl %eax, %eax
jne 0x2359
movl (%r15), %eax
andl $-0x10, %eax
incl %eax
movl %eax, (%r15)
movb $0x0, (%r14)
addq $0x5, 0x10(%rbx)
jmp 0x2084
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x4, %rax
jb 0x2399
cmpl $0x6c6c756e, (%r12)     # imm = 0x6C6C756E
jne 0x2399
andb $-0x10, (%r15)
addq $0x4, 0x10(%rbx)
jmp 0x2084
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %r13
subq %r13, %rax
cmpq $0x3, %rax
jb 0x23e3
leaq 0x85be(%rip), %rdi      # 0xa7de
pushq $0x3
popq %rdx
movq %r12, %rsi
callq 0x1170
testl %eax, %eax
jne 0x23e3
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 0x2084
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x22b1
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x81d8(%rip), %rdi      # 0xa45c
leaq 0x8557(%rip), %rsi      # 0xa7e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10d0
leaq 0x843e(%rip), %rdi      # 0xa6dc
leaq 0x8562(%rip), %rsi      # 0xa807
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
jmp 0x22d7
leaq 0x81a4(%rip), %rdi      # 0xa45c
leaq 0x8523(%rip), %rsi      # 0xa7e2
movl $0xad8, %edx            # imm = 0xAD8
xorl %eax, %eax
callq 0x10d0
leaq 0x8535(%rip), %rdi      # 0xa807
callq 0x1070
pushq $-0x1
popq %rax
jmp 0x2086
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2333
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
addq 0x10(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
callq 0x1050
leaq 0x814f(%rip), %rdi      # 0xa45c
leaq 0x84ce(%rip), %rsi      # 0xa7e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10d0
leaq 0x83b5(%rip), %rdi      # 0xa6dc
leaq 0x84cd(%rip), %rsi      # 0xa7fb
jmp 0x22a5
leaq 0x8122(%rip), %rdi      # 0xa45c
leaq 0x84a1(%rip), %rsi      # 0xa7e2
movl $0xa9f, %edx            # imm = 0xA9F
xorl %eax, %eax
callq 0x10d0
leaq 0x84a7(%rip), %rdi      # 0xa7fb
jmp 0x22d2
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x2489
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x80d4(%rip), %rdi      # 0xa45c
leaq 0x8453(%rip), %rsi      # 0xa7e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x245b
cmpq $0x3, %rax
jb 0x24d1
leaq 0x846f(%rip), %rdi      # 0xa819
pushq $0x3
popq %rdx
movq %r12, %rsi
callq 0x1170
testl %eax, %eax
jne 0x24d1
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 0x2084
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x24a1
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x804a(%rip), %rdi      # 0xa45c
leaq 0x83c9(%rip), %rsi      # 0xa7e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x245b
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x24b9
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
addq %rax, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x800d(%rip), %rdi      # 0xa45c
leaq 0x838c(%rip), %rsi      # 0xa7e2
movl $0xab5, %edx            # imm = 0xAB5
xorl %eax, %eax
callq 0x10d0
leaq 0x8273(%rip), %rdi      # 0xa6dc
leaq 0x8397(%rip), %rsi      # 0xa807
movq %rbx, %rdx
jmp 0x22a8
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x2, 0x10(%rbx)
jmp 0x2084
leaq 0x7fcc(%rip), %rdi      # 0xa45c
leaq 0x834b(%rip), %rsi      # 0xa7e2
movl $0xaab, %edx            # imm = 0xAAB
jmp 0x22c4
leaq 0x7fb4(%rip), %rdi      # 0xa45c
leaq 0x8333(%rip), %rsi      # 0xa7e2
movl $0xad2, %edx            # imm = 0xAD2
jmp 0x22c4
leaq 0x7f9c(%rip), %rdi      # 0xa45c
leaq 0x831b(%rip), %rsi      # 0xa7e2
movl $0xab5, %edx            # imm = 0xAB5
jmp 0x22c4
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x250d
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
addq %r13, %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x7f60(%rip), %rdi      # 0xa45c
leaq 0x82df(%rip), %rsi      # 0xa7e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x245b
leaq 0x7f48(%rip), %rdi      # 0xa45c
leaq 0x82c7(%rip), %rsi      # 0xa7e2
movl $0xac8, %edx            # imm = 0xAC8
jmp 0x22c4