// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x10(%rsp), %r15
andq $0x0, (%r15)
movq %rsp, %r14
andq $0x0, (%r14)
pushq $0xa
popq %rdi
callq 0x1618
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1641
leaq 0x6ba2(%rip), %rax      # 0x804b
movq %rax, 0x8(%r15)
movl $0x400, (%r15)          # imm = 0x400
leaq 0x6b95(%rip), %rax      # 0x8050
movq %rax, 0x8(%r14)
movl $0x800, %ebp            # imm = 0x800
movl %ebp, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1659
leaq 0x6b7d(%rip), %rax      # 0x8059
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
orl $0x300, %eax            # imm = 0x300
movl %eax, (%r15)
pushq $0x1e
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1667
leaq 0x6b5c(%rip), %rax      # 0x805d
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
movl $0x500, %r12d           # imm = 0x500
orl %r12d, %eax
movl %eax, (%r15)
leaq 0x6b47(%rip), %rax      # 0x8063
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
orl $0xb00, %eax            # imm = 0xB00
movl %eax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1659
leaq 0x6b2e(%rip), %rax      # 0x806f
movq %rax, 0x8(%r15)
movzbl (%r15), %eax
orl %r12d, %eax
movl %eax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x167f
leaq 0x6b12(%rip), %rax      # 0x8075
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
movl $0x700, %r15d           # imm = 0x700
orl %r15d, %eax
movl %eax, (%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1659
leaq 0x6af2(%rip), %rax      # 0x807d
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
orl %r15d, %eax
movl %eax, (%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1659
leaq 0x6ad8(%rip), %rax      # 0x8085
movq %rax, 0x8(%r14)
movzbl (%r14), %eax
orl %ebp, %eax
movl %eax, (%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1659
pushq $0x1
popq %rbp
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x167f
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x1641
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3773
movq %rax, 0xcb13(%rip)      # 0xe108
movq %rax, %rdi
callq 0x1060
movq 0xcb04(%rip), %rdi      # 0xe108
callq 0x1f50
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq