// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x210(%rbp), %rdi
movl $0x8, %edx
callq 0x2380
leaq -0x210(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x22c0
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f0(%rbp,%rax)
je 0x448d
movl $0xd, %edx
leaq 0x3dbd(%rip), %rsi      # 0x81af
movq 0x7bd7(%rip), %rbx      # 0xbfd0
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x7bb1(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
xorl %r14d, %r14d
movq 0x7b92(%rip), %rsi      # 0xbfc8
leaq -0x210(%rbp), %rdi
callq 0x22f0
leaq -0x198(%rbp), %rdi
callq 0x20e0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x4463
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x4478
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movl %r14d, %eax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d29(%rip), %rsi      # 0x81bd
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x44fa
leaq 0x3d23(%rip), %rsi      # 0x81cb
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x45ca
leaq 0x3d17(%rip), %rsi      # 0x81d7
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x4645
leaq 0x3d10(%rip), %rsi      # 0x81e8
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x46a5
movl $0x5, %edx
leaq 0x3d0b(%rip), %rsi      # 0x8200
jmp 0x43f2
leaq -0x210(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2180
leaq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x22c0
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f0(%rbp,%rax)
je 0x4571
movq 0x7a9e(%rip), %r14      # 0xbfd0
leaq 0x3c76(%rip), %rsi      # 0x81af
movl $0xd, %edx
movq %r14, %rdi
callq 0x2280
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x7a6c(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl -0x2c(%rbp), %r14d
leaq -0x80(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x37a4
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38b8
movq -0x90(%rbp), %rdi
xorl %r14d, %r14d
cmpq %r13, %rdi
je 0x442f
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x442f
leaq -0x210(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2180
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f0(%rbp,%rax)
je 0x4635
movq 0x79da(%rip), %r14      # 0xbfd0
leaq 0x3bb2(%rip), %rsi      # 0x81af
movl $0xd, %edx
movq %r14, %rdi
callq 0x2280
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x79a8(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl -0x2c(%rbp), %esi
movq %rbx, %rdi
callq 0x3a26
jmp 0x442c
movq 0x7984(%rip), %r14      # 0xbfd0
leaq 0x3b89(%rip), %rsi      # 0x81dc
movl $0xb, %edx
movq %r14, %rdi
callq 0x2280
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x7952(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl (%rbx), %edi
callq 0x2400
movl 0x4(%rbx), %edi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
callq 0x2400
jmp 0x442f
movq 0x7924(%rip), %r14      # 0xbfd0
leaq 0x3b3e(%rip), %rsi      # 0x81f1
movl $0xe, %edx
movq %r14, %rdi
callq 0x2280
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x78f2(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x4346
jmp 0x442f
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x4723
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x4723
movq %rax, %rbx
jmp 0x4742
movq %rax, %rbx
movq 0x789e(%rip), %rsi      # 0xbfc8
leaq -0x210(%rbp), %rdi
callq 0x22f0
leaq -0x198(%rbp), %rdi
callq 0x20e0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x4757
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x476c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0