// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/src/diff/Differ.cpp
// Function: ZipDiff(char const*, char const*, char const*, hdiff_TCompress const*, hpatch_TDecompress*, int, unsigned long, bool*, int)
bool ZipDiff(const char* oldZipPath,const char* newZipPath,const char* outDiffFileName,
             const hdiff_TCompress* compressPlugin,hpatch_TDecompress* decompressPlugin,
             int diffMatchScore,size_t patchStepMemSize,bool* out_isNewZipApkV2SignNoError,int threadNum){
    hpatch_TFileStreamInput    oldZipStream;
    hpatch_TFileStreamInput    newZipStream;
    hpatch_TFileStreamOutput   outDiffStream;
    bool            result=true;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&oldZipStream);
    hpatch_TFileStreamInput_init(&newZipStream);
    hpatch_TFileStreamOutput_init(&outDiffStream);
    check(hpatch_TFileStreamInput_open(&oldZipStream,oldZipPath));
    check(hpatch_TFileStreamInput_open(&newZipStream,newZipPath));
    check(hpatch_TFileStreamOutput_open(&outDiffStream,outDiffFileName,(hpatch_StreamPos_t)(-1)));
    hpatch_TFileStreamOutput_setRandomOut(&outDiffStream,hpatch_TRUE);
    result=ZipDiffWithStream(&oldZipStream.base,&newZipStream.base,&outDiffStream.base,
                             compressPlugin,decompressPlugin,diffMatchScore,patchStepMemSize,
                             out_isNewZipApkV2SignNoError,threadNum);
clear:
    _isInClear=true;
    check(hpatch_TFileStreamOutput_close(&outDiffStream));
    check(hpatch_TFileStreamInput_close(&newZipStream));
    check(hpatch_TFileStreamInput_close(&oldZipStream));
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
callq 0x47d02
testl %eax, %eax
je 0xab16
movq %rsp, %rdi
movq %r13, %rsi
callq 0x47d02
testl %eax, %eax
je 0xab1f
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movq $-0x1, %rdx
callq 0x48055
testl %eax, %eax
je 0xab28
movl 0x110(%rsp), %eax
movq 0x108(%rsp), %r10
movq 0x100(%rsp), %r11
leaq 0x40(%rsp), %rdx
movl $0x1, 0x3c(%rdx)
subq $0x8, %rsp
leaq 0x98(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rcx
movq %r14, %r8
movl %ebx, %r9d
pushq %rax
pushq %r10
pushq %r11
callq 0xab9e
addq $0x20, %rsp
movl %eax, %ebx
jmp 0xab36
leaq 0x4fb42(%rip), %rdi     # 0x5a65f
jmp 0xab2f
leaq 0x4fb77(%rip), %rdi     # 0x5a69d
jmp 0xab2f
leaq 0x501be(%rip), %rdi     # 0x5aced
callq 0x44e0
xorl %ebx, %ebx
leaq 0x40(%rsp), %rdi
callq 0x486aa
testl %eax, %eax
jne 0xab52
leaq 0x50200(%rip), %rdi     # 0x5ad4b
callq 0x44e0
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x47fd6
testl %eax, %eax
jne 0xab6c
leaq 0x4fb76(%rip), %rdi     # 0x5a6db
callq 0x44e0
xorl %ebx, %ebx
leaq 0x90(%rsp), %rdi
callq 0x47fd6
testl %eax, %eax
jne 0xab8b
leaq 0x4fb8b(%rip), %rdi     # 0x5a70f
callq 0x44e0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq