// File: /workspace/github_cpp_makefile_star2_O3/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, 0xc(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rcx), %r14
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, %rdi
callq 0x3150
leaq (%r12,%rax), %rdx
addq $0x10, %rdx
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x425a
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x5796
movq %rax, %r15
leaq 0x8(%rbx), %rbp
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4da4
callq 0x32f0
cmpq %rbp, %r15
jne 0x4f6e
leaq 0x70(%rsp), %rdi
callq 0x3200
leaq 0x80(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3340
movq %rax, %r15
leaq 0x36aa(%rip), %rsi      # 0x8480
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq %r15, %rdi
movl 0xc(%rsp), %esi
callq 0x34a0
movl $0x48, %edi
callq 0x3320
movq %rax, %rbp
movq 0x98(%rbx), %r15
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x41c4
leaq 0x30(%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movl 0xc(%rsp), %ecx
movq %r12, %r8
callq 0x4b28
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4e4c
callq 0x32f0
leaq 0x88(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3440
movq %rbp, %r12
leaq 0x30(%rbx), %r13
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x5674
movq (%rax), %rbp
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e88
callq 0x32f0
testq %rbp, %rbp
je 0x4ed9
movq (%rbp), %rax
cmpq (%r12), %rax
jne 0x4ed9
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3150
leaq (%rax,%r14), %rdx
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x425a
addq $0x8, %rbp
leaq 0x50(%rsp), %rsi
movq %rbp, %rdi
callq 0x31a0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ed9
callq 0x32f0
leaq 0x10(%rsp), %r15
leaq 0x20(%rsp), %rbp
movq %rbp, (%r15)
movq %r14, %rdi
callq 0x3150
leaq (%rax,%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x425a
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5674
leaq 0x88(%rsp), %r15
movq %r12, (%rax)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4f24
callq 0x32f0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3440
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x5674
movq %r12, (%rax)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4f50
callq 0x32f0
movq 0x6061(%rip), %rsi      # 0xafb8
leaq 0x70(%rsp), %rdi
callq 0x3220
leaq 0xf0(%rsp), %rdi
callq 0x3110
leaq 0x70(%rsp), %r15
leaq 0x80(%rsp), %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x3150
leaq (%rax,%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x425a
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x5674
movq (%rax), %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4fbc
callq 0x32f0
movq %rbx, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
jne 0x502b
jmp 0x505c
jmp 0x5059
jmp 0x4fe6
jmp 0x5059
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x502b
jmp 0x505c
jmp 0x5059
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x502b
jmp 0x505c
jmp 0x5059
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5028
callq 0x32f0
jmp 0x5028
movq %rax, %rbx
movq %rbp, %rdi
callq 0x32f0
jmp 0x505c
jmp 0x5059
jmp 0x5038
jmp 0x5054
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x507a
callq 0x32f0
jmp 0x507a
movq %rax, %rbx
jmp 0x507a
movq %rax, %rbx
movq 0x5f55(%rip), %rsi      # 0xafb8
leaq 0x70(%rsp), %rdi
callq 0x3220
leaq 0xf0(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x34b0