LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEncode
SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
    const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
    ICompressProgressPtr progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
{
  CLzmaEncHandle p = LzmaEnc_Create(alloc);
  SRes res;
  if (!p)
    return SZ_ERROR_MEM;

  res = LzmaEnc_SetProps(p, props);
  if (res == SZ_OK)
  {
    res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize);
    if (res == SZ_OK)
      res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen,
          writeEndMark, progress, alloc, allocBig);
  }

  LzmaEnc_Destroy(p, alloc, allocBig);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq 0x28(%rbp), %rdi
callq 0x679d0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x69943
movl $0x2, -0x4(%rbp)
jmp 0x699c6
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x677f0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x699af
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x69700
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x699ad
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl 0x18(%rbp), %r9d
movq 0x20(%rbp), %r11
movq 0x28(%rbp), %r10
movq 0x30(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x69800
movl %eax, -0x44(%rbp)
jmp 0x699af
movq -0x40(%rbp), %rdi
movq 0x28(%rbp), %rsi
movq 0x30(%rbp), %rdx
callq 0x67ac0
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_FastPosInit
static void LzmaEnc_FastPosInit(Byte *g_FastPos)
{
  unsigned slot;
  g_FastPos[0] = 0;
  g_FastPos[1] = 1;
  g_FastPos += 2;
  
  for (slot = 2; slot < kNumLogBits * 2; slot++)
  {
    size_t k = ((size_t)1 << ((slot >> 1) - 1));
    size_t j;
    for (j = 0; j < k; j++)
      g_FastPos[j] = (Byte)slot;
    g_FastPos += k;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x1c, %rax
jae 0x69a92
movl -0xc(%rbp), %eax
shrl %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x69a7b
movl -0xc(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x69a53
movq -0x18(%rbp), %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x69a2a
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_InitPriceTables
static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices)
{
  UInt32 i;
  for (i = 0; i < (kBitModelTotal >> kNumMoveReducingBits); i++)
  {
    const unsigned kCyclesBits = kNumBitPriceShiftBits;
    UInt32 w = (i << kNumMoveReducingBits) + (1 << (kNumMoveReducingBits - 1));
    unsigned bitCount = 0;
    unsigned j;
    for (j = 0; j < kCyclesBits; j++)
    {
      w = w * w;
      bitCount <<= 1;
      while (w >= ((UInt32)1 << 16))
      {
        w >>= 1;
        bitCount++;
      }
    }
    ProbPrices[i] = (CProbPrice)(((unsigned)kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
    // printf("\n%3d: %5d", i, ProbPrices[i]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x80, -0xc(%rbp)
jae 0x69b3e
movl $0x4, -0x10(%rbp)
movl -0xc(%rbp), %eax
shll $0x4, %eax
addl $0x8, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jae 0x69b1e
movl -0x14(%rbp), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shll %eax
movl %eax, -0x18(%rbp)
cmpl $0x10000, -0x14(%rbp)   # imm = 0x10000
jb 0x69b11
movl -0x14(%rbp), %eax
shrl %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x69af5
jmp 0x69b13
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x69add
movl $0xa1, %edx
subl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x69aaf
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LzmaEnc_FreeLits
static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
{
  ISzAlloc_Free(alloc, p->litProbs);
  ISzAlloc_Free(alloc, p->saveState.litProbs);
  p->litProbs = NULL;
  p->saveState.litProbs = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x1f888(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f888(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_Alloc
static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc)
{
  if (!p->bufBase)
  {
    p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, RC_BUF_SIZE);
    if (!p->bufBase)
      return 0;
    p->bufLim = p->bufBase + RC_BUF_SIZE;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x69f23
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x69f0c
movl $0x0, -0x4(%rbp)
jmp 0x69f2a
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x10000, %rcx          # imm = 0x10000
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LenEnc_Init
static void LenEnc_Init(CLenEnc *p)
{
  unsigned i;
  for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++)
    p->low[i] = kProbInitValue;
  for (i = 0; i < kLenNumHighSymbols; i++)
    p->high[i] = kProbInitValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jae 0x69f70
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw $0x400, (%rax,%rcx,2)   # imm = 0x400
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x69f4f
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jae 0x69f9c
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw $0x400, 0x200(%rax,%rcx,2) # imm = 0x400
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x69f77
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: SetPrices_3
static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices)
{
  unsigned i;
  for (i = 0; i < 8; i += 2)
  {
    UInt32 price = startPrice;
    UInt32 prob;
    price += GET_PRICEa(probs[1           ], (i >> 2));
    price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1);
    prob = probs[4 + (i >> 1)];
    prices[i    ] = price + GET_PRICEa_0(prob);
    prices[i + 1] = price + GET_PRICEa_1(prob);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x24(%rbp)
jae 0x6ab25
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
movl -0x24(%rbp), %esi
shrl $0x2, %esi
xorl %edx, %edx
subl %esi, %edx
andl $0x7ff, %edx            # imm = 0x7FF
xorl %edx, %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movl -0x24(%rbp), %edx
shrl $0x2, %edx
addl $0x2, %edx
movl %edx, %edx
movzwl (%rcx,%rdx,2), %ecx
movl -0x24(%rbp), %esi
shrl %esi
andl $0x1, %esi
xorl %edx, %edx
subl %esi, %edx
andl $0x7ff, %edx            # imm = 0x7FF
xorl %edx, %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shrl %ecx
addl $0x4, %ecx
movl %ecx, %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
addl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
xorl $0x7ff, %ecx            # imm = 0x7FF
shrl $0x4, %ecx
movl %ecx, %ecx
addl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0x6aa4a
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: CheckErrors
static SRes CheckErrors(CLzmaEnc *p)
{
  if (p->result != SZ_OK)
    return p->result;
  if (p->rc.res != SZ_OK)
    p->result = SZ_ERROR_WRITE;

  #ifndef Z7_ST
  if (
      // p->mf_Failure ||
        (p->mtMode &&
          ( // p->matchFinderMt.failure_LZ_LZ ||
            p->matchFinderMt.failure_LZ_BT))
     )
  {
    p->result = MY_HRES_ERROR_INTERNAL_ERROR;
    // printf("\nCheckErrors p->matchFinderMt.failureLZ\n");
  }
  #endif

  if (MFB.result != SZ_OK)
    p->result = SZ_ERROR_READ;
  
  if (p->result != SZ_OK)
    p->finished = True;
  return p->result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
je 0x6ab57
movq -0x10(%rbp), %rax
movl 0xf8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6abdd
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x6ab72
movq -0x10(%rbp), %rax
movl $0x9, 0xf8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xfc(%rax)
je 0x6ab9a
movq -0x10(%rbp), %rax
cmpl $0x0, 0x148(%rax)
je 0x6ab9a
movq -0x10(%rbp), %rax
movl $0x8007054f, 0xf8(%rax) # imm = 0x8007054F
movq -0x10(%rbp), %rax
cmpl $0x0, 0x69c(%rax)
je 0x6abb5
movq -0x10(%rbp), %rax
movl $0x8, 0xf8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
je 0x6abd0
movq -0x10(%rbp), %rax
movl $0x1, 0xd4(%rax)
movq -0x10(%rbp), %rax
movl 0xf8(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: Flush
Z7_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
{
  /* ReleaseMFStream(); */
  p->finished = True;
  if (p->writeEndMark)
    WriteEndMarker(p, nowPos & p->pbMask);
  RangeEnc_FlushData(&p->rc);
  RangeEnc_FlushStream(&p->rc);
  return CheckErrors(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0xd4(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x6ac2d
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
andl 0x64(%rax), %esi
callq 0x6e2a0
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x6e590
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x6e5d0
movq -0x8(%rbp), %rdi
callq 0x6ab30
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_EncodeBit_0
static void RangeEnc_EncodeBit_0(CRangeEnc *p, CLzmaProb *prob)
{
  UInt32 range, ttt, newBound;
  range = p->range;
  RC_BIT_PRE(p, prob)
  RC_BIT_0(p, prob)
  p->range = range;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
shrl $0xb, %eax
imull -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movl $0x800, %ecx            # imm = 0x800
subl -0x18(%rbp), %ecx
shrl $0x5, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
cmpl $0x1000000, -0x14(%rbp) # imm = 0x1000000
jae 0x6ae5b
movl -0x14(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6db00
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LitEnc_Encode
static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym)
{
  UInt32 range = p->range;
  sym |= 0x100;
  do
  {
    UInt32 ttt, newBound;
    // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1);
    CLzmaProb *prob = probs + (sym >> 8);
    UInt32 bit = (sym >> 7) & 1;
    sym <<= 1;
    RC_BIT(p, prob, bit)
  }
  while (sym < 0x10000);
  p->range = range;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shrl $0x8, %ecx
movl %ecx, %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
shrl $0x7, %eax
andl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
shrl $0xb, %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x20(%rbp), %eax
andl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x20(%rbp), %eax
andl -0x30(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x30(%rbp), %eax
andl $0x7e1, %eax            # imm = 0x7E1
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x1f, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
subl -0x1c(%rbp), %eax
sarl $0x5, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
cmpl $0x1000000, -0x18(%rbp) # imm = 0x1000000
jae 0x6af6e
movl -0x18(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6db00
jmp 0x6af70
cmpl $0x10000, -0x14(%rbp)   # imm = 0x10000
jb 0x6ae97
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_ShiftLow
Z7_FASTCALL RangeEnc_ShiftLow(CRangeEnc *p)
{
  UInt32 low = (UInt32)p->low;
  unsigned high = (unsigned)(p->low >> 32);
  p->low = (UInt32)(low << 8);
  if (low < (UInt32)0xFF000000 || high != 0)
  {
    {
      Byte *buf = p->buf;
      *buf++ = (Byte)(p->cache + high);
      p->cache = (unsigned)(low >> 24);
      p->buf = buf;
      if (buf == p->bufLim)
        RangeEnc_FlushStream(p);
      if (p->cacheSize == 0)
        return;
    }
    high += 0xFF;
    for (;;)
    {
      Byte *buf = p->buf;
      *buf++ = (Byte)(high);
      p->buf = buf;
      if (buf == p->bufLim)
        RangeEnc_FlushStream(p);
      if (--p->cacheSize == 0)
        return;
    }
  }
  p->cacheSize++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
shll $0x8, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpl $0xff000000, -0xc(%rbp) # imm = 0xFF000000
jb 0x6db4b
cmpl $0x0, -0x10(%rbp)
je 0x6dc1b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x10(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0xc(%rbp), %ecx
shrl $0x18, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x6dba4
movq -0x8(%rbp), %rdi
callq 0x6e5d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6dbb1
jmp 0x6dc2b
movl -0x10(%rbp), %eax
addl $0xff, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x6dc01
movq -0x8(%rbp), %rdi
callq 0x6e5d0
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x6dc19
jmp 0x6dc2b
jmp 0x6dbbc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LitEnc_EncodeMatched
static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte)
{
  UInt32 range = p->range;
  UInt32 offs = 0x100;
  sym |= 0x100;
  do
  {
    UInt32 ttt, newBound;
    CLzmaProb *prob;
    UInt32 bit;
    matchByte <<= 1;
    // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1);
    prob = probs + (offs + (matchByte & offs) + (sym >> 8));
    bit = (sym >> 7) & 1;
    sym <<= 1;
    offs &= ~(matchByte ^ sym);
    RC_BIT(p, prob, bit)
  }
  while (sym < 0x10000);
  p->range = range;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x100, -0x20(%rbp)     # imm = 0x100
movl -0x14(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shll %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl -0x18(%rbp), %edx
andl -0x20(%rbp), %edx
addl %edx, %ecx
movl -0x14(%rbp), %edx
shrl $0x8, %edx
addl %edx, %ecx
movl %ecx, %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
shrl $0x7, %eax
andl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
xorl -0x14(%rbp), %eax
xorl $-0x1, %eax
andl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xb, %eax
imull -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
xorl %eax, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
andl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x38(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl -0x34(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x28(%rbp), %eax
andl -0x38(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x38(%rbp), %eax
andl $0x7e1, %eax            # imm = 0x7E1
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
addl $0x1f, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
subl -0x24(%rbp), %eax
sarl $0x5, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
cmpl $0x1000000, -0x1c(%rbp) # imm = 0x1000000
jae 0x6dd6c
movl -0x1c(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6db00
jmp 0x6dd6e
cmpl $0x10000, -0x14(%rbp)   # imm = 0x10000
jb 0x6dc71
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RcTree_ReverseEncode
static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym)
{
  UInt32 range = rc->range;
  unsigned m = 1;
  do
  {
    UInt32 ttt, newBound;
    unsigned bit = sym & 1;
    // RangeEnc_EncodeBit(rc, probs + m, bit);
    sym >>= 1;
    RC_BIT(rc, probs + m, bit)
    m = (m << 1) | bit;
  }
  while (--numBits);
  rc->range = range;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
shrl %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xb, %eax
imull -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
xorl %eax, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
andl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
andl -0x30(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x30(%rbp), %eax
andl $0x7e1, %eax            # imm = 0x7E1
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x1f, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
subl -0x24(%rbp), %eax
sarl $0x5, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
cmpl $0x1000000, -0x1c(%rbp) # imm = 0x1000000
jae 0x6e26c
movl -0x1c(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6db00
movl -0x20(%rbp), %eax
shll %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x6e1a6
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: RangeEnc_FlushStream
Z7_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p)
{
  const size_t num = (size_t)(p->buf - p->bufBase);
  if (p->res == SZ_OK)
  {
    if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num))
      p->res = SZ_ERROR_WRITE;
  }
  p->processed += num;
  p->buf = p->bufBase;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x6e63f
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rsi
movq -0x10(%rbp), %rdx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
je 0x6e63d
movq -0x8(%rbp), %rax
movl $0x9, 0x40(%rax)
jmp 0x6e63f
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LitEnc_Matched_GetPrice
static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices)
{
  UInt32 price = 0;
  UInt32 offs = 0x100;
  sym |= 0x100;
  do
  {
    matchByte <<= 1;
    price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1);
    sym <<= 1;
    offs &= ~(matchByte ^ sym);
  }
  while (sym < 0x10000);
  return price;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x100, -0x20(%rbp)     # imm = 0x100
movl -0xc(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
shll %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl -0x20(%rbp), %edx
movl -0x10(%rbp), %esi
andl -0x20(%rbp), %esi
addl %esi, %edx
movl -0xc(%rbp), %esi
shrl $0x8, %esi
addl %esi, %edx
movl %edx, %edx
movzwl (%rcx,%rdx,2), %ecx
movl -0xc(%rbp), %esi
shrl $0x7, %esi
andl $0x1, %esi
xorl %edx, %edx
subl %esi, %edx
andl $0x7ff, %edx            # imm = 0x7FF
xorl %edx, %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
xorl -0xc(%rbp), %eax
xorl $-0x1, %eax
andl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x10000, -0xc(%rbp)    # imm = 0x10000
jb 0x6e69b
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzmaEnc.c
// Function: LitEnc_GetPrice
static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices)
{
  UInt32 price = 0;
  sym |= 0x100;
  do
  {
    unsigned bit = sym & 1;
    sym >>= 1;
    price += GET_PRICEa(probs[sym], bit);
  }
  while (sym >= 2);
  return price;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0xc(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shrl %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
xorl %edx, %edx
subl -0x20(%rbp), %edx
andl $0x7ff, %edx            # imm = 0x7FF
xorl %edx, %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x2, -0xc(%rbp)
jae 0x6e731
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: SeqInStream_ReadMax
SRes SeqInStream_ReadMax(ISeqInStreamPtr stream, void *buf, size_t *processedSize)
{
  size_t size = *processedSize;
  *processedSize = 0;
  while (size != 0)
  {
    size_t cur = size;
    const SRes res = ISeqInStream_Read(stream, buf, &cur);
    *processedSize += cur;
    buf = (void *)((Byte *)buf + cur);
    size -= cur;
    if (res != SZ_OK)
      return res;
    if (cur == 0)
      return SZ_OK;
  }
  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 -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x6e9ca
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq *%rax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x6e9b8
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6e9d1
cmpq $0x0, -0x30(%rbp)
jne 0x6e9c8
movl $0x0, -0x4(%rbp)
jmp 0x6e9d1
jmp 0x6e95a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookInStream_LookRead
SRes LookInStream_LookRead(ILookInStreamPtr stream, void *buf, size_t *size)
{
  const void *lookBuf;
  if (*size == 0)
    return SZ_OK;
  RINOK(ILookInStream_Look(stream, &lookBuf, size))
  memcpy(buf, lookBuf, *size);
  return ILookInStream_Skip(stream, *size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6eaa7
movl $0x0, -0x4(%rbp)
jmp 0x6eaf9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rsi
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6eacd
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6eaf9
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x4320
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookInStream_Read2
SRes LookInStream_Read2(ILookInStreamPtr stream, void *buf, size_t size, SRes errorType)
{
  while (size != 0)
  {
    size_t processed = size;
    RINOK(ILookInStream_Read(stream, buf, &processed))
    if (processed == 0)
      return errorType;
    buf = (void *)((Byte *)buf + processed);
    size -= processed;
  }
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6eb89
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x6eb5d
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6eb90
cmpq $0x0, -0x30(%rbp)
jne 0x6eb6c
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6eb90
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x6eb27
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookToRead2_CreateVTable
void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead)
{
  p->vt.Look = lookahead ?
      LookToRead2_Look_Lookahead :
      LookToRead2_Look_Exact;
  p->vt.Skip = LookToRead2_Skip;
  p->vt.Read = LookToRead2_Read;
  p->vt.Seek = LookToRead2_Seek;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edx
leaq 0x12b(%rip), %rcx       # 0x6ed10
leaq 0x44(%rip), %rax        # 0x6ec30
cmpl $0x0, %edx
cmovneq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
leaq 0x1fb(%rip), %rcx       # 0x6ee00
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
leaq 0x21c(%rip), %rcx       # 0x6ee30
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0x2cd(%rip), %rcx       # 0x6eef0
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookToRead2_Look_Lookahead
static SRes LookToRead2_Look_Lookahead(ILookInStreamPtr pp, const void **buf, size_t *size)
{
  SRes res = SZ_OK;
  GET_LookToRead2
  size_t size2 = p->size - p->pos;
  if (size2 == 0 && *size != 0)
  {
    p->pos = 0;
    p->size = 0;
    size2 = p->bufSize;
    res = ISeekInStream_Read(p->realStream, p->buf, &size2);
    p->size = size2;
  }
  if (*size > size2)
    *size = size2;
  *buf = p->buf + p->pos;
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
subq 0x28(%rcx), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6eccc
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6eccc
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x28(%rbp), %rcx
movq 0x38(%rcx), %rsi
leaq -0x30(%rbp), %rdx
callq *%rax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x6ece4
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookToRead2_Look_Exact
static SRes LookToRead2_Look_Exact(ILookInStreamPtr pp, const void **buf, size_t *size)
{
  SRes res = SZ_OK;
  GET_LookToRead2
  size_t size2 = p->size - p->pos;
  if (size2 == 0 && *size != 0)
  {
    p->pos = 0;
    p->size = 0;
    if (*size > p->bufSize)
      *size = p->bufSize;
    res = ISeekInStream_Read(p->realStream, p->buf, size);
    size2 = p->size = *size;
  }
  if (*size > size2)
    *size = size2;
  *buf = p->buf + p->pos;
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
subq 0x28(%rcx), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6edc7
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6edc7
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x6ed90
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x28(%rbp), %rcx
movq 0x38(%rcx), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0x30(%rcx)
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x6eddf
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/lzma/C/7zStream.c
// Function: LookToRead2_Read
static SRes LookToRead2_Read(ILookInStreamPtr pp, void *buf, size_t *size)
{
  GET_LookToRead2
  size_t rem = p->size - p->pos;
  if (rem == 0)
    return ISeekInStream_Read(p->realStream, buf, size);
  if (rem > *size)
    rem = *size;
  memcpy(buf, p->buf + p->pos, rem);
  p->pos += rem;
  *size = rem;
  return SZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
subq 0x28(%rcx), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6ee89
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x6eee0
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x6eea1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x4320
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: MatchFinder_MoveBlock
Z7_NO_INLINE
void MatchFinder_MoveBlock(CMatchFinder *p)
{
  const size_t offset = (size_t)(p->buffer - p->bufBase) - p->keepSizeBefore;
  const size_t keepBefore = (offset & (kBlockMoveAlign - 1)) + p->keepSizeBefore;
  p->buffer = p->bufBase + keepBefore;
  memmove(p->bufBase,
      p->bufBase + (offset & ~((size_t)kBlockMoveAlign - 1)),
      keepBefore + (size_t)GET_AVAIL_BYTES(p));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x54(%rcx), %ecx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0x7f, %rax
movq -0x8(%rbp), %rcx
movl 0x54(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
addq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x10(%rbp), %rax
andq $-0x80, %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x8(%rcx), %eax
movl %eax, %eax
addq %rax, %rdx
callq 0x45c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: MatchFinder_NeedMove
int MatchFinder_NeedMove(CMatchFinder *p)
{
  if (p->directInput)
    return 0;
  if (p->streamEndWasReached || p->result != SZ_OK)
    return 0;
  return ((size_t)(p->bufBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x23(%rax)
je 0x6f0cb
movl $0x0, -0x4(%rbp)
jmp 0x6f11c
movq -0x10(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x6f0e2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x74(%rax)
je 0x6f0eb
movl $0x0, -0x4(%rbp)
jmp 0x6f11c
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x50(%rcx), %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq -0x10(%rbp), %rcx
movl 0x58(%rcx), %ecx
cmpq %rcx, %rax
setbe %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: MatchFinder_Construct
void MatchFinder_Construct(CMatchFinder *p)
{
  unsigned i;
  p->buffer = NULL;
  p->bufBase = NULL;
  p->directInput = 0;
  p->stream = NULL;
  p->hash = NULL;
  p->expectedDataSize = (UInt64)(Int64)-1;
  MatchFinder_SetDefaultSettings(p);

  for (i = 0; i < 256; i++)
  {
    UInt32 r = (UInt32)i;
    unsigned j;
    for (j = 0; j < 8; j++)
      r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1)));
    p->crc[i] = r;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x23(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x480(%rax)
movq -0x8(%rbp), %rdi
callq 0x6f3c0
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jae 0x6f3ac
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jae 0x6f393
movl -0x10(%rbp), %eax
shrl %eax
movl -0x10(%rbp), %edx
andl $0x1, %edx
xorl %ecx, %ecx
subl %edx, %ecx
andl $0xedb88320, %ecx       # imm = 0xEDB88320
xorl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f368
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %edx, 0x78(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6f352
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: MatchFinder_SetDefaultSettings
static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
{
  p->cutValue = 32;
  p->btMode = 1;
  p->numHashBytes = 4;
  p->numHashBytes_Min = 2;
  p->numHashOutBits = 0;
  p->bigHash = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x20, 0x3c(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x21(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x2, 0x70(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x71(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x22(%rax)
popq %rbp
retq
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: LzInWindow_Create2
static int LzInWindow_Create2(CMatchFinder *p, UInt32 blockSize, ISzAllocPtr alloc)
{
  if (blockSize == 0)
    return 0;
  if (!p->bufBase || p->blockSize != blockSize)
  {
    // size_t blockSizeT;
    LzInWindow_Free(p, alloc);
    p->blockSize = blockSize;
    // blockSizeT = blockSize;
    
    // printf("\nblockSize = 0x%x\n", blockSize);
    /*
    #if defined _WIN64
    // we can allocate 4GiB, but still use UInt32 for (p->blockSize)
    // we use UInt32 type for (p->blockSize), because
    // we don't want to wrap over 4 GiB,
    // when we use (p->streamPos - p->pos) that is UInt32.
    if (blockSize >= (UInt32)0 - (UInt32)kBlockSizeAlign)
    {
      blockSizeT = ((size_t)1 << 32);
      printf("\nchanged to blockSizeT = 4GiB\n");
    }
    #endif
    */
    
    p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, blockSize);
    // printf("\nbufferBase = %p\n", p->bufBase);
    // return 0; // for debug
  }
  return (p->bufBase != NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x6f892
movl $0x0, -0x4(%rbp)
jmp 0x6f8f1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x6f8a9
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x6f8dd
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6f470
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl %ecx, %esi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: GetBlockSize
static UInt32 GetBlockSize(CMatchFinder *p, UInt32 historySize)
{
  UInt32 blockSize = (p->keepSizeBefore + p->keepSizeAfter);
  /*
  if (historySize > kMaxHistorySize)
    return 0;
  */
  // printf("\nhistorySize == 0x%x\n", historySize);
  
  if (p->keepSizeBefore < historySize || blockSize < p->keepSizeBefore)  // if 32-bit overflow
    return 0;
  
  {
    const UInt32 kBlockSizeMax = (UInt32)0 - (UInt32)kBlockSizeAlign;
    const UInt32 rem = kBlockSizeMax - blockSize;
    const UInt32 reserve = (blockSize >> (blockSize < ((UInt32)1 << 30) ? 1 : 2))
        + (1 << 12) + kBlockMoveAlign + kBlockSizeAlign; // do not overflow 32-bit here
    if (blockSize >= kBlockSizeMax
        || rem < kBlockSizeReserveMin) // we reject settings that will be slow
      return 0;
    if (reserve >= rem)
      blockSize = kBlockSizeMax;
    else
    {
      blockSize += reserve;
      blockSize &= ~(UInt32)(kBlockSizeAlign - 1);
    }
  }
  // printf("\n LzFind_blockSize = %x\n", blockSize);
  // printf("\n LzFind_blockSize = %d\n", blockSize >> 20);
  return blockSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x58(%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
cmpl -0x14(%rbp), %eax
jb 0x6f934
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x54(%rcx), %eax
jae 0x6f940
movl $0x0, -0x4(%rbp)
jmp 0x6f9c5
movl $0xffff0000, -0x1c(%rbp) # imm = 0xFFFF0000
movl $0xffff0000, %eax       # imm = 0xFFFF0000
subl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
movl -0x18(%rbp), %esi
movl $0x2, %ecx
movl $0x1, %edx
cmpl $0x40000000, %esi       # imm = 0x40000000
cmovbl %edx, %ecx
shrl %cl, %eax
addl $0x1000, %eax           # imm = 0x1000
addl $0x80, %eax
addl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x24(%rbp)
cmpl $0xffff0000, -0x18(%rbp) # imm = 0xFFFF0000
jae 0x6f991
cmpl $0x1000000, -0x20(%rbp) # imm = 0x1000000
jae 0x6f99a
movl $0x0, -0x4(%rbp)
jmp 0x6f9c5
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jb 0x6f9ab
movl $0xffff0000, -0x18(%rbp) # imm = 0xFFFF0000
jmp 0x6f9bf
movl -0x24(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: MatchFinder_GetHashMask2
static UInt32 MatchFinder_GetHashMask2(CMatchFinder *p, UInt32 hs)
{
  if (p->numHashBytes == 2)
    return (1 << 16) - 1;
  if (hs != 0)
    hs--;
  hs |= (hs >> 1);
  hs |= (hs >> 2);
  hs |= (hs >> 4);
  hs |= (hs >> 8);
  // we propagated 16 bits in (hs). Low 16 bits must be set later
  if (hs >= (1 << 24))
  {
    if (p->numHashBytes == 3)
      hs = (1 << 24) - 1;
    /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
  }
  // (hash_size >= (1 << 16)) : Required for (numHashBytes > 2)
  hs |= (1 << 16) - 1; /* don't change it! */
  // bt5: we adjust the size with recommended minimum size
  if (p->numHashBytes >= 5)
    hs |= (256 << kLzHash_CrcShift_2) - 1;
  return hs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x5c(%rax)
jne 0x6f9f1
movl $0xffff, -0x4(%rbp)     # imm = 0xFFFF
jmp 0x6fa71
cmpl $0x0, -0x14(%rbp)
je 0x6fa00
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0x2, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0x4, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0x8, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x1000000, -0x14(%rbp) # imm = 0x1000000
jb 0x6fa4b
movq -0x10(%rbp), %rax
cmpl $0x3, 0x5c(%rax)
jne 0x6fa49
movl $0xffffff, -0x14(%rbp)  # imm = 0xFFFFFF
jmp 0x6fa4b
movl -0x14(%rbp), %eax
orl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, 0x5c(%rax)
jb 0x6fa6b
movl -0x14(%rbp), %eax
orl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/lzma/C/LzFind.c
// Function: AllocRefs
static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc)
{
  const size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
  if (sizeInBytes / sizeof(CLzRef) != num)
    return NULL;
  return (CLzRef *)ISzAlloc_Alloc(alloc, sizeInBytes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shrq $0x2, %rax
cmpq -0x10(%rbp), %rax
je 0x6fb74
movq $0x0, -0x8(%rbp)
jmp 0x6fb89
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)