// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeParseCellPtrIndex
static void btreeParseCellPtrIndex(
  MemPage *pPage,         /* Page containing the cell */
  u8 *pCell,              /* Pointer to the cell text. */
  CellInfo *pInfo         /* Fill in this structure */
){
  u8 *pIter;              /* For scanning through pCell */
  u32 nPayload;           /* Number of bytes of cell payload */

  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  assert( pPage->leaf==0 || pPage->leaf==1 );
  assert( pPage->intKeyLeaf==0 );
  pIter = pCell + pPage->childPtrSize;
  nPayload = *pIter;
  if( nPayload>=0x80 ){
    u8 *pEnd = &pIter[8];
    nPayload &= 0x7f;
    do{
      nPayload = (nPayload<<7) | (*++pIter & 0x7f);
    }while( *(pIter)>=0x80 && pIter<pEnd );
  }
  pIter++;
  pInfo->nKey = nPayload;
  pInfo->nPayload = nPayload;
  pInfo->pPayload = pIter;
  testcase( nPayload==pPage->maxLocal );
  testcase( nPayload==pPage->maxLocal+1 );
  if( nPayload<=pPage->maxLocal ){
    /* This is the (easy) common case where the entire payload fits
    ** on the local page.  No overflow is required.
    */
    pInfo->nSize = nPayload + (u16)(pIter - pCell);
    if( pInfo->nSize<4 ) pInfo->nSize = 4;
    pInfo->nLocal = (u16)nPayload;
  }else{
    btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl 0xa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x80, -0x24(%rbp)
jb 0x3e4a1e
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
shll $0x7, %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl 0x1(%rcx), %ecx
andl $0x7f, %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
movb %al, -0x31(%rbp)
jl 0x3e4a15
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3e49d2
jmp 0x3e4a1e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
cmpl %ecx, %eax
ja 0x3e4aa0
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
subq %rdx, %rcx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x18(%rbp), %rax
movzwl 0x16(%rax), %eax
cmpl $0x4, %eax
jge 0x3e4a90
movq -0x18(%rbp), %rax
movw $0x4, 0x16(%rax)
movl -0x24(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x14(%rax)
jmp 0x3e4ab1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3e4ac0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)