// File: jo-qzy[P]MyJson/test.cpp
// Function: test_convert()
static void test_convert() {
    Reader reader;
    Value value;
    string json_source("{  "
                        "\"n\" : null , "
                        "\"f\" : false , "
                        "\"t\" : true , "
                        "\"i\" : 123 , "
                        "\"s\" : \"abc\", "
                        "\"a\" : [ 1, 2, 3  ],"
                        "\"o\" : { \"1\" : 1, \"2\" : 2, \"3\" : 3  }"
                      " } "
                      );
    EXPECT_EQ_INT(PARSE_OK, reader.parse(json_source, value));
    EXPECT_EQ_INT(JSON_OBJECT, value.get_type());
    
    FastWriter fw;
    string str = fw.write(value);
    cout << str << endl;

    StyleWriter sw;
    str = sw.write(value);
    cout << str << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
leaq -0xb0(%rbp), %rdi
callq 0x1b600
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x2360
movq -0x188(%rbp), %rdx
leaq 0x214e0(%rip), %rsi     # 0x25758
leaq -0xd0(%rbp), %rdi
callq 0x22f0
jmp 0x4286
leaq -0xd1(%rbp), %rdi
callq 0x2280
movl 0x28f5c(%rip), %eax     # 0x2d1f4
incl %eax
movl %eax, 0x28f54(%rip)     # 0x2d1f4
leaq -0x108(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x20e0
jmp 0x42b5
leaq -0x108(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x1b650
movl %eax, -0x18c(%rbp)
jmp 0x42d0
leaq -0x108(%rbp), %rdi
callq 0x2150
movl -0x18c(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4359
movl 0x28f0a(%rip), %eax     # 0x2d1f8
addl $0x1, %eax
movl %eax, 0x28f01(%rip)     # 0x2d1f8
jmp 0x448b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0xd1(%rbp), %rdi
callq 0x2280
jmp 0x46f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x46e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x2150
jmp 0x46e5
movq 0x28c78(%rip), %rdi     # 0x2cfd8
leaq 0x20f96(%rip), %rsi     # 0x252fd
callq 0x2240
movq %rax, -0x198(%rbp)
jmp 0x4375
movq -0x198(%rbp), %rdi
leaq 0x20f8b(%rip), %rsi     # 0x2530e
callq 0x2240
movq %rax, -0x1a0(%rbp)
jmp 0x4391
movq -0x1a0(%rbp), %rdi
movl $0x11c, %esi            # imm = 0x11C
callq 0x2340
movq %rax, -0x1a8(%rbp)
jmp 0x43ab
movq -0x1a8(%rbp), %rdi
leaq 0x20f4d(%rip), %rsi     # 0x25306
callq 0x2240
movq %rax, -0x1b0(%rbp)
jmp 0x43c7
movq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0x2340
movq %rax, -0x1b8(%rbp)
jmp 0x43de
movq -0x1b8(%rbp), %rdi
leaq 0x20f24(%rip), %rsi     # 0x25310
callq 0x2240
movq %rax, -0x1c0(%rbp)
jmp 0x43fa
leaq -0x128(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x20e0
jmp 0x440f
leaq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x1b650
movl %eax, -0x1c4(%rbp)
jmp 0x442a
movl -0x1c4(%rbp), %esi
movq -0x1c0(%rbp), %rdi
callq 0x2340
movq %rax, -0x1d0(%rbp)
jmp 0x4445
movq -0x1d0(%rbp), %rdi
movq 0x28b75(%rip), %rsi     # 0x2cfc8
callq 0x2270
jmp 0x445a
leaq -0x128(%rbp), %rdi
callq 0x2150
jmp 0x448b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x2150
jmp 0x46e5
jmp 0x448d
jmp 0x448f
jmp 0x4491
movl 0x28d5d(%rip), %eax     # 0x2d1f4
addl $0x1, %eax
movl %eax, 0x28d54(%rip)     # 0x2d1f4
leaq -0xb0(%rbp), %rdi
callq 0x1b690
movl %eax, %ecx
movl $0x6, %eax
cmpl %ecx, %eax
jne 0x44cb
movl 0x28d3b(%rip), %eax     # 0x2d1f8
addl $0x1, %eax
movl %eax, 0x28d32(%rip)     # 0x2d1f8
jmp 0x45a9
movq 0x28b06(%rip), %rdi     # 0x2cfd8
leaq 0x20e24(%rip), %rsi     # 0x252fd
callq 0x2240
movq %rax, -0x1d8(%rbp)
jmp 0x44e7
movq -0x1d8(%rbp), %rdi
leaq 0x20e19(%rip), %rsi     # 0x2530e
callq 0x2240
movq %rax, -0x1e0(%rbp)
jmp 0x4503
movq -0x1e0(%rbp), %rdi
movl $0x11d, %esi            # imm = 0x11D
callq 0x2340
movq %rax, -0x1e8(%rbp)
jmp 0x451d
movq -0x1e8(%rbp), %rdi
leaq 0x20ddb(%rip), %rsi     # 0x25306
callq 0x2240
movq %rax, -0x1f0(%rbp)
jmp 0x4539
movq -0x1f0(%rbp), %rdi
movl $0x6, %esi
callq 0x2340
movq %rax, -0x1f8(%rbp)
jmp 0x4553
movq -0x1f8(%rbp), %rdi
leaq 0x20daf(%rip), %rsi     # 0x25310
callq 0x2240
movq %rax, -0x200(%rbp)
jmp 0x456f
leaq -0xb0(%rbp), %rdi
callq 0x1b690
movq -0x200(%rbp), %rdi
movl %eax, %esi
callq 0x2340
movq %rax, -0x208(%rbp)
jmp 0x4592
movq -0x208(%rbp), %rdi
movq 0x28a28(%rip), %rsi     # 0x2cfc8
callq 0x2270
jmp 0x45a7
jmp 0x45a9
jmp 0x45ab
jmp 0x45ad
leaq -0x130(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x23270
movq -0x210(%rbp), %rsi
leaq -0x150(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x232b0
jmp 0x45dc
movq 0x289f5(%rip), %rdi     # 0x2cfd8
leaq -0x150(%rbp), %rsi
callq 0x2200
movq %rax, -0x218(%rbp)
jmp 0x45f8
movq -0x218(%rbp), %rdi
movq 0x289c2(%rip), %rsi     # 0x2cfc8
callq 0x2270
jmp 0x460d
leaq -0x160(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x232f0
movq -0x220(%rbp), %rsi
leaq -0x180(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x23330
jmp 0x463c
leaq -0x150(%rbp), %rdi
movq %rdi, -0x230(%rbp)
leaq -0x180(%rbp), %rsi
movq %rsi, -0x238(%rbp)
callq 0x22b0
movq -0x238(%rbp), %rdi
callq 0x2150
movq -0x230(%rbp), %rsi
movq 0x28961(%rip), %rdi     # 0x2cfd8
callq 0x2200
movq %rax, -0x228(%rbp)
jmp 0x4685
movq -0x228(%rbp), %rdi
movq 0x28935(%rip), %rsi     # 0x2cfc8
callq 0x2270
jmp 0x469a
leaq -0x150(%rbp), %rdi
callq 0x2150
leaq -0xd0(%rbp), %rdi
callq 0x2150
leaq -0xb0(%rbp), %rdi
callq 0x1b770
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x2150
leaq -0xd0(%rbp), %rdi
callq 0x2150
leaq -0xb0(%rbp), %rdi
callq 0x1b770
movq -0xe0(%rbp), %rdi
callq 0x2350
nopl (%rax)