// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: compressedCovers_open
static hpatch_BOOL _compressedCovers_open(_TCompressedCovers** out_self,
                                          hpatch_compressedDiffInfo* out_diffInfo,
                                          const hpatch_TStreamInput* compressedDiff,
                                          hpatch_TDecompress* decompressPlugin,
                                          TByte* temp_cache,TByte* temp_cache_end){
    _THDiffzHead    head;
    hpatch_StreamPos_t  diffPos0=0;
    _TCompressedCovers* self=0;
    _cache_alloc(self,_TCompressedCovers,sizeof(_TCompressedCovers),temp_cache,temp_cache_end);
    if (!read_diffz_head(out_diffInfo,&head,compressedDiff)) return _hpatch_FALSE;
    diffPos0=head.headEndPos;
    if (head.compress_cover_buf_size>0){
        if (decompressPlugin==0) return _hpatch_FALSE;
        if (!decompressPlugin->is_can_open(out_diffInfo->compressType)) return _hpatch_FALSE;
    }
    
    _covers_init(&self->base,head.coverCount,&self->coverClip,
                 &self->coverClip,&self->coverClip,hpatch_TRUE);
    self->base.ICovers.close=_compressedCovers_close;
    memset(&self->decompresser,0, sizeof(self->decompresser));
    if (!getStreamClip(&self->coverClip,&self->decompresser,
                       head.cover_buf_size,head.compress_cover_buf_size,
                       compressedDiff,&diffPos0,decompressPlugin,
                       temp_cache,temp_cache_end-temp_cache)) {
        return _hpatch_FALSE;
    };
    *out_self=self;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
cmpq $0xc0, %rax
jae 0x89538
movl $0x0, -0x4(%rbp)
jmp 0x896ae
movq -0x30(%rbp), %rax
addq $0x7, %rax
andq $-0x8, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0xa0(%rbp), %rsi
callq 0x87b50
cmpl $0x0, %eax
jne 0x89581
movl $0x0, -0x4(%rbp)
jmp 0x896ae
movq -0x48(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0x90(%rbp)
jbe 0x895cd
cmpq $0x0, -0x28(%rbp)
jne 0x895a9
movl $0x0, -0x4(%rbp)
jmp 0x896ae
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
addq $0x14, %rdi
callq *%rax
cmpl $0x0, %eax
jne 0x895cb
movl $0x0, -0x4(%rbp)
jmp 0x896ae
jmp 0x895cd
movq -0xb0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq $0x58, %rdx
movq -0xb0(%rbp), %rcx
addq $0x58, %rcx
movq -0xb0(%rbp), %r8
addq $0x58, %r8
movl $0x1, %r9d
callq 0x8c8e0
movq -0xb0(%rbp), %rax
leaq 0x364b(%rip), %rcx      # 0x8cc60
movq %rcx, 0x18(%rax)
movq -0xb0(%rbp), %rdi
addq $0x88, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x4210
movq -0xb0(%rbp), %rdi
addq $0x58, %rdi
movq -0xb0(%rbp), %rsi
addq $0x88, %rsi
movq -0x98(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r11
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %r9
subq %r9, %rax
leaq -0xa8(%rbp), %r9
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x86fd0
cmpl $0x0, %eax
jne 0x89699
movl $0x0, -0x4(%rbp)
jmp 0x896ae
movq -0xb0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)