LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: MatchFinderMt_GetNextBlock_Bt
Z7_NO_INLINE
static UInt32 MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p)
{
  if (p->failure_LZ_BT)
    p->btBufPos = p->failureBuf;
  else
  {
    const UInt32 bi = MtSync_GetNextBlock(&p->btSync);
    const UInt32 *bt = p->btBuf + GET_BT_BLOCK_OFFSET(bi);
    {
      const UInt32 numItems = bt[0];
      p->btBufPosLimit = bt + numItems;
      p->btNumAvailBytes = bt[1];
      p->btBufPos = bt + 2;
      if (numItems < 2 || numItems > kMtBtBlockSize)
      {
        p->failureBuf[0] = 0;
        p->btBufPos = p->failureBuf;
        p->btBufPosLimit = p->failureBuf + 1;
        p->failure_LZ_BT = True;
        // p->btNumAvailBytes = 0;
        /* we don't want to decrease AvailBytes, that was load before.
            that can be unxepected for the code that have loaded anopther value before */
      }
    }
  
    if (p->lzPos >= (UInt32)kMtMaxValForNormalize - (UInt32)kMtBtBlockSize)
    {
      /* we don't check (lzPos) over exact avail bytes in (btBuf).
         (fixedHashSize) is small, so normalization is fast */
      const UInt32 subValue = (p->lzPos - p->historySize - 1); // & ~(UInt32)(kNormalizeAlign - 1);
      p->lzPos -= subValue;
      MatchFinder_Normalize3(subValue, p->hash, p->fixedHashSize);
    }
  }
  return p->btNumAvailBytes;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x48(%rdi)
je 0x3b36e
leaq 0x4c(%rbx), %rax
movq %rax, 0x10(%rbx)
jmp 0x3b3e9
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x3b2c4
movq 0x8(%rbx), %rcx
andl $0xf, %eax
shll $0x12, %eax
leaq (%rcx,%rax), %rdx
addq %rcx, %rax
addq $0x8, %rax
movl -0x8(%rax), %ecx
leaq (%rdx,%rcx,4), %rdx
movq %rdx, 0x18(%rbx)
movl -0x4(%rax), %edx
movl %edx, 0x24(%rbx)
movq %rax, 0x10(%rbx)
leal -0x10001(%rcx), %eax
cmpl $0xffff0000, %eax       # imm = 0xFFFF0000
ja 0x3b3c5
leaq 0x4c(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movq $0x1, 0x48(%rbx)
movl 0x20(%rbx), %edi
cmpl $0xfffeffff, %edi       # imm = 0xFFFEFFFF
jb 0x3b3e9
movl 0x34(%rbx), %eax
leal 0x1(%rax), %ecx
notl %eax
addl %eax, %edi
movl %ecx, 0x20(%rbx)
movq 0x28(%rbx), %rsi
movl 0x30(%rbx), %edx
callq 0x37f0f
movl 0x24(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/CpuArch.c
// Function: CPU_IsSupported_SHA
BoolInt CPU_IsSupported_SHA(void)
{
  CHECK_SYS_SSE_SUPPORT

  if (z7_x86_cpuid_GetMaxFunc() < 7)
    return False;
  {
    UInt32 d[4];
    z7_x86_cpuid(d, 7);
    return (BoolInt)(d[1] >> 29) & 1;
  }
}

// Assembly:
pushq %rax
callq 0x3b8a4
xorl %esi, %esi
cmpl $0x7, %eax
jb 0x3b91b
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
shrl $0x1d, %esi
andl $0x1, %esi
movl %esi, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/CpuArch.c
// Function: CPU_IsSupported_SHA512
BoolInt CPU_IsSupported_SHA512(void)
{
  if (!CPU_IsSupported_AVX2()) return False; // maybe CPU_IsSupported_AVX() is enough here

  if (z7_x86_cpuid_GetMaxFunc() < 7)
    return False;
  {
    UInt32 d[4];
    z7_x86_cpuid_subFunc(d, 7, 0);
    if (d[0] < 1) // d[0] - is max supported subleaf value
      return False;
    z7_x86_cpuid_subFunc(d, 7, 1);
    return (BoolInt)(d[0]) & 1;
  }
}

// Assembly:
pushq %rbx
callq 0x3b965
xorl %ebx, %ebx
testl %eax, %eax
je 0x3b961
callq 0x3b8a4
cmpl $0x7, %eax
jb 0x3b961
xorl %ebx, %ebx
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testl %eax, %eax
je 0x3b961
movl $0x7, %eax
movl $0x1, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %eax, %ebx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/CpuArch.c
// Function: CPU_IsSupported_AVX2
BoolInt CPU_IsSupported_AVX2(void)
{
  if (!CPU_IsSupported_AVX())
    return False;
  if (z7_x86_cpuid_GetMaxFunc() < 7)
    return False;
  {
    UInt32 d[4];
    z7_x86_cpuid(d, 7);
    // printf("\ncpuid(7): ebx=%8x ecx=%8x\n", d[1], d[2]);
    return 1
      & (BoolInt)(d[1] >> 5); // avx2
  }
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x1, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %ecx, %eax
shrl $0x1c, %eax
shrl $0x1b, %ecx
andl %eax, %ecx
testb $0x1, %cl
je 0x3b9b9
xorl %ebx, %ebx
xorl %ecx, %ecx
xgetbv
movl %eax, %ecx
shrl %ecx
shrl $0x2, %eax
andl %ecx, %eax
testb $0x1, %al
je 0x3b9b9
callq 0x3b8a4
cmpl $0x7, %eax
jb 0x3b9b9
xorl %ecx, %ecx
movl $0x7, %eax
movq %rbx, %rbx
cpuid
xchgq %rbx, %rbx
shrl $0x5, %ebx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/CpuArch.c
// Function: CPU_IsSupported_VAES_AVX2
BoolInt CPU_IsSupported_VAES_AVX2(void)
{
  if (!CPU_IsSupported_AVX())
    return False;
  if (z7_x86_cpuid_GetMaxFunc() < 7)
    return False;
  {
    UInt32 d[4];
    z7_x86_cpuid(d, 7);
    // printf("\ncpuid(7): ebx=%8x ecx=%8x\n", d[1], d[2]);
    return 1
      & (BoolInt)(d[1] >> 5) // avx2
      // & (d[1] >> 31) // avx512vl
      & (BoolInt)(d[2] >> 9); // vaes // VEX-256/EVEX
  }
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x1, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %ecx, %eax
shrl $0x1c, %eax
shrl $0x1b, %ecx
andl %eax, %ecx
testb $0x1, %cl
je 0x3ba4c
xorl %ebx, %ebx
xorl %ecx, %ecx
xgetbv
movl %eax, %ecx
shrl %ecx
shrl $0x2, %eax
andl %ecx, %eax
testb $0x1, %al
je 0x3ba4c
callq 0x3b8a4
cmpl $0x7, %eax
jb 0x3ba4c
xorl %ecx, %ecx
movl $0x7, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %ecx, %ebx
shrl $0x5, %esi
shrl $0x9, %ebx
andl %esi, %ebx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/CpuArch.c
// Function: CPU_IsSupported_PageGB
BoolInt CPU_IsSupported_PageGB(void)
{
  CHECK_CPUID_IS_SUPPORTED
  {
    UInt32 d[4];
    z7_x86_cpuid(d, 0x80000000);
    if (d[0] < 0x80000001)
      return False;
    z7_x86_cpuid(d, 0x80000001);
    return (BoolInt)(d[3] >> 26) & 1;
  }
}

// Assembly:
xorl %esi, %esi
xorl %ecx, %ecx
movl $0x80000000, %eax       # imm = 0x80000000
movq %rbx, %rdi
cpuid
xchgq %rbx, %rdi
cmpl $0x80000001, %eax       # imm = 0x80000001
jb 0x3ba7f
xorl %ecx, %ecx
movl $0x80000001, %eax       # imm = 0x80000001
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %edx, %esi
shrl $0x1a, %esi
andl $0x1, %esi
movl %esi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: MtProgressThunk_Progress
static SRes MtProgressThunk_Progress(ICompressProgressPtr pp, UInt64 inSize, UInt64 outSize)
{
  Z7_CONTAINER_FROM_VTBL_TO_DECL_VAR_pp_vt_p(CMtProgressThunk)
  UInt64 inSize2 = 0;
  UInt64 outSize2 = 0;
  if (inSize != (UInt64)(Int64)-1)
  {
    inSize2 = inSize - p->inSize;
    p->inSize = inSize;
  }
  if (outSize != (UInt64)(Int64)-1)
  {
    outSize2 = outSize - p->outSize;
    p->outSize = outSize;
  }
  return MtProgress_ProgressAdd(p->mtProgress, inSize2, outSize2);
}

// Assembly:
cmpq $-0x1, %rsi
je 0x3baa2
movq %rsi, %rax
subq 0x10(%rdi), %rsi
movq %rax, 0x10(%rdi)
jmp 0x3baa4
xorl %esi, %esi
cmpq $-0x1, %rdx
je 0x3bab7
movq %rdx, %rax
subq 0x18(%rdi), %rax
movq %rdx, 0x18(%rdi)
jmp 0x3bab9
xorl %eax, %eax
movq 0x8(%rdi), %rdi
movq %rax, %rdx
jmp 0x3c4a0
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: MtCoder_Free
static void MtCoder_Free(CMtCoder *p)
{
  unsigned i;

  /*
  p->stopReading = True;
  if (Event_IsCreated(&p->readEvent))
    Event_Set(&p->readEvent);
  */

  for (i = 0; i < MTCODER_THREADS_MAX; i++)
    MtCoderThread_Destruct(&p->threads[i]);

  Event_Close(&p->readEvent);
  Semaphore_Close(&p->blocksSemaphore);

  #ifdef MTCODER_USE_WRITE_THREAD
    for (i = 0; i < MTCODER_BLOCKS_MAX; i++)
      Event_Close(&p->writeEvents[i]);
  #else
    Event_Close(&p->finishedEvent);
  #endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x758(%rdi), %r15
leaq 0x7c0(%rdi), %r12
xorl %r13d, %r13d
cmpl $0x0, 0x7c8(%rbx,%r13)
je 0x3bbc3
leaq (%r12,%r13), %r14
movl $0x1, 0x74c(%rbx,%r13)
leaq (%r15,%r13), %rdi
callq 0x3dbe9
movq %r14, %rdi
callq 0x3db3d
leaq (%r15,%r13), %rdi
callq 0x3dcb9
movq 0x750(%rbx,%r13), %rsi
testq %rsi, %rsi
je 0x3bbf4
movq 0x740(%rbx,%r13), %rax
movq 0x38(%rax), %rdi
callq *0x8(%rdi)
movq $0x0, 0x750(%rbx,%r13)
addq $0x90, %r13
cmpq $0x2400, %r13           # imm = 0x2400
jne 0x3bb97
leaq 0x58(%rbx), %rdi
callq 0x3dcb9
leaq 0xc0(%rbx), %rdi
callq 0x3de31
addq $0x130, %rbx            # imm = 0x130
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3dcb9
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: MtCoderThread_CreateAndStart
static SRes MtCoderThread_CreateAndStart(CMtCoderThread *t)
{
  WRes wres = AutoResetEvent_OptCreate_And_Reset(&t->startEvent);
  if (wres == 0)
  {
    t->stop = False;
    if (!Thread_WasCreated(&t->thread))
      wres = Thread_Create(&t->thread, ThreadFunc, t);
    if (wres == 0)
      wres = Event_Set(&t->startEvent);
  }
  if (wres == 0)
    return SZ_OK;
  return MY_SRes_HRESULT_FROM_WRes(wres);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x3deb0
testl %eax, %eax
jne 0x3be75
movl $0x0, 0xc(%r14)
xorl %eax, %eax
cmpl $0x0, 0x88(%r14)
jne 0x3be69
leaq 0x80(%r14), %rdi
leaq 0x2c(%rip), %rsi        # 0x3be8d
movq %r14, %rdx
callq 0x3da87
testl %eax, %eax
jne 0x3be75
movq %rbx, %rdi
callq 0x3dbe9
movzwl %ax, %ecx
orl $0x88000000, %ecx       # imm = 0x88000000
testl %eax, %eax
cmovlel %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtProgress_Progress_ST
SRes MtProgress_Progress_ST(CMtProgress *p)
{
  if (p->res == SZ_OK && p->progress)
    if (ICompressProgress_Progress(p->progress, p->totalInSize, p->totalOutSize) != SZ_OK)
      p->res = SZ_ERROR_PROGRESS;
  return p->res;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x3c481
movl 0x8(%rbx), %eax
popq %rbx
retq
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3c47c
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
callq *(%rdi)
testl %eax, %eax
je 0x3c47c
movl $0xa, 0x8(%rbx)
jmp 0x3c47c
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtProgress_ProgressAdd
SRes MtProgress_ProgressAdd(CMtProgress *p, UInt64 inSize, UInt64 outSize)
{
  SRes res;
  CriticalSection_Enter(&p->cs);
  
  p->totalInSize += inSize;
  p->totalOutSize += outSize;
  if (p->res == SZ_OK && p->progress)
    if (ICompressProgress_Progress(p->progress, p->totalInSize, p->totalOutSize) != SZ_OK)
      p->res = SZ_ERROR_PROGRESS;
  res = p->res;
  
  CriticalSection_Leave(&p->cs);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x3de7a
addq 0x10(%r14), %r12
movq %r12, 0x10(%r14)
addq 0x18(%r14), %r15
movq %r15, 0x18(%r14)
cmpl $0x0, 0x8(%r14)
je 0x3c4eb
movl 0x8(%r14), %ebp
movq %rbx, %rdi
callq 0x3de84
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3c4d4
movq %r12, %rsi
movq %r15, %rdx
callq *(%rdi)
testl %eax, %eax
je 0x3c4d4
movl $0xa, 0x8(%r14)
jmp 0x3c4d4
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtProgress_GetError
SRes MtProgress_GetError(CMtProgress *p)
{
  SRes res;
  CriticalSection_Enter(&p->cs);
  res = p->res;
  CriticalSection_Leave(&p->cs);
  return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x3de7a
movl 0x8(%rbx), %ebx
movq %r14, %rdi
callq 0x3de84
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtProgress_SetError
void MtProgress_SetError(CMtProgress *p, SRes res)
{
  CriticalSection_Enter(&p->cs);
  if (p->res == SZ_OK)
    p->res = res;
  CriticalSection_Leave(&p->cs);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x3de7a
cmpl $0x0, 0x8(%r14)
jne 0x3c551
movl %ebp, 0x8(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3de84
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDecThread_FreeInBufs
void MtDecThread_FreeInBufs(CMtDecThread *t)
{
  if (t->inBuf)
  {
    void *link = t->inBuf;
    t->inBuf = NULL;
    do
    {
      void *next = ((CMtDecBufLink *)link)->next;
      ISzAlloc_Free(t->mtDec->alloc, link);
      link = next;
    }
    while (link);
  }
}

// Assembly:
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x3c591
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
movq (%rsi), %r14
movq (%rbx), %rax
movq 0x20(%rax), %rdi
callq *0x8(%rdi)
movq %r14, %rsi
testq %r14, %r14
jne 0x3c575
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_GetCrossBuff
Byte *MtDec_GetCrossBuff(CMtDec *p)
{
  Byte *cr = p->crossBlock;
  if (!cr)
  {
    cr = (Byte *)ISzAlloc_Alloc(p->alloc, MTDEC__LINK_DATA_OFFSET + p->inBufSize);
    if (!cr)
      return NULL;
    p->crossBlock = cr;
  }
  return MTDEC__DATA_PTR_FROM_LINK(cr);
}

// Assembly:
pushq %rbx
movq 0x78(%rdi), %rax
testq %rax, %rax
jne 0x3c5b5
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x20(%rdi), %rdi
addq $0x20, %rsi
callq *(%rdi)
testq %rax, %rax
je 0x3c5bb
movq %rax, 0x78(%rbx)
addq $0x20, %rax
popq %rbx
retq
xorl %eax, %eax
jmp 0x3c5b9
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_PrepareRead
int MtDec_PrepareRead(CMtDec *p)
{
  if (p->crossBlock && p->crossStart == p->crossEnd)
  {
    ISzAlloc_Free(p->alloc, p->crossBlock);
    p->crossBlock = NULL;
  }
    
  {
    unsigned i;
    for (i = 0; i < MTDEC_THREADS_MAX; i++)
      if (i > p->numStartedThreads
          || p->numFilledThreads <=
            (i >= p->filledThreadStart ?
              i - p->filledThreadStart :
              i + p->numStartedThreads - p->filledThreadStart))
        MtDecThread_FreeInBufs(&p->threads[i]);
  }

  return (p->numFilledThreads != 0) || (p->crossStart != p->crossEnd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rsi
testq %rsi, %rsi
je 0x3c5f5
movq 0x80(%rbx), %rax
cmpq 0x88(%rbx), %rax
jne 0x3c5f5
movq 0x20(%rbx), %rdi
callq *0x8(%rdi)
movq $0x0, 0x78(%rbx)
leaq 0x108(%rbx), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movl 0x70(%rbx), %eax
cmpq %rax, %r12
ja 0x3c626
movl 0xa8(%rbx), %ecx
cmpq %rcx, %r12
cmovael %r15d, %eax
movl %r12d, %edx
subl %ecx, %edx
addl %eax, %edx
cmpl %edx, 0xac(%rbx)
ja 0x3c658
imulq $0x110, %r12, %r13      # imm = 0x110
movq 0x10(%r14,%r13), %rsi
testq %rsi, %rsi
je 0x3c658
addq %r14, %r13
movq $0x0, 0x10(%r13)
movq (%rsi), %rbp
movq (%r13), %rax
movq 0x20(%rax), %rdi
callq *0x8(%rdi)
movq %rbp, %rsi
testq %rbp, %rbp
jne 0x3c642
incq %r12
cmpq $0x20, %r12
jne 0x3c602
movl $0x1, %eax
cmpl $0x0, 0xac(%rbx)
jne 0x3c682
movq 0x80(%rbx), %rcx
xorl %eax, %eax
cmpq 0x88(%rbx), %rcx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_Read
const Byte *MtDec_Read(CMtDec *p, size_t *inLim)
{
  while (p->numFilledThreads != 0)
  {
    CMtDecThread *t = &p->threads[p->filledThreadStart];
    
    if (*inLim != 0)
    {
      {
        void *link = t->inBuf;
        void *next = ((CMtDecBufLink *)link)->next;
        ISzAlloc_Free(p->alloc, link);
        t->inBuf = next;
      }
      
      if (t->inDataSize == 0)
      {
        MtDecThread_FreeInBufs(t);
        if (--p->numFilledThreads == 0)
          break;
        if (++p->filledThreadStart == p->numStartedThreads)
          p->filledThreadStart = 0;
        t = &p->threads[p->filledThreadStart];
      }
    }
    
    {
      size_t lim = t->inDataSize_Start;
      if (lim != 0)
        t->inDataSize_Start = 0;
      else
      {
        UInt64 rem = t->inDataSize;
        lim = p->inBufSize;
        if (lim > rem)
          lim = (size_t)rem;
      }
      t->inDataSize -= lim;
      *inLim = lim;
      return (const Byte *)MTDEC__DATA_PTR_FROM_LINK(t->inBuf);
    }
  }

  {
    size_t crossSize = p->crossEnd - p->crossStart;
    if (crossSize != 0)
    {
      const Byte *data = MTDEC__DATA_PTR_FROM_LINK(p->crossBlock) + p->crossStart;
      *inLim = crossSize;
      p->crossStart = 0;
      p->crossEnd = 0;
      return data;
    }
    *inLim = 0;
    if (p->crossBlock)
    {
      ISzAlloc_Free(p->alloc, p->crossBlock);
      p->crossBlock = NULL;
    }
    return NULL;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0xac(%rdi)
je 0x3c77c
movl 0xa8(%rbx), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
leaq (%rbx,%rax), %r12
addq $0x108, %r12            # imm = 0x108
cmpq $0x0, (%r14)
je 0x3c741
movq 0x10(%r12), %rsi
movq (%rsi), %r15
movq 0x20(%rbx), %rdi
callq *0x8(%rdi)
movq %r15, 0x10(%r12)
cmpq $0x0, 0x20(%r12)
jne 0x3c741
testq %r15, %r15
je 0x3c70e
movq $0x0, 0x10(%r12)
movq (%r15), %r13
movq (%r12), %rax
movq 0x20(%rax), %rdi
movq %r15, %rsi
callq *0x8(%rdi)
movq %r13, %r15
testq %r13, %r13
jne 0x3c6f5
decl 0xac(%rbx)
je 0x3c7d4
movl 0xa8(%rbx), %eax
incl %eax
xorl %ecx, %ecx
cmpl 0x70(%rbx), %eax
cmovnel %eax, %ecx
leaq 0x108(%rbx), %rax
movl %ecx, 0xa8(%rbx)
imulq $0x110, %rcx, %r12      # imm = 0x110
addq %rax, %r12
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x3c756
movq $0x0, 0x18(%r12)
jmp 0x3c765
movq 0x20(%r12), %rax
movq (%rbx), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %rax
subq %rax, 0x20(%r12)
movq %rax, (%r14)
movq 0x10(%r12), %rax
addq $0x20, %rax
xorl %ecx, %ecx
testb %cl, %cl
je 0x3c7ca
movq 0x80(%rbx), %rax
movq 0x88(%rbx), %rcx
subq %rax, %rcx
jne 0x3c7b2
movq $0x0, (%r14)
movq 0x78(%rbx), %rsi
testq %rsi, %rsi
je 0x3c7ae
movq 0x20(%rbx), %rdi
callq *0x8(%rdi)
movq $0x0, 0x78(%rbx)
xorl %eax, %eax
jmp 0x3c7ca
movq 0x78(%rbx), %rdx
subq $-0x80, %rbx
addq %rdx, %rax
addq $0x20, %rax
movq %rcx, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x1, %cl
jmp 0x3c778
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDecThread_CloseThread
static void MtDecThread_CloseThread(CMtDecThread *t)
{
  if (Thread_WasCreated(&t->thread))
  {
    Event_Set(&t->canWrite); /* we can disable it. There are no threads waiting canWrite in normal cases */
    Event_Set(&t->canRead);
    Thread_Wait_Close(&t->thread);
  }

  Event_Close(&t->canRead);
  Event_Close(&t->canWrite);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x30(%rdi)
je 0x3d8d9
leaq 0x28(%rbx), %r14
leaq 0xa0(%rbx), %rdi
callq 0x3dbe9
leaq 0x38(%rbx), %rdi
callq 0x3dbe9
movq %r14, %rdi
callq 0x3db3d
leaq 0x38(%rbx), %rdi
callq 0x3dcb9
addq $0xa0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3dcb9
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_Progress_GetError_Spec
static SRes MtDec_Progress_GetError_Spec(CMtDec *p, UInt64 inSize, UInt64 outSize, UInt64 interruptIndex, BoolInt *wasInterrupted)
{
  SRes res;
  CriticalSection_Enter(&p->mtProgress.cs);

  p->mtProgress.totalInSize += inSize;
  p->mtProgress.totalOutSize += outSize;
  if (p->mtProgress.res == SZ_OK && p->mtProgress.progress)
    if (ICompressProgress_Progress(p->mtProgress.progress, p->mtProgress.totalInSize, p->mtProgress.totalOutSize) != SZ_OK)
      p->mtProgress.res = SZ_ERROR_PROGRESS;

  *wasInterrupted = (p->needInterrupt && interruptIndex > p->interruptIndex);
  res = p->mtProgress.res;
  
  CriticalSection_Leave(&p->mtProgress.cs);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
leaq 0xe0(%rdi), %r14
movq %r14, %rdi
callq 0x3de7a
addq 0xd0(%r15), %rbp
movq %rbp, 0xd0(%r15)
addq 0xd8(%r15), %r13
movq %r13, 0xd8(%r15)
cmpl $0x0, 0xc8(%r15)
je 0x3d95f
cmpl $0x0, 0xb0(%r15)
je 0x3d984
xorl %eax, %eax
cmpq %r12, 0xb8(%r15)
setb %al
jmp 0x3d986
movq 0xc0(%r15), %rdi
testq %rdi, %rdi
je 0x3d947
movq %rbp, %rsi
movq %r13, %rdx
callq *(%rdi)
testl %eax, %eax
je 0x3d947
movl $0xa, 0xc8(%r15)
jmp 0x3d947
xorl %eax, %eax
movl %eax, (%rbx)
movl 0xc8(%r15), %ebx
movq %r14, %rdi
callq 0x3de84
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_Interrupt
static void MtDec_Interrupt(CMtDec *p, UInt64 interruptIndex)
{
  CriticalSection_Enter(&p->mtProgress.cs);
  if (!p->needInterrupt || interruptIndex < p->interruptIndex)
  {
    p->interruptIndex = interruptIndex;
    p->needInterrupt = True;
  }
  CriticalSection_Leave(&p->mtProgress.cs);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xe0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3de7a
cmpl $0x0, 0xb0(%r14)
je 0x3d9d5
cmpq %r15, 0xb8(%r14)
jbe 0x3d9e7
movq %r15, 0xb8(%r14)
movl $0x1, 0xb0(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3de84
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Thread_Create_With_Affinity
WRes Thread_Create_With_Affinity(CThread *p, THREAD_FUNC_TYPE func, LPVOID param, CAffinityMask affinity)
{
  Print("Thread_Create_WithAffinity")
  CCpuSet cs;
  unsigned i;
  CpuSet_Zero(&cs);
  for (i = 0; i < sizeof(affinity) * 8; i++)
  {
    if (affinity == 0)
      break;
    if (affinity & 1)
    {
      CpuSet_Set(&cs, i);
    }
    affinity >>= 1;
  }
  return Thread_Create_With_CpuSet(p, func, param, &cs);
}

// Assembly:
subq $0x88, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rcx, %rcx
je 0x3db02
movq %rcx, %rax
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r8, %r9
movl %eax, %r10d
andl $0x1, %r10d
movl $0x1, %r8d
shlq %cl, %r8
negq %r10
andq %r10, %r8
orq %r9, %r8
cmpq $0x3e, %rcx
ja 0x3db05
movq %rax, %r9
shrq %r9
incq %rcx
cmpq $0x1, %rax
movq %r9, %rax
ja 0x3dacc
jmp 0x3db05
xorl %r8d, %r8d
movq %rsp, %rcx
movq %r8, (%rcx)
callq 0x3d9f4
addq $0x88, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Thread_Close
WRes Thread_Close(CThread *p)
{
  // Print("Thread_Close")
  int ret;
  if (!p->_created)
    return 0;
    
  ret = pthread_detach(p->_tid);
  p->_tid = 0;
  p->_created = 0;
  return ret;
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0x3db3a
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4250
movq $0x0, (%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Thread_Wait_Close
WRes Thread_Wait_Close(CThread *p)
{
  // Print("Thread_Wait_Close")
  void *thread_return;
  int ret;
  if (!p->_created)
    return EINVAL;

  ret = pthread_join(p->_tid, &thread_return);
  // probably we can't use that (_tid) after pthread_join(), so we close thread here
  p->_created = 0;
  p->_tid = 0;
  return ret;
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0x3db6c
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x8(%rsp), %rsi
callq 0x42b0
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
movl $0x16, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Event_Create
static WRes Event_Create(CEvent *p, int manualReset, int signaled)
{
  RINOK(pthread_mutex_init(&p->_mutex, NULL))
  RINOK(pthread_cond_init(&p->_cond, NULL))
  p->_manual_reset = manualReset;
  p->_state = (signaled ? True : False);
  p->_created = 1;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
addq $0x10, %rdi
xorl %esi, %esi
callq 0x4490
movl %eax, %r15d
testl %eax, %eax
jne 0x3dbc6
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x43c0
testl %eax, %eax
cmovnel %eax, %r15d
jne 0x3dbc6
movl %r14d, 0x4(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x8(%rbx)
movl $0x1, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Event_Set
WRes Event_Set(CEvent *p)
{
  RINOK(pthread_mutex_lock(&p->_mutex))
  p->_state = True;
  {
    const int res1 = pthread_cond_broadcast(&p->_cond);
    const int res2 = pthread_mutex_unlock(&p->_mutex);
    return (res2 ? res2 : res1);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x4480
movl %eax, %ebp
testl %eax, %eax
jne 0x3dc25
movl $0x1, 0x8(%r14)
addq $0x38, %r14
movq %r14, %rdi
callq 0x40e0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x4270
testl %eax, %eax
cmovnel %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Event_Wait
WRes Event_Wait(CEvent *p)
{
  RINOK(pthread_mutex_lock(&p->_mutex))
  while (p->_state == False)
  {
    // ETIMEDOUT
    // ret =
    pthread_cond_wait(&p->_cond, &p->_mutex);
    // if (ret != 0) break;
  }
  if (p->_manual_reset == False)
  {
    p->_state = False;
  }
  return pthread_mutex_unlock(&p->_mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x4480
testl %eax, %eax
je 0x3dc80
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x0, 0x8(%r14)
jne 0x3dc9d
leaq 0x38(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x44c0
cmpl $0x0, 0x8(%r14)
je 0x3dc8b
cmpl $0x0, 0x4(%r14)
jne 0x3dcac
movl $0x0, 0x8(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4270
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Event_Close
WRes Event_Close(CEvent *p)
{
  if (!p->_created)
    return 0;
  p->_created = 0;
  {
    const int res1 = pthread_mutex_destroy(&p->_mutex);
    const int res2 = pthread_cond_destroy(&p->_cond);
    return (res1 ? res1 : res2);
  }
}

// Assembly:
cmpl $0x0, (%rdi)
je 0x3dced
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, (%rdi)
addq $0x10, %rdi
callq 0x4390
movl %eax, %ebp
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x4650
testl %ebp, %ebp
cmovnel %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Semaphore_Create
WRes Semaphore_Create(CSemaphore *p, UInt32 initCount, UInt32 maxCount)
{
  if (initCount > maxCount || maxCount < 1)
    return EINVAL;
  RINOK(pthread_mutex_init(&p->_mutex, NULL))
  RINOK(pthread_cond_init(&p->_cond, NULL))
  p->_count = initCount;
  p->_maxCount = maxCount;
  p->_created = 1;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl %edx, %esi
seta %al
testl %edx, %edx
sete %cl
orb %al, %cl
movl $0x16, %r15d
jne 0x3dd49
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
addq $0x10, %rdi
xorl %esi, %esi
callq 0x4490
movl %eax, %r15d
testl %eax, %eax
jne 0x3dd49
leaq 0x38(%r14), %rdi
xorl %esi, %esi
callq 0x43c0
testl %eax, %eax
cmovnel %eax, %r15d
jne 0x3dd49
movl %ebp, 0x4(%r14)
movl %ebx, 0x8(%r14)
movl $0x1, (%r14)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Semaphore_ReleaseN
WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 releaseCount)
{
  UInt32 newCount;
  int ret;

  if (releaseCount < 1)
    return EINVAL;

  RINOK(pthread_mutex_lock(&p->_mutex))

  newCount = p->_count + releaseCount;
  if (newCount > p->_maxCount)
    ret = ERROR_TOO_MANY_POSTS; // EINVAL;
  else
  {
    p->_count = newCount;
    ret = pthread_cond_broadcast(&p->_cond);
  }
  RINOK(pthread_mutex_unlock(&p->_mutex))
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x3ddcf
movl %esi, %r15d
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x4480
movl %eax, %ebp
testl %eax, %eax
jne 0x3ddd4
addl 0x4(%r14), %r15d
movl $0x8007012a, %ebp       # imm = 0x8007012A
cmpl 0x8(%r14), %r15d
ja 0x3ddc0
movl %r15d, 0x4(%r14)
addq $0x38, %r14
movq %r14, %rdi
callq 0x40e0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x4270
testl %eax, %eax
cmovnel %eax, %ebp
jmp 0x3ddd4
movl $0x16, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/lzma/C/Threads.c
// Function: Semaphore_Wait
WRes Semaphore_Wait(CSemaphore *p)
{
  RINOK(pthread_mutex_lock(&p->_mutex))
  while (p->_count < 1)
  {
    pthread_cond_wait(&p->_cond, &p->_mutex);
  }
  p->_count--;
  return pthread_mutex_unlock(&p->_mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x4480
testl %eax, %eax
je 0x3ddff
popq %rbx
popq %r14
popq %r15
retq
movl 0x4(%r14), %eax
testl %eax, %eax
jne 0x3de1e
leaq 0x38(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x44c0
movl 0x4(%r14), %eax
testl %eax, %eax
je 0x3de0b
decl %eax
movl %eax, 0x4(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4270
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_getDecompressFileCount(UnZipper const*, unsigned int const*, unsigned long)
int OldStream_getDecompressFileCount(const UnZipper* oldZip,const uint32_t* refList,
                                     size_t refCount _VIRTUAL_IN_D(virtual_in)){
    int result=0;
    for (size_t i=0; i<refCount; ++i){
        int fileIndex=(int)refList[i];
#if (_IS_NEED_VIRTUAL_ZIP)
        if ((virtual_in)&&(virtual_in->entryDatas[fileIndex])) {
            if (virtual_in->entryDatas[fileIndex]->isCompressed)
                ++result;
        } else
#endif
        if (UnZipper_file_isCompressed(oldZip,fileIndex))
            ++result;
    }
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x3defd
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movl (%r14,%r13,4), %esi
movq %r12, %rdi
callq 0x3fee7
movzbl %al, %eax
addl %eax, %r15d
incq %r13
cmpq %r13, %rbx
jne 0x3dee1
jmp 0x3df00
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_getDecompressSumSize(UnZipper const*, unsigned int const*, unsigned long)
ZipFilePos_t OldStream_getDecompressSumSize(const UnZipper* oldZip,const uint32_t* refList,
                                            size_t refCount _VIRTUAL_IN_D(virtual_in)){
    ZipFilePos_t decompressSumSize=0;
    for (size_t i=0; i<refCount; ++i) {
        int fileIndex=(int)refList[i];
#if (_IS_NEED_VIRTUAL_ZIP)
        if ((virtual_in)&&(virtual_in->entryDatas[fileIndex])) {
            if (virtual_in->entryDatas[fileIndex]->isCompressed)
                decompressSumSize+=virtual_in->entryDatas[fileIndex]->uncompressedSize;
        } else
#endif
            if (UnZipper_file_isCompressed(oldZip,fileIndex))
                decompressSumSize+=UnZipper_file_uncompressedSize(oldZip,fileIndex);
    }
    return decompressSumSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x3df55
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movl (%r14,%r13,4), %ebp
movq %r12, %rdi
movl %ebp, %esi
callq 0x3fee7
testb %al, %al
je 0x3df4b
movq %r12, %rdi
movl %ebp, %esi
callq 0x4092e
addl %eax, %r15d
incq %r13
cmpq %r13, %rbx
jne 0x3df2c
jmp 0x3df58
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_getDecompressData(UnZipper*, unsigned int const*, unsigned long, hpatch_TStreamOutput*)
bool OldStream_getDecompressData(UnZipper* oldZip,const uint32_t* refList,size_t refCount,
                                 hpatch_TStreamOutput* output_refStream _VIRTUAL_IN_D(virtual_in)){
    hpatch_StreamPos_t writeToPos=0;
    for (size_t i=0;i<refCount;++i){
        int fileIndex=(int)refList[i];
#if (_IS_NEED_VIRTUAL_ZIP)
        if ((virtual_in)&&(virtual_in->entryDatas[fileIndex])) {
            TZipEntryData* entryData=virtual_in->entryDatas[fileIndex];
            if (entryData->isCompressed){
                if (!UnZipper_compressedData_decompressTo(oldZip,entryData->dataStream, 0,
                                                          entryData->dataStream->streamSize,
                                                          entryData->uncompressedSize,
                                                          output_refStream,writeToPos)) return false;
                writeToPos+=entryData->uncompressedSize;
            }
        } else
#endif
        if (UnZipper_file_isCompressed(oldZip,fileIndex)){
            if (!UnZipper_fileData_decompressTo(oldZip,fileIndex,output_refStream,writeToPos))
                return false;
            writeToPos+=UnZipper_file_uncompressedSize(oldZip,fileIndex);
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rsi, 0x20(%rsp)
testq %rdx, %rdx
sete %bpl
je 0x3e012
movq %rdi, %r12
movq %rdx, 0x18(%rsp)
movq %rdx, %r14
negq %r14
movq %r14, 0x10(%rsp)
movl $0x1, %r13d
xorl %r14d, %r14d
movq 0x20(%rsp), %rax
movl -0x4(%rax,%r13,4), %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x3fee7
movb $0x1, %r15b
testb %al, %al
je 0x3dff0
movq %r12, %rdi
movl %ebx, %esi
movq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x40d86
testb %al, %al
je 0x3dfed
movq %r12, %rdi
movl %ebx, %esi
callq 0x4092e
movl %eax, %eax
addq %rax, %r14
jmp 0x3dff0
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x3e012
cmpq 0x18(%rsp), %r13
setae %bpl
movq 0x10(%rsp), %rax
addq %r13, %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0x3dfab
andb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_getOldCrc(UnZipper const*, unsigned int const*, unsigned long)
uint32_t OldStream_getOldCrc(const UnZipper* oldZip,const uint32_t* refList,
                             size_t refCount _VIRTUAL_IN_D(virtual_in)){
    unsigned char buf4[4];
    uLong crc=0;
    const unsigned char* CE;
#if (_IS_NEED_VIRTUAL_ZIP)
    if (virtual_in)
        CE=UnZipper_CEData(&virtual_in->virtualZip);
    else
#endif
        CE=UnZipper_CEData(oldZip);
    crc=crc32(crc,CE,(uInt)UnZipper_CESize(oldZip));
    for (size_t i=0;i<refCount;++i){
        int fileIndex=(int)refList[i];
        uint32_t fileCrc;
#if (_IS_NEED_VIRTUAL_ZIP)
        if ((virtual_in)&&(virtual_in->entryDatas[fileIndex]))
            fileCrc=UnZipper_file_crc32(&virtual_in->virtualZip,fileIndex);
        else
#endif
            fileCrc=UnZipper_file_crc32(oldZip,fileIndex);
        writeUInt32_to(buf4,fileCrc);
        crc=crc32(crc,buf4,4);
    }
    return (uint32_t)crc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x50(%rdi), %rsi
movl 0xa0(%rdi), %edx
addl 0xa8(%rdi), %edx
subl %esi, %edx
xorl %edi, %edi
callq 0x4a9cf
movq %rax, %r12
testq %rbx, %rbx
je 0x3e08e
xorl %ebp, %ebp
leaq 0x4(%rsp), %r13
movl (%r14,%rbp,4), %esi
movq %r15, %rdi
callq 0x4094c
movl %eax, 0x4(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movl $0x4, %edx
callq 0x4a9cf
movq %rax, %r12
incq %rbp
cmpq %rbp, %rbx
jne 0x3e063
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_open(OldStream*, UnZipper*, unsigned int const*, unsigned long, unsigned int const*, unsigned long, hpatch_TStreamInput const*)
bool OldStream_open(OldStream* self,UnZipper* oldZip,const uint32_t* refList,size_t refCount,
                    const uint32_t* refNotDecompressList,size_t refNotDecompressCount,
                    const hpatch_TStreamInput* input_decompressedStream _VIRTUAL_IN_D(virtual_in)){
    bool result=true;
    uint32_t oldDataSize;
    check(self->stream==0);
    
    self->_oldZip=oldZip;
    self->_input_decompressedStream=input_decompressedStream;
#if (_IS_NEED_VIRTUAL_ZIP)
    self->_vin=virtual_in;
    if (virtual_in!=0)
        check(refNotDecompressCount==0);
#endif
    check(_createRange(self,refList,refCount,refNotDecompressList,refNotDecompressCount));
    assert(self->_rangeCount>0);
    oldDataSize=self->_rangeEndList[self->_rangeCount-1];
    
    self->_stream.streamImport=self;
    self->_stream.streamSize=oldDataSize;
    self->_stream.read=_OldStream_read;
    self->stream=&self->_stream;
clear:
    return result;
}

// Assembly:
pushq %rbx
cmpq $0x0, (%rdi)
jne 0x3e3d0
movq %rdi, %rbx
movq 0x10(%rsp), %rax
movq %rsi, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
callq 0x3e0df
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x3e3fb
movq 0x38(%rbx), %rcx
movl -0x4(%rcx,%rax,4), %eax
leaq 0x18(%rbx), %rcx
movq %rbx, 0x18(%rbx)
movq %rax, 0x20(%rbx)
leaq 0x55(%rip), %rax        # 0x3e41a
movq %rax, 0x28(%rbx)
movq %rcx, (%rbx)
movb $0x1, %al
popq %rbx
retq
leaq 0x217e9(%rip), %rdi     # 0x5fbc0
callq 0x44e0
leaq 0x1bc6d(%rip), %rdi     # 0x5a050
leaq 0x215f4(%rip), %rsi     # 0x5f9de
leaq 0x216b3(%rip), %rcx     # 0x5faa4
movl $0x127, %edx            # imm = 0x127
callq 0x4200
leaq 0x21720(%rip), %rdi     # 0x5fb22
leaq 0x215d5(%rip), %rsi     # 0x5f9de
leaq 0x21694(%rip), %rcx     # 0x5faa4
movl $0x131, %edx            # imm = 0x131
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/OldStream.cpp
// Function: OldStream_read_do(OldStream*, unsigned long long, unsigned char*, unsigned char*, int)
static bool _OldStream_read_do(OldStream* self,hpatch_StreamPos_t readFromPos,
                                 unsigned char* out_data,unsigned char* out_data_end,int curRangeIndex){
    hpatch_StreamPos_t readPos=readFromPos - self->_rangeEndList[curRangeIndex-1];
#if (_IS_NEED_VIRTUAL_ZIP)
    if ((self->_vin)&&(self->_rangIsInVirtualBuf[curRangeIndex])){
        int fileIndex=self->_rangeFileOffsets[curRangeIndex];
        TZipEntryData* entryData=self->_vin->entryDatas[fileIndex];
        return hpatch_FALSE!=entryData->dataStream->read(entryData->dataStream,
                                                         readPos,out_data,out_data_end);
    }
#endif
    readPos+=self->_rangeFileOffsets[curRangeIndex];
    if (curRangeIndex==0){
        const unsigned char* src;
#if (_IS_NEED_VIRTUAL_ZIP)
        if (self->_vin)
            src=UnZipper_CEData(&self->_vin->virtualZip);
        else
#endif
            src=UnZipper_CEData(self->_oldZip);
        memcpy(out_data,src+readPos,out_data_end-out_data);
        return true;
    }else if (self->_rangIsInDecBuf[curRangeIndex]){
        return hpatch_FALSE!=self->_input_decompressedStream->read(self->_input_decompressedStream,
                                                                   readPos,out_data,out_data_end);
    }else{
        return UnZipper_fileData_read(self->_oldZip,(ZipFilePos_t)readPos,out_data,out_data_end);
    }
}

// Assembly:
pushq %rax
movq %rsi, %rax
movslq %r8d, %r8
movq 0x38(%rdi), %rsi
movq 0x40(%rdi), %r9
movl -0x4(%rsi,%r8,4), %esi
subq %rsi, %rax
movl (%r9,%r8,4), %esi
addq %rax, %rsi
testl %r8d, %r8d
je 0x3e5d6
movq 0x48(%rdi), %rax
cmpb $0x0, (%rax,%r8)
je 0x3e5f0
movq 0x10(%rdi), %rdi
callq *0x10(%rdi)
testl %eax, %eax
setne %al
jmp 0x3e5ee
movq 0x8(%rdi), %rax
addq 0x50(%rax), %rsi
subq %rdx, %rcx
movq %rdx, %rdi
movq %rcx, %rdx
callq 0x4290
movb $0x1, %al
popq %rcx
retq
movq 0x8(%rdi), %rdi
popq %rax
jmp 0x404a5
nop
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_isHaveApkV1_or_jarSign
bool UnZipper_isHaveApkV1_or_jarSign(const UnZipper* self){
    int fCount=UnZipper_fileCount(self);
    for (int i=fCount-1; i>=0; --i) {
        if (UnZipper_file_isApkV1_or_jarSign(self,i))
            return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movzwl 0x8(%rax), %ebp
movl %ebp, %r14d
testl %ebp, %ebp
jle 0x3fa38
leal -0x1(%r14), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3fa43
testb %al, %al
je 0x3fa1f
testl %r14d, %r14d
setg %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_file_isApkV1_or_jarSign
bool UnZipper_file_isApkV1_or_jarSign(const UnZipper* self,int fileIndex){
    const char* kJarSignPath0="META-INF/";
    const char* kJarSignPath1="META-INF\\";
    const size_t kJarSignPathLen=8+1;
    if (UnZipper_file_nameLen(self,fileIndex)<(int)kJarSignPathLen) return false;
    const char* fn=UnZipper_file_nameBegin(self,fileIndex);
    return (0==memcmp(fn,kJarSignPath0,kJarSignPathLen))
         ||(0==memcmp(fn,kJarSignPath1,kJarSignPathLen));
}

// Assembly:
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rcx
movslq %esi, %rdx
movl (%rcx,%rdx,4), %ecx
movzwl 0x1c(%rax,%rcx), %edx
cmpl $0x9, %edx
jae 0x3fa5e
xorl %eax, %eax
retq
movabsq $0x464e492d4154454d, %rdx # imm = 0x464E492D4154454D
movq 0x2e(%rax,%rcx), %rsi
xorq %rdx, %rsi
movzbl 0x36(%rax,%rcx), %edi
xorq $0x2f, %rdi
orq %rsi, %rdi
je 0x3fa93
xorq 0x2e(%rax,%rcx), %rdx
movzbl 0x36(%rax,%rcx), %eax
xorq $0x5c, %rax
orq %rdx, %rax
sete %al
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_isHaveApkV1Sign
bool UnZipper_isHaveApkV1Sign(const UnZipper* self){
    int fCount=UnZipper_fileCount(self);
    for (int i=fCount-1; i>=0; --i) {
        if (UnZipper_file_isApkV1Sign(self,i))
            return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movzwl 0x8(%rax), %ebp
movl %ebp, %r14d
testl %ebp, %ebp
jle 0x3fabe
leal -0x1(%r14), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3fac9
testb %al, %al
je 0x3faa5
testl %r14d, %r14d
setg %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_file_isApkV1Sign
bool UnZipper_file_isApkV1Sign(const UnZipper* self,int fileIndex){
    if (!UnZipper_file_isApkV1_or_jarSign(self,fileIndex)) return false;
    if (_fileName_isEndWith(self,fileIndex,kJarSignSF)) return true;
    if (_fileName_isEndWith(self,fileIndex,".RSA")) return true;
    if (_fileName_is(self,fileIndex,"META-INF/MANIFEST.MF")) return true;
    if (_fileName_is(self,fileIndex,"META-INF\\MANIFEST.MF")) return true;
    return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x3fa43
testb %al, %al
je 0x3fb32
leaq 0x21218(%rip), %rdx     # 0x60cfa
movq %r14, %rdi
movl %ebx, %esi
callq 0x3fe28
movb $0x1, %bpl
testb %al, %al
jne 0x3fb34
leaq 0x20807(%rip), %rdx     # 0x60301
movq %r14, %rdi
movl %ebx, %esi
callq 0x3fe28
testb %al, %al
jne 0x3fb34
leaq 0x207f7(%rip), %rdx     # 0x60306
movq %r14, %rdi
movl %ebx, %esi
callq 0x3fe7b
testb %al, %al
jne 0x3fb34
leaq 0x207f7(%rip), %rdx     # 0x6031b
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x3fe7b
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_file_is_lastNameWith
bool UnZipper_file_is_lastNameWith(const UnZipper* self,int fileIndex,const char* lastName,int lastNameLen){
         if (!UnZipper_file_is_nameEndWith(self,fileIndex,lastName,lastNameLen)) return false;
        size_t nameL=UnZipper_file_nameLen(self,fileIndex);
        if (lastNameLen==nameL) return true;
        size_t s1=lastNameLen-nameL-1;
        const char* fn=UnZipper_file_nameBegin(self,fileIndex);
        return _isDirTag(fn[s1]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x3fbcb
testb %al, %al
je 0x3fbc4
movq 0x50(%r14), %rcx
movq 0x58(%r14), %rax
movslq %ebp, %rdx
movl (%rax,%rdx,4), %esi
movzwl 0x1c(%rcx,%rsi), %edx
movb $0x1, %al
cmpl %ebx, %edx
je 0x3fbc6
addq %rsi, %rcx
movslq %ebx, %rax
notl %edx
movslq %edx, %rdx
addq %rcx, %rdx
movb 0x2e(%rax,%rdx), %al
cmpb $0x5c, %al
sete %cl
cmpb $0x2f, %al
sete %al
orb %cl, %al
jmp 0x3fbc6
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_file_is_nameEndWith
bool UnZipper_file_is_nameEndWith(const UnZipper* self,int fileIndex,const char* nameSuffix,int nameSuffixLen){
    int fnLen=UnZipper_file_nameLen(self,fileIndex);
    if (fnLen<nameSuffixLen) return false;
    const char* fn=UnZipper_file_nameBegin(self,fileIndex);
    return (0==memcmp(fn+fnLen-nameSuffixLen,nameSuffix,nameSuffixLen));
}

// Assembly:
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rdi
movslq %esi, %rsi
movl (%rdi,%rsi,4), %esi
movzwl 0x1c(%rax,%rsi), %edi
cmpl %ecx, %edi
jge 0x3fbe5
xorl %eax, %eax
retq
pushq %rax
addq %rsi, %rax
movl %edi, %edi
addq %rax, %rdi
movslq %ecx, %rax
subq %rax, %rdi
addq $0x2e, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x4310
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_searchFileIndexByName
int UnZipper_searchFileIndexByName(const UnZipper* self,const char* fileName,int fileNameLen){
    int fCount=UnZipper_fileCount(self);
    for (int i=0; i<fCount; ++i) {
        if (UnZipper_file_is_sameName(self,i,fileName,fileNameLen))
            return i;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x48(%rdi), %rax
movzwl 0x8(%rax), %r13d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %r13d, %r13d
je 0x3fc57
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x3fb3b
testb %al, %al
jne 0x3fc54
incl %r12d
cmpl %r12d, %r13d
jne 0x3fc36
jmp 0x3fc57
movl %r12d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq