// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_single_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, unsigned long, bool, ICoverLinesListener*, unsigned long)
void create_single_compressed_diff(const TByte* newData,const TByte* newData_end,
                                   const TByte* oldData,const TByte* oldData_end,
                                   const hpatch_TStreamOutput* out_diff,
                                   const hdiff_TCompress* compressPlugin,int kMinSingleMatchScore,
                                   size_t patchStepMemSize,bool isUseBigCacheMatch,
                                   ICoverLinesListener* listener,size_t threadNum){
    TDiffData diff;
    std::vector<TOldCover> covers;
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore,isUseBigCacheMatch,listener,0,threadNum);

    hpatch_TStreamInput _newStream;
    hpatch_TStreamInput _oldStream;
    mem_as_hStreamInput(&_newStream,diff.newData,diff.newData_end);
    mem_as_hStreamInput(&_oldStream,diff.oldData,diff.oldData_end);
    const TCovers _covers((void*)covers.data(),covers.size(),
                          sizeof(*covers.data())==sizeof(hpatch_TCover32));
    serialize_single_compressed_diff(&_newStream,&_oldStream,false,_covers,
                                     out_diff,compressPlugin,patchStepMemSize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movb 0x20(%rbp), %al
movq 0x18(%rbp), %r10
movl 0x10(%rbp), %r10d
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
andb $0x1, %al
movb %al, -0x39(%rbp)
leaq -0x78(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x18c60
movq -0xf8(%rbp), %r9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x28(%rbp), %r11
movq 0x30(%rbp), %rbx
movzbl -0x39(%rbp), %r10d
movq %rsp, %rax
movq %rbx, 0x20(%rax)
movq %r11, 0x10(%rax)
andl $0x1, %r10d
movl %r10d, 0x8(%rax)
movl %r8d, (%rax)
movl $0x1, 0x28(%rax)
movq $0x0, 0x18(%rax)
leaq -0x60(%rbp), %r8
callq 0x18c80
jmp 0x1a204
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x85b30
jmp 0x1a21a
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x85b30
jmp 0x1a230
leaq -0x78(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x1a2e0
movq -0x108(%rbp), %rdi
movq %rax, -0x100(%rbp)
callq 0x1a300
movq -0x100(%rbp), %rsi
movq %rax, %rdx
leaq -0xf0(%rbp), %rdi
xorl %ecx, %ecx
callq 0x29b00
jmp 0x1a26d
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq 0x18(%rbp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
xorl %edx, %edx
leaq -0xf0(%rbp), %rcx
callq 0x1a330
jmp 0x1a29d
leaq -0x78(%rbp), %rdi
callq 0x19760
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x19760
movq -0x80(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)