// File: yasz24[P]eau2/tests/testSerialize.cpp
// Function: testIntDistributedArrays()
void testIntDistributedArrays() {
    Sys* system = new Sys();
    NetworkIP network;
    KVStore* kvs1 = new KVStore(1, 0, &network);
    IntDistributedArray* ida = new IntDistributedArray(kvs1);
    for(int i = 0; i < 10; i++) {
        //std::cout << "here\n";
        ida->pushBack(i);
    }
    char* serialized = ida->serialize();
    IntDistributedArray* ida2 = new IntDistributedArray(serialized, kvs1);
    //std::cout << "here\n";
    system->t_true(ida->equals(ida2)); //problem child
    String* s = new String(serialized);
    String* s2 = new String(ida2->serialize());
    system->t_true(s2->equals(s));
    system->OK("Passed intDistributedArray");
    delete [] system;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x1, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
callq 0xcd20
jmp 0xa089
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xc820
movl $0x118, %edi            # imm = 0x118
callq 0x7250
movq %rax, -0xa8(%rbp)
jmp 0xa0b0
movq -0xa8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %esi
leaq -0x60(%rbp), %rcx
callq 0xc870
jmp 0xa0cb
movq -0xa8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x70, %edi
callq 0x7250
movq %rax, -0xb0(%rbp)
jmp 0xa0e9
movq -0xb0(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x11c30
jmp 0xa0fb
movq -0xb0(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
cmpl $0xa, -0x74(%rbp)
jge 0xa19a
movq -0x70(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x11d70
jmp 0xa125
jmp 0xa127
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xa10d
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa38f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xa386
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa386
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa386
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0xb8(%rbp)
jmp 0xa1b0
movq -0xb8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x70, %edi
callq 0x7250
movq %rax, -0xc0(%rbp)
jmp 0xa1ce
movq -0xc0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x11df0
jmp 0xa1e4
movq -0xc0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0xc1(%rbp)
jmp 0xa219
movq -0xd0(%rbp), %rdi
movb -0xc1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
jmp 0xa233
movl $0x20, %edi
callq 0x7250
movq %rax, -0xd8(%rbp)
jmp 0xa246
movq -0xd8(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xcce0
jmp 0xa258
movq -0xd8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0xe0(%rbp)
jmp 0xa279
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0xe8(%rbp)
jmp 0xa292
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdi
callq 0xcce0
jmp 0xa2a7
movq -0xe0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0xe9(%rbp)
jmp 0xa2df
movq -0xf8(%rbp), %rdi
movb -0xe9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
jmp 0xa2f9
movq -0x8(%rbp), %rdi
leaq 0x2512e(%rip), %rsi     # 0x2f432
callq 0xcd70
jmp 0xa30b
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
cmpq $0x0, %rax
je 0xa328
movq -0x100(%rbp), %rdi
callq 0x72b0
leaq -0x60(%rbp), %rdi
callq 0xcbe0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa386
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa386
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
leaq -0x60(%rbp), %rdi
callq 0xcbe0
movq -0x10(%rbp), %rdi
callq 0x7370
nopl (%rax,%rax)