// File: yasz24[P]eau2/tests/testSerialize.cpp
// Function: testDistributedDataframe()
void testDistributedDataframe() {
    Sys* system = new Sys();
    Schema* sch = new Schema();
    NetworkIP network;
    KVStore* kvs1 = new KVStore(1, 0, &network);
    DistributedIntColumn* ic = new DistributedIntColumn(kvs1);
    for (int i = 0; i < 50; i++) {
        sch->add_row(nullptr);
        ic->push_back(i);
    }

    DistributedDoubleColumn* dc = new DistributedDoubleColumn(kvs1);
    for (double i = 0; i < 50; i++) {
        dc->push_back(i);
    }
    DistributedDataFrame* dd = new DistributedDataFrame(*sch, kvs1);
    dd->add_column(ic, nullptr);
    dd->add_column(dc, nullptr);

    char* serialized = dd->serialize();
    //std::cout << serialized << "\n";   
    DistributedDataFrame* dd2 = new  DistributedDataFrame(serialized, kvs1);
    String* s = new String(serialized);
    //std::cout << dd2->serialize() << "\n";
    String* s2 = new String(dd2->serialize());
    system->t_true(s2->equals(s));

    system->OK("Passed DistributedDataFrame");
    delete [] system;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x1, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
callq 0xcd20
jmp 0xbd29
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x50, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
callq 0x14910
jmp 0xbd52
movq -0xc8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xc820
movl $0x118, %edi            # imm = 0x118
callq 0x7250
movq %rax, -0xd0(%rbp)
jmp 0xbd79
movq -0xd0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %esi
leaq -0x68(%rbp), %rcx
callq 0xc870
jmp 0xbd94
movq -0xd0(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0xd8(%rbp)
jmp 0xbdb2
movq -0xd8(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x13980
jmp 0xbdc4
movq -0xd8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
cmpl $0x32, -0x7c(%rbp)
jge 0xbe96
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x14aa0
jmp 0xbdef
movq -0x78(%rbp), %rdi
movl -0x7c(%rbp), %esi
movq (%rdi), %rax
movq 0x98(%rax), %rax
callq *%rax
jmp 0xbe04
jmp 0xbe06
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0xbdd6
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc17c
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc17c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xc173
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movl $0x20, %edi
callq 0x7250
movq %rax, -0xe0(%rbp)
jmp 0xbea9
movq -0xe0(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x13b20
jmp 0xbebb
movq -0xe0(%rbp), %rax
movq %rax, -0x88(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x23134(%rip), %xmm0    # 0x2f010
ucomisd -0x90(%rbp), %xmm0
jbe 0xbf3c
movq -0x88(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0xbf03
jmp 0xbf05
movsd 0x2310b(%rip), %xmm0    # 0x2f018
addsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
jmp 0xbed4
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movl $0x28, %edi
callq 0x7250
movq %rax, -0xe8(%rbp)
jmp 0xbf4f
movq -0xe8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x14b70
jmp 0xbf65
movq -0xe8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x14e70
jmp 0xbf89
movq -0x98(%rbp), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x14e70
jmp 0xbfa2
movq -0x98(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0xf0(%rbp)
jmp 0xbfbb
movq -0xf0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x28, %edi
callq 0x7250
movq %rax, -0xf8(%rbp)
jmp 0xbfdc
movq -0xf8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x15150
jmp 0xbff5
movq -0xf8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0x100(%rbp)
jmp 0xc016
movq -0x100(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xcce0
jmp 0xc02b
movq -0x100(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0x108(%rbp)
jmp 0xc04c
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x110(%rbp)
jmp 0xc065
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0xcce0
jmp 0xc07a
movq -0x108(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0x111(%rbp)
jmp 0xc0b2
movq -0x120(%rbp), %rdi
movb -0x111(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
jmp 0xc0cc
movq -0x8(%rbp), %rdi
leaq 0x23458(%rip), %rsi     # 0x2f52f
callq 0xcd70
jmp 0xc0de
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
cmpq $0x0, %rax
je 0xc0fb
movq -0x128(%rbp), %rdi
callq 0x72b0
leaq -0x68(%rbp), %rdi
callq 0xcbe0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xc173
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
leaq -0x68(%rbp), %rdi
callq 0xcbe0
movq -0x10(%rbp), %rdi
callq 0x7370
nopw %cs:(%rax,%rax)