// File: /workspace/github_c_makefile_star2_O2/lengjingzju[P]json/json.c
// Function: json_sax_parse_common
int json_sax_parse_common(json_sax_parse_choice_t *choice)
{
    int ret = -1;
    json_parse_t parse_val = {0};

    parse_val.read_size = parse_val.read_size ? parse_val.read_size : JSON_PARSE_READ_SIZE_DEF;
    parse_val.mem = &s_invalid_json_mem;
    parse_val.fd = -1;
    if (choice->path) {
        if ((parse_val.fd = open(choice->path, O_RDONLY|O_BINARY)) < 0) {
            JsonErr("open(%s) failed!\n", choice->path);
            return -1;
        }
        parse_val.skip_blank = _skip_blank;
    } else {
        parse_val.str = choice->str;
        parse_val.size = choice->str_len ? choice->str_len : strlen(choice->str);
        parse_val.skip_blank = _skip_blank_rapid;
    }
    parse_val.parse_string = _json_sax_parse_string;
    parse_val.cb = choice->cb;

#if !JSON_PARSE_SINGLE_VALUE
    parse_val.skip_blank(&parse_val);
    if (parse_val.str[parse_val.offset] != '{' && parse_val.str[parse_val.offset] != '[') {
        JsonErr("The first object isn't object or array!\n");
        goto end;
    }
#endif

    ret = _json_sax_parse_value(&parse_val);
#if !JSON_PARSE_FINISHED_CHAR
    if (ret == 0) {
        parse_val.skip_blank(&parse_val);
        if (parse_val.str[parse_val.offset]) {
            JsonErr("Extra trailing characters!\n%s\n", parse_val.str + parse_val.offset);
            ret = -1;
        }
    }
#endif

#if !JSON_PARSE_SINGLE_VALUE
end:
#endif
    if (choice->path) {
        if (parse_val.str)
            json_free(parse_val.str);
        if (parse_val.fd >= 0)
            close(parse_val.fd);
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
leaq 0x10(%rsp), %rbx
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10f0
movq $0x2000, 0x20(%rbx)     # imm = 0x2000
leaq 0x91b1(%rip), %rax      # 0xe228
movq %rax, 0x38(%rbx)
orl $-0x1, (%rbx)
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x50a5
xorl %esi, %esi
xorl %eax, %eax
callq 0x11a0
movl %eax, 0x10(%rsp)
testl %eax, %eax
js 0x555c
leaq -0x166a(%rip), %r15     # 0x3a39
jmp 0x50c8
movq 0x10(%r14), %rdi
movq %rdi, 0x40(%rsp)
movq 0x8(%r14), %rax
testq %rax, %rax
jne 0x50bc
callq 0x10b0
movq %rax, 0x18(%rsp)
leaq -0xfc9(%rip), %r15      # 0x40ff
movq %r15, 0x50(%rsp)
leaq 0x6af(%rip), %rax       # 0x5783
movq %rax, 0x58(%rsp)
movq 0x20(%r14), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x88(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rsp)
movl $0x10, 0x68(%rsp)
movl $0x100, %edi            # imm = 0x100
callq 0x1150
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x5732
movq %r14, 0x98(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %ecx, %ecx
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
pushq $0x1
popq %rbp
xorl %r14d, %r14d
movslq %ecx, %rbx
shlq $0x4, %rbx
addq %rax, %rbx
movq %r12, %rdi
callq *%r15
movl $0x80, %edx
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rcx
callq 0x5b5b
movq 0x8(%rsp), %rsi
movzbl (%rsi), %eax
cmpl $0x5b, %eax
je 0x51be
cmpl $0x7b, %eax
jne 0x5289
movl (%rbx), %eax
andl $-0x10, %eax
orl $0x9, %eax
movl %eax, (%rbx)
andl $0x0, 0x78(%rsp)
incq 0x20(%rsp)
leaq 0x68(%rsp), %rdi
callq *0x88(%rsp)
movl %eax, 0x90(%rsp)
cmpl $0x1, %eax
je 0x5729
movq %r12, %rdi
callq *0x50(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x5b5b
movq 0x8(%rsp), %rax
cmpb $0x7d, (%rax)
pushq $0x9
jmp 0x520f
movl (%rbx), %eax
andl $-0x10, %eax
orl $0x8, %eax
movl %eax, (%rbx)
andl $0x0, 0x78(%rsp)
incq 0x20(%rsp)
leaq 0x68(%rsp), %rdi
callq *0x88(%rsp)
movl %eax, 0x90(%rsp)
cmpl $0x1, %eax
je 0x5729
movq %r12, %rdi
callq *0x50(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x5b5b
movq 0x8(%rsp), %rax
cmpb $0x5d, (%rax)
pushq $0x8
popq %rax
je 0x543a
movl 0x6c(%rsp), %r14d
movslq 0x68(%rsp), %rdi
leal -0x1(%rdi), %eax
cmpl %eax, %r14d
jge 0x5455
movq 0x70(%rsp), %rbx
movslq %r14d, %rax
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rbx,%rcx), %r14
incl %eax
movl %eax, 0x6c(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx,%rcx)
movl (%rbx,%rcx), %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x5276
movslq 0x6c(%rsp), %rsi
shlq $0x4, %rsi
addq 0x70(%rsp), %rsi
movq %r12, %rdi
callq 0x62b9
testl %eax, %eax
js 0x55d9
movq 0x70(%rsp), %rax
movl 0x6c(%rsp), %ecx
movq 0x50(%rsp), %r15
jmp 0x5133
movq %r12, %rdi
movq %rbx, %rdx
leaq 0x78(%rsp), %rcx
callq 0x64e0
testl %eax, %eax
js 0x55d9
leaq 0x68(%rsp), %rdi
callq *0x88(%rsp)
movl %eax, 0x90(%rsp)
movl (%rbx), %eax
andl $0xf, %eax
cmpl $0x7, %eax
jne 0x52d2
testb $0x20, 0x78(%rsp)
je 0x52d2
movq 0x80(%rsp), %rdi
callq 0x1030
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rax
movups %xmm0, (%rax)
testb $0x20, (%rbx)
je 0x52ee
movq 0x8(%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl 0x6c(%rsp), %ebx
cmpl $0x1, 0x90(%rsp)
je 0x566c
testl %ebx, %ebx
setg %al
testb $0x1, %al
je 0x5662
movq %r12, %rdi
callq *0x50(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x5b5b
movl (%r14), %ecx
andl $0xf, %ecx
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x9, %ecx
jne 0x5373
cmpl $0x7d, %eax
je 0x53ab
cmpl $0x2c, %eax
jne 0x54a4
incq 0x20(%rsp)
movq %r12, %rdi
callq *0x50(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x5b5b
movq 0x8(%rsp), %rax
cmpb $0x7d, (%rax)
je 0x53ab
jmp 0x5258
cmpl $0x5d, %eax
je 0x53ab
cmpl $0x2c, %eax
jne 0x54fb
incq 0x20(%rsp)
movq %r12, %rdi
callq *0x50(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x5b5b
movq 0x8(%rsp), %rax
cmpb $0x5d, (%rax)
jne 0x5276
incq 0x20(%rsp)
movslq 0x6c(%rsp), %r14
decq %r14
movl %r14d, 0x6c(%rsp)
movq 0x70(%rsp), %r15
shlq $0x4, %r14
leaq (%r15,%r14), %rbx
movl $0x1, 0x78(%rsp)
leaq 0x68(%rsp), %rdi
callq *0x88(%rsp)
movl %eax, 0x90(%rsp)
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rax
movups %xmm0, (%rax)
testb $0x20, (%r15,%r14)
je 0x5403
movq 0x8(%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl 0x6c(%rsp), %ebx
cmpl $0x1, 0x90(%rsp)
je 0x566c
testl %ebx, %ebx
jle 0x5662
movq 0x70(%rsp), %rax
movl %ebx, %ecx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r14
addq $-0x10, %r14
movb $0x1, %al
jmp 0x5308
movl (%rbx), %ecx
andl $-0x10, %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movl $0x1, 0x78(%rsp)
incq 0x20(%rsp)
jmp 0x52a1
addq $0x10, %rdi
movl %edi, 0x68(%rsp)
shlq $0x4, %rdi
callq 0x1150
testq %rax, %rax
je 0x575d
movq %rax, %rbx
movslq %r14d, %rdx
movq 0x70(%rsp), %r14
shlq $0x4, %rdx
addq $0x10, %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1140
movq %r14, %rdi
callq 0x1030
movq %rbx, 0x70(%rsp)
movl 0x6c(%rsp), %r14d
jmp 0x5231
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x5590
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq 0x20(%rsp), %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x2f84(%rip), %rdi      # 0x845c
leaq 0x339f(%rip), %rsi      # 0x887e
movl $0xf2b, %edx            # imm = 0xF2B
xorl %eax, %eax
callq 0x10c0
leaq 0x31ea(%rip), %rdi      # 0x86dc
leaq 0x3280(%rip), %rsi      # 0x8779
jmp 0x5550
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x55b3
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
addq 0x20(%rsp), %rsi
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x1050
leaq 0x2f2d(%rip), %rdi      # 0x845c
leaq 0x3348(%rip), %rsi      # 0x887e
movl $0xf51, %edx            # imm = 0xF51
xorl %eax, %eax
callq 0x10c0
leaq 0x3193(%rip), %rdi      # 0x86dc
leaq 0x3239(%rip), %rsi      # 0x8789
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x55d9
leaq 0x2ef9(%rip), %rdi      # 0x845c
leaq 0x309b(%rip), %rsi      # 0x8605
movl $0xf7b, %edx            # imm = 0xF7B
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rsi
leaq 0x3053(%rip), %rdi      # 0x85d4
xorl %eax, %eax
callq 0x10c0
pushq $-0x1
popq %rbx
jmp 0x564e
leaq 0x2ec5(%rip), %rdi      # 0x845c
leaq 0x32e0(%rip), %rsi      # 0x887e
movl $0xf2b, %edx            # imm = 0xF2B
xorl %eax, %eax
callq 0x10c0
leaq 0x31c8(%rip), %rdi      # 0x8779
jmp 0x55d4
leaq 0x2ea2(%rip), %rdi      # 0x845c
leaq 0x32bd(%rip), %rsi      # 0x887e
movl $0xf51, %edx            # imm = 0xF51
xorl %eax, %eax
callq 0x10c0
leaq 0x31b5(%rip), %rdi      # 0x8789
callq 0x1060
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5616
pushq $0x8
popq %rbx
xorl %r14d, %r14d
movslq 0x6c(%rsp), %rax
cmpq %rax, %r14
jge 0x5611
testb $0x20, -0x8(%rdi,%rbx)
je 0x5608
movq (%rdi,%rbx), %rdi
callq 0x1030
movq 0x70(%rsp), %rdi
incq %r14
addq $0x10, %rbx
jmp 0x55e9
callq 0x1030
xorps %xmm0, %xmm0
leaq 0x68(%rsp), %rax
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x98(%rsp), %r14
pushq $-0x1
popq %rbx
cmpq $0x0, 0x18(%r14)
je 0x564e
movq 0x40(%rsp), %rdi
callq 0x1030
movl 0x10(%rsp), %edi
testl %edi, %edi
js 0x564e
callq 0x1100
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orl $-0x1, 0x6c(%rsp)
pushq $-0x1
popq %rbx
jmp 0x5672
decl %ebx
movl %ebx, 0x6c(%rsp)
movl $0x1, 0x78(%rsp)
movq 0x98(%rsp), %r14
testl %ebx, %ebx
js 0x56ba
leaq 0x68(%rsp), %rdi
callq *0x88(%rsp)
movl %eax, 0x90(%rsp)
movq 0x70(%rsp), %rax
movl %ebx, %ecx
shlq $0x4, %rcx
testb $0x20, (%rax,%rcx)
je 0x56b6
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x1030
decl %ebx
jmp 0x5682
leaq 0x10(%rsp), %rbx
movq 0x60(%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
leaq 0x68(%rsp), %rax
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rbx, %rdi
callq *0x40(%rbx)
movq 0x10(%rbx), %rax
movq 0x30(%rbx), %rcx
cmpb $0x0, (%rcx,%rax)
je 0x5722
leaq 0x2d6a(%rip), %rdi      # 0x845c
leaq 0x2f0c(%rip), %rsi      # 0x8605
movl $0xf94, %edx            # imm = 0xF94
xorl %eax, %eax
callq 0x10c0
movq 0x40(%rsp), %rsi
addq 0x20(%rsp), %rsi
leaq 0x2ed0(%rip), %rdi      # 0x85e6
xorl %eax, %eax
callq 0x10c0
jmp 0x562d
xorl %ebx, %ebx
jmp 0x5630
movl 0x6c(%rsp), %ebx
jmp 0x5672
leaq 0x2d23(%rip), %rdi      # 0x845c
leaq 0x313e(%rip), %rsi      # 0x887e
movl $0xea2, %edx            # imm = 0xEA2
xorl %eax, %eax
callq 0x10c0
leaq 0x320d(%rip), %rdi      # 0x8960
callq 0x1060
jmp 0x562d
leaq 0x2cf8(%rip), %rdi      # 0x845c
leaq 0x3113(%rip), %rsi      # 0x887e
movl $0xeac, %edx            # imm = 0xEAC
xorl %eax, %eax
callq 0x10c0
leaq 0x31e2(%rip), %rdi      # 0x8960
jmp 0x55d4