// File: oknenavin[P]cxon/examples/std-types-ex01.cxx
// Function: main
int main() {
    my_type mv1 = { {"even", {2, 4, 6}}, {"odd", {1, 3, 5}} },
            mv2;
    std::string json;
        // write it to output-iterator, container, buffer, etc. - in this case, std::string
        cxon::to_bytes(json, mv1);
        // read it from input-iterator, container, buffer, etc. - in this case, std::string
        cxon::from_bytes(mv2, json);
    // json == "{ \"even\": [2, 4, 6], \"odd\": [1, 3, 5] }"
    assert(mv1 == mv2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movl $0x0, -0x4(%rbp)
movb $0x1, -0x13e(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x2, -0xf4(%rbp)
movl $0x4, -0xf0(%rbp)
movl $0x6, -0xec(%rbp)
leaq -0xf4(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x3, -0xe0(%rbp)
leaq -0xf5(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x2be0
movq -0x1c8(%rbp), %rcx
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x2c00
jmp 0x2464
leaq 0x9e99(%rip), %rsi      # 0xc304
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x2c80
jmp 0x2480
leaq -0x80(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq %rax, -0xc0(%rbp)
movl $0x1, -0x13c(%rbp)
movl $0x3, -0x138(%rbp)
movl $0x5, -0x134(%rbp)
leaq -0x13c(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x3, -0x128(%rbp)
leaq -0x13d(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x2be0
movq -0x1d0(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x2c00
jmp 0x24ff
movq -0x1d8(%rbp), %rdi
leaq 0x9dfc(%rip), %rsi      # 0xc309
leaq -0x120(%rbp), %rdx
callq 0x2d20
jmp 0x251b
movb $0x0, -0x13e(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x2, -0x40(%rbp)
leaq -0x140(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x2dc0
movq -0x1e0(%rbp), %r8
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x13f(%rbp), %rcx
callq 0x2de0
jmp 0x2569
leaq -0x140(%rbp), %rdi
callq 0x2eb0
leaq -0xb8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
addq $0x70, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rdi
addq $-0x38, %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x2ed0
movq -0x1f0(%rbp), %rcx
movq -0x1f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e8(%rbp)
jne 0x258e
leaq -0x120(%rbp), %rdi
callq 0x2f00
leaq -0x13d(%rbp), %rdi
callq 0x2f60
leaq -0xd8(%rbp), %rdi
callq 0x2f00
leaq -0xf5(%rbp), %rdi
callq 0x2f60
leaq -0x170(%rbp), %rdi
callq 0x2f80
leaq -0x190(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x2240
movq -0x200(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x2fa0
jmp 0x2627
leaq -0x1c0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x2fd0
jmp 0x2643
leaq -0x38(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x3000
movb %al, -0x201(%rbp)
jmp 0x265b
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x2667
jmp 0x266c
jmp 0x280d
leaq 0x9c9a(%rip), %rdi      # 0xc30d
leaq 0x9c9e(%rip), %rsi      # 0xc318
movl $0x14, %edx
leaq 0x9ca5(%rip), %rcx      # 0xc32b
callq 0x2140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x2772
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x2766
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x275a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0x274e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x2eb0
leaq -0xb8(%rbp), %rax
movq %rax, -0x218(%rbp)
addq $0x70, %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rdi
addq $-0x38, %rdi
movq %rdi, -0x220(%rbp)
callq 0x2ed0
movq -0x218(%rbp), %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x210(%rbp)
jne 0x271b
jmp 0x274e
leaq -0x120(%rbp), %rdi
callq 0x2f00
leaq -0x13d(%rbp), %rdi
callq 0x2f60
leaq -0xd8(%rbp), %rdi
callq 0x2f00
leaq -0xf5(%rbp), %rdi
callq 0x2f60
testb $0x1, -0x13e(%rbp)
jne 0x2789
jmp 0x27d6
movq -0xc0(%rbp), %rax
leaq -0xb8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x228(%rbp)
je 0x27d4
movq -0x228(%rbp), %rdi
addq $-0x38, %rdi
movq %rdi, -0x230(%rbp)
callq 0x2ed0
movq -0x230(%rbp), %rax
leaq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x228(%rbp)
jne 0x27a3
jmp 0x27d6
jmp 0x283a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x2120
leaq -0x170(%rbp), %rdi
callq 0x3030
leaq -0x38(%rbp), %rdi
callq 0x3030
jmp 0x283a
leaq -0x190(%rbp), %rdi
callq 0x2120
leaq -0x170(%rbp), %rdi
callq 0x3030
leaq -0x38(%rbp), %rdi
callq 0x3030
movl -0x4(%rbp), %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x100(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)