// File: /workspace/github_cpp_makefile_star2_O1/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 0x48a3c
testl %eax, %eax
je 0xad6a
movq %rsp, %rdi
movq %r13, %rsi
callq 0x48a3c
testl %eax, %eax
je 0xad73
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movq $-0x1, %rdx
callq 0x48d2e
testl %eax, %eax
je 0xad7c
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 0xadf2
addq $0x20, %rsp
movl %eax, %ebx
jmp 0xad8a
leaq 0x4f8ee(%rip), %rdi     # 0x5a65f
jmp 0xad83
leaq 0x4f923(%rip), %rdi     # 0x5a69d
jmp 0xad83
leaq 0x4ff6a(%rip), %rdi     # 0x5aced
callq 0x44e0
xorl %ebx, %ebx
leaq 0x40(%rsp), %rdi
callq 0x49335
testl %eax, %eax
jne 0xada6
leaq 0x4ffac(%rip), %rdi     # 0x5ad4b
callq 0x44e0
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x48caf
testl %eax, %eax
jne 0xadc0
leaq 0x4f922(%rip), %rdi     # 0x5a6db
callq 0x44e0
xorl %ebx, %ebx
leaq 0x90(%rsp), %rdi
callq 0x48caf
testl %eax, %eax
jne 0xaddf
leaq 0x4f937(%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