// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp
// Function: hdiff_private::TStreamCache::_resetPos_continue_read(unsigned long long, unsigned long)
void _resetPos_continue_read(hpatch_StreamPos_t readPos,size_t readLen){
        unsigned char* dst=cache+cacheSize-readLen;
        if ((m_readPosEnd>readPos)&&(m_readPos<=readPos)){
            size_t moveLen=(size_t)(m_readPosEnd-readPos);
            memmove(dst,cache+cacheSize-moveLen,moveLen);
            readStream(stream,readPos+moveLen,dst+moveLen,readLen-moveLen);
        }else if ((m_readPos<readPos+readLen)&&(m_readPosEnd>=readPos+readLen)){
            size_t moveLen=(size_t)(readPos+readLen-m_readPos);
            memmove(dst+readLen-moveLen,cachedData(),moveLen);
            readStream(stream,readPos,dst,readLen-moveLen);
        }else{
            readStream(stream,readPos,dst,readLen);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x20(%rax), %rcx
addq 0x28(%rax), %rcx
xorl %edx, %edx
subq -0x18(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jbe 0x42dd1
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
ja 0x42dd1
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
subq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq 0x20(%rax), %rsi
addq 0x28(%rax), %rsi
xorl %eax, %eax
subq -0x28(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x45c0
movq -0x18(%rbp), %rax
subq -0x28(%rbp), %rax
cmpq $0x0, %rax
jbe 0x42dcc
movq -0x48(%rbp), %rcx
movq (%rcx), %rax
movq 0x10(%rax), %rax
movq (%rcx), %rdi
movq -0x10(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq -0x18(%rbp), %r8
subq -0x28(%rbp), %r8
addq %r8, %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x42dcc
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
leaq 0x6d70a(%rip), %rsi     # 0xb049e
callq 0x4140
jmp 0x42d9b
movq -0x50(%rbp), %rdi
movq 0xa324a(%rip), %rsi     # 0xe5ff0
movq 0xa3213(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x42f56
jmp 0x42f50
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jae 0x42ed0
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jb 0x42ed0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
subq 0x8(%rdi), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq -0x40(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
callq 0x431e0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
movq -0x40(%rbp), %rdx
callq 0x45c0
movq -0x18(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq $0x0, %rax
jbe 0x42ece
movq -0x48(%rbp), %rcx
movq (%rcx), %rax
movq 0x10(%rax), %rax
movq (%rcx), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %r8
subq -0x40(%rbp), %r8
addq %r8, %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x42ece
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
leaq 0x6d608(%rip), %rsi     # 0xb049e
callq 0x4140
jmp 0x42e9d
movq -0x60(%rbp), %rdi
movq 0xa3148(%rip), %rsi     # 0xe5ff0
movq 0xa3111(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x42f56
jmp 0x42f4e
cmpq $0x0, -0x18(%rbp)
jbe 0x42f4c
movq -0x48(%rbp), %rcx
movq (%rcx), %rax
movq 0x10(%rax), %rax
movq (%rcx), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq -0x18(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x42f4c
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
leaq 0x6d587(%rip), %rsi     # 0xb049e
callq 0x4140
jmp 0x42f1e
movq -0x68(%rbp), %rdi
movq 0xa30c7(%rip), %rsi     # 0xe5ff0
movq 0xa3090(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x42f56
jmp 0x42f4e
jmp 0x42f50
addq $0x70, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nop