// File: /workspace/github_cpp_makefile_star2_O2/billDrett[P]Bulletin-Boards/boardClient.cpp
// Function: BoardClient::menu(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int BoardClient::menu(string& line)
{
    string command, name;
    int id;
    istringstream iss(line);

    iss>> command;
    if(iss.fail())
    {
        cout<<"error command"<<endl;
        return 0;
    }
    if(command == "createchannel")
    {
        iss>> id>>name;
        if(!iss)
        {
            cout<<"error command"<<endl;
        }
        this->createChanel(id, name);
    }
    else if(command == "getmessages")
    {
        iss >>id;
        if(!iss)
        {
            cout<<"error command"<<endl;
        }
        this->getMessages(id);
    }
    else if(command == "exit")
    {
        cout<<"exit client"<<endl;
        this->exitClient();
        return -1;
    }
    else if(command == "shutdown")
    {
        cout<<"server shudown"<<endl;
        this->shutdownServer();
        return -1;
    }
    else //error
    {
        cout<<"error"<<endl;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, %rbx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0x1f8(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2360
leaq -0x1f8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x22b0
movq -0x1f8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1d8(%rbp,%rax)
je 0x3967
leaq 0x3849(%rip), %rsi      # 0x7197
movq 0x767b(%rip), %rdi      # 0xafd0
callq 0x2230
movq %rax, %rdi
callq 0x2170
jmp 0x3a51
leaq 0x3837(%rip), %rsi      # 0x71a5
leaq -0x38(%rbp), %rdi
callq 0x3b3f
testb %al, %al
je 0x39f2
leaq -0x1f8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x21a0
leaq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x22b0
movq -0x1f8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1d8(%rbp,%rax)
je 0x39c7
movq 0x761d(%rip), %rdi      # 0xafd0
leaq 0x37dd(%rip), %rsi      # 0x7197
callq 0x2230
movq %rax, %rdi
callq 0x2170
movl -0x14(%rbp), %r14d
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x22e0
leaq -0x78(%rbp), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3028
leaq -0x78(%rbp), %rdi
callq 0x2130
jmp 0x3a51
leaq 0x37ba(%rip), %rsi      # 0x71b3
leaq -0x38(%rbp), %rdi
callq 0x3b3f
testb %al, %al
je 0x3a7f
leaq -0x1f8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x21a0
movq -0x1f8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1d8(%rbp,%rax)
je 0x3a46
movq 0x759e(%rip), %rdi      # 0xafd0
leaq 0x375e(%rip), %rsi      # 0x7197
callq 0x2230
movq %rax, %rdi
callq 0x2170
movl -0x14(%rbp), %esi
movq %rbx, %rdi
callq 0x316a
xorl %ebx, %ebx
leaq -0x1f8(%rbp), %rdi
callq 0x2150
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x38(%rbp), %rdi
callq 0x2130
movl %ebx, %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3739(%rip), %rsi      # 0x71bf
leaq -0x38(%rbp), %rdi
callq 0x3b3f
testb %al, %al
je 0x3ab8
movq 0x7536(%rip), %rdi      # 0xafd0
leaq 0x3723(%rip), %rsi      # 0x71c4
callq 0x2230
movq %rax, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x389a
jmp 0x3aef
leaq 0x3711(%rip), %rsi      # 0x71d0
leaq -0x38(%rbp), %rdi
callq 0x3b3f
testb %al, %al
je 0x3af7
movq 0x74fd(%rip), %rdi      # 0xafd0
leaq 0x36ff(%rip), %rsi      # 0x71d9
callq 0x2230
movq %rax, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x38b8
pushq $-0x1
popq %rbx
jmp 0x3a53
leaq 0x36ea(%rip), %rsi      # 0x71e8
jmp 0x394e
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2130
jmp 0x3b19
movq %rax, %rbx
jmp 0x3b25
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
callq 0x2150
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x38(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2390