// File: /workspace/github_cpp_makefile_star2_O1/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 0x4258
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x5798
movq %rax, %r15
leaq 0x8(%rbx), %rbp
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4da6
callq 0x32f0
cmpq %rbp, %r15
jne 0x4f70
leaq 0x70(%rsp), %rdi
callq 0x3200
leaq 0x80(%rsp), %rdi
movq (%r13), %rsi
movq 0x8(%r13), %rdx
callq 0x3340
movq %rax, %r15
leaq 0x36a8(%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 0x41c8
leaq 0x30(%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movl 0xc(%rsp), %ecx
movq %r12, %r8
callq 0x4b24
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4e4e
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 0x5676
movq (%rax), %rbp
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e8a
callq 0x32f0
testq %rbp, %rbp
je 0x4edb
movq (%rbp), %rax
cmpq (%r12), %rax
jne 0x4edb
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 0x4258
addq $0x8, %rbp
leaq 0x50(%rsp), %rsi
movq %rbp, %rdi
callq 0x31a0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x4edb
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 0x4258
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5676
leaq 0x88(%rsp), %r15
movq %r12, (%rax)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4f26
callq 0x32f0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3440
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x5676
movq %r12, (%rax)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4f52
callq 0x32f0
movq 0x605f(%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 0x4258
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x5676
movq (%rax), %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4fbe
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 0x502d
jmp 0x505e
jmp 0x505b
jmp 0x4fe8
jmp 0x505b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x502d
jmp 0x505e
jmp 0x505b
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x502d
jmp 0x505e
jmp 0x505b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x502a
callq 0x32f0
jmp 0x502a
movq %rax, %rbx
movq %rbp, %rdi
callq 0x32f0
jmp 0x505e
jmp 0x505b
jmp 0x503a
jmp 0x5056
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x507c
callq 0x32f0
jmp 0x507c
movq %rax, %rbx
jmp 0x507c
movq %rax, %rbx
movq 0x5f53(%rip), %rsi      # 0xafb8
leaq 0x70(%rsp), %rdi
callq 0x3220
leaq 0xf0(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x34b0