// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: decodeFlags
static int decodeFlags(MemPage *pPage, int flagByte){
  BtShared *pBt;     /* A copy of pPage->pBt */

  assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );
  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  pPage->leaf = (u8)(flagByte>>3);  assert( PTF_LEAF == 1<<3 );
  flagByte &= ~PTF_LEAF;
  pPage->childPtrSize = 4-4*pPage->leaf;
  pPage->xCellSize = cellSizePtr;
  pBt = pPage->pBt;
  if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
    /* EVIDENCE-OF: R-03640-13415 A value of 5 means the page is an interior
    ** table b-tree page. */
    assert( (PTF_LEAFDATA|PTF_INTKEY)==5 );
    /* EVIDENCE-OF: R-20501-61796 A value of 13 means the page is a leaf
    ** table b-tree page. */
    assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 );
    pPage->intKey = 1;
    if( pPage->leaf ){
      pPage->intKeyLeaf = 1;
      pPage->noPayload = 0;
      pPage->xParseCell = btreeParseCellPtr;
    }else{
      pPage->intKeyLeaf = 0;
      pPage->noPayload = 1;
      pPage->xCellSize = cellSizePtrNoPayload;
      pPage->xParseCell = btreeParseCellPtrNoPayload;
    }
    pPage->maxLocal = pBt->maxLeaf;
    pPage->minLocal = pBt->minLeaf;
  }else if( flagByte==PTF_ZERODATA ){
    /* EVIDENCE-OF: R-27225-53936 A value of 2 means the page is an interior
    ** index b-tree page. */
    assert( (PTF_ZERODATA)==2 );
    /* EVIDENCE-OF: R-16571-11615 A value of 10 means the page is a leaf
    ** index b-tree page. */
    assert( (PTF_ZERODATA|PTF_LEAF)==10 );
    pPage->intKey = 0;
    pPage->intKeyLeaf = 0;
    pPage->noPayload = 0;
    pPage->xParseCell = btreeParseCellPtrIndex;
    pPage->maxLocal = pBt->maxLocal;
    pPage->minLocal = pBt->minLocal;
  }else{
    /* EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is
    ** an error. */
    return SQLITE_CORRUPT_BKPT;
  }
  pPage->max1bytePayload = pBt->max1bytePayload;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %r8d
shrl $0x3, %r8d
movb %r8b, 0x5(%rdi)
andl $-0x9, %esi
movl %r8d, %eax
shll $0x2, %eax
movb $0x4, %cl
subb %al, %cl
movb %cl, 0x7(%rdi)
leaq 0xbc(%rip), %rax        # 0x22076
movq %rax, 0x78(%rdi)
movq 0x48(%rdi), %rax
cmpl $0x2, %esi
je 0x21feb
cmpl $0x5, %esi
jne 0x2202f
movb $0x1, 0x2(%rdi)
movl $0x2e, %ecx
movl $0x2c, %edx
testb %r8b, %r8b
je 0x2205c
leaq 0x13f(%rip), %rsi       # 0x22125
movb $0x1, %r8b
jmp 0x22003
movb $0x0, 0x2(%rdi)
movl $0x2a, %ecx
movl $0x28, %edx
leaq 0x247(%rip), %rsi       # 0x22247
xorl %r8d, %r8d
xorl %r9d, %r9d
movb %r8b, 0x3(%rdi)
movb %r9b, 0x4(%rdi)
movq %rsi, 0x80(%rdi)
movzwl (%rax,%rdx), %edx
movw %dx, 0xa(%rdi)
movzwl (%rax,%rcx), %ecx
movw %cx, 0xc(%rdi)
movb 0x25(%rax), %al
movb %al, 0x8(%rdi)
xorl %ebx, %ebx
jmp 0x22053
leaq 0x594b2(%rip), %rsi     # 0x7b4e8
leaq 0x59150(%rip), %rcx     # 0x7b18d
movl $0xb, %ebx
movl $0xb, %edi
movl $0xde05, %edx           # imm = 0xDE05
xorl %eax, %eax
callq 0xa4c0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x18c(%rip), %rsi       # 0x221ef
movq %rsi, 0x78(%rdi)
leaq 0x19f(%rip), %rsi       # 0x2220d
movb $0x1, %r9b
xorl %r8d, %r8d
jmp 0x22006