// File: /workspace/github_c_makefile_star2_O1/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, %ecx
shrl $0x3, %ecx
movb %cl, 0x5(%rdi)
andl $-0x9, %esi
movl %ecx, %eax
shll $0x2, %eax
movb $0x4, %dl
subb %al, %dl
movb %dl, 0x7(%rdi)
leaq 0xba(%rip), %rax        # 0x221c1
movq %rax, 0x78(%rdi)
movq 0x48(%rdi), %rax
cmpl $0x2, %esi
je 0x22130
cmpl $0x5, %esi
jne 0x22153
movb $0x1, 0x2(%rdi)
testb %cl, %cl
je 0x22179
movw $0x1, 0x3(%rdi)
leaq 0x142(%rip), %rcx       # 0x22270
jmp 0x22191
movw $0x0, 0x2(%rdi)
movb $0x0, 0x4(%rdi)
leaq 0x251(%rip), %rcx       # 0x22392
movq %rcx, 0x80(%rdi)
leaq 0x28(%rax), %rcx
movl $0x2a, %edx
jmp 0x221a1
leaq 0x5b37e(%rip), %rsi     # 0x7d4d8
leaq 0x5b01c(%rip), %rcx     # 0x7d17d
movl $0xb, %ebx
movl $0xb, %edi
movl $0xde05, %edx           # imm = 0xDE05
xorl %eax, %eax
callq 0xa4b0
jmp 0x221b8
movw $0x100, 0x3(%rdi)       # imm = 0x100
leaq 0x1b4(%rip), %rcx       # 0x2233a
movq %rcx, 0x78(%rdi)
leaq 0x1c7(%rip), %rcx       # 0x22358
movq %rcx, 0x80(%rdi)
leaq 0x2c(%rax), %rcx
movl $0x2e, %edx
movzwl (%rcx), %ecx
movw %cx, 0xa(%rdi)
movzwl (%rax,%rdx), %ecx
movw %cx, 0xc(%rdi)
movb 0x25(%rax), %al
movb %al, 0x8(%rdi)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq