LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardClient.cpp
// Function: BoardClient::BoardClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
BoardClient::BoardClient(std::string C2S, std::string S2C)
{
    if((pipeClient2Server = open(C2S.c_str(), O_WRONLY)) < 0)
    {
        perror("fifo C2S not found");
    }

    if((pipeServer2Client = open(S2C.c_str(), O_RDWR)) < 0) //isws kai O_NONBLOCK
    {
        perror("fifo S2C not found");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x21b0
movl %eax, (%rbx)
testl %eax, %eax
js 0x3881
movq (%r14), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x21b0
movl %eax, 0x4(%rbx)
testl %eax, %eax
js 0x388f
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x483c(%rip), %rdi      # 0x80c4
callq 0x21d0
jmp 0x3866
leaq 0x4841(%rip), %rdi      # 0x80d7
popq %rbx
popq %r14
popq %rbp
jmp 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movl (%rdi), %edi
leaq 0x47fa(%rip), %rsi      # 0x80ea
movl $0x8, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x39b7
movl (%rbx), %edi
leaq 0x480b(%rip), %rsi      # 0x8117
movl $0x7, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x39c8
leaq 0x47e4(%rip), %rsi      # 0x810a
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2080
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x23f0
movq (%r14), %rsi
leaq -0x48(%rbp), %rdi
callq 0x23f0
movl (%rbx), %edi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x20f0
cmpl $-0x1, %eax
je 0x39d9
movl (%rbx), %edi
leaq 0x48ea(%rip), %rsi      # 0x8256
movl $0x5, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x39ea
movl (%rbx), %edi
leaq 0x4766(%rip), %rsi      # 0x80ea
movl $0x8, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x39f8
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x39a8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4735(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x3903
leaq 0x4724(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x391f
leaq 0x4713(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x3963
leaq 0x4702(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x397b
leaq 0x46f4(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x3993
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3a1e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardClient.cpp
// Function: BoardClient::getMessages(int)
void BoardClient::getMessages(int Id)
{
    char convert[24];
    string buff;

    int nwrite;
    if((nwrite = write(pipeClient2Server, "<Message><start>", 16))== -1) //zhtaw apo to server ta messages kai arxeia
    {
        perror("Cant write to pipe C2S");
    }
    sprintf(convert, "%d", Id);
    buff = convert;
    if((nwrite = write(pipeClient2Server, buff.c_str(), buff.size()))== -1)
    {
        perror("Cant write to pipe C2S");
        cout<<nwrite<<endl;
    }

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

    this->readMessages(); //twra ta diavazw
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movl (%rdi), %edi
leaq 0x46b3(%rip), %rsi      # 0x810e
movl $0x10, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x3b05
leaq 0x46aa(%rip), %rsi      # 0x811f
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2080
leaq -0x48(%rbp), %r14
movq 0x8(%r14), %r12
movq %r15, %rdi
callq 0x2120
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x2360
movl (%rbx), %edi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x20f0
cmpl $-0x1, %eax
je 0x3b16
movl (%rbx), %edi
leaq 0x465c(%rip), %rsi      # 0x8122
movl $0xe, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x3b62
movq %rbx, %rdi
callq 0x3b94
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3af6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45e7(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x3a6e
leaq 0x45d6(%rip), %rdi      # 0x80f3
callq 0x21d0
movq 0x84a7(%rip), %rdi      # 0xbfd0
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x23a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2190
jmp 0x3abd
leaq 0x458a(%rip), %rdi      # 0x80f3
callq 0x21d0
jmp 0x3ad9
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3b8b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::~BoardServer()
BoardServer::~BoardServer()
{
    Chanel* tmp;

    tmp = chanels->deleteFirstNode();
    while(tmp != NULL)
    {
        delete tmp;
        tmp = chanels->deleteFirstNode();//diagrafoume ta stoixeia tis listas
    }
    delete chanels;
    this->shutDown();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x7330
movq %rax, %r14
testq %r14, %r14
je 0x48c8
movq %r14, %rdi
callq 0x77b6
movl $0x50, %esi
movq %r14, %rdi
callq 0x2230
movq 0x30(%rbx), %rdi
callq 0x7330
movq %rax, %r14
jmp 0x48a0
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x48d9
movq %r14, %rdi
callq 0x71b6
movl $0x18, %esi
movq %r14, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x491a
movq 0x10(%rbx), %rdi
addq $0x20, %rbx
cmpq %rbx, %rdi
je 0x490a
movq (%rbx), %rsi
incq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2230
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4911
movq %rax, %rdi
callq 0x650b
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::searchChanel(int)
Chanel* BoardServer::searchChanel(int Id)
{
    for(Node<Chanel>* i = chanels->get_begin(); i != NULL; i = i->get_next()) //vriskei to chanel me auto to ID
    {
        if(i->get_data()->get_id() == Id)
        {
            return i->get_data();
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq 0x30(%rdi), %rdi
callq 0x721e
testq %rax, %rax
je 0x4a08
movq %rax, %r14
movq %r14, %rdi
callq 0x760a
movq %rax, %rdi
callq 0x789c
movq %r14, %rdi
cmpl %ebx, %eax
je 0x4a0f
callq 0x7600
movq %rax, %r14
testq %rax, %rax
jne 0x49e4
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
popq %rbx
popq %r14
popq %rbp
jmp 0x760a
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::addMessageToChanel(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool BoardServer::addMessageToChanel(int Id, string message)
{
    Chanel* tmp = searchChanel(Id);
    if(tmp == NULL) return false; //dn yparxei chanel me auto to id

    tmp->addMessage(message);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
callq 0x49ca
movq %rax, %r14
testq %rax, %rax
je 0x4a3a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x791c
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::addFileToChanel(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
bool BoardServer::addFileToChanel(int Id, string* file)
{
    Chanel* tmp = searchChanel(Id);
    if(tmp == NULL) return false; //dn yparxei chanel me auto to id

    tmp->addFile(file);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
callq 0x49ca
movq %rax, %r14
testq %rax, %rax
je 0x4a68
movq %r14, %rdi
movq %rbx, %rsi
callq 0x790e
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::sendMsgAndFiles(int)
void BoardServer::sendMsgAndFiles(int Id)
{
    Chanel* tmp = searchChanel(Id);
    string buff;
    int nwrite;
    if(tmp == NULL) //an den ypaxei to kanali stelnw <NONE>
    {
        write(pipeServer2Client, "<NONE>", 6);
        return;
    }

    this->sendMesg(tmp); //stelnw message
    this->sendFiles(tmp); //stelnw arxeia
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x49ca
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
testq %rax, %rax
je 0x4d0b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4d60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e9e
jmp 0x4d1f
movl 0x4(%rbx), %edi
leaq 0x341c(%rip), %rsi      # 0x8131
movl $0x6, %edx
callq 0x20f0
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d34
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d57
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::sendMesg(Chanel*)
void BoardServer::sendMesg(Chanel* chanelId)
{
    char buff[BUFFERSIZE];
    int file;
    int nread, nwrite;

    file=open(chanelId->get_messagesFile().c_str(), O_RDONLY, 0644);

    if((nwrite = write(pipeServer2Client, "<Message><start>", 16))== -1) //arxh message
    {
        perror("Cant write to pipe S2C");
    }

    while((nread = read(file, buff, BUFFERSIZE)) > 0) //diavazw apo to arxeio kai stelnw to message
    {
        if(write(pipeServer2Client, buff, nread) == -1)
        {
            perror("Cant write to pipe S2C");
        }
    }

    if((nwrite = write(pipeServer2Client, "<end><Message>", 14))== -1) //telos message
    {
        perror("Cant write to pipe S2C");
    }
    close(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rdi, %r14
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x78d2
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x21b0
movl %eax, %ebx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4dad
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2230
movl 0x4(%r14), %edi
leaq 0x3356(%rip), %rsi      # 0x810e
movl $0x10, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x4e5a
leaq -0x440(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
callq 0x2300
testl %eax, %eax
jle 0x4e29
leaq -0x440(%rbp), %r15
leaq 0x3444(%rip), %r12      # 0x8234
movl 0x4(%r14), %edi
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %r15, %rsi
movq %rax, %rdx
callq 0x20f0
cmpq $-0x1, %rax
je 0x4e1f
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r15, %rsi
callq 0x2300
testl %eax, %eax
jg 0x4df0
jmp 0x4e29
movq %r12, %rdi
callq 0x21d0
jmp 0x4e0a
movl 0x4(%r14), %edi
leaq 0x32ee(%rip), %rsi      # 0x8122
movl $0xe, %edx
callq 0x20f0
cmpl $-0x1, %eax
je 0x4e6b
movl %ebx, %edi
callq 0x2400
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33d3(%rip), %rdi      # 0x8234
callq 0x21d0
jmp 0x4dcb
leaq 0x33c2(%rip), %rdi      # 0x8234
callq 0x21d0
jmp 0x4e43
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e95
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::parser()
void BoardServer::parser()
{
    fd_set set_read, set_copy;
    int maxfd = 0;

    FD_ZERO(&set_read);
    FD_SET(pipeClient2Server, &set_read);
    FD_SET(pipeBoardPost2Server, &set_read);

    if(pipeClient2Server > pipeBoardPost2Server) maxfd = pipeClient2Server;
    else maxfd = pipeBoardPost2Server;

    while(1)
    {
        set_copy = set_read;
        select(maxfd + 1, &set_copy, NULL, NULL, NULL);
        if(FD_ISSET(pipeClient2Server, &set_copy)) //otan einai etoimo diavazw apo to pipe client to server
        {
            if(this->readFromC2S() == false)
            {
                return;
            }
        }
        if(FD_ISSET(pipeBoardPost2Server, &set_copy)) //otan einai etoimo diavazw apo to pipe boardPost to server
        {
            this->readFromBp2S();
        }

    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x70(%r14)
movl (%rdi), %eax
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %eax, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
movl $0x1, %edi
sarl $0x6, %edx
movslq %edx, %rcx
orq %rsi, -0xa0(%rbp,%rcx,8)
movl 0x8(%rbx), %r15d
leal 0x3f(%r15), %edx
testl %r15d, %r15d
cmovnsl %r15d, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %r15d, %ecx
subl %esi, %ecx
shlq %cl, %rdi
sarl $0x6, %edx
movslq %edx, %rcx
orq %rdi, -0xa0(%rbp,%rcx,8)
cmpl %r15d, %eax
cmovgl %eax, %r15d
incl %r15d
leaq -0x120(%rbp), %r12
movl $0x10, %ecx
movq %r12, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %r15d, %edi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2200
movl (%rbx), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq -0x120(%rbp,%rcx,8), %rcx
btq %rax, %rcx
jae 0x5231
movq %rbx, %rdi
callq 0x526a
testb %al, %al
je 0x525a
movl 0x8(%rbx), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq -0x120(%rbp,%rcx,8), %rcx
btq %rax, %rcx
jae 0x51e7
movq %rbx, %rdi
callq 0x5618
jmp 0x51e7
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::nextState(char*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int BoardServer::nextState(char* buff, int nread, std::string str1, std::string str2, std::string str3, std::string& commandRest) //mporei na exw panw apo mia entolh sto idio read 'h na min exw kamia
{                                                                                                                                 // prepei na parw thn prwth pou tha sinantisw
    char* tmp1 = findSubstring(buff, str1.c_str(), nread);
    char* tmp2 = findSubstring(buff, str2.c_str(), nread);
    char* tmp3 = findSubstring(buff, str3.c_str(), nread);


    if(tmp1 == NULL)tmp1 = buff + nread; //vazw thn megaliteri thmi se periptwsh poun dn yparxei
    if(tmp2 == NULL)tmp2 = buff + nread;
    if(tmp3 == NULL)tmp3 = buff + nread;

    if(tmp1 > tmp2) //prepei na parw thn pio mikri timh
    {
        if(tmp2 > tmp3) return 3;
        else return 2;
    }
    else //tmp1 <= tmp2
    {
        if(tmp1> tmp3) return 3;
        else //tmp1 <= tmp2 and tmp1 <=tmp3
        {
            if(tmp1 == (buff + nread)) //mporei na einai ola isa tote dn yparxei kanena
            {
                if((tmp1 = getAfterTag(buff, "<", nread)) != NULL) //apothikeuw meros tou string
                {
                    commandRest.assign(tmp1-1, nread+1); // -1 giati thelw na krathsw kai to "< kai +1 sto read gia na to symperilavw
                }

                return -1;
            }
            return 1;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r12
movl %edx, %r13d
movq %rsi, %rbx
movl %edx, -0x2c(%rbp)
movq (%rcx), %rsi
movq %rbx, %rdi
callq 0x65b8
movq %rax, %r15
movq (%r12), %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x65b8
movq %rax, %r12
movq (%r14), %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x65b8
movslq %r13d, %rcx
addq %rbx, %rcx
testq %r15, %r15
cmoveq %rcx, %r15
testq %r12, %r12
cmoveq %rcx, %r12
testq %rax, %rax
cmoveq %rcx, %rax
cmpq %r12, %r15
jbe 0x5aab
xorl %r14d, %r14d
cmpq %r12, %rax
adcl $0x2, %r14d
jmp 0x5afb
movl $0x3, %r14d
cmpq %rax, %r15
ja 0x5afb
movl $0x1, %r14d
cmpq %rcx, %r15
jne 0x5afb
leaq 0x2689(%rip), %rsi      # 0x8151
leaq -0x2c(%rbp), %rdx
movq %rbx, %rdi
callq 0x6616
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5afb
movq 0x10(%rbp), %rdi
decq %rax
movslq -0x2c(%rbp), %r8
incq %r8
movq 0x8(%rdi), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0x2360
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::parseAddChanel(char*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void BoardServer::parseAddChanel(char* buffer, int nread, int state, std::string& previousRead) //prosthetw to kanali sthn lista
{
    string  name;
    int id;
    Chanel* ch;

    previousRead.append(buffer, nread); //prosthetw dedomena mporei na xreiastei panw apo ena loop
    if(state == waitingEndCommand)
    {
        istringstream iss(previousRead);
        iss>>id >> name;
        if(iss.fail())
        {
            perror("error detail of chanel");
        }
        else
        {
            Chanel* ch = new Chanel(id, name);
            this->addChanel(ch);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %r8, %r14
movl %ecx, %r15d
movq %rdi, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movslq %edx, %rdx
movq %r8, %rdi
callq 0x2060
cmpl $0x3, %r15d
jne 0x5c1b
leaq -0x1f0(%rbp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2380
leaq -0x1f0(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2180
leaq -0x50(%rbp), %rsi
movq %rax, %rdi
callq 0x22c0
movq -0x1f0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1d0(%rbp,%rax)
jne 0x5c42
movl $0x50, %edi
callq 0x2220
movq %rax, %r14
movl -0x2c(%rbp), %r15d
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %rdi
callq 0x37a4
leaq -0x70(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x762c
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x5bf1
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x497c
movq 0x63c5(%rip), %rsi      # 0xbfc8
leaq -0x1f0(%rbp), %rdi
callq 0x22f0
leaq -0x178(%rbp), %rdi
callq 0x20e0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x5c30
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2631(%rip), %rdi      # 0x827a
callq 0x21d0
jmp 0x5bfc
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x5c6d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5c6d
movq %rax, %rbx
movl $0x50, %esi
movq %r14, %rdi
callq 0x2230
jmp 0x5c83
jmp 0x5ca4
jmp 0x5c80
movq %rax, %rbx
movq 0x633e(%rip), %rsi      # 0xbfc8
leaq -0x1f0(%rbp), %rdi
callq 0x22f0
leaq -0x178(%rbp), %rdi
callq 0x20e0
jmp 0x5ca7
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x5cbc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::parseSendMessage(char*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void BoardServer::parseSendMessage(char* buffer, int nread, int state, std::string& previousRead) //diavazei apo poio kanali thelei na lavei ta messages o client
{
    int id;

    previousRead.append(buffer, nread);
    if(state == waitingEndCommand)
    {
        istringstream iss(previousRead);
        iss>>id;
        if(iss.fail())
        {
            perror("error detail of chanel");
        }
        else
        {
            this->sendMsgAndFiles(id); //stelnei ta messages tou chanel
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r8, %r14
movl %ecx, %r15d
movq %rdi, %rbx
movslq %edx, %rdx
movq %r8, %rdi
callq 0x2060
cmpl $0x3, %r15d
jne 0x600c
leaq -0x1a0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2380
leaq -0x1c(%rbp), %rsi
movq %r15, %rdi
callq 0x2180
movq -0x1a0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x180(%rbp,%rax)
jne 0x601a
movl -0x1c(%rbp), %esi
movq %rbx, %rdi
callq 0x4cc2
movq 0x5fd4(%rip), %rsi      # 0xbfc8
leaq -0x1a0(%rbp), %rdi
callq 0x22f0
leaq -0x128(%rbp), %rdi
callq 0x20e0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2259(%rip), %rdi      # 0x827a
callq 0x21d0
jmp 0x5fed
movq %rax, %rbx
movq 0x5f96(%rip), %rsi      # 0xbfc8
leaq -0x1a0(%rbp), %rdi
callq 0x22f0
leaq -0x128(%rbp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/boardServer.cpp
// Function: BoardServer::parseGetMessage(char*, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void BoardServer::parseGetMessage(char* buffer, int nread, int state, std::string& previousRead)
{
    char* chanel1;
    int id, chanelSize1, chanelSize2;

    previousRead.append(buffer, nread);

    if(state == waitingEndCommand)
    {
        string chanelString;
        chanelSize1 = previousRead.size();
        chanel1 = getAfterTag(previousRead.c_str(), "*", chanelSize1); //anamesa sta * * vrisketo to chanel sto opoio tha apothikeutei to message

        chanelSize2 = chanelSize1;
        getBeforeTag(chanel1, "*", chanelSize1);

        chanelString.assign(chanel1, chanelSize1);
        id = atoi(chanelString.c_str());
        chanel1 = getAfterTag(chanel1, "*", chanelSize2);
        previousRead.assign(chanel1, chanelSize2);
        this->addMessageToChanel(id, previousRead);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movl %ecx, %r15d
movq %rdi, %rbx
movslq %edx, %rdx
movq %r8, %rdi
callq 0x2060
cmpl $0x3, %r15d
jne 0x6176
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movl 0x8(%r14), %eax
leaq -0x30(%rbp), %rdx
movl %eax, (%rdx)
movq (%r14), %rdi
leaq 0x21e7(%rip), %rsi      # 0x8291
callq 0x6616
movq %rax, %r12
leaq -0x30(%rbp), %rdx
movl (%rdx), %eax
movl %eax, -0x2c(%rbp)
leaq 0x21cf(%rip), %rsi      # 0x8291
movq %r12, %rdi
callq 0x6674
movslq -0x30(%rbp), %r8
leaq -0x70(%rbp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
movq %r12, %rcx
callq 0x2360
movq -0x70(%rbp), %rdi
callq 0x2370
movl %eax, %r15d
leaq 0x219e(%rip), %rsi      # 0x8291
leaq -0x2c(%rbp), %rdx
movq %r12, %rdi
callq 0x6616
movslq -0x2c(%rbp), %r8
movq 0x8(%r14), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x2360
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x37a4
movq %rbx, %rdi
movl %r15d, %esi
callq 0x49ca
testq %rax, %rax
je 0x614c
leaq -0x50(%rbp), %rsi
movq %rax, %rdi
callq 0x791c
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x6161
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x6176
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x61a2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x61a2
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x61b7
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/stringFuctions.cpp
// Function: findSubstring(char const*, char const*, int)
char* findSubstring(const char* mainString, const char* substring, int mainLength) //epistrefei thn thesh pou vrisketai to subString sto mainString
{
    unsigned int j=0;
    for(int i =0; i < mainLength; i++)
    {
        if(mainString[i]==substring[j])
        {
            j++;
        }
        else
        {
            j = 0;
        }
        if(j == strlen(substring))
        {
            return ((char*)mainString+i-j+1); //to i exei timi thn thesh tou teleutaiou xarakthra tou substring, gia auto afairw to j pou einai to mhkos tou substring kai prosthetw 1 gia na parw thn arxh sto mainString
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testl %edx, %edx
jle 0x660a
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2120
movl %r12d, %edx
xorl %ecx, %ecx
xorl %esi, %esi
movb (%r14,%rcx), %dil
movl %esi, %r8d
incl %esi
cmpb (%r15,%r8), %dil
cmovnel %ebx, %esi
cmpq %rsi, %rax
je 0x6600
incq %rcx
cmpq %rcx, %rdx
jne 0x65e1
jmp 0x660a
subq %rax, %r14
leaq (%r14,%rcx), %rbx
incq %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/stringFuctions.cpp
// Function: fileNameExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void fileNameExists(string& fileN) //an yparxei to arxeio sto current directory tou prosthetei sto telos to _copy.
{
    int fp;
    while((fp=open(fileN.c_str(), O_RDONLY, 0644)) != -1)
    {
        int found = fileN.find(".");
        if(found ==string::npos) //an dn yparxei h teleia mpainei sto telos
        {
            found = fileN.size();
        }
        fileN.insert(found, "_copy"); //to _copy prepei na mpei prin thn teleia
        close(fp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %esi, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x21b0
cmpl $-0x1, %eax
je 0x6725
movl %eax, %r12d
leaq 0x19b8(%rip), %r14      # 0x8084
leaq 0x1c25(%rip), %r15      # 0x82f8
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x23b0
cmpl $-0x1, %eax
jne 0x66ee
movq 0x8(%rbx), %rax
movslq %eax, %rsi
movl $0x5, %r8d
movq %rbx, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x2270
movl %r12d, %edi
callq 0x2400
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x21b0
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x66d3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/List.cpp
// Function: List<int>::~List()
List<T>::~List()
{
    Node<T>* tmp = start;
    Node<T>* del;

    while(tmp != NULL)//diagrafoume enan enan tous komvous
    {
        del = tmp;
        tmp = tmp->get_next();
        listSize--;
        delete del;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x67a0
movq %rdi, %rbx
movq %r14, %rdi
callq 0x752e
movq %rax, %r15
decl (%rbx)
movq %r14, %rdi
callq 0x7528
movl $0x10, %esi
movq %r14, %rdi
callq 0x2230
movq %r15, %r14
testq %r15, %r15
jne 0x6776
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x650b
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/List.cpp
// Function: List<int>::insertEnd(int*)
void List<T>::insertEnd(T* account)
{
	Node<T>* node = new Node<T>(account);

	if(checkEmpty()) //an einai to monadiko stoixeio prepei na allaksw ton deikti start kai last
	{
	    start = node;
	    last = node;
	    listSize++;
		return;
	}
	//alliws eisodos sto telos ths listas
    last->set_next(node);
    node->set_next(NULL);
    last = node;
    listSize++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r15
movq %rsi, (%r15)
movl $0x10, %edi
callq 0x2220
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x7514
cmpl $0x0, (%rbx)
je 0x682d
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x7542
movq %r14, %rdi
xorl %esi, %esi
callq 0x7542
movq %r14, 0x10(%rbx)
movl (%rbx), %eax
incl %eax
jmp 0x683a
movq %r14, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl $0x1, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/List.cpp
// Function: List<int>::insertBeginning(int*)
void List<T>::insertBeginning(T* account)
{
	Node<T>* node = new Node<T>(account);

	if(checkEmpty()) //an einai to monadiko stoixeio prepei na allaksw ton deikti start kai last
	{
	    start = node;
	    last = node;
	    listSize++;
		return;
	}
	//alliws eisodos stin arxi
    node->set_next(start);
    start = node;
    listSize++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r15
movq %rsi, (%r15)
movl $0x10, %edi
callq 0x2220
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x7514
cmpl $0x0, (%rbx)
je 0x68a7
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x7542
movq %r14, 0x8(%rbx)
movl (%rbx), %eax
incl %eax
jmp 0x68b4
movq %r14, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl $0x1, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/List.cpp
// Function: List<int>::deleteLastNode()
T* List<T>::deleteLastNode()
{
    Node<T>* tmp = start;
    T* tmpAccount;
    if(checkEmpty())
    {
        return NULL;
    }

    if(listSize == 1) //an exei mono ena stoixeio tote prepei na allaksei kai o deiktis start
    {
        tmpAccount = start->get_data();
        delete start;
        start = NULL;
        last = NULL;
        listSize--;
        return tmpAccount;
    }

    while(tmp->get_next() != last) //pairnw to proteleutaio stoixeio
    {
        tmp = tmp->get_next();
    }
    tmpAccount = last->get_data();
    delete last;
    last = tmp;
    tmp->set_next(NULL);
    listSize--;
    return tmpAccount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0x6990
movq %rdi, %rbx
movq 0x8(%rdi), %r14
cmpl $0x1, %eax
jne 0x6995
leaq 0x8(%rbx), %r12
movq %r14, %rdi
callq 0x7538
movq %rax, %r15
movq (%r12), %r14
testq %r14, %r14
je 0x6979
movq %r14, %rdi
callq 0x7528
movl $0x10, %esi
movq %r14, %rdi
callq 0x2230
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
jmp 0x69ea
xorl %r15d, %r15d
jmp 0x69ec
movq %r14, %rdi
callq 0x752e
movq 0x10(%rbx), %rdi
cmpq %rdi, %rax
je 0x69b6
movq %r14, %rdi
callq 0x752e
movq %rax, %r14
movq %rax, %rdi
jmp 0x6998
callq 0x7538
movq %rax, %r15
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x69cf
movq %r12, %rdi
callq 0x7528
movl $0x10, %esi
movq %r12, %rdi
callq 0x2230
movq %r14, 0x10(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x7542
decl (%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/List.cpp
// Function: List<int>::deleteNode(Node<int>*)
T* List<T>::deleteNode(Node<T>* node) //diagrafei tou sigekrimenou node
{
    Node<T>* tmp = start;
    Node<T>* del = NULL;
    T* data = NULL;

    if(checkEmpty() == true)
    {
        return NULL;
    }

    if(start == node) // an einai o prwtos 'h o monadikos komvos
    {
        return this->deleteFirstNode();
    }

    if(last == node) //an o teleutaios
    {
        return this->deleteLastNode();
    }

    while(tmp->get_next() != node)
    {
        if(tmp->get_next() == NULL)
        {
            return NULL;
        }
        tmp = tmp->get_next();
    }
    del = tmp->get_next();
    tmp->set_next(del->get_next());

    data = del->get_data();
    listSize--;
    delete del;
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x6a4a
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %r14
cmpq %rsi, %r14
je 0x6a4e
cmpq %r15, 0x10(%rbx)
je 0x6aab
movq %r14, %rdi
callq 0x752e
movq %r14, %rdi
cmpq %r15, %rax
je 0x6a60
callq 0x752e
testq %rax, %rax
je 0x6a4a
movq %r14, %rdi
callq 0x752e
movq %rax, %r14
movq %rax, %rdi
jmp 0x6a23
xorl %eax, %eax
jmp 0x6aa0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x68da
callq 0x752e
movq %rax, %r15
movq %rax, %rdi
callq 0x752e
movq %r14, %rdi
movq %rax, %rsi
callq 0x7542
movq %r15, %rdi
callq 0x7538
movq %rax, %r14
decl (%rbx)
movq %r15, %rdi
callq 0x7528
movl $0x10, %esi
movq %r15, %rdi
callq 0x2230
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x693c
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/chanel.cpp
// Function: Chanel::Chanel(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Chanel::Chanel(int Id, string Name): id(Id)
{
    ofstream messageFile;
    char buffId[12];
    name = Name;
    files = new List<string>();

    sprintf(buffId, "%d", Id);
    messageFileName = "message_";
    messageFileName.append(buffId);
    messageFile.open(messageFileName.c_str()); //dimiourgoume to arxeio gia thn apothikeush twn mhnymatwn
    messageFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdx, %r13
movl %esi, %r12d
movq %rdi, %r15
movl %esi, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x38(%rdi), %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq -0x250(%rbp), %rdi
movq %rbx, -0x40(%rbp)
callq 0x2390
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2170
movl $0x18, %edi
callq 0x2220
movq %rax, %r13
movq %rax, %rdi
callq 0x6abe
movq %r13, 0x48(%r15)
leaq 0xa69(%rip), %rsi       # 0x811f
leaq -0x4c(%rbp), %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2080
movq 0x30(%r15), %rdx
leaq 0xc2f(%rip), %rcx       # 0x82fe
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x2360
leaq -0x4c(%rbp), %rsi
movq %r14, %rdi
callq 0x23f0
movq (%r14), %rsi
leaq -0x250(%rbp), %rdi
movl $0x10, %edx
callq 0x2050
leaq -0x250(%rbp), %rdi
callq 0x22e0
movq 0x48ae(%rip), %rax      # 0xbfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x248(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x250(%rbp,%rcx)
callq 0x21e0
leaq -0x158(%rbp), %rdi
callq 0x20e0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0x18, %esi
movq %r13, %rdi
callq 0x2230
jmp 0x776d
movq %rax, %r15
jmp 0x7779
movq %rax, %r15
leaq -0x250(%rbp), %rdi
callq 0x2330
movq (%r14), %rdi
cmpq -0x30(%rbp), %rdi
je 0x7791
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2230
movq -0x40(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x77ad
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2230
movq %r15, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/chanel.cpp
// Function: Chanel::removeAllFiles()
void Chanel::removeAllFiles()
{
    string* tmp;

    tmp = files->deleteFirstNode();
    while(tmp != NULL)
    {
        unlink(tmp->c_str());
        delete tmp;
        tmp = files->deleteFirstNode();//diagrafoume ta stoixeia tis listas
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x6c4c
testq %rax, %rax
je 0x7896
movq %rax, %r14
movq (%r14), %rdi
callq 0x2140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x7878
movq (%rax), %rsi
incq %rsi
callq 0x2230
movl $0x20, %esi
movq %r14, %rdi
callq 0x2230
movq 0x48(%rbx), %rdi
callq 0x6c4c
movq %rax, %r14
testq %rax, %rax
jne 0x7859
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/billDrett[P]Bulletin-Boards/chanel.cpp
// Function: Chanel::addMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Chanel::addMessage(string& message) //apothikeuoume to onoma sto telos tou arxeiou
{
    ofstream messageFile;
    messageFile.open(messageFileName.c_str(), std::ofstream::out | std::ofstream::app);
    if(!messageFile)
    {
        perror("chanel file cant open");
        exit(3);
    }

    messageFile << message;
    messageFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x218(%rbp), %r15
movq %r15, %rdi
callq 0x2390
movq 0x28(%r14), %rsi
movq %r15, %rdi
movl $0x11, %edx
callq 0x2050
movq -0x218(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f8(%rbp,%rax)
jne 0x79ca
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x218(%rbp), %rdi
callq 0x2280
leaq -0x218(%rbp), %rdi
callq 0x22e0
movq 0x4633(%rip), %rax      # 0xbfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x210(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x218(%rbp,%rcx)
callq 0x21e0
leaq -0x120(%rbp), %rdi
callq 0x20e0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24a8
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x2330
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: getch()
int getch() {
    char ret;
    if (kbchar == EOF) {
        if (read(STDIN_FILENO, &ret, 1) < 1) return EOF;
    } else {
        ret = kbchar;
        kbchar = EOF;
    }
    if (ret == 10) ret = 13;
    return ret;
}

// Assembly:
pushq %rax
movl 0x8e4d(%rip), %eax      # 0xa0d0
cmpl $-0x1, %eax
je 0x1294
movl $0xffffffff, 0x8e3e(%rip) # imm = 0xFFFFFFFF
jmp 0x12ae
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x1140
testq %rax, %rax
jle 0x12c0
movb 0x7(%rsp), %al
cmpb $0xa, %al
movzbl %al, %eax
movl $0xd, %ecx
cmovnel %eax, %ecx
movsbl %cl, %eax
popq %rcx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x12be
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: kbhit()
int kbhit() {
    if (kbchar != EOF) return 1;
    int f = fcntl(STDIN_FILENO, F_GETFL, 0);
    fcntl(STDIN_FILENO, F_SETFL, f | O_NONBLOCK);
    char ch;
    kbchar = read(STDIN_FILENO, &ch, 1) < 1 ? EOF : ch;
    fcntl(STDIN_FILENO, F_SETFL, f);
    return kbchar != EOF;
}

// Assembly:
movl $0x1, %eax
cmpl $-0x1, 0x8dfd(%rip)     # 0xa0d0
je 0x12d6
retq
pushq %r14
pushq %rbx
pushq %rax
xorl %edi, %edi
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1050
movl %eax, %ebx
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x1050
leaq 0x7(%rsp), %r14
movl $0x1, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x1140
testq %rax, %rax
movsbl (%r14), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovgl %eax, %ecx
movl %ecx, 0x8da5(%rip)      # 0xa0d0
xorl %edi, %edi
movl $0x4, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
cmpl $-0x1, 0x8d8c(%rip)     # 0xa0d0
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: inittty()
void inittty() {
    termios t;
    tcgetattr(STDIN_FILENO, &t);
    oldt = t;

    struct sigaction sa;
    memset(&sa, 0, sizeof (sa));
    sa.sa_handler = siginthandler;
    sigaction(SIGINT, &sa, NULL);
    atexit(resettty);

    t.c_lflag &= ~(ICANON | ECHO);
    tcsetattr(STDIN_FILENO, TCSANOW, &t);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
leaq 0x4(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x10c0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x2c(%rbx), %xmm3
movups %xmm0, 0x8dd7(%rip)     # 0xa170
movups %xmm1, 0x8de0(%rip)     # 0xa180
movups %xmm2, 0x8de9(%rip)     # 0xa190
movups %xmm3, 0x8dee(%rip)     # 0xa19c
leaq 0x48(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1040
leaq -0x7a(%rip), %rax       # 0x134f
movq %rax, -0x8(%r14)
leaq 0x40(%rsp), %rsi
movl $0x2, %edi
xorl %edx, %edx
callq 0x1100
leaq -0x8b(%rip), %rdi       # 0x135a
callq 0x6ac0
andb $-0xb, 0xc(%rbx)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1110
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: debug(_IO_FILE*, bool)
void
debug(FILE *f, bool h) {
    if (h) fprintf(f, " AX   BX   CX   DX   SP   BP   SI   DI    FLAGS    ES   SS   DS   CS   IP  dump\n");
    fprintf(f,
            "%04x %04x %04x %04x-%04x %04x %04x %04x %c%c%c%c%c%c%c%c%c %04x %04x %04x %04x:%04x %02x%02x\n",
            AX, BX, CX, DX, SP, BP, SI, DI,
            "-O"[OF], "-D"[DF], "-I"[IF], "-T"[TF], "-S"[SF], "-Z"[ZF], "-A"[AF], "-P"[PF], "-C"[CF],
            *ES, *SS, *DS, *CS, IP, CS[IP], CS[IP + 1]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testl %esi, %esi
je 0x1436
movq %rdi, %rbx
leaq 0x61df(%rip), %rdi      # 0x7600
movl $0x50, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1170
movq %rbx, %rdi
movzwl 0x128d83(%rip), %edx    # 0x12a1c0
movzwl 0x128d82(%rip), %ecx    # 0x12a1c6
movzwl 0x128d76(%rip), %r8d    # 0x12a1c2
movzbl 0x128dbd(%rip), %eax    # 0x12a210
leaq 0x6255(%rip), %rsi      # 0x76af
movsbl (%rax,%rsi), %eax
movq %rax, 0x60(%rsp)
movzbl 0x128da7(%rip), %eax    # 0x12a211
leaq 0x6241(%rip), %rsi      # 0x76b2
movsbl (%rax,%rsi), %eax
movq %rax, 0x58(%rsp)
movzbl 0x128d91(%rip), %eax    # 0x12a212
leaq 0x622d(%rip), %rsi      # 0x76b5
movsbl (%rax,%rsi), %eax
movq %rax, 0x50(%rsp)
movzbl 0x128d7b(%rip), %eax    # 0x12a213
leaq 0x6219(%rip), %rsi      # 0x76b8
movsbl (%rax,%rsi), %eax
movq %rax, 0x48(%rsp)
movzbl 0x128d65(%rip), %eax    # 0x12a214
leaq 0x6205(%rip), %rsi      # 0x76bb
movsbl (%rax,%rsi), %eax
movq %rax, 0x40(%rsp)
movzbl 0x128d4f(%rip), %eax    # 0x12a215
leaq 0x61f1(%rip), %rsi      # 0x76be
movsbl (%rax,%rsi), %eax
movq %rax, 0x30(%rsp)
movzbl 0x128d39(%rip), %eax    # 0x12a216
leaq 0x61dd(%rip), %rsi      # 0x76c1
movsbl (%rax,%rsi), %eax
movq %rax, 0x18(%rsp)
movzbl 0x128d23(%rip), %eax    # 0x12a217
leaq 0x61c9(%rip), %rsi      # 0x76c4
movsbl (%rax,%rsi), %eax
movq %rax, 0x8(%rsp)
movzbl 0x128d0d(%rip), %eax    # 0x12a218
leaq 0x61b5(%rip), %rsi      # 0x76c7
movsbl (%rax,%rsi), %r13d
movzwl 0x128c91(%rip), %r10d   # 0x12a1b0
movq 0x128e0a(%rip), %rax    # 0x12a330
movzbl (%rax,%r10), %r11d
movzbl 0x1(%rax,%r10), %r14d
movzwl 0x128c8b(%rip), %r9d    # 0x12a1c4
movzwl 0x128c88(%rip), %eax    # 0x12a1c8
movq %rax, 0x38(%rsp)
movzwl 0x128c7e(%rip), %eax    # 0x12a1ca
movq %rax, 0x28(%rsp)
movzwl 0x128c74(%rip), %eax    # 0x12a1cc
movq %rax, 0x20(%rsp)
movzwl 0x128c6a(%rip), %eax    # 0x12a1ce
movq %rax, 0x10(%rsp)
movzwl 0x128db8(%rip), %ebp    # 0x12a328
movzwl 0x128dd0(%rip), %r15d   # 0x12a348
movzwl 0x128dd8(%rip), %r12d   # 0x12a358
movzwl 0x128db1(%rip), %ebx    # 0x12a338
leaq 0x60c3(%rip), %rsi      # 0x7651
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
pushq %rbx
pushq %r12
pushq %r15
pushq %rbp
pushq %r13
pushq 0x48(%rsp)
pushq 0x60(%rsp)
pushq 0x80(%rsp)
pushq 0x98(%rsp)
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq 0xc8(%rsp)
pushq 0xd8(%rsp)
pushq 0x90(%rsp)
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq 0xd0(%rsp)
callq 0x1130
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: dump(_IO_FILE*, SReg*, unsigned short, int)
void dump(FILE *f, SReg *seg, uint16_t addr, int len) {
    fprintf(f, "org 0x%04x:0x%04x\n", seg->v, addr);
    for (int i = 0; i < len; ++i) {
        if (i & 7) {
            fprintf(f, ", ");
        } else {
            if (i > 0) fprintf(f, "\n");
            fprintf(f, "db ");
        }
        fprintf(f, "0x%02x", (*seg)[addr + i]);
    }
    fprintf(f, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x8(%rsi), %edx
leaq 0x60a6(%rip), %rsi      # 0x76ca
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1130
testl %ebp, %ebp
jle 0x16a7
movzwl %r15w, %r15d
movl %ebp, %ebp
leaq 0x60a5(%rip), %r12      # 0x76e4
xorl %r13d, %r13d
testb $0x7, %r13b
je 0x165b
movl $0x2, %esi
movl $0x1, %edx
leaq 0x6084(%rip), %rdi      # 0x76dd
jmp 0x167e
testq %r13, %r13
je 0x166d
movl $0xa, %edi
movq %rbx, %rsi
callq 0x10f0
movl $0x3, %esi
movl $0x1, %edx
leaq 0x6062(%rip), %rdi      # 0x76e0
movq %rbx, %rcx
callq 0x1170
movq (%r14), %rax
addq %r15, %rax
movzbl (%r13,%rax), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1130
incq %r13
cmpq %r13, %rbp
jne 0x1642
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
// File: /workspace/github_cpp_makefile_star2_O3/7shi[P]8086run/v1/main.cpp
// Function: error(char const*, ...)
void error(const char *fmt, ...) {
    IP = oldip;
    dump(stderr, &CS, IP - 0x18, 0x30);
    debug(stderr, true);
    va_list ap;
    va_start(ap, fmt);
    vfprintf(stderr, fmt, ap);
    va_end(ap);
    fputc('\n', stderr);
    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
testb %al, %al
je 0x170c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
movzwl 0x128a86(%rip), %eax    # 0x12a1b2
movw %ax, 0x128a7d(%rip)     # 0x12a1b0
movq 0x88a6(%rip), %r14      # 0x9fe0
movq (%r14), %rdi
addl $-0x18, %eax
movzwl %ax, %edx
leaq 0x128be6(%rip), %rsi    # 0x12a330
movl $0x30, %ecx
callq 0x1603
movq (%r14), %rdi
movl $0x1, %esi
callq 0x1405
movq %rsp, %rdx
movq %r15, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1120
movq (%r14), %rsi
movl $0xa, %edi
callq 0x10f0
movl $0x1, %edi
callq 0x10e0