// File: yasz24[P]eau2/tests/testSerialize.cpp
// Function: testDirectorySerialization()
void testDirectorySerialization() {
    Sys* tester = new Sys();
    size_t ports[5] = {1,2,4,5};
    String* sa = new String("mama mia");
    String* sb = new String("here we");
    String* sc = new String("go");
    String* sd = new String("again");
    String* strings[4] = {sa,sb,sc,sd};
    Directory* d = new Directory(0, 1, 1, 4, ports, strings);
    char* d_serialized = d->serialize();
    Directory* d_two = new Directory(d_serialized);
    char* d_serialized_two = d_two->serialize();
    tester->t_true(strcmp(d_serialized, d_two->serialize()) == 0);
    tester->OK("Passed Directory Serialization Tests!");
    delete tester;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x1, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
callq 0xcd20
jmp 0x9869
movq -0xa8(%rbp), %rax
movq %rax, -0x8(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x1, -0x40(%rbp)
movq $0x2, -0x38(%rbp)
movq $0x4, -0x30(%rbp)
movq $0x5, -0x28(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
leaq 0x25adc(%rip), %rsi     # 0x2f3a1
callq 0xcce0
jmp 0x98cc
movq -0xb0(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x25ab5(%rip), %rsi     # 0x2f3aa
callq 0xcce0
jmp 0x98fc
movq -0xb8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
leaq 0x25a8d(%rip), %rsi     # 0x2f3b2
callq 0xcce0
jmp 0x992c
movq -0xc0(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x20, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
leaq 0x25a60(%rip), %rsi     # 0x2f3b5
callq 0xcce0
jmp 0x995c
movq -0xc8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x48, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq %rsp, %rax
leaq -0x80(%rbp), %rcx
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
movl $0x4, %r8d
leaq -0x40(%rbp), %r9
movq %rcx, %rdx
callq 0x10bf0
jmp 0x99c5
movq -0xd0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq %rax, -0x90(%rbp)
movl $0x48, %edi
callq 0x7250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq -0x90(%rbp), %rsi
callq 0x10d70
jmp 0x9a0f
movq -0xd8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x98(%rbp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x72d0
movq -0xe8(%rbp), %rdi
cmpl $0x0, %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xcd30
movq -0x8(%rbp), %rdi
leaq 0x25932(%rip), %rsi     # 0x2f3bb
callq 0xcd70
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, %rax
je 0x9aab
movq -0xe0(%rbp), %rdi
callq 0x7220
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
jmp 0x9b6e
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7220
movq -0x10(%rbp), %rdi
callq 0x7370
nopw (%rax,%rax)