// File: /workspace/github_c_makefile_star2_O0/ukontainer[P]sqlite-bench/sqlite3.c
// Function: checkList
static void checkList(
  IntegrityCk *pCheck,  /* Integrity checking context */
  int isFreeList,       /* True for a freelist.  False for overflow page list */
  int iPage,            /* Page number for first page in the list */
  int N                 /* Expected number of pages in the list */
){
  int i;
  int expected = N;
  int nErrAtStart = pCheck->nErr;
  while( iPage!=0 && pCheck->mxErr ){
    DbPage *pOvflPage;
    unsigned char *pOvflData;
    if( checkRef(pCheck, iPage) ) break;
    N--;
    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){
      checkAppendMsg(pCheck, "failed to get page %d", iPage);
      break;
    }
    pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);
    if( isFreeList ){
      int n = get4byte(&pOvflData[4]);
#ifndef SQLITE_OMIT_AUTOVACUUM
      if( pCheck->pBt->autoVacuum ){
        checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0);
      }
#endif
      if( n>(int)pCheck->pBt->usableSize/4-2 ){
        checkAppendMsg(pCheck,
           "freelist leaf count too big on page %d", iPage);
        N--;
      }else{
        for(i=0; i<n; i++){
          Pgno iFreePage = get4byte(&pOvflData[8+i*4]);
#ifndef SQLITE_OMIT_AUTOVACUUM
          if( pCheck->pBt->autoVacuum ){
            checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0);
          }
#endif
          checkRef(pCheck, iFreePage);
        }
        N -= n;
      }
    }
#ifndef SQLITE_OMIT_AUTOVACUUM
    else{
      /* If this database supports auto-vacuum and iPage is not the last
      ** page in this overflow list, check that the pointer-map entry for
      ** the following page matches iPage.
      */
      if( pCheck->pBt->autoVacuum && N>0 ){
        i = get4byte(pOvflData);
        checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage);
      }
    }
#endif
    iPage = get4byte(pOvflData);
    sqlite3PagerUnref(pOvflPage);
  }
  if( N && nErrAtStart==pCheck->nErr ){
    checkAppendMsg(pCheck,
      "%s is %d but should be %d",
      isFreeList ? "size" : "overflow list length",
      expected-N, expected);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x10(%rbp)
movb %al, -0x39(%rbp)
je 0x4504ae
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x4504ba
jmp 0x450658
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x451140
cmpl $0x0, %eax
je 0x4504d0
jmp 0x450658
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x10(%rbp), %esi
leaq -0x28(%rbp), %rdx
xorl %ecx, %ecx
callq 0x40b8f0
cmpl $0x0, %eax
je 0x45050e
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
leaq 0x12ed24(%rip), %rsi    # 0x57f226
movb $0x0, %al
callq 0x4506b0
jmp 0x450658
movq -0x28(%rbp), %rdi
callq 0x40bb60
movq %rax, -0x30(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x450606
movq -0x30(%rbp), %rdi
addq $0x4, %rdi
callq 0x420960
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x21(%rax)
je 0x450555
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x4507f0
movl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x34(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x40(%rbp), %eax
subl $0x2, %ecx
cmpl %ecx, %eax
jle 0x450599
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
leaq 0x12ecb5(%rip), %rsi    # 0x57f23c
movb $0x0, %al
callq 0x4506b0
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x450604
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x4505f9
movq -0x30(%rbp), %rdi
movl -0x18(%rbp), %eax
shll $0x2, %eax
addl $0x8, %eax
cltq
addq %rax, %rdi
callq 0x420960
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x21(%rax)
je 0x4505e2
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x4507f0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x451140
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4505a0
movl -0x34(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x45063e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movzbl 0x21(%rax), %eax
cmpl $0x0, %eax
je 0x45063c
cmpl $0x0, -0x14(%rbp)
jle 0x45063c
movq -0x30(%rbp), %rdi
callq 0x420960
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x10(%rbp), %ecx
movl $0x4, %edx
callq 0x4507f0
jmp 0x45063e
movq -0x30(%rbp), %rdi
callq 0x420960
movl %eax, -0x10(%rbp)
movq -0x28(%rbp), %rdi
callq 0x40bb80
jmp 0x450495
cmpl $0x0, -0x14(%rbp)
je 0x45069e
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x45069e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %ecx
leaq 0x12ec05(%rip), %rdx    # 0x57f27d
leaq 0x13526b(%rip), %rax    # 0x5858ea
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x1c(%rbp), %ecx
subl -0x14(%rbp), %ecx
movl -0x1c(%rbp), %r8d
leaq 0x12ebcc(%rip), %rsi    # 0x57f263
movb $0x0, %al
callq 0x4506b0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)