// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: readZipStreamData(UnZipper*, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)
bool readZipStreamData(UnZipper* zip,const std::vector<uint32_t>& refList,
                       const std::vector<uint32_t>& refNotDecompressList,
                       std::vector<unsigned char>& out_data){
    size_t outSize=0;
    OldStream stream;
    OldStream_init(&stream);
    t_auto_OldStream _t_auto_OldStream(&stream);
    
    ZipFilePos_t decompressSumSize=OldStream_getDecompressSumSize(zip,refList.data(),refList.size());
    std::vector<TByte> decompressData(decompressSumSize);
    hpatch_TStreamOutput out_decompressStream;
    hpatch_TStreamInput  in_decompressStream;
    mem_as_hStreamOutput(&out_decompressStream,decompressData.data(),decompressData.data()+decompressSumSize);
    mem_as_hStreamInput(&in_decompressStream,decompressData.data(),decompressData.data()+decompressSumSize);
    check(OldStream_getDecompressData(zip,refList.data(),refList.size(),&out_decompressStream));
    check(OldStream_open(&stream,zip,refList.data(),refList.size(),refNotDecompressList.data(),
                         refNotDecompressList.size(),&in_decompressStream));
    
    outSize=(size_t)stream.stream->streamSize;
    assert(outSize==stream.stream->streamSize);
    out_data.resize(outSize);
    check(stream.stream->read(stream.stream,0,out_data.data(),out_data.data()+outSize));
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x7bec0
movq -0x130(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0xc320
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc340
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc360
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq %rax, %rdx
callq 0x7bc30
movl %eax, -0x114(%rbp)
jmp 0xa88b
movl -0x114(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movq %rax, -0x140(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0xbab0
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0xbad0
jmp 0xa8d3
leaq -0xc9(%rbp), %rdi
callq 0xbb40
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xbb60
movq -0x150(%rbp), %rdi
movq %rax, -0x148(%rbp)
callq 0xbb60
movq -0x148(%rbp), %rsi
movq %rax, %rdx
movl -0x9c(%rbp), %eax
addq %rax, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x85c10
jmp 0xa926
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0xbb60
movq -0x160(%rbp), %rdi
movq %rax, -0x158(%rbp)
callq 0xbb60
movq -0x158(%rbp), %rsi
movq %rax, %rdx
movl -0x9c(%rbp), %eax
addq %rax, %rdx
leaq -0x110(%rbp), %rdi
callq 0x85b30
jmp 0xa96d
movq -0x8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc340
movq %rax, -0x170(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc360
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
movq %rax, %rdx
leaq -0xf0(%rbp), %rcx
callq 0x7bcb0
movb %al, -0x161(%rbp)
jmp 0xa9b6
movb -0x161(%rbp), %al
testb $0x1, %al
jne 0xaa52
jmp 0xa9c6
leaq 0xa2fe8(%rip), %rdi     # 0xad9b5
xorl %eax, %eax
callq 0x4060
jmp 0xa9d6
leaq 0xa2893(%rip), %rdi     # 0xad270
leaq 0xa2892(%rip), %rsi     # 0xad276
movl $0x168, %edx            # imm = 0x168
leaq 0xa3022(%rip), %rcx     # 0xada12
callq 0x4270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0xac1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0xbb40
jmp 0xac1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xbb80
jmp 0xac1d
movq -0x8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc340
movq %rax, -0x198(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc360
movq %rax, -0x190(%rbp)
movq -0x18(%rbp), %rdi
callq 0xc340
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rdi
callq 0xc360
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x190(%rbp), %rcx
movq -0x188(%rbp), %r8
movq %rax, %r9
movq %rsp, %rax
leaq -0x110(%rbp), %rdi
movq %rdi, (%rax)
leaq -0x90(%rbp), %rdi
callq 0x7c2f0
movb %al, -0x179(%rbp)
jmp 0xaad6
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0xab11
jmp 0xaae2
leaq 0xa2fa8(%rip), %rdi     # 0xada91
xorl %eax, %eax
callq 0x4060
jmp 0xaaf2
leaq 0xa2777(%rip), %rdi     # 0xad270
leaq 0xa2776(%rip), %rsi     # 0xad276
movl $0x16a, %edx            # imm = 0x16A
leaq 0xa2f06(%rip), %rcx     # 0xada12
callq 0x4270
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x90(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xab33
jmp 0xab52
leaq 0xa2fe7(%rip), %rdi     # 0xadb21
leaq 0xa2735(%rip), %rsi     # 0xad276
movl $0x16d, %edx            # imm = 0x16D
leaq 0xa2ec5(%rip), %rcx     # 0xada12
callq 0x4270
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xbeb0
jmp 0xab61
movq -0x90(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x1b0(%rbp)
movq -0x20(%rbp), %rdi
callq 0xbb60
movq %rax, -0x1b8(%rbp)
movq -0x20(%rbp), %rdi
callq 0xbb60
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rdx
movq %rax, %rcx
movq -0x1b0(%rbp), %rax
movq -0x28(%rbp), %rsi
addq %rsi, %rcx
xorl %esi, %esi
callq *%rax
movl %eax, -0x1a4(%rbp)
jmp 0xabbe
movl -0x1a4(%rbp), %eax
cmpl $0x0, %eax
jne 0xabf8
leaq 0xa2f74(%rip), %rdi     # 0xadb44
xorl %eax, %eax
callq 0x4060
jmp 0xabd9
leaq 0xa2690(%rip), %rdi     # 0xad270
leaq 0xa268f(%rip), %rsi     # 0xad276
movl $0x16f, %edx            # imm = 0x16F
leaq 0xa2e1f(%rip), %rcx     # 0xada12
callq 0x4270
leaq -0xc8(%rbp), %rdi
callq 0xbb80
leaq -0x98(%rbp), %rdi
callq 0xc380
movb $0x1, %al
andb $0x1, %al
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
leaq -0x98(%rbp), %rdi
callq 0xc380
movq -0xa8(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)