// File: /workspace/github_cpp_makefile_star2_O1/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 0x450e(%rip), %rbx      # 0x7fd0
leaq 0x1f9f(%rip), %rsi      # 0x5a68
movl $0x34, %edx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x44dc(%rip), %r14      # 0x7fe0
movl $0x74756873, %r13d      # imm = 0x74756873
leaq 0x1fb6(%rip), %r12      # 0x5ac7
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %r15
movl $0xa, %edx
movq %r14, %rdi
leaq -0x32(%rbp), %rsi
callq 0x22c0
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
jne 0x3b59
addq $-0xb, %r15
cmpq $-0xb, %r15
ja 0x3b59
movq 0xe8(%r14,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x3ba3
movl -0x32(%rbp), %eax
xorl %r13d, %eax
movzbl -0x2e(%rbp), %ecx
orl %eax, %ecx
je 0x3bc8
movl $0x17, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
jmp 0x3b11
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x3b59
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x2, %esi
callq 0x22a0
jmp 0x3b59
movq 0x4401(%rip), %rbx      # 0x7fd0
leaq 0x1ecc(%rip), %rsi      # 0x5aa2
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
movl $0x400, %edi            # imm = 0x400
callq 0x2230
movq %rax, %r14
movl $0x0, (%rax)
movl 0x1d689(%rip), %edi     # 0x21288
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x20e0
movq %r14, %rdi
callq 0x21f0
leaq 0x17d0(%rip), %rsi      # 0x53ed
movq %rbx, %rdi
callq 0x21b0
leaq 0x17fb(%rip), %rsi      # 0x5427
movq %rbx, %rdi
callq 0x21b0
leaq 0x1826(%rip), %rsi      # 0x5461
movq %rbx, %rdi
callq 0x21b0
leaq 0x1851(%rip), %r14      # 0x549b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
leaq 0x186b(%rip), %rsi      # 0x54d2
movq %rbx, %rdi
callq 0x21b0
leaq 0x1893(%rip), %rsi      # 0x5509
movq %rbx, %rdi
callq 0x21b0
leaq 0x18bb(%rip), %rsi      # 0x5540
movq %rbx, %rdi
callq 0x21b0
leaq 0x18e3(%rip), %rsi      # 0x5577
movq %rbx, %rdi
callq 0x21b0
leaq 0x190b(%rip), %rsi      # 0x55ae
movq %rbx, %rdi
callq 0x21b0
leaq 0x1914(%rip), %rsi      # 0x55c6
movq %rbx, %rdi
callq 0x21b0
leaq 0x191c(%rip), %rsi      # 0x55dd
movq %rbx, %rdi
callq 0x21b0
leaq 0x1928(%rip), %rsi      # 0x55f8
movq %rbx, %rdi
callq 0x21b0
leaq 0x1935(%rip), %rsi      # 0x5614
movq %rbx, %rdi
callq 0x21b0
leaq 0x1943(%rip), %rsi      # 0x5631
movq %rbx, %rdi
callq 0x21b0
leaq 0x1952(%rip), %rsi      # 0x564f
movq %rbx, %rdi
callq 0x21b0
leaq 0x1963(%rip), %rsi      # 0x566f
movq %rbx, %rdi
callq 0x21b0
leaq 0x1974(%rip), %rsi      # 0x568f
movq %rbx, %rdi
callq 0x21b0
leaq 0x1984(%rip), %rsi      # 0x56ae
movq %rbx, %rdi
callq 0x21b0
leaq 0x1992(%rip), %rsi      # 0x56cb
movq %rbx, %rdi
callq 0x21b0
leaq 0x19a0(%rip), %rsi      # 0x56e8
movq %rbx, %rdi
callq 0x21b0
leaq 0x19ae(%rip), %rsi      # 0x5705
movq %rbx, %rdi
callq 0x21b0
leaq 0x19b9(%rip), %rsi      # 0x571f
movq %rbx, %rdi
callq 0x21b0
leaq 0x19db(%rip), %rsi      # 0x5750
movq %rbx, %rdi
callq 0x21b0
xorl %edi, %edi
callq 0x2200