// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDec_TryDummy
static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, const Byte **bufOut)
{
  UInt32 range = p->range;
  UInt32 code = p->code;
  const Byte *bufLimit = *bufOut;
  const CLzmaProb *probs = GET_PROBS;
  unsigned state = (unsigned)p->state;
  ELzmaDummy res;

  for (;;)
  {
    const CLzmaProb *prob;
    UInt32 bound;
    unsigned ttt;
    unsigned posState = CALC_POS_STATE(p->processedPos, ((unsigned)1 << p->prop.pb) - 1);

    prob = probs + IsMatch + COMBINED_PS_STATE;
    IF_BIT_0_CHECK(prob)
    {
      UPDATE_0_CHECK

      prob = probs + Literal;
      if (p->checkDicSize != 0 || p->processedPos != 0)
        prob += ((UInt32)LZMA_LIT_SIZE *
            ((((p->processedPos) & (((unsigned)1 << (p->prop.lp)) - 1)) << p->prop.lc) +
            ((unsigned)p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));

      if (state < kNumLitStates)
      {
        unsigned symbol = 1;
        do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
      }
      else
      {
        unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
            (p->dicPos < p->reps[0] ? p->dicBufSize : 0)];
        unsigned offs = 0x100;
        unsigned symbol = 1;
        do
        {
          unsigned bit;
          const CLzmaProb *probLit;
          matchByte += matchByte;
          bit = offs;
          offs &= matchByte;
          probLit = prob + (offs + bit + symbol);
          GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ; )
        }
        while (symbol < 0x100);
      }
      res = DUMMY_LIT;
    }
    else
    {
      unsigned len;
      UPDATE_1_CHECK

      prob = probs + IsRep + state;
      IF_BIT_0_CHECK(prob)
      {
        UPDATE_0_CHECK
        state = 0;
        prob = probs + LenCoder;
        res = DUMMY_MATCH;
      }
      else
      {
        UPDATE_1_CHECK
        res = DUMMY_REP;
        prob = probs + IsRepG0 + state;
        IF_BIT_0_CHECK(prob)
        {
          UPDATE_0_CHECK
          prob = probs + IsRep0Long + COMBINED_PS_STATE;
          IF_BIT_0_CHECK(prob)
          {
            UPDATE_0_CHECK
            break;
          }
          else
          {
            UPDATE_1_CHECK
          }
        }
        else
        {
          UPDATE_1_CHECK
          prob = probs + IsRepG1 + state;
          IF_BIT_0_CHECK(prob)
          {
            UPDATE_0_CHECK
          }
          else
          {
            UPDATE_1_CHECK
            prob = probs + IsRepG2 + state;
            IF_BIT_0_CHECK(prob)
            {
              UPDATE_0_CHECK
            }
            else
            {
              UPDATE_1_CHECK
            }
          }
        }
        state = kNumStates;
        prob = probs + RepLenCoder;
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x38(%rdi), %ebp
movl 0x3c(%rdi), %r11d
movq (%rdx), %r8
movq 0x10(%rdi), %r9
movb 0x2(%rdi), %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %ebx
shll %cl, %ebx
movl 0x58(%rdi), %r15d
movl 0x40(%rdi), %r14d
notl %ebx
andl %r14d, %ebx
shll $0x4, %ebx
leal (%rbx,%r15), %eax
movzwl -0x200(%r9,%rax,2), %ecx
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x4b087
cmpq %rsi, %r8
jbe 0x4b61a
shll $0x8, %ebp
shll $0x8, %r11d
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %r11d
movl %ebp, %r10d
shrl $0xb, %r10d
imull %ecx, %r10d
movl %r11d, %ecx
subl %r10d, %ecx
jae 0x4b159
addq $0x280, %r9             # imm = 0x280
movl 0x44(%rdi), %eax
orl %r14d, %eax
je 0x4b0ea
movb 0x1(%rdi), %cl
shll %cl, %r12d
notl %r12d
andl %r12d, %r14d
movzbl (%rdi), %ecx
shll %cl, %r14d
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
jne 0x4b0d0
movq 0x20(%rdi), %rbx
movzbl -0x1(%rax,%rbx), %ebx
movb $0x8, %al
subb %cl, %al
movl %eax, %ecx
shrl %cl, %ebx
addl %r14d, %ebx
imull $0x300, %ebx, %eax      # imm = 0x300
leaq (%r9,%rax,2), %r9
cmpl $0x6, %r15d
ja 0x4b200
movl $0x1, %eax
movl %eax, %ecx
movl %ecx, %edi
movzwl (%r9,%rdi,2), %edi
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b125
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %ebx
incq %rsi
orl %ebx, %r11d
movl %r10d, %ebx
shrl $0xb, %r10d
imull %edi, %r10d
movl %r11d, %edi
subl %r10d, %edi
jae 0x4b13c
addl %ecx, %ecx
jmp 0x4b14c
subl %r10d, %ebx
leal 0x1(,%rcx,2), %ecx
movl %edi, %r11d
movl %ebx, %r10d
cmpl $0x100, %ecx            # imm = 0x100
jb 0x4b0fb
jmp 0x4b604
subl %r10d, %ebp
movzwl 0x20(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x4b183
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %ebp
shll $0x8, %ecx
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %ecx
movl %ebp, %r11d
shrl $0xb, %r11d
imull %edi, %r11d
movl %ecx, %r14d
subl %r11d, %r14d
jae 0x4b21d
movl $0x2, %eax
movq $-0x600, %r14           # imm = 0xFA00
movl %ecx, %edi
movl %r11d, %r12d
movzwl (%r9,%r14), %ebp
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x4b1d3
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r12d
shll $0x8, %edi
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %edi
addq %r9, %r14
movl %r12d, %r10d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %edi, %r13d
movl %ebx, %r15d
movl $0x8, %ebx
subl %r10d, %r13d
jae 0x4b333
leaq (%r14,%r15,2), %r14
xorl %ebp, %ebp
jmp 0x4b438
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rcx
movl 0x48(%rdi), %ebx
subq %rbx, %rcx
jae 0x4b2ac
movq 0x20(%rdi), %rdi
jmp 0x4b2ae
subl %r11d, %ebp
movzwl 0x38(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x4b248
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %ebp
shll $0x8, %r14d
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %r14d
movl %ebp, %r12d
shrl $0xb, %r12d
imull %edi, %r12d
movl %r14d, %edi
subl %r12d, %edi
jae 0x4b367
movzwl -0xc00(%r9,%rax,2), %eax
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x4b28b
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r12d
shll $0x8, %r14d
movzbl (%rsi), %edi
incq %rsi
orl %edi, %r14d
movl %r12d, %r10d
shrl $0xb, %r10d
imull %eax, %r10d
movl %r14d, %edi
subl %r10d, %edi
jae 0x4b548
movl $0x3, %eax
jmp 0x4b604
xorl %edi, %edi
addq %rcx, %rax
movzbl (%rdi,%rax), %ecx
movl $0x1, %eax
movl $0x100, %r14d           # imm = 0x100
movl %eax, %edi
addl %ecx, %ecx
movl %r14d, %ebx
andl %ecx, %ebx
leal (%r14,%rdi), %r15d
addl %ebx, %r15d
movzwl (%r9,%r15,2), %ebp
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b2f9
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %r15d
incq %rsi
orl %r15d, %r11d
movl %r10d, %r15d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %r11d, %ebp
subl %r10d, %ebp
jae 0x4b313
addl %edi, %edi
xorl %r14d, %ebx
jmp 0x4b323
subl %r10d, %r15d
leal 0x1(,%rdi,2), %edi
movl %ebp, %r11d
movl %r15d, %r10d
movl %ebx, %r14d
cmpl $0x100, %edi            # imm = 0x100
jb 0x4b2c2
jmp 0x4b604
subl %r10d, %r12d
movzwl 0x10(%r14), %ebp
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x4b3fc
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r12d
shll $0x8, %r13d
movzbl (%rsi), %edi
incq %rsi
orl %r13d, %edi
jmp 0x4b3ff
subl %r12d, %ebp
movzwl 0x50(%r9,%r15,2), %r10d
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x4b38f
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %ebp
shll $0x8, %edi
movzbl (%rsi), %eax
incq %rsi
orl %eax, %edi
movl $0x3, %eax
movl %ebp, %r12d
shrl $0xb, %r12d
imull %r10d, %r12d
movq $-0xa00, %r14           # imm = 0xF600
movl %edi, %r10d
subl %r12d, %r10d
jb 0x4b1ab
subl %r12d, %ebp
movzwl 0x68(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x4b3dd
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %ebp
shll $0x8, %r10d
movzbl (%rsi), %r15d
incq %rsi
orl %r15d, %r10d
movl %ebp, %r12d
shrl $0xb, %r12d
imull %edi, %r12d
movl %r10d, %edi
subl %r12d, %edi
jae 0x4b55c
movl %r10d, %edi
jmp 0x4b1ab
movl %r13d, %edi
movl %r12d, %r10d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %edi, %r13d
subl %r10d, %r13d
jae 0x4b41e
leaq (%r14,%r15,2), %r14
addq $0x10, %r14
movl %ebx, %ebp
jmp 0x4b438
subl %r10d, %r12d
addq $0x200, %r14            # imm = 0x200
movl $0x10, %ebp
movl $0x100, %ebx            # imm = 0x100
movl %r13d, %edi
movl %r12d, %r10d
movl $0x1, %r15d
movl %r15d, %r12d
movzwl (%r14,%r12,2), %r12d
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b469
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %edi
movzbl (%rsi), %r13d
incq %rsi
orl %r13d, %edi
movl %r10d, %r13d
shrl $0xb, %r10d
imull %r12d, %r10d
movl %edi, %r12d
subl %r10d, %r12d
jae 0x4b481
addl %r15d, %r15d
jmp 0x4b492
subl %r10d, %r13d
leal 0x1(,%r15,2), %r15d
movl %r12d, %edi
movl %r13d, %r10d
cmpl %ebx, %r15d
jb 0x4b43e
cmpl %r11d, %ecx
jae 0x4b604
subl %ebx, %ebp
addl %r15d, %ebp
cmpl $0x3, %ebp
movl $0x3, %ecx
cmovbl %ebp, %ecx
shll $0x7, %ecx
addq %r9, %rcx
addq $0x80, %rcx
movl $0x1, %r11d
movl %r11d, %ebx
movzwl (%rcx,%rbx,2), %ebx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b4eb
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %edi
movzbl (%rsi), %ebp
incq %rsi
orl %ebp, %edi
movl %r10d, %ebp
shrl $0xb, %r10d
imull %ebx, %r10d
movl %edi, %ebx
subl %r10d, %ebx
jae 0x4b502
addl %r11d, %r11d
jmp 0x4b512
subl %r10d, %ebp
leal 0x1(,%r11,2), %r11d
movl %ebx, %edi
movl %ebp, %r10d
cmpl $0x40, %r11d
jb 0x4b4c3
leal -0x40(%r11), %ebx
cmpl $0x4, %ebx
jb 0x4b604
movl %ebx, %ecx
shrl %ecx
cmpl $0xd, %ebx
ja 0x4b567
decl %ecx
andl $0x1, %r11d
orl $0x2, %r11d
shll %cl, %r11d
leaq (%r9,%r11,2), %r9
addq $-0xd00, %r9            # imm = 0xF300
jmp 0x4b5a8
subl %r10d, %r12d
movl $0x3, %eax
movq $-0xa00, %r14           # imm = 0xF600
jmp 0x4b1ab
subl %r12d, %ebp
movl %ebp, %r12d
jmp 0x4b1ab
movl %ecx, %r11d
addl $-0x5, %r11d
movl $0x4, %ecx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b594
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %edi
movzbl (%rsi), %ebx
incq %rsi
orl %ebx, %edi
shrl %r10d
xorl %ebx, %ebx
cmpl %r10d, %edi
js 0x4b5a1
movl %r10d, %ebx
subl %ebx, %edi
decl %r11d
jne 0x4b573
movl $0x1, %r11d
movl %r11d, %ebx
movl %r11d, %r14d
movzwl (%r9,%r14,2), %ebp
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b5d8
cmpq %r8, %rsi
jae 0x4b61a
shll $0x8, %r10d
shll $0x8, %edi
movzbl (%rsi), %r14d
incq %rsi
orl %r14d, %edi
movl %r10d, %r14d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %edi, %ebp
subl %r10d, %ebp
jae 0x4b5ef
leal (%rbx,%rbx), %ebp
jmp 0x4b5fb
subl %r10d, %r14d
addl %ebx, %ebx
movl %ebp, %edi
movl %r14d, %r10d
movl %ebx, %ebp
addl %ebx, %r11d
movl %ebp, %ebx
decl %ecx
jne 0x4b5b1
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x4b615
cmpq %r8, %rsi
jae 0x4b61a
incq %rsi
movq %rsi, (%rdx)
jmp 0x4b61c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq