// File: vianna274[P]dropbox/src/Server.cpp
// Function: Dropbox::Server::Server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
Server::Server(string ipLocal, string ipMain, vector<string> backups) : connectClientSocket(SERVER_PORT), listenToServersSocket(BACKUPS_PORT)
{
    this->isMain = false;
    this->ipLocal = ipLocal;
    this->ipMain = ipMain;
    this->backups = backups;
    this->usersIp = {};
    this->backupsSockets = {};
    this->status = STATUS_NOT_YET;
    this->talkToPrimary = new WrapperSocket(ipMain, BACKUPS_PORT);
    initializeUsers();
    initializePorts();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rsi, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movq %rcx, -0xa0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
callq 0x9900
leaq -0x21(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x3620
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0xccf5(%rip), %rsi      # 0x193f4
callq 0x3480
jmp 0xc706
leaq -0x21(%rbp), %rdi
callq 0x33e0
movq -0x98(%rbp), %rdi
addq $0x20, %rdi
callq 0x6890
movq -0x98(%rbp), %rdi
addq $0x48, %rdi
callq 0x6890
movq -0x98(%rbp), %rdi
addq $0x70, %rdi
callq 0x6890
movq -0x98(%rbp), %rdi
addq $0x98, %rdi
callq 0x6890
movq -0x98(%rbp), %rdi
addq $0xc0, %rdi
callq 0x6890
movq -0x98(%rbp), %rdi
addq $0xe8, %rdi
movq %rdi, -0xb8(%rbp)
movl $0xfa0, %esi            # imm = 0xFA0
callq 0x177a0
jmp 0xc786
movq -0x98(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
movq %rdi, -0xc0(%rbp)
movl $0x2328, %esi           # imm = 0x2328
callq 0x177a0
jmp 0xc7a7
movq -0x98(%rbp), %rdi
addq $0x958, %rdi            # imm = 0x958
movq %rdi, -0xf0(%rbp)
callq 0x11860
movq -0x98(%rbp), %rdi
addq $0x970, %rdi            # imm = 0x970
movq %rdi, -0xe8(%rbp)
callq 0x11880
movq -0x98(%rbp), %rdi
addq $0x988, %rdi            # imm = 0x988
movq %rdi, -0xe0(%rbp)
callq 0x11880
movq -0x98(%rbp), %rdi
addq $0x9a0, %rdi            # imm = 0x9A0
movq %rdi, -0xd8(%rbp)
callq 0x118a0
movq -0x98(%rbp), %rdi
addq $0x9b8, %rdi            # imm = 0x9B8
movq %rdi, -0xc8(%rbp)
callq 0x3490
movq -0x98(%rbp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
movq %rdi, -0xd0(%rbp)
callq 0x3490
movq -0x98(%rbp), %rax
movq -0xc8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movb $0x0, 0x9f8(%rax)
callq 0x3060
jmp 0xc866
movq -0xa8(%rbp), %rsi
movq -0x98(%rbp), %rdi
addq $0x9d8, %rdi            # imm = 0x9D8
callq 0x3060
jmp 0xc882
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdi
addq $0x970, %rdi            # imm = 0x970
callq 0x11ac0
jmp 0xc89e
leaq -0x48(%rbp), %rdi
callq 0x118c0
movq -0x98(%rbp), %rdi
addq $0x988, %rdi            # imm = 0x988
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x118e0
jmp 0xc8c4
leaq -0x58(%rbp), %rdi
callq 0x11930
movq -0x98(%rbp), %rdi
addq $0x9a0, %rdi            # imm = 0x9A0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x11950
jmp 0xc8ea
movq -0x98(%rbp), %rax
movl $0x1b, 0x180(%rax)
movl $0x48, %edi
callq 0x33b0
movq %rax, -0xf8(%rbp)
jmp 0xc90e
movq -0xa8(%rbp), %rsi
movb $0x1, -0x79(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3190
jmp 0xc924
movq -0xf8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x2328, %edx           # imm = 0x2328
callq 0x17690
jmp 0xc93b
movq -0x98(%rbp), %rax
movq -0xf8(%rbp), %rcx
movb $0x0, -0x79(%rbp)
movq %rcx, 0x178(%rax)
leaq -0x78(%rbp), %rdi
callq 0x3280
movq -0x98(%rbp), %rdi
callq 0xbfc0
jmp 0xc96b
movq -0x98(%rbp), %rdi
callq 0xc640
jmp 0xc979
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x33e0
jmp 0xca71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xca65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xca59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xca05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xc9ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3280
testb $0x1, -0x79(%rbp)
jne 0xc9f7
jmp 0xca03
movq -0xf8(%rbp), %rdi
callq 0x3370
jmp 0xca05
movq -0xd0(%rbp), %rdi
callq 0x3280
movq -0xc8(%rbp), %rdi
callq 0x3280
movq -0xd8(%rbp), %rdi
callq 0x119a0
movq -0xe0(%rbp), %rdi
callq 0x11a00
movq -0xe8(%rbp), %rdi
callq 0x11a00
movq -0xf0(%rbp), %rdi
callq 0x11a60
movq -0xc0(%rbp), %rdi
callq 0x17770
movq -0xb8(%rbp), %rdi
callq 0x17770
movq -0x90(%rbp), %rdi
callq 0x3280
movq -0x30(%rbp), %rdi
callq 0x3610
nopw (%rax,%rax)