LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::stream_update(hdiff_private::TPlaceholder const&, unsigned char const*)
void TDiffStream::stream_update(const TPlaceholder& pos,const hpatch_byte* in_data){
    assert(pos.pos<=pos.pos_end);
    assert(pos.size()==(size_t)pos.size());
    check(pos.pos_end<=writePos);

    hpatch_StreamPos_t writePosBack=writePos;
    writePos=pos.pos;
    pushBack(in_data,(size_t)pos.size());
    assert(writePos==pos.pos_end);
    writePos=writePosBack;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x4faaf
jmp 0x4face
leaq 0x616fd(%rip), %rdi     # 0xb11b3
leaq 0x60e7e(%rip), %rsi     # 0xb093b
movl $0x2f0, %edx            # imm = 0x2F0
leaq 0x617f9(%rip), %rcx     # 0xb12c2
callq 0x4270
movq -0x10(%rbp), %rdi
callq 0x50990
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x50990
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jne 0x4faf2
jmp 0x4fb11
leaq 0x61721(%rip), %rdi     # 0xb121a
leaq 0x60e3b(%rip), %rsi     # 0xb093b
movl $0x2f1, %edx            # imm = 0x2F1
leaq 0x617b6(%rip), %rcx     # 0xb12c2
callq 0x4270
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
jbe 0x4fb73
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
leaq 0x616fb(%rip), %rsi     # 0xb1239
callq 0x4140
jmp 0x4fb45
movq -0x48(%rbp), %rdi
movq 0x964a0(%rip), %rsi     # 0xe5ff0
movq 0x96469(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x42e0
jmp 0x4fbf0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x50990
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq %rax, %rdx
callq 0x4f450
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x4fbbf
jmp 0x4fbde
leaq 0x6157c(%rip), %rdi     # 0xb1142
leaq 0x60d6e(%rip), %rsi     # 0xb093b
movl $0x2f7, %edx            # imm = 0x2F7
leaq 0x616e9(%rip), %rcx     # 0xb12c2
callq 0x4270
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::_pushStream(hpatch_TStreamInput const*)
void TDiffStream::_pushStream(const hpatch_TStreamInput* stream){
    unsigned char* buf=_temp_mem.data();
    hpatch_StreamPos_t sumReadedLen=0;
    while (sumReadedLen<stream->streamSize) {
        size_t readLen=kBufSize;
        if (readLen+sumReadedLen>stream->streamSize)
            readLen=(size_t)(stream->streamSize-sumReadedLen);
        checki(stream->read(stream,sumReadedLen,buf,buf+readLen),
               "TDiffStream::_pushStream() stream->read() error!");
        this->pushBack(buf,readLen);
        sumReadedLen+=readLen;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x10, %rdi
callq 0x29c40
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x4fcfe
movq $0x80000, -0x28(%rbp)   # imm = 0x80000
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x4fc69
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq -0x28(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x4fcdc
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
leaq 0x61675(%rip), %rsi     # 0xb131c
callq 0x4140
jmp 0x4fcae
movq -0x48(%rbp), %rdi
movq 0x96337(%rip), %rsi     # 0xe5ff0
movq 0x96300(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x42e0
jmp 0x4fd04
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4f450
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x4fc2d
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::openDecompressHandle()
void TStreamClip::openDecompressHandle(){
    assert(_decompressHandle==0);
    assert(_decompressPlugin!=0);
    _decompressHandle=_decompressPlugin->open(_decompressPlugin,this->streamSize,_src,_src_begin,_src_end);
    check(_decompressHandle!=0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x40(%rax)
jne 0x501cd
jmp 0x501ec
leaq 0x64d4c(%rip), %rdi     # 0xb4f20
leaq 0x60760(%rip), %rsi     # 0xb093b
movl $0x343, %edx            # imm = 0x343
leaq 0x612ff(%rip), %rcx     # 0xb14e6
callq 0x4270
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x501f9
jmp 0x50218
leaq 0x6131e(%rip), %rdi     # 0xb151e
leaq 0x60734(%rip), %rsi     # 0xb093b
movl $0x344, %edx            # imm = 0x344
leaq 0x612d3(%rip), %rcx     # 0xb14e6
callq 0x4270
movq -0x20(%rbp), %r8
movq 0x38(%r8), %rax
movq 0x8(%rax), %rax
movq 0x38(%r8), %rdi
movq 0x8(%r8), %rsi
movq 0x20(%r8), %rdx
movq 0x28(%r8), %rcx
movq 0x30(%r8), %r8
callq *%rax
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
cmpq $0x0, 0x40(%rax)
jne 0x5029c
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
leaq 0x612cc(%rip), %rsi     # 0xb1533
callq 0x4140
jmp 0x5026e
movq -0x28(%rbp), %rdi
movq 0x95d77(%rip), %rsi     # 0xe5ff0
movq 0x95d40(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x42e0
jmp 0x502a2
addq $0x30, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::closeDecompressHandle()
void TStreamClip::closeDecompressHandle(){
    hpatch_decompressHandle handle=_decompressHandle;
    _decompressHandle=0;
    if (handle)
        check(_decompressPlugin->close(_decompressPlugin,handle));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x40(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq $0x0, 0x40(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x50348
movq -0x28(%rbp), %rcx
movq 0x38(%rcx), %rax
movq 0x10(%rax), %rax
movq 0x38(%rcx), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
jne 0x50346
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x61195(%rip), %rsi     # 0xb14a6
callq 0x4140
jmp 0x50318
movq -0x30(%rbp), %rdi
movq 0x95ccd(%rip), %rsi     # 0xe5ff0
movq 0x95c96(%rip), %rdx     # 0xe5fc0
callq 0x4630
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x42e0
jmp 0x5034e
jmp 0x50348
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4680
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_TCheckOutNewDataStream(hpatch_TStreamInput const*, unsigned char*, unsigned long)
_TCheckOutNewDataStream::_TCheckOutNewDataStream(const hpatch_TStreamInput*  _newData,
                                                 unsigned char* _buf,size_t _bufSize)
:newData(_newData),writedLen(0),buf(_buf),bufSize(_bufSize){
    streamImport=this;
    streamSize=newData->streamSize;
    read_writed=_read_writed;
    write=_write_check;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq %rax, (%rax)
movq 0x20(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
leaq 0x12(%rip), %rcx        # 0x503c0
movq %rcx, 0x10(%rax)
leaq 0xc7(%rip), %rcx        # 0x50480
movq %rcx, 0x18(%rax)
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_read_writed(hpatch_TStreamOutput const*, unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL _TCheckOutNewDataStream::_read_writed(const struct hpatch_TStreamOutput* stream,hpatch_StreamPos_t readFromPos,
                                                  unsigned char* out_data,unsigned char* out_data_end){
    _TCheckOutNewDataStream* self=(_TCheckOutNewDataStream*)stream->streamImport;
    _test_rt(readFromPos<=self->writedLen);
    _test_rt((hpatch_size_t)(out_data_end-out_data)<=(hpatch_StreamPos_t)(self->writedLen-readFromPos)); 
    return self->newData->read(self->newData,readFromPos,out_data,out_data_end); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x50412
movq 0x95bd8(%rip), %rax     # 0xe5fd0
movq (%rax), %rdi
leaq 0x6121e(%rip), %rsi     # 0xb1620
movb $0x0, %al
callq 0x4520
movl $0x0, -0x4(%rbp)
jmp 0x50474
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x5044f
movq 0x95b9b(%rip), %rax     # 0xe5fd0
movq (%rax), %rdi
leaq 0x6120c(%rip), %rsi     # 0xb164b
movb $0x0, %al
callq 0x4520
movl $0x0, -0x4(%rbp)
jmp 0x50474
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::do_compress(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, hdiff_TCompress const*, bool)
void do_compress(std::vector<unsigned char>& out_code,const hpatch_TStreamInput* data,
                        const hdiff_TCompress* compressPlugin,bool isMustCompress){
    out_code.clear();
    if (!compressPlugin) return;
    if (data->streamSize==0) return;
    hpatch_StreamPos_t maxCodeSize=compressPlugin->maxCompressedSize(data->streamSize);
    if ((maxCodeSize<=data->streamSize)||(maxCodeSize!=(size_t)maxCodeSize)) return; //error
    out_code.resize((size_t)maxCodeSize);
    hpatch_TStreamOutput codeStream;
    mem_as_hStreamOutput(&codeStream,out_code.data(),out_code.data()+out_code.size());
    hpatch_StreamPos_t codeSize=compressPlugin->compress(compressPlugin,&codeStream,data);
    if ((codeSize>0)&&(isMustCompress||(codeSize<data->streamSize)))
        out_code.resize((size_t)codeSize); //ok
    else
        out_code.clear();//error or cancel
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
callq 0xce90
cmpq $0x0, -0x18(%rbp)
jne 0x50650
jmp 0x50724
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x50660
jmp 0x50724
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x5068e
movq -0x28(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x50693
jmp 0x50724
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xbeb0
movq -0x8(%rbp), %rdi
callq 0xbb60
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbb60
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbe90
movq -0x60(%rbp), %rdx
movq -0x58(%rbp), %rsi
addq %rax, %rdx
leaq -0x48(%rbp), %rdi
callq 0x85c10
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x48(%rbp), %rsi
callq *%rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jbe 0x5071b
testb $0x1, -0x19(%rbp)
jne 0x5070c
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x5071b
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xbeb0
jmp 0x50724
movq -0x8(%rbp), %rdi
callq 0xce90
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h
// Function: divsufsort64
saint_t
divsufsort(const sauchar_t *T, sastore_t* SA, saidx_t n,int threadNum) {
  saidx_t *bucket_A, *bucket_B;
  saidx_t m;
  saint_t err = 0;

  /* Check arguments. */
  if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; }
  else if(n == 0) { return 0; }
  else if(n == 1) { SA[0] = 0; return 0; }
  else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; }

  bucket_A = (saidx_t *)malloc(BUCKET_A_SIZE * sizeof(saidx_t));
  bucket_B = (saidx_t *)malloc(BUCKET_B_SIZE * sizeof(saidx_t));

  /* Suffixsort. */
  if((bucket_A != NULL) && (bucket_B != NULL)) {
    m = sort_typeBstar(T, SA, bucket_A, bucket_B, n, threadNum);
    construct_SA(T, SA, bucket_A, bucket_B, n, m);
  } else {
    err = -2;
  }

  free(bucket_B);
  free(bucket_A);

  return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x51a23
cmpq $0x0, -0x18(%rbp)
je 0x51a23
cmpq $0x0, -0x20(%rbp)
jge 0x51a2f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x51b43
cmpq $0x0, -0x20(%rbp)
jne 0x51a42
movl $0x0, -0x4(%rbp)
jmp 0x51b43
cmpq $0x1, -0x20(%rbp)
jne 0x51a60
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x51b43
cmpq $0x2, -0x20(%rbp)
jne 0x51ab4
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
xorq $0x1, %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq $0x1, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
jmp 0x51b43
jmp 0x51ab6
jmp 0x51ab8
jmp 0x51aba
movl $0x800, %edi            # imm = 0x800
callq 0x44d0
movq %rax, -0x30(%rbp)
movl $0x80000, %edi          # imm = 0x80000
callq 0x44d0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x51b24
cmpq $0x0, -0x38(%rbp)
je 0x51b24
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
callq 0x51b50
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x40(%rbp), %r9
callq 0x52710
jmp 0x51b2b
movl $0xfffffffe, -0x44(%rbp) # imm = 0xFFFFFFFE
movq -0x38(%rbp), %rdi
callq 0x4460
movq -0x30(%rbp), %rdi
callq 0x4460
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2EncProps_Init
void Lzma2EncProps_Init(CLzma2EncProps *p)
{
  LzmaEncProps_Init(&p->lzmaProps);
  p->blockSize = LZMA2_ENC_PROPS_BLOCK_SIZE_AUTO;
  p->numBlockThreads_Reduced = -1;
  p->numBlockThreads_Max = -1;
  p->numTotalThreads = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x670d0
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x50(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x54(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_Create
CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  CLzma2Enc *p = (CLzma2Enc *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Enc));
  if (!p)
    return NULL;
  Lzma2EncProps_Init(&p->props);
  Lzma2EncProps_Normalize(&p->props);
  p->expectedDataSize = (UInt64)(Int64)-1;
  p->tempBufLzma = NULL;
  p->alloc = alloc;
  p->allocBig = allocBig;
  {
    unsigned i;
    for (i = 0; i < MTCODER_THREADS_MAX; i++)
      p->coders[i].enc = NULL;
  }
  
  #ifndef Z7_ST
  p->mtCoder_WasConstructed = False;
  {
    unsigned i;
    for (i = 0; i < MTCODER_BLOCKS_MAX; i++)
      p->outBufs[i] = NULL;
    p->outBufSize = 0;
  }
  #endif

  return (CLzma2EncHandle)p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movl $0x36b0, %esi           # imm = 0x36B0
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x65c3a
movq $0x0, -0x8(%rbp)
jmp 0x65d0a
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x658b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x65900
movq -0x20(%rbp), %rax
movq $-0x1, 0x68(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x80(%rax)
movl $0x0, -0x24(%rbp)
cmpl $0x40, -0x24(%rbp)
jae 0x65cba
movq -0x20(%rbp), %rax
addq $0x88, %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x65c8e
movq -0x20(%rbp), %rax
movl $0x0, 0x908(%rax)
movl $0x0, -0x28(%rbp)
cmpl $0x4c, -0x28(%rbp)
jae 0x65cf3
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movq $0x0, 0x3450(%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x65ccf
movq -0x20(%rbp), %rax
movq $0x0, 0x6a0(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_Destroy
void Lzma2Enc_Destroy(CLzma2EncHandle p)
{
  // GET_CLzma2Enc_p
  unsigned i;
  for (i = 0; i < MTCODER_THREADS_MAX; i++)
  {
    CLzma2EncInt *t = &p->coders[i];
    if (t->enc)
    {
      LzmaEnc_Destroy(t->enc, p->alloc, p->allocBig);
      t->enc = NULL;
    }
  }


  #ifndef Z7_ST
  if (p->mtCoder_WasConstructed)
  {
    MtCoder_Destruct(&p->mtCoder);
    p->mtCoder_WasConstructed = False;
  }
  Lzma2Enc_FreeOutBufs(p);
  #endif

  ISzAlloc_Free(p->alloc, p->tempBufLzma);
  p->tempBufLzma = NULL;

  ISzAlloc_Free(p->alloc, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x40, -0xc(%rbp)
jae 0x65d92
movq -0x8(%rbp), %rax
addq $0x88, %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x65d85
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdx
callq 0x67ac0
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0x65d87
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x65d33
movq -0x8(%rbp), %rax
cmpl $0x0, 0x908(%rax)
je 0x65dbd
movq -0x8(%rbp), %rdi
addq $0x910, %rdi            # imm = 0x910
callq 0x78660
movq -0x8(%rbp), %rax
movl $0x0, 0x908(%rax)
movq -0x8(%rbp), %rdi
callq 0x65e10
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x70(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
movq -0x8(%rbp), %rsi
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_FreeOutBufs
static void Lzma2Enc_FreeOutBufs(CLzma2Enc *p)
{
  unsigned i;
  for (i = 0; i < MTCODER_BLOCKS_MAX; i++)
    if (p->outBufs[i])
    {
      ISzAlloc_Free(p->alloc, p->outBufs[i]);
      p->outBufs[i] = NULL;
    }
  p->outBufSize = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4c, -0xc(%rbp)
jae 0x65e80
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
cmpq $0x0, 0x3450(%rax,%rcx,8)
je 0x65e73
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
movq 0x3450(%rcx,%rdx,8), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movq $0x0, 0x3450(%rax,%rcx,8)
jmp 0x65e75
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x65e23
movq -0x8(%rbp), %rax
movq $0x0, 0x6a0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_SetProps
SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props)
{
  // GET_CLzma2Enc_p
  CLzmaEncProps lzmaProps = props->lzmaProps;
  LzmaEncProps_Normalize(&lzmaProps);
  if (lzmaProps.lc + lzmaProps.lp > LZMA2_LCLP_MAX)
    return SZ_ERROR_PARAM;
  p->props = *props;
  Lzma2EncProps_Normalize(&p->props);
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x48, %edx
callq 0x4320
leaq -0x60(%rbp), %rdi
callq 0x67180
movl -0x58(%rbp), %eax
addl -0x54(%rbp), %eax
cmpl $0x4, %eax
jle 0x65edf
movl $0x5, -0x4(%rbp)
jmp 0x65f09
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movl $0x60, %edx
callq 0x4320
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x65900
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_WriteProperties
Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p)
{
  // GET_CLzma2Enc_p
  unsigned i;
  UInt32 dicSize = LzmaEncProps_GetDictSize(&p->props.lzmaProps);
  for (i = 0; i < 40; i++)
    if (dicSize <= LZMA2_DIC_SIZE_FROM_PROP(i))
      break;
  return (Byte)i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x673a0
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x28, -0xc(%rbp)
jae 0x65f94
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %edx
andl $0x1, %edx
orl $0x2, %edx
movl -0xc(%rbp), %ecx
shrl %ecx
addl $0xb, %ecx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
ja 0x65f87
jmp 0x65f94
jmp 0x65f89
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x65f63
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_MtCallback_Code
static SRes Lzma2Enc_MtCallback_Code(void *p, unsigned coderIndex, unsigned outBufIndex,
    const Byte *src, size_t srcSize, int finished)
{
  CLzma2Enc *me = (CLzma2Enc *)p;
  size_t destSize = me->outBufSize;
  SRes res;
  CMtProgressThunk progressThunk;

  Byte *dest = me->outBufs[outBufIndex];

  me->outBufsDataSizes[outBufIndex] = 0;

  if (!dest)
  {
    dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize);
    if (!dest)
      return SZ_ERROR_MEM;
    me->outBufs[outBufIndex] = dest;
  }

  MtProgressThunk_CreateVTable(&progressThunk);
  progressThunk.mtProgress = &me->mtCoder.mtProgress;
  progressThunk.inSize = 0;
  progressThunk.outSize = 0;

  res = Lzma2Enc_EncodeMt1(me,
      &me->coders[coderIndex],
      NULL, dest, &destSize,
      NULL, src, srcSize,
      finished,
      &progressThunk.vt);

  me->outBufsDataSizes[outBufIndex] = destSize;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x6a0(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movl -0x20(%rbp), %ecx
movq 0x3450(%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
movl -0x20(%rbp), %ecx
movq $0x0, 0x6a8(%rax,%rcx,8)
cmpq $0x0, -0x78(%rbp)
jne 0x66360
movq -0x40(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq 0x78(%rcx), %rdi
movq -0x40(%rbp), %rcx
movq 0x6a0(%rcx), %rsi
callq *%rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0x6634d
movl $0x2, -0xc(%rbp)
jmp 0x663fa
movq -0x78(%rbp), %rdx
movq -0x40(%rbp), %rax
movl -0x20(%rbp), %ecx
movq %rdx, 0x3450(%rax,%rcx,8)
leaq -0x70(%rbp), %rdi
callq 0x78440
movq -0x40(%rbp), %rax
addq $0x910, %rax            # imm = 0x910
addq $0x368, %rax            # imm = 0x368
movq %rax, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x88, %rsi
movl -0x1c(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rsi
movq -0x78(%rbp), %rcx
movq -0x28(%rbp), %rbx
movq -0x30(%rbp), %r11
movl -0x34(%rbp), %r10d
leaq -0x70(%rbp), %rax
xorl %edx, %edx
movl %edx, %r9d
leaq -0x48(%rbp), %r8
movq %r9, %rdx
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x66510
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rax
movl -0x20(%rbp), %ecx
movq %rdx, 0x6a8(%rax,%rcx,8)
movl -0x4c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2Enc_MtCallback_Write
static SRes Lzma2Enc_MtCallback_Write(void *p, unsigned outBufIndex)
{
  CLzma2Enc *me = (CLzma2Enc *)p;
  size_t size = me->outBufsDataSizes[outBufIndex];
  const Byte *data = me->outBufs[outBufIndex];
  
  if (me->outStream)
    return ISeqOutStream_Write(me->outStream, data, size) == size ? SZ_OK : SZ_ERROR_WRITE;
  
  if (size > me->outBuf_Rem)
    return SZ_ERROR_OUTPUT_EOF;
  memcpy(me->outBuf, data, size);
  me->outBuf_Rem -= size;
  me->outBuf += size;
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movq 0x6a8(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movq 0x3450(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x688(%rax)
je 0x66497
movq -0x20(%rbp), %rax
movq 0x688(%rax), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x688(%rcx), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq *%rax
movq %rax, %rdx
movq -0x28(%rbp), %rsi
movl $0x9, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x664ff
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x698(%rcx), %rax
jbe 0x664b1
movl $0x7, -0x4(%rbp)
jmp 0x664ff
movq -0x20(%rbp), %rax
movq 0x690(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4320
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x698(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x698(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x690(%rax), %rcx
movq %rcx, 0x690(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: LimitedSeqInStream_Read
static SRes LimitedSeqInStream_Read(ISeqInStreamPtr pp, void *data, size_t *size)
{
  Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR_pp_vt_p(CLimitedSeqInStream)
  size_t size2 = *size;
  SRes res = SZ_OK;
  
  if (p->limit != (UInt64)(Int64)-1)
  {
    const UInt64 rem = p->limit - p->processed;
    if (size2 > rem)
      size2 = (size_t)rem;
  }
  if (size2 != 0)
  {
    res = ISeqInStream_Read(p->realStream, data, &size2);
    p->finished = (size2 == 0 ? 1 : 0);
    p->processed += size2;
  }
  *size = size2;
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, 0x10(%rax)
je 0x66a91
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jbe 0x66a8f
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x66a91
cmpq $0x0, -0x28(%rbp)
je 0x66ae1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdx
xorl %ecx, %ecx
movl $0x1, %eax
cmpq $0x0, %rdx
cmovel %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2EncInt_InitStream
static SRes Lzma2EncInt_InitStream(CLzma2EncInt *p, const CLzma2EncProps *props)
{
  if (!p->propsAreSet)
  {
    SizeT propsSize = LZMA_PROPS_SIZE;
    Byte propsEncoded[LZMA_PROPS_SIZE];
    RINOK(LzmaEnc_SetProps(p->enc, &props->lzmaProps))
    RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize))
    p->propsByte = propsEncoded[0];
    p->propsAreSet = True;
  }
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x66b7a
movq $0x5, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x677f0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x66b43
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x66b81
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x25(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x69700
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x66b68
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x66b81
movb -0x25(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEncProps_Init
void LzmaEncProps_Init(CLzmaEncProps *p)
{
  p->level = 5;
  p->dictSize = p->mc = 0;
  p->reduceSize = (UInt64)(Int64)-1;
  p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
  p->numHashOutBits = 0;
  p->writeEndMark = 0;
  p->affinity = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x5, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_Create
CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc)
{
  void *p;
  p = ISzAlloc_Alloc(alloc, sizeof(CLzmaEnc));
  if (p)
    LzmaEnc_Construct((CLzmaEnc *)p);
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x207a8, %esi          # imm = 0x207A8
callq *%rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x67a02
movq -0x10(%rbp), %rdi
callq 0x67a10
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_Construct
static void LzmaEnc_Construct(CLzmaEnc *p)
{
  RangeEnc_Construct(&p->rc);
  MatchFinder_Construct(&MFB);
  
  #ifndef Z7_ST
  p->matchFinderMt.MatchFinder = &MFB;
  MatchFinderMt_Construct(&p->matchFinderMt);
  #endif

  {
    CLzmaEncProps props;
    LzmaEncProps_Init(&props);
    LzmaEnc_SetProps((CLzmaEncHandle)(void *)p, &props);
  }

  #ifndef LZMA_LOG_BSR
  LzmaEnc_FastPosInit(p->g_FastPos);
  #endif

  LzmaEnc_InitPriceTables(p->ProbPrices);
  p->litProbs = NULL;
  p->saveState.litProbs = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x699d0
movq -0x8(%rbp), %rdi
addq $0x628, %rdi            # imm = 0x628
callq 0x6f2f0
movq -0x8(%rbp), %rcx
addq $0x628, %rcx            # imm = 0x628
movq -0x8(%rbp), %rax
movq %rcx, 0x620(%rax)
movq -0x8(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x75440
leaq -0x50(%rbp), %rdi
callq 0x670d0
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x677f0
movq -0x8(%rbp), %rdi
addq $0x3080, %rdi           # imm = 0x3080
callq 0x69a00
movq -0x8(%rbp), %rdi
addq $0xb30, %rdi            # imm = 0xB30
callq 0x69aa0
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f888(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_Destruct
static void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  #ifndef Z7_ST
  MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
  #endif
  
  MatchFinder_Free(&MFB, allocBig);
  LzmaEnc_FreeLits(p, alloc);
  RangeEnc_Free(&p->rc, alloc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq -0x18(%rbp), %rsi
callq 0x75510
movq -0x8(%rbp), %rdi
addq $0x628, %rdi            # imm = 0x628
movq -0x18(%rbp), %rsi
callq 0x6f400
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x69b40
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
movq -0x10(%rbp), %rsi
callq 0x69ba0
addq $0x20, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_AllocAndInit
static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  unsigned i;
  for (i = kEndPosModelIndex / 2; i < kDicLogSizeMax; i++)
    if (p->dictSize <= ((UInt32)1 << i))
      break;
  p->distTableSize = i * 2;

  p->finished = False;
  p->result = SZ_OK;
  p->nowPos64 = 0;
  p->needInit = 1;
  RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig))
  LzmaEnc_Init(p);
  LzmaEnc_InitPrices(p);
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x7, -0x2c(%rbp)
cmpl $0x20, -0x2c(%rbp)
jae 0x67bfd
movq -0x10(%rbp), %rax
movl 0xf4(%rax), %eax
movl -0x2c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
ja 0x67bf0
jmp 0x67bfd
jmp 0x67bf2
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x67bce
movl -0x2c(%rbp), %ecx
shll %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xd4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xf8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xdc(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x69be0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x67c6a
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x67c83
movq -0x10(%rbp), %rdi
callq 0x67f20
movq -0x10(%rbp), %rdi
callq 0x68200
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_CodeOneMemBlock
SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle p, BoolInt reInit,
    Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
{
  // GET_CLzmaEnc_p
  UInt64 nowPos64;
  SRes res;
  CLzmaEnc_SeqOutStreamBuf outStream;

  outStream.vt.Write = SeqOutStreamBuf_Write;
  outStream.data = dest;
  outStream.rem = *destLen;
  outStream.overflow = False;

  p->writeEndMark = False;
  p->finished = False;
  p->result = SZ_OK;

  if (reInit)
    LzmaEnc_Init(p);
  LzmaEnc_InitPrices(p);
  RangeEnc_Init(&p->rc);
  p->rc.outStream = &outStream.vt;
  nowPos64 = p->nowPos64;
  
  res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
  
  *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
  *destLen -= outStream.rem;
  if (outStream.overflow)
    return SZ_ERROR_OUTPUT_EOF;

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
leaq 0xea(%rip), %rax        # 0x67e90
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0xd0(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xd4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xf8(%rax)
cmpl $0x0, -0x14(%rbp)
je 0x67dfd
movq -0x10(%rbp), %rdi
callq 0x67f20
movq -0x10(%rbp), %rdi
callq 0x68200
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x682d0
leaq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rax
movl (%rax), %edx
callq 0x68330
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
subq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x58(%rbp), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x50(%rbp)
je 0x67e7d
movl $0x7, -0x4(%rbp)
jmp 0x67e83
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: SeqOutStreamBuf_Write
static size_t SeqOutStreamBuf_Write(ISeqOutStreamPtr pp, const void *data, size_t size)
{
  Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR_pp_vt_p(CLzmaEnc_SeqOutStreamBuf)
  if (p->rem < size)
  {
    size = p->rem;
    p->overflow = True;
  }
  if (size != 0)
  {
    memcpy(p->data, data, size);
    p->rem -= size;
    p->data += size;
  }
  return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x67ed1
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x18(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x67f10
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4320
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_InitPrices
static void LzmaEnc_InitPrices(CLzmaEnc *p)
{
  if (!p->fastMode)
  {
    FillDistancesPrices(p);
    FillAlignPrices(p);
  }

  p->lenEnc.tableSize =
  p->repLenEnc.tableSize =
      p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN;

  p->repLenEncCounter = REP_LEN_COUNT;

  LenPriceEnc_UpdateTables(&p->lenEnc, (unsigned)1 << p->pb, &p->lenProbs, p->ProbPrices);
  LenPriceEnc_UpdateTables(&p->repLenEnc, (unsigned)1 << p->pb, &p->repLenProbs, p->ProbPrices);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xcc(%rax)
jne 0x6822b
movq -0x8(%rbp), %rdi
callq 0x69fa0
movq -0x8(%rbp), %rdi
callq 0x6a630
movq -0x8(%rbp), %rax
movl 0x48(%rax), %ecx
addl $0x1, %ecx
subl $0x2, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xb484(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x7080(%rax)
movq -0x8(%rbp), %rax
movl $0x40, 0xec(%rax)
movq -0x8(%rbp), %rdi
addq $0x7080, %rdi           # imm = 0x7080
movq -0x8(%rbp), %rax
movl 0xc4(%rax), %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x8(%rbp), %rdx
addq $0x2880, %rdx           # imm = 0x2880
movq -0x8(%rbp), %rcx
addq $0xb30, %rcx            # imm = 0xB30
callq 0x6a7c0
movq -0x8(%rbp), %rdi
addq $0xb484, %rdi           # imm = 0xB484
movq -0x8(%rbp), %rax
movl 0xc4(%rax), %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x8(%rbp), %rdx
addq $0x2c80, %rdx           # imm = 0x2C80
movq -0x8(%rbp), %rcx
addq $0xb30, %rcx            # imm = 0xB30
callq 0x6a7c0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_Init
static void RangeEnc_Init(CRangeEnc *p)
{
  p->range = 0xFFFFFFFF;
  p->cache = 0;
  p->low = 0;
  p->cacheSize = 0;

  p->buf = p->bufBase;

  p->processed = 0;
  p->res = SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_Encode2
Z7_NO_INLINE
static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgressPtr progress)
{
  SRes res = SZ_OK;

  #ifndef Z7_ST
  Byte allocaDummy[0x300];
  allocaDummy[0] = 0;
  allocaDummy[1] = allocaDummy[0];
  #endif

  for (;;)
  {
    res = LzmaEnc_CodeOneBlock(p, 0, 0);
    if (res != SZ_OK || p->finished)
      break;
    if (progress)
    {
      res = ICompressProgress_Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc));
      if (res != SZ_OK)
      {
        res = SZ_ERROR_PROGRESS;
        break;
      }
    }
  }
  
  LzmaEnc_Finish((CLzmaEncHandle)(void *)p);

  /*
  if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&MFB))
    res = SZ_ERROR_FAIL;
  }
  */

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movb $0x0, -0x320(%rbp)
movb -0x320(%rbp), %al
movb %al, -0x31f(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x68330
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x69670
movq -0x8(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
je 0x69672
jmp 0x696dc
cmpq $0x0, -0x10(%rbp)
je 0x696d7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0xe0(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0xa8(%rcx), %rdx
movq -0x8(%rbp), %rcx
movq 0x88(%rcx), %rcx
movq -0x8(%rbp), %r8
movq 0x98(%r8), %r8
subq %r8, %rcx
addq %rcx, %rdx
movq -0x8(%rbp), %rcx
addq 0x80(%rcx), %rdx
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x696d5
movl $0xa, -0x14(%rbp)
jmp 0x696dc
jmp 0x696d7
jmp 0x6964d
movq -0x8(%rbp), %rdi
callq 0x67d10
movl -0x14(%rbp), %eax
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_WriteProperties
SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *props, SizeT *size)
{
  if (*size < LZMA_PROPS_SIZE)
    return SZ_ERROR_PARAM;
  *size = LZMA_PROPS_SIZE;
  {
    // GET_CLzmaEnc_p
    const UInt32 dictSize = p->dictSize;
    UInt32 v;
    props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
    
    // we write aligned dictionary value to properties for lzma decoder
    if (dictSize >= ((UInt32)1 << 21))
    {
      const UInt32 kDictMask = ((UInt32)1 << 20) - 1;
      v = (dictSize + kDictMask) & ~kDictMask;
      if (v < dictSize)
        v = dictSize;
    }
    else
    {
      unsigned i = 11 * 2;
      do
      {
        v = (UInt32)(2 + (i & 1)) << (i >> 1);
        i++;
      }
      while (v < dictSize);
    }

    SetUi32(props + 1, v)
    return SZ_OK;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x5, (%rax)
jae 0x69726
movl $0x5, -0x4(%rbp)
jmp 0x697d6
movq -0x20(%rbp), %rax
movq $0x5, (%rax)
movq -0x10(%rbp), %rax
movl 0xf4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
imull $0x5, 0xc4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xc0(%rcx), %eax
imull $0x9, %eax, %eax
movq -0x10(%rbp), %rcx
addl 0xbc(%rcx), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
cmpl $0x200000, -0x24(%rbp)  # imm = 0x200000
jb 0x69798
movl $0xfffff, -0x2c(%rbp)   # imm = 0xFFFFF
movl -0x24(%rbp), %eax
addl $0xfffff, %eax          # imm = 0xFFFFF
andl $0xfff00000, %eax       # imm = 0xFFF00000
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x69796
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x697c5
movl $0x16, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl $0x1, %eax
addl $0x2, %eax
movl -0x30(%rbp), %ecx
shrl %ecx
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jb 0x6979f
jmp 0x697c5
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_MemEncode
SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
    int writeEndMark, ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  SRes res;
  // GET_CLzmaEnc_p

  CLzmaEnc_SeqOutStreamBuf outStream;

  outStream.vt.Write = SeqOutStreamBuf_Write;
  outStream.data = dest;
  outStream.rem = *destLen;
  outStream.overflow = False;

  p->writeEndMark = writeEndMark;
  p->rc.outStream = &outStream.vt;

  res = LzmaEnc_MemPrepare(p, src, srcLen, 0, alloc, allocBig);
  
  if (res == SZ_OK)
  {
    res = LzmaEnc_Encode2(p, progress);
    if (res == SZ_OK && p->nowPos64 != srcLen)
      res = SZ_ERROR_FAIL;
  }

  *destLen -= (SizeT)outStream.rem;
  if (outStream.overflow)
    return SZ_ERROR_OUTPUT_EOF;
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
leaq -0x19a3(%rip), %rax     # 0x67e90
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xd0(%rax)
leaq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %r9
xorl %ecx, %ecx
callq 0x67c90
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jne 0x698c1
movq -0x10(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x69620
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jne 0x698bf
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0x698bf
movl $0xb, -0x38(%rbp)
jmp 0x698c1
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x40(%rbp)
je 0x698e1
movl $0x7, -0x4(%rbp)
jmp 0x698e7
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq