// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
sarl $0x3, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movl -0x14(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x5(%rax), %ecx
shll $0x2, %ecx
movl $0x4, %eax
subl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x10(%rbp), %rax
leaq 0x133(%rip), %rcx       # 0x2b4b0
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x5, -0x14(%rbp)
jne 0x2b420
movq -0x10(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x5(%rax)
je 0x2b3cd
movq -0x10(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
leaq 0x27c(%rip), %rcx       # 0x2b640
movq %rcx, 0x80(%rax)
jmp 0x2b3fe
movq -0x10(%rbp), %rax
movb $0x0, 0x3(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
leaq 0x428(%rip), %rcx       # 0x2b810
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
leaq 0x489(%rip), %rcx       # 0x2b880
movq %rcx, 0x80(%rax)
movq -0x20(%rbp), %rax
movw 0x2c(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x20(%rbp), %rax
movw 0x2e(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
jmp 0x2b483
cmpl $0x2, -0x14(%rbp)
jne 0x2b472
movq -0x10(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x3(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
leaq 0x497(%rip), %rcx       # 0x2b8e0
movq %rcx, 0x80(%rax)
movq -0x20(%rbp), %rax
movw 0x28(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x20(%rbp), %rax
movw 0x2a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
jmp 0x2b481
movl $0xde05, %edi           # imm = 0xDE05
callq 0x2a650
movl %eax, -0x4(%rbp)
jmp 0x2b498
jmp 0x2b483
movq -0x20(%rbp), %rax
movb 0x25(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)