// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/json_test.c
// Function: test_json_sax_print
int test_json_sax_print(void)
{
    json_sax_print_hd handle = NULL;
    json_string_t jkey = {0}, jstr = {0};

    handle = json_sax_print_format_start(10, NULL);
    json_sax_print_object_start(handle, NULL);
    jkey.str = (char *)"Name", jkey.len = 4;
    jstr.str = (char *)"LengJing", jstr.len = 8;
    json_sax_print_object_item(handle, &jkey, &jstr);
    jkey.str = (char *)"Age", jkey.len = 3;
    json_sax_print_object_item(handle, &jkey, 30);
    jkey.str = (char *)"Phone", jkey.len = 5;
    jstr.str = (char *)"18368887550", jstr.len = 11;
    json_sax_print_object_item(handle, &jkey, &jstr);
    jkey.str = (char *)"Hobby", jkey.len = 5;
    json_sax_print_array_start(handle, &jkey);
    jstr.str = (char *)"Reading", jstr.len = 7;
    json_sax_print_array_item(handle, &jstr);
    jstr.str = (char *)"Walking", jstr.len = 7;
    json_sax_print_array_item(handle, &jstr);
    jstr.str = (char *)"Thinking", jstr.len = 8;
    json_sax_print_array_item(handle, &jstr);
    json_sax_print_array_finish(handle);
    json_sax_print_object_finish(handle);

    s_print_str = json_sax_print_finish(handle, NULL, NULL);
    printf("%s\n", s_print_str);
    json_memory_free(s_print_str);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x30(%rsp), %r14
movaps %xmm0, (%r14)
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, (%r12)
movb $0x1, 0x1c(%r12)
movl $0xa, 0x18(%r12)
movq $0x0, 0x20(%r12)
movq %r12, %rdi
callq 0x4a33
movq %rax, %rbx
xorl %r13d, %r13d
movl %r13d, (%r12)
movq %rsp, %r12
movq %rax, %rdi
movl $0x9, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1210
leaq 0x72fb(%rip), %rax      # 0xa04b
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, (%r15)
leaq 0x72e9(%rip), %rax      # 0xa050
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
movl $0x800, %ecx            # imm = 0x800
orl %ecx, %eax
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1210
leaq 0x72c6(%rip), %rax      # 0xa059
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
orl $0x300, %eax            # imm = 0x300
movl %eax, (%r15)
movl $0x1e, (%r12)
movq %rsp, %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1210
leaq 0x7295(%rip), %rax      # 0xa05d
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
movl $0x500, %ebp            # imm = 0x500
orl %ebp, %eax
movl %eax, (%r15)
leaq 0x7282(%rip), %rax      # 0xa063
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
orl $0xb00, %eax            # imm = 0xB00
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1210
leaq 0x7264(%rip), %rax      # 0xa06f
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
orl %ebp, %eax
movl %eax, (%r15)
movl %r13d, (%r12)
movq %rsp, %r12
movq %rbx, %rdi
movl $0x8, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1210
leaq 0x723c(%rip), %rax      # 0xa075
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
movl $0x700, %ebp            # imm = 0x700
orl %ebp, %eax
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1210
leaq 0x7219(%rip), %rax      # 0xa07d
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
orl %ebp, %eax
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1210
leaq 0x71fb(%rip), %rax      # 0xa085
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
movl $0x800, %ecx            # imm = 0x800
orl %ecx, %eax
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1210
movl $0x1, %ebp
movl %ebp, (%r12)
movq %rsp, %r14
movq %rbx, %rdi
movl $0x8, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1210
movl %ebp, (%r14)
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x1210
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4b18
movq %rax, 0xd224(%rip)      # 0x10118
movq %rax, %rdi
callq 0x1070
movq 0xd215(%rip), %rdi      # 0x10118
callq 0x3aed
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq