// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSessionManager::getServerSession(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, packet*)
ServerSession* ServerSessionManager::getServerSession (string peer, int port, packet* p) {
    if (!sessionMap.count(p->guid)) {
        stringstream source;
        source << peer << ":" << port;
        ServerSession* ds = new ServerSession(this->writer, peer, port, p);
        // Set the successor for the outgoing session, so that when it times out it checks for
        // a gap in the packet sequence.  This would indicate a lost packet at the end of
        // a session.
        ServerSession* predecessor = sourceMap[source.str()];
        if (predecessor && (predecessor->getClientStartTime() == ds->getClientStartTime())) {
            predecessor->setSuccessor(p->guid);
        }
        sessionMap[p->guid] = ds;
        sourceMap[source.str()] = ds;
    }
    return sessionMap[p->guid];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rcx), %r14
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x2120
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f24
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x2160
testq %r15, %r15
jne 0x3982
leaq 0x70(%rsp), %rdi
callq 0x21f0
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x2290
leaq 0x2bfa(%rip), %rsi      # 0x6458
movq %rax, %rdi
callq 0x22f0
movq %rax, %rdi
movl %ebp, %esi
callq 0x2460
pushq $0x48
popq %rdi
callq 0x2300
movq %rax, 0x8(%rsp)
movq 0x98(%rbx), %r15
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x2390
leaq 0x50(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %ecx
movq %r12, %r8
callq 0x365c
leaq 0x50(%rsp), %rdi
callq 0x2160
leaq 0x88(%rsp), %r12
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x2410
leaq 0x30(%rbx), %r13
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x3f3e
movq 0x8(%rsp), %r15
movq (%rax), %rbp
leaq 0x10(%rsp), %rdi
callq 0x2160
testq %rbp, %rbp
je 0x3925
movq (%rbp), %rax
cmpq (%r15), %rax
jne 0x3925
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x2120
addq $0x8, %rbp
leaq 0x30(%rsp), %rsi
movq %rbp, %rdi
callq 0x21a0
leaq 0x30(%rsp), %rdi
callq 0x2160
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x2120
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f3e
movq %r15, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x2410
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x3f3e
movq %r15, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x2160
leaq 0x70(%rsp), %rdi
callq 0x2210
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x2120
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f3e
movq (%rax), %rbx
leaq 0x70(%rsp), %rdi
callq 0x2160
movq %rbx, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x39df
jmp 0x3a20
jmp 0x39d7
jmp 0x3a20
jmp 0x39d7
jmp 0x3a20
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2160
jmp 0x3a23
jmp 0x3a20
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2160
jmp 0x39fa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x22e0
jmp 0x3a23
jmp 0x3a20
jmp 0x3a0c
jmp 0x3a1b
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2160
jmp 0x3a2d
movq %rax, %rbx
jmp 0x3a2d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2470
nop