// File: yasz24[P]eau2/tests/testSerialize.cpp
// Function: testStringDistributedArrays()
void testStringDistributedArrays() {
    Sys* system = new Sys();
    NetworkIP network;
    KVStore* kvs1 = new KVStore(1, 0, &network);
    StringDistributedArray* sda = new StringDistributedArray(kvs1);
    StringArray* sa = genStringArray();
    for(int i = 0; i < 10; i++) {
        sda->pushBack(sa->get(i));
    }
    char* serialized = sda->serialize();
    StringDistributedArray* sda2 = new StringDistributedArray(serialized, kvs1);
    String* s = new String(serialized);
    String* s2 = new String(sda2->serialize());
    system->t_true(s2->equals(s));
    for(int i = 0; i < 10; i++) {
        system->t_true(sda->get(i)->equals(sa->get(i)));
    }
    system->OK("Passed StringDistributedArray");
    delete sa;
    delete [] system;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl $0x1, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
callq 0xcd20
jmp 0xa3c9
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xc820
movl $0x118, %edi            # imm = 0x118
callq 0x7250
movq %rax, -0xb8(%rbp)
jmp 0xa3f0
movq -0xb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %esi
leaq -0x60(%rbp), %rcx
callq 0xc870
jmp 0xa40b
movq -0xb8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x70, %edi
callq 0x7250
movq %rax, -0xc0(%rbp)
jmp 0xa429
movq -0xc0(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x12500
jmp 0xa43b
movq -0xc0(%rbp), %rax
movq %rax, -0x70(%rbp)
callq 0x7770
movq %rax, -0xc8(%rbp)
jmp 0xa454
movq -0xc8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
cmpl $0xa, -0x7c(%rbp)
jge 0xa51b
movq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x78(%rbp), %rdi
movslq -0x7c(%rbp), %rsi
callq 0x126c0
movq %rax, -0xd0(%rbp)
jmp 0xa491
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdi
callq 0x12640
jmp 0xa4a6
jmp 0xa4a8
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0xa466
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa79e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xa795
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa795
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa795
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0xe0(%rbp)
jmp 0xa531
movq -0xe0(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x70, %edi
callq 0x7250
movq %rax, -0xe8(%rbp)
jmp 0xa552
movq -0xe8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x12720
jmp 0xa56b
movq -0xe8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0xf0(%rbp)
jmp 0xa58c
movq -0xf0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xcce0
jmp 0xa5a1
movq -0xf0(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, -0xf8(%rbp)
jmp 0xa5c2
movq -0x90(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x100(%rbp)
jmp 0xa5db
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdi
callq 0xcce0
jmp 0xa5f0
movq -0xf8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0x101(%rbp)
jmp 0xa628
movq -0x110(%rbp), %rdi
movb -0x101(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
jmp 0xa642
movl $0x0, -0xa4(%rbp)
cmpl $0xa, -0xa4(%rbp)
jge 0xa736
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x70(%rbp), %rdi
movslq -0xa4(%rbp), %rsi
callq 0x12e30
movq %rax, -0x118(%rbp)
jmp 0xa67d
movq -0x78(%rbp), %rdi
movslq -0xa4(%rbp), %rsi
callq 0x126c0
movq %rax, -0x128(%rbp)
jmp 0xa696
movq -0x128(%rbp), %rsi
movq -0x118(%rbp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0x129(%rbp)
jmp 0xa6b5
movq -0x120(%rbp), %rdi
movb -0x129(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
jmp 0xa6cf
jmp 0xa6d1
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xa64c
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa795
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa795
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0xa795
movq -0x8(%rbp), %rdi
leaq 0x24d0c(%rip), %rsi     # 0x2f44d
callq 0xcd70
jmp 0xa748
movq -0x78(%rbp), %rax
movq %rax, -0x138(%rbp)
cmpq $0x0, %rax
je 0xa766
movq -0x138(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
cmpq $0x0, %rax
je 0xa783
movq -0x140(%rbp), %rdi
callq 0x72b0
leaq -0x60(%rbp), %rdi
callq 0xcbe0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xcbe0
movq -0x10(%rbp), %rdi
callq 0x7370
nopw (%rax,%rax)