// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: wherePathSatisfiesOrderBy
static int wherePathSatisfiesOrderBy(
  WhereInfo *pWInfo,    /* The WHERE clause */
  ExprList *pOrderBy,   /* ORDER BY or GROUP BY or DISTINCT clause to check */
  WherePath *pPath,     /* The WherePath to check */
  u16 wctrlFlags,       /* Might contain WHERE_GROUPBY or WHERE_DISTINCTBY */
  u16 nLoop,            /* Number of entries in pPath->aLoop[] */
  WhereLoop *pLast,     /* Add this WhereLoop to the end of pPath->aLoop[] */
  Bitmask *pRevMask     /* OUT: Mask of WhereLoops to run in reverse order */
){
  u8 revSet;            /* True if rev is known */
  u8 rev;               /* Composite sort order */
  u8 revIdx;            /* Index sort order */
  u8 isOrderDistinct;   /* All prior WhereLoops are order-distinct */
  u8 distinctColumns;   /* True if the loop has UNIQUE NOT NULL columns */
  u8 isMatch;           /* iColumn matches a term of the ORDER BY clause */
  u16 nColumn;          /* Number of columns in pIndex */
  u16 nOrderBy;         /* Number terms in the ORDER BY clause */
  int iLoop;            /* Index of WhereLoop in pPath being processed */
  int i, j;             /* Loop counters */
  int iCur;             /* Cursor number for current WhereLoop */
  int iColumn;          /* A column number within table iCur */
  WhereLoop *pLoop = 0; /* Current WhereLoop being processed. */
  WhereTerm *pTerm;     /* A single term of the WHERE clause */
  Expr *pOBExpr;        /* An expression from the ORDER BY clause */
  CollSeq *pColl;       /* COLLATE function from an ORDER BY clause term */
  Index *pIndex;        /* The index associated with pLoop */
  sqlite3 *db = pWInfo->pParse->db;  /* Database connection */
  Bitmask obSat = 0;    /* Mask of ORDER BY terms satisfied so far */
  Bitmask obDone;       /* Mask of all ORDER BY terms */
  Bitmask orderDistinctMask;  /* Mask of all well-ordered loops */
  Bitmask ready;              /* Mask of inner loops */

  /*
  ** We say the WhereLoop is "one-row" if it generates no more than one
  ** row of output.  A WhereLoop is one-row if all of the following are true:
  **  (a) All index columns match with WHERE_COLUMN_EQ.
  **  (b) The index is unique
  ** Any WhereLoop with an WHERE_COLUMN_EQ constraint on the rowid is one-row.
  ** Every one-row WhereLoop will have the WHERE_ONEROW bit set in wsFlags.
  **
  ** We say the WhereLoop is "order-distinct" if the set of columns from
  ** that WhereLoop that are in the ORDER BY clause are different for every
  ** row of the WhereLoop.  Every one-row WhereLoop is automatically
  ** order-distinct.   A WhereLoop that has no columns in the ORDER BY clause
  ** is not order-distinct. To be order-distinct is not quite the same as being
  ** UNIQUE since a UNIQUE column or index can have multiple rows that 
  ** are NULL and NULL values are equivalent for the purpose of order-distinct.
  ** To be order-distinct, the columns must be UNIQUE and NOT NULL.
  **
  ** The rowid for a table is always UNIQUE and NOT NULL so whenever the
  ** rowid appears in the ORDER BY clause, the corresponding WhereLoop is
  ** automatically order-distinct.
  */

  assert( pOrderBy!=0 );

  /* Sortability of virtual tables is determined by the xBestIndex method
  ** of the virtual table itself */
  if( pLast->wsFlags & WHERE_VIRTUALTABLE ){
    testcase( nLoop>0 );  /* True when outer loops are one-row and match 
                          ** no ORDER BY terms */
    return pLast->u.vtab.isOrdered;
  }
  if( nLoop && OptimizationDisabled(db, SQLITE_OrderByIdxJoin) ) return 0;

  nOrderBy = pOrderBy->nExpr;
  testcase( nOrderBy==BMS-1 );
  if( nOrderBy>BMS-1 ) return 0;  /* Cannot optimize overly large ORDER BYs */
  isOrderDistinct = 1;
  obDone = MASKBIT(nOrderBy)-1;
  orderDistinctMask = 0;
  ready = 0;
  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){
    if( iLoop>0 ) ready |= pLoop->maskSelf;
    pLoop = iLoop<nLoop ? pPath->aLoop[iLoop] : pLast;
    assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );
    iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;

    /* Mark off any ORDER BY term X that is a column in the table of
    ** the current loop for which there is term in the WHERE
    ** clause of the form X IS NULL or X=? that reference only outer
    ** loops.
    */
    for(i=0; i<nOrderBy; i++){
      if( MASKBIT(i) & obSat ) continue;
      pOBExpr = sqlite3ExprSkipCollate(pOrderBy->a[i].pExpr);
      if( pOBExpr->op!=TK_COLUMN ) continue;
      if( pOBExpr->iTable!=iCur ) continue;
      pTerm = findTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
                       ~ready, WO_EQ|WO_ISNULL, 0);
      if( pTerm==0 ) continue;
      if( (pTerm->eOperator&WO_EQ)!=0 && pOBExpr->iColumn>=0 ){
        const char *z1, *z2;
        pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
        if( !pColl ) pColl = db->pDfltColl;
        z1 = pColl->zName;
        pColl = sqlite3ExprCollSeq(pWInfo->pParse, pTerm->pExpr);
        if( !pColl ) pColl = db->pDfltColl;
        z2 = pColl->zName;
        if( sqlite3StrICmp(z1, z2)!=0 ) continue;
      }
      obSat |= MASKBIT(i);
    }

    if( (pLoop->wsFlags & WHERE_ONEROW)==0 ){
      if( pLoop->wsFlags & WHERE_IPK ){
        pIndex = 0;
        nColumn = 0;
      }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
        return 0;
      }else{
        nColumn = pIndex->nColumn;
        isOrderDistinct = pIndex->onError!=OE_None;
      }

      /* Loop through all columns of the index and deal with the ones
      ** that are not constrained by == or IN.
      */
      rev = revSet = 0;
      distinctColumns = 0;
      for(j=0; j<=nColumn; j++){
        u8 bOnce;   /* True to run the ORDER BY search loop */

        /* Skip over == and IS NULL terms */
        if( j<pLoop->u.btree.nEq
         && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL))!=0
        ){
          if( i & WO_ISNULL ){
            testcase( isOrderDistinct );
            isOrderDistinct = 0;
          }
          continue;  
        }

        /* Get the column number in the table (iColumn) and sort order
        ** (revIdx) for the j-th column of the index.
        */
        if( j<nColumn ){
          /* Normal index columns */
          iColumn = pIndex->aiColumn[j];
          revIdx = pIndex->aSortOrder[j];
          if( iColumn==pIndex->pTable->iPKey ) iColumn = -1;
        }else{
          /* The ROWID column at the end */
          assert( j==nColumn );
          iColumn = -1;
          revIdx = 0;
        }

        /* An unconstrained column that might be NULL means that this
        ** WhereLoop is not well-ordered 
        */
        if( isOrderDistinct
         && iColumn>=0
         && j>=pLoop->u.btree.nEq
         && pIndex->pTable->aCol[iColumn].notNull==0
        ){
          isOrderDistinct = 0;
        }

        /* Find the ORDER BY term that corresponds to the j-th column
        ** of the index and and mark that ORDER BY term off 
        */
        bOnce = 1;
        isMatch = 0;
        for(i=0; bOnce && i<nOrderBy; i++){
          if( MASKBIT(i) & obSat ) continue;
          pOBExpr = sqlite3ExprSkipCollate(pOrderBy->a[i].pExpr);
          testcase( wctrlFlags & WHERE_GROUPBY );
          testcase( wctrlFlags & WHERE_DISTINCTBY );
          if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0;
          if( pOBExpr->op!=TK_COLUMN ) continue;
          if( pOBExpr->iTable!=iCur ) continue;
          if( pOBExpr->iColumn!=iColumn ) continue;
          if( iColumn>=0 ){
            pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
            if( !pColl ) pColl = db->pDfltColl;
            if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;
          }
          isMatch = 1;
          break;
        }
        if( isMatch ){
          if( iColumn<0 ){
            testcase( distinctColumns==0 );
            distinctColumns = 1;
          }
          obSat |= MASKBIT(i);
          if( (pWInfo->wctrlFlags & WHERE_GROUPBY)==0 ){
            /* Make sure the sort order is compatible in an ORDER BY clause.
            ** Sort order is irrelevant for a GROUP BY clause. */
            if( revSet ){
              if( (rev ^ revIdx)!=pOrderBy->a[i].sortOrder ) return 0;
            }else{
              rev = revIdx ^ pOrderBy->a[i].sortOrder;
              if( rev ) *pRevMask |= MASKBIT(iLoop);
              revSet = 1;
            }
          }
        }else{
          /* No match found */
          if( j==0 || j<nColumn ){
            testcase( isOrderDistinct!=0 );
            isOrderDistinct = 0;
          }
          break;
        }
      } /* end Loop over all index columns */
      if( distinctColumns ){
        testcase( isOrderDistinct==0 );
        isOrderDistinct = 1;
      }
    } /* end-if not one-row */

    /* Mark off any other ORDER BY terms that reference pLoop */
    if( isOrderDistinct ){
      orderDistinctMask |= pLoop->maskSelf;
      for(i=0; i<nOrderBy; i++){
        Expr *p;
        if( MASKBIT(i) & obSat ) continue;
        p = pOrderBy->a[i].pExpr;
        if( (exprTableUsage(&pWInfo->sMaskSet, p)&~orderDistinctMask)==0 ){
          obSat |= MASKBIT(i);
        }
      }
    }
  } /* End the loop over all WhereLoops from outer-most down to inner-most */
  if( obSat==obDone ) return 1;
  if( !isOrderDistinct ) return 0;
  return -1;
}

// Assembly:
testb $0x4, 0x29(%r9)
jne 0x5ab4b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %r10d
movq %rsi, %r11
movq (%rdi), %rax
movq (%rax), %rsi
testw %r8w, %r8w
je 0x5ab2e
testb $-0x80, 0x4c(%rsi)
jne 0x5ab37
movzwl (%r11), %ecx
cmpl $0x3f, %ecx
jbe 0x5ab51
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x1d(%r9), %eax
retq
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq %rax, -0xb8(%rbp)
testl %ecx, %ecx
je 0x5b1cb
movq %rsi, -0x90(%rbp)
movq %rdx, -0xd0(%rbp)
movq %r9, -0xe0(%rbp)
leaq 0x150(%rdi), %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x58(%rbp)
leaq 0x4c(%rdi), %rax
movq %rax, -0xf0(%rbp)
movl %ecx, %edi
movzwl %r8w, %ecx
movb $0x1, %r13b
andl $0x300, %r10d           # imm = 0x300
movq $0x0, -0x40(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0xb0(%rbp)
xorl %r12d, %r12d
xorl %esi, %esi
movl %r10d, -0x30(%rbp)
movq %r11, -0x48(%rbp)
movq %rdi, -0x60(%rbp)
movq %rcx, -0xd8(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x5abfe
movq -0x88(%rbp), %rax
orq 0x8(%rsi), %rax
movq %rax, -0x88(%rbp)
movl %r13d, -0x2c(%rbp)
movq -0xe0(%rbp), %rdx
cmpq %rcx, -0x40(%rbp)
jae 0x5ac22
movq -0xd0(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq %rdx, -0x70(%rbp)
movzbl 0x10(%rdx), %ecx
imulq $0x68, %rcx, %rcx
movl 0x44(%rax,%rcx), %r8d
movq -0x88(%rbp), %rax
notq %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
movl %r8d, -0x34(%rbp)
movl $0x1, %r14d
movl %r13d, %ecx
shlq %cl, %r14
btq %r13, %r12
jb 0x5ad98
movq 0x8(%r11), %rax
movq %r13, %r15
shlq $0x5, %r15
movq (%rax,%r15), %rbx
testq %rbx, %rbx
je 0x5ac8d
movzbl (%rbx), %eax
cmpl $0x5c, %eax
je 0x5ac87
cmpl $0x18, %eax
jne 0x5ac8d
movq 0x10(%rbx), %rbx
jmp 0x5ac75
cmpb $-0x68, (%rbx)
jne 0x5ad98
cmpl %r8d, 0x2c(%rbx)
jne 0x5ad98
movswl 0x30(%rbx), %edx
movq -0xe8(%rbp), %rdi
movl %r8d, %esi
movq -0x50(%rbp), %rcx
movl $0x82, %r8d
xorl %r9d, %r9d
callq 0x5910c
testq %rax, %rax
je 0x5ad88
testb $0x2, 0x18(%rax)
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
movq -0x60(%rbp), %rdi
je 0x5ad83
cmpw $0x0, 0x30(%rbx)
js 0x5ad83
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq 0x8(%r11), %rax
movq (%rax,%r15), %rsi
callq 0x4b095
testq %rax, %rax
jne 0x5ad12
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rbx
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rsi
callq 0x4b095
testq %rax, %rax
jne 0x5ad38
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movb (%rbx), %cl
testb %cl, %cl
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
movq -0x60(%rbp), %rdi
leaq 0x1b30e(%rip), %r8      # 0x76060
je 0x5ad73
incq %rbx
movzbl %cl, %edx
movb (%rdx,%r8), %dl
movzbl (%rax), %esi
cmpb (%rsi,%r8), %dl
jne 0x5ad73
incq %rax
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x5ad57
movzbl %cl, %ecx
movb (%rcx,%r8), %cl
movzbl (%rax), %eax
cmpb (%rax,%r8), %cl
jne 0x5ad94
orq %r14, %r12
jmp 0x5ad94
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
movq -0x60(%rbp), %rdi
movl -0x34(%rbp), %r8d
incq %r13
cmpq %rdi, %r13
jne 0x5ac50
movq -0x70(%rbp), %rsi
movl 0x28(%rsi), %eax
btl $0xc, %eax
jb 0x5ade5
btl $0x8, %eax
movl -0x2c(%rbp), %r13d
jb 0x5adee
movq 0x20(%rsi), %r9
xorl %eax, %eax
testq %r9, %r9
je 0x5ab39
testb $0x4, 0x57(%r9)
jne 0x5ab39
movzwl 0x54(%r9), %edx
cmpb $0x0, 0x56(%r9)
setne %r13b
jmp 0x5adf3
movl -0x2c(%rbp), %r13d
jmp 0x5b12d
xorl %edx, %edx
xorl %r9d, %r9d
movl $0x1, %eax
movq -0x40(%rbp), %rcx
shlq %cl, %rax
movq %rax, -0xc8(%rbp)
movl %edx, %r14d
incl %edx
xorl %r15d, %r15d
movq $0x0, -0x80(%rbp)
movq $0x0, -0xa8(%rbp)
movl $0x0, -0x38(%rbp)
movq %rdx, -0xc0(%rbp)
movq %r14, -0x98(%rbp)
movslq 0x18(%rsi), %rax
cmpq %rax, %r15
jge 0x5ae69
movq 0x30(%rsi), %rcx
movq (%rcx,%r15,8), %rcx
movzwl 0x18(%rcx), %ecx
testb $-0x7e, %cl
je 0x5ae69
testb %cl, %cl
movzbl %r13b, %r13d
movl $0x0, %eax
cmovsl %eax, %r13d
movl $0xa, %eax
jmp 0x5b043
cmpq %r14, %r15
jae 0x5ae95
movq 0x8(%r9), %rcx
movq 0x18(%r9), %rdx
movl (%rcx,%r15,4), %ebx
movq 0x38(%r9), %rcx
movzbl (%rcx,%r15), %esi
movswl 0x40(%rdx), %ecx
movl %ebx, %edx
cmpl %ecx, %ebx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovel %ecx, %edx
jmp 0x5ae9c
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rax, %r15
movq %r15, -0x50(%rbp)
movl %esi, -0x64(%rbp)
jl 0x5aed5
testb %r13b, %r13b
je 0x5aed5
testl %edx, %edx
js 0x5aed5
movq 0x18(%r9), %rax
movq 0x8(%rax), %rax
movl %edx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
cmpb $0x0, 0x28(%rax,%rcx)
movzbl %r13b, %r13d
movl $0x0, %eax
cmovel %eax, %r13d
movl %r13d, -0x2c(%rbp)
movb $0x1, %r14b
xorl %ebx, %ebx
movq %r12, -0x78(%rbp)
movl %edx, -0x9c(%rbp)
movl $0x1, %r15d
movl %ebx, %ecx
shlq %cl, %r15
btq %rbx, %r12
jb 0x5affc
movq 0x8(%r11), %rax
movq %rbx, %r13
shlq $0x5, %r13
movq (%rax,%r13), %rsi
movq %rsi, %rax
testq %rsi, %rsi
je 0x5af2d
movq %rsi, %rax
movzbl (%rax), %ecx
cmpl $0x5c, %ecx
je 0x5af24
cmpl $0x18, %ecx
jne 0x5af2d
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x5af17
testl %r10d, %r10d
movzbl %r14b, %r14d
cmovel %r10d, %r14d
cmpb $-0x68, (%rax)
jne 0x5affc
cmpl %r8d, 0x2c(%rax)
jne 0x5affc
movswl 0x30(%rax), %eax
cmpl %eax, %edx
jne 0x5affc
testl %edx, %edx
js 0x5b061
movq %r9, %r12
movq -0x58(%rbp), %rax
movq (%rax), %rdi
callq 0x4b095
testq %rax, %rax
jne 0x5af7e
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdx
movq %r12, %r9
movq 0x40(%r12), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movb (%rdx), %cl
testb %cl, %cl
je 0x5afcb
incq %rdx
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
leaq 0x1b0b7(%rip), %r8      # 0x76060
movq -0x78(%rbp), %r12
movzbl %cl, %esi
movb (%rsi,%r8), %sil
movzbl (%rax), %edi
cmpb (%rdi,%r8), %sil
jne 0x5afde
incq %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x5afad
jmp 0x5afde
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
leaq 0x1b086(%rip), %r8      # 0x76060
movq -0x78(%rbp), %r12
movzbl %cl, %ecx
movb (%rcx,%r8), %cl
movzbl (%rax), %eax
cmpb (%rax,%r8), %cl
movq -0x60(%rbp), %rdi
movl -0x34(%rbp), %r8d
movl -0x9c(%rbp), %edx
je 0x5b061
testb %r14b, %r14b
je 0x5b00d
incq %rbx
cmpq %rdi, %rbx
jb 0x5aee8
movq -0x98(%rbp), %r14
movq -0x50(%rbp), %r15
cmpq %r14, %r15
movl -0x2c(%rbp), %r13d
movzbl %r13b, %r13d
movl $0x0, %eax
cmovbl %eax, %r13d
testq %r15, %r15
cmovel %eax, %r13d
movl $0x8, %eax
movq -0x70(%rbp), %rsi
movq -0xc0(%rbp), %rdx
testl %eax, %eax
je 0x5b050
cmpl $0xa, %eax
jne 0x5b113
incq %r15
cmpq %rdx, %r15
jne 0x5ae36
jmp 0x5b11c
testl %edx, %edx
movl -0x38(%rbp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovsl %eax, %ecx
movl %ecx, -0x38(%rbp)
orq %r15, %r12
xorl %eax, %eax
movq -0x58(%rbp), %rcx
testb $0x1, 0x33(%rcx)
movq -0x70(%rbp), %rsi
movq -0xc0(%rbp), %rdx
jne 0x5b0cb
cmpb $0x0, -0x80(%rbp)
movq -0x98(%rbp), %r14
movq -0x50(%rbp), %r15
je 0x5b0df
movzbl -0xa8(%rbp), %eax
movl -0x64(%rbp), %ebx
xorl %eax, %ebx
movq 0x8(%r11), %rax
movzbl 0x18(%rax,%r13), %ecx
xorl %eax, %eax
cmpl %ecx, %ebx
setne %al
movb $0x1, %cl
movq %rcx, -0x80(%rbp)
movl -0x2c(%rbp), %r13d
jmp 0x5b043
movl -0x2c(%rbp), %r13d
movq -0x98(%rbp), %r14
movq -0x50(%rbp), %r15
jmp 0x5b043
movq 0x8(%r11), %rcx
movb 0x18(%rcx,%r13), %cl
movl %ecx, %ebx
movl -0x64(%rbp), %r13d
xorb %r13b, %bl
movq %rbx, -0xa8(%rbp)
movb $0x1, %bl
movq %rbx, -0x80(%rbp)
cmpb %r13b, %cl
je 0x5b0c2
movq 0x10(%rbp), %rcx
movq -0xc8(%rbp), %rbx
orq %rbx, (%rcx)
jmp 0x5b0c2
cmpl $0x8, %eax
jne 0x5ab37
cmpb $0x0, -0x38(%rbp)
movzbl %r13b, %r13d
movl $0x1, %eax
cmovnel %eax, %r13d
testb %r13b, %r13b
je 0x5b198
movq -0xb0(%rbp), %r14
orq 0x8(%rsi), %r14
movq %r14, -0xb0(%rbp)
notq %r14
xorl %ebx, %ebx
movl $0x1, %r15d
movl %ebx, %ecx
shlq %cl, %r15
btq %rbx, %r12
jb 0x5b18c
movq 0x8(%r11), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq -0xf0(%rbp), %rdi
callq 0x58ed0
testq %r14, %rax
je 0x5b17d
xorl %r15d, %r15d
orq %r15, %r12
movl -0x30(%rbp), %r10d
movq -0x48(%rbp), %r11
movq -0x60(%rbp), %rdi
incq %rbx
cmpq %rdi, %rbx
jne 0x5b149
movq -0x70(%rbp), %rsi
testb %r13b, %r13b
movq -0xd8(%rbp), %rcx
je 0x5b1c2
cmpq -0xb8(%rbp), %r12
jae 0x5b1c2
movq -0x40(%rbp), %rdx
leaq 0x1(%rdx), %rax
cmpq %rcx, %rdx
movq %rax, -0x40(%rbp)
jb 0x5abe5
xorl %ecx, %ecx
negb %r13b
sbbl %ecx, %ecx
jmp 0x5b1d3
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r12d, %r12d
cmpq -0xb8(%rbp), %r12
movl $0x1, %eax
cmovnel %ecx, %eax
jmp 0x5ab39