// File: /workspace/github_c_makefile_star2_O3/lengjingzju[P]json/json_test.c
// Function: sax_parser_cb
json_sax_ret_t _sax_parser_cb(json_sax_parser_t *parser)
{
    static json_sax_print_hd handle = NULL;
    json_string_t *jkey = &parser->array[parser->index];

    if (parser->index == 0) {
        switch (parser->array[parser->index].type) {
        case JSON_ARRAY:
        case JSON_OBJECT:
            if (parser->value.vcmd == JSON_SAX_START) {
                if (s_sax_for_file)
                    handle = json_sax_fprint_format_start(s_sax_item_num, s_dst_json_path, NULL);
                else
                    handle = json_sax_print_format_start(s_sax_item_num, NULL);
            }
            break;
        default:
            if (s_sax_for_file)
                handle = json_sax_fprint_format_start(s_sax_item_num, s_dst_json_path, NULL);
            else
                handle = json_sax_print_format_start(s_sax_item_num, NULL);
            break;
        }
    }

    switch (parser->array[parser->index].type) {
    case JSON_NULL:
        json_sax_print_null(handle, jkey);
        break;
    case JSON_BOOL:
        json_sax_print_bool(handle, jkey, parser->value.vnum.vbool);
        break;
    case JSON_INT:
        json_sax_print_int(handle, jkey, parser->value.vnum.vint);
        break;
    case JSON_HEX:
        json_sax_print_hex(handle, jkey, parser->value.vnum.vhex);
        break;
    case JSON_LINT:
        json_sax_print_lint(handle, jkey, parser->value.vnum.vlint);
        break;
    case JSON_LHEX:
        json_sax_print_lhex(handle, jkey, parser->value.vnum.vlhex);
        break;
    case JSON_DOUBLE:
        json_sax_print_double(handle, jkey, parser->value.vnum.vdbl);
        break;
    case JSON_STRING:
        json_sax_print_string(handle, jkey, &parser->value.vstr);
        break;
    case JSON_ARRAY:
        json_sax_print_array(handle, jkey, parser->value.vcmd);
        break;
    case JSON_OBJECT:
        json_sax_print_object(handle, jkey, parser->value.vcmd);
        break;
    default:
        break;
    }

    if (parser->index == 0) {
        switch (parser->array[parser->index].type) {
        case JSON_ARRAY:
        case JSON_OBJECT:
            if (parser->value.vcmd == JSON_SAX_FINISH) {
                if (s_sax_for_file) {
                    json_sax_print_finish(handle, NULL, NULL);
                } else {
                    s_print_str = json_sax_print_finish(handle, &s_print_size, NULL);
                }
            }
            break;
        default:
            if (s_sax_for_file) {
                json_sax_print_finish(handle, NULL, NULL);
            } else {
                s_print_str = json_sax_print_finish(handle, &s_print_size, NULL);
            }
            break;
        }
    }

    return JSON_SAX_PARSE_CONTINUE;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
movq %rax, %r14
shlq $0x4, %r14
addq 0x8(%rdi), %r14
testq %rax, %rax
jne 0x3340
movl (%r14), %eax
andl $0xe, %eax
cmpl $0x8, %eax
jne 0x32e4
cmpl $0x0, 0x10(%rbx)
jne 0x3340
movl 0xce32(%rip), %eax      # 0x1011c
cmpb $0x1, 0xce27(%rip)      # 0x10118
jne 0x331c
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movb $0x1, 0x1c(%rdi)
movl %eax, 0x18(%rdi)
leaq 0xce12(%rip), %rax      # 0x10120
movq %rax, 0x28(%rdi)
movq $0x0, 0x20(%rdi)
jmp 0x3334
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, (%rdi)
movb $0x1, 0x1c(%rdi)
movl %eax, 0x18(%rdi)
callq 0x4e1d
movq %rax, 0xcdd0(%rip)      # 0x10110
movq 0x8(%rbx), %rcx
movslq 0x4(%rbx), %rax
movq %rax, %rdx
shlq $0x4, %rdx
movl (%rcx,%rdx), %ecx
andl $0xf, %ecx
cmpl $0x9, %ecx
ja 0x345d
leaq 0x6c9b(%rip), %rax      # 0xa000
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0xcd9b(%rip), %rdi      # 0x10110
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
jmp 0x3455
movq 0xcd88(%rip), %rdi      # 0x10110
movq 0x10(%rbx), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movl $0x4, %esi
jmp 0x3452
movq 0xcd6d(%rip), %rdi      # 0x10110
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x9, %esi
jmp 0x3452
movq 0xcd54(%rip), %rdi      # 0x10110
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x2, %esi
jmp 0x3452
movq 0xcd3b(%rip), %rdi      # 0x10110
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x3, %esi
jmp 0x3452
movq 0xcd25(%rip), %rdi      # 0x10110
leaq 0x10(%rbx), %rcx
movl $0x7, %esi
jmp 0x3452
movq 0xcd13(%rip), %rdi      # 0x10110
movb 0x10(%rbx), %al
movq %rsp, %rcx
movb %al, (%rcx)
movl $0x1, %esi
jmp 0x3452
movq 0xccfd(%rip), %rdi      # 0x10110
movq 0x10(%rbx), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movl $0x5, %esi
jmp 0x3452
movq 0xcce5(%rip), %rdi      # 0x10110
movsd 0x10(%rbx), %xmm0
movq %rsp, %rcx
movsd %xmm0, (%rcx)
movl $0x6, %esi
jmp 0x3452
movq 0xcccb(%rip), %rdi      # 0x10110
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x8, %esi
movq %r14, %rdx
callq 0x1200
movl 0x4(%rbx), %eax
testl %eax, %eax
je 0x346b
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rax
movl (%rax), %eax
andl $0xe, %eax
cmpl $0x8, %eax
jne 0x347f
cmpl $0x1, 0x10(%rbx)
jne 0x3461
movq 0xcc8a(%rip), %rdi      # 0x10110
cmpb $0x1, 0xcc8b(%rip)      # 0x10118
jne 0x349a
xorl %esi, %esi
xorl %edx, %edx
callq 0x4f02
jmp 0x3461
leaq 0xcd7f(%rip), %rsi      # 0x10220
xorl %edx, %edx
callq 0x4f02
movq %rax, 0xcc59(%rip)      # 0x10108
jmp 0x3461