// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TStreamCache::_resetPos_continue(unsigned long, unsigned long long, unsigned long)
bool _resetPos_continue(size_t kBackupCacheSize,hpatch_StreamPos_t streamPos,size_t kMinCacheDataSize){
        //stream:[...     |                |                   |                  |                      |      ...]
        //             readPos (streamPos-kBackupCacheSize) streamPos (streamPos+kMinCacheDataSize) (readPosEnd)
        //cache:     [    |                                    |                  |                      ]
        //           0                                   (init cachePos)                              cacheSize
        hpatch_StreamPos_t streamSize=stream->streamSize;
        if (streamPos+kMinCacheDataSize>streamSize) return false;
        hpatch_StreamPos_t readPos=(streamPos>=kBackupCacheSize)?(streamPos-kBackupCacheSize):0;
        size_t readLen=((streamSize-readPos)>=cacheSize)?cacheSize:(size_t)(streamSize-readPos);
#if (_IS_USED_MULTITHREAD)
        if (m_locker){
            CAutoLocker _autoLocker(m_locker);
            _resetPos_continue_read(readPos,readLen);
        }else
#endif
        {
            _resetPos_continue_read(readPos,readLen);
        }
        m_readPos=readPos;
        m_readPosEnd=readPos+readLen;
        cachePos=cacheSize-(size_t)(m_readPosEnd-streamPos);
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x42b25
movb $0x0, -0x1(%rbp)
jmp 0x42c12
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x42b3d
movq -0x20(%rbp), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x42b45
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x42b45
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
cmpq 0x28(%rcx), %rax
jb 0x42b6d
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x42b79
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, -0x40(%rbp)
cmpq $0x0, 0x18(%rax)
je 0x42bd2
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x42c30
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x42cb0
jmp 0x42bb0
leaq -0x50(%rbp), %rdi
callq 0x42f60
jmp 0x42be3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x42f60
jmp 0x42c20
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x42cb0
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
addq -0x40(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq 0x28(%rax), %rcx
movq 0x10(%rax), %rdx
subq -0x20(%rbp), %rdx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x4680
nopl (%rax)