// File: /workspace/github_cpp_makefile_star2_O2/supragya[P]DirectorySync/DirectorySync.cpp
// Function: closeallsystems()
void closeallsystems(){
    std::cout<<"NOTICE: You can shutdown the system by typing <shut>"<<std::endl;
    char input[10];
    while(1) {
        std::cin >> input;
        if(strcmp(input, "shut") == 0){
            std::cout<<"****Shutting down DirectorySync*****"<<std::endl;
            message* closerequest = (message*)malloc(sizeof(message));
            closerequest->valid = 0;
            int sent = send(FCsock, closerequest, sizeof(message), 0);
            free(closerequest);
            std::cout<<        "                                 +---------------------+\n";
            std::cout<<        "                                 | I am in sync. Yes   |\n";
            std::cout<<        "                                 +------------------+--+\n";
            std::cout<<        "                                                    |\n";
            std::cout<<        "                                                    |\n";
            std::cout<<        "  _                                                 |\n";
            std::cout<<        "  \\\\                                                |\n";
            std::cout<<        "   \\\\_          _.-._                               |\n";
            std::cout<<        "    X:\\        (_/ \\_)     <------------------------+\n";
            std::cout<<        "    \\::\\       ( ==  )\n";
            std::cout<<        "     \\::\\       \\== /\n";
            std::cout<<        "    /X:::\\   .-./`-'\\.--.\n";
            std::cout<<        "    \\\\/\\::\\ / /     (    l\n";
            std::cout<<        "     ~\\ \\::\\ /      `.   L.\n";
            std::cout<<        "       \\/:::|         `.'  `\n";
            std::cout<<        "       /:/\\:|          (    `.\n";
            std::cout<<        "       \\/`-'`.          >    )\n";
            std::cout<<        "              \\       //  .-'\n";
            std::cout<<        "               |     /(  .'\n";
            std::cout<<        "               `-..-'_ \\  \\\n";
            std::cout<<        "               __||/_ \\ `-'\n";
            std::cout<<        "              / _ \\ #  |\n";
            std::cout<<        "             |  #  |#  |   B-SD3 Security Droid\n";
            std::cout<<        "          LS |  #  |#  |      - Front View -\n";
            exit(0);
        }
        else{
            std::cout<<"(To close, type \"shut\")"<<std::endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x3c06(%rip), %rdi      # 0x6fd0
leaq 0x167b(%rip), %rsi      # 0x4a4c
callq 0x2180
movq %rax, %rdi
callq 0x20c0
movq 0x3bfb(%rip), %r14      # 0x6fe0
leaq -0x32(%rbp), %r15
leaq 0x1691(%rip), %r12      # 0x4a81
pushq $0x5
popq %r13
leaq 0x16b0(%rip), %rbx      # 0x4aab
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a75
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21a0
testl %eax, %eax
je 0x3431
movq 0x3bb1(%rip), %rdi      # 0x6fd0
movq %rbx, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
jmp 0x33fb
movq 0x3b98(%rip), %rbx      # 0x6fd0
leaq 0x1647(%rip), %rsi      # 0x4a86
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
movl $0x400, %edi            # imm = 0x400
callq 0x2200
movq %rax, %r14
andl $0x0, (%rax)
movl 0x1ce03(%rip), %edi     # 0x20268
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x20d0
movq %r14, %rdi
callq 0x21c0
leaq 0xf4e(%rip), %rsi       # 0x43d1
movq %rbx, %rdi
callq 0x2180
leaq 0xf79(%rip), %rsi       # 0x440b
movq %rbx, %rdi
callq 0x2180
leaq 0xfa4(%rip), %rsi       # 0x4445
movq %rbx, %rdi
callq 0x2180
leaq 0xfcf(%rip), %r14       # 0x447f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
leaq 0xfe9(%rip), %rsi       # 0x44b6
movq %rbx, %rdi
callq 0x2180
leaq 0x1011(%rip), %rsi      # 0x44ed
movq %rbx, %rdi
callq 0x2180
leaq 0x1039(%rip), %rsi      # 0x4524
movq %rbx, %rdi
callq 0x2180
leaq 0x1061(%rip), %rsi      # 0x455b
movq %rbx, %rdi
callq 0x2180
leaq 0x1089(%rip), %rsi      # 0x4592
movq %rbx, %rdi
callq 0x2180
leaq 0x1092(%rip), %rsi      # 0x45aa
movq %rbx, %rdi
callq 0x2180
leaq 0x109a(%rip), %rsi      # 0x45c1
movq %rbx, %rdi
callq 0x2180
leaq 0x10a6(%rip), %rsi      # 0x45dc
movq %rbx, %rdi
callq 0x2180
leaq 0x10b3(%rip), %rsi      # 0x45f8
movq %rbx, %rdi
callq 0x2180
leaq 0x10c1(%rip), %rsi      # 0x4615
movq %rbx, %rdi
callq 0x2180
leaq 0x10d0(%rip), %rsi      # 0x4633
movq %rbx, %rdi
callq 0x2180
leaq 0x10e1(%rip), %rsi      # 0x4653
movq %rbx, %rdi
callq 0x2180
leaq 0x10f2(%rip), %rsi      # 0x4673
movq %rbx, %rdi
callq 0x2180
leaq 0x1102(%rip), %rsi      # 0x4692
movq %rbx, %rdi
callq 0x2180
leaq 0x1110(%rip), %rsi      # 0x46af
movq %rbx, %rdi
callq 0x2180
leaq 0x111e(%rip), %rsi      # 0x46cc
movq %rbx, %rdi
callq 0x2180
leaq 0x112c(%rip), %rsi      # 0x46e9
movq %rbx, %rdi
callq 0x2180
leaq 0x1137(%rip), %rsi      # 0x4703
movq %rbx, %rdi
callq 0x2180
leaq 0x1159(%rip), %rsi      # 0x4734
movq %rbx, %rdi
callq 0x2180
xorl %edi, %edi
callq 0x21d0