// File: xjrueda[P]fixprime/include/Session.h
// Function: fprime::Session::socketHandler(std::shared_ptr<SocketConnector>)
void socketHandler(SocketPtr socketPtr) {
            thread t1(std::bind(&Session::inboundProcessor, this));
            t1.detach();

            thread t2(std::bind(&Session::outboundProcessor, this, socketPtr));
            t2.detach();
            setSessionRunning(true);
            while (connected) {
                std::string data;
                try {
                    *socketPtr >> data;
                    addToBuffer(data);
                    string msg;
                    while (getRawFixMessage(msg) && data.length() > 0) {
                        pushInbound(msg);
                        msg.clear();
                    }
                } catch (SocketException&) {
                    // TODO log error
                    setConnected(false);

                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rsi, -0x128(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq 0x8baac(%rip), %rcx     # 0x132f68
movq %rcx, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x118(%rbp)
leaq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x9c5b0
movq -0x118(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x983e0
movq -0x110(%rbp), %rdi
callq 0xa3410
jmp 0xa7509
movq -0x128(%rbp), %rcx
movq -0x120(%rbp), %rax
movq 0x8b95a(%rip), %rdx     # 0x132e78
movq %rdx, -0x98(%rbp)
movq $0x0, -0x90(%rbp)
movq %rax, -0xa0(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x9eab0
jmp 0xa7553
leaq -0x60(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x9c260
jmp 0xa7565
leaq -0x88(%rbp), %rdi
callq 0x98dd0
leaq -0x60(%rbp), %rdi
callq 0xa3410
jmp 0xa757c
movq -0x120(%rbp), %rdi
movl $0x1, %esi
callq 0xa4c50
jmp 0xa758f
jmp 0xa7591
movq -0x120(%rbp), %rax
testb $0x1, 0x1db(%rax)
je 0xa779b
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0xa0780
movq -0x128(%rbp), %rdi
callq 0x9da50
movq -0x130(%rbp), %rsi
movq %rax, %rdi
callq 0xa4590
jmp 0xa75d5
movq -0x120(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xa3ec0
jmp 0xa75ea
leaq -0xe0(%rbp), %rdi
callq 0xa0780
movq -0x120(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x9af30
movb %al, -0x131(%rbp)
jmp 0xa7611
movb -0x131(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x132(%rbp)
jne 0xa7626
jmp 0xa763f
leaq -0xc0(%rbp), %rdi
callq 0xa1590
cmpq $0x0, %rax
seta %al
movb %al, -0x132(%rbp)
movb -0x132(%rbp), %al
testb $0x1, %al
jne 0xa764e
jmp 0xa770a
leaq -0x100(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x998d0
jmp 0xa7663
movq -0x120(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x9d080
jmp 0xa7678
leaq -0x100(%rbp), %rdi
callq 0xa4f00
leaq -0xe0(%rbp), %rdi
callq 0x9fdc0
jmp 0xa75f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa77bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x98dd0
jmp 0xa77bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa77b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa7724
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa7718
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xa4f00
jmp 0xa7718
leaq -0xe0(%rbp), %rdi
callq 0xa4f00
jmp 0xa7759
leaq -0xe0(%rbp), %rdi
callq 0xa4f00
movl -0x54(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xa778d
movq -0x50(%rbp), %rdi
callq 0x99540
movq -0x120(%rbp), %rdi
movq %rax, -0x108(%rbp)
xorl %esi, %esi
callq 0x9acd0
jmp 0xa7750
callq 0xa2520
jmp 0xa7757
jmp 0xa7759
leaq -0xc0(%rbp), %rdi
callq 0xa4f00
jmp 0xa7591
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0xa2520
jmp 0xa778b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa778d
jmp 0xa778d
leaq -0xc0(%rbp), %rdi
callq 0xa4f00
jmp 0xa77b6
leaq -0x60(%rbp), %rdi
callq 0xa1aa0
leaq -0x18(%rbp), %rdi
callq 0xa1aa0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xa1aa0
leaq -0x18(%rbp), %rdi
callq 0xa1aa0
movq -0x50(%rbp), %rdi
callq 0xa3520
movq %rax, %rdi
callq 0xa6900
nopl (%rax)