// File: /workspace/github_cpp_makefile_star2_O2/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 0x3e9c9
testl %eax, %eax
je 0x961e
movq %rsp, %rdi
movq %r13, %rsi
callq 0x3e9c9
testl %eax, %eax
je 0x9627
leaq 0x40(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r12, %rsi
callq 0x3ecc5
testl %eax, %eax
je 0x9630
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 0x96a6
addq $0x20, %rsp
movl %eax, %ebx
jmp 0x963e
leaq 0x4603a(%rip), %rdi     # 0x4f65f
jmp 0x9637
leaq 0x4606f(%rip), %rdi     # 0x4f69d
jmp 0x9637
leaq 0x466b6(%rip), %rdi     # 0x4fced
callq 0x4510
xorl %ebx, %ebx
leaq 0x40(%rsp), %rdi
callq 0x3f27c
testl %eax, %eax
jne 0x965a
leaq 0x466f8(%rip), %rdi     # 0x4fd4b
callq 0x4510
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x3ec30
testl %eax, %eax
jne 0x9674
leaq 0x4606e(%rip), %rdi     # 0x4f6db
callq 0x4510
xorl %ebx, %ebx
leaq 0x90(%rsp), %rdi
callq 0x3ec30
testl %eax, %eax
jne 0x9693
leaq 0x46083(%rip), %rdi     # 0x4f70f
callq 0x4510
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq