// File: /workspace/github_c_makefile_star2_O3/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
xorl %r13d, %r13d
leaq 0x48(%rsp), %r15
movq %r13, (%r15)
leaq 0x38(%rsp), %r14
movq %r13, (%r14)
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, (%r12)
movb $0x1, 0x1c(%r12)
movl $0xa, 0x18(%r12)
movq %r12, %rdi
callq 0x4e1d
movq %rax, %rbx
movl %r13d, (%r12)
movq %rsp, %r12
movq %rax, %rdi
movl $0x9, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1200
leaq 0x6f54(%rip), %rax      # 0xa04b
movq %rax, 0x8(%r15)
movl $0x400, (%r15)          # imm = 0x400
leaq 0x6f47(%rip), %rax      # 0xa050
movq %rax, 0x8(%r14)
movl $0x800, %eax            # imm = 0x800
movl %eax, (%r14)
movq %rbx, %rdi
movl $0x7, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1200
leaq 0x6f2a(%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 0x1200
leaq 0x6ef9(%rip), %rax      # 0xa05d
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
movl $0x500, %ebp            # imm = 0x500
orl %ebp, %eax
movl %eax, (%r15)
leaq 0x6ee6(%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 0x1200
leaq 0x6ec8(%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 0x1200
leaq 0x6ea0(%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 0x1200
leaq 0x6e7d(%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 0x1200
leaq 0x6e5f(%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 0x1200
movl $0x1, %ebp
movl %ebp, (%r12)
movq %rsp, %r14
movq %rbx, %rdi
movl $0x8, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x1200
movl %ebp, (%r14)
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x1200
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4f02
movq %rax, 0xce78(%rip)      # 0x10108
movq %rax, %rdi
callq 0x1060
movq 0xce69(%rip), %rdi      # 0x10108
callq 0x3e43
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq