// File: zheng-ji[P]lruCache/./lrucache.h
// Function: LRUCache<int, int>::UpdateCache(int const&, int const&)
int UpdateCache(const T & t, const Value & value) 
        {
            std::lock_guard<std::mutex> lck(mt);
            HashMapIter mapIter = m_LRUCache.find(t);
            if (mapIter != m_LRUCache.end()) 
            {
                m_List.erase(mapIter->second.listiter);
                m_List.push_front(t);
                mapIter->second.listiter = m_List.begin();
                mapIter->second.updatetime = time(NULL);
                mapIter->second.value = value;
                return m_iCacheSize;
            }
            if (m_iCacheLimit > 0) 
            {
                while (m_iCacheLimit < m_iCacheSize) 
                {
                    T t = m_List.back();
                    m_List.pop_back();
                    HashMapIter mapIter = m_LRUCache.find(t);
                    if (mapIter == m_LRUCache.end())
                        break;
                    m_LRUCache.erase(mapIter);
                    m_iCacheSize--;
                    m_iEraseCnt++;
                }
            }
            m_List.push_front(t);
            CacheItem mapItem(value, m_List.begin());
            m_LRUCache.insert(std::make_pair(t, mapItem));
            m_iCacheSize++;
            return m_iCacheSize;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0xe8(%rbp)
addq $0x60, %rsi
leaq -0x28(%rbp), %rdi
callq 0x3bf0
movq -0xe8(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x3c20
movq %rax, -0xe0(%rbp)
jmp 0x2bac
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rax
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
callq 0x3c80
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3cb0
testb $0x1, %al
jne 0x2be1
jmp 0x2cb9
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movq %rax, %rsi
addq $0x10, %rsi
leaq -0x50(%rbp), %rdi
callq 0x3d60
movq -0xe8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3d10
movq -0xe8(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3d80
jmp 0x2c20
movq -0xe8(%rbp), %rdi
callq 0x3dc0
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x2110
movq %rax, -0xf8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movq -0xf8(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xec(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movl -0xec(%rbp), %edx
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movl %edx, 0x8(%rcx)
movl 0x50(%rax), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0x2e70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3df0
jmp 0x2e85
movq -0xe8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
jle 0x2da0
jmp 0x2ccc
movq -0xe8(%rbp), %rcx
movl 0x54(%rcx), %eax
cmpl 0x50(%rcx), %eax
jge 0x2d9e
movq -0xe8(%rbp), %rdi
callq 0x47d0
movq -0xe8(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x68(%rbp)
callq 0x4810
movq -0xe8(%rbp), %rdi
addq $0x18, %rdi
leaq -0x68(%rbp), %rsi
callq 0x3c20
movq %rax, -0x100(%rbp)
jmp 0x2d19
movq -0xe8(%rbp), %rdi
movq -0x100(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x18, %rdi
callq 0x3c80
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3c50
testb $0x1, %al
jne 0x2d4b
jmp 0x2d4d
jmp 0x2d9e
movq -0xe8(%rbp), %rdi
addq $0x18, %rdi
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
callq 0x4850
movq %rax, -0x108(%rbp)
jmp 0x2d72
movq -0xe8(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movl 0x50(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x50(%rax)
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
jmp 0x2ccc
jmp 0x2da0
movq -0xe8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d80
jmp 0x2db2
movq -0xe8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
callq 0x3dc0
movq -0x110(%rbp), %rsi
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x4890
jmp 0x2dec
movq -0xe8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x118(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x4930
jmp 0x2e17
movq -0x118(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x48f0
movb %dl, -0x121(%rbp)
movq %rax, -0x120(%rbp)
jmp 0x2e39
movq -0xe8(%rbp), %rax
movb -0x121(%rbp), %cl
movq -0x120(%rbp), %rdx
movq %rdx, -0xd8(%rbp)
movb %cl, -0xd0(%rbp)
movl 0x50(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rax)
movl 0x50(%rax), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3df0
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2200
nop