// File: /workspace/github_cpp_makefile_star2_O1/billDrett[P]Bulletin-Boards/boardPostTest.cpp
// Function: main
int main(int argc, char *argv[])
{
    string line, path, boardID, pipe1, pipe2;
    int found;
    BoardPost* bPost;

    if(argc != 2) //thelw ena mono argument
    {
        cout<<"error arguments"<<endl;
        return - 2;
    }

    signal(SIGINT, SIG_IGN); // agnow to control C
//while(1){}
    path = argv[1];
    found = path.find_last_of("/"); //thelw na parw to onoma tou current folder
    if(found ==  string::npos)
    {
        boardID = path;
    }
    else
    {
        boardID = path.substr(found+1);
    }
    pipe1 = path + "/" + boardID + "_othersS2BP";
    pipe2 = path + "/" + boardID + "_othersBP2S";
    bPost = new BoardPost(pipe2, pipe1);

    while(!getline(cin, line).eof()) //eisodos apo pliktrologio
    {
        //cout<<line<<endl;
        if(bPost->menu(line) == -1) break;
    }

    delete bPost;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
leaq -0x118(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x78(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xb8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xd8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xf8(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
cmpl $0x2, %edi
jne 0x2535
movq %rsi, %rbx
movl $0x1, %esi
movl $0x2, %edi
callq 0x21c0
movq 0x8(%rbx), %rbx
leaq -0x88(%rbp), %r14
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2220
leaq 0x1b14(%rip), %rsi      # 0x4014
leaq -0x88(%rbp), %rdi
movl $0x1, %ecx
movq $-0x1, %rdx
callq 0x22a0
cmpl $-0x1, %eax
jne 0x2585
leaq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x20e0
jmp 0x25d8
movq 0x3a94(%rip), %rbx      # 0x5fd0
leaq 0x1ac1(%rip), %rsi      # 0x4004
movl $0xf, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq 0x3a62(%rip), %rdi      # 0x5fd0
callq 0x2030
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
movq %rax, %rdi
callq 0x2100
jmp 0x2948
incl %eax
movslq %eax, %rdx
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq $-0x1, %rcx
callq 0x2190
leaq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rbx
movq %rbx, %rsi
callq 0x21d0
movq (%rbx), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x25d8
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2180
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2b84
leaq 0x1a16(%rip), %rsi      # 0x4014
leaq -0x48(%rbp), %rdi
callq 0x2280
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x2080
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2642
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x2649
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19ab(%rip), %rsi      # 0x4016
callq 0x2280
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x269d
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x26a5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0xa8(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
callq 0x21d0
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x26e9
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x26fe
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x2713
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2180
leaq -0x48(%rbp), %rdi
movq %r14, (%rdi)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
addq %rsi, %rdx
callq 0x2b84
leaq 0x18e0(%rip), %rsi      # 0x4014
leaq -0x48(%rbp), %rdi
callq 0x2280
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x2080
movq %r15, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2774
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x277b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1885(%rip), %rsi      # 0x4022
callq 0x2280
movq %r13, -0xa8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x27cb
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x27d3
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x108(%rbp), %rdi
movq %rbx, %rsi
callq 0x21d0
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x2810
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x2825
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x283a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2180
movl $0x8, %edi
callq 0x2170
movq %rax, %r14
leaq -0x158(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x2b84
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x2b84
leaq -0x168(%rbp), %rsi
leaq -0x148(%rbp), %rdx
movq %r14, %rdi
callq 0x2c20
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x28c8
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x28e3
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x2180
movq 0x36f6(%rip), %rbx      # 0x5fe0
leaq -0x128(%rbp), %r15
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
jne 0x2931
movq %r14, %rdi
movq %r15, %rsi
callq 0x339a
cmpl $-0x1, %eax
jne 0x28f1
movq %r14, %rdi
callq 0x2c7c
movl $0x8, %esi
movq %r14, %rdi
callq 0x2180
xorl %ebx, %ebx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x2963
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x2985
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x29a7
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x29c3
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x29e5
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2180
movl %ebx, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a8d
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x2a21
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2180
jmp 0x2a21
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x2a41
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x2180
jmp 0x2a41
movq %rax, %rbx
movl $0x8, %esi
movq %r14, %rdi
jmp 0x2a82
jmp 0x2a53
jmp 0x2a6f
jmp 0x2a6f
jmp 0x2a8d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x2a72
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2180
jmp 0x2a72
jmp 0x2a6f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x2a90
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2180
jmp 0x2a90
jmp 0x2a8d
jmp 0x2a8d
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x2aab
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x2acd
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x2aef
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x2b0b
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2180
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x2b2d
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2250