// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/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-07291-35328 A value of 5 (0x05) means the page is an
    ** interior table b-tree page. */
    assert( (PTF_LEAFDATA|PTF_INTKEY)==5 );
    /* EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) 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->xParseCell = btreeParseCellPtr;
    }else{
      pPage->intKeyLeaf = 0;
      pPage->xCellSize = cellSizePtrNoPayload;
      pPage->xParseCell = btreeParseCellPtrNoPayload;
    }
    pPage->maxLocal = pBt->maxLeaf;
    pPage->minLocal = pBt->minLeaf;
  }else if( flagByte==PTF_ZERODATA ){
    /* EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an
    ** interior index b-tree page. */
    assert( (PTF_ZERODATA)==2 );
    /* EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a
    ** leaf index b-tree page. */
    assert( (PTF_ZERODATA|PTF_LEAF)==10 );
    pPage->intKey = 0;
    pPage->intKeyLeaf = 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_PAGE(pPage);
  }
  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, 0x8(%rax)
movl -0x14(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %ecx
shll $0x2, %ecx
movl $0x4, %eax
subl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0xa(%rax)
movq -0x10(%rbp), %rax
leaq 0x243(%rip), %rcx       # 0x3e4550
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x5, -0x14(%rbp)
jne 0x3e439c
movq -0x10(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x3e4351
movq -0x10(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x10(%rbp), %rax
leaq 0x398(%rip), %rcx       # 0x3e46e0
movq %rcx, 0x80(%rax)
jmp 0x3e437a
movq -0x10(%rbp), %rax
movb $0x0, 0x3(%rax)
movq -0x10(%rbp), %rax
leaq 0x54c(%rip), %rcx       # 0x3e48b0
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
leaq 0x5ad(%rip), %rcx       # 0x3e4920
movq %rcx, 0x80(%rax)
movq -0x20(%rbp), %rax
movw 0x2e(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x20(%rbp), %rax
movw 0x30(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
jmp 0x3e43f7
cmpl $0x2, -0x14(%rbp)
jne 0x3e43e6
movq -0x10(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x3(%rax)
movq -0x10(%rbp), %rax
leaq 0x5c3(%rip), %rcx       # 0x3e4980
movq %rcx, 0x80(%rax)
movq -0x20(%rbp), %rax
movw 0x2a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x20(%rbp), %rax
movw 0x2c(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
jmp 0x3e43f5
movl $0x10325, %edi          # imm = 0x10325
callq 0x3dff80
movl %eax, -0x4(%rbp)
jmp 0x3e440c
jmp 0x3e43f7
movq -0x20(%rbp), %rax
movb 0x25(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0xb(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)