// File: billDrett[P]Bulletin-Boards/boardClient.cpp
// Function: BoardClient::createChanel(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void BoardClient::createChanel(int Id, std::string Name)
{
    int nwrite;
    char convert[24];
    string buff;

    if((nwrite = write(pipeClient2Server, "<Chanel>", 8))== -1) //stelnoume ta tags gia to ksekinima tou aitimatos
    {
        perror("Cant write to pipe C2S");
    }

    if((nwrite = write(pipeClient2Server, "<start>", 7))== -1)
    {
        perror("Cant write to pipe C2S");
    }

    sprintf(convert, "%d ", Id);
    buff.append(convert);
    buff.append(Name.c_str());
    if((nwrite = write(pipeClient2Server, buff.c_str(), buff.size()))== -1) //stelnw to id kai to onoma tou chanel
    {
        perror("Cant write to pipe C2S");
    }

    if((nwrite = write(pipeClient2Server, "<end>", 5))== -1)
    {
        perror("Cant write to pipe C2S");
    }

    if((nwrite = write(pipeClient2Server, "<Chanel>", 8))== -1) //telos tou aitimatos
    {
        perror("Cant write to pipe C2S");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdx, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x33e0
movq -0x80(%rbp), %rax
movl (%rax), %edi
leaq 0x6801(%rip), %rsi      # 0xb0ac
movl $0x8, %edx
callq 0x3110
movq %rax, -0x78(%rbp)
jmp 0x48bb
movq -0x78(%rbp), %rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x48f1
leaq 0x67e7(%rip), %rdi      # 0xb0b5
callq 0x3260
jmp 0x48d5
jmp 0x48f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x31f0
jmp 0x4a74
movq -0x80(%rbp), %rax
movl (%rax), %edi
leaq 0x67db(%rip), %rsi      # 0xb0d9
movl $0x7, %edx
callq 0x3110
movq %rax, -0x90(%rbp)
jmp 0x4911
movq -0x90(%rbp), %rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x4930
leaq 0x678e(%rip), %rdi      # 0xb0b5
callq 0x3260
jmp 0x492e
jmp 0x4930
movl -0xc(%rbp), %edx
leaq 0x6792(%rip), %rsi      # 0xb0cc
xorl %eax, %eax
leaq -0x40(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x30a0
movq -0x98(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3500
jmp 0x495e
movq -0x88(%rbp), %rdi
callq 0x3130
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x3500
jmp 0x4978
movq -0x80(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xac(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x3130
movq -0xb8(%rbp), %rdi
movq %rax, -0xa8(%rbp)
callq 0x3210
movl -0xac(%rbp), %edi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x3110
movq %rax, -0xa0(%rbp)
jmp 0x49c5
movq -0xa0(%rbp), %rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x49e4
leaq 0x66da(%rip), %rdi      # 0xb0b5
callq 0x3260
jmp 0x49e2
jmp 0x49e4
movq -0x80(%rbp), %rax
movl (%rax), %edi
leaq 0x6827(%rip), %rsi      # 0xb218
movl $0x5, %edx
callq 0x3110
movq %rax, -0xc0(%rbp)
jmp 0x4a04
movq -0xc0(%rbp), %rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x4a23
leaq 0x669b(%rip), %rdi      # 0xb0b5
callq 0x3260
jmp 0x4a21
jmp 0x4a23
movq -0x80(%rbp), %rax
movl (%rax), %edi
leaq 0x667c(%rip), %rsi      # 0xb0ac
movl $0x8, %edx
callq 0x3110
movq %rax, -0xc8(%rbp)
jmp 0x4a43
movq -0xc8(%rbp), %rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x4a62
leaq 0x665c(%rip), %rdi      # 0xb0b5
callq 0x3260
jmp 0x4a60
jmp 0x4a62
leaq -0x60(%rbp), %rdi
callq 0x31f0
addq $0xd0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x34b0
nopl (%rax)