// File: /workspace/github_cpp_makefile_star2_O3/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, %ebx       # imm = 0xFFFFFFFF
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 0x55603
cmpq %rsi, %r8
jbe 0x55b9e
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 0x556d5
addq $0x280, %r9             # imm = 0x280
movl 0x44(%rdi), %eax
orl %r14d, %eax
je 0x55669
movb 0x1(%rdi), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
andl %eax, %r14d
movzbl (%rdi), %ecx
shll %cl, %r14d
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
jne 0x5564f
movq 0x20(%rdi), %rbx
movzbl -0x1(%rax,%rbx), %ebx
movb $0x8, %al
subb %cl, %al
movl %eax, %ecx
shrl %cl, %ebx
addl %r14d, %ebx
shll $0x8, %ebx
leal (%rbx,%rbx,2), %eax
leaq (%r9,%rax,2), %r9
cmpl $0x6, %r15d
ja 0x5577b
movl $0x1, %eax
movl %eax, %ecx
movzwl (%r9,%rcx,2), %ecx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x556a2
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %edi
incq %rsi
orl %edi, %r11d
movl %r10d, %edi
shrl $0xb, %r10d
imull %ecx, %r10d
movl %r11d, %ecx
subl %r10d, %ecx
jae 0x556b9
addl %eax, %eax
jmp 0x556c9
subl %r10d, %edi
leal 0x1(,%rax,2), %eax
movl %ecx, %r11d
movl %edi, %r10d
cmpl $0x100, %eax            # imm = 0x100
jb 0x55678
jmp 0x558ad
subl %r10d, %ebp
movzwl 0x20(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x556ff
cmpq %r8, %rsi
jae 0x55b9e
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 0x55798
movl $0x2, %eax
movq $-0x600, %r14           # imm = 0xFA00
movl %ecx, %edi
movl %r11d, %r12d
movzwl (%r9,%r14), %ebp
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x5574f
cmpq %r8, %rsi
jae 0x55b9e
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, %r15d
subl %r10d, %r15d
jae 0x558cf
movl %ebx, %ebx
leaq (%r14,%rbx,2), %r14
xorl %ebx, %ebx
movl $0x8, %ebp
jmp 0x559e0
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rcx
movl 0x48(%rdi), %ebx
subq %rbx, %rcx
jae 0x55831
movq 0x20(%rdi), %rdi
jmp 0x55833
subl %r11d, %ebp
movzwl 0x38(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x557c3
cmpq %r8, %rsi
jae 0x55b9e
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 0x55903
movzwl -0xc00(%r9,%rax,2), %eax
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x55806
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %r12d
shll $0x8, %r14d
movzbl (%rsi), %edi
incq %rsi
orl %edi, %r14d
movl %r12d, %r10d
shrl $0xb, %r10d
imull %eax, %r10d
movl $0x3, %eax
movl %r14d, %edi
subl %r10d, %edi
jb 0x558b2
subl %r10d, %r12d
movq $-0xa00, %r14           # imm = 0xF600
jmp 0x55727
xorl %edi, %edi
addq %rcx, %rax
movzbl (%rdi,%rax), %eax
movl $0x1, %ecx
movl $0x100, %ebx            # imm = 0x100
addl %eax, %eax
movl %ebx, %edi
andl %eax, %edi
leal (%rbx,%rcx), %r14d
addl %edi, %r14d
movzwl (%r9,%r14,2), %ebp
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x5587a
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %r14d
incq %rsi
orl %r14d, %r11d
movl %r10d, %r14d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %r11d, %ebp
subl %r10d, %ebp
jae 0x55893
addl %ecx, %ecx
xorl %ebx, %edi
jmp 0x558a3
subl %r10d, %r14d
leal 0x1(,%rcx,2), %ecx
movl %ebp, %r11d
movl %r14d, %r10d
movl %edi, %ebx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x55844
movl $0x1, %eax
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x558c7
cmpq %r8, %rsi
jae 0x55b9e
incq %rsi
movq %rsi, (%rdx)
jmp 0x55ba0
subl %r10d, %r12d
movzwl 0x10(%r14), %ebp
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x5599a
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %r12d
shll $0x8, %r15d
movzbl (%rsi), %edi
incq %rsi
orl %r15d, %edi
jmp 0x5599d
subl %r12d, %ebp
movzwl 0x50(%r9,%r15,2), %eax
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x5592d
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %ebp
shll $0x8, %edi
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %edi
movl %ebp, %r12d
shrl $0xb, %r12d
imull %eax, %r12d
movl $0x3, %eax
movq $-0xa00, %r14           # imm = 0xF600
movl %edi, %r10d
subl %r12d, %r10d
jb 0x55727
subl %r12d, %ebp
movzwl 0x68(%r9,%r15,2), %edi
cmpl $0xffffff, %ebp         # imm = 0xFFFFFF
ja 0x5597b
cmpq %r8, %rsi
jae 0x55b9e
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 0x55af0
movl %r10d, %edi
jmp 0x55727
movl %r15d, %edi
movl %r12d, %r10d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %edi, %r15d
subl %r10d, %r15d
jae 0x559c6
movl %ebx, %ebx
leaq (%r14,%rbx,2), %r14
addq $0x10, %r14
movl $0x8, %ebp
movl $0x8, %ebx
jmp 0x559e0
subl %r10d, %r12d
addq $0x200, %r14            # imm = 0x200
movl $0x10, %ebx
movl $0x100, %ebp            # imm = 0x100
movl %r15d, %edi
movl %r12d, %r10d
movl $0x1, %r15d
movl %r15d, %r12d
movzwl (%r14,%r12,2), %r12d
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x55a11
cmpq %r8, %rsi
jae 0x55b9e
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 0x55a29
addl %r15d, %r15d
jmp 0x55a3a
subl %r10d, %r13d
leal 0x1(,%r15,2), %r15d
movl %r12d, %edi
movl %r13d, %r10d
cmpl %ebp, %r15d
jb 0x559e6
cmpl %r11d, %ecx
jae 0x558b2
subl %ebp, %ebx
addl %r15d, %ebx
cmpl $0x3, %ebx
movl $0x3, %ecx
cmovbl %ebx, %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 0x55a93
cmpq %r8, %rsi
jae 0x55b9e
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 0x55aaa
addl %r11d, %r11d
jmp 0x55aba
subl %r10d, %ebp
leal 0x1(,%r11,2), %r11d
movl %ebx, %edi
movl %ebp, %r10d
cmpl $0x40, %r11d
jb 0x55a6b
leal -0x40(%r11), %ebx
cmpl $0x4, %ebx
jb 0x558b2
movl %ebx, %ecx
shrl %ecx
cmpl $0xd, %ebx
ja 0x55afb
decl %ecx
andl $0x1, %r11d
orl $0x2, %r11d
shll %cl, %r11d
leaq (%r9,%r11,2), %r9
addq $-0xd00, %r9            # imm = 0xF300
jmp 0x55b3b
subl %r12d, %ebp
movl %ebp, %r12d
jmp 0x55727
addl $-0x5, %ecx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x55b21
cmpq %r8, %rsi
jae 0x55b9e
shll $0x8, %r10d
shll $0x8, %edi
movzbl (%rsi), %r11d
incq %rsi
orl %r11d, %edi
shrl %r10d
xorl %r11d, %r11d
cmpl %r10d, %edi
js 0x55b2f
movl %r10d, %r11d
subl %r11d, %edi
decl %ecx
jne 0x55afe
movl $0x4, %ecx
movl $0x1, %r11d
movl $0x1, %ebx
movl %r11d, %r14d
movzwl (%r9,%r14,2), %ebp
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x55b6d
cmpq %r8, %rsi
jae 0x55b9e
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 0x55b84
leal (%rbx,%rbx), %ebp
jmp 0x55b90
subl %r10d, %r14d
addl %ebx, %ebx
movl %ebp, %edi
movl %r14d, %r10d
movl %ebx, %ebp
addl %ebx, %r11d
movl %ebp, %ebx
decl %ecx
jne 0x55b46
jmp 0x558b2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq