// File: yasz24[P]eau2/tests/testSerialize.cpp
// Function: tryMap()
void tryMap() {
    Value* v1 = new Value("muffin", (size_t)6);
    Value* v3 = new Value("carrot", (size_t)6);
    Key* k1 = new Key("payload_1", 0);
    Key* k3 = new Key("payload_1", 0);
    char* c1 =  "payload_1";
    char* c2 = "payload_3";

    std::map<Key*, Value*, KeyCompare> store;
    std::map<Key, Value>::iterator it;
    store.insert(std::pair<Key*, Value*>(k1, v1));

    std::cout << (c1 < c2)  <<"\n";
    std::cout <<  store.find(k1)->second->serialize() <<"\n";
    store.find(k3)->second = v3;   
    std::cout <<  store.find(k1)->second->serialize() <<"\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x22e27(%rip), %rsi     # 0x2f0e0
movl $0x6, %edx
callq 0xc730
jmp 0xc2c5
movq -0xb8(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
leaq 0x22df9(%rip), %rsi     # 0x2f0e7
movl $0x6, %edx
callq 0xc730
jmp 0xc2fa
movq -0xc0(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
leaq 0x22dcb(%rip), %rsi     # 0x2f0ee
xorl %eax, %eax
movl %eax, %edx
callq 0xc780
jmp 0xc32e
movq -0xc8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
leaq 0x22d97(%rip), %rsi     # 0x2f0ee
xorl %eax, %eax
movl %eax, %edx
callq 0xc780
jmp 0xc362
movq -0xd0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x22d7a(%rip), %rax     # 0x2f0ee
movq %rax, -0x38(%rbp)
leaq 0x22d79(%rip), %rax     # 0x2f0f8
movq %rax, -0x40(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x15350
leaq -0x78(%rbp), %rdi
callq 0x15370
leaq -0x88(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0x153d0
jmp 0xc3ab
leaq -0x70(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x15390
movb %dl, -0xd9(%rbp)
movq %rax, -0xd8(%rbp)
jmp 0xc3ca
movb -0xd9(%rbp), %al
movq -0xd8(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movb %al, -0x90(%rbp)
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
setb %al
movzbl %al, %esi
movq 0x32bcc(%rip), %rdi     # 0x3efc8
callq 0x7390
movq %rax, -0xe8(%rbp)
jmp 0xc40a
movq -0xe8(%rbp), %rdi
leaq 0x2336d(%rip), %rsi     # 0x2f785
callq 0x7240
jmp 0xc41f
leaq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x15400
movq %rax, -0xf0(%rbp)
jmp 0xc435
movq -0xf0(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x15430
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0xf8(%rbp)
jmp 0xc465
movq -0xf8(%rbp), %rsi
movq 0x32b55(%rip), %rdi     # 0x3efc8
callq 0x7240
movq %rax, -0x100(%rbp)
jmp 0xc481
movq -0x100(%rbp), %rdi
leaq 0x232f6(%rip), %rsi     # 0x2f785
callq 0x7240
jmp 0xc496
movq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x15400
movq %rax, -0x108(%rbp)
jmp 0xc4b7
movq -0x108(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x15430
movq -0x110(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x15400
movq %rax, -0x118(%rbp)
jmp 0xc4f2
movq -0x118(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x15430
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x120(%rbp)
jmp 0xc522
movq -0x120(%rbp), %rsi
movq 0x32a98(%rip), %rdi     # 0x3efc8
callq 0x7240
movq %rax, -0x128(%rbp)
jmp 0xc53e
movq -0x128(%rbp), %rdi
leaq 0x23239(%rip), %rsi     # 0x2f785
callq 0x7240
jmp 0xc553
leaq -0x70(%rbp), %rdi
callq 0x15450
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc5e2
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc5e2
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc5e2
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc5e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x15450
movq -0x10(%rbp), %rdi
callq 0x7370
nopl (%rax,%rax)