// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/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;
  sqlite3 *db = pWInfo->pParse->db;
  int nTabList = pWInfo->nLevel;
  int rc = SQLITE_OK;
  u8 priorJoinType = 0;
  WhereLoop *pNew;

  /* Loop over the tables in the join, from left to right */
  pNew = pBuilder->pNew;
  whereLoopInit(pNew);
  for(iTab=0, pItem=pTabList->a; iTab<nTabList; iTab++, pItem++){
    pNew->iTab = iTab;
    pNew->maskSelf = getMask(&pWInfo->sMaskSet, pItem->iCursor);
    if( ((pItem->jointype|priorJoinType) & (JT_LEFT|JT_CROSS))!=0 ){
      mExtra = mPrior;
    }
    priorJoinType = pItem->jointype;
    if( IsVirtual(pItem->pTab) ){
      rc = whereLoopAddVirtual(pBuilder);
    }else{
      rc = whereLoopAddBtree(pBuilder, mExtra);
    }
    if( rc==SQLITE_OK ){
      rc = whereLoopAddOr(pBuilder, mExtra);
    }
    mPrior |= pNew->maskSelf;
    if( rc || db->mallocFailed ) break;
  }
  whereLoopClear(db, pNew);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %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 -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x38(%rax), %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movb $0x0, -0x49(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x71bd0
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x72427
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x4c, %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %esi
callq 0x72c50
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movzbl 0x38(%rax), %eax
movzbl -0x49(%rbp), %ecx
orl %ecx, %eax
andl $0xa, %eax
cmpl $0x0, %eax
je 0x72394
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rax
movb 0x38(%rax), %al
movb %al, -0x49(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x723c0
movq -0x8(%rbp), %rdi
callq 0x778f0
movl %eax, -0x48(%rbp)
jmp 0x723d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x77f50
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jne 0x723e6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78640
movl %eax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x48(%rbp)
jne 0x72409
movq -0x40(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x0, %eax
je 0x7240b
jmp 0x72427
jmp 0x7240d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x38(%rbp)
jmp 0x7233f
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x78c30
movl -0x48(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)