LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: MatchFinderMt3_Skip
static void MatchFinderMt3_Skip(void *_p, UInt32 num)
{
  CMatchFinderMt *p = (CMatchFinderMt *)_p;
  SKIP_HEADER_MT(3)
      UInt32 h2, h3;
      MT_HASH3_CALC
      (hash + kFix3HashSize)[h3] =
      hash[                h2] =
        p->lzPos;
  SKIP_FOOTER_MT
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x76832
movq -0x18(%rbp), %rdi
callq 0x77880
movq -0x18(%rbp), %rcx
movl 0x24(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x24(%rcx)
cmpl $0x3, %eax
jb 0x768be
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
xorl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, -0x2c(%rbp)
movl -0x34(%rbp), %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %edx, 0x1000(%rax,%rcx,4)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, %ecx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
shlq $0x2, %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x76817
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: MtSync_Create_WRes
static WRes MtSync_Create_WRes(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj)
{
  WRes wres;

  if (p->wasCreated)
    return SZ_OK;

  RINOK_THREAD(CriticalSection_Init(&p->cs))
  p->csWasInitialized = True;
  p->csWasEntered = False;

  RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canStart))
  RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStopped))

  p->needStart = True;
  p->exit = True;  /* p->exit is unused before (canStart) Event.
     But in case of some unexpected code failure we will get fast exit from thread */

  // return ERROR_TOO_MANY_POSTS; // for debug
  // return EINVAL; // for debug

  if (p->affinity != 0)
    wres = Thread_Create_With_Affinity(&p->thread, startAddress, obj, (CAffinityMask)p->affinity);
  else
    wres = Thread_Create(&p->thread, startAddress, obj);

  RINOK_THREAD(wres)
  p->wasCreated = True;
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x76dda
movl $0x0, -0x4(%rbp)
jmp 0x76eda
movq -0x10(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x7ba70
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x76dfe
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76eda
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x7b5e0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x76e35
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76eda
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7b5e0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x76e59
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76eda
movq -0x10(%rbp), %rax
movl $0x1, 0x24(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x76e9c
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
callq 0x7b2e0
movl %eax, -0x24(%rbp)
jmp 0x76eb4
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7b2b0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x76ec8
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76eda
movq -0x10(%rbp), %rax
movl $0x1, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: BtThreadFunc
Z7_NO_INLINE
static void BtThreadFunc(CMatchFinderMt *mt)
{
  CMtSync *p = &mt->btSync;
  for (;;)
  {
    UInt32 blockIndex = 0;
    Event_Wait(&p->canStart);

    for (;;)
    {
        PRF(printf("  BT thread block = %d  pos = %d\n", (unsigned)blockIndex, mt->pos));
      /* (p->exit == true) is possible after (p->canStart) at first loop iteration
         and is unexpected after more Wait(freeSemaphore) iterations */
      if (p->exit)
        return;

      Semaphore_Wait(&p->freeSemaphore);
      
      // for faster stop : we check (p->stopWriting) after Wait(freeSemaphore)
      if (p->stopWriting)
        break;

      BtFillBlock(mt, blockIndex++);
      
      Semaphore_Release1(&p->filledSemaphore);
    }

    // we stop HASH_THREAD here
    MtSync_StopWriting(&mt->hashSync);

    // p->numBlocks_Sent = blockIndex;
    Event_Set(&p->wasStopped);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x7b6d0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x7722c
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x7b980
movq -0x10(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x77248
jmp 0x77273
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
callq 0x772a0
movq -0x10(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl $0x1, %esi
callq 0x7b8d0
jmp 0x7721c
movq -0x8(%rbp), %rdi
addq $0x318, %rdi            # imm = 0x318
callq 0x759f0
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7b600
jmp 0x77208
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: BtFillBlock
static void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex)
{
  CMtSync *sync = &p->hashSync;
  
  BUFFER_MUST_BE_UNLOCKED(sync)
  
  if (!sync->needStart)
  {
    LOCK_BUFFER(sync)
  }
  
  BtGetMatches(p, p->btBuf + GET_BT_BLOCK_OFFSET(globalBlockIndex));
  
  /* We suppose that we have called GetNextBlock() from start.
     So buffer is LOCKED */

  UNLOCK_BUFFER(sync)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x318, %rax            # imm = 0x318
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x772e2
movq -0x18(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x7bab0
movq -0x18(%rbp), %rax
movl $0x1, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xc(%rbp), %eax
andl $0xf, %eax
movl %eax, %eax
shlq $0x10, %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x77330
movq -0x18(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x7bae0
movq -0x18(%rbp), %rax
movl $0x0, 0x2c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFindMt.c
// Function: MtSync_GetNextBlock
Z7_NO_INLINE
static UInt32 MtSync_GetNextBlock(CMtSync *p)
{
  UInt32 numBlocks = 0;
  if (p->needStart)
  {
    BUFFER_MUST_BE_UNLOCKED(p)
    p->numProcessedBlocks = 1;
    p->needStart = False;
    p->stopWriting = False;
    p->exit = False;
    Event_Reset(&p->wasStopped);
    Event_Set(&p->canStart);
  }
  else
  {
    UNLOCK_BUFFER(p)
    // we free current block
    numBlocks = p->numProcessedBlocks++;
    Semaphore_Release1(&p->freeSemaphore);
  }

  // buffer is UNLOCKED here
  Semaphore_Wait(&p->filledSemaphore);
  LOCK_BUFFER(p)
  return numBlocks;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x77807
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7b680
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x7b600
jmp 0x77847
movq -0x8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x7bae0
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movl $0x1, %esi
callq 0x7b8d0
movq -0x8(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
callq 0x7b980
movq -0x8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x7bab0
movq -0x8(%rbp), %rax
movl $0x1, 0x2c(%rax)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x778ab
movq -0x8(%rbp), %rcx
addq $0x4c, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x779ab
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0x777a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
shlq $0x10, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpl $0x2, -0x1c(%rbp)
jb 0x77926
cmpl $0x10000, -0x1c(%rbp)   # imm = 0x10000
jbe 0x77960
movq -0x8(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rcx
addq $0x4c, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rcx
addq $0x4c, %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpl $0xfffeffff, 0x20(%rax) # imm = 0xFFFEFFFF
jb 0x779a9
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x34(%rcx), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %edi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, %edx
callq 0x6fdf0
jmp 0x779ab
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x780a0
cmpl $0x7, %eax
jae 0x7817b
movl $0x0, -0x4(%rbp)
jmp 0x78195
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x78050
movl -0x1c(%rbp), %eax
shrl $0x1d, %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x78220
cmpl $0x0, %eax
jne 0x781bb
movl $0x0, -0x4(%rbp)
jmp 0x78209
callq 0x780a0
cmpl $0x7, %eax
jae 0x781ce
movl $0x0, -0x4(%rbp)
jmp 0x78209
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x78280
cmpl $0x1, -0x20(%rbp)
jae 0x781ed
movl $0x0, -0x4(%rbp)
jmp 0x78209
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
movl $0x1, %edx
callq 0x78280
movl -0x20(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x782d0
cmpl $0x0, %eax
jne 0x7823b
movl $0x0, -0x4(%rbp)
jmp 0x78268
callq 0x780a0
cmpl $0x7, %eax
jae 0x7824e
movl $0x0, -0x4(%rbp)
jmp 0x78268
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x78050
movl -0x1c(%rbp), %eax
shrl $0x5, %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x782d0
cmpl $0x0, %eax
jne 0x7837b
movl $0x0, -0x4(%rbp)
jmp 0x783b0
callq 0x780a0
cmpl $0x7, %eax
jae 0x7838e
movl $0x0, -0x4(%rbp)
jmp 0x783b0
leaq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x78050
movl -0x1c(%rbp), %eax
shrl $0x5, %eax
andl $0x1, %eax
movl -0x18(%rbp), %ecx
shrl $0x9, %ecx
andl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x20(%rbp), %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x78050
cmpl $0x80000001, -0x20(%rbp) # imm = 0x80000001
jae 0x783e8
movl $0x0, -0x4(%rbp)
jmp 0x78402
leaq -0x20(%rbp), %rdi
movl $0x80000001, %esi       # imm = 0x80000001
callq 0x78050
movl -0x14(%rbp), %eax
shrl $0x1a, %eax
andl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $-0x1, -0x10(%rbp)
je 0x784af
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $-0x1, -0x18(%rbp)
je 0x784d2
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x79420
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: MtCoder_Construct
void MtCoder_Construct(CMtCoder *p)
{
  unsigned i;
  
  p->blockSize = 0;
  p->numThreadsMax = 0;
  p->expectedDataSize = (UInt64)(Int64)-1;

  p->inStream = NULL;
  p->inData = NULL;
  p->inDataSize = 0;

  p->progress = NULL;
  p->allocBig = NULL;

  p->mtCallback = NULL;
  p->mtCallbackObject = NULL;

  p->allocatedBufsSize = 0;

  Event_Construct(&p->readEvent);
  Semaphore_Construct(&p->blocksSemaphore);

  for (i = 0; i < MTCODER_THREADS_MAX; i++)
  {
    CMtCoderThread *t = &p->threads[i];
    t->mtCoder = p;
    t->index = i;
    t->inBuf = NULL;
    t->stop = False;
    Event_Construct(&t->startEvent);
    Thread_CONSTRUCT(&t->thread)
  }

  #ifdef MTCODER_USE_WRITE_THREAD
    for (i = 0; i < MTCODER_BLOCKS_MAX; i++)
      Event_Construct(&p->writeEvents[i]);
  #else
    Event_Construct(&p->finishedEvent);
  #endif

  CriticalSection_Init(&p->cs);
  CriticalSection_Init(&p->mtProgress.cs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc0(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x40, -0xc(%rbp)
jae 0x7861e
movq -0x8(%rbp), %rax
addq $0x740, %rax            # imm = 0x740
movl -0xc(%rbp), %ecx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x88(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7859e
movq -0x8(%rbp), %rax
movl $0x0, 0x130(%rax)
movq -0x8(%rbp), %rdi
addq $0x208, %rdi            # imm = 0x208
callq 0x7ba70
movq -0x8(%rbp), %rdi
addq $0x368, %rdi            # imm = 0x368
addq $0x20, %rdi
callq 0x7ba70
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x40, -0xc(%rbp)
jae 0x786e1
movq -0x8(%rbp), %rdi
addq $0x740, %rdi            # imm = 0x740
movl -0xc(%rbp), %eax
imulq $0x90, %rax, %rax
addq %rax, %rdi
callq 0x78b70
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x786b3
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x7b750
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x7ba00
movq -0x8(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x7b750
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x7bb80
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x78b20
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jne 0x78b08
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
movq -0x10(%rbp), %rdx
leaq 0x100(%rip), %rsi       # 0x78c00
callq 0x7b2b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x78b1e
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x7b600
movl %eax, -0x14(%rbp)
jmp 0x78b20
cmpl $0x0, -0x14(%rbp)
jne 0x78b2f
movl $0x0, -0x4(%rbp)
jmp 0x78b58
cmpl $0x0, -0x14(%rbp)
jg 0x78b3d
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x78b52
movl -0x14(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl $0x8000000, %eax        # imm = 0x8000000
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: MtCoderThread_Destruct
static void MtCoderThread_Destruct(CMtCoderThread *t)
{
  if (Thread_WasCreated(&t->thread))
  {
    t->stop = 1;
    Event_Set(&t->startEvent);
    Thread_Wait_Close(&t->thread);
  }

  Event_Close(&t->startEvent);

  if (t->inBuf)
  {
    ISzAlloc_Free(t->mtCoder->allocBig, t->inBuf);
    t->inBuf = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x78bb1
movq -0x8(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x7b600
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x7b460
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x7b750
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x78bf9
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x38(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/MtCoder.c
// Function: ThreadFunc
static THREAD_FUNC_DECL ThreadFunc(void *pp)
{
  CMtCoderThread *t = (CMtCoderThread *)pp;
  for (;;)
  {
    if (Event_Wait(&t->startEvent) != 0)
      return (THREAD_FUNC_RET_TYPE)SZ_ERROR_THREAD;
    if (t->stop)
      return 0;
    {
      SRes res = ThreadFunc2(t);
      CMtCoder *mtc = t->mtCoder;
      if (res != SZ_OK)
      {
        MtProgress_SetError(&mtc->mtProgress, res);
      }
      
      #ifndef MTCODER_USE_WRITE_THREAD
      {
        unsigned numFinished = (unsigned)InterlockedIncrement(&mtc->numFinishedThreads);
        if (numFinished == mtc->numStartedThreads)
          if (Event_Set(&mtc->finishedEvent) != 0)
            return (THREAD_FUNC_RET_TYPE)SZ_ERROR_THREAD;
      }
      #endif
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x7b6d0
cmpl $0x0, %eax
je 0x78c34
movl $0xc, %eax
movq %rax, -0x8(%rbp)
jmp 0x78cc1
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x78c48
movq $0x0, -0x8(%rbp)
jmp 0x78cc1
movq -0x18(%rbp), %rdi
callq 0x78cd0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x78c78
movq -0x28(%rbp), %rdi
addq $0x368, %rdi            # imm = 0x368
movl -0x1c(%rbp), %esi
callq 0x79510
movq -0x28(%rbp), %rdi
addq $0x1ec, %rdi            # imm = 0x1EC
callq 0x7bb40
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x1f4(%rcx), %eax
jne 0x78cbc
movq -0x28(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x7b600
cmpl $0x0, %eax
je 0x78cba
movl $0xc, %eax
movq %rax, -0x8(%rbp)
jmp 0x78cc1
jmp 0x78cbc
jmp 0x78c14
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtProgress_Init
void MtProgress_Init(CMtProgress *p, ICompressProgressPtr progress)
{
  p->progress = progress;
  p->res = SZ_OK;
  p->totalInSize = 0;
  p->totalOutSize = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x79405
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x79405
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
je 0x79403
movq -0x8(%rbp), %rax
movl $0xa, 0x8(%rax)
jmp 0x79405
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x794aa
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x794aa
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
je 0x794a8
movq -0x8(%rbp), %rax
movl $0xa, 0x8(%rax)
jmp 0x794aa
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bae0
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bae0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x79540
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x7bae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x795cb
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x7958f
jmp 0x795cb
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x79640
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
addq $0x20, %rsi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x79634
movq $0x0, -0x8(%rbp)
jmp 0x7964c
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x796b9
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x88(%rcx), %rax
jne 0x796b9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x78(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
jae 0x79752
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x70(%rcx), %eax
ja 0x79725
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jb 0x79704
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0xa8(%rcx), %eax
movl %eax, -0x14(%rbp)
jmp 0x7971b
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x70(%rcx), %eax
movq -0x8(%rbp), %rcx
subl 0xa8(%rcx), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
cmpl %ecx, %eax
ja 0x79742
movq -0x8(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movl -0xc(%rbp), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
addq %rax, %rdi
callq 0x79560
jmp 0x79744
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x796c0
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0xac(%rcx)
movb %al, -0x15(%rbp)
jne 0x79780
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x88(%rcx), %rax
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_Construct
void MtDec_Construct(CMtDec *p)
{
  unsigned i;
  
  p->inBufSize = (size_t)1 << 18;

  p->numThreadsMax = 0;

  p->inStream = NULL;
  
  // p->inData = NULL;
  // p->inDataSize = 0;

  p->crossBlock = NULL;
  p->crossStart = 0;
  p->crossEnd = 0;

  p->numFilledThreads = 0;

  p->progress = NULL;
  p->alloc = NULL;

  p->mtCallback = NULL;
  p->mtCallbackObject = NULL;

  p->allocatedBufsSize = 0;

  for (i = 0; i < MTDEC_THREADS_MAX; i++)
  {
    CMtDecThread *t = &p->threads[i];
    t->mtDec = p;
    t->index = i;
    t->inBuf = NULL;
    Event_Construct(&t->canRead);
    Event_Construct(&t->canWrite);
    Thread_CONSTRUCT(&t->thread)
  }

  // Event_Construct(&p->finishedEvent);

  CriticalSection_Init(&p->mtProgress.cs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x40000, (%rax)        # imm = 0x40000
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xac(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
jae 0x79b06
movq -0x8(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movl -0xc(%rbp), %ecx
imulq $0x110, %rcx, %rcx      # imm = 0x110
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xa0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x30(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x79a89
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7ba70
addq $0x20, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_Free
static void MtDec_Free(CMtDec *p)
{
  unsigned i;

  p->exitThread = True;

  for (i = 0; i < MTDEC_THREADS_MAX; i++)
    MtDecThread_Destruct(&p->threads[i]);

  // Event_Close(&p->finishedEvent);

  if (p->crossBlock)
  {
    ISzAlloc_Free(p->alloc, p->crossBlock);
    p->crossBlock = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x40(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
jae 0x79b9c
movq -0x8(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movl -0xc(%rbp), %eax
imulq $0x110, %rax, %rax      # imm = 0x110
addq %rax, %rdi
callq 0x79fc0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x79b6e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x79bd1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x78(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDecThread_CreateEvents
static WRes MtDecThread_CreateEvents(CMtDecThread *t)
{
  WRes wres = AutoResetEvent_OptCreate_And_Reset(&t->canWrite);
  if (wres == 0)
  {
    wres = AutoResetEvent_OptCreate_And_Reset(&t->canRead);
    if (wres == 0)
      return SZ_OK;
  }
  return wres;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7bb80
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x79f36
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x7bb80
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x79f34
movl $0x0, -0x4(%rbp)
jmp 0x79f3c
jmp 0x79f36
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x7a030
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7b600
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x7b600
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x7b460
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x7b750
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
callq 0x7b750
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_ThreadFunc1
static THREAD_FUNC_DECL MtDec_ThreadFunc1(void *pp)
{
  WRes res;

  CMtDecThread *t = (CMtDecThread *)pp;
  CMtDec *p;

  // fprintf(stdout, "\n%d = %p\n", t->index, &t);

  res = MtDec_ThreadFunc2(t);
  p = t->mtDec;
  if (res == 0)
    return (THREAD_FUNC_RET_TYPE)(MY_uintptr_t)p->exitThreadWRes;
  {
    // it's unexpected situation for some threading function error
    if (p->exitThreadWRes == 0)
      p->exitThreadWRes = res;
    PRF(printf("\nthread exit error = %d\n", res));
    p->exitThread = True;
    Event_Set(&p->threads[0].canRead);
    Event_Set(&p->threads[0].canWrite);
    MtProgress_SetError(&p->mtProgress, MY_SRes_HRESULT_FROM_WRes(res));
  }
  return (THREAD_FUNC_RET_TYPE)(MY_uintptr_t)res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x7a140
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7a0a2
movq -0x28(%rbp), %rax
movslq 0x44(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x7a131
movq -0x28(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x7a0b6
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x40(%rax)
movq -0x28(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
addq $0x38, %rdi
callq 0x7b600
movq -0x28(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
addq $0xa0, %rdi
callq 0x7b600
movq -0x28(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x7a108
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x7a11d
movl -0x14(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl $0x8000000, %eax        # imm = 0x8000000
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x79510
movslq -0x14(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0xd0(%rax), %rcx
movq %rcx, 0xd0(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0xd8(%rax), %rcx
movq %rcx, 0xd8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
jne 0x7affd
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0x7affd
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xc0(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0xd0(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0xd8(%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
je 0x7affb
movq -0x8(%rbp), %rax
movl $0xa, 0xc8(%rax)
jmp 0x7affd
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0xb0(%rcx)
movb %al, -0x2d(%rbp)
je 0x7b024
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0xb8(%rcx), %rax
seta %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bae0
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDec_GetError_Spec
static SRes MtDec_GetError_Spec(CMtDec *p, UInt64 interruptIndex, BoolInt *wasInterrupted)
{
  SRes res;
  CriticalSection_Enter(&p->mtProgress.cs);
  *wasInterrupted = (p->needInterrupt && interruptIndex > p->interruptIndex);
  res = p->mtProgress.res;
  CriticalSection_Leave(&p->mtProgress.cs);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0xb0(%rcx)
movb %al, -0x1d(%rbp)
je 0x7b0af
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0xb8(%rcx), %rax
seta %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bae0
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/MtDec.c
// Function: MtDecThread_CreateAndStart
static SRes MtDecThread_CreateAndStart(CMtDecThread *t)
{
  WRes wres = MtDecThread_CreateEvents(t);
  // wres = 17; // for test
  if (wres == 0)
  {
    if (Thread_WasCreated(&t->thread))
      return SZ_OK;
    wres = Thread_Create(&t->thread, MtDec_ThreadFunc, t);
    if (wres == 0)
      return SZ_OK;
  }
  return MY_SRes_HRESULT_FROM_WRes(wres);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x79ef0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7b14d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x7b121
movl $0x0, -0x4(%rbp)
jmp 0x7b176
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rdx
leaq -0x11e4(%rip), %rsi     # 0x79f50
callq 0x7b2b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7b14b
movl $0x0, -0x4(%rbp)
jmp 0x7b176
jmp 0x7b14d
cmpl $0x0, -0x14(%rbp)
jg 0x7b15b
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x7b170
movl -0x14(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl $0x8000000, %eax        # imm = 0x8000000
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bab0
movq -0x8(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x7b1c2
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0xb8(%rcx), %rax
jae 0x7b1df
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xb0(%rax)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
addq $0x20, %rdi
callq 0x7bae0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4210
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpq $0x40, %rax
jae 0x7b3d1
cmpq $0x0, -0x20(%rbp)
jne 0x7b334
jmp 0x7b3d1
movq -0x20(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x7b3b2
movl -0xa4(%rbp), %eax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x3, %rax
cmpq $0x80, %rax
jae 0x7b399
movq -0xb0(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0xb0(%rbp), %rcx
shrq $0x6, %rcx
orq -0xa0(%rbp,%rcx,8), %rax
movq %rax, -0xa0(%rbp,%rcx,8)
movq %rax, -0xc0(%rbp)
jmp 0x7b3a4
xorl %eax, %eax
movq %rax, -0xc0(%rbp)
jmp 0x7b3a4
movq -0xc0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x7b318
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
callq 0x7b200
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)