LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rax
movq (%rdi), %rax
movq 0x28(%rax), %rdi
subq %rsi, %rdi
jb 0x20ec8
movq %rcx, %r8
subq %rdx, %r8
cmpq %rdi, %r8
ja 0x20edd
movq 0x20(%rax), %rdi
movq 0x10(%rdi), %rax
popq %r8
jmpq *%rax
movq 0x540f9(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x3217e(%rip), %rdi     # 0x53057
pushq $0x2a
jmp 0x20ef0
movq 0x540e4(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x32194(%rip), %rdi     # 0x53082
pushq $0x67
popq %rsi
pushq $0x1
popq %rdx
callq 0x4680
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_write_check(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
hpatch_BOOL _TCheckOutNewDataStream::_write_check(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t writeToPos,
                                                  const unsigned char* data,const unsigned char* data_end){
    _TCheckOutNewDataStream* self=(_TCheckOutNewDataStream*)stream->streamImport;
    _test_rt(self->writedLen==writeToPos);
    self->writedLen+=(size_t)(data_end-data);
    _test_rt(self->writedLen<=self->streamSize);
    
    hpatch_StreamPos_t readPos=writeToPos;
    while (data<data_end) {
        size_t readLen=(size_t)(data_end-data);
        if (readLen>self->bufSize) readLen=self->bufSize;
        _test_rt(self->newData->read(self->newData,readPos,self->buf,self->buf+readLen));
        _test_rt(0==memcmp(data,self->buf,readLen));
        data+=readLen;
        readPos+=readLen;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
cmpq %rsi, 0x28(%r13)
jne 0x20f7c
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rcx, %rax
subq %rdx, %rax
addq %rsi, %rax
movq %rax, 0x28(%r13)
cmpq 0x8(%r13), %rax
ja 0x20f91
pushq $0x1
popq %rbp
cmpq %rbx, %r14
jae 0x20fd7
movq %rbx, %r12
subq %r14, %r12
movq 0x38(%r13), %rax
cmpq %rax, %r12
cmovaeq %rax, %r12
movq 0x20(%r13), %rdi
movq 0x30(%r13), %rdx
leaq (%rdx,%r12), %rcx
movq %r15, %rsi
callq *0x10(%rdi)
testl %eax, %eax
je 0x20fa4
movq 0x30(%r13), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4350
testl %eax, %eax
jne 0x20fb9
addq %r12, %r14
addq %r12, %r15
jmp 0x20f31
movq 0x54045(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x3215d(%rip), %rdi     # 0x530ea
pushq $0x29
jmp 0x20fcc
movq 0x54030(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x32172(%rip), %rdi     # 0x53114
jmp 0x20fca
movq 0x5401d(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x3218f(%rip), %rdi     # 0x53144
pushq $0x54
jmp 0x20fcc
movq 0x54008(%rip), %rax     # 0x74fc8
movq (%rax), %rcx
leaq 0x321cf(%rip), %rdi     # 0x53199
pushq $0x2f
popq %rsi
pushq $0x1
popq %rdx
callq 0x4680
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x2100c
movq %rax, 0x8(%rbx)
testq %r15, %r15
je 0x21078
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x21078
callq *0x8(%r15)
cmpq 0x8(%r14), %rax
jbe 0x21078
movq %rbx, %rdi
movq %rax, %rsi
callq 0x843c
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0x3a656
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x18(%r15)
testq %rax, %rax
je 0x2106b
testb %bpl, %bpl
jne 0x2105e
cmpq 0x8(%r14), %rax
jae 0x2106b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x843c
jmp 0x21078
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x21078
movq %rax, 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h
// Function: hdiff_private::TCovers::covers(unsigned long, hpatch_TCover*) const
inline void covers(size_t index,TCover* out_cover)const{
        if (_isCover32) {
            const hpatch_TCover32& c32=((const hpatch_TCover32*)_covers)[index];
            out_cover->oldPos=c32.oldPos;
            out_cover->newPos=c32.newPos;
            out_cover->length=c32.length;
        }else{
            *out_cover=((const hpatch_TCover*)_covers)[index];
        }
    }

// Assembly:
movq 0x10(%rdi), %rax
cmpb $0x1, 0x20(%rdi)
jne 0x210ab
imulq $0xc, %rsi, %rcx
movsd (%rax,%rcx), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movups %xmm0, (%rdx)
movl 0x8(%rax,%rcx), %eax
movq %rax, 0x10(%rdx)
retq
imulq $0x18, %rsi, %rcx
movq 0x10(%rax,%rcx), %rsi
movq %rsi, 0x10(%rdx)
movups (%rax,%rcx), %xmm0
movups %xmm0, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h
// Function: sssort_thread(int*, int*, long long*, long long*, mt_data_t*)
static void _sssort_thread(saint_t* c0,saint_t* c1,saidx_t* j,
                           sastore_t *buf,mt_data_t* mt){
    saidx_t k = 0;
    saidx_t l;
    const saidx_t*  bucket_B=mt->bucket_B;
    for(;;) {
        {
            CAutoLocker __autoLocker(mt->locker.locker);
            if(0 < (l = *j)) {
                saint_t d0 = *c0, d1 = *c1;
                do {
                k = BUCKET_BSTAR(d0, d1);
                if(--d1 <= d0) {
                    d1 = ALPHABET_SIZE - 1;
                    if(--d0 < 0) { break; }
                }
                } while(((l - k) <= 1) && (0 < (l = k)));
                *c0 = d0, *c1 = d1, *j = k;
            }
        }
        if(l == 0) { break; }
        sastore_t* SA=mt->SA;
        sssort(mt->T, mt->PAb, SA + k, SA + l,
               buf, mt->bufsize, 2, mt->n, *(SA + k) == (mt->m - 1));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %r13
movq 0x18(%r8), %r14
xorl %r12d, %r12d
movq (%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x1b906
movq (%r15), %rbp
testq %rbp, %rbp
jle 0x2577c
movl (%r13), %edx
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %edx, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movslq %ecx, %rcx
movq (%r14,%rcx,8), %r12
decl %eax
cmpl %edx, %eax
jle 0x25749
movl %edx, %ecx
jmp 0x25755
leal -0x1(%rdx), %ecx
movl $0xff, %eax
testl %edx, %edx
jle 0x2576e
movq %rbp, %rdx
subq %r12, %rdx
cmpq $0x1, %rdx
jg 0x2576e
movq %r12, %rbp
movl %ecx, %edx
testq %r12, %r12
jg 0x25731
movq %r12, %rbp
movl %ecx, (%r13)
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq %r12, (%r15)
leaq 0x18(%rsp), %rdi
callq 0x1bacc
testq %rbp, %rbp
je 0x257d2
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rsi
leaq (%rax,%r12,8), %rdx
leaq (%rax,%rbp,8), %rcx
movq 0x28(%rbx), %r9
movq 0x38(%rbx), %rax
decq %rax
xorl %r10d, %r10d
cmpq %rax, (%rdx)
sete %r10b
subq $0x8, %rsp
movq 0x18(%rsp), %r8
pushq %r10
pushq 0x30(%rbx)
pushq $0x2
callq 0x220be
addq $0x20, %rsp
jmp 0x25711
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x2af30
andq $0x0, 0x48(%rbx)
orq $-0x1, 0x50(%rbx)
orl $-0x1, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x36b0, %esi           # imm = 0x36B0
callq *(%rdi)
movq %rax, %rbx
testq %rax, %rax
je 0x2a43a
movq %rbx, %r12
addq $0x8, %r12
movq %r12, %rdi
callq 0x2a1fc
movq %r12, %rdi
callq 0x2a215
orq $-0x1, 0x68(%rbx)
andq $0x0, 0x70(%rbx)
movq %r15, 0x78(%rbx)
movq %r14, 0x80(%rbx)
movl $0x88, %eax
cmpq $0x688, %rax            # imm = 0x688
je 0x2a415
andq $0x0, (%rbx,%rax)
addq $0x18, %rax
jmp 0x2a402
andl $0x0, 0x908(%rbx)
xorl %eax, %eax
cmpq $0x4c, %rax
je 0x2a432
andq $0x0, 0x3450(%rbx,%rax,8)
incq %rax
jmp 0x2a41e
andq $0x0, 0x6a0(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x88, %r14d
cmpq $0x688, %r14            # imm = 0x688
je 0x2a483
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2a47d
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
callq 0x2b578
andq $0x0, (%rbx,%r14)
addq $0x18, %r14
jmp 0x2a456
cmpl $0x0, 0x908(%rbx)
je 0x2a49f
leaq 0x910(%rbx), %rdi
callq 0x3324e
andl $0x0, 0x908(%rbx)
movq %rbx, %rdi
callq 0x2a4cb
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdi
callq *0x8(%rdi)
andq $0x0, 0x70(%rbx)
movq 0x78(%rbx), %rdi
movq 0x8(%rdi), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x4c, %r14
je 0x2a4fd
movq 0x3450(%rbx,%r14,8), %rsi
testq %rsi, %rsi
je 0x2a4f8
movq 0x78(%rbx), %rdi
callq *0x8(%rdi)
andq $0x0, 0x3450(%rbx,%r14,8)
incq %r14
jmp 0x2a4d5
andq $0x0, 0x6a0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x9
popq %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r15, %rdi
callq 0x2af63
movl 0xc(%r15), %eax
addl 0x8(%r15), %eax
cmpl $0x4, %eax
jle 0x2a544
pushq $0x5
popq %rax
jmp 0x2a55e
addq $0x8, %rbx
pushq $0xc
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x2a215
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rax
addq $0x8, %rdi
callq 0x2b062
movl %eax, %edx
xorl %eax, %eax
cmpl $0x28, %eax
je 0x2a599
movl %eax, %esi
andl $0x1, %esi
orl $0x2, %esi
movl %eax, %ecx
shrl %ecx
addb $0xb, %cl
shll %cl, %esi
cmpl %esi, %edx
jbe 0x2a599
incl %eax
jmp 0x2a57b
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %rbp
movq %rcx, %r12
movl %esi, %r14d
movq %rdi, %rbx
movq 0x6a0(%rdi), %rsi
movq %rsi, 0x10(%rsp)
movl %edx, %r15d
movq 0x3450(%rdi,%r15,8), %r13
andq $0x0, 0x6a8(%rdi,%r15,8)
testq %r13, %r13
jne 0x2a7d2
movq 0x78(%rbx), %rdi
callq *(%rdi)
testq %rax, %rax
je 0x2a84b
movq %rax, %r13
movq %rax, 0x3450(%rbx,%r15,8)
movq %r12, (%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x33188
leaq 0xc78(%rbx), %rax
movq %rax, 0x8(%r12)
movl %r14d, %eax
imulq $0x18, %rax, %rax
leaq (%rbx,%rax), %rsi
addq $0x88, %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
xorl %edx, %edx
movq %r13, %rcx
movq %r14, %r8
xorl %r9d, %r9d
pushq %r12
pushq 0x10(%rsp)
pushq %rbp
pushq 0x18(%rsp)
callq 0x2a8bc
addq $0x20, %rsp
movq (%r14), %rcx
movq %rcx, 0x6a8(%rbx,%r15,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x2
popq %rax
jmp 0x2a83c
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl %esi, %eax
movq 0x6a8(%rdi,%rax,8), %rbx
movq 0x3450(%rdi,%rax,8), %rsi
movq 0x688(%rdi), %rdi
testq %rdi, %rdi
je 0x2a887
movq %rbx, %rdx
callq *(%rdi)
xorl %ecx, %ecx
cmpq %rbx, %rax
setne %cl
leal (%rcx,%rcx,8), %eax
jmp 0x2a8b4
cmpq 0x698(%r14), %rbx
jbe 0x2a895
pushq $0x7
popq %rax
jmp 0x2a8b4
movq 0x690(%r14), %rdi
movq %rbx, %rdx
callq 0x42c0
subq %rbx, 0x698(%r14)
addq %rbx, 0x690(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdx), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rdi), %rcx
cmpq $-0x1, %rcx
je 0x2aef5
subq 0x18(%r14), %rcx
cmpq %rcx, %rax
jbe 0x2aef5
movq %rcx, 0x8(%rsp)
movq %rcx, %rax
testq %rax, %rax
je 0x2af1d
movq 0x8(%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq *(%rdi)
movq (%r15), %rcx
xorl %edx, %edx
testq %rcx, %rcx
sete %dl
movl %edx, 0x20(%r14)
addq %rcx, 0x18(%r14)
jmp 0x2af21
xorl %ecx, %ecx
xorl %eax, %eax
movq %rcx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq $0x5, (%rdi)
orq $-0x1, 0x38(%rdi)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rdi)
movdqu %xmm0, 0x14(%rdi)
andq $0x0, 0x24(%rdi)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x2c(%rdi)
andq $0x0, 0x40(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEncProps_Normalize
void LzmaEncProps_Normalize(CLzmaEncProps *p)
{
  int level = p->level;
  if (level < 0) level = 5;
  p->level = level;
  
  if (p->dictSize == 0)
    p->dictSize = (unsigned)level <= 4 ?
        (UInt32)1 << (level * 2 + 16) :
        (unsigned)level <= sizeof(size_t) / 2 + 4 ?
          (UInt32)1 << (level + 20) :
          (UInt32)1 << (sizeof(size_t) / 2 + 24);

  if (p->dictSize > p->reduceSize)
  {
    UInt32 v = (UInt32)p->reduceSize;
    const UInt32 kReduceMin = ((UInt32)1 << 12);
    if (v < kReduceMin)
      v = kReduceMin;
    if (p->dictSize > v)
      p->dictSize = v;
  }

  if (p->lc < 0) p->lc = 3;
  if (p->lp < 0) p->lp = 0;
  if (p->pb < 0) p->pb = 2;

  if (p->algo < 0) p->algo = (unsigned)level < 5 ? 0 : 1;
  if (p->fb < 0) p->fb = (unsigned)level < 7 ? 32 : 64;
  if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
  if (p->numHashBytes < 0) p->numHashBytes = (p->btMode ? 4 : 5);
  if (p->mc == 0) p->mc = (16 + ((unsigned)p->fb >> 1)) >> (p->btMode ? 0 : 1);
  
  if (p->numThreads < 0)
    p->numThreads =
      #ifndef Z7_ST
      ((p->btMode && p->algo) ? 2 : 1);
      #else
      1;
      #endif
}

// Assembly:
movl (%rdi), %ecx
movl 0x4(%rdi), %edx
testl %ecx, %ecx
pushq $0x5
popq %rax
cmovnsl %ecx, %eax
movl %eax, (%rdi)
testl %edx, %edx
jne 0x2af9d
cmpl $0x4, %eax
ja 0x2af87
leal (%rax,%rax), %ecx
movl $0x10000, %edx          # imm = 0x10000
shll %cl, %edx
jmp 0x2af9a
leal 0x14(%rax), %ecx
pushq $0x1
popq %rsi
shll %cl, %esi
cmpl $0x9, %eax
movl $0x10000000, %edx       # imm = 0x10000000
cmovbl %esi, %edx
movl %edx, 0x4(%rdi)
movl %edx, %esi
movq 0x38(%rdi), %rcx
cmpq %rsi, %rcx
jae 0x2afbd
cmpl $0x1001, %ecx           # imm = 0x1001
movl $0x1000, %esi           # imm = 0x1000
cmovael %ecx, %esi
cmpl %esi, %edx
jbe 0x2afbd
movl %esi, 0x4(%rdi)
cmpl $0x0, 0x8(%rdi)
jns 0x2afca
movl $0x3, 0x8(%rdi)
cmpl $0x0, 0xc(%rdi)
jns 0x2afd4
andl $0x0, 0xc(%rdi)
cmpl $0x0, 0x10(%rdi)
jns 0x2afe1
movl $0x2, 0x10(%rdi)
movl 0x14(%rdi), %edx
testl %edx, %edx
jns 0x2aff3
xorl %edx, %edx
cmpl $0x5, %eax
setae %dl
movl %edx, 0x14(%rdi)
movl 0x18(%rdi), %esi
testl %esi, %esi
jns 0x2b00c
xorl %esi, %esi
cmpl $0x7, %eax
setae %sil
shll $0x5, %esi
addl $0x20, %esi
movl %esi, 0x18(%rdi)
movl 0x1c(%rdi), %eax
testl %eax, %eax
jns 0x2b01d
xorl %eax, %eax
testl %edx, %edx
setne %al
movl %eax, 0x1c(%rdi)
cmpl $0x0, 0x20(%rdi)
jns 0x2b02e
xorl %ecx, %ecx
cmpl $0x1, %eax
adcl $0x4, %ecx
movl %ecx, 0x20(%rdi)
cmpl $0x0, 0x28(%rdi)
jne 0x2b043
shrl %esi
addl $0x10, %esi
testl %eax, %eax
sete %cl
shrl %cl, %esi
movl %esi, 0x28(%rdi)
cmpl $0x0, 0x30(%rdi)
js 0x2b04a
retq
testl %eax, %eax
sete %al
testl %edx, %edx
sete %cl
orb %al, %cl
movzbl %cl, %eax
pushq $0x2
popq %rcx
subl %eax, %ecx
movl %ecx, 0x30(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x48, %rsp
movl $0x207a8, %esi          # imm = 0x207A8
callq *(%rdi)
movq %rax, %rbx
testq %rax, %rax
je 0x2b56d
pxor %xmm0, %xmm0
movdqu %xmm0, 0x98(%rbx)
leaq 0x628(%rbx), %r14
movq %r14, %rdi
callq 0x2f42a
leaq 0x100(%rbx), %rdi
movq %r14, 0x620(%rbx)
callq 0x318fc
movq %rsp, %rsi
movq $0x5, (%rsi)
orq $-0x1, 0x38(%rsi)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rsi)
movdqu %xmm0, 0x14(%rsi)
andq $0x0, 0x24(%rsi)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x2c(%rsi)
andq $0x0, 0x40(%rsi)
movq %rbx, %rdi
callq 0x2b32f
movw $0x100, 0x3080(%rbx)    # imm = 0x100
movq %rbx, %rax
addq $0x3082, %rax           # imm = 0x3082
pushq $0x2
popq %rdx
pushq $0x1
popq %rsi
cmpl $0x1c, %edx
je 0x2b51b
movl %edx, %ecx
shrl %ecx
decb %cl
movq %rsi, %rdi
shlq %cl, %rdi
xorl %ecx, %ecx
cmpq %rcx, %rdi
je 0x2b514
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x2b507
addq %rdi, %rax
incl %edx
jmp 0x2b4f4
xorl %eax, %eax
cmpq $0x80, %rax
je 0x2b560
movl %eax, %ecx
shll $0x4, %ecx
orl $0x8, %ecx
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x4, %esi
je 0x2b54d
imull %ecx, %ecx
addl %edx, %edx
cmpl $0x10000, %ecx          # imm = 0x10000
jb 0x2b549
shrl %ecx
incl %edx
jmp 0x2b53b
incl %esi
jmp 0x2b531
movl $0xa1, %ecx
subl %edx, %ecx
movl %ecx, 0xb30(%rbx,%rax,4)
incq %rax
jmp 0x2b51d
andq $0x0, 0x68(%rbx)
andq $0x0, 0x1f888(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %rbx
leaq 0xc1(%rip), %rax        # 0x2b94d
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq (%rcx), %rax
movq %rax, 0x18(%rsp)
andl $0x0, 0x20(%rsp)
movq %rdi, %r15
andq $0x0, 0xd0(%rdi)
andl $0x0, 0xf8(%rdi)
testl %esi, %esi
je 0x2b8c1
movq %r15, %rdi
callq 0x2b98f
movq %r15, %rdi
callq 0x2bb1a
orl $-0x1, 0x70(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x74(%r15)
andl $0x0, 0x84(%r15)
movq 0x98(%r15), %rax
movq %rax, 0x88(%r15)
andq $0x0, 0xa8(%r15)
andl $0x0, 0xb0(%r15)
leaq 0x8(%rsp), %r12
movq %r12, 0xa0(%r15)
movl 0xe0(%r15), %r13d
movl (%r14), %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0x2bbb2
movl 0xe0(%r15), %ecx
subl %r13d, %ecx
movl %ecx, (%r14)
movq 0x10(%r12), %rcx
subq %rcx, (%rbx)
xorl %ecx, %ecx
cmpl %ecx, 0x18(%r12)
pushq $0x7
popq %rcx
cmovnel %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
cmpq %rdx, %rax
jae 0x2b96b
movl $0x1, 0x18(%r14)
movq %rax, %rbx
testq %rbx, %rbx
je 0x2b984
movq 0x8(%r14), %rdi
movq %rbx, %rdx
callq 0x42c0
subq %rbx, 0x10(%r14)
addq %rbx, 0x8(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0xcc(%rdi)
jne 0x2bb3d
movq %rbx, %rdi
callq 0x2e2e1
movq %rbx, %rdi
callq 0x2e5ec
movl 0x48(%rbx), %eax
decl %eax
movl %eax, 0xb484(%rbx)
movl %eax, 0x7080(%rbx)
movl $0x40, 0xec(%rbx)
movb 0xc4(%rbx), %cl
pushq $0x1
popq %rbp
movl %ebp, %esi
shll %cl, %esi
leaq 0xb484(%rbx), %r14
leaq 0x7080(%rbx), %rdi
leaq 0x2880(%rbx), %rdx
leaq 0xb30(%rbx), %r15
movq %r15, %rcx
callq 0x2e6d3
movb 0xc4(%rbx), %cl
shll %cl, %ebp
addq $0x2c80, %rbx           # imm = 0x2C80
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2e6d3
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0xa
popq %rbp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbb2
testl %eax, %eax
jne 0x2e0a5
cmpl $0x0, 0xd4(%rbx)
jne 0x2e0a9
testq %r14, %r14
je 0x2e058
movq 0xa8(%rbx), %rdx
movq 0xe0(%rbx), %rsi
addq 0x88(%rbx), %rdx
subq 0x98(%rbx), %rdx
addq 0x80(%rbx), %rdx
movq %r14, %rdi
callq *(%r14)
testl %eax, %eax
je 0x2e058
jmp 0x2e0ab
movl %eax, %ebp
jmp 0x2e0ab
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2b846
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq $0x5, (%rdx)
jae 0x2e0c4
pushq $0x5
popq %rax
retq
movq $0x5, (%rdx)
imull $0x5, 0xc4(%rdi), %ecx
movl 0xf4(%rdi), %eax
addl 0xc0(%rdi), %ecx
leal (%rcx,%rcx,8), %ecx
addl 0xbc(%rdi), %ecx
movb %cl, (%rsi)
cmpl $0x1fffff, %eax         # imm = 0x1FFFFF
jbe 0x2e103
leal 0xfffff(%rax), %edx
andl $0xfff00000, %edx       # imm = 0xFFF00000
cmpl %eax, %edx
cmovbel %eax, %edx
jmp 0x2e11a
pushq $0x16
popq %rdi
movl %edi, %edx
andl $0x1, %edx
orl $0x2, %edx
movl %edi, %ecx
shrl %ecx
shll %cl, %edx
incl %edi
cmpl %eax, %edx
jb 0x2e106
movl %edx, 0x1(%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq -0x27f3(%rip), %rax     # 0x2b94d
movq %rsp, %rdx
movq %rax, (%rdx)
movq %rsi, 0x8(%rdx)
movq (%rbx), %rax
movq %rax, 0x10(%rdx)
andl $0x0, 0x18(%rdx)
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %rax
movl %r9d, 0xd0(%rdi)
movq %rdx, 0xa0(%rdi)
movq %rcx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x2b815
testl %eax, %eax
jne 0x2e1a1
movq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x2e04b
testl %eax, %eax
jne 0x2e1a1
xorl %ecx, %ecx
cmpq %r14, 0xe0(%r15)
pushq $0xb
popq %rax
cmovel %ecx, %eax
movq 0x10(%rsp), %rcx
subq %rcx, (%rbx)
cmpl $0x0, 0x18(%rsp)
pushq $0x7
popq %rcx
cmovel %eax, %ecx
movl %ecx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEncode
SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
    const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
    ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  CLzmaEncHandle p = LzmaEnc_Create(alloc);
  SRes res;
  if (!p)
    return SZ_ERROR_MEM;

  res = LzmaEnc_SetProps(p, props);
  if (res == SZ_OK)
  {
    res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize);
    if (res == SZ_OK)
      res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen,
          writeEndMark, progress, alloc, allocBig);
  }

  LzmaEnc_Destroy(p, alloc, allocBig);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movq %r8, %rbx
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movq 0x58(%rsp), %rdi
callq 0x2b457
testq %rax, %rax
je 0x2e22f
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2b32f
testl %eax, %eax
jne 0x2e213
movq 0x40(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2e0ba
testl %eax, %eax
je 0x2e243
movl %eax, %ebx
movq 0x58(%rsp), %r15
movq 0x60(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2b578
jmp 0x2e232
pushq $0x2
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x48(%rsp), %r9d
subq $0x8, %rsp
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq 0x8(%rsp), %r8
movq 0x68(%rsp), %r12
pushq %r12
movq 0x68(%rsp), %r15
pushq %r15
pushq 0x68(%rsp)
callq 0x2e127
addq $0x20, %rsp
movl %eax, %ebx
jmp 0x2e21f
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_FreeLits
static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
{
  ISzAlloc_Free(alloc, p->litProbs);
  ISzAlloc_Free(alloc, p->saveState.litProbs);
  p->litProbs = NULL;
  p->saveState.litProbs = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rdi), %rsi
movq %rbx, %rdi
callq *0x8(%rbx)
movq 0x1f888(%r14), %rsi
movq %rbx, %rdi
callq *0x8(%rbx)
andq $0x0, 0x68(%r14)
andq $0x0, 0x1f888(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LenEnc_Init
static void LenEnc_Init(CLenEnc *p)
{
  unsigned i;
  for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++)
    p->low[i] = kProbInitValue;
  for (i = 0; i < kLenNumHighSymbols; i++)
    p->high[i] = kProbInitValue;
}

// Assembly:
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x2e2c7
movw $0x400, (%rdi,%rax,2)   # imm = 0x400
incq %rax
jmp 0x2e2b4
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x2e2e0
movw $0x400, 0x200(%rdi,%rax,2) # imm = 0x400
incq %rax
jmp 0x2e2c9
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: FillAlignPrices
Z7_NO_INLINE static void FillAlignPrices(CLzmaEnc *p)
{
  unsigned i;
  const CProbPrice *ProbPrices = p->ProbPrices;
  const CLzmaProb *probs = p->posAlignEncoder;
  // p->alignPriceCount = 0;
  for (i = 0; i < kAlignTableSize / 2; i++)
  {
    UInt32 price = 0;
    unsigned sym = i;
    unsigned m = 1;
    unsigned bit;
    UInt32 prob;
    bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
    bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
    bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit;
    prob = probs[m];
    p->alignPrices[i    ] = price + GET_PRICEa_0(prob);
    p->alignPrices[i + 8] = price + GET_PRICEa_1(prob);
    // p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices);
  }
}

// Assembly:
pushq %rbx
movzwl 0x2202(%rdi), %eax
xorl %ecx, %ecx
movl $0x7f0, %edx            # imm = 0x7F0
cmpq $0x8, %rcx
je 0x2e6d1
movl %ecx, %esi
andl $0x1, %esi
movl %ecx, %r8d
shrl %r8d
andl $0x1, %r8d
leal 0x4(,%rsi,2), %r10d
leal (%r8,%rsi,2), %r9d
addl $0x4, %r9d
movl %esi, %r11d
negl %r11d
andl %edx, %r11d
xorl %eax, %r11d
shrl $0x4, %r11d
negl %r8d
movl %ecx, %ebx
shrl $0x2, %ebx
movzwl 0x2200(%rdi,%r10), %esi
andl %edx, %r8d
xorl %esi, %r8d
shrl $0x4, %r8d
movl 0xb30(%rdi,%r8,4), %esi
addl 0xb30(%rdi,%r11,4), %esi
leal (%r9,%r9), %r8d
movzwl 0x2200(%rdi,%r8), %r8d
movl %ebx, %r10d
negl %r10d
andl %edx, %r10d
xorl %r8d, %r10d
shrl $0x2, %r10d
andl $0x3ffc, %r10d          # imm = 0x3FFC
addl 0xb30(%rdi,%r10), %esi
leal (%rbx,%r9,2), %r8d
movzwl 0x2200(%rdi,%r8,2), %r8d
shrl $0x2, %r8d
andl $-0x4, %r8d
movl 0xb30(%rdi,%r8), %r9d
addl %esi, %r9d
movl %r9d, 0x15c0(%rdi,%rcx,4)
xorl $0x1fc, %r8d            # imm = 0x1FC
addl 0xb30(%rdi,%r8), %esi
movl %esi, 0x15e0(%rdi,%rcx,4)
incq %rcx
jmp 0x2e5fb
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: SetPrices_3
static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices)
{
  unsigned i;
  for (i = 0; i < 8; i += 2)
  {
    UInt32 price = startPrice;
    UInt32 prob;
    price += GET_PRICEa(probs[1           ], (i >> 2));
    price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1);
    prob = probs[4 + (i >> 1)];
    prices[i    ] = price + GET_PRICEa_0(prob);
    prices[i + 1] = price + GET_PRICEa_1(prob);
  }
}

// Assembly:
pushq %rbx
movzwl 0x2(%rdi), %eax
xorl %r8d, %r8d
movl $0x7f0, %r9d            # imm = 0x7F0
cmpq $0x7, %r8
ja 0x2e8da
movl %r8d, %r10d
shrl $0x2, %r10d
movzwl 0x4(%rdi,%r10,2), %r11d
negl %r10d
andl %r9d, %r10d
xorl %eax, %r10d
shrl $0x4, %r10d
movl (%rcx,%r10,4), %r10d
addl %esi, %r10d
movl %r8d, %ebx
shll $0x1e, %ebx
sarl $0x1f, %ebx
andl %r9d, %ebx
xorl %r11d, %ebx
shrl $0x4, %ebx
addl (%rcx,%rbx,4), %r10d
movzwl 0x8(%rdi,%r8), %r11d
shrl $0x2, %r11d
andl $-0x4, %r11d
movl (%rcx,%r11), %ebx
addl %r10d, %ebx
movl %ebx, (%rdx,%r8,4)
xorl $0x1fc, %r11d           # imm = 0x1FC
addl (%rcx,%r11), %r10d
movl %r10d, 0x4(%rdx,%r8,4)
addq $0x2, %r8
jmp 0x2e86e
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: CheckErrors
static SRes CheckErrors(CLzmaEnc *p)
{
  if (p->result != SZ_OK)
    return p->result;
  if (p->rc.res != SZ_OK)
    p->result = SZ_ERROR_WRITE;

  #ifndef Z7_ST
  if (
      // p->mf_Failure ||
        (p->mtMode &&
          ( // p->matchFinderMt.failure_LZ_LZ ||
            p->matchFinderMt.failure_LZ_BT))
     )
  {
    p->result = MY_HRES_ERROR_INTERNAL_ERROR;
    // printf("\nCheckErrors p->matchFinderMt.failureLZ\n");
  }
  #endif

  if (MFB.result != SZ_OK)
    p->result = SZ_ERROR_READ;
  
  if (p->result != SZ_OK)
    p->finished = True;
  return p->result;
}

// Assembly:
movl 0xf8(%rdi), %eax
testl %eax, %eax
je 0x2e8e7
retq
movl 0xb0(%rdi), %ecx
testl %ecx, %ecx
je 0x2e900
movl $0x9, 0xf8(%rdi)
pushq $0x9
popq %rax
jmp 0x2e902
xorl %eax, %eax
cmpl $0x0, 0xfc(%rdi)
je 0x2e92e
cmpl $0x0, 0x148(%rdi)
je 0x2e92e
movl $0x8007054f, 0xf8(%rdi) # imm = 0x8007054F
cmpl $0x0, 0x69c(%rdi)
jne 0x2e937
movl $0x8007054f, %eax       # imm = 0x8007054F
jmp 0x2e944
cmpl $0x0, 0x69c(%rdi)
je 0x2e94f
movl $0x8, 0xf8(%rdi)
pushq $0x8
popq %rax
movl $0x1, 0xd4(%rdi)
retq
testl %ecx, %ecx
jne 0x2e944
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: Flush
Z7_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
{
  /* ReleaseMFStream(); */
  p->finished = True;
  if (p->writeEndMark)
    WriteEndMarker(p, nowPos & p->pbMask);
  RangeEnc_FlushData(&p->rc);
  RangeEnc_FlushStream(&p->rc);
  return CheckErrors(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, 0xd4(%rdi)
cmpl $0x0, 0xd0(%rdi)
je 0x2eb00
movl %esi, %r15d
andl 0x64(%rbx), %r15d
leaq 0x70(%rbx), %r14
movl 0x44(%rbx), %eax
movl 0x70(%rbx), %ebp
movq %rax, %rcx
shlq $0x5, %rcx
addq %rbx, %rcx
movzwl 0x2280(%rcx,%r15,2), %edx
movl %ebp, %esi
shrl $0xb, %esi
imull %edx, %esi
subl %esi, %ebp
addq %rsi, 0x78(%rbx)
movl %edx, %esi
shrl $0x5, %esi
subl %esi, %edx
movw %dx, 0x2280(%rcx,%r15,2)
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x2e9d0
shll $0x8, %ebp
movq %r14, %rdi
callq 0x2ec6a
movl 0x44(%rbx), %eax
movzwl 0x2220(%rbx,%rax,2), %ecx
shrl $0xb, %ebp
imull %ecx, %ebp
movl $0x800, %edx            # imm = 0x800
subl %ecx, %edx
shrl $0x5, %edx
addl %ecx, %edx
movw %dx, 0x2220(%rbx,%rax,2)
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x2ea08
shll $0x8, %ebp
movq %r14, %rdi
callq 0x2ec6a
movl 0x44(%rbx), %eax
leaq 0x260a5(%rip), %rcx     # 0x54ab4
movzbl (%rax,%rcx), %eax
movl %eax, 0x44(%rbx)
movl %ebp, 0x70(%rbx)
leaq 0x2880(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %r15d, %ecx
callq 0x2ecf8
movl 0x70(%rbx), %r15d
pushq $0x1
popq %r12
movl %r12d, %eax
movzwl 0x2580(%rbx,%rax,2), %ecx
movl %r15d, %edx
shrl $0xb, %edx
imull %ecx, %edx
subl %edx, %r15d
addq %rdx, 0x78(%rbx)
movl %ecx, %edx
shrl $0x5, %edx
subl %edx, %ecx
movw %cx, 0x2580(%rbx,%rax,2)
cmpl $0xffffff, %r15d        # imm = 0xFFFFFF
ja 0x2ea74
shll $0x8, %r15d
movq %r14, %rdi
callq 0x2ec6a
leal 0x1(,%r12,2), %eax
cmpl $0x20, %r12d
movl %eax, %r12d
jb 0x2ea35
pushq $-0x1a
popq %rbp
movl %r15d, %eax
shrl %r15d
addq %r15, 0x78(%rbx)
cmpl $0x1ffffff, %eax        # imm = 0x1FFFFFF
ja 0x2eaa5
shll $0x8, %r15d
movq %r14, %rdi
callq 0x2ec6a
incl %ebp
jne 0x2ea88
pushq $0x1
popq %r12
movl %r12d, %eax
movzwl 0x2200(%rbx,%rax,2), %ecx
movl %r15d, %edx
shrl $0xb, %edx
imull %ecx, %edx
subl %edx, %r15d
addq %rdx, 0x78(%rbx)
movl %ecx, %edx
shrl $0x5, %edx
subl %edx, %ecx
movw %cx, 0x2200(%rbx,%rax,2)
cmpl $0xffffff, %r15d        # imm = 0xFFFFFF
ja 0x2eaec
shll $0x8, %r15d
movq %r14, %rdi
callq 0x2ec6a
leal 0x1(,%r12,2), %eax
cmpl $0x8, %r12d
movl %eax, %r12d
jb 0x2eaad
movl %r15d, (%r14)
leaq 0x70(%rbx), %r14
pushq $0x5
popq %rbp
subl $0x1, %ebp
jb 0x2eb16
movq %r14, %rdi
callq 0x2ec6a
jmp 0x2eb07
movq %r14, %rdi
callq 0x2ef40
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e8dc
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: ReadMatchDistances
static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
{
  unsigned numPairs;
  
  p->additionalOffset++;
  p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
  {
    const UInt32 *d = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
    // if (!d) { p->mf_Failure = True; *numPairsRes = 0;  return 0; }
    numPairs = (unsigned)(d - p->matches);
  }
  *numPairsRes = numPairs;
  
  #ifdef SHOW_STAT
  printf("\n i = %u numPairs = %u    ", g_STAT_OFFSET, numPairs / 2);
  g_STAT_OFFSET++;
  {
    unsigned i;
    for (i = 0; i < numPairs; i += 2)
      printf("%2u %6u   | ", p->matches[i], p->matches[i + 1]);
  }
  #endif
  
  if (numPairs == 0)
    return 0;
  {
    const unsigned len = p->matches[(size_t)numPairs - 2];
    if (len != p->numFastBytes)
      return len;
    {
      UInt32 numAvail = p->numAvail;
      if (numAvail > LZMA_MATCH_LEN_MAX)
        numAvail = LZMA_MATCH_LEN_MAX;
      {
        const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
        const Byte *p2 = p1 + len;
        const ptrdiff_t dif = (ptrdiff_t)-1 - (ptrdiff_t)p->matches[(size_t)numPairs - 1];
        const Byte *lim = p1 + numAvail;
        for (; p2 != lim && *p2 == p2[dif]; p2++)
        {}
        return (unsigned)(p2 - p1);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
incl 0x4c(%rdi)
movq (%rdi), %rdi
callq *0x10(%rbx)
movl %eax, 0x40(%rbx)
movq (%rbx), %rdi
leaq 0xd30(%rbx), %r15
movq %r15, %rsi
callq *0x20(%rbx)
subq %r15, %rax
shrq $0x2, %rax
movl %eax, (%r14)
testl %eax, %eax
je 0x2ebc3
movl %eax, %r12d
movl 0xd28(%rbx,%r12,4), %r14d
cmpl 0x48(%rbx), %r14d
jne 0x2ebd0
movl 0x40(%rbx), %eax
movl $0x111, %r15d           # imm = 0x111
cmpl %r15d, %eax
cmovbl %eax, %r15d
movq (%rbx), %rdi
callq *0x18(%rbx)
leaq -0x1(%rax), %rcx
leaq (%rax,%r14), %rdx
decq %rdx
movl 0xd2c(%rbx,%r12,4), %esi
addq %r15, %rax
decq %rax
negq %rsi
subq %r14, %r15
testq %r15, %r15
je 0x2ebcb
movb (%rdx), %dil
cmpb -0x1(%rdx,%rsi), %dil
jne 0x2ebc8
incq %rdx
decq %r15
jmp 0x2ebac
xorl %r14d, %r14d
jmp 0x2ebd0
movq %rdx, %rax
subl %ecx, %eax
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_ShiftLow
Z7_FASTCALL RangeEnc_ShiftLow(CRangeEnc *p)
{
  UInt32 low = (UInt32)p->low;
  unsigned high = (unsigned)(p->low >> 32);
  p->low = (UInt32)(low << 8);
  if (low < (UInt32)0xFF000000 || high != 0)
  {
    {
      Byte *buf = p->buf;
      *buf++ = (Byte)(p->cache + high);
      p->cache = (unsigned)(low >> 24);
      p->buf = buf;
      if (buf == p->bufLim)
        RangeEnc_FlushStream(p);
      if (p->cacheSize == 0)
        return;
    }
    high += 0xFF;
    for (;;)
    {
      Byte *buf = p->buf;
      *buf++ = (Byte)(high);
      p->buf = buf;
      if (buf == p->bufLim)
        RangeEnc_FlushStream(p);
      if (--p->cacheSize == 0)
        return;
    }
  }
  p->cacheSize++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rax, %r14
shrq $0x20, %r14
movl %eax, %ecx
shll $0x8, %ecx
movq %rcx, 0x8(%rdi)
cmpl $0xff000000, %eax       # imm = 0xFF000000
setae %cl
testq %r14, %r14
sete %dl
testb %cl, %dl
jne 0x2ecec
movq 0x18(%rbx), %rcx
movl 0x4(%rbx), %edx
addl %r14d, %edx
movb %dl, (%rcx)
incq %rcx
shrl $0x18, %eax
movl %eax, 0x4(%rbx)
movq %rcx, 0x18(%rbx)
cmpq 0x20(%rbx), %rcx
jne 0x2ecbe
movq %rbx, %rdi
callq 0x2ef40
cmpq $0x0, 0x10(%rbx)
je 0x2ecf0
decb %r14b
movq 0x18(%rbx), %rax
movb %r14b, (%rax)
incq %rax
movq %rax, 0x18(%rbx)
cmpq 0x20(%rbx), %rax
jne 0x2ece4
movq %rbx, %rdi
callq 0x2ef40
decq 0x10(%rbx)
jne 0x2ecc8
jmp 0x2ecf0
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_FlushStream
Z7_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p)
{
  const size_t num = (size_t)(p->buf - p->bufBase);
  if (p->res == SZ_OK)
  {
    if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num))
      p->res = SZ_ERROR_WRITE;
  }
  p->processed += num;
  p->buf = p->bufBase;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x28(%rdi), %rsi
subq %rsi, %r14
cmpl $0x0, 0x40(%rdi)
jne 0x2ef6d
movq 0x30(%rbx), %rdi
movq %r14, %rdx
callq *(%rdi)
cmpq %rax, %r14
je 0x2ef6d
movl $0x9, 0x40(%rbx)
addq %r14, 0x38(%rbx)
movq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq