// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: wherePathSatisfiesOrderBy
static i8 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,       /* WHERE_GROUPBY or _DISTINCTBY or _ORDERBY_LIMIT */
  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 eqOpMask;         /* Allowed equality operators */
  u16 nKeyCol;          /* Number of key columns in pIndex */
  u16 nColumn;          /* Total number of ordered columns in the index */
  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 );
  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;
  eqOpMask = WO_EQ | WO_IS | WO_ISNULL;
  if( wctrlFlags & (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MAX|WHERE_ORDERBY_MIN) ){
    eqOpMask |= WO_IN;
  }
  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){
    if( iLoop>0 ) ready |= pLoop->maskSelf;
    if( iLoop<nLoop ){
      pLoop = pPath->aLoop[iLoop];
      if( wctrlFlags & WHERE_ORDERBY_LIMIT ) continue;
    }else{
      pLoop = pLast;
    }
    if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){
      if( pLoop->u.vtab.isOrdered && (wctrlFlags & WHERE_DISTINCTBY)==0 ){
        obSat = obDone;
      }
      break;
    }else if( wctrlFlags & WHERE_DISTINCTBY ){
      pLoop->u.btree.nDistinctCol = 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 = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);
      if( pOBExpr->op!=TK_COLUMN ) continue;
      if( pOBExpr->iTable!=iCur ) continue;
      pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
                       ~ready, eqOpMask, 0);
      if( pTerm==0 ) continue;
      if( pTerm->eOperator==WO_IN ){
        /* IN terms are only valid for sorting in the ORDER BY LIMIT
        ** optimization, and then only if they are actually used
        ** by the query plan */
        assert( wctrlFlags &
               (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) );
        for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
        if( j>=pLoop->nLTerm ) continue;
      }
      if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
        Parse *pParse = pWInfo->pParse;
        CollSeq *pColl1 = sqlite3ExprNNCollSeq(pParse, pOrderBy->a[i].pExpr);
        CollSeq *pColl2 = sqlite3ExprCompareCollSeq(pParse, pTerm->pExpr);
        assert( pColl1 );
        if( pColl2==0 || sqlite3StrICmp(pColl1->zName, pColl2->zName) ){
          continue;
        }
        testcase( pTerm->pExpr->op==TK_IS );
      }
      obSat |= MASKBIT(i);
    }

    if( (pLoop->wsFlags & WHERE_ONEROW)==0 ){
      if( pLoop->wsFlags & WHERE_IPK ){
        pIndex = 0;
        nKeyCol = 0;
        nColumn = 1;
      }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
        return 0;
      }else{
        nKeyCol = pIndex->nKeyCol;
        nColumn = pIndex->nColumn;
        assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) );
        assert( pIndex->aiColumn[nColumn-1]==XN_ROWID
                          || !HasRowid(pIndex->pTable));
        isOrderDistinct = IsUniqueIndex(pIndex)
                          && (pLoop->wsFlags & WHERE_SKIPSCAN)==0;
      }

      /* 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 = 1; /* True to run the ORDER BY search loop */

        assert( j>=pLoop->u.btree.nEq
            || (pLoop->aLTerm[j]==0)==(j<pLoop->nSkip)
        );
        if( j<pLoop->u.btree.nEq && j>=pLoop->nSkip ){
          u16 eOp = pLoop->aLTerm[j]->eOperator;

          /* Skip over == and IS and ISNULL terms.  (Also skip IN terms when
          ** doing WHERE_ORDERBY_LIMIT processing).  Except, IS and ISNULL
          ** terms imply that the index is not UNIQUE NOT NULL in which case
          ** the loop need to be marked as not order-distinct because it can
          ** have repeated NULL rows.
          **
          ** If the current term is a column of an ((?,?) IN (SELECT...))
          ** expression for which the SELECT returns more than one column,
          ** check that it is the only column used by this loop. Otherwise,
          ** if it is one of two or more, none of the columns can be
          ** considered to match an ORDER BY term.
          */
          if( (eOp & eqOpMask)!=0 ){
            if( eOp & (WO_ISNULL|WO_IS) ){
              testcase( eOp & WO_ISNULL );
              testcase( eOp & WO_IS );
              testcase( isOrderDistinct );
              isOrderDistinct = 0;
            }
            continue;
          }else if( ALWAYS(eOp & WO_IN) ){
            /* ALWAYS() justification: eOp is an equality operator due to the
            ** j<pLoop->u.btree.nEq constraint above.  Any equality other
            ** than WO_IN is captured by the previous "if".  So this one
            ** always has to be WO_IN. */
            Expr *pX = pLoop->aLTerm[j]->pExpr;
            for(i=j+1; i<pLoop->u.btree.nEq; i++){
              if( pLoop->aLTerm[i]->pExpr==pX ){
                assert( (pLoop->aLTerm[i]->eOperator & WO_IN) );
                bOnce = 0;
                break;
              }
            }
          }
        }

        /* Get the column number in the table (iColumn) and sort order
        ** (revIdx) for the j-th column of the index.
        */
        if( pIndex ){
          iColumn = pIndex->aiColumn[j];
          revIdx = pIndex->aSortOrder[j] & KEYINFO_ORDER_DESC;
          if( iColumn==pIndex->pTable->iPKey ) iColumn = XN_ROWID;
        }else{
          iColumn = XN_ROWID;
          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 mark that ORDER BY term off
        */
        isMatch = 0;
        for(i=0; bOnce && i<nOrderBy; i++){
          if( MASKBIT(i) & obSat ) continue;
          pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);
          testcase( wctrlFlags & WHERE_GROUPBY );
          testcase( wctrlFlags & WHERE_DISTINCTBY );
          if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0;
          if( iColumn>=XN_ROWID ){
            if( pOBExpr->op!=TK_COLUMN ) continue;
            if( pOBExpr->iTable!=iCur ) continue;
            if( pOBExpr->iColumn!=iColumn ) continue;
          }else{
            Expr *pIdxExpr = pIndex->aColExpr->a[j].pExpr;
            if( sqlite3ExprCompareSkip(pOBExpr, pIdxExpr, iCur) ){
              continue;
            }
          }
          if( iColumn!=XN_ROWID ){
            pColl = sqlite3ExprNNCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
            if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;
          }
          if( wctrlFlags & WHERE_DISTINCTBY ){
            pLoop->u.btree.nDistinctCol = j+1;
          }
          isMatch = 1;
          break;
        }
        if( isMatch && (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].sortFlags&KEYINFO_ORDER_DESC) ){
              isMatch = 0;
            }
          }else{
            rev = revIdx ^ (pOrderBy->a[i].sortFlags & KEYINFO_ORDER_DESC);
            if( rev ) *pRevMask |= MASKBIT(iLoop);
            revSet = 1;
          }
        }
        if( isMatch && (pOrderBy->a[i].sortFlags & KEYINFO_ORDER_BIGNULL) ){
          if( j==pLoop->u.btree.nEq ){
            pLoop->wsFlags |= WHERE_BIGNULL_SORT;
          }else{
            isMatch = 0;
          }
        }
        if( isMatch ){
          if( iColumn==XN_ROWID ){
            testcase( distinctColumns==0 );
            distinctColumns = 1;
          }
          obSat |= MASKBIT(i);
        }else{
          /* No match found */
          if( j==0 || j<nKeyCol ){
            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;
        Bitmask mTerm;
        if( MASKBIT(i) & obSat ) continue;
        p = pOrderBy->a[i].pExpr;
        mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);
        if( mTerm==0 && !sqlite3ExprIsConstant(p) ) continue;
        if( (mTerm&~orderDistinctMask)==0 ){
          obSat |= MASKBIT(i);
        }
      }
    }
  } /* End the loop over all WhereLoops from outer-most down to inner-most */
  if( obSat==obDone ) return (i8)nOrderBy;
  if( !isOrderDistinct ){
    for(i=nOrderBy-1; i>0; i--){
      Bitmask m = MASKBIT(i) - 1;
      if( (obSat&m)==m ) return i;
    }
    return 0;
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0xa8(%rsp)
movl %ecx, %eax
movq %rdx, 0xa0(%rsp)
movq %rsi, 0x18(%rsp)
testl %r8d, %r8d
je 0x2e5c48
movq (%rdi), %rcx
movq (%rcx), %rcx
testb $0x40, 0x5c(%rcx)
jne 0x2e5c57
movq 0x18(%rsp), %rcx
movzwl (%rcx), %r9d
cmpl $0x3f, %r9d
jbe 0x2e5c6b
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rdx
movl %r9d, %ecx
shlq %cl, %rdx
notq %rdx
movq %rdx, 0x50(%rsp)
movzwl %ax, %eax
movl %eax, 0xc(%rsp)
andl $0x803, %eax            # imm = 0x803
cmpl $0x1, %eax
movl $0x183, %eax            # imm = 0x183
sbbl $0x0, %eax
movl %eax, 0x44(%rsp)
testl %r9d, %r9d
je 0x2e64b2
addq $0x8, 0x18(%rsp)
leaq 0x68(%rdi), %rax
movq %rax, 0xb0(%rsp)
movq %rdi, 0x68(%rsp)
leaq 0x290(%rdi), %rax
movq %rax, 0xb8(%rsp)
movl %r9d, %r11d
movzwl %r8w, %eax
movq %rax, 0x78(%rsp)
movb $0x1, %bpl
xorl %eax, %eax
movq $0x0, 0x58(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r10d, %r10d
xorl %r14d, %r14d
movq %r9, 0x10(%rsp)
movq %r11, 0x28(%rsp)
testq %rax, %rax
je 0x2e5d10
movq 0x58(%rsp), %rcx
orq 0x8(%r14), %rcx
movq %rcx, 0x58(%rsp)
movq 0xa8(%rsp), %r14
cmpq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
jae 0x2e5d4a
btl $0xb, 0xc(%rsp)
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %r14
movq 0x30(%rsp), %rax
jb 0x2e6493
testb $0x4, 0x29(%r14)
jne 0x2e64ba
cmpb $0x0, 0xc(%rsp)
jns 0x2e5d63
movw $0x0, 0x1e(%r14)
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq %r14, 0x20(%rsp)
movzbl 0x10(%r14), %ecx
imulq $0x70, %rcx, %rcx
movl 0x48(%rax,%rcx), %esi
movq 0x58(%rsp), %rax
notq %rax
movq %rax, 0x38(%rsp)
xorl %r15d, %r15d
movl %ebp, 0x4(%rsp)
movl %esi, 0x8(%rsp)
movl $0x1, %r14d
movl %r15d, %ecx
shlq %cl, %r14
btq %r15, %r10
jb 0x2e5f38
leaq (%r15,%r15,2), %rbx
movq 0x18(%rsp), %rax
movq (%rax,%rbx,8), %r12
testq %r12, %r12
je 0x2e5de5
movl 0x4(%r12), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2e5de5
btl $0x12, %eax
jb 0x2e5dd6
addq $0x10, %r12
jmp 0x2e5ddf
movq 0x20(%r12), %r12
addq $0x8, %r12
movq (%r12), %r12
jmp 0x2e5db9
cmpb $-0x5c, (%r12)
jne 0x2e5f38
cmpl %esi, 0x2c(%r12)
jne 0x2e5f38
movq %r10, %rbp
movswl 0x30(%r12), %edx
movq 0xb0(%rsp), %rdi
movq 0x38(%rsp), %rcx
movl 0x44(%rsp), %r8d
xorl %r9d, %r9d
callq 0x2e2fb3
testq %rax, %rax
je 0x2e5f14
movq %rax, %r13
movzwl 0x14(%rax), %eax
cmpw $0x1, %ax
movq %rbp, %r10
movq 0x28(%rsp), %r11
jne 0x2e5e88
movq 0x20(%rsp), %rdx
movzwl 0x2c(%rdx), %ecx
testq %rcx, %rcx
setne %sil
je 0x2e5f2b
movq 0x38(%rdx), %rdx
cmpq (%rdx), %r13
je 0x2e5e7f
leaq -0x1(%rcx), %rsi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x2e5f2b
leaq 0x1(%rdi), %r8
cmpq 0x8(%rdx,%rdi,8), %r13
movq %r8, %rdi
jne 0x2e5e61
cmpq %rcx, %r8
setb %sil
testb %sil, %sil
je 0x2e5f2b
testb $-0x7e, %al
je 0x2e5f28
cmpw $0x0, 0x30(%r12)
js 0x2e5f28
movq 0x18(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq 0x68(%rsp), %rcx
movq (%rcx), %rbx
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x2b32a0
movq %rax, %r12
testq %rax, %rax
jne 0x2e5ec8
movq (%rbx), %rax
movq 0x10(%rax), %r12
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x287c50
testq %rax, %rax
je 0x2e5f14
movq (%r12), %rcx
movq (%rax), %rax
xorl %edx, %edx
movq %rbp, %r10
movq 0x28(%rsp), %r11
leaq 0xf4b6f(%rip), %r9      # 0x3daa60
movzbl (%rcx,%rdx), %esi
movzbl (%rax,%rdx), %edi
cmpb %dil, %sil
jne 0x2e5f05
testq %rsi, %rsi
jne 0x2e5f0f
jmp 0x2e5f23
movb (%rsi,%r9), %r8b
cmpb (%rdi,%r9), %r8b
jne 0x2e5f23
incq %rdx
jmp 0x2e5ef1
movq 0x10(%rsp), %r9
movq %rbp, %r10
movq 0x28(%rsp), %r11
jmp 0x2e5f30
cmpb %dil, %sil
jne 0x2e5f2b
orq %r14, %r10
movq 0x10(%rsp), %r9
movl 0x4(%rsp), %ebp
movl 0x8(%rsp), %esi
incq %r15
cmpq %r11, %r15
jne 0x2e5d96
movq 0x20(%rsp), %r14
movl 0x28(%r14), %ecx
btl $0xc, %ecx
jb 0x2e5f93
btl $0x8, %ecx
jb 0x2e5f9a
movq 0x20(%r14), %rbx
testq %rbx, %rbx
je 0x2e5c57
testb $0x4, 0x63(%rbx)
jne 0x2e5c57
movzwl 0x5e(%rbx), %eax
movq %rax, 0x88(%rsp)
movzwl 0x60(%rbx), %eax
cmpb $0x0, 0x62(%rbx)
setne %dl
testw %cx, %cx
setns %bpl
andb %dl, %bpl
jmp 0x2e5fad
xorl %ecx, %ecx
jmp 0x2e6395
movl $0x1, %eax
xorl %ebx, %ebx
movq $0x0, 0x88(%rsp)
testl %eax, %eax
je 0x2e638b
movl $0x1, %edx
movq 0x30(%rsp), %rcx
shlq %cl, %rdx
movq %rdx, 0x98(%rsp)
movl %eax, %eax
movq %rax, 0xc0(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x60(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x0, 0x48(%rsp)
movq %rbx, 0x38(%rsp)
movzwl 0x18(%r14), %eax
movb $0x1, %r15b
cmpq %rax, %r13
jae 0x2e606b
movzwl 0x2e(%r14), %ecx
cmpq %rcx, %r13
jb 0x2e606b
movq 0x38(%r14), %rdx
movq (%rdx,%r13,8), %rsi
movzwl 0x14(%rsi), %ecx
testl %ecx, 0x44(%rsp)
je 0x2e6039
testl $0x180, %ecx            # imm = 0x180
movzbl %bpl, %ebp
movl $0x0, %edx
cmovnel %edx, %ebp
movb $0x1, %r15b
jmp 0x2e605f
movb $0x1, %r15b
testb $0x1, %cl
je 0x2e605f
movq (%rsi), %rsi
leal -0x1(%rax), %edi
movq %r13, %r8
cmpq %r8, %rdi
je 0x2e605f
movq 0x8(%rdx,%r8,8), %r9
incq %r8
cmpq %rsi, (%r9)
jne 0x2e604a
xorl %r15d, %r15d
movb $0x1, %dl
testl %ecx, 0x44(%rsp)
jne 0x2e631e
testq %rbx, %rbx
je 0x2e609b
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdx
movzwl (%rcx,%r13,2), %ecx
movq 0x38(%rbx), %rsi
movzbl (%rsi,%r13), %esi
andl $0x1, %esi
cmpw 0x44(%rdx), %cx
movl $0xffff, %edx           # imm = 0xFFFF
cmovel %edx, %ecx
movswl %cx, %r14d
jmp 0x2e60a3
xorl %esi, %esi
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpq %rax, %r13
jb 0x2e60d2
testb %bpl, %bpl
je 0x2e60d2
testl %r14d, %r14d
js 0x2e60d2
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rax
movl %r14d, %ecx
shlq $0x5, %rcx
cmpb $0x0, 0x18(%rax,%rcx)
movzbl %bpl, %ebp
movl $0x0, %eax
cmovel %eax, %ebp
movl %ebp, 0x4(%rsp)
testb %r15b, %r15b
je 0x2e625c
movl %esi, 0x4c(%rsp)
xorl %ebp, %ebp
movl %r15d, %r12d
movq %r10, 0x90(%rsp)
btq %rbp, %r10
jae 0x2e6110
incq %rbp
testb %r12b, %r12b
setne %al
cmpq %r11, %rbp
setb %r15b
andb %al, %r15b
jne 0x2e60f0
jmp 0x2e624f
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq 0x18(%rsp), %rax
movq (%rax,%rbx,8), %rdi
testq %rdi, %rdi
je 0x2e614c
movl 0x4(%rdi), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2e614c
btl $0x12, %eax
jb 0x2e613f
addq $0x10, %rdi
jmp 0x2e6147
movq 0x20(%rdi), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
jmp 0x2e6124
movl 0xc(%rsp), %eax
andl $0xc0, %eax
movzbl %r12b, %r12d
cmovel %eax, %r12d
cmpl $-0x1, %r14d
jl 0x2e6180
cmpb $-0x5c, (%rdi)
jne 0x2e60f6
movl 0x8(%rsp), %eax
cmpl %eax, 0x2c(%rdi)
jne 0x2e60f6
movswl 0x30(%rdi), %eax
cmpl %eax, %r14d
jne 0x2e60f6
jmp 0x2e61b7
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movq 0x8(%rax,%rcx,8), %rsi
movl 0x8(%rsp), %edx
callq 0x2e2f38
movq 0x28(%rsp), %r11
movq 0x90(%rsp), %r10
testl %eax, %eax
jne 0x2e60f6
cmpl $-0x1, %r14d
je 0x2e6237
movq 0x18(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq 0x68(%rsp), %rcx
movq (%rcx), %rbx
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x2b32a0
testq %rax, %rax
jne 0x2e61e5
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x40(%rcx), %rcx
movq (%rcx,%r13,8), %rcx
xorl %edx, %edx
movq 0x90(%rsp), %r10
movq 0x28(%rsp), %r11
leaq 0xf4855(%rip), %r9      # 0x3daa60
movzbl (%rax,%rdx), %esi
movzbl (%rcx,%rdx), %edi
cmpb %dil, %sil
jne 0x2e621f
testq %rsi, %rsi
jne 0x2e6229
jmp 0x2e622e
movb (%rsi,%r9), %r8b
cmpb (%rdi,%r9), %r8b
jne 0x2e622e
incq %rdx
jmp 0x2e620b
cmpb %dil, %sil
jne 0x2e60f6
movb $0x1, %al
cmpb $0x0, 0xc(%rsp)
jns 0x2e6251
leal 0x1(%r13), %ecx
movq 0x20(%rsp), %rdx
movw %cx, 0x1e(%rdx)
jmp 0x2e6251
xorl %eax, %eax
movq 0x38(%rsp), %rbx
movl 0x4c(%rsp), %esi
jmp 0x2e6260
xorl %ebp, %ebp
xorl %eax, %eax
testb $0x40, 0xc(%rsp)
jne 0x2e62a9
testb $0x1, %r15b
je 0x2e62a9
cmpb $0x0, 0x60(%rsp)
je 0x2e6335
movzbl 0x80(%rsp), %ecx
xorl %ecx, %esi
movl %ebp, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x18(%rsp), %rdx
movzbl 0x10(%rdx,%rcx,8), %ecx
andl $0x1, %ecx
cmpl %ecx, %esi
movzbl %al, %eax
movl $0x0, %ecx
cmovnel %ecx, %eax
movb $0x1, %cl
movq %rcx, 0x60(%rsp)
testb %al, %al
je 0x2e62fe
movl %ebp, %eax
leaq (%rax,%rax,2), %rcx
movq 0x18(%rsp), %rdx
testb $0x2, 0x10(%rdx,%rcx,8)
je 0x2e62d6
movq 0x20(%rsp), %rcx
movzwl 0x18(%rcx), %ecx
cmpq %rcx, %r13
jne 0x2e62fe
movq 0x20(%rsp), %rcx
orb $0x8, 0x2a(%rcx)
cmpl $-0x1, %r14d
movl 0x48(%rsp), %edx
movzbl %dl, %edx
movl $0x1, %ecx
cmovel %ecx, %edx
movl %edx, 0x48(%rsp)
btsq %rax, %r10
movb $0x1, %dl
movq 0x20(%rsp), %r14
movl 0x4(%rsp), %ebp
jmp 0x2e631e
xorl %edx, %edx
cmpq 0x88(%rsp), %r13
movl 0x4(%rsp), %ebp
movzbl %bpl, %ebp
cmovbl %edx, %ebp
testq %r13, %r13
cmovel %edx, %ebp
movq 0x20(%rsp), %r14
testb %dl, %dl
je 0x2e637c
incq %r13
cmpq 0xc0(%rsp), %r13
jb 0x2e5ff9
jmp 0x2e637c
movl %ebp, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x18(%rsp), %rdx
movb 0x10(%rdx,%rcx,8), %cl
andb $0x1, %cl
movl %ecx, %edx
xorb %sil, %dl
movq %rdx, 0x80(%rsp)
movb $0x1, %dl
movq %rdx, 0x60(%rsp)
cmpb %sil, %cl
je 0x2e62a9
movq 0x130(%rsp), %rcx
movq 0x98(%rsp), %rdx
orq %rdx, (%rcx)
jmp 0x2e62a9
cmpb $0x0, 0x48(%rsp)
sete %al
movq 0x10(%rsp), %r9
jmp 0x2e638d
movb $0x1, %al
testb %bpl, %bpl
sete %cl
andb %al, %cl
movq 0x30(%rsp), %rax
testb %cl, %cl
je 0x2e63a5
xorl %ebp, %ebp
jmp 0x2e6493
movq 0x70(%rsp), %rbx
orq 0x8(%r14), %rbx
movq %rbx, 0x70(%rsp)
notq %rbx
movq 0x18(%rsp), %r12
xorl %r14d, %r14d
movl $0x1, %ebp
movl %r14d, %ecx
shlq %cl, %rbp
btq %r14, %r10
jb 0x2e647b
movq (%r12), %r15
testq %r15, %r15
je 0x2e63fc
movq 0xb8(%rsp), %rdi
movq %r15, %rsi
movq %r10, %r13
callq 0x2e2a4c
movq 0x28(%rsp), %r11
movq %r13, %r10
movq %rax, %r13
jmp 0x2e63ff
xorl %r13d, %r13d
testq %r13, %r13
jne 0x2e6462
movw $0x1, 0xec(%rsp)
leaq -0x1c2f2(%rip), %rax    # 0x2ca123
movq %rax, 0xd0(%rsp)
leaq -0x1c21f(%rip), %rax    # 0x2ca205
movq %rax, 0xd8(%rsp)
movl $0x0, 0xf0(%rsp)
testq %r15, %r15
je 0x2e6457
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
movq %r10, %r15
callq 0x2ca211
movq 0x28(%rsp), %r11
movq %r15, %r10
cmpw $0x0, 0xec(%rsp)
je 0x2e6471
testq %rbx, %r13
movl $0x0, %eax
cmovneq %rax, %rbp
orq %rbp, %r10
movq 0x10(%rsp), %r9
movq 0x30(%rsp), %rax
incq %r14
addq $0x18, %r12
cmpq %r14, %r9
jne 0x2e63be
movb $0x1, %bpl
movq 0x20(%rsp), %r14
testb %bpl, %bpl
je 0x2e64d1
cmpq 0x50(%rsp), %r10
jae 0x2e64d1
movq %rax, %rcx
incq %rax
cmpq 0x78(%rsp), %rcx
jb 0x2e5cfd
jmp 0x2e64d1
movb $0x1, %bpl
xorl %r10d, %r10d
jmp 0x2e64d1
cmpb $0x0, 0x1d(%r14)
movq %r10, %rax
cmovneq 0x50(%rsp), %rax
cmpb $0x0, 0xc(%rsp)
cmovnsq %rax, %r10
cmpq 0x50(%rsp), %r10
jne 0x2e64e0
movl %r9d, %eax
jmp 0x2e5c59
movb $-0x1, %al
testb %bpl, %bpl
jne 0x2e5c59
leal -0x1(%r9), %edx
cmpq $0x2, %r9
jl 0x2e5c57
decq %r9
movq $-0x1, %rsi
movl %r9d, %ecx
shlq %cl, %rsi
orq %r10, %rsi
movzbl %dl, %ecx
decl %edx
movzbl %al, %eax
cmpq $-0x1, %rsi
cmovel %ecx, %eax
jne 0x2e64ef
jmp 0x2e5c59