// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: serialize_single_compressed_diff(hpatch_TStreamInput const*, hpatch_TStreamInput const*, bool, hdiff_private::TCovers const&, hpatch_TStreamOutput const*, hdiff_TCompress const*, unsigned long)
static void serialize_single_compressed_diff(const hpatch_TStreamInput* newStream,const hpatch_TStreamInput* oldStream,
                                             bool isZeroSubDiff,const TCovers& covers,const hpatch_TStreamOutput* out_diff,
                                             const hdiff_TCompress* compressPlugin,size_t patchStepMemSize){
    check(patchStepMemSize>=hpatch_kStreamCacheSize);
    if (patchStepMemSize>newStream->streamSize){
        patchStepMemSize=(size_t)newStream->streamSize;
        if (patchStepMemSize<hpatch_kStreamCacheSize)
            patchStepMemSize=hpatch_kStreamCacheSize;
    }
    TStepStream stepStream(newStream,oldStream,isZeroSubDiff,covers,patchStepMemSize);
    
    TDiffStream outDiff(out_diff);
    {//type
        std::vector<TByte> out_type;
        _outType(out_type,compressPlugin,kHDiffSFVersionType);
        outDiff.pushBack(out_type.data(),out_type.size());
    }
    outDiff.packUInt(newStream->streamSize);
    outDiff.packUInt(oldStream->streamSize);
    outDiff.packUInt(stepStream.getCoverCount());
    outDiff.packUInt(stepStream.getMaxStepMemSize());
    outDiff.packUInt(stepStream.streamSize);
    TPlaceholder compressed_sizePos=outDiff.packUInt_pos(compressPlugin?stepStream.streamSize:0);
    outDiff.pushStream(&stepStream,compressPlugin,compressed_sizePos);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq 0x330(%rsp), %rax
cmpq $0xfff, %rax            # imm = 0xFFF
jbe 0xf577
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r8
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rcx
cmpq $0x1001, %rcx           # imm = 0x1001
movl $0x1000, %r9d           # imm = 0x1000
cmovaeq %rcx, %r9
cmpq %rax, %rcx
cmovaeq %rax, %r9
movzbl %dl, %ecx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x24390
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x253fa
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x4cf4c(%rip), %rdx     # 0x5c3d6
movq %rbx, %rsi
callq 0x1091e
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x254ce
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf4be
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x8(%r15), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25544
movq 0x8(%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25544
movq 0x178(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25544
movq 0x188(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25544
movq 0x50(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25544
movq %rbx, %rsi
testq %rbx, %rbx
je 0xf51a
movq 0x50(%rsp), %rsi
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %r14
callq 0x25544
movq 0x28(%rsp), %rax
cmpq %rax, %r14
ja 0xf5a9
movq %rsp, %rcx
movq %r14, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x25976
leaq 0x20(%rsp), %rdi
callq 0x254a8
leaq 0x48(%rsp), %rdi
callq 0x15780
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4cd4d(%rip), %rsi     # 0x5c2d8
movq %rax, %rdi
callq 0x4110
movq 0x6ca4e(%rip), %rsi     # 0x7bfe8
movq 0x6ca17(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
leaq 0x4cd8d(%rip), %rdi     # 0x5c33d
leaq 0x4cd95(%rip), %rsi     # 0x5c34c
leaq 0x4cdc6(%rip), %rcx     # 0x5c384
movl $0x6f, %edx
callq 0x4200
movq %rax, %rbx
movq %r14, %rdi
callq 0x4260
jmp 0xf60e
movq %rax, %rbx
jmp 0xf604
jmp 0xf5f7
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf5fa
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0xf5fa
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x254a8
leaq 0x48(%rsp), %rdi
callq 0x15780
movq %rbx, %rdi
callq 0x45e0