// File: /workspace/github_cpp_makefile_star2_O1/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 0x31c6e
cmpq $0x0, 0x18(%rbx)
je 0x31c8c
leaq 0x28(%rbx), %rdi
callq 0x30680
leaq 0x28(%rsp), %rdi
movl %eax, %esi
callq 0x2f0d0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x31040
cmpb $0x1, 0x1d8(%rbx)
jne 0x31c1d
leaq 0x208(%rbx), %r15
leaq 0x238(%rbx), %r12
movq 0x40211(%rip), %r13     # 0x71d58
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 0x31bc4
movq 0x402a2(%rip), %rcx     # 0x71e58
cmpb $0x0, (%rcx)
je 0x31bc0
incl 0x8(%rax)
jmp 0x31bc4
lock
incl 0x8(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x306f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x31bde
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 0x31c10
callq 0x2f370
cmpb $0x0, 0x1d8(%rbx)
jne 0x31b50
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 0x31040
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 0x293c6(%rip), %rsi     # 0x5b048
movq %rax, %rdi
callq 0x2e800
jmp 0x31ca8
movl $0x10, %edi
callq 0x2eae0
movq %rax, %r12
leaq 0x293cb(%rip), %rsi     # 0x5b06b
movq %rax, %rdi
callq 0x2e800
movq 0x40329(%rip), %rsi     # 0x71fd8
movq 0x4010a(%rip), %rdx     # 0x71dc0
movq %r12, %rdi
callq 0x308f0
jmp 0x31cc0
movq %rdx, %r15
movq %rax, %r13
movq %r12, %rdi
callq 0x2f150
jmp 0x31d2a
jmp 0x31d03
jmp 0x31cd4
movq %rdx, %r15
movq %rax, %r13
jmp 0x31d2a
movq %rdx, %r15
movq %rax, %r13
movq %r14, %rdi
callq 0x2f6c0
jmp 0x31d20
movq %rdx, %r15
movq %rax, %r13
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x31d11
callq 0x2f370
jmp 0x31d11
movq %rdx, %r15
movq %rax, %r13
jmp 0x31d20
movq %rdx, %r15
movq %rax, %r13
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x31d20
callq 0x2f370
leaq 0x28(%rsp), %rdi
callq 0x2e420
cmpl $0x2, %r15d
jne 0x31dba
movq %r13, %rdi
callq 0x2e8b0
movq %rax, %r14
movq 0x4011a(%rip), %rdi     # 0x71e60
leaq 0x29363(%rip), %rsi     # 0x5b0b0
movl $0x15, %edx
callq 0x2fb20
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 0x400db(%rip), %rdi     # 0x71e60
callq 0x2fb20
movq %rax, %r14
leaq 0x29332(%rip), %rsi     # 0x5b0c6
movl $0x9, %edx
movq %rax, %rdi
callq 0x2fb20
movq %r14, %rdi
callq 0x2eab0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x31e03
callq 0x2f6c0
jmp 0x31e03
cmpl $0x1, %r15d
jne 0x31e35
movq %r13, %rdi
callq 0x2e8b0
movq %rax, %r14
movq 0x4008e(%rip), %rdi     # 0x71e60
leaq 0x292bd(%rip), %rsi     # 0x5b096
movl $0x19, %edx
callq 0x2fb20
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x4006d(%rip), %rdi     # 0x71e60
movq %rax, %rsi
callq 0x2f800
movq %rax, %rdi
callq 0x2eab0
callq 0x30750
jmp 0x31c27
jmp 0x31e0f
movq %rax, %r13
jmp 0x31e30
movq %rax, %r13
callq 0x30750
jmp 0x31e35
movq %rax, %r13
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x31e30
callq 0x2f6c0
callq 0x30750
movq %r13, %rdi
callq 0x30a20
movq %rax, %rdi
callq 0x32108
nop