// File: sun98[P]Mini-DFS/mdfs.cpp
// Function: main
int main()
{
    NameServer ns(total_copy);
    DataServer ds1("data_node_1");
    DataServer ds2("data_node_2");
    DataServer ds3("data_node_3");
    DataServer ds4("data_node_4");

    ns.add(&ds1);
    ns.add(&ds2);
    ns.add(&ds3);
    ns.add(&ds4);

    std::thread th1(std::ref(ds1));
    std::thread th2(std::ref(ds2));
    std::thread th3(std::ref(ds3));
    std::thread th4(std::ref(ds4));

    th1.detach();
    th2.detach();
    th3.detach();
    th4.detach();

    ns();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movl $0x0, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x4, %esi
callq 0x9cf0
leaq -0x141(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x3570
movq -0x458(%rbp), %rdx
leaq 0x751a(%rip), %rsi      # 0x1015b
leaq -0x140(%rbp), %rdi
callq 0x3400
jmp 0x8c4f
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x3810
jmp 0x8c64
leaq -0x140(%rbp), %rdi
callq 0x3210
leaq -0x141(%rbp), %rdi
callq 0x3340
leaq -0x239(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x3570
movq -0x460(%rbp), %rdx
leaq 0x74ca(%rip), %rsi      # 0x10167
leaq -0x238(%rbp), %rdi
callq 0x3400
jmp 0x8cab
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x3810
jmp 0x8cc0
leaq -0x238(%rbp), %rdi
callq 0x3210
leaq -0x239(%rbp), %rdi
callq 0x3340
leaq -0x321(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x3570
movq -0x468(%rbp), %rdx
leaq 0x747a(%rip), %rsi      # 0x10173
leaq -0x320(%rbp), %rdi
callq 0x3400
jmp 0x8d07
leaq -0x300(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x3810
jmp 0x8d1c
leaq -0x320(%rbp), %rdi
callq 0x3210
leaq -0x321(%rbp), %rdi
callq 0x3340
leaq -0x409(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x3570
movq -0x470(%rbp), %rdx
leaq 0x742a(%rip), %rsi      # 0x1017f
leaq -0x408(%rbp), %rdi
callq 0x3400
jmp 0x8d63
leaq -0x3e8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0x3810
jmp 0x8d78
leaq -0x408(%rbp), %rdi
callq 0x3210
leaq -0x409(%rbp), %rdi
callq 0x3340
leaq -0x60(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x9d60
jmp 0x8da2
leaq -0x60(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x9d60
jmp 0x8db4
leaq -0x60(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x9d60
jmp 0x8dc6
leaq -0x60(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x9d60
jmp 0x8dd8
leaq -0x120(%rbp), %rdi
callq 0x9120
movq %rax, -0x420(%rbp)
leaq -0x418(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x9150
jmp 0x8e00
leaq -0x218(%rbp), %rdi
callq 0x9120
movq %rax, -0x430(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x9150
jmp 0x8e28
leaq -0x300(%rbp), %rdi
callq 0x9120
movq %rax, -0x440(%rbp)
leaq -0x438(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x9150
jmp 0x8e50
leaq -0x3e8(%rbp), %rdi
callq 0x9120
movq %rax, -0x450(%rbp)
leaq -0x448(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x9150
jmp 0x8e78
leaq -0x418(%rbp), %rdi
callq 0x3550
jmp 0x8e86
leaq -0x428(%rbp), %rdi
callq 0x3550
jmp 0x8e94
leaq -0x438(%rbp), %rdi
callq 0x3550
jmp 0x8ea2
leaq -0x448(%rbp), %rdi
callq 0x3550
jmp 0x8eb0
leaq -0x60(%rbp), %rdi
callq 0x9f30
jmp 0x8ebb
movl $0x0, -0x4(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x9200
leaq -0x438(%rbp), %rdi
callq 0x9200
leaq -0x428(%rbp), %rdi
callq 0x9200
leaq -0x418(%rbp), %rdi
callq 0x9200
leaq -0x3e8(%rbp), %rdi
callq 0x9230
leaq -0x300(%rbp), %rdi
callq 0x9230
leaq -0x218(%rbp), %rdi
callq 0x9230
leaq -0x120(%rbp), %rdi
callq 0x9230
leaq -0x60(%rbp), %rdi
callq 0x9270
movl -0x4(%rbp), %eax
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8f69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x3210
leaq -0x141(%rbp), %rdi
callq 0x3340
jmp 0x9105
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8fac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x3210
leaq -0x239(%rbp), %rdi
callq 0x3340
jmp 0x90f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8fef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x3210
leaq -0x321(%rbp), %rdi
callq 0x3340
jmp 0x90ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x9032
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x3210
leaq -0x409(%rbp), %rdi
callq 0x3340
jmp 0x90e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x90d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x90c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x90bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x90b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x9200
leaq -0x438(%rbp), %rdi
callq 0x9200
leaq -0x428(%rbp), %rdi
callq 0x9200
leaq -0x418(%rbp), %rdi
callq 0x9200
leaq -0x3e8(%rbp), %rdi
callq 0x9230
leaq -0x300(%rbp), %rdi
callq 0x9230
leaq -0x218(%rbp), %rdi
callq 0x9230
leaq -0x120(%rbp), %rdi
callq 0x9230
leaq -0x60(%rbp), %rdi
callq 0x9270
movq -0x150(%rbp), %rdi
callq 0x3560
nopw (%rax,%rax)