// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_parse_value
static int _json_parse_value(json_parse_t *parse_ptr, json_object **root)
{
    json_string_t jkey = {0};
    char *str = NULL;
    json_object *item = NULL, *parent = NULL;
    json_object **item_array = NULL;
    int item_depth = -1, item_total = 0;

    goto next3;

next1:
    if (unlikely(item_depth >= item_total - 1)) {
        item_total += JSON_ITEM_NUM_PLUS_DEF;
        json_object **new_array = (json_object **)json_realloc(item_array, sizeof(json_object *) * item_total);
        if (new_array) {
            item_array = new_array;
        } else {
            JsonErr("malloc failed!\n");
            json_free(item_array);
            item_array = NULL;
            goto err;
        }
    }
    item_array[++item_depth] = item;
    parent = item;
    *root = *item_array;
    if (parent->type_member == JSON_ARRAY)
        goto next3;

next2:
    if (unlikely(_json_parse_key(parse_ptr, &jkey) < 0)) {
        goto err;
    }

next3:
    if (unlikely((item = (json_object *)_parse_alloc(parse_ptr, sizeof(json_object), &parse_ptr->mem->obj_mgr)) == NULL)) {
        JsonErr("malloc failed!\n");
        goto err;
    }
    memcpy(&item->jkey, &jkey, sizeof(json_string_t));
    memset(&jkey, 0, sizeof(json_string_t));

    parse_ptr->skip_blank(parse_ptr);
    _get_parse_ptr(parse_ptr, 0, 128, &str);

    switch (*str) {
    case '{':
        item->type_member = JSON_OBJECT;
        INIT_JSON_LIST_HEAD(&item->value.head);
        _UPDATE_PARSE_OFFSET(1);

        parse_ptr->skip_blank(parse_ptr);
        _get_parse_ptr(parse_ptr, 0, 1, &str);
        if (likely(*str != '}')) {
            if (parent)
                json_list_add_tail(&item->list, &parent->value.head);
            goto next1;
        } else {
            _UPDATE_PARSE_OFFSET(1);
        }
        break;

    case '[':
        item->type_member = JSON_ARRAY;
        INIT_JSON_LIST_HEAD(&item->value.head);
        _UPDATE_PARSE_OFFSET(1);

        parse_ptr->skip_blank(parse_ptr);
        _get_parse_ptr(parse_ptr, 0, 1, &str);
        if (likely(*str != ']')) {
            if (parent)
                json_list_add_tail(&item->list, &parent->value.head);
            goto next1;
        } else {
            _UPDATE_PARSE_OFFSET(1);
        }
        break;

    default:
        if (_json_parse_single_value(parse_ptr, str, &item->jkey, &item->value) < 0)
            goto err;
        break;
    }

    if (parent) {
        json_list_add_tail(&item->list, &parent->value.head);
        item = NULL;
    }

next4:
    if (likely(item_depth >= 0)) {
        parse_ptr->skip_blank(parse_ptr);
        _get_parse_ptr(parse_ptr, 0, 1, &str);
        if (parent->type_member == JSON_OBJECT) {
            switch (*str) {
            case ',':
                _UPDATE_PARSE_OFFSET(1);
#if !JSON_PARSE_LAST_COMMA
                goto next2;
#else
                parse_ptr->skip_blank(parse_ptr);
                _get_parse_ptr(parse_ptr, 0, 1, &str);
                if (*str != '}')
                    goto next2;
                FALLTHROUGH_ATTR;
#endif
            case '}':
                _UPDATE_PARSE_OFFSET(1);
                if (likely(item_depth > 0)) {
                    parent = item_array[--item_depth];
                    goto next4;
                }
                break;
            default:
                JsonPareseErr("invalid object!");
                goto err;
            }
        } else {
            switch (*str) {
            case ',':
                _UPDATE_PARSE_OFFSET(1);
#if !JSON_PARSE_LAST_COMMA
                goto next3;
#else
                parse_ptr->skip_blank(parse_ptr);
                _get_parse_ptr(parse_ptr, 0, 1, &str);
                if (*str != ']')
                    goto next3;
                FALLTHROUGH_ATTR;
#endif
            case ']':
                _UPDATE_PARSE_OFFSET(1);
                if (likely(item_depth > 0)) {
                    parent = item_array[--item_depth];
                    goto next4;
                }
                break;
            default:
                JsonPareseErr("invalid array!");
                goto err;
            }
        }
    }

    if (item_array) {
        *root = *item_array;
        json_free(item_array);
    } else {
        *root = item;
    }

    return 0;

err:
    if (item_array) {
        *root = *item_array;
        json_free(item_array);
    } else {
        if (!(*root)) {
            *root = item;
            item = NULL;
        }
    }

    if (parse_ptr->mem == &s_invalid_json_mem) {
        if (item)
            json_free(item);
        if (jkey.str)
            json_free(jkey.str);
    }
    return -1;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movl $0xffffffff, 0x5c(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x58(%rsp)
jmp 0x6b60
movl 0x5c(%rsp), %eax
movl 0x58(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setge %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6ae0
movl 0x58(%rsp), %eax
addl $0x10, %eax
movl %eax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movslq 0x58(%rsp), %rsi
shlq $0x3, %rsi
callq 0x1180
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x6a9c
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x6ade
jmp 0x6a9e
leaq 0x9f4f(%rip), %rdi      # 0x109f4
leaq 0xa374(%rip), %rsi      # 0x10e20
movl $0xaf2, %edx            # imm = 0xAF2
movb $0x0, %al
callq 0x10c0
leaq 0x9f47(%rip), %rdi      # 0x10a06
movb $0x0, %al
callq 0x10c0
movq 0x60(%rsp), %rdi
callq 0x1030
movq $0x0, 0x60(%rsp)
jmp 0x71b3
jmp 0x6ae0
movq 0x70(%rsp), %rdx
movq 0x60(%rsp), %rax
movl 0x5c(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x5c(%rsp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movq 0x68(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x6b2b
jmp 0x6b60
jmp 0x6b2d
movq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xba20
cmpl $0x0, %eax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6b5e
jmp 0x71b3
jmp 0x6b60
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x38(%rax), %rdx
addq $0x8, %rdx
movl $0x28, %esi
callq 0xb270
movq %rax, 0x70(%rsp)
cmpq $0x0, %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6bce
jmp 0x6ba1
leaq 0x9e4c(%rip), %rdi      # 0x109f4
leaq 0xa271(%rip), %rsi      # 0x10e20
movl $0xb05, %edx            # imm = 0xB05
movb $0x0, %al
callq 0x10c0
leaq 0x9e44(%rip), %rdi      # 0x10a06
movb $0x0, %al
callq 0x10c0
jmp 0x71b3
movq 0x70(%rsp), %rax
movups 0x80(%rsp), %xmm0
movups %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x98(%rsp), %rdi
movq 0x40(%rdi), %rax
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x5b, %eax
je 0x6cf1
jmp 0x6c28
movl 0xc(%rsp), %eax
subl $0x7b, %eax
jne 0x6da8
jmp 0x6c37
movq 0x70(%rsp), %rax
movl 0x8(%rax), %ecx
andl $-0x10, %ecx
orl $0x9, %ecx
movl %ecx, 0x8(%rax)
movq 0x70(%rsp), %rdi
addq $0x18, %rdi
callq 0x2ca0
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x98(%rsp), %rdi
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6cd8
cmpq $0x0, 0x68(%rsp)
je 0x6cd3
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $0x18, %rsi
callq 0x2cd0
jmp 0x6a44
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x6dd8
movq 0x70(%rsp), %rax
movl 0x8(%rax), %ecx
andl $-0x10, %ecx
orl $0x8, %ecx
movl %ecx, 0x8(%rax)
movq 0x70(%rsp), %rdi
addq $0x18, %rdi
callq 0x2ca0
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x98(%rsp), %rdi
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6d92
cmpq $0x0, 0x68(%rsp)
je 0x6d8d
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $0x18, %rsi
callq 0x2cd0
jmp 0x6a44
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x6dd8
movq 0x98(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq $0x8, %rdx
movq 0x70(%rsp), %rcx
addq $0x18, %rcx
callq 0xbda0
cmpl $0x0, %eax
jge 0x6dd6
jmp 0x71b3
jmp 0x6dd8
cmpq $0x0, 0x68(%rsp)
je 0x6dfc
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $0x18, %rsi
callq 0x2cd0
movq $0x0, 0x70(%rsp)
jmp 0x6dfe
cmpl $0x0, 0x5c(%rsp)
setge %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x716c
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x98(%rsp), %rdi
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x68(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jne 0x6fe7
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x8(%rsp)
subl $0x2c, %eax
je 0x6e7f
jmp 0x6e71
movl 0x8(%rsp), %eax
subl $0x7d, %eax
je 0x6ed6
jmp 0x6f29
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x98(%rsp), %rdi
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
je 0x6ed4
jmp 0x6b2d
jmp 0x6ed6
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
cmpl $0x0, 0x5c(%rsp)
setg %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6f24
movq 0x60(%rsp), %rax
movl 0x5c(%rsp), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x68(%rsp)
jmp 0x6dfe
jmp 0x6fe2
jmp 0x6f2b
movq 0x98(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x6fa8
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0x30(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x98(%rsp), %rax
addq 0x10(%rax), %rsi
movl $0x1f, %edx
callq 0x1050
leaq 0x9a7b(%rip), %rdi      # 0x109f4
leaq 0x9ea0(%rip), %rsi      # 0x10e20
movl $0xb53, %edx            # imm = 0xB53
movb $0x0, %al
callq 0x10c0
leaq 0x30(%rsp), %rdx
leaq 0x9dd7(%rip), %rdi      # 0x10d6f
leaq 0x9e93(%rip), %rsi      # 0x10e32
movb $0x0, %al
callq 0x10c0
jmp 0x6fdb
jmp 0x6faa
leaq 0x9a43(%rip), %rdi      # 0x109f4
leaq 0x9e68(%rip), %rsi      # 0x10e20
movl $0xb53, %edx            # imm = 0xB53
movb $0x0, %al
callq 0x10c0
leaq 0x9c9d(%rip), %rdi      # 0x10c68
leaq 0x9e60(%rip), %rsi      # 0x10e32
movb $0x0, %al
callq 0x10c0
jmp 0x6fdb
jmp 0x6fdd
jmp 0x71b3
jmp 0x716a
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x4(%rsp)
subl $0x2c, %eax
je 0x7008
jmp 0x6ffa
movl 0x4(%rsp), %eax
subl $0x5d, %eax
je 0x705f
jmp 0x70b2
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x98(%rsp), %rdi
callq *%rax
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
leaq 0x78(%rsp), %rcx
callq 0xabb0
movq 0x78(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
je 0x705d
jmp 0x6b60
jmp 0x705f
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
cmpl $0x0, 0x5c(%rsp)
setg %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x70ad
movq 0x60(%rsp), %rax
movl 0x5c(%rsp), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x68(%rsp)
jmp 0x6dfe
jmp 0x7168
jmp 0x70b4
movq 0x98(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x7131
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0x10(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x98(%rsp), %rax
addq 0x10(%rax), %rsi
movl $0x1f, %edx
callq 0x1050
leaq 0x98f2(%rip), %rdi      # 0x109f4
leaq 0x9d17(%rip), %rsi      # 0x10e20
movl $0xb6b, %edx            # imm = 0xB6B
movb $0x0, %al
callq 0x10c0
leaq 0x10(%rsp), %rdx
leaq 0x9c4e(%rip), %rdi      # 0x10d6f
leaq 0x9d1a(%rip), %rsi      # 0x10e42
movb $0x0, %al
callq 0x10c0
jmp 0x7164
jmp 0x7133
leaq 0x98ba(%rip), %rdi      # 0x109f4
leaq 0x9cdf(%rip), %rsi      # 0x10e20
movl $0xb6b, %edx            # imm = 0xB6B
movb $0x0, %al
callq 0x10c0
leaq 0x9b14(%rip), %rdi      # 0x10c68
leaq 0x9ce7(%rip), %rsi      # 0x10e42
movb $0x0, %al
callq 0x10c0
jmp 0x7164
jmp 0x7166
jmp 0x71b3
jmp 0x716a
jmp 0x716c
cmpq $0x0, 0x60(%rsp)
je 0x7193
movq 0x60(%rsp), %rax
movq (%rax), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movq 0x60(%rsp), %rdi
callq 0x1030
jmp 0x71a3
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0xa4(%rsp)
jmp 0x724f
cmpq $0x0, 0x60(%rsp)
je 0x71da
movq 0x60(%rsp), %rax
movq (%rax), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movq 0x60(%rsp), %rdi
callq 0x1030
jmp 0x7203
movq 0x90(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x7201
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, (%rax)
movq $0x0, 0x70(%rsp)
jmp 0x7203
movq 0x98(%rsp), %rax
leaq 0xf0c6(%rip), %rcx      # 0x162d8
cmpq %rcx, 0x38(%rax)
jne 0x7244
cmpq $0x0, 0x70(%rsp)
je 0x722a
movq 0x70(%rsp), %rdi
callq 0x1030
cmpq $0x0, 0x88(%rsp)
je 0x7242
movq 0x88(%rsp), %rdi
callq 0x1030
jmp 0x7244
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nop