// File: /workspace/github_cpp_makefile_star2_O1/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 0x4483
movl $0xd, %edx
leaq 0x3db3(%rip), %rsi      # 0x819b
movq 0x7be1(%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 0x7bbb(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
xorl %r14d, %r14d
movq 0x7b9c(%rip), %rsi      # 0xbfc8
leaq -0x210(%rbp), %rdi
callq 0x22f0
leaq -0x198(%rbp), %rdi
callq 0x20e0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x4459
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x446e
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 0x3d1f(%rip), %rsi      # 0x81a9
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x44f0
leaq 0x3d19(%rip), %rsi      # 0x81b7
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x45c0
leaq 0x3d0d(%rip), %rsi      # 0x81c3
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x463b
leaq 0x3d06(%rip), %rsi      # 0x81d4
leaq -0x50(%rbp), %rdi
callq 0x20c0
testl %eax, %eax
je 0x469b
movl $0x5, %edx
leaq 0x3d01(%rip), %rsi      # 0x81ec
jmp 0x43e8
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 0x4567
movq 0x7aa8(%rip), %r14      # 0xbfd0
leaq 0x3c6c(%rip), %rsi      # 0x819b
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 0x7a76(%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 0x37b2
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x38c0
movq -0x90(%rbp), %rdi
xorl %r14d, %r14d
cmpq %r13, %rdi
je 0x4425
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x4425
leaq -0x210(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2180
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f0(%rbp,%rax)
je 0x462b
movq 0x79e4(%rip), %r14      # 0xbfd0
leaq 0x3ba8(%rip), %rsi      # 0x819b
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 0x79b2(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl -0x2c(%rbp), %esi
movq %rbx, %rdi
callq 0x3a2e
jmp 0x4422
movq 0x798e(%rip), %r14      # 0xbfd0
leaq 0x3b7f(%rip), %rsi      # 0x81c8
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 0x795c(%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 0x4425
movq 0x792e(%rip), %r14      # 0xbfd0
leaq 0x3b34(%rip), %rsi      # 0x81dd
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 0x78fc(%rip), %rdi      # 0xbfd0
callq 0x2030
movq %rax, %rdi
callq 0x2190
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x433c
jmp 0x4425
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x4719
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x4719
movq %rax, %rbx
jmp 0x4738
movq %rax, %rbx
movq 0x78a8(%rip), %rsi      # 0xbfc8
leaq -0x210(%rbp), %rdi
callq 0x22f0
leaq -0x198(%rbp), %rdi
callq 0x20e0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x474d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x4762
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop