// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: getSingleCompressedDiffInfo
hpatch_BOOL getSingleCompressedDiffInfo(hpatch_singleCompressedDiffInfo* out_diffInfo,
                                        const hpatch_TStreamInput* singleCompressedDiff,
                                        hpatch_StreamPos_t         diffInfo_pos){
    TStreamCacheClip  _diffHeadClip;
    TStreamCacheClip* diffHeadClip=&_diffHeadClip;
    TByte             temp_cache[hpatch_kStreamCacheSize];
    _TStreamCacheClip_init(&_diffHeadClip,singleCompressedDiff,diffInfo_pos,singleCompressedDiff->streamSize,
                           temp_cache,hpatch_kStreamCacheSize);
    {//type
        const char* kVersionType="HDIFFSF20";
        char* tempType=out_diffInfo->compressType;
        if (!_TStreamCacheClip_readType_end(diffHeadClip,'&',tempType)) return _hpatch_FALSE;
        if (0!=strcmp(tempType,kVersionType)) return _hpatch_FALSE;
    }
    {//read compressType
        if (!_TStreamCacheClip_readType_end(diffHeadClip,'\0',
                                            out_diffInfo->compressType)) return _hpatch_FALSE;
    }
    _clip_unpackUIntTo(&out_diffInfo->newDataSize,diffHeadClip);
    _clip_unpackUIntTo(&out_diffInfo->oldDataSize,diffHeadClip);
    _clip_unpackUIntTo(&out_diffInfo->coverCount,diffHeadClip);
    _clip_unpackUIntTo(&out_diffInfo->stepMemSize,diffHeadClip);
    _clip_unpackUIntTo(&out_diffInfo->uncompressedSize,diffHeadClip);
    _clip_unpackUIntTo(&out_diffInfo->compressedSize,diffHeadClip);
    out_diffInfo->diffDataPos=_TStreamCacheClip_readPosOfSrcStream(diffHeadClip)-diffInfo_pos;
    if (out_diffInfo->compressedSize>out_diffInfo->uncompressedSize)
        return _hpatch_FALSE;
    if (out_diffInfo->stepMemSize>(out_diffInfo->newDataSize>=_kStepMemSizeSafeLimit?out_diffInfo->newDataSize:_kStepMemSizeSafeLimit))
        return _hpatch_FALSE;
    if (out_diffInfo->stepMemSize>out_diffInfo->uncompressedSize)
        return _hpatch_FALSE;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movq 0x8(%rsi), %rax
cmpq %rdx, %rax
jb 0x47416
movq %rdx, %r14
testq %rsi, %rsi
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0x47416
movq %rdi, %rbx
movq %rsp, %rdi
movq %r14, (%rdi)
movq %rax, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
leaq 0x30(%rsp), %rax
movq %rax, 0x18(%rdi)
movl $0x1000, %eax           # imm = 0x1000
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
leaq 0x38(%rbx), %r15
movl $0x26, %esi
movq %r15, %rdx
callq 0x44506
xorl %ebp, %ebp
testl %eax, %eax
je 0x47323
leaq 0x150bf(%rip), %rsi     # 0x5c3d6
movq %r15, %rdi
callq 0x4420
testl %eax, %eax
je 0x47333
movl %ebp, %eax
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %esi, %esi
movq %r15, %rdx
callq 0x44506
testl %eax, %eax
je 0x47323
movq %rsp, %rdi
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
leaq 0x8(%rbx), %rsi
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
leaq 0x28(%rbx), %rsi
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
leaq 0x30(%rbx), %rsi
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
leaq 0x10(%rbx), %rsi
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
leaq 0x18(%rbx), %rsi
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x44699
testl %eax, %eax
je 0x47323
addq 0x28(%rsp), %r14
movq (%rsp), %rax
subq %r14, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x10(%rbx), %rax
cmpq %rax, 0x18(%rbx)
ja 0x47323
movq (%rbx), %rdx
movq 0x30(%rbx), %rcx
cmpq $0x1000001, %rdx        # imm = 0x1000001
movl $0x1000000, %esi        # imm = 0x1000000
cmovaeq %rdx, %rsi
cmpq %rsi, %rcx
ja 0x47323
xorl %ebp, %ebp
cmpq %rax, %rcx
setbe %bpl
jmp 0x47323
leaq 0x1a682(%rip), %rdi     # 0x61a9f
leaq 0x1a6cc(%rip), %rsi     # 0x61af0
leaq 0x1a6f5(%rip), %rcx     # 0x61b20
movl $0x55, %edx
callq 0x4200