// File: /workspace/github_cpp_makefile_star2_O3/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 0x31c5e
cmpq $0x0, 0x18(%rbx)
je 0x31c7c
leaq 0x28(%rbx), %rdi
callq 0x30670
leaq 0x28(%rsp), %rdi
movl %eax, %esi
callq 0x2f0d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x31030
cmpb $0x1, 0x1d8(%rbx)
jne 0x31c0d
leaq 0x208(%rbx), %r15
leaq 0x238(%rbx), %r12
movq 0x3f221(%rip), %r13     # 0x70d58
addq $0x10, %r13
leaq 0x18(%rsp), %rbp
movl $0x20, %edi
callq 0x2f830
movq %rax, %r14
movq %rax, %rdi
callq 0x2e070
movq %r13, (%r14)
movq %r14, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2e790
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x2e7d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2ee10
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x31bb4
movq 0x3f2b2(%rip), %rcx     # 0x70e58
cmpb $0x0, (%rcx)
je 0x31bb0
incl 0x8(%rax)
jmp 0x31bb4
lock
incl 0x8(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x306e0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x31bce
callq 0x2f370
movw $0x0, 0x1d9(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ee10
movq %r15, %rdi
callq 0x2eb10
movq %r12, %rdi
callq 0x2eb10
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x31c00
callq 0x2f370
cmpb $0x0, 0x1d8(%rbx)
jne 0x31b40
leaq 0x28(%rsp), %rdi
callq 0x2e420
movw $0x0, 0x1d9(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ee10
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31030
leaq 0x208(%rbx), %rdi
callq 0x2eb10
addq $0x238, %rbx            # imm = 0x238
movq %rbx, %rdi
callq 0x2eb10
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2eae0
movq %rax, %r12
leaq 0x283d6(%rip), %rsi     # 0x5a048
movq %rax, %rdi
callq 0x2e800
jmp 0x31c98
movl $0x10, %edi
callq 0x2eae0
movq %rax, %r12
leaq 0x283db(%rip), %rsi     # 0x5a06b
movq %rax, %rdi
callq 0x2e800
movq 0x3f339(%rip), %rsi     # 0x70fd8
movq 0x3f11a(%rip), %rdx     # 0x70dc0
movq %r12, %rdi
callq 0x308e0
jmp 0x31cb0
movq %rdx, %r15
movq %rax, %r13
movq %r12, %rdi
callq 0x2f150
jmp 0x31d1a
jmp 0x31cf3
jmp 0x31cc4
movq %rdx, %r15
movq %rax, %r13
jmp 0x31d1a
movq %rdx, %r15
movq %rax, %r13
movq %r14, %rdi
callq 0x2f6c0
jmp 0x31d10
movq %rdx, %r15
movq %rax, %r13
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x31d01
callq 0x2f370
jmp 0x31d01
movq %rdx, %r15
movq %rax, %r13
jmp 0x31d10
movq %rdx, %r15
movq %rax, %r13
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x31d10
callq 0x2f370
leaq 0x28(%rsp), %rdi
callq 0x2e420
cmpl $0x2, %r15d
jne 0x31daa
movq %r13, %rdi
callq 0x2e8b0
movq %rax, %r14
movq 0x3f12a(%rip), %rdi     # 0x70e60
leaq 0x28373(%rip), %rsi     # 0x5a0b0
movl $0x15, %edx
callq 0x2fb10
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2e8a0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x3f0eb(%rip), %rdi     # 0x70e60
callq 0x2fb10
movq %rax, %r14
leaq 0x28342(%rip), %rsi     # 0x5a0c6
movl $0x9, %edx
movq %rax, %rdi
callq 0x2fb10
movq %r14, %rdi
callq 0x2eab0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x31df3
callq 0x2f6c0
jmp 0x31df3
cmpl $0x1, %r15d
jne 0x31e25
movq %r13, %rdi
callq 0x2e8b0
movq %rax, %r14
movq 0x3f09e(%rip), %rdi     # 0x70e60
leaq 0x282cd(%rip), %rsi     # 0x5a096
movl $0x19, %edx
callq 0x2fb10
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x3f07d(%rip), %rdi     # 0x70e60
movq %rax, %rsi
callq 0x2f800
movq %rax, %rdi
callq 0x2eab0
callq 0x30740
jmp 0x31c17
jmp 0x31dff
movq %rax, %r13
jmp 0x31e20
movq %rax, %r13
callq 0x30740
jmp 0x31e25
movq %rax, %r13
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x31e20
callq 0x2f6c0
callq 0x30740
movq %r13, %rdi
callq 0x30a10
movq %rax, %rdi
callq 0x320e8
nop