// File: /workspace/github_c_makefile_star2_O1/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 0x2fa8
movl (%r14), %eax
andl $0xe, %eax
cmpl $0x8, %eax
jne 0x2f48
cmpl $0x0, 0x10(%rbx)
jne 0x2fa8
movl 0xd1de(%rip), %eax      # 0x1012c
cmpb $0x1, 0xd1d3(%rip)      # 0x10128
jne 0x2f7c
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)
leaq 0xd1ba(%rip), %rax      # 0x10130
movq %rax, 0x28(%rdi)
jmp 0x2f94
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)
movq $0x0, 0x20(%rdi)
callq 0x4a33
movq %rax, 0xd178(%rip)      # 0x10120
movq 0x8(%rbx), %rax
movslq 0x4(%rbx), %rcx
shlq $0x4, %rcx
movl (%rax,%rcx), %eax
andl $0xf, %eax
cmpl $0x9, %eax
ja 0x30bf
leaq 0x7036(%rip), %rcx      # 0xa000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xd146(%rip), %rdi      # 0x10120
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
jmp 0x30ba
movq 0xd133(%rip), %rdi      # 0x10120
movq 0x10(%rbx), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movl $0x4, %esi
jmp 0x30b7
movq 0xd118(%rip), %rdi      # 0x10120
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x9, %esi
jmp 0x30b7
movq 0xd0ff(%rip), %rdi      # 0x10120
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x2, %esi
jmp 0x30b7
movq 0xd0e6(%rip), %rdi      # 0x10120
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x3, %esi
jmp 0x30b7
movq 0xd0d0(%rip), %rdi      # 0x10120
leaq 0x10(%rbx), %rcx
movl $0x7, %esi
jmp 0x30b7
movq 0xd0be(%rip), %rdi      # 0x10120
movb 0x10(%rbx), %al
movq %rsp, %rcx
movb %al, (%rcx)
movl $0x1, %esi
jmp 0x30b7
movq 0xd0a8(%rip), %rdi      # 0x10120
movq 0x10(%rbx), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movl $0x5, %esi
jmp 0x30b7
movq 0xd090(%rip), %rdi      # 0x10120
movsd 0x10(%rbx), %xmm0
movq %rsp, %rcx
movsd %xmm0, (%rcx)
movl $0x6, %esi
jmp 0x30b7
movq 0xd076(%rip), %rdi      # 0x10120
movl 0x10(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x8, %esi
movq %r14, %rdx
callq 0x1210
cmpl $0x0, 0x4(%rbx)
je 0x30cf
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 0x30e3
cmpl $0x1, 0x10(%rbx)
jne 0x30c5
movq 0xd036(%rip), %rdi      # 0x10120
cmpb $0x1, 0xd037(%rip)      # 0x10128
jne 0x30fe
xorl %esi, %esi
xorl %edx, %edx
callq 0x4b18
jmp 0x30c5
leaq 0xd12b(%rip), %rsi      # 0x10230
xorl %edx, %edx
callq 0x4b18
movq %rax, 0xd005(%rip)      # 0x10118
jmp 0x30c5