// File: /workspace/github_cpp_makefile_star2_O1/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), %r10d
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), %ebp
notl %ebx
andl %ebp, %ebx
shll $0x4, %ebx
leal (%rbx,%r15), %r14d
movzwl -0x200(%r9,%r14,2), %ecx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x558f4
cmpq %rsi, %r8
jbe 0x55baf
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %eax
incq %rsi
orl %eax, %r11d
movl %r10d, %eax
shrl $0xb, %r10d
imull %ecx, %r10d
movl %r11d, %ecx
subl %r10d, %ecx
jae 0x559c4
addq $0x280, %r9             # imm = 0x280
movl 0x44(%rdi), %eax
orl %ebp, %eax
je 0x55956
movb 0x1(%rdi), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
andl %eax, %ebp
movzbl (%rdi), %ecx
shll %cl, %ebp
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
jne 0x5593d
movq 0x20(%rdi), %rbx
movzbl -0x1(%rax,%rbx), %ebx
movb $0x8, %al
subb %cl, %al
movl %eax, %ecx
shrl %cl, %ebx
addl %ebp, %ebx
shll $0x8, %ebx
leal (%rbx,%rbx,2), %eax
leaq (%r9,%rax,2), %r9
cmpl $0x6, %r15d
ja 0x55a43
movl $0x1, %eax
movl %eax, %ecx
movzwl (%r9,%rcx,2), %ecx
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x5598f
cmpq %r8, %rsi
jae 0x55bfb
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 0x559a6
addl %eax, %eax
jmp 0x559b6
subl %r10d, %edi
leal 0x1(,%rax,2), %eax
movl %ecx, %r11d
movl %edi, %r10d
cmpl $0x100, %eax            # imm = 0x100
jb 0x55965
movb $0x1, %al
jmp 0x55bfd
subl %r10d, %eax
movzwl 0x20(%r9,%r15,2), %edi
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x559ed
cmpq %r8, %rsi
jae 0x55bb9
shll $0x8, %eax
shll $0x8, %ecx
movzbl (%rsi), %r10d
incq %rsi
orl %r10d, %ecx
movl %eax, %r11d
shrl $0xb, %r11d
imull %edi, %r11d
movl %ecx, %edi
subl %r11d, %edi
jae 0x55a60
movl $0x2, %edi
movq $-0x600, %r14           # imm = 0xFA00
movl %ecx, %r10d
movl %r11d, %eax
movzwl (%r9,%r14), %ebp
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55ae3
cmpq %r8, %rsi
jae 0x55bf3
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %r12d
incq %rsi
orl %r10d, %r12d
movl %r12d, %r10d
jmp 0x55ae6
movq 0x18(%rdi), %rax
movq 0x28(%rdi), %rcx
movl 0x48(%rdi), %ebx
subq %rbx, %rcx
jae 0x55b0f
movq 0x20(%rdi), %rdi
jmp 0x55b11
subl %r11d, %eax
movzwl 0x38(%r9,%r15,2), %r10d
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55a87
cmpq %r8, %rsi
jae 0x55c6b
shll $0x8, %eax
shll $0x8, %edi
movzbl (%rsi), %ebp
incq %rsi
orl %ebp, %edi
movl %eax, %r12d
shrl $0xb, %eax
imull %r10d, %eax
movl %edi, %r10d
subl %eax, %r10d
jae 0x55c14
movzwl -0xc00(%r9,%r14,2), %r10d
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55ac4
cmpq %r8, %rsi
jae 0x55c6b
shll $0x8, %eax
shll $0x8, %edi
movzbl (%rsi), %ebp
incq %rsi
orl %ebp, %edi
movl %eax, %ebp
shrl $0xb, %eax
imull %r10d, %eax
movl %edi, %r10d
subl %eax, %r10d
jae 0x55ded
movl $0x2, %ebp
jmp 0x55c70
movl %r10d, %r12d
addq %r9, %r14
movl %eax, %r13d
shrl $0xb, %r13d
imull %ebp, %r13d
subl %r13d, %r10d
jae 0x55bc5
movl %ebx, %eax
leaq (%r14,%rax,2), %r14
xorl %ebx, %ebx
movl $0x8, %ebp
jmp 0x55cc0
xorl %edi, %edi
addq %rcx, %rax
movzbl (%rdi,%rax), %eax
movl $0x1, %ecx
movl $0x100, %edi            # imm = 0x100
addl %eax, %eax
movl %edi, %ebx
andl %eax, %ebx
leal (%rdi,%rcx), %r14d
addl %ebx, %r14d
movzwl (%r9,%r14,2), %ebp
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x55b54
cmpq %r8, %rsi
jae 0x55b85
shll $0x8, %r10d
shll $0x8, %r11d
movzbl (%rsi), %r14d
incq %rsi
orl %r14d, %r11d
movl %r10d, %r15d
shrl $0xb, %r10d
imull %ebp, %r10d
movl %r11d, %ebp
subl %r10d, %ebp
jae 0x55b70
addl %ecx, %ecx
xorl %edi, %ebx
movb $0x1, %r14b
jmp 0x55b88
subl %r10d, %r15d
leal 0x1(,%rcx,2), %ecx
movb $0x1, %r14b
movl %ebp, %r11d
movl %r15d, %r10d
jmp 0x55b88
xorl %r14d, %r14d
movl %ebx, %edi
testb %r14b, %r14b
je 0x55baf
cmpl $0x100, %ecx            # imm = 0x100
jb 0x55b22
movl $0x1, %edi
movl $0x1, %ebp
testb %r14b, %r14b
jne 0x55f19
jmp 0x55f1e
movl $0x1, %ebp
jmp 0x55f1e
movl $0x1, %ebp
xorl %ebx, %ebx
jmp 0x55f12
subl %r13d, %eax
movzwl 0x10(%r14), %ebp
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55c7a
cmpq %r8, %rsi
jae 0x55bf3
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %r12d
incq %rsi
orl %r10d, %r12d
jmp 0x55c7d
xorl %r14d, %r14d
jmp 0x55d2e
xorl %eax, %eax
movl $0x1, %edi
movl $0x1, %ebp
testb %al, %al
jne 0x55f19
jmp 0x55f1e
subl %eax, %r12d
movzwl 0x50(%r9,%r15,2), %edi
cmpl $0xffffff, %r12d        # imm = 0xFFFFFF
ja 0x55c40
cmpq %r8, %rsi
jae 0x55e55
shll $0x8, %r12d
shll $0x8, %r10d
movzbl (%rsi), %eax
incq %rsi
orl %eax, %r10d
movl %r12d, %eax
shrl $0xb, %r12d
imull %edi, %r12d
movl $0x3, %edi
movq $-0xa00, %r14           # imm = 0xF600
movl %r10d, %ebp
subl %r12d, %ebp
jae 0x55e02
movl %r12d, %eax
jmp 0x55a11
movl $0x1, %ebp
movl $0x3, %edi
jmp 0x55e4e
movl %r10d, %r12d
movl %eax, %r13d
shrl $0xb, %r13d
imull %ebp, %r13d
movl %r12d, %r10d
subl %r13d, %r10d
jae 0x55ca6
movl %ebx, %eax
leaq (%r14,%rax,2), %r14
addq $0x10, %r14
movl $0x8, %ebp
movl $0x8, %ebx
jmp 0x55cc0
subl %r13d, %eax
addq $0x200, %r14            # imm = 0x200
movl $0x10, %ebx
movl $0x100, %ebp            # imm = 0x100
movl %r10d, %r12d
movl %eax, %r13d
movl $0x1, %r15d
movl %r12d, %r10d
movl %r13d, %eax
movl %r15d, %r12d
movzwl (%r14,%r12,2), %r12d
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55cf1
cmpq %r8, %rsi
jae 0x55d2b
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %r13d
incq %rsi
orl %r13d, %r10d
movl %eax, %r13d
shrl $0xb, %eax
imull %r12d, %eax
movl %r10d, %r12d
subl %eax, %r12d
jae 0x55d08
addl %r15d, %r15d
jmp 0x55d19
subl %eax, %r13d
leal 0x1(,%r15,2), %r15d
movl %r12d, %r10d
movl %r13d, %eax
cmpl %ebp, %r15d
jb 0x55ccc
subl %ebp, %ebx
addl %r15d, %ebx
movb $0x1, %r14b
movl %ebx, %r15d
jmp 0x55d2e
xorl %r14d, %r14d
xorl %ebp, %ebp
testb %r14b, %r14b
je 0x55e49
movb $0x1, %bl
cmpl %r11d, %ecx
jae 0x55f12
cmpl $0x3, %r15d
movl $0x3, %ecx
cmovbl %r15d, %ecx
shll $0x7, %ecx
addq %r9, %rcx
addq $0x80, %rcx
movl $0x1, %r11d
movl %r11d, %ebx
movzwl (%rcx,%rbx,2), %ebx
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55d8b
cmpq %r8, %rsi
jae 0x55f08
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %ebp
incq %rsi
orl %ebp, %r10d
movl %eax, %ebp
shrl $0xb, %eax
imull %ebx, %eax
movl %r10d, %ebx
subl %eax, %ebx
jae 0x55d9f
addl %r11d, %r11d
jmp 0x55dae
subl %eax, %ebp
leal 0x1(,%r11,2), %r11d
movl %ebx, %r10d
movl %ebp, %eax
cmpl $0x40, %r11d
jb 0x55d64
leal -0x40(%r11), %ebp
movb $0x1, %bl
cmpl $0x4, %ebp
jb 0x55f0a
movl %ebp, %ecx
shrl %ecx
cmpl $0xd, %ebp
ja 0x55e69
decl %ecx
andl $0x1, %r11d
orl $0x2, %r11d
shll %cl, %r11d
leaq (%r9,%r11,2), %r9
addq $-0xd00, %r9            # imm = 0xF300
jmp 0x55ea6
subl %eax, %ebp
movl $0x3, %edi
movq $-0xa00, %r14           # imm = 0xF600
movl %ebp, %eax
jmp 0x55a11
subl %r12d, %eax
movzwl 0x68(%r9,%r15,2), %r10d
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55e27
cmpq %r8, %rsi
jae 0x55e49
shll $0x8, %eax
shll $0x8, %ebp
movzbl (%rsi), %r15d
incq %rsi
orl %r15d, %ebp
movl %eax, %r15d
shrl $0xb, %r15d
imull %r10d, %r15d
movl %ebp, %r10d
subl %r15d, %r10d
jae 0x55f46
movl %ebp, %r10d
movl %r15d, %eax
jmp 0x55a11
movl $0x1, %ebp
xorl %ebx, %ebx
jmp 0x55f12
movl $0x1, %ebp
movl $0x3, %edi
xorl %ebx, %ebx
movl %r12d, %eax
jmp 0x55f12
addl $-0x5, %ecx
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55e8d
cmpq %r8, %rsi
jae 0x55f08
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %r11d
incq %rsi
orl %r11d, %r10d
shrl %eax
xorl %r11d, %r11d
cmpl %eax, %r10d
js 0x55e9a
movl %eax, %r11d
subl %r11d, %r10d
decl %ecx
jne 0x55e6c
movl $0x4, %ecx
movl $0x1, %r11d
movl $0x1, %r14d
movl %r11d, %r15d
movzwl (%r9,%r15,2), %ebp
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x55ed7
cmpq %r8, %rsi
jae 0x55f08
shll $0x8, %eax
shll $0x8, %r10d
movzbl (%rsi), %r15d
incq %rsi
orl %r15d, %r10d
movl %eax, %r15d
shrl $0xb, %eax
imull %ebp, %eax
movl %r10d, %ebp
subl %eax, %ebp
jae 0x55eed
leal (%r14,%r14), %ebp
jmp 0x55efc
subl %eax, %r15d
addl %r14d, %r14d
movl %ebp, %r10d
movl %r15d, %eax
movl %r14d, %ebp
addl %r14d, %r11d
movl %ebp, %r14d
decl %ecx
jne 0x55eb2
jmp 0x55f0a
xorl %ebx, %ebx
movl %ebx, %ecx
xorb $0x1, %cl
movzbl %cl, %ebp
movl %eax, %r10d
testb %bl, %bl
je 0x55f1e
movl $0x2, %ebp
xorl %eax, %eax
cmpl $0x2, %ebp
jne 0x55f3b
cmpl $0xffffff, %r10d        # imm = 0xFFFFFF
ja 0x55f36
cmpq %r8, %rsi
jae 0x55f3b
incq %rsi
movq %rsi, (%rdx)
movl %edi, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %r15d, %eax
jmp 0x55a11