// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/include/Acceptor.h
// Function: fprime::Acceptor::startAcceptor(int)
void startAcceptor(int port) {
            try {
                if (protocolPtr == nullptr)
                    throw runtime_error("Protocol not defined for  session.");
                if (callbacksManager == nullptr)
                    throw runtime_error("CallbacksManager not defined for  session.");
                
                // Create the socket
                SocketConnector server(sessionSetup.getPort());
                setSessionRunning(true);
                while (sessionRunning) {
                    SocketPtr socketPtr(new SocketConnector());
                    server.accept(socketPtr.get());
                    setConnected(true);
                    socketHandler(socketPtr);
                    setIbRunning(false);
                    setObRunning(false);
                    setConnected(false);
                    inboundCondition.notify_one();
                    outboundCondition.notify_one();
                }
            } catch (SocketException& se) {
                //TODO: log error
                std::cout << "Exception was caught:" << se.description() << "\nExiting." << endl;
            } catch (exception& e) {
                //TODO: log error
                cout << "Error starting acceptor: " << e.what() << endl;
            }
            setIbRunning(false);
            setObRunning(false);
            setConnected(false);
            setSessionRunning(false);
            inboundCondition.notify_one();
            outboundCondition.notify_one();
            
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x434bd
cmpq $0x0, 0x18(%rbx)
je 0x434d9
leaq 0x28(%rbx), %rdi
callq 0x41bb0
leaq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x3fa20
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x42a90
leaq 0x208(%rbx), %r14
leaq 0x238(%rbx), %r12
leaq 0x8(%rsp), %r15
leaq 0x38(%rsp), %r13
cmpb $0x1, 0x1d8(%rbx)
jne 0x4346d
pushq $0x20
popq %rdi
callq 0x405e0
movq %rax, %rbp
movq %rax, %rdi
callq 0x40a90
movq %r15, %rdi
movq %rbp, %rsi
callq 0x41640
movq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x3ec70
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x3f5d0
movq %r13, %rdi
movq %r15, %rsi
callq 0x3e330
movq %rbx, %rdi
movq %r13, %rsi
callq 0x41c80
leaq 0x40(%rsp), %rdi
callq 0x40650
andw $0x0, 0x1d9(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3f5d0
movq %r14, %rdi
callq 0x3f120
movq %r12, %rdi
callq 0x3f120
leaq 0x10(%rsp), %rdi
callq 0x40650
jmp 0x433d7
leaq 0x18(%rsp), %rdi
callq 0x3e6d0
andw $0x0, 0x1d9(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3f5d0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x42a90
leaq 0x208(%rbx), %rdi
callq 0x3f120
addq $0x238, %rbx            # imm = 0x238
movq %rbx, %rdi
callq 0x3f120
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
leaq 0x21b69(%rip), %rsi     # 0x65038
movq %rax, %rdi
callq 0x3ecd0
jmp 0x434f3
pushq $0x10
popq %rdi
callq 0x3f0e0
movq %rax, %r15
leaq 0x21b70(%rip), %rsi     # 0x6505b
movq %rax, %rdi
callq 0x3ecd0
movq 0x3bade(%rip), %rsi     # 0x7efd8
movq 0x3b8c7(%rip), %rdx     # 0x7edc8
movq %r15, %rdi
callq 0x42050
jmp 0x4350b
movq %rdx, %r12
movq %rax, %r14
movq %r15, %rdi
callq 0x3faf0
jmp 0x4356b
jmp 0x43549
jmp 0x4351f
movq %rdx, %r12
movq %rax, %r14
jmp 0x4356b
movq %rdx, %r12
movq %rax, %r14
movq %rbp, %rdi
callq 0x403f0
jmp 0x43561
movq %rdx, %r12
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x40650
jmp 0x43557
movq %rdx, %r12
movq %rax, %r14
jmp 0x43561
movq %rdx, %r12
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x40650
leaq 0x18(%rsp), %rdi
callq 0x3e6d0
cmpl $0x2, %r12d
jne 0x435cf
movq %r14, %rdi
callq 0x3ed90
movq %rax, %r15
movq 0x3b8d5(%rip), %rdi     # 0x7ee58
leaq 0x21b16(%rip), %rsi     # 0x650a0
callq 0x405b0
movq %rax, %r14
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x412d0
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x40130
leaq 0x21b03(%rip), %rsi     # 0x650b6
movq %rax, %rdi
callq 0x405b0
movq %rax, %rdi
callq 0x3f0a0
leaq 0x18(%rsp), %rdi
callq 0x3ef50
jmp 0x43612
cmpl $0x1, %r12d
jne 0x4363f
movq %r14, %rdi
callq 0x3ed90
movq %rax, %r14
movq 0x3b871(%rip), %rdi     # 0x7ee58
leaq 0x21a98(%rip), %rsi     # 0x65086
callq 0x405b0
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x405b0
movq %rax, %rdi
callq 0x3f0a0
callq 0x41d30
jmp 0x43477
jmp 0x4361e
movq %rax, %r14
jmp 0x4363a
movq %rax, %r14
callq 0x41d30
jmp 0x4363f
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x3ef50
callq 0x41d30
movq %r14, %rdi
callq 0x42200
movq %rax, %rdi
callq 0x43915
nop