// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereLoopAddAll
static int whereLoopAddAll(WhereLoopBuilder *pBuilder){
  WhereInfo *pWInfo = pBuilder->pWInfo;
  Bitmask mExtra = 0;
  Bitmask mPrior = 0;
  int iTab;
  SrcList *pTabList = pWInfo->pTabList;
  struct SrcList_item *pItem;
  struct SrcList_item *pEnd = &pTabList->a[pWInfo->nLevel];
  sqlite3 *db = pWInfo->pParse->db;
  int rc = SQLITE_OK;
  WhereLoop *pNew;
  u8 priorJointype = 0;

  /* Loop over the tables in the join, from left to right */
  pNew = pBuilder->pNew;
  whereLoopInit(pNew);
  for(iTab=0, pItem=pTabList->a; pItem<pEnd; iTab++, pItem++){
    Bitmask mUnusable = 0;
    pNew->iTab = iTab;
    pNew->maskSelf = sqlite3WhereGetMask(&pWInfo->sMaskSet, pItem->iCursor);
    if( ((pItem->fg.jointype|priorJointype) & (JT_LEFT|JT_CROSS))!=0 ){
      /* This condition is true when pItem is the FROM clause term on the
      ** right-hand-side of a LEFT or CROSS JOIN.  */
      mExtra = mPrior;
    }
    priorJointype = pItem->fg.jointype;
    if( IsVirtual(pItem->pTab) ){
      struct SrcList_item *p;
      for(p=&pItem[1]; p<pEnd; p++){
        if( mUnusable || (p->fg.jointype & (JT_LEFT|JT_CROSS)) ){
          mUnusable |= sqlite3WhereGetMask(&pWInfo->sMaskSet, p->iCursor);
        }
      }
      rc = whereLoopAddVirtual(pBuilder, mExtra, mUnusable);
    }else{
      rc = whereLoopAddBtree(pBuilder, mExtra);
    }
    if( rc==SQLITE_OK ){
      rc = whereLoopAddOr(pBuilder, mExtra, mUnusable);
    }
    mPrior |= pNew->maskSelf;
    if( rc || db->mallocFailed ) break;
  }

  whereLoopClear(db, pNew);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq -0x10(%rbp), %rcx
movzbl 0x39(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movb $0x0, -0x59(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x82bf0
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x83626
movq $0x0, -0x68(%rbp)
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x54, %rdi
movq -0x38(%rbp), %rax
movl 0x44(%rax), %esi
callq 0x87d80
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movzbl 0x3c(%rax), %eax
movzbl -0x59(%rbp), %ecx
orl %ecx, %eax
andl $0xa, %eax
cmpl $0x0, %eax
je 0x8352e
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rax
movb 0x3c(%rax), %al
movb %al, -0x59(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x835bb
movq -0x38(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x835a5
cmpq $0x0, -0x68(%rbp)
jne 0x83579
movq -0x70(%rbp), %rax
movzbl 0x3c(%rax), %eax
andl $0xa, %eax
cmpl $0x0, %eax
je 0x83595
movq -0x10(%rbp), %rdi
addq $0x54, %rdi
movq -0x70(%rbp), %rax
movl 0x44(%rax), %esi
callq 0x87d80
orq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x83597
movq -0x70(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x70(%rbp)
jmp 0x83558
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x89bc0
movl %eax, -0x4c(%rbp)
jmp 0x835cb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8a300
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x835e5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x8ab90
movl %eax, -0x4c(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x83608
movq -0x48(%rbp), %rax
movzbl 0x51(%rax), %eax
cmpl $0x0, %eax
je 0x8360a
jmp 0x83626
jmp 0x8360c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x38(%rbp)
jmp 0x834cf
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x8b140
movl -0x4c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)