// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq $0x0, 0x20(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movl $0xa, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x1850
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x18a0
leaq 0xe9e4(%rip), %rax      # 0x1004b
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
andl $0xff, %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, 0x10(%rsp)
leaq 0xe9cb(%rip), %rax      # 0x10050
movq %rax, 0x8(%rsp)
movl (%rsp), %eax
andl $0xff, %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
callq 0x18d0
leaq 0xe9a6(%rip), %rax      # 0x10059
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
andl $0xff, %eax
orl $0x300, %eax            # imm = 0x300
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1e, %edx
callq 0x1900
leaq 0xe978(%rip), %rax      # 0x1005d
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
andl $0xff, %eax
orl $0x500, %eax            # imm = 0x500
movl %eax, 0x10(%rsp)
leaq 0xe960(%rip), %rax      # 0x10063
movq %rax, 0x8(%rsp)
movl (%rsp), %eax
andl $0xff, %eax
orl $0xb00, %eax            # imm = 0xB00
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
callq 0x18d0
leaq 0xe93e(%rip), %rax      # 0x1006f
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
andl $0xff, %eax
orl $0x500, %eax            # imm = 0x500
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x1930
leaq 0xe915(%rip), %rax      # 0x10075
movq %rax, 0x8(%rsp)
movl (%rsp), %eax
andl $0xff, %eax
orl $0x700, %eax            # imm = 0x700
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsp, %rdx
callq 0x18d0
leaq 0xe8f0(%rip), %rax      # 0x1007d
movq %rax, 0x8(%rsp)
movl (%rsp), %eax
andl $0xff, %eax
orl $0x700, %eax            # imm = 0x700
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsp, %rdx
callq 0x18d0
leaq 0xe8cb(%rip), %rax      # 0x10085
movq %rax, 0x8(%rsp)
movl (%rsp), %eax
andl $0xff, %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsp, %rdx
callq 0x18d0
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x1930
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x18a0
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x60f0
movq %rax, 0x1499a(%rip)     # 0x161b8
movq 0x14993(%rip), %rsi     # 0x161b8
leaq 0xf43c(%rip), %rdi      # 0x10c68
movb $0x0, %al
callq 0x10c0
movq 0x1497e(%rip), %rdi     # 0x161b8
callq 0x2b00
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)